[ Index ]

PHP Cross Reference of WordPress

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 = "0ATp");
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ "0ATp":
  91  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92  
  93  "use strict";
  94  // ESM COMPAT FLAG
  95  __webpack_require__.r(__webpack_exports__);
  96  
  97  // EXPORTS
  98  __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
  99  __webpack_require__.d(__webpack_exports__, "createBlock", function() { return /* reexport */ createBlock; });
 100  __webpack_require__.d(__webpack_exports__, "createBlocksFromInnerBlocksTemplate", function() { return /* reexport */ createBlocksFromInnerBlocksTemplate; });
 101  __webpack_require__.d(__webpack_exports__, "cloneBlock", function() { return /* reexport */ cloneBlock; });
 102  __webpack_require__.d(__webpack_exports__, "__experimentalCloneSanitizedBlock", function() { return /* reexport */ __experimentalCloneSanitizedBlock; });
 103  __webpack_require__.d(__webpack_exports__, "getPossibleBlockTransformations", function() { return /* reexport */ getPossibleBlockTransformations; });
 104  __webpack_require__.d(__webpack_exports__, "switchToBlockType", function() { return /* reexport */ switchToBlockType; });
 105  __webpack_require__.d(__webpack_exports__, "getBlockTransforms", function() { return /* reexport */ getBlockTransforms; });
 106  __webpack_require__.d(__webpack_exports__, "findTransform", function() { return /* reexport */ findTransform; });
 107  __webpack_require__.d(__webpack_exports__, "getBlockFromExample", function() { return /* reexport */ getBlockFromExample; });
 108  __webpack_require__.d(__webpack_exports__, "parse", function() { return /* reexport */ parser_parse; });
 109  __webpack_require__.d(__webpack_exports__, "getBlockAttributes", function() { return /* reexport */ getBlockAttributes; });
 110  __webpack_require__.d(__webpack_exports__, "parseWithAttributeSchema", function() { return /* reexport */ parseWithAttributeSchema; });
 111  __webpack_require__.d(__webpack_exports__, "pasteHandler", function() { return /* reexport */ pasteHandler; });
 112  __webpack_require__.d(__webpack_exports__, "rawHandler", function() { return /* reexport */ rawHandler; });
 113  __webpack_require__.d(__webpack_exports__, "getPhrasingContentSchema", function() { return /* reexport */ deprecatedGetPhrasingContentSchema; });
 114  __webpack_require__.d(__webpack_exports__, "serialize", function() { return /* reexport */ serialize; });
 115  __webpack_require__.d(__webpack_exports__, "getBlockContent", function() { return /* reexport */ getBlockInnerHTML; });
 116  __webpack_require__.d(__webpack_exports__, "getBlockDefaultClassName", function() { return /* reexport */ getBlockDefaultClassName; });
 117  __webpack_require__.d(__webpack_exports__, "getBlockMenuDefaultClassName", function() { return /* reexport */ getBlockMenuDefaultClassName; });
 118  __webpack_require__.d(__webpack_exports__, "getSaveElement", function() { return /* reexport */ getSaveElement; });
 119  __webpack_require__.d(__webpack_exports__, "getSaveContent", function() { return /* reexport */ getSaveContent; });
 120  __webpack_require__.d(__webpack_exports__, "__unstableGetBlockProps", function() { return /* reexport */ getBlockProps; });
 121  __webpack_require__.d(__webpack_exports__, "__unstableGetInnerBlocksProps", function() { return /* reexport */ getInnerBlocksProps; });
 122  __webpack_require__.d(__webpack_exports__, "__unstableSerializeAndClean", function() { return /* reexport */ __unstableSerializeAndClean; });
 123  __webpack_require__.d(__webpack_exports__, "isValidBlockContent", function() { return /* reexport */ isValidBlockContent; });
 124  __webpack_require__.d(__webpack_exports__, "getCategories", function() { return /* reexport */ categories_getCategories; });
 125  __webpack_require__.d(__webpack_exports__, "setCategories", function() { return /* reexport */ categories_setCategories; });
 126  __webpack_require__.d(__webpack_exports__, "updateCategory", function() { return /* reexport */ categories_updateCategory; });
 127  __webpack_require__.d(__webpack_exports__, "registerBlockType", function() { return /* reexport */ registerBlockType; });
 128  __webpack_require__.d(__webpack_exports__, "registerBlockCollection", function() { return /* reexport */ registerBlockCollection; });
 129  __webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return /* reexport */ unregisterBlockType; });
 130  __webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return /* reexport */ setFreeformContentHandlerName; });
 131  __webpack_require__.d(__webpack_exports__, "getFreeformContentHandlerName", function() { return /* reexport */ getFreeformContentHandlerName; });
 132  __webpack_require__.d(__webpack_exports__, "setUnregisteredTypeHandlerName", function() { return /* reexport */ setUnregisteredTypeHandlerName; });
 133  __webpack_require__.d(__webpack_exports__, "getUnregisteredTypeHandlerName", function() { return /* reexport */ getUnregisteredTypeHandlerName; });
 134  __webpack_require__.d(__webpack_exports__, "setDefaultBlockName", function() { return /* reexport */ setDefaultBlockName; });
 135  __webpack_require__.d(__webpack_exports__, "getDefaultBlockName", function() { return /* reexport */ registration_getDefaultBlockName; });
 136  __webpack_require__.d(__webpack_exports__, "setGroupingBlockName", function() { return /* reexport */ setGroupingBlockName; });
 137  __webpack_require__.d(__webpack_exports__, "getGroupingBlockName", function() { return /* reexport */ registration_getGroupingBlockName; });
 138  __webpack_require__.d(__webpack_exports__, "getBlockType", function() { return /* reexport */ registration_getBlockType; });
 139  __webpack_require__.d(__webpack_exports__, "getBlockTypes", function() { return /* reexport */ registration_getBlockTypes; });
 140  __webpack_require__.d(__webpack_exports__, "getBlockSupport", function() { return /* reexport */ registration_getBlockSupport; });
 141  __webpack_require__.d(__webpack_exports__, "hasBlockSupport", function() { return /* reexport */ registration_hasBlockSupport; });
 142  __webpack_require__.d(__webpack_exports__, "getBlockVariations", function() { return /* reexport */ registration_getBlockVariations; });
 143  __webpack_require__.d(__webpack_exports__, "isReusableBlock", function() { return /* reexport */ isReusableBlock; });
 144  __webpack_require__.d(__webpack_exports__, "isTemplatePart", function() { return /* reexport */ isTemplatePart; });
 145  __webpack_require__.d(__webpack_exports__, "getChildBlockNames", function() { return /* reexport */ registration_getChildBlockNames; });
 146  __webpack_require__.d(__webpack_exports__, "hasChildBlocks", function() { return /* reexport */ registration_hasChildBlocks; });
 147  __webpack_require__.d(__webpack_exports__, "hasChildBlocksWithInserterSupport", function() { return /* reexport */ registration_hasChildBlocksWithInserterSupport; });
 148  __webpack_require__.d(__webpack_exports__, "unstable__bootstrapServerSideBlockDefinitions", function() { return /* reexport */ unstable__bootstrapServerSideBlockDefinitions; });
 149  __webpack_require__.d(__webpack_exports__, "registerBlockStyle", function() { return /* reexport */ registerBlockStyle; });
 150  __webpack_require__.d(__webpack_exports__, "unregisterBlockStyle", function() { return /* reexport */ unregisterBlockStyle; });
 151  __webpack_require__.d(__webpack_exports__, "registerBlockVariation", function() { return /* reexport */ registerBlockVariation; });
 152  __webpack_require__.d(__webpack_exports__, "unregisterBlockVariation", function() { return /* reexport */ unregisterBlockVariation; });
 153  __webpack_require__.d(__webpack_exports__, "isUnmodifiedDefaultBlock", function() { return /* reexport */ isUnmodifiedDefaultBlock; });
 154  __webpack_require__.d(__webpack_exports__, "normalizeIconObject", function() { return /* reexport */ normalizeIconObject; });
 155  __webpack_require__.d(__webpack_exports__, "isValidIcon", function() { return /* reexport */ isValidIcon; });
 156  __webpack_require__.d(__webpack_exports__, "__experimentalGetBlockLabel", function() { return /* reexport */ getBlockLabel; });
 157  __webpack_require__.d(__webpack_exports__, "__experimentalGetAccessibleBlockLabel", function() { return /* reexport */ getAccessibleBlockLabel; });
 158  __webpack_require__.d(__webpack_exports__, "__experimentalSanitizeBlockAttributes", function() { return /* reexport */ __experimentalSanitizeBlockAttributes; });
 159  __webpack_require__.d(__webpack_exports__, "__experimentalGetBlockAttributesNamesByRole", function() { return /* reexport */ __experimentalGetBlockAttributesNamesByRole; });
 160  __webpack_require__.d(__webpack_exports__, "doBlocksMatchTemplate", function() { return /* reexport */ doBlocksMatchTemplate; });
 161  __webpack_require__.d(__webpack_exports__, "synchronizeBlocksWithTemplate", function() { return /* reexport */ synchronizeBlocksWithTemplate; });
 162  __webpack_require__.d(__webpack_exports__, "children", function() { return /* reexport */ api_children; });
 163  __webpack_require__.d(__webpack_exports__, "node", function() { return /* reexport */ api_node; });
 164  __webpack_require__.d(__webpack_exports__, "__EXPERIMENTAL_STYLE_PROPERTY", function() { return /* reexport */ __EXPERIMENTAL_STYLE_PROPERTY; });
 165  __webpack_require__.d(__webpack_exports__, "__EXPERIMENTAL_ELEMENTS", function() { return /* reexport */ __EXPERIMENTAL_ELEMENTS; });
 166  __webpack_require__.d(__webpack_exports__, "__EXPERIMENTAL_PATHS_WITH_MERGE", function() { return /* reexport */ __EXPERIMENTAL_PATHS_WITH_MERGE; });
 167  __webpack_require__.d(__webpack_exports__, "withBlockContentContext", function() { return /* reexport */ withBlockContentContext; });
 168  
 169  // NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/selectors.js
 170  var selectors_namespaceObject = {};
 171  __webpack_require__.r(selectors_namespaceObject);
 172  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetUnprocessedBlockTypes", function() { return __experimentalGetUnprocessedBlockTypes; });
 173  __webpack_require__.d(selectors_namespaceObject, "getBlockTypes", function() { return getBlockTypes; });
 174  __webpack_require__.d(selectors_namespaceObject, "getBlockType", function() { return getBlockType; });
 175  __webpack_require__.d(selectors_namespaceObject, "getBlockStyles", function() { return getBlockStyles; });
 176  __webpack_require__.d(selectors_namespaceObject, "getBlockVariations", function() { return getBlockVariations; });
 177  __webpack_require__.d(selectors_namespaceObject, "getActiveBlockVariation", function() { return getActiveBlockVariation; });
 178  __webpack_require__.d(selectors_namespaceObject, "getDefaultBlockVariation", function() { return getDefaultBlockVariation; });
 179  __webpack_require__.d(selectors_namespaceObject, "getCategories", function() { return getCategories; });
 180  __webpack_require__.d(selectors_namespaceObject, "getCollections", function() { return getCollections; });
 181  __webpack_require__.d(selectors_namespaceObject, "getDefaultBlockName", function() { return getDefaultBlockName; });
 182  __webpack_require__.d(selectors_namespaceObject, "getFreeformFallbackBlockName", function() { return getFreeformFallbackBlockName; });
 183  __webpack_require__.d(selectors_namespaceObject, "getUnregisteredFallbackBlockName", function() { return getUnregisteredFallbackBlockName; });
 184  __webpack_require__.d(selectors_namespaceObject, "getGroupingBlockName", function() { return getGroupingBlockName; });
 185  __webpack_require__.d(selectors_namespaceObject, "getChildBlockNames", function() { return getChildBlockNames; });
 186  __webpack_require__.d(selectors_namespaceObject, "getBlockSupport", function() { return getBlockSupport; });
 187  __webpack_require__.d(selectors_namespaceObject, "hasBlockSupport", function() { return hasBlockSupport; });
 188  __webpack_require__.d(selectors_namespaceObject, "isMatchingSearchTerm", function() { return isMatchingSearchTerm; });
 189  __webpack_require__.d(selectors_namespaceObject, "hasChildBlocks", function() { return hasChildBlocks; });
 190  __webpack_require__.d(selectors_namespaceObject, "hasChildBlocksWithInserterSupport", function() { return hasChildBlocksWithInserterSupport; });
 191  
 192  // NAMESPACE OBJECT: ./node_modules/@wordpress/blocks/build-module/store/actions.js
 193  var actions_namespaceObject = {};
 194  __webpack_require__.r(actions_namespaceObject);
 195  __webpack_require__.d(actions_namespaceObject, "addBlockTypes", function() { return addBlockTypes; });
 196  __webpack_require__.d(actions_namespaceObject, "__experimentalRegisterBlockType", function() { return __experimentalRegisterBlockType; });
 197  __webpack_require__.d(actions_namespaceObject, "__experimentalReapplyBlockTypeFilters", function() { return __experimentalReapplyBlockTypeFilters; });
 198  __webpack_require__.d(actions_namespaceObject, "removeBlockTypes", function() { return removeBlockTypes; });
 199  __webpack_require__.d(actions_namespaceObject, "addBlockStyles", function() { return addBlockStyles; });
 200  __webpack_require__.d(actions_namespaceObject, "removeBlockStyles", function() { return removeBlockStyles; });
 201  __webpack_require__.d(actions_namespaceObject, "addBlockVariations", function() { return addBlockVariations; });
 202  __webpack_require__.d(actions_namespaceObject, "removeBlockVariations", function() { return removeBlockVariations; });
 203  __webpack_require__.d(actions_namespaceObject, "setDefaultBlockName", function() { return actions_setDefaultBlockName; });
 204  __webpack_require__.d(actions_namespaceObject, "setFreeformFallbackBlockName", function() { return setFreeformFallbackBlockName; });
 205  __webpack_require__.d(actions_namespaceObject, "setUnregisteredFallbackBlockName", function() { return setUnregisteredFallbackBlockName; });
 206  __webpack_require__.d(actions_namespaceObject, "setGroupingBlockName", function() { return actions_setGroupingBlockName; });
 207  __webpack_require__.d(actions_namespaceObject, "setCategories", function() { return setCategories; });
 208  __webpack_require__.d(actions_namespaceObject, "updateCategory", function() { return updateCategory; });
 209  __webpack_require__.d(actions_namespaceObject, "addBlockCollection", function() { return addBlockCollection; });
 210  __webpack_require__.d(actions_namespaceObject, "removeBlockCollection", function() { return removeBlockCollection; });
 211  
 212  // EXTERNAL MODULE: external ["wp","data"]
 213  var external_wp_data_ = __webpack_require__("1ZqX");
 214  
 215  // EXTERNAL MODULE: external "lodash"
 216  var external_lodash_ = __webpack_require__("YLtl");
 217  
 218  // EXTERNAL MODULE: external ["wp","i18n"]
 219  var external_wp_i18n_ = __webpack_require__("l3Sj");
 220  
 221  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/reducer.js
 222  /**
 223   * External dependencies
 224   */
 225  
 226  /**
 227   * WordPress dependencies
 228   */
 229  
 230  
 231  
 232  /**
 233   * @typedef {Object} WPBlockCategory
 234   *
 235   * @property {string} slug  Unique category slug.
 236   * @property {string} title Category label, for display in user interface.
 237   */
 238  
 239  /**
 240   * Default set of categories.
 241   *
 242   * @type {WPBlockCategory[]}
 243   */
 244  
 245  const DEFAULT_CATEGORIES = [{
 246    slug: 'text',
 247    title: Object(external_wp_i18n_["__"])('Text')
 248  }, {
 249    slug: 'media',
 250    title: Object(external_wp_i18n_["__"])('Media')
 251  }, {
 252    slug: 'design',
 253    title: Object(external_wp_i18n_["__"])('Design')
 254  }, {
 255    slug: 'widgets',
 256    title: Object(external_wp_i18n_["__"])('Widgets')
 257  }, {
 258    slug: 'theme',
 259    title: Object(external_wp_i18n_["__"])('Theme')
 260  }, {
 261    slug: 'embed',
 262    title: Object(external_wp_i18n_["__"])('Embeds')
 263  }, {
 264    slug: 'reusable',
 265    title: Object(external_wp_i18n_["__"])('Reusable blocks')
 266  }];
 267  /**
 268   * Reducer managing the unprocessed block types in a form passed when registering the by block.
 269   * It's for internal use only. It allows recomputing the processed block types on-demand after block type filters
 270   * get added or removed.
 271   *
 272   * @param {Object} state  Current state.
 273   * @param {Object} action Dispatched action.
 274   *
 275   * @return {Object} Updated state.
 276   */
 277  
 278  function reducer_unprocessedBlockTypes() {
 279    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 280    let action = arguments.length > 1 ? arguments[1] : undefined;
 281  
 282    switch (action.type) {
 283      case 'ADD_UNPROCESSED_BLOCK_TYPE':
 284        return { ...state,
 285          [action.blockType.name]: action.blockType
 286        };
 287  
 288      case 'REMOVE_BLOCK_TYPES':
 289        return Object(external_lodash_["omit"])(state, action.names);
 290    }
 291  
 292    return state;
 293  }
 294  /**
 295   * Reducer managing the processed block types with all filters applied.
 296   * The state is derived from the `unprocessedBlockTypes` reducer.
 297   *
 298   * @param {Object} state  Current state.
 299   * @param {Object} action Dispatched action.
 300   *
 301   * @return {Object} Updated state.
 302   */
 303  
 304  function reducer_blockTypes() {
 305    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 306    let action = arguments.length > 1 ? arguments[1] : undefined;
 307  
 308    switch (action.type) {
 309      case 'ADD_BLOCK_TYPES':
 310        return { ...state,
 311          ...Object(external_lodash_["keyBy"])(action.blockTypes, 'name')
 312        };
 313  
 314      case 'REMOVE_BLOCK_TYPES':
 315        return Object(external_lodash_["omit"])(state, action.names);
 316    }
 317  
 318    return state;
 319  }
 320  /**
 321   * Reducer managing the block style variations.
 322   *
 323   * @param {Object} state  Current state.
 324   * @param {Object} action Dispatched action.
 325   *
 326   * @return {Object} Updated state.
 327   */
 328  
 329  function blockStyles() {
 330    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 331    let action = arguments.length > 1 ? arguments[1] : undefined;
 332  
 333    switch (action.type) {
 334      case 'ADD_BLOCK_TYPES':
 335        return { ...state,
 336          ...Object(external_lodash_["mapValues"])(Object(external_lodash_["keyBy"])(action.blockTypes, 'name'), blockType => {
 337            return Object(external_lodash_["uniqBy"])([...Object(external_lodash_["get"])(blockType, ['styles'], []).map(style => ({ ...style,
 338              source: 'block'
 339            })), ...Object(external_lodash_["get"])(state, [blockType.name], []).filter(_ref => {
 340              let {
 341                source
 342              } = _ref;
 343              return 'block' !== source;
 344            })], style => style.name);
 345          })
 346        };
 347  
 348      case 'ADD_BLOCK_STYLES':
 349        return { ...state,
 350          [action.blockName]: Object(external_lodash_["uniqBy"])([...Object(external_lodash_["get"])(state, [action.blockName], []), ...action.styles], style => style.name)
 351        };
 352  
 353      case 'REMOVE_BLOCK_STYLES':
 354        return { ...state,
 355          [action.blockName]: Object(external_lodash_["filter"])(Object(external_lodash_["get"])(state, [action.blockName], []), style => action.styleNames.indexOf(style.name) === -1)
 356        };
 357    }
 358  
 359    return state;
 360  }
 361  /**
 362   * Reducer managing the block variations.
 363   *
 364   * @param {Object} state  Current state.
 365   * @param {Object} action Dispatched action.
 366   *
 367   * @return {Object} Updated state.
 368   */
 369  
 370  function blockVariations() {
 371    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 372    let action = arguments.length > 1 ? arguments[1] : undefined;
 373  
 374    switch (action.type) {
 375      case 'ADD_BLOCK_TYPES':
 376        return { ...state,
 377          ...Object(external_lodash_["mapValues"])(Object(external_lodash_["keyBy"])(action.blockTypes, 'name'), blockType => {
 378            return Object(external_lodash_["uniqBy"])([...Object(external_lodash_["get"])(blockType, ['variations'], []).map(variation => ({ ...variation,
 379              source: 'block'
 380            })), ...Object(external_lodash_["get"])(state, [blockType.name], []).filter(_ref2 => {
 381              let {
 382                source
 383              } = _ref2;
 384              return 'block' !== source;
 385            })], variation => variation.name);
 386          })
 387        };
 388  
 389      case 'ADD_BLOCK_VARIATIONS':
 390        return { ...state,
 391          [action.blockName]: Object(external_lodash_["uniqBy"])([...Object(external_lodash_["get"])(state, [action.blockName], []), ...action.variations], variation => variation.name)
 392        };
 393  
 394      case 'REMOVE_BLOCK_VARIATIONS':
 395        return { ...state,
 396          [action.blockName]: Object(external_lodash_["filter"])(Object(external_lodash_["get"])(state, [action.blockName], []), variation => action.variationNames.indexOf(variation.name) === -1)
 397        };
 398    }
 399  
 400    return state;
 401  }
 402  /**
 403   * Higher-order Reducer creating a reducer keeping track of given block name.
 404   *
 405   * @param {string} setActionType Action type.
 406   *
 407   * @return {Function} Reducer.
 408   */
 409  
 410  function createBlockNameSetterReducer(setActionType) {
 411    return function () {
 412      let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
 413      let action = arguments.length > 1 ? arguments[1] : undefined;
 414  
 415      switch (action.type) {
 416        case 'REMOVE_BLOCK_TYPES':
 417          if (action.names.indexOf(state) !== -1) {
 418            return null;
 419          }
 420  
 421          return state;
 422  
 423        case setActionType:
 424          return action.name || null;
 425      }
 426  
 427      return state;
 428    };
 429  }
 430  const reducer_defaultBlockName = createBlockNameSetterReducer('SET_DEFAULT_BLOCK_NAME');
 431  const freeformFallbackBlockName = createBlockNameSetterReducer('SET_FREEFORM_FALLBACK_BLOCK_NAME');
 432  const unregisteredFallbackBlockName = createBlockNameSetterReducer('SET_UNREGISTERED_FALLBACK_BLOCK_NAME');
 433  const groupingBlockName = createBlockNameSetterReducer('SET_GROUPING_BLOCK_NAME');
 434  /**
 435   * Reducer managing the categories
 436   *
 437   * @param {WPBlockCategory[]} state  Current state.
 438   * @param {Object}            action Dispatched action.
 439   *
 440   * @return {WPBlockCategory[]} Updated state.
 441   */
 442  
 443  function reducer_categories() {
 444    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_CATEGORIES;
 445    let action = arguments.length > 1 ? arguments[1] : undefined;
 446  
 447    switch (action.type) {
 448      case 'SET_CATEGORIES':
 449        return action.categories || [];
 450  
 451      case 'UPDATE_CATEGORY':
 452        {
 453          if (!action.category || Object(external_lodash_["isEmpty"])(action.category)) {
 454            return state;
 455          }
 456  
 457          const categoryToChange = Object(external_lodash_["find"])(state, ['slug', action.slug]);
 458  
 459          if (categoryToChange) {
 460            return Object(external_lodash_["map"])(state, category => {
 461              if (category.slug === action.slug) {
 462                return { ...category,
 463                  ...action.category
 464                };
 465              }
 466  
 467              return category;
 468            });
 469          }
 470        }
 471    }
 472  
 473    return state;
 474  }
 475  function collections() {
 476    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 477    let action = arguments.length > 1 ? arguments[1] : undefined;
 478  
 479    switch (action.type) {
 480      case 'ADD_BLOCK_COLLECTION':
 481        return { ...state,
 482          [action.namespace]: {
 483            title: action.title,
 484            icon: action.icon
 485          }
 486        };
 487  
 488      case 'REMOVE_BLOCK_COLLECTION':
 489        return Object(external_lodash_["omit"])(state, action.namespace);
 490    }
 491  
 492    return state;
 493  }
 494  /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({
 495    unprocessedBlockTypes: reducer_unprocessedBlockTypes,
 496    blockTypes: reducer_blockTypes,
 497    blockStyles,
 498    blockVariations,
 499    defaultBlockName: reducer_defaultBlockName,
 500    freeformFallbackBlockName,
 501    unregisteredFallbackBlockName,
 502    groupingBlockName,
 503    categories: reducer_categories,
 504    collections
 505  }));
 506  
 507  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
 508  var rememo = __webpack_require__("pPDe");
 509  
 510  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/selectors.js
 511  /**
 512   * External dependencies
 513   */
 514  
 515  
 516  /** @typedef {import('../api/registration').WPBlockVariation} WPBlockVariation */
 517  
 518  /** @typedef {import('../api/registration').WPBlockVariationScope} WPBlockVariationScope */
 519  
 520  /** @typedef {import('./reducer').WPBlockCategory} WPBlockCategory */
 521  
 522  /**
 523   * Given a block name or block type object, returns the corresponding
 524   * normalized block type object.
 525   *
 526   * @param {Object}          state      Blocks state.
 527   * @param {(string|Object)} nameOrType Block name or type object
 528   *
 529   * @return {Object} Block type object.
 530   */
 531  
 532  const getNormalizedBlockType = (state, nameOrType) => 'string' === typeof nameOrType ? getBlockType(state, nameOrType) : nameOrType;
 533  /**
 534   * Returns all the unprocessed block types as passed during the registration.
 535   *
 536   * @param {Object} state Data state.
 537   *
 538   * @return {Array} Unprocessed block types.
 539   */
 540  
 541  
 542  function __experimentalGetUnprocessedBlockTypes(state) {
 543    return state.unprocessedBlockTypes;
 544  }
 545  /**
 546   * Returns all the available block types.
 547   *
 548   * @param {Object} state Data state.
 549   *
 550   * @return {Array} Block Types.
 551   */
 552  
 553  const getBlockTypes = Object(rememo["a" /* default */])(state => Object.values(state.blockTypes), state => [state.blockTypes]);
 554  /**
 555   * Returns a block type by name.
 556   *
 557   * @param {Object} state Data state.
 558   * @param {string} name  Block type name.
 559   *
 560   * @return {Object?} Block Type.
 561   */
 562  
 563  function getBlockType(state, name) {
 564    return state.blockTypes[name];
 565  }
 566  /**
 567   * Returns block styles by block name.
 568   *
 569   * @param {Object} state Data state.
 570   * @param {string} name  Block type name.
 571   *
 572   * @return {Array?} Block Styles.
 573   */
 574  
 575  function getBlockStyles(state, name) {
 576    return state.blockStyles[name];
 577  }
 578  /**
 579   * Returns block variations by block name.
 580   *
 581   * @param {Object}                state     Data state.
 582   * @param {string}                blockName Block type name.
 583   * @param {WPBlockVariationScope} [scope]   Block variation scope name.
 584   *
 585   * @return {(WPBlockVariation[]|void)} Block variations.
 586   */
 587  
 588  const getBlockVariations = Object(rememo["a" /* default */])((state, blockName, scope) => {
 589    const variations = state.blockVariations[blockName];
 590  
 591    if (!variations || !scope) {
 592      return variations;
 593    }
 594  
 595    return variations.filter(variation => {
 596      // For backward compatibility reasons, variation's scope defaults to
 597      // `block` and `inserter` when not set.
 598      return (variation.scope || ['block', 'inserter']).includes(scope);
 599    });
 600  }, (state, blockName) => [state.blockVariations[blockName]]);
 601  /**
 602   * Returns the active block variation for a given block based on its attributes.
 603   * Variations are determined by their `isActive` property.
 604   * Which is either an array of block attribute keys or a function.
 605   *
 606   * In case of an array of block attribute keys, the `attributes` are compared
 607   * to the variation's attributes using strict equality check.
 608   *
 609   * In case of function type, the function should accept a block's attributes
 610   * and the variation's attributes and determines if a variation is active.
 611   * A function that accepts a block's attributes and the variation's attributes and determines if a variation is active.
 612   *
 613   * @param {Object}                state      Data state.
 614   * @param {string}                blockName  Name of block (example: “core/columns”).
 615   * @param {Object}                attributes Block attributes used to determine active variation.
 616   * @param {WPBlockVariationScope} [scope]    Block variation scope name.
 617   *
 618   * @return {(WPBlockVariation|undefined)} Active block variation.
 619   */
 620  
 621  function getActiveBlockVariation(state, blockName, attributes, scope) {
 622    const variations = getBlockVariations(state, blockName, scope);
 623    const match = variations === null || variations === void 0 ? void 0 : variations.find(variation => {
 624      var _variation$isActive;
 625  
 626      if (Array.isArray(variation.isActive)) {
 627        const blockType = getBlockType(state, blockName);
 628        const attributeKeys = Object.keys((blockType === null || blockType === void 0 ? void 0 : blockType.attributes) || {});
 629        const definedAttributes = variation.isActive.filter(attribute => attributeKeys.includes(attribute));
 630  
 631        if (definedAttributes.length === 0) {
 632          return false;
 633        }
 634  
 635        return definedAttributes.every(attribute => attributes[attribute] === variation.attributes[attribute]);
 636      }
 637  
 638      return (_variation$isActive = variation.isActive) === null || _variation$isActive === void 0 ? void 0 : _variation$isActive.call(variation, attributes, variation.attributes);
 639    });
 640    return match;
 641  }
 642  /**
 643   * Returns the default block variation for the given block type.
 644   * When there are multiple variations annotated as the default one,
 645   * the last added item is picked. This simplifies registering overrides.
 646   * When there is no default variation set, it returns the first item.
 647   *
 648   * @param {Object}                state     Data state.
 649   * @param {string}                blockName Block type name.
 650   * @param {WPBlockVariationScope} [scope]   Block variation scope name.
 651   *
 652   * @return {?WPBlockVariation} The default block variation.
 653   */
 654  
 655  function getDefaultBlockVariation(state, blockName, scope) {
 656    const variations = getBlockVariations(state, blockName, scope);
 657    return Object(external_lodash_["findLast"])(variations, 'isDefault') || Object(external_lodash_["first"])(variations);
 658  }
 659  /**
 660   * Returns all the available categories.
 661   *
 662   * @param {Object} state Data state.
 663   *
 664   * @return {WPBlockCategory[]} Categories list.
 665   */
 666  
 667  function getCategories(state) {
 668    return state.categories;
 669  }
 670  /**
 671   * Returns all the available collections.
 672   *
 673   * @param {Object} state Data state.
 674   *
 675   * @return {Object} Collections list.
 676   */
 677  
 678  function getCollections(state) {
 679    return state.collections;
 680  }
 681  /**
 682   * Returns the name of the default block name.
 683   *
 684   * @param {Object} state Data state.
 685   *
 686   * @return {string?} Default block name.
 687   */
 688  
 689  function getDefaultBlockName(state) {
 690    return state.defaultBlockName;
 691  }
 692  /**
 693   * Returns the name of the block for handling non-block content.
 694   *
 695   * @param {Object} state Data state.
 696   *
 697   * @return {string?} Name of the block for handling non-block content.
 698   */
 699  
 700  function getFreeformFallbackBlockName(state) {
 701    return state.freeformFallbackBlockName;
 702  }
 703  /**
 704   * Returns the name of the block for handling unregistered blocks.
 705   *
 706   * @param {Object} state Data state.
 707   *
 708   * @return {string?} Name of the block for handling unregistered blocks.
 709   */
 710  
 711  function getUnregisteredFallbackBlockName(state) {
 712    return state.unregisteredFallbackBlockName;
 713  }
 714  /**
 715   * Returns the name of the block for handling unregistered blocks.
 716   *
 717   * @param {Object} state Data state.
 718   *
 719   * @return {string?} Name of the block for handling unregistered blocks.
 720   */
 721  
 722  function getGroupingBlockName(state) {
 723    return state.groupingBlockName;
 724  }
 725  /**
 726   * Returns an array with the child blocks of a given block.
 727   *
 728   * @param {Object} state     Data state.
 729   * @param {string} blockName Block type name.
 730   *
 731   * @return {Array} Array of child block names.
 732   */
 733  
 734  const getChildBlockNames = Object(rememo["a" /* default */])((state, blockName) => {
 735    return Object(external_lodash_["map"])(Object(external_lodash_["filter"])(state.blockTypes, blockType => {
 736      return Object(external_lodash_["includes"])(blockType.parent, blockName);
 737    }), _ref => {
 738      let {
 739        name
 740      } = _ref;
 741      return name;
 742    });
 743  }, state => [state.blockTypes]);
 744  /**
 745   * Returns the block support value for a feature, if defined.
 746   *
 747   * @param {Object}          state           Data state.
 748   * @param {(string|Object)} nameOrType      Block name or type object
 749   * @param {Array|string}    feature         Feature to retrieve
 750   * @param {*}               defaultSupports Default value to return if not
 751   *                                          explicitly defined
 752   *
 753   * @return {?*} Block support value
 754   */
 755  
 756  const getBlockSupport = (state, nameOrType, feature, defaultSupports) => {
 757    const blockType = getNormalizedBlockType(state, nameOrType);
 758  
 759    if (!(blockType !== null && blockType !== void 0 && blockType.supports)) {
 760      return defaultSupports;
 761    }
 762  
 763    return Object(external_lodash_["get"])(blockType.supports, feature, defaultSupports);
 764  };
 765  /**
 766   * Returns true if the block defines support for a feature, or false otherwise.
 767   *
 768   * @param {Object}          state           Data state.
 769   * @param {(string|Object)} nameOrType      Block name or type object.
 770   * @param {string}          feature         Feature to test.
 771   * @param {boolean}         defaultSupports Whether feature is supported by
 772   *                                          default if not explicitly defined.
 773   *
 774   * @return {boolean} Whether block supports feature.
 775   */
 776  
 777  function hasBlockSupport(state, nameOrType, feature, defaultSupports) {
 778    return !!getBlockSupport(state, nameOrType, feature, defaultSupports);
 779  }
 780  /**
 781   * Returns true if the block type by the given name or object value matches a
 782   * search term, or false otherwise.
 783   *
 784   * @param {Object}          state      Blocks state.
 785   * @param {(string|Object)} nameOrType Block name or type object.
 786   * @param {string}          searchTerm Search term by which to filter.
 787   *
 788   * @return {Object[]} Whether block type matches search term.
 789   */
 790  
 791  function isMatchingSearchTerm(state, nameOrType, searchTerm) {
 792    const blockType = getNormalizedBlockType(state, nameOrType);
 793    const getNormalizedSearchTerm = Object(external_lodash_["flow"])([// Disregard diacritics.
 794    //  Input: "média"
 795    external_lodash_["deburr"], // Lowercase.
 796    //  Input: "MEDIA"
 797    term => term.toLowerCase(), // Strip leading and trailing whitespace.
 798    //  Input: " media "
 799    term => term.trim()]);
 800    const normalizedSearchTerm = getNormalizedSearchTerm(searchTerm);
 801    const isSearchMatch = Object(external_lodash_["flow"])([getNormalizedSearchTerm, normalizedCandidate => Object(external_lodash_["includes"])(normalizedCandidate, normalizedSearchTerm)]);
 802    return isSearchMatch(blockType.title) || Object(external_lodash_["some"])(blockType.keywords, isSearchMatch) || isSearchMatch(blockType.category);
 803  }
 804  /**
 805   * Returns a boolean indicating if a block has child blocks or not.
 806   *
 807   * @param {Object} state     Data state.
 808   * @param {string} blockName Block type name.
 809   *
 810   * @return {boolean} True if a block contains child blocks and false otherwise.
 811   */
 812  
 813  const hasChildBlocks = (state, blockName) => {
 814    return getChildBlockNames(state, blockName).length > 0;
 815  };
 816  /**
 817   * Returns a boolean indicating if a block has at least one child block with inserter support.
 818   *
 819   * @param {Object} state     Data state.
 820   * @param {string} blockName Block type name.
 821   *
 822   * @return {boolean} True if a block contains at least one child blocks with inserter support
 823   *                   and false otherwise.
 824   */
 825  
 826  const hasChildBlocksWithInserterSupport = (state, blockName) => {
 827    return Object(external_lodash_["some"])(getChildBlockNames(state, blockName), childBlockName => {
 828      return hasBlockSupport(state, childBlockName, 'inserter', true);
 829    });
 830  };
 831  
 832  // EXTERNAL MODULE: external ["wp","hooks"]
 833  var external_wp_hooks_ = __webpack_require__("g56x");
 834  
 835  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/constants.js
 836  const STORE_NAME = 'core/blocks';
 837  
 838  // EXTERNAL MODULE: ./node_modules/colord/index.mjs
 839  var colord = __webpack_require__("fHnH");
 840  
 841  // EXTERNAL MODULE: ./node_modules/colord/plugins/names.mjs
 842  var plugins_names = __webpack_require__("abaT");
 843  
 844  // EXTERNAL MODULE: ./node_modules/colord/plugins/a11y.mjs
 845  var a11y = __webpack_require__("7bKH");
 846  
 847  // EXTERNAL MODULE: external ["wp","element"]
 848  var external_wp_element_ = __webpack_require__("GRId");
 849  
 850  // EXTERNAL MODULE: external ["wp","dom"]
 851  var external_wp_dom_ = __webpack_require__("1CF3");
 852  
 853  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/constants.js
 854  const BLOCK_ICON_DEFAULT = 'block-default';
 855  /**
 856   * Array of valid keys in a block type settings deprecation object.
 857   *
 858   * @type {string[]}
 859   */
 860  
 861  const DEPRECATED_ENTRY_KEYS = ['attributes', 'supports', 'save', 'migrate', 'isEligible', 'apiVersion'];
 862  const __EXPERIMENTAL_STYLE_PROPERTY = {
 863    //kept for back-compatibility purposes.
 864    '--wp--style--color--link': {
 865      value: ['color', 'link'],
 866      support: ['color', 'link']
 867    },
 868    background: {
 869      value: ['color', 'gradient'],
 870      support: ['color', 'gradients']
 871    },
 872    backgroundColor: {
 873      value: ['color', 'background'],
 874      support: ['color', 'background'],
 875      requiresOptOut: true
 876    },
 877    borderColor: {
 878      value: ['border', 'color'],
 879      support: ['__experimentalBorder', 'color']
 880    },
 881    borderRadius: {
 882      value: ['border', 'radius'],
 883      support: ['__experimentalBorder', 'radius'],
 884      properties: {
 885        borderTopLeftRadius: 'topLeft',
 886        borderTopRightRadius: 'topRight',
 887        borderBottomLeftRadius: 'bottomLeft',
 888        borderBottomRightRadius: 'bottomRight'
 889      }
 890    },
 891    borderStyle: {
 892      value: ['border', 'style'],
 893      support: ['__experimentalBorder', 'style']
 894    },
 895    borderWidth: {
 896      value: ['border', 'width'],
 897      support: ['__experimentalBorder', 'width']
 898    },
 899    color: {
 900      value: ['color', 'text'],
 901      support: ['color', 'text'],
 902      requiresOptOut: true
 903    },
 904    linkColor: {
 905      value: ['elements', 'link', 'color', 'text'],
 906      support: ['color', 'link']
 907    },
 908    fontFamily: {
 909      value: ['typography', 'fontFamily'],
 910      support: ['typography', '__experimentalFontFamily']
 911    },
 912    fontSize: {
 913      value: ['typography', 'fontSize'],
 914      support: ['typography', 'fontSize']
 915    },
 916    fontStyle: {
 917      value: ['typography', 'fontStyle'],
 918      support: ['typography', '__experimentalFontStyle']
 919    },
 920    fontWeight: {
 921      value: ['typography', 'fontWeight'],
 922      support: ['typography', '__experimentalFontWeight']
 923    },
 924    lineHeight: {
 925      value: ['typography', 'lineHeight'],
 926      support: ['typography', 'lineHeight']
 927    },
 928    margin: {
 929      value: ['spacing', 'margin'],
 930      support: ['spacing', 'margin'],
 931      properties: {
 932        marginTop: 'top',
 933        marginRight: 'right',
 934        marginBottom: 'bottom',
 935        marginLeft: 'left'
 936      }
 937    },
 938    padding: {
 939      value: ['spacing', 'padding'],
 940      support: ['spacing', 'padding'],
 941      properties: {
 942        paddingTop: 'top',
 943        paddingRight: 'right',
 944        paddingBottom: 'bottom',
 945        paddingLeft: 'left'
 946      }
 947    },
 948    textDecoration: {
 949      value: ['typography', 'textDecoration'],
 950      support: ['typography', '__experimentalTextDecoration']
 951    },
 952    textTransform: {
 953      value: ['typography', 'textTransform'],
 954      support: ['typography', '__experimentalTextTransform']
 955    },
 956    letterSpacing: {
 957      value: ['typography', 'letterSpacing'],
 958      support: ['typography', '__experimentalLetterSpacing']
 959    },
 960    '--wp--style--block-gap': {
 961      value: ['spacing', 'blockGap'],
 962      support: ['spacing', 'blockGap']
 963    }
 964  };
 965  const __EXPERIMENTAL_ELEMENTS = {
 966    link: 'a',
 967    h1: 'h1',
 968    h2: 'h2',
 969    h3: 'h3',
 970    h4: 'h4',
 971    h5: 'h5',
 972    h6: 'h6'
 973  };
 974  const __EXPERIMENTAL_PATHS_WITH_MERGE = {
 975    'color.duotone': true,
 976    'color.gradients': true,
 977    'color.palette': true,
 978    'typography.fontFamilies': true,
 979    'typography.fontSizes': true
 980  };
 981  
 982  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/registration.js
 983  /* eslint no-console: [ 'error', { allow: [ 'error', 'warn' ] } ] */
 984  
 985  /**
 986   * External dependencies
 987   */
 988  
 989  /**
 990   * WordPress dependencies
 991   */
 992  
 993  
 994  
 995  /**
 996   * Internal dependencies
 997   */
 998  
 999  const i18nBlockSchema = {
1000    title: "block title",
1001    description: "block description",
1002    keywords: ["block keyword"],
1003    styles: [{
1004      label: "block style label"
1005    }],
1006    variations: [{
1007      title: "block variation title",
1008      description: "block variation description",
1009      keywords: ["block variation keyword"]
1010    }]
1011  };
1012  
1013  
1014  /**
1015   * An icon type definition. One of a Dashicon slug, an element,
1016   * or a component.
1017   *
1018   * @typedef {(string|WPElement|WPComponent)} WPIcon
1019   *
1020   * @see https://developer.wordpress.org/resource/dashicons/
1021   */
1022  
1023  /**
1024   * Render behavior of a block type icon; one of a Dashicon slug, an element,
1025   * or a component.
1026   *
1027   * @typedef {WPIcon} WPBlockTypeIconRender
1028   */
1029  
1030  /**
1031   * An object describing a normalized block type icon.
1032   *
1033   * @typedef {Object} WPBlockTypeIconDescriptor
1034   *
1035   * @property {WPBlockTypeIconRender} src         Render behavior of the icon,
1036   *                                               one of a Dashicon slug, an
1037   *                                               element, or a component.
1038   * @property {string}                background  Optimal background hex string
1039   *                                               color when displaying icon.
1040   * @property {string}                foreground  Optimal foreground hex string
1041   *                                               color when displaying icon.
1042   * @property {string}                shadowColor Optimal shadow hex string
1043   *                                               color when displaying icon.
1044   */
1045  
1046  /**
1047   * Value to use to render the icon for a block type in an editor interface,
1048   * either a Dashicon slug, an element, a component, or an object describing
1049   * the icon.
1050   *
1051   * @typedef {(WPBlockTypeIconDescriptor|WPBlockTypeIconRender)} WPBlockTypeIcon
1052   */
1053  
1054  /**
1055   * Named block variation scopes.
1056   *
1057   * @typedef {'block'|'inserter'|'transform'} WPBlockVariationScope
1058   */
1059  
1060  /**
1061   * An object describing a variation defined for the block type.
1062   *
1063   * @typedef {Object} WPBlockVariation
1064   *
1065   * @property {string}                  name          The unique and machine-readable name.
1066   * @property {string}                  title         A human-readable variation title.
1067   * @property {string}                  [description] A detailed variation description.
1068   * @property {string}                  [category]    Block type category classification,
1069   *                                                   used in search interfaces to arrange
1070   *                                                   block types by category.
1071   * @property {WPIcon}                  [icon]        An icon helping to visualize the variation.
1072   * @property {boolean}                 [isDefault]   Indicates whether the current variation is
1073   *                                                   the default one. Defaults to `false`.
1074   * @property {Object}                  [attributes]  Values which override block attributes.
1075   * @property {Array[]}                 [innerBlocks] Initial configuration of nested blocks.
1076   * @property {Object}                  [example]     Example provides structured data for
1077   *                                                   the block preview. You can set to
1078   *                                                   `undefined` to disable the preview shown
1079   *                                                   for the block type.
1080   * @property {WPBlockVariationScope[]} [scope]       The list of scopes where the variation
1081   *                                                   is applicable. When not provided, it
1082   *                                                   assumes all available scopes.
1083   * @property {string[]}                [keywords]    An array of terms (which can be translated)
1084   *                                                   that help users discover the variation
1085   *                                                   while searching.
1086   * @property {Function|string[]}       [isActive]    This can be a function or an array of block attributes.
1087   *                                                   Function that accepts a block's attributes and the
1088   *                                                   variation's attributes and determines if a variation is active.
1089   *                                                   This function doesn't try to find a match dynamically based
1090   *                                                   on all block's attributes, as in many cases some attributes are irrelevant.
1091   *                                                   An example would be for `embed` block where we only care
1092   *                                                   about `providerNameSlug` attribute's value.
1093   *                                                   We can also use a `string[]` to tell which attributes
1094   *                                                   should be compared as a shorthand. Each attributes will
1095   *                                                   be matched and the variation will be active if all of them are matching.
1096   */
1097  
1098  /**
1099   * Defined behavior of a block type.
1100   *
1101   * @typedef {Object} WPBlockType
1102   *
1103   * @property {string}             name          Block type's namespaced name.
1104   * @property {string}             title         Human-readable block type label.
1105   * @property {string}             [description] A detailed block type description.
1106   * @property {string}             [category]    Block type category classification,
1107   *                                              used in search interfaces to arrange
1108   *                                              block types by category.
1109   * @property {WPBlockTypeIcon}    [icon]        Block type icon.
1110   * @property {string[]}           [keywords]    Additional keywords to produce block
1111   *                                              type as result in search interfaces.
1112   * @property {Object}             [attributes]  Block type attributes.
1113   * @property {WPComponent}        [save]        Optional component describing
1114   *                                              serialized markup structure of a
1115   *                                              block type.
1116   * @property {WPComponent}        edit          Component rendering an element to
1117   *                                              manipulate the attributes of a block
1118   *                                              in the context of an editor.
1119   * @property {WPBlockVariation[]} [variations]  The list of block variations.
1120   * @property {Object}             [example]     Example provides structured data for
1121   *                                              the block preview. When not defined
1122   *                                              then no preview is shown.
1123   */
1124  
1125  const serverSideBlockDefinitions = {};
1126  /**
1127   * Sets the server side block definition of blocks.
1128   *
1129   * @param {Object} definitions Server-side block definitions
1130   */
1131  // eslint-disable-next-line camelcase
1132  
1133  function unstable__bootstrapServerSideBlockDefinitions(definitions) {
1134    for (const blockName of Object.keys(definitions)) {
1135      // Don't overwrite if already set. It covers the case when metadata
1136      // was initialized from the server.
1137      if (serverSideBlockDefinitions[blockName]) {
1138        // We still need to polyfill `apiVersion` for WordPress version
1139        // lower than 5.7. If it isn't present in the definition shared
1140        // from the server, we try to fallback to the definition passed.
1141        // @see https://github.com/WordPress/gutenberg/pull/29279
1142        if (serverSideBlockDefinitions[blockName].apiVersion === undefined && definitions[blockName].apiVersion) {
1143          serverSideBlockDefinitions[blockName].apiVersion = definitions[blockName].apiVersion;
1144        }
1145  
1146        continue;
1147      }
1148  
1149      serverSideBlockDefinitions[blockName] = Object(external_lodash_["mapKeys"])(Object(external_lodash_["pickBy"])(definitions[blockName], value => !Object(external_lodash_["isNil"])(value)), (value, key) => Object(external_lodash_["camelCase"])(key));
1150    }
1151  }
1152  /**
1153   * Gets block settings from metadata loaded from `block.json` file.
1154   *
1155   * @param {Object} metadata            Block metadata loaded from `block.json`.
1156   * @param {string} metadata.textdomain Textdomain to use with translations.
1157   *
1158   * @return {Object} Block settings.
1159   */
1160  
1161  function getBlockSettingsFromMetadata(_ref) {
1162    let {
1163      textdomain,
1164      ...metadata
1165    } = _ref;
1166    const allowedFields = ['apiVersion', 'title', 'category', 'parent', 'icon', 'description', 'keywords', 'attributes', 'providesContext', 'usesContext', 'supports', 'styles', 'example', 'variations'];
1167    const settings = Object(external_lodash_["pick"])(metadata, allowedFields);
1168  
1169    if (textdomain) {
1170      Object.keys(i18nBlockSchema).forEach(key => {
1171        if (!settings[key]) {
1172          return;
1173        }
1174  
1175        settings[key] = translateBlockSettingUsingI18nSchema(i18nBlockSchema[key], settings[key], textdomain);
1176      });
1177    }
1178  
1179    return settings;
1180  }
1181  /**
1182   * Registers a new block provided a unique name and an object defining its
1183   * behavior. Once registered, the block is made available as an option to any
1184   * editor interface where blocks are implemented.
1185   *
1186   * @param {string|Object} blockNameOrMetadata Block type name or its metadata.
1187   * @param {Object}        settings            Block settings.
1188   *
1189   * @return {?WPBlockType} The block, if it has been successfully registered;
1190   *                    otherwise `undefined`.
1191   */
1192  
1193  
1194  function registerBlockType(blockNameOrMetadata, settings) {
1195    const name = Object(external_lodash_["isObject"])(blockNameOrMetadata) ? blockNameOrMetadata.name : blockNameOrMetadata;
1196  
1197    if (typeof name !== 'string') {
1198      console.error('Block names must be strings.');
1199      return;
1200    }
1201  
1202    if (!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(name)) {
1203      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');
1204      return;
1205    }
1206  
1207    if (Object(external_wp_data_["select"])(store).getBlockType(name)) {
1208      console.error('Block "' + name + '" is already registered.');
1209      return;
1210    }
1211  
1212    if (Object(external_lodash_["isObject"])(blockNameOrMetadata)) {
1213      unstable__bootstrapServerSideBlockDefinitions({
1214        [name]: getBlockSettingsFromMetadata(blockNameOrMetadata)
1215      });
1216    }
1217  
1218    const blockType = {
1219      name,
1220      icon: BLOCK_ICON_DEFAULT,
1221      keywords: [],
1222      attributes: {},
1223      providesContext: {},
1224      usesContext: [],
1225      supports: {},
1226      styles: [],
1227      variations: [],
1228      save: () => null,
1229      ...(serverSideBlockDefinitions === null || serverSideBlockDefinitions === void 0 ? void 0 : serverSideBlockDefinitions[name]),
1230      ...settings
1231    };
1232  
1233    Object(external_wp_data_["dispatch"])(store).__experimentalRegisterBlockType(blockType);
1234  
1235    return Object(external_wp_data_["select"])(store).getBlockType(name);
1236  }
1237  /**
1238   * Translates block settings provided with metadata using the i18n schema.
1239   *
1240   * @param {string|string[]|Object[]} i18nSchema   I18n schema for the block setting.
1241   * @param {string|string[]|Object[]} settingValue Value for the block setting.
1242   * @param {string}                   textdomain   Textdomain to use with translations.
1243   *
1244   * @return {string|string[]|Object[]} Translated setting.
1245   */
1246  
1247  function translateBlockSettingUsingI18nSchema(i18nSchema, settingValue, textdomain) {
1248    if (Object(external_lodash_["isString"])(i18nSchema) && Object(external_lodash_["isString"])(settingValue)) {
1249      // eslint-disable-next-line @wordpress/i18n-no-variables, @wordpress/i18n-text-domain
1250      return Object(external_wp_i18n_["_x"])(settingValue, i18nSchema, textdomain);
1251    }
1252  
1253    if (Object(external_lodash_["isArray"])(i18nSchema) && !Object(external_lodash_["isEmpty"])(i18nSchema) && Object(external_lodash_["isArray"])(settingValue)) {
1254      return settingValue.map(value => translateBlockSettingUsingI18nSchema(i18nSchema[0], value, textdomain));
1255    }
1256  
1257    if (Object(external_lodash_["isObject"])(i18nSchema) && !Object(external_lodash_["isEmpty"])(i18nSchema) && Object(external_lodash_["isObject"])(settingValue)) {
1258      return Object.keys(settingValue).reduce((accumulator, key) => {
1259        if (!i18nSchema[key]) {
1260          accumulator[key] = settingValue[key];
1261          return accumulator;
1262        }
1263  
1264        accumulator[key] = translateBlockSettingUsingI18nSchema(i18nSchema[key], settingValue[key], textdomain);
1265        return accumulator;
1266      }, {});
1267    }
1268  
1269    return settingValue;
1270  }
1271  /**
1272   * Registers a new block collection to group blocks in the same namespace in the inserter.
1273   *
1274   * @param {string} namespace       The namespace to group blocks by in the inserter; corresponds to the block namespace.
1275   * @param {Object} settings        The block collection settings.
1276   * @param {string} settings.title  The title to display in the block inserter.
1277   * @param {Object} [settings.icon] The icon to display in the block inserter.
1278   */
1279  
1280  
1281  function registerBlockCollection(namespace, _ref2) {
1282    let {
1283      title,
1284      icon
1285    } = _ref2;
1286    Object(external_wp_data_["dispatch"])(store).addBlockCollection(namespace, title, icon);
1287  }
1288  /**
1289   * Unregisters a block collection
1290   *
1291   * @param {string} namespace The namespace to group blocks by in the inserter; corresponds to the block namespace
1292   *
1293   */
1294  
1295  function unregisterBlockCollection(namespace) {
1296    Object(external_wp_data_["dispatch"])(store).removeBlockCollection(namespace);
1297  }
1298  /**
1299   * Unregisters a block.
1300   *
1301   * @param {string} name Block name.
1302   *
1303   * @return {?WPBlockType} The previous block value, if it has been successfully
1304   *                    unregistered; otherwise `undefined`.
1305   */
1306  
1307  function unregisterBlockType(name) {
1308    const oldBlock = Object(external_wp_data_["select"])(store).getBlockType(name);
1309  
1310    if (!oldBlock) {
1311      console.error('Block "' + name + '" is not registered.');
1312      return;
1313    }
1314  
1315    Object(external_wp_data_["dispatch"])(store).removeBlockTypes(name);
1316    return oldBlock;
1317  }
1318  /**
1319   * Assigns name of block for handling non-block content.
1320   *
1321   * @param {string} blockName Block name.
1322   */
1323  
1324  function setFreeformContentHandlerName(blockName) {
1325    Object(external_wp_data_["dispatch"])(store).setFreeformFallbackBlockName(blockName);
1326  }
1327  /**
1328   * Retrieves name of block handling non-block content, or undefined if no
1329   * handler has been defined.
1330   *
1331   * @return {?string} Block name.
1332   */
1333  
1334  function getFreeformContentHandlerName() {
1335    return Object(external_wp_data_["select"])(store).getFreeformFallbackBlockName();
1336  }
1337  /**
1338   * Retrieves name of block used for handling grouping interactions.
1339   *
1340   * @return {?string} Block name.
1341   */
1342  
1343  function registration_getGroupingBlockName() {
1344    return Object(external_wp_data_["select"])(store).getGroupingBlockName();
1345  }
1346  /**
1347   * Assigns name of block handling unregistered block types.
1348   *
1349   * @param {string} blockName Block name.
1350   */
1351  
1352  function setUnregisteredTypeHandlerName(blockName) {
1353    Object(external_wp_data_["dispatch"])(store).setUnregisteredFallbackBlockName(blockName);
1354  }
1355  /**
1356   * Retrieves name of block handling unregistered block types, or undefined if no
1357   * handler has been defined.
1358   *
1359   * @return {?string} Block name.
1360   */
1361  
1362  function getUnregisteredTypeHandlerName() {
1363    return Object(external_wp_data_["select"])(store).getUnregisteredFallbackBlockName();
1364  }
1365  /**
1366   * Assigns the default block name.
1367   *
1368   * @param {string} name Block name.
1369   */
1370  
1371  function setDefaultBlockName(name) {
1372    Object(external_wp_data_["dispatch"])(store).setDefaultBlockName(name);
1373  }
1374  /**
1375   * Assigns name of block for handling block grouping interactions.
1376   *
1377   * @param {string} name Block name.
1378   */
1379  
1380  function setGroupingBlockName(name) {
1381    Object(external_wp_data_["dispatch"])(store).setGroupingBlockName(name);
1382  }
1383  /**
1384   * Retrieves the default block name.
1385   *
1386   * @return {?string} Block name.
1387   */
1388  
1389  function registration_getDefaultBlockName() {
1390    return Object(external_wp_data_["select"])(store).getDefaultBlockName();
1391  }
1392  /**
1393   * Returns a registered block type.
1394   *
1395   * @param {string} name Block name.
1396   *
1397   * @return {?Object} Block type.
1398   */
1399  
1400  function registration_getBlockType(name) {
1401    var _select;
1402  
1403    return (_select = Object(external_wp_data_["select"])(store)) === null || _select === void 0 ? void 0 : _select.getBlockType(name);
1404  }
1405  /**
1406   * Returns all registered blocks.
1407   *
1408   * @return {Array} Block settings.
1409   */
1410  
1411  function registration_getBlockTypes() {
1412    return Object(external_wp_data_["select"])(store).getBlockTypes();
1413  }
1414  /**
1415   * Returns the block support value for a feature, if defined.
1416   *
1417   * @param {(string|Object)} nameOrType      Block name or type object
1418   * @param {string}          feature         Feature to retrieve
1419   * @param {*}               defaultSupports Default value to return if not
1420   *                                          explicitly defined
1421   *
1422   * @return {?*} Block support value
1423   */
1424  
1425  function registration_getBlockSupport(nameOrType, feature, defaultSupports) {
1426    return Object(external_wp_data_["select"])(store).getBlockSupport(nameOrType, feature, defaultSupports);
1427  }
1428  /**
1429   * Returns true if the block defines support for a feature, or false otherwise.
1430   *
1431   * @param {(string|Object)} nameOrType      Block name or type object.
1432   * @param {string}          feature         Feature to test.
1433   * @param {boolean}         defaultSupports Whether feature is supported by
1434   *                                          default if not explicitly defined.
1435   *
1436   * @return {boolean} Whether block supports feature.
1437   */
1438  
1439  function registration_hasBlockSupport(nameOrType, feature, defaultSupports) {
1440    return Object(external_wp_data_["select"])(store).hasBlockSupport(nameOrType, feature, defaultSupports);
1441  }
1442  /**
1443   * Determines whether or not the given block is a reusable block. This is a
1444   * special block type that is used to point to a global block stored via the
1445   * API.
1446   *
1447   * @param {Object} blockOrType Block or Block Type to test.
1448   *
1449   * @return {boolean} Whether the given block is a reusable block.
1450   */
1451  
1452  function isReusableBlock(blockOrType) {
1453    return (blockOrType === null || blockOrType === void 0 ? void 0 : blockOrType.name) === 'core/block';
1454  }
1455  /**
1456   * Determines whether or not the given block is a template part. This is a
1457   * special block type that allows composing a page template out of reusable
1458   * design elements.
1459   *
1460   * @param {Object} blockOrType Block or Block Type to test.
1461   *
1462   * @return {boolean} Whether the given block is a template part.
1463   */
1464  
1465  function isTemplatePart(blockOrType) {
1466    return blockOrType.name === 'core/template-part';
1467  }
1468  /**
1469   * Returns an array with the child blocks of a given block.
1470   *
1471   * @param {string} blockName Name of block (example: “latest-posts”).
1472   *
1473   * @return {Array} Array of child block names.
1474   */
1475  
1476  const registration_getChildBlockNames = blockName => {
1477    return Object(external_wp_data_["select"])(store).getChildBlockNames(blockName);
1478  };
1479  /**
1480   * Returns a boolean indicating if a block has child blocks or not.
1481   *
1482   * @param {string} blockName Name of block (example: “latest-posts”).
1483   *
1484   * @return {boolean} True if a block contains child blocks and false otherwise.
1485   */
1486  
1487  const registration_hasChildBlocks = blockName => {
1488    return Object(external_wp_data_["select"])(store).hasChildBlocks(blockName);
1489  };
1490  /**
1491   * Returns a boolean indicating if a block has at least one child block with inserter support.
1492   *
1493   * @param {string} blockName Block type name.
1494   *
1495   * @return {boolean} True if a block contains at least one child blocks with inserter support
1496   *                   and false otherwise.
1497   */
1498  
1499  const registration_hasChildBlocksWithInserterSupport = blockName => {
1500    return Object(external_wp_data_["select"])(store).hasChildBlocksWithInserterSupport(blockName);
1501  };
1502  /**
1503   * Registers a new block style variation for the given block.
1504   *
1505   * @param {string} blockName      Name of block (example: “core/latest-posts”).
1506   * @param {Object} styleVariation Object containing `name` which is the class name applied to the block and `label` which identifies the variation to the user.
1507   */
1508  
1509  const registerBlockStyle = (blockName, styleVariation) => {
1510    Object(external_wp_data_["dispatch"])(store).addBlockStyles(blockName, styleVariation);
1511  };
1512  /**
1513   * Unregisters a block style variation for the given block.
1514   *
1515   * @param {string} blockName          Name of block (example: “core/latest-posts”).
1516   * @param {string} styleVariationName Name of class applied to the block.
1517   */
1518  
1519  const unregisterBlockStyle = (blockName, styleVariationName) => {
1520    Object(external_wp_data_["dispatch"])(store).removeBlockStyles(blockName, styleVariationName);
1521  };
1522  /**
1523   * Returns an array with the variations of a given block type.
1524   *
1525   * @param {string}                blockName Name of block (example: “core/columns”).
1526   * @param {WPBlockVariationScope} [scope]   Block variation scope name.
1527   *
1528   * @return {(WPBlockVariation[]|void)} Block variations.
1529   */
1530  
1531  const registration_getBlockVariations = (blockName, scope) => {
1532    return Object(external_wp_data_["select"])(store).getBlockVariations(blockName, scope);
1533  };
1534  /**
1535   * Registers a new block variation for the given block type.
1536   *
1537   * @param {string}           blockName Name of the block (example: “core/columns”).
1538   * @param {WPBlockVariation} variation Object describing a block variation.
1539   */
1540  
1541  const registerBlockVariation = (blockName, variation) => {
1542    Object(external_wp_data_["dispatch"])(store).addBlockVariations(blockName, variation);
1543  };
1544  /**
1545   * Unregisters a block variation defined for the given block type.
1546   *
1547   * @param {string} blockName     Name of the block (example: “core/columns”).
1548   * @param {string} variationName Name of the variation defined for the block.
1549   */
1550  
1551  const unregisterBlockVariation = (blockName, variationName) => {
1552    Object(external_wp_data_["dispatch"])(store).removeBlockVariations(blockName, variationName);
1553  };
1554  
1555  // EXTERNAL MODULE: ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules
1556  var v4 = __webpack_require__("7Cbv");
1557  
1558  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/factory.js
1559  /**
1560   * External dependencies
1561   */
1562  
1563  
1564  /**
1565   * WordPress dependencies
1566   */
1567  
1568  
1569  /**
1570   * Internal dependencies
1571   */
1572  
1573  
1574  
1575  /**
1576   * Returns a block object given its type and attributes.
1577   *
1578   * @param {string} name        Block name.
1579   * @param {Object} attributes  Block attributes.
1580   * @param {?Array} innerBlocks Nested blocks.
1581   *
1582   * @return {Object} Block object.
1583   */
1584  
1585  function createBlock(name) {
1586    let attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1587    let innerBlocks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
1588  
1589    const sanitizedAttributes = __experimentalSanitizeBlockAttributes(name, attributes);
1590  
1591    const clientId = Object(v4["a" /* default */])(); // Blocks are stored with a unique ID, the assigned type name, the block
1592    // attributes, and their inner blocks.
1593  
1594    return {
1595      clientId,
1596      name,
1597      isValid: true,
1598      attributes: sanitizedAttributes,
1599      innerBlocks
1600    };
1601  }
1602  /**
1603   * Given an array of InnerBlocks templates or Block Objects,
1604   * returns an array of created Blocks from them.
1605   * It handles the case of having InnerBlocks as Blocks by
1606   * converting them to the proper format to continue recursively.
1607   *
1608   * @param {Array} innerBlocksOrTemplate Nested blocks or InnerBlocks templates.
1609   *
1610   * @return {Object[]} Array of Block objects.
1611   */
1612  
1613  function createBlocksFromInnerBlocksTemplate() {
1614    let innerBlocksOrTemplate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1615    return innerBlocksOrTemplate.map(innerBlock => {
1616      const innerBlockTemplate = Array.isArray(innerBlock) ? innerBlock : [innerBlock.name, innerBlock.attributes, innerBlock.innerBlocks];
1617      const [name, attributes, innerBlocks = []] = innerBlockTemplate;
1618      return createBlock(name, attributes, createBlocksFromInnerBlocksTemplate(innerBlocks));
1619    });
1620  }
1621  /**
1622   * Given a block object, returns a copy of the block object while sanitizing its attributes,
1623   * optionally merging new attributes and/or replacing its inner blocks.
1624   *
1625   * @param {Object} block           Block instance.
1626   * @param {Object} mergeAttributes Block attributes.
1627   * @param {?Array} newInnerBlocks  Nested blocks.
1628   *
1629   * @return {Object} A cloned block.
1630   */
1631  
1632  function __experimentalCloneSanitizedBlock(block) {
1633    let mergeAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1634    let newInnerBlocks = arguments.length > 2 ? arguments[2] : undefined;
1635    const clientId = Object(v4["a" /* default */])();
1636  
1637    const sanitizedAttributes = __experimentalSanitizeBlockAttributes(block.name, { ...block.attributes,
1638      ...mergeAttributes
1639    });
1640  
1641    return { ...block,
1642      clientId,
1643      attributes: sanitizedAttributes,
1644      innerBlocks: newInnerBlocks || block.innerBlocks.map(innerBlock => __experimentalCloneSanitizedBlock(innerBlock))
1645    };
1646  }
1647  /**
1648   * Given a block object, returns a copy of the block object,
1649   * optionally merging new attributes and/or replacing its inner blocks.
1650   *
1651   * @param {Object} block           Block instance.
1652   * @param {Object} mergeAttributes Block attributes.
1653   * @param {?Array} newInnerBlocks  Nested blocks.
1654   *
1655   * @return {Object} A cloned block.
1656   */
1657  
1658  function cloneBlock(block) {
1659    let mergeAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1660    let newInnerBlocks = arguments.length > 2 ? arguments[2] : undefined;
1661    const clientId = Object(v4["a" /* default */])();
1662    return { ...block,
1663      clientId,
1664      attributes: { ...block.attributes,
1665        ...mergeAttributes
1666      },
1667      innerBlocks: newInnerBlocks || block.innerBlocks.map(innerBlock => cloneBlock(innerBlock))
1668    };
1669  }
1670  /**
1671   * Returns a boolean indicating whether a transform is possible based on
1672   * various bits of context.
1673   *
1674   * @param {Object} transform The transform object to validate.
1675   * @param {string} direction Is this a 'from' or 'to' transform.
1676   * @param {Array}  blocks    The blocks to transform from.
1677   *
1678   * @return {boolean} Is the transform possible?
1679   */
1680  
1681  const isPossibleTransformForSource = (transform, direction, blocks) => {
1682    if (Object(external_lodash_["isEmpty"])(blocks)) {
1683      return false;
1684    } // If multiple blocks are selected, only multi block transforms
1685    // or wildcard transforms are allowed.
1686  
1687  
1688    const isMultiBlock = blocks.length > 1;
1689    const firstBlockName = Object(external_lodash_["first"])(blocks).name;
1690    const isValidForMultiBlocks = isWildcardBlockTransform(transform) || !isMultiBlock || transform.isMultiBlock;
1691  
1692    if (!isValidForMultiBlocks) {
1693      return false;
1694    } // Check non-wildcard transforms to ensure that transform is valid
1695    // for a block selection of multiple blocks of different types
1696  
1697  
1698    if (!isWildcardBlockTransform(transform) && !Object(external_lodash_["every"])(blocks, {
1699      name: firstBlockName
1700    })) {
1701      return false;
1702    } // Only consider 'block' type transforms as valid.
1703  
1704  
1705    const isBlockType = transform.type === 'block';
1706  
1707    if (!isBlockType) {
1708      return false;
1709    } // Check if the transform's block name matches the source block (or is a wildcard)
1710    // only if this is a transform 'from'.
1711  
1712  
1713    const sourceBlock = Object(external_lodash_["first"])(blocks);
1714    const hasMatchingName = direction !== 'from' || transform.blocks.indexOf(sourceBlock.name) !== -1 || isWildcardBlockTransform(transform);
1715  
1716    if (!hasMatchingName) {
1717      return false;
1718    } // Don't allow single Grouping blocks to be transformed into
1719    // a Grouping block.
1720  
1721  
1722    if (!isMultiBlock && isContainerGroupBlock(sourceBlock.name) && isContainerGroupBlock(transform.blockName)) {
1723      return false;
1724    } // If the transform has a `isMatch` function specified, check that it returns true.
1725  
1726  
1727    if (Object(external_lodash_["isFunction"])(transform.isMatch)) {
1728      const attributes = transform.isMultiBlock ? blocks.map(block => block.attributes) : sourceBlock.attributes;
1729      const block = transform.isMultiBlock ? blocks : sourceBlock;
1730  
1731      if (!transform.isMatch(attributes, block)) {
1732        return false;
1733      }
1734    }
1735  
1736    if (transform.usingMobileTransformations && isWildcardBlockTransform(transform) && !isContainerGroupBlock(sourceBlock.name)) {
1737      return false;
1738    }
1739  
1740    return true;
1741  };
1742  /**
1743   * Returns block types that the 'blocks' can be transformed into, based on
1744   * 'from' transforms on other blocks.
1745   *
1746   * @param {Array} blocks The blocks to transform from.
1747   *
1748   * @return {Array} Block types that the blocks can be transformed into.
1749   */
1750  
1751  
1752  const getBlockTypesForPossibleFromTransforms = blocks => {
1753    if (Object(external_lodash_["isEmpty"])(blocks)) {
1754      return [];
1755    }
1756  
1757    const allBlockTypes = registration_getBlockTypes(); // filter all blocks to find those with a 'from' transform.
1758  
1759    const blockTypesWithPossibleFromTransforms = Object(external_lodash_["filter"])(allBlockTypes, blockType => {
1760      const fromTransforms = getBlockTransforms('from', blockType.name);
1761      return !!findTransform(fromTransforms, transform => {
1762        return isPossibleTransformForSource(transform, 'from', blocks);
1763      });
1764    });
1765    return blockTypesWithPossibleFromTransforms;
1766  };
1767  /**
1768   * Returns block types that the 'blocks' can be transformed into, based on
1769   * the source block's own 'to' transforms.
1770   *
1771   * @param {Array} blocks The blocks to transform from.
1772   *
1773   * @return {Array} Block types that the source can be transformed into.
1774   */
1775  
1776  
1777  const getBlockTypesForPossibleToTransforms = blocks => {
1778    if (Object(external_lodash_["isEmpty"])(blocks)) {
1779      return [];
1780    }
1781  
1782    const sourceBlock = Object(external_lodash_["first"])(blocks);
1783    const blockType = registration_getBlockType(sourceBlock.name);
1784    const transformsTo = blockType ? getBlockTransforms('to', blockType.name) : []; // filter all 'to' transforms to find those that are possible.
1785  
1786    const possibleTransforms = Object(external_lodash_["filter"])(transformsTo, transform => {
1787      return transform && isPossibleTransformForSource(transform, 'to', blocks);
1788    }); // Build a list of block names using the possible 'to' transforms.
1789  
1790    const blockNames = Object(external_lodash_["flatMap"])(possibleTransforms, transformation => transformation.blocks); // Map block names to block types.
1791  
1792    return blockNames.map(name => registration_getBlockType(name));
1793  };
1794  /**
1795   * Determines whether transform is a "block" type
1796   * and if so whether it is a "wildcard" transform
1797   * ie: targets "any" block type
1798   *
1799   * @param {Object} t the Block transform object
1800   *
1801   * @return {boolean} whether transform is a wildcard transform
1802   */
1803  
1804  
1805  const isWildcardBlockTransform = t => t && t.type === 'block' && Array.isArray(t.blocks) && t.blocks.includes('*');
1806  /**
1807   * Determines whether the given Block is the core Block which
1808   * acts as a container Block for other Blocks as part of the
1809   * Grouping mechanics
1810   *
1811   * @param {string} name the name of the Block to test against
1812   *
1813   * @return {boolean} whether or not the Block is the container Block type
1814   */
1815  
1816  const isContainerGroupBlock = name => name === registration_getGroupingBlockName();
1817  /**
1818   * Returns an array of block types that the set of blocks received as argument
1819   * can be transformed into.
1820   *
1821   * @param {Array} blocks Blocks array.
1822   *
1823   * @return {Array} Block types that the blocks argument can be transformed to.
1824   */
1825  
1826  function getPossibleBlockTransformations(blocks) {
1827    if (Object(external_lodash_["isEmpty"])(blocks)) {
1828      return [];
1829    }
1830  
1831    const blockTypesForFromTransforms = getBlockTypesForPossibleFromTransforms(blocks);
1832    const blockTypesForToTransforms = getBlockTypesForPossibleToTransforms(blocks);
1833    return Object(external_lodash_["uniq"])([...blockTypesForFromTransforms, ...blockTypesForToTransforms]);
1834  }
1835  /**
1836   * Given an array of transforms, returns the highest-priority transform where
1837   * the predicate function returns a truthy value. A higher-priority transform
1838   * is one with a lower priority value (i.e. first in priority order). Returns
1839   * null if the transforms set is empty or the predicate function returns a
1840   * falsey value for all entries.
1841   *
1842   * @param {Object[]} transforms Transforms to search.
1843   * @param {Function} predicate  Function returning true on matching transform.
1844   *
1845   * @return {?Object} Highest-priority transform candidate.
1846   */
1847  
1848  function findTransform(transforms, predicate) {
1849    // The hooks library already has built-in mechanisms for managing priority
1850    // queue, so leverage via locally-defined instance.
1851    const hooks = Object(external_wp_hooks_["createHooks"])();
1852  
1853    for (let i = 0; i < transforms.length; i++) {
1854      const candidate = transforms[i];
1855  
1856      if (predicate(candidate)) {
1857        hooks.addFilter('transform', 'transform/' + i.toString(), result => result ? result : candidate, candidate.priority);
1858      }
1859    } // Filter name is arbitrarily chosen but consistent with above aggregation.
1860  
1861  
1862    return hooks.applyFilters('transform', null);
1863  }
1864  /**
1865   * Returns normal block transforms for a given transform direction, optionally
1866   * for a specific block by name, or an empty array if there are no transforms.
1867   * If no block name is provided, returns transforms for all blocks. A normal
1868   * transform object includes `blockName` as a property.
1869   *
1870   * @param {string}        direction       Transform direction ("to", "from").
1871   * @param {string|Object} blockTypeOrName Block type or name.
1872   *
1873   * @return {Array} Block transforms for direction.
1874   */
1875  
1876  function getBlockTransforms(direction, blockTypeOrName) {
1877    // When retrieving transforms for all block types, recurse into self.
1878    if (blockTypeOrName === undefined) {
1879      return Object(external_lodash_["flatMap"])(registration_getBlockTypes(), _ref => {
1880        let {
1881          name
1882        } = _ref;
1883        return getBlockTransforms(direction, name);
1884      });
1885    } // Validate that block type exists and has array of direction.
1886  
1887  
1888    const blockType = normalizeBlockType(blockTypeOrName);
1889    const {
1890      name: blockName,
1891      transforms
1892    } = blockType || {};
1893  
1894    if (!transforms || !Array.isArray(transforms[direction])) {
1895      return [];
1896    }
1897  
1898    const usingMobileTransformations = transforms.supportedMobileTransforms && Array.isArray(transforms.supportedMobileTransforms);
1899    const filteredTransforms = usingMobileTransformations ? Object(external_lodash_["filter"])(transforms[direction], t => {
1900      if (t.type === 'raw') {
1901        return true;
1902      }
1903  
1904      if (!t.blocks || !t.blocks.length) {
1905        return false;
1906      }
1907  
1908      if (isWildcardBlockTransform(t)) {
1909        return true;
1910      }
1911  
1912      return Object(external_lodash_["every"])(t.blocks, transformBlockName => transforms.supportedMobileTransforms.includes(transformBlockName));
1913    }) : transforms[direction]; // Map transforms to normal form.
1914  
1915    return filteredTransforms.map(transform => ({ ...transform,
1916      blockName,
1917      usingMobileTransformations
1918    }));
1919  }
1920  /**
1921   * Switch one or more blocks into one or more blocks of the new block type.
1922   *
1923   * @param {Array|Object} blocks Blocks array or block object.
1924   * @param {string}       name   Block name.
1925   *
1926   * @return {?Array} Array of blocks or null.
1927   */
1928  
1929  function switchToBlockType(blocks, name) {
1930    const blocksArray = Object(external_lodash_["castArray"])(blocks);
1931    const isMultiBlock = blocksArray.length > 1;
1932    const firstBlock = blocksArray[0];
1933    const sourceName = firstBlock.name; // Find the right transformation by giving priority to the "to"
1934    // transformation.
1935  
1936    const transformationsFrom = getBlockTransforms('from', name);
1937    const transformationsTo = getBlockTransforms('to', sourceName);
1938    const transformation = findTransform(transformationsTo, t => t.type === 'block' && (isWildcardBlockTransform(t) || t.blocks.indexOf(name) !== -1) && (!isMultiBlock || t.isMultiBlock)) || findTransform(transformationsFrom, t => t.type === 'block' && (isWildcardBlockTransform(t) || t.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || t.isMultiBlock)); // Stop if there is no valid transformation.
1939  
1940    if (!transformation) {
1941      return null;
1942    }
1943  
1944    let transformationResults;
1945  
1946    if (transformation.isMultiBlock) {
1947      if (Object(external_lodash_["has"])(transformation, '__experimentalConvert')) {
1948        transformationResults = transformation.__experimentalConvert(blocksArray);
1949      } else {
1950        transformationResults = transformation.transform(blocksArray.map(currentBlock => currentBlock.attributes), blocksArray.map(currentBlock => currentBlock.innerBlocks));
1951      }
1952    } else if (Object(external_lodash_["has"])(transformation, '__experimentalConvert')) {
1953      transformationResults = transformation.__experimentalConvert(firstBlock);
1954    } else {
1955      transformationResults = transformation.transform(firstBlock.attributes, firstBlock.innerBlocks);
1956    } // Ensure that the transformation function returned an object or an array
1957    // of objects.
1958  
1959  
1960    if (!Object(external_lodash_["isObjectLike"])(transformationResults)) {
1961      return null;
1962    } // If the transformation function returned a single object, we want to work
1963    // with an array instead.
1964  
1965  
1966    transformationResults = Object(external_lodash_["castArray"])(transformationResults); // Ensure that every block object returned by the transformation has a
1967    // valid block type.
1968  
1969    if (transformationResults.some(result => !registration_getBlockType(result.name))) {
1970      return null;
1971    }
1972  
1973    const hasSwitchedBlock = Object(external_lodash_["some"])(transformationResults, result => result.name === name); // Ensure that at least one block object returned by the transformation has
1974    // the expected "destination" block type.
1975  
1976    if (!hasSwitchedBlock) {
1977      return null;
1978    }
1979  
1980    const ret = transformationResults.map(result => {
1981      /**
1982       * Filters an individual transform result from block transformation.
1983       * All of the original blocks are passed, since transformations are
1984       * many-to-many, not one-to-one.
1985       *
1986       * @param {Object}   transformedBlock The transformed block.
1987       * @param {Object[]} blocks           Original blocks transformed.
1988       */
1989      return Object(external_wp_hooks_["applyFilters"])('blocks.switchToBlockType.transformedBlock', result, blocks);
1990    });
1991    return ret;
1992  }
1993  /**
1994   * Create a block object from the example API.
1995   *
1996   * @param {string} name
1997   * @param {Object} example
1998   *
1999   * @return {Object} block.
2000   */
2001  
2002  const getBlockFromExample = (name, example) => {
2003    return createBlock(name, example.attributes, Object(external_lodash_["map"])(example.innerBlocks, innerBlock => getBlockFromExample(innerBlock.name, innerBlock)));
2004  };
2005  
2006  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js
2007  /**
2008   * External dependencies
2009   */
2010  
2011  
2012  
2013  
2014  /**
2015   * WordPress dependencies
2016   */
2017  
2018  
2019  
2020  
2021  /**
2022   * Internal dependencies
2023   */
2024  
2025  
2026  
2027  
2028  Object(colord["b" /* extend */])([plugins_names["a" /* default */], a11y["a" /* default */]]);
2029  /**
2030   * Array of icon colors containing a color to be used if the icon color
2031   * was not explicitly set but the icon background color was.
2032   *
2033   * @type {Object}
2034   */
2035  
2036  const ICON_COLORS = ['#191e23', '#f8f9f9'];
2037  /**
2038   * Determines whether the block is a default block
2039   * and its attributes are equal to the default attributes
2040   * which means the block is unmodified.
2041   *
2042   * @param {WPBlock} block Block Object
2043   *
2044   * @return {boolean} Whether the block is an unmodified default block
2045   */
2046  
2047  function isUnmodifiedDefaultBlock(block) {
2048    const defaultBlockName = registration_getDefaultBlockName();
2049  
2050    if (block.name !== defaultBlockName) {
2051      return false;
2052    } // Cache a created default block if no cache exists or the default block
2053    // name changed.
2054  
2055  
2056    if (!isUnmodifiedDefaultBlock.block || isUnmodifiedDefaultBlock.block.name !== defaultBlockName) {
2057      isUnmodifiedDefaultBlock.block = createBlock(defaultBlockName);
2058    }
2059  
2060    const newDefaultBlock = isUnmodifiedDefaultBlock.block;
2061    const blockType = registration_getBlockType(defaultBlockName);
2062    return Object(external_lodash_["every"])(blockType === null || blockType === void 0 ? void 0 : blockType.attributes, (value, key) => newDefaultBlock.attributes[key] === block.attributes[key]);
2063  }
2064  /**
2065   * Function that checks if the parameter is a valid icon.
2066   *
2067   * @param {*} icon Parameter to be checked.
2068   *
2069   * @return {boolean} True if the parameter is a valid icon and false otherwise.
2070   */
2071  
2072  function isValidIcon(icon) {
2073    return !!icon && (Object(external_lodash_["isString"])(icon) || Object(external_wp_element_["isValidElement"])(icon) || Object(external_lodash_["isFunction"])(icon) || icon instanceof external_wp_element_["Component"]);
2074  }
2075  /**
2076   * Function that receives an icon as set by the blocks during the registration
2077   * and returns a new icon object that is normalized so we can rely on just on possible icon structure
2078   * in the codebase.
2079   *
2080   * @param {WPBlockTypeIconRender} icon Render behavior of a block type icon;
2081   *                                     one of a Dashicon slug, an element, or a
2082   *                                     component.
2083   *
2084   * @return {WPBlockTypeIconDescriptor} Object describing the icon.
2085   */
2086  
2087  function normalizeIconObject(icon) {
2088    icon = icon || BLOCK_ICON_DEFAULT;
2089  
2090    if (isValidIcon(icon)) {
2091      return {
2092        src: icon
2093      };
2094    }
2095  
2096    if (Object(external_lodash_["has"])(icon, ['background'])) {
2097      const colordBgColor = Object(colord["a" /* colord */])(icon.background);
2098      return { ...icon,
2099        foreground: icon.foreground ? icon.foreground : Object(external_lodash_["maxBy"])(ICON_COLORS, iconColor => colordBgColor.contrast(iconColor)),
2100        shadowColor: colordBgColor.alpha(0.3).toRgbString()
2101      };
2102    }
2103  
2104    return icon;
2105  }
2106  /**
2107   * Normalizes block type passed as param. When string is passed then
2108   * it converts it to the matching block type object.
2109   * It passes the original object otherwise.
2110   *
2111   * @param {string|Object} blockTypeOrName Block type or name.
2112   *
2113   * @return {?Object} Block type.
2114   */
2115  
2116  function normalizeBlockType(blockTypeOrName) {
2117    if (Object(external_lodash_["isString"])(blockTypeOrName)) {
2118      return registration_getBlockType(blockTypeOrName);
2119    }
2120  
2121    return blockTypeOrName;
2122  }
2123  /**
2124   * Get the label for the block, usually this is either the block title,
2125   * or the value of the block's `label` function when that's specified.
2126   *
2127   * @param {Object} blockType  The block type.
2128   * @param {Object} attributes The values of the block's attributes.
2129   * @param {Object} context    The intended use for the label.
2130   *
2131   * @return {string} The block label.
2132   */
2133  
2134  function getBlockLabel(blockType, attributes) {
2135    let context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'visual';
2136    const {
2137      __experimentalLabel: getLabel,
2138      title
2139    } = blockType;
2140    const label = getLabel && getLabel(attributes, {
2141      context
2142    });
2143  
2144    if (!label) {
2145      return title;
2146    } // Strip any HTML (i.e. RichText formatting) before returning.
2147  
2148  
2149    return Object(external_wp_dom_["__unstableStripHTML"])(label);
2150  }
2151  /**
2152   * Get a label for the block for use by screenreaders, this is more descriptive
2153   * than the visual label and includes the block title and the value of the
2154   * `getLabel` function if it's specified.
2155   *
2156   * @param {Object}  blockType              The block type.
2157   * @param {Object}  attributes             The values of the block's attributes.
2158   * @param {?number} position               The position of the block in the block list.
2159   * @param {string}  [direction='vertical'] The direction of the block layout.
2160   *
2161   * @return {string} The block label.
2162   */
2163  
2164  function getAccessibleBlockLabel(blockType, attributes, position) {
2165    let direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vertical';
2166    // `title` is already localized, `label` is a user-supplied value.
2167    const title = blockType === null || blockType === void 0 ? void 0 : blockType.title;
2168    const label = blockType ? getBlockLabel(blockType, attributes, 'accessibility') : '';
2169    const hasPosition = position !== undefined; // getBlockLabel returns the block title as a fallback when there's no label,
2170    // if it did return the title, this function needs to avoid adding the
2171    // title twice within the accessible label. Use this `hasLabel` boolean to
2172    // handle that.
2173  
2174    const hasLabel = label && label !== title;
2175  
2176    if (hasPosition && direction === 'vertical') {
2177      if (hasLabel) {
2178        return Object(external_wp_i18n_["sprintf"])(
2179        /* translators: accessibility text. 1: The block title. 2: The block row number. 3: The block label.. */
2180        Object(external_wp_i18n_["__"])('%1$s Block. Row %2$d. %3$s'), title, position, label);
2181      }
2182  
2183      return Object(external_wp_i18n_["sprintf"])(
2184      /* translators: accessibility text. 1: The block title. 2: The block row number. */
2185      Object(external_wp_i18n_["__"])('%1$s Block. Row %2$d'), title, position);
2186    } else if (hasPosition && direction === 'horizontal') {
2187      if (hasLabel) {
2188        return Object(external_wp_i18n_["sprintf"])(
2189        /* translators: accessibility text. 1: The block title. 2: The block column number. 3: The block label.. */
2190        Object(external_wp_i18n_["__"])('%1$s Block. Column %2$d. %3$s'), title, position, label);
2191      }
2192  
2193      return Object(external_wp_i18n_["sprintf"])(
2194      /* translators: accessibility text. 1: The block title. 2: The block column number. */
2195      Object(external_wp_i18n_["__"])('%1$s Block. Column %2$d'), title, position);
2196    }
2197  
2198    if (hasLabel) {
2199      return Object(external_wp_i18n_["sprintf"])(
2200      /* translators: accessibility text. %1: The block title. %2: The block label. */
2201      Object(external_wp_i18n_["__"])('%1$s Block. %2$s'), title, label);
2202    }
2203  
2204    return Object(external_wp_i18n_["sprintf"])(
2205    /* translators: accessibility text. %s: The block title. */
2206    Object(external_wp_i18n_["__"])('%s Block'), title);
2207  }
2208  /**
2209   * Ensure attributes contains only values defined by block type, and merge
2210   * default values for missing attributes.
2211   *
2212   * @param {string} name       The block's name.
2213   * @param {Object} attributes The block's attributes.
2214   * @return {Object} The sanitized attributes.
2215   */
2216  
2217  function __experimentalSanitizeBlockAttributes(name, attributes) {
2218    // Get the type definition associated with a registered block.
2219    const blockType = registration_getBlockType(name);
2220  
2221    if (undefined === blockType) {
2222      throw new Error(`Block type '$name}' is not registered.`);
2223    }
2224  
2225    return Object(external_lodash_["reduce"])(blockType.attributes, (accumulator, schema, key) => {
2226      const value = attributes[key];
2227  
2228      if (undefined !== value) {
2229        accumulator[key] = value;
2230      } else if (schema.hasOwnProperty('default')) {
2231        accumulator[key] = schema.default;
2232      }
2233  
2234      if (['node', 'children'].indexOf(schema.source) !== -1) {
2235        // Ensure value passed is always an array, which we're expecting in
2236        // the RichText component to handle the deprecated value.
2237        if (typeof accumulator[key] === 'string') {
2238          accumulator[key] = [accumulator[key]];
2239        } else if (!Array.isArray(accumulator[key])) {
2240          accumulator[key] = [];
2241        }
2242      }
2243  
2244      return accumulator;
2245    }, {});
2246  }
2247  /**
2248   * Filter block attributes by `role` and return their names.
2249   *
2250   * @param {string} name Block attribute's name.
2251   * @param {string} role The role of a block attribute.
2252   *
2253   * @return {string[]} The attribute names that have the provided role.
2254   */
2255  
2256  function __experimentalGetBlockAttributesNamesByRole(name, role) {
2257    var _getBlockType;
2258  
2259    const attributes = (_getBlockType = registration_getBlockType(name)) === null || _getBlockType === void 0 ? void 0 : _getBlockType.attributes;
2260    if (!attributes) return [];
2261    const attributesNames = Object.keys(attributes);
2262    if (!role) return attributesNames;
2263    return attributesNames.filter(attributeName => {
2264      var _attributes$attribute;
2265  
2266      return ((_attributes$attribute = attributes[attributeName]) === null || _attributes$attribute === void 0 ? void 0 : _attributes$attribute.__experimentalRole) === role;
2267    });
2268  }
2269  
2270  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/actions.js
2271  /**
2272   * External dependencies
2273   */
2274  
2275  /**
2276   * WordPress dependencies
2277   */
2278  
2279  
2280  
2281  /**
2282   * Internal dependencies
2283   */
2284  
2285  
2286  
2287  
2288  /** @typedef {import('../api/registration').WPBlockVariation} WPBlockVariation */
2289  
2290  const {
2291    error,
2292    warn
2293  } = window.console;
2294  /**
2295   * Mapping of legacy category slugs to their latest normal values, used to
2296   * accommodate updates of the default set of block categories.
2297   *
2298   * @type {Record<string,string>}
2299   */
2300  
2301  const LEGACY_CATEGORY_MAPPING = {
2302    common: 'text',
2303    formatting: 'text',
2304    layout: 'design'
2305  };
2306  /**
2307   * Takes the unprocessed block type data and applies all the existing filters for the registered block type.
2308   * Next, it validates all the settings and performs additional processing to the block type definition.
2309   *
2310   * @param {WPBlockType} blockType Unprocessed block type settings.
2311   *
2312   * @return {?WPBlockType} The block, if it has been successfully registered; otherwise `undefined`.
2313   */
2314  
2315  function processBlockType(blockType) {
2316    const {
2317      name
2318    } = blockType;
2319    const settings = Object(external_wp_hooks_["applyFilters"])('blocks.registerBlockType', { ...blockType
2320    }, name);
2321  
2322    if (settings.deprecated) {
2323      settings.deprecated = settings.deprecated.map(deprecation => Object(external_lodash_["pick"])( // Only keep valid deprecation keys.
2324      Object(external_wp_hooks_["applyFilters"])('blocks.registerBlockType', // Merge deprecation keys with pre-filter settings
2325      // so that filters that depend on specific keys being
2326      // present don't fail.
2327      { // Omit deprecation keys here so that deprecations
2328        // can opt out of specific keys like "supports".
2329        ...Object(external_lodash_["omit"])(blockType, DEPRECATED_ENTRY_KEYS),
2330        ...deprecation
2331      }, name), DEPRECATED_ENTRY_KEYS));
2332    }
2333  
2334    if (!Object(external_lodash_["isPlainObject"])(settings)) {
2335      error('Block settings must be a valid object.');
2336      return;
2337    }
2338  
2339    if (!Object(external_lodash_["isFunction"])(settings.save)) {
2340      error('The "save" property must be a valid function.');
2341      return;
2342    }
2343  
2344    if ('edit' in settings && !Object(external_lodash_["isFunction"])(settings.edit)) {
2345      error('The "edit" property must be a valid function.');
2346      return;
2347    } // Canonicalize legacy categories to equivalent fallback.
2348  
2349  
2350    if (LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
2351      settings.category = LEGACY_CATEGORY_MAPPING[settings.category];
2352    }
2353  
2354    if ('category' in settings && !Object(external_lodash_["some"])(Object(external_wp_data_["select"])(STORE_NAME).getCategories(), {
2355      slug: settings.category
2356    })) {
2357      warn('The block "' + name + '" is registered with an invalid category "' + settings.category + '".');
2358      delete settings.category;
2359    }
2360  
2361    if (!('title' in settings) || settings.title === '') {
2362      error('The block "' + name + '" must have a title.');
2363      return;
2364    }
2365  
2366    if (typeof settings.title !== 'string') {
2367      error('Block titles must be strings.');
2368      return;
2369    }
2370  
2371    settings.icon = normalizeIconObject(settings.icon);
2372  
2373    if (!isValidIcon(settings.icon.src)) {
2374      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');
2375      return;
2376    }
2377  
2378    return settings;
2379  }
2380  /**
2381   * Returns an action object used in signalling that block types have been added.
2382   *
2383   * @param {Array|Object} blockTypes Block types received.
2384   *
2385   * @return {Object} Action object.
2386   */
2387  
2388  
2389  function addBlockTypes(blockTypes) {
2390    return {
2391      type: 'ADD_BLOCK_TYPES',
2392      blockTypes: Object(external_lodash_["castArray"])(blockTypes)
2393    };
2394  }
2395  /**
2396   * Yields action objects signaling that the passed block type's settings should be stored in the state.
2397   *
2398   * @param {WPBlockType} blockType Unprocessed block type settings.
2399   *
2400   * @yield {Object} Action object.
2401   */
2402  
2403  function* __experimentalRegisterBlockType(blockType) {
2404    yield {
2405      type: 'ADD_UNPROCESSED_BLOCK_TYPE',
2406      blockType
2407    };
2408    const processedBlockType = processBlockType(blockType);
2409  
2410    if (!processedBlockType) {
2411      return;
2412    }
2413  
2414    yield addBlockTypes(processedBlockType);
2415  }
2416  /**
2417   * Yields an action object signaling that all block types should be computed again.
2418   * It uses stored unprocessed block types and all the most recent list of registered filters.
2419   *
2420   * It addresses the issue where third party block filters get registered after third party blocks. A sample sequence:
2421   *   1. Filter A.
2422   *   2. Block B.
2423   *   3. Block C.
2424   *   4. Filter D.
2425   *   5. Filter E.
2426   *   6. Block F.
2427   *   7. Filter G.
2428   * In this scenario some filters would not get applied for all blocks because they are registered too late.
2429   *
2430   * @yield {Object} Action object.
2431   */
2432  
2433  function* __experimentalReapplyBlockTypeFilters() {
2434    const unprocessedBlockTypes = Object(external_wp_data_["select"])(STORE_NAME).__experimentalGetUnprocessedBlockTypes();
2435  
2436    const processedBlockTypes = Object.keys(unprocessedBlockTypes).reduce((accumulator, blockName) => {
2437      const result = processBlockType(unprocessedBlockTypes[blockName]);
2438  
2439      if (result) {
2440        accumulator.push(result);
2441      }
2442  
2443      return accumulator;
2444    }, []);
2445  
2446    if (!processedBlockTypes.length) {
2447      return;
2448    }
2449  
2450    yield addBlockTypes(processedBlockTypes);
2451  }
2452  /**
2453   * Returns an action object used to remove a registered block type.
2454   *
2455   * @param {string|Array} names Block name.
2456   *
2457   * @return {Object} Action object.
2458   */
2459  
2460  function removeBlockTypes(names) {
2461    return {
2462      type: 'REMOVE_BLOCK_TYPES',
2463      names: Object(external_lodash_["castArray"])(names)
2464    };
2465  }
2466  /**
2467   * Returns an action object used in signalling that new block styles have been added.
2468   *
2469   * @param {string}       blockName Block name.
2470   * @param {Array|Object} styles    Block styles.
2471   *
2472   * @return {Object} Action object.
2473   */
2474  
2475  function addBlockStyles(blockName, styles) {
2476    return {
2477      type: 'ADD_BLOCK_STYLES',
2478      styles: Object(external_lodash_["castArray"])(styles),
2479      blockName
2480    };
2481  }
2482  /**
2483   * Returns an action object used in signalling that block styles have been removed.
2484   *
2485   * @param {string}       blockName  Block name.
2486   * @param {Array|string} styleNames Block style names.
2487   *
2488   * @return {Object} Action object.
2489   */
2490  
2491  function removeBlockStyles(blockName, styleNames) {
2492    return {
2493      type: 'REMOVE_BLOCK_STYLES',
2494      styleNames: Object(external_lodash_["castArray"])(styleNames),
2495      blockName
2496    };
2497  }
2498  /**
2499   * Returns an action object used in signalling that new block variations have been added.
2500   *
2501   * @param {string}                              blockName  Block name.
2502   * @param {WPBlockVariation|WPBlockVariation[]} variations Block variations.
2503   *
2504   * @return {Object} Action object.
2505   */
2506  
2507  function addBlockVariations(blockName, variations) {
2508    return {
2509      type: 'ADD_BLOCK_VARIATIONS',
2510      variations: Object(external_lodash_["castArray"])(variations),
2511      blockName
2512    };
2513  }
2514  /**
2515   * Returns an action object used in signalling that block variations have been removed.
2516   *
2517   * @param {string}          blockName      Block name.
2518   * @param {string|string[]} variationNames Block variation names.
2519   *
2520   * @return {Object} Action object.
2521   */
2522  
2523  function removeBlockVariations(blockName, variationNames) {
2524    return {
2525      type: 'REMOVE_BLOCK_VARIATIONS',
2526      variationNames: Object(external_lodash_["castArray"])(variationNames),
2527      blockName
2528    };
2529  }
2530  /**
2531   * Returns an action object used to set the default block name.
2532   *
2533   * @param {string} name Block name.
2534   *
2535   * @return {Object} Action object.
2536   */
2537  
2538  function actions_setDefaultBlockName(name) {
2539    return {
2540      type: 'SET_DEFAULT_BLOCK_NAME',
2541      name
2542    };
2543  }
2544  /**
2545   * Returns an action object used to set the name of the block used as a fallback
2546   * for non-block content.
2547   *
2548   * @param {string} name Block name.
2549   *
2550   * @return {Object} Action object.
2551   */
2552  
2553  function setFreeformFallbackBlockName(name) {
2554    return {
2555      type: 'SET_FREEFORM_FALLBACK_BLOCK_NAME',
2556      name
2557    };
2558  }
2559  /**
2560   * Returns an action object used to set the name of the block used as a fallback
2561   * for unregistered blocks.
2562   *
2563   * @param {string} name Block name.
2564   *
2565   * @return {Object} Action object.
2566   */
2567  
2568  function setUnregisteredFallbackBlockName(name) {
2569    return {
2570      type: 'SET_UNREGISTERED_FALLBACK_BLOCK_NAME',
2571      name
2572    };
2573  }
2574  /**
2575   * Returns an action object used to set the name of the block used
2576   * when grouping other blocks
2577   * eg: in "Group/Ungroup" interactions
2578   *
2579   * @param {string} name Block name.
2580   *
2581   * @return {Object} Action object.
2582   */
2583  
2584  function actions_setGroupingBlockName(name) {
2585    return {
2586      type: 'SET_GROUPING_BLOCK_NAME',
2587      name
2588    };
2589  }
2590  /**
2591   * Returns an action object used to set block categories.
2592   *
2593   * @param {Object[]} categories Block categories.
2594   *
2595   * @return {Object} Action object.
2596   */
2597  
2598  function setCategories(categories) {
2599    return {
2600      type: 'SET_CATEGORIES',
2601      categories
2602    };
2603  }
2604  /**
2605   * Returns an action object used to update a category.
2606   *
2607   * @param {string} slug     Block category slug.
2608   * @param {Object} category Object containing the category properties that should be updated.
2609   *
2610   * @return {Object} Action object.
2611   */
2612  
2613  function updateCategory(slug, category) {
2614    return {
2615      type: 'UPDATE_CATEGORY',
2616      slug,
2617      category
2618    };
2619  }
2620  /**
2621   * Returns an action object used to add block collections
2622   *
2623   * @param {string} namespace The namespace of the blocks to put in the collection
2624   * @param {string} title     The title to display in the block inserter
2625   * @param {Object} icon      (optional) The icon to display in the block inserter
2626   *
2627   * @return {Object} Action object.
2628   */
2629  
2630  function addBlockCollection(namespace, title, icon) {
2631    return {
2632      type: 'ADD_BLOCK_COLLECTION',
2633      namespace,
2634      title,
2635      icon
2636    };
2637  }
2638  /**
2639   * Returns an action object used to remove block collections
2640   *
2641   * @param {string} namespace The namespace of the blocks to put in the collection
2642   *
2643   * @return {Object} Action object.
2644   */
2645  
2646  function removeBlockCollection(namespace) {
2647    return {
2648      type: 'REMOVE_BLOCK_COLLECTION',
2649      namespace
2650    };
2651  }
2652  
2653  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/index.js
2654  /**
2655   * WordPress dependencies
2656   */
2657  
2658  /**
2659   * Internal dependencies
2660   */
2661  
2662  
2663  
2664  
2665  
2666  /**
2667   * Store definition for the blocks namespace.
2668   *
2669   * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
2670   *
2671   * @type {Object}
2672   */
2673  
2674  const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, {
2675    reducer: reducer,
2676    selectors: selectors_namespaceObject,
2677    actions: actions_namespaceObject
2678  });
2679  Object(external_wp_data_["register"])(store);
2680  
2681  // EXTERNAL MODULE: external ["wp","blockSerializationDefaultParser"]
2682  var external_wp_blockSerializationDefaultParser_ = __webpack_require__("ouCq");
2683  
2684  // EXTERNAL MODULE: external ["wp","autop"]
2685  var external_wp_autop_ = __webpack_require__("UuzZ");
2686  
2687  // EXTERNAL MODULE: external ["wp","isShallowEqual"]
2688  var external_wp_isShallowEqual_ = __webpack_require__("rl8x");
2689  var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_);
2690  
2691  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/serializer.js
2692  
2693  
2694  /**
2695   * External dependencies
2696   */
2697  
2698  /**
2699   * WordPress dependencies
2700   */
2701  
2702  
2703  
2704  
2705  
2706  /**
2707   * Internal dependencies
2708   */
2709  
2710  
2711  
2712  /**
2713   * @typedef {Object} WPBlockSerializationOptions Serialization Options.
2714   *
2715   * @property {boolean} isInnerBlocks Whether we are serializing inner blocks.
2716   */
2717  
2718  /**
2719   * Returns the block's default classname from its name.
2720   *
2721   * @param {string} blockName The block name.
2722   *
2723   * @return {string} The block's default class.
2724   */
2725  
2726  function getBlockDefaultClassName(blockName) {
2727    // Generated HTML classes for blocks follow the `wp-block-{name}` nomenclature.
2728    // Blocks provided by WordPress drop the prefixes 'core/' or 'core-' (historically used in 'core-embed/').
2729    const className = 'wp-block-' + blockName.replace(/\//, '-').replace(/^core-/, '');
2730    return Object(external_wp_hooks_["applyFilters"])('blocks.getBlockDefaultClassName', className, blockName);
2731  }
2732  /**
2733   * Returns the block's default menu item classname from its name.
2734   *
2735   * @param {string} blockName The block name.
2736   *
2737   * @return {string} The block's default menu item class.
2738   */
2739  
2740  function getBlockMenuDefaultClassName(blockName) {
2741    // Generated HTML classes for blocks follow the `editor-block-list-item-{name}` nomenclature.
2742    // Blocks provided by WordPress drop the prefixes 'core/' or 'core-' (historically used in 'core-embed/').
2743    const className = 'editor-block-list-item-' + blockName.replace(/\//, '-').replace(/^core-/, '');
2744    return Object(external_wp_hooks_["applyFilters"])('blocks.getBlockMenuDefaultClassName', className, blockName);
2745  }
2746  const blockPropsProvider = {};
2747  const innerBlocksPropsProvider = {};
2748  /**
2749   * Call within a save function to get the props for the block wrapper.
2750   *
2751   * @param {Object} props Optional. Props to pass to the element.
2752   */
2753  
2754  function getBlockProps() {
2755    let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2756    const {
2757      blockType,
2758      attributes
2759    } = blockPropsProvider;
2760    return Object(external_wp_hooks_["applyFilters"])('blocks.getSaveContent.extraProps', { ...props
2761    }, blockType, attributes);
2762  }
2763  /**
2764   * Call within a save function to get the props for the inner blocks wrapper.
2765   *
2766   * @param {Object} props Optional. Props to pass to the element.
2767   */
2768  
2769  function getInnerBlocksProps() {
2770    let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2771    const {
2772      innerBlocks
2773    } = innerBlocksPropsProvider; // Value is an array of blocks, so defer to block serializer
2774  
2775    const html = serialize(innerBlocks, {
2776      isInnerBlocks: true
2777    }); // Use special-cased raw HTML tag to avoid default escaping.
2778  
2779    const children = Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, html);
2780    return { ...props,
2781      children
2782    };
2783  }
2784  /**
2785   * Given a block type containing a save render implementation and attributes, returns the
2786   * enhanced element to be saved or string when raw HTML expected.
2787   *
2788   * @param {string|Object} blockTypeOrName Block type or name.
2789   * @param {Object}        attributes      Block attributes.
2790   * @param {?Array}        innerBlocks     Nested blocks.
2791   *
2792   * @return {Object|string} Save element or raw HTML string.
2793   */
2794  
2795  function getSaveElement(blockTypeOrName, attributes) {
2796    let innerBlocks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
2797    const blockType = normalizeBlockType(blockTypeOrName);
2798    let {
2799      save
2800    } = blockType; // Component classes are unsupported for save since serialization must
2801    // occur synchronously. For improved interoperability with higher-order
2802    // components which often return component class, emulate basic support.
2803  
2804    if (save.prototype instanceof external_wp_element_["Component"]) {
2805      const instance = new save({
2806        attributes
2807      });
2808      save = instance.render.bind(instance);
2809    }
2810  
2811    blockPropsProvider.blockType = blockType;
2812    blockPropsProvider.attributes = attributes;
2813    innerBlocksPropsProvider.innerBlocks = innerBlocks;
2814    let element = save({
2815      attributes,
2816      innerBlocks
2817    });
2818  
2819    if (Object(external_lodash_["isObject"])(element) && Object(external_wp_hooks_["hasFilter"])('blocks.getSaveContent.extraProps') && !(blockType.apiVersion > 1)) {
2820      /**
2821       * Filters the props applied to the block save result element.
2822       *
2823       * @param {Object}  props      Props applied to save element.
2824       * @param {WPBlock} blockType  Block type definition.
2825       * @param {Object}  attributes Block attributes.
2826       */
2827      const props = Object(external_wp_hooks_["applyFilters"])('blocks.getSaveContent.extraProps', { ...element.props
2828      }, blockType, attributes);
2829  
2830      if (!external_wp_isShallowEqual_default()(props, element.props)) {
2831        element = Object(external_wp_element_["cloneElement"])(element, props);
2832      }
2833    }
2834    /**
2835     * Filters the save result of a block during serialization.
2836     *
2837     * @param {WPElement} element    Block save result.
2838     * @param {WPBlock}   blockType  Block type definition.
2839     * @param {Object}    attributes Block attributes.
2840     */
2841  
2842  
2843    return Object(external_wp_hooks_["applyFilters"])('blocks.getSaveElement', element, blockType, attributes);
2844  }
2845  /**
2846   * Given a block type containing a save render implementation and attributes, returns the
2847   * static markup to be saved.
2848   *
2849   * @param {string|Object} blockTypeOrName Block type or name.
2850   * @param {Object}        attributes      Block attributes.
2851   * @param {?Array}        innerBlocks     Nested blocks.
2852   *
2853   * @return {string} Save content.
2854   */
2855  
2856  function getSaveContent(blockTypeOrName, attributes, innerBlocks) {
2857    const blockType = normalizeBlockType(blockTypeOrName);
2858    return Object(external_wp_element_["renderToString"])(getSaveElement(blockType, attributes, innerBlocks));
2859  }
2860  /**
2861   * Returns attributes which are to be saved and serialized into the block
2862   * comment delimiter.
2863   *
2864   * When a block exists in memory it contains as its attributes both those
2865   * parsed the block comment delimiter _and_ those which matched from the
2866   * contents of the block.
2867   *
2868   * This function returns only those attributes which are needed to persist and
2869   * which cannot be matched from the block content.
2870   *
2871   * @param {Object<string,*>} blockType  Block type.
2872   * @param {Object<string,*>} attributes Attributes from in-memory block data.
2873   *
2874   * @return {Object<string,*>} Subset of attributes for comment serialization.
2875   */
2876  
2877  function getCommentAttributes(blockType, attributes) {
2878    return Object(external_lodash_["reduce"])(blockType.attributes, (accumulator, attributeSchema, key) => {
2879      const value = attributes[key]; // Ignore undefined values.
2880  
2881      if (undefined === value) {
2882        return accumulator;
2883      } // Ignore all attributes but the ones with an "undefined" source
2884      // "undefined" source refers to attributes saved in the block comment.
2885  
2886  
2887      if (attributeSchema.source !== undefined) {
2888        return accumulator;
2889      } // Ignore default value.
2890  
2891  
2892      if ('default' in attributeSchema && attributeSchema.default === value) {
2893        return accumulator;
2894      } // Otherwise, include in comment set.
2895  
2896  
2897      accumulator[key] = value;
2898      return accumulator;
2899    }, {});
2900  }
2901  /**
2902   * Given an attributes object, returns a string in the serialized attributes
2903   * format prepared for post content.
2904   *
2905   * @param {Object} attributes Attributes object.
2906   *
2907   * @return {string} Serialized attributes.
2908   */
2909  
2910  function serializeAttributes(attributes) {
2911    return JSON.stringify(attributes) // Don't break HTML comments.
2912    .replace(/--/g, '\\u002d\\u002d') // Don't break non-standard-compliant tools.
2913    .replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/&/g, '\\u0026') // Bypass server stripslashes behavior which would unescape stringify's
2914    // escaping of quotation mark.
2915    //
2916    // See: https://developer.wordpress.org/reference/functions/wp_kses_stripslashes/
2917    .replace(/\\"/g, '\\u0022');
2918  }
2919  /**
2920   * Given a block object, returns the Block's Inner HTML markup.
2921   *
2922   * @param {Object} block Block instance.
2923   *
2924   * @return {string} HTML.
2925   */
2926  
2927  function getBlockInnerHTML(block) {
2928    // If block was parsed as invalid or encounters an error while generating
2929    // save content, use original content instead to avoid content loss. If a
2930    // block contains nested content, exempt it from this condition because we
2931    // otherwise have no access to its original content and content loss would
2932    // still occur.
2933    let saveContent = block.originalContent;
2934  
2935    if (block.isValid || block.innerBlocks.length) {
2936      try {
2937        saveContent = getSaveContent(block.name, block.attributes, block.innerBlocks);
2938      } catch (error) {}
2939    }
2940  
2941    return saveContent;
2942  }
2943  /**
2944   * Returns the content of a block, including comment delimiters.
2945   *
2946   * @param {string} rawBlockName Block name.
2947   * @param {Object} attributes   Block attributes.
2948   * @param {string} content      Block save content.
2949   *
2950   * @return {string} Comment-delimited block content.
2951   */
2952  
2953  function getCommentDelimitedContent(rawBlockName, attributes, content) {
2954    const serializedAttributes = !Object(external_lodash_["isEmpty"])(attributes) ? serializeAttributes(attributes) + ' ' : ''; // Strip core blocks of their namespace prefix.
2955  
2956    const blockName = Object(external_lodash_["startsWith"])(rawBlockName, 'core/') ? rawBlockName.slice(5) : rawBlockName; // @todo make the `wp:` prefix potentially configurable.
2957  
2958    if (!content) {
2959      return `<!-- wp:$blockName} $serializedAttributes}/-->`;
2960    }
2961  
2962    return `<!-- wp:$blockName} $serializedAttributes}-->\n` + content + `\n<!-- /wp:$blockName} -->`;
2963  }
2964  /**
2965   * Returns the content of a block, including comment delimiters, determining
2966   * serialized attributes and content form from the current state of the block.
2967   *
2968   * @param {Object}                      block   Block instance.
2969   * @param {WPBlockSerializationOptions} options Serialization options.
2970   *
2971   * @return {string} Serialized block.
2972   */
2973  
2974  function serializeBlock(block) {
2975    let {
2976      isInnerBlocks = false
2977    } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2978    const blockName = block.name;
2979    const saveContent = getBlockInnerHTML(block);
2980  
2981    if (blockName === getUnregisteredTypeHandlerName() || !isInnerBlocks && blockName === getFreeformContentHandlerName()) {
2982      return saveContent;
2983    }
2984  
2985    const blockType = registration_getBlockType(blockName);
2986    const saveAttributes = getCommentAttributes(blockType, block.attributes);
2987    return getCommentDelimitedContent(blockName, saveAttributes, saveContent);
2988  }
2989  function __unstableSerializeAndClean(blocks) {
2990    // A single unmodified default block is assumed to
2991    // be equivalent to an empty post.
2992    if (blocks.length === 1 && isUnmodifiedDefaultBlock(blocks[0])) {
2993      blocks = [];
2994    }
2995  
2996    let content = serialize(blocks); // For compatibility, treat a post consisting of a
2997    // single freeform block as legacy content and apply
2998    // pre-block-editor removep'd content formatting.
2999  
3000    if (blocks.length === 1 && blocks[0].name === getFreeformContentHandlerName()) {
3001      content = Object(external_wp_autop_["removep"])(content);
3002    }
3003  
3004    return content;
3005  }
3006  /**
3007   * Takes a block or set of blocks and returns the serialized post content.
3008   *
3009   * @param {Array}                       blocks  Block(s) to serialize.
3010   * @param {WPBlockSerializationOptions} options Serialization options.
3011   *
3012   * @return {string} The post content.
3013   */
3014  
3015  function serialize(blocks, options) {
3016    return Object(external_lodash_["castArray"])(blocks).map(block => serializeBlock(block, options)).join('\n\n');
3017  }
3018  
3019  // CONCATENATED MODULE: ./node_modules/simple-html-tokenizer/dist/es6/index.js
3020  /**
3021   * generated from https://raw.githubusercontent.com/w3c/html/26b5126f96f736f796b9e29718138919dd513744/entities.json
3022   * do not edit
3023   */
3024  var namedCharRefs = {
3025      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"
3026  };
3027  
3028  var HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/;
3029  var CHARCODE = /^#([0-9]+)$/;
3030  var NAMED = /^([A-Za-z0-9]+)$/;
3031  var EntityParser = /** @class */ (function () {
3032      function EntityParser(named) {
3033          this.named = named;
3034      }
3035      EntityParser.prototype.parse = function (entity) {
3036          if (!entity) {
3037              return;
3038          }
3039          var matches = entity.match(HEXCHARCODE);
3040          if (matches) {
3041              return String.fromCharCode(parseInt(matches[1], 16));
3042          }
3043          matches = entity.match(CHARCODE);
3044          if (matches) {
3045              return String.fromCharCode(parseInt(matches[1], 10));
3046          }
3047          matches = entity.match(NAMED);
3048          if (matches) {
3049              return this.named[matches[1]];
3050          }
3051      };
3052      return EntityParser;
3053  }());
3054  
3055  var WSP = /[\t\n\f ]/;
3056  var ALPHA = /[A-Za-z]/;
3057  var CRLF = /\r\n?/g;
3058  function isSpace(char) {
3059      return WSP.test(char);
3060  }
3061  function isAlpha(char) {
3062      return ALPHA.test(char);
3063  }
3064  function preprocessInput(input) {
3065      return input.replace(CRLF, '\n');
3066  }
3067  
3068  var EventedTokenizer = /** @class */ (function () {
3069      function EventedTokenizer(delegate, entityParser, mode) {
3070          if (mode === void 0) { mode = 'precompile'; }
3071          this.delegate = delegate;
3072          this.entityParser = entityParser;
3073          this.mode = mode;
3074          this.state = "beforeData" /* beforeData */;
3075          this.line = -1;
3076          this.column = -1;
3077          this.input = '';
3078          this.index = -1;
3079          this.tagNameBuffer = '';
3080          this.states = {
3081              beforeData: function () {
3082                  var char = this.peek();
3083                  if (char === '<' && !this.isIgnoredEndTag()) {
3084                      this.transitionTo("tagOpen" /* tagOpen */);
3085                      this.markTagStart();
3086                      this.consume();
3087                  }
3088                  else {
3089                      if (this.mode === 'precompile' && char === '\n') {
3090                          var tag = this.tagNameBuffer.toLowerCase();
3091                          if (tag === 'pre' || tag === 'textarea') {
3092                              this.consume();
3093                          }
3094                      }
3095                      this.transitionTo("data" /* data */);
3096                      this.delegate.beginData();
3097                  }
3098              },
3099              data: function () {
3100                  var char = this.peek();
3101                  var tag = this.tagNameBuffer;
3102                  if (char === '<' && !this.isIgnoredEndTag()) {
3103                      this.delegate.finishData();
3104                      this.transitionTo("tagOpen" /* tagOpen */);
3105                      this.markTagStart();
3106                      this.consume();
3107                  }
3108                  else if (char === '&' && tag !== 'script' && tag !== 'style') {
3109                      this.consume();
3110                      this.delegate.appendToData(this.consumeCharRef() || '&');
3111                  }
3112                  else {
3113                      this.consume();
3114                      this.delegate.appendToData(char);
3115                  }
3116              },
3117              tagOpen: function () {
3118                  var char = this.consume();
3119                  if (char === '!') {
3120                      this.transitionTo("markupDeclarationOpen" /* markupDeclarationOpen */);
3121                  }
3122                  else if (char === '/') {
3123                      this.transitionTo("endTagOpen" /* endTagOpen */);
3124                  }
3125                  else if (char === '@' || char === ':' || isAlpha(char)) {
3126                      this.transitionTo("tagName" /* tagName */);
3127                      this.tagNameBuffer = '';
3128                      this.delegate.beginStartTag();
3129                      this.appendToTagName(char);
3130                  }
3131              },
3132              markupDeclarationOpen: function () {
3133                  var char = this.consume();
3134                  if (char === '-' && this.peek() === '-') {
3135                      this.consume();
3136                      this.transitionTo("commentStart" /* commentStart */);
3137                      this.delegate.beginComment();
3138                  }
3139                  else {
3140                      var maybeDoctype = char.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase();
3141                      if (maybeDoctype === 'DOCTYPE') {
3142                          this.consume();
3143                          this.consume();
3144                          this.consume();
3145                          this.consume();
3146                          this.consume();
3147                          this.consume();
3148                          this.transitionTo("doctype" /* doctype */);
3149                          if (this.delegate.beginDoctype)
3150                              this.delegate.beginDoctype();
3151                      }
3152                  }
3153              },
3154              doctype: function () {
3155                  var char = this.consume();
3156                  if (isSpace(char)) {
3157                      this.transitionTo("beforeDoctypeName" /* beforeDoctypeName */);
3158                  }
3159              },
3160              beforeDoctypeName: function () {
3161                  var char = this.consume();
3162                  if (isSpace(char)) {
3163                      return;
3164                  }
3165                  else {
3166                      this.transitionTo("doctypeName" /* doctypeName */);
3167                      if (this.delegate.appendToDoctypeName)
3168                          this.delegate.appendToDoctypeName(char.toLowerCase());
3169                  }
3170              },
3171              doctypeName: function () {
3172                  var char = this.consume();
3173                  if (isSpace(char)) {
3174                      this.transitionTo("afterDoctypeName" /* afterDoctypeName */);
3175                  }
3176                  else if (char === '>') {
3177                      if (this.delegate.endDoctype)
3178                          this.delegate.endDoctype();
3179                      this.transitionTo("beforeData" /* beforeData */);
3180                  }
3181                  else {
3182                      if (this.delegate.appendToDoctypeName)
3183                          this.delegate.appendToDoctypeName(char.toLowerCase());
3184                  }
3185              },
3186              afterDoctypeName: function () {
3187                  var char = this.consume();
3188                  if (isSpace(char)) {
3189                      return;
3190                  }
3191                  else if (char === '>') {
3192                      if (this.delegate.endDoctype)
3193                          this.delegate.endDoctype();
3194                      this.transitionTo("beforeData" /* beforeData */);
3195                  }
3196                  else {
3197                      var nextSixChars = char.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase();
3198                      var isPublic = nextSixChars.toUpperCase() === 'PUBLIC';
3199                      var isSystem = nextSixChars.toUpperCase() === 'SYSTEM';
3200                      if (isPublic || isSystem) {
3201                          this.consume();
3202                          this.consume();
3203                          this.consume();
3204                          this.consume();
3205                          this.consume();
3206                          this.consume();
3207                      }
3208                      if (isPublic) {
3209                          this.transitionTo("afterDoctypePublicKeyword" /* afterDoctypePublicKeyword */);
3210                      }
3211                      else if (isSystem) {
3212                          this.transitionTo("afterDoctypeSystemKeyword" /* afterDoctypeSystemKeyword */);
3213                      }
3214                  }
3215              },
3216              afterDoctypePublicKeyword: function () {
3217                  var char = this.peek();
3218                  if (isSpace(char)) {
3219                      this.transitionTo("beforeDoctypePublicIdentifier" /* beforeDoctypePublicIdentifier */);
3220                      this.consume();
3221                  }
3222                  else if (char === '"') {
3223                      this.transitionTo("doctypePublicIdentifierDoubleQuoted" /* doctypePublicIdentifierDoubleQuoted */);
3224                      this.consume();
3225                  }
3226                  else if (char === "'") {
3227                      this.transitionTo("doctypePublicIdentifierSingleQuoted" /* doctypePublicIdentifierSingleQuoted */);
3228                      this.consume();
3229                  }
3230                  else if (char === '>') {
3231                      this.consume();
3232                      if (this.delegate.endDoctype)
3233                          this.delegate.endDoctype();
3234                      this.transitionTo("beforeData" /* beforeData */);
3235                  }
3236              },
3237              doctypePublicIdentifierDoubleQuoted: function () {
3238                  var char = this.consume();
3239                  if (char === '"') {
3240                      this.transitionTo("afterDoctypePublicIdentifier" /* afterDoctypePublicIdentifier */);
3241                  }
3242                  else if (char === '>') {
3243                      if (this.delegate.endDoctype)
3244                          this.delegate.endDoctype();
3245                      this.transitionTo("beforeData" /* beforeData */);
3246                  }
3247                  else {
3248                      if (this.delegate.appendToDoctypePublicIdentifier)
3249                          this.delegate.appendToDoctypePublicIdentifier(char);
3250                  }
3251              },
3252              doctypePublicIdentifierSingleQuoted: function () {
3253                  var char = this.consume();
3254                  if (char === "'") {
3255                      this.transitionTo("afterDoctypePublicIdentifier" /* afterDoctypePublicIdentifier */);
3256                  }
3257                  else if (char === '>') {
3258                      if (this.delegate.endDoctype)
3259                          this.delegate.endDoctype();
3260                      this.transitionTo("beforeData" /* beforeData */);
3261                  }
3262                  else {
3263                      if (this.delegate.appendToDoctypePublicIdentifier)
3264                          this.delegate.appendToDoctypePublicIdentifier(char);
3265                  }
3266              },
3267              afterDoctypePublicIdentifier: function () {
3268                  var char = this.consume();
3269                  if (isSpace(char)) {
3270                      this.transitionTo("betweenDoctypePublicAndSystemIdentifiers" /* betweenDoctypePublicAndSystemIdentifiers */);
3271                  }
3272                  else if (char === '>') {
3273                      if (this.delegate.endDoctype)
3274                          this.delegate.endDoctype();
3275                      this.transitionTo("beforeData" /* beforeData */);
3276                  }
3277                  else if (char === '"') {
3278                      this.transitionTo("doctypeSystemIdentifierDoubleQuoted" /* doctypeSystemIdentifierDoubleQuoted */);
3279                  }
3280                  else if (char === "'") {
3281                      this.transitionTo("doctypeSystemIdentifierSingleQuoted" /* doctypeSystemIdentifierSingleQuoted */);
3282                  }
3283              },
3284              betweenDoctypePublicAndSystemIdentifiers: function () {
3285                  var char = this.consume();
3286                  if (isSpace(char)) {
3287                      return;
3288                  }
3289                  else if (char === '>') {
3290                      if (this.delegate.endDoctype)
3291                          this.delegate.endDoctype();
3292                      this.transitionTo("beforeData" /* beforeData */);
3293                  }
3294                  else if (char === '"') {
3295                      this.transitionTo("doctypeSystemIdentifierDoubleQuoted" /* doctypeSystemIdentifierDoubleQuoted */);
3296                  }
3297                  else if (char === "'") {
3298                      this.transitionTo("doctypeSystemIdentifierSingleQuoted" /* doctypeSystemIdentifierSingleQuoted */);
3299                  }
3300              },
3301              doctypeSystemIdentifierDoubleQuoted: function () {
3302                  var char = this.consume();
3303                  if (char === '"') {
3304                      this.transitionTo("afterDoctypeSystemIdentifier" /* afterDoctypeSystemIdentifier */);
3305                  }
3306                  else if (char === '>') {
3307                      if (this.delegate.endDoctype)
3308                          this.delegate.endDoctype();
3309                      this.transitionTo("beforeData" /* beforeData */);
3310                  }
3311                  else {
3312                      if (this.delegate.appendToDoctypeSystemIdentifier)
3313                          this.delegate.appendToDoctypeSystemIdentifier(char);
3314                  }
3315              },
3316              doctypeSystemIdentifierSingleQuoted: function () {
3317                  var char = this.consume();
3318                  if (char === "'") {
3319                      this.transitionTo("afterDoctypeSystemIdentifier" /* afterDoctypeSystemIdentifier */);
3320                  }
3321                  else if (char === '>') {
3322                      if (this.delegate.endDoctype)
3323                          this.delegate.endDoctype();
3324                      this.transitionTo("beforeData" /* beforeData */);
3325                  }
3326                  else {
3327                      if (this.delegate.appendToDoctypeSystemIdentifier)
3328                          this.delegate.appendToDoctypeSystemIdentifier(char);
3329                  }
3330              },
3331              afterDoctypeSystemIdentifier: function () {
3332                  var char = this.consume();
3333                  if (isSpace(char)) {
3334                      return;
3335                  }
3336                  else if (char === '>') {
3337                      if (this.delegate.endDoctype)
3338                          this.delegate.endDoctype();
3339                      this.transitionTo("beforeData" /* beforeData */);
3340                  }
3341              },
3342              commentStart: function () {
3343                  var char = this.consume();
3344                  if (char === '-') {
3345                      this.transitionTo("commentStartDash" /* commentStartDash */);
3346                  }
3347                  else if (char === '>') {
3348                      this.delegate.finishComment();
3349                      this.transitionTo("beforeData" /* beforeData */);
3350                  }
3351                  else {
3352                      this.delegate.appendToCommentData(char);
3353                      this.transitionTo("comment" /* comment */);
3354                  }
3355              },
3356              commentStartDash: function () {
3357                  var char = this.consume();
3358                  if (char === '-') {
3359                      this.transitionTo("commentEnd" /* commentEnd */);
3360                  }
3361                  else if (char === '>') {
3362                      this.delegate.finishComment();
3363                      this.transitionTo("beforeData" /* beforeData */);
3364                  }
3365                  else {
3366                      this.delegate.appendToCommentData('-');
3367                      this.transitionTo("comment" /* comment */);
3368                  }
3369              },
3370              comment: function () {
3371                  var char = this.consume();
3372                  if (char === '-') {
3373                      this.transitionTo("commentEndDash" /* commentEndDash */);
3374                  }
3375                  else {
3376                      this.delegate.appendToCommentData(char);
3377                  }
3378              },
3379              commentEndDash: function () {
3380                  var char = this.consume();
3381                  if (char === '-') {
3382                      this.transitionTo("commentEnd" /* commentEnd */);
3383                  }
3384                  else {
3385                      this.delegate.appendToCommentData('-' + char);
3386                      this.transitionTo("comment" /* comment */);
3387                  }
3388              },
3389              commentEnd: function () {
3390                  var char = this.consume();
3391                  if (char === '>') {
3392                      this.delegate.finishComment();
3393                      this.transitionTo("beforeData" /* beforeData */);
3394                  }
3395                  else {
3396                      this.delegate.appendToCommentData('--' + char);
3397                      this.transitionTo("comment" /* comment */);
3398                  }
3399              },
3400              tagName: function () {
3401                  var char = this.consume();
3402                  if (isSpace(char)) {
3403                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
3404                  }
3405                  else if (char === '/') {
3406                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3407                  }
3408                  else if (char === '>') {
3409                      this.delegate.finishTag();
3410                      this.transitionTo("beforeData" /* beforeData */);
3411                  }
3412                  else {
3413                      this.appendToTagName(char);
3414                  }
3415              },
3416              endTagName: function () {
3417                  var char = this.consume();
3418                  if (isSpace(char)) {
3419                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
3420                      this.tagNameBuffer = '';
3421                  }
3422                  else if (char === '/') {
3423                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3424                      this.tagNameBuffer = '';
3425                  }
3426                  else if (char === '>') {
3427                      this.delegate.finishTag();
3428                      this.transitionTo("beforeData" /* beforeData */);
3429                      this.tagNameBuffer = '';
3430                  }
3431                  else {
3432                      this.appendToTagName(char);
3433                  }
3434              },
3435              beforeAttributeName: function () {
3436                  var char = this.peek();
3437                  if (isSpace(char)) {
3438                      this.consume();
3439                      return;
3440                  }
3441                  else if (char === '/') {
3442                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3443                      this.consume();
3444                  }
3445                  else if (char === '>') {
3446                      this.consume();
3447                      this.delegate.finishTag();
3448                      this.transitionTo("beforeData" /* beforeData */);
3449                  }
3450                  else if (char === '=') {
3451                      this.delegate.reportSyntaxError('attribute name cannot start with equals sign');
3452                      this.transitionTo("attributeName" /* attributeName */);
3453                      this.delegate.beginAttribute();
3454                      this.consume();
3455                      this.delegate.appendToAttributeName(char);
3456                  }
3457                  else {
3458                      this.transitionTo("attributeName" /* attributeName */);
3459                      this.delegate.beginAttribute();
3460                  }
3461              },
3462              attributeName: function () {
3463                  var char = this.peek();
3464                  if (isSpace(char)) {
3465                      this.transitionTo("afterAttributeName" /* afterAttributeName */);
3466                      this.consume();
3467                  }
3468                  else if (char === '/') {
3469                      this.delegate.beginAttributeValue(false);
3470                      this.delegate.finishAttributeValue();
3471                      this.consume();
3472                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3473                  }
3474                  else if (char === '=') {
3475                      this.transitionTo("beforeAttributeValue" /* beforeAttributeValue */);
3476                      this.consume();
3477                  }
3478                  else if (char === '>') {
3479                      this.delegate.beginAttributeValue(false);
3480                      this.delegate.finishAttributeValue();
3481                      this.consume();
3482                      this.delegate.finishTag();
3483                      this.transitionTo("beforeData" /* beforeData */);
3484                  }
3485                  else if (char === '"' || char === "'" || char === '<') {
3486                      this.delegate.reportSyntaxError(char + ' is not a valid character within attribute names');
3487                      this.consume();
3488                      this.delegate.appendToAttributeName(char);
3489                  }
3490                  else {
3491                      this.consume();
3492                      this.delegate.appendToAttributeName(char);
3493                  }
3494              },
3495              afterAttributeName: function () {
3496                  var char = this.peek();
3497                  if (isSpace(char)) {
3498                      this.consume();
3499                      return;
3500                  }
3501                  else if (char === '/') {
3502                      this.delegate.beginAttributeValue(false);
3503                      this.delegate.finishAttributeValue();
3504                      this.consume();
3505                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3506                  }
3507                  else if (char === '=') {
3508                      this.consume();
3509                      this.transitionTo("beforeAttributeValue" /* beforeAttributeValue */);
3510                  }
3511                  else if (char === '>') {
3512                      this.delegate.beginAttributeValue(false);
3513                      this.delegate.finishAttributeValue();
3514                      this.consume();
3515                      this.delegate.finishTag();
3516                      this.transitionTo("beforeData" /* beforeData */);
3517                  }
3518                  else {
3519                      this.delegate.beginAttributeValue(false);
3520                      this.delegate.finishAttributeValue();
3521                      this.transitionTo("attributeName" /* attributeName */);
3522                      this.delegate.beginAttribute();
3523                      this.consume();
3524                      this.delegate.appendToAttributeName(char);
3525                  }
3526              },
3527              beforeAttributeValue: function () {
3528                  var char = this.peek();
3529                  if (isSpace(char)) {
3530                      this.consume();
3531                  }
3532                  else if (char === '"') {
3533                      this.transitionTo("attributeValueDoubleQuoted" /* attributeValueDoubleQuoted */);
3534                      this.delegate.beginAttributeValue(true);
3535                      this.consume();
3536                  }
3537                  else if (char === "'") {
3538                      this.transitionTo("attributeValueSingleQuoted" /* attributeValueSingleQuoted */);
3539                      this.delegate.beginAttributeValue(true);
3540                      this.consume();
3541                  }
3542                  else if (char === '>') {
3543                      this.delegate.beginAttributeValue(false);
3544                      this.delegate.finishAttributeValue();
3545                      this.consume();
3546                      this.delegate.finishTag();
3547                      this.transitionTo("beforeData" /* beforeData */);
3548                  }
3549                  else {
3550                      this.transitionTo("attributeValueUnquoted" /* attributeValueUnquoted */);
3551                      this.delegate.beginAttributeValue(false);
3552                      this.consume();
3553                      this.delegate.appendToAttributeValue(char);
3554                  }
3555              },
3556              attributeValueDoubleQuoted: function () {
3557                  var char = this.consume();
3558                  if (char === '"') {
3559                      this.delegate.finishAttributeValue();
3560                      this.transitionTo("afterAttributeValueQuoted" /* afterAttributeValueQuoted */);
3561                  }
3562                  else if (char === '&') {
3563                      this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');
3564                  }
3565                  else {
3566                      this.delegate.appendToAttributeValue(char);
3567                  }
3568              },
3569              attributeValueSingleQuoted: function () {
3570                  var char = this.consume();
3571                  if (char === "'") {
3572                      this.delegate.finishAttributeValue();
3573                      this.transitionTo("afterAttributeValueQuoted" /* afterAttributeValueQuoted */);
3574                  }
3575                  else if (char === '&') {
3576                      this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');
3577                  }
3578                  else {
3579                      this.delegate.appendToAttributeValue(char);
3580                  }
3581              },
3582              attributeValueUnquoted: function () {
3583                  var char = this.peek();
3584                  if (isSpace(char)) {
3585                      this.delegate.finishAttributeValue();
3586                      this.consume();
3587                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
3588                  }
3589                  else if (char === '/') {
3590                      this.delegate.finishAttributeValue();
3591                      this.consume();
3592                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3593                  }
3594                  else if (char === '&') {
3595                      this.consume();
3596                      this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');
3597                  }
3598                  else if (char === '>') {
3599                      this.delegate.finishAttributeValue();
3600                      this.consume();
3601                      this.delegate.finishTag();
3602                      this.transitionTo("beforeData" /* beforeData */);
3603                  }
3604                  else {
3605                      this.consume();
3606                      this.delegate.appendToAttributeValue(char);
3607                  }
3608              },
3609              afterAttributeValueQuoted: function () {
3610                  var char = this.peek();
3611                  if (isSpace(char)) {
3612                      this.consume();
3613                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
3614                  }
3615                  else if (char === '/') {
3616                      this.consume();
3617                      this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
3618                  }
3619                  else if (char === '>') {
3620                      this.consume();
3621                      this.delegate.finishTag();
3622                      this.transitionTo("beforeData" /* beforeData */);
3623                  }
3624                  else {
3625                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
3626                  }
3627              },
3628              selfClosingStartTag: function () {
3629                  var char = this.peek();
3630                  if (char === '>') {
3631                      this.consume();
3632                      this.delegate.markTagAsSelfClosing();
3633                      this.delegate.finishTag();
3634                      this.transitionTo("beforeData" /* beforeData */);
3635                  }
3636                  else {
3637                      this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
3638                  }
3639              },
3640              endTagOpen: function () {
3641                  var char = this.consume();
3642                  if (char === '@' || char === ':' || isAlpha(char)) {
3643                      this.transitionTo("endTagName" /* endTagName */);
3644                      this.tagNameBuffer = '';
3645                      this.delegate.beginEndTag();
3646                      this.appendToTagName(char);
3647                  }
3648              }
3649          };
3650          this.reset();
3651      }
3652      EventedTokenizer.prototype.reset = function () {
3653          this.transitionTo("beforeData" /* beforeData */);
3654          this.input = '';
3655          this.tagNameBuffer = '';
3656          this.index = 0;
3657          this.line = 1;
3658          this.column = 0;
3659          this.delegate.reset();
3660      };
3661      EventedTokenizer.prototype.transitionTo = function (state) {
3662          this.state = state;
3663      };
3664      EventedTokenizer.prototype.tokenize = function (input) {
3665          this.reset();
3666          this.tokenizePart(input);
3667          this.tokenizeEOF();
3668      };
3669      EventedTokenizer.prototype.tokenizePart = function (input) {
3670          this.input += preprocessInput(input);
3671          while (this.index < this.input.length) {
3672              var handler = this.states[this.state];
3673              if (handler !== undefined) {
3674                  handler.call(this);
3675              }
3676              else {
3677                  throw new Error("unhandled state " + this.state);
3678              }
3679          }
3680      };
3681      EventedTokenizer.prototype.tokenizeEOF = function () {
3682          this.flushData();
3683      };
3684      EventedTokenizer.prototype.flushData = function () {
3685          if (this.state === 'data') {
3686              this.delegate.finishData();
3687              this.transitionTo("beforeData" /* beforeData */);
3688          }
3689      };
3690      EventedTokenizer.prototype.peek = function () {
3691          return this.input.charAt(this.index);
3692      };
3693      EventedTokenizer.prototype.consume = function () {
3694          var char = this.peek();
3695          this.index++;
3696          if (char === '\n') {
3697              this.line++;
3698              this.column = 0;
3699          }
3700          else {
3701              this.column++;
3702          }
3703          return char;
3704      };
3705      EventedTokenizer.prototype.consumeCharRef = function () {
3706          var endIndex = this.input.indexOf(';', this.index);
3707          if (endIndex === -1) {
3708              return;
3709          }
3710          var entity = this.input.slice(this.index, endIndex);
3711          var chars = this.entityParser.parse(entity);
3712          if (chars) {
3713              var count = entity.length;
3714              // consume the entity chars
3715              while (count) {
3716                  this.consume();
3717                  count--;
3718              }
3719              // consume the `;`
3720              this.consume();
3721              return chars;
3722          }
3723      };
3724      EventedTokenizer.prototype.markTagStart = function () {
3725          this.delegate.tagOpen();
3726      };
3727      EventedTokenizer.prototype.appendToTagName = function (char) {
3728          this.tagNameBuffer += char;
3729          this.delegate.appendToTagName(char);
3730      };
3731      EventedTokenizer.prototype.isIgnoredEndTag = function () {
3732          var tag = this.tagNameBuffer;
3733          return (tag === 'title' && this.input.substring(this.index, this.index + 8) !== '</title>') ||
3734              (tag === 'style' && this.input.substring(this.index, this.index + 8) !== '</style>') ||
3735              (tag === 'script' && this.input.substring(this.index, this.index + 9) !== '</script>');
3736      };
3737      return EventedTokenizer;
3738  }());
3739  
3740  var Tokenizer = /** @class */ (function () {
3741      function Tokenizer(entityParser, options) {
3742          if (options === void 0) { options = {}; }
3743          this.options = options;
3744          this.token = null;
3745          this.startLine = 1;
3746          this.startColumn = 0;
3747          this.tokens = [];
3748          this.tokenizer = new EventedTokenizer(this, entityParser, options.mode);
3749          this._currentAttribute = undefined;
3750      }
3751      Tokenizer.prototype.tokenize = function (input) {
3752          this.tokens = [];
3753          this.tokenizer.tokenize(input);
3754          return this.tokens;
3755      };
3756      Tokenizer.prototype.tokenizePart = function (input) {
3757          this.tokens = [];
3758          this.tokenizer.tokenizePart(input);
3759          return this.tokens;
3760      };
3761      Tokenizer.prototype.tokenizeEOF = function () {
3762          this.tokens = [];
3763          this.tokenizer.tokenizeEOF();
3764          return this.tokens[0];
3765      };
3766      Tokenizer.prototype.reset = function () {
3767          this.token = null;
3768          this.startLine = 1;
3769          this.startColumn = 0;
3770      };
3771      Tokenizer.prototype.current = function () {
3772          var token = this.token;
3773          if (token === null) {
3774              throw new Error('token was unexpectedly null');
3775          }
3776          if (arguments.length === 0) {
3777              return token;
3778          }
3779          for (var i = 0; i < arguments.length; i++) {
3780              if (token.type === arguments[i]) {
3781                  return token;
3782              }
3783          }
3784          throw new Error("token type was unexpectedly " + token.type);
3785      };
3786      Tokenizer.prototype.push = function (token) {
3787          this.token = token;
3788          this.tokens.push(token);
3789      };
3790      Tokenizer.prototype.currentAttribute = function () {
3791          return this._currentAttribute;
3792      };
3793      Tokenizer.prototype.addLocInfo = function () {
3794          if (this.options.loc) {
3795              this.current().loc = {
3796                  start: {
3797                      line: this.startLine,
3798                      column: this.startColumn
3799                  },
3800                  end: {
3801                      line: this.tokenizer.line,
3802                      column: this.tokenizer.column
3803                  }
3804              };
3805          }
3806          this.startLine = this.tokenizer.line;
3807          this.startColumn = this.tokenizer.column;
3808      };
3809      // Data
3810      Tokenizer.prototype.beginDoctype = function () {
3811          this.push({
3812              type: "Doctype" /* Doctype */,
3813              name: '',
3814          });
3815      };
3816      Tokenizer.prototype.appendToDoctypeName = function (char) {
3817          this.current("Doctype" /* Doctype */).name += char;
3818      };
3819      Tokenizer.prototype.appendToDoctypePublicIdentifier = function (char) {
3820          var doctype = this.current("Doctype" /* Doctype */);
3821          if (doctype.publicIdentifier === undefined) {
3822              doctype.publicIdentifier = char;
3823          }
3824          else {
3825              doctype.publicIdentifier += char;
3826          }
3827      };
3828      Tokenizer.prototype.appendToDoctypeSystemIdentifier = function (char) {
3829          var doctype = this.current("Doctype" /* Doctype */);
3830          if (doctype.systemIdentifier === undefined) {
3831              doctype.systemIdentifier = char;
3832          }
3833          else {
3834              doctype.systemIdentifier += char;
3835          }
3836      };
3837      Tokenizer.prototype.endDoctype = function () {
3838          this.addLocInfo();
3839      };
3840      Tokenizer.prototype.beginData = function () {
3841          this.push({
3842              type: "Chars" /* Chars */,
3843              chars: ''
3844          });
3845      };
3846      Tokenizer.prototype.appendToData = function (char) {
3847          this.current("Chars" /* Chars */).chars += char;
3848      };
3849      Tokenizer.prototype.finishData = function () {
3850          this.addLocInfo();
3851      };
3852      // Comment
3853      Tokenizer.prototype.beginComment = function () {
3854          this.push({
3855              type: "Comment" /* Comment */,
3856              chars: ''
3857          });
3858      };
3859      Tokenizer.prototype.appendToCommentData = function (char) {
3860          this.current("Comment" /* Comment */).chars += char;
3861      };
3862      Tokenizer.prototype.finishComment = function () {
3863          this.addLocInfo();
3864      };
3865      // Tags - basic
3866      Tokenizer.prototype.tagOpen = function () { };
3867      Tokenizer.prototype.beginStartTag = function () {
3868          this.push({
3869              type: "StartTag" /* StartTag */,
3870              tagName: '',
3871              attributes: [],
3872              selfClosing: false
3873          });
3874      };
3875      Tokenizer.prototype.beginEndTag = function () {
3876          this.push({
3877              type: "EndTag" /* EndTag */,
3878              tagName: ''
3879          });
3880      };
3881      Tokenizer.prototype.finishTag = function () {
3882          this.addLocInfo();
3883      };
3884      Tokenizer.prototype.markTagAsSelfClosing = function () {
3885          this.current("StartTag" /* StartTag */).selfClosing = true;
3886      };
3887      // Tags - name
3888      Tokenizer.prototype.appendToTagName = function (char) {
3889          this.current("StartTag" /* StartTag */, "EndTag" /* EndTag */).tagName += char;
3890      };
3891      // Tags - attributes
3892      Tokenizer.prototype.beginAttribute = function () {
3893          this._currentAttribute = ['', '', false];
3894      };
3895      Tokenizer.prototype.appendToAttributeName = function (char) {
3896          this.currentAttribute()[0] += char;
3897      };
3898      Tokenizer.prototype.beginAttributeValue = function (isQuoted) {
3899          this.currentAttribute()[2] = isQuoted;
3900      };
3901      Tokenizer.prototype.appendToAttributeValue = function (char) {
3902          this.currentAttribute()[1] += char;
3903      };
3904      Tokenizer.prototype.finishAttributeValue = function () {
3905          this.current("StartTag" /* StartTag */).attributes.push(this._currentAttribute);
3906      };
3907      Tokenizer.prototype.reportSyntaxError = function (message) {
3908          this.current().syntaxError = message;
3909      };
3910      return Tokenizer;
3911  }());
3912  
3913  function tokenize(input, options) {
3914      var tokenizer = new Tokenizer(new EntityParser(namedCharRefs), options);
3915      return tokenizer.tokenize(input);
3916  }
3917  
3918  
3919  
3920  // EXTERNAL MODULE: external ["wp","htmlEntities"]
3921  var external_wp_htmlEntities_ = __webpack_require__("rmEH");
3922  
3923  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/validation/logger.js
3924  function createLogger() {
3925    /**
3926     * Creates a log handler with block validation prefix.
3927     *
3928     * @param {Function} logger Original logger function.
3929     *
3930     * @return {Function} Augmented logger function.
3931     */
3932    function createLogHandler(logger) {
3933      let log = function (message) {
3934        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3935          args[_key - 1] = arguments[_key];
3936        }
3937  
3938        return logger('Block validation: ' + message, ...args);
3939      }; // In test environments, pre-process string substitutions to improve
3940      // readability of error messages. We'd prefer to avoid pulling in this
3941      // dependency in runtime environments, and it can be dropped by a combo
3942      // of Webpack env substitution + UglifyJS dead code elimination.
3943  
3944  
3945      if (false) {}
3946  
3947      return log;
3948    }
3949  
3950    return {
3951      // eslint-disable-next-line no-console
3952      error: createLogHandler(console.error),
3953      // eslint-disable-next-line no-console
3954      warning: createLogHandler(console.warn),
3955  
3956      getItems() {
3957        return [];
3958      }
3959  
3960    };
3961  }
3962  function createQueuedLogger() {
3963    /**
3964     * The list of enqueued log actions to print.
3965     *
3966     * @type {Array}
3967     */
3968    const queue = [];
3969    const logger = createLogger();
3970    return {
3971      error() {
3972        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3973          args[_key2] = arguments[_key2];
3974        }
3975  
3976        queue.push({
3977          log: logger.error,
3978          args
3979        });
3980      },
3981  
3982      warning() {
3983        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
3984          args[_key3] = arguments[_key3];
3985        }
3986  
3987        queue.push({
3988          log: logger.warning,
3989          args
3990        });
3991      },
3992  
3993      getItems() {
3994        return queue;
3995      }
3996  
3997    };
3998  }
3999  
4000  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/validation/index.js
4001  /**
4002   * External dependencies
4003   */
4004  
4005  
4006  /**
4007   * WordPress dependencies
4008   */
4009  
4010  
4011  /**
4012   * Internal dependencies
4013   */
4014  
4015  
4016  
4017  
4018  
4019  /**
4020   * Globally matches any consecutive whitespace
4021   *
4022   * @type {RegExp}
4023   */
4024  
4025  const REGEXP_WHITESPACE = /[\t\n\r\v\f ]+/g;
4026  /**
4027   * Matches a string containing only whitespace
4028   *
4029   * @type {RegExp}
4030   */
4031  
4032  const REGEXP_ONLY_WHITESPACE = /^[\t\n\r\v\f ]*$/;
4033  /**
4034   * Matches a CSS URL type value
4035   *
4036   * @type {RegExp}
4037   */
4038  
4039  const REGEXP_STYLE_URL_TYPE = /^url\s*\(['"\s]*(.*?)['"\s]*\)$/;
4040  /**
4041   * Boolean attributes are attributes whose presence as being assigned is
4042   * meaningful, even if only empty.
4043   *
4044   * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
4045   * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3
4046   *
4047   * Object.keys( Array.from( document.querySelectorAll( '#attributes-1 > tbody > tr' ) )
4048   *     .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 )
4049   *     .reduce( ( result, tr ) => Object.assign( result, {
4050   *         [ tr.firstChild.textContent.trim() ]: true
4051   *     } ), {} ) ).sort();
4052   *
4053   * @type {Array}
4054   */
4055  
4056  const BOOLEAN_ATTRIBUTES = ['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch'];
4057  /**
4058   * Enumerated attributes are attributes which must be of a specific value form.
4059   * Like boolean attributes, these are meaningful if specified, even if not of a
4060   * valid enumerated value.
4061   *
4062   * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute
4063   * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3
4064   *
4065   * Object.keys( Array.from( document.querySelectorAll( '#attributes-1 > tbody > tr' ) )
4066   *     .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) )
4067   *     .reduce( ( result, tr ) => Object.assign( result, {
4068   *         [ tr.firstChild.textContent.trim() ]: true
4069   *     } ), {} ) ).sort();
4070   *
4071   * @type {Array}
4072   */
4073  
4074  const ENUMERATED_ATTRIBUTES = ['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap'];
4075  /**
4076   * Meaningful attributes are those who cannot be safely ignored when omitted in
4077   * one HTML markup string and not another.
4078   *
4079   * @type {Array}
4080   */
4081  
4082  const MEANINGFUL_ATTRIBUTES = [...BOOLEAN_ATTRIBUTES, ...ENUMERATED_ATTRIBUTES];
4083  /**
4084   * Array of functions which receive a text string on which to apply normalizing
4085   * behavior for consideration in text token equivalence, carefully ordered from
4086   * least-to-most expensive operations.
4087   *
4088   * @type {Array}
4089   */
4090  
4091  const TEXT_NORMALIZATIONS = [external_lodash_["identity"], getTextWithCollapsedWhitespace];
4092  /**
4093   * Regular expression matching a named character reference. In lieu of bundling
4094   * a full set of references, the pattern covers the minimal necessary to test
4095   * positively against the full set.
4096   *
4097   * "The ampersand must be followed by one of the names given in the named
4098   * character references section, using the same case."
4099   *
4100   * Tested aginst "12.5 Named character references":
4101   *
4102   * ```
4103   * const references = Array.from( document.querySelectorAll(
4104   *     '#named-character-references-table tr[id^=entity-] td:first-child'
4105   * ) ).map( ( code ) => code.textContent )
4106   * references.every( ( reference ) => /^[\da-z]+$/i.test( reference ) )
4107   * ```
4108   *
4109   * @see https://html.spec.whatwg.org/multipage/syntax.html#character-references
4110   * @see https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
4111   *
4112   * @type {RegExp}
4113   */
4114  
4115  const REGEXP_NAMED_CHARACTER_REFERENCE = /^[\da-z]+$/i;
4116  /**
4117   * Regular expression matching a decimal character reference.
4118   *
4119   * "The ampersand must be followed by a U+0023 NUMBER SIGN character (#),
4120   * followed by one or more ASCII digits, representing a base-ten integer"
4121   *
4122   * @see https://html.spec.whatwg.org/multipage/syntax.html#character-references
4123   *
4124   * @type {RegExp}
4125   */
4126  
4127  const REGEXP_DECIMAL_CHARACTER_REFERENCE = /^#\d+$/;
4128  /**
4129   * Regular expression matching a hexadecimal character reference.
4130   *
4131   * "The ampersand must be followed by a U+0023 NUMBER SIGN character (#), which
4132   * must be followed by either a U+0078 LATIN SMALL LETTER X character (x) or a
4133   * U+0058 LATIN CAPITAL LETTER X character (X), which must then be followed by
4134   * one or more ASCII hex digits, representing a hexadecimal integer"
4135   *
4136   * @see https://html.spec.whatwg.org/multipage/syntax.html#character-references
4137   *
4138   * @type {RegExp}
4139   */
4140  
4141  const REGEXP_HEXADECIMAL_CHARACTER_REFERENCE = /^#x[\da-f]+$/i;
4142  /**
4143   * Returns true if the given string is a valid character reference segment, or
4144   * false otherwise. The text should be stripped of `&` and `;` demarcations.
4145   *
4146   * @param {string} text Text to test.
4147   *
4148   * @return {boolean} Whether text is valid character reference.
4149   */
4150  
4151  function isValidCharacterReference(text) {
4152    return REGEXP_NAMED_CHARACTER_REFERENCE.test(text) || REGEXP_DECIMAL_CHARACTER_REFERENCE.test(text) || REGEXP_HEXADECIMAL_CHARACTER_REFERENCE.test(text);
4153  }
4154  /**
4155   * Subsitute EntityParser class for `simple-html-tokenizer` which uses the
4156   * implementation of `decodeEntities` from `html-entities`, in order to avoid
4157   * bundling a massive named character reference.
4158   *
4159   * @see https://github.com/tildeio/simple-html-tokenizer/tree/HEAD/src/entity-parser.ts
4160   */
4161  
4162  class validation_DecodeEntityParser {
4163    /**
4164     * Returns a substitute string for an entity string sequence between `&`
4165     * and `;`, or undefined if no substitution should occur.
4166     *
4167     * @param {string} entity Entity fragment discovered in HTML.
4168     *
4169     * @return {?string} Entity substitute value.
4170     */
4171    parse(entity) {
4172      if (isValidCharacterReference(entity)) {
4173        return Object(external_wp_htmlEntities_["decodeEntities"])('&' + entity + ';');
4174      }
4175    }
4176  
4177  }
4178  /**
4179   * Given a specified string, returns an array of strings split by consecutive
4180   * whitespace, ignoring leading or trailing whitespace.
4181   *
4182   * @param {string} text Original text.
4183   *
4184   * @return {string[]} Text pieces split on whitespace.
4185   */
4186  
4187  function getTextPiecesSplitOnWhitespace(text) {
4188    return text.trim().split(REGEXP_WHITESPACE);
4189  }
4190  /**
4191   * Given a specified string, returns a new trimmed string where all consecutive
4192   * whitespace is collapsed to a single space.
4193   *
4194   * @param {string} text Original text.
4195   *
4196   * @return {string} Trimmed text with consecutive whitespace collapsed.
4197   */
4198  
4199  function getTextWithCollapsedWhitespace(text) {
4200    // This is an overly simplified whitespace comparison. The specification is
4201    // more prescriptive of whitespace behavior in inline and block contexts.
4202    //
4203    // See: https://medium.com/@patrickbrosset/when-does-white-space-matter-in-html-b90e8a7cdd33
4204    return getTextPiecesSplitOnWhitespace(text).join(' ');
4205  }
4206  /**
4207   * Returns attribute pairs of the given StartTag token, including only pairs
4208   * where the value is non-empty or the attribute is a boolean attribute, an
4209   * enumerated attribute, or a custom data- attribute.
4210   *
4211   * @see MEANINGFUL_ATTRIBUTES
4212   *
4213   * @param {Object} token StartTag token.
4214   *
4215   * @return {Array[]} Attribute pairs.
4216   */
4217  
4218  function getMeaningfulAttributePairs(token) {
4219    return token.attributes.filter(pair => {
4220      const [key, value] = pair;
4221      return value || key.indexOf('data-') === 0 || Object(external_lodash_["includes"])(MEANINGFUL_ATTRIBUTES, key);
4222    });
4223  }
4224  /**
4225   * Returns true if two text tokens (with `chars` property) are equivalent, or
4226   * false otherwise.
4227   *
4228   * @param {Object} actual   Actual token.
4229   * @param {Object} expected Expected token.
4230   * @param {Object} logger   Validation logger object.
4231   *
4232   * @return {boolean} Whether two text tokens are equivalent.
4233   */
4234  
4235  function isEquivalentTextTokens(actual, expected) {
4236    let logger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createLogger();
4237    // This function is intentionally written as syntactically "ugly" as a hot
4238    // path optimization. Text is progressively normalized in order from least-
4239    // to-most operationally expensive, until the earliest point at which text
4240    // can be confidently inferred as being equal.
4241    let actualChars = actual.chars;
4242    let expectedChars = expected.chars;
4243  
4244    for (let i = 0; i < TEXT_NORMALIZATIONS.length; i++) {
4245      const normalize = TEXT_NORMALIZATIONS[i];
4246      actualChars = normalize(actualChars);
4247      expectedChars = normalize(expectedChars);
4248  
4249      if (actualChars === expectedChars) {
4250        return true;
4251      }
4252    }
4253  
4254    logger.warning('Expected text `%s`, saw `%s`.', expected.chars, actual.chars);
4255    return false;
4256  }
4257  /**
4258   * Given a CSS length value, returns a normalized CSS length value for strict equality
4259   * comparison.
4260   *
4261   * @param {string} value CSS length value.
4262   *
4263   * @return {string} Normalized CSS length value.
4264   */
4265  
4266  function getNormalizedLength(value) {
4267    if (0 === parseFloat(value)) {
4268      return '0';
4269    } // Normalize strings with floats to always include a leading zero.
4270  
4271  
4272    if (value.indexOf('.') === 0) {
4273      return '0' + value;
4274    }
4275  
4276    return value;
4277  }
4278  /**
4279   * Given a style value, returns a normalized style value for strict equality
4280   * comparison.
4281   *
4282   * @param {string} value Style value.
4283   *
4284   * @return {string} Normalized style value.
4285   */
4286  
4287  function getNormalizedStyleValue(value) {
4288    const textPieces = getTextPiecesSplitOnWhitespace(value);
4289    const normalizedPieces = textPieces.map(getNormalizedLength);
4290    const result = normalizedPieces.join(' ');
4291    return result // Normalize URL type to omit whitespace or quotes
4292    .replace(REGEXP_STYLE_URL_TYPE, 'url($1)');
4293  }
4294  /**
4295   * Given a style attribute string, returns an object of style properties.
4296   *
4297   * @param {string} text Style attribute.
4298   *
4299   * @return {Object} Style properties.
4300   */
4301  
4302  function getStyleProperties(text) {
4303    const pairs = text // Trim ending semicolon (avoid including in split)
4304    .replace(/;?\s*$/, '') // Split on property assignment
4305    .split(';') // For each property assignment...
4306    .map(style => {
4307      // ...split further into key-value pairs
4308      const [key, ...valueParts] = style.split(':');
4309      const value = valueParts.join(':');
4310      return [key.trim(), getNormalizedStyleValue(value.trim())];
4311    });
4312    return Object(external_lodash_["fromPairs"])(pairs);
4313  }
4314  /**
4315   * Attribute-specific equality handlers
4316   *
4317   * @type {Object}
4318   */
4319  
4320  const isEqualAttributesOfName = {
4321    class: (actual, expected) => {
4322      // Class matches if members are the same, even if out of order or
4323      // superfluous whitespace between.
4324      return !Object(external_lodash_["xor"])(...[actual, expected].map(getTextPiecesSplitOnWhitespace)).length;
4325    },
4326    style: (actual, expected) => {
4327      return Object(external_lodash_["isEqual"])(...[actual, expected].map(getStyleProperties));
4328    },
4329    // For each boolean attribute, mere presence of attribute in both is enough
4330    // to assume equivalence.
4331    ...Object(external_lodash_["fromPairs"])(BOOLEAN_ATTRIBUTES.map(attribute => [attribute, external_lodash_["stubTrue"]]))
4332  };
4333  /**
4334   * Given two sets of attribute tuples, returns true if the attribute sets are
4335   * equivalent.
4336   *
4337   * @param {Array[]} actual   Actual attributes tuples.
4338   * @param {Array[]} expected Expected attributes tuples.
4339   * @param {Object}  logger   Validation logger object.
4340   *
4341   * @return {boolean} Whether attributes are equivalent.
4342   */
4343  
4344  function isEqualTagAttributePairs(actual, expected) {
4345    let logger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createLogger();
4346  
4347    // Attributes is tokenized as tuples. Their lengths should match. This also
4348    // avoids us needing to check both attributes sets, since if A has any keys
4349    // which do not exist in B, we know the sets to be different.
4350    if (actual.length !== expected.length) {
4351      logger.warning('Expected attributes %o, instead saw %o.', expected, actual);
4352      return false;
4353    } // Attributes are not guaranteed to occur in the same order. For validating
4354    // actual attributes, first convert the set of expected attribute values to
4355    // an object, for lookup by key.
4356  
4357  
4358    const expectedAttributes = {};
4359  
4360    for (let i = 0; i < expected.length; i++) {
4361      expectedAttributes[expected[i][0].toLowerCase()] = expected[i][1];
4362    }
4363  
4364    for (let i = 0; i < actual.length; i++) {
4365      const [name, actualValue] = actual[i];
4366      const nameLower = name.toLowerCase(); // As noted above, if missing member in B, assume different
4367  
4368      if (!expectedAttributes.hasOwnProperty(nameLower)) {
4369        logger.warning('Encountered unexpected attribute `%s`.', name);
4370        return false;
4371      }
4372  
4373      const expectedValue = expectedAttributes[nameLower];
4374      const isEqualAttributes = isEqualAttributesOfName[nameLower];
4375  
4376      if (isEqualAttributes) {
4377        // Defer custom attribute equality handling
4378        if (!isEqualAttributes(actualValue, expectedValue)) {
4379          logger.warning('Expected attribute `%s` of value `%s`, saw `%s`.', name, expectedValue, actualValue);
4380          return false;
4381        }
4382      } else if (actualValue !== expectedValue) {
4383        // Otherwise strict inequality should bail
4384        logger.warning('Expected attribute `%s` of value `%s`, saw `%s`.', name, expectedValue, actualValue);
4385        return false;
4386      }
4387    }
4388  
4389    return true;
4390  }
4391  /**
4392   * Token-type-specific equality handlers
4393   *
4394   * @type {Object}
4395   */
4396  
4397  const isEqualTokensOfType = {
4398    StartTag: function (actual, expected) {
4399      let logger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createLogger();
4400  
4401      if (actual.tagName !== expected.tagName && // Optimization: Use short-circuit evaluation to defer case-
4402      // insensitive check on the assumption that the majority case will
4403      // have exactly equal tag names.
4404      actual.tagName.toLowerCase() !== expected.tagName.toLowerCase()) {
4405        logger.warning('Expected tag name `%s`, instead saw `%s`.', expected.tagName, actual.tagName);
4406        return false;
4407      }
4408  
4409      return isEqualTagAttributePairs(...[actual, expected].map(getMeaningfulAttributePairs), logger);
4410    },
4411    Chars: isEquivalentTextTokens,
4412    Comment: isEquivalentTextTokens
4413  };
4414  /**
4415   * Given an array of tokens, returns the first token which is not purely
4416   * whitespace.
4417   *
4418   * Mutates the tokens array.
4419   *
4420   * @param {Object[]} tokens Set of tokens to search.
4421   *
4422   * @return {Object} Next non-whitespace token.
4423   */
4424  
4425  function getNextNonWhitespaceToken(tokens) {
4426    let token;
4427  
4428    while (token = tokens.shift()) {
4429      if (token.type !== 'Chars') {
4430        return token;
4431      }
4432  
4433      if (!REGEXP_ONLY_WHITESPACE.test(token.chars)) {
4434        return token;
4435      }
4436    }
4437  }
4438  /**
4439   * Tokenize an HTML string, gracefully handling any errors thrown during
4440   * underlying tokenization.
4441   *
4442   * @param {string} html   HTML string to tokenize.
4443   * @param {Object} logger Validation logger object.
4444   *
4445   * @return {Object[]|null} Array of valid tokenized HTML elements, or null on error
4446   */
4447  
4448  function getHTMLTokens(html) {
4449    let logger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createLogger();
4450  
4451    try {
4452      return new Tokenizer(new validation_DecodeEntityParser()).tokenize(html);
4453    } catch (e) {
4454      logger.warning('Malformed HTML detected: %s', html);
4455    }
4456  
4457    return null;
4458  }
4459  /**
4460   * Returns true if the next HTML token closes the current token.
4461   *
4462   * @param {Object}           currentToken Current token to compare with.
4463   * @param {Object|undefined} nextToken    Next token to compare against.
4464   *
4465   * @return {boolean} true if `nextToken` closes `currentToken`, false otherwise
4466   */
4467  
4468  
4469  function isClosedByToken(currentToken, nextToken) {
4470    // Ensure this is a self closed token
4471    if (!currentToken.selfClosing) {
4472      return false;
4473    } // Check token names and determine if nextToken is the closing tag for currentToken
4474  
4475  
4476    if (nextToken && nextToken.tagName === currentToken.tagName && nextToken.type === 'EndTag') {
4477      return true;
4478    }
4479  
4480    return false;
4481  }
4482  /**
4483   * Returns true if the given HTML strings are effectively equivalent, or
4484   * false otherwise. Invalid HTML is not considered equivalent, even if the
4485   * strings directly match.
4486   *
4487   * @param {string} actual   Actual HTML string.
4488   * @param {string} expected Expected HTML string.
4489   * @param {Object} logger   Validation logger object.
4490   *
4491   * @return {boolean} Whether HTML strings are equivalent.
4492   */
4493  
4494  function isEquivalentHTML(actual, expected) {
4495    let logger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createLogger();
4496  
4497    // Short-circuit if markup is identical.
4498    if (actual === expected) {
4499      return true;
4500    } // Tokenize input content and reserialized save content
4501  
4502  
4503    const [actualTokens, expectedTokens] = [actual, expected].map(html => getHTMLTokens(html, logger)); // If either is malformed then stop comparing - the strings are not equivalent
4504  
4505    if (!actualTokens || !expectedTokens) {
4506      return false;
4507    }
4508  
4509    let actualToken, expectedToken;
4510  
4511    while (actualToken = getNextNonWhitespaceToken(actualTokens)) {
4512      expectedToken = getNextNonWhitespaceToken(expectedTokens); // Inequal if exhausted all expected tokens
4513  
4514      if (!expectedToken) {
4515        logger.warning('Expected end of content, instead saw %o.', actualToken);
4516        return false;
4517      } // Inequal if next non-whitespace token of each set are not same type
4518  
4519  
4520      if (actualToken.type !== expectedToken.type) {
4521        logger.warning('Expected token of type `%s` (%o), instead saw `%s` (%o).', expectedToken.type, expectedToken, actualToken.type, actualToken);
4522        return false;
4523      } // Defer custom token type equality handling, otherwise continue and
4524      // assume as equal
4525  
4526  
4527      const isEqualTokens = isEqualTokensOfType[actualToken.type];
4528  
4529      if (isEqualTokens && !isEqualTokens(actualToken, expectedToken, logger)) {
4530        return false;
4531      } // Peek at the next tokens (actual and expected) to see if they close
4532      // a self-closing tag
4533  
4534  
4535      if (isClosedByToken(actualToken, expectedTokens[0])) {
4536        // Consume the next expected token that closes the current actual
4537        // self-closing token
4538        getNextNonWhitespaceToken(expectedTokens);
4539      } else if (isClosedByToken(expectedToken, actualTokens[0])) {
4540        // Consume the next actual token that closes the current expected
4541        // self-closing token
4542        getNextNonWhitespaceToken(actualTokens);
4543      }
4544    }
4545  
4546    if (expectedToken = getNextNonWhitespaceToken(expectedTokens)) {
4547      // If any non-whitespace tokens remain in expected token set, this
4548      // indicates inequality
4549      logger.warning('Expected %o, instead saw end of content.', expectedToken);
4550      return false;
4551    }
4552  
4553    return true;
4554  }
4555  /**
4556   * Returns an object with `isValid` property set to `true` if the parsed block
4557   * is valid given the input content. A block is considered valid if, when serialized
4558   * with assumed attributes, the content matches the original value. If block is
4559   * invalid, this function returns all validations issues as well.
4560   *
4561   * @param {string|Object} blockTypeOrName      Block type.
4562   * @param {Object}        attributes           Parsed block attributes.
4563   * @param {string}        originalBlockContent Original block content.
4564   * @param {Object}        logger               Validation logger object.
4565   *
4566   * @return {Object} Whether block is valid and contains validation messages.
4567   */
4568  
4569  /**
4570   * Returns an object with `isValid` property set to `true` if the parsed block
4571   * is valid given the input content. A block is considered valid if, when serialized
4572   * with assumed attributes, the content matches the original value. If block is
4573   * invalid, this function returns all validations issues as well.
4574   *
4575   * @param {import('../parser').WPBlock}           block           block object.
4576   * @param {import('../registration').WPBlockType} blockTypeOrName Block type or name.
4577   *
4578   * @return {[boolean,Object]} validation results.
4579   */
4580  
4581  function validateBlock(block, blockTypeOrName) {
4582    const isFallbackBlock = block.name === getFreeformContentHandlerName() || block.name === getUnregisteredTypeHandlerName(); // Shortcut to avoid costly validation.
4583  
4584    if (isFallbackBlock) {
4585      return [true];
4586    }
4587  
4588    const logger = createQueuedLogger();
4589    const blockType = normalizeBlockType(blockTypeOrName);
4590    let generatedBlockContent;
4591  
4592    try {
4593      generatedBlockContent = getSaveContent(blockType, block.attributes);
4594    } catch (error) {
4595      logger.error('Block validation failed because an error occurred while generating block content:\n\n%s', error.toString());
4596      return [false, logger.getItems()];
4597    }
4598  
4599    const isValid = isEquivalentHTML(block.originalContent, generatedBlockContent, logger);
4600  
4601    if (!isValid) {
4602      logger.error('Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s', blockType.name, blockType, generatedBlockContent, block.originalContent);
4603    }
4604  
4605    return [isValid, logger.getItems()];
4606  }
4607  /**
4608   * Returns true if the parsed block is valid given the input content. A block
4609   * is considered valid if, when serialized with assumed attributes, the content
4610   * matches the original value.
4611   *
4612   * Logs to console in development environments when invalid.
4613   *
4614   * @param {string|Object} blockTypeOrName      Block type.
4615   * @param {Object}        attributes           Parsed block attributes.
4616   * @param {string}        originalBlockContent Original block content.
4617   *
4618   * @return {boolean} Whether block is valid.
4619   */
4620  
4621  function isValidBlockContent(blockTypeOrName, attributes, originalBlockContent) {
4622    const blockType = normalizeBlockType(blockTypeOrName);
4623    const block = {
4624      name: blockType.name,
4625      attributes,
4626      innerBlocks: [],
4627      originalContent: originalBlockContent
4628    };
4629    const [isValid] = validateBlock(block, blockType);
4630    return isValid;
4631  }
4632  
4633  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/convert-legacy-block.js
4634  /**
4635   * Convert legacy blocks to their canonical form. This function is used
4636   * both in the parser level for previous content and to convert such blocks
4637   * used in Custom Post Types templates.
4638   *
4639   * @param {string} name       The block's name
4640   * @param {Object} attributes The block's attributes
4641   *
4642   * @return {[string, Object]} The block's name and attributes, changed accordingly if a match was found
4643   */
4644  function convertLegacyBlockNameAndAttributes(name, attributes) {
4645    const newAttributes = { ...attributes
4646    }; // Convert 'core/cover-image' block in existing content to 'core/cover'.
4647  
4648    if ('core/cover-image' === name) {
4649      name = 'core/cover';
4650    } // Convert 'core/text' blocks in existing content to 'core/paragraph'.
4651  
4652  
4653    if ('core/text' === name || 'core/cover-text' === name) {
4654      name = 'core/paragraph';
4655    } // Convert derivative blocks such as 'core/social-link-wordpress' to the
4656    // canonical form 'core/social-link'.
4657  
4658  
4659    if (name && name.indexOf('core/social-link-') === 0) {
4660      // Capture `social-link-wordpress` into `{"service":"wordpress"}`
4661      newAttributes.service = name.substring(17);
4662      name = 'core/social-link';
4663    } // Convert derivative blocks such as 'core-embed/instagram' to the
4664    // canonical form 'core/embed'.
4665  
4666  
4667    if (name && name.indexOf('core-embed/') === 0) {
4668      // Capture `core-embed/instagram` into `{"providerNameSlug":"instagram"}`
4669      const providerSlug = name.substring(11);
4670      const deprecated = {
4671        speaker: 'speaker-deck',
4672        polldaddy: 'crowdsignal'
4673      };
4674      newAttributes.providerNameSlug = providerSlug in deprecated ? deprecated[providerSlug] : providerSlug; // this is needed as the `responsive` attribute was passed
4675      // in a different way before the refactoring to block variations
4676  
4677      if (!['amazon-kindle', 'wordpress'].includes(providerSlug)) {
4678        newAttributes.responsive = true;
4679      }
4680  
4681      name = 'core/embed';
4682    } // Convert 'core/query-loop' blocks in existing content to 'core/post-template'.
4683    // TODO: Remove this check when WordPress 5.9 is released.
4684  
4685  
4686    if (name === 'core/query-loop') {
4687      name = 'core/post-template';
4688    } // Convert Post Comment blocks in existing content to Comment blocks.
4689    // TODO: Remove these checks when WordPress 6.0 is released.
4690  
4691  
4692    if (name === 'core/post-comment-author') {
4693      name = 'core/comment-author-name';
4694    }
4695  
4696    if (name === 'core/post-comment-content') {
4697      name = 'core/comment-content';
4698    }
4699  
4700    if (name === 'core/post-comment-date') {
4701      name = 'core/comment-date';
4702    }
4703  
4704    return [name, newAttributes];
4705  }
4706  
4707  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/serialize-raw-block.js
4708  /**
4709   * Internal dependencies
4710   */
4711  
4712  /**
4713   * Serializes a block node into the native HTML-comment-powered block format.
4714   * CAVEAT: This function is intended for reserializing blocks as parsed by
4715   * valid parsers and skips any validation steps. This is NOT a generic
4716   * serialization function for in-memory blocks. For most purposes, see the
4717   * following functions available in the `@wordpress/blocks` package:
4718   *
4719   * @see serializeBlock
4720   * @see serialize
4721   *
4722   * For more on the format of block nodes as returned by valid parsers:
4723   *
4724   * @see `@wordpress/block-serialization-default-parser` package
4725   * @see `@wordpress/block-serialization-spec-parser` package
4726   *
4727   * @param {import(".").WPRawBlock} rawBlock                   A block node as returned by a valid parser.
4728   * @param {?Object}                options                    Serialization options.
4729   * @param {?boolean}               options.isCommentDelimited Whether to output HTML comments around blocks.
4730   *
4731   * @return {string} An HTML string representing a block.
4732   */
4733  
4734  function serializeRawBlock(rawBlock) {
4735    let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4736    const {
4737      isCommentDelimited = true
4738    } = options;
4739    const {
4740      blockName,
4741      attrs = {},
4742      innerBlocks = [],
4743      innerContent = []
4744    } = rawBlock;
4745    let childIndex = 0;
4746    const content = innerContent.map(item => // `null` denotes a nested block, otherwise we have an HTML fragment.
4747    item !== null ? item : serializeRawBlock(innerBlocks[childIndex++], options)).join('\n').replace(/\n+/g, '\n').trim();
4748    return isCommentDelimited ? getCommentDelimitedContent(blockName, attrs, content) : content;
4749  }
4750  
4751  // CONCATENATED MODULE: ./node_modules/hpq/es/get-path.js
4752  /**
4753   * Given object and string of dot-delimited path segments, returns value at
4754   * path or undefined if path cannot be resolved.
4755   *
4756   * @param  {Object} object Lookup object
4757   * @param  {string} path   Path to resolve
4758   * @return {?*}            Resolved value
4759   */
4760  function getPath(object, path) {
4761    var segments = path.split('.');
4762    var segment;
4763  
4764    while (segment = segments.shift()) {
4765      if (!(segment in object)) {
4766        return;
4767      }
4768  
4769      object = object[segment];
4770    }
4771  
4772    return object;
4773  }
4774  // CONCATENATED MODULE: ./node_modules/hpq/es/index.js
4775  /**
4776   * Internal dependencies
4777   */
4778  
4779  /**
4780   * Function returning a DOM document created by `createHTMLDocument`. The same
4781   * document is returned between invocations.
4782   *
4783   * @return {Document} DOM document.
4784   */
4785  
4786  var getDocument = function () {
4787    var doc;
4788    return function () {
4789      if (!doc) {
4790        doc = document.implementation.createHTMLDocument('');
4791      }
4792  
4793      return doc;
4794    };
4795  }();
4796  /**
4797   * Given a markup string or DOM element, creates an object aligning with the
4798   * shape of the matchers object, or the value returned by the matcher.
4799   *
4800   * @param  {(string|Element)}  source   Source content
4801   * @param  {(Object|Function)} matchers Matcher function or object of matchers
4802   * @return {(Object|*)}                 Matched value(s), shaped by object
4803   */
4804  
4805  
4806  function parse(source, matchers) {
4807    if (!matchers) {
4808      return;
4809    } // Coerce to element
4810  
4811  
4812    if ('string' === typeof source) {
4813      var doc = getDocument();
4814      doc.body.innerHTML = source;
4815      source = doc.body;
4816    } // Return singular value
4817  
4818  
4819    if ('function' === typeof matchers) {
4820      return matchers(source);
4821    } // Bail if we can't handle matchers
4822  
4823  
4824    if (Object !== matchers.constructor) {
4825      return;
4826    } // Shape result by matcher object
4827  
4828  
4829    return Object.keys(matchers).reduce(function (memo, key) {
4830      memo[key] = parse(source, matchers[key]);
4831      return memo;
4832    }, {});
4833  }
4834  /**
4835   * Generates a function which matches node of type selector, returning an
4836   * attribute by property if the attribute exists. If no selector is passed,
4837   * returns property of the query element.
4838   *
4839   * @param  {?string} selector Optional selector
4840   * @param  {string}  name     Property name
4841   * @return {*}                Property value
4842   */
4843  
4844  function prop(selector, name) {
4845    if (1 === arguments.length) {
4846      name = selector;
4847      selector = undefined;
4848    }
4849  
4850    return function (node) {
4851      var match = node;
4852  
4853      if (selector) {
4854        match = node.querySelector(selector);
4855      }
4856  
4857      if (match) {
4858        return getPath(match, name);
4859      }
4860    };
4861  }
4862  /**
4863   * Generates a function which matches node of type selector, returning an
4864   * attribute by name if the attribute exists. If no selector is passed,
4865   * returns attribute of the query element.
4866   *
4867   * @param  {?string} selector Optional selector
4868   * @param  {string}  name     Attribute name
4869   * @return {?string}          Attribute value
4870   */
4871  
4872  function attr(selector, name) {
4873    if (1 === arguments.length) {
4874      name = selector;
4875      selector = undefined;
4876    }
4877  
4878    return function (node) {
4879      var attributes = prop(selector, 'attributes')(node);
4880  
4881      if (attributes && attributes.hasOwnProperty(name)) {
4882        return attributes[name].value;
4883      }
4884    };
4885  }
4886  /**
4887   * Convenience for `prop( selector, 'innerHTML' )`.
4888   *
4889   * @see prop()
4890   *
4891   * @param  {?string} selector Optional selector
4892   * @return {string}           Inner HTML
4893   */
4894  
4895  function es_html(selector) {
4896    return prop(selector, 'innerHTML');
4897  }
4898  /**
4899   * Convenience for `prop( selector, 'textContent' )`.
4900   *
4901   * @see prop()
4902   *
4903   * @param  {?string} selector Optional selector
4904   * @return {string}           Text content
4905   */
4906  
4907  function es_text(selector) {
4908    return prop(selector, 'textContent');
4909  }
4910  /**
4911   * Creates a new matching context by first finding elements matching selector
4912   * using querySelectorAll before then running another `parse` on `matchers`
4913   * scoped to the matched elements.
4914   *
4915   * @see parse()
4916   *
4917   * @param  {string}            selector Selector to match
4918   * @param  {(Object|Function)} matchers Matcher function or object of matchers
4919   * @return {Array.<*,Object>}           Array of matched value(s)
4920   */
4921  
4922  function query(selector, matchers) {
4923    return function (node) {
4924      var matches = node.querySelectorAll(selector);
4925      return [].map.call(matches, function (match) {
4926        return parse(match, matchers);
4927      });
4928    };
4929  }
4930  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/matchers.js
4931  /**
4932   * External dependencies
4933   */
4934  
4935  /**
4936   * Internal dependencies
4937   */
4938  
4939  
4940  
4941  function matchers_html(selector, multilineTag) {
4942    return domNode => {
4943      let match = domNode;
4944  
4945      if (selector) {
4946        match = domNode.querySelector(selector);
4947      }
4948  
4949      if (!match) {
4950        return '';
4951      }
4952  
4953      if (multilineTag) {
4954        let value = '';
4955        const length = match.children.length;
4956  
4957        for (let index = 0; index < length; index++) {
4958          const child = match.children[index];
4959  
4960          if (child.nodeName.toLowerCase() !== multilineTag) {
4961            continue;
4962          }
4963  
4964          value += child.outerHTML;
4965        }
4966  
4967        return value;
4968      }
4969  
4970      return match.innerHTML;
4971    };
4972  }
4973  
4974  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/node.js
4975  /**
4976   * Internal dependencies
4977   */
4978  
4979  /**
4980   * A representation of a single node within a block's rich text value. If
4981   * representing a text node, the value is simply a string of the node value.
4982   * As representing an element node, it is an object of:
4983   *
4984   * 1. `type` (string): Tag name.
4985   * 2. `props` (object): Attributes and children array of WPBlockNode.
4986   *
4987   * @typedef {string|Object} WPBlockNode
4988   */
4989  
4990  /**
4991   * Given a single node and a node type (e.g. `'br'`), returns true if the node
4992   * corresponds to that type, false otherwise.
4993   *
4994   * @param {WPBlockNode} node Block node to test
4995   * @param {string}      type Node to type to test against.
4996   *
4997   * @return {boolean} Whether node is of intended type.
4998   */
4999  
5000  function isNodeOfType(node, type) {
5001    return node && node.type === type;
5002  }
5003  /**
5004   * Given an object implementing the NamedNodeMap interface, returns a plain
5005   * object equivalent value of name, value key-value pairs.
5006   *
5007   * @see https://dom.spec.whatwg.org/#interface-namednodemap
5008   *
5009   * @param {NamedNodeMap} nodeMap NamedNodeMap to convert to object.
5010   *
5011   * @return {Object} Object equivalent value of NamedNodeMap.
5012   */
5013  
5014  
5015  function getNamedNodeMapAsObject(nodeMap) {
5016    const result = {};
5017  
5018    for (let i = 0; i < nodeMap.length; i++) {
5019      const {
5020        name,
5021        value
5022      } = nodeMap[i];
5023      result[name] = value;
5024    }
5025  
5026    return result;
5027  }
5028  /**
5029   * Given a DOM Element or Text node, returns an equivalent block node. Throws
5030   * if passed any node type other than element or text.
5031   *
5032   * @throws {TypeError} If non-element/text node is passed.
5033   *
5034   * @param {Node} domNode DOM node to convert.
5035   *
5036   * @return {WPBlockNode} Block node equivalent to DOM node.
5037   */
5038  
5039  function fromDOM(domNode) {
5040    if (domNode.nodeType === domNode.TEXT_NODE) {
5041      return domNode.nodeValue;
5042    }
5043  
5044    if (domNode.nodeType !== domNode.ELEMENT_NODE) {
5045      throw new TypeError('A block node can only be created from a node of type text or ' + 'element.');
5046    }
5047  
5048    return {
5049      type: domNode.nodeName.toLowerCase(),
5050      props: { ...getNamedNodeMapAsObject(domNode.attributes),
5051        children: children_fromDOM(domNode.childNodes)
5052      }
5053    };
5054  }
5055  /**
5056   * Given a block node, returns its HTML string representation.
5057   *
5058   * @param {WPBlockNode} node Block node to convert to string.
5059   *
5060   * @return {string} String HTML representation of block node.
5061   */
5062  
5063  function toHTML(node) {
5064    return children_toHTML([node]);
5065  }
5066  /**
5067   * Given a selector, returns an hpq matcher generating a WPBlockNode value
5068   * matching the selector result.
5069   *
5070   * @param {string} selector DOM selector.
5071   *
5072   * @return {Function} hpq matcher.
5073   */
5074  
5075  function node_matcher(selector) {
5076    return domNode => {
5077      let match = domNode;
5078  
5079      if (selector) {
5080        match = domNode.querySelector(selector);
5081      }
5082  
5083      try {
5084        return fromDOM(match);
5085      } catch (error) {
5086        return null;
5087      }
5088    };
5089  }
5090  /**
5091   * Object of utility functions used in managing block attribute values of
5092   * source `node`.
5093   *
5094   * @see https://github.com/WordPress/gutenberg/pull/10439
5095   *
5096   * @deprecated since 4.0. The `node` source should not be used, and can be
5097   *             replaced by the `html` source.
5098   *
5099   * @private
5100   */
5101  
5102  /* harmony default export */ var api_node = ({
5103    isNodeOfType,
5104    fromDOM,
5105    toHTML,
5106    matcher: node_matcher
5107  });
5108  
5109  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/children.js
5110  /**
5111   * External dependencies
5112   */
5113  
5114  /**
5115   * WordPress dependencies
5116   */
5117  
5118  
5119  /**
5120   * Internal dependencies
5121   */
5122  
5123  
5124  /**
5125   * A representation of a block's rich text value.
5126   *
5127   * @typedef {WPBlockNode[]} WPBlockChildren
5128   */
5129  
5130  /**
5131   * Given block children, returns a serialize-capable WordPress element.
5132   *
5133   * @param {WPBlockChildren} children Block children object to convert.
5134   *
5135   * @return {WPElement} A serialize-capable element.
5136   */
5137  
5138  function getSerializeCapableElement(children) {
5139    // The fact that block children are compatible with the element serializer is
5140    // merely an implementation detail that currently serves to be true, but
5141    // should not be mistaken as being a guarantee on the external API. The
5142    // public API only offers guarantees to work with strings (toHTML) and DOM
5143    // elements (fromDOM), and should provide utilities to manipulate the value
5144    // rather than expect consumers to inspect or construct its shape (concat).
5145    return children;
5146  }
5147  /**
5148   * Given block children, returns an array of block nodes.
5149   *
5150   * @param {WPBlockChildren} children Block children object to convert.
5151   *
5152   * @return {Array<WPBlockNode>} An array of individual block nodes.
5153   */
5154  
5155  function getChildrenArray(children) {
5156    // The fact that block children are compatible with the element serializer
5157    // is merely an implementation detail that currently serves to be true, but
5158    // should not be mistaken as being a guarantee on the external API.
5159    return children;
5160  }
5161  /**
5162   * Given two or more block nodes, returns a new block node representing a
5163   * concatenation of its values.
5164   *
5165   * @param {...WPBlockChildren} blockNodes Block nodes to concatenate.
5166   *
5167   * @return {WPBlockChildren} Concatenated block node.
5168   */
5169  
5170  
5171  function concat() {
5172    const result = [];
5173  
5174    for (let i = 0; i < arguments.length; i++) {
5175      const blockNode = Object(external_lodash_["castArray"])(i < 0 || arguments.length <= i ? undefined : arguments[i]);
5176  
5177      for (let j = 0; j < blockNode.length; j++) {
5178        const child = blockNode[j];
5179        const canConcatToPreviousString = typeof child === 'string' && typeof result[result.length - 1] === 'string';
5180  
5181        if (canConcatToPreviousString) {
5182          result[result.length - 1] += child;
5183        } else {
5184          result.push(child);
5185        }
5186      }
5187    }
5188  
5189    return result;
5190  }
5191  /**
5192   * Given an iterable set of DOM nodes, returns equivalent block children.
5193   * Ignores any non-element/text nodes included in set.
5194   *
5195   * @param {Iterable.<Node>} domNodes Iterable set of DOM nodes to convert.
5196   *
5197   * @return {WPBlockChildren} Block children equivalent to DOM nodes.
5198   */
5199  
5200  function children_fromDOM(domNodes) {
5201    const result = [];
5202  
5203    for (let i = 0; i < domNodes.length; i++) {
5204      try {
5205        result.push(fromDOM(domNodes[i]));
5206      } catch (error) {// Simply ignore if DOM node could not be converted.
5207      }
5208    }
5209  
5210    return result;
5211  }
5212  /**
5213   * Given a block node, returns its HTML string representation.
5214   *
5215   * @param {WPBlockChildren} children Block node(s) to convert to string.
5216   *
5217   * @return {string} String HTML representation of block node.
5218   */
5219  
5220  function children_toHTML(children) {
5221    const element = getSerializeCapableElement(children);
5222    return Object(external_wp_element_["renderToString"])(element);
5223  }
5224  /**
5225   * Given a selector, returns an hpq matcher generating a WPBlockChildren value
5226   * matching the selector result.
5227   *
5228   * @param {string} selector DOM selector.
5229   *
5230   * @return {Function} hpq matcher.
5231   */
5232  
5233  function children_matcher(selector) {
5234    return domNode => {
5235      let match = domNode;
5236  
5237      if (selector) {
5238        match = domNode.querySelector(selector);
5239      }
5240  
5241      if (match) {
5242        return children_fromDOM(match.childNodes);
5243      }
5244  
5245      return [];
5246    };
5247  }
5248  /**
5249   * Object of utility functions used in managing block attribute values of
5250   * source `children`.
5251   *
5252   * @see https://github.com/WordPress/gutenberg/pull/10439
5253   *
5254   * @deprecated since 4.0. The `children` source should not be used, and can be
5255   *             replaced by the `html` source.
5256   *
5257   * @private
5258   */
5259  
5260  /* harmony default export */ var api_children = ({
5261    concat,
5262    getChildrenArray,
5263    fromDOM: children_fromDOM,
5264    toHTML: children_toHTML,
5265    matcher: children_matcher
5266  });
5267  
5268  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/get-block-attributes.js
5269  /**
5270   * External dependencies
5271   */
5272  
5273  
5274  /**
5275   * WordPress dependencies
5276   */
5277  
5278  
5279  /**
5280   * Internal dependencies
5281   */
5282  
5283  
5284  
5285  /**
5286   * Higher-order hpq matcher which enhances an attribute matcher to return true
5287   * or false depending on whether the original matcher returns undefined. This
5288   * is useful for boolean attributes (e.g. disabled) whose attribute values may
5289   * be technically falsey (empty string), though their mere presence should be
5290   * enough to infer as true.
5291   *
5292   * @param {Function} matcher Original hpq matcher.
5293   *
5294   * @return {Function} Enhanced hpq matcher.
5295   */
5296  
5297  const toBooleanAttributeMatcher = matcher => Object(external_lodash_["flow"])([matcher, // Expected values from `attr( 'disabled' )`:
5298  //
5299  // <input>
5300  // - Value:       `undefined`
5301  // - Transformed: `false`
5302  //
5303  // <input disabled>
5304  // - Value:       `''`
5305  // - Transformed: `true`
5306  //
5307  // <input disabled="disabled">
5308  // - Value:       `'disabled'`
5309  // - Transformed: `true`
5310  value => value !== undefined]);
5311  /**
5312   * Returns true if value is of the given JSON schema type, or false otherwise.
5313   *
5314   * @see http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.25
5315   *
5316   * @param {*}      value Value to test.
5317   * @param {string} type  Type to test.
5318   *
5319   * @return {boolean} Whether value is of type.
5320   */
5321  
5322  function isOfType(value, type) {
5323    switch (type) {
5324      case 'string':
5325        return typeof value === 'string';
5326  
5327      case 'boolean':
5328        return typeof value === 'boolean';
5329  
5330      case 'object':
5331        return !!value && value.constructor === Object;
5332  
5333      case 'null':
5334        return value === null;
5335  
5336      case 'array':
5337        return Array.isArray(value);
5338  
5339      case 'integer':
5340      case 'number':
5341        return typeof value === 'number';
5342    }
5343  
5344    return true;
5345  }
5346  /**
5347   * Returns true if value is of an array of given JSON schema types, or false
5348   * otherwise.
5349   *
5350   * @see http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.25
5351   *
5352   * @param {*}        value Value to test.
5353   * @param {string[]} types Types to test.
5354   *
5355   * @return {boolean} Whether value is of types.
5356   */
5357  
5358  function isOfTypes(value, types) {
5359    return types.some(type => isOfType(value, type));
5360  }
5361  /**
5362   * Given an attribute key, an attribute's schema, a block's raw content and the
5363   * commentAttributes returns the attribute value depending on its source
5364   * definition of the given attribute key.
5365   *
5366   * @param {string} attributeKey      Attribute key.
5367   * @param {Object} attributeSchema   Attribute's schema.
5368   * @param {string} innerHTML         Block's raw content.
5369   * @param {Object} commentAttributes Block's comment attributes.
5370   *
5371   * @return {*} Attribute value.
5372   */
5373  
5374  function getBlockAttribute(attributeKey, attributeSchema, innerHTML, commentAttributes) {
5375    const {
5376      type,
5377      enum: enumSet
5378    } = attributeSchema;
5379    let value;
5380  
5381    switch (attributeSchema.source) {
5382      // An undefined source means that it's an attribute serialized to the
5383      // block's "comment".
5384      case undefined:
5385        value = commentAttributes ? commentAttributes[attributeKey] : undefined;
5386        break;
5387  
5388      case 'attribute':
5389      case 'property':
5390      case 'html':
5391      case 'text':
5392      case 'children':
5393      case 'node':
5394      case 'query':
5395      case 'tag':
5396        value = parseWithAttributeSchema(innerHTML, attributeSchema);
5397        break;
5398    }
5399  
5400    if (!isValidByType(value, type) || !isValidByEnum(value, enumSet)) {
5401      // Reject the value if it is not valid. Reverting to the undefined
5402      // value ensures the default is respected, if applicable.
5403      value = undefined;
5404    }
5405  
5406    if (value === undefined) {
5407      return attributeSchema.default;
5408    }
5409  
5410    return value;
5411  }
5412  /**
5413   * Returns true if value is valid per the given block attribute schema type
5414   * definition, or false otherwise.
5415   *
5416   * @see https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1
5417   *
5418   * @param {*}                       value Value to test.
5419   * @param {?(Array<string>|string)} type  Block attribute schema type.
5420   *
5421   * @return {boolean} Whether value is valid.
5422   */
5423  
5424  function isValidByType(value, type) {
5425    return type === undefined || isOfTypes(value, Object(external_lodash_["castArray"])(type));
5426  }
5427  /**
5428   * Returns true if value is valid per the given block attribute schema enum
5429   * definition, or false otherwise.
5430   *
5431   * @see https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.2
5432   *
5433   * @param {*}      value   Value to test.
5434   * @param {?Array} enumSet Block attribute schema enum.
5435   *
5436   * @return {boolean} Whether value is valid.
5437   */
5438  
5439  function isValidByEnum(value, enumSet) {
5440    return !Array.isArray(enumSet) || enumSet.includes(value);
5441  }
5442  /**
5443   * Returns an hpq matcher given a source object.
5444   *
5445   * @param {Object} sourceConfig Attribute Source object.
5446   *
5447   * @return {Function} A hpq Matcher.
5448   */
5449  
5450  function matcherFromSource(sourceConfig) {
5451    switch (sourceConfig.source) {
5452      case 'attribute':
5453        let matcher = attr(sourceConfig.selector, sourceConfig.attribute);
5454  
5455        if (sourceConfig.type === 'boolean') {
5456          matcher = toBooleanAttributeMatcher(matcher);
5457        }
5458  
5459        return matcher;
5460  
5461      case 'html':
5462        return matchers_html(sourceConfig.selector, sourceConfig.multiline);
5463  
5464      case 'text':
5465        return es_text(sourceConfig.selector);
5466  
5467      case 'children':
5468        return children_matcher(sourceConfig.selector);
5469  
5470      case 'node':
5471        return node_matcher(sourceConfig.selector);
5472  
5473      case 'query':
5474        const subMatchers = Object(external_lodash_["mapValues"])(sourceConfig.query, matcherFromSource);
5475        return query(sourceConfig.selector, subMatchers);
5476  
5477      case 'tag':
5478        return Object(external_lodash_["flow"])([prop(sourceConfig.selector, 'nodeName'), nodeName => nodeName ? nodeName.toLowerCase() : undefined]);
5479  
5480      default:
5481        // eslint-disable-next-line no-console
5482        console.error(`Unknown source type "$sourceConfig.source}"`);
5483    }
5484  }
5485  /**
5486   * Given a block's raw content and an attribute's schema returns the attribute's
5487   * value depending on its source.
5488   *
5489   * @param {string} innerHTML       Block's raw content.
5490   * @param {Object} attributeSchema Attribute's schema.
5491   *
5492   * @return {*} Attribute value.
5493   */
5494  
5495  function parseWithAttributeSchema(innerHTML, attributeSchema) {
5496    return parse(innerHTML, matcherFromSource(attributeSchema));
5497  }
5498  /**
5499   * Returns the block attributes of a registered block node given its type.
5500   *
5501   * @param {string|Object} blockTypeOrName Block type or name.
5502   * @param {string}        innerHTML       Raw block content.
5503   * @param {?Object}       attributes      Known block attributes (from delimiters).
5504   *
5505   * @return {Object} All block attributes.
5506   */
5507  
5508  function getBlockAttributes(blockTypeOrName, innerHTML) {
5509    let attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
5510    const blockType = normalizeBlockType(blockTypeOrName);
5511    const blockAttributes = Object(external_lodash_["mapValues"])(blockType.attributes, (attributeSchema, attributeKey) => {
5512      return getBlockAttribute(attributeKey, attributeSchema, innerHTML, attributes);
5513    });
5514    return Object(external_wp_hooks_["applyFilters"])('blocks.getBlockAttributes', blockAttributes, blockType, innerHTML, attributes);
5515  }
5516  
5517  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/fix-custom-classname.js
5518  /**
5519   * External dependencies
5520   */
5521  
5522  /**
5523   * Internal dependencies
5524   */
5525  
5526  
5527  
5528  
5529  /**
5530   * Given an HTML string, returns an array of class names assigned to the root
5531   * element in the markup.
5532   *
5533   * @param {string} innerHTML Markup string from which to extract classes.
5534   *
5535   * @return {string[]} Array of class names assigned to the root element.
5536   */
5537  
5538  function getHTMLRootElementClasses(innerHTML) {
5539    innerHTML = `<div data-custom-class-name>$innerHTML}</div>`;
5540    const parsed = parseWithAttributeSchema(innerHTML, {
5541      type: 'string',
5542      source: 'attribute',
5543      selector: '[data-custom-class-name] > *',
5544      attribute: 'class'
5545    });
5546    return parsed ? parsed.trim().split(/\s+/) : [];
5547  }
5548  /**
5549   * Given a parsed set of block attributes, if the block supports custom class
5550   * names and an unknown class (per the block's serialization behavior) is
5551   * found, the unknown classes are treated as custom classes. This prevents the
5552   * block from being considered as invalid.
5553   *
5554   * @param {Object} blockAttributes Original block attributes.
5555   * @param {Object} blockType       Block type settings.
5556   * @param {string} innerHTML       Original block markup.
5557   *
5558   * @return {Object} Filtered block attributes.
5559   */
5560  
5561  function fixCustomClassname(blockAttributes, blockType, innerHTML) {
5562    if (registration_hasBlockSupport(blockType, 'customClassName', true)) {
5563      // To determine difference, serialize block given the known set of
5564      // attributes, with the exception of `className`. This will determine
5565      // the default set of classes. From there, any difference in innerHTML
5566      // can be considered as custom classes.
5567      const attributesSansClassName = Object(external_lodash_["omit"])(blockAttributes, ['className']);
5568      const serialized = getSaveContent(blockType, attributesSansClassName);
5569      const defaultClasses = getHTMLRootElementClasses(serialized);
5570      const actualClasses = getHTMLRootElementClasses(innerHTML);
5571      const customClasses = Object(external_lodash_["difference"])(actualClasses, defaultClasses);
5572  
5573      if (customClasses.length) {
5574        blockAttributes.className = customClasses.join(' ');
5575      } else if (serialized) {
5576        delete blockAttributes.className;
5577      }
5578    }
5579  
5580    return blockAttributes;
5581  }
5582  
5583  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/apply-built-in-validation-fixes.js
5584  /**
5585   * Internal dependencies
5586   */
5587  
5588  /**
5589   * Attempts to fix block invalidation by applying build-in validation fixes
5590   * like moving all extra classNames to the className attribute.
5591   *
5592   * @param {WPBlock}                               block     block object.
5593   * @param {import('../registration').WPBlockType} blockType Block type. This is normalize not necessary and
5594   *                                                          can be inferred from the block name,
5595   *                                                          but it's here for performance reasons.
5596   *
5597   * @return {WPBlock} Fixed block object
5598   */
5599  
5600  function applyBuiltInValidationFixes(block, blockType) {
5601    const updatedBlockAttributes = fixCustomClassname(block.attributes, blockType, block.originalContent);
5602    return { ...block,
5603      attributes: updatedBlockAttributes
5604    };
5605  }
5606  
5607  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/apply-block-deprecated-versions.js
5608  /**
5609   * External dependencies
5610   */
5611  
5612  /**
5613   * Internal dependencies
5614   */
5615  
5616  
5617  
5618  
5619  
5620  /**
5621   * Given a block object, returns a new copy of the block with any applicable
5622   * deprecated migrations applied, or the original block if it was both valid
5623   * and no eligible migrations exist.
5624   *
5625   * @param {import(".").WPBlock}                   block     Parsed and invalid block object.
5626   * @param {import(".").WPRawBlock}                rawBlock  Raw block object.
5627   * @param {import('../registration').WPBlockType} blockType Block type. This is normalize not necessary and
5628   *                                                          can be inferred from the block name,
5629   *                                                          but it's here for performance reasons.
5630   *
5631   * @return {import(".").WPBlock} Migrated block object.
5632   */
5633  
5634  function applyBlockDeprecatedVersions(block, rawBlock, blockType) {
5635    const parsedAttributes = rawBlock.attrs;
5636    const {
5637      deprecated: deprecatedDefinitions
5638    } = blockType; // Bail early if there are no registered deprecations to be handled.
5639  
5640    if (!deprecatedDefinitions || !deprecatedDefinitions.length) {
5641      return block;
5642    } // By design, blocks lack any sort of version tracking. Instead, to process
5643    // outdated content the system operates a queue out of all the defined
5644    // attribute shapes and tries each definition until the input produces a
5645    // valid result. This mechanism seeks to avoid polluting the user-space with
5646    // machine-specific code. An invalid block is thus a block that could not be
5647    // matched successfully with any of the registered deprecation definitions.
5648  
5649  
5650    for (let i = 0; i < deprecatedDefinitions.length; i++) {
5651      // A block can opt into a migration even if the block is valid by
5652      // defining `isEligible` on its deprecation. If the block is both valid
5653      // and does not opt to migrate, skip.
5654      const {
5655        isEligible = external_lodash_["stubFalse"]
5656      } = deprecatedDefinitions[i];
5657  
5658      if (block.isValid && !isEligible(parsedAttributes, block.innerBlocks)) {
5659        continue;
5660      } // Block type properties which could impact either serialization or
5661      // parsing are not considered in the deprecated block type by default,
5662      // and must be explicitly provided.
5663  
5664  
5665      const deprecatedBlockType = Object.assign(Object(external_lodash_["omit"])(blockType, DEPRECATED_ENTRY_KEYS), deprecatedDefinitions[i]);
5666      let migratedBlock = { ...block,
5667        attributes: getBlockAttributes(deprecatedBlockType, block.originalContent, parsedAttributes)
5668      }; // Ignore the deprecation if it produces a block which is not valid.
5669  
5670      let [isValid] = validateBlock(migratedBlock, deprecatedBlockType); // If the migrated block is not valid intiailly, try the built-in fixes.
5671  
5672      if (!isValid) {
5673        migratedBlock = applyBuiltInValidationFixes(migratedBlock, deprecatedBlockType);
5674        [isValid] = validateBlock(migratedBlock, deprecatedBlockType);
5675      } // An invalid block does not imply incorrect HTML but the fact block
5676      // source information could be lost on reserialization.
5677  
5678  
5679      if (!isValid) {
5680        continue;
5681      }
5682  
5683      let migratedInnerBlocks = migratedBlock.innerBlocks;
5684      let migratedAttributes = migratedBlock.attributes; // A block may provide custom behavior to assign new attributes and/or
5685      // inner blocks.
5686  
5687      const {
5688        migrate
5689      } = deprecatedBlockType;
5690  
5691      if (migrate) {
5692        [migratedAttributes = parsedAttributes, migratedInnerBlocks = block.innerBlocks] = Object(external_lodash_["castArray"])(migrate(migratedAttributes, block.innerBlocks));
5693      }
5694  
5695      block = { ...block,
5696        attributes: migratedAttributes,
5697        innerBlocks: migratedInnerBlocks,
5698        isValid: true,
5699        validationIssues: []
5700      };
5701    }
5702  
5703    return block;
5704  }
5705  
5706  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/parser/index.js
5707  /**
5708   * WordPress dependencies
5709   */
5710  
5711  
5712  /**
5713   * Internal dependencies
5714   */
5715  
5716  
5717  
5718  
5719  
5720  
5721  
5722  
5723  
5724  
5725  /**
5726   * The raw structure of a block includes its attributes, inner
5727   * blocks, and inner HTML. It is important to distinguish inner blocks from
5728   * the HTML content of the block as only the latter is relevant for block
5729   * validation and edit operations.
5730   *
5731   * @typedef WPRawBlock
5732   *
5733   * @property {string=}         blockName    Block name
5734   * @property {Object=}         attrs        Block raw or comment attributes.
5735   * @property {string}          innerHTML    HTML content of the block.
5736   * @property {(string|null)[]} innerContent Content without inner blocks.
5737   * @property {WPRawBlock[]}    innerBlocks  Inner Blocks.
5738   */
5739  
5740  /**
5741   * Fully parsed block object.
5742   *
5743   * @typedef WPBlock
5744   *
5745   * @property {string}    name             Block name
5746   * @property {Object }   attributes       Block raw or comment attributes.
5747   * @property {WPBlock[]} innerBlocks      Inner Blocks.
5748   * @property {string}    originalContent  Original content of the block before validation fixes.
5749   * @property {boolean}   isValid          Whether the block is valid.
5750   * @property {Object[]}  validationIssues Validation issues.
5751   */
5752  
5753  /**
5754   * Convert legacy blocks to their canonical form. This function is used
5755   * both in the parser level for previous content and to convert such blocks
5756   * used in Custom Post Types templates.
5757   *
5758   * @param {WPRawBlock} rawBlock
5759   *
5760   * @return {WPRawBlock} The block's name and attributes, changed accordingly if a match was found
5761   */
5762  
5763  function convertLegacyBlocks(rawBlock) {
5764    const [correctName, correctedAttributes] = convertLegacyBlockNameAndAttributes(rawBlock.blockName, rawBlock.attrs);
5765    return { ...rawBlock,
5766      blockName: correctName,
5767      attrs: correctedAttributes
5768    };
5769  }
5770  /**
5771   * Normalize the raw block by applying the fallback block name if none given,
5772   * sanitize the parsed HTML...
5773   *
5774   * @param {WPRawBlock} rawBlock The raw block object.
5775   *
5776   * @return {WPRawBlock} The normalized block object.
5777   */
5778  
5779  
5780  function normalizeRawBlock(rawBlock) {
5781    const fallbackBlockName = getFreeformContentHandlerName(); // If the grammar parsing don't produce any block name, use the freeform block.
5782  
5783    const rawBlockName = rawBlock.blockName || getFreeformContentHandlerName();
5784    const rawAttributes = rawBlock.attrs || {};
5785    const rawInnerBlocks = rawBlock.innerBlocks || [];
5786    let rawInnerHTML = rawBlock.innerHTML.trim(); // Fallback content may be upgraded from classic content expecting implicit
5787    // automatic paragraphs, so preserve them. Assumes wpautop is idempotent,
5788    // meaning there are no negative consequences to repeated autop calls.
5789  
5790    if (rawBlockName === fallbackBlockName) {
5791      rawInnerHTML = Object(external_wp_autop_["autop"])(rawInnerHTML).trim();
5792    }
5793  
5794    return { ...rawBlock,
5795      blockName: rawBlockName,
5796      attrs: rawAttributes,
5797      innerHTML: rawInnerHTML,
5798      innerBlocks: rawInnerBlocks
5799    };
5800  }
5801  /**
5802   * Uses the "unregistered blockType" to create a block object.
5803   *
5804   * @param {WPRawBlock} rawBlock block.
5805   *
5806   * @return {WPRawBlock} The unregistered block object.
5807   */
5808  
5809  function createMissingBlockType(rawBlock) {
5810    const unregisteredFallbackBlock = getUnregisteredTypeHandlerName() || getFreeformContentHandlerName(); // Preserve undelimited content for use by the unregistered type
5811    // handler. A block node's `innerHTML` isn't enough, as that field only
5812    // carries the block's own HTML and not its nested blocks.
5813  
5814    const originalUndelimitedContent = serializeRawBlock(rawBlock, {
5815      isCommentDelimited: false
5816    }); // Preserve full block content for use by the unregistered type
5817    // handler, block boundaries included.
5818  
5819    const originalContent = serializeRawBlock(rawBlock, {
5820      isCommentDelimited: true
5821    });
5822    return {
5823      blockName: unregisteredFallbackBlock,
5824      attrs: {
5825        originalName: rawBlock.blockName,
5826        originalContent,
5827        originalUndelimitedContent
5828      },
5829      innerHTML: rawBlock.blockName ? originalContent : rawBlock.innerHTML,
5830      innerBlocks: rawBlock.innerBlocks,
5831      innerContent: rawBlock.innerContent
5832    };
5833  }
5834  /**
5835   * Given a raw block returned by grammar parsing, returns a fully parsed block.
5836   *
5837   * @param {WPRawBlock} rawBlock The raw block object.
5838   *
5839   * @return {WPBlock} Fully parsed block.
5840   */
5841  
5842  
5843  function parseRawBlock(rawBlock) {
5844    let normalizedBlock = normalizeRawBlock(rawBlock); // During the lifecycle of the project, we renamed some old blocks
5845    // and transformed others to new blocks. To avoid breaking existing content,
5846    // we added this function to properly parse the old content.
5847  
5848    normalizedBlock = convertLegacyBlocks(normalizedBlock); // Try finding the type for known block name.
5849  
5850    let blockType = registration_getBlockType(normalizedBlock.blockName); // If not blockType is found for the specified name, fallback to the "unregistedBlockType".
5851  
5852    if (!blockType) {
5853      normalizedBlock = createMissingBlockType(normalizedBlock);
5854      blockType = registration_getBlockType(normalizedBlock.blockName);
5855    } // If it's an empty freeform block or there's no blockType (no missing block handler)
5856    // Then, just ignore the block.
5857    // It might be a good idea to throw a warning here.
5858    // TODO: I'm unsure about the unregisteredFallbackBlock check,
5859    // it might ignore some dynamic unregistered third party blocks wrongly.
5860  
5861  
5862    const isFallbackBlock = normalizedBlock.blockName === getFreeformContentHandlerName() || normalizedBlock.blockName === getUnregisteredTypeHandlerName();
5863  
5864    if (!blockType || !normalizedBlock.innerHTML && isFallbackBlock) {
5865      return;
5866    } // Parse inner blocks recursively.
5867  
5868  
5869    const parsedInnerBlocks = normalizedBlock.innerBlocks.map(parseRawBlock) // See https://github.com/WordPress/gutenberg/pull/17164.
5870    .filter(innerBlock => !!innerBlock); // Get the fully parsed block.
5871  
5872    let parsedBlock = createBlock(normalizedBlock.blockName, getBlockAttributes(blockType, normalizedBlock.innerHTML, normalizedBlock.attrs), parsedInnerBlocks);
5873    parsedBlock.originalContent = normalizedBlock.innerHTML; // Attempt to validate the block.
5874  
5875    let [isValid, validationIssues] = validateBlock(parsedBlock, blockType); // If the block is invalid, attempt some built-in fixes
5876    // like custom classNames handling.
5877  
5878    if (!isValid) {
5879      parsedBlock = applyBuiltInValidationFixes(parsedBlock, blockType); // Attempt to validate the block once again after the built-in fixes.
5880  
5881      [isValid, validationIssues] = validateBlock(parsedBlock, blockType);
5882    }
5883  
5884    parsedBlock.isValid = isValid;
5885    parsedBlock.validationIssues = validationIssues; // Run the block deprecation and migrations.
5886    // This is performed on both invalid and valid blocks because
5887    // migration using the `migrate` functions should run even
5888    // if the output is deemed valid.
5889  
5890    parsedBlock = applyBlockDeprecatedVersions(parsedBlock, normalizedBlock, blockType);
5891  
5892    if (validationIssues && validationIssues.length > 0) {
5893      if (parsedBlock.isValid) {
5894        /* eslint-disable no-console */
5895        console.groupCollapsed('Updated Block: %s', blockType.name);
5896        console.info('Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s', blockType.name, blockType, getSaveContent(blockType, parsedBlock.attributes), parsedBlock.originalContent);
5897        console.groupEnd();
5898        /* eslint-enable no-console */
5899      } else {
5900        validationIssues.forEach(_ref => {
5901          let {
5902            log,
5903            args
5904          } = _ref;
5905          return log(...args);
5906        });
5907      }
5908    }
5909  
5910    return parsedBlock;
5911  }
5912  /**
5913   * Utilizes an optimized token-driven parser based on the Gutenberg grammar spec
5914   * defined through a parsing expression grammar to take advantage of the regular
5915   * cadence provided by block delimiters -- composed syntactically through HTML
5916   * comments -- which, given a general HTML document as an input, returns a block
5917   * list array representation.
5918   *
5919   * This is a recursive-descent parser that scans linearly once through the input
5920   * document. Instead of directly recursing it utilizes a trampoline mechanism to
5921   * prevent stack overflow. This initial pass is mainly interested in separating
5922   * and isolating the blocks serialized in the document and manifestly not in the
5923   * content within the blocks.
5924   *
5925   * @see
5926   * https://developer.wordpress.org/block-editor/packages/packages-block-serialization-default-parser/
5927   *
5928   * @param {string} content The post content.
5929   *
5930   * @return {Array} Block list.
5931   */
5932  
5933  function parser_parse(content) {
5934    return Object(external_wp_blockSerializationDefaultParser_["parse"])(content).reduce((accumulator, rawBlock) => {
5935      const block = parseRawBlock(rawBlock);
5936  
5937      if (block) {
5938        accumulator.push(block);
5939      }
5940  
5941      return accumulator;
5942    }, []);
5943  }
5944  
5945  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/get-raw-transforms.js
5946  /**
5947   * External dependencies
5948   */
5949  
5950  /**
5951   * Internal dependencies
5952   */
5953  
5954  
5955  function getRawTransforms() {
5956    return Object(external_lodash_["filter"])(getBlockTransforms('from'), {
5957      type: 'raw'
5958    }).map(transform => {
5959      return transform.isMatch ? transform : { ...transform,
5960        isMatch: node => transform.selector && node.matches(transform.selector)
5961      };
5962    });
5963  }
5964  
5965  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/html-to-blocks.js
5966  /**
5967   * Internal dependencies
5968   */
5969  
5970  
5971  
5972  /**
5973   * Converts HTML directly to blocks. Looks for a matching transform for each
5974   * top-level tag. The HTML should be filtered to not have any text between
5975   * top-level tags and formatted in a way that blocks can handle the HTML.
5976   *
5977   * @param {string} html HTML to convert.
5978   *
5979   * @return {Array} An array of blocks.
5980   */
5981  
5982  function htmlToBlocks(html) {
5983    const doc = document.implementation.createHTMLDocument('');
5984    doc.body.innerHTML = html;
5985    return Array.from(doc.body.children).flatMap(node => {
5986      const rawTransform = findTransform(getRawTransforms(), _ref => {
5987        let {
5988          isMatch
5989        } = _ref;
5990        return isMatch(node);
5991      });
5992  
5993      if (!rawTransform) {
5994        return createBlock( // Should not be hardcoded.
5995        'core/html', getBlockAttributes('core/html', node.outerHTML));
5996      }
5997  
5998      const {
5999        transform,
6000        blockName
6001      } = rawTransform;
6002  
6003      if (transform) {
6004        return transform(node);
6005      }
6006  
6007      return createBlock(blockName, getBlockAttributes(blockName, node.outerHTML));
6008    });
6009  }
6010  
6011  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/normalise-blocks.js
6012  /**
6013   * WordPress dependencies
6014   */
6015  
6016  function normaliseBlocks(HTML) {
6017    const decuDoc = document.implementation.createHTMLDocument('');
6018    const accuDoc = document.implementation.createHTMLDocument('');
6019    const decu = decuDoc.body;
6020    const accu = accuDoc.body;
6021    decu.innerHTML = HTML;
6022  
6023    while (decu.firstChild) {
6024      const node = decu.firstChild; // Text nodes: wrap in a paragraph, or append to previous.
6025  
6026      if (node.nodeType === node.TEXT_NODE) {
6027        if (Object(external_wp_dom_["isEmpty"])(node)) {
6028          decu.removeChild(node);
6029        } else {
6030          if (!accu.lastChild || accu.lastChild.nodeName !== 'P') {
6031            accu.appendChild(accuDoc.createElement('P'));
6032          }
6033  
6034          accu.lastChild.appendChild(node);
6035        } // Element nodes.
6036  
6037      } else if (node.nodeType === node.ELEMENT_NODE) {
6038        // BR nodes: create a new paragraph on double, or append to previous.
6039        if (node.nodeName === 'BR') {
6040          if (node.nextSibling && node.nextSibling.nodeName === 'BR') {
6041            accu.appendChild(accuDoc.createElement('P'));
6042            decu.removeChild(node.nextSibling);
6043          } // Don't append to an empty paragraph.
6044  
6045  
6046          if (accu.lastChild && accu.lastChild.nodeName === 'P' && accu.lastChild.hasChildNodes()) {
6047            accu.lastChild.appendChild(node);
6048          } else {
6049            decu.removeChild(node);
6050          }
6051        } else if (node.nodeName === 'P') {
6052          // Only append non-empty paragraph nodes.
6053          if (Object(external_wp_dom_["isEmpty"])(node)) {
6054            decu.removeChild(node);
6055          } else {
6056            accu.appendChild(node);
6057          }
6058        } else if (Object(external_wp_dom_["isPhrasingContent"])(node)) {
6059          if (!accu.lastChild || accu.lastChild.nodeName !== 'P') {
6060            accu.appendChild(accuDoc.createElement('P'));
6061          }
6062  
6063          accu.lastChild.appendChild(node);
6064        } else {
6065          accu.appendChild(node);
6066        }
6067      } else {
6068        decu.removeChild(node);
6069      }
6070    }
6071  
6072    return accu.innerHTML;
6073  }
6074  
6075  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/special-comment-converter.js
6076  /**
6077   * WordPress dependencies
6078   */
6079  
6080  /**
6081   * Looks for `<!--nextpage-->` and `<!--more-->` comments, as well as the
6082   * `<!--more Some text-->` variant and its `<!--noteaser-->` companion,
6083   * and replaces them with a custom element representing a future block.
6084   *
6085   * The custom element is a way to bypass the rest of the `raw-handling`
6086   * transforms, which would eliminate other kinds of node with which to carry
6087   * `<!--more-->`'s data: nodes with `data` attributes, empty paragraphs, etc.
6088   *
6089   * The custom element is then expected to be recognized by any registered
6090   * block's `raw` transform.
6091   *
6092   * @param {Node}     node The node to be processed.
6093   * @param {Document} doc  The document of the node.
6094   * @return {void}
6095   */
6096  
6097  function specialCommentConverter(node, doc) {
6098    if (node.nodeType !== node.COMMENT_NODE) {
6099      return;
6100    }
6101  
6102    if (node.nodeValue === 'nextpage') {
6103      Object(external_wp_dom_["replace"])(node, createNextpage(doc));
6104      return;
6105    }
6106  
6107    if (node.nodeValue.indexOf('more') === 0) {
6108      // Grab any custom text in the comment.
6109      const customText = node.nodeValue.slice(4).trim();
6110      /*
6111       * When a `<!--more-->` comment is found, we need to look for any
6112       * `<!--noteaser-->` sibling, but it may not be a direct sibling
6113       * (whitespace typically lies in between)
6114       */
6115  
6116      let sibling = node;
6117      let noTeaser = false;
6118  
6119      while (sibling = sibling.nextSibling) {
6120        if (sibling.nodeType === sibling.COMMENT_NODE && sibling.nodeValue === 'noteaser') {
6121          noTeaser = true;
6122          Object(external_wp_dom_["remove"])(sibling);
6123          break;
6124        }
6125      }
6126  
6127      Object(external_wp_dom_["replace"])(node, createMore(customText, noTeaser, doc));
6128    }
6129  }
6130  
6131  function createMore(customText, noTeaser, doc) {
6132    const node = doc.createElement('wp-block');
6133    node.dataset.block = 'core/more';
6134  
6135    if (customText) {
6136      node.dataset.customText = customText;
6137    }
6138  
6139    if (noTeaser) {
6140      // "Boolean" data attribute
6141      node.dataset.noTeaser = '';
6142    }
6143  
6144    return node;
6145  }
6146  
6147  function createNextpage(doc) {
6148    const node = doc.createElement('wp-block');
6149    node.dataset.block = 'core/nextpage';
6150    return node;
6151  }
6152  
6153  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/comment-remover.js
6154  /**
6155   * WordPress dependencies
6156   */
6157  
6158  /**
6159   * Looks for comments, and removes them.
6160   *
6161   * @param {Node} node The node to be processed.
6162   * @return {void}
6163   */
6164  
6165  function commentRemover(node) {
6166    if (node.nodeType === node.COMMENT_NODE) {
6167      Object(external_wp_dom_["remove"])(node);
6168    }
6169  }
6170  
6171  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/is-inline-content.js
6172  /**
6173   * External dependencies
6174   */
6175  
6176  /**
6177   * WordPress dependencies
6178   */
6179  
6180  
6181  /**
6182   * Checks if the given node should be considered inline content, optionally
6183   * depending on a context tag.
6184   *
6185   * @param {Node}   node       Node name.
6186   * @param {string} contextTag Tag name.
6187   *
6188   * @return {boolean} True if the node is inline content, false if nohe.
6189   */
6190  
6191  function isInline(node, contextTag) {
6192    if (Object(external_wp_dom_["isTextContent"])(node)) {
6193      return true;
6194    }
6195  
6196    if (!contextTag) {
6197      return false;
6198    }
6199  
6200    const tag = node.nodeName.toLowerCase();
6201    const inlineAllowedTagGroups = [['ul', 'li', 'ol'], ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']];
6202    return inlineAllowedTagGroups.some(tagGroup => Object(external_lodash_["difference"])([tag, contextTag], tagGroup).length === 0);
6203  }
6204  
6205  function deepCheck(nodes, contextTag) {
6206    return nodes.every(node => isInline(node, contextTag) && deepCheck(Array.from(node.children), contextTag));
6207  }
6208  
6209  function isDoubleBR(node) {
6210    return node.nodeName === 'BR' && node.previousSibling && node.previousSibling.nodeName === 'BR';
6211  }
6212  
6213  function isInlineContent(HTML, contextTag) {
6214    const doc = document.implementation.createHTMLDocument('');
6215    doc.body.innerHTML = HTML;
6216    const nodes = Array.from(doc.body.children);
6217    return !nodes.some(isDoubleBR) && deepCheck(nodes, contextTag);
6218  }
6219  
6220  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/phrasing-content-reducer.js
6221  /**
6222   * External dependencies
6223   */
6224  
6225  /**
6226   * WordPress dependencies
6227   */
6228  
6229  
6230  function phrasingContentReducer(node, doc) {
6231    // In jsdom-jscore, 'node.style' can be null.
6232    // TODO: Explore fixing this by patching jsdom-jscore.
6233    if (node.nodeName === 'SPAN' && node.style) {
6234      const {
6235        fontWeight,
6236        fontStyle,
6237        textDecorationLine,
6238        textDecoration,
6239        verticalAlign
6240      } = node.style;
6241  
6242      if (fontWeight === 'bold' || fontWeight === '700') {
6243        Object(external_wp_dom_["wrap"])(doc.createElement('strong'), node);
6244      }
6245  
6246      if (fontStyle === 'italic') {
6247        Object(external_wp_dom_["wrap"])(doc.createElement('em'), node);
6248      } // Some DOM implementations (Safari, JSDom) don't support
6249      // style.textDecorationLine, so we check style.textDecoration as a
6250      // fallback.
6251  
6252  
6253      if (textDecorationLine === 'line-through' || Object(external_lodash_["includes"])(textDecoration, 'line-through')) {
6254        Object(external_wp_dom_["wrap"])(doc.createElement('s'), node);
6255      }
6256  
6257      if (verticalAlign === 'super') {
6258        Object(external_wp_dom_["wrap"])(doc.createElement('sup'), node);
6259      } else if (verticalAlign === 'sub') {
6260        Object(external_wp_dom_["wrap"])(doc.createElement('sub'), node);
6261      }
6262    } else if (node.nodeName === 'B') {
6263      node = Object(external_wp_dom_["replaceTag"])(node, 'strong');
6264    } else if (node.nodeName === 'I') {
6265      node = Object(external_wp_dom_["replaceTag"])(node, 'em');
6266    } else if (node.nodeName === 'A') {
6267      // In jsdom-jscore, 'node.target' can be null.
6268      // TODO: Explore fixing this by patching jsdom-jscore.
6269      if (node.target && node.target.toLowerCase() === '_blank') {
6270        node.rel = 'noreferrer noopener';
6271      } else {
6272        node.removeAttribute('target');
6273        node.removeAttribute('rel');
6274      } // Saves anchor elements name attribute as id
6275  
6276  
6277      if (node.name && !node.id) {
6278        node.id = node.name;
6279      } // Keeps id only if there is an internal link pointing to it
6280  
6281  
6282      if (node.id && !node.ownerDocument.querySelector(`[href="#$node.id}"]`)) {
6283        node.removeAttribute('id');
6284      }
6285    }
6286  }
6287  
6288  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/head-remover.js
6289  function headRemover(node) {
6290    if (node.nodeName !== 'SCRIPT' && node.nodeName !== 'NOSCRIPT' && node.nodeName !== 'TEMPLATE' && node.nodeName !== 'STYLE') {
6291      return;
6292    }
6293  
6294    node.parentNode.removeChild(node);
6295  }
6296  
6297  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/ms-list-converter.js
6298  /**
6299   * Browser dependencies
6300   */
6301  const {
6302    parseInt: ms_list_converter_parseInt
6303  } = window;
6304  
6305  function isList(node) {
6306    return node.nodeName === 'OL' || node.nodeName === 'UL';
6307  }
6308  
6309  function msListConverter(node, doc) {
6310    if (node.nodeName !== 'P') {
6311      return;
6312    }
6313  
6314    const style = node.getAttribute('style');
6315  
6316    if (!style) {
6317      return;
6318    } // Quick check.
6319  
6320  
6321    if (style.indexOf('mso-list') === -1) {
6322      return;
6323    }
6324  
6325    const matches = /mso-list\s*:[^;]+level([0-9]+)/i.exec(style);
6326  
6327    if (!matches) {
6328      return;
6329    }
6330  
6331    let level = ms_list_converter_parseInt(matches[1], 10) - 1 || 0;
6332    const prevNode = node.previousElementSibling; // Add new list if no previous.
6333  
6334    if (!prevNode || !isList(prevNode)) {
6335      // See https://html.spec.whatwg.org/multipage/grouping-content.html#attr-ol-type.
6336      const type = node.textContent.trim().slice(0, 1);
6337      const isNumeric = /[1iIaA]/.test(type);
6338      const newListNode = doc.createElement(isNumeric ? 'ol' : 'ul');
6339  
6340      if (isNumeric) {
6341        newListNode.setAttribute('type', type);
6342      }
6343  
6344      node.parentNode.insertBefore(newListNode, node);
6345    }
6346  
6347    const listNode = node.previousElementSibling;
6348    const listType = listNode.nodeName;
6349    const listItem = doc.createElement('li');
6350    let receivingNode = listNode; // Remove the first span with list info.
6351  
6352    node.removeChild(node.firstElementChild); // Add content.
6353  
6354    while (node.firstChild) {
6355      listItem.appendChild(node.firstChild);
6356    } // Change pointer depending on indentation level.
6357  
6358  
6359    while (level--) {
6360      receivingNode = receivingNode.lastElementChild || receivingNode; // If it's a list, move pointer to the last item.
6361  
6362      if (isList(receivingNode)) {
6363        receivingNode = receivingNode.lastElementChild || receivingNode;
6364      }
6365    } // Make sure we append to a list.
6366  
6367  
6368    if (!isList(receivingNode)) {
6369      receivingNode = receivingNode.appendChild(doc.createElement(listType));
6370    } // Append the list item to the list.
6371  
6372  
6373    receivingNode.appendChild(listItem); // Remove the wrapper paragraph.
6374  
6375    node.parentNode.removeChild(node);
6376  }
6377  
6378  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/list-reducer.js
6379  /**
6380   * WordPress dependencies
6381   */
6382  
6383  
6384  function list_reducer_isList(node) {
6385    return node.nodeName === 'OL' || node.nodeName === 'UL';
6386  }
6387  
6388  function shallowTextContent(element) {
6389    return Array.from(element.childNodes).map(_ref => {
6390      let {
6391        nodeValue = ''
6392      } = _ref;
6393      return nodeValue;
6394    }).join('');
6395  }
6396  
6397  function listReducer(node) {
6398    if (!list_reducer_isList(node)) {
6399      return;
6400    }
6401  
6402    const list = node;
6403    const prevElement = node.previousElementSibling; // Merge with previous list if:
6404    // * There is a previous list of the same type.
6405    // * There is only one list item.
6406  
6407    if (prevElement && prevElement.nodeName === node.nodeName && list.children.length === 1) {
6408      // Move all child nodes, including any text nodes, if any.
6409      while (list.firstChild) {
6410        prevElement.appendChild(list.firstChild);
6411      }
6412  
6413      list.parentNode.removeChild(list);
6414    }
6415  
6416    const parentElement = node.parentNode; // Nested list with empty parent item.
6417  
6418    if (parentElement && parentElement.nodeName === 'LI' && parentElement.children.length === 1 && !/\S/.test(shallowTextContent(parentElement))) {
6419      const parentListItem = parentElement;
6420      const prevListItem = parentListItem.previousElementSibling;
6421      const parentList = parentListItem.parentNode;
6422  
6423      if (prevListItem) {
6424        prevListItem.appendChild(list);
6425        parentList.removeChild(parentListItem);
6426      } else {
6427        parentList.parentNode.insertBefore(list, parentList);
6428        parentList.parentNode.removeChild(parentList);
6429      }
6430    } // Invalid: OL/UL > OL/UL.
6431  
6432  
6433    if (parentElement && list_reducer_isList(parentElement)) {
6434      const prevListItem = node.previousElementSibling;
6435  
6436      if (prevListItem) {
6437        prevListItem.appendChild(node);
6438      } else {
6439        Object(external_wp_dom_["unwrap"])(node);
6440      }
6441    }
6442  }
6443  
6444  // EXTERNAL MODULE: external ["wp","blob"]
6445  var external_wp_blob_ = __webpack_require__("xTGt");
6446  
6447  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/image-corrector.js
6448  /**
6449   * WordPress dependencies
6450   */
6451  
6452  /**
6453   * Browser dependencies
6454   */
6455  
6456  const {
6457    atob,
6458    File
6459  } = window;
6460  function imageCorrector(node) {
6461    if (node.nodeName !== 'IMG') {
6462      return;
6463    }
6464  
6465    if (node.src.indexOf('file:') === 0) {
6466      node.src = '';
6467    } // This piece cannot be tested outside a browser env.
6468  
6469  
6470    if (node.src.indexOf('data:') === 0) {
6471      const [properties, data] = node.src.split(',');
6472      const [type] = properties.slice(5).split(';');
6473  
6474      if (!data || !type) {
6475        node.src = '';
6476        return;
6477      }
6478  
6479      let decoded; // Can throw DOMException!
6480  
6481      try {
6482        decoded = atob(data);
6483      } catch (e) {
6484        node.src = '';
6485        return;
6486      }
6487  
6488      const uint8Array = new Uint8Array(decoded.length);
6489  
6490      for (let i = 0; i < uint8Array.length; i++) {
6491        uint8Array[i] = decoded.charCodeAt(i);
6492      }
6493  
6494      const name = type.replace('/', '.');
6495      const file = new File([uint8Array], name, {
6496        type
6497      });
6498      node.src = Object(external_wp_blob_["createBlobURL"])(file);
6499    } // Remove trackers and hardly visible images.
6500  
6501  
6502    if (node.height === 1 || node.width === 1) {
6503      node.parentNode.removeChild(node);
6504    }
6505  }
6506  
6507  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/blockquote-normaliser.js
6508  /**
6509   * Internal dependencies
6510   */
6511  
6512  function blockquoteNormaliser(node) {
6513    if (node.nodeName !== 'BLOCKQUOTE') {
6514      return;
6515    }
6516  
6517    node.innerHTML = normaliseBlocks(node.innerHTML);
6518  }
6519  
6520  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/figure-content-reducer.js
6521  /**
6522   * External dependencies
6523   */
6524  
6525  /**
6526   * WordPress dependencies
6527   */
6528  
6529  
6530  /**
6531   * Whether or not the given node is figure content.
6532   *
6533   * @param {Node}   node   The node to check.
6534   * @param {Object} schema The schema to use.
6535   *
6536   * @return {boolean} True if figure content, false if not.
6537   */
6538  
6539  function isFigureContent(node, schema) {
6540    const tag = node.nodeName.toLowerCase(); // We are looking for tags that can be a child of the figure tag, excluding
6541    // `figcaption` and any phrasing content.
6542  
6543    if (tag === 'figcaption' || Object(external_wp_dom_["isTextContent"])(node)) {
6544      return false;
6545    }
6546  
6547    return Object(external_lodash_["has"])(schema, ['figure', 'children', tag]);
6548  }
6549  /**
6550   * Whether or not the given node can have an anchor.
6551   *
6552   * @param {Node}   node   The node to check.
6553   * @param {Object} schema The schema to use.
6554   *
6555   * @return {boolean} True if it can, false if not.
6556   */
6557  
6558  
6559  function canHaveAnchor(node, schema) {
6560    const tag = node.nodeName.toLowerCase();
6561    return Object(external_lodash_["has"])(schema, ['figure', 'children', 'a', 'children', tag]);
6562  }
6563  /**
6564   * Wraps the given element in a figure element.
6565   *
6566   * @param {Element} element       The element to wrap.
6567   * @param {Element} beforeElement The element before which to place the figure.
6568   */
6569  
6570  
6571  function wrapFigureContent(element) {
6572    let beforeElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : element;
6573    const figure = element.ownerDocument.createElement('figure');
6574    beforeElement.parentNode.insertBefore(figure, beforeElement);
6575    figure.appendChild(element);
6576  }
6577  /**
6578   * This filter takes figure content out of paragraphs, wraps it in a figure
6579   * element, and moves any anchors with it if needed.
6580   *
6581   * @param {Node}     node   The node to filter.
6582   * @param {Document} doc    The document of the node.
6583   * @param {Object}   schema The schema to use.
6584   *
6585   * @return {void}
6586   */
6587  
6588  
6589  function figureContentReducer(node, doc, schema) {
6590    if (!isFigureContent(node, schema)) {
6591      return;
6592    }
6593  
6594    let nodeToInsert = node;
6595    const parentNode = node.parentNode; // If the figure content can have an anchor and its parent is an anchor with
6596    // only the figure content, take the anchor out instead of just the content.
6597  
6598    if (canHaveAnchor(node, schema) && parentNode.nodeName === 'A' && parentNode.childNodes.length === 1) {
6599      nodeToInsert = node.parentNode;
6600    }
6601  
6602    const wrapper = nodeToInsert.closest('p,div'); // If wrapped in a paragraph or div, only extract if it's aligned or if
6603    // there is no text content.
6604    // Otherwise, if directly at the root, wrap in a figure element.
6605  
6606    if (wrapper) {
6607      // In jsdom-jscore, 'node.classList' can be undefined.
6608      // In this case, default to extract as it offers a better UI experience on mobile.
6609      if (!node.classList) {
6610        wrapFigureContent(nodeToInsert, wrapper);
6611      } else if (node.classList.contains('alignright') || node.classList.contains('alignleft') || node.classList.contains('aligncenter') || !wrapper.textContent.trim()) {
6612        wrapFigureContent(nodeToInsert, wrapper);
6613      }
6614    } else if (nodeToInsert.parentNode.nodeName === 'BODY') {
6615      wrapFigureContent(nodeToInsert);
6616    }
6617  }
6618  
6619  // EXTERNAL MODULE: external ["wp","shortcode"]
6620  var external_wp_shortcode_ = __webpack_require__("SVSp");
6621  
6622  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/shortcode-converter.js
6623  /**
6624   * External dependencies
6625   */
6626  
6627  /**
6628   * WordPress dependencies
6629   */
6630  
6631  
6632  /**
6633   * Internal dependencies
6634   */
6635  
6636  
6637  
6638  
6639  
6640  
6641  function segmentHTMLToShortcodeBlock(HTML) {
6642    let lastIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
6643    let excludedBlockNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
6644    // Get all matches.
6645    const transformsFrom = getBlockTransforms('from');
6646    const transformation = findTransform(transformsFrom, transform => excludedBlockNames.indexOf(transform.blockName) === -1 && transform.type === 'shortcode' && Object(external_lodash_["some"])(Object(external_lodash_["castArray"])(transform.tag), tag => Object(external_wp_shortcode_["regexp"])(tag).test(HTML)));
6647  
6648    if (!transformation) {
6649      return [HTML];
6650    }
6651  
6652    const transformTags = Object(external_lodash_["castArray"])(transformation.tag);
6653    const transformTag = Object(external_lodash_["find"])(transformTags, tag => Object(external_wp_shortcode_["regexp"])(tag).test(HTML));
6654    let match;
6655    const previousIndex = lastIndex;
6656  
6657    if (match = Object(external_wp_shortcode_["next"])(transformTag, HTML, lastIndex)) {
6658      lastIndex = match.index + match.content.length;
6659      const beforeHTML = HTML.substr(0, match.index);
6660      const afterHTML = HTML.substr(lastIndex); // If the shortcode content does not contain HTML and the shortcode is
6661      // not on a new line (or in paragraph from Markdown converter),
6662      // consider the shortcode as inline text, and thus skip conversion for
6663      // this segment.
6664  
6665      if (!Object(external_lodash_["includes"])(match.shortcode.content || '', '<') && !(/(\n|<p>)\s*$/.test(beforeHTML) && /^\s*(\n|<\/p>)/.test(afterHTML))) {
6666        return segmentHTMLToShortcodeBlock(HTML, lastIndex);
6667      } // If a transformation's `isMatch` predicate fails for the inbound
6668      // shortcode, try again by excluding the current block type.
6669      //
6670      // This is the only call to `segmentHTMLToShortcodeBlock` that should
6671      // ever carry over `excludedBlockNames`. Other calls in the module
6672      // should skip that argument as a way to reset the exclusion state, so
6673      // that one `isMatch` fail in an HTML fragment doesn't prevent any
6674      // valid matches in subsequent fragments.
6675  
6676  
6677      if (transformation.isMatch && !transformation.isMatch(match.shortcode.attrs)) {
6678        return segmentHTMLToShortcodeBlock(HTML, previousIndex, [...excludedBlockNames, transformation.blockName]);
6679      }
6680  
6681      const attributes = Object(external_lodash_["mapValues"])(Object(external_lodash_["pickBy"])(transformation.attributes, schema => schema.shortcode), // Passing all of `match` as second argument is intentionally broad
6682      // but shouldn't be too relied upon.
6683      //
6684      // See: https://github.com/WordPress/gutenberg/pull/3610#discussion_r152546926
6685      schema => schema.shortcode(match.shortcode.attrs, match));
6686      const transformationBlockType = { ...registration_getBlockType(transformation.blockName),
6687        attributes: transformation.attributes
6688      };
6689      let block = createBlock(transformation.blockName, getBlockAttributes(transformationBlockType, match.shortcode.content, attributes));
6690      block.originalContent = match.shortcode.content; // Applying the built-in fixes can enhance the attributes with missing content like "className".
6691  
6692      block = applyBuiltInValidationFixes(block, transformationBlockType);
6693      return [...segmentHTMLToShortcodeBlock(beforeHTML), block, ...segmentHTMLToShortcodeBlock(afterHTML)];
6694    }
6695  
6696    return [HTML];
6697  }
6698  
6699  /* harmony default export */ var shortcode_converter = (segmentHTMLToShortcodeBlock);
6700  
6701  // EXTERNAL MODULE: ./node_modules/showdown/dist/showdown.js
6702  var showdown = __webpack_require__("M55E");
6703  var showdown_default = /*#__PURE__*/__webpack_require__.n(showdown);
6704  
6705  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/markdown-converter.js
6706  /**
6707   * External dependencies
6708   */
6709   // Reuse the same showdown converter.
6710  
6711  const converter = new showdown_default.a.Converter({
6712    noHeaderId: true,
6713    tables: true,
6714    literalMidWordUnderscores: true,
6715    omitExtraWLInCodeBlocks: true,
6716    simpleLineBreaks: true,
6717    strikethrough: true
6718  });
6719  /**
6720   * Corrects the Slack Markdown variant of the code block.
6721   * If uncorrected, it will be converted to inline code.
6722   *
6723   * @see https://get.slack.help/hc/en-us/articles/202288908-how-can-i-add-formatting-to-my-messages-#code-blocks
6724   *
6725   * @param {string} text The potential Markdown text to correct.
6726   *
6727   * @return {string} The corrected Markdown.
6728   */
6729  
6730  function slackMarkdownVariantCorrector(text) {
6731    return text.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/, (match, p1, p2, p3) => `$p1}\n$p2}\n$p3}`);
6732  }
6733  /**
6734   * Converts a piece of text into HTML based on any Markdown present.
6735   * Also decodes any encoded HTML.
6736   *
6737   * @param {string} text The plain text to convert.
6738   *
6739   * @return {string} HTML.
6740   */
6741  
6742  
6743  function markdownConverter(text) {
6744    return converter.makeHtml(slackMarkdownVariantCorrector(text));
6745  }
6746  
6747  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/iframe-remover.js
6748  /**
6749   * Removes iframes.
6750   *
6751   * @param {Node} node The node to check.
6752   *
6753   * @return {void}
6754   */
6755  function iframeRemover(node) {
6756    if (node.nodeName === 'IFRAME') {
6757      const text = node.ownerDocument.createTextNode(node.src);
6758      node.parentNode.replaceChild(text, node);
6759    }
6760  }
6761  
6762  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/google-docs-uid-remover.js
6763  /**
6764   * WordPress dependencies
6765   */
6766  
6767  function googleDocsUIdRemover(node) {
6768    if (!node.id || node.id.indexOf('docs-internal-guid-') !== 0) {
6769      return;
6770    }
6771  
6772    Object(external_wp_dom_["unwrap"])(node);
6773  }
6774  
6775  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/utils.js
6776  /**
6777   * External dependencies
6778   */
6779  
6780  /**
6781   * WordPress dependencies
6782   */
6783  
6784  
6785  /**
6786   * Internal dependencies
6787   */
6788  
6789  
6790  
6791  function getBlockContentSchemaFromTransforms(transforms, context) {
6792    const phrasingContentSchema = Object(external_wp_dom_["getPhrasingContentSchema"])(context);
6793    const schemaArgs = {
6794      phrasingContentSchema,
6795      isPaste: context === 'paste'
6796    };
6797    const schemas = transforms.map(_ref => {
6798      let {
6799        isMatch,
6800        blockName,
6801        schema
6802      } = _ref;
6803      const hasAnchorSupport = registration_hasBlockSupport(blockName, 'anchor');
6804      schema = Object(external_lodash_["isFunction"])(schema) ? schema(schemaArgs) : schema; // If the block does not has anchor support and the transform does not
6805      // provides an isMatch we can return the schema right away.
6806  
6807      if (!hasAnchorSupport && !isMatch) {
6808        return schema;
6809      }
6810  
6811      return Object(external_lodash_["mapValues"])(schema, value => {
6812        let attributes = value.attributes || []; // If the block supports the "anchor" functionality, it needs to keep its ID attribute.
6813  
6814        if (hasAnchorSupport) {
6815          attributes = [...attributes, 'id'];
6816        }
6817  
6818        return { ...value,
6819          attributes,
6820          isMatch: isMatch ? isMatch : undefined
6821        };
6822      });
6823    });
6824    return Object(external_lodash_["mergeWith"])({}, ...schemas, (objValue, srcValue, key) => {
6825      switch (key) {
6826        case 'children':
6827          {
6828            if (objValue === '*' || srcValue === '*') {
6829              return '*';
6830            }
6831  
6832            return { ...objValue,
6833              ...srcValue
6834            };
6835          }
6836  
6837        case 'attributes':
6838        case 'require':
6839          {
6840            return [...(objValue || []), ...(srcValue || [])];
6841          }
6842  
6843        case 'isMatch':
6844          {
6845            // If one of the values being merge is undefined (matches everything),
6846            // the result of the merge will be undefined.
6847            if (!objValue || !srcValue) {
6848              return undefined;
6849            } // When merging two isMatch functions, the result is a new function
6850            // that returns if one of the source functions returns true.
6851  
6852  
6853            return function () {
6854              return objValue(...arguments) || srcValue(...arguments);
6855            };
6856          }
6857      }
6858    });
6859  }
6860  /**
6861   * Gets the block content schema, which is extracted and merged from all
6862   * registered blocks with raw transfroms.
6863   *
6864   * @param {string} context Set to "paste" when in paste context, where the
6865   *                         schema is more strict.
6866   *
6867   * @return {Object} A complete block content schema.
6868   */
6869  
6870  function getBlockContentSchema(context) {
6871    return getBlockContentSchemaFromTransforms(getRawTransforms(), context);
6872  }
6873  /**
6874   * Checks whether HTML can be considered plain text. That is, it does not contain
6875   * any elements that are not line breaks.
6876   *
6877   * @param {string} HTML The HTML to check.
6878   *
6879   * @return {boolean} Whether the HTML can be considered plain text.
6880   */
6881  
6882  function isPlain(HTML) {
6883    return !/<(?!br[ />])/i.test(HTML);
6884  }
6885  /**
6886   * Given node filters, deeply filters and mutates a NodeList.
6887   *
6888   * @param {NodeList} nodeList The nodeList to filter.
6889   * @param {Array}    filters  An array of functions that can mutate with the provided node.
6890   * @param {Document} doc      The document of the nodeList.
6891   * @param {Object}   schema   The schema to use.
6892   */
6893  
6894  function deepFilterNodeList(nodeList, filters, doc, schema) {
6895    Array.from(nodeList).forEach(node => {
6896      deepFilterNodeList(node.childNodes, filters, doc, schema);
6897      filters.forEach(item => {
6898        // Make sure the node is still attached to the document.
6899        if (!doc.contains(node)) {
6900          return;
6901        }
6902  
6903        item(node, doc, schema);
6904      });
6905    });
6906  }
6907  /**
6908   * Given node filters, deeply filters HTML tags.
6909   * Filters from the deepest nodes to the top.
6910   *
6911   * @param {string} HTML    The HTML to filter.
6912   * @param {Array}  filters An array of functions that can mutate with the provided node.
6913   * @param {Object} schema  The schema to use.
6914   *
6915   * @return {string} The filtered HTML.
6916   */
6917  
6918  function deepFilterHTML(HTML) {
6919    let filters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
6920    let schema = arguments.length > 2 ? arguments[2] : undefined;
6921    const doc = document.implementation.createHTMLDocument('');
6922    doc.body.innerHTML = HTML;
6923    deepFilterNodeList(doc.body.childNodes, filters, doc, schema);
6924    return doc.body.innerHTML;
6925  }
6926  /**
6927   * Gets a sibling within text-level context.
6928   *
6929   * @param {Element} node  The subject node.
6930   * @param {string}  which "next" or "previous".
6931   */
6932  
6933  function getSibling(node, which) {
6934    const sibling = node[`$which}Sibling`];
6935  
6936    if (sibling && Object(external_wp_dom_["isPhrasingContent"])(sibling)) {
6937      return sibling;
6938    }
6939  
6940    const {
6941      parentNode
6942    } = node;
6943  
6944    if (!parentNode || !Object(external_wp_dom_["isPhrasingContent"])(parentNode)) {
6945      return;
6946    }
6947  
6948    return getSibling(parentNode, which);
6949  }
6950  
6951  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/html-formatting-remover.js
6952  /**
6953   * Internal dependencies
6954   */
6955  
6956  
6957  function isFormattingSpace(character) {
6958    return character === ' ' || character === '\r' || character === '\n' || character === '\t';
6959  }
6960  /**
6961   * Removes spacing that formats HTML.
6962   *
6963   * @see https://www.w3.org/TR/css-text-3/#white-space-processing
6964   *
6965   * @param {Node} node The node to be processed.
6966   * @return {void}
6967   */
6968  
6969  
6970  function htmlFormattingRemover(node) {
6971    if (node.nodeType !== node.TEXT_NODE) {
6972      return;
6973    } // Ignore pre content. Note that this does not use Element#closest due to
6974    // a combination of (a) node may not be Element and (b) node.parentElement
6975    // does not have full support in all browsers (Internet Exporer).
6976    //
6977    // See: https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement#Browser_compatibility
6978  
6979    /** @type {Node?} */
6980  
6981  
6982    let parent = node;
6983  
6984    while (parent = parent.parentNode) {
6985      if (parent.nodeType === parent.ELEMENT_NODE && parent.nodeName === 'PRE') {
6986        return;
6987      }
6988    } // First, replace any sequence of HTML formatting space with a single space.
6989  
6990  
6991    let newData = node.data.replace(/[ \r\n\t]+/g, ' '); // Remove the leading space if the text element is at the start of a block,
6992    // is preceded by a line break element, or has a space in the previous
6993    // node.
6994  
6995    if (newData[0] === ' ') {
6996      const previousSibling = getSibling(node, 'previous');
6997  
6998      if (!previousSibling || previousSibling.nodeName === 'BR' || previousSibling.textContent.slice(-1) === ' ') {
6999        newData = newData.slice(1);
7000      }
7001    } // Remove the trailing space if the text element is at the end of a block,
7002    // is succeded by a line break element, or has a space in the next text
7003    // node.
7004  
7005  
7006    if (newData[newData.length - 1] === ' ') {
7007      const nextSibling = getSibling(node, 'next');
7008  
7009      if (!nextSibling || nextSibling.nodeName === 'BR' || nextSibling.nodeType === nextSibling.TEXT_NODE && isFormattingSpace(nextSibling.textContent[0])) {
7010        newData = newData.slice(0, -1);
7011      }
7012    } // If there's no data left, remove the node, so `previousSibling` stays
7013    // accurate. Otherwise, update the node data.
7014  
7015  
7016    if (!newData) {
7017      node.parentNode.removeChild(node);
7018    } else {
7019      node.data = newData;
7020    }
7021  }
7022  
7023  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/br-remover.js
7024  /**
7025   * Internal dependencies
7026   */
7027  
7028  /**
7029   * Removes trailing br elements from text-level content.
7030   *
7031   * @param {Element} node Node to check.
7032   */
7033  
7034  function brRemover(node) {
7035    if (node.nodeName !== 'BR') {
7036      return;
7037    }
7038  
7039    if (getSibling(node, 'next')) {
7040      return;
7041    }
7042  
7043    node.parentNode.removeChild(node);
7044  }
7045  
7046  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/empty-paragraph-remover.js
7047  /**
7048   * Removes empty paragraph elements.
7049   *
7050   * @param {Element} node Node to check.
7051   */
7052  function emptyParagraphRemover(node) {
7053    if (node.nodeName !== 'P') {
7054      return;
7055    }
7056  
7057    if (node.hasChildNodes()) {
7058      return;
7059    }
7060  
7061    node.parentNode.removeChild(node);
7062  }
7063  
7064  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/paste-handler.js
7065  /**
7066   * External dependencies
7067   */
7068  
7069  /**
7070   * WordPress dependencies
7071   */
7072  
7073  
7074  /**
7075   * Internal dependencies
7076   */
7077  
7078  
7079  
7080  
7081  
7082  
7083  
7084  
7085  
7086  
7087  
7088  
7089  
7090  
7091  
7092  
7093  
7094  
7095  
7096  
7097  
7098  
7099  
7100  
7101  /**
7102   * Browser dependencies
7103   */
7104  
7105  const {
7106    console: paste_handler_console
7107  } = window;
7108  /**
7109   * Filters HTML to only contain phrasing content.
7110   *
7111   * @param {string}  HTML               The HTML to filter.
7112   * @param {boolean} preserveWhiteSpace Whether or not to preserve consequent white space.
7113   *
7114   * @return {string} HTML only containing phrasing content.
7115   */
7116  
7117  function filterInlineHTML(HTML, preserveWhiteSpace) {
7118    HTML = deepFilterHTML(HTML, [googleDocsUIdRemover, phrasingContentReducer, commentRemover]);
7119    HTML = Object(external_wp_dom_["removeInvalidHTML"])(HTML, Object(external_wp_dom_["getPhrasingContentSchema"])('paste'), {
7120      inline: true
7121    });
7122  
7123    if (!preserveWhiteSpace) {
7124      HTML = deepFilterHTML(HTML, [htmlFormattingRemover, brRemover]);
7125    } // Allows us to ask for this information when we get a report.
7126  
7127  
7128    paste_handler_console.log('Processed inline HTML:\n\n', HTML);
7129    return HTML;
7130  }
7131  /**
7132   * Converts an HTML string to known blocks. Strips everything else.
7133   *
7134   * @param {Object}  options
7135   * @param {string}  [options.HTML]               The HTML to convert.
7136   * @param {string}  [options.plainText]          Plain text version.
7137   * @param {string}  [options.mode]               Handle content as blocks or inline content.
7138   *                                               * 'AUTO': Decide based on the content passed.
7139   *                                               * 'INLINE': Always handle as inline content, and return string.
7140   *                                               * 'BLOCKS': Always handle as blocks, and return array of blocks.
7141   * @param {Array}   [options.tagName]            The tag into which content will be inserted.
7142   * @param {boolean} [options.preserveWhiteSpace] Whether or not to preserve consequent white space.
7143   *
7144   * @return {Array|string} A list of blocks or a string, depending on `handlerMode`.
7145   */
7146  
7147  
7148  function pasteHandler(_ref) {
7149    let {
7150      HTML = '',
7151      plainText = '',
7152      mode = 'AUTO',
7153      tagName,
7154      preserveWhiteSpace
7155    } = _ref;
7156    // First of all, strip any meta tags.
7157    HTML = HTML.replace(/<meta[^>]+>/g, ''); // Strip Windows markers.
7158  
7159    HTML = HTML.replace(/^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i, '');
7160    HTML = HTML.replace(/(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i, ''); // If we detect block delimiters in HTML, parse entirely as blocks.
7161  
7162    if (mode !== 'INLINE') {
7163      // Check plain text if there is no HTML.
7164      const content = HTML ? HTML : plainText;
7165  
7166      if (content.indexOf('<!-- wp:') !== -1) {
7167        return parser_parse(content);
7168      }
7169    } // Normalize unicode to use composed characters.
7170    // This is unsupported in IE 11 but it's a nice-to-have feature, not mandatory.
7171    // Not normalizing the content will only affect older browsers and won't
7172    // entirely break the app.
7173    // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
7174    // See: https://core.trac.wordpress.org/ticket/30130
7175    // See: https://github.com/WordPress/gutenberg/pull/6983#pullrequestreview-125151075
7176  
7177  
7178    if (String.prototype.normalize) {
7179      HTML = HTML.normalize();
7180    } // Parse Markdown (and encoded HTML) if:
7181    // * There is a plain text version.
7182    // * There is no HTML version, or it has no formatting.
7183  
7184  
7185    if (plainText && (!HTML || isPlain(HTML))) {
7186      HTML = plainText; // The markdown converter (Showdown) trims whitespace.
7187  
7188      if (!/^\s+$/.test(plainText)) {
7189        HTML = markdownConverter(HTML);
7190      } // Switch to inline mode if:
7191      // * The current mode is AUTO.
7192      // * The original plain text had no line breaks.
7193      // * The original plain text was not an HTML paragraph.
7194      // * The converted text is just a paragraph.
7195  
7196  
7197      if (mode === 'AUTO' && plainText.indexOf('\n') === -1 && plainText.indexOf('<p>') !== 0 && HTML.indexOf('<p>') === 0) {
7198        mode = 'INLINE';
7199      }
7200    }
7201  
7202    if (mode === 'INLINE') {
7203      return filterInlineHTML(HTML, preserveWhiteSpace);
7204    } // An array of HTML strings and block objects. The blocks replace matched
7205    // shortcodes.
7206  
7207  
7208    const pieces = shortcode_converter(HTML); // The call to shortcodeConverter will always return more than one element
7209    // if shortcodes are matched. The reason is when shortcodes are matched
7210    // empty HTML strings are included.
7211  
7212    const hasShortcodes = pieces.length > 1;
7213  
7214    if (mode === 'AUTO' && !hasShortcodes && isInlineContent(HTML, tagName)) {
7215      return filterInlineHTML(HTML, preserveWhiteSpace);
7216    }
7217  
7218    const phrasingContentSchema = Object(external_wp_dom_["getPhrasingContentSchema"])('paste');
7219    const blockContentSchema = getBlockContentSchema('paste');
7220    const blocks = Object(external_lodash_["compact"])(Object(external_lodash_["flatMap"])(pieces, piece => {
7221      // Already a block from shortcode.
7222      if (typeof piece !== 'string') {
7223        return piece;
7224      }
7225  
7226      const filters = [googleDocsUIdRemover, msListConverter, headRemover, listReducer, imageCorrector, phrasingContentReducer, specialCommentConverter, commentRemover, iframeRemover, figureContentReducer, blockquoteNormaliser];
7227      const schema = { ...blockContentSchema,
7228        // Keep top-level phrasing content, normalised by `normaliseBlocks`.
7229        ...phrasingContentSchema
7230      };
7231      piece = deepFilterHTML(piece, filters, blockContentSchema);
7232      piece = Object(external_wp_dom_["removeInvalidHTML"])(piece, schema);
7233      piece = normaliseBlocks(piece);
7234      piece = deepFilterHTML(piece, [htmlFormattingRemover, brRemover, emptyParagraphRemover], blockContentSchema); // Allows us to ask for this information when we get a report.
7235  
7236      paste_handler_console.log('Processed HTML piece:\n\n', piece);
7237      return htmlToBlocks(piece);
7238    })); // If we're allowed to return inline content, and there is only one
7239    // inlineable block, and the original plain text content does not have any
7240    // line breaks, then treat it as inline paste.
7241  
7242    if (mode === 'AUTO' && blocks.length === 1 && registration_hasBlockSupport(blocks[0].name, '__unstablePasteTextInline', false)) {
7243      // Don't catch line breaks at the start or end.
7244      const trimmedPlainText = plainText.replace(/^[\n]+|[\n]+$/g, '');
7245  
7246      if (trimmedPlainText !== '' && trimmedPlainText.indexOf('\n') === -1) {
7247        return Object(external_wp_dom_["removeInvalidHTML"])(getBlockInnerHTML(blocks[0]), phrasingContentSchema);
7248      }
7249    }
7250  
7251    return blocks;
7252  }
7253  
7254  // EXTERNAL MODULE: external ["wp","deprecated"]
7255  var external_wp_deprecated_ = __webpack_require__("NMb1");
7256  var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
7257  
7258  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/index.js
7259  /**
7260   * External dependencies
7261   */
7262  
7263  /**
7264   * WordPress dependencies
7265   */
7266  
7267  
7268  
7269  /**
7270   * Internal dependencies
7271   */
7272  
7273  
7274  
7275  
7276  
7277  
7278  
7279  
7280  
7281  
7282  
7283  function deprecatedGetPhrasingContentSchema(context) {
7284    external_wp_deprecated_default()('wp.blocks.getPhrasingContentSchema', {
7285      since: '5.6',
7286      alternative: 'wp.dom.getPhrasingContentSchema'
7287    });
7288    return Object(external_wp_dom_["getPhrasingContentSchema"])(context);
7289  }
7290  /**
7291   * Converts an HTML string to known blocks.
7292   *
7293   * @param {Object} $1
7294   * @param {string} $1.HTML The HTML to convert.
7295   *
7296   * @return {Array} A list of blocks.
7297   */
7298  
7299  function rawHandler(_ref) {
7300    let {
7301      HTML = ''
7302    } = _ref;
7303  
7304    // If we detect block delimiters, parse entirely as blocks.
7305    if (HTML.indexOf('<!-- wp:') !== -1) {
7306      return parser_parse(HTML);
7307    } // An array of HTML strings and block objects. The blocks replace matched
7308    // shortcodes.
7309  
7310  
7311    const pieces = shortcode_converter(HTML);
7312    const blockContentSchema = getBlockContentSchema();
7313    return Object(external_lodash_["compact"])(Object(external_lodash_["flatMap"])(pieces, piece => {
7314      // Already a block from shortcode.
7315      if (typeof piece !== 'string') {
7316        return piece;
7317      } // These filters are essential for some blocks to be able to transform
7318      // from raw HTML. These filters move around some content or add
7319      // additional tags, they do not remove any content.
7320  
7321  
7322      const filters = [// Needed to adjust invalid lists.
7323      listReducer, // Needed to create more and nextpage blocks.
7324      specialCommentConverter, // Needed to create media blocks.
7325      figureContentReducer, // Needed to create the quote block, which cannot handle text
7326      // without wrapper paragraphs.
7327      blockquoteNormaliser];
7328      piece = deepFilterHTML(piece, filters, blockContentSchema);
7329      piece = normaliseBlocks(piece);
7330      return htmlToBlocks(piece);
7331    }));
7332  }
7333  
7334  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/categories.js
7335  /**
7336   * WordPress dependencies
7337   */
7338  
7339  /**
7340   * Internal dependencies
7341   */
7342  
7343  
7344  /** @typedef {import('../store/reducer').WPBlockCategory} WPBlockCategory */
7345  
7346  /**
7347   * Returns all the block categories.
7348   *
7349   * @return {WPBlockCategory[]} Block categories.
7350   */
7351  
7352  function categories_getCategories() {
7353    return Object(external_wp_data_["select"])(store).getCategories();
7354  }
7355  /**
7356   * Sets the block categories.
7357   *
7358   * @param {WPBlockCategory[]} categories Block categories.
7359   */
7360  
7361  function categories_setCategories(categories) {
7362    Object(external_wp_data_["dispatch"])(store).setCategories(categories);
7363  }
7364  /**
7365   * Updates a category.
7366   *
7367   * @param {string}          slug     Block category slug.
7368   * @param {WPBlockCategory} category Object containing the category properties
7369   *                                   that should be updated.
7370   */
7371  
7372  function categories_updateCategory(slug, category) {
7373    Object(external_wp_data_["dispatch"])(store).updateCategory(slug, category);
7374  }
7375  
7376  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/templates.js
7377  /**
7378   * External dependencies
7379   */
7380  
7381  /**
7382   * WordPress dependencies
7383   */
7384  
7385  
7386  /**
7387   * Internal dependencies
7388   */
7389  
7390  
7391  
7392  
7393  /**
7394   * Checks whether a list of blocks matches a template by comparing the block names.
7395   *
7396   * @param {Array} blocks   Block list.
7397   * @param {Array} template Block template.
7398   *
7399   * @return {boolean} Whether the list of blocks matches a templates.
7400   */
7401  
7402  function doBlocksMatchTemplate() {
7403    let blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
7404    let template = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
7405    return blocks.length === template.length && Object(external_lodash_["every"])(template, (_ref, index) => {
7406      let [name,, innerBlocksTemplate] = _ref;
7407      const block = blocks[index];
7408      return name === block.name && doBlocksMatchTemplate(block.innerBlocks, innerBlocksTemplate);
7409    });
7410  }
7411  /**
7412   * Synchronize a block list with a block template.
7413   *
7414   * Synchronizing a block list with a block template means that we loop over the blocks
7415   * keep the block as is if it matches the block at the same position in the template
7416   * (If it has the same name) and if doesn't match, we create a new block based on the template.
7417   * Extra blocks not present in the template are removed.
7418   *
7419   * @param {Array} blocks   Block list.
7420   * @param {Array} template Block template.
7421   *
7422   * @return {Array} Updated Block list.
7423   */
7424  
7425  function synchronizeBlocksWithTemplate() {
7426    let blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
7427    let template = arguments.length > 1 ? arguments[1] : undefined;
7428  
7429    // If no template is provided, return blocks unmodified.
7430    if (!template) {
7431      return blocks;
7432    }
7433  
7434    return Object(external_lodash_["map"])(template, (_ref2, index) => {
7435      let [name, attributes, innerBlocksTemplate] = _ref2;
7436      const block = blocks[index];
7437  
7438      if (block && block.name === name) {
7439        const innerBlocks = synchronizeBlocksWithTemplate(block.innerBlocks, innerBlocksTemplate);
7440        return { ...block,
7441          innerBlocks
7442        };
7443      } // To support old templates that were using the "children" format
7444      // for the attributes using "html" strings now, we normalize the template attributes
7445      // before creating the blocks.
7446  
7447  
7448      const blockType = registration_getBlockType(name);
7449  
7450      const isHTMLAttribute = attributeDefinition => Object(external_lodash_["get"])(attributeDefinition, ['source']) === 'html';
7451  
7452      const isQueryAttribute = attributeDefinition => Object(external_lodash_["get"])(attributeDefinition, ['source']) === 'query';
7453  
7454      const normalizeAttributes = (schema, values) => {
7455        return Object(external_lodash_["mapValues"])(values, (value, key) => {
7456          return normalizeAttribute(schema[key], value);
7457        });
7458      };
7459  
7460      const normalizeAttribute = (definition, value) => {
7461        if (isHTMLAttribute(definition) && Object(external_lodash_["isArray"])(value)) {
7462          // Introduce a deprecated call at this point
7463          // When we're confident that "children" format should be removed from the templates.
7464          return Object(external_wp_element_["renderToString"])(value);
7465        }
7466  
7467        if (isQueryAttribute(definition) && value) {
7468          return value.map(subValues => {
7469            return normalizeAttributes(definition.query, subValues);
7470          });
7471        }
7472  
7473        return value;
7474      };
7475  
7476      const normalizedAttributes = normalizeAttributes(Object(external_lodash_["get"])(blockType, ['attributes'], {}), attributes);
7477      const [blockName, blockAttributes] = convertLegacyBlockNameAndAttributes(name, normalizedAttributes);
7478      return createBlock(blockName, blockAttributes, synchronizeBlocksWithTemplate([], innerBlocksTemplate));
7479    });
7480  }
7481  
7482  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/index.js
7483  // The blocktype is the most important concept within the block API. It defines
7484  // all aspects of the block configuration and its interfaces, including `edit`
7485  // and `save`. The transforms specification allows converting one blocktype to
7486  // another through formulas defined by either the source or the destination.
7487  // Switching a blocktype is to be considered a one-way operation implying a
7488  // transformation in the opposite way has to be handled explicitly.
7489   // The block tree is composed of a collection of block nodes. Blocks contained
7490  // within other blocks are called inner blocks. An important design
7491  // consideration is that inner blocks are -- conceptually -- not part of the
7492  // territory established by the parent block that contains them.
7493  //
7494  // This has multiple practical implications: when parsing, we can safely dispose
7495  // of any block boundary found within a block from the innerHTML property when
7496  // transfering to state. Not doing so would have a compounding effect on memory
7497  // and uncertainty over the source of truth. This can be illustrated in how,
7498  // given a tree of `n` nested blocks, the entry node would have to contain the
7499  // actual content of each block while each subsequent block node in the state
7500  // tree would replicate the entire chain `n-1`, meaning the extreme end node
7501  // would have been replicated `n` times as the tree is traversed and would
7502  // generate uncertainty as to which one is to hold the current value of the
7503  // block. For composition, it also means inner blocks can effectively be child
7504  // components whose mechanisms can be shielded from the `edit` implementation
7505  // and just passed along.
7506  
7507  
7508   // While block transformations account for a specific surface of the API, there
7509  // are also raw transformations which handle arbitrary sources not made out of
7510  // blocks but producing block basaed on various heursitics. This includes
7511  // pasting rich text or HTML data.
7512  
7513   // The process of serialization aims to deflate the internal memory of the block
7514  // editor and its state representation back into an HTML valid string. This
7515  // process restores the document integrity and inserts invisible delimiters
7516  // around each block with HTML comment boundaries which can contain any extra
7517  // attributes needed to operate with the block later on.
7518  
7519   // Validation is the process of comparing a block source with its output before
7520  // there is any user input or interaction with a block. When this operation
7521  // fails -- for whatever reason -- the block is to be considered invalid. As
7522  // part of validating a block the system will attempt to run the source against
7523  // any provided deprecation definitions.
7524  //
7525  // Worth emphasizing that validation is not a case of whether the markup is
7526  // merely HTML spec-compliant but about how the editor knows to create such
7527  // markup and that its inability to create an identical result can be a strong
7528  // indicator of potential data loss (the invalidation is then a protective
7529  // measure).
7530  //
7531  // The invalidation process can also be deconstructed in phases: 1) validate the
7532  // block exists; 2) validate the source matches the output; 3) validate the
7533  // source matches deprecated outputs; 4) work through the significance of
7534  // differences. These are stacked in a way that favors performance and optimizes
7535  // for the majority of cases. That is to say, the evaluation logic can become
7536  // more sophisticated the further down it goes in the process as the cost is
7537  // accounted for. The first logic checks have to be extremely efficient since
7538  // they will be run for all valid and invalid blocks alike. However, once a
7539  // block is detected as invalid -- failing the three first steps -- it is
7540  // adequate to spend more time determining validity before throwing a conflict.
7541  
7542  
7543   // Blocks are inherently indifferent about where the data they operate with ends
7544  // up being saved. For example, all blocks can have a static and dynamic aspect
7545  // to them depending on the needs. The static nature of a block is the `save()`
7546  // definition that is meant to be serialized into HTML and which can be left
7547  // void. Any block can also register a `render_callback` on the server, which
7548  // makes its output dynamic either in part or in its totality.
7549  //
7550  // Child blocks are defined as a relationship that builds on top of the inner
7551  // blocks mechanism. A child block is a block node of a particular type that can
7552  // only exist within the inner block boundaries of a specific parent type. This
7553  // allows block authors to compose specific blocks that are not meant to be used
7554  // outside of a specified parent block context. Thus, child blocks extend the
7555  // concept of inner blocks to support a more direct relationship between sets of
7556  // blocks. The addition of parent–child would be a subset of the inner block
7557  // functionality under the premise that certain blocks only make sense as
7558  // children of another block.
7559  
7560  
7561   // Templates are, in a general sense, a basic collection of block nodes with any
7562  // given set of predefined attributes that are supplied as the initial state of
7563  // an inner blocks group. These nodes can, in turn, contain any number of nested
7564  // blocks within their definition. Templates allow both to specify a default
7565  // state for an editor session or a default set of blocks for any inner block
7566  // implementation within a specific block.
7567  
7568  
7569  
7570  
7571  
7572  
7573  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
7574  var esm_extends = __webpack_require__("wx14");
7575  
7576  // EXTERNAL MODULE: external ["wp","compose"]
7577  var external_wp_compose_ = __webpack_require__("K9lf");
7578  
7579  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/block-content-provider/index.js
7580  
7581  
7582  
7583  /**
7584   * WordPress dependencies
7585   */
7586  
7587  
7588  /**
7589   * Internal dependencies
7590   */
7591  
7592  
7593  const {
7594    Consumer,
7595    Provider
7596  } = Object(external_wp_element_["createContext"])(() => {});
7597  /**
7598   * An internal block component used in block content serialization to inject
7599   * nested block content within the `save` implementation of the ancestor
7600   * component in which it is nested. The component provides a pre-bound
7601   * `BlockContent` component via context, which is used by the developer-facing
7602   * `InnerBlocks.Content` component to render block content.
7603   *
7604   * @example
7605   *
7606   * ```jsx
7607   * <BlockContentProvider innerBlocks={ innerBlocks }>
7608   *     { blockSaveElement }
7609   * </BlockContentProvider>
7610   * ```
7611   *
7612   * @param {Object}    props             Component props.
7613   * @param {WPElement} props.children    Block save result.
7614   * @param {Array}     props.innerBlocks Block(s) to serialize.
7615   *
7616   * @return {WPComponent} Element with BlockContent injected via context.
7617   */
7618  
7619  const BlockContentProvider = _ref => {
7620    let {
7621      children,
7622      innerBlocks
7623    } = _ref;
7624  
7625    const BlockContent = () => {
7626      // Value is an array of blocks, so defer to block serializer
7627      const html = serialize(innerBlocks, {
7628        isInnerBlocks: true
7629      }); // Use special-cased raw HTML tag to avoid default escaping
7630  
7631      return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, html);
7632    };
7633  
7634    return Object(external_wp_element_["createElement"])(Provider, {
7635      value: BlockContent
7636    }, children);
7637  };
7638  /**
7639   * A Higher Order Component used to inject BlockContent using context to the
7640   * wrapped component.
7641   *
7642   * @return {WPComponent} Enhanced component with injected BlockContent as prop.
7643   */
7644  
7645  
7646  const withBlockContentContext = Object(external_wp_compose_["createHigherOrderComponent"])(OriginalComponent => {
7647    return props => Object(external_wp_element_["createElement"])(Consumer, null, context => Object(external_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, props, {
7648      BlockContent: context
7649    })));
7650  }, 'withBlockContentContext');
7651  /* harmony default export */ var block_content_provider = (BlockContentProvider);
7652  
7653  // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/index.js
7654  // A "block" is the abstract term used to describe units of markup that,
7655  // when composed together, form the content or layout of a page.
7656  // The API for blocks is exposed via `wp.blocks`.
7657  //
7658  // Supported blocks are registered by calling `registerBlockType`. Once registered,
7659  // the block is made available as an option to the editor interface.
7660  //
7661  // Blocks are inferred from the HTML source of a post through a parsing mechanism
7662  // and then stored as objects in state, from which it is then rendered for editing.
7663  
7664  
7665  
7666  
7667  
7668  /***/ }),
7669  
7670  /***/ "1CF3":
7671  /***/ (function(module, exports) {
7672  
7673  (function() { module.exports = window["wp"]["dom"]; }());
7674  
7675  /***/ }),
7676  
7677  /***/ "1ZqX":
7678  /***/ (function(module, exports) {
7679  
7680  (function() { module.exports = window["wp"]["data"]; }());
7681  
7682  /***/ }),
7683  
7684  /***/ "7Cbv":
7685  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7686  
7687  "use strict";
7688  
7689  // CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
7690  // Unique ID creation requires a high quality random # generator. In the browser we therefore
7691  // require the crypto API and do not support built-in fallback to lower quality random number
7692  // generators (like Math.random()).
7693  var getRandomValues;
7694  var rnds8 = new Uint8Array(16);
7695  function rng() {
7696    // lazy load so that environments that need to polyfill have a chance to do so
7697    if (!getRandomValues) {
7698      // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
7699      // find the complete implementation of crypto (msCrypto) on IE11.
7700      getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
7701  
7702      if (!getRandomValues) {
7703        throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
7704      }
7705    }
7706  
7707    return getRandomValues(rnds8);
7708  }
7709  // CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js
7710  /* harmony default export */ var regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
7711  // CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js
7712  
7713  
7714  function validate(uuid) {
7715    return typeof uuid === 'string' && regex.test(uuid);
7716  }
7717  
7718  /* harmony default export */ var esm_browser_validate = (validate);
7719  // CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
7720  
7721  /**
7722   * Convert array of 16 byte values to UUID string format of the form:
7723   * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
7724   */
7725  
7726  var byteToHex = [];
7727  
7