[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["editor"] =
   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 = 439);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = this["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 10:
 105  /***/ (function(module, exports) {
 106  
 107  (function() { module.exports = this["wp"]["blocks"]; }());
 108  
 109  /***/ }),
 110  
 111  /***/ 100:
 112  /***/ (function(module, exports) {
 113  
 114  (function() { module.exports = this["wp"]["notices"]; }());
 115  
 116  /***/ }),
 117  
 118  /***/ 103:
 119  /***/ (function(module, exports) {
 120  
 121  (function() { module.exports = this["wp"]["autop"]; }());
 122  
 123  /***/ }),
 124  
 125  /***/ 11:
 126  /***/ (function(module, exports, __webpack_require__) {
 127  
 128  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 129    Copyright (c) 2017 Jed Watson.
 130    Licensed under the MIT License (MIT), see
 131    http://jedwatson.github.io/classnames
 132  */
 133  /* global define */
 134  
 135  (function () {
 136      'use strict';
 137  
 138      var hasOwn = {}.hasOwnProperty;
 139  
 140  	function classNames () {
 141          var classes = [];
 142  
 143          for (var i = 0; i < arguments.length; i++) {
 144              var arg = arguments[i];
 145              if (!arg) continue;
 146  
 147              var argType = typeof arg;
 148  
 149              if (argType === 'string' || argType === 'number') {
 150                  classes.push(arg);
 151              } else if (Array.isArray(arg) && arg.length) {
 152                  var inner = classNames.apply(null, arg);
 153                  if (inner) {
 154                      classes.push(inner);
 155                  }
 156              } else if (argType === 'object') {
 157                  for (var key in arg) {
 158                      if (hasOwn.call(arg, key) && arg[key]) {
 159                          classes.push(key);
 160                      }
 161                  }
 162              }
 163          }
 164  
 165          return classes.join(' ');
 166      }
 167  
 168      if ( true && module.exports) {
 169          classNames.default = classNames;
 170          module.exports = classNames;
 171      } else if (true) {
 172          // register as 'classnames', consistent with npm package name
 173          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 174              return classNames;
 175          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 176                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 177      } else {}
 178  }());
 179  
 180  
 181  /***/ }),
 182  
 183  /***/ 110:
 184  /***/ (function(module, exports, __webpack_require__) {
 185  
 186  "use strict";
 187  
 188  
 189  function flattenIntoMap( map, effects ) {
 190      var i;
 191      if ( Array.isArray( effects ) ) {
 192          for ( i = 0; i < effects.length; i++ ) {
 193              flattenIntoMap( map, effects[ i ] );
 194          }
 195      } else {
 196          for ( i in effects ) {
 197              map[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );
 198          }
 199      }
 200  }
 201  
 202  function refx( effects ) {
 203      var map = {},
 204          middleware;
 205  
 206      flattenIntoMap( map, effects );
 207  
 208      middleware = function( store ) {
 209          return function( next ) {
 210              return function( action ) {
 211                  var handlers = map[ action.type ],
 212                      result = next( action ),
 213                      i, handlerAction;
 214  
 215                  if ( handlers ) {
 216                      for ( i = 0; i < handlers.length; i++ ) {
 217                          handlerAction = handlers[ i ]( action, store );
 218                          if ( handlerAction ) {
 219                              store.dispatch( handlerAction );
 220                          }
 221                      }
 222                  }
 223  
 224                  return result;
 225              };
 226          };
 227      };
 228  
 229      middleware.effects = map;
 230  
 231      return middleware;
 232  }
 233  
 234  module.exports = refx;
 235  
 236  
 237  /***/ }),
 238  
 239  /***/ 12:
 240  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 241  
 242  "use strict";
 243  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 244  function _assertThisInitialized(self) {
 245    if (self === void 0) {
 246      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 247    }
 248  
 249    return self;
 250  }
 251  
 252  /***/ }),
 253  
 254  /***/ 13:
 255  /***/ (function(module, exports) {
 256  
 257  (function() { module.exports = this["React"]; }());
 258  
 259  /***/ }),
 260  
 261  /***/ 134:
 262  /***/ (function(module, exports, __webpack_require__) {
 263  
 264  module.exports = __webpack_require__(422);
 265  
 266  
 267  /***/ }),
 268  
 269  /***/ 137:
 270  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 271  
 272  "use strict";
 273  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
 274  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
 275  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 276  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 277  
 278  
 279  
 280  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; }
 281  
 282  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; }
 283  
 284  /**
 285   * WordPress dependencies
 286   */
 287   // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
 288  
 289  /* eslint-disable jsdoc/valid-types */
 290  
 291  /** @typedef {{icon: JSX.Element, size?: number} & import('react').ComponentPropsWithoutRef<'SVG'>} IconProps */
 292  
 293  /* eslint-enable jsdoc/valid-types */
 294  
 295  /**
 296   * Return an SVG icon.
 297   *
 298   * @param {IconProps} props icon is the SVG component to render
 299   *                          size is a number specifiying the icon size in pixels
 300   *                          Other props will be passed to wrapped SVG component
 301   *
 302   * @return {JSX.Element}  Icon component
 303   */
 304  
 305  function Icon(_ref) {
 306    var icon = _ref.icon,
 307        _ref$size = _ref.size,
 308        size = _ref$size === void 0 ? 24 : _ref$size,
 309        props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]);
 310  
 311    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({
 312      width: size,
 313      height: size
 314    }, props));
 315  }
 316  
 317  /* harmony default export */ __webpack_exports__["a"] = (Icon);
 318  
 319  
 320  /***/ }),
 321  
 322  /***/ 138:
 323  /***/ (function(module, exports, __webpack_require__) {
 324  
 325  "use strict";
 326  /**
 327   * Copyright (c) 2013-present, Facebook, Inc.
 328   *
 329   * This source code is licensed under the MIT license found in the
 330   * LICENSE file in the root directory of this source tree.
 331   */
 332  
 333  
 334  
 335  var ReactPropTypesSecret = __webpack_require__(139);
 336  
 337  function emptyFunction() {}
 338  function emptyFunctionWithReset() {}
 339  emptyFunctionWithReset.resetWarningCache = emptyFunction;
 340  
 341  module.exports = function() {
 342    function shim(props, propName, componentName, location, propFullName, secret) {
 343      if (secret === ReactPropTypesSecret) {
 344        // It is still safe when called from React.
 345        return;
 346      }
 347      var err = new Error(
 348        'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
 349        'Use PropTypes.checkPropTypes() to call them. ' +
 350        'Read more at http://fb.me/use-check-prop-types'
 351      );
 352      err.name = 'Invariant Violation';
 353      throw err;
 354    };
 355    shim.isRequired = shim;
 356    function getShim() {
 357      return shim;
 358    };
 359    // Important!
 360    // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
 361    var ReactPropTypes = {
 362      array: shim,
 363      bool: shim,
 364      func: shim,
 365      number: shim,
 366      object: shim,
 367      string: shim,
 368      symbol: shim,
 369  
 370      any: shim,
 371      arrayOf: getShim,
 372      element: shim,
 373      elementType: shim,
 374      instanceOf: getShim,
 375      node: shim,
 376      objectOf: getShim,
 377      oneOf: getShim,
 378      oneOfType: getShim,
 379      shape: getShim,
 380      exact: getShim,
 381  
 382      checkPropTypes: emptyFunctionWithReset,
 383      resetWarningCache: emptyFunction
 384    };
 385  
 386    ReactPropTypes.PropTypes = ReactPropTypes;
 387  
 388    return ReactPropTypes;
 389  };
 390  
 391  
 392  /***/ }),
 393  
 394  /***/ 139:
 395  /***/ (function(module, exports, __webpack_require__) {
 396  
 397  "use strict";
 398  /**
 399   * Copyright (c) 2013-present, Facebook, Inc.
 400   *
 401   * This source code is licensed under the MIT license found in the
 402   * LICENSE file in the root directory of this source tree.
 403   */
 404  
 405  
 406  
 407  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
 408  
 409  module.exports = ReactPropTypesSecret;
 410  
 411  
 412  /***/ }),
 413  
 414  /***/ 14:
 415  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 416  
 417  "use strict";
 418  
 419  // EXPORTS
 420  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 421  
 422  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 423  var arrayWithHoles = __webpack_require__(38);
 424  
 425  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 426  function _iterableToArrayLimit(arr, i) {
 427    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 428    var _arr = [];
 429    var _n = true;
 430    var _d = false;
 431    var _e = undefined;
 432  
 433    try {
 434      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 435        _arr.push(_s.value);
 436  
 437        if (i && _arr.length === i) break;
 438      }
 439    } catch (err) {
 440      _d = true;
 441      _e = err;
 442    } finally {
 443      try {
 444        if (!_n && _i["return"] != null) _i["return"]();
 445      } finally {
 446        if (_d) throw _e;
 447      }
 448    }
 449  
 450    return _arr;
 451  }
 452  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 453  var unsupportedIterableToArray = __webpack_require__(29);
 454  
 455  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 456  var nonIterableRest = __webpack_require__(39);
 457  
 458  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 459  
 460  
 461  
 462  
 463  function _slicedToArray(arr, i) {
 464    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 465  }
 466  
 467  /***/ }),
 468  
 469  /***/ 147:
 470  /***/ (function(module, exports) {
 471  
 472  (function() { module.exports = this["wp"]["wordcount"]; }());
 473  
 474  /***/ }),
 475  
 476  /***/ 15:
 477  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 478  
 479  "use strict";
 480  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 481  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
 482  
 483  function _objectWithoutProperties(source, excluded) {
 484    if (source == null) return {};
 485    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 486    var key, i;
 487  
 488    if (Object.getOwnPropertySymbols) {
 489      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 490  
 491      for (i = 0; i < sourceSymbolKeys.length; i++) {
 492        key = sourceSymbolKeys[i];
 493        if (excluded.indexOf(key) >= 0) continue;
 494        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 495        target[key] = source[key];
 496      }
 497    }
 498  
 499    return target;
 500  }
 501  
 502  /***/ }),
 503  
 504  /***/ 151:
 505  /***/ (function(module, exports) {
 506  
 507  (function() { module.exports = this["wp"]["mediaUtils"]; }());
 508  
 509  /***/ }),
 510  
 511  /***/ 153:
 512  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 513  
 514  "use strict";
 515  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 516  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 517  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
 518  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 519  
 520  
 521  /**
 522   * WordPress dependencies
 523   */
 524  
 525  var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 526    xmlns: "http://www.w3.org/2000/svg",
 527    viewBox: "0 0 24 24"
 528  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 529    d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
 530  }));
 531  /* harmony default export */ __webpack_exports__["a"] = (close);
 532  
 533  
 534  /***/ }),
 535  
 536  /***/ 154:
 537  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 538  
 539  "use strict";
 540  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 541  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 542  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
 543  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 544  
 545  
 546  /**
 547   * WordPress dependencies
 548   */
 549  
 550  var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 551    xmlns: "http://www.w3.org/2000/svg",
 552    viewBox: "0 0 24 24"
 553  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 554    d: "M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"
 555  }));
 556  /* harmony default export */ __webpack_exports__["a"] = (check);
 557  
 558  
 559  /***/ }),
 560  
 561  /***/ 16:
 562  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 563  
 564  "use strict";
 565  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 566  function _getPrototypeOf(o) {
 567    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 568      return o.__proto__ || Object.getPrototypeOf(o);
 569    };
 570    return _getPrototypeOf(o);
 571  }
 572  
 573  /***/ }),
 574  
 575  /***/ 172:
 576  /***/ (function(module, exports, __webpack_require__) {
 577  
 578  "use strict";
 579  
 580  var __extends = (this && this.__extends) || (function () {
 581      var extendStatics = Object.setPrototypeOf ||
 582          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
 583          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
 584      return function (d, b) {
 585          extendStatics(d, b);
 586          function __() { this.constructor = d; }
 587          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
 588      };
 589  })();
 590  var __assign = (this && this.__assign) || Object.assign || function(t) {
 591      for (var s, i = 1, n = arguments.length; i < n; i++) {
 592          s = arguments[i];
 593          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
 594              t[p] = s[p];
 595      }
 596      return t;
 597  };
 598  var __rest = (this && this.__rest) || function (s, e) {
 599      var t = {};
 600      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
 601          t[p] = s[p];
 602      if (s != null && typeof Object.getOwnPropertySymbols === "function")
 603          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
 604              t[p[i]] = s[p[i]];
 605      return t;
 606  };
 607  exports.__esModule = true;
 608  var React = __webpack_require__(13);
 609  var PropTypes = __webpack_require__(28);
 610  var autosize = __webpack_require__(173);
 611  var _getLineHeight = __webpack_require__(174);
 612  var getLineHeight = _getLineHeight;
 613  var UPDATE = 'autosize:update';
 614  var DESTROY = 'autosize:destroy';
 615  var RESIZED = 'autosize:resized';
 616  /**
 617   * A light replacement for built-in textarea component
 618   * which automaticaly adjusts its height to match the content
 619   */
 620  var TextareaAutosize = /** @class */ (function (_super) {
 621      __extends(TextareaAutosize, _super);
 622      function TextareaAutosize() {
 623          var _this = _super !== null && _super.apply(this, arguments) || this;
 624          _this.state = {
 625              lineHeight: null
 626          };
 627          _this.dispatchEvent = function (EVENT_TYPE) {
 628              var event = document.createEvent('Event');
 629              event.initEvent(EVENT_TYPE, true, false);
 630              _this.textarea.dispatchEvent(event);
 631          };
 632          _this.updateLineHeight = function () {
 633              _this.setState({
 634                  lineHeight: getLineHeight(_this.textarea)
 635              });
 636          };
 637          _this.onChange = function (e) {
 638              var onChange = _this.props.onChange;
 639              _this.currentValue = e.currentTarget.value;
 640              onChange && onChange(e);
 641          };
 642          _this.saveDOMNodeRef = function (ref) {
 643              var innerRef = _this.props.innerRef;
 644              if (innerRef) {
 645                  innerRef(ref);
 646              }
 647              _this.textarea = ref;
 648          };
 649          _this.getLocals = function () {
 650              var _a = _this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef"]), lineHeight = _a.state.lineHeight, saveDOMNodeRef = _a.saveDOMNodeRef;
 651              var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
 652              return __assign({}, props, { saveDOMNodeRef: saveDOMNodeRef, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, onChange: _this.onChange });
 653          };
 654          return _this;
 655      }
 656      TextareaAutosize.prototype.componentDidMount = function () {
 657          var _this = this;
 658          var _a = this.props, onResize = _a.onResize, maxRows = _a.maxRows;
 659          if (typeof maxRows === 'number') {
 660              this.updateLineHeight();
 661          }
 662          /*
 663            the defer is needed to:
 664              - force "autosize" to activate the scrollbar when this.props.maxRows is passed
 665              - support StyledComponents (see #71)
 666          */
 667          setTimeout(function () { return autosize(_this.textarea); });
 668          if (onResize) {
 669              this.textarea.addEventListener(RESIZED, onResize);
 670          }
 671      };
 672      TextareaAutosize.prototype.componentWillUnmount = function () {
 673          var onResize = this.props.onResize;
 674          if (onResize) {
 675              this.textarea.removeEventListener(RESIZED, onResize);
 676          }
 677          this.dispatchEvent(DESTROY);
 678      };
 679      TextareaAutosize.prototype.render = function () {
 680          var _a = this.getLocals(), children = _a.children, saveDOMNodeRef = _a.saveDOMNodeRef, locals = __rest(_a, ["children", "saveDOMNodeRef"]);
 681          return (React.createElement("textarea", __assign({}, locals, { ref: saveDOMNodeRef }), children));
 682      };
 683      TextareaAutosize.prototype.componentDidUpdate = function (prevProps) {
 684          if (this.props.value !== this.currentValue || this.props.rows !== prevProps.rows) {
 685              this.dispatchEvent(UPDATE);
 686          }
 687      };
 688      TextareaAutosize.defaultProps = {
 689          rows: 1
 690      };
 691      TextareaAutosize.propTypes = {
 692          rows: PropTypes.number,
 693          maxRows: PropTypes.number,
 694          onResize: PropTypes.func,
 695          innerRef: PropTypes.func
 696      };
 697      return TextareaAutosize;
 698  }(React.Component));
 699  exports["default"] = TextareaAutosize;
 700  
 701  
 702  /***/ }),
 703  
 704  /***/ 173:
 705  /***/ (function(module, exports, __webpack_require__) {
 706  
 707  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 708      autosize 4.0.2
 709      license: MIT
 710      http://www.jacklmoore.com/autosize
 711  */
 712  (function (global, factory) {
 713      if (true) {
 714          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
 715                  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
 716                  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
 717                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 718      } else { var mod; }
 719  })(this, function (module, exports) {
 720      'use strict';
 721  
 722      var map = typeof Map === "function" ? new Map() : function () {
 723          var keys = [];
 724          var values = [];
 725  
 726          return {
 727              has: function has(key) {
 728                  return keys.indexOf(key) > -1;
 729              },
 730              get: function get(key) {
 731                  return values[keys.indexOf(key)];
 732              },
 733              set: function set(key, value) {
 734                  if (keys.indexOf(key) === -1) {
 735                      keys.push(key);
 736                      values.push(value);
 737                  }
 738              },
 739              delete: function _delete(key) {
 740                  var index = keys.indexOf(key);
 741                  if (index > -1) {
 742                      keys.splice(index, 1);
 743                      values.splice(index, 1);
 744                  }
 745              }
 746          };
 747      }();
 748  
 749      var createEvent = function createEvent(name) {
 750          return new Event(name, { bubbles: true });
 751      };
 752      try {
 753          new Event('test');
 754      } catch (e) {
 755          // IE does not support `new Event()`
 756          createEvent = function createEvent(name) {
 757              var evt = document.createEvent('Event');
 758              evt.initEvent(name, true, false);
 759              return evt;
 760          };
 761      }
 762  
 763  	function assign(ta) {
 764          if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
 765  
 766          var heightOffset = null;
 767          var clientWidth = null;
 768          var cachedHeight = null;
 769  
 770  		function init() {
 771              var style = window.getComputedStyle(ta, null);
 772  
 773              if (style.resize === 'vertical') {
 774                  ta.style.resize = 'none';
 775              } else if (style.resize === 'both') {
 776                  ta.style.resize = 'horizontal';
 777              }
 778  
 779              if (style.boxSizing === 'content-box') {
 780                  heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
 781              } else {
 782                  heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
 783              }
 784              // Fix when a textarea is not on document body and heightOffset is Not a Number
 785              if (isNaN(heightOffset)) {
 786                  heightOffset = 0;
 787              }
 788  
 789              update();
 790          }
 791  
 792  		function changeOverflow(value) {
 793              {
 794                  // Chrome/Safari-specific fix:
 795                  // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
 796                  // made available by removing the scrollbar. The following forces the necessary text reflow.
 797                  var width = ta.style.width;
 798                  ta.style.width = '0px';
 799                  // Force reflow:
 800                  /* jshint ignore:start */
 801                  ta.offsetWidth;
 802                  /* jshint ignore:end */
 803                  ta.style.width = width;
 804              }
 805  
 806              ta.style.overflowY = value;
 807          }
 808  
 809  		function getParentOverflows(el) {
 810              var arr = [];
 811  
 812              while (el && el.parentNode && el.parentNode instanceof Element) {
 813                  if (el.parentNode.scrollTop) {
 814                      arr.push({
 815                          node: el.parentNode,
 816                          scrollTop: el.parentNode.scrollTop
 817                      });
 818                  }
 819                  el = el.parentNode;
 820              }
 821  
 822              return arr;
 823          }
 824  
 825  		function resize() {
 826              if (ta.scrollHeight === 0) {
 827                  // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
 828                  return;
 829              }
 830  
 831              var overflows = getParentOverflows(ta);
 832              var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
 833  
 834              ta.style.height = '';
 835              ta.style.height = ta.scrollHeight + heightOffset + 'px';
 836  
 837              // used to check if an update is actually necessary on window.resize
 838              clientWidth = ta.clientWidth;
 839  
 840              // prevents scroll-position jumping
 841              overflows.forEach(function (el) {
 842                  el.node.scrollTop = el.scrollTop;
 843              });
 844  
 845              if (docTop) {
 846                  document.documentElement.scrollTop = docTop;
 847              }
 848          }
 849  
 850  		function update() {
 851              resize();
 852  
 853              var styleHeight = Math.round(parseFloat(ta.style.height));
 854              var computed = window.getComputedStyle(ta, null);
 855  
 856              // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
 857              var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
 858  
 859              // The actual height not matching the style height (set via the resize method) indicates that 
 860              // the max-height has been exceeded, in which case the overflow should be allowed.
 861              if (actualHeight < styleHeight) {
 862                  if (computed.overflowY === 'hidden') {
 863                      changeOverflow('scroll');
 864                      resize();
 865                      actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
 866                  }
 867              } else {
 868                  // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
 869                  if (computed.overflowY !== 'hidden') {
 870                      changeOverflow('hidden');
 871                      resize();
 872                      actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
 873                  }
 874              }
 875  
 876              if (cachedHeight !== actualHeight) {
 877                  cachedHeight = actualHeight;
 878                  var evt = createEvent('autosize:resized');
 879                  try {
 880                      ta.dispatchEvent(evt);
 881                  } catch (err) {
 882                      // Firefox will throw an error on dispatchEvent for a detached element
 883                      // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
 884                  }
 885              }
 886          }
 887  
 888          var pageResize = function pageResize() {
 889              if (ta.clientWidth !== clientWidth) {
 890                  update();
 891              }
 892          };
 893  
 894          var destroy = function (style) {
 895              window.removeEventListener('resize', pageResize, false);
 896              ta.removeEventListener('input', update, false);
 897              ta.removeEventListener('keyup', update, false);
 898              ta.removeEventListener('autosize:destroy', destroy, false);
 899              ta.removeEventListener('autosize:update', update, false);
 900  
 901              Object.keys(style).forEach(function (key) {
 902                  ta.style[key] = style[key];
 903              });
 904  
 905              map.delete(ta);
 906          }.bind(ta, {
 907              height: ta.style.height,
 908              resize: ta.style.resize,
 909              overflowY: ta.style.overflowY,
 910              overflowX: ta.style.overflowX,
 911              wordWrap: ta.style.wordWrap
 912          });
 913  
 914          ta.addEventListener('autosize:destroy', destroy, false);
 915  
 916          // IE9 does not fire onpropertychange or oninput for deletions,
 917          // so binding to onkeyup to catch most of those events.
 918          // There is no way that I know of to detect something like 'cut' in IE9.
 919          if ('onpropertychange' in ta && 'oninput' in ta) {
 920              ta.addEventListener('keyup', update, false);
 921          }
 922  
 923          window.addEventListener('resize', pageResize, false);
 924          ta.addEventListener('input', update, false);
 925          ta.addEventListener('autosize:update', update, false);
 926          ta.style.overflowX = 'hidden';
 927          ta.style.wordWrap = 'break-word';
 928  
 929          map.set(ta, {
 930              destroy: destroy,
 931              update: update
 932          });
 933  
 934          init();
 935      }
 936  
 937  	function destroy(ta) {
 938          var methods = map.get(ta);
 939          if (methods) {
 940              methods.destroy();
 941          }
 942      }
 943  
 944  	function update(ta) {
 945          var methods = map.get(ta);
 946          if (methods) {
 947              methods.update();
 948          }
 949      }
 950  
 951      var autosize = null;
 952  
 953      // Do nothing in Node.js environment and IE8 (or lower)
 954      if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
 955          autosize = function autosize(el) {
 956              return el;
 957          };
 958          autosize.destroy = function (el) {
 959              return el;
 960          };
 961          autosize.update = function (el) {
 962              return el;
 963          };
 964      } else {
 965          autosize = function autosize(el, options) {
 966              if (el) {
 967                  Array.prototype.forEach.call(el.length ? el : [el], function (x) {
 968                      return assign(x, options);
 969                  });
 970              }
 971              return el;
 972          };
 973          autosize.destroy = function (el) {
 974              if (el) {
 975                  Array.prototype.forEach.call(el.length ? el : [el], destroy);
 976              }
 977              return el;
 978          };
 979          autosize.update = function (el) {
 980              if (el) {
 981                  Array.prototype.forEach.call(el.length ? el : [el], update);
 982              }
 983              return el;
 984          };
 985      }
 986  
 987      exports.default = autosize;
 988      module.exports = exports['default'];
 989  });
 990  
 991  /***/ }),
 992  
 993  /***/ 174:
 994  /***/ (function(module, exports, __webpack_require__) {
 995  
 996  // Load in dependencies
 997  var computedStyle = __webpack_require__(175);
 998  
 999  /**
1000   * Calculate the `line-height` of a given node
1001   * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
1002   * @returns {Number} `line-height` of the element in pixels
1003   */
1004  function lineHeight(node) {
1005    // Grab the line-height via style
1006    var lnHeightStr = computedStyle(node, 'line-height');
1007    var lnHeight = parseFloat(lnHeightStr, 10);
1008  
1009    // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
1010    if (lnHeightStr === lnHeight + '') {
1011      // Save the old lineHeight style and update the em unit to the element
1012      var _lnHeightStyle = node.style.lineHeight;
1013      node.style.lineHeight = lnHeightStr + 'em';
1014  
1015      // Calculate the em based height
1016      lnHeightStr = computedStyle(node, 'line-height');
1017      lnHeight = parseFloat(lnHeightStr, 10);
1018  
1019      // Revert the lineHeight style
1020      if (_lnHeightStyle) {
1021        node.style.lineHeight = _lnHeightStyle;
1022      } else {
1023        delete node.style.lineHeight;
1024      }
1025    }
1026  
1027    // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
1028    // DEV: `em` units are converted to `pt` in IE6
1029    // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
1030    if (lnHeightStr.indexOf('pt') !== -1) {
1031      lnHeight *= 4;
1032      lnHeight /= 3;
1033    // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
1034    } else if (lnHeightStr.indexOf('mm') !== -1) {
1035      lnHeight *= 96;
1036      lnHeight /= 25.4;
1037    // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
1038    } else if (lnHeightStr.indexOf('cm') !== -1) {
1039      lnHeight *= 96;
1040      lnHeight /= 2.54;
1041    // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
1042    } else if (lnHeightStr.indexOf('in') !== -1) {
1043      lnHeight *= 96;
1044    // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
1045    } else if (lnHeightStr.indexOf('pc') !== -1) {
1046      lnHeight *= 16;
1047    }
1048  
1049    // Continue our computation
1050    lnHeight = Math.round(lnHeight);
1051  
1052    // If the line-height is "normal", calculate by font-size
1053    if (lnHeightStr === 'normal') {
1054      // Create a temporary node
1055      var nodeName = node.nodeName;
1056      var _node = document.createElement(nodeName);
1057      _node.innerHTML = '&nbsp;';
1058  
1059      // If we have a text area, reset it to only 1 row
1060      // https://github.com/twolfson/line-height/issues/4
1061      if (nodeName.toUpperCase() === 'TEXTAREA') {
1062        _node.setAttribute('rows', '1');
1063      }
1064  
1065      // Set the font-size of the element
1066      var fontSizeStr = computedStyle(node, 'font-size');
1067      _node.style.fontSize = fontSizeStr;
1068  
1069      // Remove default padding/border which can affect offset height
1070      // https://github.com/twolfson/line-height/issues/4
1071      // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
1072      _node.style.padding = '0px';
1073      _node.style.border = '0px';
1074  
1075      // Append it to the body
1076      var body = document.body;
1077      body.appendChild(_node);
1078  
1079      // Assume the line height of the element is the height
1080      var height = _node.offsetHeight;
1081      lnHeight = height;
1082  
1083      // Remove our child from the DOM
1084      body.removeChild(_node);
1085    }
1086  
1087    // Return the calculated height
1088    return lnHeight;
1089  }
1090  
1091  // Export lineHeight
1092  module.exports = lineHeight;
1093  
1094  
1095  /***/ }),
1096  
1097  /***/ 175:
1098  /***/ (function(module, exports) {
1099  
1100  // This code has been refactored for 140 bytes
1101  // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
1102  var computedStyle = function (el, prop, getComputedStyle) {
1103    getComputedStyle = window.getComputedStyle;
1104  
1105    // In one fell swoop
1106    return (
1107      // If we have getComputedStyle
1108      getComputedStyle ?
1109        // Query it
1110        // TODO: From CSS-Query notes, we might need (node, null) for FF
1111        getComputedStyle(el) :
1112  
1113      // Otherwise, we are in IE and use currentStyle
1114        el.currentStyle
1115    )[
1116      // Switch to camelCase for CSSOM
1117      // DEV: Grabbed from jQuery
1118      // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
1119      // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
1120      prop.replace(/-(\w)/gi, function (word, letter) {
1121        return letter.toUpperCase();
1122      })
1123    ];
1124  };
1125  
1126  module.exports = computedStyle;
1127  
1128  
1129  /***/ }),
1130  
1131  /***/ 176:
1132  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1133  
1134  "use strict";
1135  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1136  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1137  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1138  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1139  
1140  
1141  /**
1142   * WordPress dependencies
1143   */
1144  
1145  var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1146    xmlns: "http://www.w3.org/2000/svg",
1147    viewBox: "0 0 24 24"
1148  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1149    d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"
1150  }));
1151  /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
1152  
1153  
1154  /***/ }),
1155  
1156  /***/ 18:
1157  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1158  
1159  "use strict";
1160  
1161  // EXPORTS
1162  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
1163  
1164  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1165  var arrayLikeToArray = __webpack_require__(26);
1166  
1167  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
1168  
1169  function _arrayWithoutHoles(arr) {
1170    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
1171  }
1172  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
1173  var iterableToArray = __webpack_require__(35);
1174  
1175  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1176  var unsupportedIterableToArray = __webpack_require__(29);
1177  
1178  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
1179  function _nonIterableSpread() {
1180    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1181  }
1182  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
1183  
1184  
1185  
1186  
1187  function _toConsumableArray(arr) {
1188    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
1189  }
1190  
1191  /***/ }),
1192  
1193  /***/ 19:
1194  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1195  
1196  "use strict";
1197  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
1198  function _defineProperties(target, props) {
1199    for (var i = 0; i < props.length; i++) {
1200      var descriptor = props[i];
1201      descriptor.enumerable = descriptor.enumerable || false;
1202      descriptor.configurable = true;
1203      if ("value" in descriptor) descriptor.writable = true;
1204      Object.defineProperty(target, descriptor.key, descriptor);
1205    }
1206  }
1207  
1208  function _createClass(Constructor, protoProps, staticProps) {
1209    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1210    if (staticProps) _defineProperties(Constructor, staticProps);
1211    return Constructor;
1212  }
1213  
1214  /***/ }),
1215  
1216  /***/ 2:
1217  /***/ (function(module, exports) {
1218  
1219  (function() { module.exports = this["lodash"]; }());
1220  
1221  /***/ }),
1222  
1223  /***/ 20:
1224  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1225  
1226  "use strict";
1227  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
1228  function _classCallCheck(instance, Constructor) {
1229    if (!(instance instanceof Constructor)) {
1230      throw new TypeError("Cannot call a class as a function");
1231    }
1232  }
1233  
1234  /***/ }),
1235  
1236  /***/ 201:
1237  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1238  
1239  "use strict";
1240  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1241  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1242  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1243  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1244  
1245  
1246  /**
1247   * WordPress dependencies
1248   */
1249  
1250  var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1251    xmlns: "http://www.w3.org/2000/svg",
1252    viewBox: "0 0 24 24"
1253  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1254    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"
1255  }));
1256  /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
1257  
1258  
1259  /***/ }),
1260  
1261  /***/ 21:
1262  /***/ (function(module, exports) {
1263  
1264  (function() { module.exports = this["wp"]["keycodes"]; }());
1265  
1266  /***/ }),
1267  
1268  /***/ 22:
1269  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1270  
1271  "use strict";
1272  
1273  // EXPORTS
1274  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
1275  
1276  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
1277  function _setPrototypeOf(o, p) {
1278    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1279      o.__proto__ = p;
1280      return o;
1281    };
1282  
1283    return _setPrototypeOf(o, p);
1284  }
1285  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
1286  
1287  function _inherits(subClass, superClass) {
1288    if (typeof superClass !== "function" && superClass !== null) {
1289      throw new TypeError("Super expression must either be null or a function");
1290    }
1291  
1292    subClass.prototype = Object.create(superClass && superClass.prototype, {
1293      constructor: {
1294        value: subClass,
1295        writable: true,
1296        configurable: true
1297      }
1298    });
1299    if (superClass) _setPrototypeOf(subClass, superClass);
1300  }
1301  
1302  /***/ }),
1303  
1304  /***/ 23:
1305  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1306  
1307  "use strict";
1308  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
1309  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
1310  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
1311  
1312  
1313  function _possibleConstructorReturn(self, call) {
1314    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
1315      return call;
1316    }
1317  
1318    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
1319  }
1320  
1321  /***/ }),
1322  
1323  /***/ 24:
1324  /***/ (function(module, exports) {
1325  
1326  (function() { module.exports = this["regeneratorRuntime"]; }());
1327  
1328  /***/ }),
1329  
1330  /***/ 25:
1331  /***/ (function(module, exports) {
1332  
1333  (function() { module.exports = this["wp"]["richText"]; }());
1334  
1335  /***/ }),
1336  
1337  /***/ 26:
1338  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1339  
1340  "use strict";
1341  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
1342  function _arrayLikeToArray(arr, len) {
1343    if (len == null || len > arr.length) len = arr.length;
1344  
1345    for (var i = 0, arr2 = new Array(len); i < len; i++) {
1346      arr2[i] = arr[i];
1347    }
1348  
1349    return arr2;
1350  }
1351  
1352  /***/ }),
1353  
1354  /***/ 28:
1355  /***/ (function(module, exports, __webpack_require__) {
1356  
1357  /**
1358   * Copyright (c) 2013-present, Facebook, Inc.
1359   *
1360   * This source code is licensed under the MIT license found in the
1361   * LICENSE file in the root directory of this source tree.
1362   */
1363  
1364  if (false) { var throwOnDirectAccess, ReactIs; } else {
1365    // By explicitly using `prop-types` you are opting into new production behavior.
1366    // http://fb.me/prop-types-in-prod
1367    module.exports = __webpack_require__(138)();
1368  }
1369  
1370  
1371  /***/ }),
1372  
1373  /***/ 29:
1374  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1375  
1376  "use strict";
1377  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
1378  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
1379  
1380  function _unsupportedIterableToArray(o, minLen) {
1381    if (!o) return;
1382    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1383    var n = Object.prototype.toString.call(o).slice(8, -1);
1384    if (n === "Object" && o.constructor) n = o.constructor.name;
1385    if (n === "Map" || n === "Set") return Array.from(o);
1386    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1387  }
1388  
1389  /***/ }),
1390  
1391  /***/ 299:
1392  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1393  
1394  "use strict";
1395  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1396  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1397  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1398  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1399  
1400  
1401  /**
1402   * WordPress dependencies
1403   */
1404  
1405  var layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1406    xmlns: "http://www.w3.org/2000/svg",
1407    viewBox: "-2 -2 24 24"
1408  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1409    d: "M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"
1410  }));
1411  /* harmony default export */ __webpack_exports__["a"] = (layout);
1412  
1413  
1414  /***/ }),
1415  
1416  /***/ 3:
1417  /***/ (function(module, exports) {
1418  
1419  (function() { module.exports = this["wp"]["components"]; }());
1420  
1421  /***/ }),
1422  
1423  /***/ 303:
1424  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1425  
1426  "use strict";
1427  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1428  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1429  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1430  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1431  
1432  
1433  /**
1434   * WordPress dependencies
1435   */
1436  
1437  var grid = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1438    xmlns: "http://www.w3.org/2000/svg",
1439    viewBox: "-2 -2 24 24"
1440  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1441    d: "M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z"
1442  }));
1443  /* harmony default export */ __webpack_exports__["a"] = (grid);
1444  
1445  
1446  /***/ }),
1447  
1448  /***/ 31:
1449  /***/ (function(module, exports) {
1450  
1451  (function() { module.exports = this["wp"]["url"]; }());
1452  
1453  /***/ }),
1454  
1455  /***/ 32:
1456  /***/ (function(module, exports) {
1457  
1458  (function() { module.exports = this["wp"]["hooks"]; }());
1459  
1460  /***/ }),
1461  
1462  /***/ 35:
1463  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1464  
1465  "use strict";
1466  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
1467  function _iterableToArray(iter) {
1468    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1469  }
1470  
1471  /***/ }),
1472  
1473  /***/ 36:
1474  /***/ (function(module, exports) {
1475  
1476  (function() { module.exports = this["wp"]["dataControls"]; }());
1477  
1478  /***/ }),
1479  
1480  /***/ 37:
1481  /***/ (function(module, exports) {
1482  
1483  (function() { module.exports = this["wp"]["deprecated"]; }());
1484  
1485  /***/ }),
1486  
1487  /***/ 38:
1488  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1489  
1490  "use strict";
1491  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
1492  function _arrayWithHoles(arr) {
1493    if (Array.isArray(arr)) return arr;
1494  }
1495  
1496  /***/ }),
1497  
1498  /***/ 39:
1499  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1500  
1501  "use strict";
1502  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
1503  function _nonIterableRest() {
1504    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1505  }
1506  
1507  /***/ }),
1508  
1509  /***/ 4:
1510  /***/ (function(module, exports) {
1511  
1512  (function() { module.exports = this["wp"]["data"]; }());
1513  
1514  /***/ }),
1515  
1516  /***/ 40:
1517  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1518  
1519  "use strict";
1520  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
1521  function _typeof(obj) {
1522    "@babel/helpers - typeof";
1523  
1524    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1525      _typeof = function _typeof(obj) {
1526        return typeof obj;
1527      };
1528    } else {
1529      _typeof = function _typeof(obj) {
1530        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1531      };
1532    }
1533  
1534    return _typeof(obj);
1535  }
1536  
1537  /***/ }),
1538  
1539  /***/ 41:
1540  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1541  
1542  "use strict";
1543  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
1544  function _objectWithoutPropertiesLoose(source, excluded) {
1545    if (source == null) return {};
1546    var target = {};
1547    var sourceKeys = Object.keys(source);
1548    var key, i;
1549  
1550    for (i = 0; i < sourceKeys.length; i++) {
1551      key = sourceKeys[i];
1552      if (excluded.indexOf(key) >= 0) continue;
1553      target[key] = source[key];
1554    }
1555  
1556    return target;
1557  }
1558  
1559  /***/ }),
1560  
1561  /***/ 42:
1562  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1563  
1564  "use strict";
1565  
1566  
1567  var LEAF_KEY, hasWeakMap;
1568  
1569  /**
1570   * Arbitrary value used as key for referencing cache object in WeakMap tree.
1571   *
1572   * @type {Object}
1573   */
1574  LEAF_KEY = {};
1575  
1576  /**
1577   * Whether environment supports WeakMap.
1578   *
1579   * @type {boolean}
1580   */
1581  hasWeakMap = typeof WeakMap !== 'undefined';
1582  
1583  /**
1584   * Returns the first argument as the sole entry in an array.
1585   *
1586   * @param {*} value Value to return.
1587   *
1588   * @return {Array} Value returned as entry in array.
1589   */
1590  function arrayOf( value ) {
1591      return [ value ];
1592  }
1593  
1594  /**
1595   * Returns true if the value passed is object-like, or false otherwise. A value
1596   * is object-like if it can support property assignment, e.g. object or array.
1597   *
1598   * @param {*} value Value to test.
1599   *
1600   * @return {boolean} Whether value is object-like.
1601   */
1602  function isObjectLike( value ) {
1603      return !! value && 'object' === typeof value;
1604  }
1605  
1606  /**
1607   * Creates and returns a new cache object.
1608   *
1609   * @return {Object} Cache object.
1610   */
1611  function createCache() {
1612      var cache = {
1613          clear: function() {
1614              cache.head = null;
1615          },
1616      };
1617  
1618      return cache;
1619  }
1620  
1621  /**
1622   * Returns true if entries within the two arrays are strictly equal by
1623   * reference from a starting index.
1624   *
1625   * @param {Array}  a         First array.
1626   * @param {Array}  b         Second array.
1627   * @param {number} fromIndex Index from which to start comparison.
1628   *
1629   * @return {boolean} Whether arrays are shallowly equal.
1630   */
1631  function isShallowEqual( a, b, fromIndex ) {
1632      var i;
1633  
1634      if ( a.length !== b.length ) {
1635          return false;
1636      }
1637  
1638      for ( i = fromIndex; i < a.length; i++ ) {
1639          if ( a[ i ] !== b[ i ] ) {
1640              return false;
1641          }
1642      }
1643  
1644      return true;
1645  }
1646  
1647  /**
1648   * Returns a memoized selector function. The getDependants function argument is
1649   * called before the memoized selector and is expected to return an immutable
1650   * reference or array of references on which the selector depends for computing
1651   * its own return value. The memoize cache is preserved only as long as those
1652   * dependant references remain the same. If getDependants returns a different
1653   * reference(s), the cache is cleared and the selector value regenerated.
1654   *
1655   * @param {Function} selector      Selector function.
1656   * @param {Function} getDependants Dependant getter returning an immutable
1657   *                                 reference or array of reference used in
1658   *                                 cache bust consideration.
1659   *
1660   * @return {Function} Memoized selector.
1661   */
1662  /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
1663      var rootCache, getCache;
1664  
1665      // Use object source as dependant if getter not provided
1666      if ( ! getDependants ) {
1667          getDependants = arrayOf;
1668      }
1669  
1670      /**
1671       * Returns the root cache. If WeakMap is supported, this is assigned to the
1672       * root WeakMap cache set, otherwise it is a shared instance of the default
1673       * cache object.
1674       *
1675       * @return {(WeakMap|Object)} Root cache object.
1676       */
1677  	function getRootCache() {
1678          return rootCache;
1679      }
1680  
1681      /**
1682       * Returns the cache for a given dependants array. When possible, a WeakMap
1683       * will be used to create a unique cache for each set of dependants. This
1684       * is feasible due to the nature of WeakMap in allowing garbage collection
1685       * to occur on entries where the key object is no longer referenced. Since
1686       * WeakMap requires the key to be an object, this is only possible when the
1687       * dependant is object-like. The root cache is created as a hierarchy where
1688       * each top-level key is the first entry in a dependants set, the value a
1689       * WeakMap where each key is the next dependant, and so on. This continues
1690       * so long as the dependants are object-like. If no dependants are object-
1691       * like, then the cache is shared across all invocations.
1692       *
1693       * @see isObjectLike
1694       *
1695       * @param {Array} dependants Selector dependants.
1696       *
1697       * @return {Object} Cache object.
1698       */
1699  	function getWeakMapCache( dependants ) {
1700          var caches = rootCache,
1701              isUniqueByDependants = true,
1702              i, dependant, map, cache;
1703  
1704          for ( i = 0; i < dependants.length; i++ ) {
1705              dependant = dependants[ i ];
1706  
1707              // Can only compose WeakMap from object-like key.
1708              if ( ! isObjectLike( dependant ) ) {
1709                  isUniqueByDependants = false;
1710                  break;
1711              }
1712  
1713              // Does current segment of cache already have a WeakMap?
1714              if ( caches.has( dependant ) ) {
1715                  // Traverse into nested WeakMap.
1716                  caches = caches.get( dependant );
1717              } else {
1718                  // Create, set, and traverse into a new one.
1719                  map = new WeakMap();
1720                  caches.set( dependant, map );
1721                  caches = map;
1722              }
1723          }
1724  
1725          // We use an arbitrary (but consistent) object as key for the last item
1726          // in the WeakMap to serve as our running cache.
1727          if ( ! caches.has( LEAF_KEY ) ) {
1728              cache = createCache();
1729              cache.isUniqueByDependants = isUniqueByDependants;
1730              caches.set( LEAF_KEY, cache );
1731          }
1732  
1733          return caches.get( LEAF_KEY );
1734      }
1735  
1736      // Assign cache handler by availability of WeakMap
1737      getCache = hasWeakMap ? getWeakMapCache : getRootCache;
1738  
1739      /**
1740       * Resets root memoization cache.
1741       */
1742  	function clear() {
1743          rootCache = hasWeakMap ? new WeakMap() : createCache();
1744      }
1745  
1746      // eslint-disable-next-line jsdoc/check-param-names
1747      /**
1748       * The augmented selector call, considering first whether dependants have
1749       * changed before passing it to underlying memoize function.
1750       *
1751       * @param {Object} source    Source object for derivation.
1752       * @param {...*}   extraArgs Additional arguments to pass to selector.
1753       *
1754       * @return {*} Selector result.
1755       */
1756  	function callSelector( /* source, ...extraArgs */ ) {
1757          var len = arguments.length,
1758              cache, node, i, args, dependants;
1759  
1760          // Create copy of arguments (avoid leaking deoptimization).
1761          args = new Array( len );
1762          for ( i = 0; i < len; i++ ) {
1763              args[ i ] = arguments[ i ];
1764          }
1765  
1766          dependants = getDependants.apply( null, args );
1767          cache = getCache( dependants );
1768  
1769          // If not guaranteed uniqueness by dependants (primitive type or lack
1770          // of WeakMap support), shallow compare against last dependants and, if
1771          // references have changed, destroy cache to recalculate result.
1772          if ( ! cache.isUniqueByDependants ) {
1773              if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
1774                  cache.clear();
1775              }
1776  
1777              cache.lastDependants = dependants;
1778          }
1779  
1780          node = cache.head;
1781          while ( node ) {
1782              // Check whether node arguments match arguments
1783              if ( ! isShallowEqual( node.args, args, 1 ) ) {
1784                  node = node.next;
1785                  continue;
1786              }
1787  
1788              // At this point we can assume we've found a match
1789  
1790              // Surface matched node to head if not already
1791              if ( node !== cache.head ) {
1792                  // Adjust siblings to point to each other.
1793                  node.prev.next = node.next;
1794                  if ( node.next ) {
1795                      node.next.prev = node.prev;
1796                  }
1797  
1798                  node.next = cache.head;
1799                  node.prev = null;
1800                  cache.head.prev = node;
1801                  cache.head = node;
1802              }
1803  
1804              // Return immediately
1805              return node.val;
1806          }
1807  
1808          // No cached value found. Continue to insertion phase:
1809  
1810          node = {
1811              // Generate the result from original function
1812              val: selector.apply( null, args ),
1813          };
1814  
1815          // Avoid including the source object in the cache.
1816          args[ 0 ] = null;
1817          node.args = args;
1818  
1819          // Don't need to check whether node is already head, since it would
1820          // have been returned above already if it was
1821  
1822          // Shift existing head down list
1823          if ( cache.head ) {
1824              cache.head.prev = node;
1825              node.next = cache.head;
1826          }
1827  
1828          cache.head = node;
1829  
1830          return node.val;
1831      }
1832  
1833      callSelector.getDependants = getDependants;
1834      callSelector.clear = clear;
1835      clear();
1836  
1837      return callSelector;
1838  });
1839  
1840  
1841  /***/ }),
1842  
1843  /***/ 422:
1844  /***/ (function(module, exports, __webpack_require__) {
1845  
1846  "use strict";
1847  
1848  
1849  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1850  
1851  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
1852  
1853  var BEGIN = 'BEGIN';
1854  var COMMIT = 'COMMIT';
1855  var REVERT = 'REVERT';
1856  // Array({transactionID: string or null, beforeState: {object}, action: {object}}
1857  var INITIAL_OPTIMIST = [];
1858  
1859  module.exports = optimist;
1860  module.exports.BEGIN = BEGIN;
1861  module.exports.COMMIT = COMMIT;
1862  module.exports.REVERT = REVERT;
1863  function optimist(fn) {
1864    function beginReducer(state, action) {
1865      var _separateState = separateState(state);
1866  
1867      var optimist = _separateState.optimist;
1868      var innerState = _separateState.innerState;
1869  
1870      optimist = optimist.concat([{ beforeState: innerState, action: action }]);
1871      innerState = fn(innerState, action);
1872      validateState(innerState, action);
1873      return _extends({ optimist: optimist }, innerState);
1874    }
1875    function commitReducer(state, action) {
1876      var _separateState2 = separateState(state);
1877  
1878      var optimist = _separateState2.optimist;
1879      var innerState = _separateState2.innerState;
1880  
1881      var newOptimist = [],
1882          started = false,
1883          committed = false;
1884      optimist.forEach(function (entry) {
1885        if (started) {
1886          if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1887            committed = true;
1888            newOptimist.push({ action: entry.action });
1889          } else {
1890            newOptimist.push(entry);
1891          }
1892        } else if (entry.beforeState && !matchesTransaction(entry.action, action.optimist.id)) {
1893          started = true;
1894          newOptimist.push(entry);
1895        } else if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1896          committed = true;
1897        }
1898      });
1899      if (!committed) {
1900        console.error('Cannot commit transaction with id "' + action.optimist.id + '" because it does not exist');
1901      }
1902      optimist = newOptimist;
1903      return baseReducer(optimist, innerState, action);
1904    }
1905    function revertReducer(state, action) {
1906      var _separateState3 = separateState(state);
1907  
1908      var optimist = _separateState3.optimist;
1909      var innerState = _separateState3.innerState;
1910  
1911      var newOptimist = [],
1912          started = false,
1913          gotInitialState = false,
1914          currentState = innerState;
1915      optimist.forEach(function (entry) {
1916        if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1917          currentState = entry.beforeState;
1918          gotInitialState = true;
1919        }
1920        if (!matchesTransaction(entry.action, action.optimist.id)) {
1921          if (entry.beforeState) {
1922            started = true;
1923          }
1924          if (started) {
1925            if (gotInitialState && entry.beforeState) {
1926              newOptimist.push({
1927                beforeState: currentState,
1928                action: entry.action
1929              });
1930            } else {
1931              newOptimist.push(entry);
1932            }
1933          }
1934          if (gotInitialState) {
1935            currentState = fn(currentState, entry.action);
1936            validateState(innerState, action);
1937          }
1938        }
1939      });
1940      if (!gotInitialState) {
1941        console.error('Cannot revert transaction with id "' + action.optimist.id + '" because it does not exist');
1942      }
1943      optimist = newOptimist;
1944      return baseReducer(optimist, currentState, action);
1945    }
1946    function baseReducer(optimist, innerState, action) {
1947      if (optimist.length) {
1948        optimist = optimist.concat([{ action: action }]);
1949      }
1950      innerState = fn(innerState, action);
1951      validateState(innerState, action);
1952      return _extends({ optimist: optimist }, innerState);
1953    }
1954    return function (state, action) {
1955      if (action.optimist) {
1956        switch (action.optimist.type) {
1957          case BEGIN:
1958            return beginReducer(state, action);
1959          case COMMIT:
1960            return commitReducer(state, action);
1961          case REVERT:
1962            return revertReducer(state, action);
1963        }
1964      }
1965  
1966      var _separateState4 = separateState(state);
1967  
1968      var optimist = _separateState4.optimist;
1969      var innerState = _separateState4.innerState;
1970  
1971      if (state && !optimist.length) {
1972        var nextState = fn(innerState, action);
1973        if (nextState === innerState) {
1974          return state;
1975        }
1976        validateState(nextState, action);
1977        return _extends({ optimist: optimist }, nextState);
1978      }
1979      return baseReducer(optimist, innerState, action);
1980    };
1981  }
1982  
1983  function matchesTransaction(action, id) {
1984    return action.optimist && action.optimist.id === id;
1985  }
1986  
1987  function validateState(newState, action) {
1988    if (!newState || typeof newState !== 'object' || Array.isArray(newState)) {
1989      throw new TypeError('Error while handling "' + action.type + '": Optimist requires that state is always a plain object.');
1990    }
1991  }
1992  
1993  function separateState(state) {
1994    if (!state) {
1995      return { optimist: INITIAL_OPTIMIST, innerState: state };
1996    } else {
1997      var _state$optimist = state.optimist;
1998  
1999      var _optimist = _state$optimist === undefined ? INITIAL_OPTIMIST : _state$optimist;
2000  
2001      var innerState = _objectWithoutProperties(state, ['optimist']);
2002  
2003      return { optimist: _optimist, innerState: innerState };
2004    }
2005  }
2006  
2007  /***/ }),
2008  
2009  /***/ 439:
2010  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2011  
2012  "use strict";
2013  // ESM COMPAT FLAG
2014  __webpack_require__.r(__webpack_exports__);
2015  
2016  // EXPORTS
2017  __webpack_require__.d(__webpack_exports__, "userAutocompleter", function() { return /* reexport */ autocompleters_user; });
2018  __webpack_require__.d(__webpack_exports__, "AutosaveMonitor", function() { return /* reexport */ autosave_monitor; });
2019  __webpack_require__.d(__webpack_exports__, "DocumentOutline", function() { return /* reexport */ document_outline; });
2020  __webpack_require__.d(__webpack_exports__, "DocumentOutlineCheck", function() { return /* reexport */ check; });
2021  __webpack_require__.d(__webpack_exports__, "VisualEditorGlobalKeyboardShortcuts", function() { return /* reexport */ visual_editor_shortcuts; });
2022  __webpack_require__.d(__webpack_exports__, "EditorGlobalKeyboardShortcuts", function() { return /* reexport */ EditorGlobalKeyboardShortcuts; });
2023  __webpack_require__.d(__webpack_exports__, "TextEditorGlobalKeyboardShortcuts", function() { return /* reexport */ TextEditorGlobalKeyboardShortcuts; });
2024  __webpack_require__.d(__webpack_exports__, "EditorKeyboardShortcutsRegister", function() { return /* reexport */ register_shortcuts; });
2025  __webpack_require__.d(__webpack_exports__, "EditorHistoryRedo", function() { return /* reexport */ editor_history_redo; });
2026  __webpack_require__.d(__webpack_exports__, "EditorHistoryUndo", function() { return /* reexport */ editor_history_undo; });
2027  __webpack_require__.d(__webpack_exports__, "EditorNotices", function() { return /* reexport */ editor_notices; });
2028  __webpack_require__.d(__webpack_exports__, "EntitiesSavedStates", function() { return /* reexport */ EntitiesSavedStates; });
2029  __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return /* reexport */ error_boundary; });
2030  __webpack_require__.d(__webpack_exports__, "LocalAutosaveMonitor", function() { return /* reexport */ local_autosave_monitor; });
2031  __webpack_require__.d(__webpack_exports__, "PageAttributesCheck", function() { return /* reexport */ page_attributes_check; });
2032  __webpack_require__.d(__webpack_exports__, "PageAttributesOrder", function() { return /* reexport */ page_attributes_order; });
2033  __webpack_require__.d(__webpack_exports__, "PageAttributesParent", function() { return /* reexport */ page_attributes_parent; });
2034  __webpack_require__.d(__webpack_exports__, "PageTemplate", function() { return /* reexport */ page_attributes_template; });
2035  __webpack_require__.d(__webpack_exports__, "PostAuthor", function() { return /* reexport */ post_author; });
2036  __webpack_require__.d(__webpack_exports__, "PostAuthorCheck", function() { return /* reexport */ post_author_check; });
2037  __webpack_require__.d(__webpack_exports__, "PostComments", function() { return /* reexport */ post_comments; });
2038  __webpack_require__.d(__webpack_exports__, "PostExcerpt", function() { return /* reexport */ post_excerpt; });
2039  __webpack_require__.d(__webpack_exports__, "PostExcerptCheck", function() { return /* reexport */ post_excerpt_check; });
2040  __webpack_require__.d(__webpack_exports__, "PostFeaturedImage", function() { return /* reexport */ post_featured_image; });
2041  __webpack_require__.d(__webpack_exports__, "PostFeaturedImageCheck", function() { return /* reexport */ post_featured_image_check; });
2042  __webpack_require__.d(__webpack_exports__, "PostFormat", function() { return /* reexport */ post_format; });
2043  __webpack_require__.d(__webpack_exports__, "PostFormatCheck", function() { return /* reexport */ post_format_check; });
2044  __webpack_require__.d(__webpack_exports__, "PostLastRevision", function() { return /* reexport */ post_last_revision; });
2045  __webpack_require__.d(__webpack_exports__, "PostLastRevisionCheck", function() { return /* reexport */ post_last_revision_check; });
2046  __webpack_require__.d(__webpack_exports__, "PostLockedModal", function() { return /* reexport */ post_locked_modal; });
2047  __webpack_require__.d(__webpack_exports__, "PostPendingStatus", function() { return /* reexport */ post_pending_status; });
2048  __webpack_require__.d(__webpack_exports__, "PostPendingStatusCheck", function() { return /* reexport */ post_pending_status_check; });
2049  __webpack_require__.d(__webpack_exports__, "PostPingbacks", function() { return /* reexport */ post_pingbacks; });
2050  __webpack_require__.d(__webpack_exports__, "PostPreviewButton", function() { return /* reexport */ post_preview_button; });
2051  __webpack_require__.d(__webpack_exports__, "PostPublishButton", function() { return /* reexport */ post_publish_button; });
2052  __webpack_require__.d(__webpack_exports__, "PostPublishButtonLabel", function() { return /* reexport */ post_publish_button_label; });
2053  __webpack_require__.d(__webpack_exports__, "PostPublishPanel", function() { return /* reexport */ post_publish_panel; });
2054  __webpack_require__.d(__webpack_exports__, "PostSavedState", function() { return /* reexport */ post_saved_state; });
2055  __webpack_require__.d(__webpack_exports__, "PostSchedule", function() { return /* reexport */ post_schedule; });
2056  __webpack_require__.d(__webpack_exports__, "PostScheduleCheck", function() { return /* reexport */ post_schedule_check; });
2057  __webpack_require__.d(__webpack_exports__, "PostScheduleLabel", function() { return /* reexport */ post_schedule_label; });
2058  __webpack_require__.d(__webpack_exports__, "PostSlug", function() { return /* reexport */ post_slug; });
2059  __webpack_require__.d(__webpack_exports__, "PostSlugCheck", function() { return /* reexport */ PostSlugCheck; });
2060  __webpack_require__.d(__webpack_exports__, "PostSticky", function() { return /* reexport */ post_sticky; });
2061  __webpack_require__.d(__webpack_exports__, "PostStickyCheck", function() { return /* reexport */ post_sticky_check; });
2062  __webpack_require__.d(__webpack_exports__, "PostSwitchToDraftButton", function() { return /* reexport */ post_switch_to_draft_button; });
2063  __webpack_require__.d(__webpack_exports__, "PostTaxonomies", function() { return /* reexport */ post_taxonomies; });
2064  __webpack_require__.d(__webpack_exports__, "PostTaxonomiesCheck", function() { return /* reexport */ post_taxonomies_check; });
2065  __webpack_require__.d(__webpack_exports__, "PostTextEditor", function() { return /* reexport */ post_text_editor; });
2066  __webpack_require__.d(__webpack_exports__, "PostTitle", function() { return /* reexport */ post_title; });
2067  __webpack_require__.d(__webpack_exports__, "PostTrash", function() { return /* reexport */ post_trash; });
2068  __webpack_require__.d(__webpack_exports__, "PostTrashCheck", function() { return /* reexport */ post_trash_check; });
2069  __webpack_require__.d(__webpack_exports__, "PostTypeSupportCheck", function() { return /* reexport */ post_type_support_check; });
2070  __webpack_require__.d(__webpack_exports__, "PostVisibility", function() { return /* reexport */ post_visibility; });
2071  __webpack_require__.d(__webpack_exports__, "PostVisibilityLabel", function() { return /* reexport */ post_visibility_label; });
2072  __webpack_require__.d(__webpack_exports__, "PostVisibilityCheck", function() { return /* reexport */ post_visibility_check; });
2073  __webpack_require__.d(__webpack_exports__, "TableOfContents", function() { return /* reexport */ table_of_contents; });
2074  __webpack_require__.d(__webpack_exports__, "UnsavedChangesWarning", function() { return /* reexport */ unsaved_changes_warning; });
2075  __webpack_require__.d(__webpack_exports__, "WordCount", function() { return /* reexport */ word_count; });
2076  __webpack_require__.d(__webpack_exports__, "EditorProvider", function() { return /* reexport */ provider; });
2077  __webpack_require__.d(__webpack_exports__, "ServerSideRender", function() { return /* reexport */ external_this_wp_serverSideRender_default.a; });
2078  __webpack_require__.d(__webpack_exports__, "RichText", function() { return /* reexport */ RichText; });
2079  __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ Autocomplete; });
2080  __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ AlignmentToolbar; });
2081  __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ BlockAlignmentToolbar; });
2082  __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ BlockControls; });
2083  __webpack_require__.d(__webpack_exports__, "BlockEdit", function() { return /* reexport */ deprecated_BlockEdit; });
2084  __webpack_require__.d(__webpack_exports__, "BlockEditorKeyboardShortcuts", function() { return /* reexport */ BlockEditorKeyboardShortcuts; });
2085  __webpack_require__.d(__webpack_exports__, "BlockFormatControls", function() { return /* reexport */ BlockFormatControls; });
2086  __webpack_require__.d(__webpack_exports__, "BlockIcon", function() { return /* reexport */ BlockIcon; });
2087  __webpack_require__.d(__webpack_exports__, "BlockInspector", function() { return /* reexport */ BlockInspector; });
2088  __webpack_require__.d(__webpack_exports__, "BlockList", function() { return /* reexport */ BlockList; });
2089  __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return /* reexport */ BlockMover; });
2090  __webpack_require__.d(__webpack_exports__, "BlockNavigationDropdown", function() { return /* reexport */ BlockNavigationDropdown; });
2091  __webpack_require__.d(__webpack_exports__, "BlockSelectionClearer", function() { return /* reexport */ BlockSelectionClearer; });
2092  __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return /* reexport */ BlockSettingsMenu; });
2093  __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return /* reexport */ BlockTitle; });
2094  __webpack_require__.d(__webpack_exports__, "BlockToolbar", function() { return /* reexport */ BlockToolbar; });
2095  __webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ ColorPalette; });
2096  __webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ ContrastChecker; });
2097  __webpack_require__.d(__webpack_exports__, "CopyHandler", function() { return /* reexport */ CopyHandler; });
2098  __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return /* reexport */ DefaultBlockAppender; });
2099  __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return /* reexport */ FontSizePicker; });
2100  __webpack_require__.d(__webpack_exports__, "Inserter", function() { return /* reexport */ Inserter; });
2101  __webpack_require__.d(__webpack_exports__, "InnerBlocks", function() { return /* reexport */ InnerBlocks; });
2102  __webpack_require__.d(__webpack_exports__, "InspectorAdvancedControls", function() { return /* reexport */ InspectorAdvancedControls; });
2103  __webpack_require__.d(__webpack_exports__, "InspectorControls", function() { return /* reexport */ InspectorControls; });
2104  __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return /* reexport */ PanelColorSettings; });
2105  __webpack_require__.d(__webpack_exports__, "PlainText", function() { return /* reexport */ PlainText; });
2106  __webpack_require__.d(__webpack_exports__, "RichTextShortcut", function() { return /* reexport */ RichTextShortcut; });
2107  __webpack_require__.d(__webpack_exports__, "RichTextToolbarButton", function() { return /* reexport */ RichTextToolbarButton; });
2108  __webpack_require__.d(__webpack_exports__, "__unstableRichTextInputEvent", function() { return /* reexport */ __unstableRichTextInputEvent; });
2109  __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return /* reexport */ MediaPlaceholder; });
2110  __webpack_require__.d(__webpack_exports__, "MediaUpload", function() { return /* reexport */ MediaUpload; });
2111  __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return /* reexport */ MediaUploadCheck; });
2112  __webpack_require__.d(__webpack_exports__, "MultiSelectScrollIntoView", function() { return /* reexport */ MultiSelectScrollIntoView; });
2113  __webpack_require__.d(__webpack_exports__, "NavigableToolbar", function() { return /* reexport */ NavigableToolbar; });
2114  __webpack_require__.d(__webpack_exports__, "ObserveTyping", function() { return /* reexport */ ObserveTyping; });
2115  __webpack_require__.d(__webpack_exports__, "PreserveScrollInReorder", function() { return /* reexport */ PreserveScrollInReorder; });
2116  __webpack_require__.d(__webpack_exports__, "SkipToSelectedBlock", function() { return /* reexport */ SkipToSelectedBlock; });
2117  __webpack_require__.d(__webpack_exports__, "URLInput", function() { return /* reexport */ URLInput; });
2118  __webpack_require__.d(__webpack_exports__, "URLInputButton", function() { return /* reexport */ URLInputButton; });
2119  __webpack_require__.d(__webpack_exports__, "URLPopover", function() { return /* reexport */ URLPopover; });
2120  __webpack_require__.d(__webpack_exports__, "Warning", function() { return /* reexport */ Warning; });
2121  __webpack_require__.d(__webpack_exports__, "WritingFlow", function() { return /* reexport */ WritingFlow; });
2122  __webpack_require__.d(__webpack_exports__, "createCustomColorsHOC", function() { return /* reexport */ createCustomColorsHOC; });
2123  __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return /* reexport */ getColorClassName; });
2124  __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return /* reexport */ getColorObjectByAttributeValues; });
2125  __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return /* reexport */ getColorObjectByColorValue; });
2126  __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return /* reexport */ getFontSize; });
2127  __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return /* reexport */ getFontSizeClass; });
2128  __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ withColorContext; });
2129  __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; });
2130  __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ withFontSizes; });
2131  __webpack_require__.d(__webpack_exports__, "mediaUpload", function() { return /* reexport */ mediaUpload; });
2132  __webpack_require__.d(__webpack_exports__, "cleanForSlug", function() { return /* reexport */ cleanForSlug; });
2133  __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; });
2134  __webpack_require__.d(__webpack_exports__, "transformStyles", function() { return /* reexport */ external_this_wp_blockEditor_["transformStyles"]; });
2135  
2136  // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/actions.js
2137  var actions_namespaceObject = {};
2138  __webpack_require__.r(actions_namespaceObject);
2139  __webpack_require__.d(actions_namespaceObject, "setupEditor", function() { return setupEditor; });
2140  __webpack_require__.d(actions_namespaceObject, "__experimentalTearDownEditor", function() { return __experimentalTearDownEditor; });
2141  __webpack_require__.d(actions_namespaceObject, "resetPost", function() { return resetPost; });
2142  __webpack_require__.d(actions_namespaceObject, "resetAutosave", function() { return resetAutosave; });
2143  __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateStart", function() { return __experimentalRequestPostUpdateStart; });
2144  __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateFinish", function() { return __experimentalRequestPostUpdateFinish; });
2145  __webpack_require__.d(actions_namespaceObject, "updatePost", function() { return updatePost; });
2146  __webpack_require__.d(actions_namespaceObject, "setupEditorState", function() { return setupEditorState; });
2147  __webpack_require__.d(actions_namespaceObject, "editPost", function() { return actions_editPost; });
2148  __webpack_require__.d(actions_namespaceObject, "__experimentalOptimisticUpdatePost", function() { return __experimentalOptimisticUpdatePost; });
2149  __webpack_require__.d(actions_namespaceObject, "savePost", function() { return actions_savePost; });
2150  __webpack_require__.d(actions_namespaceObject, "refreshPost", function() { return refreshPost; });
2151  __webpack_require__.d(actions_namespaceObject, "trashPost", function() { return trashPost; });
2152  __webpack_require__.d(actions_namespaceObject, "autosave", function() { return actions_autosave; });
2153  __webpack_require__.d(actions_namespaceObject, "__experimentalLocalAutosave", function() { return actions_experimentalLocalAutosave; });
2154  __webpack_require__.d(actions_namespaceObject, "redo", function() { return actions_redo; });
2155  __webpack_require__.d(actions_namespaceObject, "undo", function() { return actions_undo; });
2156  __webpack_require__.d(actions_namespaceObject, "createUndoLevel", function() { return createUndoLevel; });
2157  __webpack_require__.d(actions_namespaceObject, "updatePostLock", function() { return updatePostLock; });
2158  __webpack_require__.d(actions_namespaceObject, "__experimentalFetchReusableBlocks", function() { return actions_experimentalFetchReusableBlocks; });
2159  __webpack_require__.d(actions_namespaceObject, "__experimentalReceiveReusableBlocks", function() { return __experimentalReceiveReusableBlocks; });
2160  __webpack_require__.d(actions_namespaceObject, "__experimentalSaveReusableBlock", function() { return __experimentalSaveReusableBlock; });
2161  __webpack_require__.d(actions_namespaceObject, "__experimentalDeleteReusableBlock", function() { return __experimentalDeleteReusableBlock; });
2162  __webpack_require__.d(actions_namespaceObject, "__experimentalUpdateReusableBlock", function() { return __experimentalUpdateReusableBlock; });
2163  __webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToStatic", function() { return __experimentalConvertBlockToStatic; });
2164  __webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToReusable", function() { return __experimentalConvertBlockToReusable; });
2165  __webpack_require__.d(actions_namespaceObject, "enablePublishSidebar", function() { return enablePublishSidebar; });
2166  __webpack_require__.d(actions_namespaceObject, "disablePublishSidebar", function() { return disablePublishSidebar; });
2167  __webpack_require__.d(actions_namespaceObject, "lockPostSaving", function() { return lockPostSaving; });
2168  __webpack_require__.d(actions_namespaceObject, "unlockPostSaving", function() { return unlockPostSaving; });
2169  __webpack_require__.d(actions_namespaceObject, "lockPostAutosaving", function() { return lockPostAutosaving; });
2170  __webpack_require__.d(actions_namespaceObject, "unlockPostAutosaving", function() { return unlockPostAutosaving; });
2171  __webpack_require__.d(actions_namespaceObject, "resetEditorBlocks", function() { return actions_resetEditorBlocks; });
2172  __webpack_require__.d(actions_namespaceObject, "updateEditorSettings", function() { return updateEditorSettings; });
2173  __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return resetBlocks; });
2174  __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; });
2175  __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return updateBlock; });
2176  __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return updateBlockAttributes; });
2177  __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return actions_selectBlock; });
2178  __webpack_require__.d(actions_namespaceObject, "startMultiSelect", function() { return startMultiSelect; });
2179  __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return stopMultiSelect; });
2180  __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return multiSelect; });
2181  __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return clearSelectedBlock; });
2182  __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return toggleSelection; });
2183  __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return actions_replaceBlocks; });
2184  __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; });
2185  __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return moveBlocksDown; });
2186  __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return moveBlocksUp; });
2187  __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return moveBlockToPosition; });
2188  __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return insertBlock; });
2189  __webpack_require__.d(actions_namespaceObject, "insertBlocks", function() { return insertBlocks; });
2190  __webpack_require__.d(actions_namespaceObject, "showInsertionPoint", function() { return showInsertionPoint; });
2191  __webpack_require__.d(actions_namespaceObject, "hideInsertionPoint", function() { return hideInsertionPoint; });
2192  __webpack_require__.d(actions_namespaceObject, "setTemplateValidity", function() { return setTemplateValidity; });
2193  __webpack_require__.d(actions_namespaceObject, "synchronizeTemplate", function() { return synchronizeTemplate; });
2194  __webpack_require__.d(actions_namespaceObject, "mergeBlocks", function() { return mergeBlocks; });
2195  __webpack_require__.d(actions_namespaceObject, "removeBlocks", function() { return removeBlocks; });
2196  __webpack_require__.d(actions_namespaceObject, "removeBlock", function() { return removeBlock; });
2197  __webpack_require__.d(actions_namespaceObject, "toggleBlockMode", function() { return toggleBlockMode; });
2198  __webpack_require__.d(actions_namespaceObject, "startTyping", function() { return startTyping; });
2199  __webpack_require__.d(actions_namespaceObject, "stopTyping", function() { return stopTyping; });
2200  __webpack_require__.d(actions_namespaceObject, "enterFormattedText", function() { return enterFormattedText; });
2201  __webpack_require__.d(actions_namespaceObject, "exitFormattedText", function() { return exitFormattedText; });
2202  __webpack_require__.d(actions_namespaceObject, "insertDefaultBlock", function() { return insertDefaultBlock; });
2203  __webpack_require__.d(actions_namespaceObject, "updateBlockListSettings", function() { return updateBlockListSettings; });
2204  
2205  // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/selectors.js
2206  var selectors_namespaceObject = {};
2207  __webpack_require__.r(selectors_namespaceObject);
2208  __webpack_require__.d(selectors_namespaceObject, "hasEditorUndo", function() { return hasEditorUndo; });
2209  __webpack_require__.d(selectors_namespaceObject, "hasEditorRedo", function() { return hasEditorRedo; });
2210  __webpack_require__.d(selectors_namespaceObject, "isEditedPostNew", function() { return isEditedPostNew; });
2211  __webpack_require__.d(selectors_namespaceObject, "hasChangedContent", function() { return hasChangedContent; });
2212  __webpack_require__.d(selectors_namespaceObject, "isEditedPostDirty", function() { return selectors_isEditedPostDirty; });
2213  __webpack_require__.d(selectors_namespaceObject, "hasNonPostEntityChanges", function() { return selectors_hasNonPostEntityChanges; });
2214  __webpack_require__.d(selectors_namespaceObject, "isCleanNewPost", function() { return selectors_isCleanNewPost; });
2215  __webpack_require__.d(selectors_namespaceObject, "getCurrentPost", function() { return selectors_getCurrentPost; });
2216  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostType", function() { return selectors_getCurrentPostType; });
2217  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostId", function() { return selectors_getCurrentPostId; });
2218  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostRevisionsCount", function() { return getCurrentPostRevisionsCount; });
2219  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostLastRevisionId", function() { return getCurrentPostLastRevisionId; });
2220  __webpack_require__.d(selectors_namespaceObject, "getPostEdits", function() { return selectors_getPostEdits; });
2221  __webpack_require__.d(selectors_namespaceObject, "getReferenceByDistinctEdits", function() { return getReferenceByDistinctEdits; });
2222  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostAttribute", function() { return selectors_getCurrentPostAttribute; });
2223  __webpack_require__.d(selectors_namespaceObject, "getEditedPostAttribute", function() { return selectors_getEditedPostAttribute; });
2224  __webpack_require__.d(selectors_namespaceObject, "getAutosaveAttribute", function() { return getAutosaveAttribute; });
2225  __webpack_require__.d(selectors_namespaceObject, "getEditedPostVisibility", function() { return selectors_getEditedPostVisibility; });
2226  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostPending", function() { return isCurrentPostPending; });
2227  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostPublished", function() { return selectors_isCurrentPostPublished; });
2228  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostScheduled", function() { return selectors_isCurrentPostScheduled; });
2229  __webpack_require__.d(selectors_namespaceObject, "isEditedPostPublishable", function() { return selectors_isEditedPostPublishable; });
2230  __webpack_require__.d(selectors_namespaceObject, "isEditedPostSaveable", function() { return selectors_isEditedPostSaveable; });
2231  __webpack_require__.d(selectors_namespaceObject, "isEditedPostEmpty", function() { return isEditedPostEmpty; });
2232  __webpack_require__.d(selectors_namespaceObject, "isEditedPostAutosaveable", function() { return selectors_isEditedPostAutosaveable; });
2233  __webpack_require__.d(selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
2234  __webpack_require__.d(selectors_namespaceObject, "hasAutosave", function() { return hasAutosave; });
2235  __webpack_require__.d(selectors_namespaceObject, "isEditedPostBeingScheduled", function() { return selectors_isEditedPostBeingScheduled; });
2236  __webpack_require__.d(selectors_namespaceObject, "isEditedPostDateFloating", function() { return isEditedPostDateFloating; });
2237  __webpack_require__.d(selectors_namespaceObject, "isSavingPost", function() { return selectors_isSavingPost; });
2238  __webpack_require__.d(selectors_namespaceObject, "didPostSaveRequestSucceed", function() { return didPostSaveRequestSucceed; });
2239  __webpack_require__.d(selectors_namespaceObject, "didPostSaveRequestFail", function() { return didPostSaveRequestFail; });
2240  __webpack_require__.d(selectors_namespaceObject, "isAutosavingPost", function() { return selectors_isAutosavingPost; });
2241  __webpack_require__.d(selectors_namespaceObject, "isPreviewingPost", function() { return isPreviewingPost; });
2242  __webpack_require__.d(selectors_namespaceObject, "getEditedPostPreviewLink", function() { return selectors_getEditedPostPreviewLink; });
2243  __webpack_require__.d(selectors_namespaceObject, "getSuggestedPostFormat", function() { return selectors_getSuggestedPostFormat; });
2244  __webpack_require__.d(selectors_namespaceObject, "getBlocksForSerialization", function() { return getBlocksForSerialization; });
2245  __webpack_require__.d(selectors_namespaceObject, "getEditedPostContent", function() { return getEditedPostContent; });
2246  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlock", function() { return __experimentalGetReusableBlock; });
2247  __webpack_require__.d(selectors_namespaceObject, "__experimentalIsSavingReusableBlock", function() { return __experimentalIsSavingReusableBlock; });
2248  __webpack_require__.d(selectors_namespaceObject, "__experimentalIsFetchingReusableBlock", function() { return __experimentalIsFetchingReusableBlock; });
2249  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlocks", function() { return selectors_experimentalGetReusableBlocks; });
2250  __webpack_require__.d(selectors_namespaceObject, "getStateBeforeOptimisticTransaction", function() { return getStateBeforeOptimisticTransaction; });
2251  __webpack_require__.d(selectors_namespaceObject, "isPublishingPost", function() { return selectors_isPublishingPost; });
2252  __webpack_require__.d(selectors_namespaceObject, "isPermalinkEditable", function() { return isPermalinkEditable; });
2253  __webpack_require__.d(selectors_namespaceObject, "getPermalink", function() { return getPermalink; });
2254  __webpack_require__.d(selectors_namespaceObject, "getEditedPostSlug", function() { return getEditedPostSlug; });
2255  __webpack_require__.d(selectors_namespaceObject, "getPermalinkParts", function() { return getPermalinkParts; });
2256  __webpack_require__.d(selectors_namespaceObject, "inSomeHistory", function() { return inSomeHistory; });
2257  __webpack_require__.d(selectors_namespaceObject, "isPostLocked", function() { return isPostLocked; });
2258  __webpack_require__.d(selectors_namespaceObject, "isPostSavingLocked", function() { return selectors_isPostSavingLocked; });
2259  __webpack_require__.d(selectors_namespaceObject, "isPostAutosavingLocked", function() { return isPostAutosavingLocked; });
2260  __webpack_require__.d(selectors_namespaceObject, "isPostLockTakeover", function() { return isPostLockTakeover; });
2261  __webpack_require__.d(selectors_namespaceObject, "getPostLockUser", function() { return getPostLockUser; });
2262  __webpack_require__.d(selectors_namespaceObject, "getActivePostLock", function() { return getActivePostLock; });
2263  __webpack_require__.d(selectors_namespaceObject, "canUserUseUnfilteredHTML", function() { return selectors_canUserUseUnfilteredHTML; });
2264  __webpack_require__.d(selectors_namespaceObject, "isPublishSidebarEnabled", function() { return selectors_isPublishSidebarEnabled; });
2265  __webpack_require__.d(selectors_namespaceObject, "getEditorBlocks", function() { return selectors_getEditorBlocks; });
2266  __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionStart", function() { return selectors_getEditorSelectionStart; });
2267  __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionEnd", function() { return selectors_getEditorSelectionEnd; });
2268  __webpack_require__.d(selectors_namespaceObject, "__unstableIsEditorReady", function() { return __unstableIsEditorReady; });
2269  __webpack_require__.d(selectors_namespaceObject, "getEditorSettings", function() { return selectors_getEditorSettings; });
2270  __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return getBlockName; });
2271  __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return isBlockValid; });
2272  __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
2273  __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
2274  __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
2275  __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return __unstableGetBlockWithoutInnerBlocks; });
2276  __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return getClientIdsOfDescendants; });
2277  __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
2278  __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return getGlobalBlockCount; });
2279  __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; });
2280  __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return getBlockCount; });
2281  __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return getBlockSelectionStart; });
2282  __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return getBlockSelectionEnd; });
2283  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return getSelectedBlockCount; });
2284  __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return hasSelectedBlock; });
2285  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientId", function() { return getSelectedBlockClientId; });
2286  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlock", function() { return getSelectedBlock; });
2287  __webpack_require__.d(selectors_namespaceObject, "getBlockRootClientId", function() { return getBlockRootClientId; });
2288  __webpack_require__.d(selectors_namespaceObject, "getBlockHierarchyRootClientId", function() { return getBlockHierarchyRootClientId; });
2289  __webpack_require__.d(selectors_namespaceObject, "getAdjacentBlockClientId", function() { return getAdjacentBlockClientId; });
2290  __webpack_require__.d(selectors_namespaceObject, "getPreviousBlockClientId", function() { return getPreviousBlockClientId; });
2291  __webpack_require__.d(selectors_namespaceObject, "getNextBlockClientId", function() { return getNextBlockClientId; });
2292  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlocksInitialCaretPosition", function() { return getSelectedBlocksInitialCaretPosition; });
2293  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlockClientIds", function() { return getMultiSelectedBlockClientIds; });
2294  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocks", function() { return getMultiSelectedBlocks; });
2295  __webpack_require__.d(selectors_namespaceObject, "getFirstMultiSelectedBlockClientId", function() { return getFirstMultiSelectedBlockClientId; });
2296  __webpack_require__.d(selectors_namespaceObject, "getLastMultiSelectedBlockClientId", function() { return getLastMultiSelectedBlockClientId; });
2297  __webpack_require__.d(selectors_namespaceObject, "isFirstMultiSelectedBlock", function() { return isFirstMultiSelectedBlock; });
2298  __webpack_require__.d(selectors_namespaceObject, "isBlockMultiSelected", function() { return isBlockMultiSelected; });
2299  __webpack_require__.d(selectors_namespaceObject, "isAncestorMultiSelected", function() { return isAncestorMultiSelected; });
2300  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksStartClientId", function() { return getMultiSelectedBlocksStartClientId; });
2301  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksEndClientId", function() { return getMultiSelectedBlocksEndClientId; });
2302  __webpack_require__.d(selectors_namespaceObject, "getBlockOrder", function() { return getBlockOrder; });
2303  __webpack_require__.d(selectors_namespaceObject, "getBlockIndex", function() { return getBlockIndex; });
2304  __webpack_require__.d(selectors_namespaceObject, "isBlockSelected", function() { return isBlockSelected; });
2305  __webpack_require__.d(selectors_namespaceObject, "hasSelectedInnerBlock", function() { return hasSelectedInnerBlock; });
2306  __webpack_require__.d(selectors_namespaceObject, "isBlockWithinSelection", function() { return isBlockWithinSelection; });
2307  __webpack_require__.d(selectors_namespaceObject, "hasMultiSelection", function() { return hasMultiSelection; });
2308  __webpack_require__.d(selectors_namespaceObject, "isMultiSelecting", function() { return isMultiSelecting; });
2309  __webpack_require__.d(selectors_namespaceObject, "isSelectionEnabled", function() { return isSelectionEnabled; });
2310  __webpack_require__.d(selectors_namespaceObject, "getBlockMode", function() { return getBlockMode; });
2311  __webpack_require__.d(selectors_namespaceObject, "isTyping", function() { return isTyping; });
2312  __webpack_require__.d(selectors_namespaceObject, "isCaretWithinFormattedText", function() { return isCaretWithinFormattedText; });
2313  __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; });
2314  __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; });
2315  __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return isValidTemplate; });
2316  __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
2317  __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return getTemplateLock; });
2318  __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; });
2319  __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return getInserterItems; });
2320  __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return hasInserterItems; });
2321  __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return getBlockListSettings; });
2322  
2323  // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
2324  var external_this_wp_blockEditor_ = __webpack_require__(7);
2325  
2326  // EXTERNAL MODULE: external {"this":["wp","blocks"]}
2327  var external_this_wp_blocks_ = __webpack_require__(10);
2328  
2329  // EXTERNAL MODULE: external {"this":["wp","coreData"]}
2330  var external_this_wp_coreData_ = __webpack_require__(98);
2331  
2332  // EXTERNAL MODULE: external {"this":["wp","keyboardShortcuts"]}
2333  var external_this_wp_keyboardShortcuts_ = __webpack_require__(52);
2334  
2335  // EXTERNAL MODULE: external {"this":["wp","notices"]}
2336  var external_this_wp_notices_ = __webpack_require__(100);
2337  
2338  // EXTERNAL MODULE: external {"this":["wp","richText"]}
2339  var external_this_wp_richText_ = __webpack_require__(25);
2340  
2341  // EXTERNAL MODULE: external {"this":["wp","viewport"]}
2342  var external_this_wp_viewport_ = __webpack_require__(81);
2343  
2344  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
2345  var defineProperty = __webpack_require__(5);
2346  
2347  // EXTERNAL MODULE: external {"this":["wp","data"]}
2348  var external_this_wp_data_ = __webpack_require__(4);
2349  
2350  // EXTERNAL MODULE: external {"this":["wp","dataControls"]}
2351  var external_this_wp_dataControls_ = __webpack_require__(36);
2352  
2353  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
2354  var esm_typeof = __webpack_require__(40);
2355  
2356  // EXTERNAL MODULE: ./node_modules/redux-optimist/index.js
2357  var redux_optimist = __webpack_require__(134);
2358  var redux_optimist_default = /*#__PURE__*/__webpack_require__.n(redux_optimist);
2359  
2360  // EXTERNAL MODULE: external {"this":"lodash"}
2361  var external_this_lodash_ = __webpack_require__(2);
2362  
2363  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/defaults.js
2364  
2365  
2366  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; }
2367  
2368  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; }
2369  
2370  /**
2371   * WordPress dependencies
2372   */
2373  
2374  var PREFERENCES_DEFAULTS = {
2375    insertUsage: {},
2376    // Should be kept for backward compatibility, see: https://github.com/WordPress/gutenberg/issues/14580.
2377    isPublishSidebarEnabled: true
2378  };
2379  /**
2380   * The default post editor settings
2381   *
2382   *  allowedBlockTypes  boolean|Array Allowed block types
2383   *  richEditingEnabled boolean       Whether rich editing is enabled or not
2384   *  codeEditingEnabled boolean       Whether code editing is enabled or not
2385   *  enableCustomFields boolean       Whether the WordPress custom fields are enabled or not
2386   *  autosaveInterval   number        Autosave Interval
2387   *  availableTemplates array?        The available post templates
2388   *  disablePostFormats boolean       Whether or not the post formats are disabled
2389   *  allowedMimeTypes   array?        List of allowed mime types and file extensions
2390   *  maxUploadFileSize  number        Maximum upload file size
2391   */
2392  
2393  var EDITOR_SETTINGS_DEFAULTS = _objectSpread({}, external_this_wp_blockEditor_["SETTINGS_DEFAULTS"], {
2394    richEditingEnabled: true,
2395    codeEditingEnabled: true,
2396    enableCustomFields: false
2397  });
2398  
2399  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/reducer.js
2400  
2401  
2402  
2403  function reducer_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; }
2404  
2405  function reducer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reducer_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 { reducer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2406  
2407  /**
2408   * External dependencies
2409   */
2410  
2411  
2412  /**
2413   * WordPress dependencies
2414   */
2415  
2416  
2417  /**
2418   * Internal dependencies
2419   */
2420  
2421  
2422  /**
2423   * Returns a post attribute value, flattening nested rendered content using its
2424   * raw value in place of its original object form.
2425   *
2426   * @param {*} value Original value.
2427   *
2428   * @return {*} Raw value.
2429   */
2430  
2431  function getPostRawValue(value) {
2432    if (value && 'object' === Object(esm_typeof["a" /* default */])(value) && 'raw' in value) {
2433      return value.raw;
2434    }
2435  
2436    return value;
2437  }
2438  /**
2439   * Returns true if the two object arguments have the same keys, or false
2440   * otherwise.
2441   *
2442   * @param {Object} a First object.
2443   * @param {Object} b Second object.
2444   *
2445   * @return {boolean} Whether the two objects have the same keys.
2446   */
2447  
2448  function hasSameKeys(a, b) {
2449    return Object(external_this_lodash_["isEqual"])(Object(external_this_lodash_["keys"])(a), Object(external_this_lodash_["keys"])(b));
2450  }
2451  /**
2452   * Returns true if, given the currently dispatching action and the previously
2453   * dispatched action, the two actions are editing the same post property, or
2454   * false otherwise.
2455   *
2456   * @param {Object} action         Currently dispatching action.
2457   * @param {Object} previousAction Previously dispatched action.
2458   *
2459   * @return {boolean} Whether actions are updating the same post property.
2460   */
2461  
2462  function isUpdatingSamePostProperty(action, previousAction) {
2463    return action.type === 'EDIT_POST' && hasSameKeys(action.edits, previousAction.edits);
2464  }
2465  /**
2466   * Returns true if, given the currently dispatching action and the previously
2467   * dispatched action, the two actions are modifying the same property such that
2468   * undo history should be batched.
2469   *
2470   * @param {Object} action         Currently dispatching action.
2471   * @param {Object} previousAction Previously dispatched action.
2472   *
2473   * @return {boolean} Whether to overwrite present state.
2474   */
2475  
2476  function shouldOverwriteState(action, previousAction) {
2477    if (action.type === 'RESET_EDITOR_BLOCKS') {
2478      return !action.shouldCreateUndoLevel;
2479    }
2480  
2481    if (!previousAction || action.type !== previousAction.type) {
2482      return false;
2483    }
2484  
2485    return isUpdatingSamePostProperty(action, previousAction);
2486  }
2487  function reducer_postId() {
2488    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2489    var action = arguments.length > 1 ? arguments[1] : undefined;
2490  
2491    switch (action.type) {
2492      case 'SETUP_EDITOR_STATE':
2493      case 'RESET_POST':
2494      case 'UPDATE_POST':
2495        return action.post.id;
2496    }
2497  
2498    return state;
2499  }
2500  function reducer_postType() {
2501    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2502    var action = arguments.length > 1 ? arguments[1] : undefined;
2503  
2504    switch (action.type) {
2505      case 'SETUP_EDITOR_STATE':
2506      case 'RESET_POST':
2507      case 'UPDATE_POST':
2508        return action.post.type;
2509    }
2510  
2511    return state;
2512  }
2513  /**
2514   * Reducer returning whether the post blocks match the defined template or not.
2515   *
2516   * @param {Object} state  Current state.
2517   * @param {Object} action Dispatched action.
2518   *
2519   * @return {boolean} Updated state.
2520   */
2521  
2522  function reducer_template() {
2523    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2524      isValid: true
2525    };
2526    var action = arguments.length > 1 ? arguments[1] : undefined;
2527  
2528    switch (action.type) {
2529      case 'SET_TEMPLATE_VALIDITY':
2530        return reducer_objectSpread({}, state, {
2531          isValid: action.isValid
2532        });
2533    }
2534  
2535    return state;
2536  }
2537  /**
2538   * Reducer returning the user preferences.
2539   *
2540   * @param {Object}  state                 Current state.
2541   * @param {Object}  action                Dispatched action.
2542   *
2543   * @return {string} Updated state.
2544   */
2545  
2546  function preferences() {
2547    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PREFERENCES_DEFAULTS;
2548    var action = arguments.length > 1 ? arguments[1] : undefined;
2549  
2550    switch (action.type) {
2551      case 'ENABLE_PUBLISH_SIDEBAR':
2552        return reducer_objectSpread({}, state, {
2553          isPublishSidebarEnabled: true
2554        });
2555  
2556      case 'DISABLE_PUBLISH_SIDEBAR':
2557        return reducer_objectSpread({}, state, {
2558          isPublishSidebarEnabled: false
2559        });
2560    }
2561  
2562    return state;
2563  }
2564  /**
2565   * Reducer returning current network request state (whether a request to
2566   * the WP REST API is in progress, successful, or failed).
2567   *
2568   * @param {Object} state  Current state.
2569   * @param {Object} action Dispatched action.
2570   *
2571   * @return {Object} Updated state.
2572   */
2573  
2574  function saving() {
2575    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2576    var action = arguments.length > 1 ? arguments[1] : undefined;
2577  
2578    switch (action.type) {
2579      case 'REQUEST_POST_UPDATE_START':
2580      case 'REQUEST_POST_UPDATE_FINISH':
2581        return {
2582          pending: action.type === 'REQUEST_POST_UPDATE_START',
2583          options: action.options || {}
2584        };
2585    }
2586  
2587    return state;
2588  }
2589  /**
2590   * Post Lock State.
2591   *
2592   * @typedef {Object} PostLockState
2593   *
2594   * @property {boolean} isLocked       Whether the post is locked.
2595   * @property {?boolean} isTakeover     Whether the post editing has been taken over.
2596   * @property {?boolean} activePostLock Active post lock value.
2597   * @property {?Object}  user           User that took over the post.
2598   */
2599  
2600  /**
2601   * Reducer returning the post lock status.
2602   *
2603   * @param {PostLockState} state  Current state.
2604   * @param {Object} action Dispatched action.
2605   *
2606   * @return {PostLockState} Updated state.
2607   */
2608  
2609  function postLock() {
2610    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2611      isLocked: false
2612    };
2613    var action = arguments.length > 1 ? arguments[1] : undefined;
2614  
2615    switch (action.type) {
2616      case 'UPDATE_POST_LOCK':
2617        return action.lock;
2618    }
2619  
2620    return state;
2621  }
2622  /**
2623   * Post saving lock.
2624   *
2625   * When post saving is locked, the post cannot be published or updated.
2626   *
2627   * @param {PostLockState} state  Current state.
2628   * @param {Object}        action Dispatched action.
2629   *
2630   * @return {PostLockState} Updated state.
2631   */
2632  
2633  function postSavingLock() {
2634    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2635    var action = arguments.length > 1 ? arguments[1] : undefined;
2636  
2637    switch (action.type) {
2638      case 'LOCK_POST_SAVING':
2639        return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
2640  
2641      case 'UNLOCK_POST_SAVING':
2642        return Object(external_this_lodash_["omit"])(state, action.lockName);
2643    }
2644  
2645    return state;
2646  }
2647  /**
2648   * Post autosaving lock.
2649   *
2650   * When post autosaving is locked, the post will not autosave.
2651   *
2652   * @param {PostLockState} state  Current state.
2653   * @param {Object}        action Dispatched action.
2654   *
2655   * @return {PostLockState} Updated state.
2656   */
2657  
2658  function postAutosavingLock() {
2659    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2660    var action = arguments.length > 1 ? arguments[1] : undefined;
2661  
2662    switch (action.type) {
2663      case 'LOCK_POST_AUTOSAVING':
2664        return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
2665  
2666      case 'UNLOCK_POST_AUTOSAVING':
2667        return Object(external_this_lodash_["omit"])(state, action.lockName);
2668    }
2669  
2670    return state;
2671  }
2672  var reducer_reusableBlocks = Object(external_this_wp_data_["combineReducers"])({
2673    data: function data() {
2674      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2675      var action = arguments.length > 1 ? arguments[1] : undefined;
2676  
2677      switch (action.type) {
2678        case 'RECEIVE_REUSABLE_BLOCKS':
2679          {
2680            return reducer_objectSpread({}, state, {}, Object(external_this_lodash_["keyBy"])(action.results, 'id'));
2681          }
2682  
2683        case 'UPDATE_REUSABLE_BLOCK':
2684          {
2685            var id = action.id,
2686                changes = action.changes;
2687            return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, id, reducer_objectSpread({}, state[id], {}, changes)));
2688          }
2689  
2690        case 'SAVE_REUSABLE_BLOCK_SUCCESS':
2691          {
2692            var _id = action.id,
2693                updatedId = action.updatedId; // If a temporary reusable block is saved, we swap the temporary id with the final one
2694  
2695            if (_id === updatedId) {
2696              return state;
2697            }
2698  
2699            var value = state[_id];
2700            return reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state, _id), Object(defineProperty["a" /* default */])({}, updatedId, reducer_objectSpread({}, value, {
2701              id: updatedId
2702            })));
2703          }
2704  
2705        case 'REMOVE_REUSABLE_BLOCK':
2706          {
2707            var _id2 = action.id;
2708            return Object(external_this_lodash_["omit"])(state, _id2);
2709          }
2710      }
2711  
2712      return state;
2713    },
2714    isFetching: function isFetching() {
2715      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2716      var action = arguments.length > 1 ? arguments[1] : undefined;
2717  
2718      switch (action.type) {
2719        case 'FETCH_REUSABLE_BLOCKS':
2720          {
2721            var id = action.id;
2722  
2723            if (!id) {
2724              return state;
2725            }
2726  
2727            return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, id, true));
2728          }
2729  
2730        case 'FETCH_REUSABLE_BLOCKS_SUCCESS':
2731        case 'FETCH_REUSABLE_BLOCKS_FAILURE':
2732          {
2733            var _id3 = action.id;
2734            return Object(external_this_lodash_["omit"])(state, _id3);
2735          }
2736      }
2737  
2738      return state;
2739    },
2740    isSaving: function isSaving() {
2741      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2742      var action = arguments.length > 1 ? arguments[1] : undefined;
2743  
2744      switch (action.type) {
2745        case 'SAVE_REUSABLE_BLOCK':
2746          return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.id, true));
2747  
2748        case 'SAVE_REUSABLE_BLOCK_SUCCESS':
2749        case 'SAVE_REUSABLE_BLOCK_FAILURE':
2750          {
2751            var id = action.id;
2752            return Object(external_this_lodash_["omit"])(state, id);
2753          }
2754      }
2755  
2756      return state;
2757    }
2758  });
2759  /**
2760   * Reducer returning whether the editor is ready to be rendered.
2761   * The editor is considered ready to be rendered once
2762   * the post object is loaded properly and the initial blocks parsed.
2763   *
2764   * @param {boolean} state
2765   * @param {Object} action
2766   *
2767   * @return {boolean} Updated state.
2768   */
2769  
2770  function reducer_isReady() {
2771    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2772    var action = arguments.length > 1 ? arguments[1] : undefined;
2773  
2774    switch (action.type) {
2775      case 'SETUP_EDITOR_STATE':
2776        return true;
2777  
2778      case 'TEAR_DOWN_EDITOR':
2779        return false;
2780    }
2781  
2782    return state;
2783  }
2784  /**
2785   * Reducer returning the post editor setting.
2786   *
2787   * @param {Object} state  Current state.
2788   * @param {Object} action Dispatched action.
2789   *
2790   * @return {Object} Updated state.
2791   */
2792  
2793  function reducer_editorSettings() {
2794    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EDITOR_SETTINGS_DEFAULTS;
2795    var action = arguments.length > 1 ? arguments[1] : undefined;
2796  
2797    switch (action.type) {
2798      case 'UPDATE_EDITOR_SETTINGS':
2799        return reducer_objectSpread({}, state, {}, action.settings);
2800    }
2801  
2802    return state;
2803  }
2804  /* harmony default export */ var reducer = (redux_optimist_default()(Object(external_this_wp_data_["combineReducers"])({
2805    postId: reducer_postId,
2806    postType: reducer_postType,
2807    preferences: preferences,
2808    saving: saving,
2809    postLock: postLock,
2810    reusableBlocks: reducer_reusableBlocks,
2811    template: reducer_template,
2812    postSavingLock: postSavingLock,
2813    isReady: reducer_isReady,
2814    editorSettings: reducer_editorSettings,
2815    postAutosavingLock: postAutosavingLock
2816  })));
2817  
2818  // EXTERNAL MODULE: ./node_modules/refx/refx.js
2819  var refx = __webpack_require__(110);
2820  var refx_default = /*#__PURE__*/__webpack_require__.n(refx);
2821  
2822  // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
2823  var external_this_regeneratorRuntime_ = __webpack_require__(24);
2824  var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
2825  
2826  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
2827  var asyncToGenerator = __webpack_require__(50);
2828  
2829  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
2830  var external_this_wp_apiFetch_ = __webpack_require__(45);
2831  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
2832  
2833  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
2834  var external_this_wp_i18n_ = __webpack_require__(1);
2835  
2836  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
2837  var toConsumableArray = __webpack_require__(18);
2838  
2839  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
2840  var external_this_wp_deprecated_ = __webpack_require__(37);
2841  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
2842  
2843  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/constants.js
2844  /**
2845   * Set of post properties for which edits should assume a merging behavior,
2846   * assuming an object value.
2847   *
2848   * @type {Set}
2849   */
2850  var EDIT_MERGE_PROPERTIES = new Set(['meta']);
2851  /**
2852   * Constant for the store module (or reducer) key.
2853   *
2854   * @type {string}
2855   */
2856  
2857  var STORE_KEY = 'core/editor';
2858  var POST_UPDATE_TRANSACTION_ID = 'post-update';
2859  var SAVE_POST_NOTICE_ID = 'SAVE_POST_NOTICE_ID';
2860  var TRASH_POST_NOTICE_ID = 'TRASH_POST_NOTICE_ID';
2861  var PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;
2862  var ONE_MINUTE_IN_MS = 60 * 1000;
2863  var AUTOSAVE_PROPERTIES = ['title', 'excerpt', 'content'];
2864  
2865  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/notice-builder.js
2866  /**
2867   * WordPress dependencies
2868   */
2869  
2870  /**
2871   * Internal dependencies
2872   */
2873  
2874  
2875  /**
2876   * External dependencies
2877   */
2878  
2879  
2880  /**
2881   * Builds the arguments for a success notification dispatch.
2882   *
2883   * @param {Object} data Incoming data to build the arguments from.
2884   *
2885   * @return {Array} Arguments for dispatch. An empty array signals no
2886   *                 notification should be sent.
2887   */
2888  
2889  function getNotificationArgumentsForSaveSuccess(data) {
2890    var previousPost = data.previousPost,
2891        post = data.post,
2892        postType = data.postType; // Autosaves are neither shown a notice nor redirected.
2893  
2894    if (Object(external_this_lodash_["get"])(data.options, ['isAutosave'])) {
2895      return [];
2896    }
2897  
2898    var publishStatus = ['publish', 'private', 'future'];
2899    var isPublished = Object(external_this_lodash_["includes"])(publishStatus, previousPost.status);
2900    var willPublish = Object(external_this_lodash_["includes"])(publishStatus, post.status);
2901    var noticeMessage;
2902    var shouldShowLink = Object(external_this_lodash_["get"])(postType, ['viewable'], false);
2903  
2904    if (!isPublished && !willPublish) {
2905      // If saving a non-published post, don't show notice.
2906      noticeMessage = null;
2907    } else if (isPublished && !willPublish) {
2908      // If undoing publish status, show specific notice
2909      noticeMessage = postType.labels.item_reverted_to_draft;
2910      shouldShowLink = false;
2911    } else if (!isPublished && willPublish) {
2912      // If publishing or scheduling a post, show the corresponding
2913      // publish message
2914      noticeMessage = {
2915        publish: postType.labels.item_published,
2916        private: postType.labels.item_published_privately,
2917        future: postType.labels.item_scheduled
2918      }[post.status];
2919    } else {
2920      // Generic fallback notice
2921      noticeMessage = postType.labels.item_updated;
2922    }
2923  
2924    if (noticeMessage) {
2925      var actions = [];
2926  
2927      if (shouldShowLink) {
2928        actions.push({
2929          label: postType.labels.view_item,
2930          url: post.link
2931        });
2932      }
2933  
2934      return [noticeMessage, {
2935        id: SAVE_POST_NOTICE_ID,
2936        type: 'snackbar',
2937        actions: actions
2938      }];
2939    }
2940  
2941    return [];
2942  }
2943  /**
2944   * Builds the fail notification arguments for dispatch.
2945   *
2946   * @param {Object} data Incoming data to build the arguments with.
2947   *
2948   * @return {Array} Arguments for dispatch. An empty array signals no
2949   *                 notification should be sent.
2950   */
2951  
2952  function getNotificationArgumentsForSaveFail(data) {
2953    var post = data.post,
2954        edits = data.edits,
2955        error = data.error;
2956  
2957    if (error && 'rest_autosave_no_changes' === error.code) {
2958      // Autosave requested a new autosave, but there were no changes. This shouldn't
2959      // result in an error notice for the user.
2960      return [];
2961    }
2962  
2963    var publishStatus = ['publish', 'private', 'future'];
2964    var isPublished = publishStatus.indexOf(post.status) !== -1; // If the post was being published, we show the corresponding publish error message
2965    // Unless we publish an "updating failed" message
2966  
2967    var messages = {
2968      publish: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
2969      private: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
2970      future: Object(external_this_wp_i18n_["__"])('Scheduling failed.')
2971    };
2972    var noticeMessage = !isPublished && publishStatus.indexOf(edits.status) !== -1 ? messages[edits.status] : Object(external_this_wp_i18n_["__"])('Updating failed.'); // Check if message string contains HTML. Notice text is currently only
2973    // supported as plaintext, and stripping the tags may muddle the meaning.
2974  
2975    if (error.message && !/<\/?[^>]*>/.test(error.message)) {
2976      noticeMessage = [noticeMessage, error.message].join(' ');
2977    }
2978  
2979    return [noticeMessage, {
2980      id: SAVE_POST_NOTICE_ID
2981    }];
2982  }
2983  /**
2984   * Builds the trash fail notification arguments for dispatch.
2985   *
2986   * @param {Object} data
2987   *
2988   * @return {Array} Arguments for dispatch.
2989   */
2990  
2991  function getNotificationArgumentsForTrashFail(data) {
2992    return [data.error.message && data.error.code !== 'unknown_error' ? data.error.message : Object(external_this_wp_i18n_["__"])('Trashing failed'), {
2993      id: TRASH_POST_NOTICE_ID
2994    }];
2995  }
2996  
2997  // EXTERNAL MODULE: ./node_modules/memize/index.js
2998  var memize = __webpack_require__(60);
2999  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
3000  
3001  // EXTERNAL MODULE: external {"this":["wp","autop"]}
3002  var external_this_wp_autop_ = __webpack_require__(103);
3003  
3004  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/serialize-blocks.js
3005  /**
3006   * External dependencies
3007   */
3008  
3009  /**
3010   * WordPress dependencies
3011   */
3012  
3013  
3014  
3015  /**
3016   * Serializes blocks following backwards compatibility conventions.
3017   *
3018   * @param {Array} blocksForSerialization The blocks to serialize.
3019   *
3020   * @return {string} The blocks serialization.
3021   */
3022  
3023  var serializeBlocks = memize_default()(function (blocksForSerialization) {
3024    // A single unmodified default block is assumed to
3025    // be equivalent to an empty post.
3026    if (blocksForSerialization.length === 1 && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocksForSerialization[0])) {
3027      blocksForSerialization = [];
3028    }
3029  
3030    var content = Object(external_this_wp_blocks_["serialize"])(blocksForSerialization); // For compatibility, treat a post consisting of a
3031    // single freeform block as legacy content and apply
3032    // pre-block-editor removep'd content formatting.
3033  
3034    if (blocksForSerialization.length === 1 && blocksForSerialization[0].name === Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()) {
3035      content = Object(external_this_wp_autop_["removep"])(content);
3036    }
3037  
3038    return content;
3039  }, {
3040    maxSize: 1
3041  });
3042  /* harmony default export */ var serialize_blocks = (serializeBlocks);
3043  
3044  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/actions.js
3045  
3046  
3047  
3048  
3049  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; }
3050  
3051  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; }
3052  
3053  var _marked = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(setupEditor),
3054      _marked2 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resetAutosave),
3055      _marked3 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_editPost),
3056      _marked4 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_savePost),
3057      _marked5 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(refreshPost),
3058      _marked6 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(trashPost),
3059      _marked7 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_autosave),
3060      _marked8 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_experimentalLocalAutosave),
3061      _marked9 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_redo),
3062      _marked10 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_undo),
3063      _marked11 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_resetEditorBlocks);
3064  
3065  /**
3066   * External dependencies
3067   */
3068  
3069  /**
3070   * WordPress dependencies
3071   */
3072  
3073  
3074  
3075  
3076  /**
3077   * Internal dependencies
3078   */
3079  
3080  
3081  
3082  
3083  /**
3084   * Returns an action generator used in signalling that editor has initialized with
3085   * the specified post object and editor settings.
3086   *
3087   * @param {Object} post      Post object.
3088   * @param {Object} edits     Initial edited attributes object.
3089   * @param {Array?} template  Block Template.
3090   */
3091  
3092  function setupEditor(post, edits, template) {
3093    var content, blocks, isNewPost;
3094    return external_this_regeneratorRuntime_default.a.wrap(function setupEditor$(_context) {
3095      while (1) {
3096        switch (_context.prev = _context.next) {
3097          case 0:
3098            // In order to ensure maximum of a single parse during setup, edits are
3099            // included as part of editor setup action. Assume edited content as
3100            // canonical if provided, falling back to post.
3101            if (Object(external_this_lodash_["has"])(edits, ['content'])) {
3102              content = edits.content;
3103            } else {
3104              content = post.content.raw;
3105            }
3106  
3107            blocks = Object(external_this_wp_blocks_["parse"])(content); // Apply a template for new posts only, if exists.
3108  
3109            isNewPost = post.status === 'auto-draft';
3110  
3111            if (isNewPost && template) {
3112              blocks = Object(external_this_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
3113            }
3114  
3115            _context.next = 6;
3116            return resetPost(post);
3117  
3118          case 6:
3119            _context.next = 8;
3120            return {
3121              type: 'SETUP_EDITOR',
3122              post: post,
3123              edits: edits,
3124              template: template
3125            };
3126  
3127          case 8:
3128            _context.next = 10;
3129            return actions_resetEditorBlocks(blocks, {
3130              __unstableShouldCreateUndoLevel: false
3131            });
3132  
3133          case 10:
3134            _context.next = 12;
3135            return setupEditorState(post);
3136  
3137          case 12:
3138            if (!(edits && Object.keys(edits).some(function (key) {
3139              return edits[key] !== (Object(external_this_lodash_["has"])(post, [key, 'raw']) ? post[key].raw : post[key]);
3140            }))) {
3141              _context.next = 15;
3142              break;
3143            }
3144  
3145            _context.next = 15;
3146            return actions_editPost(edits);
3147  
3148          case 15:
3149          case "end":
3150            return _context.stop();
3151        }
3152      }
3153    }, _marked);
3154  }
3155  /**
3156   * Returns an action object signalling that the editor is being destroyed and
3157   * that any necessary state or side-effect cleanup should occur.
3158   *
3159   * @return {Object} Action object.
3160   */
3161  
3162  function __experimentalTearDownEditor() {
3163    return {
3164      type: 'TEAR_DOWN_EDITOR'
3165    };
3166  }
3167  /**
3168   * Returns an action object used in signalling that the latest version of the
3169   * post has been received, either by initialization or save.
3170   *
3171   * @param {Object} post Post object.
3172   *
3173   * @return {Object} Action object.
3174   */
3175  
3176  function resetPost(post) {
3177    return {
3178      type: 'RESET_POST',
3179      post: post
3180    };
3181  }
3182  /**
3183   * Returns an action object used in signalling that the latest autosave of the
3184   * post has been received, by initialization or autosave.
3185   *
3186   * @deprecated since 5.6. Callers should use the `receiveAutosaves( postId, autosave )`
3187   *                selector from the '@wordpress/core-data' package.
3188   *
3189   * @param {Object} newAutosave Autosave post object.
3190   *
3191   * @return {Object} Action object.
3192   */
3193  
3194  function resetAutosave(newAutosave) {
3195    var postId;
3196    return external_this_regeneratorRuntime_default.a.wrap(function resetAutosave$(_context2) {
3197      while (1) {
3198        switch (_context2.prev = _context2.next) {
3199          case 0:
3200            external_this_wp_deprecated_default()('resetAutosave action (`core/editor` store)', {
3201              alternative: 'receiveAutosaves action (`core` store)',
3202              plugin: 'Gutenberg'
3203            });
3204            _context2.next = 3;
3205            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostId');
3206  
3207          case 3:
3208            postId = _context2.sent;
3209            _context2.next = 6;
3210            return Object(external_this_wp_dataControls_["dispatch"])('core', 'receiveAutosaves', postId, newAutosave);
3211  
3212          case 6:
3213            return _context2.abrupt("return", {
3214              type: '__INERT__'
3215            });
3216  
3217          case 7:
3218          case "end":
3219            return _context2.stop();
3220        }
3221      }
3222    }, _marked2);
3223  }
3224  /**
3225   * Action for dispatching that a post update request has started.
3226   *
3227   * @param {Object} options
3228   *
3229   * @return {Object} An action object
3230   */
3231  
3232  function __experimentalRequestPostUpdateStart() {
3233    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3234    return {
3235      type: 'REQUEST_POST_UPDATE_START',
3236      options: options
3237    };
3238  }
3239  /**
3240   * Action for dispatching that a post update request has finished.
3241   *
3242   * @param {Object} options
3243   *
3244   * @return {Object} An action object
3245   */
3246  
3247  function __experimentalRequestPostUpdateFinish() {
3248    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3249    return {
3250      type: 'REQUEST_POST_UPDATE_FINISH',
3251      options: options
3252    };
3253  }
3254  /**
3255   * Returns an action object used in signalling that a patch of updates for the
3256   * latest version of the post have been received.
3257   *
3258   * @param {Object} edits Updated post fields.
3259   *
3260   * @return {Object} Action object.
3261   */
3262  
3263  function updatePost(edits) {
3264    return {
3265      type: 'UPDATE_POST',
3266      edits: edits
3267    };
3268  }
3269  /**
3270   * Returns an action object used to setup the editor state when first opening
3271   * an editor.
3272   *
3273   * @param {Object} post   Post object.
3274   *
3275   * @return {Object} Action object.
3276   */
3277  
3278  function setupEditorState(post) {
3279    return {
3280      type: 'SETUP_EDITOR_STATE',
3281      post: post
3282    };
3283  }
3284  /**
3285   * Returns an action object used in signalling that attributes of the post have
3286   * been edited.
3287   *
3288   * @param {Object} edits   Post attributes to edit.
3289   * @param {Object} options Options for the edit.
3290   *
3291   * @yield {Object} Action object or control.
3292   */
3293  
3294  function actions_editPost(edits, options) {
3295    var _yield$select, id, type;
3296  
3297    return external_this_regeneratorRuntime_default.a.wrap(function editPost$(_context3) {
3298      while (1) {
3299        switch (_context3.prev = _context3.next) {
3300          case 0:
3301            _context3.next = 2;
3302            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3303  
3304          case 2:
3305            _yield$select = _context3.sent;
3306            id = _yield$select.id;
3307            type = _yield$select.type;
3308            _context3.next = 7;
3309            return Object(external_this_wp_dataControls_["dispatch"])('core', 'editEntityRecord', 'postType', type, id, edits, options);
3310  
3311          case 7:
3312          case "end":
3313            return _context3.stop();
3314        }
3315      }
3316    }, _marked3);
3317  }
3318  /**
3319   * Returns action object produced by the updatePost creator augmented by
3320   * an optimist option that signals optimistically applying updates.
3321   *
3322   * @param {Object} edits  Updated post fields.
3323   *
3324   * @return {Object} Action object.
3325   */
3326  
3327  function __experimentalOptimisticUpdatePost(edits) {
3328    return actions_objectSpread({}, updatePost(edits), {
3329      optimist: {
3330        id: POST_UPDATE_TRANSACTION_ID
3331      }
3332    });
3333  }
3334  /**
3335   * Action generator for saving the current post in the editor.
3336   *
3337   * @param {Object} options
3338   */
3339  
3340  function actions_savePost() {
3341    var options,
3342        edits,
3343        previousRecord,
3344        error,
3345        args,
3346        updatedRecord,
3347        _args4,
3348        _args5 = arguments;
3349  
3350    return external_this_regeneratorRuntime_default.a.wrap(function savePost$(_context4) {
3351      while (1) {
3352        switch (_context4.prev = _context4.next) {
3353          case 0:
3354            options = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
3355            _context4.next = 3;
3356            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'isEditedPostSaveable');
3357  
3358          case 3:
3359            if (_context4.sent) {
3360              _context4.next = 5;
3361              break;
3362            }
3363  
3364            return _context4.abrupt("return");
3365  
3366          case 5:
3367            _context4.next = 7;
3368            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostContent');
3369  
3370          case 7:
3371            _context4.t0 = _context4.sent;
3372            edits = {
3373              content: _context4.t0
3374            };
3375  
3376            if (options.isAutosave) {
3377              _context4.next = 12;
3378              break;
3379            }
3380  
3381            _context4.next = 12;
3382            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'editPost', edits, {
3383              undoIgnore: true
3384            });
3385  
3386          case 12:
3387            _context4.next = 14;
3388            return __experimentalRequestPostUpdateStart(options);
3389  
3390          case 14:
3391            _context4.next = 16;
3392            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3393  
3394          case 16:
3395            previousRecord = _context4.sent;
3396            _context4.t1 = actions_objectSpread;
3397            _context4.t2 = {
3398              id: previousRecord.id
3399            };
3400            _context4.next = 21;
3401            return Object(external_this_wp_dataControls_["select"])('core', 'getEntityRecordNonTransientEdits', 'postType', previousRecord.type, previousRecord.id);
3402  
3403          case 21:
3404            _context4.t3 = _context4.sent;
3405            _context4.t4 = {};
3406            _context4.t5 = edits;
3407            edits = (0, _context4.t1)(_context4.t2, _context4.t3, _context4.t4, _context4.t5);
3408            _context4.next = 27;
3409            return Object(external_this_wp_dataControls_["dispatch"])('core', 'saveEntityRecord', 'postType', previousRecord.type, edits, options);
3410  
3411          case 27:
3412            _context4.next = 29;
3413            return __experimentalRequestPostUpdateFinish(options);
3414  
3415          case 29:
3416            _context4.next = 31;
3417            return Object(external_this_wp_dataControls_["select"])('core', 'getLastEntitySaveError', 'postType', previousRecord.type, previousRecord.id);
3418  
3419          case 31:
3420            error = _context4.sent;
3421  
3422            if (!error) {
3423              _context4.next = 39;
3424              break;
3425            }
3426  
3427            args = getNotificationArgumentsForSaveFail({
3428              post: previousRecord,
3429              edits: edits,
3430              error: error
3431            });
3432  
3433            if (!args.length) {
3434              _context4.next = 37;
3435              break;
3436            }
3437  
3438            _context4.next = 37;
3439            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createErrorNotice'].concat(Object(toConsumableArray["a" /* default */])(args)));
3440  
3441          case 37:
3442            _context4.next = 57;
3443            break;
3444  
3445          case 39:
3446            _context4.next = 41;
3447            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3448  
3449          case 41:
3450            updatedRecord = _context4.sent;
3451            _context4.t6 = getNotificationArgumentsForSaveSuccess;
3452            _context4.t7 = previousRecord;
3453            _context4.t8 = updatedRecord;
3454            _context4.next = 47;
3455            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', updatedRecord.type);
3456  
3457          case 47:
3458            _context4.t9 = _context4.sent;
3459            _context4.t10 = options;
3460            _context4.t11 = {
3461              previousPost: _context4.t7,
3462              post: _context4.t8,
3463              postType: _context4.t9,
3464              options: _context4.t10
3465            };
3466            _args4 = (0, _context4.t6)(_context4.t11);
3467  
3468            if (!_args4.length) {
3469              _context4.next = 54;
3470              break;
3471            }
3472  
3473            _context4.next = 54;
3474            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createSuccessNotice'].concat(Object(toConsumableArray["a" /* default */])(_args4)));
3475  
3476          case 54:
3477            if (options.isAutosave) {
3478              _context4.next = 57;
3479              break;
3480            }
3481  
3482            _context4.next = 57;
3483            return Object(external_this_wp_dataControls_["dispatch"])('core/block-editor', '__unstableMarkLastChangeAsPersistent');
3484  
3485          case 57:
3486          case "end":
3487            return _context4.stop();
3488        }
3489      }
3490    }, _marked4);
3491  }
3492  /**
3493   * Action generator for handling refreshing the current post.
3494   */
3495  
3496  function refreshPost() {
3497    var post, postTypeSlug, postType, newPost;
3498    return external_this_regeneratorRuntime_default.a.wrap(function refreshPost$(_context5) {
3499      while (1) {
3500        switch (_context5.prev = _context5.next) {
3501          case 0:
3502            _context5.next = 2;
3503            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3504  
3505          case 2:
3506            post = _context5.sent;
3507            _context5.next = 5;
3508            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
3509  
3510          case 5:
3511            postTypeSlug = _context5.sent;
3512            _context5.next = 8;
3513            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
3514  
3515          case 8:
3516            postType = _context5.sent;
3517            _context5.next = 11;
3518            return Object(external_this_wp_dataControls_["apiFetch"])({
3519              // Timestamp arg allows caller to bypass browser caching, which is
3520              // expected for this specific function.
3521              path: "/wp/v2/".concat(postType.rest_base, "/").concat(post.id) + "?context=edit&_timestamp=".concat(Date.now())
3522            });
3523  
3524          case 11:
3525            newPost = _context5.sent;
3526            _context5.next = 14;
3527            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'resetPost', newPost);
3528  
3529          case 14:
3530          case "end":
3531            return _context5.stop();
3532        }
3533      }
3534    }, _marked5);
3535  }
3536  /**
3537   * Action generator for trashing the current post in the editor.
3538   */
3539  
3540  function trashPost() {
3541    var postTypeSlug, postType, post;
3542    return external_this_regeneratorRuntime_default.a.wrap(function trashPost$(_context6) {
3543      while (1) {
3544        switch (_context6.prev = _context6.next) {
3545          case 0:
3546            _context6.next = 2;
3547            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
3548  
3549          case 2:
3550            postTypeSlug = _context6.sent;
3551            _context6.next = 5;
3552            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
3553  
3554          case 5:
3555            postType = _context6.sent;
3556            _context6.next = 8;
3557            return Object(external_this_wp_dataControls_["dispatch"])('core/notices', 'removeNotice', TRASH_POST_NOTICE_ID);
3558  
3559          case 8:
3560            _context6.prev = 8;
3561            _context6.next = 11;
3562            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3563  
3564          case 11:
3565            post = _context6.sent;
3566            _context6.next = 14;
3567            return Object(external_this_wp_dataControls_["apiFetch"])({
3568              path: "/wp/v2/".concat(postType.rest_base, "/").concat(post.id),
3569              method: 'DELETE'
3570            });
3571  
3572          case 14:
3573            _context6.next = 16;
3574            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost');
3575  
3576          case 16:
3577            _context6.next = 22;
3578            break;
3579  
3580          case 18:
3581            _context6.prev = 18;
3582            _context6.t0 = _context6["catch"](8);
3583            _context6.next = 22;
3584            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createErrorNotice'].concat(Object(toConsumableArray["a" /* default */])(getNotificationArgumentsForTrashFail({
3585              error: _context6.t0
3586            }))));
3587  
3588          case 22:
3589          case "end":
3590            return _context6.stop();
3591        }
3592      }
3593    }, _marked6, null, [[8, 18]]);
3594  }
3595  /**
3596   * Action generator used in signalling that the post should autosave.
3597   *
3598   * @param {Object?} options Extra flags to identify the autosave.
3599   */
3600  
3601  function actions_autosave(options) {
3602    return external_this_regeneratorRuntime_default.a.wrap(function autosave$(_context7) {
3603      while (1) {
3604        switch (_context7.prev = _context7.next) {
3605          case 0:
3606            _context7.next = 2;
3607            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost', actions_objectSpread({
3608              isAutosave: true
3609            }, options));
3610  
3611          case 2:
3612          case "end":
3613            return _context7.stop();
3614        }
3615      }
3616    }, _marked7);
3617  }
3618  function actions_experimentalLocalAutosave() {
3619    var post, title, content, excerpt;
3620    return external_this_regeneratorRuntime_default.a.wrap(function __experimentalLocalAutosave$(_context8) {
3621      while (1) {
3622        switch (_context8.prev = _context8.next) {
3623          case 0:
3624            _context8.next = 2;
3625            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3626  
3627          case 2:
3628            post = _context8.sent;
3629            _context8.next = 5;
3630            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostAttribute', 'title');
3631  
3632          case 5:
3633            title = _context8.sent;
3634            _context8.next = 8;
3635            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostAttribute', 'content');
3636  
3637          case 8:
3638            content = _context8.sent;
3639            _context8.next = 11;
3640            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostAttribute', 'excerpt');
3641  
3642          case 11:
3643            excerpt = _context8.sent;
3644            _context8.next = 14;
3645            return {
3646              type: 'LOCAL_AUTOSAVE_SET',
3647              postId: post.id,
3648              title: title,
3649              content: content,
3650              excerpt: excerpt
3651            };
3652  
3653          case 14:
3654          case "end":
3655            return _context8.stop();
3656        }
3657      }
3658    }, _marked8);
3659  }
3660  /**
3661   * Returns an action object used in signalling that undo history should
3662   * restore last popped state.
3663   *
3664   * @yield {Object} Action object.
3665   */
3666  
3667  function actions_redo() {
3668    return external_this_regeneratorRuntime_default.a.wrap(function redo$(_context9) {
3669      while (1) {
3670        switch (_context9.prev = _context9.next) {
3671          case 0:
3672            _context9.next = 2;
3673            return Object(external_this_wp_dataControls_["dispatch"])('core', 'redo');
3674  
3675          case 2:
3676          case "end":
3677            return _context9.stop();
3678        }
3679      }
3680    }, _marked9);
3681  }
3682  /**
3683   * Returns an action object used in signalling that undo history should pop.
3684   *
3685   * @yield {Object} Action object.
3686   */
3687  
3688  function actions_undo() {
3689    return external_this_regeneratorRuntime_default.a.wrap(function undo$(_context10) {
3690      while (1) {
3691        switch (_context10.prev = _context10.next) {
3692          case 0:
3693            _context10.next = 2;
3694            return Object(external_this_wp_dataControls_["dispatch"])('core', 'undo');
3695  
3696          case 2:
3697          case "end":
3698            return _context10.stop();
3699        }
3700      }
3701    }, _marked10);
3702  }
3703  /**
3704   * Returns an action object used in signalling that undo history record should
3705   * be created.
3706   *
3707   * @return {Object} Action object.
3708   */
3709  
3710  function createUndoLevel() {
3711    return {
3712      type: 'CREATE_UNDO_LEVEL'
3713    };
3714  }
3715  /**
3716   * Returns an action object used to lock the editor.
3717   *
3718   * @param {Object}  lock Details about the post lock status, user, and nonce.
3719   *
3720   * @return {Object} Action object.
3721   */
3722  
3723  function updatePostLock(lock) {
3724    return {
3725      type: 'UPDATE_POST_LOCK',
3726      lock: lock
3727    };
3728  }
3729  /**
3730   * Returns an action object used to fetch a single reusable block or all
3731   * reusable blocks from the REST API into the store.
3732   *
3733   * @param {?string} id If given, only a single reusable block with this ID will
3734   *                     be fetched.
3735   *
3736   * @return {Object} Action object.
3737   */
3738  
3739  function actions_experimentalFetchReusableBlocks(id) {
3740    return {
3741      type: 'FETCH_REUSABLE_BLOCKS',
3742      id: id
3743    };
3744  }
3745  /**
3746   * Returns an action object used in signalling that reusable blocks have been
3747   * received. `results` is an array of objects containing:
3748   *  - `reusableBlock` - Details about how the reusable block is persisted.
3749   *  - `parsedBlock` - The original block.
3750   *
3751   * @param {Object[]} results Reusable blocks received.
3752   *
3753   * @return {Object} Action object.
3754   */
3755  
3756  function __experimentalReceiveReusableBlocks(results) {
3757    return {
3758      type: 'RECEIVE_REUSABLE_BLOCKS',
3759      results: results
3760    };
3761  }
3762  /**
3763   * Returns an action object used to save a reusable block that's in the store to
3764   * the REST API.
3765   *
3766   * @param {Object} id The ID of the reusable block to save.
3767   *
3768   * @return {Object} Action object.
3769   */
3770  
3771  function __experimentalSaveReusableBlock(id) {
3772    return {
3773      type: 'SAVE_REUSABLE_BLOCK',
3774      id: id
3775    };
3776  }
3777  /**
3778   * Returns an action object used to delete a reusable block via the REST API.
3779   *
3780   * @param {number} id The ID of the reusable block to delete.
3781   *
3782   * @return {Object} Action object.
3783   */
3784  
3785  function __experimentalDeleteReusableBlock(id) {
3786    return {
3787      type: 'DELETE_REUSABLE_BLOCK',
3788      id: id
3789    };
3790  }
3791  /**
3792   * Returns an action object used in signalling that a reusable block is
3793   * to be updated.
3794   *
3795   * @param {number} id      The ID of the reusable block to update.
3796   * @param {Object} changes The changes to apply.
3797   *
3798   * @return {Object} Action object.
3799   */
3800  
3801  function __experimentalUpdateReusableBlock(id, changes) {
3802    return {
3803      type: 'UPDATE_REUSABLE_BLOCK',
3804      id: id,
3805      changes: changes
3806    };
3807  }
3808  /**
3809   * Returns an action object used to convert a reusable block into a static
3810   * block.
3811   *
3812   * @param {string} clientId The client ID of the block to attach.
3813   *
3814   * @return {Object} Action object.
3815   */
3816  
3817  function __experimentalConvertBlockToStatic(clientId) {
3818    return {
3819      type: 'CONVERT_BLOCK_TO_STATIC',
3820      clientId: clientId
3821    };
3822  }
3823  /**
3824   * Returns an action object used to convert a static block into a reusable
3825   * block.
3826   *
3827   * @param {string} clientIds The client IDs of the block to detach.
3828   *
3829   * @return {Object} Action object.
3830   */
3831  
3832  function __experimentalConvertBlockToReusable(clientIds) {
3833    return {
3834      type: 'CONVERT_BLOCK_TO_REUSABLE',
3835      clientIds: Object(external_this_lodash_["castArray"])(clientIds)
3836    };
3837  }
3838  /**
3839   * Returns an action object used in signalling that the user has enabled the
3840   * publish sidebar.
3841   *
3842   * @return {Object} Action object
3843   */
3844  
3845  function enablePublishSidebar() {
3846    return {
3847      type: 'ENABLE_PUBLISH_SIDEBAR'
3848    };
3849  }
3850  /**
3851   * Returns an action object used in signalling that the user has disabled the
3852   * publish sidebar.
3853   *
3854   * @return {Object} Action object
3855   */
3856  
3857  function disablePublishSidebar() {
3858    return {
3859      type: 'DISABLE_PUBLISH_SIDEBAR'
3860    };
3861  }
3862  /**
3863   * Returns an action object used to signal that post saving is locked.
3864   *
3865   * @param  {string} lockName The lock name.
3866   *
3867   * @example
3868   * ```
3869   * const { subscribe } = wp.data;
3870   *
3871   * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
3872   *
3873   * // Only allow publishing posts that are set to a future date.
3874   * if ( 'publish' !== initialPostStatus ) {
3875   *
3876   *     // Track locking.
3877   *     let locked = false;
3878   *
3879   *     // Watch for the publish event.
3880   *     let unssubscribe = subscribe( () => {
3881   *         const currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
3882   *         if ( 'publish' !== currentPostStatus ) {
3883   *
3884   *             // Compare the post date to the current date, lock the post if the date isn't in the future.
3885   *             const postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );
3886   *             const currentDate = new Date();
3887   *             if ( postDate.getTime() <= currentDate.getTime() ) {
3888   *                 if ( ! locked ) {
3889   *                     locked = true;
3890   *                     wp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );
3891   *                 }
3892   *             } else {
3893   *                 if ( locked ) {
3894   *                     locked = false;
3895   *                     wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );
3896   *                 }
3897   *             }
3898   *         }
3899   *     } );
3900   * }
3901   * ```
3902   *
3903   * @return {Object} Action object
3904   */
3905  
3906  function lockPostSaving(lockName) {
3907    return {
3908      type: 'LOCK_POST_SAVING',
3909      lockName: lockName
3910    };
3911  }
3912  /**
3913   * Returns an action object used to signal that post saving is unlocked.
3914   *
3915   * @param  {string} lockName The lock name.
3916   *
3917   * @example
3918   * ```
3919   * // Unlock post saving with the lock key `mylock`:
3920   * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );
3921   * ```
3922   *
3923   * @return {Object} Action object
3924   */
3925  
3926  function unlockPostSaving(lockName) {
3927    return {
3928      type: 'UNLOCK_POST_SAVING',
3929      lockName: lockName
3930    };
3931  }
3932  /**
3933   * Returns an action object used to signal that post autosaving is locked.
3934   *
3935   * @param  {string} lockName The lock name.
3936   *
3937   * @example
3938   * ```
3939   * // Lock post autosaving with the lock key `mylock`:
3940   * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );
3941   * ```
3942   *
3943   * @return {Object} Action object
3944   */
3945  
3946  function lockPostAutosaving(lockName) {
3947    return {
3948      type: 'LOCK_POST_AUTOSAVING',
3949      lockName: lockName
3950    };
3951  }
3952  /**
3953   * Returns an action object used to signal that post autosaving is unlocked.
3954   *
3955   * @param  {string} lockName The lock name.
3956   *
3957   * @example
3958   * ```
3959   * // Unlock post saving with the lock key `mylock`:
3960   * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );
3961   * ```
3962   *
3963   * @return {Object} Action object
3964   */
3965  
3966  function unlockPostAutosaving(lockName) {
3967    return {
3968      type: 'UNLOCK_POST_AUTOSAVING',
3969      lockName: lockName
3970    };
3971  }
3972  /**
3973   * Returns an action object used to signal that the blocks have been updated.
3974   *
3975   * @param {Array}   blocks  Block Array.
3976   * @param {?Object} options Optional options.
3977   *
3978   * @yield {Object} Action object
3979   */
3980  
3981  function actions_resetEditorBlocks(blocks) {
3982    var options,
3983        __unstableShouldCreateUndoLevel,
3984        selectionStart,
3985        selectionEnd,
3986        edits,
3987        _yield$select2,
3988        id,
3989        type,
3990        noChange,
3991        _args12 = arguments;
3992  
3993    return external_this_regeneratorRuntime_default.a.wrap(function resetEditorBlocks$(_context11) {
3994      while (1) {
3995        switch (_context11.prev = _context11.next) {
3996          case 0:
3997            options = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
3998            __unstableShouldCreateUndoLevel = options.__unstableShouldCreateUndoLevel, selectionStart = options.selectionStart, selectionEnd = options.selectionEnd;
3999            edits = {
4000              blocks: blocks,
4001              selectionStart: selectionStart,
4002              selectionEnd: selectionEnd
4003            };
4004  
4005            if (!(__unstableShouldCreateUndoLevel !== false)) {
4006              _context11.next = 19;
4007              break;
4008            }
4009  
4010            _context11.next = 6;
4011            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
4012  
4013          case 6:
4014            _yield$select2 = _context11.sent;
4015            id = _yield$select2.id;
4016            type = _yield$select2.type;
4017            _context11.next = 11;
4018            return Object(external_this_wp_dataControls_["__unstableSyncSelect"])('core', 'getEditedEntityRecord', 'postType', type, id);
4019  
4020          case 11:
4021            _context11.t0 = _context11.sent.blocks;
4022            _context11.t1 = edits.blocks;
4023            noChange = _context11.t0 === _context11.t1;
4024  
4025            if (!noChange) {
4026              _context11.next = 18;
4027              break;
4028            }
4029  
4030            _context11.next = 17;
4031            return Object(external_this_wp_dataControls_["dispatch"])('core', '__unstableCreateUndoLevel', 'postType', type, id);
4032  
4033          case 17:
4034            return _context11.abrupt("return", _context11.sent);
4035  
4036          case 18:
4037            // We create a new function here on every persistent edit
4038            // to make sure the edit makes the post dirty and creates
4039            // a new undo level.
4040            edits.content = function (_ref) {
4041              var _ref$blocks = _ref.blocks,
4042                  blocksForSerialization = _ref$blocks === void 0 ? [] : _ref$blocks;
4043              return serialize_blocks(blocksForSerialization);
4044            };
4045  
4046          case 19:
4047            return _context11.delegateYield(actions_editPost(edits), "t2", 20);
4048  
4049          case 20:
4050          case "end":
4051            return _context11.stop();
4052        }
4053      }
4054    }, _marked11);
4055  }
4056  /*
4057   * Returns an action object used in signalling that the post editor settings have been updated.
4058   *
4059   * @param {Object} settings Updated settings
4060   *
4061   * @return {Object} Action object
4062   */
4063  
4064  function updateEditorSettings(settings) {
4065    return {
4066      type: 'UPDATE_EDITOR_SETTINGS',
4067      settings: settings
4068    };
4069  }
4070  /**
4071   * Backward compatibility
4072   */
4073  
4074  var actions_getBlockEditorAction = function getBlockEditorAction(name) {
4075    return /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee() {
4076      var _len,
4077          args,
4078          _key,
4079          _args13 = arguments;
4080  
4081      return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context12) {
4082        while (1) {
4083          switch (_context12.prev = _context12.next) {
4084            case 0:
4085              external_this_wp_deprecated_default()("`wp.data.dispatch( 'core/editor' )." + name + '`', {
4086                alternative: "`wp.data.dispatch( 'core/block-editor' )." + name + '`'
4087              });
4088  
4089              for (_len = _args13.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4090                args[_key] = _args13[_key];
4091              }
4092  
4093              _context12.next = 4;
4094              return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/block-editor', name].concat(args));
4095  
4096            case 4:
4097            case "end":
4098              return _context12.stop();
4099          }
4100        }
4101      }, _callee);
4102    });
4103  };
4104  /**
4105   * @see resetBlocks in core/block-editor store.
4106   */
4107  
4108  
4109  var resetBlocks = actions_getBlockEditorAction('resetBlocks');
4110  /**
4111   * @see receiveBlocks in core/block-editor store.
4112   */
4113  
4114  var receiveBlocks = actions_getBlockEditorAction('receiveBlocks');
4115  /**
4116   * @see updateBlock in core/block-editor store.
4117   */
4118  
4119  var updateBlock = actions_getBlockEditorAction('updateBlock');
4120  /**
4121   * @see updateBlockAttributes in core/block-editor store.
4122   */
4123  
4124  var updateBlockAttributes = actions_getBlockEditorAction('updateBlockAttributes');
4125  /**
4126   * @see selectBlock in core/block-editor store.
4127   */
4128  
4129  var actions_selectBlock = actions_getBlockEditorAction('selectBlock');
4130  /**
4131   * @see startMultiSelect in core/block-editor store.
4132   */
4133  
4134  var startMultiSelect = actions_getBlockEditorAction('startMultiSelect');
4135  /**
4136   * @see stopMultiSelect in core/block-editor store.
4137   */
4138  
4139  var stopMultiSelect = actions_getBlockEditorAction('stopMultiSelect');
4140  /**
4141   * @see multiSelect in core/block-editor store.
4142   */
4143  
4144  var multiSelect = actions_getBlockEditorAction('multiSelect');
4145  /**
4146   * @see clearSelectedBlock in core/block-editor store.
4147   */
4148  
4149  var clearSelectedBlock = actions_getBlockEditorAction('clearSelectedBlock');
4150  /**
4151   * @see toggleSelection in core/block-editor store.
4152   */
4153  
4154  var toggleSelection = actions_getBlockEditorAction('toggleSelection');
4155  /**
4156   * @see replaceBlocks in core/block-editor store.
4157   */
4158  
4159  var actions_replaceBlocks = actions_getBlockEditorAction('replaceBlocks');
4160  /**
4161   * @see replaceBlock in core/block-editor store.
4162   */
4163  
4164  var replaceBlock = actions_getBlockEditorAction('replaceBlock');
4165  /**
4166   * @see moveBlocksDown in core/block-editor store.
4167   */
4168  
4169  var moveBlocksDown = actions_getBlockEditorAction('moveBlocksDown');
4170  /**
4171   * @see moveBlocksUp in core/block-editor store.
4172   */
4173  
4174  var moveBlocksUp = actions_getBlockEditorAction('moveBlocksUp');
4175  /**
4176   * @see moveBlockToPosition in core/block-editor store.
4177   */
4178  
4179  var moveBlockToPosition = actions_getBlockEditorAction('moveBlockToPosition');
4180  /**
4181   * @see insertBlock in core/block-editor store.
4182   */
4183  
4184  var insertBlock = actions_getBlockEditorAction('insertBlock');
4185  /**
4186   * @see insertBlocks in core/block-editor store.
4187   */
4188  
4189  var insertBlocks = actions_getBlockEditorAction('insertBlocks');
4190  /**
4191   * @see showInsertionPoint in core/block-editor store.
4192   */
4193  
4194  var showInsertionPoint = actions_getBlockEditorAction('showInsertionPoint');
4195  /**
4196   * @see hideInsertionPoint in core/block-editor store.
4197   */
4198  
4199  var hideInsertionPoint = actions_getBlockEditorAction('hideInsertionPoint');
4200  /**
4201   * @see setTemplateValidity in core/block-editor store.
4202   */
4203  
4204  var setTemplateValidity = actions_getBlockEditorAction('setTemplateValidity');
4205  /**
4206   * @see synchronizeTemplate in core/block-editor store.
4207   */
4208  
4209  var synchronizeTemplate = actions_getBlockEditorAction('synchronizeTemplate');
4210  /**
4211   * @see mergeBlocks in core/block-editor store.
4212   */
4213  
4214  var mergeBlocks = actions_getBlockEditorAction('mergeBlocks');
4215  /**
4216   * @see removeBlocks in core/block-editor store.
4217   */
4218  
4219  var removeBlocks = actions_getBlockEditorAction('removeBlocks');
4220  /**
4221   * @see removeBlock in core/block-editor store.
4222   */
4223  
4224  var removeBlock = actions_getBlockEditorAction('removeBlock');
4225  /**
4226   * @see toggleBlockMode in core/block-editor store.
4227   */
4228  
4229  var toggleBlockMode = actions_getBlockEditorAction('toggleBlockMode');
4230  /**
4231   * @see startTyping in core/block-editor store.
4232   */
4233  
4234  var startTyping = actions_getBlockEditorAction('startTyping');
4235  /**
4236   * @see stopTyping in core/block-editor store.
4237   */
4238  
4239  var stopTyping = actions_getBlockEditorAction('stopTyping');
4240  /**
4241   * @see enterFormattedText in core/block-editor store.
4242   */
4243  
4244  var enterFormattedText = actions_getBlockEditorAction('enterFormattedText');
4245  /**
4246   * @see exitFormattedText in core/block-editor store.
4247   */
4248  
4249  var exitFormattedText = actions_getBlockEditorAction('exitFormattedText');
4250  /**
4251   * @see insertDefaultBlock in core/block-editor store.
4252   */
4253  
4254  var insertDefaultBlock = actions_getBlockEditorAction('insertDefaultBlock');
4255  /**
4256   * @see updateBlockListSettings in core/block-editor store.
4257   */
4258  
4259  var updateBlockListSettings = actions_getBlockEditorAction('updateBlockListSettings');
4260  
4261  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
4262  var slicedToArray = __webpack_require__(14);
4263  
4264  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
4265  var rememo = __webpack_require__(42);
4266  
4267  // EXTERNAL MODULE: external {"this":["wp","date"]}
4268  var external_this_wp_date_ = __webpack_require__(79);
4269  
4270  // EXTERNAL MODULE: external {"this":["wp","url"]}
4271  var external_this_wp_url_ = __webpack_require__(31);
4272  
4273  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/url.js
4274  /**
4275   * External dependencies
4276   */
4277  
4278  /**
4279   * WordPress dependencies
4280   */
4281  
4282  
4283  /**
4284   * Returns the URL of a WPAdmin Page.
4285   *
4286   * TODO: This should be moved to a module less specific to the editor.
4287   *
4288   * @param {string} page  Page to navigate to.
4289   * @param {Object} query Query Args.
4290   *
4291   * @return {string} WPAdmin URL.
4292   */
4293  
4294  function getWPAdminURL(page, query) {
4295    return Object(external_this_wp_url_["addQueryArgs"])(page, query);
4296  }
4297  /**
4298   * Performs some basic cleanup of a string for use as a post slug
4299   *
4300   * This replicates some of what sanitize_title() does in WordPress core, but
4301   * is only designed to approximate what the slug will be.
4302   *
4303   * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin
4304   * letters. Removes combining diacritical marks. Converts whitespace, periods,
4305   * and forward slashes to hyphens. Removes any remaining non-word characters
4306   * except hyphens. Converts remaining string to lowercase. It does not account
4307   * for octets, HTML entities, or other encoded characters.
4308   *
4309   * @param {string} string Title or slug to be processed
4310   *
4311   * @return {string} Processed string
4312   */
4313  
4314  function cleanForSlug(string) {
4315    if (!string) {
4316      return '';
4317    }
4318  
4319    return Object(external_this_lodash_["trim"])(Object(external_this_lodash_["deburr"])(string).replace(/[\s\./]+/g, '-').replace(/[^\w-]+/g, '').toLowerCase(), '-');
4320  }
4321  
4322  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/selectors.js
4323  
4324  
4325  
4326  function selectors_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4327  
4328  function selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { selectors_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4329  
4330  /**
4331   * External dependencies
4332   */
4333  
4334  
4335  /**
4336   * WordPress dependencies
4337   */
4338  
4339  
4340  
4341  
4342  
4343  
4344  /**
4345   * Internal dependencies
4346   */
4347  
4348  
4349  
4350  
4351  
4352  
4353  /**
4354   * Shared reference to an empty object for cases where it is important to avoid
4355   * returning a new object reference on every invocation, as in a connected or
4356   * other pure component which performs `shouldComponentUpdate` check on props.
4357   * This should be used as a last resort, since the normalized data should be
4358   * maintained by the reducer result in state.
4359   */
4360  
4361  var EMPTY_OBJECT = {};
4362  /**
4363   * Shared reference to an empty array for cases where it is important to avoid
4364   * returning a new array reference on every invocation, as in a connected or
4365   * other pure component which performs `shouldComponentUpdate` check on props.
4366   * This should be used as a last resort, since the normalized data should be
4367   * maintained by the reducer result in state.
4368   */
4369  
4370  var EMPTY_ARRAY = [];
4371  /**
4372   * Returns true if any past editor history snapshots exist, or false otherwise.
4373   *
4374   * @param {Object} state Global application state.
4375   *
4376   * @return {boolean} Whether undo history exists.
4377   */
4378  
4379  var hasEditorUndo = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4380    return function () {
4381      return select('core').hasUndo();
4382    };
4383  });
4384  /**
4385   * Returns true if any future editor history snapshots exist, or false
4386   * otherwise.
4387   *
4388   * @param {Object} state Global application state.
4389   *
4390   * @return {boolean} Whether redo history exists.
4391   */
4392  
4393  var hasEditorRedo = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4394    return function () {
4395      return select('core').hasRedo();
4396    };
4397  });
4398  /**
4399   * Returns true if the currently edited post is yet to be saved, or false if
4400   * the post has been saved.
4401   *
4402   * @param {Object} state Global application state.
4403   *
4404   * @return {boolean} Whether the post is new.
4405   */
4406  
4407  function isEditedPostNew(state) {
4408    return selectors_getCurrentPost(state).status === 'auto-draft';
4409  }
4410  /**
4411   * Returns true if content includes unsaved changes, or false otherwise.
4412   *
4413   * @param {Object} state Editor state.
4414   *
4415   * @return {boolean} Whether content includes unsaved changes.
4416   */
4417  
4418  function hasChangedContent(state) {
4419    var edits = selectors_getPostEdits(state);
4420    return 'blocks' in edits || // `edits` is intended to contain only values which are different from
4421    // the saved post, so the mere presence of a property is an indicator
4422    // that the value is different than what is known to be saved. While
4423    // content in Visual mode is represented by the blocks state, in Text
4424    // mode it is tracked by `edits.content`.
4425    'content' in edits;
4426  }
4427  /**
4428   * Returns true if there are unsaved values for the current edit session, or
4429   * false if the editing state matches the saved or new post.
4430   *
4431   * @param {Object} state Global application state.
4432   *
4433   * @return {boolean} Whether unsaved values exist.
4434   */
4435  
4436  var selectors_isEditedPostDirty = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4437    return function (state) {
4438      // Edits should contain only fields which differ from the saved post (reset
4439      // at initial load and save complete). Thus, a non-empty edits state can be
4440      // inferred to contain unsaved values.
4441      var postType = selectors_getCurrentPostType(state);
4442      var postId = selectors_getCurrentPostId(state);
4443  
4444      if (select('core').hasEditsForEntityRecord('postType', postType, postId)) {
4445        return true;
4446      }
4447  
4448      return false;
4449    };
4450  });
4451  /**
4452   * Returns true if there are unsaved edits for entities other than
4453   * the editor's post, and false otherwise.
4454   *
4455   * @param {Object} state Global application state.
4456   *
4457   * @return {boolean} Whether there are edits or not.
4458   */
4459  
4460  var selectors_hasNonPostEntityChanges = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4461    return function (state) {
4462      var enableFullSiteEditing = selectors_getEditorSettings(state).__experimentalEnableFullSiteEditing;
4463  
4464      if (!enableFullSiteEditing) {
4465        return false;
4466      }
4467  
4468      var dirtyEntityRecords = select('core').__experimentalGetDirtyEntityRecords();
4469  
4470      var _getCurrentPost = selectors_getCurrentPost(state),
4471          type = _getCurrentPost.type,
4472          id = _getCurrentPost.id;
4473  
4474      return Object(external_this_lodash_["some"])(dirtyEntityRecords, function (entityRecord) {
4475        return entityRecord.kind !== 'postType' || entityRecord.name !== type || entityRecord.key !== id;
4476      });
4477    };
4478  });
4479  /**
4480   * Returns true if there are no unsaved values for the current edit session and
4481   * if the currently edited post is new (has never been saved before).
4482   *
4483   * @param {Object} state Global application state.
4484   *
4485   * @return {boolean} Whether new post and unsaved values exist.
4486   */
4487  
4488  function selectors_isCleanNewPost(state) {
4489    return !selectors_isEditedPostDirty(state) && isEditedPostNew(state);
4490  }
4491  /**
4492   * Returns the post currently being edited in its last known saved state, not
4493   * including unsaved edits. Returns an object containing relevant default post
4494   * values if the post has not yet been saved.
4495   *
4496   * @param {Object} state Global application state.
4497   *
4498   * @return {Object} Post object.
4499   */
4500  
4501  var selectors_getCurrentPost = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4502    return function (state) {
4503      var postId = selectors_getCurrentPostId(state);
4504      var postType = selectors_getCurrentPostType(state);
4505      var post = select('core').getRawEntityRecord('postType', postType, postId);
4506  
4507      if (post) {
4508        return post;
4509      } // This exists for compatibility with the previous selector behavior
4510      // which would guarantee an object return based on the editor reducer's
4511      // default empty object state.
4512  
4513  
4514      return EMPTY_OBJECT;
4515    };
4516  });
4517  /**
4518   * Returns the post type of the post currently being edited.
4519   *
4520   * @param {Object} state Global application state.
4521   *
4522   * @return {string} Post type.
4523   */
4524  
4525  function selectors_getCurrentPostType(state) {
4526    return state.postType;
4527  }
4528  /**
4529   * Returns the ID of the post currently being edited, or null if the post has
4530   * not yet been saved.
4531   *
4532   * @param {Object} state Global application state.
4533   *
4534   * @return {?number} ID of current post.
4535   */
4536  
4537  function selectors_getCurrentPostId(state) {
4538    return state.postId;
4539  }
4540  /**
4541   * Returns the number of revisions of the post currently being edited.
4542   *
4543   * @param {Object} state Global application state.
4544   *
4545   * @return {number} Number of revisions.
4546   */
4547  
4548  function getCurrentPostRevisionsCount(state) {
4549    return Object(external_this_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'version-history', 0, 'count'], 0);
4550  }
4551  /**
4552   * Returns the last revision ID of the post currently being edited,
4553   * or null if the post has no revisions.
4554   *
4555   * @param {Object} state Global application state.
4556   *
4557   * @return {?number} ID of the last revision.
4558   */
4559  
4560  function getCurrentPostLastRevisionId(state) {
4561    return Object(external_this_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'predecessor-version', 0, 'id'], null);
4562  }
4563  /**
4564   * Returns any post values which have been changed in the editor but not yet
4565   * been saved.
4566   *
4567   * @param {Object} state Global application state.
4568   *
4569   * @return {Object} Object of key value pairs comprising unsaved edits.
4570   */
4571  
4572  var selectors_getPostEdits = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4573    return function (state) {
4574      var postType = selectors_getCurrentPostType(state);
4575      var postId = selectors_getCurrentPostId(state);
4576      return select('core').getEntityRecordEdits('postType', postType, postId) || EMPTY_OBJECT;
4577    };
4578  });
4579  /**
4580   * Returns a new reference when edited values have changed. This is useful in
4581   * inferring where an edit has been made between states by comparison of the
4582   * return values using strict equality.
4583   *
4584   * @deprecated since Gutenberg 6.5.0.
4585   *
4586   * @example
4587   *
4588   * ```
4589   * const hasEditOccurred = (
4590   *    getReferenceByDistinctEdits( beforeState ) !==
4591   *    getReferenceByDistinctEdits( afterState )
4592   * );
4593   * ```
4594   *
4595   * @param {Object} state Editor state.
4596   *
4597   * @return {*} A value whose reference will change only when an edit occurs.
4598   */
4599  
4600  var getReferenceByDistinctEdits = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4601    return function ()
4602    /* state */
4603    {
4604      external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`", {
4605        alternative: "`wp.data.select( 'core' ).getReferenceByDistinctEdits`"
4606      });
4607      return select('core').getReferenceByDistinctEdits();
4608    };
4609  });
4610  /**
4611   * Returns an attribute value of the saved post.
4612   *
4613   * @param {Object} state         Global application state.
4614   * @param {string} attributeName Post attribute name.
4615   *
4616   * @return {*} Post attribute value.
4617   */
4618  
4619  function selectors_getCurrentPostAttribute(state, attributeName) {
4620    switch (attributeName) {
4621      case 'type':
4622        return selectors_getCurrentPostType(state);
4623  
4624      case 'id':
4625        return selectors_getCurrentPostId(state);
4626  
4627      default:
4628        var post = selectors_getCurrentPost(state);
4629  
4630        if (!post.hasOwnProperty(attributeName)) {
4631          break;
4632        }
4633  
4634        return getPostRawValue(post[attributeName]);
4635    }
4636  }
4637  /**
4638   * Returns a single attribute of the post being edited, preferring the unsaved
4639   * edit if one exists, but merging with the attribute value for the last known
4640   * saved state of the post (this is needed for some nested attributes like meta).
4641   *
4642   * @param {Object} state         Global application state.
4643   * @param {string} attributeName Post attribute name.
4644   *
4645   * @return {*} Post attribute value.
4646   */
4647  
4648  var getNestedEditedPostProperty = function getNestedEditedPostProperty(state, attributeName) {
4649    var edits = selectors_getPostEdits(state);
4650  
4651    if (!edits.hasOwnProperty(attributeName)) {
4652      return selectors_getCurrentPostAttribute(state, attributeName);
4653    }
4654  
4655    return selectors_objectSpread({}, selectors_getCurrentPostAttribute(state, attributeName), {}, edits[attributeName]);
4656  };
4657  /**
4658   * Returns a single attribute of the post being edited, preferring the unsaved
4659   * edit if one exists, but falling back to the attribute for the last known
4660   * saved state of the post.
4661   *
4662   * @param {Object} state         Global application state.
4663   * @param {string} attributeName Post attribute name.
4664   *
4665   * @return {*} Post attribute value.
4666   */
4667  
4668  
4669  function selectors_getEditedPostAttribute(state, attributeName) {
4670    // Special cases
4671    switch (attributeName) {
4672      case 'content':
4673        return getEditedPostContent(state);
4674    } // Fall back to saved post value if not edited.
4675  
4676  
4677    var edits = selectors_getPostEdits(state);
4678  
4679    if (!edits.hasOwnProperty(attributeName)) {
4680      return selectors_getCurrentPostAttribute(state, attributeName);
4681    } // Merge properties are objects which contain only the patch edit in state,
4682    // and thus must be merged with the current post attribute.
4683  
4684  
4685    if (EDIT_MERGE_PROPERTIES.has(attributeName)) {
4686      return getNestedEditedPostProperty(state, attributeName);
4687    }
4688  
4689    return edits[attributeName];
4690  }
4691  /**
4692   * Returns an attribute value of the current autosave revision for a post, or
4693   * null if there is no autosave for the post.
4694   *
4695   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
4696   *                from the '@wordpress/core-data' package and access properties on the returned
4697   *                autosave object using getPostRawValue.
4698   *
4699   * @param {Object} state         Global application state.
4700   * @param {string} attributeName Autosave attribute name.
4701   *
4702   * @return {*} Autosave attribute value.
4703   */
4704  
4705  var getAutosaveAttribute = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4706    return function (state, attributeName) {
4707      if (!Object(external_this_lodash_["includes"])(AUTOSAVE_PROPERTIES, attributeName) && attributeName !== 'preview_link') {
4708        return;
4709      }
4710  
4711      var postType = selectors_getCurrentPostType(state);
4712      var postId = selectors_getCurrentPostId(state);
4713      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4714      var autosave = select('core').getAutosave(postType, postId, currentUserId);
4715  
4716      if (autosave) {
4717        return getPostRawValue(autosave[attributeName]);
4718      }
4719    };
4720  });
4721  /**
4722   * Returns the current visibility of the post being edited, preferring the
4723   * unsaved value if different than the saved post. The return value is one of
4724   * "private", "password", or "public".
4725   *
4726   * @param {Object} state Global application state.
4727   *
4728   * @return {string} Post visibility.
4729   */
4730  
4731  function selectors_getEditedPostVisibility(state) {
4732    var status = selectors_getEditedPostAttribute(state, 'status');
4733  
4734    if (status === 'private') {
4735      return 'private';
4736    }
4737  
4738    var password = selectors_getEditedPostAttribute(state, 'password');
4739  
4740    if (password) {
4741      return 'password';
4742    }
4743  
4744    return 'public';
4745  }
4746  /**
4747   * Returns true if post is pending review.
4748   *
4749   * @param {Object} state Global application state.
4750   *
4751   * @return {boolean} Whether current post is pending review.
4752   */
4753  
4754  function isCurrentPostPending(state) {
4755    return selectors_getCurrentPost(state).status === 'pending';
4756  }
4757  /**
4758   * Return true if the current post has already been published.
4759   *
4760   * @param {Object}  state       Global application state.
4761   * @param {Object?} currentPost Explicit current post for bypassing registry selector.
4762   *
4763   * @return {boolean} Whether the post has been published.
4764   */
4765  
4766  function selectors_isCurrentPostPublished(state, currentPost) {
4767    var post = currentPost || selectors_getCurrentPost(state);
4768    return ['publish', 'private'].indexOf(post.status) !== -1 || post.status === 'future' && !Object(external_this_wp_date_["isInTheFuture"])(new Date(Number(Object(external_this_wp_date_["getDate"])(post.date)) - ONE_MINUTE_IN_MS));
4769  }
4770  /**
4771   * Returns true if post is already scheduled.
4772   *
4773   * @param {Object} state Global application state.
4774   *
4775   * @return {boolean} Whether current post is scheduled to be posted.
4776   */
4777  
4778  function selectors_isCurrentPostScheduled(state) {
4779    return selectors_getCurrentPost(state).status === 'future' && !selectors_isCurrentPostPublished(state);
4780  }
4781  /**
4782   * Return true if the post being edited can be published.
4783   *
4784   * @param {Object} state Global application state.
4785   *
4786   * @return {boolean} Whether the post can been published.
4787   */
4788  
4789  function selectors_isEditedPostPublishable(state) {
4790    var post = selectors_getCurrentPost(state); // TODO: Post being publishable should be superset of condition of post
4791    // being saveable. Currently this restriction is imposed at UI.
4792    //
4793    //  See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`)
4794  
4795    return selectors_isEditedPostDirty(state) || ['publish', 'private', 'future'].indexOf(post.status) === -1;
4796  }
4797  /**
4798   * Returns true if the post can be saved, or false otherwise. A post must
4799   * contain a title, an excerpt, or non-empty content to be valid for save.
4800   *
4801   * @param {Object} state Global application state.
4802   *
4803   * @return {boolean} Whether the post can be saved.
4804   */
4805  
4806  function selectors_isEditedPostSaveable(state) {
4807    if (selectors_isSavingPost(state)) {
4808      return false;
4809    } // TODO: Post should not be saveable if not dirty. Cannot be added here at
4810    // this time since posts where meta boxes are present can be saved even if
4811    // the post is not dirty. Currently this restriction is imposed at UI, but
4812    // should be moved here.
4813    //
4814    //  See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)
4815    //  See: <PostSavedState /> (`forceIsDirty` prop)
4816    //  See: <PostPublishButton /> (`forceIsDirty` prop)
4817    //  See: https://github.com/WordPress/gutenberg/pull/4184
4818  
4819  
4820    return !!selectors_getEditedPostAttribute(state, 'title') || !!selectors_getEditedPostAttribute(state, 'excerpt') || !isEditedPostEmpty(state);
4821  }
4822  /**
4823   * Returns true if the edited post has content. A post has content if it has at
4824   * least one saveable block or otherwise has a non-empty content property
4825   * assigned.
4826   *
4827   * @param {Object} state Global application state.
4828   *
4829   * @return {boolean} Whether post has content.
4830   */
4831  
4832  function isEditedPostEmpty(state) {
4833    // While the condition of truthy content string is sufficient to determine
4834    // emptiness, testing saveable blocks length is a trivial operation. Since
4835    // this function can be called frequently, optimize for the fast case as a
4836    // condition of the mere existence of blocks. Note that the value of edited
4837    // content takes precedent over block content, and must fall through to the
4838    // default logic.
4839    var blocks = selectors_getEditorBlocks(state);
4840  
4841    if (blocks.length) {
4842      // Pierce the abstraction of the serializer in knowing that blocks are
4843      // joined with with newlines such that even if every individual block
4844      // produces an empty save result, the serialized content is non-empty.
4845      if (blocks.length > 1) {
4846        return false;
4847      } // There are two conditions under which the optimization cannot be
4848      // assumed, and a fallthrough to getEditedPostContent must occur:
4849      //
4850      // 1. getBlocksForSerialization has special treatment in omitting a
4851      //    single unmodified default block.
4852      // 2. Comment delimiters are omitted for a freeform or unregistered
4853      //    block in its serialization. The freeform block specifically may
4854      //    produce an empty string in its saved output.
4855      //
4856      // For all other content, the single block is assumed to make a post
4857      // non-empty, if only by virtue of its own comment delimiters.
4858  
4859  
4860      var blockName = blocks[0].name;
4861  
4862      if (blockName !== Object(external_this_wp_blocks_["getDefaultBlockName"])() && blockName !== Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()) {
4863        return false;
4864      }
4865    }
4866  
4867    return !getEditedPostContent(state);
4868  }
4869  /**
4870   * Returns true if the post can be autosaved, or false otherwise.
4871   *
4872   * @param {Object} state    Global application state.
4873   * @param {Object} autosave A raw autosave object from the REST API.
4874   *
4875   * @return {boolean} Whether the post can be autosaved.
4876   */
4877  
4878  var selectors_isEditedPostAutosaveable = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4879    return function (state) {
4880      // A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.
4881      if (!selectors_isEditedPostSaveable(state)) {
4882        return false;
4883      } // A post is not autosavable when there is a post autosave lock.
4884  
4885  
4886      if (isPostAutosavingLocked(state)) {
4887        return false;
4888      }
4889  
4890      var postType = selectors_getCurrentPostType(state);
4891      var postId = selectors_getCurrentPostId(state);
4892      var hasFetchedAutosave = select('core').hasFetchedAutosaves(postType, postId);
4893      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']); // Disable reason - this line causes the side-effect of fetching the autosave
4894      // via a resolver, moving below the return would result in the autosave never
4895      // being fetched.
4896      // eslint-disable-next-line @wordpress/no-unused-vars-before-return
4897  
4898      var autosave = select('core').getAutosave(postType, postId, currentUserId); // If any existing autosaves have not yet been fetched, this function is
4899      // unable to determine if the post is autosaveable, so return false.
4900  
4901      if (!hasFetchedAutosave) {
4902        return false;
4903      } // If we don't already have an autosave, the post is autosaveable.
4904  
4905  
4906      if (!autosave) {
4907        return true;
4908      } // To avoid an expensive content serialization, use the content dirtiness
4909      // flag in place of content field comparison against the known autosave.
4910      // This is not strictly accurate, and relies on a tolerance toward autosave
4911      // request failures for unnecessary saves.
4912  
4913  
4914      if (hasChangedContent(state)) {
4915        return true;
4916      } // If the title or excerpt has changed, the post is autosaveable.
4917  
4918  
4919      return ['title', 'excerpt'].some(function (field) {
4920        return getPostRawValue(autosave[field]) !== selectors_getEditedPostAttribute(state, field);
4921      });
4922    };
4923  });
4924  /**
4925   * Returns the current autosave, or null if one is not set (i.e. if the post
4926   * has yet to be autosaved, or has been saved or published since the last
4927   * autosave).
4928   *
4929   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )`
4930   *                selector from the '@wordpress/core-data' package.
4931   *
4932   * @param {Object} state Editor state.
4933   *
4934   * @return {?Object} Current autosave, if exists.
4935   */
4936  
4937  var getAutosave = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4938    return function (state) {
4939      external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' ).getAutosave()`", {
4940        alternative: "`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",
4941        plugin: 'Gutenberg'
4942      });
4943      var postType = selectors_getCurrentPostType(state);
4944      var postId = selectors_getCurrentPostId(state);
4945      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4946      var autosave = select('core').getAutosave(postType, postId, currentUserId);
4947      return Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["pick"])(autosave, AUTOSAVE_PROPERTIES), getPostRawValue);
4948    };
4949  });
4950  /**
4951   * Returns the true if there is an existing autosave, otherwise false.
4952   *
4953   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
4954   *             from the '@wordpress/core-data' package and check for a truthy value.
4955   *
4956   * @param {Object} state Global application state.
4957   *
4958   * @return {boolean} Whether there is an existing autosave.
4959   */
4960  
4961  var hasAutosave = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4962    return function (state) {
4963      external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' ).hasAutosave()`", {
4964        alternative: "`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",
4965        plugin: 'Gutenberg'
4966      });
4967      var postType = selectors_getCurrentPostType(state);
4968      var postId = selectors_getCurrentPostId(state);
4969      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4970      return !!select('core').getAutosave(postType, postId, currentUserId);
4971    };
4972  });
4973  /**
4974   * Return true if the post being edited is being scheduled. Preferring the
4975   * unsaved status values.
4976   *
4977   * @param {Object} state Global application state.
4978   *
4979   * @return {boolean} Whether the post has been published.
4980   */
4981  
4982  function selectors_isEditedPostBeingScheduled(state) {
4983    var date = selectors_getEditedPostAttribute(state, 'date'); // Offset the date by one minute (network latency)
4984  
4985    var checkedDate = new Date(Number(Object(external_this_wp_date_["getDate"])(date)) - ONE_MINUTE_IN_MS);
4986    return Object(external_this_wp_date_["isInTheFuture"])(checkedDate);
4987  }
4988  /**
4989   * Returns whether the current post should be considered to have a "floating"
4990   * date (i.e. that it would publish "Immediately" rather than at a set time).
4991   *
4992   * Unlike in the PHP backend, the REST API returns a full date string for posts
4993   * where the 0000-00-00T00:00:00 placeholder is present in the database. To
4994   * infer that a post is set to publish "Immediately" we check whether the date
4995   * and modified date are the same.
4996   *
4997   * @param {Object} state Editor state.
4998   *
4999   * @return {boolean} Whether the edited post has a floating date value.
5000   */
5001  
5002  function isEditedPostDateFloating(state) {
5003    var date = selectors_getEditedPostAttribute(state, 'date');
5004    var modified = selectors_getEditedPostAttribute(state, 'modified');
5005    var status = selectors_getEditedPostAttribute(state, 'status');
5006  
5007    if (status === 'draft' || status === 'auto-draft' || status === 'pending') {
5008      return date === modified || date === null;
5009    }
5010  
5011    return false;
5012  }
5013  /**
5014   * Returns true if the post is currently being saved, or false otherwise.
5015   *
5016   * @param {Object} state Global application state.
5017   *
5018   * @return {boolean} Whether post is being saved.
5019   */
5020  
5021  var selectors_isSavingPost = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5022    return function (state) {
5023      var postType = selectors_getCurrentPostType(state);
5024      var postId = selectors_getCurrentPostId(state);
5025      return select('core').isSavingEntityRecord('postType', postType, postId);
5026    };
5027  });
5028  /**
5029   * Returns true if a previous post save was attempted successfully, or false
5030   * otherwise.
5031   *
5032   * @param {Object} state Global application state.
5033   *
5034   * @return {boolean} Whether the post was saved successfully.
5035   */
5036  
5037  var didPostSaveRequestSucceed = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5038    return function (state) {
5039      var postType = selectors_getCurrentPostType(state);
5040      var postId = selectors_getCurrentPostId(state);
5041      return !select('core').getLastEntitySaveError('postType', postType, postId);
5042    };
5043  });
5044  /**
5045   * Returns true if a previous post save was attempted but failed, or false
5046   * otherwise.
5047   *
5048   * @param {Object} state Global application state.
5049   *
5050   * @return {boolean} Whether the post save failed.
5051   */
5052  
5053  var didPostSaveRequestFail = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5054    return function (state) {
5055      var postType = selectors_getCurrentPostType(state);
5056      var postId = selectors_getCurrentPostId(state);
5057      return !!select('core').getLastEntitySaveError('postType', postType, postId);
5058    };
5059  });
5060  /**
5061   * Returns true if the post is autosaving, or false otherwise.
5062   *
5063   * @param {Object} state Global application state.
5064   *
5065   * @return {boolean} Whether the post is autosaving.
5066   */
5067  
5068  function selectors_isAutosavingPost(state) {
5069    if (!selectors_isSavingPost(state)) {
5070      return false;
5071    }
5072  
5073    return !!Object(external_this_lodash_["get"])(state.saving, ['options', 'isAutosave']);
5074  }
5075  /**
5076   * Returns true if the post is being previewed, or false otherwise.
5077   *
5078   * @param {Object} state Global application state.
5079   *
5080   * @return {boolean} Whether the post is being previewed.
5081   */
5082  
5083  function isPreviewingPost(state) {
5084    if (!selectors_isSavingPost(state)) {
5085      return false;
5086    }
5087  
5088    return !!state.saving.options.isPreview;
5089  }
5090  /**
5091   * Returns the post preview link
5092   *
5093   * @param {Object} state Global application state.
5094   *
5095   * @return {string?} Preview Link.
5096   */
5097  
5098  function selectors_getEditedPostPreviewLink(state) {
5099    if (state.saving.pending || selectors_isSavingPost(state)) {
5100      return;
5101    }
5102  
5103    var previewLink = getAutosaveAttribute(state, 'preview_link');
5104  
5105    if (!previewLink) {
5106      previewLink = selectors_getEditedPostAttribute(state, 'link');
5107  
5108      if (previewLink) {
5109        previewLink = Object(external_this_wp_url_["addQueryArgs"])(previewLink, {
5110          preview: true
5111        });
5112      }
5113    }
5114  
5115    var featuredImageId = selectors_getEditedPostAttribute(state, 'featured_media');
5116  
5117    if (previewLink && featuredImageId) {
5118      return Object(external_this_wp_url_["addQueryArgs"])(previewLink, {
5119        _thumbnail_id: featuredImageId
5120      });
5121    }
5122  
5123    return previewLink;
5124  }
5125  /**
5126   * Returns a suggested post format for the current post, inferred only if there
5127   * is a single block within the post and it is of a type known to match a
5128   * default post format. Returns null if the format cannot be determined.
5129   *
5130   * @param {Object} state Global application state.
5131   *
5132   * @return {?string} Suggested post format.
5133   */
5134  
5135  function selectors_getSuggestedPostFormat(state) {
5136    var blocks = selectors_getEditorBlocks(state);
5137    var name; // If there is only one block in the content of the post grab its name
5138    // so we can derive a suitable post format from it.
5139  
5140    if (blocks.length === 1) {
5141      name = blocks[0].name;
5142    } // If there are two blocks in the content and the last one is a text blocks
5143    // grab the name of the first one to also suggest a post format from it.
5144  
5145  
5146    if (blocks.length === 2) {
5147      if (blocks[1].name === 'core/paragraph') {
5148        name = blocks[0].name;
5149      }
5150    } // We only convert to default post formats in core.
5151  
5152  
5153    switch (name) {
5154      case 'core/image':
5155        return 'image';
5156  
5157      case 'core/quote':
5158      case 'core/pullquote':
5159        return 'quote';
5160  
5161      case 'core/gallery':
5162        return 'gallery';
5163  
5164      case 'core/video':
5165      case 'core-embed/youtube':
5166      case 'core-embed/vimeo':
5167        return 'video';
5168  
5169      case 'core/audio':
5170      case 'core-embed/spotify':
5171      case 'core-embed/soundcloud':
5172        return 'audio';
5173    }
5174  
5175    return null;
5176  }
5177  /**
5178   * Returns a set of blocks which are to be used in consideration of the post's
5179   * generated save content.
5180   *
5181   * @deprecated since Gutenberg 6.2.0.
5182   *
5183   * @param {Object} state Editor state.
5184   *
5185   * @return {WPBlock[]} Filtered set of blocks for save.
5186   */
5187  
5188  function getBlocksForSerialization(state) {
5189    external_this_wp_deprecated_default()('`core/editor` getBlocksForSerialization selector', {
5190      plugin: 'Gutenberg',
5191      alternative: 'getEditorBlocks',
5192      hint: 'Blocks serialization pre-processing occurs at save time'
5193    });
5194    var blocks = state.editor.present.blocks.value; // WARNING: Any changes to the logic of this function should be verified
5195    // against the implementation of isEditedPostEmpty, which bypasses this
5196    // function for performance' sake, in an assumption of this current logic
5197    // being irrelevant to the optimized condition of emptiness.
5198    // A single unmodified default block is assumed to be equivalent to an
5199    // empty post.
5200  
5201    var isSingleUnmodifiedDefaultBlock = blocks.length === 1 && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocks[0]);
5202  
5203    if (isSingleUnmodifiedDefaultBlock) {
5204      return [];
5205    }
5206  
5207    return blocks;
5208  }
5209  /**
5210   * Returns the content of the post being edited.
5211   *
5212   * @param {Object} state Global application state.
5213   *
5214   * @return {string} Post content.
5215   */
5216  
5217  var getEditedPostContent = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5218    return function (state) {
5219      var postId = selectors_getCurrentPostId(state);
5220      var postType = selectors_getCurrentPostType(state);
5221      var record = select('core').getEditedEntityRecord('postType', postType, postId);
5222  
5223      if (record) {
5224        if (typeof record.content === 'function') {
5225          return record.content(record);
5226        } else if (record.blocks) {
5227          return serialize_blocks(record.blocks);
5228        } else if (record.content) {
5229          return record.content;
5230        }
5231      }
5232  
5233      return '';
5234    };
5235  });
5236  /**
5237   * Returns the reusable block with the given ID.
5238   *
5239   * @param {Object}        state Global application state.
5240   * @param {number|string} ref   The reusable block's ID.
5241   *
5242   * @return {Object} The reusable block, or null if none exists.
5243   */
5244  
5245  var __experimentalGetReusableBlock = Object(rememo["a" /* default */])(function (state, ref) {
5246    var block = state.reusableBlocks.data[ref];
5247  
5248    if (!block) {
5249      return null;
5250    }
5251  
5252    var isTemporary = isNaN(parseInt(ref));
5253    return selectors_objectSpread({}, block, {
5254      id: isTemporary ? ref : +ref,
5255      isTemporary: isTemporary
5256    });
5257  }, function (state, ref) {
5258    return [state.reusableBlocks.data[ref]];
5259  });
5260  /**
5261   * Returns whether or not the reusable block with the given ID is being saved.
5262   *
5263   * @param {Object} state Global application state.
5264   * @param {string} ref   The reusable block's ID.
5265   *
5266   * @return {boolean} Whether or not the reusable block is being saved.
5267   */
5268  
5269  function __experimentalIsSavingReusableBlock(state, ref) {
5270    return state.reusableBlocks.isSaving[ref] || false;
5271  }
5272  /**
5273   * Returns true if the reusable block with the given ID is being fetched, or
5274   * false otherwise.
5275   *
5276   * @param {Object} state Global application state.
5277   * @param {string} ref   The reusable block's ID.
5278   *
5279   * @return {boolean} Whether the reusable block is being fetched.
5280   */
5281  
5282  function __experimentalIsFetchingReusableBlock(state, ref) {
5283    return !!state.reusableBlocks.isFetching[ref];
5284  }
5285  /**
5286   * Returns an array of all reusable blocks.
5287   *
5288   * @param {Object} state Global application state.
5289   *
5290   * @return {Array} An array of all reusable blocks.
5291   */
5292  
5293  var selectors_experimentalGetReusableBlocks = Object(rememo["a" /* default */])(function (state) {
5294    return Object(external_this_lodash_["map"])(state.reusableBlocks.data, function (value, ref) {
5295      return __experimentalGetReusableBlock(state, ref);
5296    });
5297  }, function (state) {
5298    return [state.reusableBlocks.data];
5299  });
5300  /**
5301   * Returns state object prior to a specified optimist transaction ID, or `null`
5302   * if the transaction corresponding to the given ID cannot be found.
5303   *
5304   * @param {Object} state         Current global application state.
5305   * @param {Object} transactionId Optimist transaction ID.
5306   *
5307   * @return {Object} Global application state prior to transaction.
5308   */
5309  
5310  function getStateBeforeOptimisticTransaction(state, transactionId) {
5311    var transaction = Object(external_this_lodash_["find"])(state.optimist, function (entry) {
5312      return entry.beforeState && Object(external_this_lodash_["get"])(entry.action, ['optimist', 'id']) === transactionId;
5313    });
5314    return transaction ? transaction.beforeState : null;
5315  }
5316  /**
5317   * Returns true if the post is being published, or false otherwise.
5318   *
5319   * @param {Object} state Global application state.
5320   *
5321   * @return {boolean} Whether post is being published.
5322   */
5323  
5324  function selectors_isPublishingPost(state) {
5325    if (!selectors_isSavingPost(state)) {
5326      return false;
5327    } // Saving is optimistic, so assume that current post would be marked as
5328    // published if publishing
5329  
5330  
5331    if (!selectors_isCurrentPostPublished(state)) {
5332      return false;
5333    } // Use post update transaction ID to retrieve the state prior to the
5334    // optimistic transaction
5335  
5336  
5337    var stateBeforeRequest = getStateBeforeOptimisticTransaction(state, POST_UPDATE_TRANSACTION_ID); // Consider as publishing when current post prior to request was not
5338    // considered published
5339  
5340    return !!stateBeforeRequest && !selectors_isCurrentPostPublished(null, stateBeforeRequest.currentPost);
5341  }
5342  /**
5343   * Returns whether the permalink is editable or not.
5344   *
5345   * @param {Object} state Editor state.
5346   *
5347   * @return {boolean} Whether or not the permalink is editable.
5348   */
5349  
5350  function isPermalinkEditable(state) {
5351    var permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
5352    return PERMALINK_POSTNAME_REGEX.test(permalinkTemplate);
5353  }
5354  /**
5355   * Returns the permalink for the post.
5356   *
5357   * @param {Object} state Editor state.
5358   *
5359   * @return {?string} The permalink, or null if the post is not viewable.
5360   */
5361  
5362  function getPermalink(state) {
5363    var permalinkParts = getPermalinkParts(state);
5364  
5365    if (!permalinkParts) {
5366      return null;
5367    }
5368  
5369    var prefix = permalinkParts.prefix,
5370        postName = permalinkParts.postName,
5371        suffix = permalinkParts.suffix;
5372  
5373    if (isPermalinkEditable(state)) {
5374      return prefix + postName + suffix;
5375    }
5376  
5377    return prefix;
5378  }
5379  /**
5380   * Returns the slug for the post being edited, preferring a manually edited
5381   * value if one exists, then a sanitized version of the current post title, and
5382   * finally the post ID.
5383   *
5384   * @param {Object} state Editor state.
5385   *
5386   * @return {string} The current slug to be displayed in the editor
5387   */
5388  
5389  function getEditedPostSlug(state) {
5390    return selectors_getEditedPostAttribute(state, 'slug') || cleanForSlug(selectors_getEditedPostAttribute(state, 'title')) || selectors_getCurrentPostId(state);
5391  }
5392  /**
5393   * Returns the permalink for a post, split into it's three parts: the prefix,
5394   * the postName, and the suffix.
5395   *
5396   * @param {Object} state Editor state.
5397   *
5398   * @return {Object} An object containing the prefix, postName, and suffix for
5399   *                  the permalink, or null if the post is not viewable.
5400   */
5401  
5402  function getPermalinkParts(state) {
5403    var permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
5404  
5405    if (!permalinkTemplate) {
5406      return null;
5407    }
5408  
5409    var postName = selectors_getEditedPostAttribute(state, 'slug') || selectors_getEditedPostAttribute(state, 'generated_slug');
5410  
5411    var _permalinkTemplate$sp = permalinkTemplate.split(PERMALINK_POSTNAME_REGEX),
5412        _permalinkTemplate$sp2 = Object(slicedToArray["a" /* default */])(_permalinkTemplate$sp, 2),
5413        prefix = _permalinkTemplate$sp2[0],
5414        suffix = _permalinkTemplate$sp2[1];
5415  
5416    return {
5417      prefix: prefix,
5418      postName: postName,
5419      suffix: suffix
5420    };
5421  }
5422  /**
5423   * Returns true if an optimistic transaction is pending commit, for which the
5424   * before state satisfies the given predicate function.
5425   *
5426   * @param {Object}   state     Editor state.
5427   * @param {Function} predicate Function given state, returning true if match.
5428   *
5429   * @return {boolean} Whether predicate matches for some history.
5430   */
5431  
5432  function inSomeHistory(state, predicate) {
5433    var optimist = state.optimist; // In recursion, optimist state won't exist. Assume exhausted options.
5434  
5435    if (!optimist) {
5436      return false;
5437    }
5438  
5439    return optimist.some(function (_ref) {
5440      var beforeState = _ref.beforeState;
5441      return beforeState && predicate(beforeState);
5442    });
5443  }
5444  /**
5445   * Returns whether the post is locked.
5446   *
5447   * @param {Object} state Global application state.
5448   *
5449   * @return {boolean} Is locked.
5450   */
5451  
5452  function isPostLocked(state) {
5453    return state.postLock.isLocked;
5454  }
5455  /**
5456   * Returns whether post saving is locked.
5457   *
5458   * @param {Object} state Global application state.
5459   *
5460   * @return {boolean} Is locked.
5461   */
5462  
5463  function selectors_isPostSavingLocked(state) {
5464    return Object.keys(state.postSavingLock).length > 0;
5465  }
5466  /**
5467   * Returns whether post autosaving is locked.
5468   *
5469   * @param {Object} state Global application state.
5470   *
5471   * @return {boolean} Is locked.
5472   */
5473  
5474  function isPostAutosavingLocked(state) {
5475    return Object.keys(state.postAutosavingLock).length > 0;
5476  }
5477  /**
5478   * Returns whether the edition of the post has been taken over.
5479   *
5480   * @param {Object} state Global application state.
5481   *
5482   * @return {boolean} Is post lock takeover.
5483   */
5484  
5485  function isPostLockTakeover(state) {
5486    return state.postLock.isTakeover;
5487  }
5488  /**
5489   * Returns details about the post lock user.
5490   *
5491   * @param {Object} state Global application state.
5492   *
5493   * @return {Object} A user object.
5494   */
5495  
5496  function getPostLockUser(state) {
5497    return state.postLock.user;
5498  }
5499  /**
5500   * Returns the active post lock.
5501   *
5502   * @param {Object} state Global application state.
5503   *
5504   * @return {Object} The lock object.
5505   */
5506  
5507  function getActivePostLock(state) {
5508    return state.postLock.activePostLock;
5509  }
5510  /**
5511   * Returns whether or not the user has the unfiltered_html capability.
5512   *
5513   * @param {Object} state Editor state.
5514   *
5515   * @return {boolean} Whether the user can or can't post unfiltered HTML.
5516   */
5517  
5518  function selectors_canUserUseUnfilteredHTML(state) {
5519    return Object(external_this_lodash_["has"])(selectors_getCurrentPost(state), ['_links', 'wp:action-unfiltered-html']);
5520  }
5521  /**
5522   * Returns whether the pre-publish panel should be shown
5523   * or skipped when the user clicks the "publish" button.
5524   *
5525   * @param {Object} state Global application state.
5526   *
5527   * @return {boolean} Whether the pre-publish panel should be shown or not.
5528   */
5529  
5530  function selectors_isPublishSidebarEnabled(state) {
5531    if (state.preferences.hasOwnProperty('isPublishSidebarEnabled')) {
5532      return state.preferences.isPublishSidebarEnabled;
5533    }
5534  
5535    return PREFERENCES_DEFAULTS.isPublishSidebarEnabled;
5536  }
5537  /**
5538   * Return the current block list.
5539   *
5540   * @param {Object} state
5541   * @return {Array} Block list.
5542   */
5543  
5544  function selectors_getEditorBlocks(state) {
5545    return selectors_getEditedPostAttribute(state, 'blocks') || EMPTY_ARRAY;
5546  }
5547  /**
5548   * A block selection object.
5549   *
5550   * @typedef {Object} WPBlockSelection
5551   *
5552   * @property {string} clientId     A block client ID.
5553   * @property {string} attributeKey A block attribute key.
5554   * @property {number} offset       An attribute value offset, based on the rich
5555   *                                 text value. See `wp.richText.create`.
5556   */
5557  
5558  /**
5559   * Returns the current selection start.
5560   *
5561   * @param {Object} state
5562   * @return {WPBlockSelection} The selection start.
5563   */
5564  
5565  function selectors_getEditorSelectionStart(state) {
5566    return selectors_getEditedPostAttribute(state, 'selectionStart');
5567  }
5568  /**
5569   * Returns the current selection end.
5570   *
5571   * @param {Object} state
5572   * @return {WPBlockSelection} The selection end.
5573   */
5574  
5575  function selectors_getEditorSelectionEnd(state) {
5576    return selectors_getEditedPostAttribute(state, 'selectionEnd');
5577  }
5578  /**
5579   * Is the editor ready
5580   *
5581   * @param {Object} state
5582   * @return {boolean} is Ready.
5583   */
5584  
5585  function __unstableIsEditorReady(state) {
5586    return state.isReady;
5587  }
5588  /**
5589   * Returns the post editor settings.
5590   *
5591   * @param {Object} state Editor state.
5592   *
5593   * @return {Object} The editor settings object.
5594   */
5595  
5596  function selectors_getEditorSettings(state) {
5597    return state.editorSettings;
5598  }
5599  /*
5600   * Backward compatibility
5601   */
5602  
5603  function getBlockEditorSelector(name) {
5604    return Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5605      return function (state) {
5606        var _select;
5607  
5608        external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' )." + name + '`', {
5609          alternative: "`wp.data.select( 'core/block-editor' )." + name + '`'
5610        });
5611  
5612        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5613          args[_key - 1] = arguments[_key];
5614        }
5615  
5616        return (_select = select('core/block-editor'))[name].apply(_select, args);
5617      };
5618    });
5619  }
5620  /**
5621   * @see getBlockName in core/block-editor store.
5622   */
5623  
5624  
5625  var getBlockName = getBlockEditorSelector('getBlockName');
5626  /**
5627   * @see isBlockValid in core/block-editor store.
5628   */
5629  
5630  var isBlockValid = getBlockEditorSelector('isBlockValid');
5631  /**
5632   * @see getBlockAttributes in core/block-editor store.
5633   */
5634  
5635  var getBlockAttributes = getBlockEditorSelector('getBlockAttributes');
5636  /**
5637   * @see getBlock in core/block-editor store.
5638   */
5639  
5640  var selectors_getBlock = getBlockEditorSelector('getBlock');
5641  /**
5642   * @see getBlocks in core/block-editor store.
5643   */
5644  
5645  var selectors_getBlocks = getBlockEditorSelector('getBlocks');
5646  /**
5647   * @see __unstableGetBlockWithoutInnerBlocks in core/block-editor store.
5648   */
5649  
5650  var __unstableGetBlockWithoutInnerBlocks = getBlockEditorSelector('__unstableGetBlockWithoutInnerBlocks');
5651  /**
5652   * @see getClientIdsOfDescendants in core/block-editor store.
5653   */
5654  
5655  var getClientIdsOfDescendants = getBlockEditorSelector('getClientIdsOfDescendants');
5656  /**
5657   * @see getClientIdsWithDescendants in core/block-editor store.
5658   */
5659  
5660  var getClientIdsWithDescendants = getBlockEditorSelector('getClientIdsWithDescendants');
5661  /**
5662   * @see getGlobalBlockCount in core/block-editor store.
5663   */
5664  
5665  var getGlobalBlockCount = getBlockEditorSelector('getGlobalBlockCount');
5666  /**
5667   * @see getBlocksByClientId in core/block-editor store.
5668   */
5669  
5670  var selectors_getBlocksByClientId = getBlockEditorSelector('getBlocksByClientId');
5671  /**
5672   * @see getBlockCount in core/block-editor store.
5673   */
5674  
5675  var getBlockCount = getBlockEditorSelector('getBlockCount');
5676  /**
5677   * @see getBlockSelectionStart in core/block-editor store.
5678   */
5679  
5680  var getBlockSelectionStart = getBlockEditorSelector('getBlockSelectionStart');
5681  /**
5682   * @see getBlockSelectionEnd in core/block-editor store.
5683   */
5684  
5685  var getBlockSelectionEnd = getBlockEditorSelector('getBlockSelectionEnd');
5686  /**
5687   * @see getSelectedBlockCount in core/block-editor store.
5688   */
5689  
5690  var getSelectedBlockCount = getBlockEditorSelector('getSelectedBlockCount');
5691  /**
5692   * @see hasSelectedBlock in core/block-editor store.
5693   */
5694  
5695  var hasSelectedBlock = getBlockEditorSelector('hasSelectedBlock');
5696  /**
5697   * @see getSelectedBlockClientId in core/block-editor store.
5698   */
5699  
5700  var getSelectedBlockClientId = getBlockEditorSelector('getSelectedBlockClientId');
5701  /**
5702   * @see getSelectedBlock in core/block-editor store.
5703   */
5704  
5705  var getSelectedBlock = getBlockEditorSelector('getSelectedBlock');
5706  /**
5707   * @see getBlockRootClientId in core/block-editor store.
5708   */
5709  
5710  var getBlockRootClientId = getBlockEditorSelector('getBlockRootClientId');
5711  /**
5712   * @see getBlockHierarchyRootClientId in core/block-editor store.
5713   */
5714  
5715  var getBlockHierarchyRootClientId = getBlockEditorSelector('getBlockHierarchyRootClientId');
5716  /**
5717   * @see getAdjacentBlockClientId in core/block-editor store.
5718   */
5719  
5720  var getAdjacentBlockClientId = getBlockEditorSelector('getAdjacentBlockClientId');
5721  /**
5722   * @see getPreviousBlockClientId in core/block-editor store.
5723   */
5724  
5725  var getPreviousBlockClientId = getBlockEditorSelector('getPreviousBlockClientId');
5726  /**
5727   * @see getNextBlockClientId in core/block-editor store.
5728   */
5729  
5730  var getNextBlockClientId = getBlockEditorSelector('getNextBlockClientId');
5731  /**
5732   * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.
5733   */
5734  
5735  var getSelectedBlocksInitialCaretPosition = getBlockEditorSelector('getSelectedBlocksInitialCaretPosition');
5736  /**
5737   * @see getMultiSelectedBlockClientIds in core/block-editor store.
5738   */
5739  
5740  var getMultiSelectedBlockClientIds = getBlockEditorSelector('getMultiSelectedBlockClientIds');
5741  /**
5742   * @see getMultiSelectedBlocks in core/block-editor store.
5743   */
5744  
5745  var getMultiSelectedBlocks = getBlockEditorSelector('getMultiSelectedBlocks');
5746  /**
5747   * @see getFirstMultiSelectedBlockClientId in core/block-editor store.
5748   */
5749  
5750  var getFirstMultiSelectedBlockClientId = getBlockEditorSelector('getFirstMultiSelectedBlockClientId');
5751  /**
5752   * @see getLastMultiSelectedBlockClientId in core/block-editor store.
5753   */
5754  
5755  var getLastMultiSelectedBlockClientId = getBlockEditorSelector('getLastMultiSelectedBlockClientId');
5756  /**
5757   * @see isFirstMultiSelectedBlock in core/block-editor store.
5758   */
5759  
5760  var isFirstMultiSelectedBlock = getBlockEditorSelector('isFirstMultiSelectedBlock');
5761  /**
5762   * @see isBlockMultiSelected in core/block-editor store.
5763   */
5764  
5765  var isBlockMultiSelected = getBlockEditorSelector('isBlockMultiSelected');
5766  /**
5767   * @see isAncestorMultiSelected in core/block-editor store.
5768   */
5769  
5770  var isAncestorMultiSelected = getBlockEditorSelector('isAncestorMultiSelected');
5771  /**
5772   * @see getMultiSelectedBlocksStartClientId in core/block-editor store.
5773   */
5774  
5775  var getMultiSelectedBlocksStartClientId = getBlockEditorSelector('getMultiSelectedBlocksStartClientId');
5776  /**
5777   * @see getMultiSelectedBlocksEndClientId in core/block-editor store.
5778   */
5779  
5780  var getMultiSelectedBlocksEndClientId = getBlockEditorSelector('getMultiSelectedBlocksEndClientId');
5781  /**
5782   * @see getBlockOrder in core/block-editor store.
5783   */
5784  
5785  var getBlockOrder = getBlockEditorSelector('getBlockOrder');
5786  /**
5787   * @see getBlockIndex in core/block-editor store.
5788   */
5789  
5790  var getBlockIndex = getBlockEditorSelector('getBlockIndex');
5791  /**
5792   * @see isBlockSelected in core/block-editor store.
5793   */
5794  
5795  var isBlockSelected = getBlockEditorSelector('isBlockSelected');
5796  /**
5797   * @see hasSelectedInnerBlock in core/block-editor store.
5798   */
5799  
5800  var hasSelectedInnerBlock = getBlockEditorSelector('hasSelectedInnerBlock');
5801  /**
5802   * @see isBlockWithinSelection in core/block-editor store.
5803   */
5804  
5805  var isBlockWithinSelection = getBlockEditorSelector('isBlockWithinSelection');
5806  /**
5807   * @see hasMultiSelection in core/block-editor store.
5808   */
5809  
5810  var hasMultiSelection = getBlockEditorSelector('hasMultiSelection');
5811  /**
5812   * @see isMultiSelecting in core/block-editor store.
5813   */
5814  
5815  var isMultiSelecting = getBlockEditorSelector('isMultiSelecting');
5816  /**
5817   * @see isSelectionEnabled in core/block-editor store.
5818   */
5819  
5820  var isSelectionEnabled = getBlockEditorSelector('isSelectionEnabled');
5821  /**
5822   * @see getBlockMode in core/block-editor store.
5823   */
5824  
5825  var getBlockMode = getBlockEditorSelector('getBlockMode');
5826  /**
5827   * @see isTyping in core/block-editor store.
5828   */
5829  
5830  var isTyping = getBlockEditorSelector('isTyping');
5831  /**
5832   * @see isCaretWithinFormattedText in core/block-editor store.
5833   */
5834  
5835  var isCaretWithinFormattedText = getBlockEditorSelector('isCaretWithinFormattedText');
5836  /**
5837   * @see getBlockInsertionPoint in core/block-editor store.
5838   */
5839  
5840  var getBlockInsertionPoint = getBlockEditorSelector('getBlockInsertionPoint');
5841  /**
5842   * @see isBlockInsertionPointVisible in core/block-editor store.
5843   */
5844  
5845  var isBlockInsertionPointVisible = getBlockEditorSelector('isBlockInsertionPointVisible');
5846  /**
5847   * @see isValidTemplate in core/block-editor store.
5848   */
5849  
5850  var isValidTemplate = getBlockEditorSelector('isValidTemplate');
5851  /**
5852   * @see getTemplate in core/block-editor store.
5853   */
5854  
5855  var getTemplate = getBlockEditorSelector('getTemplate');
5856  /**
5857   * @see getTemplateLock in core/block-editor store.
5858   */
5859  
5860  var getTemplateLock = getBlockEditorSelector('getTemplateLock');
5861  /**
5862   * @see canInsertBlockType in core/block-editor store.
5863   */
5864  
5865  var selectors_canInsertBlockType = getBlockEditorSelector('canInsertBlockType');
5866  /**
5867   * @see getInserterItems in core/block-editor store.
5868   */
5869  
5870  var getInserterItems = getBlockEditorSelector('getInserterItems');
5871  /**
5872   * @see hasInserterItems in core/block-editor store.
5873   */
5874  
5875  var hasInserterItems = getBlockEditorSelector('hasInserterItems');
5876  /**
5877   * @see getBlockListSettings in core/block-editor store.
5878   */
5879  
5880  var getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
5881  
5882  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/effects/reusable-blocks.js
5883  
5884  
5885  
5886  
5887  function reusable_blocks_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; }
5888  
5889  function reusable_blocks_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reusable_blocks_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 { reusable_blocks_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5890  
5891  /**
5892   * External dependencies
5893   */
5894  
5895  
5896  /**
5897   * WordPress dependencies
5898   */
5899  
5900  
5901  
5902   // TODO: Ideally this would be the only dispatch in scope. This requires either
5903  // refactoring editor actions to yielded controls, or replacing direct dispatch
5904  // on the editor store with action creators (e.g. `REMOVE_REUSABLE_BLOCK`).
5905  
5906  
5907  /**
5908   * Internal dependencies
5909   */
5910  
5911  
5912  
5913  /**
5914   * Module Constants
5915   */
5916  
5917  var REUSABLE_BLOCK_NOTICE_ID = 'REUSABLE_BLOCK_NOTICE_ID';
5918  /**
5919   * Fetch Reusable blocks Effect Handler.
5920   *
5921   * @param {Object} action  action object.
5922   * @param {Object} store   Redux Store.
5923   */
5924  
5925  var fetchReusableBlocks = /*#__PURE__*/function () {
5926    var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee(action, store) {
5927      var id, dispatch, postType, posts, results;
5928      return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
5929        while (1) {
5930          switch (_context.prev = _context.next) {
5931            case 0:
5932              id = action.id;
5933              dispatch = store.dispatch; // TODO: these are potentially undefined, this fix is in place
5934              // until there is a filter to not use reusable blocks if undefined
5935  
5936              _context.next = 4;
5937              return external_this_wp_apiFetch_default()({
5938                path: '/wp/v2/types/wp_block'
5939              });
5940  
5941            case 4:
5942              postType = _context.sent;
5943  
5944              if (postType) {
5945                _context.next = 7;
5946                break;
5947              }
5948  
5949              return _context.abrupt("return");
5950  
5951            case 7:
5952              _context.prev = 7;
5953  
5954              if (!id) {
5955                _context.next = 15;
5956                break;
5957              }
5958  
5959              _context.next = 11;
5960              return external_this_wp_apiFetch_default()({
5961                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id)
5962              });
5963  
5964            case 11:
5965              _context.t0 = _context.sent;
5966              posts = [_context.t0];
5967              _context.next = 18;
5968              break;
5969  
5970            case 15:
5971              _context.next = 17;
5972              return external_this_wp_apiFetch_default()({
5973                path: "/wp/v2/".concat(postType.rest_base, "?per_page=-1")
5974              });
5975  
5976            case 17:
5977              posts = _context.sent;
5978  
5979            case 18:
5980              results = Object(external_this_lodash_["compact"])(Object(external_this_lodash_["map"])(posts, function (post) {
5981                if (post.status !== 'publish' || post.content.protected) {
5982                  return null;
5983                }
5984  
5985                return reusable_blocks_objectSpread({}, post, {
5986                  content: post.content.raw,
5987                  title: post.title.raw
5988                });
5989              }));
5990  
5991              if (results.length) {
5992                dispatch(__experimentalReceiveReusableBlocks(results));
5993              }
5994  
5995              dispatch({
5996                type: 'FETCH_REUSABLE_BLOCKS_SUCCESS',
5997                id: id
5998              });
5999              _context.next = 26;
6000              break;
6001  
6002            case 23:
6003              _context.prev = 23;
6004              _context.t1 = _context["catch"](7);
6005              dispatch({
6006                type: 'FETCH_REUSABLE_BLOCKS_FAILURE',
6007                id: id,
6008                error: _context.t1
6009              });
6010  
6011            case 26:
6012            case "end":
6013              return _context.stop();
6014          }
6015        }
6016      }, _callee, null, [[7, 23]]);
6017    }));
6018  
6019    return function fetchReusableBlocks(_x, _x2) {
6020      return _ref.apply(this, arguments);
6021    };
6022  }();
6023  /**
6024   * Save Reusable blocks Effect Handler.
6025   *
6026   * @param {Object} action  action object.
6027   * @param {Object} store   Redux Store.
6028   */
6029  
6030  var saveReusableBlocks = /*#__PURE__*/function () {
6031    var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee2(action, store) {
6032      var postType, id, dispatch, state, _getReusableBlock, title, content, isTemporary, data, path, method, updatedReusableBlock, message;
6033  
6034      return external_this_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
6035        while (1) {
6036          switch (_context2.prev = _context2.next) {
6037            case 0:
6038              _context2.next = 2;
6039              return external_this_wp_apiFetch_default()({
6040                path: '/wp/v2/types/wp_block'
6041              });
6042  
6043            case 2:
6044              postType = _context2.sent;
6045  
6046              if (postType) {
6047                _context2.next = 5;
6048                break;
6049              }
6050  
6051              return _context2.abrupt("return");
6052  
6053            case 5:
6054              id = action.id;
6055              dispatch = store.dispatch;
6056              state = store.getState();
6057              _getReusableBlock = __experimentalGetReusableBlock(state, id), title = _getReusableBlock.title, content = _getReusableBlock.content, isTemporary = _getReusableBlock.isTemporary;
6058              data = isTemporary ? {
6059                title: title,
6060                content: content,
6061                status: 'publish'
6062              } : {
6063                id: id,
6064                title: title,
6065                content: content,
6066                status: 'publish'
6067              };
6068              path = isTemporary ? "/wp/v2/".concat(postType.rest_base) : "/wp/v2/".concat(postType.rest_base, "/").concat(id);
6069              method = isTemporary ? 'POST' : 'PUT';
6070              _context2.prev = 12;
6071              _context2.next = 15;
6072              return external_this_wp_apiFetch_default()({
6073                path: path,
6074                data: data,
6075                method: method
6076              });
6077  
6078            case 15:
6079              updatedReusableBlock = _context2.sent;
6080              dispatch({
6081                type: 'SAVE_REUSABLE_BLOCK_SUCCESS',
6082                updatedId: updatedReusableBlock.id,
6083                id: id
6084              });
6085              message = isTemporary ? Object(external_this_wp_i18n_["__"])('Block created.') : Object(external_this_wp_i18n_["__"])('Block updated.');
6086              Object(external_this_wp_data_["dispatch"])('core/notices').createSuccessNotice(message, {
6087                id: REUSABLE_BLOCK_NOTICE_ID,
6088                type: 'snackbar'
6089              });
6090  
6091              Object(external_this_wp_data_["dispatch"])('core/block-editor').__unstableSaveReusableBlock(id, updatedReusableBlock.id);
6092  
6093              _context2.next = 26;
6094              break;
6095  
6096            case 22:
6097              _context2.prev = 22;
6098              _context2.t0 = _context2["catch"](12);
6099              dispatch({
6100                type: 'SAVE_REUSABLE_BLOCK_FAILURE',
6101                id: id
6102              });
6103              Object(external_this_wp_data_["dispatch"])('core/notices').createErrorNotice(_context2.t0.message, {
6104                id: REUSABLE_BLOCK_NOTICE_ID
6105              });
6106  
6107            case 26:
6108            case "end":
6109              return _context2.stop();
6110          }
6111        }
6112      }, _callee2, null, [[12, 22]]);
6113    }));
6114  
6115    return function saveReusableBlocks(_x3, _x4) {
6116      return _ref2.apply(this, arguments);
6117    };
6118  }();
6119  /**
6120   * Delete Reusable blocks Effect Handler.
6121   *
6122   * @param {Object} action  action object.
6123   * @param {Object} store   Redux Store.
6124   */
6125  
6126  var deleteReusableBlocks = /*#__PURE__*/function () {
6127    var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee3(action, store) {
6128      var postType, id, getState, dispatch, reusableBlock, allBlocks, associatedBlocks, associatedBlockClientIds, transactionId, message;
6129      return external_this_regeneratorRuntime_default.a.wrap(function _callee3$(_context3) {
6130        while (1) {
6131          switch (_context3.prev = _context3.next) {
6132            case 0:
6133              _context3.next = 2;
6134              return external_this_wp_apiFetch_default()({
6135                path: '/wp/v2/types/wp_block'
6136              });
6137  
6138            case 2:
6139              postType = _context3.sent;
6140  
6141              if (postType) {
6142                _context3.next = 5;
6143                break;
6144              }
6145  
6146              return _context3.abrupt("return");
6147  
6148            case 5:
6149              id = action.id;
6150              getState = store.getState, dispatch = store.dispatch; // Don't allow a reusable block with a temporary ID to be deleted
6151  
6152              reusableBlock = __experimentalGetReusableBlock(getState(), id);
6153  
6154              if (!(!reusableBlock || reusableBlock.isTemporary)) {
6155                _context3.next = 10;
6156                break;
6157              }
6158  
6159              return _context3.abrupt("return");
6160  
6161            case 10:
6162              // Remove any other blocks that reference this reusable block
6163              allBlocks = Object(external_this_wp_data_["select"])('core/block-editor').getBlocks();
6164              associatedBlocks = allBlocks.filter(function (block) {
6165                return Object(external_this_wp_blocks_["isReusableBlock"])(block) && block.attributes.ref === id;
6166              });
6167              associatedBlockClientIds = associatedBlocks.map(function (block) {
6168                return block.clientId;
6169              });
6170              transactionId = Object(external_this_lodash_["uniqueId"])();
6171              dispatch({
6172                type: 'REMOVE_REUSABLE_BLOCK',
6173                id: id,
6174                optimist: {
6175                  type: redux_optimist["BEGIN"],
6176                  id: transactionId
6177                }
6178              }); // Remove the parsed block.
6179  
6180              if (associatedBlockClientIds.length) {
6181                Object(external_this_wp_data_["dispatch"])('core/block-editor').removeBlocks(associatedBlockClientIds);
6182              }
6183  
6184              _context3.prev = 16;
6185              _context3.next = 19;
6186              return external_this_wp_apiFetch_default()({
6187                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id),
6188                method: 'DELETE'
6189              });
6190  
6191            case 19:
6192              dispatch({
6193                type: 'DELETE_REUSABLE_BLOCK_SUCCESS',
6194                id: id,
6195                optimist: {
6196                  type: redux_optimist["COMMIT"],
6197                  id: transactionId
6198                }
6199              });
6200              message = Object(external_this_wp_i18n_["__"])('Block deleted.');
6201              Object(external_this_wp_data_["dispatch"])('core/notices').createSuccessNotice(message, {
6202                id: REUSABLE_BLOCK_NOTICE_ID,
6203                type: 'snackbar'
6204              });
6205              _context3.next = 28;
6206              break;
6207  
6208            case 24:
6209              _context3.prev = 24;
6210              _context3.t0 = _context3["catch"](16);
6211              dispatch({
6212                type: 'DELETE_REUSABLE_BLOCK_FAILURE',
6213                id: id,
6214                optimist: {
6215                  type: redux_optimist["REVERT"],
6216                  id: transactionId
6217                }
6218              });
6219              Object(external_this_wp_data_["dispatch"])('core/notices').createErrorNotice(_context3.t0.message, {
6220                id: REUSABLE_BLOCK_NOTICE_ID
6221              });
6222  
6223            case 28:
6224            case "end":
6225              return _context3.stop();
6226          }
6227        }
6228      }, _callee3, null, [[16, 24]]);
6229    }));
6230  
6231    return function deleteReusableBlocks(_x5, _x6) {
6232      return _ref3.apply(this, arguments);
6233    };
6234  }();
6235  /**
6236   * Convert a reusable block to a static block effect handler
6237   *
6238   * @param {Object} action  action object.
6239   * @param {Object} store   Redux Store.
6240   */
6241  
6242  var reusable_blocks_convertBlockToStatic = function convertBlockToStatic(action, store) {
6243    var state = store.getState();
6244    var oldBlock = Object(external_this_wp_data_["select"])('core/block-editor').getBlock(action.clientId);
6245    var reusableBlock = __experimentalGetReusableBlock(state, oldBlock.attributes.ref);
6246    var newBlocks = Object(external_this_wp_blocks_["parse"])(reusableBlock.content);
6247    Object(external_this_wp_data_["dispatch"])('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks);
6248  };
6249  /**
6250   * Convert a static block to a reusable block effect handler
6251   *
6252   * @param {Object} action  action object.
6253   * @param {Object} store   Redux Store.
6254   */
6255  
6256  var reusable_blocks_convertBlockToReusable = function convertBlockToReusable(action, store) {
6257    var dispatch = store.dispatch;
6258    var reusableBlock = {
6259      id: Object(external_this_lodash_["uniqueId"])('reusable'),
6260      title: Object(external_this_wp_i18n_["__"])('Untitled Reusable Block'),
6261      content: Object(external_this_wp_blocks_["serialize"])(Object(external_this_wp_data_["select"])('core/block-editor').getBlocksByClientId(action.clientIds))
6262    };
6263    dispatch(__experimentalReceiveReusableBlocks([reusableBlock]));
6264    dispatch(__experimentalSaveReusableBlock(reusableBlock.id));
6265    Object(external_this_wp_data_["dispatch"])('core/block-editor').replaceBlocks(action.clientIds, Object(external_this_wp_blocks_["createBlock"])('core/block', {
6266      ref: reusableBlock.id
6267    }));
6268  };
6269  
6270  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/effects.js
6271  /**
6272   * Internal dependencies
6273   */
6274  
6275  /* harmony default export */ var effects = ({
6276    FETCH_REUSABLE_BLOCKS: function FETCH_REUSABLE_BLOCKS(action, store) {
6277      fetchReusableBlocks(action, store);
6278    },
6279    SAVE_REUSABLE_BLOCK: function SAVE_REUSABLE_BLOCK(action, store) {
6280      saveReusableBlocks(action, store);
6281    },
6282    DELETE_REUSABLE_BLOCK: function DELETE_REUSABLE_BLOCK(action, store) {
6283      deleteReusableBlocks(action, store);
6284    },
6285    CONVERT_BLOCK_TO_STATIC: reusable_blocks_convertBlockToStatic,
6286    CONVERT_BLOCK_TO_REUSABLE: reusable_blocks_convertBlockToReusable
6287  });
6288  
6289  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/middlewares.js
6290  /**
6291   * External dependencies
6292   */
6293  
6294  /**
6295   * Internal dependencies
6296   */
6297  
6298  
6299  /**
6300   * Applies the custom middlewares used specifically in the editor module.
6301   *
6302   * @param {Object} store Store Object.
6303   *
6304   * @return {Object} Update Store Object.
6305   */
6306  
6307  function applyMiddlewares(store) {
6308    var enhancedDispatch = function enhancedDispatch() {
6309      throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
6310    };
6311  
6312    var middlewareAPI = {
6313      getState: store.getState,
6314      dispatch: function dispatch() {
6315        return enhancedDispatch.apply(void 0, arguments);
6316      }
6317    };
6318    enhancedDispatch = refx_default()(effects)(middlewareAPI)(store.dispatch);
6319    store.dispatch = enhancedDispatch;
6320    return store;
6321  }
6322  
6323  /* harmony default export */ var middlewares = (applyMiddlewares);
6324  
6325  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/controls.js
6326  /**
6327   * WordPress dependencies
6328   */
6329  
6330  /**
6331   * Returns a control descriptor signalling to subscribe to the registry and
6332   * resolve the control promise only when the next state change occurs.
6333   *
6334   * @return {Object} Control descriptor.
6335   */
6336  
6337  function awaitNextStateChange() {
6338    return {
6339      type: 'AWAIT_NEXT_STATE_CHANGE'
6340    };
6341  }
6342  /**
6343   * Returns a control descriptor signalling to resolve with the current data
6344   * registry.
6345   *
6346   * @return {Object} Control descriptor.
6347   */
6348  
6349  function getRegistry() {
6350    return {
6351      type: 'GET_REGISTRY'
6352    };
6353  }
6354  /**
6355   * Function returning a sessionStorage key to set or retrieve a given post's
6356   * automatic session backup.
6357   *
6358   * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
6359   * `loggedout` handler can clear sessionStorage of any user-private content.
6360   *
6361   * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103
6362   *
6363   * @param {string} postId  Post ID.
6364   * @return {string}        sessionStorage key
6365   */
6366  
6367  function postKey(postId) {
6368    return "wp-autosave-block-editor-post-".concat(postId);
6369  }
6370  
6371  function localAutosaveGet(postId) {
6372    return window.sessionStorage.getItem(postKey(postId));
6373  }
6374  function localAutosaveSet(postId, title, content, excerpt) {
6375    window.sessionStorage.setItem(postKey(postId), JSON.stringify({
6376      post_title: title,
6377      content: content,
6378      excerpt: excerpt
6379    }));
6380  }
6381  function localAutosaveClear(postId) {
6382    window.sessionStorage.removeItem(postKey(postId));
6383  }
6384  var controls = {
6385    AWAIT_NEXT_STATE_CHANGE: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
6386      return function () {
6387        return new Promise(function (resolve) {
6388          var unsubscribe = registry.subscribe(function () {
6389            unsubscribe();
6390            resolve();
6391          });
6392        });
6393      };
6394    }),
6395    GET_REGISTRY: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
6396      return function () {
6397        return registry;
6398      };
6399    }),
6400    LOCAL_AUTOSAVE_SET: function LOCAL_AUTOSAVE_SET(_ref) {
6401      var postId = _ref.postId,
6402          title = _ref.title,
6403          content = _ref.content,
6404          excerpt = _ref.excerpt;
6405      localAutosaveSet(postId, title, content, excerpt);
6406    }
6407  };
6408  /* harmony default export */ var store_controls = (controls);
6409  
6410  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/index.js
6411  
6412  
6413  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; }
6414  
6415  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; }
6416  
6417  /**
6418   * WordPress dependencies
6419   */
6420  
6421  
6422  /**
6423   * Internal dependencies
6424   */
6425  
6426  
6427  
6428  
6429  
6430  
6431  
6432  /**
6433   * Post editor data store configuration.
6434   *
6435   * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore
6436   *
6437   * @type {Object}
6438   */
6439  
6440  var storeConfig = {
6441    reducer: reducer,
6442    selectors: selectors_namespaceObject,
6443    actions: actions_namespaceObject,
6444    controls: store_objectSpread({}, external_this_wp_dataControls_["controls"], {}, store_controls)
6445  };
6446  var store_store = Object(external_this_wp_data_["registerStore"])(STORE_KEY, store_objectSpread({}, storeConfig, {
6447    persist: ['preferences']
6448  }));
6449  middlewares(store_store);
6450  /* harmony default export */ var build_module_store = (store_store);
6451  
6452  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
6453  var esm_extends = __webpack_require__(8);
6454  
6455  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
6456  var objectWithoutProperties = __webpack_require__(15);
6457  
6458  // EXTERNAL MODULE: external {"this":["wp","element"]}
6459  var external_this_wp_element_ = __webpack_require__(0);
6460  
6461  // EXTERNAL MODULE: external {"this":["wp","compose"]}
6462  var external_this_wp_compose_ = __webpack_require__(9);
6463  
6464  // EXTERNAL MODULE: external {"this":["wp","hooks"]}
6465  var external_this_wp_hooks_ = __webpack_require__(32);
6466  
6467  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/custom-sources-backwards-compatibility.js
6468  
6469  
6470  
6471  
6472  
6473  
6474  function custom_sources_backwards_compatibility_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; }
6475  
6476  function custom_sources_backwards_compatibility_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { custom_sources_backwards_compatibility_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 { custom_sources_backwards_compatibility_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6477  
6478  /**
6479   * External dependencies
6480   */
6481  
6482  /**
6483   * WordPress dependencies
6484   */
6485  
6486  
6487  
6488  
6489  
6490  
6491  /** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */
6492  
6493  /** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */
6494  
6495  /**
6496   * Object whose keys are the names of block attributes, where each value
6497   * represents the meta key to which the block attribute is intended to save.
6498   *
6499   * @see https://developer.wordpress.org/reference/functions/register_meta/
6500   *
6501   * @typedef {Object<string,string>} WPMetaAttributeMapping
6502   */
6503  
6504  /**
6505   * Given a mapping of attribute names (meta source attributes) to their
6506   * associated meta key, returns a higher order component that overrides its
6507   * `attributes` and `setAttributes` props to sync any changes with the edited
6508   * post's meta keys.
6509   *
6510   * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.
6511   *
6512   * @return {WPHigherOrderComponent} Higher-order component.
6513   */
6514  
6515  var custom_sources_backwards_compatibility_createWithMetaAttributeSource = function createWithMetaAttributeSource(metaAttributes) {
6516    return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) {
6517      return function (_ref) {
6518        var attributes = _ref.attributes,
6519            _setAttributes = _ref.setAttributes,
6520            props = Object(objectWithoutProperties["a" /* default */])(_ref, ["attributes", "setAttributes"]);
6521  
6522        var postType = Object(external_this_wp_data_["useSelect"])(function (select) {
6523          return select('core/editor').getCurrentPostType();
6524        }, []);
6525  
6526        var _useEntityProp = Object(external_this_wp_coreData_["useEntityProp"])('postType', postType, 'meta'),
6527            _useEntityProp2 = Object(slicedToArray["a" /* default */])(_useEntityProp, 2),
6528            meta = _useEntityProp2[0],
6529            setMeta = _useEntityProp2[1];
6530  
6531        var mergedAttributes = Object(external_this_wp_element_["useMemo"])(function () {
6532          return custom_sources_backwards_compatibility_objectSpread({}, attributes, {}, Object(external_this_lodash_["mapValues"])(metaAttributes, function (metaKey) {
6533            return meta[metaKey];
6534          }));
6535        }, [attributes, meta]);
6536        return Object(external_this_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
6537          attributes: mergedAttributes,
6538          setAttributes: function setAttributes(nextAttributes) {
6539            var nextMeta = Object(external_this_lodash_["mapKeys"])( // Filter to intersection of keys between the updated
6540            // attributes and those with an associated meta key.
6541            Object(external_this_lodash_["pickBy"])(nextAttributes, function (value, key) {
6542              return metaAttributes[key];
6543            }), // Rename the keys to the expected meta key name.
6544            function (value, attributeKey) {
6545              return metaAttributes[attributeKey];
6546            });
6547  
6548            if (!Object(external_this_lodash_["isEmpty"])(nextMeta)) {
6549              setMeta(nextMeta);
6550            }
6551  
6552            _setAttributes(nextAttributes);
6553          }
6554        }, props));
6555      };
6556    }, 'withMetaAttributeSource');
6557  };
6558  /**
6559   * Filters a registered block's settings to enhance a block's `edit` component
6560   * to upgrade meta-sourced attributes to use the post's meta entity property.
6561   *
6562   * @param {WPBlockSettings} settings Registered block settings.
6563   *
6564   * @return {WPBlockSettings} Filtered block settings.
6565   */
6566  
6567  
6568  function shimAttributeSource(settings) {
6569    /** @type {WPMetaAttributeMapping} */
6570    var metaAttributes = Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["pickBy"])(settings.attributes, {
6571      source: 'meta'
6572    }), 'meta');
6573  
6574    if (!Object(external_this_lodash_["isEmpty"])(metaAttributes)) {
6575      settings.edit = custom_sources_backwards_compatibility_createWithMetaAttributeSource(metaAttributes)(settings.edit);
6576    }
6577  
6578    return settings;
6579  }
6580  
6581  Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/editor/custom-sources-backwards-compatibility/shim-attribute-source', shimAttributeSource); // The above filter will only capture blocks registered after the filter was
6582  // added. There may already be blocks registered by this point, and those must
6583  // be updated to apply the shim.
6584  //
6585  // The following implementation achieves this, albeit with a couple caveats:
6586  // - Only blocks registered on the global store will be modified.
6587  // - The block settings are directly mutated, since there is currently no
6588  //   mechanism to update an existing block registration. This is the reason for
6589  //   `getBlockType` separate from `getBlockTypes`, since the latter returns a
6590  //   _copy_ of the block registration (i.e. the mutation would not affect the
6591  //   actual registered block settings).
6592  //
6593  // `getBlockTypes` or `getBlockType` implementation could change in the future
6594  // in regards to creating settings clones, but the corresponding end-to-end
6595  // tests for meta blocks should cover against any potential regressions.
6596  //
6597  // In the future, we could support updating block settings, at which point this
6598  // implementation could use that mechanism instead.
6599  
6600  Object(external_this_wp_data_["select"])('core/blocks').getBlockTypes().map(function (_ref2) {
6601    var name = _ref2.name;
6602    return Object(external_this_wp_data_["select"])('core/blocks').getBlockType(name);
6603  }).forEach(shimAttributeSource);
6604  
6605  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js
6606  
6607  
6608  /**
6609   * WordPress dependencies
6610   */
6611  
6612  /** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
6613  
6614  /**
6615   * A user mentions completer.
6616   *
6617   * @type {WPCompleter}
6618   */
6619  
6620  /* harmony default export */ var autocompleters_user = ({
6621    name: 'users',
6622    className: 'editor-autocompleters__user',
6623    triggerPrefix: '@',
6624    options: function options(search) {
6625      var payload = '';
6626  
6627      if (search) {
6628        payload = '?search=' + encodeURIComponent(search);
6629      }
6630  
6631      return external_this_wp_apiFetch_default()({
6632        path: '/wp/v2/users' + payload
6633      });
6634    },
6635    isDebounced: true,
6636    getOptionKeywords: function getOptionKeywords(user) {
6637      return [user.slug, user.name];
6638    },
6639    getOptionLabel: function getOptionLabel(user) {
6640      var avatar = user.avatar_urls && user.avatar_urls[24] ? Object(external_this_wp_element_["createElement"])("img", {
6641        key: "avatar",
6642        className: "editor-autocompleters__user-avatar",
6643        alt: "",
6644        src: user.avatar_urls[24]
6645      }) : Object(external_this_wp_element_["createElement"])("span", {
6646        className: "editor-autocompleters__no-avatar"
6647      });
6648      return [avatar, Object(external_this_wp_element_["createElement"])("span", {
6649        key: "name",
6650        className: "editor-autocompleters__user-name"
6651      }, user.name), Object(external_this_wp_element_["createElement"])("span", {
6652        key: "slug",
6653        className: "editor-autocompleters__user-slug"
6654      }, user.slug)];
6655    },
6656    getOptionCompletion: function getOptionCompletion(user) {
6657      return "@".concat(user.slug);
6658    }
6659  });
6660  
6661  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/default-autocompleters.js
6662  /**
6663   * External dependencies
6664   */
6665  
6666  /**
6667   * WordPress dependencies
6668   */
6669  
6670  
6671  /**
6672   * Internal dependencies
6673   */
6674  
6675  
6676  
6677  function setDefaultCompleters() {
6678    var completers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6679    // Provide copies so filters may directly modify them.
6680    completers.push(Object(external_this_lodash_["clone"])(autocompleters_user));
6681    return completers;
6682  }
6683  
6684  Object(external_this_wp_hooks_["addFilter"])('editor.Autocomplete.completers', 'editor/autocompleters/set-default-completers', setDefaultCompleters);
6685  
6686  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/index.js
6687  /**
6688   * Internal dependencies
6689   */
6690  
6691  
6692  
6693  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js
6694  
6695  
6696  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
6697  var classCallCheck = __webpack_require__(20);
6698  
6699  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
6700  var createClass = __webpack_require__(19);
6701  
6702  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
6703  var possibleConstructorReturn = __webpack_require__(23);
6704  
6705  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
6706  var getPrototypeOf = __webpack_require__(16);
6707  
6708  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
6709  var inherits = __webpack_require__(22);
6710  
6711  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js
6712  
6713  
6714  
6715  
6716  
6717  
6718  function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
6719  
6720  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6721  
6722  /**
6723   * WordPress dependencies
6724   */
6725  
6726  
6727  
6728  var autosave_monitor_AutosaveMonitor = /*#__PURE__*/function (_Component) {
6729    Object(inherits["a" /* default */])(AutosaveMonitor, _Component);
6730  
6731    var _super = _createSuper(AutosaveMonitor);
6732  
6733    function AutosaveMonitor() {
6734      Object(classCallCheck["a" /* default */])(this, AutosaveMonitor);
6735  
6736      return _super.apply(this, arguments);
6737    }
6738  
6739    Object(createClass["a" /* default */])(AutosaveMonitor, [{
6740      key: "componentDidUpdate",
6741      value: function componentDidUpdate(prevProps) {
6742        var _this$props = this.props,
6743            isDirty = _this$props.isDirty,
6744            editsReference = _this$props.editsReference,
6745            isAutosaveable = _this$props.isAutosaveable,
6746            isAutosaving = _this$props.isAutosaving; // The edits reference is held for comparison to avoid scheduling an
6747        // autosave if an edit has not been made since the last autosave
6748        // completion. This is assigned when the autosave completes, and reset
6749        // when an edit occurs.
6750        //
6751        // See: https://github.com/WordPress/gutenberg/issues/12318
6752  
6753        if (editsReference !== prevProps.editsReference) {
6754          this.didAutosaveForEditsReference = false;
6755        }
6756  
6757        if (!isAutosaving && prevProps.isAutosaving) {
6758          this.didAutosaveForEditsReference = true;
6759        }
6760  
6761        if (prevProps.isDirty !== isDirty || prevProps.isAutosaveable !== isAutosaveable || prevProps.editsReference !== editsReference) {
6762          this.toggleTimer(isDirty && isAutosaveable && !this.didAutosaveForEditsReference);
6763        }
6764      }
6765    }, {
6766      key: "componentWillUnmount",
6767      value: function componentWillUnmount() {
6768        this.toggleTimer(false);
6769      }
6770    }, {
6771      key: "toggleTimer",
6772      value: function toggleTimer(isPendingSave) {
6773        var _this = this;
6774  
6775        var _this$props2 = this.props,
6776            interval = _this$props2.interval,
6777            _this$props2$shouldTh = _this$props2.shouldThrottle,
6778            shouldThrottle = _this$props2$shouldTh === void 0 ? false : _this$props2$shouldTh; // By default, AutosaveMonitor will wait for a pause in editing before
6779        // autosaving. In other words, its action is "debounced".
6780        //
6781        // The `shouldThrottle` props allows overriding this behaviour, thus
6782        // making the autosave action "throttled".
6783  
6784        if (!shouldThrottle && this.pendingSave) {
6785          clearTimeout(this.pendingSave);
6786          delete this.pendingSave;
6787        }
6788  
6789        if (isPendingSave && !(shouldThrottle && this.pendingSave)) {
6790          this.pendingSave = setTimeout(function () {
6791            _this.props.autosave();
6792  
6793            delete _this.pendingSave;
6794          }, interval * 1000);
6795        }
6796      }
6797    }, {
6798      key: "render",
6799      value: function render() {
6800        return null;
6801      }
6802    }]);
6803  
6804    return AutosaveMonitor;
6805  }(external_this_wp_element_["Component"]);
6806  /* harmony default export */ var autosave_monitor = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, ownProps) {
6807    var _select = select('core'),
6808        getReferenceByDistinctEdits = _select.getReferenceByDistinctEdits;
6809  
6810    var _select2 = select('core/editor'),
6811        isEditedPostDirty = _select2.isEditedPostDirty,
6812        isEditedPostAutosaveable = _select2.isEditedPostAutosaveable,
6813        isAutosavingPost = _select2.isAutosavingPost,
6814        getEditorSettings = _select2.getEditorSettings;
6815  
6816    var _ownProps$interval = ownProps.interval,
6817        interval = _ownProps$interval === void 0 ? getEditorSettings().autosaveInterval : _ownProps$interval;
6818    return {
6819      isDirty: isEditedPostDirty(),
6820      isAutosaveable: isEditedPostAutosaveable(),
6821      editsReference: getReferenceByDistinctEdits(),
6822      isAutosaving: isAutosavingPost(),
6823      interval: interval
6824    };
6825  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
6826    return {
6827      autosave: function autosave() {
6828        var _ownProps$autosave = ownProps.autosave,
6829            autosave = _ownProps$autosave === void 0 ? dispatch('core/editor').autosave : _ownProps$autosave;
6830        autosave();
6831      }
6832    };
6833  })])(autosave_monitor_AutosaveMonitor));
6834  
6835  // EXTERNAL MODULE: ./node_modules/classnames/index.js
6836  var classnames = __webpack_require__(11);
6837  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
6838  
6839  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js
6840  
6841  
6842  /**
6843   * External dependencies
6844   */
6845  
6846  /**
6847   * WordPress dependencies
6848   */
6849  
6850  
6851  
6852  var item_TableOfContentsItem = function TableOfContentsItem(_ref) {
6853    var children = _ref.children,
6854        isValid = _ref.isValid,
6855        level = _ref.level,
6856        _ref$path = _ref.path,
6857        path = _ref$path === void 0 ? [] : _ref$path,
6858        href = _ref.href,
6859        onSelect = _ref.onSelect;
6860    return Object(external_this_wp_element_["createElement"])("li", {
6861      className: classnames_default()('document-outline__item', "is-".concat(level.toLowerCase()), {
6862        'is-invalid': !isValid
6863      })
6864    }, Object(external_this_wp_element_["createElement"])("a", {
6865      href: href,
6866      className: "document-outline__button",
6867      onClick: onSelect
6868    }, Object(external_this_wp_element_["createElement"])("span", {
6869      className: "document-outline__emdash",
6870      "aria-hidden": "true"
6871    }), // path is an array of nodes that are ancestors of the heading starting in the top level node.
6872    // This mapping renders each ancestor to make it easier for the user to know where the headings are nested.
6873    path.map(function (_ref2, index) {
6874      var clientId = _ref2.clientId;
6875      return Object(external_this_wp_element_["createElement"])("strong", {
6876        key: index,
6877        className: "document-outline__level"
6878      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockTitle"], {
6879        clientId: clientId
6880      }));
6881    }), Object(external_this_wp_element_["createElement"])("strong", {
6882      className: "document-outline__level"
6883    }, level), Object(external_this_wp_element_["createElement"])("span", {
6884      className: "document-outline__item-content"
6885    }, children)));
6886  };
6887  
6888  /* harmony default export */ var document_outline_item = (item_TableOfContentsItem);
6889  
6890  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/index.js
6891  
6892  
6893  
6894  
6895  function document_outline_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; }
6896  
6897  function document_outline_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { document_outline_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 { document_outline_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6898  
6899  /**
6900   * External dependencies
6901   */
6902  
6903  /**
6904   * WordPress dependencies
6905   */
6906  
6907  
6908  
6909  
6910  
6911  /**
6912   * Internal dependencies
6913   */
6914  
6915  
6916  /**
6917   * Module constants
6918   */
6919  
6920  var emptyHeadingContent = Object(external_this_wp_element_["createElement"])("em", null, Object(external_this_wp_i18n_["__"])('(Empty heading)'));
6921  var incorrectLevelContent = [Object(external_this_wp_element_["createElement"])("br", {
6922    key: "incorrect-break"
6923  }), Object(external_this_wp_element_["createElement"])("em", {
6924    key: "incorrect-message"
6925  }, Object(external_this_wp_i18n_["__"])('(Incorrect heading level)'))];
6926  var singleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
6927    key: "incorrect-break-h1"
6928  }), Object(external_this_wp_element_["createElement"])("em", {
6929    key: "incorrect-message-h1"
6930  }, Object(external_this_wp_i18n_["__"])('(Your theme may already use a H1 for the post title)'))];
6931  var multipleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
6932    key: "incorrect-break-multiple-h1"
6933  }), Object(external_this_wp_element_["createElement"])("em", {
6934    key: "incorrect-message-multiple-h1"
6935  }, Object(external_this_wp_i18n_["__"])('(Multiple H1 headings are not recommended)'))];
6936  /**
6937   * Returns an array of heading blocks enhanced with the following properties:
6938   * path    - An array of blocks that are ancestors of the heading starting from a top-level node.
6939   *           Can be an empty array if the heading is a top-level node (is not nested inside another block).
6940   * level   - An integer with the heading level.
6941   * isEmpty - Flag indicating if the heading has no content.
6942   *
6943   * @param {?Array} blocks An array of blocks.
6944   * @param {?Array} path   An array of blocks that are ancestors of the blocks passed as blocks.
6945   *
6946   * @return {Array} An array of heading blocks enhanced with the properties described above.
6947   */
6948  
6949  var document_outline_computeOutlineHeadings = function computeOutlineHeadings() {
6950    var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6951    var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
6952    return Object(external_this_lodash_["flatMap"])(blocks, function () {
6953      var block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6954  
6955      if (block.name === 'core/heading') {
6956        return document_outline_objectSpread({}, block, {
6957          path: path,
6958          level: block.attributes.level,
6959          isEmpty: isEmptyHeading(block)
6960        });
6961      }
6962  
6963      return computeOutlineHeadings(block.innerBlocks, [].concat(Object(toConsumableArray["a" /* default */])(path), [block]));
6964    });
6965  };
6966  
6967  var isEmptyHeading = function isEmptyHeading(heading) {
6968    return !heading.attributes.content || heading.attributes.content.length === 0;
6969  };
6970  
6971  var document_outline_DocumentOutline = function DocumentOutline(_ref) {
6972    var _ref$blocks = _ref.blocks,
6973        blocks = _ref$blocks === void 0 ? [] : _ref$blocks,
6974        title = _ref.title,
6975        onSelect = _ref.onSelect,
6976        isTitleSupported = _ref.isTitleSupported,
6977        hasOutlineItemsDisabled = _ref.hasOutlineItemsDisabled;
6978    var headings = document_outline_computeOutlineHeadings(blocks);
6979  
6980    if (headings.length < 1) {
6981      return null;
6982    }
6983  
6984    var prevHeadingLevel = 1; // Not great but it's the simplest way to locate the title right now.
6985  
6986    var titleNode = document.querySelector('.editor-post-title__input');
6987    var hasTitle = isTitleSupported && title && titleNode;
6988    var countByLevel = Object(external_this_lodash_["countBy"])(headings, 'level');
6989    var hasMultipleH1 = countByLevel[1] > 1;
6990    return Object(external_this_wp_element_["createElement"])("div", {
6991      className: "document-outline"
6992    }, Object(external_this_wp_element_["createElement"])("ul", null, hasTitle && Object(external_this_wp_element_["createElement"])(document_outline_item, {
6993      level: Object(external_this_wp_i18n_["__"])('Title'),
6994      isValid: true,
6995      onSelect: onSelect,
6996      href: "#".concat(titleNode.id),
6997      isDisabled: hasOutlineItemsDisabled
6998    }, title), headings.map(function (item, index) {
6999      // Headings remain the same, go up by one, or down by any amount.
7000      // Otherwise there are missing levels.
7001      var isIncorrectLevel = item.level > prevHeadingLevel + 1;
7002      var isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
7003      prevHeadingLevel = item.level;
7004      return Object(external_this_wp_element_["createElement"])(document_outline_item, {
7005        key: index,
7006        level: "H".concat(item.level),
7007        isValid: isValid,
7008        path: item.path,
7009        isDisabled: hasOutlineItemsDisabled,
7010        href: "#block-".concat(item.clientId),
7011        onSelect: onSelect
7012      }, item.isEmpty ? emptyHeadingContent : Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["create"])({
7013        html: item.attributes.content
7014      })), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
7015    })));
7016  };
7017  /* harmony default export */ var document_outline = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
7018    var _select = select('core/block-editor'),
7019        getBlocks = _select.getBlocks;
7020  
7021    var _select2 = select('core/editor'),
7022        getEditedPostAttribute = _select2.getEditedPostAttribute;
7023  
7024    var _select3 = select('core'),
7025        getPostType = _select3.getPostType;
7026  
7027    var postType = getPostType(getEditedPostAttribute('type'));
7028    return {
7029      title: getEditedPostAttribute('title'),
7030      blocks: getBlocks(),
7031      isTitleSupported: Object(external_this_lodash_["get"])(postType, ['supports', 'title'], false)
7032    };
7033  }))(document_outline_DocumentOutline));
7034  
7035  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js
7036  /**
7037   * External dependencies
7038   */
7039  
7040  /**
7041   * WordPress dependencies
7042   */
7043  
7044  
7045  
7046  function DocumentOutlineCheck(_ref) {
7047    var blocks = _ref.blocks,
7048        children = _ref.children;
7049    var headings = Object(external_this_lodash_["filter"])(blocks, function (block) {
7050      return block.name === 'core/heading';
7051    });
7052  
7053    if (headings.length < 1) {
7054      return null;
7055    }
7056  
7057    return children;
7058  }
7059  
7060  /* harmony default export */ var check = (Object(external_this_wp_data_["withSelect"])(function (select) {
7061    return {
7062      blocks: select('core/block-editor').getBlocks()
7063    };
7064  })(DocumentOutlineCheck));
7065  
7066  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/save-shortcut.js
7067  /**
7068   * WordPress dependencies
7069   */
7070  
7071  
7072  
7073  
7074  function SaveShortcut(_ref) {
7075    var resetBlocksOnSave = _ref.resetBlocksOnSave;
7076  
7077    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7078        resetEditorBlocks = _useDispatch.resetEditorBlocks,
7079        savePost = _useDispatch.savePost;
7080  
7081    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
7082      var _select = select('core/editor'),
7083          _isEditedPostDirty = _select.isEditedPostDirty,
7084          _getPostEdits = _select.getPostEdits;
7085  
7086      return {
7087        isEditedPostDirty: _isEditedPostDirty,
7088        getPostEdits: _getPostEdits
7089      };
7090    }, []),
7091        isEditedPostDirty = _useSelect.isEditedPostDirty,
7092        getPostEdits = _useSelect.getPostEdits;
7093  
7094    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/save', function (event) {
7095      event.preventDefault(); // TODO: This should be handled in the `savePost` effect in
7096      // considering `isSaveable`. See note on `isEditedPostSaveable`
7097      // selector about dirtiness and meta-boxes.
7098      //
7099      // See: `isEditedPostSaveable`
7100  
7101      if (!isEditedPostDirty()) {
7102        return;
7103      } // The text editor requires that editor blocks are updated for a
7104      // save to work correctly. Usually this happens when the textarea
7105      // for the code editors blurs, but the shortcut can be used without
7106      // blurring the textarea.
7107  
7108  
7109      if (resetBlocksOnSave) {
7110        var postEdits = getPostEdits();
7111  
7112        if (postEdits.content && typeof postEdits.content === 'string') {
7113          var blocks = Object(external_this_wp_blocks_["parse"])(postEdits.content);
7114          resetEditorBlocks(blocks);
7115        }
7116      }
7117  
7118      savePost();
7119    }, {
7120      bindGlobal: true
7121    });
7122    return null;
7123  }
7124  
7125  /* harmony default export */ var save_shortcut = (SaveShortcut);
7126  
7127  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/visual-editor-shortcuts.js
7128  
7129  
7130  /**
7131   * WordPress dependencies
7132   */
7133  
7134  
7135  
7136  
7137  /**
7138   * Internal dependencies
7139   */
7140  
7141  
7142  
7143  function VisualEditorGlobalKeyboardShortcuts() {
7144    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7145        redo = _useDispatch.redo,
7146        undo = _useDispatch.undo;
7147  
7148    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/undo', function (event) {
7149      undo();
7150      event.preventDefault();
7151    }, {
7152      bindGlobal: true
7153    });
7154    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/redo', function (event) {
7155      redo();
7156      event.preventDefault();
7157    }, {
7158      bindGlobal: true
7159    });
7160    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"], null), Object(external_this_wp_element_["createElement"])(save_shortcut, null));
7161  }
7162  
7163  /* harmony default export */ var visual_editor_shortcuts = (VisualEditorGlobalKeyboardShortcuts);
7164  function EditorGlobalKeyboardShortcuts() {
7165    external_this_wp_deprecated_default()('EditorGlobalKeyboardShortcuts', {
7166      alternative: 'VisualEditorGlobalKeyboardShortcuts',
7167      plugin: 'Gutenberg'
7168    });
7169    return Object(external_this_wp_element_["createElement"])(VisualEditorGlobalKeyboardShortcuts, null);
7170  }
7171  
7172  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/text-editor-shortcuts.js
7173  
7174  
7175  /**
7176   * Internal dependencies
7177   */
7178  
7179  function TextEditorGlobalKeyboardShortcuts() {
7180    return Object(external_this_wp_element_["createElement"])(save_shortcut, {
7181      resetBlocksOnSave: true
7182    });
7183  }
7184  
7185  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/register-shortcuts.js
7186  
7187  
7188  /**
7189   * WordPress dependencies
7190   */
7191  
7192  
7193  
7194  
7195  
7196  function EditorKeyboardShortcutsRegister() {
7197    // Registering the shortcuts
7198    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/keyboard-shortcuts'),
7199        registerShortcut = _useDispatch.registerShortcut;
7200  
7201    Object(external_this_wp_element_["useEffect"])(function () {
7202      registerShortcut({
7203        name: 'core/editor/save',
7204        category: 'global',
7205        description: Object(external_this_wp_i18n_["__"])('Save your changes.'),
7206        keyCombination: {
7207          modifier: 'primary',
7208          character: 's'
7209        }
7210      });
7211      registerShortcut({
7212        name: 'core/editor/undo',
7213        category: 'global',
7214        description: Object(external_this_wp_i18n_["__"])('Undo your last changes.'),
7215        keyCombination: {
7216          modifier: 'primary',
7217          character: 'z'
7218        }
7219      });
7220      registerShortcut({
7221        name: 'core/editor/redo',
7222        category: 'global',
7223        description: Object(external_this_wp_i18n_["__"])('Redo your last undo.'),
7224        keyCombination: {
7225          modifier: 'primaryShift',
7226          character: 'z'
7227        }
7228      });
7229    }, [registerShortcut]);
7230    return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"].Register, null);
7231  }
7232  
7233  /* harmony default export */ var register_shortcuts = (EditorKeyboardShortcutsRegister);
7234  
7235  // EXTERNAL MODULE: external {"this":["wp","components"]}
7236  var external_this_wp_components_ = __webpack_require__(3);
7237  
7238  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
7239  var external_this_wp_keycodes_ = __webpack_require__(21);
7240  
7241  // EXTERNAL MODULE: external {"this":["wp","primitives"]}
7242  var external_this_wp_primitives_ = __webpack_require__(6);
7243  
7244  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
7245  
7246  
7247  /**
7248   * WordPress dependencies
7249   */
7250  
7251  var redo_redo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7252    xmlns: "http://www.w3.org/2000/svg",
7253    viewBox: "0 0 24 24"
7254  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7255    d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
7256  }));
7257  /* harmony default export */ var library_redo = (redo_redo);
7258  
7259  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js
7260  
7261  
7262  
7263  /**
7264   * WordPress dependencies
7265   */
7266  
7267  
7268  
7269  
7270  
7271  
7272  
7273  function EditorHistoryRedo(props, ref) {
7274    var hasRedo = Object(external_this_wp_data_["useSelect"])(function (select) {
7275      return select('core/editor').hasEditorRedo();
7276    }, []);
7277  
7278    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7279        redo = _useDispatch.redo;
7280  
7281    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
7282      ref: ref,
7283      icon: library_redo,
7284      label: Object(external_this_wp_i18n_["__"])('Redo'),
7285      shortcut: external_this_wp_keycodes_["displayShortcut"].primaryShift('z') // If there are no redo levels we don't want to actually disable this
7286      // button, because it will remove focus for keyboard users.
7287      // See: https://github.com/WordPress/gutenberg/issues/3486
7288      ,
7289      "aria-disabled": !hasRedo,
7290      onClick: hasRedo ? redo : undefined,
7291      className: "editor-history__redo"
7292    }));
7293  }
7294  
7295  /* harmony default export */ var editor_history_redo = (Object(external_this_wp_element_["forwardRef"])(EditorHistoryRedo));
7296  
7297  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
7298  
7299  
7300  /**
7301   * WordPress dependencies
7302   */
7303  
7304  var undo_undo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7305    xmlns: "http://www.w3.org/2000/svg",
7306    viewBox: "0 0 24 24"
7307  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7308    d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
7309  }));
7310  /* harmony default export */ var library_undo = (undo_undo);
7311  
7312  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js
7313  
7314  
7315  
7316  /**
7317   * WordPress dependencies
7318   */
7319  
7320  
7321  
7322  
7323  
7324  
7325  
7326  function EditorHistoryUndo(props, ref) {
7327    var hasUndo = Object(external_this_wp_data_["useSelect"])(function (select) {
7328      return select('core/editor').hasEditorUndo();
7329    }, []);
7330  
7331    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7332        undo = _useDispatch.undo;
7333  
7334    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
7335      ref: ref,
7336      icon: library_undo,
7337      label: Object(external_this_wp_i18n_["__"])('Undo'),
7338      shortcut: external_this_wp_keycodes_["displayShortcut"].primary('z') // If there are no undo levels we don't want to actually disable this
7339      // button, because it will remove focus for keyboard users.
7340      // See: https://github.com/WordPress/gutenberg/issues/3486
7341      ,
7342      "aria-disabled": !hasUndo,
7343      onClick: hasUndo ? undo : undefined,
7344      className: "editor-history__undo"
7345    }));
7346  }
7347  
7348  /* harmony default export */ var editor_history_undo = (Object(external_this_wp_element_["forwardRef"])(EditorHistoryUndo));
7349  
7350  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js
7351  
7352  
7353  
7354  /**
7355   * WordPress dependencies
7356   */
7357  
7358  
7359  
7360  
7361  
7362  function TemplateValidationNotice(_ref) {
7363    var isValid = _ref.isValid,
7364        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isValid"]);
7365  
7366    if (isValid) {
7367      return null;
7368    }
7369  
7370    var confirmSynchronization = function confirmSynchronization() {
7371      if ( // eslint-disable-next-line no-alert
7372      window.confirm(Object(external_this_wp_i18n_["__"])('Resetting the template may result in loss of content, do you want to continue?'))) {
7373        props.synchronizeTemplate();
7374      }
7375    };
7376  
7377    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
7378      className: "editor-template-validation-notice",
7379      isDismissible: false,
7380      status: "warning",
7381      actions: [{
7382        label: Object(external_this_wp_i18n_["__"])('Keep it as is'),
7383        onClick: props.resetTemplateValidity
7384      }, {
7385        label: Object(external_this_wp_i18n_["__"])('Reset the template'),
7386        onClick: confirmSynchronization,
7387        isPrimary: true
7388      }]
7389    }, Object(external_this_wp_i18n_["__"])('The content of your post doesn’t match the template assigned to your post type.'));
7390  }
7391  
7392  /* harmony default export */ var template_validation_notice = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7393    return {
7394      isValid: select('core/block-editor').isValidTemplate()
7395    };
7396  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7397    var _dispatch = dispatch('core/block-editor'),
7398        setTemplateValidity = _dispatch.setTemplateValidity,
7399        synchronizeTemplate = _dispatch.synchronizeTemplate;
7400  
7401    return {
7402      resetTemplateValidity: function resetTemplateValidity() {
7403        return setTemplateValidity(true);
7404      },
7405      synchronizeTemplate: synchronizeTemplate
7406    };
7407  })])(TemplateValidationNotice));
7408  
7409  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js
7410  
7411  
7412  /**
7413   * External dependencies
7414   */
7415  
7416  /**
7417   * WordPress dependencies
7418   */
7419  
7420  
7421  
7422  
7423  /**
7424   * Internal dependencies
7425   */
7426  
7427  
7428  function EditorNotices(_ref) {
7429    var notices = _ref.notices,
7430        onRemove = _ref.onRemove;
7431    var dismissibleNotices = Object(external_this_lodash_["filter"])(notices, {
7432      isDismissible: true,
7433      type: 'default'
7434    });
7435    var nonDismissibleNotices = Object(external_this_lodash_["filter"])(notices, {
7436      isDismissible: false,
7437      type: 'default'
7438    });
7439    var snackbarNotices = Object(external_this_lodash_["filter"])(notices, {
7440      type: 'snackbar'
7441    });
7442    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
7443      notices: nonDismissibleNotices,
7444      className: "components-editor-notices__pinned"
7445    }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
7446      notices: dismissibleNotices,
7447      className: "components-editor-notices__dismissible",
7448      onRemove: onRemove
7449    }, Object(external_this_wp_element_["createElement"])(template_validation_notice, null)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SnackbarList"], {
7450      notices: snackbarNotices,
7451      className: "components-editor-notices__snackbar",
7452      onRemove: onRemove
7453    }));
7454  }
7455  /* harmony default export */ var editor_notices = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7456    return {
7457      notices: select('core/notices').getNotices()
7458    };
7459  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7460    return {
7461      onRemove: dispatch('core/notices').removeNotice
7462    };
7463  })])(EditorNotices));
7464  
7465  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
7466  var library_close = __webpack_require__(153);
7467  
7468  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
7469  var layout = __webpack_require__(299);
7470  
7471  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
7472  
7473  
7474  /**
7475   * WordPress dependencies
7476   */
7477  
7478  var page_page = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7479    xmlns: "http://www.w3.org/2000/svg",
7480    viewBox: "0 0 24 24"
7481  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7482    d: "M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"
7483  }));
7484  /* harmony default export */ var library_page = (page_page);
7485  
7486  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js
7487  var grid = __webpack_require__(303);
7488  
7489  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
7490  var block_default = __webpack_require__(201);
7491  
7492  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-record-item.js
7493  
7494  
7495  /**
7496   * WordPress dependencies
7497   */
7498  
7499  
7500  
7501  
7502  function EntityRecordItem(_ref) {
7503    var record = _ref.record,
7504        checked = _ref.checked,
7505        onChange = _ref.onChange,
7506        closePanel = _ref.closePanel;
7507    var name = record.name,
7508        kind = record.kind,
7509        title = record.title,
7510        key = record.key;
7511    var parentBlockId = Object(external_this_wp_data_["useSelect"])(function (select) {
7512      var _blocks$;
7513  
7514      // Get entity's blocks.
7515      var _select$getEditedEnti = select('core').getEditedEntityRecord(kind, name, key),
7516          _select$getEditedEnti2 = _select$getEditedEnti.blocks,
7517          blocks = _select$getEditedEnti2 === void 0 ? [] : _select$getEditedEnti2; // Get parents of the entity's first block.
7518  
7519  
7520      var parents = select('core/block-editor').getBlockParents((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.clientId); // Return closest parent block's clientId.
7521  
7522      return parents[parents.length - 1];
7523    }, []);
7524    var isSelected = Object(external_this_wp_data_["useSelect"])(function (select) {
7525      var selectedBlockId = select('core/block-editor').getSelectedBlockClientId();
7526      return selectedBlockId === parentBlockId;
7527    }, [parentBlockId]);
7528    var isSelectedText = isSelected ? Object(external_this_wp_i18n_["__"])('Selected') : Object(external_this_wp_i18n_["__"])('Select');
7529  
7530    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
7531        selectBlock = _useDispatch.selectBlock;
7532  
7533    var selectParentBlock = Object(external_this_wp_element_["useCallback"])(function () {
7534      return selectBlock(parentBlockId);
7535    }, [parentBlockId]);
7536    var selectAndDismiss = Object(external_this_wp_element_["useCallback"])(function () {
7537      selectBlock(parentBlockId);
7538      closePanel();
7539    }, [parentBlockId]);
7540    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelRow"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
7541      label: Object(external_this_wp_element_["createElement"])("strong", null, title || Object(external_this_wp_i18n_["__"])('Untitled')),
7542      checked: checked,
7543      onChange: onChange
7544    }), parentBlockId ? Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7545      onClick: selectParentBlock,
7546      className: "entities-saved-states__find-entity",
7547      disabled: isSelected
7548    }, isSelectedText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7549      onClick: selectAndDismiss,
7550      className: "entities-saved-states__find-entity-small",
7551      disabled: isSelected
7552    }, isSelectedText)) : null);
7553  }
7554  
7555  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-type-list.js
7556  
7557  
7558  /**
7559   * External dependencies
7560   */
7561  
7562  /**
7563   * WordPress dependencies
7564   */
7565  
7566  
7567  
7568  
7569  /**
7570   * Internal dependencies
7571   */
7572  
7573  
7574  var ENTITY_NAME_ICONS = {
7575    site: layout["a" /* default */],
7576    page: library_page,
7577    post: grid["a" /* default */],
7578    wp_template: grid["a" /* default */]
7579  };
7580  function EntityTypeList(_ref) {
7581    var list = _ref.list,
7582        unselectedEntities = _ref.unselectedEntities,
7583        setUnselectedEntities = _ref.setUnselectedEntities,
7584        closePanel = _ref.closePanel;
7585    var firstRecord = list[0];
7586    var entity = Object(external_this_wp_data_["useSelect"])(function (select) {
7587      return select('core').getEntity(firstRecord.kind, firstRecord.name);
7588    }, [firstRecord.kind, firstRecord.name]); // Set icon based on type of entity.
7589  
7590    var name = firstRecord.name;
7591    var icon = ENTITY_NAME_ICONS[name] || block_default["a" /* default */];
7592    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
7593      title: entity.label,
7594      initialOpen: true,
7595      icon: icon
7596    }, list.map(function (record) {
7597      return Object(external_this_wp_element_["createElement"])(EntityRecordItem, {
7598        key: record.key || 'site',
7599        record: record,
7600        checked: !Object(external_this_lodash_["some"])(unselectedEntities, function (elt) {
7601          return elt.kind === record.kind && elt.name === record.name && elt.key === record.key;
7602        }),
7603        onChange: function onChange(value) {
7604          return setUnselectedEntities(record, value);
7605        },
7606        closePanel: closePanel
7607      });
7608    }));
7609  }
7610  
7611  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/index.js
7612  
7613  
7614  
7615  
7616  /**
7617   * External dependencies
7618   */
7619  
7620  /**
7621   * WordPress dependencies
7622   */
7623  
7624  
7625  
7626  
7627  
7628  
7629  /**
7630   * Internal dependencies
7631   */
7632  
7633  
7634  var ENTITY_NAMES = {
7635    wp_template_part: function wp_template_part(number) {
7636      return Object(external_this_wp_i18n_["_n"])('template part', 'template parts', number);
7637    },
7638    wp_template: function wp_template(number) {
7639      return Object(external_this_wp_i18n_["_n"])('template', 'templates', number);
7640    },
7641    post: function post(number) {
7642      return Object(external_this_wp_i18n_["_n"])('post', 'posts', number);
7643    },
7644    page: function page(number) {
7645      return Object(external_this_wp_i18n_["_n"])('page', 'pages', number);
7646    },
7647    site: function site(number) {
7648      return Object(external_this_wp_i18n_["_n"])('site', 'sites', number);
7649    }
7650  };
7651  var PLACEHOLDER_PHRASES = {
7652    // 0 is a back up, but should never be observed.
7653    0: Object(external_this_wp_i18n_["__"])('There are no changes.'),
7654  
7655    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7656    1: Object(external_this_wp_i18n_["__"])('Changes have been made to your %s.'),
7657  
7658    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7659    2: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s and %2$s.'),
7660  
7661    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7662    3: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, and %3$s.'),
7663  
7664    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7665    4: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, %3$s, and %4$s.'),
7666  
7667    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7668    5: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.')
7669  };
7670  function EntitiesSavedStates(_ref) {
7671    var isOpen = _ref.isOpen,
7672        close = _ref.close;
7673  
7674    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
7675      return {
7676        dirtyEntityRecords: select('core').__experimentalGetDirtyEntityRecords()
7677      };
7678    }, []),
7679        dirtyEntityRecords = _useSelect.dirtyEntityRecords;
7680  
7681    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core'),
7682        saveEditedEntityRecord = _useDispatch.saveEditedEntityRecord; // To group entities by type.
7683  
7684  
7685    var partitionedSavables = Object.values(Object(external_this_lodash_["groupBy"])(dirtyEntityRecords, 'name')); // Get labels for text-prompt phrase.
7686  
7687    var entityNamesForPrompt = [];
7688    partitionedSavables.forEach(function (list) {
7689      if (ENTITY_NAMES[list[0].name]) {
7690        entityNamesForPrompt.push(ENTITY_NAMES[list[0].name](list.length));
7691      }
7692    }); // Get text-prompt phrase based on number of entity types changed.
7693  
7694    var placeholderPhrase = PLACEHOLDER_PHRASES[entityNamesForPrompt.length] || // Fallback for edge case that should not be observed (more than 5 entity types edited).
7695    Object(external_this_wp_i18n_["__"])('Changes have been made to multiple entity types.'); // eslint-disable-next-line @wordpress/valid-sprintf
7696  
7697  
7698    var promptPhrase = external_this_wp_i18n_["sprintf"].apply(void 0, [placeholderPhrase].concat(entityNamesForPrompt)); // Unchecked entities to be ignored by save function.
7699  
7700    var _useState = Object(external_this_wp_element_["useState"])([]),
7701        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
7702        unselectedEntities = _useState2[0],
7703        _setUnselectedEntities = _useState2[1];
7704  
7705    var setUnselectedEntities = function setUnselectedEntities(_ref2, checked) {
7706      var kind = _ref2.kind,
7707          name = _ref2.name,
7708          key = _ref2.key;
7709  
7710      if (checked) {
7711        _setUnselectedEntities(unselectedEntities.filter(function (elt) {
7712          return elt.kind !== kind || elt.name !== name || elt.key !== key;
7713        }));
7714      } else {
7715        _setUnselectedEntities([].concat(Object(toConsumableArray["a" /* default */])(unselectedEntities), [{
7716          kind: kind,
7717          name: name,
7718          key: key
7719        }]));
7720      }
7721    };
7722  
7723    var saveCheckedEntities = function saveCheckedEntities() {
7724      var entitiesToSave = dirtyEntityRecords.filter(function (_ref3) {
7725        var kind = _ref3.kind,
7726            name = _ref3.name,
7727            key = _ref3.key;
7728        return !Object(external_this_lodash_["some"])(unselectedEntities, function (elt) {
7729          return elt.kind === kind && elt.name === name && elt.key === key;
7730        });
7731      });
7732      close(entitiesToSave);
7733      entitiesToSave.forEach(function (_ref4) {
7734        var kind = _ref4.kind,
7735            name = _ref4.name,
7736            key = _ref4.key;
7737        saveEditedEntityRecord(kind, name, key);
7738      });
7739    };
7740  
7741    var _useState3 = Object(external_this_wp_element_["useState"])(false),
7742        _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
7743        isReviewing = _useState4[0],
7744        setIsReviewing = _useState4[1];
7745  
7746    var toggleIsReviewing = function toggleIsReviewing() {
7747      return setIsReviewing(function (value) {
7748        return !value;
7749      });
7750    }; // Explicitly define this with no argument passed.  Using `close` on
7751    // its own will use the event object in place of the expected saved entities.
7752  
7753  
7754    var dismissPanel = Object(external_this_wp_element_["useCallback"])(function () {
7755      return close();
7756    }, [close]);
7757    return isOpen ? Object(external_this_wp_element_["createElement"])("div", {
7758      className: "entities-saved-states__panel"
7759    }, Object(external_this_wp_element_["createElement"])("div", {
7760      className: "entities-saved-states__panel-header"
7761    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7762      isPrimary: true,
7763      disabled: dirtyEntityRecords.length - unselectedEntities.length === 0,
7764      onClick: saveCheckedEntities,
7765      className: "editor-entities-saved-states__save-button"
7766    }, Object(external_this_wp_i18n_["__"])('Save')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7767      onClick: dismissPanel,
7768      icon: library_close["a" /* default */],
7769      label: Object(external_this_wp_i18n_["__"])('Close panel')
7770    })), Object(external_this_wp_element_["createElement"])("div", {
7771      className: "entities-saved-states__text-prompt"
7772    }, Object(external_this_wp_element_["createElement"])("strong", null, Object(external_this_wp_i18n_["__"])('Are you ready to save?')), Object(external_this_wp_element_["createElement"])("p", null, promptPhrase), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7773      onClick: toggleIsReviewing,
7774      isLink: true,
7775      className: "entities-saved-states__review-changes-button"
7776    }, isReviewing ? Object(external_this_wp_i18n_["__"])('Hide changes.') : Object(external_this_wp_i18n_["__"])('Review changes.')))), isReviewing && partitionedSavables.map(function (list) {
7777      return Object(external_this_wp_element_["createElement"])(EntityTypeList, {
7778        key: list[0].name,
7779        list: list,
7780        closePanel: dismissPanel,
7781        unselectedEntities: unselectedEntities,
7782        setUnselectedEntities: setUnselectedEntities
7783      });
7784    })) : null;
7785  }
7786  
7787  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
7788  var assertThisInitialized = __webpack_require__(12);
7789  
7790  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js
7791  
7792  
7793  
7794  
7795  
7796  
7797  
7798  
7799  function error_boundary_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (error_boundary_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
7800  
7801  function error_boundary_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
7802  
7803  /**
7804   * WordPress dependencies
7805   */
7806  
7807  
7808  
7809  
7810  
7811  
7812  var error_boundary_ErrorBoundary = /*#__PURE__*/function (_Component) {
7813    Object(inherits["a" /* default */])(ErrorBoundary, _Component);
7814  
7815    var _super = error_boundary_createSuper(ErrorBoundary);
7816  
7817    function ErrorBoundary() {
7818      var _this;
7819  
7820      Object(classCallCheck["a" /* default */])(this, ErrorBoundary);
7821  
7822      _this = _super.apply(this, arguments);
7823      _this.reboot = _this.reboot.bind(Object(assertThisInitialized["a" /* default */])(_this));
7824      _this.getContent = _this.getContent.bind(Object(assertThisInitialized["a" /* default */])(_this));
7825      _this.state = {
7826        error: null
7827      };
7828      return _this;
7829    }
7830  
7831    Object(createClass["a" /* default */])(ErrorBoundary, [{
7832      key: "componentDidCatch",
7833      value: function componentDidCatch(error) {
7834        this.setState({
7835          error: error
7836        });
7837      }
7838    }, {
7839      key: "reboot",
7840      value: function reboot() {
7841        this.props.onError();
7842      }
7843    }, {
7844      key: "getContent",
7845      value: function getContent() {
7846        try {
7847          // While `select` in a component is generally discouraged, it is
7848          // used here because it (a) reduces the chance of data loss in the
7849          // case of additional errors by performing a direct retrieval and
7850          // (b) avoids the performance cost associated with unnecessary
7851          // content serialization throughout the lifetime of a non-erroring
7852          // application.
7853          return Object(external_this_wp_data_["select"])('core/editor').getEditedPostContent();
7854        } catch (error) {}
7855      }
7856    }, {
7857      key: "render",
7858      value: function render() {
7859        var error = this.state.error;
7860  
7861        if (!error) {
7862          return this.props.children;
7863        }
7864  
7865        return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["Warning"], {
7866          className: "editor-error-boundary",
7867          actions: [Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7868            key: "recovery",
7869            onClick: this.reboot,
7870            isSecondary: true
7871          }, Object(external_this_wp_i18n_["__"])('Attempt Recovery')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
7872            key: "copy-post",
7873            text: this.getContent,
7874            isSecondary: true
7875          }, Object(external_this_wp_i18n_["__"])('Copy Post Text')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
7876            key: "copy-error",
7877            text: error.stack,
7878            isSecondary: true
7879          }, Object(external_this_wp_i18n_["__"])('Copy Error'))]
7880        }, Object(external_this_wp_i18n_["__"])('The editor has encountered an unexpected error.'));
7881      }
7882    }]);
7883  
7884    return ErrorBoundary;
7885  }(external_this_wp_element_["Component"]);
7886  
7887  /* harmony default export */ var error_boundary = (error_boundary_ErrorBoundary);
7888  
7889  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/local-autosave-monitor/index.js
7890  
7891  
7892  /**
7893   * External dependencies
7894   */
7895  
7896  /**
7897   * WordPress dependencies
7898   */
7899  
7900  
7901  
7902  
7903  
7904  
7905  /**
7906   * Internal dependencies
7907   */
7908  
7909  
7910  
7911  var requestIdleCallback = window.requestIdleCallback ? window.requestIdleCallback : window.requestAnimationFrame;
7912  /**
7913   * Function which returns true if the current environment supports browser
7914   * sessionStorage, or false otherwise. The result of this function is cached and
7915   * reused in subsequent invocations.
7916   */
7917  
7918  var hasSessionStorageSupport = Object(external_this_lodash_["once"])(function () {
7919    try {
7920      // Private Browsing in Safari 10 and earlier will throw an error when
7921      // attempting to set into sessionStorage. The test here is intentional in
7922      // causing a thrown error as condition bailing from local autosave.
7923      window.sessionStorage.setItem('__wpEditorTestSessionStorage', '');
7924      window.sessionStorage.removeItem('__wpEditorTestSessionStorage');
7925      return true;
7926    } catch (error) {
7927      return false;
7928    }
7929  });
7930  /**
7931   * Custom hook which manages the creation of a notice prompting the user to
7932   * restore a local autosave, if one exists.
7933   */
7934  
7935  function useAutosaveNotice() {
7936    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
7937      return {
7938        postId: select('core/editor').getCurrentPostId(),
7939        getEditedPostAttribute: select('core/editor').getEditedPostAttribute,
7940        hasRemoteAutosave: !!select('core/editor').getEditorSettings().autosave
7941      };
7942    }, []),
7943        postId = _useSelect.postId,
7944        getEditedPostAttribute = _useSelect.getEditedPostAttribute,
7945        hasRemoteAutosave = _useSelect.hasRemoteAutosave;
7946  
7947    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
7948        createWarningNotice = _useDispatch.createWarningNotice,
7949        removeNotice = _useDispatch.removeNotice;
7950  
7951    var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7952        editPost = _useDispatch2.editPost,
7953        resetEditorBlocks = _useDispatch2.resetEditorBlocks;
7954  
7955    Object(external_this_wp_element_["useEffect"])(function () {
7956      var localAutosave = localAutosaveGet(postId);
7957  
7958      if (!localAutosave) {
7959        return;
7960      }
7961  
7962      try {
7963        localAutosave = JSON.parse(localAutosave);
7964      } catch (error) {
7965        // Not usable if it can't be parsed.
7966        return;
7967      }
7968  
7969      var _localAutosave = localAutosave,
7970          title = _localAutosave.post_title,
7971          content = _localAutosave.content,
7972          excerpt = _localAutosave.excerpt;
7973      var edits = {
7974        title: title,
7975        content: content,
7976        excerpt: excerpt
7977      };
7978      {
7979        // Only display a notice if there is a difference between what has been
7980        // saved and that which is stored in sessionStorage.
7981        var hasDifference = Object.keys(edits).some(function (key) {
7982          return edits[key] !== getEditedPostAttribute(key);
7983        });
7984  
7985        if (!hasDifference) {
7986          // If there is no difference, it can be safely ejected from storage.
7987          localAutosaveClear(postId);
7988          return;
7989        }
7990      }
7991  
7992      if (hasRemoteAutosave) {
7993        return;
7994      }
7995  
7996      var noticeId = Object(external_this_lodash_["uniqueId"])('wpEditorAutosaveRestore');
7997      createWarningNotice(Object(external_this_wp_i18n_["__"])('The backup of this post in your browser is different from the version below.'), {
7998        id: noticeId,
7999        actions: [{
8000          label: Object(external_this_wp_i18n_["__"])('Restore the backup'),
8001          onClick: function onClick() {
8002            editPost(Object(external_this_lodash_["omit"])(edits, ['content']));
8003            resetEditorBlocks(Object(external_this_wp_blocks_["parse"])(edits.content));
8004            removeNotice(noticeId);
8005          }
8006        }]
8007      });
8008    }, [postId]);
8009  }
8010  /**
8011   * Custom hook which ejects a local autosave after a successful save occurs.
8012   */
8013  
8014  
8015  function useAutosavePurge() {
8016    var _useSelect2 = Object(external_this_wp_data_["useSelect"])(function (select) {
8017      return {
8018        postId: select('core/editor').getCurrentPostId(),
8019        isDirty: select('core/editor').isEditedPostDirty(),
8020        isAutosaving: select('core/editor').isAutosavingPost(),
8021        didError: select('core/editor').didPostSaveRequestFail()
8022      };
8023    }, []),
8024        postId = _useSelect2.postId,
8025        isDirty = _useSelect2.isDirty,
8026        isAutosaving = _useSelect2.isAutosaving,
8027        didError = _useSelect2.didError;
8028  
8029    var lastIsDirty = Object(external_this_wp_element_["useRef"])(isDirty);
8030    var lastIsAutosaving = Object(external_this_wp_element_["useRef"])(isAutosaving);
8031    Object(external_this_wp_element_["useEffect"])(function () {
8032      if (!didError && (lastIsAutosaving.current && !isAutosaving || lastIsDirty.current && !isDirty)) {
8033        localAutosaveClear(postId);
8034      }
8035  
8036      lastIsDirty.current = isDirty;
8037      lastIsAutosaving.current = isAutosaving;
8038    }, [isDirty, isAutosaving, didError]);
8039  }
8040