[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> blocks.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["blocks"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 437);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = this["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 119:
 105  /***/ (function(module, exports) {
 106  
 107  (function() { module.exports = this["wp"]["shortcode"]; }());
 108  
 109  /***/ }),
 110  
 111  /***/ 13:
 112  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 113  
 114  "use strict";
 115  
 116  // EXPORTS
 117  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 118  
 119  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 120  var arrayWithHoles = __webpack_require__(38);
 121  
 122  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 123  function _iterableToArrayLimit(arr, i) {
 124    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 125    var _arr = [];
 126    var _n = true;
 127    var _d = false;
 128    var _e = undefined;
 129  
 130    try {
 131      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 132        _arr.push(_s.value);
 133  
 134        if (i && _arr.length === i) break;
 135      }
 136    } catch (err) {
 137      _d = true;
 138      _e = err;
 139    } finally {
 140      try {
 141        if (!_n && _i["return"] != null) _i["return"]();
 142      } finally {
 143        if (_d) throw _e;
 144      }
 145    }
 146  
 147    return _arr;
 148  }
 149  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 150  var unsupportedIterableToArray = __webpack_require__(29);
 151  
 152  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 153  var nonIterableRest = __webpack_require__(39);
 154  
 155  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 156  
 157  
 158  
 159  
 160  function _slicedToArray(arr, i) {
 161    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 162  }
 163  
 164  /***/ }),
 165  
 166  /***/ 139:
 167  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 168  
 169  "use strict";
 170  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toArray; });
 171  /* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
 172  /* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
 173  /* harmony import */ var _unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29);
 174  /* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39);
 175  
 176  
 177  
 178  
 179  function _toArray(arr) {
 180    return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(arr) || Object(_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(arr) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])();
 181  }
 182  
 183  /***/ }),
 184  
 185  /***/ 17:
 186  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 187  
 188  "use strict";
 189  
 190  // EXPORTS
 191  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 192  
 193  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 194  var arrayLikeToArray = __webpack_require__(26);
 195  
 196  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 197  
 198  function _arrayWithoutHoles(arr) {
 199    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 200  }
 201  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 202  var iterableToArray = __webpack_require__(35);
 203  
 204  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 205  var unsupportedIterableToArray = __webpack_require__(29);
 206  
 207  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 208  function _nonIterableSpread() {
 209    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 210  }
 211  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 212  
 213  
 214  
 215  
 216  function _toConsumableArray(arr) {
 217    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 218  }
 219  
 220  /***/ }),
 221  
 222  /***/ 18:
 223  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 224  
 225  "use strict";
 226  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 227  function _defineProperties(target, props) {
 228    for (var i = 0; i < props.length; i++) {
 229      var descriptor = props[i];
 230      descriptor.enumerable = descriptor.enumerable || false;
 231      descriptor.configurable = true;
 232      if ("value" in descriptor) descriptor.writable = true;
 233      Object.defineProperty(target, descriptor.key, descriptor);
 234    }
 235  }
 236  
 237  function _createClass(Constructor, protoProps, staticProps) {
 238    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 239    if (staticProps) _defineProperties(Constructor, staticProps);
 240    return Constructor;
 241  }
 242  
 243  /***/ }),
 244  
 245  /***/ 19:
 246  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 247  
 248  "use strict";
 249  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 250  function _classCallCheck(instance, Constructor) {
 251    if (!(instance instanceof Constructor)) {
 252      throw new TypeError("Cannot call a class as a function");
 253    }
 254  }
 255  
 256  /***/ }),
 257  
 258  /***/ 196:
 259  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 260  
 261  "use strict";
 262  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 263  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 264  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
 265  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 266  
 267  
 268  /**
 269   * WordPress dependencies
 270   */
 271  
 272  var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 273    xmlns: "http://www.w3.org/2000/svg",
 274    viewBox: "0 0 24 24"
 275  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 276    d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
 277  }));
 278  /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
 279  
 280  
 281  /***/ }),
 282  
 283  /***/ 2:
 284  /***/ (function(module, exports) {
 285  
 286  (function() { module.exports = this["lodash"]; }());
 287  
 288  /***/ }),
 289  
 290  /***/ 26:
 291  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 292  
 293  "use strict";
 294  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 295  function _arrayLikeToArray(arr, len) {
 296    if (len == null || len > arr.length) len = arr.length;
 297  
 298    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 299      arr2[i] = arr[i];
 300    }
 301  
 302    return arr2;
 303  }
 304  
 305  /***/ }),
 306  
 307  /***/ 262:
 308  /***/ (function(module, exports) {
 309  
 310  (function() { module.exports = this["wp"]["blockSerializationDefaultParser"]; }());
 311  
 312  /***/ }),
 313  
 314  /***/ 263:
 315  /***/ (function(module, exports, __webpack_require__) {
 316  
 317  var __WEBPACK_AMD_DEFINE_RESULT__;;/*! showdown v 1.9.1 - 02-11-2019 */
 318  (function(){
 319  /**
 320   * Created by Tivie on 13-07-2015.
 321   */
 322  
 323  function getDefaultOpts (simple) {
 324    'use strict';
 325  
 326    var defaultOptions = {
 327      omitExtraWLInCodeBlocks: {
 328        defaultValue: false,
 329        describe: 'Omit the default extra whiteline added to code blocks',
 330        type: 'boolean'
 331      },
 332      noHeaderId: {
 333        defaultValue: false,
 334        describe: 'Turn on/off generated header id',
 335        type: 'boolean'
 336      },
 337      prefixHeaderId: {
 338        defaultValue: false,
 339        describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \'section-\' prefix',
 340        type: 'string'
 341      },
 342      rawPrefixHeaderId: {
 343        defaultValue: false,
 344        describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',
 345        type: 'boolean'
 346      },
 347      ghCompatibleHeaderId: {
 348        defaultValue: false,
 349        describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',
 350        type: 'boolean'
 351      },
 352      rawHeaderId: {
 353        defaultValue: false,
 354        describe: 'Remove only spaces, \' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',
 355        type: 'boolean'
 356      },
 357      headerLevelStart: {
 358        defaultValue: false,
 359        describe: 'The header blocks level start',
 360        type: 'integer'
 361      },
 362      parseImgDimensions: {
 363        defaultValue: false,
 364        describe: 'Turn on/off image dimension parsing',
 365        type: 'boolean'
 366      },
 367      simplifiedAutoLink: {
 368        defaultValue: false,
 369        describe: 'Turn on/off GFM autolink style',
 370        type: 'boolean'
 371      },
 372      excludeTrailingPunctuationFromURLs: {
 373        defaultValue: false,
 374        describe: 'Excludes trailing punctuation from links generated with autoLinking',
 375        type: 'boolean'
 376      },
 377      literalMidWordUnderscores: {
 378        defaultValue: false,
 379        describe: 'Parse midword underscores as literal underscores',
 380        type: 'boolean'
 381      },
 382      literalMidWordAsterisks: {
 383        defaultValue: false,
 384        describe: 'Parse midword asterisks as literal asterisks',
 385        type: 'boolean'
 386      },
 387      strikethrough: {
 388        defaultValue: false,
 389        describe: 'Turn on/off strikethrough support',
 390        type: 'boolean'
 391      },
 392      tables: {
 393        defaultValue: false,
 394        describe: 'Turn on/off tables support',
 395        type: 'boolean'
 396      },
 397      tablesHeaderId: {
 398        defaultValue: false,
 399        describe: 'Add an id to table headers',
 400        type: 'boolean'
 401      },
 402      ghCodeBlocks: {
 403        defaultValue: true,
 404        describe: 'Turn on/off GFM fenced code blocks support',
 405        type: 'boolean'
 406      },
 407      tasklists: {
 408        defaultValue: false,
 409        describe: 'Turn on/off GFM tasklist support',
 410        type: 'boolean'
 411      },
 412      smoothLivePreview: {
 413        defaultValue: false,
 414        describe: 'Prevents weird effects in live previews due to incomplete input',
 415        type: 'boolean'
 416      },
 417      smartIndentationFix: {
 418        defaultValue: false,
 419        description: 'Tries to smartly fix indentation in es6 strings',
 420        type: 'boolean'
 421      },
 422      disableForced4SpacesIndentedSublists: {
 423        defaultValue: false,
 424        description: 'Disables the requirement of indenting nested sublists by 4 spaces',
 425        type: 'boolean'
 426      },
 427      simpleLineBreaks: {
 428        defaultValue: false,
 429        description: 'Parses simple line breaks as <br> (GFM Style)',
 430        type: 'boolean'
 431      },
 432      requireSpaceBeforeHeadingText: {
 433        defaultValue: false,
 434        description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',
 435        type: 'boolean'
 436      },
 437      ghMentions: {
 438        defaultValue: false,
 439        description: 'Enables github @mentions',
 440        type: 'boolean'
 441      },
 442      ghMentionsLink: {
 443        defaultValue: 'https://github.com/{u}',
 444        description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',
 445        type: 'string'
 446      },
 447      encodeEmails: {
 448        defaultValue: true,
 449        description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',
 450        type: 'boolean'
 451      },
 452      openLinksInNewWindow: {
 453        defaultValue: false,
 454        description: 'Open all links in new windows',
 455        type: 'boolean'
 456      },
 457      backslashEscapesHTMLTags: {
 458        defaultValue: false,
 459        description: 'Support for HTML Tag escaping. ex: \<div>foo\</div>',
 460        type: 'boolean'
 461      },
 462      emoji: {
 463        defaultValue: false,
 464        description: 'Enable emoji support. Ex: `this is a :smile: emoji`',
 465        type: 'boolean'
 466      },
 467      underline: {
 468        defaultValue: false,
 469        description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',
 470        type: 'boolean'
 471      },
 472      completeHTMLDocument: {
 473        defaultValue: false,
 474        description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',
 475        type: 'boolean'
 476      },
 477      metadata: {
 478        defaultValue: false,
 479        description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',
 480        type: 'boolean'
 481      },
 482      splitAdjacentBlockquotes: {
 483        defaultValue: false,
 484        description: 'Split adjacent blockquote blocks',
 485        type: 'boolean'
 486      }
 487    };
 488    if (simple === false) {
 489      return JSON.parse(JSON.stringify(defaultOptions));
 490    }
 491    var ret = {};
 492    for (var opt in defaultOptions) {
 493      if (defaultOptions.hasOwnProperty(opt)) {
 494        ret[opt] = defaultOptions[opt].defaultValue;
 495      }
 496    }
 497    return ret;
 498  }
 499  
 500  function allOptionsOn () {
 501    'use strict';
 502    var options = getDefaultOpts(true),
 503        ret = {};
 504    for (var opt in options) {
 505      if (options.hasOwnProperty(opt)) {
 506        ret[opt] = true;
 507      }
 508    }
 509    return ret;
 510  }
 511  
 512  /**
 513   * Created by Tivie on 06-01-2015.
 514   */
 515  
 516  // Private properties
 517  var showdown = {},
 518      parsers = {},
 519      extensions = {},
 520      globalOptions = getDefaultOpts(true),
 521      setFlavor = 'vanilla',
 522      flavor = {
 523        github: {
 524          omitExtraWLInCodeBlocks:              true,
 525          simplifiedAutoLink:                   true,
 526          excludeTrailingPunctuationFromURLs:   true,
 527          literalMidWordUnderscores:            true,
 528          strikethrough:                        true,
 529          tables:                               true,
 530          tablesHeaderId:                       true,
 531          ghCodeBlocks:                         true,
 532          tasklists:                            true,
 533          disableForced4SpacesIndentedSublists: true,
 534          simpleLineBreaks:                     true,
 535          requireSpaceBeforeHeadingText:        true,
 536          ghCompatibleHeaderId:                 true,
 537          ghMentions:                           true,
 538          backslashEscapesHTMLTags:             true,
 539          emoji:                                true,
 540          splitAdjacentBlockquotes:             true
 541        },
 542        original: {
 543          noHeaderId:                           true,
 544          ghCodeBlocks:                         false
 545        },
 546        ghost: {
 547          omitExtraWLInCodeBlocks:              true,
 548          parseImgDimensions:                   true,
 549          simplifiedAutoLink:                   true,
 550          excludeTrailingPunctuationFromURLs:   true,
 551          literalMidWordUnderscores:            true,
 552          strikethrough:                        true,
 553          tables:                               true,
 554          tablesHeaderId:                       true,
 555          ghCodeBlocks:                         true,
 556          tasklists:                            true,
 557          smoothLivePreview:                    true,
 558          simpleLineBreaks:                     true,
 559          requireSpaceBeforeHeadingText:        true,
 560          ghMentions:                           false,
 561          encodeEmails:                         true
 562        },
 563        vanilla: getDefaultOpts(true),
 564        allOn: allOptionsOn()
 565      };
 566  
 567  /**
 568   * helper namespace
 569   * @type {{}}
 570   */
 571  showdown.helper = {};
 572  
 573  /**
 574   * TODO LEGACY SUPPORT CODE
 575   * @type {{}}
 576   */
 577  showdown.extensions = {};
 578  
 579  /**
 580   * Set a global option
 581   * @static
 582   * @param {string} key
 583   * @param {*} value
 584   * @returns {showdown}
 585   */
 586  showdown.setOption = function (key, value) {
 587    'use strict';
 588    globalOptions[key] = value;
 589    return this;
 590  };
 591  
 592  /**
 593   * Get a global option
 594   * @static
 595   * @param {string} key
 596   * @returns {*}
 597   */
 598  showdown.getOption = function (key) {
 599    'use strict';
 600    return globalOptions[key];
 601  };
 602  
 603  /**
 604   * Get the global options
 605   * @static
 606   * @returns {{}}
 607   */
 608  showdown.getOptions = function () {
 609    'use strict';
 610    return globalOptions;
 611  };
 612  
 613  /**
 614   * Reset global options to the default values
 615   * @static
 616   */
 617  showdown.resetOptions = function () {
 618    'use strict';
 619    globalOptions = getDefaultOpts(true);
 620  };
 621  
 622  /**
 623   * Set the flavor showdown should use as default
 624   * @param {string} name
 625   */
 626  showdown.setFlavor = function (name) {
 627    'use strict';
 628    if (!flavor.hasOwnProperty(name)) {
 629      throw Error(name + ' flavor was not found');
 630    }
 631    showdown.resetOptions();
 632    var preset = flavor[name];
 633    setFlavor = name;
 634    for (var option in preset) {
 635      if (preset.hasOwnProperty(option)) {
 636        globalOptions[option] = preset[option];
 637      }
 638    }
 639  };
 640  
 641  /**
 642   * Get the currently set flavor
 643   * @returns {string}
 644   */
 645  showdown.getFlavor = function () {
 646    'use strict';
 647    return setFlavor;
 648  };
 649  
 650  /**
 651   * Get the options of a specified flavor. Returns undefined if the flavor was not found
 652   * @param {string} name Name of the flavor
 653   * @returns {{}|undefined}
 654   */
 655  showdown.getFlavorOptions = function (name) {
 656    'use strict';
 657    if (flavor.hasOwnProperty(name)) {
 658      return flavor[name];
 659    }
 660  };
 661  
 662  /**
 663   * Get the default options
 664   * @static
 665   * @param {boolean} [simple=true]
 666   * @returns {{}}
 667   */
 668  showdown.getDefaultOptions = function (simple) {
 669    'use strict';
 670    return getDefaultOpts(simple);
 671  };
 672  
 673  /**
 674   * Get or set a subParser
 675   *
 676   * subParser(name)       - Get a registered subParser
 677   * subParser(name, func) - Register a subParser
 678   * @static
 679   * @param {string} name
 680   * @param {function} [func]
 681   * @returns {*}
 682   */
 683  showdown.subParser = function (name, func) {
 684    'use strict';
 685    if (showdown.helper.isString(name)) {
 686      if (typeof func !== 'undefined') {
 687        parsers[name] = func;
 688      } else {
 689        if (parsers.hasOwnProperty(name)) {
 690          return parsers[name];
 691        } else {
 692          throw Error('SubParser named ' + name + ' not registered!');
 693        }
 694      }
 695    }
 696  };
 697  
 698  /**
 699   * Gets or registers an extension
 700   * @static
 701   * @param {string} name
 702   * @param {object|function=} ext
 703   * @returns {*}
 704   */
 705  showdown.extension = function (name, ext) {
 706    'use strict';
 707  
 708    if (!showdown.helper.isString(name)) {
 709      throw Error('Extension \'name\' must be a string');
 710    }
 711  
 712    name = showdown.helper.stdExtName(name);
 713  
 714    // Getter
 715    if (showdown.helper.isUndefined(ext)) {
 716      if (!extensions.hasOwnProperty(name)) {
 717        throw Error('Extension named ' + name + ' is not registered!');
 718      }
 719      return extensions[name];
 720  
 721      // Setter
 722    } else {
 723      // Expand extension if it's wrapped in a function
 724      if (typeof ext === 'function') {
 725        ext = ext();
 726      }
 727  
 728      // Ensure extension is an array
 729      if (!showdown.helper.isArray(ext)) {
 730        ext = [ext];
 731      }
 732  
 733      var validExtension = validate(ext, name);
 734  
 735      if (validExtension.valid) {
 736        extensions[name] = ext;
 737      } else {
 738        throw Error(validExtension.error);
 739      }
 740    }
 741  };
 742  
 743  /**
 744   * Gets all extensions registered
 745   * @returns {{}}
 746   */
 747  showdown.getAllExtensions = function () {
 748    'use strict';
 749    return extensions;
 750  };
 751  
 752  /**
 753   * Remove an extension
 754   * @param {string} name
 755   */
 756  showdown.removeExtension = function (name) {
 757    'use strict';
 758    delete extensions[name];
 759  };
 760  
 761  /**
 762   * Removes all extensions
 763   */
 764  showdown.resetExtensions = function () {
 765    'use strict';
 766    extensions = {};
 767  };
 768  
 769  /**
 770   * Validate extension
 771   * @param {array} extension
 772   * @param {string} name
 773   * @returns {{valid: boolean, error: string}}
 774   */
 775  function validate (extension, name) {
 776    'use strict';
 777  
 778    var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',
 779        ret = {
 780          valid: true,
 781          error: ''
 782        };
 783  
 784    if (!showdown.helper.isArray(extension)) {
 785      extension = [extension];
 786    }
 787  
 788    for (var i = 0; i < extension.length; ++i) {
 789      var baseMsg = errMsg + ' sub-extension ' + i + ': ',
 790          ext = extension[i];
 791      if (typeof ext !== 'object') {
 792        ret.valid = false;
 793        ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';
 794        return ret;
 795      }
 796  
 797      if (!showdown.helper.isString(ext.type)) {
 798        ret.valid = false;
 799        ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given';
 800        return ret;
 801      }
 802  
 803      var type = ext.type = ext.type.toLowerCase();
 804  
 805      // normalize extension type
 806      if (type === 'language') {
 807        type = ext.type = 'lang';
 808      }
 809  
 810      if (type === 'html') {
 811        type = ext.type = 'output';
 812      }
 813  
 814      if (type !== 'lang' && type !== 'output' && type !== 'listener') {
 815        ret.valid = false;
 816        ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"';
 817        return ret;
 818      }
 819  
 820      if (type === 'listener') {
 821        if (showdown.helper.isUndefined(ext.listeners)) {
 822          ret.valid = false;
 823          ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"';
 824          return ret;
 825        }
 826      } else {
 827        if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {
 828          ret.valid = false;
 829          ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method';
 830          return ret;
 831        }
 832      }
 833  
 834      if (ext.listeners) {
 835        if (typeof ext.listeners !== 'object') {
 836          ret.valid = false;
 837          ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + ' given';
 838          return ret;
 839        }
 840        for (var ln in ext.listeners) {
 841          if (ext.listeners.hasOwnProperty(ln)) {
 842            if (typeof ext.listeners[ln] !== 'function') {
 843              ret.valid = false;
 844              ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln +
 845                ' must be a function but ' + typeof ext.listeners[ln] + ' given';
 846              return ret;
 847            }
 848          }
 849        }
 850      }
 851  
 852      if (ext.filter) {
 853        if (typeof ext.filter !== 'function') {
 854          ret.valid = false;
 855          ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + ' given';
 856          return ret;
 857        }
 858      } else if (ext.regex) {
 859        if (showdown.helper.isString(ext.regex)) {
 860          ext.regex = new RegExp(ext.regex, 'g');
 861        }
 862        if (!(ext.regex instanceof RegExp)) {
 863          ret.valid = false;
 864          ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';
 865          return ret;
 866        }
 867        if (showdown.helper.isUndefined(ext.replace)) {
 868          ret.valid = false;
 869          ret.error = baseMsg + '"regex" extensions must implement a replace string or function';
 870          return ret;
 871        }
 872      }
 873    }
 874    return ret;
 875  }
 876  
 877  /**
 878   * Validate extension
 879   * @param {object} ext
 880   * @returns {boolean}
 881   */
 882  showdown.validateExtension = function (ext) {
 883    'use strict';
 884  
 885    var validateExtension = validate(ext, null);
 886    if (!validateExtension.valid) {
 887      console.warn(validateExtension.error);
 888      return false;
 889    }
 890    return true;
 891  };
 892  
 893  /**
 894   * showdownjs helper functions
 895   */
 896  
 897  if (!showdown.hasOwnProperty('helper')) {
 898    showdown.helper = {};
 899  }
 900  
 901  /**
 902   * Check if var is string
 903   * @static
 904   * @param {string} a
 905   * @returns {boolean}
 906   */
 907  showdown.helper.isString = function (a) {
 908    'use strict';
 909    return (typeof a === 'string' || a instanceof String);
 910  };
 911  
 912  /**
 913   * Check if var is a function
 914   * @static
 915   * @param {*} a
 916   * @returns {boolean}
 917   */
 918  showdown.helper.isFunction = function (a) {
 919    'use strict';
 920    var getType = {};
 921    return a && getType.toString.call(a) === '[object Function]';
 922  };
 923  
 924  /**
 925   * isArray helper function
 926   * @static
 927   * @param {*} a
 928   * @returns {boolean}
 929   */
 930  showdown.helper.isArray = function (a) {
 931    'use strict';
 932    return Array.isArray(a);
 933  };
 934  
 935  /**
 936   * Check if value is undefined
 937   * @static
 938   * @param {*} value The value to check.
 939   * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
 940   */
 941  showdown.helper.isUndefined = function (value) {
 942    'use strict';
 943    return typeof value === 'undefined';
 944  };
 945  
 946  /**
 947   * ForEach helper function
 948   * Iterates over Arrays and Objects (own properties only)
 949   * @static
 950   * @param {*} obj
 951   * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object
 952   */
 953  showdown.helper.forEach = function (obj, callback) {
 954    'use strict';
 955    // check if obj is defined
 956    if (showdown.helper.isUndefined(obj)) {
 957      throw new Error('obj param is required');
 958    }
 959  
 960    if (showdown.helper.isUndefined(callback)) {
 961      throw new Error('callback param is required');
 962    }
 963  
 964    if (!showdown.helper.isFunction(callback)) {
 965      throw new Error('callback param must be a function/closure');
 966    }
 967  
 968    if (typeof obj.forEach === 'function') {
 969      obj.forEach(callback);
 970    } else if (showdown.helper.isArray(obj)) {
 971      for (var i = 0; i < obj.length; i++) {
 972        callback(obj[i], i, obj);
 973      }
 974    } else if (typeof (obj) === 'object') {
 975      for (var prop in obj) {
 976        if (obj.hasOwnProperty(prop)) {
 977          callback(obj[prop], prop, obj);
 978        }
 979      }
 980    } else {
 981      throw new Error('obj does not seem to be an array or an iterable object');
 982    }
 983  };
 984  
 985  /**
 986   * Standardidize extension name
 987   * @static
 988   * @param {string} s extension name
 989   * @returns {string}
 990   */
 991  showdown.helper.stdExtName = function (s) {
 992    'use strict';
 993    return s.replace(/[_?*+\/\\.^-]/g, '').replace(/\s/g, '').toLowerCase();
 994  };
 995  
 996  function escapeCharactersCallback (wholeMatch, m1) {
 997    'use strict';
 998    var charCodeToEscape = m1.charCodeAt(0);
 999    return '¨E' + charCodeToEscape + 'E';
1000  }
1001  
1002  /**
1003   * Callback used to escape characters when passing through String.replace
1004   * @static
1005   * @param {string} wholeMatch
1006   * @param {string} m1
1007   * @returns {string}
1008   */
1009  showdown.helper.escapeCharactersCallback = escapeCharactersCallback;
1010  
1011  /**
1012   * Escape characters in a string
1013   * @static
1014   * @param {string} text
1015   * @param {string} charsToEscape
1016   * @param {boolean} afterBackslash
1017   * @returns {XML|string|void|*}
1018   */
1019  showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {
1020    'use strict';
1021    // First we have to escape the escape characters so that
1022    // we can build a character class out of them
1023    var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])';
1024  
1025    if (afterBackslash) {
1026      regexString = '\\\\' + regexString;
1027    }
1028  
1029    var regex = new RegExp(regexString, 'g');
1030    text = text.replace(regex, escapeCharactersCallback);
1031  
1032    return text;
1033  };
1034  
1035  /**
1036   * Unescape HTML entities
1037   * @param txt
1038   * @returns {string}
1039   */
1040  showdown.helper.unescapeHTMLEntities = function (txt) {
1041    'use strict';
1042  
1043    return txt
1044      .replace(/&quot;/g, '"')
1045      .replace(/&lt;/g, '<')
1046      .replace(/&gt;/g, '>')
1047      .replace(/&amp;/g, '&');
1048  };
1049  
1050  var rgxFindMatchPos = function (str, left, right, flags) {
1051    'use strict';
1052    var f = flags || '',
1053        g = f.indexOf('g') > -1,
1054        x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),
1055        l = new RegExp(left, f.replace(/g/g, '')),
1056        pos = [],
1057        t, s, m, start, end;
1058  
1059    do {
1060      t = 0;
1061      while ((m = x.exec(str))) {
1062        if (l.test(m[0])) {
1063          if (!(t++)) {
1064            s = x.lastIndex;
1065            start = s - m[0].length;
1066          }
1067        } else if (t) {
1068          if (!--t) {
1069            end = m.index + m[0].length;
1070            var obj = {
1071              left: {start: start, end: s},
1072              match: {start: s, end: m.index},
1073              right: {start: m.index, end: end},
1074              wholeMatch: {start: start, end: end}
1075            };
1076            pos.push(obj);
1077            if (!g) {
1078              return pos;
1079            }
1080          }
1081        }
1082      }
1083    } while (t && (x.lastIndex = s));
1084  
1085    return pos;
1086  };
1087  
1088  /**
1089   * matchRecursiveRegExp
1090   *
1091   * (c) 2007 Steven Levithan <stevenlevithan.com>
1092   * MIT License
1093   *
1094   * Accepts a string to search, a left and right format delimiter
1095   * as regex patterns, and optional regex flags. Returns an array
1096   * of matches, allowing nested instances of left/right delimiters.
1097   * Use the "g" flag to return all matches, otherwise only the
1098   * first is returned. Be careful to ensure that the left and
1099   * right format delimiters produce mutually exclusive matches.
1100   * Backreferences are not supported within the right delimiter
1101   * due to how it is internally combined with the left delimiter.
1102   * When matching strings whose format delimiters are unbalanced
1103   * to the left or right, the output is intentionally as a
1104   * conventional regex library with recursion support would
1105   * produce, e.g. "<<x>" and "<x>>" both produce ["x"] when using
1106   * "<" and ">" as the delimiters (both strings contain a single,
1107   * balanced instance of "<x>").
1108   *
1109   * examples:
1110   * matchRecursiveRegExp("test", "\\(", "\\)")
1111   * returns: []
1112   * matchRecursiveRegExp("<t<<e>><s>>t<>", "<", ">", "g")
1113   * returns: ["t<<e>><s>", ""]
1114   * matchRecursiveRegExp("<div id=\"x\">test</div>", "<div\\b[^>]*>", "</div>", "gi")
1115   * returns: ["test"]
1116   */
1117  showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {
1118    'use strict';
1119  
1120    var matchPos = rgxFindMatchPos (str, left, right, flags),
1121        results = [];
1122  
1123    for (var i = 0; i < matchPos.length; ++i) {
1124      results.push([
1125        str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),
1126        str.slice(matchPos[i].match.start, matchPos[i].match.end),
1127        str.slice(matchPos[i].left.start, matchPos[i].left.end),
1128        str.slice(matchPos[i].right.start, matchPos[i].right.end)
1129      ]);
1130    }
1131    return results;
1132  };
1133  
1134  /**
1135   *
1136   * @param {string} str
1137   * @param {string|function} replacement
1138   * @param {string} left
1139   * @param {string} right
1140   * @param {string} flags
1141   * @returns {string}
1142   */
1143  showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {
1144    'use strict';
1145  
1146    if (!showdown.helper.isFunction(replacement)) {
1147      var repStr = replacement;
1148      replacement = function () {
1149        return repStr;
1150      };
1151    }
1152  
1153    var matchPos = rgxFindMatchPos(str, left, right, flags),
1154        finalStr = str,
1155        lng = matchPos.length;
1156  
1157    if (lng > 0) {
1158      var bits = [];
1159      if (matchPos[0].wholeMatch.start !== 0) {
1160        bits.push(str.slice(0, matchPos[0].wholeMatch.start));
1161      }
1162      for (var i = 0; i < lng; ++i) {
1163        bits.push(
1164          replacement(
1165            str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),
1166            str.slice(matchPos[i].match.start, matchPos[i].match.end),
1167            str.slice(matchPos[i].left.start, matchPos[i].left.end),
1168            str.slice(matchPos[i].right.start, matchPos[i].right.end)
1169          )
1170        );
1171        if (i < lng - 1) {
1172          bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));
1173        }
1174      }
1175      if (matchPos[lng - 1].wholeMatch.end < str.length) {
1176        bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));
1177      }
1178      finalStr = bits.join('');
1179    }
1180    return finalStr;
1181  };
1182  
1183  /**
1184   * Returns the index within the passed String object of the first occurrence of the specified regex,
1185   * starting the search at fromIndex. Returns -1 if the value is not found.
1186   *
1187   * @param {string} str string to search
1188   * @param {RegExp} regex Regular expression to search
1189   * @param {int} [fromIndex = 0] Index to start the search
1190   * @returns {Number}
1191   * @throws InvalidArgumentError
1192   */
1193  showdown.helper.regexIndexOf = function (str, regex, fromIndex) {
1194    'use strict';
1195    if (!showdown.helper.isString(str)) {
1196      throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';
1197    }
1198    if (regex instanceof RegExp === false) {
1199      throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';
1200    }
1201    var indexOf = str.substring(fromIndex || 0).search(regex);
1202    return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;
1203  };
1204  
1205  /**
1206   * Splits the passed string object at the defined index, and returns an array composed of the two substrings
1207   * @param {string} str string to split
1208   * @param {int} index index to split string at
1209   * @returns {[string,string]}
1210   * @throws InvalidArgumentError
1211   */
1212  showdown.helper.splitAtIndex = function (str, index) {
1213    'use strict';
1214    if (!showdown.helper.isString(str)) {
1215      throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';
1216    }
1217    return [str.substring(0, index), str.substring(index)];
1218  };
1219  
1220  /**
1221   * Obfuscate an e-mail address through the use of Character Entities,
1222   * transforming ASCII characters into their equivalent decimal or hex entities.
1223   *
1224   * Since it has a random component, subsequent calls to this function produce different results
1225   *
1226   * @param {string} mail
1227   * @returns {string}
1228   */
1229  showdown.helper.encodeEmailAddress = function (mail) {
1230    'use strict';
1231    var encode = [
1232      function (ch) {
1233        return '&#' + ch.charCodeAt(0) + ';';
1234      },
1235      function (ch) {
1236        return '&#x' + ch.charCodeAt(0).toString(16) + ';';
1237      },
1238      function (ch) {
1239        return ch;
1240      }
1241    ];
1242  
1243    mail = mail.replace(/./g, function (ch) {
1244      if (ch === '@') {
1245        // this *must* be encoded. I insist.
1246        ch = encode[Math.floor(Math.random() * 2)](ch);
1247      } else {
1248        var r = Math.random();
1249        // roughly 10% raw, 45% hex, 45% dec
1250        ch = (
1251          r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)
1252        );
1253      }
1254      return ch;
1255    });
1256  
1257    return mail;
1258  };
1259  
1260  /**
1261   *
1262   * @param str
1263   * @param targetLength
1264   * @param padString
1265   * @returns {string}
1266   */
1267  showdown.helper.padEnd = function padEnd (str, targetLength, padString) {
1268    'use strict';
1269    /*jshint bitwise: false*/
1270    // eslint-disable-next-line space-infix-ops
1271    targetLength = targetLength>>0; //floor if number or convert non-number to 0;
1272    /*jshint bitwise: true*/
1273    padString = String(padString || ' ');
1274    if (str.length > targetLength) {
1275      return String(str);
1276    } else {
1277      targetLength = targetLength - str.length;
1278      if (targetLength > padString.length) {
1279        padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed
1280      }
1281      return String(str) + padString.slice(0,targetLength);
1282    }
1283  };
1284  
1285  /**
1286   * POLYFILLS
1287   */
1288  // use this instead of builtin is undefined for IE8 compatibility
1289  if (typeof console === 'undefined') {
1290    console = {
1291      warn: function (msg) {
1292        'use strict';
1293        alert(msg);
1294      },
1295      log: function (msg) {
1296        'use strict';
1297        alert(msg);
1298      },
1299      error: function (msg) {
1300        'use strict';
1301        throw msg;
1302      }
1303    };
1304  }
1305  
1306  /**
1307   * Common regexes.
1308   * We declare some common regexes to improve performance
1309   */
1310  showdown.helper.regexes = {
1311    asteriskDashAndColon: /([*_:~])/g
1312  };
1313  
1314  /**
1315   * EMOJIS LIST
1316   */
1317  showdown.helper.emojis = {
1318    '+1':'\ud83d\udc4d',
1319    '-1':'\ud83d\udc4e',
1320    '100':'\ud83d\udcaf',
1321    '1234':'\ud83d\udd22',
1322    '1st_place_medal':'\ud83e\udd47',
1323    '2nd_place_medal':'\ud83e\udd48',
1324    '3rd_place_medal':'\ud83e\udd49',
1325    '8ball':'\ud83c\udfb1',
1326    'a':'\ud83c\udd70\ufe0f',
1327    'ab':'\ud83c\udd8e',
1328    'abc':'\ud83d\udd24',
1329    'abcd':'\ud83d\udd21',
1330    'accept':'\ud83c\ude51',
1331    'aerial_tramway':'\ud83d\udea1',
1332    'airplane':'\u2708\ufe0f',
1333    'alarm_clock':'\u23f0',
1334    'alembic':'\u2697\ufe0f',
1335    'alien':'\ud83d\udc7d',
1336    'ambulance':'\ud83d\ude91',
1337    'amphora':'\ud83c\udffa',
1338    'anchor':'\u2693\ufe0f',
1339    'angel':'\ud83d\udc7c',
1340    'anger':'\ud83d\udca2',
1341    'angry':'\ud83d\ude20',
1342    'anguished':'\ud83d\ude27',
1343    'ant':'\ud83d\udc1c',
1344    'apple':'\ud83c\udf4e',
1345    'aquarius':'\u2652\ufe0f',
1346    'aries':'\u2648\ufe0f',
1347    'arrow_backward':'\u25c0\ufe0f',
1348    'arrow_double_down':'\u23ec',
1349    'arrow_double_up':'\u23eb',
1350    'arrow_down':'\u2b07\ufe0f',
1351    'arrow_down_small':'\ud83d\udd3d',
1352    'arrow_forward':'\u25b6\ufe0f',
1353    'arrow_heading_down':'\u2935\ufe0f',
1354    'arrow_heading_up':'\u2934\ufe0f',
1355    'arrow_left':'\u2b05\ufe0f',
1356    'arrow_lower_left':'\u2199\ufe0f',
1357    'arrow_lower_right':'\u2198\ufe0f',
1358    'arrow_right':'\u27a1\ufe0f',
1359    'arrow_right_hook':'\u21aa\ufe0f',
1360    'arrow_up':'\u2b06\ufe0f',
1361    'arrow_up_down':'\u2195\ufe0f',
1362    'arrow_up_small':'\ud83d\udd3c',
1363    'arrow_upper_left':'\u2196\ufe0f',
1364    'arrow_upper_right':'\u2197\ufe0f',
1365    'arrows_clockwise':'\ud83d\udd03',
1366    'arrows_counterclockwise':'\ud83d\udd04',
1367    'art':'\ud83c\udfa8',
1368    'articulated_lorry':'\ud83d\ude9b',
1369    'artificial_satellite':'\ud83d\udef0',
1370    'astonished':'\ud83d\ude32',
1371    'athletic_shoe':'\ud83d\udc5f',
1372    'atm':'\ud83c\udfe7',
1373    'atom_symbol':'\u269b\ufe0f',
1374    'avocado':'\ud83e\udd51',
1375    'b':'\ud83c\udd71\ufe0f',
1376    'baby':'\ud83d\udc76',
1377    'baby_bottle':'\ud83c\udf7c',
1378    'baby_chick':'\ud83d\udc24',
1379    'baby_symbol':'\ud83d\udebc',
1380    'back':'\ud83d\udd19',
1381    'bacon':'\ud83e\udd53',
1382    'badminton':'\ud83c\udff8',
1383    'baggage_claim':'\ud83d\udec4',
1384    'baguette_bread':'\ud83e\udd56',
1385    'balance_scale':'\u2696\ufe0f',
1386    'balloon':'\ud83c\udf88',
1387    'ballot_box':'\ud83d\uddf3',
1388    'ballot_box_with_check':'\u2611\ufe0f',
1389    'bamboo':'\ud83c\udf8d',
1390    'banana':'\ud83c\udf4c',
1391    'bangbang':'\u203c\ufe0f',
1392    'bank':'\ud83c\udfe6',
1393    'bar_chart':'\ud83d\udcca',
1394    'barber':'\ud83d\udc88',
1395    'baseball':'\u26be\ufe0f',
1396    'basketball':'\ud83c\udfc0',
1397    'basketball_man':'\u26f9\ufe0f',
1398    'basketball_woman':'\u26f9\ufe0f&zwj;\u2640\ufe0f',
1399    'bat':'\ud83e\udd87',
1400    'bath':'\ud83d\udec0',
1401    'bathtub':'\ud83d\udec1',
1402    'battery':'\ud83d\udd0b',
1403    'beach_umbrella':'\ud83c\udfd6',
1404    'bear':'\ud83d\udc3b',
1405    'bed':'\ud83d\udecf',
1406    'bee':'\ud83d\udc1d',
1407    'beer':'\ud83c\udf7a',
1408    'beers':'\ud83c\udf7b',
1409    'beetle':'\ud83d\udc1e',
1410    'beginner':'\ud83d\udd30',
1411    'bell':'\ud83d\udd14',
1412    'bellhop_bell':'\ud83d\udece',
1413    'bento':'\ud83c\udf71',
1414    'biking_man':'\ud83d\udeb4',
1415    'bike':'\ud83d\udeb2',
1416    'biking_woman':'\ud83d\udeb4&zwj;\u2640\ufe0f',
1417    'bikini':'\ud83d\udc59',
1418    'biohazard':'\u2623\ufe0f',
1419    'bird':'\ud83d\udc26',
1420    'birthday':'\ud83c\udf82',
1421    'black_circle':'\u26ab\ufe0f',
1422    'black_flag':'\ud83c\udff4',
1423    'black_heart':'\ud83d\udda4',
1424    'black_joker':'\ud83c\udccf',
1425    'black_large_square':'\u2b1b\ufe0f',
1426    'black_medium_small_square':'\u25fe\ufe0f',
1427    'black_medium_square':'\u25fc\ufe0f',
1428    'black_nib':'\u2712\ufe0f',
1429    'black_small_square':'\u25aa\ufe0f',
1430    'black_square_button':'\ud83d\udd32',
1431    'blonde_man':'\ud83d\udc71',
1432    'blonde_woman':'\ud83d\udc71&zwj;\u2640\ufe0f',
1433    'blossom':'\ud83c\udf3c',
1434    'blowfish':'\ud83d\udc21',
1435    'blue_book':'\ud83d\udcd8',
1436    'blue_car':'\ud83d\ude99',
1437    'blue_heart':'\ud83d\udc99',
1438    'blush':'\ud83d\ude0a',
1439    'boar':'\ud83d\udc17',
1440    'boat':'\u26f5\ufe0f',
1441    'bomb':'\ud83d\udca3',
1442    'book':'\ud83d\udcd6',
1443    'bookmark':'\ud83d\udd16',
1444    'bookmark_tabs':'\ud83d\udcd1',
1445    'books':'\ud83d\udcda',
1446    'boom':'\ud83d\udca5',
1447    'boot':'\ud83d\udc62',
1448    'bouquet':'\ud83d\udc90',
1449    'bowing_man':'\ud83d\ude47',
1450    'bow_and_arrow':'\ud83c\udff9',
1451    'bowing_woman':'\ud83d\ude47&zwj;\u2640\ufe0f',
1452    'bowling':'\ud83c\udfb3',
1453    'boxing_glove':'\ud83e\udd4a',
1454    'boy':'\ud83d\udc66',
1455    'bread':'\ud83c\udf5e',
1456    'bride_with_veil':'\ud83d\udc70',
1457    'bridge_at_night':'\ud83c\udf09',
1458    'briefcase':'\ud83d\udcbc',
1459    'broken_heart':'\ud83d\udc94',
1460    'bug':'\ud83d\udc1b',
1461    'building_construction':'\ud83c\udfd7',
1462    'bulb':'\ud83d\udca1',
1463    'bullettrain_front':'\ud83d\ude85',
1464    'bullettrain_side':'\ud83d\ude84',
1465    'burrito':'\ud83c\udf2f',
1466    'bus':'\ud83d\ude8c',
1467    'business_suit_levitating':'\ud83d\udd74',
1468    'busstop':'\ud83d\ude8f',
1469    'bust_in_silhouette':'\ud83d\udc64',
1470    'busts_in_silhouette':'\ud83d\udc65',
1471    'butterfly':'\ud83e\udd8b',
1472    'cactus':'\ud83c\udf35',
1473    'cake':'\ud83c\udf70',
1474    'calendar':'\ud83d\udcc6',
1475    'call_me_hand':'\ud83e\udd19',
1476    'calling':'\ud83d\udcf2',
1477    'camel':'\ud83d\udc2b',
1478    'camera':'\ud83d\udcf7',
1479    'camera_flash':'\ud83d\udcf8',
1480    'camping':'\ud83c\udfd5',
1481    'cancer':'\u264b\ufe0f',
1482    'candle':'\ud83d\udd6f',
1483    'candy':'\ud83c\udf6c',
1484    'canoe':'\ud83d\udef6',
1485    'capital_abcd':'\ud83d\udd20',
1486    'capricorn':'\u2651\ufe0f',
1487    'car':'\ud83d\ude97',
1488    'card_file_box':'\ud83d\uddc3',
1489    'card_index':'\ud83d\udcc7',
1490    'card_index_dividers':'\ud83d\uddc2',
1491    'carousel_horse':'\ud83c\udfa0',
1492    'carrot':'\ud83e\udd55',
1493    'cat':'\ud83d\udc31',
1494    'cat2':'\ud83d\udc08',
1495    'cd':'\ud83d\udcbf',
1496    'chains':'\u26d3',
1497    'champagne':'\ud83c\udf7e',
1498    'chart':'\ud83d\udcb9',
1499    'chart_with_downwards_trend':'\ud83d\udcc9',
1500    'chart_with_upwards_trend':'\ud83d\udcc8',
1501    'checkered_flag':'\ud83c\udfc1',
1502    'cheese':'\ud83e\uddc0',
1503    'cherries':'\ud83c\udf52',
1504    'cherry_blossom':'\ud83c\udf38',
1505    'chestnut':'\ud83c\udf30',
1506    'chicken':'\ud83d\udc14',
1507    'children_crossing':'\ud83d\udeb8',
1508    'chipmunk':'\ud83d\udc3f',
1509    'chocolate_bar':'\ud83c\udf6b',
1510    'christmas_tree':'\ud83c\udf84',
1511    'church':'\u26ea\ufe0f',
1512    'cinema':'\ud83c\udfa6',
1513    'circus_tent':'\ud83c\udfaa',
1514    'city_sunrise':'\ud83c\udf07',
1515    'city_sunset':'\ud83c\udf06',
1516    'cityscape':'\ud83c\udfd9',
1517    'cl':'\ud83c\udd91',
1518    'clamp':'\ud83d\udddc',
1519    'clap':'\ud83d\udc4f',
1520    'clapper':'\ud83c\udfac',
1521    'classical_building':'\ud83c\udfdb',
1522    'clinking_glasses':'\ud83e\udd42',
1523    'clipboard':'\ud83d\udccb',
1524    'clock1':'\ud83d\udd50',
1525    'clock10':'\ud83d\udd59',
1526    'clock1030':'\ud83d\udd65',
1527    'clock11':'\ud83d\udd5a',
1528    'clock1130':'\ud83d\udd66',
1529    'clock12':'\ud83d\udd5b',
1530    'clock1230':'\ud83d\udd67',
1531    'clock130':'\ud83d\udd5c',
1532    'clock2':'\ud83d\udd51',
1533    'clock230':'\ud83d\udd5d',
1534    'clock3':'\ud83d\udd52',
1535    'clock330':'\ud83d\udd5e',
1536    'clock4':'\ud83d\udd53',
1537    'clock430':'\ud83d\udd5f',
1538    'clock5':'\ud83d\udd54',
1539    'clock530':'\ud83d\udd60',
1540    'clock6':'\ud83d\udd55',
1541    'clock630':'\ud83d\udd61',
1542    'clock7':'\ud83d\udd56',
1543    'clock730':'\ud83d\udd62',
1544    'clock8':'\ud83d\udd57',
1545    'clock830':'\ud83d\udd63',
1546    'clock9':'\ud83d\udd58',
1547    'clock930':'\ud83d\udd64',
1548    'closed_book':'\ud83d\udcd5',
1549    'closed_lock_with_key':'\ud83d\udd10',
1550    'closed_umbrella':'\ud83c\udf02',
1551    'cloud':'\u2601\ufe0f',
1552    'cloud_with_lightning':'\ud83c\udf29',
1553    'cloud_with_lightning_and_rain':'\u26c8',
1554    'cloud_with_rain':'\ud83c\udf27',
1555    'cloud_with_snow':'\ud83c\udf28',
1556    'clown_face':'\ud83e\udd21',
1557    'clubs':'\u2663\ufe0f',
1558    'cocktail':'\ud83c\udf78',
1559    'coffee':'\u2615\ufe0f',
1560    'coffin':'\u26b0\ufe0f',
1561    'cold_sweat':'\ud83d\ude30',
1562    'comet':'\u2604\ufe0f',
1563    'computer':'\ud83d\udcbb',
1564    'computer_mouse':'\ud83d\uddb1',
1565    'confetti_ball':'\ud83c\udf8a',
1566    'confounded':'\ud83d\ude16',
1567    'confused':'\ud83d\ude15',
1568    'congratulations':'\u3297\ufe0f',
1569    'construction':'\ud83d\udea7',
1570    'construction_worker_man':'\ud83d\udc77',
1571    'construction_worker_woman':'\ud83d\udc77&zwj;\u2640\ufe0f',
1572    'control_knobs':'\ud83c\udf9b',
1573    'convenience_store':'\ud83c\udfea',
1574    'cookie':'\ud83c\udf6a',
1575    'cool':'\ud83c\udd92',
1576    'policeman':'\ud83d\udc6e',
1577    'copyright':'\u00a9\ufe0f',
1578    'corn':'\ud83c\udf3d',
1579    'couch_and_lamp':'\ud83d\udecb',
1580    'couple':'\ud83d\udc6b',
1581    'couple_with_heart_woman_man':'\ud83d\udc91',
1582    'couple_with_heart_man_man':'\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc68',
1583    'couple_with_heart_woman_woman':'\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc69',
1584    'couplekiss_man_man':'\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc68',
1585    'couplekiss_man_woman':'\ud83d\udc8f',
1586    'couplekiss_woman_woman':'\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc69',
1587    'cow':'\ud83d\udc2e',
1588    'cow2':'\ud83d\udc04',
1589    'cowboy_hat_face':'\ud83e\udd20',
1590    'crab':'\ud83e\udd80',
1591    'crayon':'\ud83d\udd8d',
1592    'credit_card':'\ud83d\udcb3',
1593    'crescent_moon':'\ud83c\udf19',
1594    'cricket':'\ud83c\udfcf',
1595    'crocodile':'\ud83d\udc0a',
1596    'croissant':'\ud83e\udd50',
1597    'crossed_fingers':'\ud83e\udd1e',
1598    'crossed_flags':'\ud83c\udf8c',
1599    'crossed_swords':'\u2694\ufe0f',
1600    'crown':'\ud83d\udc51',
1601    'cry':'\ud83d\ude22',
1602    'crying_cat_face':'\ud83d\ude3f',
1603    'crystal_ball':'\ud83d\udd2e',
1604    'cucumber':'\ud83e\udd52',
1605    'cupid':'\ud83d\udc98',
1606    'curly_loop':'\u27b0',
1607    'currency_exchange':'\ud83d\udcb1',
1608    'curry':'\ud83c\udf5b',
1609    'custard':'\ud83c\udf6e',
1610    'customs':'\ud83d\udec3',
1611    'cyclone':'\ud83c\udf00',
1612    'dagger':'\ud83d\udde1',
1613    'dancer':'\ud83d\udc83',
1614    'dancing_women':'\ud83d\udc6f',
1615    'dancing_men':'\ud83d\udc6f&zwj;\u2642\ufe0f',
1616    'dango':'\ud83c\udf61',
1617    'dark_sunglasses':'\ud83d\udd76',
1618    'dart':'\ud83c\udfaf',
1619    'dash':'\ud83d\udca8',
1620    'date':'\ud83d\udcc5',
1621    'deciduous_tree':'\ud83c\udf33',
1622    'deer':'\ud83e\udd8c',
1623    'department_store':'\ud83c\udfec',
1624    'derelict_house':'\ud83c\udfda',
1625    'desert':'\ud83c\udfdc',
1626    'desert_island':'\ud83c\udfdd',
1627    'desktop_computer':'\ud83d\udda5',
1628    'male_detective':'\ud83d\udd75\ufe0f',
1629    'diamond_shape_with_a_dot_inside':'\ud83d\udca0',
1630    'diamonds':'\u2666\ufe0f',
1631    'disappointed':'\ud83d\ude1e',
1632    'disappointed_relieved':'\ud83d\ude25',
1633    'dizzy':'\ud83d\udcab',
1634    'dizzy_face':'\ud83d\ude35',
1635    'do_not_litter':'\ud83d\udeaf',
1636    'dog':'\ud83d\udc36',
1637    'dog2':'\ud83d\udc15',
1638    'dollar':'\ud83d\udcb5',
1639    'dolls':'\ud83c\udf8e',
1640    'dolphin':'\ud83d\udc2c',
1641    'door':'\ud83d\udeaa',
1642    'doughnut':'\ud83c\udf69',
1643    'dove':'\ud83d\udd4a',
1644    'dragon':'\ud83d\udc09',
1645    'dragon_face':'\ud83d\udc32',
1646    'dress':'\ud83d\udc57',
1647    'dromedary_camel':'\ud83d\udc2a',
1648    'drooling_face':'\ud83e\udd24',
1649    'droplet':'\ud83d\udca7',
1650    'drum':'\ud83e\udd41',
1651    'duck':'\ud83e\udd86',
1652    'dvd':'\ud83d\udcc0',
1653    'e-mail':'\ud83d\udce7',
1654    'eagle':'\ud83e\udd85',
1655    'ear':'\ud83d\udc42',
1656    'ear_of_rice':'\ud83c\udf3e',
1657    'earth_africa':'\ud83c\udf0d',
1658    'earth_americas':'\ud83c\udf0e',
1659    'earth_asia':'\ud83c\udf0f',
1660    'egg':'\ud83e\udd5a',
1661    'eggplant':'\ud83c\udf46',
1662    'eight_pointed_black_star':'\u2734\ufe0f',
1663    'eight_spoked_asterisk':'\u2733\ufe0f',
1664    'electric_plug':'\ud83d\udd0c',
1665    'elephant':'\ud83d\udc18',
1666    'email':'\u2709\ufe0f',
1667    'end':'\ud83d\udd1a',
1668    'envelope_with_arrow':'\ud83d\udce9',
1669    'euro':'\ud83d\udcb6',
1670    'european_castle':'\ud83c\udff0',
1671    'european_post_office':'\ud83c\udfe4',
1672    'evergreen_tree':'\ud83c\udf32',
1673    'exclamation':'\u2757\ufe0f',
1674    'expressionless':'\ud83d\ude11',
1675    'eye':'\ud83d\udc41',
1676    'eye_speech_bubble':'\ud83d\udc41&zwj;\ud83d\udde8',
1677    'eyeglasses':'\ud83d\udc53',
1678    'eyes':'\ud83d\udc40',
1679    'face_with_head_bandage':'\ud83e\udd15',
1680    'face_with_thermometer':'\ud83e\udd12',
1681    'fist_oncoming':'\ud83d\udc4a',
1682    'factory':'\ud83c\udfed',
1683    'fallen_leaf':'\ud83c\udf42',
1684    'family_man_woman_boy':'\ud83d\udc6a',
1685    'family_man_boy':'\ud83d\udc68&zwj;\ud83d\udc66',
1686    'family_man_boy_boy':'\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
1687    'family_man_girl':'\ud83d\udc68&zwj;\ud83d\udc67',
1688    'family_man_girl_boy':'\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
1689    'family_man_girl_girl':'\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
1690    'family_man_man_boy':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66',
1691    'family_man_man_boy_boy':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
1692    'family_man_man_girl':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67',
1693    'family_man_man_girl_boy':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
1694    'family_man_man_girl_girl':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
1695    'family_man_woman_boy_boy':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
1696    'family_man_woman_girl':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67',
1697    'family_man_woman_girl_boy':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
1698    'family_man_woman_girl_girl':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
1699    'family_woman_boy':'\ud83d\udc69&zwj;\ud83d\udc66',
1700    'family_woman_boy_boy':'\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
1701    'family_woman_girl':'\ud83d\udc69&zwj;\ud83d\udc67',
1702    'family_woman_girl_boy':'\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
1703    'family_woman_girl_girl':'\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
1704    'family_woman_woman_boy':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66',
1705    'family_woman_woman_boy_boy':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
1706    'family_woman_woman_girl':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67',
1707    'family_woman_woman_girl_boy':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
1708    'family_woman_woman_girl_girl':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
1709    'fast_forward':'\u23e9',
1710    'fax':'\ud83d\udce0',
1711    'fearful':'\ud83d\ude28',
1712    'feet':'\ud83d\udc3e',
1713    'female_detective':'\ud83d\udd75\ufe0f&zwj;\u2640\ufe0f',
1714    'ferris_wheel':'\ud83c\udfa1',
1715    'ferry':'\u26f4',
1716    'field_hockey':'\ud83c\udfd1',
1717    'file_cabinet':'\ud83d\uddc4',
1718    'file_folder':'\ud83d\udcc1',
1719    'film_projector':'\ud83d\udcfd',
1720    'film_strip':'\ud83c\udf9e',
1721    'fire':'\ud83d\udd25',
1722    'fire_engine':'\ud83d\ude92',
1723    'fireworks':'\ud83c\udf86',
1724    'first_quarter_moon':'\ud83c\udf13',
1725    'first_quarter_moon_with_face':'\ud83c\udf1b',
1726    'fish':'\ud83d\udc1f',
1727    'fish_cake':'\ud83c\udf65',
1728    'fishing_pole_and_fish':'\ud83c\udfa3',
1729    'fist_raised':'\u270a',
1730    'fist_left':'\ud83e\udd1b',
1731    'fist_right':'\ud83e\udd1c',
1732    'flags':'\ud83c\udf8f',
1733    'flashlight':'\ud83d\udd26',
1734    'fleur_de_lis':'\u269c\ufe0f',
1735    'flight_arrival':'\ud83d\udeec',
1736    'flight_departure':'\ud83d\udeeb',
1737    'floppy_disk':'\ud83d\udcbe',
1738    'flower_playing_cards':'\ud83c\udfb4',
1739    'flushed':'\ud83d\ude33',
1740    'fog':'\ud83c\udf2b',
1741    'foggy':'\ud83c\udf01',
1742    'football':'\ud83c\udfc8',
1743    'footprints':'\ud83d\udc63',
1744    'fork_and_knife':'\ud83c\udf74',
1745    'fountain':'\u26f2\ufe0f',
1746    'fountain_pen':'\ud83d\udd8b',
1747    'four_leaf_clover':'\ud83c\udf40',
1748    'fox_face':'\ud83e\udd8a',
1749    'framed_picture':'\ud83d\uddbc',
1750    'free':'\ud83c\udd93',
1751    'fried_egg':'\ud83c\udf73',
1752    'fried_shrimp':'\ud83c\udf64',
1753    'fries':'\ud83c\udf5f',
1754    'frog':'\ud83d\udc38',
1755    'frowning':'\ud83d\ude26',
1756    'frowning_face':'\u2639\ufe0f',
1757    'frowning_man':'\ud83d\ude4d&zwj;\u2642\ufe0f',
1758    'frowning_woman':'\ud83d\ude4d',
1759    'middle_finger':'\ud83d\udd95',
1760    'fuelpump':'\u26fd\ufe0f',
1761    'full_moon':'\ud83c\udf15',
1762    'full_moon_with_face':'\ud83c\udf1d',
1763    'funeral_urn':'\u26b1\ufe0f',
1764    'game_die':'\ud83c\udfb2',
1765    'gear':'\u2699\ufe0f',
1766    'gem':'\ud83d\udc8e',
1767    'gemini':'\u264a\ufe0f',
1768    'ghost':'\ud83d\udc7b',
1769    'gift':'\ud83c\udf81',
1770    'gift_heart':'\ud83d\udc9d',
1771    'girl':'\ud83d\udc67',
1772    'globe_with_meridians':'\ud83c\udf10',
1773    'goal_net':'\ud83e\udd45',
1774    'goat':'\ud83d\udc10',
1775    'golf':'\u26f3\ufe0f',
1776    'golfing_man':'\ud83c\udfcc\ufe0f',
1777    'golfing_woman':'\ud83c\udfcc\ufe0f&zwj;\u2640\ufe0f',
1778    'gorilla':'\ud83e\udd8d',
1779    'grapes':'\ud83c\udf47',
1780    'green_apple':'\ud83c\udf4f',
1781    'green_book':'\ud83d\udcd7',
1782    'green_heart':'\ud83d\udc9a',
1783    'green_salad':'\ud83e\udd57',
1784    'grey_exclamation':'\u2755',
1785    'grey_question':'\u2754',
1786    'grimacing':'\ud83d\ude2c',
1787    'grin':'\ud83d\ude01',
1788    'grinning':'\ud83d\ude00',
1789    'guardsman':'\ud83d\udc82',
1790    'guardswoman':'\ud83d\udc82&zwj;\u2640\ufe0f',
1791    'guitar':'\ud83c\udfb8',
1792    'gun':'\ud83d\udd2b',
1793    'haircut_woman':'\ud83d\udc87',
1794    'haircut_man':'\ud83d\udc87&zwj;\u2642\ufe0f',
1795    'hamburger':'\ud83c\udf54',
1796    'hammer':'\ud83d\udd28',
1797    'hammer_and_pick':'\u2692',
1798    'hammer_and_wrench':'\ud83d\udee0',
1799    'hamster':'\ud83d\udc39',
1800    'hand':'\u270b',
1801    'handbag':'\ud83d\udc5c',
1802    'handshake':'\ud83e\udd1d',
1803    'hankey':'\ud83d\udca9',
1804    'hatched_chick':'\ud83d\udc25',
1805    'hatching_chick':'\ud83d\udc23',
1806    'headphones':'\ud83c\udfa7',
1807    'hear_no_evil':'\ud83d\ude49',
1808    'heart':'\u2764\ufe0f',
1809    'heart_decoration':'\ud83d\udc9f',
1810    'heart_eyes':'\ud83d\ude0d',
1811    'heart_eyes_cat':'\ud83d\ude3b',
1812    'heartbeat':'\ud83d\udc93',
1813    'heartpulse':'\ud83d\udc97',
1814    'hearts':'\u2665\ufe0f',
1815    'heavy_check_mark':'\u2714\ufe0f',
1816    'heavy_division_sign':'\u2797',
1817    'heavy_dollar_sign':'\ud83d\udcb2',
1818    'heavy_heart_exclamation':'\u2763\ufe0f',
1819    'heavy_minus_sign':'\u2796',
1820    'heavy_multiplication_x':'\u2716\ufe0f',
1821    'heavy_plus_sign':'\u2795',
1822    'helicopter':'\ud83d\ude81',
1823    'herb':'\ud83c\udf3f',
1824    'hibiscus':'\ud83c\udf3a',
1825    'high_brightness':'\ud83d\udd06',
1826    'high_heel':'\ud83d\udc60',
1827    'hocho':'\ud83d\udd2a',
1828    'hole':'\ud83d\udd73',
1829    'honey_pot':'\ud83c\udf6f',
1830    'horse':'\ud83d\udc34',
1831    'horse_racing':'\ud83c\udfc7',
1832    'hospital':'\ud83c\udfe5',
1833    'hot_pepper':'\ud83c\udf36',
1834    'hotdog':'\ud83c\udf2d',
1835    'hotel':'\ud83c\udfe8',
1836    'hotsprings':'\u2668\ufe0f',
1837    'hourglass':'\u231b\ufe0f',
1838    'hourglass_flowing_sand':'\u23f3',
1839    'house':'\ud83c\udfe0',
1840    'house_with_garden':'\ud83c\udfe1',
1841    'houses':'\ud83c\udfd8',
1842    'hugs':'\ud83e\udd17',
1843    'hushed':'\ud83d\ude2f',
1844    'ice_cream':'\ud83c\udf68',
1845    'ice_hockey':'\ud83c\udfd2',
1846    'ice_skate':'\u26f8',
1847    'icecream':'\ud83c\udf66',
1848    'id':'\ud83c\udd94',
1849    'ideograph_advantage':'\ud83c\ude50',
1850    'imp':'\ud83d\udc7f',
1851    'inbox_tray':'\ud83d\udce5',
1852    'incoming_envelope':'\ud83d\udce8',
1853    'tipping_hand_woman':'\ud83d\udc81',
1854    'information_source':'\u2139\ufe0f',
1855    'innocent':'\ud83d\ude07',
1856    'interrobang':'\u2049\ufe0f',
1857    'iphone':'\ud83d\udcf1',
1858    'izakaya_lantern':'\ud83c\udfee',
1859    'jack_o_lantern':'\ud83c\udf83',
1860    'japan':'\ud83d\uddfe',
1861    'japanese_castle':'\ud83c\udfef',
1862    'japanese_goblin':'\ud83d\udc7a',
1863    'japanese_ogre':'\ud83d\udc79',
1864    'jeans':'\ud83d\udc56',
1865    'joy':'\ud83d\ude02',
1866    'joy_cat':'\ud83d\ude39',
1867    'joystick':'\ud83d\udd79',
1868    'kaaba':'\ud83d\udd4b',
1869    'key':'\ud83d\udd11',
1870    'keyboard':'\u2328\ufe0f',
1871    'keycap_ten':'\ud83d\udd1f',
1872    'kick_scooter':'\ud83d\udef4',
1873    'kimono':'\ud83d\udc58',
1874    'kiss':'\ud83d\udc8b',
1875    'kissing':'\ud83d\ude17',
1876    'kissing_cat':'\ud83d\ude3d',
1877    'kissing_closed_eyes':'\ud83d\ude1a',
1878    'kissing_heart':'\ud83d\ude18',
1879    'kissing_smiling_eyes':'\ud83d\ude19',
1880    'kiwi_fruit':'\ud83e\udd5d',
1881    'koala':'\ud83d\udc28',
1882    'koko':'\ud83c\ude01',
1883    'label':'\ud83c\udff7',
1884    'large_blue_circle':'\ud83d\udd35',
1885    'large_blue_diamond':'\ud83d\udd37',
1886    'large_orange_diamond':'\ud83d\udd36',
1887    'last_quarter_moon':'\ud83c\udf17',
1888    'last_quarter_moon_with_face':'\ud83c\udf1c',
1889    'latin_cross':'\u271d\ufe0f',
1890    'laughing':'\ud83d\ude06',
1891    'leaves':'\ud83c\udf43',
1892    'ledger':'\ud83d\udcd2',
1893    'left_luggage':'\ud83d\udec5',
1894    'left_right_arrow':'\u2194\ufe0f',
1895    'leftwards_arrow_with_hook':'\u21a9\ufe0f',
1896    'lemon':'\ud83c\udf4b',
1897    'leo':'\u264c\ufe0f',
1898    'leopard':'\ud83d\udc06',
1899    'level_slider':'\ud83c\udf9a',
1900    'libra':'\u264e\ufe0f',
1901    'light_rail':'\ud83d\ude88',
1902    'link':'\ud83d\udd17',
1903    'lion':'\ud83e\udd81',
1904    'lips':'\ud83d\udc44',
1905    'lipstick':'\ud83d\udc84',
1906    'lizard':'\ud83e\udd8e',
1907    'lock':'\ud83d\udd12',
1908    'lock_with_ink_pen':'\ud83d\udd0f',
1909    'lollipop':'\ud83c\udf6d',
1910    'loop':'\u27bf',
1911    'loud_sound':'\ud83d\udd0a',
1912    'loudspeaker':'\ud83d\udce2',
1913    'love_hotel':'\ud83c\udfe9',
1914    'love_letter':'\ud83d\udc8c',
1915    'low_brightness':'\ud83d\udd05',
1916    'lying_face':'\ud83e\udd25',
1917    'm':'\u24c2\ufe0f',
1918    'mag':'\ud83d\udd0d',
1919    'mag_right':'\ud83d\udd0e',
1920    'mahjong':'\ud83c\udc04\ufe0f',
1921    'mailbox':'\ud83d\udceb',
1922    'mailbox_closed':'\ud83d\udcea',
1923    'mailbox_with_mail':'\ud83d\udcec',
1924    'mailbox_with_no_mail':'\ud83d\udced',
1925    'man':'\ud83d\udc68',
1926    'man_artist':'\ud83d\udc68&zwj;\ud83c\udfa8',
1927    'man_astronaut':'\ud83d\udc68&zwj;\ud83d\ude80',
1928    'man_cartwheeling':'\ud83e\udd38&zwj;\u2642\ufe0f',
1929    'man_cook':'\ud83d\udc68&zwj;\ud83c\udf73',
1930    'man_dancing':'\ud83d\udd7a',
1931    'man_facepalming':'\ud83e\udd26&zwj;\u2642\ufe0f',
1932    'man_factory_worker':'\ud83d\udc68&zwj;\ud83c\udfed',
1933    'man_farmer':'\ud83d\udc68&zwj;\ud83c\udf3e',
1934    'man_firefighter':'\ud83d\udc68&zwj;\ud83d\ude92',
1935    'man_health_worker':'\ud83d\udc68&zwj;\u2695\ufe0f',
1936    'man_in_tuxedo':'\ud83e\udd35',
1937    'man_judge':'\ud83d\udc68&zwj;\u2696\ufe0f',
1938    'man_juggling':'\ud83e\udd39&zwj;\u2642\ufe0f',
1939    'man_mechanic':'\ud83d\udc68&zwj;\ud83d\udd27',
1940    'man_office_worker':'\ud83d\udc68&zwj;\ud83d\udcbc',
1941    'man_pilot':'\ud83d\udc68&zwj;\u2708\ufe0f',
1942    'man_playing_handball':'\ud83e\udd3e&zwj;\u2642\ufe0f',
1943    'man_playing_water_polo':'\ud83e\udd3d&zwj;\u2642\ufe0f',
1944    'man_scientist':'\ud83d\udc68&zwj;\ud83d\udd2c',
1945    'man_shrugging':'\ud83e\udd37&zwj;\u2642\ufe0f',
1946    'man_singer':'\ud83d\udc68&zwj;\ud83c\udfa4',
1947    'man_student':'\ud83d\udc68&zwj;\ud83c\udf93',
1948    'man_teacher':'\ud83d\udc68&zwj;\ud83c\udfeb',
1949    'man_technologist':'\ud83d\udc68&zwj;\ud83d\udcbb',
1950    'man_with_gua_pi_mao':'\ud83d\udc72',
1951    'man_with_turban':'\ud83d\udc73',
1952    'tangerine':'\ud83c\udf4a',
1953    'mans_shoe':'\ud83d\udc5e',
1954    'mantelpiece_clock':'\ud83d\udd70',
1955    'maple_leaf':'\ud83c\udf41',
1956    'martial_arts_uniform':'\ud83e\udd4b',
1957    'mask':'\ud83d\ude37',
1958    'massage_woman':'\ud83d\udc86',
1959    'massage_man':'\ud83d\udc86&zwj;\u2642\ufe0f',
1960    'meat_on_bone':'\ud83c\udf56',
1961    'medal_military':'\ud83c\udf96',
1962    'medal_sports':'\ud83c\udfc5',
1963    'mega':'\ud83d\udce3',
1964    'melon':'\ud83c\udf48',
1965    'memo':'\ud83d\udcdd',
1966    'men_wrestling':'\ud83e\udd3c&zwj;\u2642\ufe0f',
1967    'menorah':'\ud83d\udd4e',
1968    'mens':'\ud83d\udeb9',
1969    'metal':'\ud83e\udd18',
1970    'metro':'\ud83d\ude87',
1971    'microphone':'\ud83c\udfa4',
1972    'microscope':'\ud83d\udd2c',
1973    'milk_glass':'\ud83e\udd5b',
1974    'milky_way':'\ud83c\udf0c',
1975    'minibus':'\ud83d\ude90',
1976    'minidisc':'\ud83d\udcbd',
1977    'mobile_phone_off':'\ud83d\udcf4',
1978    'money_mouth_face':'\ud83e\udd11',
1979    'money_with_wings':'\ud83d\udcb8',
1980    'moneybag':'\ud83d\udcb0',
1981    'monkey':'\ud83d\udc12',
1982    'monkey_face':'\ud83d\udc35',
1983    'monorail':'\ud83d\ude9d',
1984    'moon':'\ud83c\udf14',
1985    'mortar_board':'\ud83c\udf93',
1986    'mosque':'\ud83d\udd4c',
1987    'motor_boat':'\ud83d\udee5',
1988    'motor_scooter':'\ud83d\udef5',
1989    'motorcycle':'\ud83c\udfcd',
1990    'motorway':'\ud83d\udee3',
1991    'mount_fuji':'\ud83d\uddfb',
1992    'mountain':'\u26f0',
1993    'mountain_biking_man':'\ud83d\udeb5',
1994    'mountain_biking_woman':'\ud83d\udeb5&zwj;\u2640\ufe0f',
1995    'mountain_cableway':'\ud83d\udea0',
1996    'mountain_railway':'\ud83d\ude9e',
1997    'mountain_snow':'\ud83c\udfd4',
1998    'mouse':'\ud83d\udc2d',
1999    'mouse2':'\ud83d\udc01',
2000    'movie_camera':'\ud83c\udfa5',
2001    'moyai':'\ud83d\uddff',
2002    'mrs_claus':'\ud83e\udd36',
2003    'muscle':'\ud83d\udcaa',
2004    'mushroom':'\ud83c\udf44',
2005    'musical_keyboard':'\ud83c\udfb9',
2006    'musical_note':'\ud83c\udfb5',
2007    'musical_score':'\ud83c\udfbc',
2008    'mute':'\ud83d\udd07',
2009    'nail_care':'\ud83d\udc85',
2010    'name_badge':'\ud83d\udcdb',
2011    'national_park':'\ud83c\udfde',
2012    'nauseated_face':'\ud83e\udd22',
2013    'necktie':'\ud83d\udc54',
2014    'negative_squared_cross_mark':'\u274e',
2015    'nerd_face':'\ud83e\udd13',
2016    'neutral_face':'\ud83d\ude10',
2017    'new':'\ud83c\udd95',
2018    'new_moon':'\ud83c\udf11',
2019    'new_moon_with_face':'\ud83c\udf1a',
2020    'newspaper':'\ud83d\udcf0',
2021    'newspaper_roll':'\ud83d\uddde',
2022    'next_track_button':'\u23ed',
2023    'ng':'\ud83c\udd96',
2024    'no_good_man':'\ud83d\ude45&zwj;\u2642\ufe0f',
2025    'no_good_woman':'\ud83d\ude45',
2026    'night_with_stars':'\ud83c\udf03',
2027    'no_bell':'\ud83d\udd15',
2028    'no_bicycles':'\ud83d\udeb3',
2029    'no_entry':'\u26d4\ufe0f',
2030    'no_entry_sign':'\ud83d\udeab',
2031    'no_mobile_phones':'\ud83d\udcf5',
2032    'no_mouth':'\ud83d\ude36',
2033    'no_pedestrians':'\ud83d\udeb7',
2034    'no_smoking':'\ud83d\udead',
2035    'non-potable_water':'\ud83d\udeb1',
2036    'nose':'\ud83d\udc43',
2037    'notebook':'\ud83d\udcd3',
2038    'notebook_with_decorative_cover':'\ud83d\udcd4',
2039    'notes':'\ud83c\udfb6',
2040    'nut_and_bolt':'\ud83d\udd29',
2041    'o':'\u2b55\ufe0f',
2042    'o2':'\ud83c\udd7e\ufe0f',
2043    'ocean':'\ud83c\udf0a',
2044    'octopus':'\ud83d\udc19',
2045    'oden':'\ud83c\udf62',
2046    'office':'\ud83c\udfe2',
2047    'oil_drum':'\ud83d\udee2',
2048    'ok':'\ud83c\udd97',
2049    'ok_hand':'\ud83d\udc4c',
2050    'ok_man':'\ud83d\ude46&zwj;\u2642\ufe0f',
2051    'ok_woman':'\ud83d\ude46',
2052    'old_key':'\ud83d\udddd',
2053    'older_man':'\ud83d\udc74',
2054    'older_woman':'\ud83d\udc75',
2055    'om':'\ud83d\udd49',
2056    'on':'\ud83d\udd1b',
2057    'oncoming_automobile':'\ud83d\ude98',
2058    'oncoming_bus':'\ud83d\ude8d',
2059    'oncoming_police_car':'\ud83d\ude94',
2060    'oncoming_taxi':'\ud83d\ude96',
2061    'open_file_folder':'\ud83d\udcc2',
2062    'open_hands':'\ud83d\udc50',
2063    'open_mouth':'\ud83d\ude2e',
2064    'open_umbrella':'\u2602\ufe0f',
2065    'ophiuchus':'\u26ce',
2066    'orange_book':'\ud83d\udcd9',
2067    'orthodox_cross':'\u2626\ufe0f',
2068    'outbox_tray':'\ud83d\udce4',
2069    'owl':'\ud83e\udd89',
2070    'ox':'\ud83d\udc02',
2071    'package':'\ud83d\udce6',
2072    'page_facing_up':'\ud83d\udcc4',
2073    'page_with_curl':'\ud83d\udcc3',
2074    'pager':'\ud83d\udcdf',
2075    'paintbrush':'\ud83d\udd8c',
2076    'palm_tree':'\ud83c\udf34',
2077    'pancakes':'\ud83e\udd5e',
2078    'panda_face':'\ud83d\udc3c',
2079    'paperclip':'\ud83d\udcce',
2080    'paperclips':'\ud83d\udd87',
2081    'parasol_on_ground':'\u26f1',
2082    'parking':'\ud83c\udd7f\ufe0f',
2083    'part_alternation_mark':'\u303d\ufe0f',
2084    'partly_sunny':'\u26c5\ufe0f',
2085    'passenger_ship':'\ud83d\udef3',
2086    'passport_control':'\ud83d\udec2',
2087    'pause_button':'\u23f8',
2088    'peace_symbol':'\u262e\ufe0f',
2089    'peach':'\ud83c\udf51',
2090    'peanuts':'\ud83e\udd5c',
2091    'pear':'\ud83c\udf50',
2092    'pen':'\ud83d\udd8a',
2093    'pencil2':'\u270f\ufe0f',
2094    'penguin':'\ud83d\udc27',
2095    'pensive':'\ud83d\ude14',
2096    'performing_arts':'\ud83c\udfad',
2097    'persevere':'\ud83d\ude23',
2098    'person_fencing':'\ud83e\udd3a',
2099    'pouting_woman':'\ud83d\ude4e',
2100    'phone':'\u260e\ufe0f',
2101    'pick':'\u26cf',
2102    'pig':'\ud83d\udc37',
2103    'pig2':'\ud83d\udc16',
2104    'pig_nose':'\ud83d\udc3d',
2105    'pill':'\ud83d\udc8a',
2106    'pineapple':'\ud83c\udf4d',
2107    'ping_pong':'\ud83c\udfd3',
2108    'pisces':'\u2653\ufe0f',
2109    'pizza':'\ud83c\udf55',
2110    'place_of_worship':'\ud83d\uded0',
2111    'plate_with_cutlery':'\ud83c\udf7d',
2112    'play_or_pause_button':'\u23ef',
2113    'point_down':'\ud83d\udc47',
2114    'point_left':'\ud83d\udc48',
2115    'point_right':'\ud83d\udc49',
2116    'point_up':'\u261d\ufe0f',
2117    'point_up_2':'\ud83d\udc46',
2118    'police_car':'\ud83d\ude93',
2119    'policewoman':'\ud83d\udc6e&zwj;\u2640\ufe0f',
2120    'poodle':'\ud83d\udc29',
2121    'popcorn':'\ud83c\udf7f',
2122    'post_office':'\ud83c\udfe3',
2123    'postal_horn':'\ud83d\udcef',
2124    'postbox':'\ud83d\udcee',
2125    'potable_water':'\ud83d\udeb0',
2126    'potato':'\ud83e\udd54',
2127    'pouch':'\ud83d\udc5d',
2128    'poultry_leg':'\ud83c\udf57',
2129    'pound':'\ud83d\udcb7',
2130    'rage':'\ud83d\ude21',
2131    'pouting_cat':'\ud83d\ude3e',
2132    'pouting_man':'\ud83d\ude4e&zwj;\u2642\ufe0f',
2133    'pray':'\ud83d\ude4f',
2134    'prayer_beads':'\ud83d\udcff',
2135    'pregnant_woman':'\ud83e\udd30',
2136    'previous_track_button':'\u23ee',
2137    'prince':'\ud83e\udd34',
2138    'princess':'\ud83d\udc78',
2139    'printer':'\ud83d\udda8',
2140    'purple_heart':'\ud83d\udc9c',
2141    'purse':'\ud83d\udc5b',
2142    'pushpin':'\ud83d\udccc',
2143    'put_litter_in_its_place':'\ud83d\udeae',
2144    'question':'\u2753',
2145    'rabbit':'\ud83d\udc30',
2146    'rabbit2':'\ud83d\udc07',
2147    'racehorse':'\ud83d\udc0e',
2148    'racing_car':'\ud83c\udfce',
2149    'radio':'\ud83d\udcfb',
2150    'radio_button':'\ud83d\udd18',
2151    'radioactive':'\u2622\ufe0f',
2152    'railway_car':'\ud83d\ude83',
2153    'railway_track':'\ud83d\udee4',
2154    'rainbow':'\ud83c\udf08',
2155    'rainbow_flag':'\ud83c\udff3\ufe0f&zwj;\ud83c\udf08',
2156    'raised_back_of_hand':'\ud83e\udd1a',
2157    'raised_hand_with_fingers_splayed':'\ud83d\udd90',
2158    'raised_hands':'\ud83d\ude4c',
2159    'raising_hand_woman':'\ud83d\ude4b',
2160    'raising_hand_man':'\ud83d\ude4b&zwj;\u2642\ufe0f',
2161    'ram':'\ud83d\udc0f',
2162    'ramen':'\ud83c\udf5c',
2163    'rat':'\ud83d\udc00',
2164    'record_button':'\u23fa',
2165    'recycle':'\u267b\ufe0f',
2166    'red_circle':'\ud83d\udd34',
2167    'registered':'\u00ae\ufe0f',
2168    'relaxed':'\u263a\ufe0f',
2169    'relieved':'\ud83d\ude0c',
2170    'reminder_ribbon':'\ud83c\udf97',
2171    'repeat':'\ud83d\udd01',
2172    'repeat_one':'\ud83d\udd02',
2173    'rescue_worker_helmet':'\u26d1',
2174    'restroom':'\ud83d\udebb',
2175    'revolving_hearts':'\ud83d\udc9e',
2176    'rewind':'\u23ea',
2177    'rhinoceros':'\ud83e\udd8f',
2178    'ribbon':'\ud83c\udf80',
2179    'rice':'\ud83c\udf5a',
2180    'rice_ball':'\ud83c\udf59',
2181    'rice_cracker':'\ud83c\udf58',
2182    'rice_scene':'\ud83c\udf91',
2183    'right_anger_bubble':'\ud83d\uddef',
2184    'ring':'\ud83d\udc8d',
2185    'robot':'\ud83e\udd16',
2186    'rocket':'\ud83d\ude80',
2187    'rofl':'\ud83e\udd23',
2188    'roll_eyes':'\ud83d\ude44',
2189    'roller_coaster':'\ud83c\udfa2',
2190    'rooster':'\ud83d\udc13',
2191    'rose':'\ud83c\udf39',
2192    'rosette':'\ud83c\udff5',
2193    'rotating_light':'\ud83d\udea8',
2194    'round_pushpin':'\ud83d\udccd',
2195    'rowing_man':'\ud83d\udea3',
2196    'rowing_woman':'\ud83d\udea3&zwj;\u2640\ufe0f',
2197    'rugby_football':'\ud83c\udfc9',
2198    'running_man':'\ud83c\udfc3',
2199    'running_shirt_with_sash':'\ud83c\udfbd',
2200    'running_woman':'\ud83c\udfc3&zwj;\u2640\ufe0f',
2201    'sa':'\ud83c\ude02\ufe0f',
2202    'sagittarius':'\u2650\ufe0f',
2203    'sake':'\ud83c\udf76',
2204    'sandal':'\ud83d\udc61',
2205    'santa':'\ud83c\udf85',
2206    'satellite':'\ud83d\udce1',
2207    'saxophone':'\ud83c\udfb7',
2208    'school':'\ud83c\udfeb',
2209    'school_satchel':'\ud83c\udf92',
2210    'scissors':'\u2702\ufe0f',
2211    'scorpion':'\ud83e\udd82',
2212    'scorpius':'\u264f\ufe0f',
2213    'scream':'\ud83d\ude31',
2214    'scream_cat':'\ud83d\ude40',
2215    'scroll':'\ud83d\udcdc',
2216    'seat':'\ud83d\udcba',
2217    'secret':'\u3299\ufe0f',
2218    'see_no_evil':'\ud83d\ude48',
2219    'seedling':'\ud83c\udf31',
2220    'selfie':'\ud83e\udd33',
2221    'shallow_pan_of_food':'\ud83e\udd58',
2222    'shamrock':'\u2618\ufe0f',
2223    'shark':'\ud83e\udd88',
2224    'shaved_ice':'\ud83c\udf67',
2225    'sheep':'\ud83d\udc11',
2226    'shell':'\ud83d\udc1a',
2227    'shield':'\ud83d\udee1',
2228    'shinto_shrine':'\u26e9',
2229    'ship':'\ud83d\udea2',
2230    'shirt':'\ud83d\udc55',
2231    'shopping':'\ud83d\udecd',
2232    'shopping_cart':'\ud83d\uded2',
2233    'shower':'\ud83d\udebf',
2234    'shrimp':'\ud83e\udd90',
2235    'signal_strength':'\ud83d\udcf6',
2236    'six_pointed_star':'\ud83d\udd2f',
2237    'ski':'\ud83c\udfbf',
2238    'skier':'\u26f7',
2239    'skull':'\ud83d\udc80',
2240    'skull_and_crossbones':'\u2620\ufe0f',
2241    'sleeping':'\ud83d\ude34',
2242    'sleeping_bed':'\ud83d\udecc',
2243    'sleepy':'\ud83d\ude2a',
2244    'slightly_frowning_face':'\ud83d\ude41',
2245    'slightly_smiling_face':'\ud83d\ude42',
2246    'slot_machine':'\ud83c\udfb0',
2247    'small_airplane':'\ud83d\udee9',
2248    'small_blue_diamond':'\ud83d\udd39',
2249    'small_orange_diamond':'\ud83d\udd38',
2250    'small_red_triangle':'\ud83d\udd3a',
2251    'small_red_triangle_down':'\ud83d\udd3b',
2252    'smile':'\ud83d\ude04',
2253    'smile_cat':'\ud83d\ude38',
2254    'smiley':'\ud83d\ude03',
2255    'smiley_cat':'\ud83d\ude3a',
2256    'smiling_imp':'\ud83d\ude08',
2257    'smirk':'\ud83d\ude0f',
2258    'smirk_cat':'\ud83d\ude3c',
2259    'smoking':'\ud83d\udeac',
2260    'snail':'\ud83d\udc0c',
2261    'snake':'\ud83d\udc0d',
2262    'sneezing_face':'\ud83e\udd27',
2263    'snowboarder':'\ud83c\udfc2',
2264    'snowflake':'\u2744\ufe0f',
2265    'snowman':'\u26c4\ufe0f',
2266    'snowman_with_snow':'\u2603\ufe0f',
2267    'sob':'\ud83d\ude2d',
2268    'soccer':'\u26bd\ufe0f',
2269    'soon':'\ud83d\udd1c',
2270    'sos':'\ud83c\udd98',
2271    'sound':'\ud83d\udd09',
2272    'space_invader':'\ud83d\udc7e',
2273    'spades':'\u2660\ufe0f',
2274    'spaghetti':'\ud83c\udf5d',
2275    'sparkle':'\u2747\ufe0f',
2276    'sparkler':'\ud83c\udf87',
2277    'sparkles':'\u2728',
2278    'sparkling_heart':'\ud83d\udc96',
2279    'speak_no_evil':'\ud83d\ude4a',
2280    'speaker':'\ud83d\udd08',
2281    'speaking_head':'\ud83d\udde3',
2282    'speech_balloon':'\ud83d\udcac',
2283    'speedboat':'\ud83d\udea4',
2284    'spider':'\ud83d\udd77',
2285    'spider_web':'\ud83d\udd78',
2286    'spiral_calendar':'\ud83d\uddd3',
2287    'spiral_notepad':'\ud83d\uddd2',
2288    'spoon':'\ud83e\udd44',
2289    'squid':'\ud83e\udd91',
2290    'stadium':'\ud83c\udfdf',
2291    'star':'\u2b50\ufe0f',
2292    'star2':'\ud83c\udf1f',
2293    'star_and_crescent':'\u262a\ufe0f',
2294    'star_of_david':'\u2721\ufe0f',
2295    'stars':'\ud83c\udf20',
2296    'station':'\ud83d\ude89',
2297    'statue_of_liberty':'\ud83d\uddfd',
2298    'steam_locomotive':'\ud83d\ude82',
2299    'stew':'\ud83c\udf72',
2300    'stop_button':'\u23f9',
2301    'stop_sign':'\ud83d\uded1',
2302    'stopwatch':'\u23f1',
2303    'straight_ruler':'\ud83d\udccf',
2304    'strawberry':'\ud83c\udf53',
2305    'stuck_out_tongue':'\ud83d\ude1b',
2306    'stuck_out_tongue_closed_eyes':'\ud83d\ude1d',
2307    'stuck_out_tongue_winking_eye':'\ud83d\ude1c',
2308    'studio_microphone':'\ud83c\udf99',
2309    'stuffed_flatbread':'\ud83e\udd59',
2310    'sun_behind_large_cloud':'\ud83c\udf25',
2311    'sun_behind_rain_cloud':'\ud83c\udf26',
2312    'sun_behind_small_cloud':'\ud83c\udf24',
2313    'sun_with_face':'\ud83c\udf1e',
2314    'sunflower':'\ud83c\udf3b',
2315    'sunglasses':'\ud83d\ude0e',
2316    'sunny':'\u2600\ufe0f',
2317    'sunrise':'\ud83c\udf05',
2318    'sunrise_over_mountains':'\ud83c\udf04',
2319    'surfing_man':'\ud83c\udfc4',
2320    'surfing_woman':'\ud83c\udfc4&zwj;\u2640\ufe0f',
2321    'sushi':'\ud83c\udf63',
2322    'suspension_railway':'\ud83d\ude9f',
2323    'sweat':'\ud83d\ude13',
2324    'sweat_drops':'\ud83d\udca6',
2325    'sweat_smile':'\ud83d\ude05',
2326    'sweet_potato':'\ud83c\udf60',
2327    'swimming_man':'\ud83c\udfca',
2328    'swimming_woman':'\ud83c\udfca&zwj;\u2640\ufe0f',
2329    'symbols':'\ud83d\udd23',
2330    'synagogue':'\ud83d\udd4d',
2331    'syringe':'\ud83d\udc89',
2332    'taco':'\ud83c\udf2e',
2333    'tada':'\ud83c\udf89',
2334    'tanabata_tree':'\ud83c\udf8b',
2335    'taurus':'\u2649\ufe0f',
2336    'taxi':'\ud83d\ude95',
2337    'tea':'\ud83c\udf75',
2338    'telephone_receiver':'\ud83d\udcde',
2339    'telescope':'\ud83d\udd2d',
2340    'tennis':'\ud83c\udfbe',
2341    'tent':'\u26fa\ufe0f',
2342    'thermometer':'\ud83c\udf21',
2343    'thinking':'\ud83e\udd14',
2344    'thought_balloon':'\ud83d\udcad',
2345    'ticket':'\ud83c\udfab',
2346    'tickets':'\ud83c\udf9f',
2347    'tiger':'\ud83d\udc2f',
2348    'tiger2':'\ud83d\udc05',
2349    'timer_clock':'\u23f2',
2350    'tipping_hand_man':'\ud83d\udc81&zwj;\u2642\ufe0f',
2351    'tired_face':'\ud83d\ude2b',
2352    'tm':'\u2122\ufe0f',
2353    'toilet':'\ud83d\udebd',
2354    'tokyo_tower':'\ud83d\uddfc',
2355    'tomato':'\ud83c\udf45',
2356    'tongue':'\ud83d\udc45',
2357    'top':'\ud83d\udd1d',
2358    'tophat':'\ud83c\udfa9',
2359    'tornado':'\ud83c\udf2a',
2360    'trackball':'\ud83d\uddb2',
2361    'tractor':'\ud83d\ude9c',
2362    'traffic_light':'\ud83d\udea5',
2363    'train':'\ud83d\ude8b',
2364    'train2':'\ud83d\ude86',
2365    'tram':'\ud83d\ude8a',
2366    'triangular_flag_on_post':'\ud83d\udea9',
2367    'triangular_ruler':'\ud83d\udcd0',
2368    'trident':'\ud83d\udd31',
2369    'triumph':'\ud83d\ude24',
2370    'trolleybus':'\ud83d\ude8e',
2371    'trophy':'\ud83c\udfc6',
2372    'tropical_drink':'\ud83c\udf79',
2373    'tropical_fish':'\ud83d\udc20',
2374    'truck':'\ud83d\ude9a',
2375    'trumpet':'\ud83c\udfba',
2376    'tulip':'\ud83c\udf37',
2377    'tumbler_glass':'\ud83e\udd43',
2378    'turkey':'\ud83e\udd83',
2379    'turtle':'\ud83d\udc22',
2380    'tv':'\ud83d\udcfa',
2381    'twisted_rightwards_arrows':'\ud83d\udd00',
2382    'two_hearts':'\ud83d\udc95',
2383    'two_men_holding_hands':'\ud83d\udc6c',
2384    'two_women_holding_hands':'\ud83d\udc6d',
2385    'u5272':'\ud83c\ude39',
2386    'u5408':'\ud83c\ude34',
2387    'u55b6':'\ud83c\ude3a',
2388    'u6307':'\ud83c\ude2f\ufe0f',
2389    'u6708':'\ud83c\ude37\ufe0f',
2390    'u6709':'\ud83c\ude36',
2391    'u6e80':'\ud83c\ude35',
2392    'u7121':'\ud83c\ude1a\ufe0f',
2393    'u7533':'\ud83c\ude38',
2394    'u7981':'\ud83c\ude32',
2395    'u7a7a':'\ud83c\ude33',
2396    'umbrella':'\u2614\ufe0f',
2397    'unamused':'\ud83d\ude12',
2398    'underage':'\ud83d\udd1e',
2399    'unicorn':'\ud83e\udd84',
2400    'unlock':'\ud83d\udd13',
2401    'up':'\ud83c\udd99',
2402    'upside_down_face':'\ud83d\ude43',
2403    'v':'\u270c\ufe0f',
2404    'vertical_traffic_light':'\ud83d\udea6',
2405    'vhs':'\ud83d\udcfc',
2406    'vibration_mode':'\ud83d\udcf3',
2407    'video_camera':'\ud83d\udcf9',
2408    'video_game':'\ud83c\udfae',
2409    'violin':'\ud83c\udfbb',
2410    'virgo':'\u264d\ufe0f',
2411    'volcano':'\ud83c\udf0b',
2412    'volleyball':'\ud83c\udfd0',
2413    'vs':'\ud83c\udd9a',
2414    'vulcan_salute':'\ud83d\udd96',
2415    'walking_man':'\ud83d\udeb6',
2416    'walking_woman':'\ud83d\udeb6&zwj;\u2640\ufe0f',
2417    'waning_crescent_moon':'\ud83c\udf18',
2418    'waning_gibbous_moon':'\ud83c\udf16',
2419    'warning':'\u26a0\ufe0f',
2420    'wastebasket':'\ud83d\uddd1',
2421    'watch':'\u231a\ufe0f',
2422    'water_buffalo':'\ud83d\udc03',
2423    'watermelon':'\ud83c\udf49',
2424    'wave':'\ud83d\udc4b',
2425    'wavy_dash':'\u3030\ufe0f',
2426    'waxing_crescent_moon':'\ud83c\udf12',
2427    'wc':'\ud83d\udebe',
2428    'weary':'\ud83d\ude29',
2429    'wedding':'\ud83d\udc92',
2430    'weight_lifting_man':'\ud83c\udfcb\ufe0f',
2431    'weight_lifting_woman':'\ud83c\udfcb\ufe0f&zwj;\u2640\ufe0f',
2432    'whale':'\ud83d\udc33',
2433    'whale2':'\ud83d\udc0b',
2434    'wheel_of_dharma':'\u2638\ufe0f',
2435    'wheelchair':'\u267f\ufe0f',
2436    'white_check_mark':'\u2705',
2437    'white_circle':'\u26aa\ufe0f',
2438    'white_flag':'\ud83c\udff3\ufe0f',
2439    'white_flower':'\ud83d\udcae',
2440    'white_large_square':'\u2b1c\ufe0f',
2441    'white_medium_small_square':'\u25fd\ufe0f',
2442    'white_medium_square':'\u25fb\ufe0f',
2443    'white_small_square':'\u25ab\ufe0f',
2444    'white_square_button':'\ud83d\udd33',
2445    'wilted_flower':'\ud83e\udd40',
2446    'wind_chime':'\ud83c\udf90',
2447    'wind_face':'\ud83c\udf2c',
2448    'wine_glass':'\ud83c\udf77',
2449    'wink':'\ud83d\ude09',
2450    'wolf':'\ud83d\udc3a',
2451    'woman':'\ud83d\udc69',
2452    'woman_artist':'\ud83d\udc69&zwj;\ud83c\udfa8',
2453    'woman_astronaut':'\ud83d\udc69&zwj;\ud83d\ude80',
2454    'woman_cartwheeling':'\ud83e\udd38&zwj;\u2640\ufe0f',
2455    'woman_cook':'\ud83d\udc69&zwj;\ud83c\udf73',
2456    'woman_facepalming':'\ud83e\udd26&zwj;\u2640\ufe0f',
2457    'woman_factory_worker':'\ud83d\udc69&zwj;\ud83c\udfed',
2458    'woman_farmer':'\ud83d\udc69&zwj;\ud83c\udf3e',
2459    'woman_firefighter':'\ud83d\udc69&zwj;\ud83d\ude92',
2460    'woman_health_worker':'\ud83d\udc69&zwj;\u2695\ufe0f',
2461    'woman_judge':'\ud83d\udc69&zwj;\u2696\ufe0f',
2462    'woman_juggling':'\ud83e\udd39&zwj;\u2640\ufe0f',
2463    'woman_mechanic':'\ud83d\udc69&zwj;\ud83d\udd27',
2464    'woman_office_worker':'\ud83d\udc69&zwj;\ud83d\udcbc',
2465    'woman_pilot':'\ud83d\udc69&zwj;\u2708\ufe0f',
2466    'woman_playing_handball':'\ud83e\udd3e&zwj;\u2640\ufe0f',
2467    'woman_playing_water_polo':'\ud83e\udd3d&zwj;\u2640\ufe0f',
2468    'woman_scientist':'\ud83d\udc69&zwj;\ud83d\udd2c',
2469    'woman_shrugging':'\ud83e\udd37&zwj;\u2640\ufe0f',
2470    'woman_singer':'\ud83d\udc69&zwj;\ud83c\udfa4',
2471    'woman_student':'\ud83d\udc69&zwj;\ud83c\udf93',
2472    'woman_teacher':'\ud83d\udc69&zwj;\ud83c\udfeb',
2473    'woman_technologist':'\ud83d\udc69&zwj;\ud83d\udcbb',
2474    'woman_with_turban':'\ud83d\udc73&zwj;\u2640\ufe0f',
2475    'womans_clothes':'\ud83d\udc5a',
2476    'womans_hat':'\ud83d\udc52',
2477    'women_wrestling':'\ud83e\udd3c&zwj;\u2640\ufe0f',
2478    'womens':'\ud83d\udeba',
2479    'world_map':'\ud83d\uddfa',
2480    'worried':'\ud83d\ude1f',
2481    'wrench':'\ud83d\udd27',
2482    'writing_hand':'\u270d\ufe0f',
2483    'x':'\u274c',
2484    'yellow_heart':'\ud83d\udc9b',
2485    'yen':'\ud83d\udcb4',
2486    'yin_yang':'\u262f\ufe0f',
2487    'yum':'\ud83d\ude0b',
2488    'zap':'\u26a1\ufe0f',
2489    'zipper_mouth_face':'\ud83e\udd10',
2490    'zzz':'\ud83d\udca4',
2491  
2492    /* special emojis :P */
2493    'octocat':  '<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',
2494    'showdown': '<span style="font-family: \'Anonymous Pro\', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>'
2495  };
2496  
2497  /**
2498   * Created by Estevao on 31-05-2015.
2499   */
2500  
2501  /**
2502   * Showdown Converter class
2503   * @class
2504   * @param {object} [converterOptions]
2505   * @returns {Converter}
2506   */
2507  showdown.Converter = function (converterOptions) {
2508    'use strict';
2509  
2510    var
2511        /**
2512         * Options used by this converter
2513         * @private
2514         * @type {{}}
2515         */
2516        options = {},
2517  
2518        /**
2519         * Language extensions used by this converter
2520         * @private
2521         * @type {Array}
2522         */
2523        langExtensions = [],
2524  
2525        /**
2526         * Output modifiers extensions used by this converter
2527         * @private
2528         * @type {Array}
2529         */
2530        outputModifiers = [],
2531  
2532        /**
2533         * Event listeners
2534         * @private
2535         * @type {{}}
2536         */
2537        listeners = {},
2538  
2539        /**
2540         * The flavor set in this converter
2541         */
2542        setConvFlavor = setFlavor,
2543  
2544        /**
2545         * Metadata of the document
2546         * @type {{parsed: {}, raw: string, format: string}}
2547         */
2548        metadata = {
2549          parsed: {},
2550          raw: '',
2551          format: ''
2552        };
2553  
2554    _constructor();
2555  
2556    /**
2557     * Converter constructor
2558     * @private
2559     */
2560    function _constructor () {
2561      converterOptions = converterOptions || {};
2562  
2563      for (var gOpt in globalOptions) {
2564        if (globalOptions.hasOwnProperty(gOpt)) {
2565          options[gOpt] = globalOptions[gOpt];
2566        }
2567      }
2568  
2569      // Merge options
2570      if (typeof converterOptions === 'object') {
2571        for (var opt in converterOptions) {
2572          if (converterOptions.hasOwnProperty(opt)) {
2573            options[opt] = converterOptions[opt];
2574          }
2575        }
2576      } else {
2577        throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +
2578        ' was passed instead.');
2579      }
2580  
2581      if (options.extensions) {
2582        showdown.helper.forEach(options.extensions, _parseExtension);
2583      }
2584    }
2585  
2586    /**
2587     * Parse extension
2588     * @param {*} ext
2589     * @param {string} [name='']
2590     * @private
2591     */
2592    function _parseExtension (ext, name) {
2593  
2594      name = name || null;
2595      // If it's a string, the extension was previously loaded
2596      if (showdown.helper.isString(ext)) {
2597        ext = showdown.helper.stdExtName(ext);
2598        name = ext;
2599  
2600        // LEGACY_SUPPORT CODE
2601        if (showdown.extensions[ext]) {
2602          console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +
2603            'Please inform the developer that the extension should be updated!');
2604          legacyExtensionLoading(showdown.extensions[ext], ext);
2605          return;
2606          // END LEGACY SUPPORT CODE
2607  
2608        } else if (!showdown.helper.isUndefined(extensions[ext])) {
2609          ext = extensions[ext];
2610  
2611        } else {
2612          throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
2613        }
2614      }
2615  
2616      if (typeof ext === 'function') {
2617        ext = ext();
2618      }
2619  
2620      if (!showdown.helper.isArray(ext)) {
2621        ext = [ext];
2622      }
2623  
2624      var validExt = validate(ext, name);
2625      if (!validExt.valid) {
2626        throw Error(validExt.error);
2627      }
2628  
2629      for (var i = 0; i < ext.length; ++i) {
2630        switch (ext[i].type) {
2631  
2632          case 'lang':
2633            langExtensions.push(ext[i]);
2634            break;
2635  
2636          case 'output':
2637            outputModifiers.push(ext[i]);
2638            break;
2639        }
2640        if (ext[i].hasOwnProperty('listeners')) {
2641          for (var ln in ext[i].listeners) {
2642            if (ext[i].listeners.hasOwnProperty(ln)) {
2643              listen(ln, ext[i].listeners[ln]);
2644            }
2645          }
2646        }
2647      }
2648  
2649    }
2650  
2651    /**
2652     * LEGACY_SUPPORT
2653     * @param {*} ext
2654     * @param {string} name
2655     */
2656    function legacyExtensionLoading (ext, name) {
2657      if (typeof ext === 'function') {
2658        ext = ext(new showdown.Converter());
2659      }
2660      if (!showdown.helper.isArray(ext)) {
2661        ext = [ext];
2662      }
2663      var valid = validate(ext, name);
2664  
2665      if (!valid.valid) {
2666        throw Error(valid.error);
2667      }
2668  
2669      for (var i = 0; i < ext.length; ++i) {
2670        switch (ext[i].type) {
2671          case 'lang':
2672            langExtensions.push(ext[i]);
2673            break;
2674          case 'output':
2675            outputModifiers.push(ext[i]);
2676            break;
2677          default:// should never reach here
2678            throw Error('Extension loader error: Type unrecognized!!!');
2679        }
2680      }
2681    }
2682  
2683    /**
2684     * Listen to an event
2685     * @param {string} name
2686     * @param {function} callback
2687     */
2688    function listen (name, callback) {
2689      if (!showdown.helper.isString(name)) {
2690        throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');
2691      }
2692  
2693      if (typeof callback !== 'function') {
2694        throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');
2695      }
2696  
2697      if (!listeners.hasOwnProperty(name)) {
2698        listeners[name] = [];
2699      }
2700      listeners[name].push(callback);
2701    }
2702  
2703    function rTrimInputText (text) {
2704      var rsp = text.match(/^\s*/)[0].length,
2705          rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm');
2706      return text.replace(rgx, '');
2707    }
2708  
2709    /**
2710     * Dispatch an event
2711     * @private
2712     * @param {string} evtName Event name
2713     * @param {string} text Text
2714     * @param {{}} options Converter Options
2715     * @param {{}} globals
2716     * @returns {string}
2717     */
2718    this._dispatch = function dispatch (evtName, text, options, globals) {
2719      if (listeners.hasOwnProperty(evtName)) {
2720        for (var ei = 0; ei < listeners[evtName].length; ++ei) {
2721          var nText = listeners[evtName][ei](evtName, text, this, options, globals);
2722          if (nText && typeof nText !== 'undefined') {
2723            text = nText;
2724          }
2725        }
2726      }
2727      return text;
2728    };
2729  
2730    /**
2731     * Listen to an event
2732     * @param {string} name
2733     * @param {function} callback
2734     * @returns {showdown.Converter}
2735     */
2736    this.listen = function (name, callback) {
2737      listen(name, callback);
2738      return this;
2739    };
2740  
2741    /**
2742     * Converts a markdown string into HTML
2743     * @param {string} text
2744     * @returns {*}
2745     */
2746    this.makeHtml = function (text) {
2747      //check if text is not falsy
2748      if (!text) {
2749        return text;
2750      }
2751  
2752      var globals = {
2753        gHtmlBlocks:     [],
2754        gHtmlMdBlocks:   [],
2755        gHtmlSpans:      [],
2756        gUrls:           {},
2757        gTitles:         {},
2758        gDimensions:     {},
2759        gListLevel:      0,
2760        hashLinkCounts:  {},
2761        langExtensions:  langExtensions,
2762        outputModifiers: outputModifiers,
2763        converter:       this,
2764        ghCodeBlocks:    [],
2765        metadata: {
2766          parsed: {},
2767          raw: '',
2768          format: ''
2769        }
2770      };
2771  
2772      // This lets us use ¨ trema as an escape char to avoid md5 hashes
2773      // The choice of character is arbitrary; anything that isn't
2774      // magic in Markdown will work.
2775      text = text.replace(/¨/g, '¨T');
2776  
2777      // Replace $ with ¨D
2778      // RegExp interprets $ as a special character
2779      // when it's in a replacement string
2780      text = text.replace(/\$/g, '¨D');
2781  
2782      // Standardize line endings
2783      text = text.replace(/\r\n/g, '\n'); // DOS to Unix
2784      text = text.replace(/\r/g, '\n'); // Mac to Unix
2785  
2786      // Stardardize line spaces
2787      text = text.replace(/\u00A0/g, '&nbsp;');
2788  
2789      if (options.smartIndentationFix) {
2790        text = rTrimInputText(text);
2791      }
2792  
2793      // Make sure text begins and ends with a couple of newlines:
2794      text = '\n\n' + text + '\n\n';
2795  
2796      // detab
2797      text = showdown.subParser('detab')(text, options, globals);
2798  
2799      /**
2800       * Strip any lines consisting only of spaces and tabs.
2801       * This makes subsequent regexs easier to write, because we can
2802       * match consecutive blank lines with /\n+/ instead of something
2803       * contorted like /[ \t]*\n+/
2804       */
2805      text = text.replace(/^[ \t]+$/mg, '');
2806  
2807      //run languageExtensions
2808      showdown.helper.forEach(langExtensions, function (ext) {
2809        text = showdown.subParser('runExtension')(ext, text, options, globals);
2810      });
2811  
2812      // run the sub parsers
2813      text = showdown.subParser('metadata')(text, options, globals);
2814      text = showdown.subParser('hashPreCodeTags')(text, options, globals);
2815      text = showdown.subParser('githubCodeBlocks')(text, options, globals);
2816      text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
2817      text = showdown.subParser('hashCodeTags')(text, options, globals);
2818      text = showdown.subParser('stripLinkDefinitions')(text, options, globals);
2819      text = showdown.subParser('blockGamut')(text, options, globals);
2820      text = showdown.subParser('unhashHTMLSpans')(text, options, globals);
2821      text = showdown.subParser('unescapeSpecialChars')(text, options, globals);
2822  
2823      // attacklab: Restore dollar signs
2824      text = text.replace(/¨D/g, '$$');
2825  
2826      // attacklab: Restore tremas
2827      text = text.replace(/¨T/g, '¨');
2828  
2829      // render a complete html document instead of a partial if the option is enabled
2830      text = showdown.subParser('completeHTMLDocument')(text, options, globals);
2831  
2832      // Run output modifiers
2833      showdown.helper.forEach(outputModifiers, function (ext) {
2834        text = showdown.subParser('runExtension')(ext, text, options, globals);
2835      });
2836  
2837      // update metadata
2838      metadata = globals.metadata;
2839      return text;
2840    };
2841  
2842    /**
2843     * Converts an HTML string into a markdown string
2844     * @param src
2845     * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.
2846     * @returns {string}
2847     */
2848    this.makeMarkdown = this.makeMd = function (src, HTMLParser) {
2849  
2850      // replace \r\n with \n
2851      src = src.replace(/\r\n/g, '\n');
2852      src = src.replace(/\r/g, '\n'); // old macs
2853  
2854      // due to an edge case, we need to find this: > <
2855      // to prevent removing of non silent white spaces
2856      // ex: <em>this is</em> <strong>sparta</strong>
2857      src = src.replace(/>[ \t]+</, '>¨NBSP;<');
2858  
2859      if (!HTMLParser) {
2860        if (window && window.document) {
2861          HTMLParser = window.document;
2862        } else {
2863          throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');
2864        }
2865      }
2866  
2867      var doc = HTMLParser.createElement('div');
2868      doc.innerHTML = src;
2869  
2870      var globals = {
2871        preList: substitutePreCodeTags(doc)
2872      };
2873  
2874      // remove all newlines and collapse spaces
2875      clean(doc);
2876  
2877      // some stuff, like accidental reference links must now be escaped
2878      // TODO
2879      // doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/);
2880  
2881      var nodes = doc.childNodes,
2882          mdDoc = '';
2883  
2884      for (var i = 0; i < nodes.length; i++) {
2885        mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);
2886      }
2887  
2888      function clean (node) {
2889        for (var n = 0; n < node.childNodes.length; ++n) {
2890          var child = node.childNodes[n];
2891          if (child.nodeType === 3) {
2892            if (!/\S/.test(child.nodeValue)) {
2893              node.removeChild(child);
2894              --n;
2895            } else {
2896              child.nodeValue = child.nodeValue.split('\n').join(' ');
2897              child.nodeValue = child.nodeValue.replace(/(\s)+/g, '$1');
2898            }
2899          } else if (child.nodeType === 1) {
2900            clean(child);
2901          }
2902        }
2903      }
2904  
2905      // find all pre tags and replace contents with placeholder
2906      // we need this so that we can remove all indentation from html
2907      // to ease up parsing
2908      function substitutePreCodeTags (doc) {
2909  
2910        var pres = doc.querySelectorAll('pre'),
2911            presPH = [];
2912  
2913        for (var i = 0; i < pres.length; ++i) {
2914  
2915          if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {
2916            var content = pres[i].firstChild.innerHTML.trim(),
2917                language = pres[i].firstChild.getAttribute('data-language') || '';
2918  
2919            // if data-language attribute is not defined, then we look for class language-*
2920            if (language === '') {
2921              var classes = pres[i].firstChild.className.split(' ');
2922              for (var c = 0; c < classes.length; ++c) {
2923                var matches = classes[c].match(/^language-(.+)$/);
2924                if (matches !== null) {
2925                  language = matches[1];
2926                  break;
2927                }
2928              }
2929            }
2930  
2931            // unescape html entities in content
2932            content = showdown.helper.unescapeHTMLEntities(content);
2933  
2934            presPH.push(content);
2935            pres[i].outerHTML = '<precode language="' + language + '" precodenum="' + i.toString() + '"></precode>';
2936          } else {
2937            presPH.push(pres[i].innerHTML);
2938            pres[i].innerHTML = '';
2939            pres[i].setAttribute('prenum', i.toString());
2940          }
2941        }
2942        return presPH;
2943      }
2944  
2945      return mdDoc;
2946    };
2947  
2948    /**
2949     * Set an option of this Converter instance
2950     * @param {string} key
2951     * @param {*} value
2952     */
2953    this.setOption = function (key, value) {
2954      options[key] = value;
2955    };
2956  
2957    /**
2958     * Get the option of this Converter instance
2959     * @param {string} key
2960     * @returns {*}
2961     */
2962    this.getOption = function (key) {
2963      return options[key];
2964    };
2965  
2966    /**
2967     * Get the options of this Converter instance
2968     * @returns {{}}
2969     */
2970    this.getOptions = function () {
2971      return options;
2972    };
2973  
2974    /**
2975     * Add extension to THIS converter
2976     * @param {{}} extension
2977     * @param {string} [name=null]
2978     */
2979    this.addExtension = function (extension, name) {
2980      name = name || null;
2981      _parseExtension(extension, name);
2982    };
2983  
2984    /**
2985     * Use a global registered extension with THIS converter
2986     * @param {string} extensionName Name of the previously registered extension
2987     */
2988    this.useExtension = function (extensionName) {
2989      _parseExtension(extensionName);
2990    };
2991  
2992    /**
2993     * Set the flavor THIS converter should use
2994     * @param {string} name
2995     */
2996    this.setFlavor = function (name) {
2997      if (!flavor.hasOwnProperty(name)) {
2998        throw Error(name + ' flavor was not found');
2999      }
3000      var preset = flavor[name];
3001      setConvFlavor = name;
3002      for (var option in preset) {
3003        if (preset.hasOwnProperty(option)) {
3004          options[option] = preset[option];
3005        }
3006      }
3007    };
3008  
3009    /**
3010     * Get the currently set flavor of this converter
3011     * @returns {string}
3012     */
3013    this.getFlavor = function () {
3014      return setConvFlavor;
3015    };
3016  
3017    /**
3018     * Remove an extension from THIS converter.
3019     * Note: This is a costly operation. It's better to initialize a new converter
3020     * and specify the extensions you wish to use
3021     * @param {Array} extension
3022     */
3023    this.removeExtension = function (extension) {
3024      if (!showdown.helper.isArray(extension)) {
3025        extension = [extension];
3026      }
3027      for (var a = 0; a < extension.length; ++a) {
3028        var ext = extension[a];
3029        for (var i = 0; i < langExtensions.length; ++i) {
3030          if (langExtensions[i] === ext) {
3031            langExtensions[i].splice(i, 1);
3032          }
3033        }
3034        for (var ii = 0; ii < outputModifiers.length; ++i) {
3035          if (outputModifiers[ii] === ext) {
3036            outputModifiers[ii].splice(i, 1);
3037          }
3038        }
3039      }
3040    };
3041  
3042    /**
3043     * Get all extension of THIS converter
3044     * @returns {{language: Array, output: Array}}
3045     */
3046    this.getAllExtensions = function () {
3047      return {
3048        language: langExtensions,
3049        output: outputModifiers
3050      };
3051    };
3052  
3053    /**
3054     * Get the metadata of the previously parsed document
3055     * @param raw
3056     * @returns {string|{}}
3057     */
3058    this.getMetadata = function (raw) {
3059      if (raw) {
3060        return metadata.raw;
3061      } else {
3062        return metadata.parsed;
3063      }
3064    };
3065  
3066    /**
3067     * Get the metadata format of the previously parsed document
3068     * @returns {string}
3069     */
3070    this.getMetadataFormat = function () {
3071      return metadata.format;
3072    };
3073  
3074    /**
3075     * Private: set a single key, value metadata pair
3076     * @param {string} key
3077     * @param {string} value
3078     */
3079    this._setMetadataPair = function (key, value) {
3080      metadata.parsed[key] = value;
3081    };
3082  
3083    /**
3084     * Private: set metadata format
3085     * @param {string} format
3086     */
3087    this._setMetadataFormat = function (format) {
3088      metadata.format = format;
3089    };
3090  
3091    /**
3092     * Private: set metadata raw text
3093     * @param {string} raw
3094     */
3095    this._setMetadataRaw = function (raw) {
3096      metadata.raw = raw;
3097    };
3098  };
3099  
3100  /**
3101   * Turn Markdown link shortcuts into XHTML <a> tags.
3102   */
3103  showdown.subParser('anchors', function (text, options, globals) {
3104    'use strict';
3105  
3106    text = globals.converter._dispatch('anchors.before', text, options, globals);
3107  
3108    var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {
3109      if (showdown.helper.isUndefined(title)) {
3110        title = '';
3111      }
3112      linkId = linkId.toLowerCase();
3113  
3114      // Special case for explicit empty url
3115      if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
3116        url = '';
3117      } else if (!url) {
3118        if (!linkId) {
3119          // lower-case and turn embedded newlines into spaces
3120          linkId = linkText.toLowerCase().replace(/ ?\n/g, ' ');
3121        }
3122        url = '#' + linkId;
3123  
3124        if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {
3125          url = globals.gUrls[linkId];
3126          if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {
3127            title = globals.gTitles[linkId];
3128          }
3129        } else {
3130          return wholeMatch;
3131        }
3132      }
3133  
3134      //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance
3135      url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
3136  
3137      var result = '<a href="' + url + '"';
3138  
3139      if (title !== '' && title !== null) {
3140        title = title.replace(/"/g, '&quot;');
3141        //title = showdown.helper.escapeCharacters(title, '*_', false); // replaced line to improve performance
3142        title = title.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
3143        result += ' title="' + title + '"';
3144      }
3145  
3146      // optionLinksInNewWindow only applies
3147      // to external links. Hash links (#) open in same page
3148      if (options.openLinksInNewWindow && !/^#/.test(url)) {
3149        // escaped _
3150        result += ' rel="noopener noreferrer" target="¨E95Eblank"';
3151      }
3152  
3153      result += '>' + linkText + '</a>';
3154  
3155      return result;
3156    };
3157  
3158    // First, handle reference-style links: [link text] [id]
3159    text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag);
3160  
3161    // Next, inline-style links: [link text](url "optional title")
3162    // cases with crazy urls like ./image/cat1).png
3163    text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
3164      writeAnchorTag);
3165  
3166    // normal cases
3167    text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
3168      writeAnchorTag);
3169  
3170    // handle reference-style shortcuts: [link text]
3171    // These must come last in case you've also got [link test][1]
3172    // or [link test](/foo)
3173    text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag);
3174  
3175    // Lastly handle GithubMentions if option is enabled
3176    if (options.ghMentions) {
3177      text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) {
3178        if (escape === '\\') {
3179          return st + mentions;
3180        }
3181  
3182        //check if options.ghMentionsLink is a string
3183        if (!showdown.helper.isString(options.ghMentionsLink)) {
3184          throw new Error('ghMentionsLink option must be a string');
3185        }
3186        var lnk = options.ghMentionsLink.replace(/\{u}/g, username),
3187            target = '';
3188        if (options.openLinksInNewWindow) {
3189          target = ' rel="noopener noreferrer" target="¨E95Eblank"';
3190        }
3191        return st + '<a href="' + lnk + '"' + target + '>' + mentions + '</a>';
3192      });
3193    }
3194  
3195    text = globals.converter._dispatch('anchors.after', text, options, globals);
3196    return text;
3197  });
3198  
3199  // url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-]
3200  
3201  var simpleURLRegex  = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,
3202      simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,
3203      delimUrlRegex   = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,
3204      simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,
3205      delimMailRegex  = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
3206  
3207      replaceLink = function (options) {
3208        'use strict';
3209        return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {
3210          link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
3211          var lnkTxt = link,
3212              append = '',
3213              target = '',
3214              lmc    = leadingMagicChars || '',
3215              tmc    = trailingMagicChars || '';
3216          if (/^www\./i.test(link)) {
3217            link = link.replace(/^www\./i, 'http://www.');
3218          }
3219          if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {
3220            append = trailingPunctuation;
3221          }
3222          if (options.openLinksInNewWindow) {
3223            target = ' rel="noopener noreferrer" target="¨E95Eblank"';
3224          }
3225          return lmc + '<a href="' + link + '"' + target + '>' + lnkTxt + '</a>' + append + tmc;
3226        };
3227      },
3228  
3229      replaceMail = function (options, globals) {
3230        'use strict';
3231        return function (wholeMatch, b, mail) {
3232          var href = 'mailto:';
3233          b = b || '';
3234          mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);
3235          if (options.encodeEmails) {
3236            href = showdown.helper.encodeEmailAddress(href + mail);
3237            mail = showdown.helper.encodeEmailAddress(mail);
3238          } else {
3239            href = href + mail;
3240          }
3241          return b + '<a href="' + href + '">' + mail + '</a>';
3242        };
3243      };
3244  
3245  showdown.subParser('autoLinks', function (text, options, globals) {
3246    'use strict';
3247  
3248    text = globals.converter._dispatch('autoLinks.before', text, options, globals);
3249  
3250    text = text.replace(delimUrlRegex, replaceLink(options));
3251    text = text.replace(delimMailRegex, replaceMail(options, globals));
3252  
3253    text = globals.converter._dispatch('autoLinks.after', text, options, globals);
3254  
3255    return text;
3256  });
3257  
3258  showdown.subParser('simplifiedAutoLinks', function (text, options, globals) {
3259    'use strict';
3260  
3261    if (!options.simplifiedAutoLink) {
3262      return text;
3263    }
3264  
3265    text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);
3266  
3267    if (options.excludeTrailingPunctuationFromURLs) {
3268      text = text.replace(simpleURLRegex2, replaceLink(options));
3269    } else {
3270      text = text.replace(simpleURLRegex, replaceLink(options));
3271    }
3272    text = text.replace(simpleMailRegex, replaceMail(options, globals));
3273  
3274    text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);
3275  
3276    return text;
3277  });
3278  
3279  /**
3280   * These are all the transformations that form block-level
3281   * tags like paragraphs, headers, and list items.
3282   */
3283  showdown.subParser('blockGamut', function (text, options, globals) {
3284    'use strict';
3285  
3286    text = globals.converter._dispatch('blockGamut.before', text, options, globals);
3287  
3288    // we parse blockquotes first so that we can have headings and hrs
3289    // inside blockquotes
3290    text = showdown.subParser('blockQuotes')(text, options, globals);
3291    text = showdown.subParser('headers')(text, options, globals);
3292  
3293    // Do Horizontal Rules:
3294    text = showdown.subParser('horizontalRule')(text, options, globals);
3295  
3296    text = showdown.subParser('lists')(text, options, globals);
3297    text = showdown.subParser('codeBlocks')(text, options, globals);
3298    text = showdown.subParser('tables')(text, options, globals);
3299  
3300    // We already ran _HashHTMLBlocks() before, in Markdown(), but that
3301    // was to escape raw HTML in the original Markdown source. This time,
3302    // we're escaping the markup we've just created, so that we don't wrap
3303    // <p> tags around block-level tags.
3304    text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
3305    text = showdown.subParser('paragraphs')(text, options, globals);
3306  
3307    text = globals.converter._dispatch('blockGamut.after', text, options, globals);
3308  
3309    return text;
3310  });
3311  
3312  showdown.subParser('blockQuotes', function (text, options, globals) {
3313    'use strict';
3314  
3315    text = globals.converter._dispatch('blockQuotes.before', text, options, globals);
3316  
3317    // add a couple extra lines after the text and endtext mark
3318    text = text + '\n\n';
3319  
3320    var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;
3321  
3322    if (options.splitAdjacentBlockquotes) {
3323      rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm;
3324    }
3325  
3326    text = text.replace(rgx, function (bq) {
3327      // attacklab: hack around Konqueror 3.5.4 bug:
3328      // "----------bug".replace(/^-/g,"") == "bug"
3329      bq = bq.replace(/^[ \t]*>[ \t]?/gm, ''); // trim one level of quoting
3330  
3331      // attacklab: clean up hack
3332      bq = bq.replace(/¨0/g, '');
3333  
3334      bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines
3335      bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);
3336      bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse
3337  
3338      bq = bq.replace(/(^|\n)/g, '$1  ');
3339      // These leading spaces screw with <pre> content, so we need to fix that:
3340      bq = bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
3341        var pre = m1;
3342        // attacklab: hack around Konqueror 3.5.4 bug:
3343        pre = pre.replace(/^  /mg, '¨0');
3344        pre = pre.replace(/¨0/g, '');
3345        return pre;
3346      });
3347  
3348      return showdown.subParser('hashBlock')('<blockquote>\n' + bq + '\n</blockquote>', options, globals);
3349    });
3350  
3351    text = globals.converter._dispatch('blockQuotes.after', text, options, globals);
3352    return text;
3353  });
3354  
3355  /**
3356   * Process Markdown `<pre><code>` blocks.
3357   */
3358  showdown.subParser('codeBlocks', function (text, options, globals) {
3359    'use strict';
3360  
3361    text = globals.converter._dispatch('codeBlocks.before', text, options, globals);
3362  
3363    // sentinel workarounds for lack of \A and \Z, safari\khtml bug
3364    text += '¨0';
3365  
3366    var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
3367    text = text.replace(pattern, function (wholeMatch, m1, m2) {
3368      var codeblock = m1,
3369          nextChar = m2,
3370          end = '\n';
3371  
3372      codeblock = showdown.subParser('outdent')(codeblock, options, globals);
3373      codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
3374      codeblock = showdown.subParser('detab')(codeblock, options, globals);
3375      codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
3376      codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines
3377  
3378      if (options.omitExtraWLInCodeBlocks) {
3379        end = '';
3380      }
3381  
3382      codeblock = '<pre><code>' + codeblock + end + '</code></pre>';
3383  
3384      return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;
3385    });
3386  
3387    // strip sentinel
3388    text = text.replace(/¨0/, '');
3389  
3390    text = globals.converter._dispatch('codeBlocks.after', text, options, globals);
3391    return text;
3392  });
3393  
3394  /**
3395   *
3396   *   *  Backtick quotes are used for <code></code> spans.
3397   *
3398   *   *  You can use multiple backticks as the delimiters if you want to
3399   *     include literal backticks in the code span. So, this input:
3400   *
3401   *         Just type ``foo `bar` baz`` at the prompt.
3402   *
3403   *       Will translate to:
3404   *
3405   *         <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
3406   *
3407   *    There's no arbitrary limit to the number of backticks you
3408   *    can use as delimters. If you need three consecutive backticks
3409   *    in your code, use four for delimiters, etc.
3410   *
3411   *  *  You can use spaces to get literal backticks at the edges:
3412   *
3413   *         ... type `` `bar` `` ...
3414   *
3415   *       Turns to:
3416   *
3417   *         ... type <code>`bar`</code> ...
3418   */
3419  showdown.subParser('codeSpans', function (text, options, globals) {
3420    'use strict';
3421  
3422    text = globals.converter._dispatch('codeSpans.before', text, options, globals);
3423  
3424    if (typeof text === 'undefined') {
3425      text = '';
3426    }
3427    text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
3428      function (wholeMatch, m1, m2, m3) {
3429        var c = m3;
3430        c = c.replace(/^([ \t]*)/g, '');    // leading whitespace
3431        c = c.replace(/[ \t]*$/g, '');    // trailing whitespace
3432        c = showdown.subParser('encodeCode')(c, options, globals);
3433        c = m1 + '<code>' + c + '</code>';
3434        c = showdown.subParser('hashHTMLSpans')(c, options, globals);
3435        return c;
3436      }
3437    );
3438  
3439    text = globals.converter._dispatch('codeSpans.after', text, options, globals);
3440    return text;
3441  });
3442  
3443  /**
3444   * Create a full HTML document from the processed markdown
3445   */
3446  showdown.subParser('completeHTMLDocument', function (text, options, globals) {
3447    'use strict';
3448  
3449    if (!options.completeHTMLDocument) {
3450      return text;
3451    }
3452  
3453    text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals);
3454  
3455    var doctype = 'html',
3456        doctypeParsed = '<!DOCTYPE HTML>\n',
3457        title = '',
3458        charset = '<meta charset="utf-8">\n',
3459        lang = '',
3460        metadata = '';
3461  
3462    if (typeof globals.metadata.parsed.doctype !== 'undefined') {
3463      doctypeParsed = '<!DOCTYPE ' +  globals.metadata.parsed.doctype + '>\n';
3464      doctype = globals.metadata.parsed.doctype.toString().toLowerCase();
3465      if (doctype === 'html' || doctype === 'html5') {
3466        charset = '<meta charset="utf-8">';
3467      }
3468    }
3469  
3470    for (var meta in globals.metadata.parsed) {
3471      if (globals.metadata.parsed.hasOwnProperty(meta)) {
3472        switch (meta.toLowerCase()) {
3473          case 'doctype':
3474            break;
3475  
3476          case 'title':
3477            title = '<title>' +  globals.metadata.parsed.title + '</title>\n';
3478            break;
3479  
3480          case 'charset':
3481            if (doctype === 'html' || doctype === 'html5') {
3482              charset = '<meta charset="' + globals.metadata.parsed.charset + '">\n';
3483            } else {
3484              charset = '<meta name="charset" content="' + globals.metadata.parsed.charset + '">\n';
3485            }
3486            break;
3487  
3488          case 'language':
3489          case 'lang':
3490            lang = ' lang="' + globals.metadata.parsed[meta] + '"';
3491            metadata += '<meta name="' + meta + '" content="' + globals.metadata.parsed[meta] + '">\n';
3492            break;
3493  
3494          default:
3495            metadata += '<meta name="' + meta + '" content="' + globals.metadata.parsed[meta] + '">\n';
3496        }
3497      }
3498    }
3499  
3500    text = doctypeParsed + '<html' + lang + '>\n<head>\n' + title + charset + metadata + '</head>\n<body>\n' + text.trim() + '\n</body>\n</html>';
3501  
3502    text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals);
3503    return text;
3504  });
3505  
3506  /**
3507   * Convert all tabs to spaces
3508   */
3509  showdown.subParser('detab', function (text, options, globals) {
3510    'use strict';
3511    text = globals.converter._dispatch('detab.before', text, options, globals);
3512  
3513    // expand first n-1 tabs
3514    text = text.replace(/\t(?=\t)/g, '    '); // g_tab_width
3515  
3516    // replace the nth with two sentinels
3517    text = text.replace(/\t/g, '¨A¨B');
3518  
3519    // use the sentinel to anchor our regex so it doesn't explode
3520    text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {
3521      var leadingText = m1,
3522          numSpaces = 4 - leadingText.length % 4;  // g_tab_width
3523  
3524      // there *must* be a better way to do this:
3525      for (var i = 0; i < numSpaces; i++) {
3526        leadingText += ' ';
3527      }
3528  
3529      return leadingText;
3530    });
3531  
3532    // clean up sentinels
3533    text = text.replace(/¨A/g, '    ');  // g_tab_width
3534    text = text.replace(/¨B/g, '');
3535  
3536    text = globals.converter._dispatch('detab.after', text, options, globals);
3537    return text;
3538  });
3539  
3540  showdown.subParser('ellipsis', function (text, options, globals) {
3541    'use strict';
3542  
3543    text = globals.converter._dispatch('ellipsis.before', text, options, globals);
3544  
3545    text = text.replace(/\.\.\./g, '…');
3546  
3547    text = globals.converter._dispatch('ellipsis.after', text, options, globals);
3548  
3549    return text;
3550  });
3551  
3552  /**
3553   * Turn emoji codes into emojis
3554   *
3555   * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis
3556   */
3557  showdown.subParser('emoji', function (text, options, globals) {
3558    'use strict';
3559  
3560    if (!options.emoji) {
3561      return text;
3562    }
3563  
3564    text = globals.converter._dispatch('emoji.before', text, options, globals);
3565  
3566    var emojiRgx = /:([\S]+?):/g;
3567  
3568    text = text.replace(emojiRgx, function (wm, emojiCode) {
3569      if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {
3570        return showdown.helper.emojis[emojiCode];
3571      }
3572      return wm;
3573    });
3574  
3575    text = globals.converter._dispatch('emoji.after', text, options, globals);
3576  
3577    return text;
3578  });
3579  
3580  /**
3581   * Smart processing for ampersands and angle brackets that need to be encoded.
3582   */
3583  showdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {
3584    'use strict';
3585    text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);
3586  
3587    // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
3588    // http://bumppo.net/projects/amputator/
3589    text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&amp;');
3590  
3591    // Encode naked <'s
3592    text = text.replace(/<(?![a-z\/?$!])/gi, '&lt;');
3593  
3594    // Encode <
3595    text = text.replace(/</g, '&lt;');
3596  
3597    // Encode >
3598    text = text.replace(/>/g, '&gt;');
3599  
3600    text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);
3601    return text;
3602  });
3603  
3604  /**
3605   * Returns the string, with after processing the following backslash escape sequences.
3606   *
3607   * attacklab: The polite way to do this is with the new escapeCharacters() function:
3608   *
3609   *    text = escapeCharacters(text,"\\",true);
3610   *    text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
3611   *
3612   * ...but we're sidestepping its use of the (slow) RegExp constructor
3613   * as an optimization for Firefox.  This function gets called a LOT.
3614   */
3615  showdown.subParser('encodeBackslashEscapes', function (text, options, globals) {
3616    'use strict';
3617    text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);
3618  
3619    text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback);
3620    text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);
3621  
3622    text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);
3623    return text;
3624  });
3625  
3626  /**
3627   * Encode/escape certain characters inside Markdown code runs.
3628   * The point is that in code, these characters are literals,
3629   * and lose their special Markdown meanings.
3630   */
3631  showdown.subParser('encodeCode', function (text, options, globals) {
3632    'use strict';
3633  
3634    text = globals.converter._dispatch('encodeCode.before', text, options, globals);
3635  
3636    // Encode all ampersands; HTML entities are not
3637    // entities within a Markdown code span.
3638    text = text
3639      .replace(/&/g, '&amp;')
3640    // Do the angle bracket song and dance:
3641      .replace(/</g, '&lt;')
3642      .replace(/>/g, '&gt;')
3643    // Now, escape characters that are magic in Markdown:
3644      .replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback);
3645  
3646    text = globals.converter._dispatch('encodeCode.after', text, options, globals);
3647    return text;
3648  });
3649  
3650  /**
3651   * Within tags -- meaning between < and > -- encode [\ ` * _ ~ =] so they
3652   * don't conflict with their use in Markdown for code, italics and strong.
3653   */
3654  showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {
3655    'use strict';
3656    text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);
3657  
3658    // Build a regex to find HTML tags.
3659    var tags     = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,
3660        comments = /<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;
3661  
3662    text = text.replace(tags, function (wholeMatch) {
3663      return wholeMatch
3664        .replace(/(.)<\/?code>(?=.)/g, '$1`')
3665        .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);
3666    });
3667  
3668    text = text.replace(comments, function (wholeMatch) {
3669      return wholeMatch
3670        .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);
3671    });
3672  
3673    text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);
3674    return text;
3675  });
3676  
3677  /**
3678   * Handle github codeblocks prior to running HashHTML so that
3679   * HTML contained within the codeblock gets escaped properly
3680   * Example:
3681   * ```ruby
3682   *     def hello_world(x)
3683   *       puts "Hello, #{x}"
3684   *     end
3685   * ```
3686   */
3687  showdown.subParser('githubCodeBlocks', function (text, options, globals) {
3688    'use strict';
3689  
3690    // early exit if option is not enabled
3691    if (!options.ghCodeBlocks) {
3692      return text;
3693    }
3694  
3695    text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);
3696  
3697    text += '¨0';
3698  
3699    text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function (wholeMatch, delim, language, codeblock) {
3700      var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n';
3701  
3702      // First parse the github code block
3703      codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
3704      codeblock = showdown.subParser('detab')(codeblock, options, globals);
3705      codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
3706      codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace
3707  
3708      codeblock = '<pre><code' + (language ? ' class="' + language + ' language-' + language + '"' : '') + '>' + codeblock + end + '</code></pre>';
3709  
3710      codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);
3711  
3712      // Since GHCodeblocks can be false positives, we need to
3713      // store the primitive text and the parsed text in a global var,
3714      // and then return a token
3715      return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
3716    });
3717  
3718    // attacklab: strip sentinel
3719    text = text.replace(/¨0/, '');
3720  
3721    return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);
3722  });
3723  
3724  showdown.subParser('hashBlock', function (text, options, globals) {
3725    'use strict';
3726    text = globals.converter._dispatch('hashBlock.before', text, options, globals);
3727    text = text.replace(/(^\n+|\n+$)/g, '');
3728    text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n';
3729    text = globals.converter._dispatch('hashBlock.after', text, options, globals);
3730    return text;
3731  });
3732  
3733  /**
3734   * Hash and escape <code> elements that should not be parsed as markdown
3735   */
3736  showdown.subParser('hashCodeTags', function (text, options, globals) {
3737    'use strict';
3738    text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);
3739  
3740    var repFunc = function (wholeMatch, match, left, right) {
3741      var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
3742      return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';
3743    };
3744  
3745    // Hash naked <code>
3746    text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '<code\\b[^>]*>', '</code>', 'gim');
3747  
3748    text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);
3749    return text;
3750  });
3751  
3752  showdown.subParser('hashElement', function (text, options, globals) {
3753    'use strict';
3754  
3755    return function (wholeMatch, m1) {
3756      var blockText = m1;
3757  
3758      // Undo double lines
3759      blockText = blockText.replace(/\n\n/g, '\n');
3760      blockText = blockText.replace(/^\n/, '');
3761  
3762      // strip trailing blank lines
3763      blockText = blockText.replace(/\n+$/g, '');
3764  
3765      // Replace the element text with a marker ("¨KxK" where x is its key)
3766      blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n';
3767  
3768      return blockText;
3769    };
3770  });
3771  
3772  showdown.subParser('hashHTMLBlocks', function (text, options, globals) {
3773    'use strict';
3774    text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);
3775  
3776    var blockTags = [
3777          'pre',
3778          'div',
3779          'h1',
3780          'h2',
3781          'h3',
3782          'h4',
3783          'h5',
3784          'h6',
3785          'blockquote',
3786          'table',
3787          'dl',
3788          'ol',
3789          'ul',
3790          'script',
3791          'noscript',
3792          'form',
3793          'fieldset',
3794          'iframe',
3795          'math',
3796          'style',
3797          'section',
3798          'header',
3799          'footer',
3800          'nav',
3801          'article',
3802          'aside',
3803          'address',
3804          'audio',
3805          'canvas',
3806          'figure',
3807          'hgroup',
3808          'output',
3809          'video',
3810          'p'
3811        ],
3812        repFunc = function (wholeMatch, match, left, right) {
3813          var txt = wholeMatch;
3814          // check if this html element is marked as markdown
3815          // if so, it's contents should be parsed as markdown
3816          if (left.search(/\bmarkdown\b/) !== -1) {
3817            txt = left + globals.converter.makeHtml(match) + right;
3818          }
3819          return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
3820        };
3821  
3822    if (options.backslashEscapesHTMLTags) {
3823      // encode backslash escaped HTML tags
3824      text = text.replace(/\\<(\/?[^>]+?)>/g, function (wm, inside) {
3825        return '&lt;' + inside + '&gt;';
3826      });
3827    }
3828  
3829    // hash HTML Blocks
3830    for (var i = 0; i < blockTags.length; ++i) {
3831  
3832      var opTagPos,
3833          rgx1     = new RegExp('^ {0,3}(<' + blockTags[i] + '\\b[^>]*>)', 'im'),
3834          patLeft  = '<' + blockTags[i] + '\\b[^>]*>',
3835          patRight = '</' + blockTags[i] + '>';
3836      // 1. Look for the first position of the first opening HTML tag in the text
3837      while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {
3838  
3839        // if the HTML tag is \ escaped, we need to escape it and break
3840  
3841  
3842        //2. Split the text in that position
3843        var subTexts = showdown.helper.splitAtIndex(text, opTagPos),
3844            //3. Match recursively
3845            newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');
3846  
3847        // prevent an infinite loop
3848        if (newSubText1 === subTexts[1]) {
3849          break;
3850        }
3851        text = subTexts[0].concat(newSubText1);
3852      }
3853    }
3854    // HR SPECIAL CASE
3855    text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,
3856      showdown.subParser('hashElement')(text, options, globals));
3857  
3858    // Special case for standalone HTML comments
3859    text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {
3860      return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
3861    }, '^ {0,3}<!--', '-->', 'gm');
3862  
3863    // PHP and ASP-style processor instructions (<?...?> and <%...%>)
3864    text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,
3865      showdown.subParser('hashElement')(text, options, globals));
3866  
3867    text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);
3868    return text;
3869  });
3870  
3871  /**
3872   * Hash span elements that should not be parsed as markdown
3873   */
3874  showdown.subParser('hashHTMLSpans', function (text, options, globals) {
3875    'use strict';
3876    text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);
3877  
3878    function hashHTMLSpan (html) {
3879      return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';
3880    }
3881  
3882    // Hash Self Closing tags
3883    text = text.replace(/<[^>]+?\/>/gi, function (wm) {
3884      return hashHTMLSpan(wm);
3885    });
3886  
3887    // Hash tags without properties
3888    text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) {
3889      return hashHTMLSpan(wm);
3890    });
3891  
3892    // Hash tags with properties
3893    text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) {
3894      return hashHTMLSpan(wm);
3895    });
3896  
3897    // Hash self closing tags without />
3898    text = text.replace(/<[^>]+?>/gi, function (wm) {
3899      return hashHTMLSpan(wm);
3900    });
3901  
3902    /*showdown.helper.matchRecursiveRegExp(text, '<code\\b[^>]*>', '</code>', 'gi');*/
3903  
3904    text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);
3905    return text;
3906  });
3907  
3908  /**
3909   * Unhash HTML spans
3910   */
3911  showdown.subParser('unhashHTMLSpans', function (text, options, globals) {
3912    'use strict';
3913    text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);
3914  
3915    for (var i = 0; i < globals.gHtmlSpans.length; ++i) {
3916      var repText = globals.gHtmlSpans[i],
3917          // limiter to prevent infinite loop (assume 10 as limit for recurse)
3918          limit = 0;
3919  
3920      while (/¨C(\d+)C/.test(repText)) {
3921        var num = RegExp.$1;
3922        repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);
3923        if (limit === 10) {
3924          console.error('maximum nesting of 10 spans reached!!!');
3925          break;
3926        }
3927        ++limit;
3928      }
3929      text = text.replace('¨C' + i + 'C', repText);
3930    }
3931  
3932    text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);
3933    return text;
3934  });
3935  
3936  /**
3937   * Hash and escape <pre><code> elements that should not be parsed as markdown
3938   */
3939  showdown.subParser('hashPreCodeTags', function (text, options, globals) {
3940    'use strict';
3941    text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);
3942  
3943    var repFunc = function (wholeMatch, match, left, right) {
3944      // encode html entities
3945      var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
3946      return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
3947    };
3948  
3949    // Hash <pre><code>
3950    text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>', '^ {0,3}</code>\\s*</pre>', 'gim');
3951  
3952    text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);
3953    return text;
3954  });
3955  
3956  showdown.subParser('headers', function (text, options, globals) {
3957    'use strict';
3958  
3959    text = globals.converter._dispatch('headers.before', text, options, globals);
3960  
3961    var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),
3962  
3963        // Set text-style headers:
3964        //    Header 1
3965        //    ========
3966        //
3967        //    Header 2
3968        //    --------
3969        //
3970        setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
3971        setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
3972  
3973    text = text.replace(setextRegexH1, function (wholeMatch, m1) {
3974  
3975      var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
3976          hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"',
3977          hLevel = headerLevelStart,
3978          hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
3979      return showdown.subParser('hashBlock')(hashBlock, options, globals);
3980    });
3981  
3982    text = text.replace(setextRegexH2, function (matchFound, m1) {
3983      var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
3984          hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"',
3985          hLevel = headerLevelStart + 1,
3986          hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
3987      return showdown.subParser('hashBlock')(hashBlock, options, globals);
3988    });
3989  
3990    // atx-style headers:
3991    //  # Header 1
3992    //  ## Header 2
3993    //  ## Header 2 with closing hashes ##
3994    //  ...
3995    //  ###### Header 6
3996    //
3997    var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;
3998  
3999    text = text.replace(atxStyle, function (wholeMatch, m1, m2) {
4000      var hText = m2;
4001      if (options.customizedHeaderId) {
4002        hText = m2.replace(/\s?\{([^{]+?)}\s*$/, '');
4003      }
4004  
4005      var span = showdown.subParser('spanGamut')(hText, options, globals),
4006          hID = (options.noHeaderId) ? '' : ' id="' + headerId(m2) + '"',
4007          hLevel = headerLevelStart - 1 + m1.length,
4008          header = '<h' + hLevel + hID + '>' + span + '</h' + hLevel + '>';
4009  
4010      return showdown.subParser('hashBlock')(header, options, globals);
4011    });
4012  
4013    function headerId (m) {
4014      var title,
4015          prefix;
4016  
4017      // It is separate from other options to allow combining prefix and customized
4018      if (options.customizedHeaderId) {
4019        var match = m.match(/\{([^{]+?)}\s*$/);
4020        if (match && match[1]) {
4021          m = match[1];
4022        }
4023      }
4024  
4025      title = m;
4026  
4027      // Prefix id to prevent causing inadvertent pre-existing style matches.
4028      if (showdown.helper.isString(options.prefixHeaderId)) {
4029        prefix = options.prefixHeaderId;
4030      } else if (options.prefixHeaderId === true) {
4031        prefix = 'section-';
4032      } else {
4033        prefix = '';
4034      }
4035  
4036      if (!options.rawPrefixHeaderId) {
4037        title = prefix + title;
4038      }
4039  
4040      if (options.ghCompatibleHeaderId) {
4041        title = title
4042          .replace(/ /g, '-')
4043          // replace previously escaped chars (&, ¨ and $)
4044          .replace(/&amp;/g, '')
4045          .replace(/¨T/g, '')
4046          .replace(/¨D/g, '')
4047          // replace rest of the chars (&~$ are repeated as they might have been escaped)
4048          // borrowed from github's redcarpet (some they should produce similar results)
4049          .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '')
4050          .toLowerCase();
4051      } else if (options.rawHeaderId) {
4052        title = title
4053          .replace(/ /g, '-')
4054          // replace previously escaped chars (&, ¨ and $)
4055          .replace(/&amp;/g, '&')
4056          .replace(/¨T/g, '¨')
4057          .replace(/¨D/g, '$')
4058          // replace " and '
4059          .replace(/["']/g, '-')
4060          .toLowerCase();
4061      } else {
4062        title = title
4063          .replace(/[^\w]/g, '')
4064          .toLowerCase();
4065      }
4066  
4067      if (options.rawPrefixHeaderId) {
4068        title = prefix + title;
4069      }
4070  
4071      if (globals.hashLinkCounts[title]) {
4072        title = title + '-' + (globals.hashLinkCounts[title]++);
4073      } else {
4074        globals.hashLinkCounts[title] = 1;
4075      }
4076      return title;
4077    }
4078  
4079    text = globals.converter._dispatch('headers.after', text, options, globals);
4080    return text;
4081  });
4082  
4083  /**
4084   * Turn Markdown link shortcuts into XHTML <a> tags.
4085   */
4086  showdown.subParser('horizontalRule', function (text, options, globals) {
4087    'use strict';
4088    text = globals.converter._dispatch('horizontalRule.before', text, options, globals);
4089  
4090    var key = showdown.subParser('hashBlock')('<hr />', options, globals);
4091    text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key);
4092    text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key);
4093    text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key);
4094  
4095    text = globals.converter._dispatch('horizontalRule.after', text, options, globals);
4096    return text;
4097  });
4098  
4099  /**
4100   * Turn Markdown image shortcuts into <img> tags.
4101   */
4102  showdown.subParser('images', function (text, options, globals) {
4103    'use strict';
4104  
4105    text = globals.converter._dispatch('images.before', text, options, globals);
4106  
4107    var inlineRegExp      = /!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
4108        crazyRegExp       = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,
4109        base64RegExp      = /!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
4110        referenceRegExp   = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,
4111        refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g;
4112  
4113    function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {
4114      url = url.replace(/\s/g, '');
4115      return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);
4116    }
4117  
4118    function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {
4119  
4120      var gUrls   = globals.gUrls,
4121          gTitles = globals.gTitles,
4122          gDims   = globals.gDimensions;
4123  
4124      linkId = linkId.toLowerCase();
4125  
4126      if (!title) {
4127        title = '';
4128      }
4129      // Special case for explicit empty url
4130      if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
4131        url = '';
4132  
4133      } else if (url === '' || url === null) {
4134        if (linkId === '' || linkId === null) {
4135          // lower-case and turn embedded newlines into spaces
4136          linkId = altText.toLowerCase().replace(/ ?\n/g, ' ');
4137        }
4138        url = '#' + linkId;
4139  
4140        if (!showdown.helper.isUndefined(gUrls[linkId])) {
4141          url = gUrls[linkId];
4142          if (!showdown.helper.isUndefined(gTitles[linkId])) {
4143            title = gTitles[linkId];
4144          }
4145          if (!showdown.helper.isUndefined(gDims[linkId])) {
4146            width = gDims[linkId].width;
4147            height = gDims[linkId].height;
4148          }
4149        } else {
4150          return wholeMatch;
4151        }
4152      }
4153  
4154      altText = altText
4155        .replace(/"/g, '&quot;')
4156      //altText = showdown.helper.escapeCharacters(altText, '*_', false);
4157        .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
4158      //url = showdown.helper.escapeCharacters(url, '*_', false);
4159      url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
4160      var result = '<img src="' + url + '" alt="' + altText + '"';
4161  
4162      if (title && showdown.helper.isString(title)) {
4163        title = title
4164          .replace(/"/g, '&quot;')
4165        //title = showdown.helper.escapeCharacters(title, '*_', false);
4166          .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
4167        result += ' title="' + title + '"';
4168      }
4169  
4170      if (width && height) {
4171        width  = (width === '*') ? 'auto' : width;
4172        height = (height === '*') ? 'auto' : height;
4173  
4174        result += ' width="' + width + '"';
4175        result += ' height="' + height + '"';
4176      }
4177  
4178      result += ' />';
4179  
4180      return result;
4181    }
4182  
4183    // First, handle reference-style labeled images: ![alt text][id]
4184    text = text.replace(referenceRegExp, writeImageTag);
4185  
4186    // Next, handle inline images:  ![alt text](url =<width>x<height> "optional title")
4187  
4188    // base64 encoded images
4189    text = text.replace(base64RegExp, writeImageTagBase64);
4190  
4191    // cases with crazy urls like ./image/cat1).png
4192    text = text.replace(crazyRegExp, writeImageTag);
4193  
4194    // normal cases
4195    text = text.replace(inlineRegExp, writeImageTag);
4196  
4197    // handle reference-style shortcuts: ![img text]
4198    text = text.replace(refShortcutRegExp, writeImageTag);
4199  
4200    text = globals.converter._dispatch('images.after', text, options, globals);
4201    return text;
4202  });
4203  
4204  showdown.subParser('italicsAndBold', function (text, options, globals) {
4205    'use strict';
4206  
4207    text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);
4208  
4209    // it's faster to have 3 separate regexes for each case than have just one
4210    // because of backtracing, in some cases, it could lead to an exponential effect
4211    // called "catastrophic backtrace". Ominous!
4212  
4213    function parseInside (txt, left, right) {
4214      /*
4215      if (options.simplifiedAutoLink) {
4216        txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);
4217      }
4218      */
4219      return left + txt + right;
4220    }
4221  
4222    // Parse underscores
4223    if (options.literalMidWordUnderscores) {
4224      text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
4225        return parseInside (txt, '<strong><em>', '</em></strong>');
4226      });
4227      text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
4228        return parseInside (txt, '<strong>', '</strong>');
4229      });
4230      text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) {
4231        return parseInside (txt, '<em>', '</em>');
4232      });
4233    } else {
4234      text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
4235        return (/\S$/.test(m)) ? parseInside (m, '<strong><em>', '</em></strong>') : wm;
4236      });
4237      text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
4238        return (/\S$/.test(m)) ? parseInside (m, '<strong>', '</strong>') : wm;
4239      });
4240      text = text.replace(/_([^\s_][\s\S]*?)_/g, function (wm, m) {
4241        // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)
4242        return (/\S$/.test(m)) ? parseInside (m, '<em>', '</em>') : wm;
4243      });
4244    }
4245  
4246    // Now parse asterisks
4247    if (options.literalMidWordAsterisks) {
4248      text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) {
4249        return parseInside (txt, lead + '<strong><em>', '</em></strong>');
4250      });
4251      text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function (wm, lead, txt) {
4252        return parseInside (txt, lead + '<strong>', '</strong>');
4253      });
4254      text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function (wm, lead, txt) {
4255        return parseInside (txt, lead + '<em>', '</em>');
4256      });
4257    } else {
4258      text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) {
4259        return (/\S$/.test(m)) ? parseInside (m, '<strong><em>', '</em></strong>') : wm;
4260      });
4261      text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function (wm, m) {
4262        return (/\S$/.test(m)) ? parseInside (m, '<strong>', '</strong>') : wm;
4263      });
4264      text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function (wm, m) {
4265        // !/^\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)
4266        return (/\S$/.test(m)) ? parseInside (m, '<em>', '</em>') : wm;
4267      });
4268    }
4269  
4270  
4271    text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);
4272    return text;
4273  });
4274  
4275  /**
4276   * Form HTML ordered (numbered) and unordered (bulleted) lists.
4277   */
4278  showdown.subParser('lists', function (text, options, globals) {
4279    'use strict';
4280  
4281    /**
4282     * Process the contents of a single ordered or unordered list, splitting it
4283     * into individual list items.
4284     * @param {string} listStr
4285     * @param {boolean} trimTrailing
4286     * @returns {string}
4287     */
4288    function processListItems (listStr, trimTrailing) {
4289      // The $g_list_level global keeps track of when we're inside a list.
4290      // Each time we enter a list, we increment it; when we leave a list,
4291      // we decrement. If it's zero, we're not in a list anymore.
4292      //
4293      // We do this because when we're not inside a list, we want to treat
4294      // something like this:
4295      //
4296      //    I recommend upgrading to version
4297      //    8. Oops, now this line is treated
4298      //    as a sub-list.
4299      //
4300      // As a single paragraph, despite the fact that the second line starts
4301      // with a digit-period-space sequence.
4302      //
4303      // Whereas when we're inside a list (or sub-list), that line will be
4304      // treated as the start of a sub-list. What a kludge, huh? This is
4305      // an aspect of Markdown's syntax that's hard to parse perfectly
4306      // without resorting to mind-reading. Perhaps the solution is to
4307      // change the syntax rules such that sub-lists must start with a
4308      // starting cardinal number; e.g. "1." or "a.".
4309      globals.gListLevel++;
4310  
4311      // trim trailing blank lines:
4312      listStr = listStr.replace(/\n{2,}$/, '\n');
4313  
4314      // attacklab: add sentinel to emulate \z
4315      listStr += '¨0';
4316  
4317      var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,
4318          isParagraphed = (/\n[ \t]*\n(?!¨0)/.test(listStr));
4319  
4320      // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,
4321      // which is a syntax breaking change
4322      // activating this option reverts to old behavior
4323      if (options.disableForced4SpacesIndentedSublists) {
4324        rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm;
4325      }
4326  
4327      listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {
4328        checked = (checked && checked.trim() !== '');
4329  
4330        var item = showdown.subParser('outdent')(m4, options, globals),
4331            bulletStyle = '';
4332  
4333        // Support for github tasklists
4334        if (taskbtn && options.tasklists) {
4335          bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
4336          item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () {
4337            var otp = '<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';
4338            if (checked) {
4339              otp += ' checked';
4340            }
4341            otp += '>';
4342            return otp;
4343          });
4344        }
4345  
4346        // ISSUE #312
4347        // This input: - - - a
4348        // causes trouble to the parser, since it interprets it as:
4349        // <ul><li><li><li>a</li></li></li></ul>
4350        // instead of:
4351        // <ul><li>- - a</li></ul>
4352        // So, to prevent it, we will put a marker (¨A)in the beginning of the line
4353        // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser
4354        item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function (wm2) {
4355          return '¨A' + wm2;
4356        });
4357  
4358        // m1 - Leading line or
4359        // Has a double return (multi paragraph) or
4360        // Has sublist
4361        if (m1 || (item.search(/\n{2,}/) > -1)) {
4362          item = showdown.subParser('githubCodeBlocks')(item, options, globals);
4363          item = showdown.subParser('blockGamut')(item, options, globals);
4364        } else {
4365          // Recursion for sub-lists:
4366          item = showdown.subParser('lists')(item, options, globals);
4367          item = item.replace(/\n$/, ''); // chomp(item)
4368          item = showdown.subParser('hashHTMLBlocks')(item, options, globals);
4369  
4370          // Colapse double linebreaks
4371          item = item.replace(/\n\n+/g, '\n\n');
4372          if (isParagraphed) {
4373            item = showdown.subParser('paragraphs')(item, options, globals);
4374          } else {
4375            item = showdown.subParser('spanGamut')(item, options, globals);
4376          }
4377        }
4378  
4379        // now we need to remove the marker (¨A)
4380        item = item.replace('¨A', '');
4381        // we can finally wrap the line in list item tags
4382        item =  '<li' + bulletStyle + '>' + item + '</li>\n';
4383  
4384        return item;
4385      });
4386  
4387      // attacklab: strip sentinel
4388      listStr = listStr.replace(/¨0/g, '');
4389  
4390      globals.gListLevel--;
4391  
4392      if (trimTrailing) {
4393        listStr = listStr.replace(/\s+$/, '');
4394      }
4395  
4396      return listStr;
4397    }
4398  
4399    function styleStartNumber (list, listType) {
4400      // check if ol and starts by a number different than 1
4401      if (listType === 'ol') {
4402        var res = list.match(/^ *(\d+)\./);
4403        if (res && res[1] !== '1') {
4404          return ' start="' + res[1] + '"';
4405        }
4406      }
4407      return '';
4408    }
4409  
4410    /**
4411     * Check and parse consecutive lists (better fix for issue #142)
4412     * @param {string} list
4413     * @param {string} listType
4414     * @param {boolean} trimTrailing
4415     * @returns {string}
4416     */
4417    function parseConsecutiveLists (list, listType, trimTrailing) {
4418      // check if we caught 2 or more consecutive lists by mistake
4419      // we use the counterRgx, meaning if listType is UL we look for OL and vice versa
4420      var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm,
4421          ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm,
4422          counterRxg = (listType === 'ul') ? olRgx : ulRgx,
4423          result = '';
4424  
4425      if (list.search(counterRxg) !== -1) {
4426        (function parseCL (txt) {
4427          var pos = txt.search(counterRxg),
4428              style = styleStartNumber(list, listType);
4429          if (pos !== -1) {
4430            // slice
4431            result += '\n\n<' + listType + style + '>\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\n';
4432  
4433            // invert counterType and listType
4434            listType = (listType === 'ul') ? 'ol' : 'ul';
4435            counterRxg = (listType === 'ul') ? olRgx : ulRgx;
4436  
4437            //recurse
4438            parseCL(txt.slice(pos));
4439          } else {
4440            result += '\n\n<' + listType + style + '>\n' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\n';
4441          }
4442        })(list);
4443      } else {
4444        var style = styleStartNumber(list, listType);
4445        result = '\n\n<' + listType + style + '>\n' + processListItems(list, !!trimTrailing) + '</' + listType + '>\n';
4446      }
4447  
4448      return result;
4449    }
4450  
4451    /** Start of list parsing **/
4452    text = globals.converter._dispatch('lists.before', text, options, globals);
4453    // add sentinel to hack around khtml/safari bug:
4454    // http://bugs.webkit.org/show_bug.cgi?id=11231
4455    text += '¨0';
4456  
4457    if (globals.gListLevel) {
4458      text = text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
4459        function (wholeMatch, list, m2) {
4460          var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';
4461          return parseConsecutiveLists(list, listType, true);
4462        }
4463      );
4464    } else {
4465      text = text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
4466        function (wholeMatch, m1, list, m3) {
4467          var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';
4468          return parseConsecutiveLists(list, listType, false);
4469        }
4470      );
4471    }
4472  
4473    // strip sentinel
4474    text = text.replace(/¨0/, '');
4475    text = globals.converter._dispatch('lists.after', text, options, globals);
4476    return text;
4477  });
4478  
4479  /**
4480   * Parse metadata at the top of the document
4481   */
4482  showdown.subParser('metadata', function (text, options, globals) {
4483    'use strict';
4484  
4485    if (!options.metadata) {
4486      return text;
4487    }
4488  
4489    text = globals.converter._dispatch('metadata.before', text, options, globals);
4490  
4491    function parseMetadataContents (content) {
4492      // raw is raw so it's not changed in any way
4493      globals.metadata.raw = content;
4494  
4495      // escape chars forbidden in html attributes
4496      // double quotes
4497      content = content
4498        // ampersand first
4499        .replace(/&/g, '&amp;')
4500        // double quotes
4501        .replace(/"/g, '&quot;');
4502  
4503      content = content.replace(/\n {4}/g, ' ');
4504      content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function (wm, key, value) {
4505        globals.metadata.parsed[key] = value;
4506        return '';
4507      });
4508    }
4509  
4510    text = text.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/, function (wholematch, format, content) {
4511      parseMetadataContents(content);
4512      return '¨M';
4513    });
4514  
4515    text = text.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function (wholematch, format, content) {
4516      if (format) {
4517        globals.metadata.format = format;
4518      }
4519      parseMetadataContents(content);
4520      return '¨M';
4521    });
4522  
4523    text = text.replace(/¨M/g, '');
4524  
4525    text = globals.converter._dispatch('metadata.after', text, options, globals);
4526    return text;
4527  });
4528  
4529  /**
4530   * Remove one level of line-leading tabs or spaces
4531   */
4532  showdown.subParser('outdent', function (text, options, globals) {
4533    'use strict';
4534    text = globals.converter._dispatch('outdent.before', text, options, globals);
4535  
4536    // attacklab: hack around Konqueror 3.5.4 bug:
4537    // "----------bug".replace(/^-/g,"") == "bug"
4538    text = text.replace(/^(\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width
4539  
4540    // attacklab: clean up hack
4541    text = text.replace(/¨0/g, '');
4542  
4543    text = globals.converter._dispatch('outdent.after', text, options, globals);
4544    return text;
4545  });
4546  
4547  /**
4548   *
4549   */
4550  showdown.subParser('paragraphs', function (text, options, globals) {
4551    'use strict';
4552  
4553    text = globals.converter._dispatch('paragraphs.before', text, options, globals);
4554    // Strip leading and trailing lines:
4555    text = text.replace(/^\n+/g, '');
4556    text = text.replace(/\n+$/g, '');
4557  
4558    var grafs = text.split(/\n{2,}/g),
4559        grafsOut = [],
4560        end = grafs.length; // Wrap <p> tags
4561  
4562    for (var i = 0; i < end; i++) {
4563      var str = grafs[i];
4564      // if this is an HTML marker, copy it
4565      if (str.search(/¨(K|G)(\d+)\1/g) >= 0) {
4566        grafsOut.push(str);
4567  
4568      // test for presence of characters to prevent empty lines being parsed
4569      // as paragraphs (resulting in undesired extra empty paragraphs)
4570      } else if (str.search(/\S/) >= 0) {
4571        str = showdown.subParser('spanGamut')(str, options, globals);
4572        str = str.replace(/^([ \t]*)/g, '<p>');
4573        str += '</p>';
4574        grafsOut.push(str);
4575      }
4576    }
4577  
4578    /** Unhashify HTML blocks */
4579    end = grafsOut.length;
4580    for (i = 0; i < end; i++) {
4581      var blockText = '',
4582          grafsOutIt = grafsOut[i],
4583          codeFlag = false;
4584      // if this is a marker for an html block...
4585      // use RegExp.test instead of string.search because of QML bug
4586      while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) {
4587        var delim = RegExp.$1,
4588            num   = RegExp.$2;
4589  
4590        if (delim === 'K') {
4591          blockText = globals.gHtmlBlocks[num];
4592        } else {
4593          // we need to check if ghBlock is a false positive
4594          if (codeFlag) {
4595            // use encoded version of all text
4596            blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);
4597          } else {
4598            blockText = globals.ghCodeBlocks[num].codeblock;
4599          }
4600        }
4601        blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs
4602  
4603        grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText);
4604        // Check if grafsOutIt is a pre->code
4605        if (/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(grafsOutIt)) {
4606          codeFlag = true;
4607        }
4608      }
4609      grafsOut[i] = grafsOutIt;
4610    }
4611    text = grafsOut.join('\n');
4612    // Strip leading and trailing lines:
4613    text = text.replace(/^\n+/g, '');
4614    text = text.replace(/\n+$/g, '');
4615    return globals.converter._dispatch('paragraphs.after', text, options, globals);
4616  });
4617  
4618  /**
4619   * Run extension
4620   */
4621  showdown.subParser('runExtension', function (ext, text, options, globals) {
4622    'use strict';
4623  
4624    if (ext.filter) {
4625      text = ext.filter(text, globals.converter, options);
4626  
4627    } else if (ext.regex) {
4628      // TODO remove this when old extension loading mechanism is deprecated
4629      var re = ext.regex;
4630      if (!(re instanceof RegExp)) {
4631        re = new RegExp(re, 'g');
4632      }
4633      text = text.replace(re, ext.replace);
4634    }
4635  
4636    return text;
4637  });
4638  
4639  /**
4640   * These are all the transformations that occur *within* block-level
4641   * tags like paragraphs, headers, and list items.
4642   */
4643  showdown.subParser('spanGamut', function (text, options, globals) {
4644    'use strict';
4645  
4646    text = globals.converter._dispatch('spanGamut.before', text, options, globals);
4647    text = showdown.subParser('codeSpans')(text, options, globals);
4648    text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);
4649    text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);
4650  
4651    // Process anchor and image tags. Images must come first,
4652    // because ![foo][f] looks like an anchor.
4653    text = showdown.subParser('images')(text, options, globals);
4654    text = showdown.subParser('anchors')(text, options, globals);
4655  
4656    // Make links out of things like `<http://example.com/>`
4657    // Must come after anchors, because you can use < and >
4658    // delimiters in inline links like [this](<url>).
4659    text = showdown.subParser('autoLinks')(text, options, globals);
4660    text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);
4661    text = showdown.subParser('emoji')(text, options, globals);
4662    text = showdown.subParser('underline')(text, options, globals);
4663    text = showdown.subParser('italicsAndBold')(text, options, globals);
4664    text = showdown.subParser('strikethrough')(text, options, globals);
4665    text = showdown.subParser('ellipsis')(text, options, globals);
4666  
4667    // we need to hash HTML tags inside spans
4668    text = showdown.subParser('hashHTMLSpans')(text, options, globals);
4669  
4670    // now we encode amps and angles
4671    text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);
4672  
4673    // Do hard breaks
4674    if (options.simpleLineBreaks) {
4675      // GFM style hard breaks
4676      // only add line breaks if the text does not contain a block (special case for lists)
4677      if (!/\n\n¨K/.test(text)) {
4678        text = text.replace(/\n+/g, '<br />\n');
4679      }
4680    } else {
4681      // Vanilla hard breaks
4682      text = text.replace(/  +\n/g, '<br />\n');
4683    }
4684  
4685    text = globals.converter._dispatch('spanGamut.after', text, options, globals);
4686    return text;
4687  });
4688  
4689  showdown.subParser('strikethrough', function (text, options, globals) {
4690    'use strict';
4691  
4692    function parseInside (txt) {
4693      if (options.simplifiedAutoLink) {
4694        txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);
4695      }
4696      return '<del>' + txt + '</del>';
4697    }
4698  
4699    if (options.strikethrough) {
4700      text = globals.converter._dispatch('strikethrough.before', text, options, globals);
4701      text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });
4702      text = globals.converter._dispatch('strikethrough.after', text, options, globals);
4703    }
4704  
4705    return text;
4706  });
4707  
4708  /**
4709   * Strips link definitions from text, stores the URLs and titles in
4710   * hash references.
4711   * Link defs are in the form: ^[id]: url "optional title"
4712   */
4713  showdown.subParser('stripLinkDefinitions', function (text, options, globals) {
4714    'use strict';
4715  
4716    var regex       = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,
4717        base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;
4718  
4719    // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
4720    text += '¨0';
4721  
4722    var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {
4723      linkId = linkId.toLowerCase();
4724      if (url.match(/^data:.+?\/.+?;base64,/)) {
4725        // remove newlines
4726        globals.gUrls[linkId] = url.replace(/\s/g, '');
4727      } else {
4728        globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals);  // Link IDs are case-insensitive
4729      }
4730  
4731      if (blankLines) {
4732        // Oops, found blank lines, so it's not a title.
4733        // Put back the parenthetical statement we stole.
4734        return blankLines + title;
4735  
4736      } else {
4737        if (title) {
4738          globals.gTitles[linkId] = title.replace(/"|'/g, '&quot;');
4739        }
4740        if (options.parseImgDimensions && width && height) {
4741          globals.gDimensions[linkId] = {
4742            width:  width,
4743            height: height
4744          };
4745        }
4746      }
4747      // Completely remove the definition from the text
4748      return '';
4749    };
4750  
4751    // first we try to find base64 link references
4752    text = text.replace(base64Regex, replaceFunc);
4753  
4754    text = text.replace(regex, replaceFunc);
4755  
4756    // attacklab: strip sentinel
4757    text = text.replace(/¨0/, '');
4758  
4759    return text;
4760  });
4761  
4762  showdown.subParser('tables', function (text, options, globals) {
4763    'use strict';
4764  
4765    if (!options.tables) {
4766      return text;
4767    }
4768  
4769    var tableRgx       = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,
4770        //singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm;
4771        singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;
4772  
4773    function parseStyles (sLine) {
4774      if (/^:[ \t]*--*$/.test(sLine)) {
4775        return ' style="text-align:left;"';
4776      } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
4777        return ' style="text-align:right;"';
4778      } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
4779        return ' style="text-align:center;"';
4780      } else {
4781        return '';
4782      }
4783    }
4784  
4785    function parseHeaders (header, style) {
4786      var id = '';
4787      header = header.trim();
4788      // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility
4789      if (options.tablesHeaderId || options.tableHeaderId) {
4790        id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"';
4791      }
4792      header = showdown.subParser('spanGamut')(header, options, globals);
4793  
4794      return '<th' + id + style + '>' + header + '</th>\n';
4795    }
4796  
4797    function parseCells (cell, style) {
4798      var subText = showdown.subParser('spanGamut')(cell, options, globals);
4799      return '<td' + style + '>' + subText + '</td>\n';
4800    }
4801  
4802    function buildTable (headers, cells) {
4803      var tb = '<table>\n<thead>\n<tr>\n',
4804          tblLgn = headers.length;
4805  
4806      for (var i = 0; i < tblLgn; ++i) {
4807        tb += headers[i];
4808      }
4809      tb += '</tr>\n</thead>\n<tbody>\n';
4810  
4811      for (i = 0; i < cells.length; ++i) {
4812        tb += '<tr>\n';
4813        for (var ii = 0; ii < tblLgn; ++ii) {
4814          tb += cells[i][ii];
4815        }
4816        tb += '</tr>\n';
4817      }
4818      tb += '</tbody>\n</table>\n';
4819      return tb;
4820    }
4821  
4822    function parseTable (rawTable) {
4823      var i, tableLines = rawTable.split('\n');
4824  
4825      for (i = 0; i < tableLines.length; ++i) {
4826        // strip wrong first and last column if wrapped tables are used
4827        if (/^ {0,3}\|/.test(tableLines[i])) {
4828          tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, '');
4829        }
4830        if (/\|[ \t]*$/.test(tableLines[i])) {
4831          tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, '');
4832        }
4833        // parse code spans first, but we only support one line code spans
4834        tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);
4835      }
4836  
4837      var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),
4838          rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),
4839          rawCells = [],
4840          headers = [],
4841          styles = [],
4842          cells = [];
4843  
4844      tableLines.shift();
4845      tableLines.shift();
4846  
4847      for (i = 0; i < tableLines.length; ++i) {
4848        if (tableLines[i].trim() === '') {
4849          continue;
4850        }
4851        rawCells.push(
4852          tableLines[i]
4853            .split('|')
4854            .map(function (s) {
4855              return s.trim();
4856            })
4857        );
4858      }
4859  
4860      if (rawHeaders.length < rawStyles.length) {
4861        return rawTable;
4862      }
4863  
4864      for (i = 0; i < rawStyles.length; ++i) {
4865        styles.push(parseStyles(rawStyles[i]));
4866      }
4867  
4868      for (i = 0; i < rawHeaders.length; ++i) {
4869        if (showdown.helper.isUndefined(styles[i])) {
4870          styles[i] = '';
4871        }
4872        headers.push(parseHeaders(rawHeaders[i], styles[i]));
4873      }
4874  
4875      for (i = 0; i < rawCells.length; ++i) {
4876        var row = [];
4877        for (var ii = 0; ii < headers.length; ++ii) {
4878          if (showdown.helper.isUndefined(rawCells[i][ii])) {
4879  
4880          }
4881          row.push(parseCells(rawCells[i][ii], styles[ii]));
4882        }
4883        cells.push(row);
4884      }
4885  
4886      return buildTable(headers, cells);
4887    }
4888  
4889    text = globals.converter._dispatch('tables.before', text, options, globals);
4890  
4891    // find escaped pipe characters
4892    text = text.replace(/\\(\|)/g, showdown.helper.escapeCharactersCallback);
4893  
4894    // parse multi column tables
4895    text = text.replace(tableRgx, parseTable);
4896  
4897    // parse one column tables
4898    text = text.replace(singeColTblRgx, parseTable);
4899  
4900    text = globals.converter._dispatch('tables.after', text, options, globals);
4901  
4902    return text;
4903  });
4904  
4905  showdown.subParser('underline', function (text, options, globals) {
4906    'use strict';
4907  
4908    if (!options.underline) {
4909      return text;
4910    }
4911  
4912    text = globals.converter._dispatch('underline.before', text, options, globals);
4913  
4914    if (options.literalMidWordUnderscores) {
4915      text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
4916        return '<u>' + txt + '</u>';
4917      });
4918      text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
4919        return '<u>' + txt + '</u>';
4920      });
4921    } else {
4922      text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
4923        return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
4924      });
4925      text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
4926        return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
4927      });
4928    }
4929  
4930    // escape remaining underscores to prevent them being parsed by italic and bold
4931    text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);
4932  
4933    text = globals.converter._dispatch('underline.after', text, options, globals);
4934  
4935    return text;
4936  });
4937  
4938  /**
4939   * Swap back in all the special characters we've hidden.
4940   */
4941  showdown.subParser('unescapeSpecialChars', function (text, options, globals) {
4942    'use strict';
4943    text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);
4944  
4945    text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) {
4946      var charCodeToReplace = parseInt(m1);
4947      return String.fromCharCode(charCodeToReplace);
4948    });
4949  
4950    text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);
4951    return text;
4952  });
4953  
4954  showdown.subParser('makeMarkdown.blockquote', function (node, globals) {
4955    'use strict';
4956  
4957    var txt = '';
4958    if (node.hasChildNodes()) {
4959      var children = node.childNodes,
4960          childrenLength = children.length;
4961  
4962      for (var i = 0; i < childrenLength; ++i) {
4963        var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);
4964  
4965        if (innerTxt === '') {
4966          continue;
4967        }
4968        txt += innerTxt;
4969      }
4970    }
4971    // cleanup
4972    txt = txt.trim();
4973    txt = '> ' + txt.split('\n').join('\n> ');
4974    return txt;
4975  });
4976  
4977  showdown.subParser('makeMarkdown.codeBlock', function (node, globals) {
4978    'use strict';
4979  
4980    var lang = node.getAttribute('language'),
4981        num  = node.getAttribute('precodenum');
4982    return '```' + lang + '\n' + globals.preList[num] + '\n```';
4983  });
4984  
4985  showdown.subParser('makeMarkdown.codeSpan', function (node) {
4986    'use strict';
4987  
4988    return '`' + node.innerHTML + '`';
4989  });
4990  
4991  showdown.subParser('makeMarkdown.emphasis', function (node, globals) {
4992    'use strict';
4993  
4994    var txt = '';
4995    if (node.hasChildNodes()) {
4996      txt += '*';
4997      var children = node.childNodes,
4998          childrenLength = children.length;
4999      for (var i = 0; i < childrenLength; ++i) {
5000        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5001      }
5002      txt += '*';
5003    }
5004    return txt;
5005  });
5006  
5007  showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {
5008    'use strict';
5009  
5010    var headerMark = new Array(headerLevel + 1).join('#'),
5011        txt = '';
5012  
5013    if (node.hasChildNodes()) {
5014      txt = headerMark + ' ';
5015      var children = node.childNodes,
5016          childrenLength = children.length;
5017  
5018      for (var i = 0; i < childrenLength; ++i) {
5019        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5020      }
5021    }
5022    return txt;
5023  });
5024  
5025  showdown.subParser('makeMarkdown.hr', function () {
5026    'use strict';
5027  
5028    return '---';
5029  });
5030  
5031  showdown.subParser('makeMarkdown.image', function (node) {
5032    'use strict';
5033  
5034    var txt = '';
5035    if (node.hasAttribute('src')) {
5036      txt += '![' + node.getAttribute('alt') + '](';
5037      txt += '<' + node.getAttribute('src') + '>';
5038      if (node.hasAttribute('width') && node.hasAttribute('height')) {
5039        txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');
5040      }
5041  
5042      if (node.hasAttribute('title')) {
5043        txt += ' "' + node.getAttribute('title') + '"';
5044      }
5045      txt += ')';
5046    }
5047    return txt;
5048  });
5049  
5050  showdown.subParser('makeMarkdown.links', function (node, globals) {
5051    'use strict';
5052  
5053    var txt = '';
5054    if (node.hasChildNodes() && node.hasAttribute('href')) {
5055      var children = node.childNodes,
5056          childrenLength = children.length;
5057      txt = '[';
5058      for (var i = 0; i < childrenLength; ++i) {
5059        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5060      }
5061      txt += '](';
5062      txt += '<' + node.getAttribute('href') + '>';
5063      if (node.hasAttribute('title')) {
5064        txt += ' "' + node.getAttribute('title') + '"';
5065      }
5066      txt += ')';
5067    }
5068    return txt;
5069  });
5070  
5071  showdown.subParser('makeMarkdown.list', function (node, globals, type) {
5072    'use strict';
5073  
5074    var txt = '';
5075    if (!node.hasChildNodes()) {
5076      return '';
5077    }
5078    var listItems       = node.childNodes,
5079        listItemsLenght = listItems.length,
5080        listNum = node.getAttribute('start') || 1;
5081  
5082    for (var i = 0; i < listItemsLenght; ++i) {
5083      if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {
5084        continue;
5085      }
5086  
5087      // define the bullet to use in list
5088      var bullet = '';
5089      if (type === 'ol') {
5090        bullet = listNum.toString() + '. ';
5091      } else {
5092        bullet = '- ';
5093      }
5094  
5095      // parse list item
5096      txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);
5097      ++listNum;
5098    }
5099  
5100    // add comment at the end to prevent consecutive lists to be parsed as one
5101    txt += '\n<!-- -->\n';
5102    return txt.trim();
5103  });
5104  
5105  showdown.subParser('makeMarkdown.listItem', function (node, globals) {
5106    'use strict';
5107  
5108    var listItemTxt = '';
5109  
5110    var children = node.childNodes,
5111        childrenLenght = children.length;
5112  
5113    for (var i = 0; i < childrenLenght; ++i) {
5114      listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5115    }
5116    // if it's only one liner, we need to add a newline at the end
5117    if (!/\n$/.test(listItemTxt)) {
5118      listItemTxt += '\n';
5119    } else {
5120      // it's multiparagraph, so we need to indent
5121      listItemTxt = listItemTxt
5122        .split('\n')
5123        .join('\n    ')
5124        .replace(/^ {4}$/gm, '')
5125        .replace(/\n\n+/g, '\n\n');
5126    }
5127  
5128    return listItemTxt;
5129  });
5130  
5131  
5132  
5133  showdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {
5134    'use strict';
5135  
5136    spansOnly = spansOnly || false;
5137  
5138    var txt = '';
5139  
5140    // edge case of text without wrapper paragraph
5141    if (node.nodeType === 3) {
5142      return showdown.subParser('makeMarkdown.txt')(node, globals);
5143    }
5144  
5145    // HTML comment
5146    if (node.nodeType === 8) {
5147      return '<!--' + node.data + '-->\n\n';
5148    }
5149  
5150    // process only node elements
5151    if (node.nodeType !== 1) {
5152      return '';
5153    }
5154  
5155    var tagName = node.tagName.toLowerCase();
5156  
5157    switch (tagName) {
5158  
5159      //
5160      // BLOCKS
5161      //
5162      case 'h1':
5163        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\n\n'; }
5164        break;
5165      case 'h2':
5166        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\n\n'; }
5167        break;
5168      case 'h3':
5169        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\n\n'; }
5170        break;
5171      case 'h4':
5172        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\n\n'; }
5173        break;
5174      case 'h5':
5175        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\n\n'; }
5176        break;
5177      case 'h6':
5178        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\n\n'; }
5179        break;
5180  
5181      case 'p':
5182        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\n\n'; }
5183        break;
5184  
5185      case 'blockquote':
5186        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\n\n'; }
5187        break;
5188  
5189      case 'hr':
5190        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\n\n'; }
5191        break;
5192  
5193      case 'ol':
5194        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\n\n'; }
5195        break;
5196  
5197      case 'ul':
5198        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\n\n'; }
5199        break;
5200  
5201      case 'precode':
5202        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\n\n'; }
5203        break;
5204  
5205      case 'pre':
5206        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\n\n'; }
5207        break;
5208  
5209      case 'table':
5210        if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\n\n'; }
5211        break;
5212  
5213      //
5214      // SPANS
5215      //
5216      case 'code':
5217        txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);
5218        break;
5219  
5220      case 'em':
5221      case 'i':
5222        txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);
5223        break;
5224  
5225      case 'strong':
5226      case 'b':
5227        txt = showdown.subParser('makeMarkdown.strong')(node, globals);
5228        break;
5229  
5230      case 'del':
5231        txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);
5232        break;
5233  
5234      case 'a':
5235        txt = showdown.subParser('makeMarkdown.links')(node, globals);
5236        break;
5237  
5238      case 'img':
5239        txt = showdown.subParser('makeMarkdown.image')(node, globals);
5240        break;
5241  
5242      default:
5243        txt = node.outerHTML + '\n\n';
5244    }
5245  
5246    // common normalization
5247    // TODO eventually
5248  
5249    return txt;
5250  });
5251  
5252  showdown.subParser('makeMarkdown.paragraph', function (node, globals) {
5253    'use strict';
5254  
5255    var txt = '';
5256    if (node.hasChildNodes()) {
5257      var children = node.childNodes,
5258          childrenLength = children.length;
5259      for (var i = 0; i < childrenLength; ++i) {
5260        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5261      }
5262    }
5263  
5264    // some text normalization
5265    txt = txt.trim();
5266  
5267    return txt;
5268  });
5269  
5270  showdown.subParser('makeMarkdown.pre', function (node, globals) {
5271    'use strict';
5272  
5273    var num  = node.getAttribute('prenum');
5274    return '<pre>' + globals.preList[num] + '</pre>';
5275  });
5276  
5277  showdown.subParser('makeMarkdown.strikethrough', function (node, globals) {
5278    'use strict';
5279  
5280    var txt = '';
5281    if (node.hasChildNodes()) {
5282      txt += '~~';
5283      var children = node.childNodes,
5284          childrenLength = children.length;
5285      for (var i = 0; i < childrenLength; ++i) {
5286        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5287      }
5288      txt += '~~';
5289    }
5290    return txt;
5291  });
5292  
5293  showdown.subParser('makeMarkdown.strong', function (node, globals) {
5294    'use strict';
5295  
5296    var txt = '';
5297    if (node.hasChildNodes()) {
5298      txt += '**';
5299      var children = node.childNodes,
5300          childrenLength = children.length;
5301      for (var i = 0; i < childrenLength; ++i) {
5302        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
5303      }
5304      txt += '**';
5305    }
5306    return txt;
5307  });
5308  
5309  showdown.subParser('makeMarkdown.table', function (node, globals) {
5310    'use strict';
5311  
5312    var txt = '',
5313        tableArray = [[], []],
5314        headings   = node.querySelectorAll('thead>tr>th'),
5315        rows       = node.querySelectorAll('tbody>tr'),
5316        i, ii;
5317    for (i = 0; i < headings.length; ++i) {
5318      var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),
5319          allign = '---';
5320  
5321      if (headings[i].hasAttribute('style')) {
5322        var style = headings[i].getAttribute('style').toLowerCase().replace(/\s/g, '');
5323        switch (style) {
5324          case 'text-align:left;':
5325            allign = ':---';
5326            break;
5327          case 'text-align:right;':
5328            allign = '---:';
5329            break;
5330          case 'text-align:center;':
5331            allign = ':---:';
5332            break;
5333        }
5334      }
5335      tableArray[0][i] = headContent.trim();
5336      tableArray[1][i] = allign;
5337    }
5338  
5339    for (i = 0; i < rows.length; ++i) {
5340      var r = tableArray.push([]) - 1,
5341          cols = rows[i].getElementsByTagName('td');
5342  
5343      for (ii = 0; ii < headings.length; ++ii) {
5344        var cellContent = ' ';
5345        if (typeof cols[ii] !== 'undefined') {
5346          cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);
5347        }
5348        tableArray[r].push(cellContent);
5349      }
5350    }
5351  
5352    var cellSpacesCount = 3;
5353    for (i = 0; i < tableArray.length; ++i) {
5354      for (ii = 0; ii < tableArray[i].length; ++ii) {
5355        var strLen = tableArray[i][ii].length;
5356        if (strLen > cellSpacesCount) {
5357          cellSpacesCount = strLen;
5358        }
5359      }
5360    }
5361  
5362    for (i = 0; i < tableArray.length; ++i) {
5363      for (ii = 0; ii < tableArray[i].length; ++ii) {
5364        if (i === 1) {
5365          if (tableArray[i][ii].slice(-1) === ':') {
5366            tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';
5367          } else {
5368            tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');
5369          }
5370        } else {
5371          tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);
5372        }
5373      }
5374      txt += '| ' + tableArray[i].join(' | ') + ' |\n';
5375    }
5376  
5377    return txt.trim();
5378  });
5379  
5380  showdown.subParser('makeMarkdown.tableCell', function (node, globals) {
5381    'use strict';
5382  
5383    var txt = '';
5384    if (!node.hasChildNodes()) {
5385      return '';
5386    }
5387    var children = node.childNodes,
5388        childrenLength = children.length;
5389  
5390    for (var i = 0; i < childrenLength; ++i) {
5391      txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);
5392    }
5393    return txt.trim();
5394  });
5395  
5396  showdown.subParser('makeMarkdown.txt', function (node) {
5397    'use strict';
5398  
5399    var txt = node.nodeValue;
5400  
5401    // multiple spaces are collapsed
5402    txt = txt.replace(/ +/g, ' ');
5403  
5404    // replace the custom ¨NBSP; with a space
5405    txt = txt.replace(/¨NBSP;/g, ' ');
5406  
5407    // ", <, > and & should replace escaped html entities
5408    txt = showdown.helper.unescapeHTMLEntities(txt);
5409  
5410    // escape markdown magic characters
5411    // emphasis, strong and strikethrough - can appear everywhere
5412    // we also escape pipe (|) because of tables
5413    // and escape ` because of code blocks and spans
5414    txt = txt.replace(/([*_~|`])/g, '\\$1');
5415  
5416    // escape > because of blockquotes
5417    txt = txt.replace(/^(\s*)>/g, '\\$1>');
5418  
5419    // hash character, only troublesome at the beginning of a line because of headers
5420    txt = txt.replace(/^#/gm, '\\#');
5421  
5422    // horizontal rules
5423    txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, '$1\\$2$3');
5424  
5425    // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer
5426    txt = txt.replace(/^( {0,3}\d+)\./gm, '$1\\.');
5427  
5428    // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)
5429    txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\$2');
5430  
5431    // images and links, ] followed by ( is problematic, so we escape it
5432    txt = txt.replace(/]([\s]*)\(/g, '\\]$1\\(');
5433  
5434    // reference URIs must also be escaped
5435    txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:');
5436  
5437    return txt;
5438  });
5439  
5440  var root = this;
5441  
5442  // AMD Loader
5443  if (true) {
5444    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
5445      'use strict';
5446      return showdown;
5447    }).call(exports, __webpack_require__, exports, module),
5448                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
5449  
5450  // CommonJS/nodeJS Loader
5451  } else {}
5452  }).call(this);
5453  
5454  
5455  
5456  /***/ }),
5457  
5458  /***/ 29:
5459  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5460  
5461  "use strict";
5462  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
5463  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
5464  
5465  function _unsupportedIterableToArray(o, minLen) {
5466    if (!o) return;
5467    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
5468    var n = Object.prototype.toString.call(o).slice(8, -1);
5469    if (n === "Object" && o.constructor) n = o.constructor.name;
5470    if (n === "Map" || n === "Set") return Array.from(o);
5471    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
5472  }
5473  
5474  /***/ }),
5475  
5476  /***/ 31:
5477  /***/ (function(module, exports) {
5478  
5479  (function() { module.exports = this["wp"]["dom"]; }());
5480  
5481  /***/ }),
5482  
5483  /***/ 32:
5484  /***/ (function(module, exports) {
5485  
5486  (function() { module.exports = this["wp"]["hooks"]; }());
5487  
5488  /***/ }),
5489  
5490  /***/ 35:
5491  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5492  
5493  "use strict";
5494  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
5495  function _iterableToArray(iter) {
5496    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
5497  }
5498  
5499  /***/ }),
5500  
5501  /***/ 38:
5502  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5503  
5504  "use strict";
5505  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
5506  function _arrayWithHoles(arr) {
5507    if (Array.isArray(arr)) return arr;
5508  }
5509  
5510  /***/ }),
5511  
5512  /***/ 39:
5513  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5514  
5515  "use strict";
5516  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
5517  function _nonIterableRest() {
5518    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5519  }
5520  
5521  /***/ }),
5522  
5523  /***/ 4:
5524  /***/ (function(module, exports) {
5525  
5526  (function() { module.exports = this["wp"]["data"]; }());
5527  
5528  /***/ }),
5529  
5530  /***/ 42:
5531  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5532  
5533  "use strict";
5534  
5535  
5536  var LEAF_KEY, hasWeakMap;
5537  
5538  /**
5539   * Arbitrary value used as key for referencing cache object in WeakMap tree.
5540   *
5541   * @type {Object}
5542   */
5543  LEAF_KEY = {};
5544  
5545  /**
5546   * Whether environment supports WeakMap.
5547   *
5548   * @type {boolean}
5549   */
5550  hasWeakMap = typeof WeakMap !== 'undefined';
5551  
5552  /**
5553   * Returns the first argument as the sole entry in an array.
5554   *
5555   * @param {*} value Value to return.
5556   *
5557   * @return {Array} Value returned as entry in array.
5558   */
5559  function arrayOf( value ) {
5560      return [ value ];
5561  }
5562  
5563  /**
5564   * Returns true if the value passed is object-like, or false otherwise. A value
5565   * is object-like if it can support property assignment, e.g. object or array.
5566   *
5567   * @param {*} value Value to test.
5568   *
5569   * @return {boolean} Whether value is object-like.
5570   */
5571  function isObjectLike( value ) {
5572      return !! value && 'object' === typeof value;
5573  }
5574  
5575  /**
5576   * Creates and returns a new cache object.
5577   *
5578   * @return {Object} Cache object.
5579   */
5580  function createCache() {
5581      var cache = {
5582          clear: function() {
5583              cache.head = null;
5584          },
5585      };
5586  
5587      return cache;
5588  }
5589  
5590  /**
5591   * Returns true if entries within the two arrays are strictly equal by
5592   * reference from a starting index.
5593   *
5594   * @param {Array}  a         First array.
5595   * @param {Array}  b         Second array.
5596   * @param {number} fromIndex Index from which to start comparison.
5597   *
5598   * @return {boolean} Whether arrays are shallowly equal.
5599   */
5600  function isShallowEqual( a, b, fromIndex ) {
5601      var i;
5602  
5603      if ( a.length !== b.length ) {
5604          return false;
5605      }
5606  
5607      for ( i = fromIndex; i < a.length; i++ ) {
5608          if ( a[ i ] !== b[ i ] ) {
5609              return false;
5610          }
5611      }
5612  
5613      return true;
5614  }
5615  
5616  /**
5617   * Returns a memoized selector function. The getDependants function argument is
5618   * called before the memoized selector and is expected to return an immutable
5619   * reference or array of references on which the selector depends for computing
5620   * its own return value. The memoize cache is preserved only as long as those
5621   * dependant references remain the same. If getDependants returns a different
5622   * reference(s), the cache is cleared and the selector value regenerated.
5623   *
5624   * @param {Function} selector      Selector function.
5625   * @param {Function} getDependants Dependant getter returning an immutable
5626   *                                 reference or array of reference used in
5627   *                                 cache bust consideration.
5628   *
5629   * @return {Function} Memoized selector.
5630   */
5631  /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
5632      var rootCache, getCache;
5633  
5634      // Use object source as dependant if getter not provided
5635      if ( ! getDependants ) {
5636          getDependants = arrayOf;
5637      }
5638  
5639      /**
5640       * Returns the root cache. If WeakMap is supported, this is assigned to the
5641       * root WeakMap cache set, otherwise it is a shared instance of the default
5642       * cache object.
5643       *
5644       * @return {(WeakMap|Object)} Root cache object.
5645       */
5646  	function getRootCache() {
5647          return rootCache;
5648      }
5649  
5650      /**
5651       * Returns the cache for a given dependants array. When possible, a WeakMap
5652       * will be used to create a unique cache for each set of dependants. This
5653       * is feasible due to the nature of WeakMap in allowing garbage collection
5654       * to occur on entries where the key object is no longer referenced. Since
5655       * WeakMap requires the key to be an object, this is only possible when the
5656       * dependant is object-like. The root cache is created as a hierarchy where
5657       * each top-level key is the first entry in a dependants set, the value a
5658       * WeakMap where each key is the next dependant, and so on. This continues
5659       * so long as the dependants are object-like. If no dependants are object-
5660       * like, then the cache is shared across all invocations.
5661       *
5662       * @see isObjectLike
5663       *
5664       * @param {Array} dependants Selector dependants.
5665       *
5666       * @return {Object} Cache object.
5667       */
5668  	function getWeakMapCache( dependants ) {
5669          var caches = rootCache,
5670              isUniqueByDependants = true,
5671              i, dependant, map, cache;
5672  
5673          for ( i = 0; i < dependants.length; i++ ) {
5674              dependant = dependants[ i ];
5675  
5676              // Can only compose WeakMap from object-like key.
5677              if ( ! isObjectLike( dependant ) ) {
5678                  isUniqueByDependants = false;
5679                  break;
5680              }
5681  
5682              // Does current segment of cache already have a WeakMap?
5683              if ( caches.has( dependant ) ) {
5684                  // Traverse into nested WeakMap.
5685                  caches = caches.get( dependant );
5686              } else {
5687                  // Create, set, and traverse into a new one.
5688                  map = new WeakMap();
5689                  caches.set( dependant, map );
5690                  caches = map;
5691              }
5692          }
5693  
5694          // We use an arbitrary (but consistent) object as key for the last item
5695          // in the WeakMap to serve as our running cache.
5696          if ( ! caches.has( LEAF_KEY ) ) {
5697              cache = createCache();
5698              cache.isUniqueByDependants = isUniqueByDependants;
5699              caches.set( LEAF_KEY, cache );
5700          }
5701  
5702          return caches.get( LEAF_KEY );
5703      }
5704  
5705      // Assign cache handler by availability of WeakMap
5706      getCache = hasWeakMap ? getWeakMapCache : getRootCache;
5707  
5708      /**
5709       * Resets root memoization cache.
5710       */
5711  	function clear() {
5712          rootCache = hasWeakMap ? new WeakMap() : createCache();
5713      }
5714  
5715      // eslint-disable-next-line jsdoc/check-param-names
5716      /**
5717       * The augmented selector call, considering first whether dependants have
5718       * changed before passing it to underlying memoize function.
5719       *
5720       * @param {Object} source    Source object for derivation.
5721       * @param {...*}   extraArgs Additional arguments to pass to selector.
5722       *
5723       * @return {*} Selector result.
5724       */
5725  	function callSelector( /* source, ...extraArgs */ ) {
5726          var len = arguments.length,
5727              cache, node, i, args, dependants;
5728  
5729          // Create copy of arguments (avoid leaking deoptimization).
5730          args = new Array( len );
5731          for ( i = 0; i < len; i++ ) {
5732              args[ i ] = arguments[ i ];
5733          }
5734  
5735          dependants = getDependants.apply( null, args );
5736          cache = getCache( dependants );
5737  
5738          // If not guaranteed uniqueness by dependants (primitive type or lack
5739          // of WeakMap support), shallow compare against last dependants and, if
5740          // references have changed, destroy cache to recalculate result.
5741          if ( ! cache.isUniqueByDependants ) {
5742              if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
5743                  cache.clear();
5744              }
5745  
5746              cache.lastDependants = dependants;
5747          }
5748  
5749          node = cache.head;
5750          while ( node ) {
5751              // Check whether node arguments match arguments
5752              if ( ! isShallowEqual( node.args, args, 1 ) ) {
5753                  node = node.next;
5754                  continue;
5755              }
5756  
5757              // At this point we can assume we've found a match
5758  
5759              // Surface matched node to head if not already
5760              if ( node !== cache.head ) {
5761                  // Adjust siblings to point to each other.
5762                  node.prev.next = node.next;
5763                  if ( node.next ) {
5764                      node.next.prev = node.prev;
5765                  }
5766  
5767                  node.next = cache.head;
5768                  node.prev = null;
5769                  cache.head.prev = node;
5770                  cache.head = node;
5771              }
5772  
5773              // Return immediately
5774              return node.val;
5775          }
5776  
5777          // No cached value found. Continue to insertion phase:
5778  
5779          node = {
5780              // Generate the result from original function
5781              val: selector.apply( null, args ),
5782          };
5783  
5784          // Avoid including the source object in the cache.
5785          args[ 0 ] = null;
5786          node.args = args;
5787  
5788          // Don't need to check whether node is already head, since it would
5789          // have been returned above already if it was
5790  
5791          // Shift existing head down list
5792          if ( cache.head ) {
5793              cache.head.prev = node;
5794              node.next = cache.head;
5795          }
5796  
5797          cache.head = node;
5798  
5799          return node.val;
5800      }
5801  
5802      callSelector.getDependants = getDependants;
5803      callSelector.clear = clear;
5804      clear();
5805  
5806      return callSelector;
5807  });
5808  
5809  
5810  /***/ }),
5811  
5812  /***/ 437:
5813  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5814  
5815  "use strict";
5816  // ESM COMPAT FLAG
5817  __webpack_require__.r(__webpack_exports__);
5818  
5819  // EXPORTS
5820  __webpack_require__.d(__webpack_exports__, "createBlock", function() { return /* reexport */ createBlock; });
5821  __webpack_require__.d(__webpack_exports__, "cloneBlock", function() { return /* reexport */ cloneBlock; });
5822  __webpack_require__.d(__webpack_exports__, "getPossibleBlockTransformations", function() { return /* reexport */ getPossibleBlockTransformations; });
5823  __webpack_require__.d(__webpack_exports__, "switchToBlockType", function() { return /* reexport */ switchToBlockType; });
5824  __webpack_require__.d(__webpack_exports__, "getBlockTransforms", function() { return /* reexport */ getBlockTransforms; });
5825  __webpack_require__.d(__webpack_exports__, "findTransform", function() { return /* reexport */ findTransform; });
5826  __webpack_require__.d(__webpack_exports__, "getBlockFromExample", function() { return /* reexport */ factory_getBlockFromExample; });
5827  __webpack_require__.d(__webpack_exports__, "parse", function() { return /* reexport */ parser; });
5828  __webpack_require__.d(__webpack_exports__, "getBlockAttributes", function() { return /* reexport */ getBlockAttributes; });
5829  __webpack_require__.d(__webpack_exports__, "parseWithAttributeSchema", function() { return /* reexport */ parseWithAttributeSchema; });
5830  __webpack_require__.d(__webpack_exports__, "pasteHandler", function() { return /* reexport */ pasteHandler; });
5831  __webpack_require__.d(__webpack_exports__, "rawHandler", function() { return /* reexport */ rawHandler; });
5832  __webpack_require__.d(__webpack_exports__, "getPhrasingContentSchema", function() { return /* reexport */ getPhrasingContentSchema; });
5833  __webpack_require__.d(__webpack_exports__, "serialize", function() { return /* reexport */ serialize; });
5834  __webpack_require__.d(__webpack_exports__, "getBlockContent", function() { return /* reexport */ getBlockContent; });
5835  __webpack_require__.d(__webpack_exports__, "getBlockDefaultClassName", function() { return /* reexport */ getBlockDefaultClassName; });
5836  __webpack_require__.d(__webpack_exports__, "getBlockMenuDefaultClassName", function() { return /* reexport */ getBlockMenuDefaultClassName; });
5837  __webpack_require__.d(__webpack_exports__, "getSaveElement", function() { return /* reexport */ getSaveElement; });
5838  __webpack_require__.d(__webpack_exports__, "getSaveContent", function() { return /* reexport */ getSaveContent; });
5839  __webpack_require__.d(__webpack_exports__, "isValidBlockContent", function() { return /* reexport */ isValidBlockContent; });
5840  __webpack_require__.d(__webpack_exports__, "getCategories", function() { return /* reexport */ categories_getCategories; });
5841  __webpack_require__.d(__webpack_exports__, "setCategories", function() { return /* reexport */ categories_setCategories; });
5842  __webpack_require__.d(__webpack_exports__, "updateCategory", function() { return /* reexport */ categories_updateCategory; });
5843  __webpack_require__.d(__webpack_exports__, "registerBlockType", function() { return /* reexport */ registerBlockType; });
5844  __webpack_require__.d(__webpack_exports__, "registerBlockCollection", function() { return /* reexport */ registerBlockCollection; });
5845  __webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return /* reexport */ unregisterBlockType; });
5846  __webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return /* reexport */ setFreeformContentHandlerName; });
5847  __webpack_require__.d(__webpack_exports__, "getFreeformContentHandlerName", function() { return /* reexport */ getFreeformContentHandlerName; });
5848  __webpack_require__.d(__webpack_exports__, "setUnregisteredTypeHandlerName", function() { return /* reexport */ setUnregisteredTypeHandlerName; });
5849  __webpack_require__.d(__webpack_exports__, "getUnregisteredTypeHandlerName", function() { return /* reexport */ getUnregisteredTypeHandlerName; });
5850  __webpack_require__.d(__webpack_exports__, "setDefaultBlockName", function() { return /* reexport */ registration_setDefaultBlockName; });
5851  __webpack_require__.d(__webpack_exports__, "getDefaultBlockName", function() { return /* reexport */ registration_getDefaultBlockName; });
5852  __webpack_require__.d(__webpack_exports__, "setGroupingBlockName", function() { return /* reexport */ registration_setGroupingBlockName; });
5853  __webpack_require__.d(__webpack_exports__, "getGroupingBlockName", function() { return /* reexport */ registration_getGroupingBlockName; });
5854  __webpack_require__.d(__webpack_exports__, "getBlockType", function() { return /* reexport */ registration_getBlockType; });
5855  __webpack_require__.d(__webpack_exports__, "getBlockTypes", function() { return /* reexport */ registration_getBlockTypes; });
5856  __webpack_require__.d(__webpack_exports__, "getBlockSupport", function() { return /* reexport */ registration_getBlockSupport; });
5857  __webpack_require__.d(__webpack_exports__, "hasBlockSupport", function() { return /* reexport */ registration_hasBlockSupport; });
5858  __webpack_require__.d(__webpack_exports__, "isReusableBlock", function() { return /* reexport */ isReusableBlock; });
5859  __webpack_require__.d(__webpack_exports__, "getChildBlockNames", function() { return /* reexport */ registration_getChildBlockNames; });
5860  __webpack_require__.d(__webpack_exports__, "hasChildBlocks", function() { return /* reexport */ registration_hasChildBlocks; });
5861  __webpack_require__.d(__webpack_exports__, "hasChildBlocksWithInserterSupport", function() { return /* reexport */ registration_hasChildBlocksWithInserterSupport; });
5862  __webpack_require__.d(__webpack_exports__, "unstable__bootstrapServerSideBlockDefinitions", function() { return /* reexport */ unstable__bootstrapServerSideBlockDefinitions; });
5863  __webpack_require__.d(__webpack_exports__, "registerBlockStyle", function() { return /* reexport */ registration_registerBlockStyle; });
5864  __webpack_require__.d(__webpack_exports__, "unregisterBlockStyle", function() { return /* reexport */ registration_unregisterBlockStyle; });
5865  __webpack_require__.d(__webpack_exports__, "registerBlockVariation", function() { return /* reexport */ registration_registerBlockVariation; });
5866  __webpack_require__.d(__webpack_exports__, "unregisterBlockVariation", function() { return /* reexport */ registration_unregisterBlockVariation; });
5867  __webpack_require__.d(__webpack_exports__, "isUnmodifiedDefaultBlock", function() { return /* reexport */ isUnmodifiedDefaultBlock; });
5868  __webpack_require__.d(__webpack_exports__, "normalizeIconObject", function() { return /* reexport */ normalizeIconObject; });
5869  __webpack_require__.d(__webpack_exports__, "isValidIcon", function() { return /* reexport */ isValidIcon; });
5870  __webpack_require__.d(__webpack_exports__, "__experimentalGetBlockLabel", function() { return /* reexport */ getBlockLabel; });
5871  __webpack_require__.d(__webpack_exports__, "__experimentalGetAccessibleBlockLabel", function() { return /* reexport */ getAccessibleBlockLabel; });
5872  __webpack_require__.d(__webpack_exports__, "doBlocksMatchTemplate", function() { return /* reexport */ doBlocksMatchTemplate; });
5873  __webpack_require__.d(__webpack_exports__, "synchronizeBlocksWithTemplate", function() { return /* reexport */ synchronizeBlocksWithTemplate; });
5874  __webpack_require__.d(__webpack_exports__, "children", function() { return /* reexport */ api_children; });
5875  __webpack_require__.d(__webpack_exports__, "node", function() { return /* reexport */ api_node; });
5876  __webpack_require__.d(__webpack_exports__, "withBlockContentContext", function() { return /* reexport */ withBlockContentContext; });
5877  
5878  // NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/selectors.js
5879  var selectors_namespaceObject = {};
5880  __webpack_require__.r(selectors_namespaceObject);
5881  __webpack_require__.d(selectors_namespaceObject, "getBlockTypes", function() { return getBlockTypes; });
5882  __webpack_require__.d(selectors_namespaceObject, "getBlockType", function() { return getBlockType; });
5883  __webpack_require__.d(selectors_namespaceObject, "getBlockStyles", function() { return getBlockStyles; });
5884  __webpack_require__.d(selectors_namespaceObject, "getBlockVariations", function() { return getBlockVariations; });
5885  __webpack_require__.d(selectors_namespaceObject, "getDefaultBlockVariation", function() { return getDefaultBlockVariation; });
5886  __webpack_require__.d(selectors_namespaceObject, "getCategories", function() { return getCategories; });
5887  __webpack_require__.d(selectors_namespaceObject, "getCollections", function() { return getCollections; });
5888  __webpack_require__.d(selectors_namespaceObject, "getDefaultBlockName", function() { return getDefaultBlockName; });
5889  __webpack_require__.d(selectors_namespaceObject, "getFreeformFallbackBlockName", function() { return getFreeformFallbackBlockName; });
5890  __webpack_require__.d(selectors_namespaceObject, "getUnregisteredFallbackBlockName", function() { return getUnregisteredFallbackBlockName; });
5891  __webpack_require__.d(selectors_namespaceObject, "getGroupingBlockName", function() { return getGroupingBlockName; });
5892  __webpack_require__.d(selectors_namespaceObject, "getChildBlockNames", function() { return selectors_getChildBlockNames; });
5893  __webpack_require__.d(selectors_namespaceObject, "getBlockSupport", function() { return selectors_getBlockSupport; });
5894  __webpack_require__.d(selectors_namespaceObject, "hasBlockSupport", function() { return hasBlockSupport; });
5895  __webpack_require__.d(selectors_namespaceObject, "isMatchingSearchTerm", function() { return isMatchingSearchTerm; });
5896  __webpack_require__.d(selectors_namespaceObject, "hasChildBlocks", function() { return selectors_hasChildBlocks; });
5897  __webpack_require__.d(selectors_namespaceObject, "hasChildBlocksWithInserterSupport", function() { return selectors_hasChildBlocksWithInserterSupport; });
5898  
5899  // NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/actions.js
5900  var actions_namespaceObject = {};
5901  __webpack_require__.r(actions_namespaceObject);
5902  __webpack_require__.d(actions_namespaceObject, "addBlockTypes", function() { return addBlockTypes; });
5903  __webpack_require__.d(actions_namespaceObject, "removeBlockTypes", function() { return removeBlockTypes; });
5904  __webpack_require__.d(actions_namespaceObject, "addBlockStyles", function() { return addBlockStyles; });
5905  __webpack_require__.d(actions_namespaceObject, "removeBlockStyles", function() { return removeBlockStyles; });
5906  __webpack_require__.d(actions_namespaceObject, "addBlockVariations", function() { return addBlockVariations; });
5907  __webpack_require__.d(actions_namespaceObject, "removeBlockVariations", function() { return removeBlockVariations; });
5908  __webpack_require__.d(actions_namespaceObject, "setDefaultBlockName", function() { return setDefaultBlockName; });
5909  __webpack_require__.d(actions_namespaceObject, "setFreeformFallbackBlockName", function() { return setFreeformFallbackBlockName; });
5910  __webpack_require__.d(actions_namespaceObject, "setUnregisteredFallbackBlockName", function() { return setUnregisteredFallbackBlockName; });
5911  __webpack_require__.d(actions_namespaceObject, "setGroupingBlockName", function() { return setGroupingBlockName; });
5912  __webpack_require__.d(actions_namespaceObject, "setCategories", function() { return setCategories; });
5913  __webpack_require__.d(actions_namespaceObject, "updateCategory", function() { return updateCategory; });
5914  __webpack_require__.d(actions_namespaceObject, "addBlockCollection", function() { return addBlockCollection; });
5915  __webpack_require__.d(actions_namespaceObject, "removeBlockCollection", function() { return removeBlockCollection; });
5916  
5917  // EXTERNAL MODULE: external {"this":["wp","data"]}
5918  var external_this_wp_data_ = __webpack_require__(4);
5919  
5920  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
5921  var toConsumableArray = __webpack_require__(17);
5922  
5923  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
5924  var defineProperty = __webpack_require__(5);
5925  
5926  // EXTERNAL MODULE: external {"this":"lodash"}
5927  var external_this_lodash_ = __webpack_require__(2);
5928  
5929  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
5930  var external_this_wp_i18n_ = __webpack_require__(1);
5931  
5932  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/reducer.js
5933  
5934  
5935  
5936  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5937  
5938  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5939  
5940  /**
5941   * External dependencies
5942   */
5943  
5944  /**
5945   * WordPress dependencies
5946   */
5947  
5948  
5949  
5950  /**
5951   * @typedef {Object} WPBlockCategory
5952   *
5953   * @property {string} slug  Unique category slug.
5954   * @property {string} title Category label, for display in user interface.
5955   */
5956  
5957  /**
5958   * Default set of categories.
5959   *
5960   * @type {WPBlockCategory[]}
5961   */
5962  
5963  var DEFAULT_CATEGORIES = [{
5964    slug: 'text',
5965    title: Object(external_this_wp_i18n_["__"])('Text')
5966  }, {
5967    slug: 'media',
5968    title: Object(external_this_wp_i18n_["__"])('Media')
5969  }, {
5970    slug: 'design',
5971    title: Object(external_this_wp_i18n_["__"])('Design')
5972  }, {
5973    slug: 'widgets',
5974    title: Object(external_this_wp_i18n_["__"])('Widgets')
5975  }, {
5976    slug: 'embed',
5977    title: Object(external_this_wp_i18n_["__"])('Embeds')
5978  }, {
5979    slug: 'reusable',
5980    title: Object(external_this_wp_i18n_["__"])('Reusable blocks')
5981  }];
5982  /**
5983   * Reducer managing the block types
5984   *
5985   * @param {Object} state  Current state.
5986   * @param {Object} action Dispatched action.
5987   *
5988   * @return {Object} Updated state.
5989   */
5990  
5991  function reducer_blockTypes() {
5992    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5993    var action = arguments.length > 1 ? arguments[1] : undefined;
5994  
5995    switch (action.type) {
5996      case 'ADD_BLOCK_TYPES':
5997        return _objectSpread({}, state, {}, Object(external_this_lodash_["keyBy"])(Object(external_this_lodash_["map"])(action.blockTypes, function (blockType) {
5998          return Object(external_this_lodash_["omit"])(blockType, 'styles ');
5999        }), 'name'));
6000  
6001      case 'REMOVE_BLOCK_TYPES':
6002        return Object(external_this_lodash_["omit"])(state, action.names);
6003    }
6004  
6005    return state;
6006  }
6007  /**
6008   * Reducer managing the block style variations.
6009   *
6010   * @param {Object} state  Current state.
6011   * @param {Object} action Dispatched action.
6012   *
6013   * @return {Object} Updated state.
6014   */
6015  
6016  function blockStyles() {
6017    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6018    var action = arguments.length > 1 ? arguments[1] : undefined;
6019  
6020    switch (action.type) {
6021      case 'ADD_BLOCK_TYPES':
6022        return _objectSpread({}, state, {}, Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["keyBy"])(action.blockTypes, 'name'), function (blockType) {
6023          return Object(external_this_lodash_["uniqBy"])([].concat(Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["get"])(blockType, ['styles'], [])), Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["get"])(state, [blockType.name], []))), function (style) {
6024            return style.name;
6025          });
6026        }));
6027  
6028      case 'ADD_BLOCK_STYLES':
6029        return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.blockName, Object(external_this_lodash_["uniqBy"])([].concat(Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["get"])(state, [action.blockName], [])), Object(toConsumableArray["a" /* default */])(action.styles)), function (style) {
6030          return style.name;
6031        })));
6032  
6033      case 'REMOVE_BLOCK_STYLES':
6034        return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.blockName, Object(external_this_lodash_["filter"])(Object(external_this_lodash_["get"])(state, [action.blockName], []), function (style) {
6035          return action.styleNames.indexOf(style.name) === -1;
6036        })));
6037    }
6038  
6039    return state;
6040  }
6041  /**
6042   * Reducer managing the block variations.
6043   *
6044   * @param {Object} state  Current state.
6045   * @param {Object} action Dispatched action.
6046   *
6047   * @return {Object} Updated state.
6048   */
6049  
6050  function blockVariations() {
6051    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6052    var action = arguments.length > 1 ? arguments[1] : undefined;
6053  
6054    switch (action.type) {
6055      case 'ADD_BLOCK_TYPES':
6056        return _objectSpread({}, state, {}, Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["keyBy"])(action.blockTypes, 'name'), function (blockType) {
6057          return Object(external_this_lodash_["uniqBy"])([].concat(Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["get"])(blockType, ['variations'], [])), Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["get"])(state, [blockType.name], []))), function (variation) {
6058            return variation.name;
6059          });
6060        }));
6061  
6062      case 'ADD_BLOCK_VARIATIONS':
6063        return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.blockName, Object(external_this_lodash_["uniqBy"])([].concat(Object(toConsumableArray["a" /* default */])(Object(external_this_lodash_["get"])(state, [action.blockName], [])), Object(toConsumableArray["a" /* default */])(action.variations)), function (variation) {
6064          return variation.name;
6065        })));
6066  
6067      case 'REMOVE_BLOCK_VARIATIONS':
6068        return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.blockName, Object(external_this_lodash_["filter"])(Object(external_this_lodash_["get"])(state, [action.blockName], []), function (variation) {
6069          return action.variationNames.indexOf(variation.name) === -1;
6070        })));
6071    }
6072  
6073    return state;
6074  }
6075  /**
6076   * Higher-order Reducer creating a reducer keeping track of given block name.
6077   *
6078   * @param {string} setActionType  Action type.
6079   *
6080   * @return {Function} Reducer.
6081   */
6082  
6083  function createBlockNameSetterReducer(setActionType) {
6084    return function () {
6085      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
6086      var action = arguments.length > 1 ? arguments[1] : undefined;
6087  
6088      switch (action.type) {
6089        case 'REMOVE_BLOCK_TYPES':
6090          if (action.names.indexOf(state) !== -1) {
6091            return null;
6092          }
6093  
6094          return state;
6095  
6096        case setActionType:
6097          return action.name || null;
6098      }
6099  
6100      return state;
6101    };
6102  }
6103  var reducer_defaultBlockName = createBlockNameSetterReducer('SET_DEFAULT_BLOCK_NAME');
6104  var freeformFallbackBlockName = createBlockNameSetterReducer('SET_FREEFORM_FALLBACK_BLOCK_NAME');
6105  var unregisteredFallbackBlockName = createBlockNameSetterReducer('SET_UNREGISTERED_FALLBACK_BLOCK_NAME');
6106  var groupingBlockName = createBlockNameSetterReducer('SET_GROUPING_BLOCK_NAME');
6107  /**
6108   * Reducer managing the categories
6109   *
6110   * @param {WPBlockCategory[]} state  Current state.
6111   * @param {Object}            action Dispatched action.
6112   *
6113   * @return {WPBlockCategory[]} Updated state.
6114   */
6115  
6116  function reducer_categories() {
6117    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_CATEGORIES;
6118    var action = arguments.length > 1 ? arguments[1] : undefined;
6119  
6120    switch (action.type) {
6121      case 'SET_CATEGORIES':
6122        return action.categories || [];
6123  
6124      case 'UPDATE_CATEGORY':
6125        {
6126          if (!action.category || Object(external_this_lodash_["isEmpty"])(action.category)) {
6127            return state;
6128          }
6129  
6130          var categoryToChange = Object(external_this_lodash_["find"])(state, ['slug', action.slug]);
6131  
6132          if (categoryToChange) {
6133            return Object(external_this_lodash_["map"])(state, function (category) {
6134              if (category.slug === action.slug) {
6135                return _objectSpread({}, category, {}, action.category);
6136              }
6137  
6138              return category;
6139            });
6140          }
6141        }
6142    }
6143  
6144    return state;
6145  }
6146  function collections() {
6147    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6148    var action = arguments.length > 1 ? arguments[1] : undefined;
6149  
6150    switch (action.type) {
6151      case 'ADD_BLOCK_COLLECTION':
6152        return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.namespace, {
6153          title: action.title,
6154          icon: action.icon
6155        }));
6156  
6157      case 'REMOVE_BLOCK_COLLECTION':
6158        return Object(external_this_lodash_["omit"])(state, action.namespace);
6159    }
6160  
6161    return state;
6162  }
6163  /* harmony default export */ var reducer = (Object(external_this_wp_data_["combineReducers"])({
6164    blockTypes: reducer_blockTypes,
6165    blockStyles: blockStyles,
6166    blockVariations: blockVariations,
6167    defaultBlockName: reducer_defaultBlockName,
6168    freeformFallbackBlockName: freeformFallbackBlockName,
6169    unregisteredFallbackBlockName: unregisteredFallbackBlockName,
6170    groupingBlockName: groupingBlockName,
6171    categories: reducer_categories,
6172    collections: collections
6173  }));
6174  
6175  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
6176  var rememo = __webpack_require__(42);
6177  
6178  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/selectors.js
6179  
6180  
6181  
6182  function selectors_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6183  
6184  function selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { selectors_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6185  
6186  /**
6187   * External dependencies
6188   */
6189  
6190  
6191  /** @typedef {import('../api/registration').WPBlockVariation} WPBlockVariation */
6192  
6193  /** @typedef {import('../api/registration').WPBlockVariationScope} WPBlockVariationScope */
6194  
6195  /** @typedef {import('./reducer').WPBlockCategory} WPBlockCategory */
6196  
6197  /**
6198   * Given a block name or block type object, returns the corresponding
6199   * normalized block type object.
6200   *
6201   * @param {Object}          state      Blocks state.
6202   * @param {(string|Object)} nameOrType Block name or type object
6203   *
6204   * @return {Object} Block type object.
6205   */
6206  
6207  var getNormalizedBlockType = function getNormalizedBlockType(state, nameOrType) {
6208    return 'string' === typeof nameOrType ? getBlockType(state, nameOrType) : nameOrType;
6209  };
6210  /**
6211   * Returns all the available block types.
6212   *
6213   * @param {Object} state Data state.
6214   *
6215   * @return {Array} Block Types.
6216   */
6217  
6218  
6219  var getBlockTypes = Object(rememo["a" /* default */])(function (state) {
6220    return Object.values(state.blockTypes).map(function (blockType) {
6221      return selectors_objectSpread({}, blockType, {
6222        variations: getBlockVariations(state, blockType.name)
6223      });
6224    });
6225  }, function (state) {
6226    return [state.blockTypes, state.blockVariations];
6227  });
6228  /**
6229   * Returns a block type by name.
6230   *
6231   * @param {Object} state Data state.
6232   * @param {string} name Block type name.
6233   *
6234   * @return {Object?} Block Type.
6235   */
6236  
6237  function getBlockType(state, name) {
6238    return state.blockTypes[name];
6239  }
6240  /**
6241   * Returns block styles by block name.
6242   *
6243   * @param {Object} state Data state.
6244   * @param {string} name  Block type name.
6245   *
6246   * @return {Array?} Block Styles.
6247   */
6248  
6249  function getBlockStyles(state, name) {
6250    return state.blockStyles[name];
6251  }
6252  /**
6253   * Returns block variations by block name.
6254   *
6255   * @param {Object}                state     Data state.
6256   * @param {string}                blockName Block type name.
6257   * @param {WPBlockVariationScope} [scope]   Block variation scope name.
6258   *
6259   * @return {(WPBlockVariation[]|void)} Block variations.
6260   */
6261  
6262  function getBlockVariations(state, blockName, scope) {
6263    var variations = state.blockVariations[blockName];
6264  
6265    if (!variations || !scope) {
6266      return variations;
6267    }
6268  
6269    return variations.filter(function (variation) {
6270      return !variation.scope || variation.scope.includes(scope);
6271    });
6272  }
6273  /**
6274   * Returns the default block variation for the given block type.
6275   * When there are multiple variations annotated as the default one,
6276   * the last added item is picked. This simplifies registering overrides.
6277   * When there is no default variation set, it returns the first item.
6278   *
6279   * @param {Object}                state     Data state.
6280   * @param {string}                blockName Block type name.
6281   * @param {WPBlockVariationScope} [scope]   Block variation scope name.
6282   *
6283   * @return {?WPBlockVariation} The default block variation.
6284   */
6285  
6286  function getDefaultBlockVariation(state, blockName, scope) {
6287    var variations = getBlockVariations(state, blockName, scope);
6288    return Object(external_this_lodash_["findLast"])(variations, 'isDefault') || Object(external_this_lodash_["first"])(variations);
6289  }
6290  /**
6291   * Returns all the available categories.
6292   *
6293   * @param {Object} state Data state.
6294   *
6295   * @return {WPBlockCategory[]} Categories list.
6296   */
6297  
6298  function getCategories(state) {
6299    return state.categories;
6300  }
6301  /**
6302   * Returns all the available collections.
6303   *
6304   * @param {Object} state Data state.
6305   *
6306   * @return {Object} Collections list.
6307   */
6308  
6309  function getCollections(state) {
6310    return state.collections;
6311  }
6312  /**
6313   * Returns the name of the default block name.
6314   *
6315   * @param {Object} state Data state.
6316   *
6317   * @return {string?} Default block name.
6318   */
6319  
6320  function getDefaultBlockName(state) {
6321    return state.defaultBlockName;
6322  }
6323  /**
6324   * Returns the name of the block for handling non-block content.
6325   *
6326   * @param {Object} state Data state.
6327   *
6328   * @return {string?} Name of the block for handling non-block content.
6329   */
6330  
6331  function getFreeformFallbackBlockName(state) {
6332    return state.freeformFallbackBlockName;
6333  }
6334  /**
6335   * Returns the name of the block for handling unregistered blocks.
6336   *
6337   * @param {Object} state Data state.
6338   *
6339   * @return {string?} Name of the block for handling unregistered blocks.
6340   */
6341  
6342  function getUnregisteredFallbackBlockName(state) {
6343    return state.unregisteredFallbackBlockName;
6344  }
6345  /**
6346   * Returns the name of the block for handling unregistered blocks.
6347   *
6348   * @param {Object} state Data state.
6349   *
6350   * @return {string?} Name of the block for handling unregistered blocks.
6351   */
6352  
6353  function getGroupingBlockName(state) {
6354    return state.groupingBlockName;
6355  }
6356  /**
6357   * Returns an array with the child blocks of a given block.
6358   *
6359   * @param {Object} state     Data state.
6360   * @param {string} blockName Block type name.
6361   *
6362   * @return {Array} Array of child block names.
6363   */
6364  
6365  var selectors_getChildBlockNames = Object(rememo["a" /* default */])(function (state, blockName) {
6366    return Object(external_this_lodash_["map"])(Object(external_this_lodash_["filter"])(state.blockTypes, function (blockType) {
6367      return Object(external_this_lodash_["includes"])(blockType.parent, blockName);
6368    }), function (_ref) {
6369      var name = _ref.name;
6370      return name;
6371    });
6372  }, function (state) {
6373    return [state.blockTypes];
6374  });
6375  /**
6376   * Returns the block support value for a feature, if defined.
6377   *
6378   * @param  {Object}          state           Data state.
6379   * @param  {(string|Object)} nameOrType      Block name or type object
6380   * @param  {string}          feature         Feature to retrieve
6381   * @param  {*}               defaultSupports Default value to return if not
6382   *                                           explicitly defined
6383   *
6384   * @return {?*} Block support value
6385   */
6386  
6387  var selectors_getBlockSupport = function getBlockSupport(state, nameOrType, feature, defaultSupports) {
6388    var blockType = getNormalizedBlockType(state, nameOrType);
6389    return Object(external_this_lodash_["get"])(blockType, ['supports'].concat(Object(toConsumableArray["a" /* default */])(feature.split('.'))), defaultSupports);
6390  };
6391  /**
6392   * Returns true if the block defines support for a feature, or false otherwise.
6393   *
6394   * @param  {Object}         state           Data state.
6395   * @param {(string|Object)} nameOrType      Block name or type object.
6396   * @param {string}          feature         Feature to test.
6397   * @param {boolean}         defaultSupports Whether feature is supported by
6398   *                                          default if not explicitly defined.
6399   *
6400   * @return {boolean} Whether block supports feature.
6401   */
6402  
6403  function hasBlockSupport(state, nameOrType, feature, defaultSupports) {
6404    return !!selectors_getBlockSupport(state, nameOrType, feature, defaultSupports);
6405  }
6406  /**
6407   * Returns true if the block type by the given name or object value matches a
6408   * search term, or false otherwise.
6409   *
6410   * @param {Object}          state      Blocks state.
6411   * @param {(string|Object)} nameOrType Block name or type object.
6412   * @param {string}          searchTerm Search term by which to filter.
6413   *
6414   * @return {Object[]} Whether block type matches search term.
6415   */
6416  
6417  function isMatchingSearchTerm(state, nameOrType, searchTerm) {
6418    var blockType = getNormalizedBlockType(state, nameOrType);
6419    var getNormalizedSearchTerm = Object(external_this_lodash_["flow"])([// Disregard diacritics.
6420    //  Input: "média"
6421    external_this_lodash_["deburr"], // Lowercase.
6422    //  Input: "MEDIA"
6423    function (term) {
6424      return term.toLowerCase();
6425    }, // Strip leading and trailing whitespace.
6426    //  Input: " media "
6427    function (term) {
6428      return term.trim();
6429    }]);
6430    var normalizedSearchTerm = getNormalizedSearchTerm(searchTerm);
6431    var isSearchMatch = Object(external_this_lodash_["flow"])([getNormalizedSearchTerm, function (normalizedCandidate) {
6432      return Object(external_this_lodash_["includes"])(normalizedCandidate, normalizedSearchTerm);
6433    }]);
6434    return isSearchMatch(blockType.title) || Object(external_this_lodash_["some"])(blockType.keywords, isSearchMatch) || isSearchMatch(blockType.category);
6435  }
6436  /**
6437   * Returns a boolean indicating if a block has child blocks or not.
6438   *
6439   * @param {Object} state     Data state.
6440   * @param {string} blockName Block type name.
6441   *
6442   * @return {boolean} True if a block contains child blocks and false otherwise.
6443   */
6444  
6445  var selectors_hasChildBlocks = function hasChildBlocks(state, blockName) {
6446    return selectors_getChildBlockNames(state, blockName).length > 0;
6447  };
6448  /**
6449   * Returns a boolean indicating if a block has at least one child block with inserter support.
6450   *
6451   * @param {Object} state     Data state.
6452   * @param {string} blockName Block type name.
6453   *
6454   * @return {boolean} True if a block contains at least one child blocks with inserter support
6455   *                   and false otherwise.
6456   */
6457  
6458  var selectors_hasChildBlocksWithInserterSupport = function hasChildBlocksWithInserterSupport(state, blockName) {
6459    return Object(external_this_lodash_["some"])(selectors_getChildBlockNames(state, blockName), function (childBlockName) {
6460      return hasBlockSupport(state, childBlockName, 'inserter', true);
6461    });
6462  };
6463  
6464  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/actions.js
6465  /**
6466   * External dependencies
6467   */
6468  
6469  /** @typedef {import('../api/registration').WPBlockVariation} WPBlockVariation */
6470  
6471  /**
6472   * Returns an action object used in signalling that block types have been added.
6473   *
6474   * @param {Array|Object} blockTypes Block types received.
6475   *
6476   * @return {Object} Action object.
6477   */
6478  
6479  function addBlockTypes(blockTypes) {
6480    return {
6481      type: 'ADD_BLOCK_TYPES',
6482      blockTypes: Object(external_this_lodash_["castArray"])(blockTypes)
6483    };
6484  }
6485  /**
6486   * Returns an action object used to remove a registered block type.
6487   *
6488   * @param {string|Array} names Block name.
6489   *
6490   * @return {Object} Action object.
6491   */
6492  
6493  function removeBlockTypes(names) {
6494    return {
6495      type: 'REMOVE_BLOCK_TYPES',
6496      names: Object(external_this_lodash_["castArray"])(names)
6497    };
6498  }
6499  /**
6500   * Returns an action object used in signalling that new block styles have been added.
6501   *
6502   * @param {string}       blockName  Block name.
6503   * @param {Array|Object} styles     Block styles.
6504   *
6505   * @return {Object} Action object.
6506   */
6507  
6508  function addBlockStyles(blockName, styles) {
6509    return {
6510      type: 'ADD_BLOCK_STYLES',
6511      styles: Object(external_this_lodash_["castArray"])(styles),
6512      blockName: blockName
6513    };
6514  }
6515  /**
6516   * Returns an action object used in signalling that block styles have been removed.
6517   *
6518   * @param {string}       blockName  Block name.
6519   * @param {Array|string} styleNames Block style names.
6520   *
6521   * @return {Object} Action object.
6522   */
6523  
6524  function removeBlockStyles(blockName, styleNames) {
6525    return {
6526      type: 'REMOVE_BLOCK_STYLES',
6527      styleNames: Object(external_this_lodash_["castArray"])(styleNames),
6528      blockName: blockName
6529    };
6530  }
6531  /**
6532   * Returns an action object used in signalling that new block variations have been added.
6533   *
6534   * @param {string}                              blockName  Block name.
6535   * @param {WPBlockVariation|WPBlockVariation[]} variations Block variations.
6536   *
6537   * @return {Object} Action object.
6538   */
6539  
6540  function addBlockVariations(blockName, variations) {
6541    return {
6542      type: 'ADD_BLOCK_VARIATIONS',
6543      variations: Object(external_this_lodash_["castArray"])(variations),
6544      blockName: blockName
6545    };
6546  }
6547  /**
6548   * Returns an action object used in signalling that block variations have been removed.
6549   *
6550   * @param {string}          blockName      Block name.
6551   * @param {string|string[]} variationNames Block variation names.
6552   *
6553   * @return {Object} Action object.
6554   */
6555  
6556  function removeBlockVariations(blockName, variationNames) {
6557    return {
6558      type: 'REMOVE_BLOCK_VARIATIONS',
6559      variationNames: Object(external_this_lodash_["castArray"])(variationNames),
6560      blockName: blockName
6561    };
6562  }
6563  /**
6564   * Returns an action object used to set the default block name.
6565   *
6566   * @param {string} name Block name.
6567   *
6568   * @return {Object} Action object.
6569   */
6570  
6571  function setDefaultBlockName(name) {
6572    return {
6573      type: 'SET_DEFAULT_BLOCK_NAME',
6574      name: name
6575    };
6576  }
6577  /**
6578   * Returns an action object used to set the name of the block used as a fallback
6579   * for non-block content.
6580   *
6581   * @param {string} name Block name.
6582   *
6583   * @return {Object} Action object.
6584   */
6585  
6586  function setFreeformFallbackBlockName(name) {
6587    return {
6588      type: 'SET_FREEFORM_FALLBACK_BLOCK_NAME',
6589      name: name
6590    };
6591  }
6592  /**
6593   * Returns an action object used to set the name of the block used as a fallback
6594   * for unregistered blocks.
6595   *
6596   * @param {string} name Block name.
6597   *
6598   * @return {Object} Action object.
6599   */
6600  
6601  function setUnregisteredFallbackBlockName(name) {
6602    return {
6603      type: 'SET_UNREGISTERED_FALLBACK_BLOCK_NAME',
6604      name: name
6605    };
6606  }
6607  /**
6608   * Returns an action object used to set the name of the block used
6609   * when grouping other blocks
6610   * eg: in "Group/Ungroup" interactions
6611   *
6612   * @param {string} name Block name.
6613   *
6614   * @return {Object} Action object.
6615   */
6616  
6617  function setGroupingBlockName(name) {
6618    return {
6619      type: 'SET_GROUPING_BLOCK_NAME',
6620      name: name
6621    };
6622  }
6623  /**
6624   * Returns an action object used to set block categories.
6625   *
6626   * @param {Object[]} categories Block categories.
6627   *
6628   * @return {Object} Action object.
6629   */
6630  
6631  function setCategories(categories) {
6632    return {
6633      type: 'SET_CATEGORIES',
6634      categories: categories
6635    };
6636  }
6637  /**
6638   * Returns an action object used to update a category.
6639   *
6640   * @param {string} slug     Block category slug.
6641   * @param {Object} category Object containing the category properties that should be updated.
6642   *
6643   * @return {Object} Action object.
6644   */
6645  
6646  function updateCategory(slug, category) {
6647    return {
6648      type: 'UPDATE_CATEGORY',
6649      slug: slug,
6650      category: category
6651    };
6652  }
6653  /**
6654   * Returns an action object used to add block collections
6655   *
6656   * @param {string} namespace       The namespace of the blocks to put in the collection
6657   * @param {string} title           The title to display in the block inserter
6658   * @param {Object} icon (optional) The icon to display in the block inserter
6659   *
6660   * @return {Object} Action object.
6661   */
6662  
6663  function addBlockCollection(namespace, title, icon) {
6664    return {
6665      type: 'ADD_BLOCK_COLLECTION',
6666      namespace: namespace,
6667      title: title,
6668      icon: icon
6669    };
6670  }
6671  /**
6672   * Returns an action object used to remove block collections
6673   *
6674   * @param {string} namespace       The namespace of the blocks to put in the collection
6675   *
6676   * @return {Object} Action object.
6677   */
6678  
6679  function removeBlockCollection(namespace) {
6680    return {
6681      type: 'REMOVE_BLOCK_COLLECTION',
6682      namespace: namespace
6683    };
6684  }
6685  
6686  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/index.js
6687  /**
6688   * WordPress dependencies
6689   */
6690  
6691  /**
6692   * Internal dependencies
6693   */
6694  
6695  
6696  
6697  
6698  Object(external_this_wp_data_["registerStore"])('core/blocks', {
6699    reducer: reducer,
6700    selectors: selectors_namespaceObject,
6701    actions: actions_namespaceObject
6702  });
6703  
6704  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/rng.js
6705  // Unique ID creation requires a high quality random # generator. In the browser we therefore
6706  // require the crypto API and do not support built-in fallback to lower quality random number
6707  // generators (like Math.random()).
6708  // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
6709  // find the complete implementation of crypto (msCrypto) on IE11.
6710  var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
6711  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
6712  
6713  function rng() {
6714    if (!getRandomValues) {
6715      throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
6716    }
6717  
6718    return getRandomValues(rnds8);
6719  }
6720  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/bytesToUuid.js
6721  /**
6722   * Convert array of 16 byte values to UUID string format of the form:
6723   * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
6724   */
6725  var byteToHex = [];
6726  
6727  for (var bytesToUuid_i = 0; bytesToUuid_i < 256; ++bytesToUuid_i) {
6728    byteToHex[bytesToUuid_i] = (bytesToUuid_i + 0x100).toString(16).substr(1);
6729  }
6730  
6731  function bytesToUuid(buf, offset) {
6732    var i = offset || 0;
6733    var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
6734  
6735    return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
6736  }
6737  
6738  /* harmony default export */ var esm_browser_bytesToUuid = (bytesToUuid);
6739  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/v4.js
6740  
6741  
6742  
6743  function v4(options, buf, offset) {
6744    var i = buf && offset || 0;
6745  
6746    if (typeof options == 'string') {
6747      buf = options === 'binary' ? new Array(16) : null;
6748      options = null;
6749    }
6750  
6751    options = options || {};
6752    var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
6753  
6754    rnds[6] = rnds[6] & 0x0f | 0x40;
6755    rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
6756  
6757    if (buf) {
6758      for (var ii = 0; ii < 16; ++ii) {
6759        buf[i + ii] = rnds[ii];
6760      }
6761    }
6762  
6763    return buf || esm_browser_bytesToUuid(rnds);
6764  }
6765  
6766  /* harmony default export */ var esm_browser_v4 = (v4);
6767  // EXTERNAL MODULE: external {"this":["wp","hooks"]}
6768  var external_this_wp_hooks_ = __webpack_require__(32);
6769  
6770  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
6771  var block_default = __webpack_require__(196);
6772  
6773  // EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
6774  var tinycolor = __webpack_require__(56);
6775  var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
6776  
6777  // EXTERNAL MODULE: external {"this":["wp","element"]}
6778  var external_this_wp_element_ = __webpack_require__(0);
6779  
6780  // EXTERNAL MODULE: external {"this":["wp","dom"]}
6781  var external_this_wp_dom_ = __webpack_require__(31);
6782  
6783  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js
6784  
6785  
6786  function utils_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6787  
6788  function utils_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { utils_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6789  
6790  /**
6791   * External dependencies
6792   */
6793  
6794  
6795  /**
6796   * WordPress dependencies
6797   */
6798  
6799  
6800  
6801  
6802  /**
6803   * Internal dependencies
6804   */
6805  
6806  
6807  
6808  /**
6809   * Array of icon colors containing a color to be used if the icon color
6810   * was not explicitly set but the icon background color was.
6811   *
6812   * @type {Object}
6813   */
6814  
6815  var ICON_COLORS = ['#191e23', '#f8f9f9'];
6816  /**
6817   * Determines whether the block is a default block
6818   * and its attributes are equal to the default attributes
6819   * which means the block is unmodified.
6820   *
6821   * @param  {WPBlock} block Block Object
6822   *
6823   * @return {boolean}       Whether the block is an unmodified default block
6824   */
6825  
6826  function isUnmodifiedDefaultBlock(block) {
6827    var defaultBlockName = registration_getDefaultBlockName();
6828  
6829    if (block.name !== defaultBlockName) {
6830      return false;
6831    } // Cache a created default block if no cache exists or the default block
6832    // name changed.
6833  
6834  
6835    if (!isUnmodifiedDefaultBlock.block || isUnmodifiedDefaultBlock.block.name !== defaultBlockName) {
6836      isUnmodifiedDefaultBlock.block = createBlock(defaultBlockName);
6837    }
6838  
6839    var newDefaultBlock = isUnmodifiedDefaultBlock.block;
6840    var blockType = registration_getBlockType(defaultBlockName);
6841    return Object(external_this_lodash_["every"])(blockType.attributes, function (value, key) {
6842      return newDefaultBlock.attributes[key] === block.attributes[key];
6843    });
6844  }
6845  /**
6846   * Function that checks if the parameter is a valid icon.
6847   *
6848   * @param {*} icon  Parameter to be checked.
6849   *
6850   * @return {boolean} True if the parameter is a valid icon and false otherwise.
6851   */
6852  
6853  function isValidIcon(icon) {
6854    return !!icon && (Object(external_this_lodash_["isString"])(icon) || Object(external_this_wp_element_["isValidElement"])(icon) || Object(external_this_lodash_["isFunction"])(icon) || icon instanceof external_this_wp_element_["Component"]);
6855  }
6856  /**
6857   * Function that receives an icon as set by the blocks during the registration
6858   * and returns a new icon object that is normalized so we can rely on just on possible icon structure
6859   * in the codebase.
6860   *
6861   * @param {WPBlockTypeIconRender} icon Render behavior of a block type icon;
6862   *                                     one of a Dashicon slug, an element, or a
6863   *                                     component.
6864   *
6865   * @return {WPBlockTypeIconDescriptor} Object describing the icon.
6866   */
6867  
6868  function normalizeIconObject(icon) {
6869    if (isValidIcon(icon)) {
6870      return {
6871        src: icon
6872      };
6873    }
6874  
6875    if (Object(external_this_lodash_["has"])(icon, ['background'])) {
6876      var tinyBgColor = tinycolor_default()(icon.background);
6877      return utils_objectSpread({}, icon, {
6878        foreground: icon.foreground ? icon.foreground : Object(tinycolor["mostReadable"])(tinyBgColor, ICON_COLORS, {
6879          includeFallbackColors: true,
6880          level: 'AA',
6881          size: 'large'
6882        }).toHexString(),
6883        shadowColor: tinyBgColor.setAlpha(0.3).toRgbString()
6884      });
6885    }
6886  
6887    return icon;
6888  }
6889  /**
6890   * Normalizes block type passed as param. When string is passed then
6891   * it converts it to the matching block type object.
6892   * It passes the original object otherwise.
6893   *
6894   * @param {string|Object} blockTypeOrName  Block type or name.
6895   *
6896   * @return {?Object} Block type.
6897   */
6898  
6899  function normalizeBlockType(blockTypeOrName) {
6900    if (Object(external_this_lodash_["isString"])(blockTypeOrName)) {
6901      return registration_getBlockType(blockTypeOrName);
6902    }
6903  
6904    return blockTypeOrName;
6905  }
6906  /**
6907   * Get the label for the block, usually this is either the block title,
6908   * or the value of the block's `label` function when that's specified.
6909   *
6910   * @param {Object} blockType  The block type.
6911   * @param {Object} attributes The values of the block's attributes.
6912   * @param {Object} context    The intended use for the label.
6913   *
6914   * @return {string} The block label.
6915   */
6916  
6917  function getBlockLabel(blockType, attributes) {
6918    var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'visual';
6919    var getLabel = blockType.__experimentalLabel,
6920        title = blockType.title;
6921    var label = getLabel && getLabel(attributes, {
6922      context: context
6923    });
6924  
6925    if (!label) {
6926      return title;
6927    } // Strip any HTML (i.e. RichText formatting) before returning.
6928  
6929  
6930    return Object(external_this_wp_dom_["__unstableStripHTML"])(label);
6931  }
6932  /**
6933   * Get a label for the block for use by screenreaders, this is more descriptive
6934   * than the visual label and includes the block title and the value of the
6935   * `getLabel` function if it's specified.
6936   *
6937   * @param {Object}  blockType              The block type.
6938   * @param {Object}  attributes             The values of the block's attributes.
6939   * @param {?number} position               The position of the block in the block list.
6940   * @param {string}  [direction='vertical'] The direction of the block layout.
6941   *
6942   * @return {string} The block label.
6943   */
6944  
6945  function getAccessibleBlockLabel(blockType, attributes, position) {
6946    var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vertical';
6947    // `title` is already localized, `label` is a user-supplied value.
6948    var title = blockType.title;
6949    var label = getBlockLabel(blockType, attributes, 'accessibility');
6950    var hasPosition = position !== undefined; // getBlockLabel returns the block title as a fallback when there's no label,
6951    // if it did return the title, this function needs to avoid adding the
6952    // title twice within the accessible label. Use this `hasLabel` boolean to
6953    // handle that.
6954  
6955    var hasLabel = label && label !== title;
6956  
6957    if (hasPosition && direction === 'vertical') {
6958      if (hasLabel) {
6959        return Object(external_this_wp_i18n_["sprintf"])(
6960        /* translators: accessibility text. 1: The block title. 2: The block row number. 3: The block label.. */
6961        Object(external_this_wp_i18n_["__"])('%1$s Block. Row %2$d. %3$s'), title, position, label);
6962      }
6963  
6964      return Object(external_this_wp_i18n_["sprintf"])(
6965      /* translators: accessibility text. 1: The block title. 2: The block row number. */
6966      Object(external_this_wp_i18n_["__"])('%1$s Block. Row %2$d'), title, position);
6967    } else if (hasPosition && direction === 'horizontal') {
6968      if (hasLabel) {
6969        return Object(external_this_wp_i18n_["sprintf"])(
6970        /* translators: accessibility text. 1: The block title. 2: The block column number. 3: The block label.. */
6971        Object(external_this_wp_i18n_["__"])('%1$s Block. Column %2$d. %3$s'), title, position, label);
6972      }
6973  
6974      return Object(external_this_wp_i18n_["sprintf"])(
6975      /* translators: accessibility text. 1: The block title. 2: The block column number. */
6976      Object(external_this_wp_i18n_["__"])('%1$s Block. Column %2$d'), title, position);
6977    }
6978  
6979    if (hasLabel) {
6980      return Object(external_this_wp_i18n_["sprintf"])(
6981      /* translators: accessibility text. %1: The block title. %2: The block label. */
6982      Object(external_this_wp_i18n_["__"])('%1$s Block. %2$s'), title, label);
6983    }
6984  
6985    return Object(external_this_wp_i18n_["sprintf"])(
6986    /* translators: accessibility text. %s: The block title. */
6987    Object(external_this_wp_i18n_["__"])('%s Block'), title);
6988  }
6989  
6990  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/constants.js
6991  /**
6992   * Array of valid keys in a block type settings deprecation object.
6993   *
6994   * @type {string[]}
6995   */
6996  var DEPRECATED_ENTRY_KEYS = ['attributes', 'supports', 'save', 'migrate', 'isEligible'];
6997  
6998  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/registration.js
6999  
7000  
7001  function registration_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
7002  
7003  function registration_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { registration_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { registration_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7004  
7005  /* eslint no-console: [ 'error', { allow: [ 'error', 'warn' ] } ] */
7006  
7007  /**
7008   * External dependencies
7009   */
7010  
7011  /**
7012   * WordPress dependencies
7013   */
7014  
7015  
7016  
7017  
7018  /**
7019   * Internal dependencies
7020   */
7021  
7022  
7023  
7024  /**
7025   * An icon type definition. One of a Dashicon slug, an element,
7026   * or a component.
7027   *
7028   * @typedef {(string|WPElement|WPComponent)} WPIcon
7029   *
7030   * @see https://developer.wordpress.org/resource/dashicons/
7031   */
7032  
7033  /**
7034   * Render behavior of a block type icon; one of a Dashicon slug, an element,
7035   * or a component.
7036   *
7037   * @typedef {WPIcon} WPBlockTypeIconRender
7038   */
7039  
7040  /**
7041   * An object describing a normalized block type icon.
7042   *
7043   * @typedef {Object} WPBlockTypeIconDescriptor
7044   *
7045   * @property {WPBlockTypeIconRender} src         Render behavior of the icon,
7046   *                                               one of a Dashicon slug, an
7047   *                                               element, or a component.
7048   * @property {string}                background  Optimal background hex string
7049   *                                               color when displaying icon.
7050   * @property {string}                foreground  Optimal foreground hex string
7051   *                                               color when displaying icon.
7052   * @property {string}                shadowColor Optimal shadow hex string
7053   *                                               color when displaying icon.
7054   */
7055  
7056  /**
7057   * Value to use to render the icon for a block type in an editor interface,
7058   * either a Dashicon slug, an element, a component, or an object describing
7059   * the icon.
7060   *
7061   * @typedef {(WPBlockTypeIconDescriptor|WPBlockTypeIconRender)} WPBlockTypeIcon
7062   */
7063  
7064  /**
7065   * Named block variation scopes.
7066   *
7067   * @typedef {'block'|'inserter'} WPBlockVariationScope
7068   */
7069  
7070  /**
7071   * An object describing a variation defined for the block type.
7072   *
7073   * @typedef {Object} WPBlockVariation
7074   *
7075   * @property {string}   name                   The unique and machine-readable name.
7076   * @property {string}   title                  A human-readable variation title.
7077   * @property {string}   [description]          A detailed variation description.
7078   * @property {WPIcon}   [icon]                 An icon helping to visualize the variation.
7079   * @property {boolean}  [isDefault]            Indicates whether the current variation is
7080   *                                             the default one. Defaults to `false`.
7081   * @property {Object}   [attributes]           Values which override block attributes.
7082   * @property {Array[]}  [innerBlocks]          Initial configuration of nested blocks.
7083   * @property {Object}   [example]              Example provides structured data for
7084   *                                             the block preview. You can set to
7085   *                                             `undefined` to disable the preview shown
7086   *                                             for the block type.
7087   * @property {WPBlockVariationScope[]} [scope] The list of scopes where the variation
7088   *                                             is applicable. When not provided, it
7089   *                                             assumes all available scopes.
7090   */
7091  
7092  /**
7093   * Defined behavior of a block type.
7094   *
7095   * @typedef {Object} WPBlock
7096   *
7097   * @property {string}             name          Block type's namespaced name.
7098   * @property {string}             title         Human-readable block type label.
7099   * @property {string}             [description] A detailed block type description.
7100   * @property {string}             [category]    Block type category classification,
7101   *                                              used in search interfaces to arrange
7102   *                                              block types by category.
7103   * @property {WPBlockTypeIcon}    [icon]        Block type icon.
7104   * @property {string[]}           [keywords]    Additional keywords to produce block
7105   *                                              type as result in search interfaces.
7106   * @property {Object}             [attributes]  Block type attributes.
7107   * @property {WPComponent}        [save]        Optional component describing
7108   *                                              serialized markup structure of a
7109   *                                              block type.
7110   * @property {WPComponent}        edit          Component rendering an element to
7111   *                                              manipulate the attributes of a block
7112   *                                              in the context of an editor.
7113   * @property {WPBlockVariation[]} [variations]  The list of block variations.
7114   * @property {Object}             [example]     Example provides structured data for
7115   *                                              the block preview. When not defined
7116   *                                              then no preview is shown.
7117   */
7118  
7119  /**
7120   * Mapping of legacy category slugs to their latest normal values, used to
7121   * accommodate updates of the default set of block categories.
7122   *
7123   * @type {Record<string,string>}
7124   */
7125  
7126  var LEGACY_CATEGORY_MAPPING = {
7127    common: 'text',
7128    formatting: 'text',
7129    layout: 'design'
7130  };
7131  var serverSideBlockDefinitions = {};
7132  /**
7133   * Sets the server side block definition of blocks.
7134   *
7135   * @param {Object} definitions Server-side block definitions
7136   */
7137  // eslint-disable-next-line camelcase
7138  
7139  function unstable__bootstrapServerSideBlockDefinitions(definitions) {
7140    serverSideBlockDefinitions = registration_objectSpread({}, serverSideBlockDefinitions, {}, definitions);
7141  }
7142  /**
7143   * Registers a new block provided a unique name and an object defining its
7144   * behavior. Once registered, the block is made available as an option to any
7145   * editor interface where blocks are implemented.
7146   *
7147   * @param {string} name     Block name.
7148   * @param {Object} settings Block settings.
7149   *
7150   * @return {?WPBlock} The block, if it has been successfully registered;
7151   *                    otherwise `undefined`.
7152   */
7153  
7154  function registerBlockType(name, settings) {
7155    settings = registration_objectSpread({
7156      name: name,
7157      icon: block_default["a" /* default */],
7158      keywords: [],
7159      attributes: {},
7160      providesContext: {},
7161      usesContext: [],
7162      supports: {},
7163      styles: [],
7164      save: function save() {
7165        return null;
7166      }
7167    }, Object(external_this_lodash_["pickBy"])(Object(external_this_lodash_["get"])(serverSideBlockDefinitions, name, {}), function (value) {
7168      return !Object(external_this_lodash_["isNil"])(value);
7169    }), {}, settings);
7170  
7171    if (typeof name !== 'string') {
7172      console.error('Block names must be strings.');
7173      return;
7174    }
7175  
7176    if (!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(name)) {
7177      console.error('Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block');
7178      return;
7179    }
7180  
7181    if (Object(external_this_wp_data_["select"])('core/blocks').getBlockType(name)) {
7182      console.error('Block "' + name + '" is already registered.');
7183      return;
7184    }
7185  
7186    var preFilterSettings = registration_objectSpread({}, settings);
7187  
7188    settings = Object(external_this_wp_hooks_["applyFilters"])('blocks.registerBlockType', settings, name);
7189  
7190    if (settings.deprecated) {
7191      settings.deprecated = settings.deprecated.map(function (deprecation) {
7192        return Object(external_this_lodash_["pick"])( // Only keep valid deprecation keys.
7193        Object(external_this_wp_hooks_["applyFilters"])('blocks.registerBlockType', // Merge deprecation keys with pre-filter settings
7194        // so that filters that depend on specific keys being
7195        // present don't fail.
7196        registration_objectSpread({}, Object(external_this_lodash_["omit"])(preFilterSettings, DEPRECATED_ENTRY_KEYS), {}, deprecation), name), DEPRECATED_ENTRY_KEYS);
7197      });
7198    }
7199  
7200    if (!Object(external_this_lodash_["isPlainObject"])(settings)) {
7201      console.error('Block settings must be a valid object.');
7202      return;
7203    }
7204  
7205    if (!Object(external_this_lodash_["isFunction"])(settings.save)) {
7206      console.error('The "save" property must be a valid function.');
7207      return;
7208    }
7209  
7210    if ('edit' in settings && !Object(external_this_lodash_["isFunction"])(settings.edit)) {
7211      console.error('The "edit" property must be a valid function.');
7212      return;
7213    } // Canonicalize legacy categories to equivalent fallback.
7214  
7215  
7216    if (LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
7217      settings.category = LEGACY_CATEGORY_MAPPING[settings.category];
7218    }
7219  
7220    if ('category' in settings && !Object(external_this_lodash_["some"])(Object(external_this_wp_data_["select"])('core/blocks').getCategories(), {
7221      slug: settings.category
7222    })) {
7223      console.warn('The block "' + name + '" is registered with an invalid category "' + settings.category + '".');
7224      delete settings.category;
7225    }
7226  
7227    if (!('title' in settings) || settings.title === '') {
7228      console.error('The block "' + name + '" must have a title.');
7229      return;
7230    }
7231  
7232    if (typeof settings.title !== 'string') {
7233      console.error('Block titles must be strings.');
7234      return;
7235    }
7236  
7237    settings.icon = normalizeIconObject(settings.icon);
7238  
7239    if (!isValidIcon(settings.icon.src)) {
7240      console.error('The icon passed is invalid. ' + 'The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional');
7241      return;
7242    }
7243  
7244    Object(external_this_wp_data_["dispatch"])('core/blocks').addBlockTypes(settings);
7245    return settings;
7246  }
7247  /**
7248   * Registers a new block collection to group blocks in the same namespace in the inserter.
7249   *
7250   * @param {string} namespace       The namespace to group blocks by in the inserter; corresponds to the block namespace.
7251   * @param {Object} settings        The block collection settings.
7252   * @param {string} settings.title  The title to display in the block inserter.
7253   * @param {Object} [settings.icon] The icon to display in the block inserter.
7254   */
7255  
7256  function registerBlockCollection(namespace, _ref) {
7257    var title = _ref.title,
7258        icon = _ref.icon;
7259    Object(external_this_wp_data_["dispatch"])('core/blocks').addBlockCollection(namespace, title, icon);
7260  }
7261  /**
7262   * Unregisters a block collection
7263   *
7264   * @param {string} namespace The namespace to group blocks by in the inserter; corresponds to the block namespace
7265   *
7266   */
7267  
7268  function unregisterBlockCollection(namespace) {
7269    Object(external_this_wp_data_["dispatch"])('core/blocks').removeBlockCollection(namespace);
7270  }
7271  /**
7272   * Unregisters a block.
7273   *
7274   * @param {string} name Block name.
7275   *
7276   * @return {?WPBlock} The previous block value, if it has been successfully
7277   *                    unregistered; otherwise `undefined`.
7278   */
7279  
7280  function unregisterBlockType(name) {
7281    var oldBlock = Object(external_this_wp_data_["select"])('core/blocks').getBlockType(name);
7282  
7283    if (!oldBlock) {
7284      console.error('Block "' + name + '" is not registered.');
7285      return;
7286    }
7287  
7288    Object(external_this_wp_data_["dispatch"])('core/blocks').removeBlockTypes(name);
7289    return oldBlock;
7290  }
7291  /**
7292   * Assigns name of block for handling non-block content.
7293   *
7294   * @param {string} blockName Block name.
7295   */
7296  
7297  function setFreeformContentHandlerName(blockName) {
7298    Object(external_this_wp_data_["dispatch"])('core/blocks').setFreeformFallbackBlockName(blockName);
7299  }
7300  /**
7301   * Retrieves name of block handling non-block content, or undefined if no
7302   * handler has been defined.
7303   *
7304   * @return {?string} Block name.
7305   */
7306  
7307  function getFreeformContentHandlerName() {
7308    return Object(external_this_wp_data_["select"])('core/blocks').getFreeformFallbackBlockName();
7309  }
7310  /**
7311   * Retrieves name of block used for handling grouping interactions.
7312   *
7313   * @return {?string} Block name.
7314   */
7315  
7316  function registration_getGroupingBlockName() {
7317    return Object(external_this_wp_data_["select"])('core/blocks').getGroupingBlockName();
7318  }
7319  /**
7320   * Assigns name of block handling unregistered block types.
7321   *
7322   * @param {string} blockName Block name.
7323   */
7324  
7325  function setUnregisteredTypeHandlerName(blockName) {
7326    Object(external_this_wp_data_["dispatch"])('core/blocks').setUnregisteredFallbackBlockName(blockName);
7327  }
7328  /**
7329   * Retrieves name of block handling unregistered block types, or undefined if no
7330   * handler has been defined.
7331   *
7332   * @return {?string} Block name.
7333   */
7334  
7335  function getUnregisteredTypeHandlerName() {
7336    return Object(external_this_wp_data_["select"])('core/blocks').getUnregisteredFallbackBlockName();
7337  }
7338  /**
7339   * Assigns the default block name.
7340   *
7341   * @param {string} name Block name.
7342   */
7343  
7344  function registration_setDefaultBlockName(name) {
7345    Object(external_this_wp_data_["dispatch"])('core/blocks').setDefaultBlockName(name);
7346  }
7347  /**
7348   * Assigns name of block for handling block grouping interactions.
7349   *
7350   * @param {string} name Block name.
7351   */
7352  
7353  function registration_setGroupingBlockName(name) {
7354    Object(external_this_wp_data_["dispatch"])('core/blocks').setGroupingBlockName(name);
7355  }
7356  /**
7357   * Retrieves the default block name.
7358   *
7359   * @return {?string} Block name.
7360   */
7361  
7362  function registration_getDefaultBlockName() {
7363    return Object(external_this_wp_data_["select"])('core/blocks').getDefaultBlockName();
7364  }
7365  /**
7366   * Returns a registered block type.
7367   *
7368   * @param {string} name Block name.
7369   *
7370   * @return {?Object} Block type.
7371   */
7372  
7373  function registration_getBlockType(name) {
7374    return Object(external_this_wp_data_["select"])('core/blocks').getBlockType(name);
7375  }
7376  /**
7377   * Returns all registered blocks.
7378   *
7379   * @return {Array} Block settings.
7380   */
7381  
7382  function registration_getBlockTypes() {
7383    return Object(external_this_wp_data_["select"])('core/blocks').getBlockTypes();
7384  }
7385  /**
7386   * Returns the block support value for a feature, if defined.
7387   *
7388   * @param  {(string|Object)} nameOrType      Block name or type object
7389   * @param  {string}          feature         Feature to retrieve
7390   * @param  {*}               defaultSupports Default value to return if not
7391   *                                           explicitly defined
7392   *
7393   * @return {?*} Block support value
7394   */
7395  
7396  function registration_getBlockSupport(nameOrType, feature, defaultSupports) {
7397    return Object(external_this_wp_data_["select"])('core/blocks').getBlockSupport(nameOrType, feature, defaultSupports);
7398  }
7399  /**
7400   * Returns true if the block defines support for a feature, or false otherwise.
7401   *
7402   * @param {(string|Object)} nameOrType      Block name or type object.
7403   * @param {string}          feature         Feature to test.
7404   * @param {boolean}         defaultSupports Whether feature is supported by
7405   *                                          default if not explicitly defined.
7406   *
7407   * @return {boolean} Whether block supports feature.
7408   */
7409  
7410  function registration_hasBlockSupport(nameOrType, feature, defaultSupports) {
7411    return Object(external_this_wp_data_["select"])('core/blocks').hasBlockSupport(nameOrType, feature, defaultSupports);
7412  }
7413  /**
7414   * Determines whether or not the given block is a reusable block. This is a
7415   * special block type that is used to point to a global block stored via the
7416   * API.
7417   *
7418   * @param {Object} blockOrType Block or Block Type to test.
7419   *
7420   * @return {boolean} Whether the given block is a reusable block.
7421   */
7422  
7423  function isReusableBlock(blockOrType) {
7424    return blockOrType.name === 'core/block';
7425  }
7426  /**
7427   * Returns an array with the child blocks of a given block.
7428   *
7429   * @param {string} blockName Name of block (example: “latest-posts”).
7430   *
7431   * @return {Array} Array of child block names.
7432   */
7433  
7434  var registration_getChildBlockNames = function getChildBlockNames(blockName) {
7435    return Object(external_this_wp_data_["select"])('core/blocks').getChildBlockNames(blockName);
7436  };
7437  /**
7438   * Returns a boolean indicating if a block has child blocks or not.
7439   *
7440   * @param {string} blockName Name of block (example: “latest-posts”).
7441   *
7442   * @return {boolean} True if a block contains child blocks and false otherwise.
7443   */
7444  
7445  var registration_hasChildBlocks = function hasChildBlocks(blockName) {
7446    return Object(external_this_wp_data_["select"])('core/blocks').hasChildBlocks(blockName);
7447  };
7448  /**
7449   * Returns a boolean indicating if a block has at least one child block with inserter support.
7450   *
7451   * @param {string} blockName Block type name.
7452   *
7453   * @return {boolean} True if a block contains at least one child blocks with inserter support
7454   *                   and false otherwise.
7455   */
7456  
7457  var registration_hasChildBlocksWithInserterSupport = function hasChildBlocksWithInserterSupport(blockName) {
7458    return Object(external_this_wp_data_["select"])('core/blocks').hasChildBlocksWithInserterSupport(blockName);
7459  };
7460  /**
7461   * Registers a new block style variation for the given block.
7462   *
7463   * @param {string} blockName      Name of block (example: “core/latest-posts”).
7464   * @param {Object} styleVariation Object containing `name` which is the class name applied to the block and `label` which identifies the variation to the user.
7465   */
7466  
7467  var registration_registerBlockStyle = function registerBlockStyle(blockName, styleVariation) {
7468    Object(external_this_wp_data_["dispatch"])('core/blocks').addBlockStyles(blockName, styleVariation);
7469  };
7470  /**
7471   * Unregisters a block style variation for the given block.
7472   *
7473   * @param {string} blockName          Name of block (example: “core/latest-posts”).
7474   * @param {string} styleVariationName Name of class applied to the block.
7475   */
7476  
7477  var registration_unregisterBlockStyle = function unregisterBlockStyle(blockName, styleVariationName) {
7478    Object(external_this_wp_data_["dispatch"])('core/blocks').removeBlockStyles(blockName, styleVariationName);
7479  };
7480  /**
7481   * Registers a new block variation for the given block type.
7482   *
7483   * @param {string}           blockName Name of the block (example: “core/columns”).
7484   * @param {WPBlockVariation} variation Object describing a block variation.
7485   */
7486  
7487  var registration_registerBlockVariation = function registerBlockVariation(blockName, variation) {
7488    Object(external_this_wp_data_["dispatch"])('core/blocks').addBlockVariations(blockName, variation);
7489  };
7490  /**
7491   * Unregisters a block variation defined for the given block type.
7492   *
7493   * @param {string} blockName     Name of the block (example: “core/columns”).
7494   * @param {string} variationName Name of the variation defined for the block.
7495   */
7496  
7497  var registration_unregisterBlockVariation = function unregisterBlockVariation(blockName, variationName) {
7498    Object(external_this_wp_data_["dispatch"])('core/blocks').removeBlockVariations(blockName, variationName);
7499  };
7500  
7501  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/factory.js
7502  
7503  
7504  
7505  function factory_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
7506  
7507  function factory_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { factory_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { factory_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7508  
7509  /**
7510   * External dependencies
7511   */
7512  
7513  
7514  /**
7515   * WordPress dependencies
7516   */
7517  
7518  
7519  /**
7520   * Internal dependencies
7521   */
7522  
7523  
7524  
7525  /**
7526   * Returns a block object given its type and attributes.
7527   *
7528   * @param {string} name        Block name.
7529   * @param {Object} attributes  Block attributes.
7530   * @param {?Array} innerBlocks Nested blocks.
7531   *
7532   * @return {Object} Block object.
7533   */
7534  
7535  function createBlock(name) {
7536    var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7537    var innerBlocks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
7538    // Get the type definition associated with a registered block.
7539    var blockType = registration_getBlockType(name); // Ensure attributes contains only values defined by block type, and merge
7540    // default values for missing attributes.
7541  
7542    var sanitizedAttributes = Object(external_this_lodash_["reduce"])(blockType.attributes, function (accumulator, schema, key) {
7543      var value = attributes[key];
7544  
7545      if (undefined !== value) {
7546        accumulator[key] = value;
7547      } else if (schema.hasOwnProperty('default')) {
7548        accumulator[key] = schema.default;
7549      }
7550  
7551      if (['node', 'children'].indexOf(schema.source) !== -1) {
7552        // Ensure value passed is always an array, which we're expecting in
7553        // the RichText component to handle the deprecated value.
7554        if (typeof accumulator[key] === 'string') {
7555          accumulator[key] = [accumulator[key]];
7556        } else if (!Array.isArray(accumulator[key])) {
7557          accumulator[key] = [];
7558        }
7559      }
7560  
7561      return accumulator;
7562    }, {});
7563    var clientId = esm_browser_v4(); // Blocks are stored with a unique ID, the assigned type name, the block
7564    // attributes, and their inner blocks.
7565  
7566    return {
7567      clientId: clientId,
7568      name: name,
7569      isValid: true,
7570      attributes: sanitizedAttributes,
7571      innerBlocks: innerBlocks
7572    };
7573  }
7574  /**
7575   * Given a block object, returns a copy of the block object, optionally merging
7576   * new attributes and/or replacing its inner blocks.
7577   *
7578   * @param {Object} block              Block instance.
7579   * @param {Object} mergeAttributes    Block attributes.
7580   * @param {?Array} newInnerBlocks     Nested blocks.
7581   *
7582   * @return {Object} A cloned block.
7583   */
7584  
7585  function cloneBlock(block) {
7586    var mergeAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7587    var newInnerBlocks = arguments.length > 2 ? arguments[2] : undefined;
7588    var clientId = esm_browser_v4();
7589    return factory_objectSpread({}, block, {
7590      clientId: clientId,
7591      attributes: factory_objectSpread({}, block.attributes, {}, mergeAttributes),
7592      innerBlocks: newInnerBlocks || block.innerBlocks.map(function (innerBlock) {
7593        return cloneBlock(innerBlock);
7594      })
7595    });
7596  }
7597  /**
7598   * Returns a boolean indicating whether a transform is possible based on
7599   * various bits of context.
7600   *
7601   * @param {Object} transform The transform object to validate.
7602   * @param {string} direction Is this a 'from' or 'to' transform.
7603   * @param {Array} blocks The blocks to transform from.
7604   *
7605   * @return {boolean} Is the transform possible?
7606   */
7607  
7608  var factory_isPossibleTransformForSource = function isPossibleTransformForSource(transform, direction, blocks) {
7609    if (Object(external_this_lodash_["isEmpty"])(blocks)) {
7610      return false;
7611    } // If multiple blocks are selected, only multi block transforms
7612    // or wildcard transforms are allowed.
7613  
7614  
7615    var isMultiBlock = blocks.length > 1;
7616    var firstBlockName = Object(external_this_lodash_["first"])(blocks).name;
7617    var isValidForMultiBlocks = isWildcardBlockTransform(transform) || !isMultiBlock || transform.isMultiBlock;
7618  
7619    if (!isValidForMultiBlocks) {
7620      return false;
7621    } // Check non-wildcard transforms to ensure that transform is valid
7622    // for a block selection of multiple blocks of different types
7623  
7624  
7625    if (!isWildcardBlockTransform(transform) && !Object(external_this_lodash_["every"])(blocks, {
7626      name: firstBlockName
7627    })) {
7628      return false;
7629    } // Only consider 'block' type transforms as valid.
7630  
7631  
7632    var isBlockType = transform.type === 'block';
7633  
7634    if (!isBlockType) {
7635      return false;
7636    } // Check if the transform's block name matches the source block (or is a wildcard)
7637    // only if this is a transform 'from'.
7638  
7639  
7640    var sourceBlock = Object(external_this_lodash_["first"])(blocks);
7641    var hasMatchingName = direction !== 'from' || transform.blocks.indexOf(sourceBlock.name) !== -1 || isWildcardBlockTransform(transform);
7642  
7643    if (!hasMatchingName) {
7644      return false;
7645    } // Don't allow single Grouping blocks to be transformed into
7646    // a Grouping block.
7647  
7648  
7649    if (!isMultiBlock && factory_isContainerGroupBlock(sourceBlock.name) && factory_isContainerGroupBlock(transform.blockName)) {
7650      return false;
7651    } // If the transform has a `isMatch` function specified, check that it returns true.
7652  
7653  
7654    if (Object(external_this_lodash_["isFunction"])(transform.isMatch)) {
7655      var attributes = transform.isMultiBlock ? blocks.map(function (block) {
7656        return block.attributes;
7657      }) : sourceBlock.attributes;
7658  
7659      if (!transform.isMatch(attributes)) {
7660        return false;
7661      }
7662    }
7663  
7664    return true;
7665  };
7666  /**
7667   * Returns block types that the 'blocks' can be transformed into, based on
7668   * 'from' transforms on other blocks.
7669   *
7670   * @param {Array}  blocks  The blocks to transform from.
7671   *
7672   * @return {Array} Block types that the blocks can be transformed into.
7673   */
7674  
7675  
7676  var factory_getBlockTypesForPossibleFromTransforms = function getBlockTypesForPossibleFromTransforms(blocks) {
7677    if (Object(external_this_lodash_["isEmpty"])(blocks)) {
7678      return [];
7679    }
7680  
7681    var allBlockTypes = registration_getBlockTypes(); // filter all blocks to find those with a 'from' transform.
7682  
7683    var blockTypesWithPossibleFromTransforms = Object(external_this_lodash_["filter"])(allBlockTypes, function (blockType) {
7684      var fromTransforms = getBlockTransforms('from', blockType.name);
7685      return !!findTransform(fromTransforms, function (transform) {
7686        return factory_isPossibleTransformForSource(transform, 'from', blocks);
7687      });
7688    });
7689    return blockTypesWithPossibleFromTransforms;
7690  };
7691  /**
7692   * Returns block types that the 'blocks' can be transformed into, based on
7693   * the source block's own 'to' transforms.
7694   *
7695   * @param {Array} blocks The blocks to transform from.
7696   *
7697   * @return {Array} Block types that the source can be transformed into.
7698   */
7699  
7700  
7701  var factory_getBlockTypesForPossibleToTransforms = function getBlockTypesForPossibleToTransforms(blocks) {
7702    if (Object(external_this_lodash_["isEmpty"])(blocks)) {
7703      return [];
7704    }
7705  
7706    var sourceBlock = Object(external_this_lodash_["first"])(blocks);
7707    var blockType = registration_getBlockType(sourceBlock.name);
7708    var transformsTo = getBlockTransforms('to', blockType.name); // filter all 'to' transforms to find those that are possible.
7709  
7710    var possibleTransforms = Object(external_this_lodash_["filter"])(transformsTo, function (transform) {
7711      return transform && factory_isPossibleTransformForSource(transform, 'to', blocks);
7712    }); // Build a list of block names using the possible 'to' transforms.
7713  
7714    var blockNames = Object(external_this_lodash_["flatMap"])(possibleTransforms, function (transformation) {
7715      return transformation.blocks;
7716    }); // Map block names to block types.
7717  
7718    return blockNames.map(function (name) {
7719      return registration_getBlockType(name);
7720    });
7721  };
7722  /**
7723   * Determines whether transform is a "block" type
7724   * and if so whether it is a "wildcard" transform
7725   * ie: targets "any" block type
7726   *
7727   * @param {Object} t the Block transform object
7728   *
7729   * @return {boolean} whether transform is a wildcard transform
7730   */
7731  
7732  
7733  var isWildcardBlockTransform = function isWildcardBlockTransform(t) {
7734    return t && t.type === 'block' && Array.isArray(t.blocks) && t.blocks.includes('*');
7735  };
7736  /**
7737   * Determines whether the given Block is the core Block which
7738   * acts as a container Block for other Blocks as part of the
7739   * Grouping mechanics
7740   *
7741   * @param  {string} name the name of the Block to test against
7742   *
7743   * @return {boolean} whether or not the Block is the container Block type
7744   */
7745  
7746  var factory_isContainerGroupBlock = function isContainerGroupBlock(name) {
7747    return name === registration_getGroupingBlockName();
7748  };
7749  /**
7750   * Returns an array of block types that the set of blocks received as argument
7751   * can be transformed into.
7752   *
7753   * @param {Array} blocks Blocks array.
7754   *
7755   * @return {Array} Block types that the blocks argument can be transformed to.
7756   */
7757  
7758  function getPossibleBlockTransformations(blocks) {
7759    if (Object(external_this_lodash_["isEmpty"])(blocks)) {
7760      return [];
7761    }
7762  
7763    var blockTypesForFromTransforms = factory_getBlockTypesForPossibleFromTransforms(blocks);
7764    var blockTypesForToTransforms = factory_getBlockTypesForPossibleToTransforms(blocks);
7765    return Object(external_this_lodash_["uniq"])([].concat(Object(toConsumableArray["a" /* default */])(blockTypesForFromTransforms), Object(toConsumableArray["a" /* default */])(blockTypesForToTransforms)));
7766  }
7767  /**
7768   * Given an array of transforms, returns the highest-priority transform where
7769   * the predicate function returns a truthy value. A higher-priority transform
7770   * is one with a lower priority value (i.e. first in priority order). Returns
7771   * null if the transforms set is empty or the predicate function returns a
7772   * falsey value for all entries.
7773   *
7774   * @param {Object[]} transforms Transforms to search.
7775   * @param {Function} predicate  Function returning true on matching transform.
7776   *
7777   * @return {?Object} Highest-priority transform candidate.
7778   */
7779  
7780  function findTransform(transforms, predicate) {
7781    // The hooks library already has built-in mechanisms for managing priority
7782    // queue, so leverage via locally-defined instance.
7783    var hooks = Object(external_this_wp_hooks_["createHooks"])();
7784  
7785    var _loop = function _loop(i) {
7786      var candidate = transforms[i];
7787  
7788      if (predicate(candidate)) {
7789        hooks.addFilter('transform', 'transform/' + i.toString(), function (result) {
7790          return result ? result : candidate;
7791        }, candidate.priority);
7792      }
7793    };
7794  
7795    for (var i = 0; i < transforms.length; i++) {
7796      _loop(i);
7797    } // Filter name is arbitrarily chosen but consistent with above aggregation.
7798  
7799  
7800    return hooks.applyFilters('transform', null);
7801  }
7802  /**
7803   * Returns normal block transforms for a given transform direction, optionally
7804   * for a specific block by name, or an empty array if there are no transforms.
7805   * If no block name is provided, returns transforms for all blocks. A normal
7806   * transform object includes `blockName` as a property.
7807   *
7808   * @param {string}  direction Transform direction ("to", "from").
7809   * @param {string|Object} blockTypeOrName  Block type or name.
7810   *
7811   * @return {Array} Block transforms for direction.
7812   */
7813  
7814  function getBlockTransforms(direction, blockTypeOrName) {
7815    // When retrieving transforms for all block types, recurse into self.
7816    if (blockTypeOrName === undefined) {
7817      return Object(external_this_lodash_["flatMap"])(registration_getBlockTypes(), function (_ref) {
7818        var name = _ref.name;
7819        return getBlockTransforms(direction, name);
7820      });
7821    } // Validate that block type exists and has array of direction.
7822  
7823  
7824    var blockType = normalizeBlockType(blockTypeOrName);
7825  
7826    var _ref2 = blockType || {},
7827        blockName = _ref2.name,
7828        transforms = _ref2.transforms;
7829  
7830    if (!transforms || !Array.isArray(transforms[direction])) {
7831      return [];
7832    } // Map transforms to normal form.
7833  
7834  
7835    return transforms[direction].map(function (transform) {
7836      return factory_objectSpread({}, transform, {
7837        blockName: blockName
7838      });
7839    });
7840  }
7841  /**
7842   * Switch one or more blocks into one or more blocks of the new block type.
7843   *
7844   * @param {Array|Object} blocks Blocks array or block object.
7845   * @param {string}       name   Block name.
7846   *
7847   * @return {?Array} Array of blocks or null.
7848   */
7849  
7850  function switchToBlockType(blocks, name) {
7851    var blocksArray = Object(external_this_lodash_["castArray"])(blocks);
7852    var isMultiBlock = blocksArray.length > 1;
7853    var firstBlock = blocksArray[0];
7854    var sourceName = firstBlock.name; // Find the right transformation by giving priority to the "to"
7855    // transformation.
7856  
7857    var transformationsFrom = getBlockTransforms('from', name);
7858    var transformationsTo = getBlockTransforms('to', sourceName);
7859    var transformation = findTransform(transformationsTo, function (t) {
7860      return t.type === 'block' && (isWildcardBlockTransform(t) || t.blocks.indexOf(name) !== -1) && (!isMultiBlock || t.isMultiBlock);
7861    }) || findTransform(transformationsFrom, function (t) {
7862      return t.type === 'block' && (isWildcardBlockTransform(t) || t.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || t.isMultiBlock);
7863    }); // Stop if there is no valid transformation.
7864  
7865    if (!transformation) {
7866      return null;
7867    }
7868  
7869    var transformationResults;
7870  
7871    if (transformation.isMultiBlock) {
7872      if (Object(external_this_lodash_["has"])(transformation, '__experimentalConvert')) {
7873        transformationResults = transformation.__experimentalConvert(blocksArray);
7874      } else {
7875        transformationResults = transformation.transform(blocksArray.map(function (currentBlock) {
7876          return currentBlock.attributes;
7877        }), blocksArray.map(function (currentBlock) {
7878          return currentBlock.innerBlocks;
7879        }));
7880      }
7881    } else if (Object(external_this_lodash_["has"])(transformation, '__experimentalConvert')) {
7882      transformationResults = transformation.__experimentalConvert(firstBlock);
7883    } else {
7884      transformationResults = transformation.transform(firstBlock.attributes, firstBlock.innerBlocks);
7885    } // Ensure that the transformation function returned an object or an array
7886    // of objects.
7887  
7888  
7889    if (!Object(external_this_lodash_["isObjectLike"])(transformationResults)) {
7890      return null;
7891    } // If the transformation function returned a single object, we want to work
7892    // with an array instead.
7893  
7894  
7895    transformationResults = Object(external_this_lodash_["castArray"])(transformationResults); // Ensure that every block object returned by the transformation has a
7896    // valid block type.
7897  
7898    if (transformationResults.some(function (result) {
7899      return !registration_getBlockType(result.name);
7900    })) {
7901      return null;
7902    }
7903  
7904    var firstSwitchedBlock = Object(external_this_lodash_["findIndex"])(transformationResults, function (result) {
7905      return result.name === name;
7906    }); // Ensure that at least one block object returned by the transformation has
7907    // the expected "destination" block type.
7908  
7909    if (firstSwitchedBlock < 0) {
7910      return null;
7911    }
7912  
7913    return transformationResults.map(function (result, index) {
7914      var transformedBlock = factory_objectSpread({}, result, {
7915        // The first transformed block whose type matches the "destination"
7916        // type gets to keep the existing client ID of the first block.
7917        clientId: index === firstSwitchedBlock ? firstBlock.clientId : result.clientId
7918      });
7919      /**
7920       * Filters an individual transform result from block transformation.
7921       * All of the original blocks are passed, since transformations are
7922       * many-to-many, not one-to-one.
7923       *
7924       * @param {Object}   transformedBlock The transformed block.
7925       * @param {Object[]} blocks           Original blocks transformed.
7926       */
7927  
7928  
7929      return Object(external_this_wp_hooks_["applyFilters"])('blocks.switchToBlockType.transformedBlock', transformedBlock, blocks);
7930    });
7931  }
7932  /**
7933   * Create a block object from the example API.
7934   *
7935   * @param {string} name
7936   * @param {Object} example
7937   *
7938   * @return {Object} block.
7939   */
7940  
7941  var factory_getBlockFromExample = function getBlockFromExample(name, example) {
7942    return createBlock(name, example.attributes, Object(external_this_lodash_["map"])(example.innerBlocks, function (innerBlock) {
7943      return getBlockFromExample(innerBlock.name, innerBlock);
7944    }));
7945  };
7946  
7947  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
7948  var slicedToArray = __webpack_require__(13);
7949  
7950  // CONCATENATED MODULE: ./node_modules/hpq/es/get-path.js
7951  /**
7952   * Given object and string of dot-delimited path segments, returns value at
7953   * path or undefined if path cannot be resolved.
7954   *
7955   * @param  {Object} object Lookup object
7956   * @param  {string} path   Path to resolve
7957   * @return {?*}            Resolved value
7958   */
7959  function getPath(object, path) {
7960    var segments = path.split('.');
7961    var segment;
7962  
7963    while (segment = segments.shift()) {
7964      if (!(segment in object)) {
7965        return;
7966      }
7967  
7968      object = object[segment];
7969    }
7970  
7971    return object;
7972  }
7973  // CONCATENATED MODULE: ./node_modules/hpq/es/index.js
7974  /**
7975   * Internal dependencies
7976   */
7977  
7978  /**
7979   * Function returning a DOM document created by `createHTMLDocument`. The same
7980   * document is returned between invocations.
7981   *
7982   * @return {Document} DOM document.
7983   */
7984  
7985  var getDocument = function () {
7986    var doc;
7987    return function () {
7988      if (!doc) {
7989        doc = document.implementation.createHTMLDocument('');
7990      }
7991  
7992      return doc;
7993    };
7994  }();
7995  /**
7996   * Given a markup string or DOM element, creates an object aligning with the
7997   * shape of the matchers object, or the value returned by the matcher.
7998   *
7999   * @param  {(string|Element)}  source   Source content
8000   * @param  {(Object|Function)} matchers Matcher function or object of matchers
8001   * @return {(Object|*)}                 Matched value(s), shaped by object
8002   */
8003  
8004  
8005  function es_parse(source, matchers) {
8006    if (!matchers) {
8007      return;
8008    } // Coerce to element
8009  
8010  
8011    if ('string' === typeof source) {
8012      var doc = getDocument();
8013      doc.body.innerHTML = source;
8014      source = doc.body;
8015    } // Return singular value
8016  
8017  
8018    if ('function' === typeof matchers) {
8019      return matchers(source);
8020    } // Bail if we can't handle matchers
8021  
8022  
8023    if (Object !== matchers.constructor) {
8024      return;
8025    } // Shape result by matcher object
8026  
8027  
8028    return Object.keys(matchers).reduce(function (memo, key) {
8029      memo[key] = es_parse(source, matchers[key]);
8030      return memo;
8031    }, {});
8032  }
8033  /**
8034   * Generates a function which matches node of type selector, returning an
8035   * attribute by property if the attribute exists. If no selector is passed,
8036   * returns property of the query element.
8037   *
8038   * @param  {?string} selector Optional selector
8039   * @param  {string}  name     Property name
8040   * @return {*}                Property value
8041   */
8042  
8043  function prop(selector, name) {
8044    if (1 === arguments.length) {
8045      name = selector;
8046      selector = undefined;
8047    }
8048  
8049    return function (node) {
8050      var match = node;
8051  
8052      if (selector) {
8053        match = node.querySelector(selector);
8054      }
8055  
8056      if (match) {
8057        return getPath(match, name);
8058      }
8059    };
8060  }
8061  /**
8062   * Generates a function which matches node of type selector, returning an
8063   * attribute by name if the attribute exists. If no selector is passed,
8064   * returns attribute of the query element.
8065   *
8066   * @param  {?string} selector Optional selector
8067   * @param  {string}  name     Attribute name
8068   * @return {?string}          Attribute value
8069   */
8070  
8071  function attr(selector, name) {
8072    if (1 === arguments.length) {
8073      name = selector;
8074      selector = undefined;
8075    }
8076  
8077    return function (node) {
8078      var attributes = prop(selector, 'attributes')(node);
8079  
8080      if (attributes && attributes.hasOwnProperty(name)) {
8081        return attributes[name].value;
8082      }
8083    };
8084  }
8085  /**
8086   * Convenience for `prop( selector, 'innerHTML' )`.
8087   *
8088   * @see prop()
8089   *
8090   * @param  {?string} selector Optional selector
8091   * @return {string}           Inner HTML
8092   */
8093  
8094  function es_html(selector) {
8095    return prop(selector, 'innerHTML');
8096  }
8097  /**
8098   * Convenience for `prop( selector, 'textContent' )`.
8099   *
8100   * @see prop()
8101   *
8102   * @param  {?string} selector Optional selector
8103   * @return {string}           Text content
8104   */
8105  
8106  function es_text(selector) {
8107    return prop(selector, 'textContent');
8108  }
8109  /**
8110   * Creates a new matching context by first finding elements matching selector
8111   * using querySelectorAll before then running another `parse` on `matchers`
8112   * scoped to the matched elements.
8113   *
8114   * @see parse()
8115   *
8116   * @param  {string}            selector Selector to match
8117   * @param  {(Object|Function)} matchers Matcher function or object of matchers
8118   * @return {Array.<*,Object>}           Array of matched value(s)
8119   */
8120  
8121  function query(selector, matchers) {
8122    return function (node) {
8123      var matches = node.querySelectorAll(selector);
8124      return [].map.call(matches, function (match) {
8125        return es_parse(match, matchers);
8126      });
8127    };
8128  }
8129  // EXTERNAL MODULE: external {"this":["wp","autop"]}
8130  var external_this_wp_autop_ = __webpack_require__(96);
8131  
8132  // EXTERNAL MODULE: external {"this":["wp","blockSerializationDefaultParser"]}
8133  var external_this_wp_blockSerializationDefaultParser_ = __webpack_require__(262);
8134  
8135  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
8136  var toArray = __webpack_require__(139);
8137  
8138  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
8139  var classCallCheck = __webpack_require__(19);
8140  
8141  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
8142  var createClass = __webpack_require__(18);
8143  
8144  // CONCATENATED MODULE: ./node_modules/simple-html-tokenizer/dist/es6/index.js
8145  /**
8146   * generated from https://raw.githubusercontent.com/w3c/html/26b5126f96f736f796b9e29718138919dd513744/entities.json
8147   * do not edit
8148   */
8149  var namedCharRefs = {
8150      Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳", Acirc: "Â", acirc: "â", acute: "´", Acy: "А", acy: "а", AElig: "Æ", aelig: "æ", af: "\u2061", Afr: "𝔄", afr: "𝔞", Agrave: "À", agrave: "à", alefsym: "ℵ", aleph: "ℵ", Alpha: "Α", alpha: "α", Amacr: "Ā", amacr: "ā", amalg: "⨿", amp: "&", AMP: "&", andand: "⩕", And: "⩓", and: "∧", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", ange: "⦤", angle: "∠", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angmsd: "∡", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angst: "Å", angzarr: "⍼", Aogon: "Ą", aogon: "ą", Aopf: "𝔸", aopf: "𝕒", apacir: "⩯", ap: "≈", apE: "⩰", ape: "≊", apid: "≋", apos: "'", ApplyFunction: "\u2061", approx: "≈", approxeq: "≊", Aring: "Å", aring: "å", Ascr: "𝒜", ascr: "𝒶", Assign: "≔", ast: "*", asymp: "≈", asympeq: "≍", Atilde: "Ã", atilde: "ã", Auml: "Ä", auml: "ä", awconint: "∳", awint: "⨑", backcong: "≌", backepsilon: "϶", backprime: "‵", backsim: "∽", backsimeq: "⋍", Backslash: "∖", Barv: "⫧", barvee: "⊽", barwed: "⌅", Barwed: "⌆", barwedge: "⌅", bbrk: "⎵", bbrktbrk: "⎶", bcong: "≌", Bcy: "Б", bcy: "б", bdquo: "„", becaus: "∵", because: "∵", Because: "∵", bemptyv: "⦰", bepsi: "϶", bernou: "ℬ", Bernoullis: "ℬ", Beta: "Β", beta: "β", beth: "ℶ", between: "≬", Bfr: "𝔅", bfr: "𝔟", bigcap: "⋂", bigcirc: "◯", bigcup: "⋃", bigodot: "⨀", bigoplus: "⨁", bigotimes: "⨂", bigsqcup: "⨆", bigstar: "★", bigtriangledown: "▽", bigtriangleup: "△", biguplus: "⨄", bigvee: "⋁", bigwedge: "⋀", bkarow: "⤍", blacklozenge: "⧫", blacksquare: "▪", blacktriangle: "▴", blacktriangledown: "▾", blacktriangleleft: "◂", blacktriangleright: "▸", blank: "␣", blk12: "▒", blk14: "░", blk34: "▓", block: "█", bne: "=⃥", bnequiv: "≡⃥", bNot: "⫭", bnot: "⌐", Bopf: "𝔹", bopf: "𝕓", bot: "⊥", bottom: "⊥", bowtie: "⋈", boxbox: "⧉", boxdl: "┐", boxdL: "╕", boxDl: "╖", boxDL: "╗", boxdr: "┌", boxdR: "╒", boxDr: "╓", boxDR: "╔", boxh: "─", boxH: "═", boxhd: "┬", boxHd: "╤", boxhD: "╥", boxHD: "╦", boxhu: "┴", boxHu: "╧", boxhU: "╨", boxHU: "╩", boxminus: "⊟", boxplus: "⊞", boxtimes: "⊠", boxul: "┘", boxuL: "╛", boxUl: "╜", boxUL: "╝", boxur: "└", boxuR: "╘", boxUr: "╙", boxUR: "╚", boxv: "│", boxV: "║", boxvh: "┼", boxvH: "╪", boxVh: "╫", boxVH: "╬", boxvl: "┤", boxvL: "╡", boxVl: "╢", boxVL: "╣", boxvr: "├", boxvR: "╞", boxVr: "╟", boxVR: "╠", bprime: "‵", breve: "˘", Breve: "˘", brvbar: "¦", bscr: "𝒷", Bscr: "ℬ", bsemi: "⁏", bsim: "∽", bsime: "⋍", bsolb: "⧅", bsol: "\\", bsolhsub: "⟈", bull: "•", bullet: "•", bump: "≎", bumpE: "⪮", bumpe: "≏", Bumpeq: "≎", bumpeq: "≏", Cacute: "Ć", cacute: "ć", capand: "⩄", capbrcup: "⩉", capcap: "⩋", cap: "∩", Cap: "⋒", capcup: "⩇", capdot: "⩀", CapitalDifferentialD: "ⅅ", caps: "∩︀", caret: "⁁", caron: "ˇ", Cayleys: "ℭ", ccaps: "⩍", Ccaron: "Č", ccaron: "č", Ccedil: "Ç", ccedil: "ç", Ccirc: "Ĉ", ccirc: "ĉ", Cconint: "∰", ccups: "⩌", ccupssm: "⩐", Cdot: "Ċ", cdot: "ċ", cedil: "¸", Cedilla: "¸", cemptyv: "⦲", cent: "¢", centerdot: "·", CenterDot: "·", cfr: "𝔠", Cfr: "ℭ", CHcy: "Ч", chcy: "ч", check: "✓", checkmark: "✓", Chi: "Χ", chi: "χ", circ: "ˆ", circeq: "≗", circlearrowleft: "↺", circlearrowright: "↻", circledast: "⊛", circledcirc: "⊚", circleddash: "⊝", CircleDot: "⊙", circledR: "®", circledS: "Ⓢ", CircleMinus: "⊖", CirclePlus: "⊕", CircleTimes: "⊗", cir: "○", cirE: "⧃", cire: "≗", cirfnint: "⨐", cirmid: "⫯", cirscir: "⧂", ClockwiseContourIntegral: "∲", CloseCurlyDoubleQuote: "”", CloseCurlyQuote: "’", clubs: "♣", clubsuit: "♣", colon: ":", Colon: "∷", Colone: "⩴", colone: "≔", coloneq: "≔", comma: ",", commat: "@", comp: "∁", compfn: "∘", complement: "∁", complexes: "ℂ", cong: "≅", congdot: "⩭", Congruent: "≡", conint: "∮", Conint: "∯", ContourIntegral: "∮", copf: "𝕔", Copf: "ℂ", coprod: "∐", Coproduct: "∐", copy: "©", COPY: "©", copysr: "℗", CounterClockwiseContourIntegral: "∳", crarr: "↵", cross: "✗", Cross: "⨯", Cscr: "𝒞", cscr: "𝒸", csub: "⫏", csube: "⫑", csup: "⫐", csupe: "⫒", ctdot: "⋯", cudarrl: "⤸", cudarrr: "⤵", cuepr: "⋞", cuesc: "⋟", cularr: "↶", cularrp: "⤽", cupbrcap: "⩈", cupcap: "⩆", CupCap: "≍", cup: "∪", Cup: "⋓", cupcup: "⩊", cupdot: "⊍", cupor: "⩅", cups: "∪︀", curarr: "↷", curarrm: "⤼", curlyeqprec: "⋞", curlyeqsucc: "⋟", curlyvee: "⋎", curlywedge: "⋏", curren: "¤", curvearrowleft: "↶", curvearrowright: "↷", cuvee: "⋎", cuwed: "⋏", cwconint: "∲", cwint: "∱", cylcty: "⌭", dagger: "†", Dagger: "‡", daleth: "ℸ", darr: "↓", Darr: "↡", dArr: "⇓", dash: "‐", Dashv: "⫤", dashv: "⊣", dbkarow: "⤏", dblac: "˝", Dcaron: "Ď", dcaron: "ď", Dcy: "Д", dcy: "д", ddagger: "‡", ddarr: "⇊", DD: "ⅅ", dd: "ⅆ", DDotrahd: "⤑", ddotseq: "⩷", deg: "°", Del: "∇", Delta: "Δ", delta: "δ", demptyv: "⦱", dfisht: "⥿", Dfr: "𝔇", dfr: "𝔡", dHar: "⥥", dharl: "⇃", dharr: "⇂", DiacriticalAcute: "´", DiacriticalDot: "˙", DiacriticalDoubleAcute: "˝", DiacriticalGrave: "`", DiacriticalTilde: "˜", diam: "⋄", diamond: "⋄", Diamond: "⋄", diamondsuit: "♦", diams: "♦", die: "¨", DifferentialD: "ⅆ", digamma: "ϝ", disin: "⋲", div: "÷", divide: "÷", divideontimes: "⋇", divonx: "⋇", DJcy: "Ђ", djcy: "ђ", dlcorn: "⌞", dlcrop: "⌍", dollar: "$", Dopf: "𝔻", dopf: "𝕕", Dot: "¨", dot: "˙", DotDot: "⃜", doteq: "≐", doteqdot: "≑", DotEqual: "≐", dotminus: "∸", dotplus: "∔", dotsquare: "⊡", doublebarwedge: "⌆", DoubleContourIntegral: "∯", DoubleDot: "¨", DoubleDownArrow: "⇓", DoubleLeftArrow: "⇐", DoubleLeftRightArrow: "⇔", DoubleLeftTee: "⫤", DoubleLongLeftArrow: "⟸", DoubleLongLeftRightArrow: "⟺", DoubleLongRightArrow: "⟹", DoubleRightArrow: "⇒", DoubleRightTee: "⊨", DoubleUpArrow: "⇑", DoubleUpDownArrow: "⇕", DoubleVerticalBar: "∥", DownArrowBar: "⤓", downarrow: "↓", DownArrow: "↓", Downarrow: "⇓", DownArrowUpArrow: "⇵", DownBreve: "̑", downdownarrows: "⇊", downharpoonleft: "⇃", downharpoonright: "⇂", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVectorBar: "⥖", DownLeftVector: "↽", DownRightTeeVector: "⥟", DownRightVectorBar: "⥗", DownRightVector: "⇁", DownTeeArrow: "↧", DownTee: "⊤", drbkarow: "⤐", drcorn: "⌟", drcrop: "⌌", Dscr: "𝒟", dscr: "𝒹", DScy: "Ѕ", dscy: "ѕ", dsol: "⧶", Dstrok: "Đ", dstrok: "đ", dtdot: "⋱", dtri: "▿", dtrif: "▾", duarr: "⇵", duhar: "⥯", dwangle: "⦦", DZcy: "Џ", dzcy: "џ", dzigrarr: "⟿", Eacute: "É", eacute: "é", easter: "⩮", Ecaron: "Ě", ecaron: "ě", Ecirc: "Ê", ecirc: "ê", ecir: "≖", ecolon: "≕", Ecy: "Э", ecy: "э", eDDot: "⩷", Edot: "Ė", edot: "ė", eDot: "≑", ee: "ⅇ", efDot: "≒", Efr: "𝔈", efr: "𝔢", eg: "⪚", Egrave: "È", egrave: "è", egs: "⪖", egsdot: "⪘", el: "⪙", Element: "∈", elinters: "⏧", ell: "ℓ", els: "⪕", elsdot: "⪗", Emacr: "Ē", emacr: "ē", empty: "∅", emptyset: "∅", EmptySmallSquare: "◻", emptyv: "∅", EmptyVerySmallSquare: "▫", emsp13: " ", emsp14: " ", emsp: " ", ENG: "Ŋ", eng: "ŋ", ensp: " ", Eogon: "Ę", eogon: "ę", Eopf: "𝔼", eopf: "𝕖", epar: "⋕", eparsl: "⧣", eplus: "⩱", epsi: "ε", Epsilon: "Ε", epsilon: "ε", epsiv: "ϵ", eqcirc: "≖", eqcolon: "≕", eqsim: "≂", eqslantgtr: "⪖", eqslantless: "⪕", Equal: "⩵", equals: "=", EqualTilde: "≂", equest: "≟", Equilibrium: "⇌", equiv: "≡", equivDD: "⩸", eqvparsl: "⧥", erarr: "⥱", erDot: "≓", escr: "ℯ", Escr: "ℰ", esdot: "≐", Esim: "⩳", esim: "≂", Eta: "Η", eta: "η", ETH: "Ð", eth: "ð", Euml: "Ë", euml: "ë", euro: "€", excl: "!", exist: "∃", Exists: "∃", expectation: "ℰ", exponentiale: "ⅇ", ExponentialE: "ⅇ", fallingdotseq: "≒", Fcy: "Ф", fcy: "ф", female: "♀", ffilig: "ffi", fflig: "ff", ffllig: "ffl", Ffr: "𝔉", ffr: "𝔣", filig: "fi", FilledSmallSquare: "◼", FilledVerySmallSquare: "▪", fjlig: "fj", flat: "♭", fllig: "fl", fltns: "▱", fnof: "ƒ", Fopf: "𝔽", fopf: "𝕗", forall: "∀", ForAll: "∀", fork: "⋔", forkv: "⫙", Fouriertrf: "ℱ", fpartint: "⨍", frac12: "½", frac13: "⅓", frac14: "¼", frac15: "⅕", frac16: "⅙", frac18: "⅛", frac23: "⅔", frac25: "⅖", frac34: "¾", frac35: "⅗", frac38: "⅜", frac45: "⅘", frac56: "⅚", frac58: "⅝", frac78: "⅞", frasl: "⁄", frown: "⌢", fscr: "𝒻", Fscr: "ℱ", gacute: "ǵ", Gamma: "Γ", gamma: "γ", Gammad: "Ϝ", gammad: "ϝ", gap: "⪆", Gbreve: "Ğ", gbreve: "ğ", Gcedil: "Ģ", Gcirc: "Ĝ", gcirc: "ĝ", Gcy: "Г", gcy: "г", Gdot: "Ġ", gdot: "ġ", ge: "≥", gE: "≧", gEl: "⪌", gel: "⋛", geq: "≥", geqq: "≧", geqslant: "⩾", gescc: "⪩", ges: "⩾", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", Gfr: "𝔊", gfr: "𝔤", gg: "≫", Gg: "⋙", ggg: "⋙", gimel: "ℷ", GJcy: "Ѓ", gjcy: "ѓ", gla: "⪥", gl: "≷", glE: "⪒", glj: "⪤", gnap: "⪊", gnapprox: "⪊", gne: "⪈", gnE: "≩", gneq: "⪈", gneqq: "≩", gnsim: "⋧", Gopf: "𝔾", gopf: "𝕘", grave: "`", GreaterEqual: "≥", GreaterEqualLess: "⋛", GreaterFullEqual: "≧", GreaterGreater: "⪢", GreaterLess: "≷", GreaterSlantEqual: "⩾", GreaterTilde: "≳", Gscr: "𝒢", gscr: "ℊ", gsim: "≳", gsime: "⪎", gsiml: "⪐", gtcc: "⪧", gtcir: "⩺", gt: ">", GT: ">", Gt: "≫", gtdot: "⋗", gtlPar: "⦕", gtquest: "⩼", gtrapprox: "⪆", gtrarr: "⥸", gtrdot: "⋗", gtreqless: "⋛", gtreqqless: "⪌", gtrless: "≷", gtrsim: "≳", gvertneqq: "≩︀", gvnE: "≩︀", Hacek: "ˇ", hairsp: " ", half: "½", hamilt: "ℋ", HARDcy: "Ъ", hardcy: "ъ", harrcir: "⥈", harr: "↔", hArr: "⇔", harrw: "↭", Hat: "^", hbar: "ℏ", Hcirc: "Ĥ", hcirc: "ĥ", hearts: "♥", heartsuit: "♥", hellip: "…", hercon: "⊹", hfr: "𝔥", Hfr: "ℌ", HilbertSpace: "ℋ", hksearow: "⤥", hkswarow: "⤦", hoarr: "⇿", homtht: "∻", hookleftarrow: "↩", hookrightarrow: "↪", hopf: "𝕙", Hopf: "ℍ", horbar: "―", HorizontalLine: "─", hscr: "𝒽", Hscr: "ℋ", hslash: "ℏ", Hstrok: "Ħ", hstrok: "ħ", HumpDownHump: "≎", HumpEqual: "≏", hybull: "⁃", hyphen: "‐", Iacute: "Í", iacute: "í", ic: "\u2063", Icirc: "Î", icirc: "î", Icy: "И", icy: "и", Idot: "İ", IEcy: "Е", iecy: "е", iexcl: "¡", iff: "⇔", ifr: "𝔦", Ifr: "ℑ", Igrave: "Ì", igrave: "ì", ii: "ⅈ", iiiint: "⨌", iiint: "∭", iinfin: "⧜", iiota: "℩", IJlig: "IJ", ijlig: "ij", Imacr: "Ī", imacr: "ī", image: "ℑ", ImaginaryI: "ⅈ", imagline: "ℐ", imagpart: "ℑ", imath: "ı", Im: "ℑ", imof: "⊷", imped: "Ƶ", Implies: "⇒", incare: "℅", in: "∈", infin: "∞", infintie: "⧝", inodot: "ı", intcal: "⊺", int: "∫", Int: "∬", integers: "ℤ", Integral: "∫", intercal: "⊺", Intersection: "⋂", intlarhk: "⨗", intprod: "⨼", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "Ё", iocy: "ё", Iogon: "Į", iogon: "į", Iopf: "𝕀", iopf: "𝕚", Iota: "Ι", iota: "ι", iprod: "⨼", iquest: "¿", iscr: "𝒾", Iscr: "ℐ", isin: "∈", isindot: "⋵", isinE: "⋹", isins: "⋴", isinsv: "⋳", isinv: "∈", it: "\u2062", Itilde: "Ĩ", itilde: "ĩ", Iukcy: "І", iukcy: "і", Iuml: "Ï", iuml: "ï", Jcirc: "Ĵ", jcirc: "ĵ", Jcy: "Й", jcy: "й", Jfr: "𝔍", jfr: "𝔧", jmath: "ȷ", Jopf: "𝕁", jopf: "𝕛", Jscr: "𝒥", jscr: "𝒿", Jsercy: "Ј", jsercy: "ј", Jukcy: "Є", jukcy: "є", Kappa: "Κ", kappa: "κ", kappav: "ϰ", Kcedil: "Ķ", kcedil: "ķ", Kcy: "К", kcy: "к", Kfr: "𝔎", kfr: "𝔨", kgreen: "ĸ", KHcy: "Х", khcy: "х", KJcy: "Ќ", kjcy: "ќ", Kopf: "𝕂", kopf: "𝕜", Kscr: "𝒦", kscr: "𝓀", lAarr: "⇚", Lacute: "Ĺ", lacute: "ĺ", laemptyv: "⦴", lagran: "ℒ", Lambda: "Λ", lambda: "λ", lang: "⟨", Lang: "⟪", langd: "⦑", langle: "⟨", lap: "⪅", Laplacetrf: "ℒ", laquo: "«", larrb: "⇤", larrbfs: "⤟", larr: "←", Larr: "↞", lArr: "⇐", larrfs: "⤝", larrhk: "↩", larrlp: "↫", larrpl: "⤹", larrsim: "⥳", larrtl: "↢", latail: "⤙", lAtail: "⤛", lat: "⪫", late: "⪭", lates: "⪭︀", lbarr: "⤌", lBarr: "⤎", lbbrk: "❲", lbrace: "{", lbrack: "[", lbrke: "⦋", lbrksld: "⦏", lbrkslu: "⦍", Lcaron: "Ľ", lcaron: "ľ", Lcedil: "Ļ", lcedil: "ļ", lceil: "⌈", lcub: "{", Lcy: "Л", lcy: "л", ldca: "⤶", ldquo: "“", ldquor: "„", ldrdhar: "⥧", ldrushar: "⥋", ldsh: "↲", le: "≤", lE: "≦", LeftAngleBracket: "⟨", LeftArrowBar: "⇤", leftarrow: "←", LeftArrow: "←", Leftarrow: "⇐", LeftArrowRightArrow: "⇆", leftarrowtail: "↢", LeftCeiling: "⌈", LeftDoubleBracket: "⟦", LeftDownTeeVector: "⥡", LeftDownVectorBar: "⥙", LeftDownVector: "⇃", LeftFloor: "⌊", leftharpoondown: "↽", leftharpoonup: "↼", leftleftarrows: "⇇", leftrightarrow: "↔", LeftRightArrow: "↔", Leftrightarrow: "⇔", leftrightarrows: "⇆", leftrightharpoons: "⇋", leftrightsquigarrow: "↭", LeftRightVector: "⥎", LeftTeeArrow: "↤", LeftTee: "⊣", LeftTeeVector: "⥚", leftthreetimes: "⋋", LeftTriangleBar: "⧏", LeftTriangle: "⊲", LeftTriangleEqual: "⊴", LeftUpDownVector: "⥑", LeftUpTeeVector: "⥠", LeftUpVectorBar: "⥘", LeftUpVector: "↿", LeftVectorBar: "⥒", LeftVector: "↼", lEg: "⪋", leg: "⋚", leq: "≤", leqq: "≦", leqslant: "⩽", lescc: "⪨", les: "⩽", lesdot: "⩿", lesdoto: "⪁", lesdotor: "⪃", lesg: "⋚︀", lesges: "⪓", lessapprox: "⪅", lessdot: "⋖", lesseqgtr: "⋚", lesseqqgtr: "⪋", LessEqualGreater: "⋚", LessFullEqual: "≦", LessGreater: "≶", lessgtr: "≶", LessLess: "⪡", lesssim: "≲", LessSlantEqual: "⩽", LessTilde: "≲", lfisht: "⥼", lfloor: "⌊", Lfr: "𝔏", lfr: "𝔩", lg: "≶", lgE: "⪑", lHar: "⥢", lhard: "↽", lharu: "↼", lharul: "⥪", lhblk: "▄", LJcy: "Љ", ljcy: "љ", llarr: "⇇", ll: "≪", Ll: "⋘", llcorner: "⌞", Lleftarrow: "⇚", llhard: "⥫", lltri: "◺", Lmidot: "Ŀ", lmidot: "ŀ", lmoustache: "⎰", lmoust: "⎰", lnap: "⪉", lnapprox: "⪉", lne: "⪇", lnE: "≨", lneq: "⪇", lneqq: "≨", lnsim: "⋦", loang: "⟬", loarr: "⇽", lobrk: "⟦", longleftarrow: "⟵", LongLeftArrow: "⟵", Longleftarrow: "⟸", longleftrightarrow: "⟷", LongLeftRightArrow: "⟷", Longleftrightarrow: "⟺", longmapsto: "⟼", longrightarrow: "⟶", LongRightArrow: "⟶", Longrightarrow: "⟹", looparrowleft: "↫", looparrowright: "↬", lopar: "⦅", Lopf: "𝕃", lopf: "𝕝", loplus: "⨭", lotimes: "⨴", lowast: "∗", lowbar: "_", LowerLeftArrow: "↙", LowerRightArrow: "↘", loz: "◊", lozenge: "◊", lozf: "⧫", lpar: "(", lparlt: "⦓", lrarr: "⇆", lrcorner: "⌟", lrhar: "⇋", lrhard: "⥭", lrm: "\u200e", lrtri: "⊿", lsaquo: "‹", lscr: "𝓁", Lscr: "ℒ", lsh: "↰", Lsh: "↰", lsim: "≲", lsime: "⪍", lsimg: "⪏", lsqb: "[", lsquo: "‘", lsquor: "‚", Lstrok: "Ł", lstrok: "ł", ltcc: "⪦", ltcir: "⩹", lt: "<", LT: "<", Lt: "≪", ltdot: "⋖", lthree: "⋋", ltimes: "⋉", ltlarr: "⥶", ltquest: "⩻", ltri: "◃", ltrie: "⊴", ltrif: "◂", ltrPar: "⦖", lurdshar: "⥊", luruhar: "⥦", lvertneqq: "≨︀", lvnE: "≨︀", macr: "¯", male: "♂", malt: "✠", maltese: "✠", Map: "⤅", map: "↦", mapsto: "↦", mapstodown: "↧", mapstoleft: "↤", mapstoup: "↥", marker: "▮", mcomma: "⨩", Mcy: "М", mcy: "м", mdash: "—", mDDot: "∺", measuredangle: "∡", MediumSpace: " ", Mellintrf: "ℳ", Mfr: "𝔐", mfr: "𝔪", mho: "℧", micro: "µ", midast: "*", midcir: "⫰", mid: "∣", middot: "·", minusb: "⊟", minus: "−", minusd: "∸", minusdu: "⨪", MinusPlus: "∓", mlcp: "⫛", mldr: "…", mnplus: "∓", models: "⊧", Mopf: "𝕄", mopf: "𝕞", mp: "∓", mscr: "𝓂", Mscr: "ℳ", mstpos: "∾", Mu: "Μ", mu: "μ", multimap: "⊸", mumap: "⊸", nabla: "∇", Nacute: "Ń", nacute: "ń", nang: "∠⃒", nap: "≉", napE: "⩰̸", napid: "≋̸", napos: "ʼn", napprox: "≉", natural: "♮", naturals: "ℕ", natur: "♮", nbsp: " ", nbump: "≎̸", nbumpe: "≏̸", ncap: "⩃", Ncaron: "Ň", ncaron: "ň", Ncedil: "Ņ", ncedil: "ņ", ncong: "≇", ncongdot: "⩭̸", ncup: "⩂", Ncy: "Н", ncy: "н", ndash: "–", nearhk: "⤤", nearr: "↗", neArr: "⇗", nearrow: "↗", ne: "≠", nedot: "≐̸", NegativeMediumSpace: "​", NegativeThickSpace: "​", NegativeThinSpace: "​", NegativeVeryThinSpace: "​", nequiv: "≢", nesear: "⤨", nesim: "≂̸", NestedGreaterGreater: "≫", NestedLessLess: "≪", NewLine: "\u000a", nexist: "∄", nexists: "∄", Nfr: "𝔑", nfr: "𝔫", ngE: "≧̸", nge: "≱", ngeq: "≱", ngeqq: "≧̸", ngeqslant: "⩾̸", nges: "⩾̸", nGg: "⋙̸", ngsim: "≵", nGt: "≫⃒", ngt: "≯", ngtr: "≯", nGtv: "≫̸", nharr: "↮", nhArr: "⇎", nhpar: "⫲", ni: "∋", nis: "⋼", nisd: "⋺", niv: "∋", NJcy: "Њ", njcy: "њ", nlarr: "↚", nlArr: "⇍", nldr: "‥", nlE: "≦̸", nle: "≰", nleftarrow: "↚", nLeftarrow: "⇍", nleftrightarrow: "↮", nLeftrightarrow: "⇎", nleq: "≰", nleqq: "≦̸", nleqslant: "⩽̸", nles: "⩽̸", nless: "≮", nLl: "⋘̸", nlsim: "≴", nLt: "≪⃒", nlt: "≮", nltri: "⋪", nltrie: "⋬", nLtv: "≪̸", nmid: "∤", NoBreak: "\u2060", NonBreakingSpace: " ", nopf: "𝕟", Nopf: "ℕ", Not: "⫬", not: "¬", NotCongruent: "≢", NotCupCap: "≭", NotDoubleVerticalBar: "∦", NotElement: "∉", NotEqual: "≠", NotEqualTilde: "≂̸", NotExists: "∄", NotGreater: "≯", NotGreaterEqual: "≱", NotGreaterFullEqual: "≧̸", NotGreaterGreater: "≫̸", NotGreaterLess: "≹", NotGreaterSlantEqual: "⩾̸", NotGreaterTilde: "≵", NotHumpDownHump: "≎̸", NotHumpEqual: "≏̸", notin: "∉", notindot: "⋵̸", notinE: "⋹̸", notinva: "∉", notinvb: "⋷", notinvc: "⋶", NotLeftTriangleBar: "⧏̸", NotLeftTriangle: "⋪", NotLeftTriangleEqual: "⋬", NotLess: "≮", NotLessEqual: "≰", NotLessGreater: "≸", NotLessLess: "≪̸", NotLessSlantEqual: "⩽̸", NotLessTilde: "≴", NotNestedGreaterGreater: "⪢̸", NotNestedLessLess: "⪡̸", notni: "∌", notniva: "∌", notnivb: "⋾", notnivc: "⋽", NotPrecedes: "⊀", NotPrecedesEqual: "⪯̸", NotPrecedesSlantEqual: "⋠", NotReverseElement: "∌", NotRightTriangleBar: "⧐̸", NotRightTriangle: "⋫", NotRightTriangleEqual: "⋭", NotSquareSubset: "⊏̸", NotSquareSubsetEqual: "⋢", NotSquareSuperset: "⊐̸", NotSquareSupersetEqual: "⋣", NotSubset: "⊂⃒", NotSubsetEqual: "⊈", NotSucceeds: "⊁", NotSucceedsEqual: "⪰̸", NotSucceedsSlantEqual: "⋡", NotSucceedsTilde: "≿̸", NotSuperset: "⊃⃒", NotSupersetEqual: "⊉", NotTilde: "≁", NotTildeEqual: "≄", NotTildeFullEqual: "≇", NotTildeTilde: "≉", NotVerticalBar: "∤", nparallel: "∦", npar: "∦", nparsl: "⫽⃥", npart: "∂̸", npolint: "⨔", npr: "⊀", nprcue: "⋠", nprec: "⊀", npreceq: "⪯̸", npre: "⪯̸", nrarrc: "⤳̸", nrarr: "↛", nrArr: "⇏", nrarrw: "↝̸", nrightarrow: "↛", nRightarrow: "⇏", nrtri: "⋫", nrtrie: "⋭", nsc: "⊁", nsccue: "⋡", nsce: "⪰̸", Nscr: "𝒩", nscr: "𝓃", nshortmid: "∤", nshortparallel: "∦", nsim: "≁", nsime: "≄", nsimeq: "≄", nsmid: "∤", nspar: "∦", nsqsube: "⋢", nsqsupe: "⋣", nsub: "⊄", nsubE: "⫅̸", nsube: "⊈", nsubset: "⊂⃒", nsubseteq: "⊈", nsubseteqq: "⫅̸", nsucc: "⊁", nsucceq: "⪰̸", nsup: "⊅", nsupE: "⫆̸", nsupe: "⊉", nsupset: "⊃⃒", nsupseteq: "⊉", nsupseteqq: "⫆̸", ntgl: "≹", Ntilde: "Ñ", ntilde: "ñ", ntlg: "≸", ntriangleleft: "⋪", ntrianglelefteq: "⋬", ntriangleright: "⋫", ntrianglerighteq: "⋭", Nu: "Ν", nu: "ν", num: "#", numero: "№", numsp: " ", nvap: "≍⃒", nvdash: "⊬", nvDash: "⊭", nVdash: "⊮", nVDash: "⊯", nvge: "≥⃒", nvgt: ">⃒", nvHarr: "⤄", nvinfin: "⧞", nvlArr: "⤂", nvle: "≤⃒", nvlt: "<⃒", nvltrie: "⊴⃒", nvrArr: "⤃", nvrtrie: "⊵⃒", nvsim: "∼⃒", nwarhk: "⤣", nwarr: "↖", nwArr: "⇖", nwarrow: "↖", nwnear: "⤧", Oacute: "Ó", oacute: "ó", oast: "⊛", Ocirc: "Ô", ocirc: "ô", ocir: "⊚", Ocy: "О", ocy: "о", odash: "⊝", Odblac: "Ő", odblac: "ő", odiv: "⨸", odot: "⊙", odsold: "⦼", OElig: "Œ", oelig: "œ", ofcir: "⦿", Ofr: "𝔒", ofr: "𝔬", ogon: "˛", Ograve: "Ò", ograve: "ò", ogt: "⧁", ohbar: "⦵", ohm: "Ω", oint: "∮", olarr: "↺", olcir: "⦾", olcross: "⦻", oline: "‾", olt: "⧀", Omacr: "Ō", omacr: "ō", Omega: "Ω", omega: "ω", Omicron: "Ο", omicron: "ο", omid: "⦶", ominus: "⊖", Oopf: "𝕆", oopf: "𝕠", opar: "⦷", OpenCurlyDoubleQuote: "“", OpenCurlyQuote: "‘", operp: "⦹", oplus: "⊕", orarr: "↻", Or: "⩔", or: "∨", ord: "⩝", order: "ℴ", orderof: "ℴ", ordf: "ª", ordm: "º", origof: "⊶", oror: "⩖", orslope: "⩗", orv: "⩛", oS: "Ⓢ", Oscr: "𝒪", oscr: "ℴ", Oslash: "Ø", oslash: "ø", osol: "⊘", Otilde: "Õ", otilde: "õ", otimesas: "⨶", Otimes: "⨷", otimes: "⊗", Ouml: "Ö", ouml: "ö", ovbar: "⌽", OverBar: "‾", OverBrace: "⏞", OverBracket: "⎴", OverParenthesis: "⏜", para: "¶", parallel: "∥", par: "∥", parsim: "⫳", parsl: "⫽", part: "∂", PartialD: "∂", Pcy: "П", pcy: "п", percnt: "%", period: ".", permil: "‰", perp: "⊥", pertenk: "‱", Pfr: "𝔓", pfr: "𝔭", Phi: "Φ", phi: "φ", phiv: "ϕ", phmmat: "ℳ", phone: "☎", Pi: "Π", pi: "π", pitchfork: "⋔", piv: "ϖ", planck: "ℏ", planckh: "ℎ", plankv: "ℏ", plusacir: "⨣", plusb: "⊞", pluscir: "⨢", plus: "+", plusdo: "∔", plusdu: "⨥", pluse: "⩲", PlusMinus: "±", plusmn: "±", plussim: "⨦", plustwo: "⨧", pm: "±", Poincareplane: "ℌ", pointint: "⨕", popf: "𝕡", Popf: "ℙ", pound: "£", prap: "⪷", Pr: "⪻", pr: "≺", prcue: "≼", precapprox: "⪷", prec: "≺", preccurlyeq: "≼", Precedes: "≺", PrecedesEqual: "⪯", PrecedesSlantEqual: "≼", PrecedesTilde: "≾", preceq: "⪯", precnapprox: "⪹", precneqq: "⪵", precnsim: "⋨", pre: "⪯", prE: "⪳", precsim: "≾", prime: "′", Prime: "″", primes: "ℙ", prnap: "⪹", prnE: "⪵", prnsim: "⋨", prod: "∏", Product: "∏", profalar: "⌮", profline: "⌒", profsurf: "⌓", prop: "∝", Proportional: "∝", Proportion: "∷", propto: "∝", prsim: "≾", prurel: "⊰", Pscr: "𝒫", pscr: "𝓅", Psi: "Ψ", psi: "ψ", puncsp: " ", Qfr: "𝔔", qfr: "𝔮", qint: "⨌", qopf: "𝕢", Qopf: "ℚ", qprime: "⁗", Qscr: "𝒬", qscr: "𝓆", quaternions: "ℍ", quatint: "⨖", quest: "?", questeq: "≟", quot: "\"", QUOT: "\"", rAarr: "⇛", race: "∽̱", Racute: "Ŕ", racute: "ŕ", radic: "√", raemptyv: "⦳", rang: "⟩", Rang: "⟫", rangd: "⦒", range: "⦥", rangle: "⟩", raquo: "»", rarrap: "⥵", rarrb: "⇥", rarrbfs: "⤠", rarrc: "⤳", rarr: "→", Rarr: "↠", rArr: "⇒", rarrfs: "⤞", rarrhk: "↪", rarrlp: "↬", rarrpl: "⥅", rarrsim: "⥴", Rarrtl: "⤖", rarrtl: "↣", rarrw: "↝", ratail: "⤚", rAtail: "⤜", ratio: "∶", rationals: "ℚ", rbarr: "⤍", rBarr: "⤏", RBarr: "⤐", rbbrk: "❳", rbrace: "}", rbrack: "]", rbrke: "⦌", rbrksld: "⦎", rbrkslu: "⦐", Rcaron: "Ř", rcaron: "ř", Rcedil: "Ŗ", rcedil: "ŗ", rceil: "⌉", rcub: "}", Rcy: "Р", rcy: "р", rdca: "⤷", rdldhar: "⥩", rdquo: "”", rdquor: "”", rdsh: "↳", real: "ℜ", realine: "ℛ", realpart: "ℜ", reals: "ℝ", Re: "ℜ", rect: "▭", reg: "®", REG: "®", ReverseElement: "∋", ReverseEquilibrium: "⇋", ReverseUpEquilibrium: "⥯", rfisht: "⥽", rfloor: "⌋", rfr: "𝔯", Rfr: "ℜ", rHar: "⥤", rhard: "⇁", rharu: "⇀", rharul: "⥬", Rho: "Ρ", rho: "ρ", rhov: "ϱ", RightAngleBracket: "⟩", RightArrowBar: "⇥", rightarrow: "→", RightArrow: "→", Rightarrow: "⇒", RightArrowLeftArrow: "⇄", rightarrowtail: "↣", RightCeiling: "⌉", RightDoubleBracket: "⟧", RightDownTeeVector: "⥝", RightDownVectorBar: "⥕", RightDownVector: "⇂", RightFloor: "⌋", rightharpoondown: "⇁", rightharpoonup: "⇀", rightleftarrows: "⇄", rightleftharpoons: "⇌", rightrightarrows: "⇉", rightsquigarrow: "↝", RightTeeArrow: "↦", RightTee: "⊢", RightTeeVector: "⥛", rightthreetimes: "⋌", RightTriangleBar: "⧐", RightTriangle: "⊳", RightTriangleEqual: "⊵", RightUpDownVector: "⥏", RightUpTeeVector: "⥜", RightUpVectorBar: "⥔", RightUpVector: "↾", RightVectorBar: "⥓", RightVector: "⇀", ring: "˚", risingdotseq: "≓", rlarr: "⇄", rlhar: "⇌", rlm: "\u200f", rmoustache: "⎱", rmoust: "⎱", rnmid: "⫮", roang: "⟭", roarr: "⇾", robrk: "⟧", ropar: "⦆", ropf: "𝕣", Ropf: "ℝ", roplus: "⨮", rotimes: "⨵", RoundImplies: "⥰", rpar: ")", rpargt: "⦔", rppolint: "⨒", rrarr: "⇉", Rrightarrow: "⇛", rsaquo: "›", rscr: "𝓇", Rscr: "ℛ", rsh: "↱", Rsh: "↱", rsqb: "]", rsquo: "’", rsquor: "’", rthree: "⋌", rtimes: "⋊", rtri: "▹", rtrie: "⊵", rtrif: "▸", rtriltri: "⧎", RuleDelayed: "⧴", ruluhar: "⥨", rx: "℞", Sacute: "Ś", sacute: "ś", sbquo: "‚", scap: "⪸", Scaron: "Š", scaron: "š", Sc: "⪼", sc: "≻", sccue: "≽", sce: "⪰", scE: "⪴", Scedil: "Ş", scedil: "ş", Scirc: "Ŝ", scirc: "ŝ", scnap: "⪺", scnE: "⪶", scnsim: "⋩", scpolint: "⨓", scsim: "≿", Scy: "С", scy: "с", sdotb: "⊡", sdot: "⋅", sdote: "⩦", searhk: "⤥", searr: "↘", seArr: "⇘", searrow: "↘", sect: "§", semi: ";", seswar: "⤩", setminus: "∖", setmn: "∖", sext: "✶", Sfr: "𝔖", sfr: "𝔰", sfrown: "⌢", sharp: "♯", SHCHcy: "Щ", shchcy: "щ", SHcy: "Ш", shcy: "ш", ShortDownArrow: "↓", ShortLeftArrow: "←", shortmid: "∣", shortparallel: "∥", ShortRightArrow: "→", ShortUpArrow: "↑", shy: "\u00ad", Sigma: "Σ", sigma: "σ", sigmaf: "ς", sigmav: "ς", sim: "∼", simdot: "⩪", sime: "≃", simeq: "≃", simg: "⪞", simgE: "⪠", siml: "⪝", simlE: "⪟", simne: "≆", simplus: "⨤", simrarr: "⥲", slarr: "←", SmallCircle: "∘", smallsetminus: "∖", smashp: "⨳", smeparsl: "⧤", smid: "∣", smile: "⌣", smt: "⪪", smte: "⪬", smtes: "⪬︀", SOFTcy: "Ь", softcy: "ь", solbar: "⌿", solb: "⧄", sol: "/", Sopf: "𝕊", sopf: "𝕤", spades: "♠", spadesuit: "♠", spar: "∥", sqcap: "⊓", sqcaps: "⊓︀", sqcup: "⊔", sqcups: "⊔︀", Sqrt: "√", sqsub: "⊏", sqsube: "⊑", sqsubset: "⊏", sqsubseteq: "⊑", sqsup: "⊐", sqsupe: "⊒", sqsupset: "⊐", sqsupseteq: "⊒", square: "□", Square: "□", SquareIntersection: "⊓", SquareSubset: "⊏", SquareSubsetEqual: "⊑", SquareSuperset: "⊐", SquareSupersetEqual: "⊒", SquareUnion: "⊔", squarf: "▪", squ: "□", squf: "▪", srarr: "→", Sscr: "𝒮", sscr: "𝓈", ssetmn: "∖", ssmile: "⌣", sstarf: "⋆", Star: "⋆", star: "☆", starf: "★", straightepsilon: "ϵ", straightphi: "ϕ", strns: "¯", sub: "⊂", Sub: "⋐", subdot: "⪽", subE: "⫅", sube: "⊆", subedot: "⫃", submult: "⫁", subnE: "⫋", subne: "⊊", subplus: "⪿", subrarr: "⥹", subset: "⊂", Subset: "⋐", subseteq: "⊆", subseteqq: "⫅", SubsetEqual: "⊆", subsetneq: "⊊", subsetneqq: "⫋", subsim: "⫇", subsub: "⫕", subsup: "⫓", succapprox: "⪸", succ: "≻", succcurlyeq: "≽", Succeeds: "≻", SucceedsEqual: "⪰", SucceedsSlantEqual: "≽", SucceedsTilde: "≿", succeq: "⪰", succnapprox: "⪺", succneqq: "⪶", succnsim: "⋩", succsim: "≿", SuchThat: "∋", sum: "∑", Sum: "∑", sung: "♪", sup1: "¹", sup2: "²", sup3: "³", sup: "⊃", Sup: "⋑", supdot: "⪾", supdsub: "⫘", supE: "⫆", supe: "⊇", supedot: "⫄", Superset: "⊃", SupersetEqual: "⊇", suphsol: "⟉", suphsub: "⫗", suplarr: "⥻", supmult: "⫂", supnE: "⫌", supne: "⊋", supplus: "⫀", supset: "⊃", Supset: "⋑", supseteq: "⊇", supseteqq: "⫆", supsetneq: "⊋", supsetneqq: "⫌", supsim: "⫈", supsub: "⫔", supsup: "⫖", swarhk: "⤦", swarr: "↙", swArr: "⇙", swarrow: "↙", swnwar: "⤪", szlig: "ß", Tab: "\u0009", target: "⌖", Tau: "Τ", tau: "τ", tbrk: "⎴", Tcaron: "Ť", tcaron: "ť", Tcedil: "Ţ", tcedil: "ţ", Tcy: "Т", tcy: "т", tdot: "⃛", telrec: "⌕", Tfr: "𝔗", tfr: "𝔱", there4: "∴", therefore: "∴", Therefore: "∴", Theta: "Θ", theta: "θ", thetasym: "ϑ", thetav: "ϑ", thickapprox: "≈", thicksim: "∼", ThickSpace: "  ", ThinSpace: " ", thinsp: " ", thkap: "≈", thksim: "∼", THORN: "Þ", thorn: "þ", tilde: "˜", Tilde: "∼", TildeEqual: "≃", TildeFullEqual: "≅", TildeTilde: "≈", timesbar: "⨱", timesb: "⊠", times: "×", timesd: "⨰", tint: "∭", toea: "⤨", topbot: "⌶", topcir: "⫱", top: "⊤", Topf: "𝕋", topf: "𝕥", topfork: "⫚", tosa: "⤩", tprime: "‴", trade: "™", TRADE: "™", triangle: "▵", triangledown: "▿", triangleleft: "◃", trianglelefteq: "⊴", triangleq: "≜", triangleright: "▹", trianglerighteq: "⊵", tridot: "◬", trie: "≜", triminus: "⨺", TripleDot: "⃛", triplus: "⨹", trisb: "⧍", tritime: "⨻", trpezium: "⏢", Tscr: "𝒯", tscr: "𝓉", TScy: "Ц", tscy: "ц", TSHcy: "Ћ", tshcy: "ћ", Tstrok: "Ŧ", tstrok: "ŧ", twixt: "≬", twoheadleftarrow: "↞", twoheadrightarrow: "↠", Uacute: "Ú", uacute: "ú", uarr: "↑", Uarr: "↟", uArr: "⇑", Uarrocir: "⥉", Ubrcy: "Ў", ubrcy: "ў", Ubreve: "Ŭ", ubreve: "ŭ", Ucirc: "Û", ucirc: "û", Ucy: "У", ucy: "у", udarr: "⇅", Udblac: "Ű", udblac: "ű", udhar: "⥮", ufisht: "⥾", Ufr: "𝔘", ufr: "𝔲", Ugrave: "Ù", ugrave: "ù", uHar: "⥣", uharl: "↿", uharr: "↾", uhblk: "▀", ulcorn: "⌜", ulcorner: "⌜", ulcrop: "⌏", ultri: "◸", Umacr: "Ū", umacr: "ū", uml: "¨", UnderBar: "_", UnderBrace: "⏟", UnderBracket: "⎵", UnderParenthesis: "⏝", Union: "⋃", UnionPlus: "⊎", Uogon: "Ų", uogon: "ų", Uopf: "𝕌", uopf: "𝕦", UpArrowBar: "⤒", uparrow: "↑", UpArrow: "↑", Uparrow: "⇑", UpArrowDownArrow: "⇅", updownarrow: "↕", UpDownArrow: "↕", Updownarrow: "⇕", UpEquilibrium: "⥮", upharpoonleft: "↿", upharpoonright: "↾", uplus: "⊎", UpperLeftArrow: "↖", UpperRightArrow: "↗", upsi: "υ", Upsi: "ϒ", upsih: "ϒ", Upsilon: "Υ", upsilon: "υ", UpTeeArrow: "↥", UpTee: "⊥", upuparrows: "⇈", urcorn: "⌝", urcorner: "⌝", urcrop: "⌎", Uring: "Ů", uring: "ů", urtri: "◹", Uscr: "𝒰", uscr: "𝓊", utdot: "⋰", Utilde: "Ũ", utilde: "ũ", utri: "▵", utrif: "▴", uuarr: "⇈", Uuml: "Ü", uuml: "ü", uwangle: "⦧", vangrt: "⦜", varepsilon: "ϵ", varkappa: "ϰ", varnothing: "∅", varphi: "ϕ", varpi: "ϖ", varpropto: "∝", varr: "↕", vArr: "⇕", varrho: "ϱ", varsigma: "ς", varsubsetneq: "⊊︀", varsubsetneqq: "⫋︀", varsupsetneq: "⊋︀", varsupsetneqq: "⫌︀", vartheta: "ϑ", vartriangleleft: "⊲", vartriangleright: "⊳", vBar: "⫨", Vbar: "⫫", vBarv: "⫩", Vcy: "В", vcy: "в", vdash: "⊢", vDash: "⊨", Vdash: "⊩", VDash: "⊫", Vdashl: "⫦", veebar: "⊻", vee: "∨", Vee: "⋁", veeeq: "≚", vellip: "⋮", verbar: "|", Verbar: "‖", vert: "|", Vert: "‖", VerticalBar: "∣", VerticalLine: "|", VerticalSeparator: "❘", VerticalTilde: "≀", VeryThinSpace: " ", Vfr: "𝔙", vfr: "𝔳", vltri: "⊲", vnsub: "⊂⃒", vnsup: "⊃⃒", Vopf: "𝕍", vopf: "𝕧", vprop: "∝", vrtri: "⊳", Vscr: "𝒱", vscr: "𝓋", vsubnE: "⫋︀", vsubne: "⊊︀", vsupnE: "⫌︀", vsupne: "⊋︀", Vvdash: "⊪", vzigzag: "⦚", Wcirc: "Ŵ", wcirc: "ŵ", wedbar: "⩟", wedge: "∧", Wedge: "⋀", wedgeq: "≙", weierp: "℘", Wfr: "𝔚", wfr: "𝔴", Wopf: "𝕎", wopf: "𝕨", wp: "℘", wr: "≀", wreath: "≀", Wscr: "𝒲", wscr: "𝓌", xcap: "⋂", xcirc: "◯", xcup: "⋃", xdtri: "▽", Xfr: "𝔛", xfr: "𝔵", xharr: "⟷", xhArr: "⟺", Xi: "Ξ", xi: "ξ", xlarr: "⟵", xlArr: "⟸", xmap: "⟼", xnis: "⋻", xodot: "⨀", Xopf: "𝕏", xopf: "𝕩", xoplus: "⨁", xotime: "⨂", xrarr: "⟶", xrArr: "⟹", Xscr: "𝒳", xscr: "𝓍", xsqcup: "⨆", xuplus: "⨄", xutri: "△", xvee: "⋁", xwedge: "⋀", Yacute: "Ý", yacute: "ý", YAcy: "Я", yacy: "я", Ycirc: "Ŷ", ycirc: "ŷ", Ycy: "Ы", ycy: "ы", yen: "¥", Yfr: "𝔜", yfr: "𝔶", YIcy: "Ї", yicy: "ї", Yopf: "𝕐", yopf: "𝕪", Yscr: "𝒴", yscr: "𝓎", YUcy: "Ю", yucy: "ю", yuml: "ÿ", Yuml: "Ÿ", Zacute: "Ź", zacute: "ź", Zcaron: "Ž", zcaron: "ž", Zcy: "З", zcy: "з", Zdot: "Ż", zdot: "ż", zeetrf: "ℨ", ZeroWidthSpace: "​", Zeta: "Ζ", zeta: "ζ", zfr: "𝔷", Zfr: "ℨ", ZHcy: "Ж", zhcy: "ж", zigrarr: "⇝", zopf: "𝕫", Zopf: "ℤ", Zscr: "𝒵", zscr: "𝓏", zwj: "\u200d", zwnj: "\u200c"
8151  };
8152  
8153  var HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/;
8154  var CHARCODE = /^#([0-9]+)$/;
8155  var NAMED = /^([A-Za-z0-9]+)$/;
8156  var EntityParser = /** @class */ (function () {
8157      function EntityParser(named) {
8158          this.named = named;
8159      }
8160      EntityParser.prototype.parse = function (entity) {
8161          if (!entity) {
8162              return;
8163          }
8164          var matches = entity.match(HEXCHARCODE);
8165          if (matches) {
8166              return String.fromCharCode(parseInt(matches[1], 16));
8167          }
8168          matches = entity.match(CHARCODE);
8169          if (matches) {
8170              return String.fromCharCode(parseInt(matches[1], 10));
8171          }
8172          matches = entity.match(NAMED);
8173          if (matches) {
8174              return this.named[matches[1]];
8175          }
8176      };
8177      return EntityParser;
8178  }());
8179  
8180  var WSP = /[\t\n\f ]/;
8181  var ALPHA = /[A-Za-z]/;
8182  var CRLF = /\r\n?/g;
8183  function isSpace(char) {
8184      return WSP.test(char);
8185  }
8186  function isAlpha(char) {
8187      return ALPHA.test(char);
8188  }
8189  function preprocessInput(input) {
8190      return input.replace(CRLF, '\n');
8191  }
8192  
8193  var EventedTokenizer = /** @class */ (function () {
8194      function EventedTokenizer(delegate, entityParser) {
8195          this.delegate = delegate;
8196          this.entityParser = entityParser;
8197          this.state = "beforeData" /* beforeData */;
8198          this.line = -1;
8199          this.column = -1;
8200          this.input = '';
8201          this.index = -1;
8202          this.tagNameBuffer = '';
8203          this.states = {
8204              beforeData: function () {
8205                  var char = this.peek();
8206                  if (char === '<' && !this.isIgnoredEndTag()) {
8207                      this.transitionTo("tagOpen" /* tagOpen */);
8208                      this.markTagStart();
8209                      this.consume();
8210                  }
8211                  else {
8212                      if (char === '\n') {
8213                          var tag = this.tagNameBuffer.toLowerCase();
8214                          if (tag === 'pre' || tag === 'textarea') {
8215                              this.consume();
8216                          }
8217                      }
8218                      this.transitionTo("data" /* data */);
8219                      this.delegate.beginData();
8220                  }
8221              },
8222              data: function () {
8223                  var char = this.peek();
8224                  var tag = this.tagNameBuffer;
8225                  if (char === '<' && !this.isIgnoredEndTag()) {
8226                      this.delegate.finishData();
8227                      this.transitionTo("tagOpen" /* tagOpen */);
8228                      this.markTagStart();
8229                      this.consume();
8230                  }
8231                  else if (char === '&' && tag !== 'script' && tag !== 'style') {
8232                      this.consume();
8233                      this.delegate.appendToData(this.consumeCharRef() || '&');
8234                  }
8235                  else {
8236                      this.consume();
8237                      this.delegate.appendToData(char);
8238                  }
8239              },
8240              tagOpen: function () {
8241                  var char = this.consume();
8242                  if (char === '!') {
8243                      this.transitionTo("markupDeclarationOpen" /* markupDeclarationOpen */);
8244                  }
8245                  else if (char === '/') {
8246                      this.transitionTo("endTagOpen" /* endTagOpen */);
8247                  }
8248                  else if (char === '@' || char === ':' || isAlpha(char)) {
8249                      this.transitionTo("tagName" /* tagName */);
8250                      this.tagNameBuffer = '';
8251                      this.delegate.beginStartTag();
8252                      this.appendToTagName(char);
8253                  }
8254              },
8255              markupDeclarationOpen: function () {
8256                  var char = this.consume();
8257                  if (char === '-' && this.peek() === '-') {
8258                      this.consume();
8259                      this.transitionTo("commentStart" /* commentStart */);
8260                      this.delegate.beginComment();
8261                  }
8262              },
8263              commentStart: function () {
8264                  var char = this.consume();
8265                  if (char === '-') {
8266                      this.transitionTo("commentStartDash" /* commentStartDash */);
8267                  }
8268                  else if (char === '>') {
8269                      this.delegate.finishComment();
8270                      this.transitionTo("beforeData" /* beforeData */);
8271                  }
8272                  else {
8273                      this.delegate.appendToCommentData(char);
8274                      this.transitionTo("comment" /* comment */);
8275                  }
8276              },
8277              commentStartDash: function () {
8278                  var char = this.consume();
8279                  if (char === '-') {
8280                      this.transitionTo("commentEnd" /* commentEnd */);
8281                  }
8282                  else if (char === '>') {
8283                      this.delegate.finishComment();
8284                      this.transitionTo("beforeData" /* beforeData */);
8285                  }
8286                  else {
8287                      this.delegate.appendToCommentData('-');
8288                      this.transitionTo("comment" /* comment */);
8289                  }
8290              },
8291              comment: function () {
8292                  var char = this.consume();
8293                  if (char === '-') {
8294                      this.transitionTo("commentEndDash" /* commentEndDash */);
8295                  }
8296                  else {
8297                      this.delegate.appendToCommentData(char);
8298                  }
8299              },
8300              commentEndDash: function () {
8301                  var char = this.consume();
8302                  if (char === '-') {
8303                      this.transitionTo("commentEnd" /* commentEnd */);
8304                  }
8305                  else {
8306                      this.delegate.appendToCommentData('-' + char);
8307                      this.transitionTo("comment" /* comment */);
8308                  }
8309              },
8310              commentEnd: function () {
8311                  var char = this.consume();
8312                  if (char === '>') {
8313                      this.delegate.finishComment();
8314                      this.transitionTo("beforeData" /* beforeData */);
8315                  }
8316                  else {
8317                      this.delegate.appendToCommentData('--' + char);
8318                      this.transitionTo("comment" /* comment */);
8319                  }
8320              },
8321              tagName: function () {
8322                  var char = this.consume();
8323                  if (isSpace(char)) {
8324                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
8325                  }
8326                  else if (char === '/') {
8327                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
8328                  }
8329                  else if (char === '>') {
8330                      this.delegate.finishTag();
8331                      this.transitionTo("beforeData" /* beforeData */);
8332                  }
8333                  else {
8334                      this.appendToTagName(char);
8335                  }
8336              },
8337              endTagName: function () {
8338                  var char = this.consume();
8339                  if (isSpace(char)) {
8340                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
8341                      this.tagNameBuffer = '';
8342                  }
8343                  else if (char === '/') {
8344                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
8345                      this.tagNameBuffer = '';
8346                  }
8347                  else if (char === '>') {
8348                      this.delegate.finishTag();
8349                      this.transitionTo("beforeData" /* beforeData */);
8350                      this.tagNameBuffer = '';
8351                  }
8352                  else {
8353                      this.appendToTagName(char);
8354                  }
8355              },
8356              beforeAttributeName: function () {
8357                  var char = this.peek();
8358                  if (isSpace(char)) {
8359                      this.consume();
8360                      return;
8361                  }
8362                  else if (char === '/') {
8363                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
8364                      this.consume();
8365                  }
8366                  else if (char === '>') {
8367                      this.consume();
8368                      this.delegate.finishTag();
8369                      this.transitionTo("beforeData" /* beforeData */);
8370                  }
8371                  else if (char === '=') {
8372                      this.delegate.reportSyntaxError('attribute name cannot start with equals sign');
8373                      this.transitionTo("attributeName" /* attributeName */);
8374                      this.delegate.beginAttribute();
8375                      this.consume();
8376                      this.delegate.appendToAttributeName(char);
8377                  }
8378                  else {
8379                      this.transitionTo("attributeName" /* attributeName */);
8380                      this.delegate.beginAttribute();
8381                  }
8382              },
8383              attributeName: function () {
8384                  var char = this.peek();
8385                  if (isSpace(char)) {
8386                      this.transitionTo("afterAttributeName" /* afterAttributeName */);
8387                      this.consume();
8388                  }
8389                  else if (char === '/') {
8390                      this.delegate.beginAttributeValue(false);
8391                      this.delegate.finishAttributeValue();
8392                      this.consume();
8393                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
8394                  }
8395                  else if (char === '=') {
8396                      this.transitionTo("beforeAttributeValue" /* beforeAttributeValue */);
8397                      this.consume();
8398                  }
8399                  else if (char === '>') {
8400                      this.delegate.beginAttributeValue(false);
8401                      this.delegate.finishAttributeValue();
8402                      this.consume();
8403                      this.delegate.finishTag();
8404                      this.transitionTo("beforeData" /* beforeData */);
8405                  }
8406                  else if (char === '"' || char === "'" || char === '<') {
8407                      this.delegate.reportSyntaxError(char + ' is not a valid character within attribute names');
8408                      this.consume();
8409                      this.delegate.appendToAttributeName(char);
8410                  }
8411                  else {
8412                      this.consume();
8413                      this.delegate.appendToAttributeName(char);
8414                  }
8415              },
8416              afterAttributeName: function () {
8417                  var char = this.peek();
8418                  if (isSpace(char)) {
8419                      this.consume();
8420                      return;
8421                  }
8422                  else if (char === '/') {
8423                      this.delegate.beginAttributeValue(false);
8424                      this.delegate.finishAttributeValue();
8425                      this.consume();
8426                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
8427                  }
8428                  else if (char === '=') {
8429                      this.consume();
8430                      this.transitionTo("beforeAttributeValue" /* beforeAttributeValue */);
8431                  }
8432                  else if (char === '>') {
8433                      this.delegate.beginAttributeValue(false);
8434                      this.delegate.finishAttributeValue();
8435                      this.consume();
8436                      this.delegate.finishTag();
8437                      this.transitionTo("beforeData" /* beforeData */);
8438                  }
8439                  else {
8440                      this.delegate.beginAttributeValue(false);
8441                      this.delegate.finishAttributeValue();
8442                      this.transitionTo("attributeName" /* attributeName */);
8443                      this.delegate.beginAttribute();
8444                      this.consume();
8445                      this.delegate.appendToAttributeName(char);
8446                  }
8447              },
8448              beforeAttributeValue: function () {
8449                  var char = this.peek();
8450                  if (isSpace(char)) {
8451                      this.consume();
8452                  }
8453                  else if (char === '"') {
8454                      this.transitionTo("attributeValueDoubleQuoted" /* attributeValueDoubleQuoted */);
8455                      this.delegate.beginAttributeValue(true);
8456                      this.consume();
8457                  }
8458                  else if (char === "'") {
8459                      this.transitionTo("attributeValueSingleQuoted" /* attributeValueSingleQuoted */);
8460                      this.delegate.beginAttributeValue(true);
8461                      this.consume();
8462                  }
8463                  else if (char === '>') {
8464                      this.delegate.beginAttributeValue(false);
8465                      this.delegate.finishAttributeValue();
8466                      this.consume();
8467                      this.delegate.finishTag();
8468                      this.transitionTo("beforeData" /* beforeData */);
8469                  }
8470                  else {
8471                      this.transitionTo("attributeValueUnquoted" /* attributeValueUnquoted */);
8472                      this.delegate.beginAttributeValue(false);
8473                      this.