[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> block-directory.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["blockDirectory"] =
   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 = 463);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = window["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = window["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 11:
 105  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 106  
 107  "use strict";
 108  
 109  // EXPORTS
 110  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 111  
 112  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 113  var arrayWithHoles = __webpack_require__(38);
 114  
 115  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 116  function _iterableToArrayLimit(arr, i) {
 117    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 118    var _arr = [];
 119    var _n = true;
 120    var _d = false;
 121    var _e = undefined;
 122  
 123    try {
 124      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 125        _arr.push(_s.value);
 126  
 127        if (i && _arr.length === i) break;
 128      }
 129    } catch (err) {
 130      _d = true;
 131      _e = err;
 132    } finally {
 133      try {
 134        if (!_n && _i["return"] != null) _i["return"]();
 135      } finally {
 136        if (_d) throw _e;
 137      }
 138    }
 139  
 140    return _arr;
 141  }
 142  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 143  var unsupportedIterableToArray = __webpack_require__(31);
 144  
 145  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 146  var nonIterableRest = __webpack_require__(39);
 147  
 148  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 149  
 150  
 151  
 152  
 153  function _slicedToArray(arr, i) {
 154    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 155  }
 156  
 157  /***/ }),
 158  
 159  /***/ 12:
 160  /***/ (function(module, exports) {
 161  
 162  (function() { module.exports = window["wp"]["compose"]; }());
 163  
 164  /***/ }),
 165  
 166  /***/ 13:
 167  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 168  
 169  "use strict";
 170  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 171  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
 172  
 173  function _objectWithoutProperties(source, excluded) {
 174    if (source == null) return {};
 175    var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 176    var key, i;
 177  
 178    if (Object.getOwnPropertySymbols) {
 179      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 180  
 181      for (i = 0; i < sourceSymbolKeys.length; i++) {
 182        key = sourceSymbolKeys[i];
 183        if (excluded.indexOf(key) >= 0) continue;
 184        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 185        target[key] = source[key];
 186      }
 187    }
 188  
 189    return target;
 190  }
 191  
 192  /***/ }),
 193  
 194  /***/ 138:
 195  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 196  
 197  "use strict";
 198  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
 199  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
 200  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 201  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 202  
 203  
 204  
 205  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 206  
 207  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 208  
 209  /**
 210   * WordPress dependencies
 211   */
 212  
 213  /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
 214  
 215  /**
 216   * Return an SVG icon.
 217   *
 218   * @param {IconProps} props icon is the SVG component to render
 219   *                          size is a number specifiying the icon size in pixels
 220   *                          Other props will be passed to wrapped SVG component
 221   *
 222   * @return {JSX.Element}  Icon component
 223   */
 224  
 225  function Icon(_ref) {
 226    var icon = _ref.icon,
 227        _ref$size = _ref.size,
 228        size = _ref$size === void 0 ? 24 : _ref$size,
 229        props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]);
 230  
 231    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({
 232      width: size,
 233      height: size
 234    }, props));
 235  }
 236  
 237  /* harmony default export */ __webpack_exports__["a"] = (Icon);
 238  
 239  
 240  /***/ }),
 241  
 242  /***/ 15:
 243  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 244  
 245  "use strict";
 246  
 247  // EXPORTS
 248  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 249  
 250  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 251  var arrayLikeToArray = __webpack_require__(24);
 252  
 253  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 254  
 255  function _arrayWithoutHoles(arr) {
 256    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 257  }
 258  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 259  var iterableToArray = __webpack_require__(37);
 260  
 261  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 262  var unsupportedIterableToArray = __webpack_require__(31);
 263  
 264  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 265  function _nonIterableSpread() {
 266    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 267  }
 268  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 269  
 270  
 271  
 272  
 273  function _toConsumableArray(arr) {
 274    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 275  }
 276  
 277  /***/ }),
 278  
 279  /***/ 16:
 280  /***/ (function(module, exports) {
 281  
 282  (function() { module.exports = window["regeneratorRuntime"]; }());
 283  
 284  /***/ }),
 285  
 286  /***/ 2:
 287  /***/ (function(module, exports) {
 288  
 289  (function() { module.exports = window["lodash"]; }());
 290  
 291  /***/ }),
 292  
 293  /***/ 215:
 294  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 295  
 296  "use strict";
 297  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 298  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 299  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 300  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 301  
 302  
 303  /**
 304   * WordPress dependencies
 305   */
 306  
 307  var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 308    xmlns: "http://www.w3.org/2000/svg",
 309    viewBox: "0 0 24 24"
 310  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 311    d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
 312  }));
 313  /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
 314  
 315  
 316  /***/ }),
 317  
 318  /***/ 24:
 319  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 320  
 321  "use strict";
 322  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 323  function _arrayLikeToArray(arr, len) {
 324    if (len == null || len > arr.length) len = arr.length;
 325  
 326    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 327      arr2[i] = arr[i];
 328    }
 329  
 330    return arr2;
 331  }
 332  
 333  /***/ }),
 334  
 335  /***/ 278:
 336  /***/ (function(module, exports) {
 337  
 338  (function() { module.exports = window["wp"]["editPost"]; }());
 339  
 340  /***/ }),
 341  
 342  /***/ 3:
 343  /***/ (function(module, exports) {
 344  
 345  (function() { module.exports = window["wp"]["components"]; }());
 346  
 347  /***/ }),
 348  
 349  /***/ 303:
 350  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 351  
 352  "use strict";
 353  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 354  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 355  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 356  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 357  
 358  
 359  /**
 360   * WordPress dependencies
 361   */
 362  
 363  var starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 364    xmlns: "http://www.w3.org/2000/svg",
 365    viewBox: "0 0 24 24"
 366  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 367    d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
 368  }));
 369  /* harmony default export */ __webpack_exports__["a"] = (starFilled);
 370  
 371  
 372  /***/ }),
 373  
 374  /***/ 304:
 375  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 376  
 377  "use strict";
 378  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 379  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 380  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 381  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 382  
 383  
 384  /**
 385   * WordPress dependencies
 386   */
 387  
 388  var starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 389    xmlns: "http://www.w3.org/2000/svg",
 390    viewBox: "0 0 24 24"
 391  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 392    fillRule: "evenodd",
 393    d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",
 394    clipRule: "evenodd"
 395  }));
 396  /* harmony default export */ __webpack_exports__["a"] = (starEmpty);
 397  
 398  
 399  /***/ }),
 400  
 401  /***/ 31:
 402  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 403  
 404  "use strict";
 405  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
 406  /* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
 407  
 408  function _unsupportedIterableToArray(o, minLen) {
 409    if (!o) return;
 410    if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 411    var n = Object.prototype.toString.call(o).slice(8, -1);
 412    if (n === "Object" && o.constructor) n = o.constructor.name;
 413    if (n === "Map" || n === "Set") return Array.from(o);
 414    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 415  }
 416  
 417  /***/ }),
 418  
 419  /***/ 33:
 420  /***/ (function(module, exports) {
 421  
 422  (function() { module.exports = window["wp"]["hooks"]; }());
 423  
 424  /***/ }),
 425  
 426  /***/ 37:
 427  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 428  
 429  "use strict";
 430  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 431  function _iterableToArray(iter) {
 432    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
 433  }
 434  
 435  /***/ }),
 436  
 437  /***/ 38:
 438  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 439  
 440  "use strict";
 441  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 442  function _arrayWithHoles(arr) {
 443    if (Array.isArray(arr)) return arr;
 444  }
 445  
 446  /***/ }),
 447  
 448  /***/ 39:
 449  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 450  
 451  "use strict";
 452  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 453  function _nonIterableRest() {
 454    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 455  }
 456  
 457  /***/ }),
 458  
 459  /***/ 4:
 460  /***/ (function(module, exports) {
 461  
 462  (function() { module.exports = window["wp"]["data"]; }());
 463  
 464  /***/ }),
 465  
 466  /***/ 44:
 467  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 468  
 469  "use strict";
 470  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 471  function _objectWithoutPropertiesLoose(source, excluded) {
 472    if (source == null) return {};
 473    var target = {};
 474    var sourceKeys = Object.keys(source);
 475    var key, i;
 476  
 477    for (i = 0; i < sourceKeys.length; i++) {
 478      key = sourceKeys[i];
 479      if (excluded.indexOf(key) >= 0) continue;
 480      target[key] = source[key];
 481    }
 482  
 483    return target;
 484  }
 485  
 486  /***/ }),
 487  
 488  /***/ 463:
 489  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 490  
 491  "use strict";
 492  // ESM COMPAT FLAG
 493  __webpack_require__.r(__webpack_exports__);
 494  
 495  // EXPORTS
 496  __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
 497  
 498  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
 499  var selectors_namespaceObject = {};
 500  __webpack_require__.r(selectors_namespaceObject);
 501  __webpack_require__.d(selectors_namespaceObject, "isRequestingDownloadableBlocks", function() { return selectors_isRequestingDownloadableBlocks; });
 502  __webpack_require__.d(selectors_namespaceObject, "getDownloadableBlocks", function() { return selectors_getDownloadableBlocks; });
 503  __webpack_require__.d(selectors_namespaceObject, "getInstalledBlockTypes", function() { return getInstalledBlockTypes; });
 504  __webpack_require__.d(selectors_namespaceObject, "getNewBlockTypes", function() { return getNewBlockTypes; });
 505  __webpack_require__.d(selectors_namespaceObject, "getUnusedBlockTypes", function() { return getUnusedBlockTypes; });
 506  __webpack_require__.d(selectors_namespaceObject, "isInstalling", function() { return selectors_isInstalling; });
 507  __webpack_require__.d(selectors_namespaceObject, "getErrorNotices", function() { return getErrorNotices; });
 508  __webpack_require__.d(selectors_namespaceObject, "getErrorNoticeForBlock", function() { return selectors_getErrorNoticeForBlock; });
 509  
 510  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
 511  var actions_namespaceObject = {};
 512  __webpack_require__.r(actions_namespaceObject);
 513  __webpack_require__.d(actions_namespaceObject, "fetchDownloadableBlocks", function() { return fetchDownloadableBlocks; });
 514  __webpack_require__.d(actions_namespaceObject, "receiveDownloadableBlocks", function() { return receiveDownloadableBlocks; });
 515  __webpack_require__.d(actions_namespaceObject, "installBlockType", function() { return actions_installBlockType; });
 516  __webpack_require__.d(actions_namespaceObject, "uninstallBlockType", function() { return actions_uninstallBlockType; });
 517  __webpack_require__.d(actions_namespaceObject, "addInstalledBlockType", function() { return addInstalledBlockType; });
 518  __webpack_require__.d(actions_namespaceObject, "removeInstalledBlockType", function() { return removeInstalledBlockType; });
 519  __webpack_require__.d(actions_namespaceObject, "setIsInstalling", function() { return setIsInstalling; });
 520  __webpack_require__.d(actions_namespaceObject, "setErrorNotice", function() { return setErrorNotice; });
 521  __webpack_require__.d(actions_namespaceObject, "clearErrorNotice", function() { return clearErrorNotice; });
 522  
 523  // EXTERNAL MODULE: external ["wp","element"]
 524  var external_wp_element_ = __webpack_require__(0);
 525  
 526  // EXTERNAL MODULE: external ["wp","plugins"]
 527  var external_wp_plugins_ = __webpack_require__(73);
 528  
 529  // EXTERNAL MODULE: external ["wp","hooks"]
 530  var external_wp_hooks_ = __webpack_require__(33);
 531  
 532  // EXTERNAL MODULE: external ["wp","blocks"]
 533  var external_wp_blocks_ = __webpack_require__(9);
 534  
 535  // EXTERNAL MODULE: external ["wp","data"]
 536  var external_wp_data_ = __webpack_require__(4);
 537  
 538  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 539  var defineProperty = __webpack_require__(5);
 540  
 541  // EXTERNAL MODULE: external ["wp","dataControls"]
 542  var external_wp_dataControls_ = __webpack_require__(49);
 543  
 544  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
 545  var toConsumableArray = __webpack_require__(15);
 546  
 547  // EXTERNAL MODULE: external "lodash"
 548  var external_lodash_ = __webpack_require__(2);
 549  
 550  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/reducer.js
 551  
 552  
 553  
 554  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 555  
 556  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 557  
 558  /**
 559   * External dependencies
 560   */
 561  
 562  /**
 563   * WordPress dependencies
 564   */
 565  
 566  
 567  /**
 568   * Reducer returning an array of downloadable blocks.
 569   *
 570   * @param {Object} state  Current state.
 571   * @param {Object} action Dispatched action.
 572   *
 573   * @return {Object} Updated state.
 574   */
 575  
 576  var reducer_downloadableBlocks = function downloadableBlocks() {
 577    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 578    var action = arguments.length > 1 ? arguments[1] : undefined;
 579  
 580    switch (action.type) {
 581      case 'FETCH_DOWNLOADABLE_BLOCKS':
 582        return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.filterValue, {
 583          isRequesting: true
 584        }));
 585  
 586      case 'RECEIVE_DOWNLOADABLE_BLOCKS':
 587        return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.filterValue, {
 588          results: action.downloadableBlocks,
 589          isRequesting: false
 590        }));
 591    }
 592  
 593    return state;
 594  };
 595  /**
 596   * Reducer managing the installation and deletion of blocks.
 597   *
 598   * @param {Object} state  Current state.
 599   * @param {Object} action Dispatched action.
 600   *
 601   * @return {Object} Updated state.
 602   */
 603  
 604  var reducer_blockManagement = function blockManagement() {
 605    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
 606      installedBlockTypes: [],
 607      isInstalling: {}
 608    };
 609    var action = arguments.length > 1 ? arguments[1] : undefined;
 610  
 611    switch (action.type) {
 612      case 'ADD_INSTALLED_BLOCK_TYPE':
 613        return _objectSpread(_objectSpread({}, state), {}, {
 614          installedBlockTypes: [].concat(Object(toConsumableArray["a" /* default */])(state.installedBlockTypes), [action.item])
 615        });
 616  
 617      case 'REMOVE_INSTALLED_BLOCK_TYPE':
 618        return _objectSpread(_objectSpread({}, state), {}, {
 619          installedBlockTypes: state.installedBlockTypes.filter(function (blockType) {
 620            return blockType.name !== action.item.name;
 621          })
 622        });
 623  
 624      case 'SET_INSTALLING_BLOCK':
 625        return _objectSpread(_objectSpread({}, state), {}, {
 626          isInstalling: _objectSpread(_objectSpread({}, state.isInstalling), {}, Object(defineProperty["a" /* default */])({}, action.blockId, action.isInstalling))
 627        });
 628    }
 629  
 630    return state;
 631  };
 632  /**
 633   * Reducer returning an object of error notices.
 634   *
 635   * @param {Object} state  Current state.
 636   * @param {Object} action Dispatched action.
 637   *
 638   * @return {Object} Updated state.
 639   */
 640  
 641  var reducer_errorNotices = function errorNotices() {
 642    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 643    var action = arguments.length > 1 ? arguments[1] : undefined;
 644  
 645    switch (action.type) {
 646      case 'SET_ERROR_NOTICE':
 647        return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.blockId, {
 648          message: action.message,
 649          isFatal: action.isFatal
 650        }));
 651  
 652      case 'CLEAR_ERROR_NOTICE':
 653        return Object(external_lodash_["omit"])(state, action.blockId);
 654    }
 655  
 656    return state;
 657  };
 658  /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({
 659    downloadableBlocks: reducer_downloadableBlocks,
 660    blockManagement: reducer_blockManagement,
 661    errorNotices: reducer_errorNotices
 662  }));
 663  
 664  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/has-block-type.js
 665  /**
 666   * Check if a block list contains a specific block type. Recursively searches
 667   * through `innerBlocks` if they exist.
 668   *
 669   * @param {Object} blockType A block object to search for.
 670   * @param {Object[]} blocks  The list of blocks to look through.
 671   *
 672   * @return {boolean} Whether the blockType is found.
 673   */
 674  function hasBlockType(blockType) {
 675    var blocks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
 676  
 677    if (!blocks.length) {
 678      return false;
 679    }
 680  
 681    if (blocks.some(function (_ref) {
 682      var name = _ref.name;
 683      return name === blockType.name;
 684    })) {
 685      return true;
 686    }
 687  
 688    for (var i = 0; i < blocks.length; i++) {
 689      if (hasBlockType(blockType, blocks[i].innerBlocks)) {
 690        return true;
 691      }
 692    }
 693  
 694    return false;
 695  }
 696  
 697  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
 698  /**
 699   * WordPress dependencies
 700   */
 701  
 702  /**
 703   * Internal dependencies
 704   */
 705  
 706  
 707  /**
 708   * Returns true if application is requesting for downloadable blocks.
 709   *
 710   * @param {Object} state       Global application state.
 711   * @param {string} filterValue Search string.
 712   *
 713   * @return {boolean} Whether a request is in progress for the blocks list.
 714   */
 715  
 716  function selectors_isRequestingDownloadableBlocks(state, filterValue) {
 717    if (!state.downloadableBlocks[filterValue] || !state.downloadableBlocks[filterValue].isRequesting) {
 718      return false;
 719    }
 720  
 721    return state.downloadableBlocks[filterValue].isRequesting;
 722  }
 723  /**
 724   * Returns the available uninstalled blocks.
 725   *
 726   * @param {Object} state       Global application state.
 727   * @param {string} filterValue Search string.
 728   *
 729   * @return {Array} Downloadable blocks.
 730   */
 731  
 732  function selectors_getDownloadableBlocks(state, filterValue) {
 733    if (!state.downloadableBlocks[filterValue] || !state.downloadableBlocks[filterValue].results) {
 734      return [];
 735    }
 736  
 737    return state.downloadableBlocks[filterValue].results;
 738  }
 739  /**
 740   * Returns the block types that have been installed on the server in this
 741   * session.
 742   *
 743   * @param {Object} state Global application state.
 744   *
 745   * @return {Array} Block type items
 746   */
 747  
 748  function getInstalledBlockTypes(state) {
 749    return state.blockManagement.installedBlockTypes;
 750  }
 751  /**
 752   * Returns block types that have been installed on the server and used in the
 753   * current post.
 754   *
 755   * @param {Object} state Global application state.
 756   *
 757   * @return {Array} Block type items.
 758   */
 759  
 760  var getNewBlockTypes = Object(external_wp_data_["createRegistrySelector"])(function (select) {
 761    return function (state) {
 762      var usedBlockTree = select('core/block-editor').getBlocks();
 763      var installedBlockTypes = getInstalledBlockTypes(state);
 764      return installedBlockTypes.filter(function (blockType) {
 765        return hasBlockType(blockType, usedBlockTree);
 766      });
 767    };
 768  });
 769  /**
 770   * Returns the block types that have been installed on the server but are not
 771   * used in the current post.
 772   *
 773   * @param {Object} state Global application state.
 774   *
 775   * @return {Array} Block type items.
 776   */
 777  
 778  var getUnusedBlockTypes = Object(external_wp_data_["createRegistrySelector"])(function (select) {
 779    return function (state) {
 780      var usedBlockTree = select('core/block-editor').getBlocks();
 781      var installedBlockTypes = getInstalledBlockTypes(state);
 782      return installedBlockTypes.filter(function (blockType) {
 783        return !hasBlockType(blockType, usedBlockTree);
 784      });
 785    };
 786  });
 787  /**
 788   * Returns true if a block plugin install is in progress.
 789   *
 790   * @param {Object} state   Global application state.
 791   * @param {string} blockId Id of the block.
 792   *
 793   * @return {boolean} Whether this block is currently being installed.
 794   */
 795  
 796  function selectors_isInstalling(state, blockId) {
 797    return state.blockManagement.isInstalling[blockId] || false;
 798  }
 799  /**
 800   * Returns all block error notices.
 801   *
 802   * @param {Object} state Global application state.
 803   *
 804   * @return {Object} Object with error notices.
 805   */
 806  
 807  function getErrorNotices(state) {
 808    return state.errorNotices;
 809  }
 810  /**
 811   * Returns the error notice for a given block.
 812   *
 813   * @param {Object} state   Global application state.
 814   * @param {string} blockId The ID of the block plugin. eg: my-block
 815   *
 816   * @return {string|boolean} The error text, or false if no error.
 817   */
 818  
 819  function selectors_getErrorNoticeForBlock(state, blockId) {
 820    return state.errorNotices[blockId];
 821  }
 822  
 823  // EXTERNAL MODULE: external "regeneratorRuntime"
 824  var external_regeneratorRuntime_ = __webpack_require__(16);
 825  var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_regeneratorRuntime_);
 826  
 827  // EXTERNAL MODULE: external ["wp","i18n"]
 828  var external_wp_i18n_ = __webpack_require__(1);
 829  
 830  // EXTERNAL MODULE: external ["wp","notices"]
 831  var external_wp_notices_ = __webpack_require__(51);
 832  
 833  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
 834  var asyncToGenerator = __webpack_require__(47);
 835  
 836  // EXTERNAL MODULE: external ["wp","apiFetch"]
 837  var external_wp_apiFetch_ = __webpack_require__(50);
 838  var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_);
 839  
 840  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/controls.js
 841  
 842  
 843  
 844  function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
 845  
 846  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
 847  
 848  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
 849  
 850  /**
 851   * WordPress dependencies
 852   */
 853  
 854  /**
 855   * Load an asset for a block.
 856   *
 857   * This function returns a Promise that will resolve once the asset is loaded,
 858   * or in the case of Stylesheets and Inline JavaScript, will resolve immediately.
 859   *
 860   * @param {HTMLElement} el A HTML Element asset to inject.
 861   *
 862   * @return {Promise} Promise which will resolve when the asset is loaded.
 863   */
 864  
 865  var loadAsset = function loadAsset(el) {
 866    return new Promise(function (resolve, reject) {
 867      /*
 868       * Reconstruct the passed element, this is required as inserting the Node directly
 869       * won't always fire the required onload events, even if the asset wasn't already loaded.
 870       */
 871      var newNode = document.createElement(el.nodeName);
 872      ['id', 'rel', 'src', 'href', 'type'].forEach(function (attr) {
 873        if (el[attr]) {
 874          newNode[attr] = el[attr];
 875        }
 876      }); // Append inline <script> contents.
 877  
 878      if (el.innerHTML) {
 879        newNode.appendChild(document.createTextNode(el.innerHTML));
 880      }
 881  
 882      newNode.onload = function () {
 883        return resolve(true);
 884      };
 885  
 886      newNode.onerror = function () {
 887        return reject(new Error('Error loading asset.'));
 888      };
 889  
 890      document.body.appendChild(newNode); // Resolve Stylesheets and Inline JavaScript immediately.
 891  
 892      if ('link' === newNode.nodeName.toLowerCase() || 'script' === newNode.nodeName.toLowerCase() && !newNode.src) {
 893        resolve();
 894      }
 895    });
 896  };
 897  /**
 898   * Load the asset files for a block
 899   *
 900   * @param {Array} assets A collection of URLs for the assets.
 901   *
 902   * @return {Object} Control descriptor.
 903   */
 904  
 905  function loadAssets(assets) {
 906    return {
 907      type: 'LOAD_ASSETS',
 908      assets: assets
 909    };
 910  }
 911  var controls = {
 912    LOAD_ASSETS: function LOAD_ASSETS() {
 913      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee() {
 914        var response, data, doc, newAssets, _iterator, _step, newAsset;
 915  
 916        return external_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
 917          while (1) {
 918            switch (_context.prev = _context.next) {
 919              case 0:
 920                _context.next = 2;
 921                return external_wp_apiFetch_default()({
 922                  url: document.location.href,
 923                  parse: false
 924                });
 925  
 926              case 2:
 927                response = _context.sent;
 928                _context.next = 5;
 929                return response.text();
 930  
 931              case 5:
 932                data = _context.sent;
 933                doc = new window.DOMParser().parseFromString(data, 'text/html');
 934                newAssets = Array.from(doc.querySelectorAll('link[rel="stylesheet"],script')).filter(function (asset) {
 935                  return asset.id && !document.getElementById(asset.id);
 936                });
 937                /*
 938                 * Load each asset in order, as they may depend upon an earlier loaded script.
 939                 * Stylesheets and Inline Scripts will resolve immediately upon insertion.
 940                 */
 941  
 942                _iterator = _createForOfIteratorHelper(newAssets);
 943                _context.prev = 9;
 944  
 945                _iterator.s();
 946  
 947              case 11:
 948                if ((_step = _iterator.n()).done) {
 949                  _context.next = 17;
 950                  break;
 951                }
 952  
 953                newAsset = _step.value;
 954                _context.next = 15;
 955                return loadAsset(newAsset);
 956  
 957              case 15:
 958                _context.next = 11;
 959                break;
 960  
 961              case 17:
 962                _context.next = 22;
 963                break;
 964  
 965              case 19:
 966                _context.prev = 19;
 967                _context.t0 = _context["catch"](9);
 968  
 969                _iterator.e(_context.t0);
 970  
 971              case 22:
 972                _context.prev = 22;
 973  
 974                _iterator.f();
 975  
 976                return _context.finish(22);
 977  
 978              case 25:
 979              case "end":
 980                return _context.stop();
 981            }
 982          }
 983        }, _callee, null, [[9, 19, 22, 25]]);
 984      }))();
 985    }
 986  };
 987  /* harmony default export */ var store_controls = (controls);
 988  
 989  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/get-plugin-url.js
 990  /**
 991   * Get the plugin's direct API link out of a block-directory response.
 992   *
 993   * @param {Object} block The block object
 994   *
 995   * @return {string} The plugin URL, if exists.
 996   */
 997  function getPluginUrl(block) {
 998    if (!block) {
 999      return false;
1000    }
1001  
1002    var link = block.links['wp:plugin'] || block.links.self;
1003  
1004    if (link && link.length) {
1005      return link[0].href;
1006    }
1007  
1008    return false;
1009  }
1010  
1011  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
1012  
1013  
1014  
1015  var _marked = /*#__PURE__*/external_regeneratorRuntime_default.a.mark(actions_installBlockType),
1016      _marked2 = /*#__PURE__*/external_regeneratorRuntime_default.a.mark(actions_uninstallBlockType);
1017  
1018  function actions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1019  
1020  function actions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { actions_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { actions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1021  
1022  /**
1023   * WordPress dependencies
1024   */
1025  
1026  
1027  
1028  
1029  
1030  /**
1031   * Internal dependencies
1032   */
1033  
1034  
1035  
1036  /**
1037   * Returns an action object used in signalling that the downloadable blocks
1038   * have been requested and are loading.
1039   *
1040   * @param {string} filterValue Search string.
1041   *
1042   * @return {Object} Action object.
1043   */
1044  
1045  function fetchDownloadableBlocks(filterValue) {
1046    return {
1047      type: 'FETCH_DOWNLOADABLE_BLOCKS',
1048      filterValue: filterValue
1049    };
1050  }
1051  /**
1052   * Returns an action object used in signalling that the downloadable blocks
1053   * have been updated.
1054   *
1055   * @param {Array}  downloadableBlocks Downloadable blocks.
1056   * @param {string} filterValue        Search string.
1057   *
1058   * @return {Object} Action object.
1059   */
1060  
1061  function receiveDownloadableBlocks(downloadableBlocks, filterValue) {
1062    return {
1063      type: 'RECEIVE_DOWNLOADABLE_BLOCKS',
1064      downloadableBlocks: downloadableBlocks,
1065      filterValue: filterValue
1066    };
1067  }
1068  /**
1069   * Action triggered to install a block plugin.
1070   *
1071   * @param {Object} block The block item returned by search.
1072   *
1073   * @return {boolean} Whether the block was successfully installed & loaded.
1074   */
1075  
1076  function actions_installBlockType(block) {
1077    var id, assets, success, url, links, response, registeredBlocks, message, isFatal, fatalAPIErrors;
1078    return external_regeneratorRuntime_default.a.wrap(function installBlockType$(_context) {
1079      while (1) {
1080        switch (_context.prev = _context.next) {
1081          case 0:
1082            id = block.id, assets = block.assets;
1083            success = false;
1084            _context.next = 4;
1085            return clearErrorNotice(id);
1086  
1087          case 4:
1088            _context.prev = 4;
1089            _context.next = 7;
1090            return setIsInstalling(block.id, true);
1091  
1092          case 7:
1093            // If we have a wp:plugin link, the plugin is installed but inactive.
1094            url = getPluginUrl(block);
1095            links = {};
1096  
1097            if (!url) {
1098              _context.next = 14;
1099              break;
1100            }
1101  
1102            _context.next = 12;
1103            return Object(external_wp_dataControls_["apiFetch"])({
1104              url: url,
1105              data: {
1106                status: 'active'
1107              },
1108              method: 'PUT'
1109            });
1110  
1111          case 12:
1112            _context.next = 18;
1113            break;
1114  
1115          case 14:
1116            _context.next = 16;
1117            return Object(external_wp_dataControls_["apiFetch"])({
1118              path: 'wp/v2/plugins',
1119              data: {
1120                slug: block.id,
1121                status: 'active'
1122              },
1123              method: 'POST'
1124            });
1125  
1126          case 16:
1127            response = _context.sent;
1128            // Add the `self` link for newly-installed blocks.
1129            links = response._links;
1130  
1131          case 18:
1132            _context.next = 20;
1133            return addInstalledBlockType(actions_objectSpread(actions_objectSpread({}, block), {}, {
1134              links: actions_objectSpread(actions_objectSpread({}, block.links), links)
1135            }));
1136  
1137          case 20:
1138            _context.next = 22;
1139            return loadAssets(assets);
1140  
1141          case 22:
1142            _context.next = 24;
1143            return external_wp_data_["controls"].select(external_wp_blocks_["store"].name, 'getBlockTypes');
1144  
1145          case 24:
1146            registeredBlocks = _context.sent;
1147  
1148            if (registeredBlocks.some(function (i) {
1149              return i.name === block.name;
1150            })) {
1151              _context.next = 27;
1152              break;
1153            }
1154  
1155            throw new Error(Object(external_wp_i18n_["__"])('Error registering block. Try reloading the page.'));
1156  
1157          case 27:
1158            success = true;
1159            _context.next = 38;
1160            break;
1161  
1162          case 30:
1163            _context.prev = 30;
1164            _context.t0 = _context["catch"](4);
1165            message = _context.t0.message || Object(external_wp_i18n_["__"])('An error occurred.'); // Errors we throw are fatal
1166  
1167            isFatal = _context.t0 instanceof Error; // Specific API errors that are fatal
1168  
1169            fatalAPIErrors = {
1170              folder_exists: Object(external_wp_i18n_["__"])('This block is already installed. Try reloading the page.'),
1171              unable_to_connect_to_filesystem: Object(external_wp_i18n_["__"])('Error installing block. You can reload the page and try again.')
1172            };
1173  
1174            if (fatalAPIErrors[_context.t0.code]) {
1175              isFatal = true;
1176              message = fatalAPIErrors[_context.t0.code];
1177            }
1178  
1179            _context.next = 38;
1180            return setErrorNotice(id, message, isFatal);
1181  
1182          case 38:
1183            _context.next = 40;
1184            return setIsInstalling(block.id, false);
1185  
1186          case 40:
1187            return _context.abrupt("return", success);
1188  
1189          case 41:
1190          case "end":
1191            return _context.stop();
1192        }
1193      }
1194    }, _marked, null, [[4, 30]]);
1195  }
1196  /**
1197   * Action triggered to uninstall a block plugin.
1198   *
1199   * @param {Object} block The blockType object.
1200   */
1201  
1202  function actions_uninstallBlockType(block) {
1203    return external_regeneratorRuntime_default.a.wrap(function uninstallBlockType$(_context2) {
1204      while (1) {
1205        switch (_context2.prev = _context2.next) {
1206          case 0:
1207            _context2.prev = 0;
1208            _context2.next = 3;
1209            return Object(external_wp_dataControls_["apiFetch"])({
1210              url: getPluginUrl(block),
1211              data: {
1212                status: 'inactive'
1213              },
1214              method: 'PUT'
1215            });
1216  
1217          case 3:
1218            _context2.next = 5;
1219            return Object(external_wp_dataControls_["apiFetch"])({
1220              url: getPluginUrl(block),
1221              method: 'DELETE'
1222            });
1223  
1224          case 5:
1225            _context2.next = 7;
1226            return removeInstalledBlockType(block);
1227  
1228          case 7:
1229            _context2.next = 13;
1230            break;
1231  
1232          case 9:
1233            _context2.prev = 9;
1234            _context2.t0 = _context2["catch"](0);
1235            _context2.next = 13;
1236            return external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', _context2.t0.message || Object(external_wp_i18n_["__"])('An error occurred.'));
1237  
1238          case 13:
1239          case "end":
1240            return _context2.stop();
1241        }
1242      }
1243    }, _marked2, null, [[0, 9]]);
1244  }
1245  /**
1246   * Returns an action object used to add a block type to the "newly installed"
1247   * tracking list.
1248   *
1249   * @param {Object} item The block item with the block id and name.
1250   *
1251   * @return {Object} Action object.
1252   */
1253  
1254  function addInstalledBlockType(item) {
1255    return {
1256      type: 'ADD_INSTALLED_BLOCK_TYPE',
1257      item: item
1258    };
1259  }
1260  /**
1261   * Returns an action object used to remove a block type from the "newly installed"
1262   * tracking list.
1263   *
1264   * @param {string} item The block item with the block id and name.
1265   *
1266   * @return {Object} Action object.
1267   */
1268  
1269  function removeInstalledBlockType(item) {
1270    return {
1271      type: 'REMOVE_INSTALLED_BLOCK_TYPE',
1272      item: item
1273    };
1274  }
1275  /**
1276   * Returns an action object used to indicate install in progress.
1277   *
1278   * @param {string} blockId
1279   * @param {boolean} isInstalling
1280   *
1281   * @return {Object} Action object.
1282   */
1283  
1284  function setIsInstalling(blockId, isInstalling) {
1285    return {
1286      type: 'SET_INSTALLING_BLOCK',
1287      blockId: blockId,
1288      isInstalling: isInstalling
1289    };
1290  }
1291  /**
1292   * Sets an error notice to be displayed to the user for a given block.
1293   *
1294   * @param {string} blockId  The ID of the block plugin. eg: my-block
1295   * @param {string} message  The message shown in the notice.
1296   * @param {boolean} isFatal Whether the user can recover from the error.
1297   *
1298   * @return {Object} Action object.
1299   */
1300  
1301  function setErrorNotice(blockId, message) {
1302    var isFatal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1303    return {
1304      type: 'SET_ERROR_NOTICE',
1305      blockId: blockId,
1306      message: message,
1307      isFatal: isFatal
1308    };
1309  }
1310  /**
1311   * Sets the error notice to empty for specific block.
1312   *
1313   * @param {string} blockId The ID of the block plugin. eg: my-block
1314   *
1315   * @return {Object} Action object.
1316   */
1317  
1318  function clearErrorNotice(blockId) {
1319    return {
1320      type: 'CLEAR_ERROR_NOTICE',
1321      blockId: blockId
1322    };
1323  }
1324  
1325  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js
1326  
1327  
1328  /**
1329   * External dependencies
1330   */
1331  
1332  /**
1333   * WordPress dependencies
1334   */
1335  
1336  
1337  /**
1338   * Internal dependencies
1339   */
1340  
1341  
1342  /* harmony default export */ var resolvers = ({
1343    getDownloadableBlocks: /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function getDownloadableBlocks(filterValue) {
1344      var results, blocks;
1345      return external_regeneratorRuntime_default.a.wrap(function getDownloadableBlocks$(_context) {
1346        while (1) {
1347          switch (_context.prev = _context.next) {
1348            case 0:
1349              if (filterValue) {
1350                _context.next = 2;
1351                break;
1352              }
1353  
1354              return _context.abrupt("return");
1355  
1356            case 2:
1357              _context.prev = 2;
1358              _context.next = 5;
1359              return fetchDownloadableBlocks(filterValue);
1360  
1361            case 5:
1362              _context.next = 7;
1363              return Object(external_wp_dataControls_["apiFetch"])({
1364                path: "wp/v2/block-directory/search?term=".concat(filterValue)
1365              });
1366  
1367            case 7:
1368              results = _context.sent;
1369              blocks = results.map(function (result) {
1370                return Object(external_lodash_["mapKeys"])(result, function (value, key) {
1371                  return Object(external_lodash_["camelCase"])(key);
1372                });
1373              });
1374              _context.next = 11;
1375              return receiveDownloadableBlocks(blocks, filterValue);
1376  
1377            case 11:
1378              _context.next = 15;
1379              break;
1380  
1381            case 13:
1382              _context.prev = 13;
1383              _context.t0 = _context["catch"](2);
1384  
1385            case 15:
1386            case "end":
1387              return _context.stop();
1388          }
1389        }
1390      }, getDownloadableBlocks, null, [[2, 13]]);
1391    })
1392  });
1393  
1394  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/index.js
1395  
1396  
1397  function store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1398  
1399  function store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1400  
1401  /**
1402   * WordPress dependencies
1403   */
1404  
1405  
1406  /**
1407   * Internal dependencies
1408   */
1409  
1410  
1411  
1412  
1413  
1414  
1415  /**
1416   * Module Constants
1417   */
1418  
1419  var STORE_NAME = 'core/block-directory';
1420  /**
1421   * Block editor data store configuration.
1422   *
1423   * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
1424   *
1425   * @type {Object}
1426   */
1427  
1428  var storeConfig = {
1429    reducer: reducer,
1430    selectors: selectors_namespaceObject,
1431    actions: actions_namespaceObject,
1432    controls: store_objectSpread(store_objectSpread({}, external_wp_dataControls_["controls"]), store_controls),
1433    resolvers: resolvers
1434  };
1435  /**
1436   * Store definition for the block directory namespace.
1437   *
1438   * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
1439   *
1440   * @type {Object}
1441   */
1442  
1443  var store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, storeConfig);
1444  Object(external_wp_data_["register"])(store);
1445  
1446  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js
1447  /**
1448   * WordPress dependencies
1449   */
1450  
1451  
1452  
1453  /**
1454   * Internal dependencies
1455   */
1456  
1457  
1458  function AutoBlockUninstaller() {
1459    var _useDispatch = Object(external_wp_data_["useDispatch"])(store),
1460        uninstallBlockType = _useDispatch.uninstallBlockType;
1461  
1462    var shouldRemoveBlockTypes = Object(external_wp_data_["useSelect"])(function (select) {
1463      var _select = select('core/editor'),
1464          isAutosavingPost = _select.isAutosavingPost,
1465          isSavingPost = _select.isSavingPost;
1466  
1467      return isSavingPost() && !isAutosavingPost();
1468    }, []);
1469    var unusedBlockTypes = Object(external_wp_data_["useSelect"])(function (select) {
1470      return select(store).getUnusedBlockTypes();
1471    }, []);
1472    Object(external_wp_element_["useEffect"])(function () {
1473      if (shouldRemoveBlockTypes && unusedBlockTypes.length) {
1474        unusedBlockTypes.forEach(function (blockType) {
1475          uninstallBlockType(blockType);
1476          Object(external_wp_blocks_["unregisterBlockType"])(blockType.name);
1477        });
1478      }
1479    }, [shouldRemoveBlockTypes]);
1480    return null;
1481  }
1482  
1483  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
1484  var slicedToArray = __webpack_require__(11);
1485  
1486  // EXTERNAL MODULE: external ["wp","blockEditor"]
1487  var external_wp_blockEditor_ = __webpack_require__(6);
1488  
1489  // EXTERNAL MODULE: external ["wp","compose"]
1490  var external_wp_compose_ = __webpack_require__(12);
1491  
1492  // EXTERNAL MODULE: external ["wp","components"]
1493  var external_wp_components_ = __webpack_require__(3);
1494  
1495  // EXTERNAL MODULE: external ["wp","a11y"]
1496  var external_wp_a11y_ = __webpack_require__(48);
1497  
1498  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-author-info/index.js
1499  
1500  
1501  /**
1502   * WordPress dependencies
1503   */
1504  
1505  
1506  
1507  function DownloadableBlockAuthorInfo(_ref) {
1508    var author = _ref.author,
1509        authorBlockCount = _ref.authorBlockCount,
1510        authorBlockRating = _ref.authorBlockRating;
1511    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("span", {
1512      className: "block-directory-downloadable-block-author-info__content-author"
1513    }, Object(external_wp_i18n_["sprintf"])(
1514    /* translators: %s: author name. */
1515    Object(external_wp_i18n_["__"])('Authored by %s'), author)), Object(external_wp_element_["createElement"])("span", {
1516      className: "block-directory-downloadable-block-author-info__content"
1517    }, authorBlockRating > 0 ? Object(external_wp_i18n_["sprintf"])(
1518    /* translators: 1: number of blocks. 2: average rating. */
1519    Object(external_wp_i18n_["_n"])('This author has %1$d block, with an average rating of %2$.1f.', 'This author has %1$d blocks, with an average rating of %2$.1f.', authorBlockCount), authorBlockCount, authorBlockRating) : Object(external_wp_i18n_["sprintf"])(
1520    /* translators: 1: number of blocks. */
1521    Object(external_wp_i18n_["_n"])('This author has %1$d block.', 'This author has %1$d blocks.', authorBlockCount), authorBlockCount)));
1522  }
1523  
1524  /* harmony default export */ var downloadable_block_author_info = (DownloadableBlockAuthorInfo);
1525  
1526  // EXTERNAL MODULE: external ["wp","htmlEntities"]
1527  var external_wp_htmlEntities_ = __webpack_require__(64);
1528  
1529  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
1530  var build_module_icon = __webpack_require__(138);
1531  
1532  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
1533  var star_filled = __webpack_require__(303);
1534  
1535  // EXTERNAL MODULE: external ["wp","primitives"]
1536  var external_wp_primitives_ = __webpack_require__(7);
1537  
1538  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-half.js
1539  
1540  
1541  /**
1542   * WordPress dependencies
1543   */
1544  
1545  var starHalf = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1546    xmlns: "http://www.w3.org/2000/svg",
1547    viewBox: "0 0 24 24"
1548  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1549    d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"
1550  }));
1551  /* harmony default export */ var star_half = (starHalf);
1552  
1553  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
1554  var star_empty = __webpack_require__(304);
1555  
1556  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js
1557  
1558  
1559  /**
1560   * External dependencies
1561   */
1562  
1563  /**
1564   * WordPress dependencies
1565   */
1566  
1567  
1568  
1569  
1570  function Stars(_ref) {
1571    var rating = _ref.rating;
1572    var stars = Math.round(rating / 0.5) * 0.5;
1573    var fullStarCount = Math.floor(rating);
1574    var halfStarCount = Math.ceil(rating - fullStarCount);
1575    var emptyStarCount = 5 - (fullStarCount + halfStarCount);
1576    return Object(external_wp_element_["createElement"])("div", {
1577      "aria-label": Object(external_wp_i18n_["sprintf"])(
1578      /* translators: %s: number of stars. */
1579      Object(external_wp_i18n_["__"])('%s out of 5 stars'), stars)
1580    }, Object(external_lodash_["times"])(fullStarCount, function (i) {
1581      return Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
1582        key: "full_stars_".concat(i),
1583        icon: star_filled["a" /* default */],
1584        size: 16
1585      });
1586    }), Object(external_lodash_["times"])(halfStarCount, function (i) {
1587      return Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
1588        key: "half_stars_".concat(i),
1589        icon: star_half,
1590        size: 16
1591      });
1592    }), Object(external_lodash_["times"])(emptyStarCount, function (i) {
1593      return Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
1594        key: "empty_stars_".concat(i),
1595        icon: star_empty["a" /* default */],
1596        size: 16
1597      });
1598    }));
1599  }
1600  
1601  /* harmony default export */ var block_ratings_stars = (Stars);
1602  
1603  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js
1604  
1605  
1606  /**
1607   * WordPress dependencies
1608   */
1609  
1610  /**
1611   * Internal dependencies
1612   */
1613  
1614  
1615  var block_ratings_BlockRatings = function BlockRatings(_ref) {
1616    var rating = _ref.rating,
1617        ratingCount = _ref.ratingCount;
1618    return Object(external_wp_element_["createElement"])("div", {
1619      className: "block-directory-block-ratings"
1620    }, Object(external_wp_element_["createElement"])(block_ratings_stars, {
1621      rating: rating
1622    }), Object(external_wp_element_["createElement"])("span", {
1623      className: "block-directory-block-ratings__rating-count",
1624      "aria-label": Object(external_wp_i18n_["sprintf"])( // translators: %d: number of ratings (number).
1625      Object(external_wp_i18n_["_n"])('%d total rating', '%d total ratings', ratingCount), ratingCount)
1626    }, "(", ratingCount, ")"));
1627  };
1628  /* harmony default export */ var block_ratings = (block_ratings_BlockRatings);
1629  
1630  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js
1631  
1632  
1633  /**
1634   * WordPress dependencies
1635   */
1636  
1637  
1638  
1639  function DownloadableBlockIcon(_ref) {
1640    var icon = _ref.icon,
1641        title = _ref.title;
1642    return Object(external_wp_element_["createElement"])("div", {
1643      className: "block-directory-downloadable-block-icon"
1644    }, icon.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/) !== null ? Object(external_wp_element_["createElement"])("img", {
1645      src: icon,
1646      alt: Object(external_wp_i18n_["sprintf"])( // translators: %s: Name of the plugin e.g: "Akismet".
1647      Object(external_wp_i18n_["__"])('%s block icon'), title)
1648    }) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
1649      icon: icon,
1650      showColors: true
1651    }));
1652  }
1653  
1654  /* harmony default export */ var downloadable_block_icon = (DownloadableBlockIcon);
1655  
1656  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-header/index.js
1657  
1658  
1659  /**
1660   * WordPress dependencies
1661   */
1662  
1663  
1664  
1665  /**
1666   * Internal dependencies
1667   */
1668  
1669  
1670  
1671  
1672  function DownloadableBlockHeader(_ref) {
1673    var icon = _ref.icon,
1674        title = _ref.title,
1675        rating = _ref.rating,
1676        ratingCount = _ref.ratingCount,
1677        _ref$isLoading = _ref.isLoading,
1678        isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
1679        _ref$isInstallable = _ref.isInstallable,
1680        isInstallable = _ref$isInstallable === void 0 ? true : _ref$isInstallable,
1681        _onClick = _ref.onClick;
1682    return Object(external_wp_element_["createElement"])("div", {
1683      className: "block-directory-downloadable-block-header__row"
1684    }, Object(external_wp_element_["createElement"])(downloadable_block_icon, {
1685      icon: icon,
1686      title: title
1687    }), Object(external_wp_element_["createElement"])("div", {
1688      className: "block-directory-downloadable-block-header__column"
1689    }, Object(external_wp_element_["createElement"])("h2", {
1690      className: "block-directory-downloadable-block-header__title"
1691    }, Object(external_wp_htmlEntities_["decodeEntities"])(title)), Object(external_wp_element_["createElement"])(block_ratings, {
1692      rating: rating,
1693      ratingCount: ratingCount
1694    })), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
1695      isSecondary: true,
1696      isBusy: isLoading,
1697      disabled: isLoading || !isInstallable,
1698      onClick: function onClick(event) {
1699        event.preventDefault();
1700  
1701        if (!isLoading && isInstallable) {
1702          _onClick();
1703        }
1704      }
1705    }, isLoading ? Object(external_wp_i18n_["__"])('Adding…') : Object(external_wp_i18n_["__"])('Add block')));
1706  }
1707  
1708  /* harmony default export */ var downloadable_block_header = (DownloadableBlockHeader);
1709  
1710  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chart-line.js
1711  
1712  
1713  /**
1714   * WordPress dependencies
1715   */
1716  
1717  var chartLine = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1718    xmlns: "http://www.w3.org/2000/svg",
1719    viewBox: "-2 -2 24 24"
1720  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1721    d: "M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z"
1722  }));
1723  /* harmony default export */ var chart_line = (chartLine);
1724  
1725  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/update.js
1726  
1727  
1728  /**
1729   * WordPress dependencies
1730   */
1731  
1732  var update = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1733    xmlns: "http://www.w3.org/2000/svg",
1734    viewBox: "-2 -2 24 24"
1735  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1736    d: "M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"
1737  }));
1738  /* harmony default export */ var library_update = (update);
1739  
1740  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-info/index.js
1741  
1742  
1743  /**
1744   * WordPress dependencies
1745   */
1746  
1747  
1748  
1749  
1750  
1751  function DownloadableBlockInfo(_ref) {
1752    var activeInstalls = _ref.activeInstalls,
1753        description = _ref.description,
1754        humanizedUpdated = _ref.humanizedUpdated;
1755    var activeInstallsString;
1756  
1757    if (activeInstalls > 1000000) {
1758      activeInstallsString = Object(external_wp_i18n_["sprintf"])(
1759      /* translators: %d: number of active installations. */
1760      Object(external_wp_i18n_["__"])('%d+ Million active installations'), Math.floor(activeInstalls / 1000000));
1761    } else if (0 === activeInstalls) {
1762      activeInstallsString = Object(external_wp_i18n_["__"])('Less than 10 active installations');
1763    } else {
1764      activeInstallsString = Object(external_wp_i18n_["sprintf"])(
1765      /* translators: %d: number of active installations. */
1766      Object(external_wp_i18n_["__"])('%d+ active installations'), activeInstalls);
1767    }
1768  
1769    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("p", {
1770      className: "block-directory-downloadable-block-info__content"
1771    }, Object(external_wp_htmlEntities_["decodeEntities"])(description)), Object(external_wp_element_["createElement"])("div", {
1772      className: "block-directory-downloadable-block-info__meta"
1773    }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
1774      className: "block-directory-downloadable-block-info__icon",
1775      icon: chart_line
1776    }), activeInstallsString), Object(external_wp_element_["createElement"])("div", {
1777      className: "block-directory-downloadable-block-info__meta"
1778    }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
1779      className: "block-directory-downloadable-block-info__icon",
1780      icon: library_update
1781    }), // translators: %s: Humanized date of last update e.g: "2 months ago".
1782    Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Updated %s'), humanizedUpdated)));
1783  }
1784  
1785  /* harmony default export */ var downloadable_block_info = (DownloadableBlockInfo);
1786  
1787  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js
1788  
1789  
1790  /**
1791   * WordPress dependencies
1792   */
1793  
1794  
1795  
1796  /**
1797   * Internal dependencies
1798   */
1799  
1800  
1801  var downloadable_block_notice_DownloadableBlockNotice = function DownloadableBlockNotice(_ref) {
1802    var block = _ref.block,
1803        _onClick = _ref.onClick;
1804    var errorNotice = Object(external_wp_data_["useSelect"])(function (select) {
1805      return select(store).getErrorNoticeForBlock(block.id);
1806    }, [block]);
1807  
1808    if (!errorNotice) {
1809      return null;
1810    }
1811  
1812    return Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
1813      status: "error",
1814      isDismissible: false,
1815      className: "block-directory-downloadable-block-notice"
1816    }, Object(external_wp_element_["createElement"])("div", {
1817      className: "block-directory-downloadable-block-notice__content"
1818    }, errorNotice.message), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
1819      isSmall: true,
1820      isPrimary: true,
1821      onClick: function onClick() {
1822        if (errorNotice.isFatal) {
1823          window.location.reload();
1824          return false;
1825        }
1826  
1827        _onClick(block);
1828      }
1829    }, errorNotice.isFatal ? Object(external_wp_i18n_["__"])('Reload') : Object(external_wp_i18n_["__"])('Retry')));
1830  };
1831  /* harmony default export */ var downloadable_block_notice = (downloadable_block_notice_DownloadableBlockNotice);
1832  
1833  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js
1834  
1835  
1836  /**
1837   * WordPress dependencies
1838   */
1839  
1840  /**
1841   * Internal dependencies
1842   */
1843  
1844  
1845  
1846  
1847  
1848  
1849  function DownloadableBlockListItem(_ref) {
1850    var item = _ref.item,
1851        onClick = _ref.onClick;
1852  
1853    var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
1854      var _select = select(store),
1855          isInstalling = _select.isInstalling,
1856          getErrorNoticeForBlock = _select.getErrorNoticeForBlock;
1857  
1858      var notice = getErrorNoticeForBlock(item.id);
1859      var hasFatal = notice && notice.isFatal;
1860      return {
1861        isLoading: isInstalling(item.id),
1862        isInstallable: !hasFatal
1863      };
1864    }, [item]),
1865        isLoading = _useSelect.isLoading,
1866        isInstallable = _useSelect.isInstallable;
1867  
1868    var icon = item.icon,
1869        title = item.title,
1870        description = item.description,
1871        rating = item.rating,
1872        activeInstalls = item.activeInstalls,
1873        ratingCount = item.ratingCount,
1874        author = item.author,
1875        humanizedUpdated = item.humanizedUpdated,
1876        authorBlockCount = item.authorBlockCount,
1877        authorBlockRating = item.authorBlockRating;
1878    return Object(external_wp_element_["createElement"])("li", {
1879      className: "block-directory-downloadable-block-list-item"
1880    }, Object(external_wp_element_["createElement"])("article", {
1881      className: "block-directory-downloadable-block-list-item__panel"
1882    }, Object(external_wp_element_["createElement"])("header", {
1883      className: "block-directory-downloadable-block-list-item__header"
1884    }, Object(external_wp_element_["createElement"])(downloadable_block_header, {
1885      icon: icon,
1886      onClick: onClick,
1887      title: title,
1888      rating: rating,
1889      ratingCount: ratingCount,
1890      isLoading: isLoading,
1891      isInstallable: isInstallable
1892    })), Object(external_wp_element_["createElement"])("section", {
1893      className: "block-directory-downloadable-block-list-item__body"
1894    }, Object(external_wp_element_["createElement"])(downloadable_block_notice, {
1895      onClick: onClick,
1896      block: item
1897    }), Object(external_wp_element_["createElement"])(downloadable_block_info, {
1898      activeInstalls: activeInstalls,
1899      description: description,
1900      humanizedUpdated: humanizedUpdated
1901    })), Object(external_wp_element_["createElement"])("footer", {
1902      className: "block-directory-downloadable-block-list-item__footer"
1903    }, Object(external_wp_element_["createElement"])(downloadable_block_author_info, {
1904      author: author,
1905      authorBlockCount: authorBlockCount,
1906      authorBlockRating: authorBlockRating
1907    }))));
1908  }
1909  
1910  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js
1911  
1912  
1913  /**
1914   * External dependencies
1915   */
1916  
1917  /**
1918   * WordPress dependencies
1919   */
1920  
1921  
1922  
1923  /**
1924   * Internal dependencies
1925   */
1926  
1927  
1928  
1929  
1930  function DownloadableBlocksList(_ref) {
1931    var items = _ref.items,
1932        _ref$onHover = _ref.onHover,
1933        onHover = _ref$onHover === void 0 ? external_lodash_["noop"] : _ref$onHover,
1934        onSelect = _ref.onSelect;
1935  
1936    var _useDispatch = Object(external_wp_data_["useDispatch"])(store),
1937        installBlockType = _useDispatch.installBlockType;
1938  
1939    if (!items.length) {
1940      return null;
1941    }
1942  
1943    return (
1944      /*
1945       * Disable reason: The `list` ARIA role is redundant but
1946       * Safari+VoiceOver won't announce the list otherwise.
1947       */
1948  
1949      /* eslint-disable jsx-a11y/no-redundant-roles */
1950      Object(external_wp_element_["createElement"])("ul", {
1951        role: "list",
1952        className: "block-directory-downloadable-blocks-list"
1953      }, items.map(function (item) {
1954        return Object(external_wp_element_["createElement"])(DownloadableBlockListItem, {
1955          key: item.id,
1956          onClick: function onClick() {
1957            // Check if the block is registered (`getBlockType`
1958            // will return an object). If so, insert the block.
1959            // This prevents installing existing plugins.
1960            if (Object(external_wp_blocks_["getBlockType"])(item.name)) {
1961              onSelect(item);
1962            } else {
1963              installBlockType(item).then(function (success) {
1964                if (success) {
1965                  onSelect(item);
1966                }
1967              });
1968            }
1969  
1970            onHover(null);
1971          },
1972          item: item
1973        });
1974      }))
1975      /* eslint-enable jsx-a11y/no-redundant-roles */
1976  
1977    );
1978  }
1979  
1980  /* harmony default export */ var downloadable_blocks_list = (DownloadableBlocksList);
1981  
1982  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js
1983  
1984  
1985  /**
1986   * WordPress dependencies
1987   */
1988  
1989  
1990  
1991  
1992  
1993  
1994  
1995  /**
1996   * Internal dependencies
1997   */
1998  
1999  
2000  
2001  
2002  function DownloadableBlocksPanel(_ref) {
2003    var downloadableItems = _ref.downloadableItems,
2004        onSelect = _ref.onSelect,
2005        onHover = _ref.onHover,
2006        hasPermission = _ref.hasPermission,
2007        isLoading = _ref.isLoading,
2008        isWaiting = _ref.isWaiting;
2009    var debouncedSpeak = Object(external_wp_compose_["useDebounce"])(external_wp_a11y_["speak"], 500);
2010  
2011    if (false === hasPermission) {
2012      debouncedSpeak(Object(external_wp_i18n_["__"])('No blocks found in your library.'));
2013      return Object(external_wp_element_["createElement"])("p", {
2014        className: "block-directory-downloadable-blocks-panel__description has-no-results"
2015      }, Object(external_wp_i18n_["__"])('No blocks found in your library.'));
2016    }
2017  
2018    if (typeof hasPermission === 'undefined' || isLoading || isWaiting) {
2019      return Object(external_wp_element_["createElement"])("p", {
2020        className: "block-directory-downloadable-blocks-panel__description has-no-results"
2021      }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null));
2022    }
2023  
2024    if (!downloadableItems.length) {
2025      return Object(external_wp_element_["createElement"])("p", {
2026        className: "block-directory-downloadable-blocks-panel__description has-no-results"
2027      }, Object(external_wp_i18n_["__"])('No blocks found in your library.'));
2028    }
2029  
2030    var resultsFoundMessage = Object(external_wp_i18n_["sprintf"])(
2031    /* translators: %s: number of available blocks. */
2032    Object(external_wp_i18n_["_n"])('No blocks found in your library. We did find %d block available for download.', 'No blocks found in your library. We did find %d blocks available for download.', downloadableItems.length), downloadableItems.length);
2033    debouncedSpeak(resultsFoundMessage);
2034    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("p", {
2035      className: "block-directory-downloadable-blocks-panel__description"
2036    }, Object(external_wp_i18n_["__"])('No blocks found in your library. These blocks can be downloaded and installed:')), Object(external_wp_element_["createElement"])(downloadable_blocks_list, {
2037      items: downloadableItems,
2038      onSelect: onSelect,
2039      onHover: onHover
2040    }));
2041  }
2042  
2043  /* harmony default export */ var downloadable_blocks_panel = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(function (select, _ref2) {
2044    var filterValue = _ref2.filterValue,
2045        _ref2$rootClientId = _ref2.rootClientId,
2046        rootClientId = _ref2$rootClientId === void 0 ? null : _ref2$rootClientId;
2047  
2048    var _select = select(store),
2049        getDownloadableBlocks = _select.getDownloadableBlocks,
2050        isRequestingDownloadableBlocks = _select.isRequestingDownloadableBlocks;
2051  
2052    var _select2 = select(external_wp_blockEditor_["store"]),
2053        canInsertBlockType = _select2.canInsertBlockType;
2054  
2055    var hasPermission = select('core').canUser('read', 'block-directory/search');
2056  
2057    function getInstallableBlocks(term) {
2058      return getDownloadableBlocks(term).filter(function (block) {
2059        return canInsertBlockType(block, rootClientId, true);
2060      });
2061    }
2062  
2063    var downloadableItems = hasPermission ? getInstallableBlocks(filterValue) : [];
2064    var isLoading = isRequestingDownloadableBlocks(filterValue);
2065    return {
2066      downloadableItems: downloadableItems,
2067      hasPermission: hasPermission,
2068      isLoading: isLoading
2069    };
2070  })])(DownloadableBlocksPanel));
2071  
2072  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js
2073  
2074  
2075  
2076  /**
2077   * External dependencies
2078   */
2079  
2080  /**
2081   * WordPress dependencies
2082   */
2083  
2084  
2085  
2086  /**
2087   * Internal dependencies
2088   */
2089  
2090  
2091  
2092  function InserterMenuDownloadableBlocksPanel() {
2093    var _useState = Object(external_wp_element_["useState"])(''),
2094        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
2095        debouncedFilterValue = _useState2[0],
2096        setFilterValue = _useState2[1];
2097  
2098    var debouncedSetFilterValue = Object(external_lodash_["debounce"])(setFilterValue, 400);
2099    return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalInserterMenuExtension"], null, function (_ref) {
2100      var onSelect = _ref.onSelect,
2101          onHover = _ref.onHover,
2102          filterValue = _ref.filterValue,
2103          hasItems = _ref.hasItems,
2104          rootClientId = _ref.rootClientId;
2105  
2106      if (hasItems || !filterValue) {
2107        return null;
2108      }
2109  
2110      if (debouncedFilterValue !== filterValue) {
2111        debouncedSetFilterValue(filterValue);
2112      }
2113  
2114      return Object(external_wp_element_["createElement"])(downloadable_blocks_panel, {
2115        onSelect: onSelect,
2116        onHover: onHover,
2117        rootClientId: rootClientId,
2118        filterValue: debouncedFilterValue,
2119        isWaiting: filterValue !== debouncedFilterValue
2120      });
2121    });
2122  }
2123  
2124  /* harmony default export */ var inserter_menu_downloadable_blocks_panel = (InserterMenuDownloadableBlocksPanel);
2125  
2126  // EXTERNAL MODULE: external ["wp","editPost"]
2127  var external_wp_editPost_ = __webpack_require__(278);
2128  
2129  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
2130  var block_default = __webpack_require__(215);
2131  
2132  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/compact-list/index.js
2133  
2134  
2135  /**
2136   * WordPress dependencies
2137   */
2138  
2139  /**
2140   * Internal dependencies
2141   */
2142  
2143  
2144  function CompactList(_ref) {
2145    var items = _ref.items;
2146  
2147    if (!items.length) {
2148      return null;
2149    }
2150  
2151    return Object(external_wp_element_["createElement"])("ul", {
2152      className: "block-directory-compact-list"
2153    }, items.map(function (_ref2) {
2154      var icon = _ref2.icon,
2155          id = _ref2.id,
2156          title = _ref2.title,
2157          author = _ref2.author;
2158      return Object(external_wp_element_["createElement"])("li", {
2159        key: id,
2160        className: "block-directory-compact-list__item"
2161      }, Object(external_wp_element_["createElement"])(downloadable_block_icon, {
2162        icon: icon,
2163        title: title
2164      }), Object(external_wp_element_["createElement"])("div", {
2165        className: "block-directory-compact-list__item-details"
2166      }, Object(external_wp_element_["createElement"])("div", {
2167        className: "block-directory-compact-list__item-title"
2168      }, title), Object(external_wp_element_["createElement"])("div", {
2169        className: "block-directory-compact-list__item-author"
2170      }, Object(external_wp_i18n_["sprintf"])(
2171      /* translators: %s: Name of the block author. */
2172      Object(external_wp_i18n_["__"])('By %s'), author))));
2173    }));
2174  }
2175  
2176  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.js
2177  
2178  
2179  /**
2180   * WordPress dependencies
2181   */
2182  
2183  
2184  
2185  
2186  /**
2187   * Internal dependencies
2188   */
2189  
2190  
2191  
2192  function InstalledBlocksPrePublishPanel() {
2193    var newBlockTypes = Object(external_wp_data_["useSelect"])(function (select) {
2194      return select(store).getNewBlockTypes();
2195    }, []);
2196  
2197    if (!newBlockTypes.length) {
2198      return null;
2199    }
2200  
2201    return Object(external_wp_element_["createElement"])(external_wp_editPost_["PluginPrePublishPanel"], {
2202      icon: block_default["a" /* default */],
2203      title: Object(external_wp_i18n_["sprintf"])( // translators: %d: number of blocks (number).
2204      Object(external_wp_i18n_["_n"])('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length),
2205      initialOpen: true
2206    }, Object(external_wp_element_["createElement"])("p", {
2207      className: "installed-blocks-pre-publish-panel__copy"
2208    }, Object(external_wp_i18n_["_n"])('The following block has been added to your site.', 'The following blocks have been added to your site.', newBlockTypes.length)), Object(external_wp_element_["createElement"])(CompactList, {
2209      items: newBlockTypes
2210    }));
2211  }
2212  
2213  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
2214  var objectWithoutProperties = __webpack_require__(13);
2215  
2216  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2217  var esm_extends = __webpack_require__(8);
2218  
2219  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/install-button.js
2220  
2221  
2222  
2223  /**
2224   * WordPress dependencies
2225   */
2226  
2227  
2228  
2229  
2230  /**
2231   * Internal dependencies
2232   */
2233  
2234  
2235  function InstallButton(_ref) {
2236    var attributes = _ref.attributes,
2237        block = _ref.block,
2238        clientId = _ref.clientId;
2239    var isInstallingBlock = Object(external_wp_data_["useSelect"])(function (select) {
2240      return select(store).isInstalling(block.id);
2241    });
2242  
2243    var _useDispatch = Object(external_wp_data_["useDispatch"])(store),
2244        installBlockType = _useDispatch.installBlockType;
2245  
2246    var _useDispatch2 = Object(external_wp_data_["useDispatch"])('core/block-editor'),
2247        replaceBlock = _useDispatch2.replaceBlock;
2248  
2249    return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2250      onClick: function onClick() {
2251        return installBlockType(block).then(function (success) {
2252          if (success) {
2253            var blockType = Object(external_wp_blocks_["getBlockType"])(block.name);
2254  
2255            var _parse = Object(external_wp_blocks_["parse"])(attributes.originalContent),
2256                _parse2 = Object(slicedToArray["a" /* default */])(_parse, 1),
2257                originalBlock = _parse2[0];
2258  
2259            if (originalBlock) {
2260              replaceBlock(clientId, Object(external_wp_blocks_["createBlock"])(blockType.name, originalBlock.attributes, originalBlock.innerBlocks));
2261            }
2262          }
2263        });
2264      },
2265      disabled: isInstallingBlock,
2266      isBusy: isInstallingBlock,
2267      isPrimary: true
2268    }, Object(external_wp_i18n_["sprintf"])(
2269    /* translators: %s: block name */
2270    Object(external_wp_i18n_["__"])('Install %s'), block.title));
2271  }
2272  
2273  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/index.js
2274  
2275  
2276  
2277  
2278  /**
2279   * WordPress dependencies
2280   */
2281  
2282  
2283  
2284  
2285  
2286  
2287  /**
2288   * Internal dependencies
2289   */
2290  
2291  
2292  
2293  
2294  var get_install_missing_getInstallMissing = function getInstallMissing(OriginalComponent) {
2295    return function (props) {
2296      var originalName = props.attributes.originalName; // Disable reason: This is a valid component, but it's mistaken for a callback.
2297      // eslint-disable-next-line react-hooks/rules-of-hooks
2298  
2299      var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
2300        var _select = select(store),
2301            getDownloadableBlocks = _select.getDownloadableBlocks;
2302  
2303        var blocks = getDownloadableBlocks('block:' + originalName).filter(function (_ref) {
2304          var name = _ref.name;
2305          return originalName === name;
2306        });
2307        return {
2308          hasPermission: select('core').canUser('read', 'block-directory/search'),
2309          block: blocks.length && blocks[0]
2310        };
2311      }, [originalName]),
2312          block = _useSelect.block,
2313          hasPermission = _useSelect.hasPermission; // The user can't install blocks, or the block isn't available for download.
2314  
2315  
2316      if (!hasPermission || !block) {
2317        return Object(external_wp_element_["createElement"])(OriginalComponent, props);
2318      }
2319  
2320      return Object(external_wp_element_["createElement"])(get_install_missing_ModifiedWarning, Object(esm_extends["a" /* default */])({}, props, {
2321        originalBlock: block
2322      }));
2323    };
2324  };
2325  
2326  var get_install_missing_ModifiedWarning = function ModifiedWarning(_ref2) {
2327    var originalBlock = _ref2.originalBlock,
2328        props = Object(objectWithoutProperties["a" /* default */])(_ref2, ["originalBlock"]);
2329  
2330    var _props$attributes = props.attributes,
2331        originalName = _props$attributes.originalName,
2332        originalUndelimitedContent = _props$attributes.originalUndelimitedContent;
2333  
2334    var _useDispatch = Object(external_wp_data_["useDispatch"])('core/block-editor'),
2335        replaceBlock = _useDispatch.replaceBlock;
2336  
2337    var convertToHTML = function convertToHTML() {
2338      replaceBlock(props.clientId, Object(external_wp_blocks_["createBlock"])('core/html', {
2339        content: originalUndelimitedContent
2340      }));
2341    };
2342  
2343    var hasContent = !!originalUndelimitedContent;
2344    var hasHTMLBlock = Object(external_wp_blocks_["getBlockType"])('core/html');
2345    var messageHTML = Object(external_wp_i18n_["sprintf"])(
2346    /* translators: %s: block name */
2347    Object(external_wp_i18n_["__"])('Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely!'), originalBlock.title || originalName);
2348    var actions = [Object(external_wp_element_["createElement"])(InstallButton, {
2349      key: "install",
2350      block: originalBlock,
2351      attributes: props.attributes,
2352      clientId: props.clientId
2353    })];
2354  
2355    if (hasContent && hasHTMLBlock) {
2356      messageHTML = Object(external_wp_i18n_["sprintf"])(
2357      /* translators: %s: block name */
2358      Object(external_wp_i18n_["__"])('Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'), originalBlock.title || originalName);
2359      actions.push(Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2360        key: "convert",
2361        onClick: convertToHTML,
2362        isLink: true
2363      }, Object(external_wp_i18n_["__"])('Keep as HTML')));
2364    }
2365  
2366    return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], {
2367      actions: actions
2368    }, messageHTML), Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, originalUndelimitedContent));
2369  };
2370  
2371  /* harmony default export */ var get_install_missing = (get_install_missing_getInstallMissing);
2372  
2373  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/index.js
2374  
2375  
2376  /**
2377   * WordPress dependencies
2378   */
2379  
2380  
2381  /**
2382   * Internal dependencies
2383   */
2384  
2385  
2386  
2387  
2388  
2389  Object(external_wp_plugins_["registerPlugin"])('block-directory', {
2390    render: function render() {
2391      return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(AutoBlockUninstaller, null), Object(external_wp_element_["createElement"])(inserter_menu_downloadable_blocks_panel, null), Object(external_wp_element_["createElement"])(InstalledBlocksPrePublishPanel, null));
2392    }
2393  });
2394  Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'block-directory/fallback', function (settings, name) {
2395    if (name !== 'core/missing') {
2396      return settings;
2397    }
2398  
2399    settings.edit = get_install_missing(settings.edit);
2400    return settings;
2401  });
2402  
2403  // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/index.js
2404  /**
2405   * Internal dependencies
2406   */
2407  
2408  
2409  
2410  
2411  /***/ }),
2412  
2413  /***/ 47:
2414  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2415  
2416  "use strict";
2417  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
2418  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2419    try {
2420      var info = gen[key](arg);
2421      var value = info.value;
2422    } catch (error) {
2423      reject(error);
2424      return;
2425    }
2426  
2427    if (info.done) {
2428      resolve(value);
2429    } else {
2430      Promise.resolve(value).then(_next, _throw);
2431    }
2432  }
2433  
2434  function _asyncToGenerator(fn) {
2435    return function () {
2436      var self = this,
2437          args = arguments;
2438      return new Promise(function (resolve, reject) {
2439        var gen = fn.apply(self, args);
2440  
2441        function _next(value) {
2442          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
2443        }
2444  
2445        function _throw(err) {
2446          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
2447        }
2448  
2449        _next(undefined);
2450      });
2451    };
2452  }
2453  
2454  /***/ }),
2455  
2456  /***/ 48:
2457  /***/ (function(module, exports) {
2458  
2459  (function() { module.exports = window["wp"]["a11y"]; }());
2460  
2461  /***/ }),
2462  
2463  /***/ 49:
2464  /***/ (function(module, exports) {
2465  
2466  (function() { module.exports = window["wp"]["dataControls"]; }());
2467  
2468  /***/ }),
2469  
2470  /***/ 5:
2471  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2472  
2473  "use strict";
2474  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
2475  function _defineProperty(obj, key, value) {
2476    if (key in obj) {
2477      Object.defineProperty(obj, key, {
2478        value: value,
2479        enumerable: true,
2480        configurable: true,
2481        writable: true
2482      });
2483    } else {
2484      obj[key] = value;
2485    }
2486  
2487    return obj;
2488  }
2489  
2490  /***/ }),
2491  
2492  /***/ 50:
2493  /***/ (function(module, exports) {
2494  
2495  (function() { module.exports = window["wp"]["apiFetch"]; }());
2496  
2497  /***/ }),
2498  
2499  /***/ 51:
2500  /***/ (function(module, exports) {
2501  
2502  (function() { module.exports = window["wp"]["notices"]; }());
2503  
2504  /***/ }),
2505  
2506  /***/ 6:
2507  /***/ (function(module, exports) {
2508  
2509  (function() { module.exports = window["wp"]["blockEditor"]; }());
2510  
2511  /***/ }),
2512  
2513  /***/ 64:
2514  /***/ (function(module, exports) {
2515  
2516  (function() { module.exports = window["wp"]["htmlEntities"]; }());
2517  
2518  /***/ }),
2519  
2520  /***/ 7:
2521  /***/ (function(module, exports) {
2522  
2523  (function() { module.exports = window["wp"]["primitives"]; }());
2524  
2525  /***/ }),
2526  
2527  /***/ 73:
2528  /***/ (function(module, exports) {
2529  
2530  (function() { module.exports = window["wp"]["plugins"]; }());
2531  
2532  /***/ }),
2533  
2534  /***/ 8:
2535  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2536  
2537  "use strict";
2538  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
2539  function _extends() {
2540    _extends = Object.assign || function (target) {
2541      for (var i = 1; i < arguments.length; i++) {
2542        var source = arguments[i];
2543  
2544        for (var key in source) {
2545          if (Object.prototype.hasOwnProperty.call(source, key)) {
2546            target[key] = source[key];
2547          }
2548        }
2549      }
2550  
2551      return target;
2552    };
2553  
2554    return _extends.apply(this, arguments);
2555  }
2556  
2557  /***/ }),
2558  
2559  /***/ 9:
2560  /***/ (function(module, exports) {
2561  
2562  (function() { module.exports = window["wp"]["blocks"]; }());
2563  
2564  /***/ })
2565  
2566  /******/ });


Generated: Sat Mar 6 01:00:04 2021 Cross-referenced by PHPXref 0.7.1