wp/wp-includes/js/dist/editor.js
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    80 /******/ 	// __webpack_public_path__
    80 /******/ 	// __webpack_public_path__
    81 /******/ 	__webpack_require__.p = "";
    81 /******/ 	__webpack_require__.p = "";
    82 /******/
    82 /******/
    83 /******/
    83 /******/
    84 /******/ 	// Load entry module and return exports
    84 /******/ 	// Load entry module and return exports
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 438);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = "PLxR");
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ({
    88 /******/ ({
    89 
    89 
    90 /***/ 0:
    90 /***/ "16Al":
    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__(421);
       
   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__) {
    91 /***/ (function(module, exports, __webpack_require__) {
   324 
    92 
   325 "use strict";
    93 "use strict";
   326 /**
    94 /**
   327  * Copyright (c) 2013-present, Facebook, Inc.
    95  * Copyright (c) 2013-present, Facebook, Inc.
   330  * LICENSE file in the root directory of this source tree.
    98  * LICENSE file in the root directory of this source tree.
   331  */
    99  */
   332 
   100 
   333 
   101 
   334 
   102 
   335 var ReactPropTypesSecret = __webpack_require__(139);
   103 var ReactPropTypesSecret = __webpack_require__("WbBG");
   336 
   104 
   337 function emptyFunction() {}
   105 function emptyFunction() {}
   338 function emptyFunctionWithReset() {}
   106 function emptyFunctionWithReset() {}
   339 emptyFunctionWithReset.resetWarningCache = emptyFunction;
   107 emptyFunctionWithReset.resetWarningCache = emptyFunction;
   340 
   108 
   389 };
   157 };
   390 
   158 
   391 
   159 
   392 /***/ }),
   160 /***/ }),
   393 
   161 
   394 /***/ 139:
   162 /***/ "17x9":
   395 /***/ (function(module, exports, __webpack_require__) {
   163 /***/ (function(module, exports, __webpack_require__) {
   396 
   164 
   397 "use strict";
       
   398 /**
   165 /**
   399  * Copyright (c) 2013-present, Facebook, Inc.
   166  * Copyright (c) 2013-present, Facebook, Inc.
   400  *
   167  *
   401  * This source code is licensed under the MIT license found in the
   168  * This source code is licensed under the MIT license found in the
   402  * LICENSE file in the root directory of this source tree.
   169  * LICENSE file in the root directory of this source tree.
   403  */
   170  */
   404 
   171 
   405 
   172 if (false) { var throwOnDirectAccess, ReactIs; } else {
   406 
   173   // By explicitly using `prop-types` you are opting into new production behavior.
   407 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
   174   // http://fb.me/prop-types-in-prod
   408 
   175   module.exports = __webpack_require__("16Al")();
   409 module.exports = ReactPropTypesSecret;
   176 }
   410 
   177 
   411 
   178 
   412 /***/ }),
   179 /***/ }),
   413 
   180 
   414 /***/ 14:
   181 /***/ "1ZqX":
   415 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   182 /***/ (function(module, exports) {
   416 
   183 
   417 "use strict";
   184 (function() { module.exports = window["wp"]["data"]; }());
   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 
   185 
   467 /***/ }),
   186 /***/ }),
   468 
   187 
   469 /***/ 147:
   188 /***/ "51Zz":
   470 /***/ (function(module, exports) {
   189 /***/ (function(module, exports) {
   471 
   190 
   472 (function() { module.exports = this["wp"]["wordcount"]; }());
   191 (function() { module.exports = window["wp"]["dataControls"]; }());
   473 
   192 
   474 /***/ }),
   193 /***/ }),
   475 
   194 
   476 /***/ 15:
   195 /***/ "6aBm":
   477 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   196 /***/ (function(module, exports) {
   478 
   197 
   479 "use strict";
   198 (function() { module.exports = window["wp"]["mediaUtils"]; }());
   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 
   199 
   502 /***/ }),
   200 /***/ }),
   503 
   201 
   504 /***/ 152:
   202 /***/ "7fqt":
   505 /***/ (function(module, exports) {
   203 /***/ (function(module, exports) {
   506 
   204 
   507 (function() { module.exports = this["wp"]["mediaUtils"]; }());
   205 (function() { module.exports = window["wp"]["wordcount"]; }());
   508 
   206 
   509 /***/ }),
   207 /***/ }),
   510 
   208 
   511 /***/ 154:
   209 /***/ "CNgt":
   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 /***/ 155:
       
   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 /***/ 173:
       
   576 /***/ (function(module, exports, __webpack_require__) {
   210 /***/ (function(module, exports, __webpack_require__) {
   577 
   211 
   578 "use strict";
   212 "use strict";
   579 
   213 
   580 var __extends = (this && this.__extends) || (function () {
   214 var __extends = (this && this.__extends) || (function () {
   603         for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
   237         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]];
   238             t[p[i]] = s[p[i]];
   605     return t;
   239     return t;
   606 };
   240 };
   607 exports.__esModule = true;
   241 exports.__esModule = true;
   608 var React = __webpack_require__(13);
   242 var React = __webpack_require__("cDcd");
   609 var PropTypes = __webpack_require__(28);
   243 var PropTypes = __webpack_require__("17x9");
   610 var autosize = __webpack_require__(174);
   244 var autosize = __webpack_require__("GemG");
   611 var _getLineHeight = __webpack_require__(175);
   245 var _getLineHeight = __webpack_require__("Rk8H");
   612 var getLineHeight = _getLineHeight;
   246 var getLineHeight = _getLineHeight;
   613 var UPDATE = 'autosize:update';
   247 var RESIZED = "autosize:resized";
   614 var DESTROY = 'autosize:destroy';
       
   615 var RESIZED = 'autosize:resized';
       
   616 /**
   248 /**
   617  * A light replacement for built-in textarea component
   249  * A light replacement for built-in textarea component
   618  * which automaticaly adjusts its height to match the content
   250  * which automaticaly adjusts its height to match the content
   619  */
   251  */
   620 var TextareaAutosize = /** @class */ (function (_super) {
   252 var TextareaAutosizeClass = /** @class */ (function (_super) {
   621     __extends(TextareaAutosize, _super);
   253     __extends(TextareaAutosizeClass, _super);
   622     function TextareaAutosize() {
   254     function TextareaAutosizeClass() {
   623         var _this = _super !== null && _super.apply(this, arguments) || this;
   255         var _this = _super !== null && _super.apply(this, arguments) || this;
   624         _this.state = {
   256         _this.state = {
   625             lineHeight: null
   257             lineHeight: null
   626         };
   258         };
   627         _this.dispatchEvent = function (EVENT_TYPE) {
   259         _this.textarea = null;
   628             var event = document.createEvent('Event');
   260         _this.onResize = function (e) {
   629             event.initEvent(EVENT_TYPE, true, false);
   261             if (_this.props.onResize) {
   630             _this.textarea.dispatchEvent(event);
   262                 _this.props.onResize(e);
       
   263             }
   631         };
   264         };
   632         _this.updateLineHeight = function () {
   265         _this.updateLineHeight = function () {
   633             _this.setState({
   266             if (_this.textarea) {
   634                 lineHeight: getLineHeight(_this.textarea)
   267                 _this.setState({
   635             });
   268                     lineHeight: getLineHeight(_this.textarea)
       
   269                 });
       
   270             }
   636         };
   271         };
   637         _this.onChange = function (e) {
   272         _this.onChange = function (e) {
   638             var onChange = _this.props.onChange;
   273             var onChange = _this.props.onChange;
   639             _this.currentValue = e.currentTarget.value;
   274             _this.currentValue = e.currentTarget.value;
   640             onChange && onChange(e);
   275             onChange && onChange(e);
   641         };
   276         };
   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;
   277         return _this;
   655     }
   278     }
   656     TextareaAutosize.prototype.componentDidMount = function () {
   279     TextareaAutosizeClass.prototype.componentDidMount = function () {
   657         var _this = this;
   280         var _this = this;
   658         var _a = this.props, onResize = _a.onResize, maxRows = _a.maxRows;
   281         var _a = this.props, maxRows = _a.maxRows, async = _a.async;
   659         if (typeof maxRows === 'number') {
   282         if (typeof maxRows === "number") {
   660             this.updateLineHeight();
   283             this.updateLineHeight();
   661         }
   284         }
   662         /*
   285         if (typeof maxRows === "number" || async) {
   663           the defer is needed to:
   286             /*
   664             - force "autosize" to activate the scrollbar when this.props.maxRows is passed
   287               the defer is needed to:
   665             - support StyledComponents (see #71)
   288                 - force "autosize" to activate the scrollbar when this.props.maxRows is passed
   666         */
   289                 - support StyledComponents (see #71)
   667         setTimeout(function () { return autosize(_this.textarea); });
   290             */
   668         if (onResize) {
   291             setTimeout(function () { return _this.textarea && autosize(_this.textarea); });
   669             this.textarea.addEventListener(RESIZED, onResize);
   292         }
       
   293         else {
       
   294             this.textarea && autosize(this.textarea);
       
   295         }
       
   296         if (this.textarea) {
       
   297             this.textarea.addEventListener(RESIZED, this.onResize);
   670         }
   298         }
   671     };
   299     };
   672     TextareaAutosize.prototype.componentWillUnmount = function () {
   300     TextareaAutosizeClass.prototype.componentWillUnmount = function () {
   673         var onResize = this.props.onResize;
   301         if (this.textarea) {
   674         if (onResize) {
   302             this.textarea.removeEventListener(RESIZED, this.onResize);
   675             this.textarea.removeEventListener(RESIZED, onResize);
   303             autosize.destroy(this.textarea);
   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         }
   304         }
   687     };
   305     };
   688     TextareaAutosize.defaultProps = {
   306     TextareaAutosizeClass.prototype.render = function () {
   689         rows: 1
   307         var _this = this;
       
   308         var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef", "children"]), lineHeight = _a.state.lineHeight;
       
   309         var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
       
   310         return (React.createElement("textarea", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {
       
   311                 _this.textarea = element;
       
   312                 if (typeof _this.props.innerRef === 'function') {
       
   313                     _this.props.innerRef(element);
       
   314                 }
       
   315                 else if (_this.props.innerRef) {
       
   316                     _this.props.innerRef.current = element;
       
   317                 }
       
   318             } }), children));
   690     };
   319     };
   691     TextareaAutosize.propTypes = {
   320     TextareaAutosizeClass.prototype.componentDidUpdate = function () {
       
   321         this.textarea && autosize.update(this.textarea);
       
   322     };
       
   323     TextareaAutosizeClass.defaultProps = {
       
   324         rows: 1,
       
   325         async: false
       
   326     };
       
   327     TextareaAutosizeClass.propTypes = {
   692         rows: PropTypes.number,
   328         rows: PropTypes.number,
   693         maxRows: PropTypes.number,
   329         maxRows: PropTypes.number,
   694         onResize: PropTypes.func,
   330         onResize: PropTypes.func,
   695         innerRef: PropTypes.func
   331         innerRef: PropTypes.any,
       
   332         async: PropTypes.bool
   696     };
   333     };
   697     return TextareaAutosize;
   334     return TextareaAutosizeClass;
   698 }(React.Component));
   335 }(React.Component));
   699 exports["default"] = TextareaAutosize;
   336 exports.TextareaAutosize = React.forwardRef(function (props, ref) {
       
   337     return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));
       
   338 });
   700 
   339 
   701 
   340 
   702 /***/ }),
   341 /***/ }),
   703 
   342 
   704 /***/ 174:
   343 /***/ "Civd":
       
   344 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   345 
       
   346 "use strict";
       
   347 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
   348 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
   349 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
   350 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
   351 
       
   352 
       
   353 /**
       
   354  * WordPress dependencies
       
   355  */
       
   356 
       
   357 const layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   358   xmlns: "http://www.w3.org/2000/svg",
       
   359   viewBox: "0 0 24 24"
       
   360 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   361   d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
   362 }));
       
   363 /* harmony default export */ __webpack_exports__["a"] = (layout);
       
   364 
       
   365 
       
   366 /***/ }),
       
   367 
       
   368 /***/ "FqII":
       
   369 /***/ (function(module, exports) {
       
   370 
       
   371 (function() { module.exports = window["wp"]["date"]; }());
       
   372 
       
   373 /***/ }),
       
   374 
       
   375 /***/ "GRId":
       
   376 /***/ (function(module, exports) {
       
   377 
       
   378 (function() { module.exports = window["wp"]["element"]; }());
       
   379 
       
   380 /***/ }),
       
   381 
       
   382 /***/ "GemG":
   705 /***/ (function(module, exports, __webpack_require__) {
   383 /***/ (function(module, exports, __webpack_require__) {
   706 
   384 
   707 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
   385 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
   708 	autosize 4.0.2
   386 	autosize 4.0.4
   709 	license: MIT
   387 	license: MIT
   710 	http://www.jacklmoore.com/autosize
   388 	http://www.jacklmoore.com/autosize
   711 */
   389 */
   712 (function (global, factory) {
   390 (function (global, factory) {
   713 	if (true) {
   391 	if (true) {
   988 	module.exports = exports['default'];
   666 	module.exports = exports['default'];
   989 });
   667 });
   990 
   668 
   991 /***/ }),
   669 /***/ }),
   992 
   670 
   993 /***/ 175:
   671 /***/ "HSyU":
   994 /***/ (function(module, exports, __webpack_require__) {
   672 /***/ (function(module, exports) {
   995 
   673 
   996 // Load in dependencies
   674 (function() { module.exports = window["wp"]["blocks"]; }());
   997 var computedStyle = __webpack_require__(176);
       
   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 
   675 
  1095 /***/ }),
   676 /***/ }),
  1096 
   677 
  1097 /***/ 176:
   678 /***/ "JREk":
  1098 /***/ (function(module, exports) {
   679 /***/ (function(module, exports) {
  1099 
   680 
  1100 // This code has been refactored for 140 bytes
   681 (function() { module.exports = window["wp"]["serverSideRender"]; }());
  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 
   682 
  1129 /***/ }),
   683 /***/ }),
  1130 
   684 
  1131 /***/ 177:
   685 /***/ "K2cm":
  1132 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   686 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1133 
   687 
  1134 "use strict";
   688 "use strict";
  1135 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
   689 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  1136 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
   690 /* 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);
   691 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  1138 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
   692 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  1139 
   693 
  1140 
   694 
  1141 /**
   695 /**
  1142  * WordPress dependencies
   696  * WordPress dependencies
  1143  */
   697  */
  1144 
   698 
  1145 var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
   699 const redo = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  1146   xmlns: "http://www.w3.org/2000/svg",
   700   xmlns: "http://www.w3.org/2000/svg",
  1147   viewBox: "0 0 24 24"
   701   viewBox: "0 0 24 24"
  1148 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
   702 }, 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"
   703   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"
  1150 }));
   704 }));
  1151 /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
   705 /* harmony default export */ __webpack_exports__["a"] = (redo);
  1152 
   706 
  1153 
   707 
  1154 /***/ }),
   708 /***/ }),
  1155 
   709 
  1156 /***/ 18:
   710 /***/ "K9lf":
       
   711 /***/ (function(module, exports) {
       
   712 
       
   713 (function() { module.exports = window["wp"]["compose"]; }());
       
   714 
       
   715 /***/ }),
       
   716 
       
   717 /***/ "Mmq9":
       
   718 /***/ (function(module, exports) {
       
   719 
       
   720 (function() { module.exports = window["wp"]["url"]; }());
       
   721 
       
   722 /***/ }),
       
   723 
       
   724 /***/ "NMb1":
       
   725 /***/ (function(module, exports) {
       
   726 
       
   727 (function() { module.exports = window["wp"]["deprecated"]; }());
       
   728 
       
   729 /***/ }),
       
   730 
       
   731 /***/ "Ntru":
  1157 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   732 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1158 
   733 
  1159 "use strict";
   734 "use strict";
  1160 
   735 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  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 /***/ 202:
       
  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__);
   736 /* 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);
   737 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  1243 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
   738 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  1244 
   739 
  1245 
   740 
  1246 /**
   741 /**
  1247  * WordPress dependencies
   742  * WordPress dependencies
  1248  */
   743  */
  1249 
   744 
  1250 var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
   745 const undo = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
  1251   xmlns: "http://www.w3.org/2000/svg",
   746   xmlns: "http://www.w3.org/2000/svg",
  1252   viewBox: "0 0 24 24"
   747   viewBox: "0 0 24 24"
  1253 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
   748 }, 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"
   749   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"
  1255 }));
   750 }));
  1256 /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
   751 /* harmony default export */ __webpack_exports__["a"] = (undo);
  1257 
   752 
  1258 
   753 
  1259 /***/ }),
   754 /***/ }),
  1260 
   755 
  1261 /***/ 21:
   756 /***/ "O6Fj":
  1262 /***/ (function(module, exports) {
   757 /***/ (function(module, exports, __webpack_require__) {
  1263 
   758 
  1264 (function() { module.exports = this["wp"]["keycodes"]; }());
   759 "use strict";
       
   760 
       
   761 exports.__esModule = true;
       
   762 var TextareaAutosize_1 = __webpack_require__("CNgt");
       
   763 exports["default"] = TextareaAutosize_1.TextareaAutosize;
       
   764 
  1265 
   765 
  1266 /***/ }),
   766 /***/ }),
  1267 
   767 
  1268 /***/ 22:
   768 /***/ "PLxR":
  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 /***/ 298:
       
  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 /***/ 302:
       
  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 /***/ 421:
       
  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 /***/ 438:
       
  2010 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   769 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2011 
   770 
  2012 "use strict";
   771 "use strict";
  2013 // ESM COMPAT FLAG
   772 // ESM COMPAT FLAG
  2014 __webpack_require__.r(__webpack_exports__);
   773 __webpack_require__.r(__webpack_exports__);
  2015 
   774 
  2016 // EXPORTS
   775 // EXPORTS
       
   776 __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; });
       
   777 __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
  2017 __webpack_require__.d(__webpack_exports__, "userAutocompleter", function() { return /* reexport */ autocompleters_user; });
   778 __webpack_require__.d(__webpack_exports__, "userAutocompleter", function() { return /* reexport */ autocompleters_user; });
  2018 __webpack_require__.d(__webpack_exports__, "AutosaveMonitor", function() { return /* reexport */ autosave_monitor; });
   779 __webpack_require__.d(__webpack_exports__, "AutosaveMonitor", function() { return /* reexport */ autosave_monitor; });
  2019 __webpack_require__.d(__webpack_exports__, "DocumentOutline", function() { return /* reexport */ document_outline; });
   780 __webpack_require__.d(__webpack_exports__, "DocumentOutline", function() { return /* reexport */ document_outline; });
  2020 __webpack_require__.d(__webpack_exports__, "DocumentOutlineCheck", function() { return /* reexport */ check; });
   781 __webpack_require__.d(__webpack_exports__, "DocumentOutlineCheck", function() { return /* reexport */ check; });
  2021 __webpack_require__.d(__webpack_exports__, "VisualEditorGlobalKeyboardShortcuts", function() { return /* reexport */ visual_editor_shortcuts; });
   782 __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; });
   783 __webpack_require__.d(__webpack_exports__, "TextEditorGlobalKeyboardShortcuts", function() { return /* reexport */ TextEditorGlobalKeyboardShortcuts; });
  2024 __webpack_require__.d(__webpack_exports__, "EditorKeyboardShortcutsRegister", function() { return /* reexport */ register_shortcuts; });
   784 __webpack_require__.d(__webpack_exports__, "EditorKeyboardShortcutsRegister", function() { return /* reexport */ register_shortcuts; });
  2025 __webpack_require__.d(__webpack_exports__, "EditorHistoryRedo", function() { return /* reexport */ editor_history_redo; });
   785 __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; });
   786 __webpack_require__.d(__webpack_exports__, "EditorHistoryUndo", function() { return /* reexport */ editor_history_undo; });
  2027 __webpack_require__.d(__webpack_exports__, "EditorNotices", function() { return /* reexport */ editor_notices; });
   787 __webpack_require__.d(__webpack_exports__, "EditorNotices", function() { return /* reexport */ editor_notices; });
       
   788 __webpack_require__.d(__webpack_exports__, "EditorSnackbars", function() { return /* reexport */ EditorSnackbars; });
  2028 __webpack_require__.d(__webpack_exports__, "EntitiesSavedStates", function() { return /* reexport */ EntitiesSavedStates; });
   789 __webpack_require__.d(__webpack_exports__, "EntitiesSavedStates", function() { return /* reexport */ EntitiesSavedStates; });
  2029 __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return /* reexport */ error_boundary; });
   790 __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return /* reexport */ error_boundary; });
  2030 __webpack_require__.d(__webpack_exports__, "LocalAutosaveMonitor", function() { return /* reexport */ local_autosave_monitor; });
   791 __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; });
   792 __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; });
   793 __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; });
   794 __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; });
   795 __webpack_require__.d(__webpack_exports__, "PageTemplate", function() { return /* reexport */ post_template; });
  2035 __webpack_require__.d(__webpack_exports__, "PostAuthor", function() { return /* reexport */ post_author; });
   796 __webpack_require__.d(__webpack_exports__, "PostAuthor", function() { return /* reexport */ post_author; });
  2036 __webpack_require__.d(__webpack_exports__, "PostAuthorCheck", function() { return /* reexport */ post_author_check; });
   797 __webpack_require__.d(__webpack_exports__, "PostAuthorCheck", function() { return /* reexport */ post_author_check; });
  2037 __webpack_require__.d(__webpack_exports__, "PostComments", function() { return /* reexport */ post_comments; });
   798 __webpack_require__.d(__webpack_exports__, "PostComments", function() { return /* reexport */ post_comments; });
  2038 __webpack_require__.d(__webpack_exports__, "PostExcerpt", function() { return /* reexport */ post_excerpt; });
   799 __webpack_require__.d(__webpack_exports__, "PostExcerpt", function() { return /* reexport */ post_excerpt; });
  2039 __webpack_require__.d(__webpack_exports__, "PostExcerptCheck", function() { return /* reexport */ post_excerpt_check; });
   800 __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; });
   801 __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; });
   802 __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; });
   803 __webpack_require__.d(__webpack_exports__, "PostFormat", function() { return /* reexport */ PostFormat; });
  2043 __webpack_require__.d(__webpack_exports__, "PostFormatCheck", function() { return /* reexport */ post_format_check; });
   804 __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; });
   805 __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; });
   806 __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; });
   807 __webpack_require__.d(__webpack_exports__, "PostLockedModal", function() { return /* reexport */ PostLockedModal; });
  2047 __webpack_require__.d(__webpack_exports__, "PostPendingStatus", function() { return /* reexport */ post_pending_status; });
   808 __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; });
   809 __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; });
   810 __webpack_require__.d(__webpack_exports__, "PostPingbacks", function() { return /* reexport */ post_pingbacks; });
  2050 __webpack_require__.d(__webpack_exports__, "PostPreviewButton", function() { return /* reexport */ post_preview_button; });
   811 __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; });
   812 __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; });
   813 __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; });
   814 __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; });
   815 __webpack_require__.d(__webpack_exports__, "PostSavedState", function() { return /* reexport */ PostSavedState; });
  2055 __webpack_require__.d(__webpack_exports__, "PostSchedule", function() { return /* reexport */ post_schedule; });
   816 __webpack_require__.d(__webpack_exports__, "PostSchedule", function() { return /* reexport */ PostSchedule; });
  2056 __webpack_require__.d(__webpack_exports__, "PostScheduleCheck", function() { return /* reexport */ post_schedule_check; });
   817 __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; });
   818 __webpack_require__.d(__webpack_exports__, "PostScheduleLabel", function() { return /* reexport */ post_schedule_label; });
  2058 __webpack_require__.d(__webpack_exports__, "PostSlug", function() { return /* reexport */ post_slug; });
   819 __webpack_require__.d(__webpack_exports__, "PostSlug", function() { return /* reexport */ post_slug; });
  2059 __webpack_require__.d(__webpack_exports__, "PostSlugCheck", function() { return /* reexport */ PostSlugCheck; });
   820 __webpack_require__.d(__webpack_exports__, "PostSlugCheck", function() { return /* reexport */ PostSlugCheck; });
  2060 __webpack_require__.d(__webpack_exports__, "PostSticky", function() { return /* reexport */ post_sticky; });
   821 __webpack_require__.d(__webpack_exports__, "PostSticky", function() { return /* reexport */ post_sticky; });
  2061 __webpack_require__.d(__webpack_exports__, "PostStickyCheck", function() { return /* reexport */ post_sticky_check; });
   822 __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; });
   823 __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; });
   824 __webpack_require__.d(__webpack_exports__, "PostTaxonomies", function() { return /* reexport */ post_taxonomies; });
  2064 __webpack_require__.d(__webpack_exports__, "PostTaxonomiesCheck", function() { return /* reexport */ post_taxonomies_check; });
   825 __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; });
   826 __webpack_require__.d(__webpack_exports__, "PostTextEditor", function() { return /* reexport */ PostTextEditor; });
  2066 __webpack_require__.d(__webpack_exports__, "PostTitle", function() { return /* reexport */ post_title; });
   827 __webpack_require__.d(__webpack_exports__, "PostTitle", function() { return /* reexport */ PostTitle; });
  2067 __webpack_require__.d(__webpack_exports__, "PostTrash", function() { return /* reexport */ post_trash; });
   828 __webpack_require__.d(__webpack_exports__, "PostTrash", function() { return /* reexport */ post_trash; });
  2068 __webpack_require__.d(__webpack_exports__, "PostTrashCheck", function() { return /* reexport */ post_trash_check; });
   829 __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; });
   830 __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; });
   831 __webpack_require__.d(__webpack_exports__, "PostVisibility", function() { return /* reexport */ post_visibility; });
  2071 __webpack_require__.d(__webpack_exports__, "PostVisibilityLabel", function() { return /* reexport */ post_visibility_label; });
   832 __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; });
   833 __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; });
   834 __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; });
   835 __webpack_require__.d(__webpack_exports__, "UnsavedChangesWarning", function() { return /* reexport */ UnsavedChangesWarning; });
  2075 __webpack_require__.d(__webpack_exports__, "WordCount", function() { return /* reexport */ word_count; });
   836 __webpack_require__.d(__webpack_exports__, "WordCount", function() { return /* reexport */ WordCount; });
  2076 __webpack_require__.d(__webpack_exports__, "EditorProvider", function() { return /* reexport */ provider; });
   837 __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; });
   838 __webpack_require__.d(__webpack_exports__, "ServerSideRender", function() { return /* reexport */ external_wp_serverSideRender_default.a; });
  2078 __webpack_require__.d(__webpack_exports__, "RichText", function() { return /* reexport */ RichText; });
   839 __webpack_require__.d(__webpack_exports__, "RichText", function() { return /* reexport */ RichText; });
  2079 __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ Autocomplete; });
   840 __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ Autocomplete; });
  2080 __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ AlignmentToolbar; });
   841 __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ AlignmentToolbar; });
  2081 __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ BlockAlignmentToolbar; });
   842 __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ BlockAlignmentToolbar; });
  2082 __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ BlockControls; });
   843 __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ BlockControls; });
  2128 __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ withColorContext; });
   889 __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ withColorContext; });
  2129 __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; });
   890 __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; });
  2130 __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ withFontSizes; });
   891 __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ withFontSizes; });
  2131 __webpack_require__.d(__webpack_exports__, "mediaUpload", function() { return /* reexport */ mediaUpload; });
   892 __webpack_require__.d(__webpack_exports__, "mediaUpload", function() { return /* reexport */ mediaUpload; });
  2132 __webpack_require__.d(__webpack_exports__, "cleanForSlug", function() { return /* reexport */ cleanForSlug; });
   893 __webpack_require__.d(__webpack_exports__, "cleanForSlug", function() { return /* reexport */ cleanForSlug; });
  2133 __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; });
   894 __webpack_require__.d(__webpack_exports__, "transformStyles", function() { return /* reexport */ external_wp_blockEditor_["transformStyles"]; });
  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 
   895 
  2205 // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/selectors.js
   896 // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/selectors.js
  2206 var selectors_namespaceObject = {};
   897 var selectors_namespaceObject = {};
  2207 __webpack_require__.r(selectors_namespaceObject);
   898 __webpack_require__.r(selectors_namespaceObject);
  2208 __webpack_require__.d(selectors_namespaceObject, "hasEditorUndo", function() { return hasEditorUndo; });
   899 __webpack_require__.d(selectors_namespaceObject, "hasEditorUndo", function() { return hasEditorUndo; });
  2209 __webpack_require__.d(selectors_namespaceObject, "hasEditorRedo", function() { return hasEditorRedo; });
   900 __webpack_require__.d(selectors_namespaceObject, "hasEditorRedo", function() { return hasEditorRedo; });
  2210 __webpack_require__.d(selectors_namespaceObject, "isEditedPostNew", function() { return isEditedPostNew; });
   901 __webpack_require__.d(selectors_namespaceObject, "isEditedPostNew", function() { return selectors_isEditedPostNew; });
  2211 __webpack_require__.d(selectors_namespaceObject, "hasChangedContent", function() { return hasChangedContent; });
   902 __webpack_require__.d(selectors_namespaceObject, "hasChangedContent", function() { return hasChangedContent; });
  2212 __webpack_require__.d(selectors_namespaceObject, "isEditedPostDirty", function() { return selectors_isEditedPostDirty; });
   903 __webpack_require__.d(selectors_namespaceObject, "isEditedPostDirty", function() { return selectors_isEditedPostDirty; });
  2213 __webpack_require__.d(selectors_namespaceObject, "hasNonPostEntityChanges", function() { return selectors_hasNonPostEntityChanges; });
   904 __webpack_require__.d(selectors_namespaceObject, "hasNonPostEntityChanges", function() { return selectors_hasNonPostEntityChanges; });
  2214 __webpack_require__.d(selectors_namespaceObject, "isCleanNewPost", function() { return selectors_isCleanNewPost; });
   905 __webpack_require__.d(selectors_namespaceObject, "isCleanNewPost", function() { return selectors_isCleanNewPost; });
  2215 __webpack_require__.d(selectors_namespaceObject, "getCurrentPost", function() { return selectors_getCurrentPost; });
   906 __webpack_require__.d(selectors_namespaceObject, "getCurrentPost", function() { return selectors_getCurrentPost; });
  2241 __webpack_require__.d(selectors_namespaceObject, "isPreviewingPost", function() { return isPreviewingPost; });
   932 __webpack_require__.d(selectors_namespaceObject, "isPreviewingPost", function() { return isPreviewingPost; });
  2242 __webpack_require__.d(selectors_namespaceObject, "getEditedPostPreviewLink", function() { return selectors_getEditedPostPreviewLink; });
   933 __webpack_require__.d(selectors_namespaceObject, "getEditedPostPreviewLink", function() { return selectors_getEditedPostPreviewLink; });
  2243 __webpack_require__.d(selectors_namespaceObject, "getSuggestedPostFormat", function() { return selectors_getSuggestedPostFormat; });
   934 __webpack_require__.d(selectors_namespaceObject, "getSuggestedPostFormat", function() { return selectors_getSuggestedPostFormat; });
  2244 __webpack_require__.d(selectors_namespaceObject, "getBlocksForSerialization", function() { return getBlocksForSerialization; });
   935 __webpack_require__.d(selectors_namespaceObject, "getBlocksForSerialization", function() { return getBlocksForSerialization; });
  2245 __webpack_require__.d(selectors_namespaceObject, "getEditedPostContent", function() { return getEditedPostContent; });
   936 __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; });
   937 __webpack_require__.d(selectors_namespaceObject, "isPublishingPost", function() { return selectors_isPublishingPost; });
  2252 __webpack_require__.d(selectors_namespaceObject, "isPermalinkEditable", function() { return isPermalinkEditable; });
   938 __webpack_require__.d(selectors_namespaceObject, "isPermalinkEditable", function() { return isPermalinkEditable; });
  2253 __webpack_require__.d(selectors_namespaceObject, "getPermalink", function() { return getPermalink; });
   939 __webpack_require__.d(selectors_namespaceObject, "getPermalink", function() { return getPermalink; });
  2254 __webpack_require__.d(selectors_namespaceObject, "getEditedPostSlug", function() { return getEditedPostSlug; });
   940 __webpack_require__.d(selectors_namespaceObject, "getEditedPostSlug", function() { return getEditedPostSlug; });
  2255 __webpack_require__.d(selectors_namespaceObject, "getPermalinkParts", function() { return getPermalinkParts; });
   941 __webpack_require__.d(selectors_namespaceObject, "getPermalinkParts", function() { return getPermalinkParts; });
  2256 __webpack_require__.d(selectors_namespaceObject, "inSomeHistory", function() { return inSomeHistory; });
   942 __webpack_require__.d(selectors_namespaceObject, "isPostLocked", function() { return selectors_isPostLocked; });
  2257 __webpack_require__.d(selectors_namespaceObject, "isPostLocked", function() { return isPostLocked; });
       
  2258 __webpack_require__.d(selectors_namespaceObject, "isPostSavingLocked", function() { return selectors_isPostSavingLocked; });
   943 __webpack_require__.d(selectors_namespaceObject, "isPostSavingLocked", function() { return selectors_isPostSavingLocked; });
  2259 __webpack_require__.d(selectors_namespaceObject, "isPostAutosavingLocked", function() { return isPostAutosavingLocked; });
   944 __webpack_require__.d(selectors_namespaceObject, "isPostAutosavingLocked", function() { return isPostAutosavingLocked; });
  2260 __webpack_require__.d(selectors_namespaceObject, "isPostLockTakeover", function() { return isPostLockTakeover; });
   945 __webpack_require__.d(selectors_namespaceObject, "isPostLockTakeover", function() { return isPostLockTakeover; });
  2261 __webpack_require__.d(selectors_namespaceObject, "getPostLockUser", function() { return getPostLockUser; });
   946 __webpack_require__.d(selectors_namespaceObject, "getPostLockUser", function() { return getPostLockUser; });
  2262 __webpack_require__.d(selectors_namespaceObject, "getActivePostLock", function() { return getActivePostLock; });
   947 __webpack_require__.d(selectors_namespaceObject, "getActivePostLock", function() { return getActivePostLock; });
  2263 __webpack_require__.d(selectors_namespaceObject, "canUserUseUnfilteredHTML", function() { return selectors_canUserUseUnfilteredHTML; });
   948 __webpack_require__.d(selectors_namespaceObject, "canUserUseUnfilteredHTML", function() { return selectors_canUserUseUnfilteredHTML; });
  2264 __webpack_require__.d(selectors_namespaceObject, "isPublishSidebarEnabled", function() { return selectors_isPublishSidebarEnabled; });
   949 __webpack_require__.d(selectors_namespaceObject, "isPublishSidebarEnabled", function() { return selectors_isPublishSidebarEnabled; });
  2265 __webpack_require__.d(selectors_namespaceObject, "getEditorBlocks", function() { return selectors_getEditorBlocks; });
   950 __webpack_require__.d(selectors_namespaceObject, "getEditorBlocks", function() { return getEditorBlocks; });
  2266 __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionStart", function() { return selectors_getEditorSelectionStart; });
   951 __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionStart", function() { return getEditorSelectionStart; });
  2267 __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionEnd", function() { return selectors_getEditorSelectionEnd; });
   952 __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionEnd", function() { return getEditorSelectionEnd; });
  2268 __webpack_require__.d(selectors_namespaceObject, "__unstableIsEditorReady", function() { return __unstableIsEditorReady; });
   953 __webpack_require__.d(selectors_namespaceObject, "getEditorSelection", function() { return selectors_getEditorSelection; });
       
   954 __webpack_require__.d(selectors_namespaceObject, "__unstableIsEditorReady", function() { return selectors_unstableIsEditorReady; });
  2269 __webpack_require__.d(selectors_namespaceObject, "getEditorSettings", function() { return selectors_getEditorSettings; });
   955 __webpack_require__.d(selectors_namespaceObject, "getEditorSettings", function() { return selectors_getEditorSettings; });
       
   956 __webpack_require__.d(selectors_namespaceObject, "getStateBeforeOptimisticTransaction", function() { return getStateBeforeOptimisticTransaction; });
       
   957 __webpack_require__.d(selectors_namespaceObject, "inSomeHistory", function() { return inSomeHistory; });
  2270 __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return getBlockName; });
   958 __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return getBlockName; });
  2271 __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return isBlockValid; });
   959 __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return isBlockValid; });
  2272 __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
   960 __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
  2273 __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
   961 __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return getBlock; });
  2274 __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
   962 __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
  2275 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return __unstableGetBlockWithoutInnerBlocks; });
   963 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return __unstableGetBlockWithoutInnerBlocks; });
  2276 __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return getClientIdsOfDescendants; });
   964 __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return getClientIdsOfDescendants; });
  2277 __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
   965 __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
  2278 __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return getGlobalBlockCount; });
   966 __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return selectors_getGlobalBlockCount; });
  2279 __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; });
   967 __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return getBlocksByClientId; });
  2280 __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return getBlockCount; });
   968 __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return getBlockCount; });
  2281 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return getBlockSelectionStart; });
   969 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return getBlockSelectionStart; });
  2282 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return getBlockSelectionEnd; });
   970 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return getBlockSelectionEnd; });
  2283 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return getSelectedBlockCount; });
   971 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return getSelectedBlockCount; });
  2284 __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return hasSelectedBlock; });
   972 __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return hasSelectedBlock; });
  2313 __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; });
  1001 __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; });
  2314 __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; });
  1002 __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; });
  2315 __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return isValidTemplate; });
  1003 __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return isValidTemplate; });
  2316 __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
  1004 __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
  2317 __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return getTemplateLock; });
  1005 __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return getTemplateLock; });
  2318 __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; });
  1006 __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return canInsertBlockType; });
  2319 __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return getInserterItems; });
  1007 __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return getInserterItems; });
  2320 __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return hasInserterItems; });
  1008 __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return hasInserterItems; });
  2321 __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return getBlockListSettings; });
  1009 __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return getBlockListSettings; });
  2322 
  1010 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetDefaultTemplateTypes", function() { return __experimentalGetDefaultTemplateTypes; });
  2323 // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
  1011 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetDefaultTemplatePartAreas", function() { return __experimentalGetDefaultTemplatePartAreas; });
  2324 var external_this_wp_blockEditor_ = __webpack_require__(7);
  1012 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetDefaultTemplateType", function() { return __experimentalGetDefaultTemplateType; });
  2325 
  1013 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetTemplateInfo", function() { return __experimentalGetTemplateInfo; });
  2326 // EXTERNAL MODULE: external {"this":["wp","blocks"]}
  1014 
  2327 var external_this_wp_blocks_ = __webpack_require__(10);
  1015 // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/actions.js
  2328 
  1016 var actions_namespaceObject = {};
  2329 // EXTERNAL MODULE: external {"this":["wp","coreData"]}
  1017 __webpack_require__.r(actions_namespaceObject);
  2330 var external_this_wp_coreData_ = __webpack_require__(98);
  1018 __webpack_require__.d(actions_namespaceObject, "setupEditor", function() { return actions_setupEditor; });
  2331 
  1019 __webpack_require__.d(actions_namespaceObject, "__experimentalTearDownEditor", function() { return actions_experimentalTearDownEditor; });
  2332 // EXTERNAL MODULE: external {"this":["wp","keyboardShortcuts"]}
  1020 __webpack_require__.d(actions_namespaceObject, "resetPost", function() { return resetPost; });
  2333 var external_this_wp_keyboardShortcuts_ = __webpack_require__(52);
  1021 __webpack_require__.d(actions_namespaceObject, "resetAutosave", function() { return resetAutosave; });
  2334 
  1022 __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateStart", function() { return __experimentalRequestPostUpdateStart; });
  2335 // EXTERNAL MODULE: external {"this":["wp","notices"]}
  1023 __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateFinish", function() { return __experimentalRequestPostUpdateFinish; });
  2336 var external_this_wp_notices_ = __webpack_require__(100);
  1024 __webpack_require__.d(actions_namespaceObject, "updatePost", function() { return updatePost; });
  2337 
  1025 __webpack_require__.d(actions_namespaceObject, "setupEditorState", function() { return setupEditorState; });
  2338 // EXTERNAL MODULE: external {"this":["wp","richText"]}
  1026 __webpack_require__.d(actions_namespaceObject, "editPost", function() { return actions_editPost; });
  2339 var external_this_wp_richText_ = __webpack_require__(25);
  1027 __webpack_require__.d(actions_namespaceObject, "savePost", function() { return actions_savePost; });
  2340 
  1028 __webpack_require__.d(actions_namespaceObject, "refreshPost", function() { return refreshPost; });
  2341 // EXTERNAL MODULE: external {"this":["wp","viewport"]}
  1029 __webpack_require__.d(actions_namespaceObject, "trashPost", function() { return trashPost; });
  2342 var external_this_wp_viewport_ = __webpack_require__(81);
  1030 __webpack_require__.d(actions_namespaceObject, "autosave", function() { return actions_autosave; });
  2343 
  1031 __webpack_require__.d(actions_namespaceObject, "redo", function() { return actions_redo; });
  2344 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  1032 __webpack_require__.d(actions_namespaceObject, "undo", function() { return actions_undo; });
  2345 var defineProperty = __webpack_require__(5);
  1033 __webpack_require__.d(actions_namespaceObject, "createUndoLevel", function() { return createUndoLevel; });
  2346 
  1034 __webpack_require__.d(actions_namespaceObject, "updatePostLock", function() { return actions_updatePostLock; });
  2347 // EXTERNAL MODULE: external {"this":["wp","data"]}
  1035 __webpack_require__.d(actions_namespaceObject, "enablePublishSidebar", function() { return enablePublishSidebar; });
  2348 var external_this_wp_data_ = __webpack_require__(4);
  1036 __webpack_require__.d(actions_namespaceObject, "disablePublishSidebar", function() { return disablePublishSidebar; });
  2349 
  1037 __webpack_require__.d(actions_namespaceObject, "lockPostSaving", function() { return lockPostSaving; });
  2350 // EXTERNAL MODULE: external {"this":["wp","dataControls"]}
  1038 __webpack_require__.d(actions_namespaceObject, "unlockPostSaving", function() { return unlockPostSaving; });
  2351 var external_this_wp_dataControls_ = __webpack_require__(36);
  1039 __webpack_require__.d(actions_namespaceObject, "lockPostAutosaving", function() { return lockPostAutosaving; });
  2352 
  1040 __webpack_require__.d(actions_namespaceObject, "unlockPostAutosaving", function() { return unlockPostAutosaving; });
  2353 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  1041 __webpack_require__.d(actions_namespaceObject, "resetEditorBlocks", function() { return actions_resetEditorBlocks; });
  2354 var esm_typeof = __webpack_require__(40);
  1042 __webpack_require__.d(actions_namespaceObject, "updateEditorSettings", function() { return actions_updateEditorSettings; });
  2355 
  1043 __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return resetBlocks; });
  2356 // EXTERNAL MODULE: ./node_modules/redux-optimist/index.js
  1044 __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; });
  2357 var redux_optimist = __webpack_require__(134);
  1045 __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return updateBlock; });
  2358 var redux_optimist_default = /*#__PURE__*/__webpack_require__.n(redux_optimist);
  1046 __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return updateBlockAttributes; });
  2359 
  1047 __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return actions_selectBlock; });
  2360 // EXTERNAL MODULE: external {"this":"lodash"}
  1048 __webpack_require__.d(actions_namespaceObject, "startMultiSelect", function() { return startMultiSelect; });
  2361 var external_this_lodash_ = __webpack_require__(2);
  1049 __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return stopMultiSelect; });
       
  1050 __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return multiSelect; });
       
  1051 __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return actions_clearSelectedBlock; });
       
  1052 __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return toggleSelection; });
       
  1053 __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return replaceBlocks; });
       
  1054 __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; });
       
  1055 __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return moveBlocksDown; });
       
  1056 __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return moveBlocksUp; });
       
  1057 __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return moveBlockToPosition; });
       
  1058 __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return insertBlock; });
       
  1059 __webpack_require__.d(actions_namespaceObject, "insertBlocks", function() { return actions_insertBlocks; });
       
  1060 __webpack_require__.d(actions_namespaceObject, "showInsertionPoint", function() { return showInsertionPoint; });
       
  1061 __webpack_require__.d(actions_namespaceObject, "hideInsertionPoint", function() { return hideInsertionPoint; });
       
  1062 __webpack_require__.d(actions_namespaceObject, "setTemplateValidity", function() { return actions_setTemplateValidity; });
       
  1063 __webpack_require__.d(actions_namespaceObject, "synchronizeTemplate", function() { return actions_synchronizeTemplate; });
       
  1064 __webpack_require__.d(actions_namespaceObject, "mergeBlocks", function() { return mergeBlocks; });
       
  1065 __webpack_require__.d(actions_namespaceObject, "removeBlocks", function() { return removeBlocks; });
       
  1066 __webpack_require__.d(actions_namespaceObject, "removeBlock", function() { return removeBlock; });
       
  1067 __webpack_require__.d(actions_namespaceObject, "toggleBlockMode", function() { return toggleBlockMode; });
       
  1068 __webpack_require__.d(actions_namespaceObject, "startTyping", function() { return startTyping; });
       
  1069 __webpack_require__.d(actions_namespaceObject, "stopTyping", function() { return stopTyping; });
       
  1070 __webpack_require__.d(actions_namespaceObject, "enterFormattedText", function() { return enterFormattedText; });
       
  1071 __webpack_require__.d(actions_namespaceObject, "exitFormattedText", function() { return exitFormattedText; });
       
  1072 __webpack_require__.d(actions_namespaceObject, "insertDefaultBlock", function() { return actions_insertDefaultBlock; });
       
  1073 __webpack_require__.d(actions_namespaceObject, "updateBlockListSettings", function() { return updateBlockListSettings; });
       
  1074 
       
  1075 // EXTERNAL MODULE: external ["wp","blockEditor"]
       
  1076 var external_wp_blockEditor_ = __webpack_require__("axFQ");
       
  1077 
       
  1078 // EXTERNAL MODULE: external ["wp","coreData"]
       
  1079 var external_wp_coreData_ = __webpack_require__("jZUy");
       
  1080 
       
  1081 // EXTERNAL MODULE: external ["wp","richText"]
       
  1082 var external_wp_richText_ = __webpack_require__("qRz9");
       
  1083 
       
  1084 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
       
  1085 var esm_extends = __webpack_require__("wx14");
       
  1086 
       
  1087 // EXTERNAL MODULE: external ["wp","element"]
       
  1088 var external_wp_element_ = __webpack_require__("GRId");
       
  1089 
       
  1090 // EXTERNAL MODULE: external "lodash"
       
  1091 var external_lodash_ = __webpack_require__("YLtl");
       
  1092 
       
  1093 // EXTERNAL MODULE: external ["wp","blocks"]
       
  1094 var external_wp_blocks_ = __webpack_require__("HSyU");
       
  1095 
       
  1096 // EXTERNAL MODULE: external ["wp","data"]
       
  1097 var external_wp_data_ = __webpack_require__("1ZqX");
       
  1098 
       
  1099 // EXTERNAL MODULE: external ["wp","compose"]
       
  1100 var external_wp_compose_ = __webpack_require__("K9lf");
       
  1101 
       
  1102 // EXTERNAL MODULE: external ["wp","hooks"]
       
  1103 var external_wp_hooks_ = __webpack_require__("g56x");
       
  1104 
       
  1105 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/custom-sources-backwards-compatibility.js
       
  1106 
       
  1107 
       
  1108 
       
  1109 /**
       
  1110  * External dependencies
       
  1111  */
       
  1112 
       
  1113 /**
       
  1114  * WordPress dependencies
       
  1115  */
       
  1116 
       
  1117 
       
  1118 
       
  1119 
       
  1120 
       
  1121 
       
  1122 
       
  1123 /** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */
       
  1124 
       
  1125 /** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */
       
  1126 
       
  1127 /**
       
  1128  * Object whose keys are the names of block attributes, where each value
       
  1129  * represents the meta key to which the block attribute is intended to save.
       
  1130  *
       
  1131  * @see https://developer.wordpress.org/reference/functions/register_meta/
       
  1132  *
       
  1133  * @typedef {Object<string,string>} WPMetaAttributeMapping
       
  1134  */
       
  1135 
       
  1136 /**
       
  1137  * Given a mapping of attribute names (meta source attributes) to their
       
  1138  * associated meta key, returns a higher order component that overrides its
       
  1139  * `attributes` and `setAttributes` props to sync any changes with the edited
       
  1140  * post's meta keys.
       
  1141  *
       
  1142  * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.
       
  1143  *
       
  1144  * @return {WPHigherOrderComponent} Higher-order component.
       
  1145  */
       
  1146 
       
  1147 const createWithMetaAttributeSource = metaAttributes => Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => ({
       
  1148   attributes,
       
  1149   setAttributes,
       
  1150   ...props
       
  1151 }) => {
       
  1152   const postType = Object(external_wp_data_["useSelect"])(select => select('core/editor').getCurrentPostType(), []);
       
  1153   const [meta, setMeta] = Object(external_wp_coreData_["useEntityProp"])('postType', postType, 'meta');
       
  1154   const mergedAttributes = Object(external_wp_element_["useMemo"])(() => ({ ...attributes,
       
  1155     ...Object(external_lodash_["mapValues"])(metaAttributes, metaKey => meta[metaKey])
       
  1156   }), [attributes, meta]);
       
  1157   return Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
       
  1158     attributes: mergedAttributes,
       
  1159     setAttributes: nextAttributes => {
       
  1160       const nextMeta = Object(external_lodash_["mapKeys"])( // Filter to intersection of keys between the updated
       
  1161       // attributes and those with an associated meta key.
       
  1162       Object(external_lodash_["pickBy"])(nextAttributes, (value, key) => metaAttributes[key]), // Rename the keys to the expected meta key name.
       
  1163       (value, attributeKey) => metaAttributes[attributeKey]);
       
  1164 
       
  1165       if (!Object(external_lodash_["isEmpty"])(nextMeta)) {
       
  1166         setMeta(nextMeta);
       
  1167       }
       
  1168 
       
  1169       setAttributes(nextAttributes);
       
  1170     }
       
  1171   }, props));
       
  1172 }, 'withMetaAttributeSource');
       
  1173 /**
       
  1174  * Filters a registered block's settings to enhance a block's `edit` component
       
  1175  * to upgrade meta-sourced attributes to use the post's meta entity property.
       
  1176  *
       
  1177  * @param {WPBlockSettings} settings Registered block settings.
       
  1178  *
       
  1179  * @return {WPBlockSettings} Filtered block settings.
       
  1180  */
       
  1181 
       
  1182 
       
  1183 function shimAttributeSource(settings) {
       
  1184   /** @type {WPMetaAttributeMapping} */
       
  1185   const metaAttributes = Object(external_lodash_["mapValues"])(Object(external_lodash_["pickBy"])(settings.attributes, {
       
  1186     source: 'meta'
       
  1187   }), 'meta');
       
  1188 
       
  1189   if (!Object(external_lodash_["isEmpty"])(metaAttributes)) {
       
  1190     settings.edit = createWithMetaAttributeSource(metaAttributes)(settings.edit);
       
  1191   }
       
  1192 
       
  1193   return settings;
       
  1194 }
       
  1195 
       
  1196 Object(external_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
       
  1197 // added. There may already be blocks registered by this point, and those must
       
  1198 // be updated to apply the shim.
       
  1199 //
       
  1200 // The following implementation achieves this, albeit with a couple caveats:
       
  1201 // - Only blocks registered on the global store will be modified.
       
  1202 // - The block settings are directly mutated, since there is currently no
       
  1203 //   mechanism to update an existing block registration. This is the reason for
       
  1204 //   `getBlockType` separate from `getBlockTypes`, since the latter returns a
       
  1205 //   _copy_ of the block registration (i.e. the mutation would not affect the
       
  1206 //   actual registered block settings).
       
  1207 //
       
  1208 // `getBlockTypes` or `getBlockType` implementation could change in the future
       
  1209 // in regards to creating settings clones, but the corresponding end-to-end
       
  1210 // tests for meta blocks should cover against any potential regressions.
       
  1211 //
       
  1212 // In the future, we could support updating block settings, at which point this
       
  1213 // implementation could use that mechanism instead.
       
  1214 
       
  1215 Object(external_wp_data_["select"])(external_wp_blocks_["store"]).getBlockTypes().map(({
       
  1216   name
       
  1217 }) => Object(external_wp_data_["select"])(external_wp_blocks_["store"]).getBlockType(name)).forEach(shimAttributeSource);
       
  1218 
       
  1219 // EXTERNAL MODULE: external ["wp","apiFetch"]
       
  1220 var external_wp_apiFetch_ = __webpack_require__("ywyh");
       
  1221 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_);
       
  1222 
       
  1223 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js
       
  1224 
       
  1225 
       
  1226 /**
       
  1227  * WordPress dependencies
       
  1228  */
       
  1229 
       
  1230 /** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
       
  1231 
       
  1232 /**
       
  1233  * A user mentions completer.
       
  1234  *
       
  1235  * @type {WPCompleter}
       
  1236  */
       
  1237 
       
  1238 /* harmony default export */ var autocompleters_user = ({
       
  1239   name: 'users',
       
  1240   className: 'editor-autocompleters__user',
       
  1241   triggerPrefix: '@',
       
  1242 
       
  1243   options(search) {
       
  1244     let payload = '';
       
  1245 
       
  1246     if (search) {
       
  1247       payload = '?search=' + encodeURIComponent(search);
       
  1248     }
       
  1249 
       
  1250     return external_wp_apiFetch_default()({
       
  1251       path: '/wp/v2/users' + payload
       
  1252     });
       
  1253   },
       
  1254 
       
  1255   isDebounced: true,
       
  1256 
       
  1257   getOptionKeywords(user) {
       
  1258     return [user.slug, user.name];
       
  1259   },
       
  1260 
       
  1261   getOptionLabel(user) {
       
  1262     const avatar = user.avatar_urls && user.avatar_urls[24] ? Object(external_wp_element_["createElement"])("img", {
       
  1263       key: "avatar",
       
  1264       className: "editor-autocompleters__user-avatar",
       
  1265       alt: "",
       
  1266       src: user.avatar_urls[24]
       
  1267     }) : Object(external_wp_element_["createElement"])("span", {
       
  1268       className: "editor-autocompleters__no-avatar"
       
  1269     });
       
  1270     return [avatar, Object(external_wp_element_["createElement"])("span", {
       
  1271       key: "name",
       
  1272       className: "editor-autocompleters__user-name"
       
  1273     }, user.name), Object(external_wp_element_["createElement"])("span", {
       
  1274       key: "slug",
       
  1275       className: "editor-autocompleters__user-slug"
       
  1276     }, user.slug)];
       
  1277   },
       
  1278 
       
  1279   getOptionCompletion(user) {
       
  1280     return `@${user.slug}`;
       
  1281   }
       
  1282 
       
  1283 });
       
  1284 
       
  1285 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/default-autocompleters.js
       
  1286 /**
       
  1287  * External dependencies
       
  1288  */
       
  1289 
       
  1290 /**
       
  1291  * WordPress dependencies
       
  1292  */
       
  1293 
       
  1294 
       
  1295 /**
       
  1296  * Internal dependencies
       
  1297  */
       
  1298 
       
  1299 
       
  1300 
       
  1301 function setDefaultCompleters(completers = []) {
       
  1302   // Provide copies so filters may directly modify them.
       
  1303   completers.push(Object(external_lodash_["clone"])(autocompleters_user));
       
  1304   return completers;
       
  1305 }
       
  1306 
       
  1307 Object(external_wp_hooks_["addFilter"])('editor.Autocomplete.completers', 'editor/autocompleters/set-default-completers', setDefaultCompleters);
       
  1308 
       
  1309 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/index.js
       
  1310 /**
       
  1311  * Internal dependencies
       
  1312  */
       
  1313 
       
  1314 
       
  1315 
       
  1316 // EXTERNAL MODULE: external ["wp","dataControls"]
       
  1317 var external_wp_dataControls_ = __webpack_require__("51Zz");
  2362 
  1318 
  2363 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/defaults.js
  1319 // 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 /**
  1320 /**
  2371  * WordPress dependencies
  1321  * WordPress dependencies
  2372  */
  1322  */
  2373 
  1323 
  2374 var PREFERENCES_DEFAULTS = {
  1324 const PREFERENCES_DEFAULTS = {
  2375   insertUsage: {},
  1325   insertUsage: {},
  2376   // Should be kept for backward compatibility, see: https://github.com/WordPress/gutenberg/issues/14580.
  1326   // Should be kept for backward compatibility, see: https://github.com/WordPress/gutenberg/issues/14580.
  2377   isPublishSidebarEnabled: true
  1327   isPublishSidebarEnabled: true
  2378 };
  1328 };
  2379 /**
  1329 /**
  2386  *  autosaveInterval   number        Autosave Interval
  1336  *  autosaveInterval   number        Autosave Interval
  2387  *  availableTemplates array?        The available post templates
  1337  *  availableTemplates array?        The available post templates
  2388  *  disablePostFormats boolean       Whether or not the post formats are disabled
  1338  *  disablePostFormats boolean       Whether or not the post formats are disabled
  2389  *  allowedMimeTypes   array?        List of allowed mime types and file extensions
  1339  *  allowedMimeTypes   array?        List of allowed mime types and file extensions
  2390  *  maxUploadFileSize  number        Maximum upload file size
  1340  *  maxUploadFileSize  number        Maximum upload file size
  2391  */
  1341  *  supportsLayout     boolean      Whether the editor supports layouts.
  2392 
  1342  */
  2393 var EDITOR_SETTINGS_DEFAULTS = _objectSpread({}, external_this_wp_blockEditor_["SETTINGS_DEFAULTS"], {
  1343 
       
  1344 const EDITOR_SETTINGS_DEFAULTS = { ...external_wp_blockEditor_["SETTINGS_DEFAULTS"],
  2394   richEditingEnabled: true,
  1345   richEditingEnabled: true,
  2395   codeEditingEnabled: true,
  1346   codeEditingEnabled: true,
  2396   enableCustomFields: false
  1347   enableCustomFields: false,
  2397 });
  1348   supportsLayout: true
       
  1349 };
  2398 
  1350 
  2399 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/reducer.js
  1351 // 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 /**
  1352 /**
  2408  * External dependencies
  1353  * External dependencies
  2409  */
  1354  */
  2410 
       
  2411 
  1355 
  2412 /**
  1356 /**
  2413  * WordPress dependencies
  1357  * WordPress dependencies
  2414  */
  1358  */
  2415 
  1359 
  2427  *
  1371  *
  2428  * @return {*} Raw value.
  1372  * @return {*} Raw value.
  2429  */
  1373  */
  2430 
  1374 
  2431 function getPostRawValue(value) {
  1375 function getPostRawValue(value) {
  2432   if (value && 'object' === Object(esm_typeof["a" /* default */])(value) && 'raw' in value) {
  1376   if (value && 'object' === typeof value && 'raw' in value) {
  2433     return value.raw;
  1377     return value.raw;
  2434   }
  1378   }
  2435 
  1379 
  2436   return value;
  1380   return value;
  2437 }
  1381 }
  2444  *
  1388  *
  2445  * @return {boolean} Whether the two objects have the same keys.
  1389  * @return {boolean} Whether the two objects have the same keys.
  2446  */
  1390  */
  2447 
  1391 
  2448 function hasSameKeys(a, b) {
  1392 function hasSameKeys(a, b) {
  2449   return Object(external_this_lodash_["isEqual"])(Object(external_this_lodash_["keys"])(a), Object(external_this_lodash_["keys"])(b));
  1393   return Object(external_lodash_["isEqual"])(Object(external_lodash_["keys"])(a), Object(external_lodash_["keys"])(b));
  2450 }
  1394 }
  2451 /**
  1395 /**
  2452  * Returns true if, given the currently dispatching action and the previously
  1396  * Returns true if, given the currently dispatching action and the previously
  2453  * dispatched action, the two actions are editing the same post property, or
  1397  * dispatched action, the two actions are editing the same post property, or
  2454  * false otherwise.
  1398  * false otherwise.
  2482     return false;
  1426     return false;
  2483   }
  1427   }
  2484 
  1428 
  2485   return isUpdatingSamePostProperty(action, previousAction);
  1429   return isUpdatingSamePostProperty(action, previousAction);
  2486 }
  1430 }
  2487 function reducer_postId() {
  1431 function reducer_postId(state = null, action) {
  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) {
  1432   switch (action.type) {
  2492     case 'SETUP_EDITOR_STATE':
  1433     case 'SETUP_EDITOR_STATE':
  2493     case 'RESET_POST':
  1434     case 'RESET_POST':
  2494     case 'UPDATE_POST':
       
  2495       return action.post.id;
  1435       return action.post.id;
  2496   }
  1436   }
  2497 
  1437 
  2498   return state;
  1438   return state;
  2499 }
  1439 }
  2500 function reducer_postType() {
  1440 function reducer_postType(state = null, action) {
  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) {
  1441   switch (action.type) {
  2505     case 'SETUP_EDITOR_STATE':
  1442     case 'SETUP_EDITOR_STATE':
  2506     case 'RESET_POST':
  1443     case 'RESET_POST':
  2507     case 'UPDATE_POST':
       
  2508       return action.post.type;
  1444       return action.post.type;
  2509   }
  1445   }
  2510 
  1446 
  2511   return state;
  1447   return state;
  2512 }
  1448 }
  2517  * @param {Object} action Dispatched action.
  1453  * @param {Object} action Dispatched action.
  2518  *
  1454  *
  2519  * @return {boolean} Updated state.
  1455  * @return {boolean} Updated state.
  2520  */
  1456  */
  2521 
  1457 
  2522 function reducer_template() {
  1458 function reducer_template(state = {
  2523   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  1459   isValid: true
  2524     isValid: true
  1460 }, action) {
  2525   };
       
  2526   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2527 
       
  2528   switch (action.type) {
  1461   switch (action.type) {
  2529     case 'SET_TEMPLATE_VALIDITY':
  1462     case 'SET_TEMPLATE_VALIDITY':
  2530       return reducer_objectSpread({}, state, {
  1463       return { ...state,
  2531         isValid: action.isValid
  1464         isValid: action.isValid
  2532       });
  1465       };
  2533   }
  1466   }
  2534 
  1467 
  2535   return state;
  1468   return state;
  2536 }
  1469 }
  2537 /**
  1470 /**
  2541  * @param {Object}  action                Dispatched action.
  1474  * @param {Object}  action                Dispatched action.
  2542  *
  1475  *
  2543  * @return {string} Updated state.
  1476  * @return {string} Updated state.
  2544  */
  1477  */
  2545 
  1478 
  2546 function preferences() {
  1479 function preferences(state = PREFERENCES_DEFAULTS, action) {
  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) {
  1480   switch (action.type) {
  2551     case 'ENABLE_PUBLISH_SIDEBAR':
  1481     case 'ENABLE_PUBLISH_SIDEBAR':
  2552       return reducer_objectSpread({}, state, {
  1482       return { ...state,
  2553         isPublishSidebarEnabled: true
  1483         isPublishSidebarEnabled: true
  2554       });
  1484       };
  2555 
  1485 
  2556     case 'DISABLE_PUBLISH_SIDEBAR':
  1486     case 'DISABLE_PUBLISH_SIDEBAR':
  2557       return reducer_objectSpread({}, state, {
  1487       return { ...state,
  2558         isPublishSidebarEnabled: false
  1488         isPublishSidebarEnabled: false
  2559       });
  1489       };
  2560   }
  1490   }
  2561 
  1491 
  2562   return state;
  1492   return state;
  2563 }
  1493 }
  2564 /**
  1494 /**
  2569  * @param {Object} action Dispatched action.
  1499  * @param {Object} action Dispatched action.
  2570  *
  1500  *
  2571  * @return {Object} Updated state.
  1501  * @return {Object} Updated state.
  2572  */
  1502  */
  2573 
  1503 
  2574 function saving() {
  1504 function saving(state = {}, action) {
  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) {
  1505   switch (action.type) {
  2579     case 'REQUEST_POST_UPDATE_START':
  1506     case 'REQUEST_POST_UPDATE_START':
  2580     case 'REQUEST_POST_UPDATE_FINISH':
  1507     case 'REQUEST_POST_UPDATE_FINISH':
  2581       return {
  1508       return {
  2582         pending: action.type === 'REQUEST_POST_UPDATE_START',
  1509         pending: action.type === 'REQUEST_POST_UPDATE_START',
  2604  * @param {Object} action Dispatched action.
  1531  * @param {Object} action Dispatched action.
  2605  *
  1532  *
  2606  * @return {PostLockState} Updated state.
  1533  * @return {PostLockState} Updated state.
  2607  */
  1534  */
  2608 
  1535 
  2609 function postLock() {
  1536 function postLock(state = {
  2610   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  1537   isLocked: false
  2611     isLocked: false
  1538 }, action) {
  2612   };
       
  2613   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2614 
       
  2615   switch (action.type) {
  1539   switch (action.type) {
  2616     case 'UPDATE_POST_LOCK':
  1540     case 'UPDATE_POST_LOCK':
  2617       return action.lock;
  1541       return action.lock;
  2618   }
  1542   }
  2619 
  1543 
  2628  * @param {Object}        action Dispatched action.
  1552  * @param {Object}        action Dispatched action.
  2629  *
  1553  *
  2630  * @return {PostLockState} Updated state.
  1554  * @return {PostLockState} Updated state.
  2631  */
  1555  */
  2632 
  1556 
  2633 function postSavingLock() {
  1557 function postSavingLock(state = {}, action) {
  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) {
  1558   switch (action.type) {
  2638     case 'LOCK_POST_SAVING':
  1559     case 'LOCK_POST_SAVING':
  2639       return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
  1560       return { ...state,
       
  1561         [action.lockName]: true
       
  1562       };
  2640 
  1563 
  2641     case 'UNLOCK_POST_SAVING':
  1564     case 'UNLOCK_POST_SAVING':
  2642       return Object(external_this_lodash_["omit"])(state, action.lockName);
  1565       return Object(external_lodash_["omit"])(state, action.lockName);
  2643   }
  1566   }
  2644 
  1567 
  2645   return state;
  1568   return state;
  2646 }
  1569 }
  2647 /**
  1570 /**
  2653  * @param {Object}        action Dispatched action.
  1576  * @param {Object}        action Dispatched action.
  2654  *
  1577  *
  2655  * @return {PostLockState} Updated state.
  1578  * @return {PostLockState} Updated state.
  2656  */
  1579  */
  2657 
  1580 
  2658 function postAutosavingLock() {
  1581 function postAutosavingLock(state = {}, action) {
  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) {
  1582   switch (action.type) {
  2663     case 'LOCK_POST_AUTOSAVING':
  1583     case 'LOCK_POST_AUTOSAVING':
  2664       return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
  1584       return { ...state,
       
  1585         [action.lockName]: true
       
  1586       };
  2665 
  1587 
  2666     case 'UNLOCK_POST_AUTOSAVING':
  1588     case 'UNLOCK_POST_AUTOSAVING':
  2667       return Object(external_this_lodash_["omit"])(state, action.lockName);
  1589       return Object(external_lodash_["omit"])(state, action.lockName);
  2668   }
  1590   }
  2669 
  1591 
  2670   return state;
  1592   return state;
  2671 }
  1593 }
  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 /**
  1594 /**
  2760  * Reducer returning whether the editor is ready to be rendered.
  1595  * Reducer returning whether the editor is ready to be rendered.
  2761  * The editor is considered ready to be rendered once
  1596  * The editor is considered ready to be rendered once
  2762  * the post object is loaded properly and the initial blocks parsed.
  1597  * the post object is loaded properly and the initial blocks parsed.
  2763  *
  1598  *
  2765  * @param {Object} action
  1600  * @param {Object} action
  2766  *
  1601  *
  2767  * @return {boolean} Updated state.
  1602  * @return {boolean} Updated state.
  2768  */
  1603  */
  2769 
  1604 
  2770 function reducer_isReady() {
  1605 function reducer_isReady(state = false, action) {
  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) {
  1606   switch (action.type) {
  2775     case 'SETUP_EDITOR_STATE':
  1607     case 'SETUP_EDITOR_STATE':
  2776       return true;
  1608       return true;
  2777 
  1609 
  2778     case 'TEAR_DOWN_EDITOR':
  1610     case 'TEAR_DOWN_EDITOR':
  2788  * @param {Object} action Dispatched action.
  1620  * @param {Object} action Dispatched action.
  2789  *
  1621  *
  2790  * @return {Object} Updated state.
  1622  * @return {Object} Updated state.
  2791  */
  1623  */
  2792 
  1624 
  2793 function reducer_editorSettings() {
  1625 function reducer_editorSettings(state = EDITOR_SETTINGS_DEFAULTS, action) {
  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) {
  1626   switch (action.type) {
  2798     case 'UPDATE_EDITOR_SETTINGS':
  1627     case 'UPDATE_EDITOR_SETTINGS':
  2799       return reducer_objectSpread({}, state, {}, action.settings);
  1628       return { ...state,
       
  1629         ...action.settings
       
  1630       };
  2800   }
  1631   }
  2801 
  1632 
  2802   return state;
  1633   return state;
  2803 }
  1634 }
  2804 /* harmony default export */ var reducer = (redux_optimist_default()(Object(external_this_wp_data_["combineReducers"])({
  1635 /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({
  2805   postId: reducer_postId,
  1636   postId: reducer_postId,
  2806   postType: reducer_postType,
  1637   postType: reducer_postType,
  2807   preferences: preferences,
  1638   preferences,
  2808   saving: saving,
  1639   saving,
  2809   postLock: postLock,
  1640   postLock,
  2810   reusableBlocks: reducer_reusableBlocks,
       
  2811   template: reducer_template,
  1641   template: reducer_template,
  2812   postSavingLock: postSavingLock,
  1642   postSavingLock,
  2813   isReady: reducer_isReady,
  1643   isReady: reducer_isReady,
  2814   editorSettings: reducer_editorSettings,
  1644   editorSettings: reducer_editorSettings,
  2815   postAutosavingLock: postAutosavingLock
  1645   postAutosavingLock
  2816 })));
  1646 }));
  2817 
  1647 
  2818 // EXTERNAL MODULE: ./node_modules/refx/refx.js
  1648 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
  2819 var refx = __webpack_require__(110);
  1649 var rememo = __webpack_require__("pPDe");
  2820 var refx_default = /*#__PURE__*/__webpack_require__.n(refx);
  1650 
  2821 
  1651 // EXTERNAL MODULE: external ["wp","date"]
  2822 // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
  1652 var external_wp_date_ = __webpack_require__("FqII");
  2823 var external_this_regeneratorRuntime_ = __webpack_require__(24);
  1653 
  2824 var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
  1654 // EXTERNAL MODULE: external ["wp","url"]
  2825 
  1655 var external_wp_url_ = __webpack_require__("Mmq9");
  2826 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
  1656 
  2827 var asyncToGenerator = __webpack_require__(50);
  1657 // EXTERNAL MODULE: external ["wp","deprecated"]
  2828 
  1658 var external_wp_deprecated_ = __webpack_require__("NMb1");
  2829 // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
  1659 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
  2830 var external_this_wp_apiFetch_ = __webpack_require__(45);
  1660 
  2831 var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
  1661 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
  2832 
  1662 var layout = __webpack_require__("Civd");
  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 
  1663 
  2843 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/constants.js
  1664 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/constants.js
  2844 /**
  1665 /**
  2845  * Set of post properties for which edits should assume a merging behavior,
  1666  * Set of post properties for which edits should assume a merging behavior,
  2846  * assuming an object value.
  1667  * assuming an object value.
  2847  *
  1668  *
  2848  * @type {Set}
  1669  * @type {Set}
  2849  */
  1670  */
  2850 var EDIT_MERGE_PROPERTIES = new Set(['meta']);
  1671 const EDIT_MERGE_PROPERTIES = new Set(['meta']);
  2851 /**
  1672 /**
  2852  * Constant for the store module (or reducer) key.
  1673  * Constant for the store module (or reducer) key.
  2853  *
  1674  *
  2854  * @type {string}
  1675  * @type {string}
  2855  */
  1676  */
  2856 
  1677 
  2857 var STORE_KEY = 'core/editor';
  1678 const STORE_NAME = 'core/editor';
  2858 var POST_UPDATE_TRANSACTION_ID = 'post-update';
  1679 const SAVE_POST_NOTICE_ID = 'SAVE_POST_NOTICE_ID';
  2859 var SAVE_POST_NOTICE_ID = 'SAVE_POST_NOTICE_ID';
  1680 const TRASH_POST_NOTICE_ID = 'TRASH_POST_NOTICE_ID';
  2860 var TRASH_POST_NOTICE_ID = 'TRASH_POST_NOTICE_ID';
  1681 const PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;
  2861 var PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;
  1682 const ONE_MINUTE_IN_MS = 60 * 1000;
  2862 var ONE_MINUTE_IN_MS = 60 * 1000;
  1683 const AUTOSAVE_PROPERTIES = ['title', 'excerpt', 'content'];
  2863 var AUTOSAVE_PROPERTIES = ['title', 'excerpt', 'content'];
  1684 
       
  1685 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/url.js
       
  1686 /**
       
  1687  * External dependencies
       
  1688  */
       
  1689 
       
  1690 /**
       
  1691  * WordPress dependencies
       
  1692  */
       
  1693 
       
  1694 
       
  1695 /**
       
  1696  * Returns the URL of a WPAdmin Page.
       
  1697  *
       
  1698  * TODO: This should be moved to a module less specific to the editor.
       
  1699  *
       
  1700  * @param {string} page  Page to navigate to.
       
  1701  * @param {Object} query Query Args.
       
  1702  *
       
  1703  * @return {string} WPAdmin URL.
       
  1704  */
       
  1705 
       
  1706 function getWPAdminURL(page, query) {
       
  1707   return Object(external_wp_url_["addQueryArgs"])(page, query);
       
  1708 }
       
  1709 /**
       
  1710  * Performs some basic cleanup of a string for use as a post slug
       
  1711  *
       
  1712  * This replicates some of what sanitize_title() does in WordPress core, but
       
  1713  * is only designed to approximate what the slug will be.
       
  1714  *
       
  1715  * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.
       
  1716  * Removes combining diacritical marks. Converts whitespace, periods,
       
  1717  * and forward slashes to hyphens. Removes any remaining non-word characters
       
  1718  * except hyphens and underscores. Converts remaining string to lowercase.
       
  1719  * It does not account for octets, HTML entities, or other encoded characters.
       
  1720  *
       
  1721  * @param {string} string Title or slug to be processed
       
  1722  *
       
  1723  * @return {string} Processed string
       
  1724  */
       
  1725 
       
  1726 function cleanForSlug(string) {
       
  1727   if (!string) {
       
  1728     return '';
       
  1729   }
       
  1730 
       
  1731   return Object(external_lodash_["trim"])(Object(external_lodash_["deburr"])(string).replace(/[\s\./]+/g, '-').replace(/[^\p{L}\p{N}_-]+/gu, '').toLowerCase(), '-');
       
  1732 }
       
  1733 
       
  1734 // EXTERNAL MODULE: external ["wp","primitives"]
       
  1735 var external_wp_primitives_ = __webpack_require__("Tqx9");
       
  1736 
       
  1737 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/header.js
       
  1738 
       
  1739 
       
  1740 /**
       
  1741  * WordPress dependencies
       
  1742  */
       
  1743 
       
  1744 const header = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
  1745   xmlns: "http://www.w3.org/2000/svg",
       
  1746   viewBox: "0 0 24 24"
       
  1747 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
  1748   d: "M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
  1749 }));
       
  1750 /* harmony default export */ var library_header = (header);
       
  1751 
       
  1752 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/footer.js
       
  1753 
       
  1754 
       
  1755 /**
       
  1756  * WordPress dependencies
       
  1757  */
       
  1758 
       
  1759 const footer = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
  1760   xmlns: "http://www.w3.org/2000/svg",
       
  1761   viewBox: "0 0 24 24"
       
  1762 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
  1763   fillRule: "evenodd",
       
  1764   d: "M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
  1765 }));
       
  1766 /* harmony default export */ var library_footer = (footer);
       
  1767 
       
  1768 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sidebar.js
       
  1769 
       
  1770 
       
  1771 /**
       
  1772  * WordPress dependencies
       
  1773  */
       
  1774 
       
  1775 const sidebar = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
       
  1776   xmlns: "http://www.w3.org/2000/svg",
       
  1777   viewBox: "0 0 24 24"
       
  1778 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
       
  1779   d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
       
  1780 }));
       
  1781 /* harmony default export */ var library_sidebar = (sidebar);
       
  1782 
       
  1783 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/get-template-part-icon.js
       
  1784 /**
       
  1785  * WordPress dependencies
       
  1786  */
       
  1787 
       
  1788 /**
       
  1789  * Helper function to retrieve the corresponding icon by name.
       
  1790  *
       
  1791  * @param {string} iconName The name of the icon.
       
  1792  *
       
  1793  * @return {Object} The corresponding icon.
       
  1794  */
       
  1795 
       
  1796 function getTemplatePartIcon(iconName) {
       
  1797   if ('header' === iconName) {
       
  1798     return library_header;
       
  1799   } else if ('footer' === iconName) {
       
  1800     return library_footer;
       
  1801   } else if ('sidebar' === iconName) {
       
  1802     return library_sidebar;
       
  1803   }
       
  1804 
       
  1805   return layout["a" /* default */];
       
  1806 }
       
  1807 
       
  1808 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/selectors.js
       
  1809 /**
       
  1810  * External dependencies
       
  1811  */
       
  1812 
       
  1813 
       
  1814 /**
       
  1815  * WordPress dependencies
       
  1816  */
       
  1817 
       
  1818 
       
  1819 
       
  1820 
       
  1821 
       
  1822 
       
  1823 
       
  1824 
       
  1825 /**
       
  1826  * Internal dependencies
       
  1827  */
       
  1828 
       
  1829 
       
  1830 
       
  1831 
       
  1832 
       
  1833 
       
  1834 /**
       
  1835  * Shared reference to an empty object for cases where it is important to avoid
       
  1836  * returning a new object reference on every invocation, as in a connected or
       
  1837  * other pure component which performs `shouldComponentUpdate` check on props.
       
  1838  * This should be used as a last resort, since the normalized data should be
       
  1839  * maintained by the reducer result in state.
       
  1840  */
       
  1841 
       
  1842 const EMPTY_OBJECT = {};
       
  1843 /**
       
  1844  * Shared reference to an empty array for cases where it is important to avoid
       
  1845  * returning a new array reference on every invocation, as in a connected or
       
  1846  * other pure component which performs `shouldComponentUpdate` check on props.
       
  1847  * This should be used as a last resort, since the normalized data should be
       
  1848  * maintained by the reducer result in state.
       
  1849  */
       
  1850 
       
  1851 const EMPTY_ARRAY = [];
       
  1852 /**
       
  1853  * Returns true if any past editor history snapshots exist, or false otherwise.
       
  1854  *
       
  1855  * @param {Object} state Global application state.
       
  1856  *
       
  1857  * @return {boolean} Whether undo history exists.
       
  1858  */
       
  1859 
       
  1860 const hasEditorUndo = Object(external_wp_data_["createRegistrySelector"])(select => () => {
       
  1861   return select('core').hasUndo();
       
  1862 });
       
  1863 /**
       
  1864  * Returns true if any future editor history snapshots exist, or false
       
  1865  * otherwise.
       
  1866  *
       
  1867  * @param {Object} state Global application state.
       
  1868  *
       
  1869  * @return {boolean} Whether redo history exists.
       
  1870  */
       
  1871 
       
  1872 const hasEditorRedo = Object(external_wp_data_["createRegistrySelector"])(select => () => {
       
  1873   return select('core').hasRedo();
       
  1874 });
       
  1875 /**
       
  1876  * Returns true if the currently edited post is yet to be saved, or false if
       
  1877  * the post has been saved.
       
  1878  *
       
  1879  * @param {Object} state Global application state.
       
  1880  *
       
  1881  * @return {boolean} Whether the post is new.
       
  1882  */
       
  1883 
       
  1884 function selectors_isEditedPostNew(state) {
       
  1885   return selectors_getCurrentPost(state).status === 'auto-draft';
       
  1886 }
       
  1887 /**
       
  1888  * Returns true if content includes unsaved changes, or false otherwise.
       
  1889  *
       
  1890  * @param {Object} state Editor state.
       
  1891  *
       
  1892  * @return {boolean} Whether content includes unsaved changes.
       
  1893  */
       
  1894 
       
  1895 function hasChangedContent(state) {
       
  1896   const edits = selectors_getPostEdits(state);
       
  1897   return 'blocks' in edits || // `edits` is intended to contain only values which are different from
       
  1898   // the saved post, so the mere presence of a property is an indicator
       
  1899   // that the value is different than what is known to be saved. While
       
  1900   // content in Visual mode is represented by the blocks state, in Text
       
  1901   // mode it is tracked by `edits.content`.
       
  1902   'content' in edits;
       
  1903 }
       
  1904 /**
       
  1905  * Returns true if there are unsaved values for the current edit session, or
       
  1906  * false if the editing state matches the saved or new post.
       
  1907  *
       
  1908  * @param {Object} state Global application state.
       
  1909  *
       
  1910  * @return {boolean} Whether unsaved values exist.
       
  1911  */
       
  1912 
       
  1913 const selectors_isEditedPostDirty = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  1914   // Edits should contain only fields which differ from the saved post (reset
       
  1915   // at initial load and save complete). Thus, a non-empty edits state can be
       
  1916   // inferred to contain unsaved values.
       
  1917   const postType = selectors_getCurrentPostType(state);
       
  1918   const postId = selectors_getCurrentPostId(state);
       
  1919 
       
  1920   if (select('core').hasEditsForEntityRecord('postType', postType, postId)) {
       
  1921     return true;
       
  1922   }
       
  1923 
       
  1924   return false;
       
  1925 });
       
  1926 /**
       
  1927  * Returns true if there are unsaved edits for entities other than
       
  1928  * the editor's post, and false otherwise.
       
  1929  *
       
  1930  * @param {Object} state Global application state.
       
  1931  *
       
  1932  * @return {boolean} Whether there are edits or not.
       
  1933  */
       
  1934 
       
  1935 const selectors_hasNonPostEntityChanges = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  1936   const dirtyEntityRecords = select('core').__experimentalGetDirtyEntityRecords();
       
  1937 
       
  1938   const {
       
  1939     type,
       
  1940     id
       
  1941   } = selectors_getCurrentPost(state);
       
  1942   return Object(external_lodash_["some"])(dirtyEntityRecords, entityRecord => entityRecord.kind !== 'postType' || entityRecord.name !== type || entityRecord.key !== id);
       
  1943 });
       
  1944 /**
       
  1945  * Returns true if there are no unsaved values for the current edit session and
       
  1946  * if the currently edited post is new (has never been saved before).
       
  1947  *
       
  1948  * @param {Object} state Global application state.
       
  1949  *
       
  1950  * @return {boolean} Whether new post and unsaved values exist.
       
  1951  */
       
  1952 
       
  1953 function selectors_isCleanNewPost(state) {
       
  1954   return !selectors_isEditedPostDirty(state) && selectors_isEditedPostNew(state);
       
  1955 }
       
  1956 /**
       
  1957  * Returns the post currently being edited in its last known saved state, not
       
  1958  * including unsaved edits. Returns an object containing relevant default post
       
  1959  * values if the post has not yet been saved.
       
  1960  *
       
  1961  * @param {Object} state Global application state.
       
  1962  *
       
  1963  * @return {Object} Post object.
       
  1964  */
       
  1965 
       
  1966 const selectors_getCurrentPost = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  1967   const postId = selectors_getCurrentPostId(state);
       
  1968   const postType = selectors_getCurrentPostType(state);
       
  1969   const post = select('core').getRawEntityRecord('postType', postType, postId);
       
  1970 
       
  1971   if (post) {
       
  1972     return post;
       
  1973   } // This exists for compatibility with the previous selector behavior
       
  1974   // which would guarantee an object return based on the editor reducer's
       
  1975   // default empty object state.
       
  1976 
       
  1977 
       
  1978   return EMPTY_OBJECT;
       
  1979 });
       
  1980 /**
       
  1981  * Returns the post type of the post currently being edited.
       
  1982  *
       
  1983  * @param {Object} state Global application state.
       
  1984  *
       
  1985  * @return {string} Post type.
       
  1986  */
       
  1987 
       
  1988 function selectors_getCurrentPostType(state) {
       
  1989   return state.postType;
       
  1990 }
       
  1991 /**
       
  1992  * Returns the ID of the post currently being edited, or null if the post has
       
  1993  * not yet been saved.
       
  1994  *
       
  1995  * @param {Object} state Global application state.
       
  1996  *
       
  1997  * @return {?number} ID of current post.
       
  1998  */
       
  1999 
       
  2000 function selectors_getCurrentPostId(state) {
       
  2001   return state.postId;
       
  2002 }
       
  2003 /**
       
  2004  * Returns the number of revisions of the post currently being edited.
       
  2005  *
       
  2006  * @param {Object} state Global application state.
       
  2007  *
       
  2008  * @return {number} Number of revisions.
       
  2009  */
       
  2010 
       
  2011 function getCurrentPostRevisionsCount(state) {
       
  2012   return Object(external_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'version-history', 0, 'count'], 0);
       
  2013 }
       
  2014 /**
       
  2015  * Returns the last revision ID of the post currently being edited,
       
  2016  * or null if the post has no revisions.
       
  2017  *
       
  2018  * @param {Object} state Global application state.
       
  2019  *
       
  2020  * @return {?number} ID of the last revision.
       
  2021  */
       
  2022 
       
  2023 function getCurrentPostLastRevisionId(state) {
       
  2024   return Object(external_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'predecessor-version', 0, 'id'], null);
       
  2025 }
       
  2026 /**
       
  2027  * Returns any post values which have been changed in the editor but not yet
       
  2028  * been saved.
       
  2029  *
       
  2030  * @param {Object} state Global application state.
       
  2031  *
       
  2032  * @return {Object} Object of key value pairs comprising unsaved edits.
       
  2033  */
       
  2034 
       
  2035 const selectors_getPostEdits = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2036   const postType = selectors_getCurrentPostType(state);
       
  2037   const postId = selectors_getCurrentPostId(state);
       
  2038   return select('core').getEntityRecordEdits('postType', postType, postId) || EMPTY_OBJECT;
       
  2039 });
       
  2040 /**
       
  2041  * Returns a new reference when edited values have changed. This is useful in
       
  2042  * inferring where an edit has been made between states by comparison of the
       
  2043  * return values using strict equality.
       
  2044  *
       
  2045  * @deprecated since Gutenberg 6.5.0.
       
  2046  *
       
  2047  * @example
       
  2048  *
       
  2049  * ```
       
  2050  * const hasEditOccurred = (
       
  2051  *    getReferenceByDistinctEdits( beforeState ) !==
       
  2052  *    getReferenceByDistinctEdits( afterState )
       
  2053  * );
       
  2054  * ```
       
  2055  *
       
  2056  * @param {Object} state Editor state.
       
  2057  *
       
  2058  * @return {*} A value whose reference will change only when an edit occurs.
       
  2059  */
       
  2060 
       
  2061 const getReferenceByDistinctEdits = Object(external_wp_data_["createRegistrySelector"])(select => () =>
       
  2062 /* state */
       
  2063 {
       
  2064   external_wp_deprecated_default()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`", {
       
  2065     since: '5.4',
       
  2066     alternative: "`wp.data.select( 'core' ).getReferenceByDistinctEdits`"
       
  2067   });
       
  2068   return select('core').getReferenceByDistinctEdits();
       
  2069 });
       
  2070 /**
       
  2071  * Returns an attribute value of the saved post.
       
  2072  *
       
  2073  * @param {Object} state         Global application state.
       
  2074  * @param {string} attributeName Post attribute name.
       
  2075  *
       
  2076  * @return {*} Post attribute value.
       
  2077  */
       
  2078 
       
  2079 function selectors_getCurrentPostAttribute(state, attributeName) {
       
  2080   switch (attributeName) {
       
  2081     case 'type':
       
  2082       return selectors_getCurrentPostType(state);
       
  2083 
       
  2084     case 'id':
       
  2085       return selectors_getCurrentPostId(state);
       
  2086 
       
  2087     default:
       
  2088       const post = selectors_getCurrentPost(state);
       
  2089 
       
  2090       if (!post.hasOwnProperty(attributeName)) {
       
  2091         break;
       
  2092       }
       
  2093 
       
  2094       return getPostRawValue(post[attributeName]);
       
  2095   }
       
  2096 }
       
  2097 /**
       
  2098  * Returns a single attribute of the post being edited, preferring the unsaved
       
  2099  * edit if one exists, but merging with the attribute value for the last known
       
  2100  * saved state of the post (this is needed for some nested attributes like meta).
       
  2101  *
       
  2102  * @param {Object} state         Global application state.
       
  2103  * @param {string} attributeName Post attribute name.
       
  2104  *
       
  2105  * @return {*} Post attribute value.
       
  2106  */
       
  2107 
       
  2108 const getNestedEditedPostProperty = (state, attributeName) => {
       
  2109   const edits = selectors_getPostEdits(state);
       
  2110 
       
  2111   if (!edits.hasOwnProperty(attributeName)) {
       
  2112     return selectors_getCurrentPostAttribute(state, attributeName);
       
  2113   }
       
  2114 
       
  2115   return { ...selectors_getCurrentPostAttribute(state, attributeName),
       
  2116     ...edits[attributeName]
       
  2117   };
       
  2118 };
       
  2119 /**
       
  2120  * Returns a single attribute of the post being edited, preferring the unsaved
       
  2121  * edit if one exists, but falling back to the attribute for the last known
       
  2122  * saved state of the post.
       
  2123  *
       
  2124  * @param {Object} state         Global application state.
       
  2125  * @param {string} attributeName Post attribute name.
       
  2126  *
       
  2127  * @return {*} Post attribute value.
       
  2128  */
       
  2129 
       
  2130 
       
  2131 function selectors_getEditedPostAttribute(state, attributeName) {
       
  2132   // Special cases
       
  2133   switch (attributeName) {
       
  2134     case 'content':
       
  2135       return getEditedPostContent(state);
       
  2136   } // Fall back to saved post value if not edited.
       
  2137 
       
  2138 
       
  2139   const edits = selectors_getPostEdits(state);
       
  2140 
       
  2141   if (!edits.hasOwnProperty(attributeName)) {
       
  2142     return selectors_getCurrentPostAttribute(state, attributeName);
       
  2143   } // Merge properties are objects which contain only the patch edit in state,
       
  2144   // and thus must be merged with the current post attribute.
       
  2145 
       
  2146 
       
  2147   if (EDIT_MERGE_PROPERTIES.has(attributeName)) {
       
  2148     return getNestedEditedPostProperty(state, attributeName);
       
  2149   }
       
  2150 
       
  2151   return edits[attributeName];
       
  2152 }
       
  2153 /**
       
  2154  * Returns an attribute value of the current autosave revision for a post, or
       
  2155  * null if there is no autosave for the post.
       
  2156  *
       
  2157  * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
       
  2158  * 			   from the '@wordpress/core-data' package and access properties on the returned
       
  2159  * 			   autosave object using getPostRawValue.
       
  2160  *
       
  2161  * @param {Object} state         Global application state.
       
  2162  * @param {string} attributeName Autosave attribute name.
       
  2163  *
       
  2164  * @return {*} Autosave attribute value.
       
  2165  */
       
  2166 
       
  2167 const getAutosaveAttribute = Object(external_wp_data_["createRegistrySelector"])(select => (state, attributeName) => {
       
  2168   if (!Object(external_lodash_["includes"])(AUTOSAVE_PROPERTIES, attributeName) && attributeName !== 'preview_link') {
       
  2169     return;
       
  2170   }
       
  2171 
       
  2172   const postType = selectors_getCurrentPostType(state);
       
  2173   const postId = selectors_getCurrentPostId(state);
       
  2174   const currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']);
       
  2175   const autosave = select('core').getAutosave(postType, postId, currentUserId);
       
  2176 
       
  2177   if (autosave) {
       
  2178     return getPostRawValue(autosave[attributeName]);
       
  2179   }
       
  2180 });
       
  2181 /**
       
  2182  * Returns the current visibility of the post being edited, preferring the
       
  2183  * unsaved value if different than the saved post. The return value is one of
       
  2184  * "private", "password", or "public".
       
  2185  *
       
  2186  * @param {Object} state Global application state.
       
  2187  *
       
  2188  * @return {string} Post visibility.
       
  2189  */
       
  2190 
       
  2191 function selectors_getEditedPostVisibility(state) {
       
  2192   const status = selectors_getEditedPostAttribute(state, 'status');
       
  2193 
       
  2194   if (status === 'private') {
       
  2195     return 'private';
       
  2196   }
       
  2197 
       
  2198   const password = selectors_getEditedPostAttribute(state, 'password');
       
  2199 
       
  2200   if (password) {
       
  2201     return 'password';
       
  2202   }
       
  2203 
       
  2204   return 'public';
       
  2205 }
       
  2206 /**
       
  2207  * Returns true if post is pending review.
       
  2208  *
       
  2209  * @param {Object} state Global application state.
       
  2210  *
       
  2211  * @return {boolean} Whether current post is pending review.
       
  2212  */
       
  2213 
       
  2214 function isCurrentPostPending(state) {
       
  2215   return selectors_getCurrentPost(state).status === 'pending';
       
  2216 }
       
  2217 /**
       
  2218  * Return true if the current post has already been published.
       
  2219  *
       
  2220  * @param {Object}  state       Global application state.
       
  2221  * @param {Object?} currentPost Explicit current post for bypassing registry selector.
       
  2222  *
       
  2223  * @return {boolean} Whether the post has been published.
       
  2224  */
       
  2225 
       
  2226 function selectors_isCurrentPostPublished(state, currentPost) {
       
  2227   const post = currentPost || selectors_getCurrentPost(state);
       
  2228   return ['publish', 'private'].indexOf(post.status) !== -1 || post.status === 'future' && !Object(external_wp_date_["isInTheFuture"])(new Date(Number(Object(external_wp_date_["getDate"])(post.date)) - ONE_MINUTE_IN_MS));
       
  2229 }
       
  2230 /**
       
  2231  * Returns true if post is already scheduled.
       
  2232  *
       
  2233  * @param {Object} state Global application state.
       
  2234  *
       
  2235  * @return {boolean} Whether current post is scheduled to be posted.
       
  2236  */
       
  2237 
       
  2238 function selectors_isCurrentPostScheduled(state) {
       
  2239   return selectors_getCurrentPost(state).status === 'future' && !selectors_isCurrentPostPublished(state);
       
  2240 }
       
  2241 /**
       
  2242  * Return true if the post being edited can be published.
       
  2243  *
       
  2244  * @param {Object} state Global application state.
       
  2245  *
       
  2246  * @return {boolean} Whether the post can been published.
       
  2247  */
       
  2248 
       
  2249 function selectors_isEditedPostPublishable(state) {
       
  2250   const post = selectors_getCurrentPost(state); // TODO: Post being publishable should be superset of condition of post
       
  2251   // being saveable. Currently this restriction is imposed at UI.
       
  2252   //
       
  2253   //  See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`)
       
  2254 
       
  2255   return selectors_isEditedPostDirty(state) || ['publish', 'private', 'future'].indexOf(post.status) === -1;
       
  2256 }
       
  2257 /**
       
  2258  * Returns true if the post can be saved, or false otherwise. A post must
       
  2259  * contain a title, an excerpt, or non-empty content to be valid for save.
       
  2260  *
       
  2261  * @param {Object} state Global application state.
       
  2262  *
       
  2263  * @return {boolean} Whether the post can be saved.
       
  2264  */
       
  2265 
       
  2266 function selectors_isEditedPostSaveable(state) {
       
  2267   if (selectors_isSavingPost(state)) {
       
  2268     return false;
       
  2269   } // TODO: Post should not be saveable if not dirty. Cannot be added here at
       
  2270   // this time since posts where meta boxes are present can be saved even if
       
  2271   // the post is not dirty. Currently this restriction is imposed at UI, but
       
  2272   // should be moved here.
       
  2273   //
       
  2274   //  See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)
       
  2275   //  See: <PostSavedState /> (`forceIsDirty` prop)
       
  2276   //  See: <PostPublishButton /> (`forceIsDirty` prop)
       
  2277   //  See: https://github.com/WordPress/gutenberg/pull/4184
       
  2278 
       
  2279 
       
  2280   return !!selectors_getEditedPostAttribute(state, 'title') || !!selectors_getEditedPostAttribute(state, 'excerpt') || !isEditedPostEmpty(state) || external_wp_element_["Platform"].OS === 'native';
       
  2281 }
       
  2282 /**
       
  2283  * Returns true if the edited post has content. A post has content if it has at
       
  2284  * least one saveable block or otherwise has a non-empty content property
       
  2285  * assigned.
       
  2286  *
       
  2287  * @param {Object} state Global application state.
       
  2288  *
       
  2289  * @return {boolean} Whether post has content.
       
  2290  */
       
  2291 
       
  2292 function isEditedPostEmpty(state) {
       
  2293   // While the condition of truthy content string is sufficient to determine
       
  2294   // emptiness, testing saveable blocks length is a trivial operation. Since
       
  2295   // this function can be called frequently, optimize for the fast case as a
       
  2296   // condition of the mere existence of blocks. Note that the value of edited
       
  2297   // content takes precedent over block content, and must fall through to the
       
  2298   // default logic.
       
  2299   const blocks = getEditorBlocks(state);
       
  2300 
       
  2301   if (blocks.length) {
       
  2302     // Pierce the abstraction of the serializer in knowing that blocks are
       
  2303     // joined with with newlines such that even if every individual block
       
  2304     // produces an empty save result, the serialized content is non-empty.
       
  2305     if (blocks.length > 1) {
       
  2306       return false;
       
  2307     } // There are two conditions under which the optimization cannot be
       
  2308     // assumed, and a fallthrough to getEditedPostContent must occur:
       
  2309     //
       
  2310     // 1. getBlocksForSerialization has special treatment in omitting a
       
  2311     //    single unmodified default block.
       
  2312     // 2. Comment delimiters are omitted for a freeform or unregistered
       
  2313     //    block in its serialization. The freeform block specifically may
       
  2314     //    produce an empty string in its saved output.
       
  2315     //
       
  2316     // For all other content, the single block is assumed to make a post
       
  2317     // non-empty, if only by virtue of its own comment delimiters.
       
  2318 
       
  2319 
       
  2320     const blockName = blocks[0].name;
       
  2321 
       
  2322     if (blockName !== Object(external_wp_blocks_["getDefaultBlockName"])() && blockName !== Object(external_wp_blocks_["getFreeformContentHandlerName"])()) {
       
  2323       return false;
       
  2324     }
       
  2325   }
       
  2326 
       
  2327   return !getEditedPostContent(state);
       
  2328 }
       
  2329 /**
       
  2330  * Returns true if the post can be autosaved, or false otherwise.
       
  2331  *
       
  2332  * @param {Object} state    Global application state.
       
  2333  * @param {Object} autosave A raw autosave object from the REST API.
       
  2334  *
       
  2335  * @return {boolean} Whether the post can be autosaved.
       
  2336  */
       
  2337 
       
  2338 const selectors_isEditedPostAutosaveable = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2339   // A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.
       
  2340   if (!selectors_isEditedPostSaveable(state)) {
       
  2341     return false;
       
  2342   } // A post is not autosavable when there is a post autosave lock.
       
  2343 
       
  2344 
       
  2345   if (isPostAutosavingLocked(state)) {
       
  2346     return false;
       
  2347   }
       
  2348 
       
  2349   const postType = selectors_getCurrentPostType(state);
       
  2350   const postId = selectors_getCurrentPostId(state);
       
  2351   const hasFetchedAutosave = select('core').hasFetchedAutosaves(postType, postId);
       
  2352   const currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']); // Disable reason - this line causes the side-effect of fetching the autosave
       
  2353   // via a resolver, moving below the return would result in the autosave never
       
  2354   // being fetched.
       
  2355   // eslint-disable-next-line @wordpress/no-unused-vars-before-return
       
  2356 
       
  2357   const autosave = select('core').getAutosave(postType, postId, currentUserId); // If any existing autosaves have not yet been fetched, this function is
       
  2358   // unable to determine if the post is autosaveable, so return false.
       
  2359 
       
  2360   if (!hasFetchedAutosave) {
       
  2361     return false;
       
  2362   } // If we don't already have an autosave, the post is autosaveable.
       
  2363 
       
  2364 
       
  2365   if (!autosave) {
       
  2366     return true;
       
  2367   } // To avoid an expensive content serialization, use the content dirtiness
       
  2368   // flag in place of content field comparison against the known autosave.
       
  2369   // This is not strictly accurate, and relies on a tolerance toward autosave
       
  2370   // request failures for unnecessary saves.
       
  2371 
       
  2372 
       
  2373   if (hasChangedContent(state)) {
       
  2374     return true;
       
  2375   } // If the title or excerpt has changed, the post is autosaveable.
       
  2376 
       
  2377 
       
  2378   return ['title', 'excerpt'].some(field => getPostRawValue(autosave[field]) !== selectors_getEditedPostAttribute(state, field));
       
  2379 });
       
  2380 /**
       
  2381  * Returns the current autosave, or null if one is not set (i.e. if the post
       
  2382  * has yet to be autosaved, or has been saved or published since the last
       
  2383  * autosave).
       
  2384  *
       
  2385  * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )`
       
  2386  * 			   selector from the '@wordpress/core-data' package.
       
  2387  *
       
  2388  * @param {Object} state Editor state.
       
  2389  *
       
  2390  * @return {?Object} Current autosave, if exists.
       
  2391  */
       
  2392 
       
  2393 const getAutosave = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2394   external_wp_deprecated_default()("`wp.data.select( 'core/editor' ).getAutosave()`", {
       
  2395     since: '5.3',
       
  2396     alternative: "`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`"
       
  2397   });
       
  2398   const postType = selectors_getCurrentPostType(state);
       
  2399   const postId = selectors_getCurrentPostId(state);
       
  2400   const currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']);
       
  2401   const autosave = select('core').getAutosave(postType, postId, currentUserId);
       
  2402   return Object(external_lodash_["mapValues"])(Object(external_lodash_["pick"])(autosave, AUTOSAVE_PROPERTIES), getPostRawValue);
       
  2403 });
       
  2404 /**
       
  2405  * Returns the true if there is an existing autosave, otherwise false.
       
  2406  *
       
  2407  * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
       
  2408  *             from the '@wordpress/core-data' package and check for a truthy value.
       
  2409  *
       
  2410  * @param {Object} state Global application state.
       
  2411  *
       
  2412  * @return {boolean} Whether there is an existing autosave.
       
  2413  */
       
  2414 
       
  2415 const hasAutosave = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2416   external_wp_deprecated_default()("`wp.data.select( 'core/editor' ).hasAutosave()`", {
       
  2417     since: '5.3',
       
  2418     alternative: "`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`"
       
  2419   });
       
  2420   const postType = selectors_getCurrentPostType(state);
       
  2421   const postId = selectors_getCurrentPostId(state);
       
  2422   const currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']);
       
  2423   return !!select('core').getAutosave(postType, postId, currentUserId);
       
  2424 });
       
  2425 /**
       
  2426  * Return true if the post being edited is being scheduled. Preferring the
       
  2427  * unsaved status values.
       
  2428  *
       
  2429  * @param {Object} state Global application state.
       
  2430  *
       
  2431  * @return {boolean} Whether the post has been published.
       
  2432  */
       
  2433 
       
  2434 function selectors_isEditedPostBeingScheduled(state) {
       
  2435   const date = selectors_getEditedPostAttribute(state, 'date'); // Offset the date by one minute (network latency)
       
  2436 
       
  2437   const checkedDate = new Date(Number(Object(external_wp_date_["getDate"])(date)) - ONE_MINUTE_IN_MS);
       
  2438   return Object(external_wp_date_["isInTheFuture"])(checkedDate);
       
  2439 }
       
  2440 /**
       
  2441  * Returns whether the current post should be considered to have a "floating"
       
  2442  * date (i.e. that it would publish "Immediately" rather than at a set time).
       
  2443  *
       
  2444  * Unlike in the PHP backend, the REST API returns a full date string for posts
       
  2445  * where the 0000-00-00T00:00:00 placeholder is present in the database. To
       
  2446  * infer that a post is set to publish "Immediately" we check whether the date
       
  2447  * and modified date are the same.
       
  2448  *
       
  2449  * @param {Object} state Editor state.
       
  2450  *
       
  2451  * @return {boolean} Whether the edited post has a floating date value.
       
  2452  */
       
  2453 
       
  2454 function isEditedPostDateFloating(state) {
       
  2455   const date = selectors_getEditedPostAttribute(state, 'date');
       
  2456   const modified = selectors_getEditedPostAttribute(state, 'modified'); // This should be the status of the persisted post
       
  2457   // It shouldn't use the "edited" status otherwise it breaks the
       
  2458   // infered post data floating status
       
  2459   // See https://github.com/WordPress/gutenberg/issues/28083
       
  2460 
       
  2461   const status = selectors_getCurrentPost(state).status;
       
  2462 
       
  2463   if (status === 'draft' || status === 'auto-draft' || status === 'pending') {
       
  2464     return date === modified || date === null;
       
  2465   }
       
  2466 
       
  2467   return false;
       
  2468 }
       
  2469 /**
       
  2470  * Returns true if the post is currently being saved, or false otherwise.
       
  2471  *
       
  2472  * @param {Object} state Global application state.
       
  2473  *
       
  2474  * @return {boolean} Whether post is being saved.
       
  2475  */
       
  2476 
       
  2477 const selectors_isSavingPost = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2478   const postType = selectors_getCurrentPostType(state);
       
  2479   const postId = selectors_getCurrentPostId(state);
       
  2480   return select('core').isSavingEntityRecord('postType', postType, postId);
       
  2481 });
       
  2482 /**
       
  2483  * Returns true if a previous post save was attempted successfully, or false
       
  2484  * otherwise.
       
  2485  *
       
  2486  * @param {Object} state Global application state.
       
  2487  *
       
  2488  * @return {boolean} Whether the post was saved successfully.
       
  2489  */
       
  2490 
       
  2491 const didPostSaveRequestSucceed = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2492   const postType = selectors_getCurrentPostType(state);
       
  2493   const postId = selectors_getCurrentPostId(state);
       
  2494   return !select('core').getLastEntitySaveError('postType', postType, postId);
       
  2495 });
       
  2496 /**
       
  2497  * Returns true if a previous post save was attempted but failed, or false
       
  2498  * otherwise.
       
  2499  *
       
  2500  * @param {Object} state Global application state.
       
  2501  *
       
  2502  * @return {boolean} Whether the post save failed.
       
  2503  */
       
  2504 
       
  2505 const didPostSaveRequestFail = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2506   const postType = selectors_getCurrentPostType(state);
       
  2507   const postId = selectors_getCurrentPostId(state);
       
  2508   return !!select('core').getLastEntitySaveError('postType', postType, postId);
       
  2509 });
       
  2510 /**
       
  2511  * Returns true if the post is autosaving, or false otherwise.
       
  2512  *
       
  2513  * @param {Object} state Global application state.
       
  2514  *
       
  2515  * @return {boolean} Whether the post is autosaving.
       
  2516  */
       
  2517 
       
  2518 function selectors_isAutosavingPost(state) {
       
  2519   if (!selectors_isSavingPost(state)) {
       
  2520     return false;
       
  2521   }
       
  2522 
       
  2523   return !!Object(external_lodash_["get"])(state.saving, ['options', 'isAutosave']);
       
  2524 }
       
  2525 /**
       
  2526  * Returns true if the post is being previewed, or false otherwise.
       
  2527  *
       
  2528  * @param {Object} state Global application state.
       
  2529  *
       
  2530  * @return {boolean} Whether the post is being previewed.
       
  2531  */
       
  2532 
       
  2533 function isPreviewingPost(state) {
       
  2534   if (!selectors_isSavingPost(state)) {
       
  2535     return false;
       
  2536   }
       
  2537 
       
  2538   return !!state.saving.options.isPreview;
       
  2539 }
       
  2540 /**
       
  2541  * Returns the post preview link
       
  2542  *
       
  2543  * @param {Object} state Global application state.
       
  2544  *
       
  2545  * @return {string?} Preview Link.
       
  2546  */
       
  2547 
       
  2548 function selectors_getEditedPostPreviewLink(state) {
       
  2549   if (state.saving.pending || selectors_isSavingPost(state)) {
       
  2550     return;
       
  2551   }
       
  2552 
       
  2553   let previewLink = getAutosaveAttribute(state, 'preview_link');
       
  2554 
       
  2555   if (!previewLink) {
       
  2556     previewLink = selectors_getEditedPostAttribute(state, 'link');
       
  2557 
       
  2558     if (previewLink) {
       
  2559       previewLink = Object(external_wp_url_["addQueryArgs"])(previewLink, {
       
  2560         preview: true
       
  2561       });
       
  2562     }
       
  2563   }
       
  2564 
       
  2565   const featuredImageId = selectors_getEditedPostAttribute(state, 'featured_media');
       
  2566 
       
  2567   if (previewLink && featuredImageId) {
       
  2568     return Object(external_wp_url_["addQueryArgs"])(previewLink, {
       
  2569       _thumbnail_id: featuredImageId
       
  2570     });
       
  2571   }
       
  2572 
       
  2573   return previewLink;
       
  2574 }
       
  2575 /**
       
  2576  * Returns a suggested post format for the current post, inferred only if there
       
  2577  * is a single block within the post and it is of a type known to match a
       
  2578  * default post format. Returns null if the format cannot be determined.
       
  2579  *
       
  2580  * @param {Object} state Global application state.
       
  2581  *
       
  2582  * @return {?string} Suggested post format.
       
  2583  */
       
  2584 
       
  2585 function selectors_getSuggestedPostFormat(state) {
       
  2586   const blocks = getEditorBlocks(state);
       
  2587   if (blocks.length > 2) return null;
       
  2588   let name; // If there is only one block in the content of the post grab its name
       
  2589   // so we can derive a suitable post format from it.
       
  2590 
       
  2591   if (blocks.length === 1) {
       
  2592     name = blocks[0].name; // check for core/embed `video` and `audio` eligible suggestions
       
  2593 
       
  2594     if (name === 'core/embed') {
       
  2595       var _blocks$0$attributes;
       
  2596 
       
  2597       const provider = (_blocks$0$attributes = blocks[0].attributes) === null || _blocks$0$attributes === void 0 ? void 0 : _blocks$0$attributes.providerNameSlug;
       
  2598 
       
  2599       if (['youtube', 'vimeo'].includes(provider)) {
       
  2600         name = 'core/video';
       
  2601       } else if (['spotify', 'soundcloud'].includes(provider)) {
       
  2602         name = 'core/audio';
       
  2603       }
       
  2604     }
       
  2605   } // If there are two blocks in the content and the last one is a text blocks
       
  2606   // grab the name of the first one to also suggest a post format from it.
       
  2607 
       
  2608 
       
  2609   if (blocks.length === 2 && blocks[1].name === 'core/paragraph') {
       
  2610     name = blocks[0].name;
       
  2611   } // We only convert to default post formats in core.
       
  2612 
       
  2613 
       
  2614   switch (name) {
       
  2615     case 'core/image':
       
  2616       return 'image';
       
  2617 
       
  2618     case 'core/quote':
       
  2619     case 'core/pullquote':
       
  2620       return 'quote';
       
  2621 
       
  2622     case 'core/gallery':
       
  2623       return 'gallery';
       
  2624 
       
  2625     case 'core/video':
       
  2626       return 'video';
       
  2627 
       
  2628     case 'core/audio':
       
  2629       return 'audio';
       
  2630 
       
  2631     default:
       
  2632       return null;
       
  2633   }
       
  2634 }
       
  2635 /**
       
  2636  * Returns a set of blocks which are to be used in consideration of the post's
       
  2637  * generated save content.
       
  2638  *
       
  2639  * @deprecated since Gutenberg 6.2.0.
       
  2640  *
       
  2641  * @param {Object} state Editor state.
       
  2642  *
       
  2643  * @return {WPBlock[]} Filtered set of blocks for save.
       
  2644  */
       
  2645 
       
  2646 function getBlocksForSerialization(state) {
       
  2647   external_wp_deprecated_default()('`core/editor` getBlocksForSerialization selector', {
       
  2648     since: '5.3',
       
  2649     alternative: 'getEditorBlocks',
       
  2650     hint: 'Blocks serialization pre-processing occurs at save time'
       
  2651   });
       
  2652   const blocks = state.editor.present.blocks.value; // WARNING: Any changes to the logic of this function should be verified
       
  2653   // against the implementation of isEditedPostEmpty, which bypasses this
       
  2654   // function for performance' sake, in an assumption of this current logic
       
  2655   // being irrelevant to the optimized condition of emptiness.
       
  2656   // A single unmodified default block is assumed to be equivalent to an
       
  2657   // empty post.
       
  2658 
       
  2659   const isSingleUnmodifiedDefaultBlock = blocks.length === 1 && Object(external_wp_blocks_["isUnmodifiedDefaultBlock"])(blocks[0]);
       
  2660 
       
  2661   if (isSingleUnmodifiedDefaultBlock) {
       
  2662     return [];
       
  2663   }
       
  2664 
       
  2665   return blocks;
       
  2666 }
       
  2667 /**
       
  2668  * Returns the content of the post being edited.
       
  2669  *
       
  2670  * @param {Object} state Global application state.
       
  2671  *
       
  2672  * @return {string} Post content.
       
  2673  */
       
  2674 
       
  2675 const getEditedPostContent = Object(external_wp_data_["createRegistrySelector"])(select => state => {
       
  2676   const postId = selectors_getCurrentPostId(state);
       
  2677   const postType = selectors_getCurrentPostType(state);
       
  2678   const record = select('core').getEditedEntityRecord('postType', postType, postId);
       
  2679 
       
  2680   if (record) {
       
  2681     if (typeof record.content === 'function') {
       
  2682       return record.content(record);
       
  2683     } else if (record.blocks) {
       
  2684       return Object(external_wp_blocks_["__unstableSerializeAndClean"])(record.blocks);
       
  2685     } else if (record.content) {
       
  2686       return record.content;
       
  2687     }
       
  2688   }
       
  2689 
       
  2690   return '';
       
  2691 });
       
  2692 /**
       
  2693  * Returns true if the post is being published, or false otherwise.
       
  2694  *
       
  2695  * @param {Object} state Global application state.
       
  2696  *
       
  2697  * @return {boolean} Whether post is being published.
       
  2698  */
       
  2699 
       
  2700 function selectors_isPublishingPost(state) {
       
  2701   return selectors_isSavingPost(state) && !selectors_isCurrentPostPublished(state) && selectors_getEditedPostAttribute(state, 'status') === 'publish';
       
  2702 }
       
  2703 /**
       
  2704  * Returns whether the permalink is editable or not.
       
  2705  *
       
  2706  * @param {Object} state Editor state.
       
  2707  *
       
  2708  * @return {boolean} Whether or not the permalink is editable.
       
  2709  */
       
  2710 
       
  2711 function isPermalinkEditable(state) {
       
  2712   const permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
       
  2713   return PERMALINK_POSTNAME_REGEX.test(permalinkTemplate);
       
  2714 }
       
  2715 /**
       
  2716  * Returns the permalink for the post.
       
  2717  *
       
  2718  * @param {Object} state Editor state.
       
  2719  *
       
  2720  * @return {?string} The permalink, or null if the post is not viewable.
       
  2721  */
       
  2722 
       
  2723 function getPermalink(state) {
       
  2724   const permalinkParts = getPermalinkParts(state);
       
  2725 
       
  2726   if (!permalinkParts) {
       
  2727     return null;
       
  2728   }
       
  2729 
       
  2730   const {
       
  2731     prefix,
       
  2732     postName,
       
  2733     suffix
       
  2734   } = permalinkParts;
       
  2735 
       
  2736   if (isPermalinkEditable(state)) {
       
  2737     return prefix + postName + suffix;
       
  2738   }
       
  2739 
       
  2740   return prefix;
       
  2741 }
       
  2742 /**
       
  2743  * Returns the slug for the post being edited, preferring a manually edited
       
  2744  * value if one exists, then a sanitized version of the current post title, and
       
  2745  * finally the post ID.
       
  2746  *
       
  2747  * @param {Object} state Editor state.
       
  2748  *
       
  2749  * @return {string} The current slug to be displayed in the editor
       
  2750  */
       
  2751 
       
  2752 function getEditedPostSlug(state) {
       
  2753   return selectors_getEditedPostAttribute(state, 'slug') || cleanForSlug(selectors_getEditedPostAttribute(state, 'title')) || selectors_getCurrentPostId(state);
       
  2754 }
       
  2755 /**
       
  2756  * Returns the permalink for a post, split into it's three parts: the prefix,
       
  2757  * the postName, and the suffix.
       
  2758  *
       
  2759  * @param {Object} state Editor state.
       
  2760  *
       
  2761  * @return {Object} An object containing the prefix, postName, and suffix for
       
  2762  *                  the permalink, or null if the post is not viewable.
       
  2763  */
       
  2764 
       
  2765 function getPermalinkParts(state) {
       
  2766   const permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
       
  2767 
       
  2768   if (!permalinkTemplate) {
       
  2769     return null;
       
  2770   }
       
  2771 
       
  2772   const postName = selectors_getEditedPostAttribute(state, 'slug') || selectors_getEditedPostAttribute(state, 'generated_slug');
       
  2773   const [prefix, suffix] = permalinkTemplate.split(PERMALINK_POSTNAME_REGEX);
       
  2774   return {
       
  2775     prefix,
       
  2776     postName,
       
  2777     suffix
       
  2778   };
       
  2779 }
       
  2780 /**
       
  2781  * Returns whether the post is locked.
       
  2782  *
       
  2783  * @param {Object} state Global application state.
       
  2784  *
       
  2785  * @return {boolean} Is locked.
       
  2786  */
       
  2787 
       
  2788 function selectors_isPostLocked(state) {
       
  2789   return state.postLock.isLocked;
       
  2790 }
       
  2791 /**
       
  2792  * Returns whether post saving is locked.
       
  2793  *
       
  2794  * @param {Object} state Global application state.
       
  2795  *
       
  2796  * @return {boolean} Is locked.
       
  2797  */
       
  2798 
       
  2799 function selectors_isPostSavingLocked(state) {
       
  2800   return Object.keys(state.postSavingLock).length > 0;
       
  2801 }
       
  2802 /**
       
  2803  * Returns whether post autosaving is locked.
       
  2804  *
       
  2805  * @param {Object} state Global application state.
       
  2806  *
       
  2807  * @return {boolean} Is locked.
       
  2808  */
       
  2809 
       
  2810 function isPostAutosavingLocked(state) {
       
  2811   return Object.keys(state.postAutosavingLock).length > 0;
       
  2812 }
       
  2813 /**
       
  2814  * Returns whether the edition of the post has been taken over.
       
  2815  *
       
  2816  * @param {Object} state Global application state.
       
  2817  *
       
  2818  * @return {boolean} Is post lock takeover.
       
  2819  */
       
  2820 
       
  2821 function isPostLockTakeover(state) {
       
  2822   return state.postLock.isTakeover;
       
  2823 }
       
  2824 /**
       
  2825  * Returns details about the post lock user.
       
  2826  *
       
  2827  * @param {Object} state Global application state.
       
  2828  *
       
  2829  * @return {Object} A user object.
       
  2830  */
       
  2831 
       
  2832 function getPostLockUser(state) {
       
  2833   return state.postLock.user;
       
  2834 }
       
  2835 /**
       
  2836  * Returns the active post lock.
       
  2837  *
       
  2838  * @param {Object} state Global application state.
       
  2839  *
       
  2840  * @return {Object} The lock object.
       
  2841  */
       
  2842 
       
  2843 function getActivePostLock(state) {
       
  2844   return state.postLock.activePostLock;
       
  2845 }
       
  2846 /**
       
  2847  * Returns whether or not the user has the unfiltered_html capability.
       
  2848  *
       
  2849  * @param {Object} state Editor state.
       
  2850  *
       
  2851  * @return {boolean} Whether the user can or can't post unfiltered HTML.
       
  2852  */
       
  2853 
       
  2854 function selectors_canUserUseUnfilteredHTML(state) {
       
  2855   return Object(external_lodash_["has"])(selectors_getCurrentPost(state), ['_links', 'wp:action-unfiltered-html']);
       
  2856 }
       
  2857 /**
       
  2858  * Returns whether the pre-publish panel should be shown
       
  2859  * or skipped when the user clicks the "publish" button.
       
  2860  *
       
  2861  * @param {Object} state Global application state.
       
  2862  *
       
  2863  * @return {boolean} Whether the pre-publish panel should be shown or not.
       
  2864  */
       
  2865 
       
  2866 function selectors_isPublishSidebarEnabled(state) {
       
  2867   if (state.preferences.hasOwnProperty('isPublishSidebarEnabled')) {
       
  2868     return state.preferences.isPublishSidebarEnabled;
       
  2869   }
       
  2870 
       
  2871   return PREFERENCES_DEFAULTS.isPublishSidebarEnabled;
       
  2872 }
       
  2873 /**
       
  2874  * Return the current block list.
       
  2875  *
       
  2876  * @param {Object} state
       
  2877  * @return {Array} Block list.
       
  2878  */
       
  2879 
       
  2880 function getEditorBlocks(state) {
       
  2881   return selectors_getEditedPostAttribute(state, 'blocks') || EMPTY_ARRAY;
       
  2882 }
       
  2883 /**
       
  2884  * A block selection object.
       
  2885  *
       
  2886  * @typedef {Object} WPBlockSelection
       
  2887  *
       
  2888  * @property {string} clientId     A block client ID.
       
  2889  * @property {string} attributeKey A block attribute key.
       
  2890  * @property {number} offset       An attribute value offset, based on the rich
       
  2891  *                                 text value. See `wp.richText.create`.
       
  2892  */
       
  2893 
       
  2894 /**
       
  2895  * Returns the current selection start.
       
  2896  *
       
  2897  * @param {Object} state
       
  2898  * @return {WPBlockSelection} The selection start.
       
  2899  *
       
  2900  * @deprecated since Gutenberg 10.0.0.
       
  2901  */
       
  2902 
       
  2903 function getEditorSelectionStart(state) {
       
  2904   var _getEditedPostAttribu;
       
  2905 
       
  2906   external_wp_deprecated_default()("select('core/editor').getEditorSelectionStart", {
       
  2907     since: '10.0',
       
  2908     plugin: 'Gutenberg',
       
  2909     alternative: "select('core/editor').getEditorSelection"
       
  2910   });
       
  2911   return (_getEditedPostAttribu = selectors_getEditedPostAttribute(state, 'selection')) === null || _getEditedPostAttribu === void 0 ? void 0 : _getEditedPostAttribu.selectionStart;
       
  2912 }
       
  2913 /**
       
  2914  * Returns the current selection end.
       
  2915  *
       
  2916  * @param {Object} state
       
  2917  * @return {WPBlockSelection} The selection end.
       
  2918  *
       
  2919  * @deprecated since Gutenberg 10.0.0.
       
  2920  */
       
  2921 
       
  2922 function getEditorSelectionEnd(state) {
       
  2923   var _getEditedPostAttribu2;
       
  2924 
       
  2925   external_wp_deprecated_default()("select('core/editor').getEditorSelectionStart", {
       
  2926     since: '10.0',
       
  2927     plugin: 'Gutenberg',
       
  2928     alternative: "select('core/editor').getEditorSelection"
       
  2929   });
       
  2930   return (_getEditedPostAttribu2 = selectors_getEditedPostAttribute(state, 'selection')) === null || _getEditedPostAttribu2 === void 0 ? void 0 : _getEditedPostAttribu2.selectionEnd;
       
  2931 }
       
  2932 /**
       
  2933  * Returns the current selection.
       
  2934  *
       
  2935  * @param {Object} state
       
  2936  * @return {WPBlockSelection} The selection end.
       
  2937  */
       
  2938 
       
  2939 function selectors_getEditorSelection(state) {
       
  2940   return selectors_getEditedPostAttribute(state, 'selection');
       
  2941 }
       
  2942 /**
       
  2943  * Is the editor ready
       
  2944  *
       
  2945  * @param {Object} state
       
  2946  * @return {boolean} is Ready.
       
  2947  */
       
  2948 
       
  2949 function selectors_unstableIsEditorReady(state) {
       
  2950   return state.isReady;
       
  2951 }
       
  2952 /**
       
  2953  * Returns the post editor settings.
       
  2954  *
       
  2955  * @param {Object} state Editor state.
       
  2956  *
       
  2957  * @return {Object} The editor settings object.
       
  2958  */
       
  2959 
       
  2960 function selectors_getEditorSettings(state) {
       
  2961   return state.editorSettings;
       
  2962 }
       
  2963 /*
       
  2964  * Backward compatibility
       
  2965  */
       
  2966 
       
  2967 /**
       
  2968  * Returns state object prior to a specified optimist transaction ID, or `null`
       
  2969  * if the transaction corresponding to the given ID cannot be found.
       
  2970  *
       
  2971  * @deprecated since Gutenberg 9.7.0.
       
  2972  */
       
  2973 
       
  2974 function getStateBeforeOptimisticTransaction() {
       
  2975   external_wp_deprecated_default()("select('core/editor').getStateBeforeOptimisticTransaction", {
       
  2976     since: '5.7',
       
  2977     hint: 'No state history is kept on this store anymore'
       
  2978   });
       
  2979   return null;
       
  2980 }
       
  2981 /**
       
  2982  * Returns true if an optimistic transaction is pending commit, for which the
       
  2983  * before state satisfies the given predicate function.
       
  2984  *
       
  2985  * @deprecated since Gutenberg 9.7.0.
       
  2986  */
       
  2987 
       
  2988 function inSomeHistory() {
       
  2989   external_wp_deprecated_default()("select('core/editor').inSomeHistory", {
       
  2990     since: '5.7',
       
  2991     hint: 'No state history is kept on this store anymore'
       
  2992   });
       
  2993   return false;
       
  2994 }
       
  2995 
       
  2996 function getBlockEditorSelector(name) {
       
  2997   return Object(external_wp_data_["createRegistrySelector"])(select => (state, ...args) => {
       
  2998     external_wp_deprecated_default()("`wp.data.select( 'core/editor' )." + name + '`', {
       
  2999       since: '5.3',
       
  3000       alternative: "`wp.data.select( 'core/block-editor' )." + name + '`'
       
  3001     });
       
  3002     return select('core/block-editor')[name](...args);
       
  3003   });
       
  3004 }
       
  3005 /**
       
  3006  * @see getBlockName in core/block-editor store.
       
  3007  */
       
  3008 
       
  3009 
       
  3010 const getBlockName = getBlockEditorSelector('getBlockName');
       
  3011 /**
       
  3012  * @see isBlockValid in core/block-editor store.
       
  3013  */
       
  3014 
       
  3015 const isBlockValid = getBlockEditorSelector('isBlockValid');
       
  3016 /**
       
  3017  * @see getBlockAttributes in core/block-editor store.
       
  3018  */
       
  3019 
       
  3020 const getBlockAttributes = getBlockEditorSelector('getBlockAttributes');
       
  3021 /**
       
  3022  * @see getBlock in core/block-editor store.
       
  3023  */
       
  3024 
       
  3025 const getBlock = getBlockEditorSelector('getBlock');
       
  3026 /**
       
  3027  * @see getBlocks in core/block-editor store.
       
  3028  */
       
  3029 
       
  3030 const selectors_getBlocks = getBlockEditorSelector('getBlocks');
       
  3031 /**
       
  3032  * @see __unstableGetBlockWithoutInnerBlocks in core/block-editor store.
       
  3033  */
       
  3034 
       
  3035 const __unstableGetBlockWithoutInnerBlocks = getBlockEditorSelector('__unstableGetBlockWithoutInnerBlocks');
       
  3036 /**
       
  3037  * @see getClientIdsOfDescendants in core/block-editor store.
       
  3038  */
       
  3039 
       
  3040 const getClientIdsOfDescendants = getBlockEditorSelector('getClientIdsOfDescendants');
       
  3041 /**
       
  3042  * @see getClientIdsWithDescendants in core/block-editor store.
       
  3043  */
       
  3044 
       
  3045 const getClientIdsWithDescendants = getBlockEditorSelector('getClientIdsWithDescendants');
       
  3046 /**
       
  3047  * @see getGlobalBlockCount in core/block-editor store.
       
  3048  */
       
  3049 
       
  3050 const selectors_getGlobalBlockCount = getBlockEditorSelector('getGlobalBlockCount');
       
  3051 /**
       
  3052  * @see getBlocksByClientId in core/block-editor store.
       
  3053  */
       
  3054 
       
  3055 const getBlocksByClientId = getBlockEditorSelector('getBlocksByClientId');
       
  3056 /**
       
  3057  * @see getBlockCount in core/block-editor store.
       
  3058  */
       
  3059 
       
  3060 const getBlockCount = getBlockEditorSelector('getBlockCount');
       
  3061 /**
       
  3062  * @see getBlockSelectionStart in core/block-editor store.
       
  3063  */
       
  3064 
       
  3065 const getBlockSelectionStart = getBlockEditorSelector('getBlockSelectionStart');
       
  3066 /**
       
  3067  * @see getBlockSelectionEnd in core/block-editor store.
       
  3068  */
       
  3069 
       
  3070 const getBlockSelectionEnd = getBlockEditorSelector('getBlockSelectionEnd');
       
  3071 /**
       
  3072  * @see getSelectedBlockCount in core/block-editor store.
       
  3073  */
       
  3074 
       
  3075 const getSelectedBlockCount = getBlockEditorSelector('getSelectedBlockCount');
       
  3076 /**
       
  3077  * @see hasSelectedBlock in core/block-editor store.
       
  3078  */
       
  3079 
       
  3080 const hasSelectedBlock = getBlockEditorSelector('hasSelectedBlock');
       
  3081 /**
       
  3082  * @see getSelectedBlockClientId in core/block-editor store.
       
  3083  */
       
  3084 
       
  3085 const getSelectedBlockClientId = getBlockEditorSelector('getSelectedBlockClientId');
       
  3086 /**
       
  3087  * @see getSelectedBlock in core/block-editor store.
       
  3088  */
       
  3089 
       
  3090 const getSelectedBlock = getBlockEditorSelector('getSelectedBlock');
       
  3091 /**
       
  3092  * @see getBlockRootClientId in core/block-editor store.
       
  3093  */
       
  3094 
       
  3095 const getBlockRootClientId = getBlockEditorSelector('getBlockRootClientId');
       
  3096 /**
       
  3097  * @see getBlockHierarchyRootClientId in core/block-editor store.
       
  3098  */
       
  3099 
       
  3100 const getBlockHierarchyRootClientId = getBlockEditorSelector('getBlockHierarchyRootClientId');
       
  3101 /**
       
  3102  * @see getAdjacentBlockClientId in core/block-editor store.
       
  3103  */
       
  3104 
       
  3105 const getAdjacentBlockClientId = getBlockEditorSelector('getAdjacentBlockClientId');
       
  3106 /**
       
  3107  * @see getPreviousBlockClientId in core/block-editor store.
       
  3108  */
       
  3109 
       
  3110 const getPreviousBlockClientId = getBlockEditorSelector('getPreviousBlockClientId');
       
  3111 /**
       
  3112  * @see getNextBlockClientId in core/block-editor store.
       
  3113  */
       
  3114 
       
  3115 const getNextBlockClientId = getBlockEditorSelector('getNextBlockClientId');
       
  3116 /**
       
  3117  * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.
       
  3118  */
       
  3119 
       
  3120 const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector('getSelectedBlocksInitialCaretPosition');
       
  3121 /**
       
  3122  * @see getMultiSelectedBlockClientIds in core/block-editor store.
       
  3123  */
       
  3124 
       
  3125 const getMultiSelectedBlockClientIds = getBlockEditorSelector('getMultiSelectedBlockClientIds');
       
  3126 /**
       
  3127  * @see getMultiSelectedBlocks in core/block-editor store.
       
  3128  */
       
  3129 
       
  3130 const getMultiSelectedBlocks = getBlockEditorSelector('getMultiSelectedBlocks');
       
  3131 /**
       
  3132  * @see getFirstMultiSelectedBlockClientId in core/block-editor store.
       
  3133  */
       
  3134 
       
  3135 const getFirstMultiSelectedBlockClientId = getBlockEditorSelector('getFirstMultiSelectedBlockClientId');
       
  3136 /**
       
  3137  * @see getLastMultiSelectedBlockClientId in core/block-editor store.
       
  3138  */
       
  3139 
       
  3140 const getLastMultiSelectedBlockClientId = getBlockEditorSelector('getLastMultiSelectedBlockClientId');
       
  3141 /**
       
  3142  * @see isFirstMultiSelectedBlock in core/block-editor store.
       
  3143  */
       
  3144 
       
  3145 const isFirstMultiSelectedBlock = getBlockEditorSelector('isFirstMultiSelectedBlock');
       
  3146 /**
       
  3147  * @see isBlockMultiSelected in core/block-editor store.
       
  3148  */
       
  3149 
       
  3150 const isBlockMultiSelected = getBlockEditorSelector('isBlockMultiSelected');
       
  3151 /**
       
  3152  * @see isAncestorMultiSelected in core/block-editor store.
       
  3153  */
       
  3154 
       
  3155 const isAncestorMultiSelected = getBlockEditorSelector('isAncestorMultiSelected');
       
  3156 /**
       
  3157  * @see getMultiSelectedBlocksStartClientId in core/block-editor store.
       
  3158  */
       
  3159 
       
  3160 const getMultiSelectedBlocksStartClientId = getBlockEditorSelector('getMultiSelectedBlocksStartClientId');
       
  3161 /**
       
  3162  * @see getMultiSelectedBlocksEndClientId in core/block-editor store.
       
  3163  */
       
  3164 
       
  3165 const getMultiSelectedBlocksEndClientId = getBlockEditorSelector('getMultiSelectedBlocksEndClientId');
       
  3166 /**
       
  3167  * @see getBlockOrder in core/block-editor store.
       
  3168  */
       
  3169 
       
  3170 const getBlockOrder = getBlockEditorSelector('getBlockOrder');
       
  3171 /**
       
  3172  * @see getBlockIndex in core/block-editor store.
       
  3173  */
       
  3174 
       
  3175 const getBlockIndex = getBlockEditorSelector('getBlockIndex');
       
  3176 /**
       
  3177  * @see isBlockSelected in core/block-editor store.
       
  3178  */
       
  3179 
       
  3180 const isBlockSelected = getBlockEditorSelector('isBlockSelected');
       
  3181 /**
       
  3182  * @see hasSelectedInnerBlock in core/block-editor store.
       
  3183  */
       
  3184 
       
  3185 const hasSelectedInnerBlock = getBlockEditorSelector('hasSelectedInnerBlock');
       
  3186 /**
       
  3187  * @see isBlockWithinSelection in core/block-editor store.
       
  3188  */
       
  3189 
       
  3190 const isBlockWithinSelection = getBlockEditorSelector('isBlockWithinSelection');
       
  3191 /**
       
  3192  * @see hasMultiSelection in core/block-editor store.
       
  3193  */
       
  3194 
       
  3195 const hasMultiSelection = getBlockEditorSelector('hasMultiSelection');
       
  3196 /**
       
  3197  * @see isMultiSelecting in core/block-editor store.
       
  3198  */
       
  3199 
       
  3200 const isMultiSelecting = getBlockEditorSelector('isMultiSelecting');
       
  3201 /**
       
  3202  * @see isSelectionEnabled in core/block-editor store.
       
  3203  */
       
  3204 
       
  3205 const isSelectionEnabled = getBlockEditorSelector('isSelectionEnabled');
       
  3206 /**
       
  3207  * @see getBlockMode in core/block-editor store.
       
  3208  */
       
  3209 
       
  3210 const getBlockMode = getBlockEditorSelector('getBlockMode');
       
  3211 /**
       
  3212  * @see isTyping in core/block-editor store.
       
  3213  */
       
  3214 
       
  3215 const isTyping = getBlockEditorSelector('isTyping');
       
  3216 /**
       
  3217  * @see isCaretWithinFormattedText in core/block-editor store.
       
  3218  */
       
  3219 
       
  3220 const isCaretWithinFormattedText = getBlockEditorSelector('isCaretWithinFormattedText');
       
  3221 /**
       
  3222  * @see getBlockInsertionPoint in core/block-editor store.
       
  3223  */
       
  3224 
       
  3225 const getBlockInsertionPoint = getBlockEditorSelector('getBlockInsertionPoint');
       
  3226 /**
       
  3227  * @see isBlockInsertionPointVisible in core/block-editor store.
       
  3228  */
       
  3229 
       
  3230 const isBlockInsertionPointVisible = getBlockEditorSelector('isBlockInsertionPointVisible');
       
  3231 /**
       
  3232  * @see isValidTemplate in core/block-editor store.
       
  3233  */
       
  3234 
       
  3235 const isValidTemplate = getBlockEditorSelector('isValidTemplate');
       
  3236 /**
       
  3237  * @see getTemplate in core/block-editor store.
       
  3238  */
       
  3239 
       
  3240 const getTemplate = getBlockEditorSelector('getTemplate');
       
  3241 /**
       
  3242  * @see getTemplateLock in core/block-editor store.
       
  3243  */
       
  3244 
       
  3245 const getTemplateLock = getBlockEditorSelector('getTemplateLock');
       
  3246 /**
       
  3247  * @see canInsertBlockType in core/block-editor store.
       
  3248  */
       
  3249 
       
  3250 const canInsertBlockType = getBlockEditorSelector('canInsertBlockType');
       
  3251 /**
       
  3252  * @see getInserterItems in core/block-editor store.
       
  3253  */
       
  3254 
       
  3255 const getInserterItems = getBlockEditorSelector('getInserterItems');
       
  3256 /**
       
  3257  * @see hasInserterItems in core/block-editor store.
       
  3258  */
       
  3259 
       
  3260 const hasInserterItems = getBlockEditorSelector('hasInserterItems');
       
  3261 /**
       
  3262  * @see getBlockListSettings in core/block-editor store.
       
  3263  */
       
  3264 
       
  3265 const getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
       
  3266 /**
       
  3267  * Returns the default template types.
       
  3268  *
       
  3269  * @param {Object} state Global application state.
       
  3270  *
       
  3271  * @return {Object} The template types.
       
  3272  */
       
  3273 
       
  3274 function __experimentalGetDefaultTemplateTypes(state) {
       
  3275   var _getEditorSettings;
       
  3276 
       
  3277   return (_getEditorSettings = selectors_getEditorSettings(state)) === null || _getEditorSettings === void 0 ? void 0 : _getEditorSettings.defaultTemplateTypes;
       
  3278 }
       
  3279 /**
       
  3280  * Returns the default template part areas.
       
  3281  *
       
  3282  * @param {Object} state Global application state.
       
  3283  *
       
  3284  * @return {Array} The template part areas.
       
  3285  */
       
  3286 
       
  3287 const __experimentalGetDefaultTemplatePartAreas = Object(rememo["a" /* default */])(state => {
       
  3288   var _getEditorSettings2;
       
  3289 
       
  3290   const areas = ((_getEditorSettings2 = selectors_getEditorSettings(state)) === null || _getEditorSettings2 === void 0 ? void 0 : _getEditorSettings2.defaultTemplatePartAreas) || [];
       
  3291   return areas === null || areas === void 0 ? void 0 : areas.map(item => {
       
  3292     return { ...item,
       
  3293       icon: getTemplatePartIcon(item.icon)
       
  3294     };
       
  3295   });
       
  3296 }, state => {
       
  3297   var _getEditorSettings3;
       
  3298 
       
  3299   return [(_getEditorSettings3 = selectors_getEditorSettings(state)) === null || _getEditorSettings3 === void 0 ? void 0 : _getEditorSettings3.defaultTemplatePartAreas];
       
  3300 });
       
  3301 /**
       
  3302  * Returns a default template type searched by slug.
       
  3303  *
       
  3304  * @param {Object} state Global application state.
       
  3305  * @param {string} slug The template type slug.
       
  3306  *
       
  3307  * @return {Object} The template type.
       
  3308  */
       
  3309 
       
  3310 const __experimentalGetDefaultTemplateType = Object(rememo["a" /* default */])((state, slug) => Object(external_lodash_["find"])(__experimentalGetDefaultTemplateTypes(state), {
       
  3311   slug
       
  3312 }) || {}, (state, slug) => [__experimentalGetDefaultTemplateTypes(state), slug]);
       
  3313 /**
       
  3314  * Given a template entity, return information about it which is ready to be
       
  3315  * rendered, such as the title, description, and icon.
       
  3316  *
       
  3317  * @param {Object} state Global application state.
       
  3318  * @param {Object} template The template for which we need information.
       
  3319  * @return {Object} Information about the template, including title, description, and icon.
       
  3320  */
       
  3321 
       
  3322 function __experimentalGetTemplateInfo(state, template) {
       
  3323   var _experimentalGetDefa;
       
  3324 
       
  3325   if (!template) {
       
  3326     return {};
       
  3327   }
       
  3328 
       
  3329   const {
       
  3330     excerpt,
       
  3331     slug,
       
  3332     title,
       
  3333     area
       
  3334   } = template;
       
  3335 
       
  3336   const {
       
  3337     title: defaultTitle,
       
  3338     description: defaultDescription
       
  3339   } = __experimentalGetDefaultTemplateType(state, slug);
       
  3340 
       
  3341   const templateTitle = Object(external_lodash_["isString"])(title) ? title : title === null || title === void 0 ? void 0 : title.rendered;
       
  3342   const templateDescription = Object(external_lodash_["isString"])(excerpt) ? excerpt : excerpt === null || excerpt === void 0 ? void 0 : excerpt.raw;
       
  3343   const templateIcon = ((_experimentalGetDefa = __experimentalGetDefaultTemplatePartAreas(state).find(item => area === item.area)) === null || _experimentalGetDefa === void 0 ? void 0 : _experimentalGetDefa.icon) || layout["a" /* default */];
       
  3344   return {
       
  3345     title: templateTitle && templateTitle !== slug ? templateTitle : defaultTitle || slug,
       
  3346     description: templateDescription || defaultDescription,
       
  3347     icon: templateIcon
       
  3348   };
       
  3349 }
       
  3350 
       
  3351 // EXTERNAL MODULE: external ["wp","notices"]
       
  3352 var external_wp_notices_ = __webpack_require__("onLe");
       
  3353 
       
  3354 // EXTERNAL MODULE: external ["wp","i18n"]
       
  3355 var external_wp_i18n_ = __webpack_require__("l3Sj");
  2864 
  3356 
  2865 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/notice-builder.js
  3357 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/notice-builder.js
  2866 /**
  3358 /**
  2867  * WordPress dependencies
  3359  * WordPress dependencies
  2868  */
  3360  */
  2885  * @return {Array} Arguments for dispatch. An empty array signals no
  3377  * @return {Array} Arguments for dispatch. An empty array signals no
  2886  *                 notification should be sent.
  3378  *                 notification should be sent.
  2887  */
  3379  */
  2888 
  3380 
  2889 function getNotificationArgumentsForSaveSuccess(data) {
  3381 function getNotificationArgumentsForSaveSuccess(data) {
  2890   var previousPost = data.previousPost,
  3382   const {
  2891       post = data.post,
  3383     previousPost,
  2892       postType = data.postType; // Autosaves are neither shown a notice nor redirected.
  3384     post,
  2893 
  3385     postType
  2894   if (Object(external_this_lodash_["get"])(data.options, ['isAutosave'])) {
  3386   } = data; // Autosaves are neither shown a notice nor redirected.
       
  3387 
       
  3388   if (Object(external_lodash_["get"])(data.options, ['isAutosave'])) {
  2895     return [];
  3389     return [];
  2896   }
  3390   }
  2897 
  3391 
  2898   var publishStatus = ['publish', 'private', 'future'];
  3392   const publishStatus = ['publish', 'private', 'future'];
  2899   var isPublished = Object(external_this_lodash_["includes"])(publishStatus, previousPost.status);
  3393   const isPublished = Object(external_lodash_["includes"])(publishStatus, previousPost.status);
  2900   var willPublish = Object(external_this_lodash_["includes"])(publishStatus, post.status);
  3394   const willPublish = Object(external_lodash_["includes"])(publishStatus, post.status);
  2901   var noticeMessage;
  3395   let noticeMessage;
  2902   var shouldShowLink = Object(external_this_lodash_["get"])(postType, ['viewable'], false);
  3396   let shouldShowLink = Object(external_lodash_["get"])(postType, ['viewable'], false);
  2903 
  3397 
  2904   if (!isPublished && !willPublish) {
  3398   if (!isPublished && !willPublish) {
  2905     // If saving a non-published post, don't show notice.
  3399     // If saving a non-published post, don't show notice.
  2906     noticeMessage = null;
  3400     noticeMessage = null;
  2907   } else if (isPublished && !willPublish) {
  3401   } else if (isPublished && !willPublish) {
  2920     // Generic fallback notice
  3414     // Generic fallback notice
  2921     noticeMessage = postType.labels.item_updated;
  3415     noticeMessage = postType.labels.item_updated;
  2922   }
  3416   }
  2923 
  3417 
  2924   if (noticeMessage) {
  3418   if (noticeMessage) {
  2925     var actions = [];
  3419     const actions = [];
  2926 
  3420 
  2927     if (shouldShowLink) {
  3421     if (shouldShowLink) {
  2928       actions.push({
  3422       actions.push({
  2929         label: postType.labels.view_item,
  3423         label: postType.labels.view_item,
  2930         url: post.link
  3424         url: post.link
  2932     }
  3426     }
  2933 
  3427 
  2934     return [noticeMessage, {
  3428     return [noticeMessage, {
  2935       id: SAVE_POST_NOTICE_ID,
  3429       id: SAVE_POST_NOTICE_ID,
  2936       type: 'snackbar',
  3430       type: 'snackbar',
  2937       actions: actions
  3431       actions
  2938     }];
  3432     }];
  2939   }
  3433   }
  2940 
  3434 
  2941   return [];
  3435   return [];
  2942 }
  3436 }
  2948  * @return {Array} Arguments for dispatch. An empty array signals no
  3442  * @return {Array} Arguments for dispatch. An empty array signals no
  2949  *                 notification should be sent.
  3443  *                 notification should be sent.
  2950  */
  3444  */
  2951 
  3445 
  2952 function getNotificationArgumentsForSaveFail(data) {
  3446 function getNotificationArgumentsForSaveFail(data) {
  2953   var post = data.post,
  3447   const {
  2954       edits = data.edits,
  3448     post,
  2955       error = data.error;
  3449     edits,
       
  3450     error
       
  3451   } = data;
  2956 
  3452 
  2957   if (error && 'rest_autosave_no_changes' === error.code) {
  3453   if (error && 'rest_autosave_no_changes' === error.code) {
  2958     // Autosave requested a new autosave, but there were no changes. This shouldn't
  3454     // Autosave requested a new autosave, but there were no changes. This shouldn't
  2959     // result in an error notice for the user.
  3455     // result in an error notice for the user.
  2960     return [];
  3456     return [];
  2961   }
  3457   }
  2962 
  3458 
  2963   var publishStatus = ['publish', 'private', 'future'];
  3459   const 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
  3460   const 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
  3461   // Unless we publish an "updating failed" message
  2966 
  3462 
  2967   var messages = {
  3463   const messages = {
  2968     publish: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
  3464     publish: Object(external_wp_i18n_["__"])('Publishing failed.'),
  2969     private: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
  3465     private: Object(external_wp_i18n_["__"])('Publishing failed.'),
  2970     future: Object(external_this_wp_i18n_["__"])('Scheduling failed.')
  3466     future: Object(external_wp_i18n_["__"])('Scheduling failed.')
  2971   };
  3467   };
  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
  3468   let noticeMessage = !isPublished && publishStatus.indexOf(edits.status) !== -1 ? messages[edits.status] : Object(external_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.
  3469   // supported as plaintext, and stripping the tags may muddle the meaning.
  2974 
  3470 
  2975   if (error.message && !/<\/?[^>]*>/.test(error.message)) {
  3471   if (error.message && !/<\/?[^>]*>/.test(error.message)) {
  2976     noticeMessage = [noticeMessage, error.message].join(' ');
  3472     noticeMessage = [noticeMessage, error.message].join(' ');
  2977   }
  3473   }
  2987  *
  3483  *
  2988  * @return {Array} Arguments for dispatch.
  3484  * @return {Array} Arguments for dispatch.
  2989  */
  3485  */
  2990 
  3486 
  2991 function getNotificationArgumentsForTrashFail(data) {
  3487 function getNotificationArgumentsForTrashFail(data) {
  2992   return [data.error.message && data.error.code !== 'unknown_error' ? data.error.message : Object(external_this_wp_i18n_["__"])('Trashing failed'), {
  3488   return [data.error.message && data.error.code !== 'unknown_error' ? data.error.message : Object(external_wp_i18n_["__"])('Trashing failed'), {
  2993     id: TRASH_POST_NOTICE_ID
  3489     id: TRASH_POST_NOTICE_ID
  2994   }];
  3490   }];
  2995 }
  3491 }
  2996 
  3492 
  2997 // EXTERNAL MODULE: ./node_modules/memize/index.js
  3493 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/actions.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 /**
  3494 /**
  3006  * External dependencies
  3495  * External dependencies
  3007  */
  3496  */
  3008 
  3497 
  3009 /**
  3498 /**
  3010  * WordPress dependencies
  3499  * WordPress dependencies
  3011  */
  3500  */
  3012 
  3501 
  3013 
  3502 
  3014 
  3503 
  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 
  3504 
  3074 
  3505 
  3075 
  3506 
  3076 /**
  3507 /**
  3077  * Internal dependencies
  3508  * Internal dependencies
  3078  */
  3509  */
  3079 
       
  3080 
  3510 
  3081 
  3511 
  3082 
  3512 
  3083 /**
  3513 /**
  3084  * Returns an action generator used in signalling that editor has initialized with
  3514  * Returns an action generator used in signalling that editor has initialized with
  3087  * @param {Object} post      Post object.
  3517  * @param {Object} post      Post object.
  3088  * @param {Object} edits     Initial edited attributes object.
  3518  * @param {Object} edits     Initial edited attributes object.
  3089  * @param {Array?} template  Block Template.
  3519  * @param {Array?} template  Block Template.
  3090  */
  3520  */
  3091 
  3521 
  3092 function setupEditor(post, edits, template) {
  3522 function* actions_setupEditor(post, edits, template) {
  3093   var content, blocks, isNewPost;
  3523   // In order to ensure maximum of a single parse during setup, edits are
  3094   return external_this_regeneratorRuntime_default.a.wrap(function setupEditor$(_context) {
  3524   // included as part of editor setup action. Assume edited content as
  3095     while (1) {
  3525   // canonical if provided, falling back to post.
  3096       switch (_context.prev = _context.next) {
  3526   let content;
  3097         case 0:
  3527 
  3098           // In order to ensure maximum of a single parse during setup, edits are
  3528   if (Object(external_lodash_["has"])(edits, ['content'])) {
  3099           // included as part of editor setup action. Assume edited content as
  3529     content = edits.content;
  3100           // canonical if provided, falling back to post.
  3530   } else {
  3101           if (Object(external_this_lodash_["has"])(edits, ['content'])) {
  3531     content = post.content.raw;
  3102             content = edits.content;
  3532   }
  3103           } else {
  3533 
  3104             content = post.content.raw;
  3534   let blocks = Object(external_wp_blocks_["parse"])(content); // Apply a template for new posts only, if exists.
  3105           }
  3535 
  3106 
  3536   const isNewPost = post.status === 'auto-draft';
  3107           blocks = Object(external_this_wp_blocks_["parse"])(content); // Apply a template for new posts only, if exists.
  3537 
  3108 
  3538   if (isNewPost && template) {
  3109           isNewPost = post.status === 'auto-draft';
  3539     blocks = Object(external_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
  3110 
  3540   }
  3111           if (isNewPost && template) {
  3541 
  3112             blocks = Object(external_this_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
  3542   yield resetPost(post);
  3113           }
  3543   yield {
  3114 
  3544     type: 'SETUP_EDITOR',
  3115           _context.next = 6;
  3545     post,
  3116           return resetPost(post);
  3546     edits,
  3117 
  3547     template
  3118         case 6:
  3548   };
  3119           _context.next = 8;
  3549   yield actions_resetEditorBlocks(blocks, {
  3120           return {
  3550     __unstableShouldCreateUndoLevel: false
  3121             type: 'SETUP_EDITOR',
  3551   });
  3122             post: post,
  3552   yield setupEditorState(post);
  3123             edits: edits,
  3553 
  3124             template: template
  3554   if (edits && Object.keys(edits).some(key => edits[key] !== (Object(external_lodash_["has"])(post, [key, 'raw']) ? post[key].raw : post[key]))) {
  3125           };
  3555     yield actions_editPost(edits);
  3126 
  3556   }
  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 }
  3557 }
  3155 /**
  3558 /**
  3156  * Returns an action object signalling that the editor is being destroyed and
  3559  * Returns an action object signalling that the editor is being destroyed and
  3157  * that any necessary state or side-effect cleanup should occur.
  3560  * that any necessary state or side-effect cleanup should occur.
  3158  *
  3561  *
  3159  * @return {Object} Action object.
  3562  * @return {Object} Action object.
  3160  */
  3563  */
  3161 
  3564 
  3162 function __experimentalTearDownEditor() {
  3565 function actions_experimentalTearDownEditor() {
  3163   return {
  3566   return {
  3164     type: 'TEAR_DOWN_EDITOR'
  3567     type: 'TEAR_DOWN_EDITOR'
  3165   };
  3568   };
  3166 }
  3569 }
  3167 /**
  3570 /**
  3174  */
  3577  */
  3175 
  3578 
  3176 function resetPost(post) {
  3579 function resetPost(post) {
  3177   return {
  3580   return {
  3178     type: 'RESET_POST',
  3581     type: 'RESET_POST',
  3179     post: post
  3582     post
  3180   };
  3583   };
  3181 }
  3584 }
  3182 /**
  3585 /**
  3183  * Returns an action object used in signalling that the latest autosave of the
  3586  * Returns an action object used in signalling that the latest autosave of the
  3184  * post has been received, by initialization or autosave.
  3587  * post has been received, by initialization or autosave.
  3189  * @param {Object} newAutosave Autosave post object.
  3592  * @param {Object} newAutosave Autosave post object.
  3190  *
  3593  *
  3191  * @return {Object} Action object.
  3594  * @return {Object} Action object.
  3192  */
  3595  */
  3193 
  3596 
  3194 function resetAutosave(newAutosave) {
  3597 function* resetAutosave(newAutosave) {
  3195   var postId;
  3598   external_wp_deprecated_default()('resetAutosave action (`core/editor` store)', {
  3196   return external_this_regeneratorRuntime_default.a.wrap(function resetAutosave$(_context2) {
  3599     since: '5.3',
  3197     while (1) {
  3600     alternative: 'receiveAutosaves action (`core` store)'
  3198       switch (_context2.prev = _context2.next) {
  3601   });
  3199         case 0:
  3602   const postId = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPostId');
  3200           external_this_wp_deprecated_default()('resetAutosave action (`core/editor` store)', {
  3603   yield external_wp_data_["controls"].dispatch('core', 'receiveAutosaves', postId, newAutosave);
  3201             alternative: 'receiveAutosaves action (`core` store)',
  3604   return {
  3202             plugin: 'Gutenberg'
  3605     type: '__INERT__'
  3203           });
  3606   };
  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 }
  3607 }
  3224 /**
  3608 /**
  3225  * Action for dispatching that a post update request has started.
  3609  * Action for dispatching that a post update request has started.
  3226  *
  3610  *
  3227  * @param {Object} options
  3611  * @param {Object} options
  3228  *
  3612  *
  3229  * @return {Object} An action object
  3613  * @return {Object} An action object
  3230  */
  3614  */
  3231 
  3615 
  3232 function __experimentalRequestPostUpdateStart() {
  3616 function __experimentalRequestPostUpdateStart(options = {}) {
  3233   var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  3234   return {
  3617   return {
  3235     type: 'REQUEST_POST_UPDATE_START',
  3618     type: 'REQUEST_POST_UPDATE_START',
  3236     options: options
  3619     options
  3237   };
  3620   };
  3238 }
  3621 }
  3239 /**
  3622 /**
  3240  * Action for dispatching that a post update request has finished.
  3623  * Action for dispatching that a post update request has finished.
  3241  *
  3624  *
  3242  * @param {Object} options
  3625  * @param {Object} options
  3243  *
  3626  *
  3244  * @return {Object} An action object
  3627  * @return {Object} An action object
  3245  */
  3628  */
  3246 
  3629 
  3247 function __experimentalRequestPostUpdateFinish() {
  3630 function __experimentalRequestPostUpdateFinish(options = {}) {
  3248   var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  3249   return {
  3631   return {
  3250     type: 'REQUEST_POST_UPDATE_FINISH',
  3632     type: 'REQUEST_POST_UPDATE_FINISH',
  3251     options: options
  3633     options
  3252   };
  3634   };
  3253 }
  3635 }
  3254 /**
  3636 /**
  3255  * Returns an action object used in signalling that a patch of updates for the
  3637  * Returns an action object used in signalling that a patch of updates for the
  3256  * latest version of the post have been received.
  3638  * latest version of the post have been received.
  3257  *
  3639  *
  3258  * @param {Object} edits Updated post fields.
       
  3259  *
       
  3260  * @return {Object} Action object.
  3640  * @return {Object} Action object.
  3261  */
  3641  * @deprecated since Gutenberg 9.7.0.
  3262 
  3642  */
  3263 function updatePost(edits) {
  3643 
       
  3644 function updatePost() {
       
  3645   external_wp_deprecated_default()("wp.data.dispatch( 'core/editor' ).updatePost", {
       
  3646     since: '5.7',
       
  3647     alternative: 'User the core entitires store instead'
       
  3648   });
  3264   return {
  3649   return {
  3265     type: 'UPDATE_POST',
  3650     type: 'DO_NOTHING'
  3266     edits: edits
       
  3267   };
  3651   };
  3268 }
  3652 }
  3269 /**
  3653 /**
  3270  * Returns an action object used to setup the editor state when first opening
  3654  * Returns an action object used to setup the editor state when first opening
  3271  * an editor.
  3655  * an editor.
  3276  */
  3660  */
  3277 
  3661 
  3278 function setupEditorState(post) {
  3662 function setupEditorState(post) {
  3279   return {
  3663   return {
  3280     type: 'SETUP_EDITOR_STATE',
  3664     type: 'SETUP_EDITOR_STATE',
  3281     post: post
  3665     post
  3282   };
  3666   };
  3283 }
  3667 }
  3284 /**
  3668 /**
  3285  * Returns an action object used in signalling that attributes of the post have
  3669  * Returns an action object used in signalling that attributes of the post have
  3286  * been edited.
  3670  * been edited.
  3289  * @param {Object} options Options for the edit.
  3673  * @param {Object} options Options for the edit.
  3290  *
  3674  *
  3291  * @yield {Object} Action object or control.
  3675  * @yield {Object} Action object or control.
  3292  */
  3676  */
  3293 
  3677 
  3294 function actions_editPost(edits, options) {
  3678 function* actions_editPost(edits, options) {
  3295   var _yield$select, id, type;
  3679   const {
  3296 
  3680     id,
  3297   return external_this_regeneratorRuntime_default.a.wrap(function editPost$(_context3) {
  3681     type
  3298     while (1) {
  3682   } = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
  3299       switch (_context3.prev = _context3.next) {
  3683   yield external_wp_data_["controls"].dispatch('core', 'editEntityRecord', 'postType', type, id, edits, options);
  3300         case 0:
  3684 }
  3301           _context3.next = 2;
  3685 /**
  3302           return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
  3686  * Action generator for saving the current post in the editor.
  3303 
  3687  *
  3304         case 2:
  3688  * @param {Object} options
  3305           _yield$select = _context3.sent;
  3689  */
  3306           id = _yield$select.id;
  3690 
  3307           type = _yield$select.type;
  3691 function* actions_savePost(options = {}) {
  3308           _context3.next = 7;
  3692   if (!(yield external_wp_data_["controls"].select(STORE_NAME, 'isEditedPostSaveable'))) {
  3309           return Object(external_this_wp_dataControls_["dispatch"])('core', 'editEntityRecord', 'postType', type, id, edits, options);
  3693     return;
  3310 
  3694   }
  3311         case 7:
  3695 
  3312         case "end":
  3696   let edits = {
  3313           return _context3.stop();
  3697     content: yield external_wp_data_["controls"].select(STORE_NAME, 'getEditedPostContent')
  3314       }
  3698   };
       
  3699 
       
  3700   if (!options.isAutosave) {
       
  3701     yield external_wp_data_["controls"].dispatch(STORE_NAME, 'editPost', edits, {
       
  3702       undoIgnore: true
       
  3703     });
       
  3704   }
       
  3705 
       
  3706   yield __experimentalRequestPostUpdateStart(options);
       
  3707   const previousRecord = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
       
  3708   edits = {
       
  3709     id: previousRecord.id,
       
  3710     ...(yield external_wp_data_["controls"].select('core', 'getEntityRecordNonTransientEdits', 'postType', previousRecord.type, previousRecord.id)),
       
  3711     ...edits
       
  3712   };
       
  3713   yield external_wp_data_["controls"].dispatch('core', 'saveEntityRecord', 'postType', previousRecord.type, edits, options);
       
  3714   yield __experimentalRequestPostUpdateFinish(options);
       
  3715   const error = yield external_wp_data_["controls"].select('core', 'getLastEntitySaveError', 'postType', previousRecord.type, previousRecord.id);
       
  3716 
       
  3717   if (error) {
       
  3718     const args = getNotificationArgumentsForSaveFail({
       
  3719       post: previousRecord,
       
  3720       edits,
       
  3721       error
       
  3722     });
       
  3723 
       
  3724     if (args.length) {
       
  3725       yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', ...args);
  3315     }
  3726     }
  3316   }, _marked3);
  3727   } else {
  3317 }
  3728     const updatedRecord = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
  3318 /**
  3729     const args = getNotificationArgumentsForSaveSuccess({
  3319  * Returns action object produced by the updatePost creator augmented by
  3730       previousPost: previousRecord,
  3320  * an optimist option that signals optimistically applying updates.
  3731       post: updatedRecord,
  3321  *
  3732       postType: yield external_wp_data_["controls"].resolveSelect('core', 'getPostType', updatedRecord.type),
  3322  * @param {Object} edits  Updated post fields.
  3733       options
  3323  *
  3734     });
  3324  * @return {Object} Action object.
  3735 
  3325  */
  3736     if (args.length) {
  3326 
  3737       yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createSuccessNotice', ...args);
  3327 function __experimentalOptimisticUpdatePost(edits) {
  3738     } // Make sure that any edits after saving create an undo level and are
  3328   return actions_objectSpread({}, updatePost(edits), {
  3739     // considered for change detection.
  3329     optimist: {
  3740 
  3330       id: POST_UPDATE_TRANSACTION_ID
  3741 
       
  3742     if (!options.isAutosave) {
       
  3743       yield external_wp_data_["controls"].dispatch('core/block-editor', '__unstableMarkLastChangeAsPersistent');
  3331     }
  3744     }
       
  3745   }
       
  3746 }
       
  3747 /**
       
  3748  * Action generator for handling refreshing the current post.
       
  3749  */
       
  3750 
       
  3751 function* refreshPost() {
       
  3752   const post = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
       
  3753   const postTypeSlug = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPostType');
       
  3754   const postType = yield external_wp_data_["controls"].resolveSelect('core', 'getPostType', postTypeSlug);
       
  3755   const newPost = yield Object(external_wp_dataControls_["apiFetch"])({
       
  3756     // Timestamp arg allows caller to bypass browser caching, which is
       
  3757     // expected for this specific function.
       
  3758     path: `/wp/v2/${postType.rest_base}/${post.id}` + `?context=edit&_timestamp=${Date.now()}`
  3332   });
  3759   });
  3333 }
  3760   yield external_wp_data_["controls"].dispatch(STORE_NAME, 'resetPost', newPost);
  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 }
  3761 }
  3536 /**
  3762 /**
  3537  * Action generator for trashing the current post in the editor.
  3763  * Action generator for trashing the current post in the editor.
  3538  */
  3764  */
  3539 
  3765 
  3540 function trashPost() {
  3766 function* trashPost() {
  3541   var postTypeSlug, postType, post;
  3767   const postTypeSlug = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPostType');
  3542   return external_this_regeneratorRuntime_default.a.wrap(function trashPost$(_context6) {
  3768   const postType = yield external_wp_data_["controls"].resolveSelect('core', 'getPostType', postTypeSlug);
  3543     while (1) {
  3769   yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'removeNotice', TRASH_POST_NOTICE_ID);
  3544       switch (_context6.prev = _context6.next) {
  3770 
  3545         case 0:
  3771   try {
  3546           _context6.next = 2;
  3772     const post = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
  3547           return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
  3773     yield Object(external_wp_dataControls_["apiFetch"])({
  3548 
  3774       path: `/wp/v2/${postType.rest_base}/${post.id}`,
  3549         case 2:
  3775       method: 'DELETE'
  3550           postTypeSlug = _context6.sent;
  3776     });
  3551           _context6.next = 5;
  3777     yield external_wp_data_["controls"].dispatch(STORE_NAME, 'savePost');
  3552           return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
  3778   } catch (error) {
  3553 
  3779     yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', ...getNotificationArgumentsForTrashFail({
  3554         case 5:
  3780       error
  3555           postType = _context6.sent;
  3781     }));
  3556           _context6.next = 8;
  3782   }
  3557           return Object(external_this_wp_dataControls_["dispatch"])('core/notices', 'removeNotice', TRASH_POST_NOTICE_ID);
  3783 }
  3558 
  3784 /**
  3559         case 8:
  3785  * Action generator used in signalling that the post should autosave.  This
  3560           _context6.prev = 8;
  3786  * includes server-side autosaving (default) and client-side (a.k.a. local)
  3561           _context6.next = 11;
  3787  * autosaving (e.g. on the Web, the post might be committed to Session
  3562           return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
  3788  * Storage).
  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  *
  3789  *
  3598  * @param {Object?} options Extra flags to identify the autosave.
  3790  * @param {Object?} options Extra flags to identify the autosave.
  3599  */
  3791  */
  3600 
  3792 
  3601 function actions_autosave(options) {
  3793 function* actions_autosave({
  3602   return external_this_regeneratorRuntime_default.a.wrap(function autosave$(_context7) {
  3794   local = false,
  3603     while (1) {
  3795   ...options
  3604       switch (_context7.prev = _context7.next) {
  3796 } = {}) {
  3605         case 0:
  3797   if (local) {
  3606           _context7.next = 2;
  3798     const post = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
  3607           return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost', actions_objectSpread({
  3799     const isPostNew = yield external_wp_data_["controls"].select(STORE_NAME, 'isEditedPostNew');
  3608             isAutosave: true
  3800     const title = yield external_wp_data_["controls"].select(STORE_NAME, 'getEditedPostAttribute', 'title');
  3609           }, options));
  3801     const content = yield external_wp_data_["controls"].select(STORE_NAME, 'getEditedPostAttribute', 'content');
  3610 
  3802     const excerpt = yield external_wp_data_["controls"].select(STORE_NAME, 'getEditedPostAttribute', 'excerpt');
  3611         case 2:
  3803     yield {
  3612         case "end":
  3804       type: 'LOCAL_AUTOSAVE_SET',
  3613           return _context7.stop();
  3805       postId: post.id,
  3614       }
  3806       isPostNew,
  3615     }
  3807       title,
  3616   }, _marked7);
  3808       content,
  3617 }
  3809       excerpt
  3618 function actions_experimentalLocalAutosave() {
  3810     };
  3619   var post, title, content, excerpt;
  3811   } else {
  3620   return external_this_regeneratorRuntime_default.a.wrap(function __experimentalLocalAutosave$(_context8) {
  3812     yield external_wp_data_["controls"].dispatch(STORE_NAME, 'savePost', {
  3621     while (1) {
  3813       isAutosave: true,
  3622       switch (_context8.prev = _context8.next) {
  3814       ...options
  3623         case 0:
  3815     });
  3624           _context8.next = 2;
  3816   }
  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 }
  3817 }
  3660 /**
  3818 /**
  3661  * Returns an action object used in signalling that undo history should
  3819  * Returns an action object used in signalling that undo history should
  3662  * restore last popped state.
  3820  * restore last popped state.
  3663  *
  3821  *
  3664  * @yield {Object} Action object.
  3822  * @yield {Object} Action object.
  3665  */
  3823  */
  3666 
  3824 
  3667 function actions_redo() {
  3825 function* actions_redo() {
  3668   return external_this_regeneratorRuntime_default.a.wrap(function redo$(_context9) {
  3826   yield external_wp_data_["controls"].dispatch('core', 'redo');
  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 }
  3827 }
  3682 /**
  3828 /**
  3683  * Returns an action object used in signalling that undo history should pop.
  3829  * Returns an action object used in signalling that undo history should pop.
  3684  *
  3830  *
  3685  * @yield {Object} Action object.
  3831  * @yield {Object} Action object.
  3686  */
  3832  */
  3687 
  3833 
  3688 function actions_undo() {
  3834 function* actions_undo() {
  3689   return external_this_regeneratorRuntime_default.a.wrap(function undo$(_context10) {
  3835   yield external_wp_data_["controls"].dispatch('core', 'undo');
  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 }
  3836 }
  3703 /**
  3837 /**
  3704  * Returns an action object used in signalling that undo history record should
  3838  * Returns an action object used in signalling that undo history record should
  3705  * be created.
  3839  * be created.
  3706  *
  3840  *
  3718  * @param {Object}  lock Details about the post lock status, user, and nonce.
  3852  * @param {Object}  lock Details about the post lock status, user, and nonce.
  3719  *
  3853  *
  3720  * @return {Object} Action object.
  3854  * @return {Object} Action object.
  3721  */
  3855  */
  3722 
  3856 
  3723 function updatePostLock(lock) {
  3857 function actions_updatePostLock(lock) {
  3724   return {
  3858   return {
  3725     type: 'UPDATE_POST_LOCK',
  3859     type: 'UPDATE_POST_LOCK',
  3726     lock: lock
  3860     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   };
  3861   };
  3837 }
  3862 }
  3838 /**
  3863 /**
  3839  * Returns an action object used in signalling that the user has enabled the
  3864  * Returns an action object used in signalling that the user has enabled the
  3840  * publish sidebar.
  3865  * publish sidebar.
  3904  */
  3929  */
  3905 
  3930 
  3906 function lockPostSaving(lockName) {
  3931 function lockPostSaving(lockName) {
  3907   return {
  3932   return {
  3908     type: 'LOCK_POST_SAVING',
  3933     type: 'LOCK_POST_SAVING',
  3909     lockName: lockName
  3934     lockName
  3910   };
  3935   };
  3911 }
  3936 }
  3912 /**
  3937 /**
  3913  * Returns an action object used to signal that post saving is unlocked.
  3938  * Returns an action object used to signal that post saving is unlocked.
  3914  *
  3939  *
  3924  */
  3949  */
  3925 
  3950 
  3926 function unlockPostSaving(lockName) {
  3951 function unlockPostSaving(lockName) {
  3927   return {
  3952   return {
  3928     type: 'UNLOCK_POST_SAVING',
  3953     type: 'UNLOCK_POST_SAVING',
  3929     lockName: lockName
  3954     lockName
  3930   };
  3955   };
  3931 }
  3956 }
  3932 /**
  3957 /**
  3933  * Returns an action object used to signal that post autosaving is locked.
  3958  * Returns an action object used to signal that post autosaving is locked.
  3934  *
  3959  *
  3944  */
  3969  */
  3945 
  3970 
  3946 function lockPostAutosaving(lockName) {
  3971 function lockPostAutosaving(lockName) {
  3947   return {
  3972   return {
  3948     type: 'LOCK_POST_AUTOSAVING',
  3973     type: 'LOCK_POST_AUTOSAVING',
  3949     lockName: lockName
  3974     lockName
  3950   };
  3975   };
  3951 }
  3976 }
  3952 /**
  3977 /**
  3953  * Returns an action object used to signal that post autosaving is unlocked.
  3978  * Returns an action object used to signal that post autosaving is unlocked.
  3954  *
  3979  *
  3964  */
  3989  */
  3965 
  3990 
  3966 function unlockPostAutosaving(lockName) {
  3991 function unlockPostAutosaving(lockName) {
  3967   return {
  3992   return {
  3968     type: 'UNLOCK_POST_AUTOSAVING',
  3993     type: 'UNLOCK_POST_AUTOSAVING',
  3969     lockName: lockName
  3994     lockName
  3970   };
  3995   };
  3971 }
  3996 }
  3972 /**
  3997 /**
  3973  * Returns an action object used to signal that the blocks have been updated.
  3998  * Returns an action object used to signal that the blocks have been updated.
  3974  *
  3999  *
  3976  * @param {?Object} options Optional options.
  4001  * @param {?Object} options Optional options.
  3977  *
  4002  *
  3978  * @yield {Object} Action object
  4003  * @yield {Object} Action object
  3979  */
  4004  */
  3980 
  4005 
  3981 function actions_resetEditorBlocks(blocks) {
  4006 function* actions_resetEditorBlocks(blocks, options = {}) {
  3982   var options,
  4007   const {
  3983       __unstableShouldCreateUndoLevel,
  4008     __unstableShouldCreateUndoLevel,
  3984       selectionStart,
  4009     selection
  3985       selectionEnd,
  4010   } = options;
  3986       edits,
  4011   const edits = {
  3987       _yield$select2,
  4012     blocks,
       
  4013     selection
       
  4014   };
       
  4015 
       
  4016   if (__unstableShouldCreateUndoLevel !== false) {
       
  4017     const {
  3988       id,
  4018       id,
  3989       type,
  4019       type
  3990       noChange,
  4020     } = yield external_wp_data_["controls"].select(STORE_NAME, 'getCurrentPost');
  3991       _args12 = arguments;
  4021     const noChange = (yield external_wp_data_["controls"].select('core', 'getEditedEntityRecord', 'postType', type, id)).blocks === edits.blocks;
  3992 
  4022 
  3993   return external_this_regeneratorRuntime_default.a.wrap(function resetEditorBlocks$(_context11) {
  4023     if (noChange) {
  3994     while (1) {
  4024       return yield external_wp_data_["controls"].dispatch('core', '__unstableCreateUndoLevel', 'postType', type, id);
  3995       switch (_context11.prev = _context11.next) {
  4025     } // We create a new function here on every persistent edit
  3996         case 0:
  4026     // to make sure the edit makes the post dirty and creates
  3997           options = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
  4027     // a new undo level.
  3998           __unstableShouldCreateUndoLevel = options.__unstableShouldCreateUndoLevel, selectionStart = options.selectionStart, selectionEnd = options.selectionEnd;
  4028 
  3999           edits = {
  4029 
  4000             blocks: blocks,
  4030     edits.content = ({
  4001             selectionStart: selectionStart,
  4031       blocks: blocksForSerialization = []
  4002             selectionEnd: selectionEnd
  4032     }) => Object(external_wp_blocks_["__unstableSerializeAndClean"])(blocksForSerialization);
  4003           };
  4033   }
  4004 
  4034 
  4005           if (!(__unstableShouldCreateUndoLevel !== false)) {
  4035   yield* actions_editPost(edits);
  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 }
  4036 }
  4056 /*
  4037 /*
  4057  * Returns an action object used in signalling that the post editor settings have been updated.
  4038  * Returns an action object used in signalling that the post editor settings have been updated.
  4058  *
  4039  *
  4059  * @param {Object} settings Updated settings
  4040  * @param {Object} settings Updated settings
  4060  *
  4041  *
  4061  * @return {Object} Action object
  4042  * @return {Object} Action object
  4062  */
  4043  */
  4063 
  4044 
  4064 function updateEditorSettings(settings) {
  4045 function actions_updateEditorSettings(settings) {
  4065   return {
  4046   return {
  4066     type: 'UPDATE_EDITOR_SETTINGS',
  4047     type: 'UPDATE_EDITOR_SETTINGS',
  4067     settings: settings
  4048     settings
  4068   };
  4049   };
  4069 }
  4050 }
  4070 /**
  4051 /**
  4071  * Backward compatibility
  4052  * Backward compatibility
  4072  */
  4053  */
  4073 
  4054 
  4074 var actions_getBlockEditorAction = function getBlockEditorAction(name) {
  4055 const getBlockEditorAction = name => function* (...args) {
  4075   return /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee() {
  4056   external_wp_deprecated_default()("`wp.data.dispatch( 'core/editor' )." + name + '`', {
  4076     var _len,
  4057     since: '5.3',
  4077         args,
  4058     alternative: "`wp.data.dispatch( 'core/block-editor' )." + name + '`'
  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   });
  4059   });
       
  4060   yield external_wp_data_["controls"].dispatch('core/block-editor', name, ...args);
  4103 };
  4061 };
  4104 /**
  4062 /**
  4105  * @see resetBlocks in core/block-editor store.
  4063  * @see resetBlocks in core/block-editor store.
  4106  */
  4064  */
  4107 
  4065 
  4108 
  4066 
  4109 var resetBlocks = actions_getBlockEditorAction('resetBlocks');
  4067 const resetBlocks = getBlockEditorAction('resetBlocks');
  4110 /**
  4068 /**
  4111  * @see receiveBlocks in core/block-editor store.
  4069  * @see receiveBlocks in core/block-editor store.
  4112  */
  4070  */
  4113 
  4071 
  4114 var receiveBlocks = actions_getBlockEditorAction('receiveBlocks');
  4072 const receiveBlocks = getBlockEditorAction('receiveBlocks');
  4115 /**
  4073 /**
  4116  * @see updateBlock in core/block-editor store.
  4074  * @see updateBlock in core/block-editor store.
  4117  */
  4075  */
  4118 
  4076 
  4119 var updateBlock = actions_getBlockEditorAction('updateBlock');
  4077 const updateBlock = getBlockEditorAction('updateBlock');
  4120 /**
  4078 /**
  4121  * @see updateBlockAttributes in core/block-editor store.
  4079  * @see updateBlockAttributes in core/block-editor store.
  4122  */
  4080  */
  4123 
  4081 
  4124 var updateBlockAttributes = actions_getBlockEditorAction('updateBlockAttributes');
  4082 const updateBlockAttributes = getBlockEditorAction('updateBlockAttributes');
  4125 /**
  4083 /**
  4126  * @see selectBlock in core/block-editor store.
  4084  * @see selectBlock in core/block-editor store.
  4127  */
  4085  */
  4128 
  4086 
  4129 var actions_selectBlock = actions_getBlockEditorAction('selectBlock');
  4087 const actions_selectBlock = getBlockEditorAction('selectBlock');
  4130 /**
  4088 /**
  4131  * @see startMultiSelect in core/block-editor store.
  4089  * @see startMultiSelect in core/block-editor store.
  4132  */
  4090  */
  4133 
  4091 
  4134 var startMultiSelect = actions_getBlockEditorAction('startMultiSelect');
  4092 const startMultiSelect = getBlockEditorAction('startMultiSelect');
  4135 /**
  4093 /**
  4136  * @see stopMultiSelect in core/block-editor store.
  4094  * @see stopMultiSelect in core/block-editor store.
  4137  */
  4095  */
  4138 
  4096 
  4139 var stopMultiSelect = actions_getBlockEditorAction('stopMultiSelect');
  4097 const stopMultiSelect = getBlockEditorAction('stopMultiSelect');
  4140 /**
  4098 /**
  4141  * @see multiSelect in core/block-editor store.
  4099  * @see multiSelect in core/block-editor store.
  4142  */
  4100  */
  4143 
  4101 
  4144 var multiSelect = actions_getBlockEditorAction('multiSelect');
  4102 const multiSelect = getBlockEditorAction('multiSelect');
  4145 /**
  4103 /**
  4146  * @see clearSelectedBlock in core/block-editor store.
  4104  * @see clearSelectedBlock in core/block-editor store.
  4147  */
  4105  */
  4148 
  4106 
  4149 var clearSelectedBlock = actions_getBlockEditorAction('clearSelectedBlock');
  4107 const actions_clearSelectedBlock = getBlockEditorAction('clearSelectedBlock');
  4150 /**
  4108 /**
  4151  * @see toggleSelection in core/block-editor store.
  4109  * @see toggleSelection in core/block-editor store.
  4152  */
  4110  */
  4153 
  4111 
  4154 var toggleSelection = actions_getBlockEditorAction('toggleSelection');
  4112 const toggleSelection = getBlockEditorAction('toggleSelection');
  4155 /**
  4113 /**
  4156  * @see replaceBlocks in core/block-editor store.
  4114  * @see replaceBlocks in core/block-editor store.
  4157  */
  4115  */
  4158 
  4116 
  4159 var actions_replaceBlocks = actions_getBlockEditorAction('replaceBlocks');
  4117 const replaceBlocks = getBlockEditorAction('replaceBlocks');
  4160 /**
  4118 /**
  4161  * @see replaceBlock in core/block-editor store.
  4119  * @see replaceBlock in core/block-editor store.
  4162  */
  4120  */
  4163 
  4121 
  4164 var replaceBlock = actions_getBlockEditorAction('replaceBlock');
  4122 const replaceBlock = getBlockEditorAction('replaceBlock');
  4165 /**
  4123 /**
  4166  * @see moveBlocksDown in core/block-editor store.
  4124  * @see moveBlocksDown in core/block-editor store.
  4167  */
  4125  */
  4168 
  4126 
  4169 var moveBlocksDown = actions_getBlockEditorAction('moveBlocksDown');
  4127 const moveBlocksDown = getBlockEditorAction('moveBlocksDown');
  4170 /**
  4128 /**
  4171  * @see moveBlocksUp in core/block-editor store.
  4129  * @see moveBlocksUp in core/block-editor store.
  4172  */
  4130  */
  4173 
  4131 
  4174 var moveBlocksUp = actions_getBlockEditorAction('moveBlocksUp');
  4132 const moveBlocksUp = getBlockEditorAction('moveBlocksUp');
  4175 /**
  4133 /**
  4176  * @see moveBlockToPosition in core/block-editor store.
  4134  * @see moveBlockToPosition in core/block-editor store.
  4177  */
  4135  */
  4178 
  4136 
  4179 var moveBlockToPosition = actions_getBlockEditorAction('moveBlockToPosition');
  4137 const moveBlockToPosition = getBlockEditorAction('moveBlockToPosition');
  4180 /**
  4138 /**
  4181  * @see insertBlock in core/block-editor store.
  4139  * @see insertBlock in core/block-editor store.
  4182  */
  4140  */
  4183 
  4141 
  4184 var insertBlock = actions_getBlockEditorAction('insertBlock');
  4142 const insertBlock = getBlockEditorAction('insertBlock');
  4185 /**
  4143 /**
  4186  * @see insertBlocks in core/block-editor store.
  4144  * @see insertBlocks in core/block-editor store.
  4187  */
  4145  */
  4188 
  4146 
  4189 var insertBlocks = actions_getBlockEditorAction('insertBlocks');
  4147 const actions_insertBlocks = getBlockEditorAction('insertBlocks');
  4190 /**
  4148 /**
  4191  * @see showInsertionPoint in core/block-editor store.
  4149  * @see showInsertionPoint in core/block-editor store.
  4192  */
  4150  */
  4193 
  4151 
  4194 var showInsertionPoint = actions_getBlockEditorAction('showInsertionPoint');
  4152 const showInsertionPoint = getBlockEditorAction('showInsertionPoint');
  4195 /**
  4153 /**
  4196  * @see hideInsertionPoint in core/block-editor store.
  4154  * @see hideInsertionPoint in core/block-editor store.
  4197  */
  4155  */
  4198 
  4156 
  4199 var hideInsertionPoint = actions_getBlockEditorAction('hideInsertionPoint');
  4157 const hideInsertionPoint = getBlockEditorAction('hideInsertionPoint');
  4200 /**
  4158 /**
  4201  * @see setTemplateValidity in core/block-editor store.
  4159  * @see setTemplateValidity in core/block-editor store.
  4202  */
  4160  */
  4203 
  4161 
  4204 var setTemplateValidity = actions_getBlockEditorAction('setTemplateValidity');
  4162 const actions_setTemplateValidity = getBlockEditorAction('setTemplateValidity');
  4205 /**
  4163 /**
  4206  * @see synchronizeTemplate in core/block-editor store.
  4164  * @see synchronizeTemplate in core/block-editor store.
  4207  */
  4165  */
  4208 
  4166 
  4209 var synchronizeTemplate = actions_getBlockEditorAction('synchronizeTemplate');
  4167 const actions_synchronizeTemplate = getBlockEditorAction('synchronizeTemplate');
  4210 /**
  4168 /**
  4211  * @see mergeBlocks in core/block-editor store.
  4169  * @see mergeBlocks in core/block-editor store.
  4212  */
  4170  */
  4213 
  4171 
  4214 var mergeBlocks = actions_getBlockEditorAction('mergeBlocks');
  4172 const mergeBlocks = getBlockEditorAction('mergeBlocks');
  4215 /**
  4173 /**
  4216  * @see removeBlocks in core/block-editor store.
  4174  * @see removeBlocks in core/block-editor store.
  4217  */
  4175  */
  4218 
  4176 
  4219 var removeBlocks = actions_getBlockEditorAction('removeBlocks');
  4177 const removeBlocks = getBlockEditorAction('removeBlocks');
  4220 /**
  4178 /**
  4221  * @see removeBlock in core/block-editor store.
  4179  * @see removeBlock in core/block-editor store.
  4222  */
  4180  */
  4223 
  4181 
  4224 var removeBlock = actions_getBlockEditorAction('removeBlock');
  4182 const removeBlock = getBlockEditorAction('removeBlock');
  4225 /**
  4183 /**
  4226  * @see toggleBlockMode in core/block-editor store.
  4184  * @see toggleBlockMode in core/block-editor store.
  4227  */
  4185  */
  4228 
  4186 
  4229 var toggleBlockMode = actions_getBlockEditorAction('toggleBlockMode');
  4187 const toggleBlockMode = getBlockEditorAction('toggleBlockMode');
  4230 /**
  4188 /**
  4231  * @see startTyping in core/block-editor store.
  4189  * @see startTyping in core/block-editor store.
  4232  */
  4190  */
  4233 
  4191 
  4234 var startTyping = actions_getBlockEditorAction('startTyping');
  4192 const startTyping = getBlockEditorAction('startTyping');
  4235 /**
  4193 /**
  4236  * @see stopTyping in core/block-editor store.
  4194  * @see stopTyping in core/block-editor store.
  4237  */
  4195  */
  4238 
  4196 
  4239 var stopTyping = actions_getBlockEditorAction('stopTyping');
  4197 const stopTyping = getBlockEditorAction('stopTyping');
  4240 /**
  4198 /**
  4241  * @see enterFormattedText in core/block-editor store.
  4199  * @see enterFormattedText in core/block-editor store.
  4242  */
  4200  */
  4243 
  4201 
  4244 var enterFormattedText = actions_getBlockEditorAction('enterFormattedText');
  4202 const enterFormattedText = getBlockEditorAction('enterFormattedText');
  4245 /**
  4203 /**
  4246  * @see exitFormattedText in core/block-editor store.
  4204  * @see exitFormattedText in core/block-editor store.
  4247  */
  4205  */
  4248 
  4206 
  4249 var exitFormattedText = actions_getBlockEditorAction('exitFormattedText');
  4207 const exitFormattedText = getBlockEditorAction('exitFormattedText');
  4250 /**
  4208 /**
  4251  * @see insertDefaultBlock in core/block-editor store.
  4209  * @see insertDefaultBlock in core/block-editor store.
  4252  */
  4210  */
  4253 
  4211 
  4254 var insertDefaultBlock = actions_getBlockEditorAction('insertDefaultBlock');
  4212 const actions_insertDefaultBlock = getBlockEditorAction('insertDefaultBlock');
  4255 /**
  4213 /**
  4256  * @see updateBlockListSettings in core/block-editor store.
  4214  * @see updateBlockListSettings in core/block-editor store.
  4257  */
  4215  */
  4258 
  4216 
  4259 var updateBlockListSettings = actions_getBlockEditorAction('updateBlockListSettings');
  4217 const updateBlockListSettings = 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 
  4218 
  6325 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/controls.js
  4219 // 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 /**
  4220 /**
  6355  * Function returning a sessionStorage key to set or retrieve a given post's
  4221  * Function returning a sessionStorage key to set or retrieve a given post's
  6356  * automatic session backup.
  4222  * automatic session backup.
  6357  *
  4223  *
  6358  * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
  4224  * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
  6359  * `loggedout` handler can clear sessionStorage of any user-private content.
  4225  * `loggedout` handler can clear sessionStorage of any user-private content.
  6360  *
  4226  *
  6361  * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103
  4227  * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103
  6362  *
  4228  *
  6363  * @param {string} postId  Post ID.
  4229  * @param {string}  postId     Post ID.
  6364  * @return {string}        sessionStorage key
  4230  * @param {boolean} isPostNew  Whether post new.
  6365  */
  4231  * @return {string}            sessionStorage key
  6366 
  4232  */
  6367 function postKey(postId) {
  4233 function postKey(postId, isPostNew) {
  6368   return "wp-autosave-block-editor-post-".concat(postId);
  4234   return `wp-autosave-block-editor-post-${isPostNew ? 'auto-draft' : postId}`;
  6369 }
  4235 }
  6370 
  4236 
  6371 function localAutosaveGet(postId) {
  4237 function localAutosaveGet(postId, isPostNew) {
  6372   return window.sessionStorage.getItem(postKey(postId));
  4238   return window.sessionStorage.getItem(postKey(postId, isPostNew));
  6373 }
  4239 }
  6374 function localAutosaveSet(postId, title, content, excerpt) {
  4240 function localAutosaveSet(postId, isPostNew, title, content, excerpt) {
  6375   window.sessionStorage.setItem(postKey(postId), JSON.stringify({
  4241   window.sessionStorage.setItem(postKey(postId, isPostNew), JSON.stringify({
  6376     post_title: title,
  4242     post_title: title,
  6377     content: content,
  4243     content,
  6378     excerpt: excerpt
  4244     excerpt
  6379   }));
  4245   }));
  6380 }
  4246 }
  6381 function localAutosaveClear(postId) {
  4247 function localAutosaveClear(postId, isPostNew) {
  6382   window.sessionStorage.removeItem(postKey(postId));
  4248   window.sessionStorage.removeItem(postKey(postId, isPostNew));
  6383 }
  4249 }
  6384 var controls = {
  4250 const controls = {
  6385   AWAIT_NEXT_STATE_CHANGE: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
  4251   LOCAL_AUTOSAVE_SET({
  6386     return function () {
  4252     postId,
  6387       return new Promise(function (resolve) {
  4253     isPostNew,
  6388         var unsubscribe = registry.subscribe(function () {
  4254     title,
  6389           unsubscribe();
  4255     content,
  6390           resolve();
  4256     excerpt
  6391         });
  4257   }) {
  6392       });
  4258     localAutosaveSet(postId, isPostNew, title, content, excerpt);
  6393     };
  4259   }
  6394   }),
  4260 
  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 };
  4261 };
  6408 /* harmony default export */ var store_controls = (controls);
  4262 /* harmony default export */ var store_controls = (controls);
  6409 
  4263 
  6410 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/index.js
  4264 // 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 /**
  4265 /**
  6418  * WordPress dependencies
  4266  * WordPress dependencies
  6419  */
  4267  */
  6420 
  4268 
  6421 
  4269 
  6426 
  4274 
  6427 
  4275 
  6428 
  4276 
  6429 
  4277 
  6430 
  4278 
  6431 
       
  6432 /**
  4279 /**
  6433  * Post editor data store configuration.
  4280  * Post editor data store configuration.
  6434  *
  4281  *
  6435  * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore
  4282  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
  6436  *
  4283  *
  6437  * @type {Object}
  4284  * @type {Object}
  6438  */
  4285  */
  6439 
  4286 
  6440 var storeConfig = {
  4287 const storeConfig = {
  6441   reducer: reducer,
  4288   reducer: reducer,
  6442   selectors: selectors_namespaceObject,
  4289   selectors: selectors_namespaceObject,
  6443   actions: actions_namespaceObject,
  4290   actions: actions_namespaceObject,
  6444   controls: store_objectSpread({}, external_this_wp_dataControls_["controls"], {}, store_controls)
  4291   controls: { ...external_wp_dataControls_["controls"],
       
  4292     ...store_controls
       
  4293   }
  6445 };
  4294 };
  6446 var store_store = Object(external_this_wp_data_["registerStore"])(STORE_KEY, store_objectSpread({}, storeConfig, {
  4295 /**
       
  4296  * Store definition for the editor namespace.
       
  4297  *
       
  4298  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
       
  4299  *
       
  4300  * @type {Object}
       
  4301  */
       
  4302 
       
  4303 const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, { ...storeConfig,
  6447   persist: ['preferences']
  4304   persist: ['preferences']
  6448 }));
  4305 }); // Once we build a more generic persistence plugin that works across types of stores
  6449 middlewares(store_store);
  4306 // we'd be able to replace this with a register call.
  6450 /* harmony default export */ var build_module_store = (store_store);
  4307 
  6451 
  4308 Object(external_wp_data_["registerStore"])(STORE_NAME, { ...storeConfig,
  6452 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  4309   persist: ['preferences']
  6453 var esm_extends = __webpack_require__(8);
  4310 });
  6454 
  4311 
  6455 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
  4312 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js
  6456 var objectWithoutProperties = __webpack_require__(15);
  4313 
  6457 
  4314 
  6458 // EXTERNAL MODULE: external {"this":["wp","element"]}
  4315 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js
  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 /**
  4316 /**
  6483  * WordPress dependencies
  4317  * WordPress dependencies
  6484  */
  4318  */
  6485 
  4319 
  6486 
  4320 
  6487 
  4321 
  6488 
  4322 /**
  6489 
  4323  * AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.
  6490 
  4324  *
  6491 /** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */
  4325  * The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.
  6492 
  4326  * The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as
  6493 /** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */
  4327  * the specific way of detecting changes.
  6494 
  4328  *
  6495 /**
  4329  * There are two caveats:
  6496  * Object whose keys are the names of block attributes, where each value
  4330  * * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.
  6497  * represents the meta key to which the block attribute is intended to save.
  4331  * * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.
  6498  *
  4332  */
  6499  * @see https://developer.wordpress.org/reference/functions/register_meta/
  4333 
  6500  *
  4334 class autosave_monitor_AutosaveMonitor extends external_wp_element_["Component"] {
  6501  * @typedef {Object<string,string>} WPMetaAttributeMapping
  4335   constructor(props) {
  6502  */
  4336     super(props);
  6503 
  4337     this.needsAutosave = !!(props.isDirty && props.isAutosaveable);
  6504 /**
  4338   }
  6505  * Given a mapping of attribute names (meta source attributes) to their
  4339 
  6506  * associated meta key, returns a higher order component that overrides its
  4340   componentDidMount() {
  6507  * `attributes` and `setAttributes` props to sync any changes with the edited
  4341     if (!this.props.disableIntervalChecks) {
  6508  * post's meta keys.
  4342       this.setAutosaveTimer();
  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     }
  4343     }
  6630 
  4344   }
  6631     return external_this_wp_apiFetch_default()({
  4345 
  6632       path: '/wp/v2/users' + payload
  4346   componentDidUpdate(prevProps) {
  6633     });
  4347     if (this.props.disableIntervalChecks) {
  6634   },
  4348       if (this.props.editsReference !== prevProps.editsReference) {
  6635   isDebounced: true,
  4349         this.props.autosave();
  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       }
  4350       }
  6756 
  4351 
  6757       if (!isAutosaving && prevProps.isAutosaving) {
  4352       return;
  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     }
  4353     }
  6765   }, {
  4354 
  6766     key: "componentWillUnmount",
  4355     if (!this.props.isDirty) {
  6767     value: function componentWillUnmount() {
  4356       this.needsAutosave = false;
  6768       this.toggleTimer(false);
  4357       return;
  6769     }
  4358     }
  6770   }, {
  4359 
  6771     key: "toggleTimer",
  4360     if (this.props.isAutosaving && !prevProps.isAutosaving) {
  6772     value: function toggleTimer(isPendingSave) {
  4361       this.needsAutosave = false;
  6773       var _this = this;
  4362       return;
  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     }
  4363     }
  6797   }, {
  4364 
  6798     key: "render",
  4365     if (this.props.editsReference !== prevProps.editsReference) {
  6799     value: function render() {
  4366       this.needsAutosave = true;
  6800       return null;
       
  6801     }
  4367     }
  6802   }]);
  4368   }
  6803 
  4369 
  6804   return AutosaveMonitor;
  4370   componentWillUnmount() {
  6805 }(external_this_wp_element_["Component"]);
  4371     clearTimeout(this.timerId);
  6806 /* harmony default export */ var autosave_monitor = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, ownProps) {
  4372   }
  6807   var _select = select('core'),
  4373 
  6808       getReferenceByDistinctEdits = _select.getReferenceByDistinctEdits;
  4374   setAutosaveTimer(timeout = this.props.interval * 1000) {
  6809 
  4375     this.timerId = setTimeout(() => {
  6810   var _select2 = select('core/editor'),
  4376       this.autosaveTimerHandler();
  6811       isEditedPostDirty = _select2.isEditedPostDirty,
  4377     }, timeout);
  6812       isEditedPostAutosaveable = _select2.isEditedPostAutosaveable,
  4378   }
  6813       isAutosavingPost = _select2.isAutosavingPost,
  4379 
  6814       getEditorSettings = _select2.getEditorSettings;
  4380   autosaveTimerHandler() {
  6815 
  4381     if (!this.props.isAutosaveable) {
  6816   var _ownProps$interval = ownProps.interval,
  4382       this.setAutosaveTimer(1000);
  6817       interval = _ownProps$interval === void 0 ? getEditorSettings().autosaveInterval : _ownProps$interval;
  4383       return;
       
  4384     }
       
  4385 
       
  4386     if (this.needsAutosave) {
       
  4387       this.needsAutosave = false;
       
  4388       this.props.autosave();
       
  4389     }
       
  4390 
       
  4391     this.setAutosaveTimer();
       
  4392   }
       
  4393 
       
  4394   render() {
       
  4395     return null;
       
  4396   }
       
  4397 
       
  4398 }
       
  4399 /* harmony default export */ var autosave_monitor = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, ownProps) => {
       
  4400   const {
       
  4401     getReferenceByDistinctEdits
       
  4402   } = select('core');
       
  4403   const {
       
  4404     isEditedPostDirty,
       
  4405     isEditedPostAutosaveable,
       
  4406     isAutosavingPost,
       
  4407     getEditorSettings
       
  4408   } = select('core/editor');
       
  4409   const {
       
  4410     interval = getEditorSettings().autosaveInterval
       
  4411   } = ownProps;
  6818   return {
  4412   return {
       
  4413     editsReference: getReferenceByDistinctEdits(),
  6819     isDirty: isEditedPostDirty(),
  4414     isDirty: isEditedPostDirty(),
  6820     isAutosaveable: isEditedPostAutosaveable(),
  4415     isAutosaveable: isEditedPostAutosaveable(),
  6821     editsReference: getReferenceByDistinctEdits(),
       
  6822     isAutosaving: isAutosavingPost(),
  4416     isAutosaving: isAutosavingPost(),
  6823     interval: interval
  4417     interval
  6824   };
  4418   };
  6825 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
  4419 }), Object(external_wp_data_["withDispatch"])((dispatch, ownProps) => ({
  6826   return {
  4420   autosave() {
  6827     autosave: function autosave() {
  4421     const {
  6828       var _ownProps$autosave = ownProps.autosave,
  4422       autosave = dispatch('core/editor').autosave
  6829           autosave = _ownProps$autosave === void 0 ? dispatch('core/editor').autosave : _ownProps$autosave;
  4423     } = ownProps;
  6830       autosave();
  4424     autosave();
  6831     }
  4425   }
  6832   };
  4426 
  6833 })])(autosave_monitor_AutosaveMonitor));
  4427 }))])(autosave_monitor_AutosaveMonitor));
  6834 
  4428 
  6835 // EXTERNAL MODULE: ./node_modules/classnames/index.js
  4429 // EXTERNAL MODULE: ./node_modules/classnames/index.js
  6836 var classnames = __webpack_require__(11);
  4430 var classnames = __webpack_require__("TSYQ");
  6837 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  4431 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  6838 
  4432 
  6839 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js
  4433 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js
  6840 
  4434 
  6841 
  4435 
  6842 /**
  4436 /**
  6843  * External dependencies
  4437  * External dependencies
  6844  */
  4438  */
  6845 
  4439 
       
  4440 
       
  4441 const TableOfContentsItem = ({
       
  4442   children,
       
  4443   isValid,
       
  4444   level,
       
  4445   href,
       
  4446   onSelect
       
  4447 }) => Object(external_wp_element_["createElement"])("li", {
       
  4448   className: classnames_default()('document-outline__item', `is-${level.toLowerCase()}`, {
       
  4449     'is-invalid': !isValid
       
  4450   })
       
  4451 }, Object(external_wp_element_["createElement"])("a", {
       
  4452   href: href,
       
  4453   className: "document-outline__button",
       
  4454   onClick: onSelect
       
  4455 }, Object(external_wp_element_["createElement"])("span", {
       
  4456   className: "document-outline__emdash",
       
  4457   "aria-hidden": "true"
       
  4458 }), Object(external_wp_element_["createElement"])("strong", {
       
  4459   className: "document-outline__level"
       
  4460 }, level), Object(external_wp_element_["createElement"])("span", {
       
  4461   className: "document-outline__item-content"
       
  4462 }, children)));
       
  4463 
       
  4464 /* harmony default export */ var document_outline_item = (TableOfContentsItem);
       
  4465 
       
  4466 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/index.js
       
  4467 
       
  4468 
       
  4469 /**
       
  4470  * External dependencies
       
  4471  */
       
  4472 
  6846 /**
  4473 /**
  6847  * WordPress dependencies
  4474  * WordPress dependencies
  6848  */
  4475  */
  6849 
  4476 
  6850 
  4477 
  6851 
  4478 
  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 
  4479 
  6909 
  4480 
  6910 
  4481 
  6911 /**
  4482 /**
  6912  * Internal dependencies
  4483  * Internal dependencies
  6915 
  4486 
  6916 /**
  4487 /**
  6917  * Module constants
  4488  * Module constants
  6918  */
  4489  */
  6919 
  4490 
  6920 var emptyHeadingContent = Object(external_this_wp_element_["createElement"])("em", null, Object(external_this_wp_i18n_["__"])('(Empty heading)'));
  4491 const emptyHeadingContent = Object(external_wp_element_["createElement"])("em", null, Object(external_wp_i18n_["__"])('(Empty heading)'));
  6921 var incorrectLevelContent = [Object(external_this_wp_element_["createElement"])("br", {
  4492 const incorrectLevelContent = [Object(external_wp_element_["createElement"])("br", {
  6922   key: "incorrect-break"
  4493   key: "incorrect-break"
  6923 }), Object(external_this_wp_element_["createElement"])("em", {
  4494 }), Object(external_wp_element_["createElement"])("em", {
  6924   key: "incorrect-message"
  4495   key: "incorrect-message"
  6925 }, Object(external_this_wp_i18n_["__"])('(Incorrect heading level)'))];
  4496 }, Object(external_wp_i18n_["__"])('(Incorrect heading level)'))];
  6926 var singleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
  4497 const singleH1Headings = [Object(external_wp_element_["createElement"])("br", {
  6927   key: "incorrect-break-h1"
  4498   key: "incorrect-break-h1"
  6928 }), Object(external_this_wp_element_["createElement"])("em", {
  4499 }), Object(external_wp_element_["createElement"])("em", {
  6929   key: "incorrect-message-h1"
  4500   key: "incorrect-message-h1"
  6930 }, Object(external_this_wp_i18n_["__"])('(Your theme may already use a H1 for the post title)'))];
  4501 }, Object(external_wp_i18n_["__"])('(Your theme may already use a H1 for the post title)'))];
  6931 var multipleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
  4502 const multipleH1Headings = [Object(external_wp_element_["createElement"])("br", {
  6932   key: "incorrect-break-multiple-h1"
  4503   key: "incorrect-break-multiple-h1"
  6933 }), Object(external_this_wp_element_["createElement"])("em", {
  4504 }), Object(external_wp_element_["createElement"])("em", {
  6934   key: "incorrect-message-multiple-h1"
  4505   key: "incorrect-message-multiple-h1"
  6935 }, Object(external_this_wp_i18n_["__"])('(Multiple H1 headings are not recommended)'))];
  4506 }, Object(external_wp_i18n_["__"])('(Multiple H1 headings are not recommended)'))];
  6936 /**
  4507 /**
  6937  * Returns an array of heading blocks enhanced with the following properties:
  4508  * 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.
  4509  * level   - An integer with the heading level.
  6941  * isEmpty - Flag indicating if the heading has no content.
  4510  * isEmpty - Flag indicating if the heading has no content.
  6942  *
  4511  *
  6943  * @param {?Array} blocks An array of blocks.
  4512  * @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  *
  4513  *
  6946  * @return {Array} An array of heading blocks enhanced with the properties described above.
  4514  * @return {Array} An array of heading blocks enhanced with the properties described above.
  6947  */
  4515  */
  6948 
  4516 
  6949 var document_outline_computeOutlineHeadings = function computeOutlineHeadings() {
  4517 const computeOutlineHeadings = (blocks = []) => {
  6950   var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  4518   return Object(external_lodash_["flatMap"])(blocks, (block = {}) => {
  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') {
  4519     if (block.name === 'core/heading') {
  6956       return document_outline_objectSpread({}, block, {
  4520       return { ...block,
  6957         path: path,
       
  6958         level: block.attributes.level,
  4521         level: block.attributes.level,
  6959         isEmpty: isEmptyHeading(block)
  4522         isEmpty: isEmptyHeading(block)
  6960       });
  4523       };
  6961     }
  4524     }
  6962 
  4525 
  6963     return computeOutlineHeadings(block.innerBlocks, [].concat(Object(toConsumableArray["a" /* default */])(path), [block]));
  4526     return computeOutlineHeadings(block.innerBlocks);
  6964   });
  4527   });
  6965 };
  4528 };
  6966 
  4529 
  6967 var isEmptyHeading = function isEmptyHeading(heading) {
  4530 const isEmptyHeading = heading => !heading.attributes.content || heading.attributes.content.length === 0;
  6968   return !heading.attributes.content || heading.attributes.content.length === 0;
  4531 
  6969 };
  4532 const DocumentOutline = ({
  6970 
  4533   blocks = [],
  6971 var document_outline_DocumentOutline = function DocumentOutline(_ref) {
  4534   title,
  6972   var _ref$blocks = _ref.blocks,
  4535   onSelect,
  6973       blocks = _ref$blocks === void 0 ? [] : _ref$blocks,
  4536   isTitleSupported,
  6974       title = _ref.title,
  4537   hasOutlineItemsDisabled
  6975       onSelect = _ref.onSelect,
  4538 }) => {
  6976       isTitleSupported = _ref.isTitleSupported,
  4539   const headings = computeOutlineHeadings(blocks);
  6977       hasOutlineItemsDisabled = _ref.hasOutlineItemsDisabled;
       
  6978   var headings = document_outline_computeOutlineHeadings(blocks);
       
  6979 
  4540 
  6980   if (headings.length < 1) {
  4541   if (headings.length < 1) {
  6981     return null;
  4542     return null;
  6982   }
  4543   }
  6983 
  4544 
  6984   var prevHeadingLevel = 1; // Not great but it's the simplest way to locate the title right now.
  4545   let prevHeadingLevel = 1; // Not great but it's the simplest way to locate the title right now.
  6985 
  4546 
  6986   var titleNode = document.querySelector('.editor-post-title__input');
  4547   const titleNode = document.querySelector('.editor-post-title__input');
  6987   var hasTitle = isTitleSupported && title && titleNode;
  4548   const hasTitle = isTitleSupported && title && titleNode;
  6988   var countByLevel = Object(external_this_lodash_["countBy"])(headings, 'level');
  4549   const countByLevel = Object(external_lodash_["countBy"])(headings, 'level');
  6989   var hasMultipleH1 = countByLevel[1] > 1;
  4550   const hasMultipleH1 = countByLevel[1] > 1;
  6990   return Object(external_this_wp_element_["createElement"])("div", {
  4551   return Object(external_wp_element_["createElement"])("div", {
  6991     className: "document-outline"
  4552     className: "document-outline"
  6992   }, Object(external_this_wp_element_["createElement"])("ul", null, hasTitle && Object(external_this_wp_element_["createElement"])(document_outline_item, {
  4553   }, Object(external_wp_element_["createElement"])("ul", null, hasTitle && Object(external_wp_element_["createElement"])(document_outline_item, {
  6993     level: Object(external_this_wp_i18n_["__"])('Title'),
  4554     level: Object(external_wp_i18n_["__"])('Title'),
  6994     isValid: true,
  4555     isValid: true,
  6995     onSelect: onSelect,
  4556     onSelect: onSelect,
  6996     href: "#".concat(titleNode.id),
  4557     href: `#${titleNode.id}`,
  6997     isDisabled: hasOutlineItemsDisabled
  4558     isDisabled: hasOutlineItemsDisabled
  6998   }, title), headings.map(function (item, index) {
  4559   }, title), headings.map((item, index) => {
  6999     // Headings remain the same, go up by one, or down by any amount.
  4560     // Headings remain the same, go up by one, or down by any amount.
  7000     // Otherwise there are missing levels.
  4561     // Otherwise there are missing levels.
  7001     var isIncorrectLevel = item.level > prevHeadingLevel + 1;
  4562     const isIncorrectLevel = item.level > prevHeadingLevel + 1;
  7002     var isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
  4563     const isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
  7003     prevHeadingLevel = item.level;
  4564     prevHeadingLevel = item.level;
  7004     return Object(external_this_wp_element_["createElement"])(document_outline_item, {
  4565     return Object(external_wp_element_["createElement"])(document_outline_item, {
  7005       key: index,
  4566       key: index,
  7006       level: "H".concat(item.level),
  4567       level: `H${item.level}`,
  7007       isValid: isValid,
  4568       isValid: isValid,
  7008       path: item.path,
       
  7009       isDisabled: hasOutlineItemsDisabled,
  4569       isDisabled: hasOutlineItemsDisabled,
  7010       href: "#block-".concat(item.clientId),
  4570       href: `#block-${item.clientId}`,
  7011       onSelect: onSelect
  4571       onSelect: onSelect
  7012     }, item.isEmpty ? emptyHeadingContent : Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["create"])({
  4572     }, item.isEmpty ? emptyHeadingContent : Object(external_wp_richText_["getTextContent"])(Object(external_wp_richText_["create"])({
  7013       html: item.attributes.content
  4573       html: item.attributes.content
  7014     })), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
  4574     })), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
  7015   })));
  4575   })));
  7016 };
  4576 };
  7017 /* harmony default export */ var document_outline = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
  4577 /* harmony default export */ var document_outline = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
  7018   var _select = select('core/block-editor'),
  4578   const {
  7019       getBlocks = _select.getBlocks;
  4579     getBlocks
  7020 
  4580   } = select(external_wp_blockEditor_["store"]);
  7021   var _select2 = select('core/editor'),
  4581   const {
  7022       getEditedPostAttribute = _select2.getEditedPostAttribute;
  4582     getEditedPostAttribute
  7023 
  4583   } = select('core/editor');
  7024   var _select3 = select('core'),
  4584   const {
  7025       getPostType = _select3.getPostType;
  4585     getPostType
  7026 
  4586   } = select('core');
  7027   var postType = getPostType(getEditedPostAttribute('type'));
  4587   const postType = getPostType(getEditedPostAttribute('type'));
  7028   return {
  4588   return {
  7029     title: getEditedPostAttribute('title'),
  4589     title: getEditedPostAttribute('title'),
  7030     blocks: getBlocks(),
  4590     blocks: getBlocks(),
  7031     isTitleSupported: Object(external_this_lodash_["get"])(postType, ['supports', 'title'], false)
  4591     isTitleSupported: Object(external_lodash_["get"])(postType, ['supports', 'title'], false)
  7032   };
  4592   };
  7033 }))(document_outline_DocumentOutline));
  4593 }))(DocumentOutline));
  7034 
  4594 
  7035 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js
  4595 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js
  7036 /**
  4596 /**
  7037  * External dependencies
  4597  * External dependencies
  7038  */
  4598  */
  7041  * WordPress dependencies
  4601  * WordPress dependencies
  7042  */
  4602  */
  7043 
  4603 
  7044 
  4604 
  7045 
  4605 
  7046 function DocumentOutlineCheck(_ref) {
  4606 
  7047   var blocks = _ref.blocks,
  4607 function DocumentOutlineCheck({
  7048       children = _ref.children;
  4608   blocks,
  7049   var headings = Object(external_this_lodash_["filter"])(blocks, function (block) {
  4609   children
  7050     return block.name === 'core/heading';
  4610 }) {
  7051   });
  4611   const headings = Object(external_lodash_["filter"])(blocks, block => block.name === 'core/heading');
  7052 
  4612 
  7053   if (headings.length < 1) {
  4613   if (headings.length < 1) {
  7054     return null;
  4614     return null;
  7055   }
  4615   }
  7056 
  4616 
  7057   return children;
  4617   return children;
  7058 }
  4618 }
  7059 
  4619 
  7060 /* harmony default export */ var check = (Object(external_this_wp_data_["withSelect"])(function (select) {
  4620 /* harmony default export */ var check = (Object(external_wp_data_["withSelect"])(select => ({
  7061   return {
  4621   blocks: select(external_wp_blockEditor_["store"]).getBlocks()
  7062     blocks: select('core/block-editor').getBlocks()
  4622 }))(DocumentOutlineCheck));
  7063   };
  4623 
  7064 })(DocumentOutlineCheck));
  4624 // EXTERNAL MODULE: external ["wp","keyboardShortcuts"]
       
  4625 var external_wp_keyboardShortcuts_ = __webpack_require__("hF7m");
  7065 
  4626 
  7066 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/save-shortcut.js
  4627 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/save-shortcut.js
  7067 /**
  4628 /**
  7068  * WordPress dependencies
  4629  * WordPress dependencies
  7069  */
  4630  */
  7070 
  4631 
  7071 
  4632 
  7072 
  4633 
  7073 
  4634 
  7074 function SaveShortcut(_ref) {
  4635 function SaveShortcut({
  7075   var resetBlocksOnSave = _ref.resetBlocksOnSave;
  4636   resetBlocksOnSave
  7076 
  4637 }) {
  7077   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
  4638   const {
  7078       resetEditorBlocks = _useDispatch.resetEditorBlocks,
  4639     resetEditorBlocks,
  7079       savePost = _useDispatch.savePost;
  4640     savePost
  7080 
  4641   } = Object(external_wp_data_["useDispatch"])('core/editor');
  7081   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
  4642   const {
  7082     var _select = select('core/editor'),
  4643     isEditedPostDirty,
  7083         _isEditedPostDirty = _select.isEditedPostDirty,
  4644     getPostEdits
  7084         _getPostEdits = _select.getPostEdits;
  4645   } = Object(external_wp_data_["useSelect"])(select => {
  7085 
  4646     const {
       
  4647       isEditedPostDirty: _isEditedPostDirty,
       
  4648       getPostEdits: _getPostEdits
       
  4649     } = select('core/editor');
  7086     return {
  4650     return {
  7087       isEditedPostDirty: _isEditedPostDirty,
  4651       isEditedPostDirty: _isEditedPostDirty,
  7088       getPostEdits: _getPostEdits
  4652       getPostEdits: _getPostEdits
  7089     };
  4653     };
  7090   }, []),
  4654   }, []);
  7091       isEditedPostDirty = _useSelect.isEditedPostDirty,
  4655   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/editor/save', event => {
  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
  4656     event.preventDefault(); // TODO: This should be handled in the `savePost` effect in
  7096     // considering `isSaveable`. See note on `isEditedPostSaveable`
  4657     // considering `isSaveable`. See note on `isEditedPostSaveable`
  7097     // selector about dirtiness and meta-boxes.
  4658     // selector about dirtiness and meta-boxes.
  7098     //
  4659     //
  7099     // See: `isEditedPostSaveable`
  4660     // See: `isEditedPostSaveable`
  7105     // for the code editors blurs, but the shortcut can be used without
  4666     // for the code editors blurs, but the shortcut can be used without
  7106     // blurring the textarea.
  4667     // blurring the textarea.
  7107 
  4668 
  7108 
  4669 
  7109     if (resetBlocksOnSave) {
  4670     if (resetBlocksOnSave) {
  7110       var postEdits = getPostEdits();
  4671       const postEdits = getPostEdits();
  7111 
  4672 
  7112       if (postEdits.content && typeof postEdits.content === 'string') {
  4673       if (postEdits.content && typeof postEdits.content === 'string') {
  7113         var blocks = Object(external_this_wp_blocks_["parse"])(postEdits.content);
  4674         const blocks = Object(external_wp_blocks_["parse"])(postEdits.content);
  7114         resetEditorBlocks(blocks);
  4675         resetEditorBlocks(blocks);
  7115       }
  4676       }
  7116     }
  4677     }
  7117 
  4678 
  7118     savePost();
  4679     savePost();
  7131  * WordPress dependencies
  4692  * WordPress dependencies
  7132  */
  4693  */
  7133 
  4694 
  7134 
  4695 
  7135 
  4696 
  7136 
       
  7137 /**
  4697 /**
  7138  * Internal dependencies
  4698  * Internal dependencies
  7139  */
  4699  */
  7140 
  4700 
  7141 
  4701 
  7142 
  4702 
  7143 function VisualEditorGlobalKeyboardShortcuts() {
  4703 function VisualEditorGlobalKeyboardShortcuts() {
  7144   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
  4704   const {
  7145       redo = _useDispatch.redo,
  4705     redo,
  7146       undo = _useDispatch.undo;
  4706     undo
  7147 
  4707   } = Object(external_wp_data_["useDispatch"])('core/editor');
  7148   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/undo', function (event) {
  4708   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/editor/undo', event => {
  7149     undo();
  4709     undo();
  7150     event.preventDefault();
  4710     event.preventDefault();
  7151   }, {
  4711   }, {
  7152     bindGlobal: true
  4712     bindGlobal: true
  7153   });
  4713   });
  7154   Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/redo', function (event) {
  4714   Object(external_wp_keyboardShortcuts_["useShortcut"])('core/editor/redo', event => {
  7155     redo();
  4715     redo();
  7156     event.preventDefault();
  4716     event.preventDefault();
  7157   }, {
  4717   }, {
  7158     bindGlobal: true
  4718     bindGlobal: true
  7159   });
  4719   });
  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));
  4720   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockEditorKeyboardShortcuts"], null), Object(external_wp_element_["createElement"])(save_shortcut, null));
  7161 }
  4721 }
  7162 
  4722 
  7163 /* harmony default export */ var visual_editor_shortcuts = (VisualEditorGlobalKeyboardShortcuts);
  4723 /* 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 
  4724 
  7172 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/text-editor-shortcuts.js
  4725 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/text-editor-shortcuts.js
  7173 
  4726 
  7174 
  4727 
  7175 /**
  4728 /**
  7176  * Internal dependencies
  4729  * Internal dependencies
  7177  */
  4730  */
  7178 
  4731 
  7179 function TextEditorGlobalKeyboardShortcuts() {
  4732 function TextEditorGlobalKeyboardShortcuts() {
  7180   return Object(external_this_wp_element_["createElement"])(save_shortcut, {
  4733   return Object(external_wp_element_["createElement"])(save_shortcut, {
  7181     resetBlocksOnSave: true
  4734     resetBlocksOnSave: true
  7182   });
  4735   });
  7183 }
  4736 }
  7184 
  4737 
  7185 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/register-shortcuts.js
  4738 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/register-shortcuts.js
  7191 
  4744 
  7192 
  4745 
  7193 
  4746 
  7194 
  4747 
  7195 
  4748 
       
  4749 
  7196 function EditorKeyboardShortcutsRegister() {
  4750 function EditorKeyboardShortcutsRegister() {
  7197   // Registering the shortcuts
  4751   // Registering the shortcuts
  7198   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/keyboard-shortcuts'),
  4752   const {
  7199       registerShortcut = _useDispatch.registerShortcut;
  4753     registerShortcut
  7200 
  4754   } = Object(external_wp_data_["useDispatch"])(external_wp_keyboardShortcuts_["store"]);
  7201   Object(external_this_wp_element_["useEffect"])(function () {
  4755   Object(external_wp_element_["useEffect"])(() => {
  7202     registerShortcut({
  4756     registerShortcut({
  7203       name: 'core/editor/save',
  4757       name: 'core/editor/save',
  7204       category: 'global',
  4758       category: 'global',
  7205       description: Object(external_this_wp_i18n_["__"])('Save your changes.'),
  4759       description: Object(external_wp_i18n_["__"])('Save your changes.'),
  7206       keyCombination: {
  4760       keyCombination: {
  7207         modifier: 'primary',
  4761         modifier: 'primary',
  7208         character: 's'
  4762         character: 's'
  7209       }
  4763       }
  7210     });
  4764     });
  7211     registerShortcut({
  4765     registerShortcut({
  7212       name: 'core/editor/undo',
  4766       name: 'core/editor/undo',
  7213       category: 'global',
  4767       category: 'global',
  7214       description: Object(external_this_wp_i18n_["__"])('Undo your last changes.'),
  4768       description: Object(external_wp_i18n_["__"])('Undo your last changes.'),
  7215       keyCombination: {
  4769       keyCombination: {
  7216         modifier: 'primary',
  4770         modifier: 'primary',
  7217         character: 'z'
  4771         character: 'z'
  7218       }
  4772       }
  7219     });
  4773     });
  7220     registerShortcut({
  4774     registerShortcut({
  7221       name: 'core/editor/redo',
  4775       name: 'core/editor/redo',
  7222       category: 'global',
  4776       category: 'global',
  7223       description: Object(external_this_wp_i18n_["__"])('Redo your last undo.'),
  4777       description: Object(external_wp_i18n_["__"])('Redo your last undo.'),
  7224       keyCombination: {
  4778       keyCombination: {
  7225         modifier: 'primaryShift',
  4779         modifier: 'primaryShift',
  7226         character: 'z'
  4780         character: 'z'
  7227       }
  4781       }
  7228     });
  4782     });
  7229   }, [registerShortcut]);
  4783   }, [registerShortcut]);
  7230   return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"].Register, null);
  4784   return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockEditorKeyboardShortcuts"].Register, null);
  7231 }
  4785 }
  7232 
  4786 
  7233 /* harmony default export */ var register_shortcuts = (EditorKeyboardShortcutsRegister);
  4787 /* harmony default export */ var register_shortcuts = (EditorKeyboardShortcutsRegister);
  7234 
  4788 
  7235 // EXTERNAL MODULE: external {"this":["wp","components"]}
  4789 // EXTERNAL MODULE: external ["wp","components"]
  7236 var external_this_wp_components_ = __webpack_require__(3);
  4790 var external_wp_components_ = __webpack_require__("tI+e");
  7237 
  4791 
  7238 // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
  4792 // EXTERNAL MODULE: external ["wp","keycodes"]
  7239 var external_this_wp_keycodes_ = __webpack_require__(21);
  4793 var external_wp_keycodes_ = __webpack_require__("RxS6");
  7240 
  4794 
  7241 // EXTERNAL MODULE: external {"this":["wp","primitives"]}
  4795 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
  7242 var external_this_wp_primitives_ = __webpack_require__(6);
  4796 var library_redo = __webpack_require__("K2cm");
  7243 
  4797 
  7244 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
  4798 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
       
  4799 var library_undo = __webpack_require__("Ntru");
       
  4800 
       
  4801 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js
       
  4802 
  7245 
  4803 
  7246 
  4804 
  7247 /**
  4805 /**
  7248  * WordPress dependencies
  4806  * WordPress dependencies
  7249  */
  4807  */
  7250 
  4808 
  7251 var redo_redo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
  4809 
  7252   xmlns: "http://www.w3.org/2000/svg",
  4810 
  7253   viewBox: "0 0 24 24"
  4811 
  7254 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
  4812 
  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"
  4813 
  7256 }));
  4814 /**
  7257 /* harmony default export */ var library_redo = (redo_redo);
  4815  * Internal dependencies
  7258 
  4816  */
  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 
  4817 
  7271 
  4818 
  7272 
  4819 
  7273 function EditorHistoryRedo(props, ref) {
  4820 function EditorHistoryRedo(props, ref) {
  7274   var hasRedo = Object(external_this_wp_data_["useSelect"])(function (select) {
  4821   const hasRedo = Object(external_wp_data_["useSelect"])(select => select(store).hasEditorRedo(), []);
  7275     return select('core/editor').hasEditorRedo();
  4822   const {
  7276   }, []);
  4823     redo
  7277 
  4824   } = Object(external_wp_data_["useDispatch"])(store);
  7278   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
  4825   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
  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,
  4826     ref: ref,
  7283     icon: library_redo,
  4827     icon: !Object(external_wp_i18n_["isRTL"])() ? library_redo["a" /* default */] : library_undo["a" /* default */]
  7284     label: Object(external_this_wp_i18n_["__"])('Redo'),
  4828     /* translators: button label text should, if possible, be under 16 characters. */
  7285     shortcut: external_this_wp_keycodes_["displayShortcut"].primaryShift('z') // If there are no redo levels we don't want to actually disable this
  4829     ,
       
  4830     label: Object(external_wp_i18n_["__"])('Redo'),
       
  4831     shortcut: external_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.
  4832     // button, because it will remove focus for keyboard users.
  7287     // See: https://github.com/WordPress/gutenberg/issues/3486
  4833     // See: https://github.com/WordPress/gutenberg/issues/3486
  7288     ,
  4834     ,
  7289     "aria-disabled": !hasRedo,
  4835     "aria-disabled": !hasRedo,
  7290     onClick: hasRedo ? redo : undefined,
  4836     onClick: hasRedo ? redo : undefined,
  7291     className: "editor-history__redo"
  4837     className: "editor-history__redo"
  7292   }));
  4838   }));
  7293 }
  4839 }
  7294 
  4840 
  7295 /* harmony default export */ var editor_history_redo = (Object(external_this_wp_element_["forwardRef"])(EditorHistoryRedo));
  4841 /* harmony default export */ var editor_history_redo = (Object(external_wp_element_["forwardRef"])(EditorHistoryRedo));
  7296 
  4842 
  7297 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
  4843 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js
       
  4844 
  7298 
  4845 
  7299 
  4846 
  7300 /**
  4847 /**
  7301  * WordPress dependencies
  4848  * WordPress dependencies
  7302  */
  4849  */
  7303 
  4850 
  7304 var undo_undo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
  4851 
  7305   xmlns: "http://www.w3.org/2000/svg",
  4852 
  7306   viewBox: "0 0 24 24"
  4853 
  7307 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
  4854 
  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"
  4855 
  7309 }));
  4856 /**
  7310 /* harmony default export */ var library_undo = (undo_undo);
  4857  * Internal dependencies
  7311 
  4858  */
  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 
  4859 
  7324 
  4860 
  7325 
  4861 
  7326 function EditorHistoryUndo(props, ref) {
  4862 function EditorHistoryUndo(props, ref) {
  7327   var hasUndo = Object(external_this_wp_data_["useSelect"])(function (select) {
  4863   const hasUndo = Object(external_wp_data_["useSelect"])(select => select(store).hasEditorUndo(), []);
  7328     return select('core/editor').hasEditorUndo();
  4864   const {
  7329   }, []);
  4865     undo
  7330 
  4866   } = Object(external_wp_data_["useDispatch"])(store);
  7331   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
  4867   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
  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,
  4868     ref: ref,
  7336     icon: library_undo,
  4869     icon: !Object(external_wp_i18n_["isRTL"])() ? library_undo["a" /* default */] : library_redo["a" /* default */]
  7337     label: Object(external_this_wp_i18n_["__"])('Undo'),
  4870     /* translators: button label text should, if possible, be under 16 characters. */
  7338     shortcut: external_this_wp_keycodes_["displayShortcut"].primary('z') // If there are no undo levels we don't want to actually disable this
  4871     ,
       
  4872     label: Object(external_wp_i18n_["__"])('Undo'),
       
  4873     shortcut: external_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.
  4874     // button, because it will remove focus for keyboard users.
  7340     // See: https://github.com/WordPress/gutenberg/issues/3486
  4875     // See: https://github.com/WordPress/gutenberg/issues/3486
  7341     ,
  4876     ,
  7342     "aria-disabled": !hasUndo,
  4877     "aria-disabled": !hasUndo,
  7343     onClick: hasUndo ? undo : undefined,
  4878     onClick: hasUndo ? undo : undefined,
  7344     className: "editor-history__undo"
  4879     className: "editor-history__undo"
  7345   }));
  4880   }));
  7346 }
  4881 }
  7347 
  4882 
  7348 /* harmony default export */ var editor_history_undo = (Object(external_this_wp_element_["forwardRef"])(EditorHistoryUndo));
  4883 /* harmony default export */ var editor_history_undo = (Object(external_wp_element_["forwardRef"])(EditorHistoryUndo));
  7349 
  4884 
  7350 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js
  4885 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js
  7351 
  4886 
  7352 
  4887 
  7353 
       
  7354 /**
  4888 /**
  7355  * WordPress dependencies
  4889  * WordPress dependencies
  7356  */
  4890  */
  7357 
  4891 
  7358 
  4892 
  7359 
  4893 
  7360 
  4894 
  7361 
  4895 
  7362 function TemplateValidationNotice(_ref) {
  4896 
  7363   var isValid = _ref.isValid,
  4897 function TemplateValidationNotice({
  7364       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isValid"]);
  4898   isValid,
  7365 
  4899   ...props
       
  4900 }) {
  7366   if (isValid) {
  4901   if (isValid) {
  7367     return null;
  4902     return null;
  7368   }
  4903   }
  7369 
  4904 
  7370   var confirmSynchronization = function confirmSynchronization() {
  4905   const confirmSynchronization = () => {
  7371     if ( // eslint-disable-next-line no-alert
  4906     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?'))) {
  4907     window.confirm(Object(external_wp_i18n_["__"])('Resetting the template may result in loss of content, do you want to continue?'))) {
  7373       props.synchronizeTemplate();
  4908       props.synchronizeTemplate();
  7374     }
  4909     }
  7375   };
  4910   };
  7376 
  4911 
  7377   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
  4912   return Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
  7378     className: "editor-template-validation-notice",
  4913     className: "editor-template-validation-notice",
  7379     isDismissible: false,
  4914     isDismissible: false,
  7380     status: "warning",
  4915     status: "warning",
  7381     actions: [{
  4916     actions: [{
  7382       label: Object(external_this_wp_i18n_["__"])('Keep it as is'),
  4917       label: Object(external_wp_i18n_["__"])('Keep it as is'),
  7383       onClick: props.resetTemplateValidity
  4918       onClick: props.resetTemplateValidity
  7384     }, {
  4919     }, {
  7385       label: Object(external_this_wp_i18n_["__"])('Reset the template'),
  4920       label: Object(external_wp_i18n_["__"])('Reset the template'),
  7386       onClick: confirmSynchronization,
  4921       onClick: confirmSynchronization
  7387       isPrimary: true
       
  7388     }]
  4922     }]
  7389   }, Object(external_this_wp_i18n_["__"])('The content of your post doesn’t match the template assigned to your post type.'));
  4923   }, Object(external_wp_i18n_["__"])('The content of your post doesn’t match the template assigned to your post type.'));
  7390 }
  4924 }
  7391 
  4925 
  7392 /* harmony default export */ var template_validation_notice = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  4926 /* harmony default export */ var template_validation_notice = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => ({
       
  4927   isValid: select(external_wp_blockEditor_["store"]).isValidTemplate()
       
  4928 })), Object(external_wp_data_["withDispatch"])(dispatch => {
       
  4929   const {
       
  4930     setTemplateValidity,
       
  4931     synchronizeTemplate
       
  4932   } = dispatch(external_wp_blockEditor_["store"]);
  7393   return {
  4933   return {
  7394     isValid: select('core/block-editor').isValidTemplate()
  4934     resetTemplateValidity: () => setTemplateValidity(true),
  7395   };
  4935     synchronizeTemplate
  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   };
  4936   };
  7407 })])(TemplateValidationNotice));
  4937 })])(TemplateValidationNotice));
  7408 
  4938 
  7409 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js
  4939 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js
  7410 
  4940 
  7418  */
  4948  */
  7419 
  4949 
  7420 
  4950 
  7421 
  4951 
  7422 
  4952 
       
  4953 
  7423 /**
  4954 /**
  7424  * Internal dependencies
  4955  * Internal dependencies
  7425  */
  4956  */
  7426 
  4957 
  7427 
  4958 
  7428 function EditorNotices(_ref) {
  4959 function EditorNotices({
  7429   var notices = _ref.notices,
  4960   notices,
  7430       onRemove = _ref.onRemove;
  4961   onRemove
  7431   var dismissibleNotices = Object(external_this_lodash_["filter"])(notices, {
  4962 }) {
       
  4963   const dismissibleNotices = Object(external_lodash_["filter"])(notices, {
  7432     isDismissible: true,
  4964     isDismissible: true,
  7433     type: 'default'
  4965     type: 'default'
  7434   });
  4966   });
  7435   var nonDismissibleNotices = Object(external_this_lodash_["filter"])(notices, {
  4967   const nonDismissibleNotices = Object(external_lodash_["filter"])(notices, {
  7436     isDismissible: false,
  4968     isDismissible: false,
  7437     type: 'default'
  4969     type: 'default'
  7438   });
  4970   });
  7439   var snackbarNotices = Object(external_this_lodash_["filter"])(notices, {
  4971   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["NoticeList"], {
  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,
  4972     notices: nonDismissibleNotices,
  7444     className: "components-editor-notices__pinned"
  4973     className: "components-editor-notices__pinned"
  7445   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
  4974   }), Object(external_wp_element_["createElement"])(external_wp_components_["NoticeList"], {
  7446     notices: dismissibleNotices,
  4975     notices: dismissibleNotices,
  7447     className: "components-editor-notices__dismissible",
  4976     className: "components-editor-notices__dismissible",
  7448     onRemove: onRemove
  4977     onRemove: onRemove
  7449   }, Object(external_this_wp_element_["createElement"])(template_validation_notice, null)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SnackbarList"], {
  4978   }, Object(external_wp_element_["createElement"])(template_validation_notice, null)));
       
  4979 }
       
  4980 /* harmony default export */ var editor_notices = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => ({
       
  4981   notices: select(external_wp_notices_["store"]).getNotices()
       
  4982 })), Object(external_wp_data_["withDispatch"])(dispatch => ({
       
  4983   onRemove: dispatch(external_wp_notices_["store"]).removeNotice
       
  4984 }))])(EditorNotices));
       
  4985 
       
  4986 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-snackbars/index.js
       
  4987 
       
  4988 
       
  4989 /**
       
  4990  * External dependencies
       
  4991  */
       
  4992 
       
  4993 /**
       
  4994  * WordPress dependencies
       
  4995  */
       
  4996 
       
  4997 
       
  4998 
       
  4999 
       
  5000 function EditorSnackbars() {
       
  5001   const notices = Object(external_wp_data_["useSelect"])(select => select(external_wp_notices_["store"]).getNotices(), []);
       
  5002   const {
       
  5003     removeNotice
       
  5004   } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
       
  5005   const snackbarNotices = Object(external_lodash_["filter"])(notices, {
       
  5006     type: 'snackbar'
       
  5007   });
       
  5008   return Object(external_wp_element_["createElement"])(external_wp_components_["SnackbarList"], {
  7450     notices: snackbarNotices,
  5009     notices: snackbarNotices,
  7451     className: "components-editor-notices__snackbar",
  5010     className: "components-editor-notices__snackbar",
  7452     onRemove: onRemove
  5011     onRemove: removeNotice
  7453   }));
  5012   });
  7454 }
  5013 }
  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 
  5014 
  7465 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
  5015 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
  7466 var library_close = __webpack_require__(154);
  5016 var library_close = __webpack_require__("w95h");
  7467 
       
  7468 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
       
  7469 var layout = __webpack_require__(298);
       
  7470 
  5017 
  7471 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
  5018 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
  7472 
  5019 
  7473 
  5020 
  7474 /**
  5021 /**
  7475  * WordPress dependencies
  5022  * WordPress dependencies
  7476  */
  5023  */
  7477 
  5024 
  7478 var page_page = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
  5025 const page_page = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  7479   xmlns: "http://www.w3.org/2000/svg",
  5026   xmlns: "http://www.w3.org/2000/svg",
  7480   viewBox: "0 0 24 24"
  5027   viewBox: "0 0 24 24"
  7481 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
  5028 }, Object(external_wp_element_["createElement"])(external_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"
  5029   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 }));
  5030 }));
  7484 /* harmony default export */ var library_page = (page_page);
  5031 /* harmony default export */ var library_page = (page_page);
  7485 
  5032 
  7486 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js
       
  7487 var grid = __webpack_require__(302);
       
  7488 
       
  7489 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
       
  7490 var block_default = __webpack_require__(202);
       
  7491 
       
  7492 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-record-item.js
  5033 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-record-item.js
  7493 
  5034 
  7494 
  5035 
  7495 /**
  5036 /**
  7496  * WordPress dependencies
  5037  * WordPress dependencies
  7497  */
  5038  */
  7498 
  5039 
  7499 
  5040 
  7500 
  5041 
  7501 
  5042 
  7502 function EntityRecordItem(_ref) {
  5043 
  7503   var record = _ref.record,
  5044 function EntityRecordItem({
  7504       checked = _ref.checked,
  5045   record,
  7505       onChange = _ref.onChange,
  5046   checked,
  7506       closePanel = _ref.closePanel;
  5047   onChange,
  7507   var name = record.name,
  5048   closePanel
  7508       kind = record.kind,
  5049 }) {
  7509       title = record.title,
  5050   const {
  7510       key = record.key;
  5051     name,
  7511   var parentBlockId = Object(external_this_wp_data_["useSelect"])(function (select) {
  5052     kind,
       
  5053     title,
       
  5054     key
       
  5055   } = record;
       
  5056   const parentBlockId = Object(external_wp_data_["useSelect"])(select => {
  7512     var _blocks$;
  5057     var _blocks$;
  7513 
  5058 
  7514     // Get entity's blocks.
  5059     // Get entity's blocks.
  7515     var _select$getEditedEnti = select('core').getEditedEntityRecord(kind, name, key),
  5060     const {
  7516         _select$getEditedEnti2 = _select$getEditedEnti.blocks,
  5061       blocks = []
  7517         blocks = _select$getEditedEnti2 === void 0 ? [] : _select$getEditedEnti2; // Get parents of the entity's first block.
  5062     } = select('core').getEditedEntityRecord(kind, name, key); // Get parents of the entity's first block.
  7518 
  5063 
  7519 
  5064     const parents = select(external_wp_blockEditor_["store"]).getBlockParents((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.clientId); // Return closest parent block's clientId.
  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 
  5065 
  7522     return parents[parents.length - 1];
  5066     return parents[parents.length - 1];
  7523   }, []);
  5067   }, []); // Handle templates that might use default descriptive titles
  7524   var isSelected = Object(external_this_wp_data_["useSelect"])(function (select) {
  5068 
  7525     var selectedBlockId = select('core/block-editor').getSelectedBlockClientId();
  5069   const entityRecordTitle = Object(external_wp_data_["useSelect"])(select => {
       
  5070     if ('postType' !== kind || 'wp_template' !== name) {
       
  5071       return title;
       
  5072     }
       
  5073 
       
  5074     const template = select('core').getEditedEntityRecord(kind, name, key);
       
  5075     return select('core/editor').__experimentalGetTemplateInfo(template).title;
       
  5076   }, [name, kind, title, key]);
       
  5077   const isSelected = Object(external_wp_data_["useSelect"])(select => {
       
  5078     const selectedBlockId = select(external_wp_blockEditor_["store"]).getSelectedBlockClientId();
  7526     return selectedBlockId === parentBlockId;
  5079     return selectedBlockId === parentBlockId;
  7527   }, [parentBlockId]);
  5080   }, [parentBlockId]);
  7528   var isSelectedText = isSelected ? Object(external_this_wp_i18n_["__"])('Selected') : Object(external_this_wp_i18n_["__"])('Select');
  5081   const isSelectedText = isSelected ? Object(external_wp_i18n_["__"])('Selected') : Object(external_wp_i18n_["__"])('Select');
  7529 
  5082   const {
  7530   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
  5083     selectBlock
  7531       selectBlock = _useDispatch.selectBlock;
  5084   } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
  7532 
  5085   const selectParentBlock = Object(external_wp_element_["useCallback"])(() => selectBlock(parentBlockId), [parentBlockId]);
  7533   var selectParentBlock = Object(external_this_wp_element_["useCallback"])(function () {
  5086   const selectAndDismiss = Object(external_wp_element_["useCallback"])(() => {
  7534     return selectBlock(parentBlockId);
       
  7535   }, [parentBlockId]);
       
  7536   var selectAndDismiss = Object(external_this_wp_element_["useCallback"])(function () {
       
  7537     selectBlock(parentBlockId);
  5087     selectBlock(parentBlockId);
  7538     closePanel();
  5088     closePanel();
  7539   }, [parentBlockId]);
  5089   }, [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"], {
  5090   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelRow"], null, Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
  7541     label: Object(external_this_wp_element_["createElement"])("strong", null, title || Object(external_this_wp_i18n_["__"])('Untitled')),
  5091     label: Object(external_wp_element_["createElement"])("strong", null, entityRecordTitle || Object(external_wp_i18n_["__"])('Untitled')),
  7542     checked: checked,
  5092     checked: checked,
  7543     onChange: onChange
  5093     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"], {
  5094   }), parentBlockId ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  7545     onClick: selectParentBlock,
  5095     onClick: selectParentBlock,
  7546     className: "entities-saved-states__find-entity",
  5096     className: "entities-saved-states__find-entity",
  7547     disabled: isSelected
  5097     disabled: isSelected
  7548   }, isSelectedText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  5098   }, isSelectedText), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  7549     onClick: selectAndDismiss,
  5099     onClick: selectAndDismiss,
  7550     className: "entities-saved-states__find-entity-small",
  5100     className: "entities-saved-states__find-entity-small",
  7551     disabled: isSelected
  5101     disabled: isSelected
  7552   }, isSelectedText)) : null);
  5102   }, isSelectedText)) : null);
  7553 }
  5103 }
  7564  */
  5114  */
  7565 
  5115 
  7566 
  5116 
  7567 
  5117 
  7568 
  5118 
       
  5119 
  7569 /**
  5120 /**
  7570  * Internal dependencies
  5121  * Internal dependencies
  7571  */
  5122  */
  7572 
  5123 
  7573 
  5124 
  7574 var ENTITY_NAME_ICONS = {
  5125 const ENTITY_NAME_ICONS = {
  7575   site: layout["a" /* default */],
  5126   site: layout["a" /* default */],
  7576   page: library_page,
  5127   page: library_page
  7577   post: grid["a" /* default */],
       
  7578   wp_template: grid["a" /* default */]
       
  7579 };
  5128 };
  7580 function EntityTypeList(_ref) {
  5129 function EntityTypeList({
  7581   var list = _ref.list,
  5130   list,
  7582       unselectedEntities = _ref.unselectedEntities,
  5131   unselectedEntities,
  7583       setUnselectedEntities = _ref.setUnselectedEntities,
  5132   setUnselectedEntities,
  7584       closePanel = _ref.closePanel;
  5133   closePanel
  7585   var firstRecord = list[0];
  5134 }) {
  7586   var entity = Object(external_this_wp_data_["useSelect"])(function (select) {
  5135   const firstRecord = list[0];
  7587     return select('core').getEntity(firstRecord.kind, firstRecord.name);
  5136   const entity = Object(external_wp_data_["useSelect"])(select => select(external_wp_coreData_["store"]).getEntity(firstRecord.kind, firstRecord.name), [firstRecord.kind, firstRecord.name]); // Set icon based on type of entity.
  7588   }, [firstRecord.kind, firstRecord.name]); // Set icon based on type of entity.
  5137 
  7589 
  5138   const {
  7590   var name = firstRecord.name;
  5139     name
  7591   var icon = ENTITY_NAME_ICONS[name] || block_default["a" /* default */];
  5140   } = firstRecord;
  7592   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
  5141   const icon = ENTITY_NAME_ICONS[name];
       
  5142   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
  7593     title: entity.label,
  5143     title: entity.label,
  7594     initialOpen: true,
  5144     initialOpen: true,
  7595     icon: icon
  5145     icon: icon
  7596   }, list.map(function (record) {
  5146   }, list.map(record => {
  7597     return Object(external_this_wp_element_["createElement"])(EntityRecordItem, {
  5147     return Object(external_wp_element_["createElement"])(EntityRecordItem, {
  7598       key: record.key || 'site',
  5148       key: record.key || record.property,
  7599       record: record,
  5149       record: record,
  7600       checked: !Object(external_this_lodash_["some"])(unselectedEntities, function (elt) {
  5150       checked: !Object(external_lodash_["some"])(unselectedEntities, elt => elt.kind === record.kind && elt.name === record.name && elt.key === record.key && elt.property === record.property),
  7601         return elt.kind === record.kind && elt.name === record.name && elt.key === record.key;
  5151       onChange: value => setUnselectedEntities(record, value),
  7602       }),
       
  7603       onChange: function onChange(value) {
       
  7604         return setUnselectedEntities(record, value);
       
  7605       },
       
  7606       closePanel: closePanel
  5152       closePanel: closePanel
  7607     });
  5153     });
  7608   }));
  5154   }));
  7609 }
  5155 }
  7610 
  5156 
  7611 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/index.js
  5157 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/index.js
  7612 
  5158 
  7613 
  5159 
  7614 
  5160 
  7615 
       
  7616 /**
  5161 /**
  7617  * External dependencies
  5162  * External dependencies
  7618  */
  5163  */
  7619 
  5164 
  7620 /**
  5165 /**
  7624 
  5169 
  7625 
  5170 
  7626 
  5171 
  7627 
  5172 
  7628 
  5173 
       
  5174 
       
  5175 
  7629 /**
  5176 /**
  7630  * Internal dependencies
  5177  * Internal dependencies
  7631  */
  5178  */
  7632 
  5179 
  7633 
  5180 
  7634 var ENTITY_NAMES = {
  5181 const TRANSLATED_SITE_PROTPERTIES = {
  7635   wp_template_part: function wp_template_part(number) {
  5182   title: Object(external_wp_i18n_["__"])('Title'),
  7636     return Object(external_this_wp_i18n_["_n"])('template part', 'template parts', number);
  5183   description: Object(external_wp_i18n_["__"])('Tagline'),
  7637   },
  5184   site_logo: Object(external_wp_i18n_["__"])('Logo'),
  7638   wp_template: function wp_template(number) {
  5185   show_on_front: Object(external_wp_i18n_["__"])('Show on front'),
  7639     return Object(external_this_wp_i18n_["_n"])('template', 'templates', number);
  5186   page_on_front: Object(external_wp_i18n_["__"])('Page on front')
  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 };
  5187 };
  7651 var PLACEHOLDER_PHRASES = {
  5188 function EntitiesSavedStates({
  7652   // 0 is a back up, but should never be observed.
  5189   close
  7653   0: Object(external_this_wp_i18n_["__"])('There are no changes.'),
  5190 }) {
  7654 
  5191   const saveButtonRef = Object(external_wp_element_["useRef"])();
  7655   /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
  5192   const {
  7656   1: Object(external_this_wp_i18n_["__"])('Changes have been made to your %s.'),
  5193     dirtyEntityRecords
  7657 
  5194   } = Object(external_wp_data_["useSelect"])(select => {
  7658   /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
  5195     const dirtyRecords = select(external_wp_coreData_["store"]).__experimentalGetDirtyEntityRecords(); // Remove site object and decouple into its edited pieces.
  7659   2: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s and %2$s.'),
  5196 
  7660 
  5197 
  7661   /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
  5198     const dirtyRecordsWithoutSite = dirtyRecords.filter(record => !(record.kind === 'root' && record.name === 'site'));
  7662   3: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, and %3$s.'),
  5199     const siteEdits = select(external_wp_coreData_["store"]).getEntityRecordEdits('root', 'site');
  7663 
  5200     const siteEditsAsEntities = [];
  7664   /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
  5201 
  7665   4: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, %3$s, and %4$s.'),
  5202     for (const property in siteEdits) {
  7666 
  5203       siteEditsAsEntities.push({
  7667   /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
  5204         kind: 'root',
  7668   5: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.')
  5205         name: 'site',
  7669 };
  5206         title: TRANSLATED_SITE_PROTPERTIES[property] || property,
  7670 function EntitiesSavedStates(_ref) {
  5207         property
  7671   var isOpen = _ref.isOpen,
  5208       });
  7672       close = _ref.close;
  5209     }
  7673 
  5210 
  7674   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
  5211     const dirtyRecordsWithSiteItems = [...dirtyRecordsWithoutSite, ...siteEditsAsEntities];
  7675     return {
  5212     return {
  7676       dirtyEntityRecords: select('core').__experimentalGetDirtyEntityRecords()
  5213       dirtyEntityRecords: dirtyRecordsWithSiteItems
  7677     };
  5214     };
  7678   }, []),
  5215   }, []);
  7679       dirtyEntityRecords = _useSelect.dirtyEntityRecords;
  5216   const {
  7680 
  5217     saveEditedEntityRecord,
  7681   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core'),
  5218     __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
  7682       saveEditedEntityRecord = _useDispatch.saveEditedEntityRecord; // To group entities by type.
  5219   } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]); // To group entities by type.
  7683 
  5220 
  7684 
  5221   const partitionedSavables = Object.values(Object(external_lodash_["groupBy"])(dirtyEntityRecords, 'name')); // Unchecked entities to be ignored by save function.
  7685   var partitionedSavables = Object.values(Object(external_this_lodash_["groupBy"])(dirtyEntityRecords, 'name')); // Get labels for text-prompt phrase.
  5222 
  7686 
  5223   const [unselectedEntities, _setUnselectedEntities] = Object(external_wp_element_["useState"])([]);
  7687   var entityNamesForPrompt = [];
  5224 
  7688   partitionedSavables.forEach(function (list) {
  5225   const setUnselectedEntities = ({
  7689     if (ENTITY_NAMES[list[0].name]) {
  5226     kind,
  7690       entityNamesForPrompt.push(ENTITY_NAMES[list[0].name](list.length));
  5227     name,
  7691     }
  5228     key,
  7692   }); // Get text-prompt phrase based on number of entity types changed.
  5229     property
  7693 
  5230   }, checked) => {
  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) {
  5231     if (checked) {
  7711       _setUnselectedEntities(unselectedEntities.filter(function (elt) {
  5232       _setUnselectedEntities(unselectedEntities.filter(elt => elt.kind !== kind || elt.name !== name || elt.key !== key || elt.property !== property));
  7712         return elt.kind !== kind || elt.name !== name || elt.key !== key;
       
  7713       }));
       
  7714     } else {
  5233     } else {
  7715       _setUnselectedEntities([].concat(Object(toConsumableArray["a" /* default */])(unselectedEntities), [{
  5234       _setUnselectedEntities([...unselectedEntities, {
  7716         kind: kind,
  5235         kind,
  7717         name: name,
  5236         name,
  7718         key: key
  5237         key,
  7719       }]));
  5238         property
       
  5239       }]);
  7720     }
  5240     }
  7721   };
  5241   };
  7722 
  5242 
  7723   var saveCheckedEntities = function saveCheckedEntities() {
  5243   const saveCheckedEntities = () => {
  7724     var entitiesToSave = dirtyEntityRecords.filter(function (_ref3) {
  5244     const entitiesToSave = dirtyEntityRecords.filter(({
  7725       var kind = _ref3.kind,
  5245       kind,
  7726           name = _ref3.name,
  5246       name,
  7727           key = _ref3.key;
  5247       key,
  7728       return !Object(external_this_lodash_["some"])(unselectedEntities, function (elt) {
  5248       property
  7729         return elt.kind === kind && elt.name === name && elt.key === key;
  5249     }) => {
  7730       });
  5250       return !Object(external_lodash_["some"])(unselectedEntities, elt => elt.kind === kind && elt.name === name && elt.key === key && elt.property === property);
  7731     });
  5251     });
  7732     close(entitiesToSave);
  5252     close(entitiesToSave);
  7733     entitiesToSave.forEach(function (_ref4) {
  5253     const siteItemsToSave = [];
  7734       var kind = _ref4.kind,
  5254     entitiesToSave.forEach(({
  7735           name = _ref4.name,
  5255       kind,
  7736           key = _ref4.key;
  5256       name,
  7737       saveEditedEntityRecord(kind, name, key);
  5257       key,
       
  5258       property
       
  5259     }) => {
       
  5260       if ('root' === kind && 'site' === name) {
       
  5261         siteItemsToSave.push(property);
       
  5262       } else {
       
  5263         saveEditedEntityRecord(kind, name, key);
       
  5264       }
  7738     });
  5265     });
  7739   };
  5266     saveSpecifiedEntityEdits('root', 'site', undefined, siteItemsToSave);
  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
  5267   }; // 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.
  5268   // its own will use the event object in place of the expected saved entities.
  7752 
  5269 
  7753 
  5270 
  7754   var dismissPanel = Object(external_this_wp_element_["useCallback"])(function () {
  5271   const dismissPanel = Object(external_wp_element_["useCallback"])(() => close(), [close]);
  7755     return close();
  5272   const [saveDialogRef, saveDialogProps] = Object(external_wp_compose_["__experimentalUseDialog"])({
  7756   }, [close]);
  5273     onClose: () => dismissPanel()
  7757   return isOpen ? Object(external_this_wp_element_["createElement"])("div", {
  5274   });
       
  5275   return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
       
  5276     ref: saveDialogRef
       
  5277   }, saveDialogProps, {
  7758     className: "entities-saved-states__panel"
  5278     className: "entities-saved-states__panel"
  7759   }, Object(external_this_wp_element_["createElement"])("div", {
  5279   }), Object(external_wp_element_["createElement"])("div", {
  7760     className: "entities-saved-states__panel-header"
  5280     className: "entities-saved-states__panel-header"
  7761   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  5281   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
  5282     ref: saveButtonRef,
  7762     isPrimary: true,
  5283     isPrimary: true,
  7763     disabled: dirtyEntityRecords.length - unselectedEntities.length === 0,
  5284     disabled: dirtyEntityRecords.length - unselectedEntities.length === 0,
  7764     onClick: saveCheckedEntities,
  5285     onClick: saveCheckedEntities,
  7765     className: "editor-entities-saved-states__save-button"
  5286     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"], {
  5287   }, Object(external_wp_i18n_["__"])('Save')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
  5288     icon: library_close["a" /* default */],
  7767     onClick: dismissPanel,
  5289     onClick: dismissPanel,
  7768     icon: library_close["a" /* default */],
  5290     label: Object(external_wp_i18n_["__"])('Close panel')
  7769     label: Object(external_this_wp_i18n_["__"])('Close panel')
  5291   })), Object(external_wp_element_["createElement"])("div", {
  7770   })), Object(external_this_wp_element_["createElement"])("div", {
       
  7771     className: "entities-saved-states__text-prompt"
  5292     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"], {
  5293   }, Object(external_wp_element_["createElement"])("strong", null, Object(external_wp_i18n_["__"])('Select the changes you want to save')), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Some changes may affect other areas of your site.'))), partitionedSavables.map(list => {
  7773     onClick: toggleIsReviewing,
  5294     return Object(external_wp_element_["createElement"])(EntityTypeList, {
  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,
  5295       key: list[0].name,
  7779       list: list,
  5296       list: list,
  7780       closePanel: dismissPanel,
  5297       closePanel: dismissPanel,
  7781       unselectedEntities: unselectedEntities,
  5298       unselectedEntities: unselectedEntities,
  7782       setUnselectedEntities: setUnselectedEntities
  5299       setUnselectedEntities: setUnselectedEntities
  7783     });
  5300     });
  7784   })) : null;
  5301   }));
  7785 }
  5302 }
  7786 
       
  7787 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
       
  7788 var assertThisInitialized = __webpack_require__(12);
       
  7789 
  5303 
  7790 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js
  5304 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js
  7791 
  5305 
  7792 
  5306 
  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 /**
  5307 /**
  7804  * WordPress dependencies
  5308  * WordPress dependencies
  7805  */
  5309  */
  7806 
  5310 
  7807 
  5311 
  7808 
  5312 
  7809 
  5313 
  7810 
  5314 
  7811 
  5315 
  7812 var error_boundary_ErrorBoundary = /*#__PURE__*/function (_Component) {
  5316 
  7813   Object(inherits["a" /* default */])(ErrorBoundary, _Component);
  5317 function CopyButton({
  7814 
  5318   text,
  7815   var _super = error_boundary_createSuper(ErrorBoundary);
  5319   children
  7816 
  5320 }) {
  7817   function ErrorBoundary() {
  5321   const ref = Object(external_wp_compose_["useCopyToClipboard"])(text);
  7818     var _this;
  5322   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  7819 
  5323     isSecondary: true,
  7820     Object(classCallCheck["a" /* default */])(this, ErrorBoundary);
  5324     ref: ref
  7821 
  5325   }, children);
  7822     _this = _super.apply(this, arguments);
  5326 }
  7823     _this.reboot = _this.reboot.bind(Object(assertThisInitialized["a" /* default */])(_this));
  5327 
  7824     _this.getContent = _this.getContent.bind(Object(assertThisInitialized["a" /* default */])(_this));
  5328 class error_boundary_ErrorBoundary extends external_wp_element_["Component"] {
  7825     _this.state = {
  5329   constructor() {
       
  5330     super(...arguments);
       
  5331     this.reboot = this.reboot.bind(this);
       
  5332     this.getContent = this.getContent.bind(this);
       
  5333     this.state = {
  7826       error: null
  5334       error: null
  7827     };
  5335     };
  7828     return _this;
  5336   }
  7829   }
  5337 
  7830 
  5338   componentDidCatch(error) {
  7831   Object(createClass["a" /* default */])(ErrorBoundary, [{
  5339     this.setState({
  7832     key: "componentDidCatch",
  5340       error
  7833     value: function componentDidCatch(error) {
  5341     });
  7834       this.setState({
  5342   }
  7835         error: error
  5343 
  7836       });
  5344   reboot() {
       
  5345     this.props.onError();
       
  5346   }
       
  5347 
       
  5348   getContent() {
       
  5349     try {
       
  5350       // While `select` in a component is generally discouraged, it is
       
  5351       // used here because it (a) reduces the chance of data loss in the
       
  5352       // case of additional errors by performing a direct retrieval and
       
  5353       // (b) avoids the performance cost associated with unnecessary
       
  5354       // content serialization throughout the lifetime of a non-erroring
       
  5355       // application.
       
  5356       return Object(external_wp_data_["select"])('core/editor').getEditedPostContent();
       
  5357     } catch (error) {}
       
  5358   }
       
  5359 
       
  5360   render() {
       
  5361     const {
       
  5362       error
       
  5363     } = this.state;
       
  5364 
       
  5365     if (!error) {
       
  5366       return this.props.children;
  7837     }
  5367     }
  7838   }, {
  5368 
  7839     key: "reboot",
  5369     return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], {
  7840     value: function reboot() {
  5370       className: "editor-error-boundary",
  7841       this.props.onError();
  5371       actions: [Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  7842     }
  5372         key: "recovery",
  7843   }, {
  5373         onClick: this.reboot,
  7844     key: "getContent",
  5374         isSecondary: true
  7845     value: function getContent() {
  5375       }, Object(external_wp_i18n_["__"])('Attempt Recovery')), Object(external_wp_element_["createElement"])(CopyButton, {
  7846       try {
  5376         key: "copy-post",
  7847         // While `select` in a component is generally discouraged, it is
  5377         text: this.getContent
  7848         // used here because it (a) reduces the chance of data loss in the
  5378       }, Object(external_wp_i18n_["__"])('Copy Post Text')), Object(external_wp_element_["createElement"])(CopyButton, {
  7849         // case of additional errors by performing a direct retrieval and
  5379         key: "copy-error",
  7850         // (b) avoids the performance cost associated with unnecessary
  5380         text: error.stack
  7851         // content serialization throughout the lifetime of a non-erroring
  5381       }, Object(external_wp_i18n_["__"])('Copy Error'))]
  7852         // application.
  5382     }, Object(external_wp_i18n_["__"])('The editor has encountered an unexpected error.'));
  7853         return Object(external_this_wp_data_["select"])('core/editor').getEditedPostContent();
  5383   }
  7854       } catch (error) {}
  5384 
  7855     }
  5385 }
  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 
  5386 
  7887 /* harmony default export */ var error_boundary = (error_boundary_ErrorBoundary);
  5387 /* harmony default export */ var error_boundary = (error_boundary_ErrorBoundary);
  7888 
  5388 
  7889 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/local-autosave-monitor/index.js
  5389 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/local-autosave-monitor/index.js
  7890 
  5390 
  7900 
  5400 
  7901 
  5401 
  7902 
  5402 
  7903 
  5403 
  7904 
  5404 
       
  5405 
  7905 /**
  5406 /**
  7906  * Internal dependencies
  5407  * Internal dependencies
  7907  */
  5408  */
  7908 
  5409 
  7909 
  5410 
  7910 
  5411 
  7911 var requestIdleCallback = window.requestIdleCallback ? window.requestIdleCallback : window.requestAnimationFrame;
  5412 const requestIdleCallback = window.requestIdleCallback ? window.requestIdleCallback : window.requestAnimationFrame;
  7912 /**
  5413 /**
  7913  * Function which returns true if the current environment supports browser
  5414  * Function which returns true if the current environment supports browser
  7914  * sessionStorage, or false otherwise. The result of this function is cached and
  5415  * sessionStorage, or false otherwise. The result of this function is cached and
  7915  * reused in subsequent invocations.
  5416  * reused in subsequent invocations.
  7916  */
  5417  */
  7917 
  5418 
  7918 var hasSessionStorageSupport = Object(external_this_lodash_["once"])(function () {
  5419 const hasSessionStorageSupport = Object(external_lodash_["once"])(() => {
  7919   try {
  5420   try {
  7920     // Private Browsing in Safari 10 and earlier will throw an error when
  5421     // Private Browsing in Safari 10 and earlier will throw an error when
  7921     // attempting to set into sessionStorage. The test here is intentional in
  5422     // attempting to set into sessionStorage. The test here is intentional in
  7922     // causing a thrown error as condition bailing from local autosave.
  5423     // causing a thrown error as condition bailing from local autosave.
  7923     window.sessionStorage.setItem('__wpEditorTestSessionStorage', '');
  5424     window.sessionStorage.setItem('__wpEditorTestSessionStorage', '');
  7931  * Custom hook which manages the creation of a notice prompting the user to
  5432  * Custom hook which manages the creation of a notice prompting the user to
  7932  * restore a local autosave, if one exists.
  5433  * restore a local autosave, if one exists.
  7933  */
  5434  */
  7934 
  5435 
  7935 function useAutosaveNotice() {
  5436 function useAutosaveNotice() {
  7936   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
  5437   const {
  7937     return {
  5438     postId,
  7938       postId: select('core/editor').getCurrentPostId(),
  5439     isEditedPostNew,
  7939       getEditedPostAttribute: select('core/editor').getEditedPostAttribute,
  5440     hasRemoteAutosave
  7940       hasRemoteAutosave: !!select('core/editor').getEditorSettings().autosave
  5441   } = Object(external_wp_data_["useSelect"])(select => ({
  7941     };
  5442     postId: select('core/editor').getCurrentPostId(),
  7942   }, []),
  5443     isEditedPostNew: select('core/editor').isEditedPostNew(),
  7943       postId = _useSelect.postId,
  5444     getEditedPostAttribute: select('core/editor').getEditedPostAttribute,
  7944       getEditedPostAttribute = _useSelect.getEditedPostAttribute,
  5445     hasRemoteAutosave: !!select('core/editor').getEditorSettings().autosave
  7945       hasRemoteAutosave = _useSelect.hasRemoteAutosave;
  5446   }), []);
  7946 
  5447   const {
  7947   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
  5448     getEditedPostAttribute
  7948       createWarningNotice = _useDispatch.createWarningNotice,
  5449   } = Object(external_wp_data_["useSelect"])('core/editor');
  7949       removeNotice = _useDispatch.removeNotice;
  5450   const {
  7950 
  5451     createWarningNotice,
  7951   var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/editor'),
  5452     removeNotice
  7952       editPost = _useDispatch2.editPost,
  5453   } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
  7953       resetEditorBlocks = _useDispatch2.resetEditorBlocks;
  5454   const {
  7954 
  5455     editPost,
  7955   Object(external_this_wp_element_["useEffect"])(function () {
  5456     resetEditorBlocks
  7956     var localAutosave = localAutosaveGet(postId);
  5457   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
  5458   Object(external_wp_element_["useEffect"])(() => {
       
  5459     let localAutosave = localAutosaveGet(postId, isEditedPostNew);
  7957 
  5460 
  7958     if (!localAutosave) {
  5461     if (!localAutosave) {
  7959       return;
  5462       return;
  7960     }
  5463     }
  7961 
  5464 
  7964     } catch (error) {
  5467     } catch (error) {
  7965       // Not usable if it can't be parsed.
  5468       // Not usable if it can't be parsed.
  7966       return;
  5469       return;
  7967     }
  5470     }
  7968 
  5471 
  7969     var _localAutosave = localAutosave,
  5472     const {
  7970         title = _localAutosave.post_title,
  5473       post_title: title,
  7971         content = _localAutosave.content,
  5474       content,
  7972         excerpt = _localAutosave.excerpt;
  5475       excerpt
  7973     var edits = {
  5476     } = localAutosave;
  7974       title: title,
  5477     const edits = {
  7975       content: content,
  5478       title,
  7976       excerpt: excerpt
  5479       content,
       
  5480       excerpt
  7977     };
  5481     };
  7978     {
  5482     {
  7979       // Only display a notice if there is a difference between what has been
  5483       // Only display a notice if there is a difference between what has been
  7980       // saved and that which is stored in sessionStorage.
  5484       // saved and that which is stored in sessionStorage.
  7981       var hasDifference = Object.keys(edits).some(function (key) {
  5485       const hasDifference = Object.keys(edits).some(key => {
  7982         return edits[key] !== getEditedPostAttribute(key);
  5486         return edits[key] !== getEditedPostAttribute(key);
  7983       });
  5487       });
  7984 
  5488 
  7985       if (!hasDifference) {
  5489       if (!hasDifference) {
  7986         // If there is no difference, it can be safely ejected from storage.
  5490         // If there is no difference, it can be safely ejected from storage.
  7987         localAutosaveClear(postId);
  5491         localAutosaveClear(postId, isEditedPostNew);
  7988         return;
  5492         return;
  7989       }
  5493       }
  7990     }
  5494     }
  7991 
  5495 
  7992     if (hasRemoteAutosave) {
  5496     if (hasRemoteAutosave) {
  7993       return;
  5497       return;
  7994     }
  5498     }
  7995 
  5499 
  7996     var noticeId = Object(external_this_lodash_["uniqueId"])('wpEditorAutosaveRestore');
  5500     const noticeId = Object(external_lodash_["uniqueId"])('wpEditorAutosaveRestore');
  7997     createWarningNotice(Object(external_this_wp_i18n_["__"])('The backup of this post in your browser is different from the version below.'), {
  5501     createWarningNotice(Object(external_wp_i18n_["__"])('The backup of this post in your browser is different from the version below.'), {
  7998       id: noticeId,
  5502       id: noticeId,
  7999       actions: [{
  5503       actions: [{
  8000         label: Object(external_this_wp_i18n_["__"])('Restore the backup'),
  5504         label: Object(external_wp_i18n_["__"])('Restore the backup'),
  8001         onClick: function onClick() {
  5505 
  8002           editPost(Object(external_this_lodash_["omit"])(edits, ['content']));
  5506         onClick() {
  8003           resetEditorBlocks(Object(external_this_wp_blocks_["parse"])(edits.content));
  5507           editPost(Object(external_lodash_["omit"])(edits, ['content']));
       
  5508           resetEditorBlocks(Object(external_wp_blocks_["parse"])(edits.content));
  8004           removeNotice(noticeId);
  5509           removeNotice(noticeId);
  8005         }
  5510         }
       
  5511 
  8006       }]
  5512       }]
  8007     });
  5513     });
  8008   }, [postId]);
  5514   }, [isEditedPostNew, postId]);
  8009 }
  5515 }
  8010 /**
  5516 /**
  8011  * Custom hook which ejects a local autosave after a successful save occurs.
  5517  * Custom hook which ejects a local autosave after a successful save occurs.
  8012  */
  5518  */
  8013 
  5519 
  8014 
  5520 
  8015 function useAutosavePurge() {
  5521 function useAutosavePurge() {
  8016   var _useSelect2 = Object(external_this_wp_data_["useSelect"])(function (select) {
  5522   const {
  8017     return {
  5523     postId,
  8018       postId: select('core/editor').getCurrentPostId(),
  5524     isEditedPostNew,
  8019       isDirty: select('core/editor').isEditedPostDirty(),
  5525     isDirty,
  8020       isAutosaving: select('core/editor').isAutosavingPost(),
  5526     isAutosaving,
  8021       didError: select('core/editor').didPostSaveRequestFail()
  5527     didError
  8022     };
  5528   } = Object(external_wp_data_["useSelect"])(select => ({
  8023   }, []),
  5529     postId: select('core/editor').getCurrentPostId(),
  8024       postId = _useSelect2.postId,
  5530     isEditedPostNew: select('core/editor').isEditedPostNew(),
  8025       isDirty = _useSelect2.isDirty,
  5531     isDirty: select('core/editor').isEditedPostDirty(),
  8026       isAutosaving = _useSelect2.isAutosaving,
  5532     isAutosaving: select('core/editor').isAutosavingPost(),
  8027       didError = _useSelect2.didError;
  5533     didError: select('core/editor').didPostSaveRequestFail()
  8028 
  5534   }), []);
  8029   var lastIsDirty = Object(external_this_wp_element_["useRef"])(isDirty);
  5535   const lastIsDirty = Object(external_wp_element_["useRef"])(isDirty);
  8030   var lastIsAutosaving = Object(external_this_wp_element_["useRef"])(isAutosaving);
  5536   const lastIsAutosaving = Object(external_wp_element_["useRef"])(isAutosaving);
  8031   Object(external_this_wp_element_["useEffect"])(function () {
  5537   Object(external_wp_element_["useEffect"])(() => {
  8032     if (!didError && (lastIsAutosaving.current && !isAutosaving || lastIsDirty.current && !isDirty)) {
  5538     if (!didError && (lastIsAutosaving.current && !isAutosaving || lastIsDirty.current && !isDirty)) {
  8033       localAutosaveClear(postId);
  5539       localAutosaveClear(postId, isEditedPostNew);
  8034     }
  5540     }
  8035 
  5541 
  8036     lastIsDirty.current = isDirty;
  5542     lastIsDirty.current = isDirty;
  8037     lastIsAutosaving.current = isAutosaving;
  5543     lastIsAutosaving.current = isAutosaving;
  8038   }, [isDirty, isAutosaving, didError]);
  5544   }, [isDirty, isAutosaving, didError]); // Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.
       
  5545 
       
  5546   const wasEditedPostNew = Object(external_wp_compose_["usePrevious"])(isEditedPostNew);
       
  5547   const prevPostId = Object(external_wp_compose_["usePrevious"])(postId);
       
  5548   Object(external_wp_element_["useEffect"])(() => {
       
  5549     if (prevPostId === postId && wasEditedPostNew && !isEditedPostNew) {
       
  5550       localAutosaveClear(postId, true);
       
  5551     }
       
  5552   }, [isEditedPostNew, postId]);
  8039 }
  5553 }
  8040 
  5554 
  8041 function LocalAutosaveMonitor() {
  5555 function LocalAutosaveMonitor() {
  8042   var _useDispatch3 = Object(external_this_wp_data_["useDispatch"])('core/editor'),
  5556   const {
  8043       __experimentalLocalAutosave = _useDispatch3.__experimentalLocalAutosave;
  5557     autosave
  8044 
  5558   } = Object(external_wp_data_["useDispatch"])('core/editor');
  8045   var autosave = Object(external_this_wp_element_["useCallback"])(function () {
  5559   const deferedAutosave = Object(external_wp_element_["useCallback"])(() => {
  8046     requestIdleCallback(__experimentalLocalAutosave);
  5560     requestIdleCallback(() => autosave({
       
  5561       local: true
       
  5562     }));
  8047   }, []);
  5563   }, []);
  8048   useAutosaveNotice();
  5564   useAutosaveNotice();
  8049   useAutosavePurge();
  5565   useAutosavePurge();
  8050 
  5566   const {
  8051   var _useSelect3 = Object(external_this_wp_data_["useSelect"])(function (select) {
  5567     localAutosaveInterval
  8052     return {
  5568   } = Object(external_wp_data_["useSelect"])(select => ({
  8053       localAutosaveInterval: select('core/editor').getEditorSettings().__experimentalLocalAutosaveInterval
  5569     localAutosaveInterval: select('core/editor').getEditorSettings().__experimentalLocalAutosaveInterval
  8054     };
  5570   }), []);
  8055   }, []),
  5571   return Object(external_wp_element_["createElement"])(autosave_monitor, {
  8056       localAutosaveInterval = _useSelect3.localAutosaveInterval;
       
  8057 
       
  8058   return Object(external_this_wp_element_["createElement"])(autosave_monitor, {
       
  8059     interval: localAutosaveInterval,
  5572     interval: localAutosaveInterval,
  8060     autosave: autosave,
  5573     autosave: deferedAutosave
  8061     shouldThrottle: true
       
  8062   });
  5574   });
  8063 }
  5575 }
  8064 
  5576 
  8065 /* harmony default export */ var local_autosave_monitor = (Object(external_this_wp_compose_["ifCondition"])(hasSessionStorageSupport)(LocalAutosaveMonitor));
  5577 /* harmony default export */ var local_autosave_monitor = (Object(external_wp_compose_["ifCondition"])(hasSessionStorageSupport)(LocalAutosaveMonitor));
  8066 
  5578 
  8067 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/check.js
  5579 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/check.js
  8068 /**
  5580 /**
  8069  * External dependencies
  5581  * External dependencies
  8070  */
  5582  */
  8072 /**
  5584 /**
  8073  * WordPress dependencies
  5585  * WordPress dependencies
  8074  */
  5586  */
  8075 
  5587 
  8076 
  5588 
  8077 function PageAttributesCheck(_ref) {
  5589 
  8078   var availableTemplates = _ref.availableTemplates,
  5590 /**
  8079       postType = _ref.postType,
  5591  * Internal dependencies
  8080       children = _ref.children;
  5592  */
  8081   var supportsPageAttributes = Object(external_this_lodash_["get"])(postType, ['supports', 'page-attributes'], false); // Only render fields if post type supports page attributes or available templates exist.
  5593 
  8082 
  5594 
  8083   if (!supportsPageAttributes && Object(external_this_lodash_["isEmpty"])(availableTemplates)) {
  5595 function PageAttributesCheck({
       
  5596   children
       
  5597 }) {
       
  5598   const postType = Object(external_wp_data_["useSelect"])(select => {
       
  5599     const {
       
  5600       getEditedPostAttribute
       
  5601     } = select(store);
       
  5602     const {
       
  5603       getPostType
       
  5604     } = select(external_wp_coreData_["store"]);
       
  5605     return getPostType(getEditedPostAttribute('type'));
       
  5606   }, []);
       
  5607   const supportsPageAttributes = Object(external_lodash_["get"])(postType, ['supports', 'page-attributes'], false); // Only render fields if post type supports page attributes or available templates exist.
       
  5608 
       
  5609   if (!supportsPageAttributes) {
  8084     return null;
  5610     return null;
  8085   }
  5611   }
  8086 
  5612 
  8087   return children;
  5613   return children;
  8088 }
  5614 }
  8089 /* harmony default export */ var page_attributes_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
  5615 /* harmony default export */ var page_attributes_check = (PageAttributesCheck);
  8090   var _select = select('core/editor'),
       
  8091       getEditedPostAttribute = _select.getEditedPostAttribute,
       
  8092       getEditorSettings = _select.getEditorSettings;
       
  8093 
       
  8094   var _select2 = select('core'),
       
  8095       getPostType = _select2.getPostType;
       
  8096 
       
  8097   var _getEditorSettings = getEditorSettings(),
       
  8098       availableTemplates = _getEditorSettings.availableTemplates;
       
  8099 
       
  8100   return {
       
  8101     postType: getPostType(getEditedPostAttribute('type')),
       
  8102     availableTemplates: availableTemplates
       
  8103   };
       
  8104 })(PageAttributesCheck));
       
  8105 
  5616 
  8106 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js
  5617 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js
  8107 /**
  5618 /**
  8108  * External dependencies
  5619  * External dependencies
  8109  */
  5620  */
  8125  *                                                                   to test.
  5636  *                                                                   to test.
  8126  *
  5637  *
  8127  * @return {WPComponent} The component to be rendered.
  5638  * @return {WPComponent} The component to be rendered.
  8128  */
  5639  */
  8129 
  5640 
  8130 function PostTypeSupportCheck(_ref) {
  5641 function PostTypeSupportCheck({
  8131   var postType = _ref.postType,
  5642   postType,
  8132       children = _ref.children,
  5643   children,
  8133       supportKeys = _ref.supportKeys;
  5644   supportKeys
  8134   var isSupported = true;
  5645 }) {
       
  5646   let isSupported = true;
  8135 
  5647 
  8136   if (postType) {
  5648   if (postType) {
  8137     isSupported = Object(external_this_lodash_["some"])(Object(external_this_lodash_["castArray"])(supportKeys), function (key) {
  5649     isSupported = Object(external_lodash_["some"])(Object(external_lodash_["castArray"])(supportKeys), key => !!postType.supports[key]);
  8138       return !!postType.supports[key];
       
  8139     });
       
  8140   }
  5650   }
  8141 
  5651 
  8142   if (!isSupported) {
  5652   if (!isSupported) {
  8143     return null;
  5653     return null;
  8144   }
  5654   }
  8145 
  5655 
  8146   return children;
  5656   return children;
  8147 }
  5657 }
  8148 /* harmony default export */ var post_type_support_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
  5658 /* harmony default export */ var post_type_support_check = (Object(external_wp_data_["withSelect"])(select => {
  8149   var _select = select('core/editor'),
  5659   const {
  8150       getEditedPostAttribute = _select.getEditedPostAttribute;
  5660     getEditedPostAttribute
  8151 
  5661   } = select('core/editor');
  8152   var _select2 = select('core'),
  5662   const {
  8153       getPostType = _select2.getPostType;
  5663     getPostType
  8154 
  5664   } = select('core');
  8155   return {
  5665   return {
  8156     postType: getPostType(getEditedPostAttribute('type'))
  5666     postType: getPostType(getEditedPostAttribute('type'))
  8157   };
  5667   };
  8158 })(PostTypeSupportCheck));
  5668 })(PostTypeSupportCheck));
  8159 
  5669 
  8175 /**
  5685 /**
  8176  * Internal dependencies
  5686  * Internal dependencies
  8177  */
  5687  */
  8178 
  5688 
  8179 
  5689 
  8180 var PageAttributesOrder = Object(external_this_wp_compose_["withState"])({
  5690 const PageAttributesOrder = Object(external_wp_compose_["withState"])({
  8181   orderInput: null
  5691   orderInput: null
  8182 })(function (_ref) {
  5692 })(({
  8183   var onUpdateOrder = _ref.onUpdateOrder,
  5693   onUpdateOrder,
  8184       _ref$order = _ref.order,
  5694   order = 0,
  8185       order = _ref$order === void 0 ? 0 : _ref$order,
  5695   orderInput,
  8186       orderInput = _ref.orderInput,
  5696   setState
  8187       setState = _ref.setState;
  5697 }) => {
  8188 
  5698   const setUpdatedOrder = value => {
  8189   var setUpdatedOrder = function setUpdatedOrder(value) {
       
  8190     setState({
  5699     setState({
  8191       orderInput: value
  5700       orderInput: value
  8192     });
  5701     });
  8193     var newOrder = Number(value);
  5702     const newOrder = Number(value);
  8194 
  5703 
  8195     if (Number.isInteger(newOrder) && Object(external_this_lodash_["invoke"])(value, ['trim']) !== '') {
  5704     if (Number.isInteger(newOrder) && Object(external_lodash_["invoke"])(value, ['trim']) !== '') {
  8196       onUpdateOrder(Number(value));
  5705       onUpdateOrder(Number(value));
  8197     }
  5706     }
  8198   };
  5707   };
  8199 
  5708 
  8200   var value = orderInput === null ? order : orderInput;
  5709   const value = orderInput === null ? order : orderInput;
  8201   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
  5710   return Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
  8202     className: "editor-page-attributes__order",
  5711     className: "editor-page-attributes__order",
  8203     type: "number",
  5712     type: "number",
  8204     label: Object(external_this_wp_i18n_["__"])('Order'),
  5713     label: Object(external_wp_i18n_["__"])('Order'),
  8205     value: value,
  5714     value: value,
  8206     onChange: setUpdatedOrder,
  5715     onChange: setUpdatedOrder,
  8207     size: 6,
  5716     size: 6,
  8208     onBlur: function onBlur() {
  5717     onBlur: () => {
  8209       setState({
  5718       setState({
  8210         orderInput: null
  5719         orderInput: null
  8211       });
  5720       });
  8212     }
  5721     }
  8213   });
  5722   });
  8214 });
  5723 });
  8215 
  5724 
  8216 function PageAttributesOrderWithChecks(props) {
  5725 function PageAttributesOrderWithChecks(props) {
  8217   return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
  5726   return Object(external_wp_element_["createElement"])(post_type_support_check, {
  8218     supportKeys: "page-attributes"
  5727     supportKeys: "page-attributes"
  8219   }, Object(external_this_wp_element_["createElement"])(PageAttributesOrder, props));
  5728   }, Object(external_wp_element_["createElement"])(PageAttributesOrder, props));
  8220 }
  5729 }
  8221 
  5730 
  8222 /* harmony default export */ var page_attributes_order = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  5731 /* harmony default export */ var page_attributes_order = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
  8223   return {
  5732   return {
  8224     order: select('core/editor').getEditedPostAttribute('menu_order')
  5733     order: select('core/editor').getEditedPostAttribute('menu_order')
  8225   };
  5734   };
  8226 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  5735 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
  8227   return {
  5736   onUpdateOrder(order) {
  8228     onUpdateOrder: function onUpdateOrder(order) {
  5737     dispatch('core/editor').editPost({
  8229       dispatch('core/editor').editPost({
  5738       menu_order: order
  8230         menu_order: order
  5739     });
       
  5740   }
       
  5741 
       
  5742 }))])(PageAttributesOrderWithChecks));
       
  5743 
       
  5744 // EXTERNAL MODULE: external ["wp","htmlEntities"]
       
  5745 var external_wp_htmlEntities_ = __webpack_require__("rmEH");
       
  5746 
       
  5747 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/terms.js
       
  5748 /**
       
  5749  * External dependencies
       
  5750  */
       
  5751 
       
  5752 /**
       
  5753  * Returns terms in a tree form.
       
  5754  *
       
  5755  * @param {Array} flatTerms  Array of terms in flat format.
       
  5756  *
       
  5757  * @return {Array} Array of terms in tree format.
       
  5758  */
       
  5759 
       
  5760 function buildTermsTree(flatTerms) {
       
  5761   const flatTermsWithParentAndChildren = flatTerms.map(term => {
       
  5762     return {
       
  5763       children: [],
       
  5764       parent: null,
       
  5765       ...term
       
  5766     };
       
  5767   });
       
  5768   const termsByParent = Object(external_lodash_["groupBy"])(flatTermsWithParentAndChildren, 'parent');
       
  5769 
       
  5770   if (termsByParent.null && termsByParent.null.length) {
       
  5771     return flatTermsWithParentAndChildren;
       
  5772   }
       
  5773 
       
  5774   const fillWithChildren = terms => {
       
  5775     return terms.map(term => {
       
  5776       const children = termsByParent[term.id];
       
  5777       return { ...term,
       
  5778         children: children && children.length ? fillWithChildren(children) : []
       
  5779       };
       
  5780     });
       
  5781   };
       
  5782 
       
  5783   return fillWithChildren(termsByParent['0'] || []);
       
  5784 } // Lodash unescape function handles &#39; but not &#039; which may be return in some API requests.
       
  5785 
       
  5786 const unescapeString = arg => {
       
  5787   return Object(external_lodash_["unescape"])(arg.replace('&#039;', "'"));
       
  5788 };
       
  5789 /**
       
  5790  * Returns a term object with name unescaped.
       
  5791  * The unescape of the name property is done using lodash unescape function.
       
  5792  *
       
  5793  * @param {Object} term The term object to unescape.
       
  5794  *
       
  5795  * @return {Object} Term object with name property unescaped.
       
  5796  */
       
  5797 
       
  5798 const unescapeTerm = term => {
       
  5799   return { ...term,
       
  5800     name: unescapeString(term.name)
       
  5801   };
       
  5802 };
       
  5803 /**
       
  5804  * Returns an array of term objects with names unescaped.
       
  5805  * The unescape of each term is performed using the unescapeTerm function.
       
  5806  *
       
  5807  * @param {Object[]} terms Array of term objects to unescape.
       
  5808  *
       
  5809  * @return {Object[]} Array of term objects unescaped.
       
  5810  */
       
  5811 
       
  5812 const unescapeTerms = terms => {
       
  5813   return Object(external_lodash_["map"])(terms, unescapeTerm);
       
  5814 };
       
  5815 
       
  5816 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/parent.js
       
  5817 
       
  5818 
       
  5819 /**
       
  5820  * External dependencies
       
  5821  */
       
  5822 
       
  5823 /**
       
  5824  * WordPress dependencies
       
  5825  */
       
  5826 
       
  5827 
       
  5828 
       
  5829 
       
  5830 
       
  5831 
       
  5832 /**
       
  5833  * Internal dependencies
       
  5834  */
       
  5835 
       
  5836 
       
  5837 
       
  5838 function getTitle(post) {
       
  5839   var _post$title;
       
  5840 
       
  5841   return post !== null && post !== void 0 && (_post$title = post.title) !== null && _post$title !== void 0 && _post$title.rendered ? Object(external_wp_htmlEntities_["decodeEntities"])(post.title.rendered) : `#${post.id} (${Object(external_wp_i18n_["__"])('no title')})`;
       
  5842 }
       
  5843 
       
  5844 const getItemPriority = (name, searchValue) => {
       
  5845   const normalizedName = Object(external_lodash_["deburr"])(name).toLowerCase();
       
  5846   const normalizedSearch = Object(external_lodash_["deburr"])(searchValue).toLowerCase();
       
  5847 
       
  5848   if (normalizedName === normalizedSearch) {
       
  5849     return 0;
       
  5850   }
       
  5851 
       
  5852   if (normalizedName.startsWith(normalizedSearch)) {
       
  5853     return normalizedName.length;
       
  5854   }
       
  5855 
       
  5856   return Infinity;
       
  5857 };
       
  5858 function PageAttributesParent() {
       
  5859   const {
       
  5860     editPost
       
  5861   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
  5862   const [fieldValue, setFieldValue] = Object(external_wp_element_["useState"])(false);
       
  5863   const {
       
  5864     parentPost,
       
  5865     parentPostId,
       
  5866     items,
       
  5867     postType
       
  5868   } = Object(external_wp_data_["useSelect"])(select => {
       
  5869     const {
       
  5870       getPostType,
       
  5871       getEntityRecords,
       
  5872       getEntityRecord
       
  5873     } = select('core');
       
  5874     const {
       
  5875       getCurrentPostId,
       
  5876       getEditedPostAttribute
       
  5877     } = select('core/editor');
       
  5878     const postTypeSlug = getEditedPostAttribute('type');
       
  5879     const pageId = getEditedPostAttribute('parent');
       
  5880     const pType = getPostType(postTypeSlug);
       
  5881     const postId = getCurrentPostId();
       
  5882     const isHierarchical = Object(external_lodash_["get"])(pType, ['hierarchical'], false);
       
  5883     const query = {
       
  5884       per_page: 100,
       
  5885       exclude: postId,
       
  5886       parent_exclude: postId,
       
  5887       orderby: 'menu_order',
       
  5888       order: 'asc',
       
  5889       _fields: 'id,title,parent'
       
  5890     }; // Perform a search when the field is changed.
       
  5891 
       
  5892     if (!!fieldValue) {
       
  5893       query.search = fieldValue;
       
  5894     }
       
  5895 
       
  5896     return {
       
  5897       parentPostId: pageId,
       
  5898       parentPost: pageId ? getEntityRecord('postType', postTypeSlug, pageId) : null,
       
  5899       items: isHierarchical ? getEntityRecords('postType', postTypeSlug, query) : [],
       
  5900       postType: pType
       
  5901     };
       
  5902   }, [fieldValue]);
       
  5903   const isHierarchical = Object(external_lodash_["get"])(postType, ['hierarchical'], false);
       
  5904   const parentPageLabel = Object(external_lodash_["get"])(postType, ['labels', 'parent_item_colon']);
       
  5905   const pageItems = items || [];
       
  5906   const parentOptions = Object(external_wp_element_["useMemo"])(() => {
       
  5907     const getOptionsFromTree = (tree, level = 0) => {
       
  5908       const mappedNodes = tree.map(treeNode => [{
       
  5909         value: treeNode.id,
       
  5910         label: Object(external_lodash_["repeat"])('— ', level) + Object(external_lodash_["unescape"])(treeNode.name),
       
  5911         rawName: treeNode.name
       
  5912       }, ...getOptionsFromTree(treeNode.children || [], level + 1)]);
       
  5913       const sortedNodes = mappedNodes.sort(([a], [b]) => {
       
  5914         const priorityA = getItemPriority(a.rawName, fieldValue);
       
  5915         const priorityB = getItemPriority(b.rawName, fieldValue);
       
  5916         return priorityA >= priorityB ? 1 : -1;
       
  5917       });
       
  5918       return Object(external_lodash_["flatten"])(sortedNodes);
       
  5919     };
       
  5920 
       
  5921     let tree = pageItems.map(item => ({
       
  5922       id: item.id,
       
  5923       parent: item.parent,
       
  5924       name: getTitle(item)
       
  5925     })); // Only build a hierarchical tree when not searching.
       
  5926 
       
  5927     if (!fieldValue) {
       
  5928       tree = buildTermsTree(tree);
       
  5929     }
       
  5930 
       
  5931     const opts = getOptionsFromTree(tree); // Ensure the current parent is in the options list.
       
  5932 
       
  5933     const optsHasParent = Object(external_lodash_["find"])(opts, item => item.value === parentPostId);
       
  5934 
       
  5935     if (parentPost && !optsHasParent) {
       
  5936       opts.unshift({
       
  5937         value: parentPostId,
       
  5938         label: getTitle(parentPost)
  8231       });
  5939       });
  8232     }
  5940     }
       
  5941 
       
  5942     return opts;
       
  5943   }, [pageItems, fieldValue]);
       
  5944 
       
  5945   if (!isHierarchical || !parentPageLabel) {
       
  5946     return null;
       
  5947   }
       
  5948   /**
       
  5949    * Handle user input.
       
  5950    *
       
  5951    * @param {string} inputValue The current value of the input field.
       
  5952    */
       
  5953 
       
  5954 
       
  5955   const handleKeydown = inputValue => {
       
  5956     setFieldValue(inputValue);
  8233   };
  5957   };
  8234 })])(PageAttributesOrderWithChecks));
  5958   /**
  8235 
  5959    * Handle author selection.
  8236 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/terms.js
  5960    *
  8237 
  5961    * @param {Object} selectedPostId The selected Author.
  8238 
  5962    */
  8239 function terms_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; }
  5963 
  8240 
  5964 
  8241 function terms_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { terms_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 { terms_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  5965   const handleChange = selectedPostId => {
  8242 
  5966     editPost({
  8243 /**
  5967       parent: selectedPostId
  8244  * External dependencies
       
  8245  */
       
  8246 
       
  8247 /**
       
  8248  * Returns terms in a tree form.
       
  8249  *
       
  8250  * @param {Array} flatTerms  Array of terms in flat format.
       
  8251  *
       
  8252  * @return {Array} Array of terms in tree format.
       
  8253  */
       
  8254 
       
  8255 function buildTermsTree(flatTerms) {
       
  8256   var flatTermsWithParentAndChildren = flatTerms.map(function (term) {
       
  8257     return terms_objectSpread({
       
  8258       children: [],
       
  8259       parent: null
       
  8260     }, term);
       
  8261   });
       
  8262   var termsByParent = Object(external_this_lodash_["groupBy"])(flatTermsWithParentAndChildren, 'parent');
       
  8263 
       
  8264   if (termsByParent.null && termsByParent.null.length) {
       
  8265     return flatTermsWithParentAndChildren;
       
  8266   }
       
  8267 
       
  8268   var fillWithChildren = function fillWithChildren(terms) {
       
  8269     return terms.map(function (term) {
       
  8270       var children = termsByParent[term.id];
       
  8271       return terms_objectSpread({}, term, {
       
  8272         children: children && children.length ? fillWithChildren(children) : []
       
  8273       });
       
  8274     });
  5968     });
  8275   };
  5969   };
  8276 
  5970 
  8277   return fillWithChildren(termsByParent['0'] || []);
  5971   return Object(external_wp_element_["createElement"])(external_wp_components_["ComboboxControl"], {
  8278 }
       
  8279 
       
  8280 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/parent.js
       
  8281 
       
  8282 
       
  8283 /**
       
  8284  * External dependencies
       
  8285  */
       
  8286 
       
  8287 /**
       
  8288  * WordPress dependencies
       
  8289  */
       
  8290 
       
  8291 
       
  8292 
       
  8293 
       
  8294 
       
  8295 /**
       
  8296  * Internal dependencies
       
  8297  */
       
  8298 
       
  8299 
       
  8300 function PageAttributesParent(_ref) {
       
  8301   var parent = _ref.parent,
       
  8302       postType = _ref.postType,
       
  8303       items = _ref.items,
       
  8304       onUpdateParent = _ref.onUpdateParent;
       
  8305   var isHierarchical = Object(external_this_lodash_["get"])(postType, ['hierarchical'], false);
       
  8306   var parentPageLabel = Object(external_this_lodash_["get"])(postType, ['labels', 'parent_item_colon']);
       
  8307   var pageItems = items || [];
       
  8308 
       
  8309   if (!isHierarchical || !parentPageLabel || !pageItems.length) {
       
  8310     return null;
       
  8311   }
       
  8312 
       
  8313   var pagesTree = buildTermsTree(pageItems.map(function (item) {
       
  8314     return {
       
  8315       id: item.id,
       
  8316       parent: item.parent,
       
  8317       name: item.title && item.title.raw ? item.title.raw : "#".concat(item.id, " (").concat(Object(external_this_wp_i18n_["__"])('no title'), ")")
       
  8318     };
       
  8319   }));
       
  8320   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TreeSelect"], {
       
  8321     className: "editor-page-attributes__parent",
  5972     className: "editor-page-attributes__parent",
  8322     label: parentPageLabel,
  5973     label: parentPageLabel,
  8323     noOptionLabel: "(".concat(Object(external_this_wp_i18n_["__"])('no parent'), ")"),
  5974     value: parentPostId,
  8324     tree: pagesTree,
  5975     options: parentOptions,
  8325     selectedId: parent,
  5976     onFilterValueChange: Object(external_lodash_["debounce"])(handleKeydown, 300),
  8326     onChange: onUpdateParent
  5977     onChange: handleChange
  8327   });
  5978   });
  8328 }
  5979 }
  8329 var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (select) {
  5980 /* harmony default export */ var page_attributes_parent = (PageAttributesParent);
  8330   var _select = select('core'),
  5981 
  8331       getPostType = _select.getPostType,
  5982 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-template/index.js
  8332       getEntityRecords = _select.getEntityRecords;
  5983 
  8333 
  5984 
  8334   var _select2 = select('core/editor'),
  5985 /**
  8335       getCurrentPostId = _select2.getCurrentPostId,
  5986  * External dependencies
  8336       getEditedPostAttribute = _select2.getEditedPostAttribute;
  5987  */
  8337 
  5988 
  8338   var postTypeSlug = getEditedPostAttribute('type');
  5989 /**
  8339   var postType = getPostType(postTypeSlug);
  5990  * WordPress dependencies
  8340   var postId = getCurrentPostId();
  5991  */
  8341   var isHierarchical = Object(external_this_lodash_["get"])(postType, ['hierarchical'], false);
  5992 
  8342   var query = {
  5993 
  8343     per_page: -1,
  5994 
  8344     exclude: postId,
  5995 
  8345     parent_exclude: postId,
  5996 
  8346     orderby: 'menu_order',
  5997 /**
  8347     order: 'asc'
  5998  * Internal dependencies
  8348   };
  5999  */
  8349   return {
  6000 
  8350     parent: getEditedPostAttribute('parent'),
  6001 
  8351     items: isHierarchical ? getEntityRecords('postType', postTypeSlug, query) : [],
  6002 function PostTemplate({}) {
  8352     postType: postType
  6003   const {
  8353   };
  6004     availableTemplates,
  8354 });
  6005     selectedTemplate,
  8355 var applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  6006     isViewable
  8356   var _dispatch = dispatch('core/editor'),
  6007   } = Object(external_wp_data_["useSelect"])(select => {
  8357       editPost = _dispatch.editPost;
  6008     var _getPostType$viewable, _getPostType;
  8358 
  6009 
  8359   return {
  6010     const {
  8360     onUpdateParent: function onUpdateParent(parent) {
  6011       getEditedPostAttribute,
       
  6012       getEditorSettings,
       
  6013       getCurrentPostType
       
  6014     } = select(store);
       
  6015     const {
       
  6016       getPostType
       
  6017     } = select(external_wp_coreData_["store"]);
       
  6018     return {
       
  6019       selectedTemplate: getEditedPostAttribute('template'),
       
  6020       availableTemplates: getEditorSettings().availableTemplates,
       
  6021       isViewable: (_getPostType$viewable = (_getPostType = getPostType(getCurrentPostType())) === null || _getPostType === void 0 ? void 0 : _getPostType.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false
       
  6022     };
       
  6023   }, []);
       
  6024   const {
       
  6025     editPost
       
  6026   } = Object(external_wp_data_["useDispatch"])(store);
       
  6027 
       
  6028   if (!isViewable || Object(external_lodash_["isEmpty"])(availableTemplates)) {
       
  6029     return null;
       
  6030   }
       
  6031 
       
  6032   return Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
       
  6033     label: Object(external_wp_i18n_["__"])('Template:'),
       
  6034     value: selectedTemplate,
       
  6035     onChange: templateSlug => {
  8361       editPost({
  6036       editPost({
  8362         parent: parent || 0
       
  8363       });
       
  8364     }
       
  8365   };
       
  8366 });
       
  8367 /* harmony default export */ var page_attributes_parent = (Object(external_this_wp_compose_["compose"])([applyWithSelect, applyWithDispatch])(PageAttributesParent));
       
  8368 
       
  8369 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/template.js
       
  8370 
       
  8371 
       
  8372 /**
       
  8373  * External dependencies
       
  8374  */
       
  8375 
       
  8376 /**
       
  8377  * WordPress dependencies
       
  8378  */
       
  8379 
       
  8380 
       
  8381 
       
  8382 
       
  8383 
       
  8384 function PageTemplate(_ref) {
       
  8385   var availableTemplates = _ref.availableTemplates,
       
  8386       selectedTemplate = _ref.selectedTemplate,
       
  8387       onUpdate = _ref.onUpdate;
       
  8388 
       
  8389   if (Object(external_this_lodash_["isEmpty"])(availableTemplates)) {
       
  8390     return null;
       
  8391   }
       
  8392 
       
  8393   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
       
  8394     label: Object(external_this_wp_i18n_["__"])('Template:'),
       
  8395     value: selectedTemplate,
       
  8396     onChange: onUpdate,
       
  8397     className: "editor-page-attributes__template",
       
  8398     options: Object(external_this_lodash_["map"])(availableTemplates, function (templateName, templateSlug) {
       
  8399       return {
       
  8400         value: templateSlug,
       
  8401         label: templateName
       
  8402       };
       
  8403     })
       
  8404   });
       
  8405 }
       
  8406 /* harmony default export */ var page_attributes_template = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
       
  8407   var _select = select('core/editor'),
       
  8408       getEditedPostAttribute = _select.getEditedPostAttribute,
       
  8409       getEditorSettings = _select.getEditorSettings;
       
  8410 
       
  8411   var _getEditorSettings = getEditorSettings(),
       
  8412       availableTemplates = _getEditorSettings.availableTemplates;
       
  8413 
       
  8414   return {
       
  8415     selectedTemplate: getEditedPostAttribute('template'),
       
  8416     availableTemplates: availableTemplates
       
  8417   };
       
  8418 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
  8419   return {
       
  8420     onUpdate: function onUpdate(templateSlug) {
       
  8421       dispatch('core/editor').editPost({
       
  8422         template: templateSlug || ''
  6037         template: templateSlug || ''
  8423       });
  6038       });
       
  6039     },
       
  6040     options: Object(external_lodash_["map"])(availableTemplates, (templateName, templateSlug) => ({
       
  6041       value: templateSlug,
       
  6042       label: templateName
       
  6043     }))
       
  6044   });
       
  6045 }
       
  6046 /* harmony default export */ var post_template = (PostTemplate);
       
  6047 
       
  6048 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/combobox.js
       
  6049 
       
  6050 
       
  6051 /**
       
  6052  * External dependencies
       
  6053  */
       
  6054 
       
  6055 /**
       
  6056  * WordPress dependencies
       
  6057  */
       
  6058 
       
  6059 
       
  6060 
       
  6061 
       
  6062 
       
  6063 
       
  6064 function PostAuthorCombobox() {
       
  6065   const [fieldValue, setFieldValue] = Object(external_wp_element_["useState"])();
       
  6066   const {
       
  6067     authorId,
       
  6068     isLoading,
       
  6069     authors,
       
  6070     postAuthor
       
  6071   } = Object(external_wp_data_["useSelect"])(select => {
       
  6072     const {
       
  6073       __unstableGetAuthor,
       
  6074       getAuthors,
       
  6075       isResolving
       
  6076     } = select('core');
       
  6077     const {
       
  6078       getEditedPostAttribute
       
  6079     } = select('core/editor');
       
  6080 
       
  6081     const author = __unstableGetAuthor(getEditedPostAttribute('author'));
       
  6082 
       
  6083     const query = !fieldValue || '' === fieldValue ? {} : {
       
  6084       search: fieldValue
       
  6085     };
       
  6086     return {
       
  6087       authorId: getEditedPostAttribute('author'),
       
  6088       postAuthor: author,
       
  6089       authors: getAuthors(query),
       
  6090       isLoading: isResolving('core', 'getAuthors', [query])
       
  6091     };
       
  6092   }, [fieldValue]);
       
  6093   const {
       
  6094     editPost
       
  6095   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
  6096   const authorOptions = Object(external_wp_element_["useMemo"])(() => {
       
  6097     const fetchedAuthors = (authors !== null && authors !== void 0 ? authors : []).map(author => {
       
  6098       return {
       
  6099         value: author.id,
       
  6100         label: author.name
       
  6101       };
       
  6102     }); // Ensure the current author is included in the dropdown list.
       
  6103 
       
  6104     const foundAuthor = fetchedAuthors.findIndex(({
       
  6105       value
       
  6106     }) => (postAuthor === null || postAuthor === void 0 ? void 0 : postAuthor.id) === value);
       
  6107 
       
  6108     if (foundAuthor < 0 && postAuthor) {
       
  6109       return [{
       
  6110         value: postAuthor.id,
       
  6111         label: postAuthor.name
       
  6112       }, ...fetchedAuthors];
  8424     }
  6113     }
       
  6114 
       
  6115     return fetchedAuthors;
       
  6116   }, [authors, postAuthor]); // Initializes the post author properly
       
  6117   // Also ensures external changes are reflected.
       
  6118 
       
  6119   Object(external_wp_element_["useEffect"])(() => {
       
  6120     if (postAuthor) {
       
  6121       setFieldValue(postAuthor.name);
       
  6122     }
       
  6123   }, [postAuthor]);
       
  6124   /**
       
  6125    * Handle author selection.
       
  6126    *
       
  6127    * @param {number} postAuthorId The selected Author.
       
  6128    */
       
  6129 
       
  6130   const handleSelect = postAuthorId => {
       
  6131     if (!postAuthorId) {
       
  6132       return;
       
  6133     }
       
  6134 
       
  6135     editPost({
       
  6136       author: postAuthorId
       
  6137     });
  8425   };
  6138   };
  8426 }))(PageTemplate));
  6139   /**
  8427 
  6140    * Handle user input.
  8428 // EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
  6141    *
  8429 var external_this_wp_htmlEntities_ = __webpack_require__(75);
  6142    * @param {string} inputValue The current value of the input field.
       
  6143    */
       
  6144 
       
  6145 
       
  6146   const handleKeydown = inputValue => {
       
  6147     setFieldValue(inputValue);
       
  6148   };
       
  6149 
       
  6150   if (!postAuthor) {
       
  6151     return null;
       
  6152   }
       
  6153 
       
  6154   return Object(external_wp_element_["createElement"])(external_wp_components_["ComboboxControl"], {
       
  6155     label: Object(external_wp_i18n_["__"])('Author'),
       
  6156     options: authorOptions,
       
  6157     value: authorId,
       
  6158     onFilterValueChange: Object(external_lodash_["debounce"])(handleKeydown, 300),
       
  6159     onChange: handleSelect,
       
  6160     isLoading: isLoading,
       
  6161     allowReset: false
       
  6162   });
       
  6163 }
       
  6164 
       
  6165 /* harmony default export */ var combobox = (PostAuthorCombobox);
       
  6166 
       
  6167 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/select.js
       
  6168 
       
  6169 
       
  6170 /**
       
  6171  * WordPress dependencies
       
  6172  */
       
  6173 
       
  6174 
       
  6175 
       
  6176 
       
  6177 
       
  6178 function PostAuthorSelect() {
       
  6179   const {
       
  6180     editPost
       
  6181   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
  6182   const {
       
  6183     postAuthor,
       
  6184     authors
       
  6185   } = Object(external_wp_data_["useSelect"])(select => {
       
  6186     const authorsFromAPI = select('core').getAuthors();
       
  6187     return {
       
  6188       postAuthor: select('core/editor').getEditedPostAttribute('author'),
       
  6189       authors: authorsFromAPI.map(author => ({
       
  6190         label: Object(external_wp_htmlEntities_["decodeEntities"])(author.name),
       
  6191         value: author.id
       
  6192       }))
       
  6193     };
       
  6194   }, []);
       
  6195 
       
  6196   const setAuthorId = value => {
       
  6197     const author = Number(value);
       
  6198     editPost({
       
  6199       author
       
  6200     });
       
  6201   };
       
  6202 
       
  6203   return Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
       
  6204     className: "post-author-selector",
       
  6205     label: Object(external_wp_i18n_["__"])('Author'),
       
  6206     options: authors,
       
  6207     onChange: setAuthorId,
       
  6208     value: postAuthor
       
  6209   });
       
  6210 }
       
  6211 
       
  6212 /* harmony default export */ var post_author_select = (PostAuthorSelect);
       
  6213 
       
  6214 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/index.js
       
  6215 
       
  6216 
       
  6217 /**
       
  6218  * WordPress dependencies
       
  6219  */
       
  6220 
       
  6221 
       
  6222 /**
       
  6223  * Internal dependencies
       
  6224  */
       
  6225 
       
  6226 
       
  6227 
       
  6228 const minimumUsersForCombobox = 25;
       
  6229 
       
  6230 function PostAuthor() {
       
  6231   const showCombobox = Object(external_wp_data_["useSelect"])(select => {
       
  6232     // Not using `getUsers()` because it requires `list_users` capability.
       
  6233     const authors = select(external_wp_coreData_["store"]).getAuthors();
       
  6234     return (authors === null || authors === void 0 ? void 0 : authors.length) >= minimumUsersForCombobox;
       
  6235   }, []);
       
  6236 
       
  6237   if (showCombobox) {
       
  6238     return Object(external_wp_element_["createElement"])(combobox, null);
       
  6239   }
       
  6240 
       
  6241   return Object(external_wp_element_["createElement"])(post_author_select, null);
       
  6242 }
       
  6243 
       
  6244 /* harmony default export */ var post_author = (PostAuthor);
  8430 
  6245 
  8431 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/check.js
  6246 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/check.js
  8432 
  6247 
  8433 
  6248 
  8434 /**
  6249 /**
  8444 /**
  6259 /**
  8445  * Internal dependencies
  6260  * Internal dependencies
  8446  */
  6261  */
  8447 
  6262 
  8448 
  6263 
  8449 function PostAuthorCheck(_ref) {
  6264 function PostAuthorCheck({
  8450   var hasAssignAuthorAction = _ref.hasAssignAuthorAction,
  6265   hasAssignAuthorAction,
  8451       authors = _ref.authors,
  6266   authors,
  8452       children = _ref.children;
  6267   children
  8453 
  6268 }) {
  8454   if (!hasAssignAuthorAction || authors.length < 2) {
  6269   if (!hasAssignAuthorAction || !authors || 1 >= authors.length) {
  8455     return null;
  6270     return null;
  8456   }
  6271   }
  8457 
  6272 
  8458   return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
  6273   return Object(external_wp_element_["createElement"])(post_type_support_check, {
  8459     supportKeys: "author"
  6274     supportKeys: "author"
  8460   }, children);
  6275   }, children);
  8461 }
  6276 }
  8462 /* harmony default export */ var post_author_check = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  6277 /* harmony default export */ var post_author_check = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
  8463   var post = select('core/editor').getCurrentPost();
  6278   const post = select('core/editor').getCurrentPost();
  8464   return {
  6279   return {
  8465     hasAssignAuthorAction: Object(external_this_lodash_["get"])(post, ['_links', 'wp:action-assign-author'], false),
  6280     hasAssignAuthorAction: Object(external_lodash_["get"])(post, ['_links', 'wp:action-assign-author'], false),
  8466     postType: select('core/editor').getCurrentPostType(),
  6281     postType: select('core/editor').getCurrentPostType(),
  8467     authors: select('core').getAuthors()
  6282     authors: select('core').getAuthors()
  8468   };
  6283   };
  8469 }), external_this_wp_compose_["withInstanceId"]])(PostAuthorCheck));
  6284 }), external_wp_compose_["withInstanceId"]])(PostAuthorCheck));
  8470 
  6285 
  8471 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/index.js
  6286 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-comments/index.js
  8472 
  6287 
  8473 
       
  8474 
       
  8475 
       
  8476 
       
  8477 
       
  8478 
       
  8479 
       
  8480 function post_author_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_author_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); }; }
       
  8481 
       
  8482 function post_author_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; } }
       
  8483 
  6288 
  8484 /**
  6289 /**
  8485  * WordPress dependencies
  6290  * WordPress dependencies
  8486  */
  6291  */
  8487 
  6292 
  8488 
  6293 
  8489 
  6294 
  8490 
  6295 
  8491 
  6296 
  8492 /**
  6297 function PostComments({
  8493  * Internal dependencies
  6298   commentStatus = 'open',
  8494  */
  6299   ...props
  8495 
  6300 }) {
  8496 
  6301   const onToggleComments = () => props.editPost({
  8497 var post_author_PostAuthor = /*#__PURE__*/function (_Component) {
  6302     comment_status: commentStatus === 'open' ? 'closed' : 'open'
  8498   Object(inherits["a" /* default */])(PostAuthor, _Component);
  6303   });
  8499 
  6304 
  8500   var _super = post_author_createSuper(PostAuthor);
  6305   return Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
  8501 
  6306     label: Object(external_wp_i18n_["__"])('Allow comments'),
  8502   function PostAuthor() {
       
  8503     var _this;
       
  8504 
       
  8505     Object(classCallCheck["a" /* default */])(this, PostAuthor);
       
  8506 
       
  8507     _this = _super.apply(this, arguments);
       
  8508     _this.setAuthorId = _this.setAuthorId.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
  8509     return _this;
       
  8510   }
       
  8511 
       
  8512   Object(createClass["a" /* default */])(PostAuthor, [{
       
  8513     key: "setAuthorId",
       
  8514     value: function setAuthorId(event) {
       
  8515       var onUpdateAuthor = this.props.onUpdateAuthor;
       
  8516       var value = event.target.value;
       
  8517       onUpdateAuthor(Number(value));
       
  8518     }
       
  8519   }, {
       
  8520     key: "render",
       
  8521     value: function render() {
       
  8522       var _this$props = this.props,
       
  8523           postAuthor = _this$props.postAuthor,
       
  8524           instanceId = _this$props.instanceId,
       
  8525           authors = _this$props.authors;
       
  8526       var selectId = 'post-author-selector-' + instanceId; // Disable reason: A select with an onchange throws a warning
       
  8527 
       
  8528       /* eslint-disable jsx-a11y/no-onchange */
       
  8529 
       
  8530       return Object(external_this_wp_element_["createElement"])(post_author_check, null, Object(external_this_wp_element_["createElement"])("label", {
       
  8531         htmlFor: selectId
       
  8532       }, Object(external_this_wp_i18n_["__"])('Author')), Object(external_this_wp_element_["createElement"])("select", {
       
  8533         id: selectId,
       
  8534         value: postAuthor,
       
  8535         onChange: this.setAuthorId,
       
  8536         className: "editor-post-author__select"
       
  8537       }, authors.map(function (author) {
       
  8538         return Object(external_this_wp_element_["createElement"])("option", {
       
  8539           key: author.id,
       
  8540           value: author.id
       
  8541         }, Object(external_this_wp_htmlEntities_["decodeEntities"])(author.name));
       
  8542       })));
       
  8543       /* eslint-enable jsx-a11y/no-onchange */
       
  8544     }
       
  8545   }]);
       
  8546 
       
  8547   return PostAuthor;
       
  8548 }(external_this_wp_element_["Component"]);
       
  8549 /* harmony default export */ var post_author = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
  8550   return {
       
  8551     postAuthor: select('core/editor').getEditedPostAttribute('author'),
       
  8552     authors: select('core').getAuthors()
       
  8553   };
       
  8554 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
  8555   return {
       
  8556     onUpdateAuthor: function onUpdateAuthor(author) {
       
  8557       dispatch('core/editor').editPost({
       
  8558         author: author
       
  8559       });
       
  8560     }
       
  8561   };
       
  8562 }), external_this_wp_compose_["withInstanceId"]])(post_author_PostAuthor));
       
  8563 
       
  8564 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-comments/index.js
       
  8565 
       
  8566 
       
  8567 
       
  8568 /**
       
  8569  * WordPress dependencies
       
  8570  */
       
  8571 
       
  8572 
       
  8573 
       
  8574 
       
  8575 
       
  8576 function PostComments(_ref) {
       
  8577   var _ref$commentStatus = _ref.commentStatus,
       
  8578       commentStatus = _ref$commentStatus === void 0 ? 'open' : _ref$commentStatus,
       
  8579       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["commentStatus"]);
       
  8580 
       
  8581   var onToggleComments = function onToggleComments() {
       
  8582     return props.editPost({
       
  8583       comment_status: commentStatus === 'open' ? 'closed' : 'open'
       
  8584     });
       
  8585   };
       
  8586 
       
  8587   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
       
  8588     label: Object(external_this_wp_i18n_["__"])('Allow comments'),
       
  8589     checked: commentStatus === 'open',
  6307     checked: commentStatus === 'open',
  8590     onChange: onToggleComments
  6308     onChange: onToggleComments
  8591   });
  6309   });
  8592 }
  6310 }
  8593 
  6311 
  8594 /* harmony default export */ var post_comments = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  6312 /* harmony default export */ var post_comments = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
  8595   return {
  6313   return {
  8596     commentStatus: select('core/editor').getEditedPostAttribute('comment_status')
  6314     commentStatus: select('core/editor').getEditedPostAttribute('comment_status')
  8597   };
  6315   };
  8598 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  6316 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
  8599   return {
  6317   editPost: dispatch('core/editor').editPost
  8600     editPost: dispatch('core/editor').editPost
  6318 }))])(PostComments));
  8601   };
       
  8602 })])(PostComments));
       
  8603 
  6319 
  8604 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-excerpt/index.js
  6320 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-excerpt/index.js
  8605 
  6321 
  8606 
  6322 
  8607 /**
  6323 /**
  8610 
  6326 
  8611 
  6327 
  8612 
  6328 
  8613 
  6329 
  8614 
  6330 
  8615 function PostExcerpt(_ref) {
  6331 function PostExcerpt({
  8616   var excerpt = _ref.excerpt,
  6332   excerpt,
  8617       onUpdateExcerpt = _ref.onUpdateExcerpt;
  6333   onUpdateExcerpt
  8618   return Object(external_this_wp_element_["createElement"])("div", {
  6334 }) {
       
  6335   return Object(external_wp_element_["createElement"])("div", {
  8619     className: "editor-post-excerpt"
  6336     className: "editor-post-excerpt"
  8620   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextareaControl"], {
  6337   }, Object(external_wp_element_["createElement"])(external_wp_components_["TextareaControl"], {
  8621     label: Object(external_this_wp_i18n_["__"])('Write an excerpt (optional)'),
  6338     label: Object(external_wp_i18n_["__"])('Write an excerpt (optional)'),
  8622     className: "editor-post-excerpt__textarea",
  6339     className: "editor-post-excerpt__textarea",
  8623     onChange: function onChange(value) {
  6340     onChange: value => onUpdateExcerpt(value),
  8624       return onUpdateExcerpt(value);
       
  8625     },
       
  8626     value: excerpt
  6341     value: excerpt
  8627   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
  6342   }), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
  8628     href: Object(external_this_wp_i18n_["__"])('https://wordpress.org/support/article/excerpt/')
  6343     href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/excerpt/')
  8629   }, Object(external_this_wp_i18n_["__"])('Learn more about manual excerpts')));
  6344   }, Object(external_wp_i18n_["__"])('Learn more about manual excerpts')));
  8630 }
  6345 }
  8631 
  6346 
  8632 /* harmony default export */ var post_excerpt = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  6347 /* harmony default export */ var post_excerpt = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
  8633   return {
  6348   return {
  8634     excerpt: select('core/editor').getEditedPostAttribute('excerpt')
  6349     excerpt: select('core/editor').getEditedPostAttribute('excerpt')
  8635   };
  6350   };
  8636 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  6351 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
  8637   return {
  6352   onUpdateExcerpt(excerpt) {
  8638     onUpdateExcerpt: function onUpdateExcerpt(excerpt) {
  6353     dispatch('core/editor').editPost({
  8639       dispatch('core/editor').editPost({
  6354       excerpt
  8640         excerpt: excerpt
  6355     });
  8641       });
  6356   }
  8642     }
  6357 
  8643   };
  6358 }))])(PostExcerpt));
  8644 })])(PostExcerpt));
       
  8645 
  6359 
  8646 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-excerpt/check.js
  6360 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-excerpt/check.js
  8647 
  6361 
  8648 
  6362 
  8649 
  6363 
  8651  * Internal dependencies
  6365  * Internal dependencies
  8652  */
  6366  */
  8653 
  6367 
  8654 
  6368 
  8655 function PostExcerptCheck(props) {
  6369 function PostExcerptCheck(props) {
  8656   return Object(external_this_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
  6370   return Object(external_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
  8657     supportKeys: "excerpt"
  6371     supportKeys: "excerpt"
  8658   }));
  6372   }));
  8659 }
  6373 }
  8660 
  6374 
  8661 /* harmony default export */ var post_excerpt_check = (PostExcerptCheck);
  6375 /* harmony default export */ var post_excerpt_check = (PostExcerptCheck);
  8668 /**
  6382 /**
  8669  * WordPress dependencies
  6383  * WordPress dependencies
  8670  */
  6384  */
  8671 
  6385 
  8672 
  6386 
  8673 function ThemeSupportCheck(_ref) {
  6387 function ThemeSupportCheck({
  8674   var themeSupports = _ref.themeSupports,
  6388   themeSupports,
  8675       children = _ref.children,
  6389   children,
  8676       postType = _ref.postType,
  6390   postType,
  8677       supportKeys = _ref.supportKeys;
  6391   supportKeys
  8678   var isSupported = Object(external_this_lodash_["some"])(Object(external_this_lodash_["castArray"])(supportKeys), function (key) {
  6392 }) {
  8679     var supported = Object(external_this_lodash_["get"])(themeSupports, [key], false); // 'post-thumbnails' can be boolean or an array of post types.
  6393   const isSupported = Object(external_lodash_["some"])(Object(external_lodash_["castArray"])(supportKeys), key => {
       
  6394     const supported = Object(external_lodash_["get"])(themeSupports, [key], false); // 'post-thumbnails' can be boolean or an array of post types.
  8680     // In the latter case, we need to verify `postType` exists
  6395     // In the latter case, we need to verify `postType` exists
  8681     // within `supported`. If `postType` isn't passed, then the check
  6396     // within `supported`. If `postType` isn't passed, then the check
  8682     // should fail.
  6397     // should fail.
  8683 
  6398 
  8684     if ('post-thumbnails' === key && Object(external_this_lodash_["isArray"])(supported)) {
  6399     if ('post-thumbnails' === key && Object(external_lodash_["isArray"])(supported)) {
  8685       return Object(external_this_lodash_["includes"])(supported, postType);
  6400       return Object(external_lodash_["includes"])(supported, postType);
  8686     }
  6401     }
  8687 
  6402 
  8688     return supported;
  6403     return supported;
  8689   });
  6404   });
  8690 
  6405 
  8692     return null;
  6407     return null;
  8693   }
  6408   }
  8694 
  6409 
  8695   return children;
  6410   return children;
  8696 }
  6411 }
  8697 /* harmony default export */ var theme_support_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
  6412 /* harmony default export */ var theme_support_check = (Object(external_wp_data_["withSelect"])(select => {
  8698   var _select = select('core'),
  6413   const {
  8699       getThemeSupports = _select.getThemeSupports;
  6414     getThemeSupports
  8700 
  6415   } = select('core');
  8701   var _select2 = select('core/editor'),
  6416   const {
  8702       getEditedPostAttribute = _select2.getEditedPostAttribute;
  6417     getEditedPostAttribute
  8703 
  6418   } = select('core/editor');
  8704   return {
  6419   return {
  8705     postType: getEditedPostAttribute('type'),
  6420     postType: getEditedPostAttribute('type'),
  8706     themeSupports: getThemeSupports()
  6421     themeSupports: getThemeSupports()
  8707   };
  6422   };
  8708 })(ThemeSupportCheck));
  6423 })(ThemeSupportCheck));
  8716  */
  6431  */
  8717 
  6432 
  8718 
  6433 
  8719 
  6434 
  8720 function PostFeaturedImageCheck(props) {
  6435 function PostFeaturedImageCheck(props) {
  8721   return Object(external_this_wp_element_["createElement"])(theme_support_check, {
  6436   return Object(external_wp_element_["createElement"])(theme_support_check, {
  8722     supportKeys: "post-thumbnails"
  6437     supportKeys: "post-thumbnails"
  8723   }, Object(external_this_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
  6438   }, Object(external_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
  8724     supportKeys: "thumbnail"
  6439     supportKeys: "thumbnail"
  8725   })));
  6440   })));
  8726 }
  6441 }
  8727 
  6442 
  8728 /* harmony default export */ var post_featured_image_check = (PostFeaturedImageCheck);
  6443 /* harmony default export */ var post_featured_image_check = (PostFeaturedImageCheck);
  8729 
  6444 
  8730 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-featured-image/index.js
  6445 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-featured-image/index.js
  8731 
  6446 
  8732 
  6447 
  8733 
       
  8734 /**
  6448 /**
  8735  * External dependencies
  6449  * External dependencies
  8736  */
  6450  */
  8737 
  6451 
  8738 /**
  6452 /**
  8748 /**
  6462 /**
  8749  * Internal dependencies
  6463  * Internal dependencies
  8750  */
  6464  */
  8751 
  6465 
  8752 
  6466 
  8753 var ALLOWED_MEDIA_TYPES = ['image']; // Used when labels from post type were not yet loaded or when they are not present.
  6467 const ALLOWED_MEDIA_TYPES = ['image']; // Used when labels from post type were not yet loaded or when they are not present.
  8754 
  6468 
  8755 var DEFAULT_FEATURE_IMAGE_LABEL = Object(external_this_wp_i18n_["__"])('Featured image');
  6469 const DEFAULT_FEATURE_IMAGE_LABEL = Object(external_wp_i18n_["__"])('Featured image');
  8756 
  6470 
  8757 var DEFAULT_SET_FEATURE_IMAGE_LABEL = Object(external_this_wp_i18n_["__"])('Set featured image');
  6471 const DEFAULT_SET_FEATURE_IMAGE_LABEL = Object(external_wp_i18n_["__"])('Set featured image');
  8758 
  6472 
  8759 var DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = Object(external_this_wp_i18n_["__"])('Remove image');
  6473 const DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = Object(external_wp_i18n_["__"])('Remove image');
  8760 
  6474 
  8761 function PostFeaturedImage(_ref) {
  6475 function PostFeaturedImage({
  8762   var currentPostId = _ref.currentPostId,
  6476   currentPostId,
  8763       featuredImageId = _ref.featuredImageId,
  6477   featuredImageId,
  8764       onUpdateImage = _ref.onUpdateImage,
  6478   onUpdateImage,
  8765       onDropImage = _ref.onDropImage,
  6479   onDropImage,
  8766       onRemoveImage = _ref.onRemoveImage,
  6480   onRemoveImage,
  8767       media = _ref.media,
  6481   media,
  8768       postType = _ref.postType,
  6482   postType,
  8769       noticeUI = _ref.noticeUI;
  6483   noticeUI
  8770   var postLabel = Object(external_this_lodash_["get"])(postType, ['labels'], {});
  6484 }) {
  8771   var instructions = Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('To edit the featured image, you need permission to upload media.'));
  6485   var _media$media_details$, _media$media_details$2;
  8772   var mediaWidth, mediaHeight, mediaSourceUrl;
  6486 
       
  6487   const postLabel = Object(external_lodash_["get"])(postType, ['labels'], {});
       
  6488   const instructions = Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('To edit the featured image, you need permission to upload media.'));
       
  6489   let mediaWidth, mediaHeight, mediaSourceUrl;
  8773 
  6490 
  8774   if (media) {
  6491   if (media) {
  8775     var mediaSize = Object(external_this_wp_hooks_["applyFilters"])('editor.PostFeaturedImage.imageSize', 'post-thumbnail', media.id, currentPostId);
  6492     const mediaSize = Object(external_wp_hooks_["applyFilters"])('editor.PostFeaturedImage.imageSize', 'post-thumbnail', media.id, currentPostId);
  8776 
  6493 
  8777     if (Object(external_this_lodash_["has"])(media, ['media_details', 'sizes', mediaSize])) {
  6494     if (Object(external_lodash_["has"])(media, ['media_details', 'sizes', mediaSize])) {
  8778       // use mediaSize when available
  6495       // use mediaSize when available
  8779       mediaWidth = media.media_details.sizes[mediaSize].width;
  6496       mediaWidth = media.media_details.sizes[mediaSize].width;
  8780       mediaHeight = media.media_details.sizes[mediaSize].height;
  6497       mediaHeight = media.media_details.sizes[mediaSize].height;
  8781       mediaSourceUrl = media.media_details.sizes[mediaSize].source_url;
  6498       mediaSourceUrl = media.media_details.sizes[mediaSize].source_url;
  8782     } else {
  6499     } else {
  8783       // get fallbackMediaSize if mediaSize is not available
  6500       // get fallbackMediaSize if mediaSize is not available
  8784       var fallbackMediaSize = Object(external_this_wp_hooks_["applyFilters"])('editor.PostFeaturedImage.imageSize', 'thumbnail', media.id, currentPostId);
  6501       const fallbackMediaSize = Object(external_wp_hooks_["applyFilters"])('editor.PostFeaturedImage.imageSize', 'thumbnail', media.id, currentPostId);
  8785 
  6502 
  8786       if (Object(external_this_lodash_["has"])(media, ['media_details', 'sizes', fallbackMediaSize])) {
  6503       if (Object(external_lodash_["has"])(media, ['media_details', 'sizes', fallbackMediaSize])) {
  8787         // use fallbackMediaSize when mediaSize is not available
  6504         // use fallbackMediaSize when mediaSize is not available
  8788         mediaWidth = media.media_details.sizes[fallbackMediaSize].width;
  6505         mediaWidth = media.media_details.sizes[fallbackMediaSize].width;
  8789         mediaHeight = media.media_details.sizes[fallbackMediaSize].height;
  6506         mediaHeight = media.media_details.sizes[fallbackMediaSize].height;
  8790         mediaSourceUrl = media.media_details.sizes[fallbackMediaSize].source_url;
  6507         mediaSourceUrl = media.media_details.sizes[fallbackMediaSize].source_url;
  8791       } else {
  6508       } else {
  8795         mediaSourceUrl = media.source_url;
  6512         mediaSourceUrl = media.source_url;
  8796       }
  6513       }
  8797     }
  6514     }
  8798   }
  6515   }
  8799 
  6516 
  8800   return Object(external_this_wp_element_["createElement"])(post_featured_image_check, null, noticeUI, Object(external_this_wp_element_["createElement"])("div", {
  6517   return Object(external_wp_element_["createElement"])(post_featured_image_check, null, noticeUI, Object(external_wp_element_["createElement"])("div", {
  8801     className: "editor-post-featured-image"
  6518     className: "editor-post-featured-image"
  8802   }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUploadCheck"], {
  6519   }, media && Object(external_wp_element_["createElement"])("div", {
       
  6520     id: `editor-post-featured-image-${featuredImageId}-describedby`,
       
  6521     className: "hidden"
       
  6522   }, media.alt_text && Object(external_wp_i18n_["sprintf"])( // Translators: %s: The selected image alt text.
       
  6523   Object(external_wp_i18n_["__"])('Current image: %s'), media.alt_text), !media.alt_text && Object(external_wp_i18n_["sprintf"])( // Translators: %s: The selected image filename.
       
  6524   Object(external_wp_i18n_["__"])('The current image has no alternative text. The file name is: %s'), ((_media$media_details$ = media.media_details.sizes) === null || _media$media_details$ === void 0 ? void 0 : (_media$media_details$2 = _media$media_details$.full) === null || _media$media_details$2 === void 0 ? void 0 : _media$media_details$2.file) || media.slug)), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], {
  8803     fallback: instructions
  6525     fallback: instructions
  8804   }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUpload"], {
  6526   }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], {
  8805     title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
       
  8806     onSelect: onUpdateImage,
       
  8807     unstableFeaturedImageFlow: true,
       
  8808     allowedTypes: ALLOWED_MEDIA_TYPES,
       
  8809     modalClass: !featuredImageId ? 'editor-post-featured-image__media-modal' : 'editor-post-featured-image__media-modal',
       
  8810     render: function render(_ref2) {
       
  8811       var open = _ref2.open;
       
  8812       return Object(external_this_wp_element_["createElement"])("div", {
       
  8813         className: "editor-post-featured-image__container"
       
  8814       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
  8815         className: !featuredImageId ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
       
  8816         onClick: open,
       
  8817         "aria-label": !featuredImageId ? null : Object(external_this_wp_i18n_["__"])('Edit or update the image')
       
  8818       }, !!featuredImageId && media && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ResponsiveWrapper"], {
       
  8819         naturalWidth: mediaWidth,
       
  8820         naturalHeight: mediaHeight,
       
  8821         isInline: true
       
  8822       }, Object(external_this_wp_element_["createElement"])("img", {
       
  8823         src: mediaSourceUrl,
       
  8824         alt: ""
       
  8825       })), !!featuredImageId && !media && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null), !featuredImageId && (postLabel.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropZone"], {
       
  8826         onFilesDrop: onDropImage
       
  8827       }));
       
  8828     },
       
  8829     value: featuredImageId
       
  8830   })), !!featuredImageId && media && !media.isLoading && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUploadCheck"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUpload"], {
       
  8831     title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
  6527     title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
  8832     onSelect: onUpdateImage,
  6528     onSelect: onUpdateImage,
  8833     unstableFeaturedImageFlow: true,
  6529     unstableFeaturedImageFlow: true,
  8834     allowedTypes: ALLOWED_MEDIA_TYPES,
  6530     allowedTypes: ALLOWED_MEDIA_TYPES,
  8835     modalClass: "editor-post-featured-image__media-modal",
  6531     modalClass: "editor-post-featured-image__media-modal",
  8836     render: function render(_ref3) {
  6532     render: ({
  8837       var open = _ref3.open;
  6533       open
  8838       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  6534     }) => Object(external_wp_element_["createElement"])("div", {
  8839         onClick: open,
  6535       className: "editor-post-featured-image__container"
  8840         isSecondary: true
  6536     }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  8841       }, Object(external_this_wp_i18n_["__"])('Replace Image'));
  6537       className: !featuredImageId ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
  8842     }
  6538       onClick: open,
  8843   })), !!featuredImageId && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUploadCheck"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  6539       "aria-label": !featuredImageId ? null : Object(external_wp_i18n_["__"])('Edit or update the image'),
       
  6540       "aria-describedby": !featuredImageId ? null : `editor-post-featured-image-${featuredImageId}-describedby`
       
  6541     }, !!featuredImageId && media && Object(external_wp_element_["createElement"])(external_wp_components_["ResponsiveWrapper"], {
       
  6542       naturalWidth: mediaWidth,
       
  6543       naturalHeight: mediaHeight,
       
  6544       isInline: true
       
  6545     }, Object(external_wp_element_["createElement"])("img", {
       
  6546       src: mediaSourceUrl,
       
  6547       alt: ""
       
  6548     })), !!featuredImageId && !media && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), !featuredImageId && (postLabel.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL)), Object(external_wp_element_["createElement"])(external_wp_components_["DropZone"], {
       
  6549       onFilesDrop: onDropImage
       
  6550     })),
       
  6551     value: featuredImageId
       
  6552   })), !!featuredImageId && media && !media.isLoading && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], {
       
  6553     title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
       
  6554     onSelect: onUpdateImage,
       
  6555     unstableFeaturedImageFlow: true,
       
  6556     allowedTypes: ALLOWED_MEDIA_TYPES,
       
  6557     modalClass: "editor-post-featured-image__media-modal",
       
  6558     render: ({
       
  6559       open
       
  6560     }) => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
  6561       onClick: open,
       
  6562       isSecondary: true
       
  6563     }, Object(external_wp_i18n_["__"])('Replace Image'))
       
  6564   })), !!featuredImageId && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  8844     onClick: onRemoveImage,
  6565     onClick: onRemoveImage,
  8845     isLink: true,
  6566     isLink: true,
  8846     isDestructive: true
  6567     isDestructive: true
  8847   }, postLabel.remove_featured_image || DEFAULT_REMOVE_FEATURE_IMAGE_LABEL))));
  6568   }, postLabel.remove_featured_image || DEFAULT_REMOVE_FEATURE_IMAGE_LABEL))));
  8848 }
  6569 }
  8849 
  6570 
  8850 var post_featured_image_applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (select) {
  6571 const applyWithSelect = Object(external_wp_data_["withSelect"])(select => {
  8851   var _select = select('core'),
  6572   const {
  8852       getMedia = _select.getMedia,
  6573     getMedia,
  8853       getPostType = _select.getPostType;
  6574     getPostType
  8854 
  6575   } = select('core');
  8855   var _select2 = select('core/editor'),
  6576   const {
  8856       getCurrentPostId = _select2.getCurrentPostId,
  6577     getCurrentPostId,
  8857       getEditedPostAttribute = _select2.getEditedPostAttribute;
  6578     getEditedPostAttribute
  8858 
  6579   } = select('core/editor');
  8859   var featuredImageId = getEditedPostAttribute('featured_media');
  6580   const featuredImageId = getEditedPostAttribute('featured_media');
  8860   return {
  6581   return {
  8861     media: featuredImageId ? getMedia(featuredImageId) : null,
  6582     media: featuredImageId ? getMedia(featuredImageId) : null,
  8862     currentPostId: getCurrentPostId(),
  6583     currentPostId: getCurrentPostId(),
  8863     postType: getPostType(getEditedPostAttribute('type')),
  6584     postType: getPostType(getEditedPostAttribute('type')),
  8864     featuredImageId: featuredImageId
  6585     featuredImageId
  8865   };
  6586   };
  8866 });
  6587 });
  8867 var post_featured_image_applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref4, _ref5) {
  6588 const applyWithDispatch = Object(external_wp_data_["withDispatch"])((dispatch, {
  8868   var noticeOperations = _ref4.noticeOperations;
  6589   noticeOperations
  8869   var select = _ref5.select;
  6590 }, {
  8870 
  6591   select
  8871   var _dispatch = dispatch('core/editor'),
  6592 }) => {
  8872       editPost = _dispatch.editPost;
  6593   const {
  8873 
  6594     editPost
       
  6595   } = dispatch('core/editor');
  8874   return {
  6596   return {
  8875     onUpdateImage: function onUpdateImage(image) {
  6597     onUpdateImage(image) {
  8876       editPost({
  6598       editPost({
  8877         featured_media: image.id
  6599         featured_media: image.id
  8878       });
  6600       });
  8879     },
  6601     },
  8880     onDropImage: function onDropImage(filesList) {
  6602 
  8881       select('core/block-editor').getSettings().mediaUpload({
  6603     onDropImage(filesList) {
       
  6604       select(external_wp_blockEditor_["store"]).getSettings().mediaUpload({
  8882         allowedTypes: ['image'],
  6605         allowedTypes: ['image'],
  8883         filesList: filesList,
  6606         filesList,
  8884         onFileChange: function onFileChange(_ref6) {
  6607 
  8885           var _ref7 = Object(slicedToArray["a" /* default */])(_ref6, 1),
  6608         onFileChange([image]) {
  8886               image = _ref7[0];
       
  8887 
       
  8888           editPost({
  6609           editPost({
  8889             featured_media: image.id
  6610             featured_media: image.id
  8890           });
  6611           });
  8891         },
  6612         },
  8892         onError: function onError(message) {
  6613 
       
  6614         onError(message) {
  8893           noticeOperations.removeAllNotices();
  6615           noticeOperations.removeAllNotices();
  8894           noticeOperations.createErrorNotice(message);
  6616           noticeOperations.createErrorNotice(message);
  8895         }
  6617         }
       
  6618 
  8896       });
  6619       });
  8897     },
  6620     },
  8898     onRemoveImage: function onRemoveImage() {
  6621 
       
  6622     onRemoveImage() {
  8899       editPost({
  6623       editPost({
  8900         featured_media: 0
  6624         featured_media: 0
  8901       });
  6625       });
  8902     }
  6626     }
       
  6627 
  8903   };
  6628   };
  8904 });
  6629 });
  8905 /* harmony default export */ var post_featured_image = (Object(external_this_wp_compose_["compose"])(external_this_wp_components_["withNotices"], post_featured_image_applyWithSelect, post_featured_image_applyWithDispatch, Object(external_this_wp_components_["withFilters"])('editor.PostFeaturedImage'))(PostFeaturedImage));
  6630 /* harmony default export */ var post_featured_image = (Object(external_wp_compose_["compose"])(external_wp_components_["withNotices"], applyWithSelect, applyWithDispatch, Object(external_wp_components_["withFilters"])('editor.PostFeaturedImage'))(PostFeaturedImage));
  8906 
  6631 
  8907 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-format/check.js
  6632 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-format/check.js
  8908 
  6633 
  8909 
  6634 
  8910 
  6635 
  8911 
       
  8912 /**
  6636 /**
  8913  * WordPress dependencies
  6637  * WordPress dependencies
  8914  */
  6638  */
  8915 
  6639 
  8916 /**
  6640 /**
  8917  * Internal dependencies
  6641  * Internal dependencies
  8918  */
  6642  */
  8919 
  6643 
  8920 
  6644 
  8921 
  6645 
  8922 function PostFormatCheck(_ref) {
  6646 function PostFormatCheck({
  8923   var disablePostFormats = _ref.disablePostFormats,
  6647   disablePostFormats,
  8924       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["disablePostFormats"]);
  6648   ...props
  8925 
  6649 }) {
  8926   return !disablePostFormats && Object(external_this_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
  6650   return !disablePostFormats && Object(external_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
  8927     supportKeys: "post-formats"
  6651     supportKeys: "post-formats"
  8928   }));
  6652   }));
  8929 }
  6653 }
  8930 
  6654 
  8931 /* harmony default export */ var post_format_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
  6655 /* harmony default export */ var post_format_check = (Object(external_wp_data_["withSelect"])(select => {
  8932   var editorSettings = select('core/editor').getEditorSettings();
  6656   const editorSettings = select('core/editor').getEditorSettings();
  8933   return {
  6657   return {
  8934     disablePostFormats: editorSettings.disablePostFormats
  6658     disablePostFormats: editorSettings.disablePostFormats
  8935   };
  6659   };
  8936 })(PostFormatCheck));
  6660 })(PostFormatCheck));
  8937 
  6661 
  8952 
  6676 
  8953 /**
  6677 /**
  8954  * Internal dependencies
  6678  * Internal dependencies
  8955  */
  6679  */
  8956 
  6680 
  8957 
  6681  // All WP post formats, sorted alphabetically by translated name.
  8958 var POST_FORMATS = [{
  6682 
       
  6683 const POST_FORMATS = [{
  8959   id: 'aside',
  6684   id: 'aside',
  8960   caption: Object(external_this_wp_i18n_["__"])('Aside')
  6685   caption: Object(external_wp_i18n_["__"])('Aside')
       
  6686 }, {
       
  6687   id: 'audio',
       
  6688   caption: Object(external_wp_i18n_["__"])('Audio')
       
  6689 }, {
       
  6690   id: 'chat',
       
  6691   caption: Object(external_wp_i18n_["__"])('Chat')
  8961 }, {
  6692 }, {
  8962   id: 'gallery',
  6693   id: 'gallery',
  8963   caption: Object(external_this_wp_i18n_["__"])('Gallery')
  6694   caption: Object(external_wp_i18n_["__"])('Gallery')
       
  6695 }, {
       
  6696   id: 'image',
       
  6697   caption: Object(external_wp_i18n_["__"])('Image')
  8964 }, {
  6698 }, {
  8965   id: 'link',
  6699   id: 'link',
  8966   caption: Object(external_this_wp_i18n_["__"])('Link')
  6700   caption: Object(external_wp_i18n_["__"])('Link')
  8967 }, {
       
  8968   id: 'image',
       
  8969   caption: Object(external_this_wp_i18n_["__"])('Image')
       
  8970 }, {
  6701 }, {
  8971   id: 'quote',
  6702   id: 'quote',
  8972   caption: Object(external_this_wp_i18n_["__"])('Quote')
  6703   caption: Object(external_wp_i18n_["__"])('Quote')
  8973 }, {
  6704 }, {
  8974   id: 'standard',
  6705   id: 'standard',
  8975   caption: Object(external_this_wp_i18n_["__"])('Standard')
  6706   caption: Object(external_wp_i18n_["__"])('Standard')
  8976 }, {
  6707 }, {
  8977   id: 'status',
  6708   id: 'status',
  8978   caption: Object(external_this_wp_i18n_["__"])('Status')
  6709   caption: Object(external_wp_i18n_["__"])('Status')
  8979 }, {
  6710 }, {
  8980   id: 'video',
  6711   id: 'video',
  8981   caption: Object(external_this_wp_i18n_["__"])('Video')
  6712   caption: Object(external_wp_i18n_["__"])('Video')
  8982 }, {
  6713 }].sort((a, b) => {
  8983   id: 'audio',
  6714   const normalizedA = a.caption.toUpperCase();
  8984   caption: Object(external_this_wp_i18n_["__"])('Audio')
  6715   const normalizedB = b.caption.toUpperCase();
  8985 }, {
  6716 
  8986   id: 'chat',
  6717   if (normalizedA < normalizedB) {
  8987   caption: Object(external_this_wp_i18n_["__"])('Chat')
  6718     return -1;
  8988 }];
  6719   }
  8989 
  6720 
  8990 function PostFormat(_ref) {
  6721   if (normalizedA > normalizedB) {
  8991   var onUpdatePostFormat = _ref.onUpdatePostFormat,
  6722     return 1;
  8992       _ref$postFormat = _ref.postFormat,
  6723   }
  8993       postFormat = _ref$postFormat === void 0 ? 'standard' : _ref$postFormat,
  6724 
  8994       supportedFormats = _ref.supportedFormats,
  6725   return 0;
  8995       suggestedFormat = _ref.suggestedFormat,
  6726 });
  8996       instanceId = _ref.instanceId;
  6727 function PostFormat() {
  8997   var postFormatSelectorId = 'post-format-selector-' + instanceId;
  6728   const instanceId = Object(external_wp_compose_["useInstanceId"])(PostFormat);
  8998   var formats = POST_FORMATS.filter(function (format) {
  6729   const postFormatSelectorId = `post-format-selector-${instanceId}`;
  8999     return Object(external_this_lodash_["includes"])(supportedFormats, format.id);
  6730   const {
       
  6731     postFormat,
       
  6732     suggestedFormat,
       
  6733     supportedFormats
       
  6734   } = Object(external_wp_data_["useSelect"])(select => {
       
  6735     const {
       
  6736       getEditedPostAttribute,
       
  6737       getSuggestedPostFormat
       
  6738     } = select('core/editor');
       
  6739 
       
  6740     const _postFormat = getEditedPostAttribute('format');
       
  6741 
       
  6742     const themeSupports = select('core').getThemeSupports();
       
  6743     return {
       
  6744       postFormat: _postFormat !== null && _postFormat !== void 0 ? _postFormat : 'standard',
       
  6745       suggestedFormat: getSuggestedPostFormat(),
       
  6746       // Ensure current format is always in the set.
       
  6747       // The current format may not be a format supported by the theme.
       
  6748       supportedFormats: Object(external_lodash_["union"])([_postFormat], Object(external_lodash_["get"])(themeSupports, ['formats'], []))
       
  6749     };
       
  6750   }, []);
       
  6751   const formats = POST_FORMATS.filter(format => Object(external_lodash_["includes"])(supportedFormats, format.id));
       
  6752   const suggestion = Object(external_lodash_["find"])(formats, format => format.id === suggestedFormat);
       
  6753   const {
       
  6754     editPost
       
  6755   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
  6756 
       
  6757   const onUpdatePostFormat = format => editPost({
       
  6758     format
  9000   });
  6759   });
  9001   var suggestion = Object(external_this_lodash_["find"])(formats, function (format) {
  6760 
  9002     return format.id === suggestedFormat;
  6761   return Object(external_wp_element_["createElement"])(post_format_check, null, Object(external_wp_element_["createElement"])("div", {
  9003   }); // Disable reason: We need to change the value immiediately to show/hide the suggestion if needed
       
  9004 
       
  9005   return Object(external_this_wp_element_["createElement"])(post_format_check, null, Object(external_this_wp_element_["createElement"])("div", {
       
  9006     className: "editor-post-format"
  6762     className: "editor-post-format"
  9007   }, Object(external_this_wp_element_["createElement"])("div", {
  6763   }, Object(external_wp_element_["createElement"])("div", {
  9008     className: "editor-post-format__content"
  6764     className: "editor-post-format__content"
  9009   }, Object(external_this_wp_element_["createElement"])("label", {
  6765   }, Object(external_wp_element_["createElement"])("label", {
  9010     htmlFor: postFormatSelectorId
  6766     htmlFor: postFormatSelectorId
  9011   }, Object(external_this_wp_i18n_["__"])('Post Format')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
  6767   }, Object(external_wp_i18n_["__"])('Post Format')), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
  9012     value: postFormat,
  6768     value: postFormat,
  9013     onChange: function onChange(format) {
  6769     onChange: format => onUpdatePostFormat(format),
  9014       return onUpdatePostFormat(format);
       
  9015     },
       
  9016     id: postFormatSelectorId,
  6770     id: postFormatSelectorId,
  9017     options: formats.map(function (format) {
  6771     options: formats.map(format => ({
  9018       return {
  6772       label: format.caption,
  9019         label: format.caption,
  6773       value: format.id
  9020         value: format.id
  6774     }))
  9021       };
  6775   })), suggestion && suggestion.id !== postFormat && Object(external_wp_element_["createElement"])("div", {
  9022     })
       
  9023   })), suggestion && suggestion.id !== postFormat && Object(external_this_wp_element_["createElement"])("div", {
       
  9024     className: "editor-post-format__suggestion"
  6776     className: "editor-post-format__suggestion"
  9025   }, Object(external_this_wp_i18n_["__"])('Suggestion:'), ' ', Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  6777   }, Object(external_wp_i18n_["__"])('Suggestion:'), ' ', Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9026     isLink: true,
  6778     isLink: true,
  9027     onClick: function onClick() {
  6779     onClick: () => onUpdatePostFormat(suggestion.id)
  9028       return onUpdatePostFormat(suggestion.id);
       
  9029     }
       
  9030   }, suggestion.caption))));
  6780   }, suggestion.caption))));
  9031 }
  6781 }
  9032 
  6782 
  9033 /* harmony default export */ var post_format = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
  9034   var _select = select('core/editor'),
       
  9035       getEditedPostAttribute = _select.getEditedPostAttribute,
       
  9036       getSuggestedPostFormat = _select.getSuggestedPostFormat;
       
  9037 
       
  9038   var postFormat = getEditedPostAttribute('format');
       
  9039   var themeSupports = select('core').getThemeSupports(); // Ensure current format is always in the set.
       
  9040   // The current format may not be a format supported by the theme.
       
  9041 
       
  9042   var supportedFormats = Object(external_this_lodash_["union"])([postFormat], Object(external_this_lodash_["get"])(themeSupports, ['formats'], []));
       
  9043   return {
       
  9044     postFormat: postFormat,
       
  9045     supportedFormats: supportedFormats,
       
  9046     suggestedFormat: getSuggestedPostFormat()
       
  9047   };
       
  9048 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
  9049   return {
       
  9050     onUpdatePostFormat: function onUpdatePostFormat(postFormat) {
       
  9051       dispatch('core/editor').editPost({
       
  9052         format: postFormat
       
  9053       });
       
  9054     }
       
  9055   };
       
  9056 }), external_this_wp_compose_["withInstanceId"]])(PostFormat));
       
  9057 
       
  9058 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/backup.js
  6783 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/backup.js
  9059 
  6784 
  9060 
  6785 
  9061 /**
  6786 /**
  9062  * WordPress dependencies
  6787  * WordPress dependencies
  9063  */
  6788  */
  9064 
  6789 
  9065 var backup = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
  6790 const backup = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
  9066   xmlns: "http://www.w3.org/2000/svg",
  6791   xmlns: "http://www.w3.org/2000/svg",
  9067   viewBox: "-2 -2 24 24"
  6792   viewBox: "0 0 24 24"
  9068 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
  6793 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
  9069   d: "M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z"
  6794   d: "M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"
  9070 }));
  6795 }));
  9071 /* harmony default export */ var library_backup = (backup);
  6796 /* harmony default export */ var library_backup = (backup);
  9072 
  6797 
  9073 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-last-revision/check.js
  6798 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-last-revision/check.js
  9074 
  6799 
  9080 /**
  6805 /**
  9081  * Internal dependencies
  6806  * Internal dependencies
  9082  */
  6807  */
  9083 
  6808 
  9084 
  6809 
  9085 function PostLastRevisionCheck(_ref) {
  6810 function PostLastRevisionCheck({
  9086   var lastRevisionId = _ref.lastRevisionId,
  6811   lastRevisionId,
  9087       revisionsCount = _ref.revisionsCount,
  6812   revisionsCount,
  9088       children = _ref.children;
  6813   children
  9089 
  6814 }) {
  9090   if (!lastRevisionId || revisionsCount < 2) {
  6815   if (!lastRevisionId || revisionsCount < 2) {
  9091     return null;
  6816     return null;
  9092   }
  6817   }
  9093 
  6818 
  9094   return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
  6819   return Object(external_wp_element_["createElement"])(post_type_support_check, {
  9095     supportKeys: "revisions"
  6820     supportKeys: "revisions"
  9096   }, children);
  6821   }, children);
  9097 }
  6822 }
  9098 /* harmony default export */ var post_last_revision_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
  6823 /* harmony default export */ var post_last_revision_check = (Object(external_wp_data_["withSelect"])(select => {
  9099   var _select = select('core/editor'),
  6824   const {
  9100       getCurrentPostLastRevisionId = _select.getCurrentPostLastRevisionId,
  6825     getCurrentPostLastRevisionId,
  9101       getCurrentPostRevisionsCount = _select.getCurrentPostRevisionsCount;
  6826     getCurrentPostRevisionsCount
  9102 
  6827   } = select('core/editor');
  9103   return {
  6828   return {
  9104     lastRevisionId: getCurrentPostLastRevisionId(),
  6829     lastRevisionId: getCurrentPostLastRevisionId(),
  9105     revisionsCount: getCurrentPostRevisionsCount()
  6830     revisionsCount: getCurrentPostRevisionsCount()
  9106   };
  6831   };
  9107 })(PostLastRevisionCheck));
  6832 })(PostLastRevisionCheck));
  9121  */
  6846  */
  9122 
  6847 
  9123 
  6848 
  9124 
  6849 
  9125 
  6850 
  9126 function LastRevision(_ref) {
  6851 function LastRevision({
  9127   var lastRevisionId = _ref.lastRevisionId,
  6852   lastRevisionId,
  9128       revisionsCount = _ref.revisionsCount;
  6853   revisionsCount
  9129   return Object(external_this_wp_element_["createElement"])(post_last_revision_check, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  6854 }) {
       
  6855   return Object(external_wp_element_["createElement"])(post_last_revision_check, null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9130     href: getWPAdminURL('revision.php', {
  6856     href: getWPAdminURL('revision.php', {
  9131       revision: lastRevisionId,
  6857       revision: lastRevisionId,
  9132       gutenberg: true
  6858       gutenberg: true
  9133     }),
  6859     }),
  9134     className: "editor-post-last-revision__title",
  6860     className: "editor-post-last-revision__title",
  9135     icon: library_backup
  6861     icon: library_backup
  9136   }, Object(external_this_wp_i18n_["sprintf"])(
  6862   }, Object(external_wp_i18n_["sprintf"])(
  9137   /* translators: %d: number of revisions */
  6863   /* translators: %d: number of revisions */
  9138   Object(external_this_wp_i18n_["_n"])('%d Revision', '%d Revisions', revisionsCount), revisionsCount)));
  6864   Object(external_wp_i18n_["_n"])('%d Revision', '%d Revisions', revisionsCount), revisionsCount)));
  9139 }
  6865 }
  9140 
  6866 
  9141 /* harmony default export */ var post_last_revision = (Object(external_this_wp_data_["withSelect"])(function (select) {
  6867 /* harmony default export */ var post_last_revision = (Object(external_wp_data_["withSelect"])(select => {
  9142   var _select = select('core/editor'),
  6868   const {
  9143       getCurrentPostLastRevisionId = _select.getCurrentPostLastRevisionId,
  6869     getCurrentPostLastRevisionId,
  9144       getCurrentPostRevisionsCount = _select.getCurrentPostRevisionsCount;
  6870     getCurrentPostRevisionsCount
  9145 
  6871   } = select('core/editor');
  9146   return {
  6872   return {
  9147     lastRevisionId: getCurrentPostLastRevisionId(),
  6873     lastRevisionId: getCurrentPostLastRevisionId(),
  9148     revisionsCount: getCurrentPostRevisionsCount()
  6874     revisionsCount: getCurrentPostRevisionsCount()
  9149   };
  6875   };
  9150 })(LastRevision));
  6876 })(LastRevision));
  9151 
  6877 
  9152 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-preview-button/index.js
  6878 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-preview-button/index.js
  9153 
  6879 
  9154 
  6880 
  9155 
       
  9156 
       
  9157 
       
  9158 
       
  9159 
       
  9160 
       
  9161 function post_preview_button_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_preview_button_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); }; }
       
  9162 
       
  9163 function post_preview_button_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; } }
       
  9164 
       
  9165 /**
  6881 /**
  9166  * External dependencies
  6882  * External dependencies
  9167  */
  6883  */
  9168 
  6884 
  9169 
  6885 
  9177 
  6893 
  9178 
  6894 
  9179 
  6895 
  9180 
  6896 
  9181 function writeInterstitialMessage(targetDocument) {
  6897 function writeInterstitialMessage(targetDocument) {
  9182   var markup = Object(external_this_wp_element_["renderToString"])(Object(external_this_wp_element_["createElement"])("div", {
  6898   let markup = Object(external_wp_element_["renderToString"])(Object(external_wp_element_["createElement"])("div", {
  9183     className: "editor-post-preview-button__interstitial-message"
  6899     className: "editor-post-preview-button__interstitial-message"
  9184   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
  6900   }, Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
  9185     xmlns: "http://www.w3.org/2000/svg",
  6901     xmlns: "http://www.w3.org/2000/svg",
  9186     viewBox: "0 0 96 96"
  6902     viewBox: "0 0 96 96"
  9187   }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
  6903   }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  9188     className: "outer",
  6904     className: "outer",
  9189     d: "M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",
  6905     d: "M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",
  9190     fill: "none"
  6906     fill: "none"
  9191   }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
  6907   }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
  9192     className: "inner",
  6908     className: "inner",
  9193     d: "M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",
  6909     d: "M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",
  9194     fill: "none"
  6910     fill: "none"
  9195   })), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('Generating preview…'))));
  6911   })), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Generating preview…'))));
  9196   markup += "\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t";
  6912   markup += `
       
  6913 		<style>
       
  6914 			body {
       
  6915 				margin: 0;
       
  6916 			}
       
  6917 			.editor-post-preview-button__interstitial-message {
       
  6918 				display: flex;
       
  6919 				flex-direction: column;
       
  6920 				align-items: center;
       
  6921 				justify-content: center;
       
  6922 				height: 100vh;
       
  6923 				width: 100vw;
       
  6924 			}
       
  6925 			@-webkit-keyframes paint {
       
  6926 				0% {
       
  6927 					stroke-dashoffset: 0;
       
  6928 				}
       
  6929 			}
       
  6930 			@-moz-keyframes paint {
       
  6931 				0% {
       
  6932 					stroke-dashoffset: 0;
       
  6933 				}
       
  6934 			}
       
  6935 			@-o-keyframes paint {
       
  6936 				0% {
       
  6937 					stroke-dashoffset: 0;
       
  6938 				}
       
  6939 			}
       
  6940 			@keyframes paint {
       
  6941 				0% {
       
  6942 					stroke-dashoffset: 0;
       
  6943 				}
       
  6944 			}
       
  6945 			.editor-post-preview-button__interstitial-message svg {
       
  6946 				width: 192px;
       
  6947 				height: 192px;
       
  6948 				stroke: #555d66;
       
  6949 				stroke-width: 0.75;
       
  6950 			}
       
  6951 			.editor-post-preview-button__interstitial-message svg .outer,
       
  6952 			.editor-post-preview-button__interstitial-message svg .inner {
       
  6953 				stroke-dasharray: 280;
       
  6954 				stroke-dashoffset: 280;
       
  6955 				-webkit-animation: paint 1.5s ease infinite alternate;
       
  6956 				-moz-animation: paint 1.5s ease infinite alternate;
       
  6957 				-o-animation: paint 1.5s ease infinite alternate;
       
  6958 				animation: paint 1.5s ease infinite alternate;
       
  6959 			}
       
  6960 			p {
       
  6961 				text-align: center;
       
  6962 				font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
       
  6963 			}
       
  6964 		</style>
       
  6965 	`;
  9197   /**
  6966   /**
  9198    * Filters the interstitial message shown when generating previews.
  6967    * Filters the interstitial message shown when generating previews.
  9199    *
  6968    *
  9200    * @param {string} markup The preview interstitial markup.
  6969    * @param {string} markup The preview interstitial markup.
  9201    */
  6970    */
  9202 
  6971 
  9203   markup = Object(external_this_wp_hooks_["applyFilters"])('editor.PostPreview.interstitialMarkup', markup);
  6972   markup = Object(external_wp_hooks_["applyFilters"])('editor.PostPreview.interstitialMarkup', markup);
  9204   targetDocument.write(markup);
  6973   targetDocument.write(markup);
  9205   targetDocument.title = Object(external_this_wp_i18n_["__"])('Generating preview…');
  6974   targetDocument.title = Object(external_wp_i18n_["__"])('Generating preview…');
  9206   targetDocument.close();
  6975   targetDocument.close();
  9207 }
  6976 }
  9208 
  6977 
  9209 var post_preview_button_PostPreviewButton = /*#__PURE__*/function (_Component) {
  6978 class post_preview_button_PostPreviewButton extends external_wp_element_["Component"] {
  9210   Object(inherits["a" /* default */])(PostPreviewButton, _Component);
  6979   constructor() {
  9211 
  6980     super(...arguments);
  9212   var _super = post_preview_button_createSuper(PostPreviewButton);
  6981     this.buttonRef = Object(external_wp_element_["createRef"])();
  9213 
  6982     this.openPreviewWindow = this.openPreviewWindow.bind(this);
  9214   function PostPreviewButton() {
  6983   }
  9215     var _this;
  6984 
  9216 
  6985   componentDidUpdate(prevProps) {
  9217     Object(classCallCheck["a" /* default */])(this, PostPreviewButton);
  6986     const {
  9218 
  6987       previewLink
  9219     _this = _super.apply(this, arguments);
  6988     } = this.props; // This relies on the window being responsible to unset itself when
  9220     _this.buttonRef = Object(external_this_wp_element_["createRef"])();
  6989     // navigation occurs or a new preview window is opened, to avoid
  9221     _this.openPreviewWindow = _this.openPreviewWindow.bind(Object(assertThisInitialized["a" /* default */])(_this));
  6990     // unintentional forceful redirects.
  9222     return _this;
  6991 
  9223   }
  6992     if (previewLink && !prevProps.previewLink) {
  9224 
  6993       this.setPreviewWindowLink(previewLink);
  9225   Object(createClass["a" /* default */])(PostPreviewButton, [{
  6994     }
  9226     key: "componentDidUpdate",
  6995   }
  9227     value: function componentDidUpdate(prevProps) {
  6996   /**
  9228       var previewLink = this.props.previewLink; // This relies on the window being responsible to unset itself when
  6997    * Sets the preview window's location to the given URL, if a preview window
  9229       // navigation occurs or a new preview window is opened, to avoid
  6998    * exists and is not closed.
  9230       // unintentional forceful redirects.
  6999    *
  9231 
  7000    * @param {string} url URL to assign as preview window location.
  9232       if (previewLink && !prevProps.previewLink) {
  7001    */
  9233         this.setPreviewWindowLink(previewLink);
  7002 
       
  7003 
       
  7004   setPreviewWindowLink(url) {
       
  7005     const {
       
  7006       previewWindow
       
  7007     } = this;
       
  7008 
       
  7009     if (previewWindow && !previewWindow.closed) {
       
  7010       previewWindow.location = url;
       
  7011 
       
  7012       if (this.buttonRef.current) {
       
  7013         this.buttonRef.current.focus();
  9234       }
  7014       }
  9235     }
  7015     }
  9236     /**
  7016   }
  9237      * Sets the preview window's location to the given URL, if a preview window
  7017 
  9238      * exists and is not closed.
  7018   getWindowTarget() {
  9239      *
  7019     const {
  9240      * @param {string} url URL to assign as preview window location.
  7020       postId
  9241      */
  7021     } = this.props;
  9242 
  7022     return `wp-preview-${postId}`;
  9243   }, {
  7023   }
  9244     key: "setPreviewWindowLink",
  7024 
  9245     value: function setPreviewWindowLink(url) {
  7025   openPreviewWindow(event) {
  9246       var previewWindow = this.previewWindow;
  7026     // Our Preview button has its 'href' and 'target' set correctly for a11y
  9247 
  7027     // purposes. Unfortunately, though, we can't rely on the default 'click'
  9248       if (previewWindow && !previewWindow.closed) {
  7028     // handler since sometimes it incorrectly opens a new tab instead of reusing
  9249         previewWindow.location = url;
  7029     // the existing one.
  9250 
  7030     // https://github.com/WordPress/gutenberg/pull/8330
  9251         if (this.buttonRef.current) {
  7031     event.preventDefault(); // Open up a Preview tab if needed. This is where we'll show the preview.
  9252           this.buttonRef.current.focus();
  7032 
  9253         }
  7033     if (!this.previewWindow || this.previewWindow.closed) {
  9254       }
  7034       this.previewWindow = window.open('', this.getWindowTarget());
  9255     }
  7035     } // Focus the Preview tab. This might not do anything, depending on the browser's
  9256   }, {
  7036     // and user's preferences.
  9257     key: "getWindowTarget",
  7037     // https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus
  9258     value: function getWindowTarget() {
  7038 
  9259       var postId = this.props.postId;
  7039 
  9260       return "wp-preview-".concat(postId);
  7040     this.previewWindow.focus();
  9261     }
  7041 
  9262   }, {
  7042     if ( // If we don't need to autosave the post before previewing, then we simply
  9263     key: "openPreviewWindow",
  7043     // load the Preview URL in the Preview tab.
  9264     value: function openPreviewWindow(event) {
  7044     !this.props.isAutosaveable || // Do not save or overwrite the post, if the post is already locked.
  9265       // Our Preview button has its 'href' and 'target' set correctly for a11y
  7045     this.props.isPostLocked) {
  9266       // purposes. Unfortunately, though, we can't rely on the default 'click'
  7046       this.setPreviewWindowLink(event.target.href);
  9267       // handler since sometimes it incorrectly opens a new tab instead of reusing
  7047       return;
  9268       // the existing one.
  7048     } // Request an autosave. This happens asynchronously and causes the component
  9269       // https://github.com/WordPress/gutenberg/pull/8330
  7049     // to update when finished.
  9270       event.preventDefault(); // Open up a Preview tab if needed. This is where we'll show the preview.
  7050 
  9271 
  7051 
  9272       if (!this.previewWindow || this.previewWindow.closed) {
  7052     if (this.props.isDraft) {
  9273         this.previewWindow = window.open('', this.getWindowTarget());
  7053       this.props.savePost({
  9274       } // Focus the Preview tab. This might not do anything, depending on the browser's
  7054         isPreview: true
  9275       // and user's preferences.
  7055       });
  9276       // https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus
  7056     } else {
  9277 
  7057       this.props.autosave({
  9278 
  7058         isPreview: true
  9279       this.previewWindow.focus(); // If we don't need to autosave the post before previewing, then we simply
  7059       });
  9280       // load the Preview URL in the Preview tab.
  7060     } // Display a 'Generating preview' message in the Preview tab while we wait for the
  9281 
  7061     // autosave to finish.
  9282       if (!this.props.isAutosaveable) {
  7062 
  9283         this.setPreviewWindowLink(event.target.href);
  7063 
  9284         return;
  7064     writeInterstitialMessage(this.previewWindow.document);
  9285       } // Request an autosave. This happens asynchronously and causes the component
  7065   }
  9286       // to update when finished.
  7066 
  9287 
  7067   render() {
  9288 
  7068     const {
  9289       if (this.props.isDraft) {
  7069       previewLink,
  9290         this.props.savePost({
  7070       currentPostLink,
  9291           isPreview: true
  7071       isSaveable,
  9292         });
  7072       role
  9293       } else {
  7073     } = this.props; // Link to the `?preview=true` URL if we have it, since this lets us see
  9294         this.props.autosave({
  7074     // changes that were autosaved since the post was last published. Otherwise,
  9295           isPreview: true
  7075     // just link to the post's URL.
  9296         });
  7076 
  9297       } // Display a 'Generating preview' message in the Preview tab while we wait for the
  7077     const href = previewLink || currentPostLink;
  9298       // autosave to finish.
  7078     const classNames = classnames_default()({
  9299 
  7079       'editor-post-preview': !this.props.className
  9300 
  7080     }, this.props.className);
  9301       writeInterstitialMessage(this.previewWindow.document);
  7081     return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9302     }
  7082       isTertiary: !this.props.className,
  9303   }, {
  7083       className: classNames,
  9304     key: "render",
  7084       href: href,
  9305     value: function render() {
  7085       target: this.getWindowTarget(),
  9306       var _this$props = this.props,
  7086       disabled: !isSaveable,
  9307           previewLink = _this$props.previewLink,
  7087       onClick: this.openPreviewWindow,
  9308           currentPostLink = _this$props.currentPostLink,
  7088       ref: this.buttonRef,
  9309           isSaveable = _this$props.isSaveable; // Link to the `?preview=true` URL if we have it, since this lets us see
  7089       role: role
  9310       // changes that were autosaved since the post was last published. Otherwise,
  7090     }, this.props.textContent ? this.props.textContent : Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["_x"])('Preview', 'imperative verb'), Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
  9311       // just link to the post's URL.
  7091       as: "span"
  9312 
  7092     },
  9313       var href = previewLink || currentPostLink;
  7093     /* translators: accessibility text */
  9314       var classNames = classnames_default()({
  7094     Object(external_wp_i18n_["__"])('(opens in a new tab)'))));
  9315         'editor-post-preview': !this.props.className
  7095   }
  9316       }, this.props.className);
  7096 
  9317       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  7097 }
  9318         isTertiary: !this.props.className,
  7098 /* harmony default export */ var post_preview_button = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, {
  9319         className: classNames,
  7099   forcePreviewLink,
  9320         href: href,
  7100   forceIsAutosaveable
  9321         target: this.getWindowTarget(),
  7101 }) => {
  9322         disabled: !isSaveable,
  7102   const {
  9323         onClick: this.openPreviewWindow,
  7103     getCurrentPostId,
  9324         ref: this.buttonRef
  7104     getCurrentPostAttribute,
  9325       }, this.props.textContent ? this.props.textContent : Object(external_this_wp_i18n_["_x"])('Preview', 'imperative verb'), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
  7105     getEditedPostAttribute,
  9326         as: "span"
  7106     isEditedPostSaveable,
  9327       },
  7107     isEditedPostAutosaveable,
  9328       /* translators: accessibility text */
  7108     getEditedPostPreviewLink,
  9329       Object(external_this_wp_i18n_["__"])('(opens in a new tab)')));
  7109     isPostLocked
  9330     }
  7110   } = select('core/editor');
  9331   }]);
  7111   const {
  9332 
  7112     getPostType
  9333   return PostPreviewButton;
  7113   } = select('core');
  9334 }(external_this_wp_element_["Component"]);
  7114   const previewLink = getEditedPostPreviewLink();
  9335 /* harmony default export */ var post_preview_button = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
  7115   const postType = getPostType(getEditedPostAttribute('type'));
  9336   var forcePreviewLink = _ref.forcePreviewLink,
       
  9337       forceIsAutosaveable = _ref.forceIsAutosaveable;
       
  9338 
       
  9339   var _select = select('core/editor'),
       
  9340       getCurrentPostId = _select.getCurrentPostId,
       
  9341       getCurrentPostAttribute = _select.getCurrentPostAttribute,
       
  9342       getEditedPostAttribute = _select.getEditedPostAttribute,
       
  9343       isEditedPostSaveable = _select.isEditedPostSaveable,
       
  9344       isEditedPostAutosaveable = _select.isEditedPostAutosaveable,
       
  9345       getEditedPostPreviewLink = _select.getEditedPostPreviewLink;
       
  9346 
       
  9347   var _select2 = select('core'),
       
  9348       getPostType = _select2.getPostType;
       
  9349 
       
  9350   var previewLink = getEditedPostPreviewLink();
       
  9351   var postType = getPostType(getEditedPostAttribute('type'));
       
  9352   return {
  7116   return {
  9353     postId: getCurrentPostId(),
  7117     postId: getCurrentPostId(),
  9354     currentPostLink: getCurrentPostAttribute('link'),
  7118     currentPostLink: getCurrentPostAttribute('link'),
  9355     previewLink: forcePreviewLink !== undefined ? forcePreviewLink : previewLink,
  7119     previewLink: forcePreviewLink !== undefined ? forcePreviewLink : previewLink,
  9356     isSaveable: isEditedPostSaveable(),
  7120     isSaveable: isEditedPostSaveable(),
  9357     isAutosaveable: forceIsAutosaveable || isEditedPostAutosaveable(),
  7121     isAutosaveable: forceIsAutosaveable || isEditedPostAutosaveable(),
  9358     isViewable: Object(external_this_lodash_["get"])(postType, ['viewable'], false),
  7122     isViewable: Object(external_lodash_["get"])(postType, ['viewable'], false),
  9359     isDraft: ['draft', 'auto-draft'].indexOf(getEditedPostAttribute('status')) !== -1
  7123     isDraft: ['draft', 'auto-draft'].indexOf(getEditedPostAttribute('status')) !== -1,
       
  7124     isPostLocked: isPostLocked()
  9360   };
  7125   };
  9361 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  7126 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
  9362   return {
  7127   autosave: dispatch('core/editor').autosave,
  9363     autosave: dispatch('core/editor').autosave,
  7128   savePost: dispatch('core/editor').savePost
  9364     savePost: dispatch('core/editor').savePost
  7129 })), Object(external_wp_compose_["ifCondition"])(({
  9365   };
  7130   isViewable
  9366 }), Object(external_this_wp_compose_["ifCondition"])(function (_ref2) {
  7131 }) => isViewable)])(post_preview_button_PostPreviewButton));
  9367   var isViewable = _ref2.isViewable;
       
  9368   return isViewable;
       
  9369 })])(post_preview_button_PostPreviewButton));
       
  9370 
  7132 
  9371 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-locked-modal/index.js
  7133 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-locked-modal/index.js
  9372 
  7134 
  9373 
  7135 
  9374 
       
  9375 
       
  9376 
       
  9377 
       
  9378 
       
  9379 
       
  9380 function post_locked_modal_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_locked_modal_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); }; }
       
  9381 
       
  9382 function post_locked_modal_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; } }
       
  9383 
       
  9384 /**
  7136 /**
  9385  * External dependencies
  7137  * External dependencies
  9386  */
  7138  */
  9387 
  7139 
  9388 /**
  7140 /**
  9400  * Internal dependencies
  7152  * Internal dependencies
  9401  */
  7153  */
  9402 
  7154 
  9403 
  7155 
  9404 
  7156 
  9405 
  7157 function PostLockedModal() {
  9406 var post_locked_modal_PostLockedModal = /*#__PURE__*/function (_Component) {
  7158   const instanceId = Object(external_wp_compose_["useInstanceId"])(PostLockedModal);
  9407   Object(inherits["a" /* default */])(PostLockedModal, _Component);
  7159   const hookName = 'core/editor/post-locked-modal-' + instanceId;
  9408 
  7160   const {
  9409   var _super = post_locked_modal_createSuper(PostLockedModal);
  7161     autosave,
  9410 
  7162     updatePostLock
  9411   function PostLockedModal() {
  7163   } = Object(external_wp_data_["useDispatch"])('core/editor');
  9412     var _this;
  7164   const {
  9413 
  7165     isLocked,
  9414     Object(classCallCheck["a" /* default */])(this, PostLockedModal);
  7166     isTakeover,
  9415 
  7167     user,
  9416     _this = _super.apply(this, arguments);
  7168     postId,
  9417     _this.sendPostLock = _this.sendPostLock.bind(Object(assertThisInitialized["a" /* default */])(_this));
  7169     postLockUtils,
  9418     _this.receivePostLock = _this.receivePostLock.bind(Object(assertThisInitialized["a" /* default */])(_this));
  7170     activePostLock,
  9419     _this.releasePostLock = _this.releasePostLock.bind(Object(assertThisInitialized["a" /* default */])(_this));
  7171     postType
  9420     return _this;
  7172   } = Object(external_wp_data_["useSelect"])(select => {
  9421   }
  7173     const {
  9422 
  7174       isPostLocked,
  9423   Object(createClass["a" /* default */])(PostLockedModal, [{
  7175       isPostLockTakeover,
  9424     key: "componentDidMount",
  7176       getPostLockUser,
  9425     value: function componentDidMount() {
  7177       getCurrentPostId,
  9426       var hookName = this.getHookName(); // Details on these events on the Heartbeat API docs
  7178       getActivePostLock,
  9427       // https://developer.wordpress.org/plugins/javascript/heartbeat-api/
  7179       getEditedPostAttribute,
  9428 
  7180       getEditorSettings
  9429       Object(external_this_wp_hooks_["addAction"])('heartbeat.send', hookName, this.sendPostLock);
  7181     } = select('core/editor');
  9430       Object(external_this_wp_hooks_["addAction"])('heartbeat.tick', hookName, this.receivePostLock);
  7182     const {
  9431     }
  7183       getPostType
  9432   }, {
  7184     } = select('core');
  9433     key: "componentWillUnmount",
  7185     return {
  9434     value: function componentWillUnmount() {
  7186       isLocked: isPostLocked(),
  9435       var hookName = this.getHookName();
  7187       isTakeover: isPostLockTakeover(),
  9436       Object(external_this_wp_hooks_["removeAction"])('heartbeat.send', hookName);
  7188       user: getPostLockUser(),
  9437       Object(external_this_wp_hooks_["removeAction"])('heartbeat.tick', hookName);
  7189       postId: getCurrentPostId(),
  9438     }
  7190       postLockUtils: getEditorSettings().postLockUtils,
  9439     /**
  7191       activePostLock: getActivePostLock(),
  9440      * Returns a `@wordpress/hooks` hook name specific to the instance of the
  7192       postType: getPostType(getEditedPostAttribute('type'))
  9441      * component.
  7193     };
  9442      *
  7194   });
  9443      * @return {string} Hook name prefix.
  7195   Object(external_wp_element_["useEffect"])(() => {
  9444      */
       
  9445 
       
  9446   }, {
       
  9447     key: "getHookName",
       
  9448     value: function getHookName() {
       
  9449       var instanceId = this.props.instanceId;
       
  9450       return 'core/editor/post-locked-modal-' + instanceId;
       
  9451     }
       
  9452     /**
  7196     /**
  9453      * Keep the lock refreshed.
  7197      * Keep the lock refreshed.
  9454      *
  7198      *
  9455      * When the user does not send a heartbeat in a heartbeat-tick
  7199      * When the user does not send a heartbeat in a heartbeat-tick
  9456      * the user is no longer editing and another user can start editing.
  7200      * the user is no longer editing and another user can start editing.
  9457      *
  7201      *
  9458      * @param {Object} data Data to send in the heartbeat request.
  7202      * @param {Object} data Data to send in the heartbeat request.
  9459      */
  7203      */
  9460 
  7204     function sendPostLock(data) {
  9461   }, {
       
  9462     key: "sendPostLock",
       
  9463     value: function sendPostLock(data) {
       
  9464       var _this$props = this.props,
       
  9465           isLocked = _this$props.isLocked,
       
  9466           activePostLock = _this$props.activePostLock,
       
  9467           postId = _this$props.postId;
       
  9468 
       
  9469       if (isLocked) {
  7205       if (isLocked) {
  9470         return;
  7206         return;
  9471       }
  7207       }
  9472 
  7208 
  9473       data['wp-refresh-post-lock'] = {
  7209       data['wp-refresh-post-lock'] = {
  9479      * Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.
  7215      * Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.
  9480      *
  7216      *
  9481      * @param {Object} data Data received in the heartbeat request
  7217      * @param {Object} data Data received in the heartbeat request
  9482      */
  7218      */
  9483 
  7219 
  9484   }, {
  7220 
  9485     key: "receivePostLock",
  7221     function receivePostLock(data) {
  9486     value: function receivePostLock(data) {
       
  9487       if (!data['wp-refresh-post-lock']) {
  7222       if (!data['wp-refresh-post-lock']) {
  9488         return;
  7223         return;
  9489       }
  7224       }
  9490 
  7225 
  9491       var _this$props2 = this.props,
  7226       const received = data['wp-refresh-post-lock'];
  9492           autosave = _this$props2.autosave,
       
  9493           updatePostLock = _this$props2.updatePostLock;
       
  9494       var received = data['wp-refresh-post-lock'];
       
  9495 
  7227 
  9496       if (received.lock_error) {
  7228       if (received.lock_error) {
  9497         // Auto save and display the takeover modal.
  7229         // Auto save and display the takeover modal.
  9498         autosave();
  7230         autosave();
  9499         updatePostLock({
  7231         updatePostLock({
  9512     }
  7244     }
  9513     /**
  7245     /**
  9514      * Unlock the post before the window is exited.
  7246      * Unlock the post before the window is exited.
  9515      */
  7247      */
  9516 
  7248 
  9517   }, {
  7249 
  9518     key: "releasePostLock",
  7250     function releasePostLock() {
  9519     value: function releasePostLock() {
       
  9520       var _this$props3 = this.props,
       
  9521           isLocked = _this$props3.isLocked,
       
  9522           activePostLock = _this$props3.activePostLock,
       
  9523           postLockUtils = _this$props3.postLockUtils,
       
  9524           postId = _this$props3.postId;
       
  9525 
       
  9526       if (isLocked || !activePostLock) {
  7251       if (isLocked || !activePostLock) {
  9527         return;
  7252         return;
  9528       }
  7253       }
  9529 
  7254 
  9530       var data = new window.FormData();
  7255       const data = new window.FormData();
  9531       data.append('action', 'wp-remove-post-lock');
  7256       data.append('action', 'wp-remove-post-lock');
  9532       data.append('_wpnonce', postLockUtils.unlockNonce);
  7257       data.append('_wpnonce', postLockUtils.unlockNonce);
  9533       data.append('post_ID', postId);
  7258       data.append('post_ID', postId);
  9534       data.append('active_post_lock', activePostLock);
  7259       data.append('active_post_lock', activePostLock);
  9535 
  7260 
  9536       if (window.navigator.sendBeacon) {
  7261       if (window.navigator.sendBeacon) {
  9537         window.navigator.sendBeacon(postLockUtils.ajaxUrl, data);
  7262         window.navigator.sendBeacon(postLockUtils.ajaxUrl, data);
  9538       } else {
  7263       } else {
  9539         var xhr = new window.XMLHttpRequest();
  7264         const xhr = new window.XMLHttpRequest();
  9540         xhr.open('POST', postLockUtils.ajaxUrl, false);
  7265         xhr.open('POST', postLockUtils.ajaxUrl, false);
  9541         xhr.send(data);
  7266         xhr.send(data);
  9542       }
  7267       }
  9543     }
  7268     } // Details on these events on the Heartbeat API docs
  9544   }, {
  7269     // https://developer.wordpress.org/plugins/javascript/heartbeat-api/
  9545     key: "render",
  7270 
  9546     value: function render() {
  7271 
  9547       var _this$props4 = this.props,
  7272     Object(external_wp_hooks_["addAction"])('heartbeat.send', hookName, sendPostLock);
  9548           user = _this$props4.user,
  7273     Object(external_wp_hooks_["addAction"])('heartbeat.tick', hookName, receivePostLock);
  9549           postId = _this$props4.postId,
  7274     window.addEventListener('beforeunload', releasePostLock);
  9550           isLocked = _this$props4.isLocked,
  7275     return () => {
  9551           isTakeover = _this$props4.isTakeover,
  7276       Object(external_wp_hooks_["removeAction"])('heartbeat.send', hookName);
  9552           postLockUtils = _this$props4.postLockUtils,
  7277       Object(external_wp_hooks_["removeAction"])('heartbeat.tick', hookName);
  9553           postType = _this$props4.postType;
  7278       window.removeEventListener('beforeunload', releasePostLock);
  9554 
  7279     };
  9555       if (!isLocked) {
  7280   }, []);
  9556         return null;
  7281 
  9557       }
  7282   if (!isLocked) {
  9558 
  7283     return null;
  9559       var userDisplayName = user.name;
  7284   }
  9560       var userAvatar = user.avatar;
  7285 
  9561       var unlockUrl = Object(external_this_wp_url_["addQueryArgs"])('post.php', {
  7286   const userDisplayName = user.name;
  9562         'get-post-lock': '1',
  7287   const userAvatar = user.avatar;
  9563         lockKey: true,
  7288   const unlockUrl = Object(external_wp_url_["addQueryArgs"])('post.php', {
  9564         post: postId,
  7289     'get-post-lock': '1',
  9565         action: 'edit',
  7290     lockKey: true,
  9566         _wpnonce: postLockUtils.nonce
  7291     post: postId,
  9567       });
  7292     action: 'edit',
  9568       var allPostsUrl = getWPAdminURL('edit.php', {
  7293     _wpnonce: postLockUtils.nonce
  9569         post_type: Object(external_this_lodash_["get"])(postType, ['slug'])
  7294   });
  9570       });
  7295   const allPostsUrl = getWPAdminURL('edit.php', {
  9571 
  7296     post_type: Object(external_lodash_["get"])(postType, ['slug'])
  9572       var allPostsLabel = Object(external_this_wp_i18n_["__"])('Exit the Editor');
  7297   });
  9573 
  7298 
  9574       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Modal"], {
  7299   const allPostsLabel = Object(external_wp_i18n_["__"])('Exit the Editor');
  9575         title: isTakeover ? Object(external_this_wp_i18n_["__"])('Someone else has taken over this post.') : Object(external_this_wp_i18n_["__"])('This post is already being edited.'),
  7300 
  9576         focusOnMount: true,
  7301   return Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], {
  9577         shouldCloseOnClickOutside: false,
  7302     title: isTakeover ? Object(external_wp_i18n_["__"])('Someone else has taken over this post.') : Object(external_wp_i18n_["__"])('This post is already being edited.'),
  9578         shouldCloseOnEsc: false,
  7303     focusOnMount: true,
  9579         isDismissible: false,
  7304     shouldCloseOnClickOutside: false,
  9580         className: "editor-post-locked-modal"
  7305     shouldCloseOnEsc: false,
  9581       }, !!userAvatar && Object(external_this_wp_element_["createElement"])("img", {
  7306     isDismissible: false,
  9582         src: userAvatar,
  7307     className: "editor-post-locked-modal"
  9583         alt: Object(external_this_wp_i18n_["__"])('Avatar'),
  7308   }, !!userAvatar && Object(external_wp_element_["createElement"])("img", {
  9584         className: "editor-post-locked-modal__avatar"
  7309     src: userAvatar,
  9585       }), !!isTakeover && Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])("div", null, userDisplayName ? Object(external_this_wp_i18n_["sprintf"])(
  7310     alt: Object(external_wp_i18n_["__"])('Avatar'),
  9586       /* translators: %s: user's display name */
  7311     className: "editor-post-locked-modal__avatar"
  9587       Object(external_this_wp_i18n_["__"])('%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved.'), userDisplayName) : Object(external_this_wp_i18n_["__"])('Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.')), Object(external_this_wp_element_["createElement"])("div", {
  7312   }), !!isTakeover && Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])("div", null, userDisplayName ? Object(external_wp_i18n_["sprintf"])(
  9588         className: "editor-post-locked-modal__buttons"
  7313   /* translators: %s: user's display name */
  9589       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  7314   Object(external_wp_i18n_["__"])('%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved.'), userDisplayName) : Object(external_wp_i18n_["__"])('Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.')), Object(external_wp_element_["createElement"])("div", {
  9590         isPrimary: true,
  7315     className: "editor-post-locked-modal__buttons"
  9591         href: allPostsUrl
  7316   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9592       }, allPostsLabel))), !isTakeover && Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])("div", null, userDisplayName ? Object(external_this_wp_i18n_["sprintf"])(
  7317     isPrimary: true,
  9593       /* translators: %s: user's display name */
  7318     href: allPostsUrl
  9594       Object(external_this_wp_i18n_["__"])('%s is currently working on this post, which means you cannot make changes, unless you take over.'), userDisplayName) : Object(external_this_wp_i18n_["__"])('Another user is currently working on this post, which means you cannot make changes, unless you take over.')), Object(external_this_wp_element_["createElement"])("div", {
  7319   }, allPostsLabel))), !isTakeover && Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])("div", null, userDisplayName ? Object(external_wp_i18n_["sprintf"])(
  9595         className: "editor-post-locked-modal__buttons"
  7320   /* translators: %s: user's display name */
  9596       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  7321   Object(external_wp_i18n_["__"])('%s is currently working on this post, which means you cannot make changes, unless you take over.'), userDisplayName) : Object(external_wp_i18n_["__"])('Another user is currently working on this post, which means you cannot make changes, unless you take over.')), Object(external_wp_element_["createElement"])("div", {
  9597         isSecondary: true,
  7322     className: "editor-post-locked-modal__buttons"
  9598         href: allPostsUrl
  7323   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9599       }, allPostsLabel), Object(external_this_wp_element_["createElement"])(post_preview_button, null), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  7324     isSecondary: true,
  9600         isPrimary: true,
  7325     href: allPostsUrl
  9601         href: unlockUrl
  7326   }, allPostsLabel), Object(external_wp_element_["createElement"])(post_preview_button, null), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
  9602       }, Object(external_this_wp_i18n_["__"])('Take Over')))));
  7327     isPrimary: true,
  9603     }
  7328     href: unlockUrl
  9604   }]);
  7329   }, Object(external_wp_i18n_["__"])('Take Over')))));
  9605 
  7330 }
  9606   return PostLockedModal;
       
  9607 }(external_this_wp_element_["Component"]);
       
  9608 
       
  9609 /* harmony default export */ var post_locked_modal = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
       
  9610   var _select = select('core/editor'),
       
  9611       isPostLocked = _select.isPostLocked,
       
  9612       isPostLockTakeover = _select.isPostLockTakeover,
       
  9613       getPostLockUser = _select.getPostLockUser,
       
  9614       getCurrentPostId = _select.getCurrentPostId,
       
  9615       getActivePostLock = _select.getActivePostLock,
       
  9616       getEditedPostAttribute = _select.getEditedPostAttribute,
       
  9617       getEditorSettings = _select.getEditorSettings;
       
  9618 
       
  9619   var _select2 = select('core'),
       
  9620       getPostType = _select2.getPostType;
       
  9621 
       
  9622   return {
       
  9623     isLocked: isPostLocked(),
       
  9624     isTakeover: isPostLockTakeover(),
       
  9625     user: getPostLockUser(),
       
  9626     postId: getCurrentPostId(),
       
  9627     postLockUtils: getEditorSettings().postLockUtils,
       
  9628     activePostLock: getActivePostLock(),
       
  9629     postType: getPostType(getEditedPostAttribute('type'))
       
  9630   };
       
  9631 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
  9632   var _dispatch = dispatch('core/editor'),
       
  9633       autosave = _dispatch.autosave,
       
  9634       updatePostLock = _dispatch.updatePostLock;
       
  9635 
       
  9636   return {
       
  9637     autosave: autosave,
       
  9638     updatePostLock: updatePostLock
       
  9639   };
       
  9640 }), external_this_wp_compose_["withInstanceId"], Object(external_this_wp_compose_["withGlobalEvents"])({
       
  9641   beforeunload: 'releasePostLock'
       
  9642 }))(post_locked_modal_PostLockedModal));
       
  9643 
  7331 
  9644 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-pending-status/check.js
  7332 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-pending-status/check.js
  9645 /**
  7333 /**
  9646  * External dependencies
  7334  * External dependencies
  9647  */
  7335  */
  9650  * WordPress dependencies
  7338  * WordPress dependencies
  9651  */
  7339  */
  9652 
  7340 
  9653 
  7341 
  9654 
  7342 
  9655 function PostPendingStatusCheck(_ref) {
  7343 function PostPendingStatusCheck({
  9656   var hasPublishAction = _ref.hasPublishAction,
  7344   hasPublishAction,
  9657       isPublished = _ref.isPublished,
  7345   isPublished,
  9658       children = _ref.children;
  7346   children
  9659 
  7347 }) {
  9660   if (isPublished || !hasPublishAction) {
  7348   if (isPublished || !hasPublishAction) {
  9661     return null;
  7349     return null;
  9662   }
  7350   }
  9663 
  7351 
  9664   return children;
  7352   return children;
  9665 }
  7353 }
  9666 /* harmony default export */ var post_pending_status_check = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
  7354 /* harmony default export */ var post_pending_status_check = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
  9667   var _select = select('core/editor'),
  7355   const {
  9668       isCurrentPostPublished = _select.isCurrentPostPublished,
  7356     isCurrentPostPublished,
  9669       getCurrentPostType = _select.getCurrentPostType,
  7357     getCurrentPostType,
  9670       getCurrentPost = _select.getCurrentPost;
  7358     getCurrentPost
  9671 
  7359   } = select('core/editor');
  9672   return {
  7360   return {
  9673     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  7361     hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  9674     isPublished: isCurrentPostPublished(),
  7362     isPublished: isCurrentPostPublished(),
  9675     postType: getCurrentPostType()
  7363     postType: getCurrentPostType()
  9676   };
  7364   };
  9677 }))(PostPendingStatusCheck));
  7365 }))(PostPendingStatusCheck));
  9678 
  7366 
  9689 /**
  7377 /**
  9690  * Internal dependencies
  7378  * Internal dependencies
  9691  */
  7379  */
  9692 
  7380 
  9693 
  7381 
  9694 function PostPendingStatus(_ref) {
  7382 function PostPendingStatus({
  9695   var status = _ref.status,
  7383   status,
  9696       onUpdateStatus = _ref.onUpdateStatus;
  7384   onUpdateStatus
  9697 
  7385 }) {
  9698   var togglePendingStatus = function togglePendingStatus() {
  7386   const togglePendingStatus = () => {
  9699     var updatedStatus = status === 'pending' ? 'draft' : 'pending';
  7387     const updatedStatus = status === 'pending' ? 'draft' : 'pending';
  9700     onUpdateStatus(updatedStatus);
  7388     onUpdateStatus(updatedStatus);
  9701   };
  7389   };
  9702 
  7390 
  9703   return Object(external_this_wp_element_["createElement"])(post_pending_status_check, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
  7391   return Object(external_wp_element_["createElement"])(post_pending_status_check, null, Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
  9704     label: Object(external_this_wp_i18n_["__"])('Pending review'),
  7392     label: Object(external_wp_i18n_["__"])('Pending review'),
  9705     checked: status === 'pending',
  7393     checked: status === 'pending',
  9706     onChange: togglePendingStatus
  7394     onChange: togglePendingStatus
  9707   }));
  7395   }));
  9708 }
  7396 }
  9709 /* harmony default export */ var post_pending_status = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
  7397 /* harmony default export */ var post_pending_status = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => ({
  9710   return {
  7398   status: select('core/editor').getEditedPostAttribute('status')
  9711     status: select('core/editor').getEditedPostAttribute('status')
  7399 })), Object(external_wp_data_["withDispatch"])(dispatch => ({
  9712   };
  7400   onUpdateStatus(status) {
  9713 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  7401     dispatch('core/editor').editPost({
  9714   return {
  7402       status
  9715     onUpdateStatus: function onUpdateStatus(status) {
  7403     });
  9716       dispatch('core/editor').editPost({
  7404   }
  9717         status: status
  7405 
  9718       });
  7406 })))(PostPendingStatus));
  9719     }
       
  9720   };
       
  9721 }))(PostPendingStatus));
       
  9722 
  7407 
  9723 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-pingbacks/index.js
  7408 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-pingbacks/index.js
  9724 
  7409 
  9725 
  7410 
  9726 
       
  9727 /**
  7411 /**
  9728  * WordPress dependencies
  7412  * WordPress dependencies
  9729  */
  7413  */
  9730 
  7414 
  9731 
  7415 
  9732 
  7416 
  9733 
  7417 
  9734 
  7418 
  9735 function PostPingbacks(_ref) {
  7419 function PostPingbacks({
  9736   var _ref$pingStatus = _ref.pingStatus,
  7420   pingStatus = 'open',
  9737       pingStatus = _ref$pingStatus === void 0 ? 'open' : _ref$pingStatus,
  7421   ...props
  9738       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["pingStatus"]);
  7422 }) {
  9739 
  7423   const onTogglePingback = () => props.editPost({
  9740   var onTogglePingback = function onTogglePingback() {
  7424     ping_status: pingStatus === 'open' ? 'closed' : 'open'
  9741     return props.editPost({
  7425   });
  9742       ping_status: pingStatus === 'open' ? 'closed' : 'open'
  7426 
  9743     });
  7427   return Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
  9744   };
  7428     label: Object(external_wp_i18n_["__"])('Allow pingbacks & trackbacks'),
  9745 
       
  9746   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
       
  9747     label: Object(external_this_wp_i18n_["__"])('Allow pingbacks & trackbacks'),
       
  9748     checked: pingStatus === 'open',
  7429     checked: pingStatus === 'open',
  9749     onChange: onTogglePingback
  7430     onChange: onTogglePingback
  9750   });
  7431   });
  9751 }
  7432 }
  9752 
  7433 
  9753 /* harmony default export */ var post_pingbacks = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  7434 /* harmony default export */ var post_pingbacks = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
  9754   return {
  7435   return {
  9755     pingStatus: select('core/editor').getEditedPostAttribute('ping_status')
  7436     pingStatus: select('core/editor').getEditedPostAttribute('ping_status')
  9756   };
  7437   };
  9757 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  7438 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
  9758   return {
  7439   editPost: dispatch('core/editor').editPost
  9759     editPost: dispatch('core/editor').editPost
  7440 }))])(PostPingbacks));
  9760   };
       
  9761 })])(PostPingbacks));
       
  9762 
  7441 
  9763 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-button/label.js
  7442 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-button/label.js
  9764 /**
  7443 /**
  9765  * External dependencies
  7444  * External dependencies
  9766  */
  7445  */
  9770  */
  7449  */
  9771 
  7450 
  9772 
  7451 
  9773 
  7452 
  9774 
  7453 
  9775 function PublishButtonLabel(_ref) {
  7454 function PublishButtonLabel({
  9776   var isPublished = _ref.isPublished,
  7455   isPublished,
  9777       isBeingScheduled = _ref.isBeingScheduled,
  7456   isBeingScheduled,
  9778       isSaving = _ref.isSaving,
  7457   isSaving,
  9779       isPublishing = _ref.isPublishing,
  7458   isPublishing,
  9780       hasPublishAction = _ref.hasPublishAction,
  7459   hasPublishAction,
  9781       isAutosaving = _ref.isAutosaving,
  7460   isAutosaving,
  9782       hasNonPostEntityChanges = _ref.hasNonPostEntityChanges;
  7461   hasNonPostEntityChanges
  9783 
  7462 }) {
  9784   if (isPublishing) {
  7463   if (isPublishing) {
  9785     return Object(external_this_wp_i18n_["__"])('Publishing…');
  7464     /* translators: button label text should, if possible, be under 16 characters. */
       
  7465     return Object(external_wp_i18n_["__"])('Publishing…');
  9786   } else if (isPublished && isSaving && !isAutosaving) {
  7466   } else if (isPublished && isSaving && !isAutosaving) {
  9787     return Object(external_this_wp_i18n_["__"])('Updating…');
  7467     /* translators: button label text should, if possible, be under 16 characters. */
       
  7468     return Object(external_wp_i18n_["__"])('Updating…');
  9788   } else if (isBeingScheduled && isSaving && !isAutosaving) {
  7469   } else if (isBeingScheduled && isSaving && !isAutosaving) {
  9789     return Object(external_this_wp_i18n_["__"])('Scheduling…');
  7470     /* translators: button label text should, if possible, be under 16 characters. */
       
  7471     return Object(external_wp_i18n_["__"])('Scheduling…');
  9790   }
  7472   }
  9791 
  7473 
  9792   if (!hasPublishAction) {
  7474   if (!hasPublishAction) {
  9793     return hasNonPostEntityChanges ? Object(external_this_wp_i18n_["__"])('Submit for Review…') : Object(external_this_wp_i18n_["__"])('Submit for Review');
  7475     return hasNonPostEntityChanges ? Object(external_wp_i18n_["__"])('Submit for Review…') : Object(external_wp_i18n_["__"])('Submit for Review');
  9794   } else if (isPublished) {
  7476   } else if (isPublished) {
  9795     return hasNonPostEntityChanges ? Object(external_this_wp_i18n_["__"])('Update…') : Object(external_this_wp_i18n_["__"])('Update');
  7477     return hasNonPostEntityChanges ? Object(external_wp_i18n_["__"])('Update…') : Object(external_wp_i18n_["__"])('Update');
  9796   } else if (isBeingScheduled) {
  7478   } else if (isBeingScheduled) {
  9797     return hasNonPostEntityChanges ? Object(external_this_wp_i18n_["__"])('Schedule…') : Object(external_this_wp_i18n_["__"])('Schedule');
  7479     return hasNonPostEntityChanges ? Object(external_wp_i18n_["__"])('Schedule…') : Object(external_wp_i18n_["__"])('Schedule');
  9798   }
  7480   }
  9799 
  7481 
  9800   return Object(external_this_wp_i18n_["__"])('Publish');
  7482   return Object(external_wp_i18n_["__"])('Publish');
  9801 }
  7483 }
  9802 /* harmony default export */ var post_publish_button_label = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
  7484 /* harmony default export */ var post_publish_button_label = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, {
  9803   var forceIsSaving = _ref2.forceIsSaving;
  7485   forceIsSaving
  9804 
  7486 }) => {
  9805   var _select = select('core/editor'),
  7487   const {
  9806       isCurrentPostPublished = _select.isCurrentPostPublished,
  7488     isCurrentPostPublished,
  9807       isEditedPostBeingScheduled = _select.isEditedPostBeingScheduled,
  7489     isEditedPostBeingScheduled,
  9808       isSavingPost = _select.isSavingPost,
  7490     isSavingPost,
  9809       isPublishingPost = _select.isPublishingPost,
  7491     isPublishingPost,
  9810       getCurrentPost = _select.getCurrentPost,
  7492     getCurrentPost,
  9811       getCurrentPostType = _select.getCurrentPostType,
  7493     getCurrentPostType,
  9812       isAutosavingPost = _select.isAutosavingPost;
  7494     isAutosavingPost
  9813 
  7495   } = select('core/editor');
  9814   return {
  7496   return {
  9815     isPublished: isCurrentPostPublished(),
  7497     isPublished: isCurrentPostPublished(),
  9816     isBeingScheduled: isEditedPostBeingScheduled(),
  7498     isBeingScheduled: isEditedPostBeingScheduled(),
  9817     isSaving: forceIsSaving || isSavingPost(),
  7499     isSaving: forceIsSaving || isSavingPost(),
  9818     isPublishing: isPublishingPost(),
  7500     isPublishing: isPublishingPost(),
  9819     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  7501     hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  9820     postType: getCurrentPostType(),
  7502     postType: getCurrentPostType(),
  9821     isAutosaving: isAutosavingPost()
  7503     isAutosaving: isAutosavingPost()
  9822   };
  7504   };
  9823 })])(PublishButtonLabel));
  7505 })])(PublishButtonLabel));
  9824 
  7506 
  9825 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-button/index.js
  7507 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-button/index.js
  9826 
  7508 
  9827 
  7509 
  9828 
  7510 
  9829 
       
  9830 
       
  9831 
       
  9832 
       
  9833 
       
  9834 
       
  9835 function post_publish_button_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_publish_button_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); }; }
       
  9836 
       
  9837 function post_publish_button_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; } }
       
  9838 
       
  9839 /**
  7511 /**
  9840  * External dependencies
  7512  * External dependencies
  9841  */
  7513  */
  9842 
  7514 
  9843 
  7515 
  9853 /**
  7525 /**
  9854  * Internal dependencies
  7526  * Internal dependencies
  9855  */
  7527  */
  9856 
  7528 
  9857 
  7529 
  9858 var post_publish_button_PostPublishButton = /*#__PURE__*/function (_Component) {
  7530 class post_publish_button_PostPublishButton extends external_wp_element_["Component"] {
  9859   Object(inherits["a" /* default */])(PostPublishButton, _Component);
  7531   constructor(props) {
  9860 
  7532     super(props);
  9861   var _super = post_publish_button_createSuper(PostPublishButton);
  7533     this.buttonNode = Object(external_wp_element_["createRef"])();
  9862 
  7534     this.createOnClick = this.createOnClick.bind(this);
  9863   function PostPublishButton(props) {
  7535     this.closeEntitiesSavedStates = this.closeEntitiesSavedStates.bind(this);
  9864     var _this;
  7536     this.state = {
  9865 
       
  9866     Object(classCallCheck["a" /* default */])(this, PostPublishButton);
       
  9867 
       
  9868     _this = _super.call(this, props);
       
  9869     _this.buttonNode = Object(external_this_wp_element_["createRef"])();
       
  9870     _this.createOnClick = _this.createOnClick.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
  9871     _this.closeEntitiesSavedStates = _this.closeEntitiesSavedStates.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
  9872     _this.state = {
       
  9873       entitiesSavedStatesCallback: false
  7537       entitiesSavedStatesCallback: false
  9874     };
  7538     };
  9875     return _this;
  7539   }
  9876   }
  7540 
  9877 
  7541   componentDidMount() {
  9878   Object(createClass["a" /* default */])(PostPublishButton, [{
  7542     if (this.props.focusOnMount) {
  9879     key: "componentDidMount",
  7543       this.buttonNode.current.focus();
  9880     value: function componentDidMount() {
  7544     }
  9881       if (this.props.focusOnMount) {
  7545   }
  9882         this.buttonNode.current.focus();
  7546 
       
  7547   createOnClick(callback) {
       
  7548     return (...args) => {
       
  7549       const {
       
  7550         hasNonPostEntityChanges
       
  7551       } = this.props;
       
  7552 
       
  7553       if (hasNonPostEntityChanges) {
       
  7554         // The modal for multiple entity saving will open,
       
  7555         // hold the callback for saving/publishing the post
       
  7556         // so that we can call it if the post entity is checked.
       
  7557         this.setState({
       
  7558           entitiesSavedStatesCallback: () => callback(...args)
       
  7559         }); // Open the save panel by setting its callback.
       
  7560         // To set a function on the useState hook, we must set it
       
  7561         // with another function (() => myFunction). Passing the
       
  7562         // function on its own will cause an error when called.
       
  7563 
       
  7564         this.props.setEntitiesSavedStatesCallback(() => this.closeEntitiesSavedStates);
       
  7565         return external_lodash_["noop"];
  9883       }
  7566       }
       
  7567 
       
  7568       return callback(...args);
       
  7569     };
       
  7570   }
       
  7571 
       
  7572   closeEntitiesSavedStates(savedEntities) {
       
  7573     const {
       
  7574       postType,
       
  7575       postId
       
  7576     } = this.props;
       
  7577     const {
       
  7578       entitiesSavedStatesCallback
       
  7579     } = this.state;
       
  7580     this.setState({
       
  7581       entitiesSavedStatesCallback: false
       
  7582     }, () => {
       
  7583       if (savedEntities && Object(external_lodash_["some"])(savedEntities, elt => elt.kind === 'postType' && elt.name === postType && elt.key === postId)) {
       
  7584         // The post entity was checked, call the held callback from `createOnClick`.
       
  7585         entitiesSavedStatesCallback();
       
  7586       }
       
  7587     });
       
  7588   }
       
  7589 
       
  7590   render() {
       
  7591     const {
       
  7592       forceIsDirty,
       
  7593       forceIsSaving,
       
  7594       hasPublishAction,
       
  7595       isBeingScheduled,
       
  7596       isOpen,
       
  7597       isPostSavingLocked,
       
  7598       isPublishable,
       
  7599       isPublished,
       
  7600       isSaveable,
       
  7601       isSaving,
       
  7602       isAutoSaving,
       
  7603       isToggle,
       
  7604       onSave,
       
  7605       onStatusChange,
       
  7606       onSubmit = external_lodash_["noop"],
       
  7607       onToggle,
       
  7608       visibility,
       
  7609       hasNonPostEntityChanges
       
  7610     } = this.props;
       
  7611     const isButtonDisabled = isSaving || forceIsSaving || !isSaveable || isPostSavingLocked || !isPublishable && !forceIsDirty;
       
  7612     const isToggleDisabled = isPublished || isSaving || forceIsSaving || !isSaveable || !isPublishable && !forceIsDirty;
       
  7613     let publishStatus;
       
  7614 
       
  7615     if (!hasPublishAction) {
       
  7616       publishStatus = 'pending';
       
  7617     } else if (visibility === 'private') {
       
  7618       publishStatus = 'private';
       
  7619     } else if (isBeingScheduled) {
       
  7620       publishStatus = 'future';
       
  7621     } else {
       
  7622       publishStatus = 'publish';
  9884     }
  7623     }
  9885   }, {
  7624 
  9886     key: "createOnClick",
  7625     const onClickButton = () => {
  9887     value: function createOnClick(callback) {
  7626       if (isButtonDisabled) {
  9888       var _this2 = this;
  7627         return;
  9889 
       
  9890       return function () {
       
  9891         for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
       
  9892           args[_key] = arguments[_key];
       
  9893         }
       
  9894 
       
  9895         var hasNonPostEntityChanges = _this2.props.hasNonPostEntityChanges;
       
  9896 
       
  9897         if (hasNonPostEntityChanges) {
       
  9898           // The modal for multiple entity saving will open,
       
  9899           // hold the callback for saving/publishing the post
       
  9900           // so that we can call it if the post entity is checked.
       
  9901           _this2.setState({
       
  9902             entitiesSavedStatesCallback: function entitiesSavedStatesCallback() {
       
  9903               return callback.apply(void 0, args);
       
  9904             }
       
  9905           }); // Open the save panel by setting its callback.
       
  9906           // To set a function on the useState hook, we must set it
       
  9907           // with another function (() => myFunction). Passing the
       
  9908           // function on its own will cause an error when called.
       
  9909 
       
  9910 
       
  9911           _this2.props.setEntitiesSavedStatesCallback(function () {
       
  9912             return _this2.closeEntitiesSavedStates;
       
  9913           });
       
  9914 
       
  9915           return external_this_lodash_["noop"];
       
  9916         }
       
  9917 
       
  9918         return callback.apply(void 0, args);
       
  9919       };
       
  9920     }
       
  9921   }, {
       
  9922     key: "closeEntitiesSavedStates",
       
  9923     value: function closeEntitiesSavedStates(savedEntities) {
       
  9924       var _this$props = this.props,
       
  9925           postType = _this$props.postType,
       
  9926           postId = _this$props.postId;
       
  9927       var entitiesSavedStatesCallback = this.state.entitiesSavedStatesCallback;
       
  9928       this.setState({
       
  9929         entitiesSavedStatesCallback: false
       
  9930       }, function () {
       
  9931         if (savedEntities && Object(external_this_lodash_["some"])(savedEntities, function (elt) {
       
  9932           return elt.kind === 'postType' && elt.name === postType && elt.key === postId;
       
  9933         })) {
       
  9934           // The post entity was checked, call the held callback from `createOnClick`.
       
  9935           entitiesSavedStatesCallback();
       
  9936         }
       
  9937       });
       
  9938     }
       
  9939   }, {
       
  9940     key: "render",
       
  9941     value: function render() {
       
  9942       var _this$props2 = this.props,
       
  9943           forceIsDirty = _this$props2.forceIsDirty,
       
  9944           forceIsSaving = _this$props2.forceIsSaving,
       
  9945           hasPublishAction = _this$props2.hasPublishAction,
       
  9946           isBeingScheduled = _this$props2.isBeingScheduled,
       
  9947           isOpen = _this$props2.isOpen,
       
  9948           isPostSavingLocked = _this$props2.isPostSavingLocked,
       
  9949           isPublishable = _this$props2.isPublishable,
       
  9950           isPublished = _this$props2.isPublished,
       
  9951           isSaveable = _this$props2.isSaveable,
       
  9952           isSaving = _this$props2.isSaving,
       
  9953           isToggle = _this$props2.isToggle,
       
  9954           onSave = _this$props2.onSave,
       
  9955           onStatusChange = _this$props2.onStatusChange,
       
  9956           _this$props2$onSubmit = _this$props2.onSubmit,
       
  9957           onSubmit = _this$props2$onSubmit === void 0 ? external_this_lodash_["noop"] : _this$props2$onSubmit,
       
  9958           onToggle = _this$props2.onToggle,
       
  9959           visibility = _this$props2.visibility,
       
  9960           hasNonPostEntityChanges = _this$props2.hasNonPostEntityChanges;
       
  9961       var isButtonDisabled = isSaving || forceIsSaving || !isSaveable || isPostSavingLocked || !isPublishable && !forceIsDirty;
       
  9962       var isToggleDisabled = isPublished || isSaving || forceIsSaving || !isSaveable || !isPublishable && !forceIsDirty;
       
  9963       var publishStatus;
       
  9964 
       
  9965       if (!hasPublishAction) {
       
  9966         publishStatus = 'pending';
       
  9967       } else if (visibility === 'private') {
       
  9968         publishStatus = 'private';
       
  9969       } else if (isBeingScheduled) {
       
  9970         publishStatus = 'future';
       
  9971       } else {
       
  9972         publishStatus = 'publish';
       
  9973       }
  7628       }
  9974 
  7629 
  9975       var onClickButton = function onClickButton() {
  7630       onSubmit();
  9976         if (isButtonDisabled) {
  7631       onStatusChange(publishStatus);
  9977           return;
  7632       onSave();
  9978         }
  7633     };
  9979 
  7634 
  9980         onSubmit();
  7635     const onClickToggle = () => {
  9981         onStatusChange(publishStatus);
  7636       if (isToggleDisabled) {
  9982         onSave();
  7637         return;
  9983       };
  7638       }
  9984 
  7639 
  9985       var onClickToggle = function onClickToggle() {
  7640       onToggle();
  9986         if (isToggleDisabled) {
  7641     };
  9987           return;
  7642 
  9988         }
  7643     const buttonProps = {
  9989 
  7644       'aria-disabled': isButtonDisabled && !hasNonPostEntityChanges,
  9990         onToggle();
  7645       className: 'editor-post-publish-button',
  9991       };
  7646       isBusy: !isAutoSaving && isSaving && isPublished,
  9992 
  7647       isPrimary: true,
  9993       var buttonProps = {
  7648       onClick: this.createOnClick(onClickButton)
  9994         'aria-disabled': isButtonDisabled && !hasNonPostEntityChanges,
  7649     };
  9995         className: 'editor-post-publish-button',
  7650     const toggleProps = {
  9996         isBusy: isSaving && isPublished,
  7651       'aria-disabled': isToggleDisabled && !hasNonPostEntityChanges,
  9997         isPrimary: true,
  7652       'aria-expanded': isOpen,
  9998         onClick: this.createOnClick(onClickButton)
  7653       className: 'editor-post-publish-panel__toggle',
  9999       };
  7654       isBusy: isSaving && isPublished,
 10000       var toggleProps = {
  7655       isPrimary: true,
 10001         'aria-disabled': isToggleDisabled && !hasNonPostEntityChanges,
  7656       onClick: this.createOnClick(onClickToggle)
 10002         'aria-expanded': isOpen,
  7657     };
 10003         className: 'editor-post-publish-panel__toggle',
  7658     const toggleChildren = isBeingScheduled ? Object(external_wp_i18n_["__"])('Schedule…') : Object(external_wp_i18n_["__"])('Publish');
 10004         isBusy: isSaving && isPublished,
  7659     const buttonChildren = Object(external_wp_element_["createElement"])(post_publish_button_label, {
 10005         isPrimary: true,
  7660       forceIsSaving: forceIsSaving,
 10006         onClick: this.createOnClick(onClickToggle)
  7661       hasNonPostEntityChanges: hasNonPostEntityChanges
 10007       };
  7662     });
 10008       var toggleChildren = isBeingScheduled ? Object(external_this_wp_i18n_["__"])('Schedule…') : Object(external_this_wp_i18n_["__"])('Publish');
  7663     const componentProps = isToggle ? toggleProps : buttonProps;
 10009       var buttonChildren = Object(external_this_wp_element_["createElement"])(post_publish_button_label, {
  7664     const componentChildren = isToggle ? toggleChildren : buttonChildren;
 10010         forceIsSaving: forceIsSaving,
  7665     return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({
 10011         hasNonPostEntityChanges: hasNonPostEntityChanges
  7666       ref: this.buttonNode
 10012       });
  7667     }, componentProps, {
 10013       var componentProps = isToggle ? toggleProps : buttonProps;
  7668       className: classnames_default()(componentProps.className, 'editor-post-publish-button__button', {
 10014       var componentChildren = isToggle ? toggleChildren : buttonChildren;
  7669         'has-changes-dot': hasNonPostEntityChanges
 10015       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({
  7670       })
 10016         ref: this.buttonNode
  7671     }), componentChildren));
 10017       }, componentProps, {
  7672   }
 10018         className: classnames_default()(componentProps.className, 'editor-post-publish-button__button', {
  7673 
 10019           'has-changes-dot': hasNonPostEntityChanges
  7674 }
 10020         })
  7675 /* harmony default export */ var post_publish_button = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 10021       }), componentChildren));
  7676   const {
 10022     }
  7677     isSavingPost,
 10023   }]);
  7678     isAutosavingPost,
 10024 
  7679     isEditedPostBeingScheduled,
 10025   return PostPublishButton;
  7680     getEditedPostVisibility,
 10026 }(external_this_wp_element_["Component"]);
  7681     isCurrentPostPublished,
 10027 /* harmony default export */ var post_publish_button = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  7682     isEditedPostSaveable,
 10028   var _select = select('core/editor'),
  7683     isEditedPostPublishable,
 10029       isSavingPost = _select.isSavingPost,
  7684     isPostSavingLocked,
 10030       isEditedPostBeingScheduled = _select.isEditedPostBeingScheduled,
  7685     getCurrentPost,
 10031       getEditedPostVisibility = _select.getEditedPostVisibility,
  7686     getCurrentPostType,
 10032       isCurrentPostPublished = _select.isCurrentPostPublished,
  7687     getCurrentPostId,
 10033       isEditedPostSaveable = _select.isEditedPostSaveable,
  7688     hasNonPostEntityChanges
 10034       isEditedPostPublishable = _select.isEditedPostPublishable,
  7689   } = select('core/editor');
 10035       isPostSavingLocked = _select.isPostSavingLocked,
  7690 
 10036       getCurrentPost = _select.getCurrentPost,
  7691   const _isAutoSaving = isAutosavingPost();
 10037       getCurrentPostType = _select.getCurrentPostType,
       
 10038       getCurrentPostId = _select.getCurrentPostId,
       
 10039       hasNonPostEntityChanges = _select.hasNonPostEntityChanges;
       
 10040 
  7692 
 10041   return {
  7693   return {
 10042     isSaving: isSavingPost(),
  7694     isSaving: isSavingPost() || _isAutoSaving,
       
  7695     isAutoSaving: _isAutoSaving,
 10043     isBeingScheduled: isEditedPostBeingScheduled(),
  7696     isBeingScheduled: isEditedPostBeingScheduled(),
 10044     visibility: getEditedPostVisibility(),
  7697     visibility: getEditedPostVisibility(),
 10045     isSaveable: isEditedPostSaveable(),
  7698     isSaveable: isEditedPostSaveable(),
 10046     isPostSavingLocked: isPostSavingLocked(),
  7699     isPostSavingLocked: isPostSavingLocked(),
 10047     isPublishable: isEditedPostPublishable(),
  7700     isPublishable: isEditedPostPublishable(),
 10048     isPublished: isCurrentPostPublished(),
  7701     isPublished: isCurrentPostPublished(),
 10049     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  7702     hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
 10050     postType: getCurrentPostType(),
  7703     postType: getCurrentPostType(),
 10051     postId: getCurrentPostId(),
  7704     postId: getCurrentPostId(),
 10052     hasNonPostEntityChanges: hasNonPostEntityChanges()
  7705     hasNonPostEntityChanges: hasNonPostEntityChanges()
 10053   };
  7706   };
 10054 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  7707 }), Object(external_wp_data_["withDispatch"])(dispatch => {
 10055   var _dispatch = dispatch('core/editor'),
  7708   const {
 10056       editPost = _dispatch.editPost,
  7709     editPost,
 10057       savePost = _dispatch.savePost;
  7710     savePost
 10058 
  7711   } = dispatch('core/editor');
 10059   return {
  7712   return {
 10060     onStatusChange: function onStatusChange(status) {
  7713     onStatusChange: status => editPost({
 10061       return editPost({
  7714       status
 10062         status: status
  7715     }, {
 10063       }, {
  7716       undoIgnore: true
 10064         undoIgnore: true
  7717     }),
 10065       });
       
 10066     },
       
 10067     onSave: savePost
  7718     onSave: savePost
 10068   };
  7719   };
 10069 })])(post_publish_button_PostPublishButton));
  7720 })])(post_publish_button_PostPublishButton));
 10070 
  7721 
 10071 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
  7722 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
 10072 var close_small = __webpack_require__(177);
  7723 var close_small = __webpack_require__("bWcr");
       
  7724 
       
  7725 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
       
  7726 var wordpress = __webpack_require__("wduq");
 10073 
  7727 
 10074 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/utils.js
  7728 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/utils.js
 10075 /**
  7729 /**
 10076  * WordPress dependencies
  7730  * WordPress dependencies
 10077  */
  7731  */
 10078 
  7732 
 10079 var visibilityOptions = [{
  7733 const visibilityOptions = [{
 10080   value: 'public',
  7734   value: 'public',
 10081   label: Object(external_this_wp_i18n_["__"])('Public'),
  7735   label: Object(external_wp_i18n_["__"])('Public'),
 10082   info: Object(external_this_wp_i18n_["__"])('Visible to everyone.')
  7736   info: Object(external_wp_i18n_["__"])('Visible to everyone.')
 10083 }, {
  7737 }, {
 10084   value: 'private',
  7738   value: 'private',
 10085   label: Object(external_this_wp_i18n_["__"])('Private'),
  7739   label: Object(external_wp_i18n_["__"])('Private'),
 10086   info: Object(external_this_wp_i18n_["__"])('Only visible to site admins and editors.')
  7740   info: Object(external_wp_i18n_["__"])('Only visible to site admins and editors.')
 10087 }, {
  7741 }, {
 10088   value: 'password',
  7742   value: 'password',
 10089   label: Object(external_this_wp_i18n_["__"])('Password Protected'),
  7743   label: Object(external_wp_i18n_["__"])('Password Protected'),
 10090   info: Object(external_this_wp_i18n_["__"])('Protected with a password you choose. Only those with the password can view this post.')
  7744   info: Object(external_wp_i18n_["__"])('Protected with a password you choose. Only those with the password can view this post.')
 10091 }];
  7745 }];
 10092 
  7746 
 10093 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/index.js
  7747 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/index.js
 10094 
  7748 
 10095 
  7749 
 10096 
       
 10097 
       
 10098 
       
 10099 
       
 10100 
       
 10101 
       
 10102 function post_visibility_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_visibility_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); }; }
       
 10103 
       
 10104 function post_visibility_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; } }
       
 10105 
       
 10106 /**
  7750 /**
 10107  * WordPress dependencies
  7751  * WordPress dependencies
 10108  */
  7752  */
 10109 
  7753 
 10110 
  7754 
 10114 /**
  7758 /**
 10115  * Internal dependencies
  7759  * Internal dependencies
 10116  */
  7760  */
 10117 
  7761 
 10118 
  7762 
 10119 var post_visibility_PostVisibility = /*#__PURE__*/function (_Component) {
  7763 class post_visibility_PostVisibility extends external_wp_element_["Component"] {
 10120   Object(inherits["a" /* default */])(PostVisibility, _Component);
  7764   constructor(props) {
 10121 
  7765     super(...arguments);
 10122   var _super = post_visibility_createSuper(PostVisibility);
  7766     this.setPublic = this.setPublic.bind(this);
 10123 
  7767     this.setPrivate = this.setPrivate.bind(this);
 10124   function PostVisibility(props) {
  7768     this.setPasswordProtected = this.setPasswordProtected.bind(this);
 10125     var _this;
  7769     this.updatePassword = this.updatePassword.bind(this);
 10126 
  7770     this.state = {
 10127     Object(classCallCheck["a" /* default */])(this, PostVisibility);
       
 10128 
       
 10129     _this = _super.apply(this, arguments);
       
 10130     _this.setPublic = _this.setPublic.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 10131     _this.setPrivate = _this.setPrivate.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 10132     _this.setPasswordProtected = _this.setPasswordProtected.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 10133     _this.updatePassword = _this.updatePassword.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 10134     _this.state = {
       
 10135       hasPassword: !!props.password
  7771       hasPassword: !!props.password
 10136     };
  7772     };
 10137     return _this;
  7773   }
 10138   }
  7774 
 10139 
  7775   setPublic() {
 10140   Object(createClass["a" /* default */])(PostVisibility, [{
  7776     const {
 10141     key: "setPublic",
  7777       visibility,
 10142     value: function setPublic() {
  7778       onUpdateVisibility,
 10143       var _this$props = this.props,
  7779       status
 10144           visibility = _this$props.visibility,
  7780     } = this.props;
 10145           onUpdateVisibility = _this$props.onUpdateVisibility,
  7781     onUpdateVisibility(visibility === 'private' ? 'draft' : status);
 10146           status = _this$props.status;
  7782     this.setState({
 10147       onUpdateVisibility(visibility === 'private' ? 'draft' : status);
  7783       hasPassword: false
 10148       this.setState({
  7784     });
 10149         hasPassword: false
  7785   }
 10150       });
  7786 
       
  7787   setPrivate() {
       
  7788     if ( // eslint-disable-next-line no-alert
       
  7789     !window.confirm(Object(external_wp_i18n_["__"])('Would you like to privately publish this post now?'))) {
       
  7790       return;
 10151     }
  7791     }
 10152   }, {
  7792 
 10153     key: "setPrivate",
  7793     const {
 10154     value: function setPrivate() {
  7794       onUpdateVisibility,
 10155       if ( // eslint-disable-next-line no-alert
  7795       onSave
 10156       !window.confirm(Object(external_this_wp_i18n_["__"])('Would you like to privately publish this post now?'))) {
  7796     } = this.props;
 10157         return;
  7797     onUpdateVisibility('private');
       
  7798     this.setState({
       
  7799       hasPassword: false
       
  7800     });
       
  7801     onSave();
       
  7802   }
       
  7803 
       
  7804   setPasswordProtected() {
       
  7805     const {
       
  7806       visibility,
       
  7807       onUpdateVisibility,
       
  7808       status,
       
  7809       password
       
  7810     } = this.props;
       
  7811     onUpdateVisibility(visibility === 'private' ? 'draft' : status, password || '');
       
  7812     this.setState({
       
  7813       hasPassword: true
       
  7814     });
       
  7815   }
       
  7816 
       
  7817   updatePassword(event) {
       
  7818     const {
       
  7819       status,
       
  7820       onUpdateVisibility
       
  7821     } = this.props;
       
  7822     onUpdateVisibility(status, event.target.value);
       
  7823   }
       
  7824 
       
  7825   render() {
       
  7826     const {
       
  7827       visibility,
       
  7828       password,
       
  7829       instanceId
       
  7830     } = this.props;
       
  7831     const visibilityHandlers = {
       
  7832       public: {
       
  7833         onSelect: this.setPublic,
       
  7834         checked: visibility === 'public' && !this.state.hasPassword
       
  7835       },
       
  7836       private: {
       
  7837         onSelect: this.setPrivate,
       
  7838         checked: visibility === 'private'
       
  7839       },
       
  7840       password: {
       
  7841         onSelect: this.setPasswordProtected,
       
  7842         checked: this.state.hasPassword
 10158       }
  7843       }
 10159 
  7844     };
 10160       var _this$props2 = this.props,
  7845     return [Object(external_wp_element_["createElement"])("fieldset", {
 10161           onUpdateVisibility = _this$props2.onUpdateVisibility,
  7846       key: "visibility-selector",
 10162           onSave = _this$props2.onSave;
  7847       className: "editor-post-visibility__dialog-fieldset"
 10163       onUpdateVisibility('private');
  7848     }, Object(external_wp_element_["createElement"])("legend", {
 10164       this.setState({
  7849       className: "editor-post-visibility__dialog-legend"
 10165         hasPassword: false
  7850     }, Object(external_wp_i18n_["__"])('Post Visibility')), visibilityOptions.map(({
 10166       });
  7851       value,
 10167       onSave();
  7852       label,
 10168     }
  7853       info
 10169   }, {
  7854     }) => Object(external_wp_element_["createElement"])("div", {
 10170     key: "setPasswordProtected",
  7855       key: value,
 10171     value: function setPasswordProtected() {
  7856       className: "editor-post-visibility__choice"
 10172       var _this$props3 = this.props,
  7857     }, Object(external_wp_element_["createElement"])("input", {
 10173           visibility = _this$props3.visibility,
  7858       type: "radio",
 10174           onUpdateVisibility = _this$props3.onUpdateVisibility,
  7859       name: `editor-post-visibility__setting-${instanceId}`,
 10175           status = _this$props3.status,
  7860       value: value,
 10176           password = _this$props3.password;
  7861       onChange: visibilityHandlers[value].onSelect,
 10177       onUpdateVisibility(visibility === 'private' ? 'draft' : status, password || '');
  7862       checked: visibilityHandlers[value].checked,
 10178       this.setState({
  7863       id: `editor-post-${value}-${instanceId}`,
 10179         hasPassword: true
  7864       "aria-describedby": `editor-post-${value}-${instanceId}-description`,
 10180       });
  7865       className: "editor-post-visibility__dialog-radio"
 10181     }
  7866     }), Object(external_wp_element_["createElement"])("label", {
 10182   }, {
  7867       htmlFor: `editor-post-${value}-${instanceId}`,
 10183     key: "updatePassword",
  7868       className: "editor-post-visibility__dialog-label"
 10184     value: function updatePassword(event) {
  7869     }, label), Object(external_wp_element_["createElement"])("p", {
 10185       var _this$props4 = this.props,
  7870       id: `editor-post-${value}-${instanceId}-description`,
 10186           status = _this$props4.status,
  7871       className: "editor-post-visibility__dialog-info"
 10187           onUpdateVisibility = _this$props4.onUpdateVisibility;
  7872     }, info)))), this.state.hasPassword && Object(external_wp_element_["createElement"])("div", {
 10188       onUpdateVisibility(status, event.target.value);
  7873       className: "editor-post-visibility__dialog-password",
 10189     }
  7874       key: "password-selector"
 10190   }, {
  7875     }, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
 10191     key: "render",
  7876       as: "label",
 10192     value: function render() {
  7877       htmlFor: `editor-post-visibility__dialog-password-input-${instanceId}`
 10193       var _this$props5 = this.props,
  7878     }, Object(external_wp_i18n_["__"])('Create password')), Object(external_wp_element_["createElement"])("input", {
 10194           visibility = _this$props5.visibility,
  7879       className: "editor-post-visibility__dialog-password-input",
 10195           password = _this$props5.password,
  7880       id: `editor-post-visibility__dialog-password-input-${instanceId}`,
 10196           instanceId = _this$props5.instanceId;
  7881       type: "text",
 10197       var visibilityHandlers = {
  7882       onChange: this.updatePassword,
 10198         public: {
  7883       value: password,
 10199           onSelect: this.setPublic,
  7884       placeholder: Object(external_wp_i18n_["__"])('Use a secure password')
 10200           checked: visibility === 'public' && !this.state.hasPassword
  7885     }))];
 10201         },
  7886   }
 10202         private: {
  7887 
 10203           onSelect: this.setPrivate,
  7888 }
 10204           checked: visibility === 'private'
  7889 /* harmony default export */ var post_visibility = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 10205         },
  7890   const {
 10206         password: {
  7891     getEditedPostAttribute,
 10207           onSelect: this.setPasswordProtected,
  7892     getEditedPostVisibility
 10208           checked: this.state.hasPassword
  7893   } = select('core/editor');
 10209         }
       
 10210       };
       
 10211       return [Object(external_this_wp_element_["createElement"])("fieldset", {
       
 10212         key: "visibility-selector",
       
 10213         className: "editor-post-visibility__dialog-fieldset"
       
 10214       }, Object(external_this_wp_element_["createElement"])("legend", {
       
 10215         className: "editor-post-visibility__dialog-legend"
       
 10216       }, Object(external_this_wp_i18n_["__"])('Post Visibility')), visibilityOptions.map(function (_ref) {
       
 10217         var value = _ref.value,
       
 10218             label = _ref.label,
       
 10219             info = _ref.info;
       
 10220         return Object(external_this_wp_element_["createElement"])("div", {
       
 10221           key: value,
       
 10222           className: "editor-post-visibility__choice"
       
 10223         }, Object(external_this_wp_element_["createElement"])("input", {
       
 10224           type: "radio",
       
 10225           name: "editor-post-visibility__setting-".concat(instanceId),
       
 10226           value: value,
       
 10227           onChange: visibilityHandlers[value].onSelect,
       
 10228           checked: visibilityHandlers[value].checked,
       
 10229           id: "editor-post-".concat(value, "-").concat(instanceId),
       
 10230           "aria-describedby": "editor-post-".concat(value, "-").concat(instanceId, "-description"),
       
 10231           className: "editor-post-visibility__dialog-radio"
       
 10232         }), Object(external_this_wp_element_["createElement"])("label", {
       
 10233           htmlFor: "editor-post-".concat(value, "-").concat(instanceId),
       
 10234           className: "editor-post-visibility__dialog-label"
       
 10235         }, label), Object(external_this_wp_element_["createElement"])("p", {
       
 10236           id: "editor-post-".concat(value, "-").concat(instanceId, "-description"),
       
 10237           className: "editor-post-visibility__dialog-info"
       
 10238         }, info));
       
 10239       })), this.state.hasPassword && Object(external_this_wp_element_["createElement"])("div", {
       
 10240         className: "editor-post-visibility__dialog-password",
       
 10241         key: "password-selector"
       
 10242       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
       
 10243         as: "label",
       
 10244         htmlFor: "editor-post-visibility__dialog-password-input-".concat(instanceId)
       
 10245       }, Object(external_this_wp_i18n_["__"])('Create password')), Object(external_this_wp_element_["createElement"])("input", {
       
 10246         className: "editor-post-visibility__dialog-password-input",
       
 10247         id: "editor-post-visibility__dialog-password-input-".concat(instanceId),
       
 10248         type: "text",
       
 10249         onChange: this.updatePassword,
       
 10250         value: password,
       
 10251         placeholder: Object(external_this_wp_i18n_["__"])('Use a secure password')
       
 10252       }))];
       
 10253     }
       
 10254   }]);
       
 10255 
       
 10256   return PostVisibility;
       
 10257 }(external_this_wp_element_["Component"]);
       
 10258 /* harmony default export */ var post_visibility = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
 10259   var _select = select('core/editor'),
       
 10260       getEditedPostAttribute = _select.getEditedPostAttribute,
       
 10261       getEditedPostVisibility = _select.getEditedPostVisibility;
       
 10262 
       
 10263   return {
  7894   return {
 10264     status: getEditedPostAttribute('status'),
  7895     status: getEditedPostAttribute('status'),
 10265     visibility: getEditedPostVisibility(),
  7896     visibility: getEditedPostVisibility(),
 10266     password: getEditedPostAttribute('password')
  7897     password: getEditedPostAttribute('password')
 10267   };
  7898   };
 10268 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  7899 }), Object(external_wp_data_["withDispatch"])(dispatch => {
 10269   var _dispatch = dispatch('core/editor'),
  7900   const {
 10270       savePost = _dispatch.savePost,
  7901     savePost,
 10271       editPost = _dispatch.editPost;
  7902     editPost
 10272 
  7903   } = dispatch('core/editor');
 10273   return {
  7904   return {
 10274     onSave: savePost,
  7905     onSave: savePost,
 10275     onUpdateVisibility: function onUpdateVisibility(status) {
  7906 
 10276       var password = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  7907     onUpdateVisibility(status, password = '') {
 10277       editPost({
  7908       editPost({
 10278         status: status,
  7909         status,
 10279         password: password
  7910         password
 10280       });
  7911       });
 10281     }
  7912     }
       
  7913 
 10282   };
  7914   };
 10283 }), external_this_wp_compose_["withInstanceId"]])(post_visibility_PostVisibility));
  7915 }), external_wp_compose_["withInstanceId"]])(post_visibility_PostVisibility));
 10284 
  7916 
 10285 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/label.js
  7917 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/label.js
 10286 /**
  7918 /**
 10287  * External dependencies
  7919  * External dependencies
 10288  */
  7920  */
 10296  * Internal dependencies
  7928  * Internal dependencies
 10297  */
  7929  */
 10298 
  7930 
 10299 
  7931 
 10300 
  7932 
 10301 function PostVisibilityLabel(_ref) {
  7933 function PostVisibilityLabel({
 10302   var visibility = _ref.visibility;
  7934   visibility
 10303 
  7935 }) {
 10304   var getVisibilityLabel = function getVisibilityLabel() {
  7936   const getVisibilityLabel = () => Object(external_lodash_["find"])(visibilityOptions, {
 10305     return Object(external_this_lodash_["find"])(visibilityOptions, {
  7937     value: visibility
 10306       value: visibility
  7938   }).label;
 10307     }).label;
       
 10308   };
       
 10309 
  7939 
 10310   return getVisibilityLabel(visibility);
  7940   return getVisibilityLabel(visibility);
 10311 }
  7941 }
 10312 
  7942 
 10313 /* harmony default export */ var post_visibility_label = (Object(external_this_wp_data_["withSelect"])(function (select) {
  7943 /* harmony default export */ var post_visibility_label = (Object(external_wp_data_["withSelect"])(select => ({
 10314   return {
  7944   visibility: select('core/editor').getEditedPostVisibility()
 10315     visibility: select('core/editor').getEditedPostVisibility()
  7945 }))(PostVisibilityLabel));
 10316   };
       
 10317 })(PostVisibilityLabel));
       
 10318 
  7946 
 10319 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-schedule/index.js
  7947 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-schedule/index.js
 10320 
  7948 
 10321 
  7949 
 10322 /**
  7950 /**
 10324  */
  7952  */
 10325 
  7953 
 10326 
  7954 
 10327 
  7955 
 10328 
  7956 
 10329 function PostSchedule(_ref) {
  7957 
 10330   var date = _ref.date,
  7958 /**
 10331       onUpdateDate = _ref.onUpdateDate;
  7959  * Internal dependencies
 10332 
  7960  */
 10333   var onChange = function onChange(newDate) {
  7961 
 10334     onUpdateDate(newDate);
  7962 
 10335     document.activeElement.blur();
  7963 
 10336   };
  7964 function getDayOfTheMonth(date = new Date(), firstDay = true) {
 10337 
  7965   const d = new Date(date);
 10338   var settings = Object(external_this_wp_date_["__experimentalGetSettings"])(); // To know if the current timezone is a 12 hour time with look for "a" in the time format
  7966   return new Date(d.getFullYear(), d.getMonth() + (firstDay ? 0 : 1), firstDay ? 1 : 0).toISOString();
       
  7967 }
       
  7968 
       
  7969 function PostSchedule() {
       
  7970   const {
       
  7971     postDate,
       
  7972     postType
       
  7973   } = Object(external_wp_data_["useSelect"])(select => ({
       
  7974     postDate: select(store).getEditedPostAttribute('date'),
       
  7975     postType: select(store).getCurrentPostType()
       
  7976   }), []);
       
  7977   const {
       
  7978     editPost
       
  7979   } = Object(external_wp_data_["useDispatch"])(store);
       
  7980 
       
  7981   const onUpdateDate = date => editPost({
       
  7982     date
       
  7983   });
       
  7984 
       
  7985   const [previewedMonth, setPreviewedMonth] = Object(external_wp_element_["useState"])(getDayOfTheMonth(postDate)); // Pick up published and schduled site posts.
       
  7986 
       
  7987   const eventsByPostType = Object(external_wp_data_["useSelect"])(select => select(external_wp_coreData_["store"]).getEntityRecords('postType', postType, {
       
  7988     status: 'publish,future',
       
  7989     after: getDayOfTheMonth(previewedMonth),
       
  7990     before: getDayOfTheMonth(previewedMonth, false),
       
  7991     exclude: [select(store).getCurrentPostId()]
       
  7992   }), [previewedMonth, postType]);
       
  7993   const events = Object(external_wp_element_["useMemo"])(() => (eventsByPostType || []).map(({
       
  7994     title,
       
  7995     type,
       
  7996     date: eventDate
       
  7997   }) => ({
       
  7998     title: title === null || title === void 0 ? void 0 : title.rendered,
       
  7999     type,
       
  8000     date: new Date(eventDate)
       
  8001   })), [eventsByPostType]);
       
  8002   const ref = Object(external_wp_element_["useRef"])();
       
  8003 
       
  8004   const settings = Object(external_wp_date_["__experimentalGetSettings"])(); // To know if the current timezone is a 12 hour time with look for "a" in the time format
 10339   // We also make sure this a is not escaped by a "/"
  8005   // We also make sure this a is not escaped by a "/"
 10340 
  8006 
 10341 
  8007 
 10342   var is12HourTime = /a(?!\\)/i.test(settings.formats.time.toLowerCase() // Test only the lower case a
  8008   const is12HourTime = /a(?!\\)/i.test(settings.formats.time.toLowerCase() // Test only the lower case a
 10343   .replace(/\\\\/g, '') // Replace "//" with empty strings
  8009   .replace(/\\\\/g, '') // Replace "//" with empty strings
 10344   .split('').reverse().join('') // Reverse the string and test for "a" not followed by a slash
  8010   .split('').reverse().join('') // Reverse the string and test for "a" not followed by a slash
 10345   );
  8011   );
 10346   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DateTimePicker"], {
  8012 
 10347     key: "date-time-picker",
  8013   function onChange(newDate) {
 10348     currentDate: date,
  8014     onUpdateDate(newDate);
       
  8015     const {
       
  8016       ownerDocument
       
  8017     } = ref.current;
       
  8018     ownerDocument.activeElement.blur();
       
  8019   }
       
  8020 
       
  8021   return Object(external_wp_element_["createElement"])(external_wp_components_["DateTimePicker"], {
       
  8022     ref: ref,
       
  8023     currentDate: postDate,
 10349     onChange: onChange,
  8024     onChange: onChange,
 10350     is12Hour: is12HourTime
  8025     is12Hour: is12HourTime,
       
  8026     events: events,
       
  8027     onMonthPreviewed: setPreviewedMonth
 10351   });
  8028   });
 10352 }
  8029 }
 10353 /* harmony default export */ var post_schedule = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
 10354   return {
       
 10355     date: select('core/editor').getEditedPostAttribute('date')
       
 10356   };
       
 10357 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 10358   return {
       
 10359     onUpdateDate: function onUpdateDate(date) {
       
 10360       dispatch('core/editor').editPost({
       
 10361         date: date
       
 10362       });
       
 10363     }
       
 10364   };
       
 10365 })])(PostSchedule));
       
 10366 
  8030 
 10367 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js
  8031 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js
 10368 /**
  8032 /**
 10369  * WordPress dependencies
  8033  * WordPress dependencies
 10370  */
  8034  */
 10371 
  8035 
 10372 
  8036 
 10373 
  8037 
 10374 function PostScheduleLabel(_ref) {
  8038 function PostScheduleLabel({
 10375   var date = _ref.date,
  8039   date,
 10376       isFloating = _ref.isFloating;
  8040   isFloating
 10377 
  8041 }) {
 10378   var settings = Object(external_this_wp_date_["__experimentalGetSettings"])();
  8042   const settings = Object(external_wp_date_["__experimentalGetSettings"])();
 10379 
  8043 
 10380   return date && !isFloating ? Object(external_this_wp_date_["dateI18n"])("".concat(settings.formats.date, " ").concat(settings.formats.time), date) : Object(external_this_wp_i18n_["__"])('Immediately');
  8044   return date && !isFloating ? Object(external_wp_date_["format"])(`${settings.formats.date} ${settings.formats.time}`, date) : Object(external_wp_i18n_["__"])('Immediately');
 10381 }
  8045 }
 10382 /* harmony default export */ var post_schedule_label = (Object(external_this_wp_data_["withSelect"])(function (select) {
  8046 /* harmony default export */ var post_schedule_label = (Object(external_wp_data_["withSelect"])(select => {
 10383   return {
  8047   return {
 10384     date: select('core/editor').getEditedPostAttribute('date'),
  8048     date: select('core/editor').getEditedPostAttribute('date'),
 10385     isFloating: select('core/editor').isEditedPostDateFloating()
  8049     isFloating: select('core/editor').isEditedPostDateFloating()
 10386   };
  8050   };
 10387 })(PostScheduleLabel));
  8051 })(PostScheduleLabel));
 10388 
  8052 
 10389 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/flat-term-selector.js
  8053 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/most-used-terms.js
 10390 
  8054 
 10391 
       
 10392 
       
 10393 
       
 10394 
       
 10395 
       
 10396 
       
 10397 
       
 10398 
       
 10399 function flat_term_selector_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (flat_term_selector_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); }; }
       
 10400 
       
 10401 function flat_term_selector_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; } }
       
 10402 
       
 10403 function flat_term_selector_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; }
       
 10404 
       
 10405 function flat_term_selector_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { flat_term_selector_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 { flat_term_selector_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 10406 
  8055 
 10407 /**
  8056 /**
 10408  * External dependencies
  8057  * External dependencies
 10409  */
  8058  */
 10410 
  8059 
 10413  */
  8062  */
 10414 
  8063 
 10415 
  8064 
 10416 
  8065 
 10417 
  8066 
 10418 
  8067 /**
 10419 
  8068  * Internal dependencies
 10420 
  8069  */
 10421 
  8070 
 10422 /**
  8071 
 10423  * Module constants
  8072 const MAX_MOST_USED_TERMS = 10;
 10424  */
  8073 const DEFAULT_QUERY = {
 10425 
  8074   per_page: MAX_MOST_USED_TERMS,
 10426 var DEFAULT_QUERY = {
       
 10427   per_page: -1,
       
 10428   orderby: 'count',
  8075   orderby: 'count',
 10429   order: 'desc',
  8076   order: 'desc',
 10430   _fields: 'id,name'
  8077   hide_empty: true,
       
  8078   _fields: 'id,name,count'
 10431 };
  8079 };
 10432 var MAX_TERMS_SUGGESTIONS = 20;
  8080 function MostUsedTerms({
 10433 
  8081   onSelect,
 10434 var isSameTermName = function isSameTermName(termA, termB) {
  8082   taxonomy
 10435   return termA.toLowerCase() === termB.toLowerCase();
  8083 }) {
       
  8084   const {
       
  8085     _terms,
       
  8086     showTerms
       
  8087   } = Object(external_wp_data_["useSelect"])(select => {
       
  8088     const mostUsedTerms = select(external_wp_coreData_["store"]).getEntityRecords('taxonomy', taxonomy.slug, DEFAULT_QUERY);
       
  8089     return {
       
  8090       _terms: mostUsedTerms,
       
  8091       showTerms: (mostUsedTerms === null || mostUsedTerms === void 0 ? void 0 : mostUsedTerms.length) >= MAX_MOST_USED_TERMS
       
  8092     };
       
  8093   }, []);
       
  8094 
       
  8095   if (!showTerms) {
       
  8096     return null;
       
  8097   }
       
  8098 
       
  8099   const terms = unescapeTerms(_terms);
       
  8100   const label = Object(external_lodash_["get"])(taxonomy, ['labels', 'most_used']);
       
  8101   return Object(external_wp_element_["createElement"])("div", {
       
  8102     className: "editor-post-taxonomies__flat-term-most-used"
       
  8103   }, Object(external_wp_element_["createElement"])("h3", {
       
  8104     className: "editor-post-taxonomies__flat-term-most-used-label"
       
  8105   }, label), Object(external_wp_element_["createElement"])("ul", {
       
  8106     role: "list",
       
  8107     className: "editor-post-taxonomies__flat-term-most-used-list"
       
  8108   }, terms.map(term => Object(external_wp_element_["createElement"])("li", {
       
  8109     key: term.id
       
  8110   }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
  8111     isLink: true,
       
  8112     onClick: () => onSelect(term)
       
  8113   }, term.name)))));
       
  8114 }
       
  8115 
       
  8116 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/flat-term-selector.js
       
  8117 
       
  8118 
       
  8119 /**
       
  8120  * External dependencies
       
  8121  */
       
  8122 
       
  8123 /**
       
  8124  * WordPress dependencies
       
  8125  */
       
  8126 
       
  8127 
       
  8128 
       
  8129 
       
  8130 
       
  8131 
       
  8132 
       
  8133 
       
  8134 
       
  8135 /**
       
  8136  * Internal dependencies
       
  8137  */
       
  8138 
       
  8139 
       
  8140 
       
  8141 
       
  8142 /**
       
  8143  * Module constants
       
  8144  */
       
  8145 
       
  8146 const MAX_TERMS_SUGGESTIONS = 20;
       
  8147 const flat_term_selector_DEFAULT_QUERY = {
       
  8148   per_page: MAX_TERMS_SUGGESTIONS,
       
  8149   orderby: 'count',
       
  8150   order: 'desc',
       
  8151   _fields: 'id,name,count'
 10436 };
  8152 };
 10437 /**
  8153 
 10438  * Returns a term object with name unescaped.
  8154 const isSameTermName = (termA, termB) => unescapeString(termA).toLowerCase() === unescapeString(termB).toLowerCase();
 10439  * The unescape of the name property is done using lodash unescape function.
  8155 
 10440  *
  8156 const termNamesToIds = (names, terms) => {
 10441  * @param {Object} term The term object to unescape.
  8157   return names.map(termName => Object(external_lodash_["find"])(terms, term => isSameTermName(term.name, termName)).id);
 10442  *
       
 10443  * @return {Object} Term object with name property unescaped.
       
 10444  */
       
 10445 
       
 10446 
       
 10447 var flat_term_selector_unescapeTerm = function unescapeTerm(term) {
       
 10448   return flat_term_selector_objectSpread({}, term, {
       
 10449     name: Object(external_this_lodash_["unescape"])(term.name)
       
 10450   });
       
 10451 };
  8158 };
 10452 /**
  8159 
 10453  * Returns an array of term objects with names unescaped.
  8160 class flat_term_selector_FlatTermSelector extends external_wp_element_["Component"] {
 10454  * The unescape of each term is performed using the unescapeTerm function.
  8161   constructor() {
 10455  *
  8162     super(...arguments);
 10456  * @param {Object[]} terms Array of term objects to unescape.
  8163     this.onChange = this.onChange.bind(this);
 10457  *
  8164     this.searchTerms = Object(external_lodash_["debounce"])(this.searchTerms.bind(this), 500);
 10458  * @return {Object[]} Array of term objects unescaped.
  8165     this.findOrCreateTerm = this.findOrCreateTerm.bind(this);
 10459  */
  8166     this.appendTerm = this.appendTerm.bind(this);
 10460 
  8167     this.state = {
 10461 
  8168       loading: !Object(external_lodash_["isEmpty"])(this.props.terms),
 10462 var flat_term_selector_unescapeTerms = function unescapeTerms(terms) {
       
 10463   return Object(external_this_lodash_["map"])(terms, flat_term_selector_unescapeTerm);
       
 10464 };
       
 10465 
       
 10466 var flat_term_selector_FlatTermSelector = /*#__PURE__*/function (_Component) {
       
 10467   Object(inherits["a" /* default */])(FlatTermSelector, _Component);
       
 10468 
       
 10469   var _super = flat_term_selector_createSuper(FlatTermSelector);
       
 10470 
       
 10471   function FlatTermSelector() {
       
 10472     var _this;
       
 10473 
       
 10474     Object(classCallCheck["a" /* default */])(this, FlatTermSelector);
       
 10475 
       
 10476     _this = _super.apply(this, arguments);
       
 10477     _this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 10478     _this.searchTerms = Object(external_this_lodash_["throttle"])(_this.searchTerms.bind(Object(assertThisInitialized["a" /* default */])(_this)), 500);
       
 10479     _this.findOrCreateTerm = _this.findOrCreateTerm.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 10480     _this.state = {
       
 10481       loading: !Object(external_this_lodash_["isEmpty"])(_this.props.terms),
       
 10482       availableTerms: [],
  8169       availableTerms: [],
 10483       selectedTerms: []
  8170       selectedTerms: []
 10484     };
  8171     };
 10485     return _this;
  8172   }
 10486   }
  8173 
 10487 
  8174   componentDidMount() {
 10488   Object(createClass["a" /* default */])(FlatTermSelector, [{
  8175     if (!Object(external_lodash_["isEmpty"])(this.props.terms)) {
 10489     key: "componentDidMount",
  8176       this.initRequest = this.fetchTerms({
 10490     value: function componentDidMount() {
  8177         include: this.props.terms.join(','),
 10491       var _this2 = this;
  8178         per_page: -1
 10492 
  8179       });
 10493       if (!Object(external_this_lodash_["isEmpty"])(this.props.terms)) {
  8180       this.initRequest.then(() => {
 10494         this.initRequest = this.fetchTerms({
  8181         this.setState({
 10495           include: this.props.terms.join(','),
  8182           loading: false
 10496           per_page: -1
       
 10497         });
  8183         });
 10498         this.initRequest.then(function () {
  8184       }, xhr => {
 10499           _this2.setState({
  8185         if (xhr.statusText === 'abort') {
 10500             loading: false
  8186           return;
 10501           });
  8187         }
 10502         }, function (xhr) {
  8188 
 10503           if (xhr.statusText === 'abort') {
  8189         this.setState({
 10504             return;
  8190           loading: false
 10505           }
  8191         });
 10506 
  8192       });
 10507           _this2.setState({
  8193     }
 10508             loading: false
  8194   }
 10509           });
  8195 
       
  8196   componentWillUnmount() {
       
  8197     Object(external_lodash_["invoke"])(this.initRequest, ['abort']);
       
  8198     Object(external_lodash_["invoke"])(this.searchRequest, ['abort']);
       
  8199   }
       
  8200 
       
  8201   componentDidUpdate(prevProps) {
       
  8202     if (prevProps.terms !== this.props.terms) {
       
  8203       this.updateSelectedTerms(this.props.terms);
       
  8204     }
       
  8205   }
       
  8206 
       
  8207   fetchTerms(params = {}) {
       
  8208     const {
       
  8209       taxonomy
       
  8210     } = this.props;
       
  8211     const query = { ...flat_term_selector_DEFAULT_QUERY,
       
  8212       ...params
       
  8213     };
       
  8214     const request = external_wp_apiFetch_default()({
       
  8215       path: Object(external_wp_url_["addQueryArgs"])(`/wp/v2/${taxonomy.rest_base}`, query)
       
  8216     });
       
  8217     request.then(unescapeTerms).then(terms => {
       
  8218       this.setState(state => ({
       
  8219         availableTerms: state.availableTerms.concat(terms.filter(term => !Object(external_lodash_["find"])(state.availableTerms, availableTerm => availableTerm.id === term.id)))
       
  8220       }));
       
  8221       this.updateSelectedTerms(this.props.terms);
       
  8222     });
       
  8223     return request;
       
  8224   }
       
  8225 
       
  8226   updateSelectedTerms(terms = []) {
       
  8227     const selectedTerms = terms.reduce((accumulator, termId) => {
       
  8228       const termObject = Object(external_lodash_["find"])(this.state.availableTerms, term => term.id === termId);
       
  8229 
       
  8230       if (termObject) {
       
  8231         accumulator.push(termObject.name);
       
  8232       }
       
  8233 
       
  8234       return accumulator;
       
  8235     }, []);
       
  8236     this.setState({
       
  8237       selectedTerms
       
  8238     });
       
  8239   }
       
  8240 
       
  8241   findOrCreateTerm(termName) {
       
  8242     const {
       
  8243       taxonomy
       
  8244     } = this.props;
       
  8245     const termNameEscaped = Object(external_lodash_["escape"])(termName); // Tries to create a term or fetch it if it already exists.
       
  8246 
       
  8247     return external_wp_apiFetch_default()({
       
  8248       path: `/wp/v2/${taxonomy.rest_base}`,
       
  8249       method: 'POST',
       
  8250       data: {
       
  8251         name: termNameEscaped
       
  8252       }
       
  8253     }).catch(error => {
       
  8254       const errorCode = error.code;
       
  8255 
       
  8256       if (errorCode === 'term_exists') {
       
  8257         // If the terms exist, fetch it instead of creating a new one.
       
  8258         this.addRequest = external_wp_apiFetch_default()({
       
  8259           path: Object(external_wp_url_["addQueryArgs"])(`/wp/v2/${taxonomy.rest_base}`, { ...flat_term_selector_DEFAULT_QUERY,
       
  8260             search: termNameEscaped
       
  8261           })
       
  8262         }).then(unescapeTerms);
       
  8263         return this.addRequest.then(searchResult => {
       
  8264           return Object(external_lodash_["find"])(searchResult, result => isSameTermName(result.name, termName));
 10510         });
  8265         });
 10511       }
  8266       }
       
  8267 
       
  8268       return Promise.reject(error);
       
  8269     }).then(unescapeTerm);
       
  8270   }
       
  8271 
       
  8272   onChange(termNames) {
       
  8273     const uniqueTerms = Object(external_lodash_["uniqBy"])(termNames, term => term.toLowerCase());
       
  8274     this.setState({
       
  8275       selectedTerms: uniqueTerms
       
  8276     });
       
  8277     const newTermNames = uniqueTerms.filter(termName => !Object(external_lodash_["find"])(this.state.availableTerms, term => isSameTermName(term.name, termName)));
       
  8278 
       
  8279     if (newTermNames.length === 0) {
       
  8280       return this.props.onUpdateTerms(termNamesToIds(uniqueTerms, this.state.availableTerms), this.props.taxonomy.rest_base);
 10512     }
  8281     }
 10513   }, {
  8282 
 10514     key: "componentWillUnmount",
  8283     Promise.all(newTermNames.map(this.findOrCreateTerm)).then(newTerms => {
 10515     value: function componentWillUnmount() {
  8284       const newAvailableTerms = this.state.availableTerms.concat(newTerms);
 10516       Object(external_this_lodash_["invoke"])(this.initRequest, ['abort']);
  8285       this.setState({
 10517       Object(external_this_lodash_["invoke"])(this.searchRequest, ['abort']);
  8286         availableTerms: newAvailableTerms
 10518     }
       
 10519   }, {
       
 10520     key: "componentDidUpdate",
       
 10521     value: function componentDidUpdate(prevProps) {
       
 10522       if (prevProps.terms !== this.props.terms) {
       
 10523         this.updateSelectedTerms(this.props.terms);
       
 10524       }
       
 10525     }
       
 10526   }, {
       
 10527     key: "fetchTerms",
       
 10528     value: function fetchTerms() {
       
 10529       var _this3 = this;
       
 10530 
       
 10531       var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
 10532       var taxonomy = this.props.taxonomy;
       
 10533 
       
 10534       var query = flat_term_selector_objectSpread({}, DEFAULT_QUERY, {}, params);
       
 10535 
       
 10536       var request = external_this_wp_apiFetch_default()({
       
 10537         path: Object(external_this_wp_url_["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), query)
       
 10538       });
  8287       });
 10539       request.then(flat_term_selector_unescapeTerms).then(function (terms) {
  8288       return this.props.onUpdateTerms(termNamesToIds(uniqueTerms, newAvailableTerms), this.props.taxonomy.rest_base);
 10540         _this3.setState(function (state) {
  8289     });
 10541           return {
  8290   }
 10542             availableTerms: state.availableTerms.concat(terms.filter(function (term) {
  8291 
 10543               return !Object(external_this_lodash_["find"])(state.availableTerms, function (availableTerm) {
  8292   searchTerms(search = '') {
 10544                 return availableTerm.id === term.id;
  8293     Object(external_lodash_["invoke"])(this.searchRequest, ['abort']);
 10545               });
  8294 
 10546             }))
  8295     if (search.length >= 3) {
 10547           };
  8296       this.searchRequest = this.fetchTerms({
 10548         });
  8297         search
 10549 
       
 10550         _this3.updateSelectedTerms(_this3.props.terms);
       
 10551       });
       
 10552       return request;
       
 10553     }
       
 10554   }, {
       
 10555     key: "updateSelectedTerms",
       
 10556     value: function updateSelectedTerms() {
       
 10557       var _this4 = this;
       
 10558 
       
 10559       var terms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
       
 10560       var selectedTerms = terms.reduce(function (accumulator, termId) {
       
 10561         var termObject = Object(external_this_lodash_["find"])(_this4.state.availableTerms, function (term) {
       
 10562           return term.id === termId;
       
 10563         });
       
 10564 
       
 10565         if (termObject) {
       
 10566           accumulator.push(termObject.name);
       
 10567         }
       
 10568 
       
 10569         return accumulator;
       
 10570       }, []);
       
 10571       this.setState({
       
 10572         selectedTerms: selectedTerms
       
 10573       });
  8298       });
 10574     }
  8299     }
 10575   }, {
  8300   }
 10576     key: "findOrCreateTerm",
  8301 
 10577     value: function findOrCreateTerm(termName) {
  8302   appendTerm(newTerm) {
 10578       var _this5 = this;
  8303     const {
 10579 
  8304       onUpdateTerms,
 10580       var taxonomy = this.props.taxonomy;
  8305       taxonomy,
 10581       var termNameEscaped = Object(external_this_lodash_["escape"])(termName); // Tries to create a term or fetch it if it already exists.
  8306       terms = [],
 10582 
  8307       slug,
 10583       return external_this_wp_apiFetch_default()({
  8308       speak
 10584         path: "/wp/v2/".concat(taxonomy.rest_base),
  8309     } = this.props;
 10585         method: 'POST',
  8310 
 10586         data: {
  8311     if (terms.includes(newTerm.id)) {
 10587           name: termNameEscaped
  8312       return;
 10588         }
       
 10589       }).catch(function (error) {
       
 10590         var errorCode = error.code;
       
 10591 
       
 10592         if (errorCode === 'term_exists') {
       
 10593           // If the terms exist, fetch it instead of creating a new one.
       
 10594           _this5.addRequest = external_this_wp_apiFetch_default()({
       
 10595             path: Object(external_this_wp_url_["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), flat_term_selector_objectSpread({}, DEFAULT_QUERY, {
       
 10596               search: termNameEscaped
       
 10597             }))
       
 10598           }).then(flat_term_selector_unescapeTerms);
       
 10599           return _this5.addRequest.then(function (searchResult) {
       
 10600             return Object(external_this_lodash_["find"])(searchResult, function (result) {
       
 10601               return isSameTermName(result.name, termName);
       
 10602             });
       
 10603           });
       
 10604         }
       
 10605 
       
 10606         return Promise.reject(error);
       
 10607       }).then(flat_term_selector_unescapeTerm);
       
 10608     }
  8313     }
 10609   }, {
  8314 
 10610     key: "onChange",
  8315     const newTerms = [...terms, newTerm.id];
 10611     value: function onChange(termNames) {
  8316     const termAddedMessage = Object(external_wp_i18n_["sprintf"])(
 10612       var _this6 = this;
  8317     /* translators: %s: term name. */
 10613 
  8318     Object(external_wp_i18n_["_x"])('%s added', 'term'), Object(external_lodash_["get"])(taxonomy, ['labels', 'singular_name'], slug === 'post_tag' ? Object(external_wp_i18n_["__"])('Tag') : Object(external_wp_i18n_["__"])('Term')));
 10614       var uniqueTerms = Object(external_this_lodash_["uniqBy"])(termNames, function (term) {
  8319     speak(termAddedMessage, 'assertive');
 10615         return term.toLowerCase();
  8320     this.setState({
 10616       });
  8321       availableTerms: [...this.state.availableTerms, newTerm]
 10617       this.setState({
  8322     });
 10618         selectedTerms: uniqueTerms
  8323     onUpdateTerms(newTerms, taxonomy.rest_base);
 10619       });
  8324   }
 10620       var newTermNames = uniqueTerms.filter(function (termName) {
  8325 
 10621         return !Object(external_this_lodash_["find"])(_this6.state.availableTerms, function (term) {
  8326   render() {
 10622           return isSameTermName(term.name, termName);
  8327     const {
 10623         });
  8328       slug,
 10624       });
  8329       taxonomy,
 10625 
  8330       hasAssignAction
 10626       var termNamesToIds = function termNamesToIds(names, availableTerms) {
  8331     } = this.props;
 10627         return names.map(function (termName) {
  8332 
 10628           return Object(external_this_lodash_["find"])(availableTerms, function (term) {
  8333     if (!hasAssignAction) {
 10629             return isSameTermName(term.name, termName);
  8334       return null;
 10630           }).id;
  8335     }
 10631         });
  8336 
 10632       };
  8337     const {
 10633 
  8338       loading,
 10634       if (newTermNames.length === 0) {
  8339       availableTerms,
 10635         return this.props.onUpdateTerms(termNamesToIds(uniqueTerms, this.state.availableTerms), this.props.taxonomy.rest_base);
  8340       selectedTerms
       
  8341     } = this.state;
       
  8342     const termNames = availableTerms.map(term => term.name);
       
  8343     const newTermLabel = Object(external_lodash_["get"])(taxonomy, ['labels', 'add_new_item'], slug === 'post_tag' ? Object(external_wp_i18n_["__"])('Add new tag') : Object(external_wp_i18n_["__"])('Add new Term'));
       
  8344     const singularName = Object(external_lodash_["get"])(taxonomy, ['labels', 'singular_name'], slug === 'post_tag' ? Object(external_wp_i18n_["__"])('Tag') : Object(external_wp_i18n_["__"])('Term'));
       
  8345     const termAddedLabel = Object(external_wp_i18n_["sprintf"])(
       
  8346     /* translators: %s: term name. */
       
  8347     Object(external_wp_i18n_["_x"])('%s added', 'term'), singularName);
       
  8348     const termRemovedLabel = Object(external_wp_i18n_["sprintf"])(
       
  8349     /* translators: %s: term name. */
       
  8350     Object(external_wp_i18n_["_x"])('%s removed', 'term'), singularName);
       
  8351     const removeTermLabel = Object(external_wp_i18n_["sprintf"])(
       
  8352     /* translators: %s: term name. */
       
  8353     Object(external_wp_i18n_["_x"])('Remove %s', 'term'), singularName);
       
  8354     return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["FormTokenField"], {
       
  8355       value: selectedTerms,
       
  8356       suggestions: termNames,
       
  8357       onChange: this.onChange,
       
  8358       onInputChange: this.searchTerms,
       
  8359       maxSuggestions: MAX_TERMS_SUGGESTIONS,
       
  8360       disabled: loading,
       
  8361       label: newTermLabel,
       
  8362       messages: {
       
  8363         added: termAddedLabel,
       
  8364         removed: termRemovedLabel,
       
  8365         remove: removeTermLabel
 10636       }
  8366       }
 10637 
  8367     }), Object(external_wp_element_["createElement"])(MostUsedTerms, {
 10638       Promise.all(newTermNames.map(this.findOrCreateTerm)).then(function (newTerms) {
  8368       taxonomy: taxonomy,
 10639         var newAvailableTerms = _this6.state.availableTerms.concat(newTerms);
  8369       onSelect: this.appendTerm
 10640 
  8370     }));
 10641         _this6.setState({
  8371   }
 10642           availableTerms: newAvailableTerms
  8372 
 10643         });
  8373 }
 10644 
  8374 
 10645         return _this6.props.onUpdateTerms(termNamesToIds(uniqueTerms, newAvailableTerms), _this6.props.taxonomy.rest_base);
  8375 /* harmony default export */ var flat_term_selector = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])((select, {
       
  8376   slug
       
  8377 }) => {
       
  8378   const {
       
  8379     getCurrentPost
       
  8380   } = select(store);
       
  8381   const {
       
  8382     getTaxonomy
       
  8383   } = select(external_wp_coreData_["store"]);
       
  8384   const taxonomy = getTaxonomy(slug);
       
  8385   return {
       
  8386     hasCreateAction: taxonomy ? Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-create-' + taxonomy.rest_base], false) : false,
       
  8387     hasAssignAction: taxonomy ? Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-assign-' + taxonomy.rest_base], false) : false,
       
  8388     terms: taxonomy ? select(store).getEditedPostAttribute(taxonomy.rest_base) : [],
       
  8389     taxonomy
       
  8390   };
       
  8391 }), Object(external_wp_data_["withDispatch"])(dispatch => {
       
  8392   return {
       
  8393     onUpdateTerms(terms, restBase) {
       
  8394       dispatch(store).editPost({
       
  8395         [restBase]: terms
 10646       });
  8396       });
 10647     }
  8397     }
 10648   }, {
  8398 
 10649     key: "searchTerms",
       
 10650     value: function searchTerms() {
       
 10651       var search = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
       
 10652       Object(external_this_lodash_["invoke"])(this.searchRequest, ['abort']);
       
 10653       this.searchRequest = this.fetchTerms({
       
 10654         search: search
       
 10655       });
       
 10656     }
       
 10657   }, {
       
 10658     key: "render",
       
 10659     value: function render() {
       
 10660       var _this$props = this.props,
       
 10661           slug = _this$props.slug,
       
 10662           taxonomy = _this$props.taxonomy,
       
 10663           hasAssignAction = _this$props.hasAssignAction;
       
 10664 
       
 10665       if (!hasAssignAction) {
       
 10666         return null;
       
 10667       }
       
 10668 
       
 10669       var _this$state = this.state,
       
 10670           loading = _this$state.loading,
       
 10671           availableTerms = _this$state.availableTerms,
       
 10672           selectedTerms = _this$state.selectedTerms;
       
 10673       var termNames = availableTerms.map(function (term) {
       
 10674         return term.name;
       
 10675       });
       
 10676       var newTermLabel = Object(external_this_lodash_["get"])(taxonomy, ['labels', 'add_new_item'], slug === 'post_tag' ? Object(external_this_wp_i18n_["__"])('Add new tag') : Object(external_this_wp_i18n_["__"])('Add new Term'));
       
 10677       var singularName = Object(external_this_lodash_["get"])(taxonomy, ['labels', 'singular_name'], slug === 'post_tag' ? Object(external_this_wp_i18n_["__"])('Tag') : Object(external_this_wp_i18n_["__"])('Term'));
       
 10678       var termAddedLabel = Object(external_this_wp_i18n_["sprintf"])(
       
 10679       /* translators: %s: term name. */
       
 10680       Object(external_this_wp_i18n_["_x"])('%s added', 'term'), singularName);
       
 10681       var termRemovedLabel = Object(external_this_wp_i18n_["sprintf"])(
       
 10682       /* translators: %s: term name. */
       
 10683       Object(external_this_wp_i18n_["_x"])('%s removed', 'term'), singularName);
       
 10684       var removeTermLabel = Object(external_this_wp_i18n_["sprintf"])(
       
 10685       /* translators: %s: term name. */
       
 10686       Object(external_this_wp_i18n_["_x"])('Remove %s', 'term'), singularName);
       
 10687       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["FormTokenField"], {
       
 10688         value: selectedTerms,
       
 10689         suggestions: termNames,
       
 10690         onChange: this.onChange,
       
 10691         onInputChange: this.searchTerms,
       
 10692         maxSuggestions: MAX_TERMS_SUGGESTIONS,
       
 10693         disabled: loading,
       
 10694         label: newTermLabel,
       
 10695         messages: {
       
 10696           added: termAddedLabel,
       
 10697           removed: termRemovedLabel,
       
 10698           remove: removeTermLabel
       
 10699         }
       
 10700       });
       
 10701     }
       
 10702   }]);
       
 10703 
       
 10704   return FlatTermSelector;
       
 10705 }(external_this_wp_element_["Component"]);
       
 10706 
       
 10707 /* harmony default export */ var flat_term_selector = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
       
 10708   var slug = _ref.slug;
       
 10709 
       
 10710   var _select = select('core/editor'),
       
 10711       getCurrentPost = _select.getCurrentPost;
       
 10712 
       
 10713   var _select2 = select('core'),
       
 10714       getTaxonomy = _select2.getTaxonomy;
       
 10715 
       
 10716   var taxonomy = getTaxonomy(slug);
       
 10717   return {
       
 10718     hasCreateAction: taxonomy ? Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-create-' + taxonomy.rest_base], false) : false,
       
 10719     hasAssignAction: taxonomy ? Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-assign-' + taxonomy.rest_base], false) : false,
       
 10720     terms: taxonomy ? select('core/editor').getEditedPostAttribute(taxonomy.rest_base) : [],
       
 10721     taxonomy: taxonomy
       
 10722   };
  8399   };
 10723 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  8400 }), external_wp_components_["withSpokenMessages"], Object(external_wp_components_["withFilters"])('editor.PostTaxonomyType'))(flat_term_selector_FlatTermSelector));
 10724   return {
       
 10725     onUpdateTerms: function onUpdateTerms(terms, restBase) {
       
 10726       dispatch('core/editor').editPost(Object(defineProperty["a" /* default */])({}, restBase, terms));
       
 10727     }
       
 10728   };
       
 10729 }), Object(external_this_wp_components_["withFilters"])('editor.PostTaxonomyType'))(flat_term_selector_FlatTermSelector));
       
 10730 
  8401 
 10731 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-tags-panel.js
  8402 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-tags-panel.js
 10732 
  8403 
 10733 
  8404 
 10734 
       
 10735 
       
 10736 
       
 10737 
       
 10738 
       
 10739 function maybe_tags_panel_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (maybe_tags_panel_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); }; }
       
 10740 
       
 10741 function maybe_tags_panel_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; } }
       
 10742 
       
 10743 /**
  8405 /**
 10744  * External dependencies
  8406  * External dependencies
 10745  */
  8407  */
 10746 
  8408 
 10747 /**
  8409 /**
 10757  * Internal dependencies
  8419  * Internal dependencies
 10758  */
  8420  */
 10759 
  8421 
 10760 
  8422 
 10761 
  8423 
 10762 var maybe_tags_panel_TagsPanel = function TagsPanel() {
  8424 const TagsPanel = () => {
 10763   var panelBodyTitle = [Object(external_this_wp_i18n_["__"])('Suggestion:'), Object(external_this_wp_element_["createElement"])("span", {
  8425   const panelBodyTitle = [Object(external_wp_i18n_["__"])('Suggestion:'), Object(external_wp_element_["createElement"])("span", {
 10764     className: "editor-post-publish-panel__link",
  8426     className: "editor-post-publish-panel__link",
 10765     key: "label"
  8427     key: "label"
 10766   }, Object(external_this_wp_i18n_["__"])('Add tags'))];
  8428   }, Object(external_wp_i18n_["__"])('Add tags'))];
 10767   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
  8429   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 10768     initialOpen: false,
  8430     initialOpen: false,
 10769     title: panelBodyTitle
  8431     title: panelBodyTitle
 10770   }, Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')), Object(external_this_wp_element_["createElement"])(flat_term_selector, {
  8432   }, Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')), Object(external_wp_element_["createElement"])(flat_term_selector, {
 10771     slug: 'post_tag'
  8433     slug: 'post_tag'
 10772   }));
  8434   }));
 10773 };
  8435 };
 10774 
  8436 
 10775 var maybe_tags_panel_MaybeTagsPanel = /*#__PURE__*/function (_Component) {
  8437 class maybe_tags_panel_MaybeTagsPanel extends external_wp_element_["Component"] {
 10776   Object(inherits["a" /* default */])(MaybeTagsPanel, _Component);
  8438   constructor(props) {
 10777 
  8439     super(props);
 10778   var _super = maybe_tags_panel_createSuper(MaybeTagsPanel);
  8440     this.state = {
 10779 
       
 10780   function MaybeTagsPanel(props) {
       
 10781     var _this;
       
 10782 
       
 10783     Object(classCallCheck["a" /* default */])(this, MaybeTagsPanel);
       
 10784 
       
 10785     _this = _super.call(this, props);
       
 10786     _this.state = {
       
 10787       hadTagsWhenOpeningThePanel: props.hasTags
  8441       hadTagsWhenOpeningThePanel: props.hasTags
 10788     };
  8442     };
 10789     return _this;
       
 10790   }
  8443   }
 10791   /*
  8444   /*
 10792    * We only want to show the tag panel if the post didn't have
  8445    * We only want to show the tag panel if the post didn't have
 10793    * any tags when the user hit the Publish button.
  8446    * any tags when the user hit the Publish button.
 10794    *
  8447    *
 10798    * hiding this panel and keeping the user from adding
  8451    * hiding this panel and keeping the user from adding
 10799    * more than one tag.
  8452    * more than one tag.
 10800    */
  8453    */
 10801 
  8454 
 10802 
  8455 
 10803   Object(createClass["a" /* default */])(MaybeTagsPanel, [{
  8456   render() {
 10804     key: "render",
  8457     if (!this.state.hadTagsWhenOpeningThePanel) {
 10805     value: function render() {
  8458       return Object(external_wp_element_["createElement"])(TagsPanel, null);
 10806       if (!this.state.hadTagsWhenOpeningThePanel) {
       
 10807         return Object(external_this_wp_element_["createElement"])(maybe_tags_panel_TagsPanel, null);
       
 10808       }
       
 10809 
       
 10810       return null;
       
 10811     }
  8459     }
 10812   }]);
  8460 
 10813 
  8461     return null;
 10814   return MaybeTagsPanel;
  8462   }
 10815 }(external_this_wp_element_["Component"]);
  8463 
 10816 
  8464 }
 10817 /* harmony default export */ var maybe_tags_panel = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
  8465 
 10818   var postType = select('core/editor').getCurrentPostType();
  8466 /* harmony default export */ var maybe_tags_panel = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
 10819   var tagsTaxonomy = select('core').getTaxonomy('post_tag');
  8467   const postType = select('core/editor').getCurrentPostType();
 10820   var tags = tagsTaxonomy && select('core/editor').getEditedPostAttribute(tagsTaxonomy.rest_base);
  8468   const tagsTaxonomy = select('core').getTaxonomy('post_tag');
       
  8469   const tags = tagsTaxonomy && select('core/editor').getEditedPostAttribute(tagsTaxonomy.rest_base);
 10821   return {
  8470   return {
 10822     areTagsFetched: tagsTaxonomy !== undefined,
  8471     areTagsFetched: tagsTaxonomy !== undefined,
 10823     isPostTypeSupported: tagsTaxonomy && Object(external_this_lodash_["some"])(tagsTaxonomy.types, function (type) {
  8472     isPostTypeSupported: tagsTaxonomy && Object(external_lodash_["some"])(tagsTaxonomy.types, type => type === postType),
 10824       return type === postType;
       
 10825     }),
       
 10826     hasTags: tags && tags.length
  8473     hasTags: tags && tags.length
 10827   };
  8474   };
 10828 }), Object(external_this_wp_compose_["ifCondition"])(function (_ref) {
  8475 }), Object(external_wp_compose_["ifCondition"])(({
 10829   var areTagsFetched = _ref.areTagsFetched,
  8476   areTagsFetched,
 10830       isPostTypeSupported = _ref.isPostTypeSupported;
  8477   isPostTypeSupported
 10831   return isPostTypeSupported && areTagsFetched;
  8478 }) => isPostTypeSupported && areTagsFetched))(maybe_tags_panel_MaybeTagsPanel));
 10832 }))(maybe_tags_panel_MaybeTagsPanel));
       
 10833 
  8479 
 10834 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-post-format-panel.js
  8480 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-post-format-panel.js
 10835 
  8481 
 10836 
  8482 
 10837 /**
  8483 /**
 10843  */
  8489  */
 10844 
  8490 
 10845 
  8491 
 10846 
  8492 
 10847 
  8493 
 10848 
       
 10849 /**
  8494 /**
 10850  * Internal dependencies
  8495  * Internal dependencies
 10851  */
  8496  */
 10852 
  8497 
 10853 
  8498 
 10854 
  8499 
 10855 var maybe_post_format_panel_PostFormatSuggestion = function PostFormatSuggestion(_ref) {
  8500 const getSuggestion = (supportedFormats, suggestedPostFormat) => {
 10856   var suggestedPostFormat = _ref.suggestedPostFormat,
  8501   const formats = POST_FORMATS.filter(format => Object(external_lodash_["includes"])(supportedFormats, format.id));
 10857       suggestionText = _ref.suggestionText,
  8502   return Object(external_lodash_["find"])(formats, format => format.id === suggestedPostFormat);
 10858       onUpdatePostFormat = _ref.onUpdatePostFormat;
       
 10859   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 10860     isLink: true,
       
 10861     onClick: function onClick() {
       
 10862       return onUpdatePostFormat(suggestedPostFormat);
       
 10863     }
       
 10864   }, suggestionText);
       
 10865 };
  8503 };
 10866 
  8504 
 10867 var maybe_post_format_panel_PostFormatPanel = function PostFormatPanel(_ref2) {
  8505 const PostFormatSuggestion = ({
 10868   var suggestion = _ref2.suggestion,
  8506   suggestedPostFormat,
 10869       onUpdatePostFormat = _ref2.onUpdatePostFormat;
  8507   suggestionText,
 10870   var panelBodyTitle = [Object(external_this_wp_i18n_["__"])('Suggestion:'), Object(external_this_wp_element_["createElement"])("span", {
  8508   onUpdatePostFormat
       
  8509 }) => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
       
  8510   isLink: true,
       
  8511   onClick: () => onUpdatePostFormat(suggestedPostFormat)
       
  8512 }, suggestionText);
       
  8513 
       
  8514 function PostFormatPanel() {
       
  8515   const {
       
  8516     currentPostFormat,
       
  8517     suggestion
       
  8518   } = Object(external_wp_data_["useSelect"])(select => {
       
  8519     const {
       
  8520       getEditedPostAttribute,
       
  8521       getSuggestedPostFormat
       
  8522     } = select('core/editor');
       
  8523     const supportedFormats = Object(external_lodash_["get"])(select('core').getThemeSupports(), ['formats'], []);
       
  8524     return {
       
  8525       currentPostFormat: getEditedPostAttribute('format'),
       
  8526       suggestion: getSuggestion(supportedFormats, getSuggestedPostFormat())
       
  8527     };
       
  8528   }, []);
       
  8529   const {
       
  8530     editPost
       
  8531   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
  8532 
       
  8533   const onUpdatePostFormat = format => editPost({
       
  8534     format
       
  8535   });
       
  8536 
       
  8537   const panelBodyTitle = [Object(external_wp_i18n_["__"])('Suggestion:'), Object(external_wp_element_["createElement"])("span", {
 10871     className: "editor-post-publish-panel__link",
  8538     className: "editor-post-publish-panel__link",
 10872     key: "label"
  8539     key: "label"
 10873   }, Object(external_this_wp_i18n_["__"])('Use a post format'))];
  8540   }, Object(external_wp_i18n_["__"])('Use a post format'))];
 10874   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
  8541 
       
  8542   if (!suggestion || suggestion.id === currentPostFormat) {
       
  8543     return null;
       
  8544   }
       
  8545 
       
  8546   return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 10875     initialOpen: false,
  8547     initialOpen: false,
 10876     title: panelBodyTitle
  8548     title: panelBodyTitle
 10877   }, Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.')), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])(maybe_post_format_panel_PostFormatSuggestion, {
  8549   }, Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.')), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_element_["createElement"])(PostFormatSuggestion, {
 10878     onUpdatePostFormat: onUpdatePostFormat,
  8550     onUpdatePostFormat: onUpdatePostFormat,
 10879     suggestedPostFormat: suggestion.id,
  8551     suggestedPostFormat: suggestion.id,
 10880     suggestionText: Object(external_this_wp_i18n_["sprintf"])(
  8552     suggestionText: Object(external_wp_i18n_["sprintf"])(
 10881     /* translators: %s: post format */
  8553     /* translators: %s: post format */
 10882     Object(external_this_wp_i18n_["__"])('Apply the "%1$s" format.'), suggestion.caption)
  8554     Object(external_wp_i18n_["__"])('Apply the "%1$s" format.'), suggestion.caption)
 10883   })));
  8555   })));
 10884 };
  8556 }
 10885 
  8557 
 10886 var maybe_post_format_panel_getSuggestion = function getSuggestion(supportedFormats, suggestedPostFormat) {
  8558 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/prepublish.js
 10887   var formats = POST_FORMATS.filter(function (format) {
  8559 
 10888     return Object(external_this_lodash_["includes"])(supportedFormats, format.id);
  8560 
       
  8561 /**
       
  8562  * External dependencies
       
  8563  */
       
  8564 
       
  8565 /**
       
  8566  * WordPress dependencies
       
  8567  */
       
  8568 
       
  8569 
       
  8570 
       
  8571 
       
  8572 
       
  8573 
       
  8574 /**
       
  8575  * Internal dependencies
       
  8576  */
       
  8577 
       
  8578 
       
  8579 
       
  8580 
       
  8581 
       
  8582 
       
  8583 
       
  8584 
       
  8585 function PostPublishPanelPrepublish({
       
  8586   children
       
  8587 }) {
       
  8588   const {
       
  8589     isBeingScheduled,
       
  8590     isRequestingSiteIcon,
       
  8591     hasPublishAction,
       
  8592     siteIconUrl,
       
  8593     siteTitle,
       
  8594     siteHome
       
  8595   } = Object(external_wp_data_["useSelect"])(select => {
       
  8596     const {
       
  8597       isResolving
       
  8598     } = select('core/data');
       
  8599     const {
       
  8600       getCurrentPost,
       
  8601       isEditedPostBeingScheduled
       
  8602     } = select('core/editor');
       
  8603     const {
       
  8604       getEntityRecord
       
  8605     } = select('core');
       
  8606     const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
       
  8607     return {
       
  8608       hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
       
  8609       isBeingScheduled: isEditedPostBeingScheduled(),
       
  8610       isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
       
  8611       siteIconUrl: siteData.site_icon_url,
       
  8612       siteTitle: siteData.name,
       
  8613       siteHome: siteData.home && Object(external_wp_url_["filterURLForDisplay"])(siteData.home)
       
  8614     };
       
  8615   }, []);
       
  8616   let siteIcon = Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
       
  8617     className: "components-site-icon",
       
  8618     size: "36px",
       
  8619     icon: wordpress["a" /* default */]
 10889   });
  8620   });
 10890   return Object(external_this_lodash_["find"])(formats, function (format) {
  8621 
 10891     return format.id === suggestedPostFormat;
  8622   if (siteIconUrl) {
 10892   });
  8623     siteIcon = Object(external_wp_element_["createElement"])("img", {
 10893 };
  8624       alt: Object(external_wp_i18n_["__"])('Site Icon'),
 10894 
  8625       className: "components-site-icon",
 10895 /* harmony default export */ var maybe_post_format_panel = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
  8626       src: siteIconUrl
 10896   var _select = select('core/editor'),
  8627     });
 10897       getEditedPostAttribute = _select.getEditedPostAttribute,
  8628   }
 10898       getSuggestedPostFormat = _select.getSuggestedPostFormat;
  8629 
 10899 
  8630   if (isRequestingSiteIcon) {
 10900   var supportedFormats = Object(external_this_lodash_["get"])(select('core').getThemeSupports(), ['formats'], []);
  8631     siteIcon = null;
 10901   return {
  8632   }
 10902     currentPostFormat: getEditedPostAttribute('format'),
  8633 
 10903     suggestion: maybe_post_format_panel_getSuggestion(supportedFormats, getSuggestedPostFormat())
  8634   let prePublishTitle, prePublishBodyText;
 10904   };
       
 10905 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 10906   return {
       
 10907     onUpdatePostFormat: function onUpdatePostFormat(postFormat) {
       
 10908       dispatch('core/editor').editPost({
       
 10909         format: postFormat
       
 10910       });
       
 10911     }
       
 10912   };
       
 10913 }), Object(external_this_wp_compose_["ifCondition"])(function (_ref3) {
       
 10914   var suggestion = _ref3.suggestion,
       
 10915       currentPostFormat = _ref3.currentPostFormat;
       
 10916   return suggestion && suggestion.id !== currentPostFormat;
       
 10917 }))(maybe_post_format_panel_PostFormatPanel));
       
 10918 
       
 10919 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/prepublish.js
       
 10920 
       
 10921 
       
 10922 /**
       
 10923  * External dependencies
       
 10924  */
       
 10925 
       
 10926 /**
       
 10927  * WordPress dependencies
       
 10928  */
       
 10929 
       
 10930 
       
 10931 
       
 10932 
       
 10933 /**
       
 10934  * Internal dependencies
       
 10935  */
       
 10936 
       
 10937 
       
 10938 
       
 10939 
       
 10940 
       
 10941 
       
 10942 
       
 10943 
       
 10944 function PostPublishPanelPrepublish(_ref) {
       
 10945   var hasPublishAction = _ref.hasPublishAction,
       
 10946       isBeingScheduled = _ref.isBeingScheduled,
       
 10947       children = _ref.children;
       
 10948   var prePublishTitle, prePublishBodyText;
       
 10949 
  8635 
 10950   if (!hasPublishAction) {
  8636   if (!hasPublishAction) {
 10951     prePublishTitle = Object(external_this_wp_i18n_["__"])('Are you ready to submit for review?');
  8637     prePublishTitle = Object(external_wp_i18n_["__"])('Are you ready to submit for review?');
 10952     prePublishBodyText = Object(external_this_wp_i18n_["__"])('When you’re ready, submit your work for review, and an Editor will be able to approve it for you.');
  8638     prePublishBodyText = Object(external_wp_i18n_["__"])('When you’re ready, submit your work for review, and an Editor will be able to approve it for you.');
 10953   } else if (isBeingScheduled) {
  8639   } else if (isBeingScheduled) {
 10954     prePublishTitle = Object(external_this_wp_i18n_["__"])('Are you ready to schedule?');
  8640     prePublishTitle = Object(external_wp_i18n_["__"])('Are you ready to schedule?');
 10955     prePublishBodyText = Object(external_this_wp_i18n_["__"])('Your work will be published at the specified date and time.');
  8641     prePublishBodyText = Object(external_wp_i18n_["__"])('Your work will be published at the specified date and time.');
 10956   } else {
  8642   } else {
 10957     prePublishTitle = Object(external_this_wp_i18n_["__"])('Are you ready to publish?');
  8643     prePublishTitle = Object(external_wp_i18n_["__"])('Are you ready to publish?');
 10958     prePublishBodyText = Object(external_this_wp_i18n_["__"])('Double-check your settings before publishing.');
  8644     prePublishBodyText = Object(external_wp_i18n_["__"])('Double-check your settings before publishing.');
 10959   }
  8645   }
 10960 
  8646 
 10961   return Object(external_this_wp_element_["createElement"])("div", {
  8647   return Object(external_wp_element_["createElement"])("div", {
 10962     className: "editor-post-publish-panel__prepublish"
  8648     className: "editor-post-publish-panel__prepublish"
 10963   }, Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])("strong", null, prePublishTitle)), Object(external_this_wp_element_["createElement"])("p", null, prePublishBodyText), hasPublishAction && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
  8649   }, Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])("strong", null, prePublishTitle)), Object(external_wp_element_["createElement"])("p", null, prePublishBodyText), Object(external_wp_element_["createElement"])("div", {
       
  8650     className: "components-site-card"
       
  8651   }, siteIcon, Object(external_wp_element_["createElement"])("div", {
       
  8652     className: "components-site-info"
       
  8653   }, Object(external_wp_element_["createElement"])("span", {
       
  8654     className: "components-site-name"
       
  8655   }, siteTitle || Object(external_wp_i18n_["__"])('(Untitled)')), Object(external_wp_element_["createElement"])("span", {
       
  8656     className: "components-site-home"
       
  8657   }, siteHome))), hasPublishAction && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 10964     initialOpen: false,
  8658     initialOpen: false,
 10965     title: [Object(external_this_wp_i18n_["__"])('Visibility:'), Object(external_this_wp_element_["createElement"])("span", {
  8659     title: [Object(external_wp_i18n_["__"])('Visibility:'), Object(external_wp_element_["createElement"])("span", {
 10966       className: "editor-post-publish-panel__link",
  8660       className: "editor-post-publish-panel__link",
 10967       key: "label"
  8661       key: "label"
 10968     }, Object(external_this_wp_element_["createElement"])(post_visibility_label, null))]
  8662     }, Object(external_wp_element_["createElement"])(post_visibility_label, null))]
 10969   }, Object(external_this_wp_element_["createElement"])(post_visibility, null)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
  8663   }, Object(external_wp_element_["createElement"])(post_visibility, null)), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 10970     initialOpen: false,
  8664     initialOpen: false,
 10971     title: [Object(external_this_wp_i18n_["__"])('Publish:'), Object(external_this_wp_element_["createElement"])("span", {
  8665     title: [Object(external_wp_i18n_["__"])('Publish:'), Object(external_wp_element_["createElement"])("span", {
 10972       className: "editor-post-publish-panel__link",
  8666       className: "editor-post-publish-panel__link",
 10973       key: "label"
  8667       key: "label"
 10974     }, Object(external_this_wp_element_["createElement"])(post_schedule_label, null))]
  8668     }, Object(external_wp_element_["createElement"])(post_schedule_label, null))]
 10975   }, Object(external_this_wp_element_["createElement"])(post_schedule, null))), Object(external_this_wp_element_["createElement"])(maybe_post_format_panel, null), Object(external_this_wp_element_["createElement"])(maybe_tags_panel, null), children);
  8669   }, Object(external_wp_element_["createElement"])(PostSchedule, null))), Object(external_wp_element_["createElement"])(PostFormatPanel, null), Object(external_wp_element_["createElement"])(maybe_tags_panel, null), children);
 10976 }
  8670 }
 10977 
  8671 
 10978 /* harmony default export */ var prepublish = (Object(external_this_wp_data_["withSelect"])(function (select) {
  8672 /* harmony default export */ var prepublish = (PostPublishPanelPrepublish);
 10979   var _select = select('core/editor'),
       
 10980       getCurrentPost = _select.getCurrentPost,
       
 10981       isEditedPostBeingScheduled = _select.isEditedPostBeingScheduled;
       
 10982 
       
 10983   return {
       
 10984     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
       
 10985     isBeingScheduled: isEditedPostBeingScheduled()
       
 10986   };
       
 10987 })(PostPublishPanelPrepublish));
       
 10988 
  8673 
 10989 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/postpublish.js
  8674 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/postpublish.js
 10990 
  8675 
 10991 
  8676 
 10992 
       
 10993 
       
 10994 
       
 10995 
       
 10996 
       
 10997 
       
 10998 function postpublish_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (postpublish_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); }; }
       
 10999 
       
 11000 function postpublish_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; } }
       
 11001 
       
 11002 /**
  8677 /**
 11003  * External dependencies
  8678  * External dependencies
 11004  */
  8679  */
 11005 
  8680 
 11006 /**
  8681 /**
 11011 
  8686 
 11012 
  8687 
 11013 
  8688 
 11014 
  8689 
 11015 
  8690 
       
  8691 
 11016 /**
  8692 /**
 11017  * Internal dependencies
  8693  * Internal dependencies
 11018  */
  8694  */
 11019 
  8695 
 11020 
  8696 
 11021 var POSTNAME = '%postname%';
  8697 const POSTNAME = '%postname%';
 11022 /**
  8698 /**
 11023  * Returns URL for a future post.
  8699  * Returns URL for a future post.
 11024  *
  8700  *
 11025  * @param {Object} post         Post object.
  8701  * @param {Object} post         Post object.
 11026  *
  8702  *
 11027  * @return {string} PostPublish URL.
  8703  * @return {string} PostPublish URL.
 11028  */
  8704  */
 11029 
  8705 
 11030 var getFuturePostUrl = function getFuturePostUrl(post) {
  8706 const getFuturePostUrl = post => {
 11031   var slug = post.slug;
  8707   const {
       
  8708     slug
       
  8709   } = post;
 11032 
  8710 
 11033   if (post.permalink_template.includes(POSTNAME)) {
  8711   if (post.permalink_template.includes(POSTNAME)) {
 11034     return post.permalink_template.replace(POSTNAME, slug);
  8712     return post.permalink_template.replace(POSTNAME, slug);
 11035   }
  8713   }
 11036 
  8714 
 11037   return post.permalink_template;
  8715   return post.permalink_template;
 11038 };
  8716 };
 11039 
  8717 
 11040 var postpublish_PostPublishPanelPostpublish = /*#__PURE__*/function (_Component) {
  8718 function postpublish_CopyButton({
 11041   Object(inherits["a" /* default */])(PostPublishPanelPostpublish, _Component);
  8719   text,
 11042 
  8720   onCopy,
 11043   var _super = postpublish_createSuper(PostPublishPanelPostpublish);
  8721   children
 11044 
  8722 }) {
 11045   function PostPublishPanelPostpublish() {
  8723   const ref = Object(external_wp_compose_["useCopyToClipboard"])(text, onCopy);
 11046     var _this;
  8724   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11047 
  8725     isSecondary: true,
 11048     Object(classCallCheck["a" /* default */])(this, PostPublishPanelPostpublish);
  8726     ref: ref
 11049 
  8727   }, children);
 11050     _this = _super.apply(this, arguments);
  8728 }
 11051     _this.state = {
  8729 
       
  8730 class postpublish_PostPublishPanelPostpublish extends external_wp_element_["Component"] {
       
  8731   constructor() {
       
  8732     super(...arguments);
       
  8733     this.state = {
 11052       showCopyConfirmation: false
  8734       showCopyConfirmation: false
 11053     };
  8735     };
 11054     _this.onCopy = _this.onCopy.bind(Object(assertThisInitialized["a" /* default */])(_this));
  8736     this.onCopy = this.onCopy.bind(this);
 11055     _this.onSelectInput = _this.onSelectInput.bind(Object(assertThisInitialized["a" /* default */])(_this));
  8737     this.onSelectInput = this.onSelectInput.bind(this);
 11056     _this.postLink = Object(external_this_wp_element_["createRef"])();
  8738     this.postLink = Object(external_wp_element_["createRef"])();
 11057     return _this;
  8739   }
 11058   }
  8740 
 11059 
  8741   componentDidMount() {
 11060   Object(createClass["a" /* default */])(PostPublishPanelPostpublish, [{
  8742     if (this.props.focusOnMount) {
 11061     key: "componentDidMount",
  8743       this.postLink.current.focus();
 11062     value: function componentDidMount() {
       
 11063       if (this.props.focusOnMount) {
       
 11064         this.postLink.current.focus();
       
 11065       }
       
 11066     }
  8744     }
 11067   }, {
  8745   }
 11068     key: "componentWillUnmount",
  8746 
 11069     value: function componentWillUnmount() {
  8747   componentWillUnmount() {
 11070       clearTimeout(this.dismissCopyConfirmation);
  8748     clearTimeout(this.dismissCopyConfirmation);
 11071     }
  8749   }
 11072   }, {
  8750 
 11073     key: "onCopy",
  8751   onCopy() {
 11074     value: function onCopy() {
  8752     this.setState({
 11075       var _this2 = this;
  8753       showCopyConfirmation: true
 11076 
  8754     });
       
  8755     clearTimeout(this.dismissCopyConfirmation);
       
  8756     this.dismissCopyConfirmation = setTimeout(() => {
 11077       this.setState({
  8757       this.setState({
 11078         showCopyConfirmation: true
  8758         showCopyConfirmation: false
 11079       });
  8759       });
 11080       clearTimeout(this.dismissCopyConfirmation);
  8760     }, 4000);
 11081       this.dismissCopyConfirmation = setTimeout(function () {
  8761   }
 11082         _this2.setState({
  8762 
 11083           showCopyConfirmation: false
  8763   onSelectInput(event) {
 11084         });
  8764     event.target.select();
 11085       }, 4000);
  8765   }
 11086     }
  8766 
 11087   }, {
  8767   render() {
 11088     key: "onSelectInput",
  8768     const {
 11089     value: function onSelectInput(event) {
  8769       children,
 11090       event.target.select();
  8770       isScheduled,
 11091     }
  8771       post,
 11092   }, {
  8772       postType
 11093     key: "render",
  8773     } = this.props;
 11094     value: function render() {
  8774     const postLabel = Object(external_lodash_["get"])(postType, ['labels', 'singular_name']);
 11095       var _this$props = this.props,
  8775     const viewPostLabel = Object(external_lodash_["get"])(postType, ['labels', 'view_item']);
 11096           children = _this$props.children,
  8776     const link = post.status === 'future' ? getFuturePostUrl(post) : post.link;
 11097           isScheduled = _this$props.isScheduled,
  8777     const postPublishNonLinkHeader = isScheduled ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["__"])('is now scheduled. It will go live on'), ' ', Object(external_wp_element_["createElement"])(post_schedule_label, null), ".") : Object(external_wp_i18n_["__"])('is now live.');
 11098           post = _this$props.post,
  8778     return Object(external_wp_element_["createElement"])("div", {
 11099           postType = _this$props.postType;
  8779       className: "post-publish-panel__postpublish"
 11100       var postLabel = Object(external_this_lodash_["get"])(postType, ['labels', 'singular_name']);
  8780     }, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
 11101       var viewPostLabel = Object(external_this_lodash_["get"])(postType, ['labels', 'view_item']);
  8781       className: "post-publish-panel__postpublish-header"
 11102       var link = post.status === 'future' ? getFuturePostUrl(post) : post.link;
  8782     }, Object(external_wp_element_["createElement"])("a", {
 11103       var postPublishNonLinkHeader = isScheduled ? Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('is now scheduled. It will go live on'), ' ', Object(external_this_wp_element_["createElement"])(post_schedule_label, null), ".") : Object(external_this_wp_i18n_["__"])('is now live.');
  8783       ref: this.postLink,
 11104       return Object(external_this_wp_element_["createElement"])("div", {
  8784       href: link
 11105         className: "post-publish-panel__postpublish"
  8785     }, Object(external_wp_htmlEntities_["decodeEntities"])(post.title) || Object(external_wp_i18n_["__"])('(no title)')), ' ', postPublishNonLinkHeader), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])("p", {
 11106       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
  8786       className: "post-publish-panel__postpublish-subheader"
 11107         className: "post-publish-panel__postpublish-header"
  8787     }, Object(external_wp_element_["createElement"])("strong", null, Object(external_wp_i18n_["__"])('What’s next?'))), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 11108       }, Object(external_this_wp_element_["createElement"])("a", {
  8788       className: "post-publish-panel__postpublish-post-address",
 11109         ref: this.postLink,
  8789       readOnly: true,
 11110         href: link
  8790       label: Object(external_wp_i18n_["sprintf"])(
 11111       }, Object(external_this_wp_htmlEntities_["decodeEntities"])(post.title) || Object(external_this_wp_i18n_["__"])('(no title)')), ' ', postPublishNonLinkHeader), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], null, Object(external_this_wp_element_["createElement"])("p", {
  8791       /* translators: %s: post type singular name */
 11112         className: "post-publish-panel__postpublish-subheader"
  8792       Object(external_wp_i18n_["__"])('%s address'), postLabel),
 11113       }, Object(external_this_wp_element_["createElement"])("strong", null, Object(external_this_wp_i18n_["__"])('What’s next?'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
  8793       value: Object(external_wp_url_["safeDecodeURIComponent"])(link),
 11114         className: "post-publish-panel__postpublish-post-address",
  8794       onFocus: this.onSelectInput
 11115         readOnly: true,
  8795     }), Object(external_wp_element_["createElement"])("div", {
 11116         label: Object(external_this_wp_i18n_["sprintf"])(
  8796       className: "post-publish-panel__postpublish-buttons"
 11117         /* translators: %s: post type singular name */
  8797     }, !isScheduled && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11118         Object(external_this_wp_i18n_["__"])('%s address'), postLabel),
  8798       isSecondary: true,
 11119         value: Object(external_this_wp_url_["safeDecodeURIComponent"])(link),
  8799       href: link
 11120         onFocus: this.onSelectInput
  8800     }, viewPostLabel), Object(external_wp_element_["createElement"])(postpublish_CopyButton, {
 11121       }), Object(external_this_wp_element_["createElement"])("div", {
  8801       text: link,
 11122         className: "post-publish-panel__postpublish-buttons"
  8802       onCopy: this.onCopy
 11123       }, !isScheduled && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  8803     }, this.state.showCopyConfirmation ? Object(external_wp_i18n_["__"])('Copied!') : Object(external_wp_i18n_["__"])('Copy Link')))), children);
 11124         isSecondary: true,
  8804   }
 11125         href: link
  8805 
 11126       }, viewPostLabel), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
  8806 }
 11127         isSecondary: true,
  8807 
 11128         text: link,
  8808 /* harmony default export */ var postpublish = (Object(external_wp_data_["withSelect"])(select => {
 11129         onCopy: this.onCopy
  8809   const {
 11130       }, this.state.showCopyConfirmation ? Object(external_this_wp_i18n_["__"])('Copied!') : Object(external_this_wp_i18n_["__"])('Copy Link')))), children);
  8810     getEditedPostAttribute,
 11131     }
  8811     getCurrentPost,
 11132   }]);
  8812     isCurrentPostScheduled
 11133 
  8813   } = select('core/editor');
 11134   return PostPublishPanelPostpublish;
  8814   const {
 11135 }(external_this_wp_element_["Component"]);
  8815     getPostType
 11136 
  8816   } = select('core');
 11137 /* harmony default export */ var postpublish = (Object(external_this_wp_data_["withSelect"])(function (select) {
       
 11138   var _select = select('core/editor'),
       
 11139       getEditedPostAttribute = _select.getEditedPostAttribute,
       
 11140       getCurrentPost = _select.getCurrentPost,
       
 11141       isCurrentPostScheduled = _select.isCurrentPostScheduled;
       
 11142 
       
 11143   var _select2 = select('core'),
       
 11144       getPostType = _select2.getPostType;
       
 11145 
       
 11146   return {
  8817   return {
 11147     post: getCurrentPost(),
  8818     post: getCurrentPost(),
 11148     postType: getPostType(getEditedPostAttribute('type')),
  8819     postType: getPostType(getEditedPostAttribute('type')),
 11149     isScheduled: isCurrentPostScheduled()
  8820     isScheduled: isCurrentPostScheduled()
 11150   };
  8821   };
 11152 
  8823 
 11153 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/index.js
  8824 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/index.js
 11154 
  8825 
 11155 
  8826 
 11156 
  8827 
 11157 
       
 11158 
       
 11159 
       
 11160 
       
 11161 
       
 11162 
       
 11163 
       
 11164 function post_publish_panel_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_publish_panel_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); }; }
       
 11165 
       
 11166 function post_publish_panel_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; } }
       
 11167 
       
 11168 /**
  8828 /**
 11169  * External dependencies
  8829  * External dependencies
 11170  */
  8830  */
 11171 
  8831 
 11172 /**
  8832 /**
 11184  */
  8844  */
 11185 
  8845 
 11186 
  8846 
 11187 
  8847 
 11188 
  8848 
 11189 var post_publish_panel_PostPublishPanel = /*#__PURE__*/function (_Component) {
  8849 class post_publish_panel_PostPublishPanel extends external_wp_element_["Component"] {
 11190   Object(inherits["a" /* default */])(PostPublishPanel, _Component);
  8850   constructor() {
 11191 
  8851     super(...arguments);
 11192   var _super = post_publish_panel_createSuper(PostPublishPanel);
  8852     this.onSubmit = this.onSubmit.bind(this);
 11193 
  8853   }
 11194   function PostPublishPanel() {
  8854 
 11195     var _this;
  8855   componentDidUpdate(prevProps) {
 11196 
  8856     // Automatically collapse the publish sidebar when a post
 11197     Object(classCallCheck["a" /* default */])(this, PostPublishPanel);
  8857     // is published and the user makes an edit.
 11198 
  8858     if (prevProps.isPublished && !this.props.isSaving && this.props.isDirty) {
 11199     _this = _super.apply(this, arguments);
  8859       this.props.onClose();
 11200     _this.onSubmit = _this.onSubmit.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11201     return _this;
       
 11202   }
       
 11203 
       
 11204   Object(createClass["a" /* default */])(PostPublishPanel, [{
       
 11205     key: "componentDidUpdate",
       
 11206     value: function componentDidUpdate(prevProps) {
       
 11207       // Automatically collapse the publish sidebar when a post
       
 11208       // is published and the user makes an edit.
       
 11209       if (prevProps.isPublished && !this.props.isSaving && this.props.isDirty) {
       
 11210         this.props.onClose();
       
 11211       }
       
 11212     }
  8860     }
 11213   }, {
  8861   }
 11214     key: "onSubmit",
  8862 
 11215     value: function onSubmit() {
  8863   onSubmit() {
 11216       var _this$props = this.props,
  8864     const {
 11217           onClose = _this$props.onClose,
  8865       onClose,
 11218           hasPublishAction = _this$props.hasPublishAction,
  8866       hasPublishAction,
 11219           isPostTypeViewable = _this$props.isPostTypeViewable;
  8867       isPostTypeViewable
 11220 
  8868     } = this.props;
 11221       if (!hasPublishAction || !isPostTypeViewable) {
  8869 
 11222         onClose();
  8870     if (!hasPublishAction || !isPostTypeViewable) {
 11223       }
  8871       onClose();
 11224     }
  8872     }
 11225   }, {
  8873   }
 11226     key: "render",
  8874 
 11227     value: function render() {
  8875   render() {
 11228       var _this$props2 = this.props,
  8876     const {
 11229           forceIsDirty = _this$props2.forceIsDirty,
  8877       forceIsDirty,
 11230           forceIsSaving = _this$props2.forceIsSaving,
  8878       forceIsSaving,
 11231           isBeingScheduled = _this$props2.isBeingScheduled,
  8879       isBeingScheduled,
 11232           isPublished = _this$props2.isPublished,
  8880       isPublished,
 11233           isPublishSidebarEnabled = _this$props2.isPublishSidebarEnabled,
  8881       isPublishSidebarEnabled,
 11234           isScheduled = _this$props2.isScheduled,
  8882       isScheduled,
 11235           isSaving = _this$props2.isSaving,
  8883       isSaving,
 11236           onClose = _this$props2.onClose,
  8884       onClose,
 11237           onTogglePublishSidebar = _this$props2.onTogglePublishSidebar,
  8885       onTogglePublishSidebar,
 11238           PostPublishExtension = _this$props2.PostPublishExtension,
  8886       PostPublishExtension,
 11239           PrePublishExtension = _this$props2.PrePublishExtension,
  8887       PrePublishExtension,
 11240           additionalProps = Object(objectWithoutProperties["a" /* default */])(_this$props2, ["forceIsDirty", "forceIsSaving", "isBeingScheduled", "isPublished", "isPublishSidebarEnabled", "isScheduled", "isSaving", "onClose", "onTogglePublishSidebar", "PostPublishExtension", "PrePublishExtension"]);
  8888       ...additionalProps
 11241 
  8889     } = this.props;
 11242       var propsForPanel = Object(external_this_lodash_["omit"])(additionalProps, ['hasPublishAction', 'isDirty', 'isPostTypeViewable']);
  8890     const propsForPanel = Object(external_lodash_["omit"])(additionalProps, ['hasPublishAction', 'isDirty', 'isPostTypeViewable']);
 11243       var isPublishedOrScheduled = isPublished || isScheduled && isBeingScheduled;
  8891     const isPublishedOrScheduled = isPublished || isScheduled && isBeingScheduled;
 11244       var isPrePublish = !isPublishedOrScheduled && !isSaving;
  8892     const isPrePublish = !isPublishedOrScheduled && !isSaving;
 11245       var isPostPublish = isPublishedOrScheduled && !isSaving;
  8893     const isPostPublish = isPublishedOrScheduled && !isSaving;
 11246       return Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
  8894     return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
 11247         className: "editor-post-publish-panel"
  8895       className: "editor-post-publish-panel"
 11248       }, propsForPanel), Object(external_this_wp_element_["createElement"])("div", {
  8896     }, propsForPanel), Object(external_wp_element_["createElement"])("div", {
 11249         className: "editor-post-publish-panel__header"
  8897       className: "editor-post-publish-panel__header"
 11250       }, isPostPublish ? Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  8898     }, isPostPublish ? Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11251         onClick: onClose,
  8899       onClick: onClose,
 11252         icon: close_small["a" /* default */],
  8900       icon: close_small["a" /* default */],
 11253         label: Object(external_this_wp_i18n_["__"])('Close panel')
  8901       label: Object(external_wp_i18n_["__"])('Close panel')
 11254       }) : Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
  8902     }) : Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
 11255         className: "editor-post-publish-panel__header-publish-button"
  8903       className: "editor-post-publish-panel__header-publish-button"
 11256       }, Object(external_this_wp_element_["createElement"])(post_publish_button, {
  8904     }, Object(external_wp_element_["createElement"])(post_publish_button, {
 11257         focusOnMount: true,
  8905       focusOnMount: true,
 11258         onSubmit: this.onSubmit,
  8906       onSubmit: this.onSubmit,
 11259         forceIsDirty: forceIsDirty,
  8907       forceIsDirty: forceIsDirty,
 11260         forceIsSaving: forceIsSaving
  8908       forceIsSaving: forceIsSaving
 11261       })), Object(external_this_wp_element_["createElement"])("div", {
  8909     })), Object(external_wp_element_["createElement"])("div", {
 11262         className: "editor-post-publish-panel__header-cancel-button"
  8910       className: "editor-post-publish-panel__header-cancel-button"
 11263       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  8911     }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11264         onClick: onClose,
  8912       onClick: onClose,
 11265         label: Object(external_this_wp_i18n_["__"])('Close panel'),
  8913       isSecondary: true
 11266         isSecondary: true
  8914     }, Object(external_wp_i18n_["__"])('Cancel'))))), Object(external_wp_element_["createElement"])("div", {
 11267       }, Object(external_this_wp_i18n_["__"])('Cancel'))))), Object(external_this_wp_element_["createElement"])("div", {
  8915       className: "editor-post-publish-panel__content"
 11268         className: "editor-post-publish-panel__content"
  8916     }, isPrePublish && Object(external_wp_element_["createElement"])(prepublish, null, PrePublishExtension && Object(external_wp_element_["createElement"])(PrePublishExtension, null)), isPostPublish && Object(external_wp_element_["createElement"])(postpublish, {
 11269       }, isPrePublish && Object(external_this_wp_element_["createElement"])(prepublish, null, PrePublishExtension && Object(external_this_wp_element_["createElement"])(PrePublishExtension, null)), isPostPublish && Object(external_this_wp_element_["createElement"])(postpublish, {
  8917       focusOnMount: true
 11270         focusOnMount: true
  8918     }, PostPublishExtension && Object(external_wp_element_["createElement"])(PostPublishExtension, null)), isSaving && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)), Object(external_wp_element_["createElement"])("div", {
 11271       }, PostPublishExtension && Object(external_this_wp_element_["createElement"])(PostPublishExtension, null)), isSaving && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null)), Object(external_this_wp_element_["createElement"])("div", {
  8919       className: "editor-post-publish-panel__footer"
 11272         className: "editor-post-publish-panel__footer"
  8920     }, Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
 11273       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
  8921       label: Object(external_wp_i18n_["__"])('Always show pre-publish checks.'),
 11274         label: Object(external_this_wp_i18n_["__"])('Always show pre-publish checks.'),
  8922       checked: isPublishSidebarEnabled,
 11275         checked: isPublishSidebarEnabled,
  8923       onChange: onTogglePublishSidebar
 11276         onChange: onTogglePublishSidebar
  8924     })));
 11277       })));
  8925   }
 11278     }
  8926 
 11279   }]);
  8927 }
 11280 
  8928 /* harmony default export */ var post_publish_panel = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 11281   return PostPublishPanel;
  8929   const {
 11282 }(external_this_wp_element_["Component"]);
  8930     getPostType
 11283 /* harmony default export */ var post_publish_panel = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  8931   } = select('core');
 11284   var _select = select('core'),
  8932   const {
 11285       getPostType = _select.getPostType;
  8933     getCurrentPost,
 11286 
  8934     getEditedPostAttribute,
 11287   var _select2 = select('core/editor'),
  8935     isCurrentPostPublished,
 11288       getCurrentPost = _select2.getCurrentPost,
  8936     isCurrentPostScheduled,
 11289       getEditedPostAttribute = _select2.getEditedPostAttribute,
  8937     isEditedPostBeingScheduled,
 11290       isCurrentPostPublished = _select2.isCurrentPostPublished,
  8938     isEditedPostDirty,
 11291       isCurrentPostScheduled = _select2.isCurrentPostScheduled,
  8939     isSavingPost
 11292       isEditedPostBeingScheduled = _select2.isEditedPostBeingScheduled,
  8940   } = select('core/editor');
 11293       isEditedPostDirty = _select2.isEditedPostDirty,
  8941   const {
 11294       isSavingPost = _select2.isSavingPost;
  8942     isPublishSidebarEnabled
 11295 
  8943   } = select('core/editor');
 11296   var _select3 = select('core/editor'),
  8944   const postType = getPostType(getEditedPostAttribute('type'));
 11297       isPublishSidebarEnabled = _select3.isPublishSidebarEnabled;
       
 11298 
       
 11299   var postType = getPostType(getEditedPostAttribute('type'));
       
 11300   return {
  8945   return {
 11301     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  8946     hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
 11302     isPostTypeViewable: Object(external_this_lodash_["get"])(postType, ['viewable'], false),
  8947     isPostTypeViewable: Object(external_lodash_["get"])(postType, ['viewable'], false),
 11303     isBeingScheduled: isEditedPostBeingScheduled(),
  8948     isBeingScheduled: isEditedPostBeingScheduled(),
 11304     isDirty: isEditedPostDirty(),
  8949     isDirty: isEditedPostDirty(),
 11305     isPublished: isCurrentPostPublished(),
  8950     isPublished: isCurrentPostPublished(),
 11306     isPublishSidebarEnabled: isPublishSidebarEnabled(),
  8951     isPublishSidebarEnabled: isPublishSidebarEnabled(),
 11307     isSaving: isSavingPost(),
  8952     isSaving: isSavingPost(),
 11308     isScheduled: isCurrentPostScheduled()
  8953     isScheduled: isCurrentPostScheduled()
 11309   };
  8954   };
 11310 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref) {
  8955 }), Object(external_wp_data_["withDispatch"])((dispatch, {
 11311   var isPublishSidebarEnabled = _ref.isPublishSidebarEnabled;
  8956   isPublishSidebarEnabled
 11312 
  8957 }) => {
 11313   var _dispatch = dispatch('core/editor'),
  8958   const {
 11314       disablePublishSidebar = _dispatch.disablePublishSidebar,
  8959     disablePublishSidebar,
 11315       enablePublishSidebar = _dispatch.enablePublishSidebar;
  8960     enablePublishSidebar
 11316 
  8961   } = dispatch('core/editor');
 11317   return {
  8962   return {
 11318     onTogglePublishSidebar: function onTogglePublishSidebar() {
  8963     onTogglePublishSidebar: () => {
 11319       if (isPublishSidebarEnabled) {
  8964       if (isPublishSidebarEnabled) {
 11320         disablePublishSidebar();
  8965         disablePublishSidebar();
 11321       } else {
  8966       } else {
 11322         enablePublishSidebar();
  8967         enablePublishSidebar();
 11323       }
  8968       }
 11324     }
  8969     }
 11325   };
  8970   };
 11326 }), external_this_wp_components_["withFocusReturn"], external_this_wp_components_["withConstrainedTabbing"]])(post_publish_panel_PostPublishPanel));
  8971 }), external_wp_components_["withFocusReturn"], external_wp_components_["withConstrainedTabbing"]])(post_publish_panel_PostPublishPanel));
 11327 
  8972 
 11328 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
  8973 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
 11329 var build_module_icon = __webpack_require__(137);
  8974 var build_module_icon = __webpack_require__("iClF");
 11330 
  8975 
 11331 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cloud.js
  8976 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cloud.js
 11332 
  8977 
 11333 
  8978 
 11334 /**
  8979 /**
 11335  * WordPress dependencies
  8980  * WordPress dependencies
 11336  */
  8981  */
 11337 
  8982 
 11338 var cloud = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
  8983 const cloud = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 11339   xmlns: "http://www.w3.org/2000/svg",
  8984   xmlns: "http://www.w3.org/2000/svg",
 11340   viewBox: "-2 -2 24 24"
  8985   viewBox: "0 0 24 24"
 11341 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
  8986 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 11342   d: "M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z"
  8987   d: "M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"
 11343 }));
  8988 }));
 11344 /* harmony default export */ var library_cloud = (cloud);
  8989 /* harmony default export */ var library_cloud = (cloud);
 11345 
  8990 
 11346 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
  8991 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
 11347 var library_check = __webpack_require__(155);
  8992 var library_check = __webpack_require__("RMJe");
 11348 
  8993 
 11349 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cloud-upload.js
  8994 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cloud-upload.js
 11350 
  8995 
 11351 
  8996 
 11352 /**
  8997 /**
 11353  * WordPress dependencies
  8998  * WordPress dependencies
 11354  */
  8999  */
 11355 
  9000 
 11356 var cloudUpload = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
  9001 const cloudUpload = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 11357   xmlns: "http://www.w3.org/2000/svg",
  9002   xmlns: "http://www.w3.org/2000/svg",
 11358   viewBox: "-2 -2 24 24"
  9003   viewBox: "0 0 24 24"
 11359 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
  9004 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 11360   d: "M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z"
  9005   d: "M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"
 11361 }));
  9006 }));
 11362 /* harmony default export */ var cloud_upload = (cloudUpload);
  9007 /* harmony default export */ var cloud_upload = (cloudUpload);
 11363 
  9008 
 11364 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-switch-to-draft-button/index.js
  9009 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-switch-to-draft-button/index.js
 11365 
  9010 
 11370 
  9015 
 11371 
  9016 
 11372 
  9017 
 11373 
  9018 
 11374 
  9019 
 11375 function PostSwitchToDraftButton(_ref) {
  9020 function PostSwitchToDraftButton({
 11376   var isSaving = _ref.isSaving,
  9021   isSaving,
 11377       isPublished = _ref.isPublished,
  9022   isPublished,
 11378       isScheduled = _ref.isScheduled,
  9023   isScheduled,
 11379       onClick = _ref.onClick;
  9024   onClick
 11380   var isMobileViewport = Object(external_this_wp_compose_["useViewportMatch"])('small', '<');
  9025 }) {
       
  9026   const isMobileViewport = Object(external_wp_compose_["useViewportMatch"])('small', '<');
 11381 
  9027 
 11382   if (!isPublished && !isScheduled) {
  9028   if (!isPublished && !isScheduled) {
 11383     return null;
  9029     return null;
 11384   }
  9030   }
 11385 
  9031 
 11386   var onSwitch = function onSwitch() {
  9032   const onSwitch = () => {
 11387     var alertMessage;
  9033     let alertMessage;
 11388 
  9034 
 11389     if (isPublished) {
  9035     if (isPublished) {
 11390       alertMessage = Object(external_this_wp_i18n_["__"])('Are you sure you want to unpublish this post?');
  9036       alertMessage = Object(external_wp_i18n_["__"])('Are you sure you want to unpublish this post?');
 11391     } else if (isScheduled) {
  9037     } else if (isScheduled) {
 11392       alertMessage = Object(external_this_wp_i18n_["__"])('Are you sure you want to unschedule this post?');
  9038       alertMessage = Object(external_wp_i18n_["__"])('Are you sure you want to unschedule this post?');
 11393     } // eslint-disable-next-line no-alert
  9039     } // eslint-disable-next-line no-alert
 11394 
  9040 
 11395 
  9041 
 11396     if (window.confirm(alertMessage)) {
  9042     if (window.confirm(alertMessage)) {
 11397       onClick();
  9043       onClick();
 11398     }
  9044     }
 11399   };
  9045   };
 11400 
  9046 
 11401   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  9047   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11402     className: "editor-post-switch-to-draft",
  9048     className: "editor-post-switch-to-draft",
 11403     onClick: onSwitch,
  9049     onClick: onSwitch,
 11404     disabled: isSaving,
  9050     disabled: isSaving,
 11405     isTertiary: true
  9051     isTertiary: true
 11406   }, isMobileViewport ? Object(external_this_wp_i18n_["__"])('Draft') : Object(external_this_wp_i18n_["__"])('Switch to draft'));
  9052   }, isMobileViewport ? Object(external_wp_i18n_["__"])('Draft') : Object(external_wp_i18n_["__"])('Switch to draft'));
 11407 }
  9053 }
 11408 
  9054 
 11409 /* harmony default export */ var post_switch_to_draft_button = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  9055 /* harmony default export */ var post_switch_to_draft_button = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 11410   var _select = select('core/editor'),
  9056   const {
 11411       isSavingPost = _select.isSavingPost,
  9057     isSavingPost,
 11412       isCurrentPostPublished = _select.isCurrentPostPublished,
  9058     isCurrentPostPublished,
 11413       isCurrentPostScheduled = _select.isCurrentPostScheduled;
  9059     isCurrentPostScheduled
 11414 
  9060   } = select('core/editor');
 11415   return {
  9061   return {
 11416     isSaving: isSavingPost(),
  9062     isSaving: isSavingPost(),
 11417     isPublished: isCurrentPostPublished(),
  9063     isPublished: isCurrentPostPublished(),
 11418     isScheduled: isCurrentPostScheduled()
  9064     isScheduled: isCurrentPostScheduled()
 11419   };
  9065   };
 11420 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  9066 }), Object(external_wp_data_["withDispatch"])(dispatch => {
 11421   var _dispatch = dispatch('core/editor'),
  9067   const {
 11422       editPost = _dispatch.editPost,
  9068     editPost,
 11423       savePost = _dispatch.savePost;
  9069     savePost
 11424 
  9070   } = dispatch('core/editor');
 11425   return {
  9071   return {
 11426     onClick: function onClick() {
  9072     onClick: () => {
 11427       editPost({
  9073       editPost({
 11428         status: 'draft'
  9074         status: 'draft'
 11429       });
  9075       });
 11430       savePost();
  9076       savePost();
 11431     }
  9077     }
 11433 })])(PostSwitchToDraftButton));
  9079 })])(PostSwitchToDraftButton));
 11434 
  9080 
 11435 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-saved-state/index.js
  9081 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-saved-state/index.js
 11436 
  9082 
 11437 
  9083 
 11438 
       
 11439 
       
 11440 
       
 11441 
       
 11442 
       
 11443 function post_saved_state_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_saved_state_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); }; }
       
 11444 
       
 11445 function post_saved_state_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; } }
       
 11446 
       
 11447 /**
  9084 /**
 11448  * External dependencies
  9085  * External dependencies
 11449  */
  9086  */
 11450 
  9087 
 11451 /**
  9088 /**
 11457 
  9094 
 11458 
  9095 
 11459 
  9096 
 11460 
  9097 
 11461 
  9098 
 11462 
       
 11463 /**
  9099 /**
 11464  * Internal dependencies
  9100  * Internal dependencies
 11465  */
  9101  */
 11466 
  9102 
 11467 
  9103 
 11468 /**
  9104 /**
 11469  * Component showing whether the post is saved or not and displaying save links.
  9105  * Component showing whether the post is saved or not and providing save
 11470  *
  9106  * buttons.
 11471  * @param   {Object}    Props Component Props.
  9107  *
 11472  */
  9108  * @param {Object} props               Component props.
 11473 
  9109  * @param {?boolean} props.forceIsDirty  Whether to force the post to be marked
 11474 var post_saved_state_PostSavedState = /*#__PURE__*/function (_Component) {
  9110  * as dirty.
 11475   Object(inherits["a" /* default */])(PostSavedState, _Component);
  9111  * @param {?boolean} props.forceIsSaving Whether to force the post to be marked
 11476 
  9112  * as being saved.
 11477   var _super = post_saved_state_createSuper(PostSavedState);
  9113  * @param {?boolean} props.showIconLabels Whether interface buttons show labels instead of icons
 11478 
  9114  * @return {import('@wordpress/element').WPComponent} The component.
 11479   function PostSavedState() {
  9115  */
 11480     var _this;
  9116 
 11481 
  9117 function PostSavedState({
 11482     Object(classCallCheck["a" /* default */])(this, PostSavedState);
  9118   forceIsDirty,
 11483 
  9119   forceIsSaving,
 11484     _this = _super.apply(this, arguments);
  9120   showIconLabels = false
 11485     _this.state = {
  9121 }) {
 11486       forceSavedMessage: false
  9122   const [forceSavedMessage, setForceSavedMessage] = Object(external_wp_element_["useState"])(false);
       
  9123   const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('small');
       
  9124   const {
       
  9125     isAutosaving,
       
  9126     isDirty,
       
  9127     isNew,
       
  9128     isPending,
       
  9129     isPublished,
       
  9130     isSaveable,
       
  9131     isSaving,
       
  9132     isScheduled,
       
  9133     hasPublishAction
       
  9134   } = Object(external_wp_data_["useSelect"])(select => {
       
  9135     var _getCurrentPost$_link, _getCurrentPost, _getCurrentPost$_link2;
       
  9136 
       
  9137     const {
       
  9138       isEditedPostNew,
       
  9139       isCurrentPostPublished,
       
  9140       isCurrentPostScheduled,
       
  9141       isEditedPostDirty,
       
  9142       isSavingPost,
       
  9143       isEditedPostSaveable,
       
  9144       getCurrentPost,
       
  9145       isAutosavingPost,
       
  9146       getEditedPostAttribute
       
  9147     } = select('core/editor');
       
  9148     return {
       
  9149       isAutosaving: isAutosavingPost(),
       
  9150       isDirty: forceIsDirty || isEditedPostDirty(),
       
  9151       isNew: isEditedPostNew(),
       
  9152       isPending: 'pending' === getEditedPostAttribute('status'),
       
  9153       isPublished: isCurrentPostPublished(),
       
  9154       isSaving: forceIsSaving || isSavingPost(),
       
  9155       isSaveable: isEditedPostSaveable(),
       
  9156       isScheduled: isCurrentPostScheduled(),
       
  9157       hasPublishAction: (_getCurrentPost$_link = (_getCurrentPost = getCurrentPost()) === null || _getCurrentPost === void 0 ? void 0 : (_getCurrentPost$_link2 = _getCurrentPost._links) === null || _getCurrentPost$_link2 === void 0 ? void 0 : _getCurrentPost$_link2['wp:action-publish']) !== null && _getCurrentPost$_link !== void 0 ? _getCurrentPost$_link : false
 11487     };
  9158     };
 11488     return _this;
  9159   }, [forceIsDirty, forceIsSaving]);
 11489   }
  9160   const {
 11490 
  9161     savePost
 11491   Object(createClass["a" /* default */])(PostSavedState, [{
  9162   } = Object(external_wp_data_["useDispatch"])('core/editor');
 11492     key: "componentDidUpdate",
  9163   const wasSaving = Object(external_wp_compose_["usePrevious"])(isSaving);
 11493     value: function componentDidUpdate(prevProps) {
  9164   Object(external_wp_element_["useEffect"])(() => {
 11494       var _this2 = this;
  9165     let timeoutId;
 11495 
  9166 
 11496       if (prevProps.isSaving && !this.props.isSaving) {
  9167     if (wasSaving && !isSaving) {
 11497         this.setState({
  9168       setForceSavedMessage(true);
 11498           forceSavedMessage: true
  9169       timeoutId = setTimeout(() => {
 11499         });
  9170         setForceSavedMessage(false);
 11500         this.props.setTimeout(function () {
  9171       }, 1000);
 11501           _this2.setState({
       
 11502             forceSavedMessage: false
       
 11503           });
       
 11504         }, 1000);
       
 11505       }
       
 11506     }
  9172     }
 11507   }, {
  9173 
 11508     key: "render",
  9174     return () => clearTimeout(timeoutId);
 11509     value: function render() {
  9175   }, [isSaving]);
 11510       var _this$props = this.props,
  9176 
 11511           hasPublishAction = _this$props.hasPublishAction,
  9177   if (isSaving) {
 11512           isNew = _this$props.isNew,
  9178     // TODO: Classes generation should be common across all return
 11513           isScheduled = _this$props.isScheduled,
  9179     // paths of this function, including proper naming convention for
 11514           isPublished = _this$props.isPublished,
  9180     // the "Save Draft" button.
 11515           isDirty = _this$props.isDirty,
  9181     const classes = classnames_default()('editor-post-saved-state', 'is-saving', Object(external_wp_components_["__unstableGetAnimateClassName"])({
 11516           isSaving = _this$props.isSaving,
  9182       type: 'loading'
 11517           isSaveable = _this$props.isSaveable,
  9183     }), {
 11518           onSave = _this$props.onSave,
  9184       'is-autosaving': isAutosaving
 11519           isAutosaving = _this$props.isAutosaving,
  9185     });
 11520           isPending = _this$props.isPending,
  9186     return Object(external_wp_element_["createElement"])("span", {
 11521           isLargeViewport = _this$props.isLargeViewport;
  9187       className: classes
 11522       var forceSavedMessage = this.state.forceSavedMessage;
  9188     }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 11523 
  9189       icon: library_cloud
 11524       if (isSaving) {
  9190     }), isAutosaving ? Object(external_wp_i18n_["__"])('Autosaving') : Object(external_wp_i18n_["__"])('Saving'));
 11525         // TODO: Classes generation should be common across all return
  9191   }
 11526         // paths of this function, including proper naming convention for
  9192 
 11527         // the "Save Draft" button.
  9193   if (isPublished || isScheduled) {
 11528         var classes = classnames_default()('editor-post-saved-state', 'is-saving', {
  9194     return Object(external_wp_element_["createElement"])(post_switch_to_draft_button, null);
 11529           'is-autosaving': isAutosaving
  9195   }
 11530         });
  9196 
 11531         return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Animate"], {
  9197   if (!isSaveable) {
 11532           type: "loading"
  9198     return null;
 11533         }, function (_ref) {
  9199   }
 11534           var animateClassName = _ref.className;
  9200 
 11535           return Object(external_this_wp_element_["createElement"])("span", {
  9201   if (forceSavedMessage || !isNew && !isDirty) {
 11536             className: classnames_default()(classes, animateClassName)
  9202     return Object(external_wp_element_["createElement"])("span", {
 11537           }, Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
  9203       className: "editor-post-saved-state is-saved"
 11538             icon: library_cloud
  9204     }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
 11539           }), isAutosaving ? Object(external_this_wp_i18n_["__"])('Autosaving') : Object(external_this_wp_i18n_["__"])('Saving'));
  9205       icon: library_check["a" /* default */]
 11540         });
  9206     }), Object(external_wp_i18n_["__"])('Saved'));
 11541       }
  9207   } // Once the post has been submitted for review this button
 11542 
  9208   // is not needed for the contributor role.
 11543       if (isPublished || isScheduled) {
  9209 
 11544         return Object(external_this_wp_element_["createElement"])(post_switch_to_draft_button, null);
  9210 
 11545       }
  9211   if (!hasPublishAction && isPending) {
 11546 
  9212     return null;
 11547       if (!isSaveable) {
  9213   }
 11548         return null;
  9214   /* translators: button label text should, if possible, be under 16 characters. */
 11549       }
  9215 
 11550 
  9216 
 11551       if (forceSavedMessage || !isNew && !isDirty) {
  9217   const label = isPending ? Object(external_wp_i18n_["__"])('Save as pending') : Object(external_wp_i18n_["__"])('Save draft');
 11552         return Object(external_this_wp_element_["createElement"])("span", {
  9218   /* translators: button label text should, if possible, be under 16 characters. */
 11553           className: "editor-post-saved-state is-saved"
  9219 
 11554         }, Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], {
  9220   const shortLabel = Object(external_wp_i18n_["__"])('Save');
 11555           icon: library_check["a" /* default */]
  9221 
 11556         }), Object(external_this_wp_i18n_["__"])('Saved'));
  9222   if (!isLargeViewport) {
 11557       } // Once the post has been submitted for review this button
  9223     return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11558       // is not needed for the contributor role.
  9224       className: "editor-post-save-draft",
 11559 
  9225       label: label,
 11560 
  9226       onClick: () => savePost(),
 11561       if (!hasPublishAction && isPending) {
  9227       shortcut: external_wp_keycodes_["displayShortcut"].primary('s'),
 11562         return null;
  9228       icon: cloud_upload
 11563       }
  9229     }, showIconLabels && shortLabel);
 11564 
  9230   }
 11565       var label = isPending ? Object(external_this_wp_i18n_["__"])('Save as pending') : Object(external_this_wp_i18n_["__"])('Save draft');
  9231 
 11566 
  9232   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 11567       if (!isLargeViewport) {
  9233     className: "editor-post-save-draft",
 11568         return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
  9234     onClick: () => savePost(),
 11569           className: "editor-post-save-draft",
  9235     shortcut: external_wp_keycodes_["displayShortcut"].primary('s'),
 11570           label: label,
  9236     isTertiary: true
 11571           onClick: function onClick() {
  9237   }, label);
 11572             return onSave();
  9238 }
 11573           },
       
 11574           shortcut: external_this_wp_keycodes_["displayShortcut"].primary('s'),
       
 11575           icon: cloud_upload
       
 11576         });
       
 11577       }
       
 11578 
       
 11579       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 11580         className: "editor-post-save-draft",
       
 11581         onClick: function onClick() {
       
 11582           return onSave();
       
 11583         },
       
 11584         shortcut: external_this_wp_keycodes_["displayShortcut"].primary('s'),
       
 11585         isTertiary: true
       
 11586       }, label);
       
 11587     }
       
 11588   }]);
       
 11589 
       
 11590   return PostSavedState;
       
 11591 }(external_this_wp_element_["Component"]);
       
 11592 /* harmony default export */ var post_saved_state = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
       
 11593   var _getCurrentPost$_link, _getCurrentPost, _getCurrentPost$_link2;
       
 11594 
       
 11595   var forceIsDirty = _ref2.forceIsDirty,
       
 11596       forceIsSaving = _ref2.forceIsSaving;
       
 11597 
       
 11598   var _select = select('core/editor'),
       
 11599       isEditedPostNew = _select.isEditedPostNew,
       
 11600       isCurrentPostPublished = _select.isCurrentPostPublished,
       
 11601       isCurrentPostScheduled = _select.isCurrentPostScheduled,
       
 11602       isEditedPostDirty = _select.isEditedPostDirty,
       
 11603       isSavingPost = _select.isSavingPost,
       
 11604       isEditedPostSaveable = _select.isEditedPostSaveable,
       
 11605       getCurrentPost = _select.getCurrentPost,
       
 11606       isAutosavingPost = _select.isAutosavingPost,
       
 11607       getEditedPostAttribute = _select.getEditedPostAttribute;
       
 11608 
       
 11609   return {
       
 11610     hasPublishAction: (_getCurrentPost$_link = (_getCurrentPost = getCurrentPost()) === null || _getCurrentPost === void 0 ? void 0 : (_getCurrentPost$_link2 = _getCurrentPost['_links']) === null || _getCurrentPost$_link2 === void 0 ? void 0 : _getCurrentPost$_link2['wp:action-publish']) !== null && _getCurrentPost$_link !== void 0 ? _getCurrentPost$_link : false,
       
 11611     isNew: isEditedPostNew(),
       
 11612     isPublished: isCurrentPostPublished(),
       
 11613     isScheduled: isCurrentPostScheduled(),
       
 11614     isDirty: forceIsDirty || isEditedPostDirty(),
       
 11615     isSaving: forceIsSaving || isSavingPost(),
       
 11616     isSaveable: isEditedPostSaveable(),
       
 11617     isAutosaving: isAutosavingPost(),
       
 11618     isPending: 'pending' === getEditedPostAttribute('status')
       
 11619   };
       
 11620 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 11621   return {
       
 11622     onSave: dispatch('core/editor').savePost
       
 11623   };
       
 11624 }), external_this_wp_compose_["withSafeTimeout"], Object(external_this_wp_viewport_["withViewportMatch"])({
       
 11625   isLargeViewport: 'small'
       
 11626 })])(post_saved_state_PostSavedState));
       
 11627 
  9239 
 11628 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-schedule/check.js
  9240 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-schedule/check.js
 11629 /**
  9241 /**
 11630  * External dependencies
  9242  * External dependencies
 11631  */
  9243  */
 11634  * WordPress dependencies
  9246  * WordPress dependencies
 11635  */
  9247  */
 11636 
  9248 
 11637 
  9249 
 11638 
  9250 
 11639 function PostScheduleCheck(_ref) {
  9251 function PostScheduleCheck({
 11640   var hasPublishAction = _ref.hasPublishAction,
  9252   hasPublishAction,
 11641       children = _ref.children;
  9253   children
 11642 
  9254 }) {
 11643   if (!hasPublishAction) {
  9255   if (!hasPublishAction) {
 11644     return null;
  9256     return null;
 11645   }
  9257   }
 11646 
  9258 
 11647   return children;
  9259   return children;
 11648 }
  9260 }
 11649 /* harmony default export */ var post_schedule_check = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  9261 /* harmony default export */ var post_schedule_check = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 11650   var _select = select('core/editor'),
  9262   const {
 11651       getCurrentPost = _select.getCurrentPost,
  9263     getCurrentPost,
 11652       getCurrentPostType = _select.getCurrentPostType;
  9264     getCurrentPostType
 11653 
  9265   } = select('core/editor');
 11654   return {
  9266   return {
 11655     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
  9267     hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
 11656     postType: getCurrentPostType()
  9268     postType: getCurrentPostType()
 11657   };
  9269   };
 11658 })])(PostScheduleCheck));
  9270 })])(PostScheduleCheck));
 11659 
  9271 
 11660 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-slug/check.js
  9272 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-slug/check.js
 11662 
  9274 
 11663 /**
  9275 /**
 11664  * Internal dependencies
  9276  * Internal dependencies
 11665  */
  9277  */
 11666 
  9278 
 11667 function PostSlugCheck(_ref) {
  9279 function PostSlugCheck({
 11668   var children = _ref.children;
  9280   children
 11669   return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
  9281 }) {
       
  9282   return Object(external_wp_element_["createElement"])(post_type_support_check, {
 11670     supportKeys: "slug"
  9283     supportKeys: "slug"
 11671   }, children);
  9284   }, children);
 11672 }
  9285 }
 11673 
  9286 
 11674 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-slug/index.js
  9287 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-slug/index.js
 11675 
  9288 
 11676 
  9289 
 11677 
       
 11678 
       
 11679 
       
 11680 
       
 11681 
       
 11682 
       
 11683 function post_slug_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_slug_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); }; }
       
 11684 
       
 11685 function post_slug_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; } }
       
 11686 
       
 11687 /**
  9290 /**
 11688  * WordPress dependencies
  9291  * WordPress dependencies
 11689  */
  9292  */
 11690 
  9293 
 11691 
  9294 
 11696  * Internal dependencies
  9299  * Internal dependencies
 11697  */
  9300  */
 11698 
  9301 
 11699 
  9302 
 11700 
  9303 
 11701 var post_slug_PostSlug = /*#__PURE__*/function (_Component) {
  9304 class post_slug_PostSlug extends external_wp_element_["Component"] {
 11702   Object(inherits["a" /* default */])(PostSlug, _Component);
  9305   constructor({
 11703 
  9306     postSlug,
 11704   var _super = post_slug_createSuper(PostSlug);
  9307     postTitle,
 11705 
  9308     postID
 11706   function PostSlug(_ref) {
  9309   }) {
 11707     var _this;
  9310     super(...arguments);
 11708 
  9311     this.state = {
 11709     var postSlug = _ref.postSlug,
  9312       editedSlug: Object(external_wp_url_["safeDecodeURIComponent"])(postSlug) || cleanForSlug(postTitle) || postID
 11710         postTitle = _ref.postTitle,
       
 11711         postID = _ref.postID;
       
 11712 
       
 11713     Object(classCallCheck["a" /* default */])(this, PostSlug);
       
 11714 
       
 11715     _this = _super.apply(this, arguments);
       
 11716     _this.state = {
       
 11717       editedSlug: Object(external_this_wp_url_["safeDecodeURIComponent"])(postSlug) || cleanForSlug(postTitle) || postID
       
 11718     };
  9313     };
 11719     _this.setSlug = _this.setSlug.bind(Object(assertThisInitialized["a" /* default */])(_this));
  9314     this.setSlug = this.setSlug.bind(this);
 11720     return _this;
  9315   }
 11721   }
  9316 
 11722 
  9317   setSlug(event) {
 11723   Object(createClass["a" /* default */])(PostSlug, [{
  9318     const {
 11724     key: "setSlug",
  9319       postSlug,
 11725     value: function setSlug(event) {
  9320       onUpdateSlug
 11726       var _this$props = this.props,
  9321     } = this.props;
 11727           postSlug = _this$props.postSlug,
  9322     const {
 11728           onUpdateSlug = _this$props.onUpdateSlug;
  9323       value
 11729       var value = event.target.value;
  9324     } = event.target;
 11730       var editedSlug = cleanForSlug(value);
  9325     const editedSlug = cleanForSlug(value);
 11731 
  9326 
 11732       if (editedSlug === postSlug) {
  9327     if (editedSlug === postSlug) {
 11733         return;
  9328       return;
 11734       }
       
 11735 
       
 11736       onUpdateSlug(editedSlug);
       
 11737     }
  9329     }
 11738   }, {
  9330 
 11739     key: "render",
  9331     onUpdateSlug(editedSlug);
 11740     value: function render() {
  9332   }
 11741       var _this2 = this;
  9333 
 11742 
  9334   render() {
 11743       var instanceId = this.props.instanceId;
  9335     const {
 11744       var editedSlug = this.state.editedSlug;
  9336       instanceId
 11745       var inputId = 'editor-post-slug-' + instanceId;
  9337     } = this.props;
 11746       return Object(external_this_wp_element_["createElement"])(PostSlugCheck, null, Object(external_this_wp_element_["createElement"])("label", {
  9338     const {
 11747         htmlFor: inputId
  9339       editedSlug
 11748       }, Object(external_this_wp_i18n_["__"])('Slug')), Object(external_this_wp_element_["createElement"])("input", {
  9340     } = this.state;
 11749         type: "text",
  9341     const inputId = 'editor-post-slug-' + instanceId;
 11750         id: inputId,
  9342     return Object(external_wp_element_["createElement"])(PostSlugCheck, null, Object(external_wp_element_["createElement"])("label", {
 11751         value: editedSlug,
  9343       htmlFor: inputId
 11752         onChange: function onChange(event) {
  9344     }, Object(external_wp_i18n_["__"])('Slug')), Object(external_wp_element_["createElement"])("input", {
 11753           return _this2.setState({
  9345       type: "text",
 11754             editedSlug: event.target.value
  9346       id: inputId,
 11755           });
  9347       value: editedSlug,
 11756         },
  9348       onChange: event => this.setState({
 11757         onBlur: this.setSlug,
  9349         editedSlug: event.target.value
 11758         className: "editor-post-slug__input"
  9350       }),
 11759       }));
  9351       onBlur: this.setSlug,
 11760     }
  9352       className: "editor-post-slug__input"
 11761   }]);
  9353     }));
 11762 
  9354   }
 11763   return PostSlug;
  9355 
 11764 }(external_this_wp_element_["Component"]);
  9356 }
 11765 /* harmony default export */ var post_slug = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  9357 /* harmony default export */ var post_slug = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 11766   var _select = select('core/editor'),
  9358   const {
 11767       getCurrentPost = _select.getCurrentPost,
  9359     getCurrentPost,
 11768       getEditedPostAttribute = _select.getEditedPostAttribute;
  9360     getEditedPostAttribute
 11769 
  9361   } = select('core/editor');
 11770   var _getCurrentPost = getCurrentPost(),
  9362   const {
 11771       id = _getCurrentPost.id;
  9363     id
 11772 
  9364   } = getCurrentPost();
 11773   return {
  9365   return {
 11774     postSlug: getEditedPostAttribute('slug'),
  9366     postSlug: getEditedPostAttribute('slug'),
 11775     postTitle: getEditedPostAttribute('title'),
  9367     postTitle: getEditedPostAttribute('title'),
 11776     postID: id
  9368     postID: id
 11777   };
  9369   };
 11778 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  9370 }), Object(external_wp_data_["withDispatch"])(dispatch => {
 11779   var _dispatch = dispatch('core/editor'),
  9371   const {
 11780       editPost = _dispatch.editPost;
  9372     editPost
 11781 
  9373   } = dispatch('core/editor');
 11782   return {
  9374   return {
 11783     onUpdateSlug: function onUpdateSlug(slug) {
  9375     onUpdateSlug(slug) {
 11784       editPost({
  9376       editPost({
 11785         slug: slug
  9377         slug
 11786       });
  9378       });
 11787     }
  9379     }
       
  9380 
 11788   };
  9381   };
 11789 }), external_this_wp_compose_["withInstanceId"]])(post_slug_PostSlug));
  9382 }), external_wp_compose_["withInstanceId"]])(post_slug_PostSlug));
 11790 
  9383 
 11791 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-sticky/check.js
  9384 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-sticky/check.js
 11792 /**
  9385 /**
 11793  * External dependencies
  9386  * External dependencies
 11794  */
  9387  */
 11797  * WordPress dependencies
  9390  * WordPress dependencies
 11798  */
  9391  */
 11799 
  9392 
 11800 
  9393 
 11801 
  9394 
 11802 function PostStickyCheck(_ref) {
  9395 function PostStickyCheck({
 11803   var hasStickyAction = _ref.hasStickyAction,
  9396   hasStickyAction,
 11804       postType = _ref.postType,
  9397   postType,
 11805       children = _ref.children;
  9398   children
 11806 
  9399 }) {
 11807   if (postType !== 'post' || !hasStickyAction) {
  9400   if (postType !== 'post' || !hasStickyAction) {
 11808     return null;
  9401     return null;
 11809   }
  9402   }
 11810 
  9403 
 11811   return children;
  9404   return children;
 11812 }
  9405 }
 11813 /* harmony default export */ var post_sticky_check = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  9406 /* harmony default export */ var post_sticky_check = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 11814   var post = select('core/editor').getCurrentPost();
  9407   const post = select('core/editor').getCurrentPost();
 11815   return {
  9408   return {
 11816     hasStickyAction: Object(external_this_lodash_["get"])(post, ['_links', 'wp:action-sticky'], false),
  9409     hasStickyAction: Object(external_lodash_["get"])(post, ['_links', 'wp:action-sticky'], false),
 11817     postType: select('core/editor').getCurrentPostType()
  9410     postType: select('core/editor').getCurrentPostType()
 11818   };
  9411   };
 11819 })])(PostStickyCheck));
  9412 })])(PostStickyCheck));
 11820 
  9413 
 11821 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-sticky/index.js
  9414 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-sticky/index.js
 11831 /**
  9424 /**
 11832  * Internal dependencies
  9425  * Internal dependencies
 11833  */
  9426  */
 11834 
  9427 
 11835 
  9428 
 11836 function PostSticky(_ref) {
  9429 function PostSticky({
 11837   var onUpdateSticky = _ref.onUpdateSticky,
  9430   onUpdateSticky,
 11838       _ref$postSticky = _ref.postSticky,
  9431   postSticky = false
 11839       postSticky = _ref$postSticky === void 0 ? false : _ref$postSticky;
  9432 }) {
 11840   return Object(external_this_wp_element_["createElement"])(post_sticky_check, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
  9433   return Object(external_wp_element_["createElement"])(post_sticky_check, null, Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
 11841     label: Object(external_this_wp_i18n_["__"])('Stick to the top of the blog'),
  9434     label: Object(external_wp_i18n_["__"])('Stick to the top of the blog'),
 11842     checked: postSticky,
  9435     checked: postSticky,
 11843     onChange: function onChange() {
  9436     onChange: () => onUpdateSticky(!postSticky)
 11844       return onUpdateSticky(!postSticky);
       
 11845     }
       
 11846   }));
  9437   }));
 11847 }
  9438 }
 11848 /* harmony default export */ var post_sticky = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  9439 /* harmony default export */ var post_sticky = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 11849   return {
  9440   return {
 11850     postSticky: select('core/editor').getEditedPostAttribute('sticky')
  9441     postSticky: select('core/editor').getEditedPostAttribute('sticky')
 11851   };
  9442   };
 11852 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  9443 }), Object(external_wp_data_["withDispatch"])(dispatch => {
 11853   return {
  9444   return {
 11854     onUpdateSticky: function onUpdateSticky(postSticky) {
  9445     onUpdateSticky(postSticky) {
 11855       dispatch('core/editor').editPost({
  9446       dispatch('core/editor').editPost({
 11856         sticky: postSticky
  9447         sticky: postSticky
 11857       });
  9448       });
 11858     }
  9449     }
       
  9450 
 11859   };
  9451   };
 11860 })])(PostSticky));
  9452 })])(PostSticky));
 11861 
  9453 
 11862 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/hierarchical-term-selector.js
  9454 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/hierarchical-term-selector.js
 11863 
  9455 
 11864 
  9456 
 11865 
       
 11866 
       
 11867 
       
 11868 
       
 11869 
       
 11870 
       
 11871 
       
 11872 
       
 11873 function hierarchical_term_selector_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; }
       
 11874 
       
 11875 function hierarchical_term_selector_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { hierarchical_term_selector_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 { hierarchical_term_selector_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 11876 
       
 11877 function hierarchical_term_selector_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hierarchical_term_selector_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); }; }
       
 11878 
       
 11879 function hierarchical_term_selector_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; } }
       
 11880 
       
 11881 /**
  9457 /**
 11882  * External dependencies
  9458  * External dependencies
 11883  */
  9459  */
 11884 
  9460 
 11885 /**
  9461 /**
 11900 
  9476 
 11901 /**
  9477 /**
 11902  * Module Constants
  9478  * Module Constants
 11903  */
  9479  */
 11904 
  9480 
 11905 var hierarchical_term_selector_DEFAULT_QUERY = {
  9481 const hierarchical_term_selector_DEFAULT_QUERY = {
 11906   per_page: -1,
  9482   per_page: -1,
 11907   orderby: 'name',
  9483   orderby: 'name',
 11908   order: 'asc',
  9484   order: 'asc',
 11909   _fields: 'id,name,parent'
  9485   _fields: 'id,name,parent'
 11910 };
  9486 };
 11911 var MIN_TERMS_COUNT_FOR_FILTER = 8;
  9487 const MIN_TERMS_COUNT_FOR_FILTER = 8;
 11912 
  9488 
 11913 var hierarchical_term_selector_HierarchicalTermSelector = /*#__PURE__*/function (_Component) {
  9489 class hierarchical_term_selector_HierarchicalTermSelector extends external_wp_element_["Component"] {
 11914   Object(inherits["a" /* default */])(HierarchicalTermSelector, _Component);
  9490   constructor() {
 11915 
  9491     super(...arguments);
 11916   var _super = hierarchical_term_selector_createSuper(HierarchicalTermSelector);
  9492     this.findTerm = this.findTerm.bind(this);
 11917 
  9493     this.onChange = this.onChange.bind(this);
 11918   function HierarchicalTermSelector() {
  9494     this.onChangeFormName = this.onChangeFormName.bind(this);
 11919     var _this;
  9495     this.onChangeFormParent = this.onChangeFormParent.bind(this);
 11920 
  9496     this.onAddTerm = this.onAddTerm.bind(this);
 11921     Object(classCallCheck["a" /* default */])(this, HierarchicalTermSelector);
  9497     this.onToggleForm = this.onToggleForm.bind(this);
 11922 
  9498     this.setFilterValue = this.setFilterValue.bind(this);
 11923     _this = _super.apply(this, arguments);
  9499     this.sortBySelected = this.sortBySelected.bind(this);
 11924     _this.findTerm = _this.findTerm.bind(Object(assertThisInitialized["a" /* default */])(_this));
  9500     this.state = {
 11925     _this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11926     _this.onChangeFormName = _this.onChangeFormName.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11927     _this.onChangeFormParent = _this.onChangeFormParent.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11928     _this.onAddTerm = _this.onAddTerm.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11929     _this.onToggleForm = _this.onToggleForm.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11930     _this.setFilterValue = _this.setFilterValue.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11931     _this.sortBySelected = _this.sortBySelected.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 11932     _this.state = {
       
 11933       loading: true,
  9501       loading: true,
 11934       availableTermsTree: [],
  9502       availableTermsTree: [],
 11935       availableTerms: [],
  9503       availableTerms: [],
 11936       adding: false,
  9504       adding: false,
 11937       formName: '',
  9505       formName: '',
 11938       formParent: '',
  9506       formParent: '',
 11939       showForm: false,
  9507       showForm: false,
 11940       filterValue: '',
  9508       filterValue: '',
 11941       filteredTermsTree: []
  9509       filteredTermsTree: []
 11942     };
  9510     };
 11943     return _this;
  9511   }
 11944   }
  9512 
 11945 
  9513   onChange(termId) {
 11946   Object(createClass["a" /* default */])(HierarchicalTermSelector, [{
  9514     const {
 11947     key: "onChange",
  9515       onUpdateTerms,
 11948     value: function onChange(termId) {
  9516       terms = [],
 11949       var _this$props = this.props,
  9517       taxonomy
 11950           onUpdateTerms = _this$props.onUpdateTerms,
  9518     } = this.props;
 11951           _this$props$terms = _this$props.terms,
  9519     const hasTerm = terms.indexOf(termId) !== -1;
 11952           terms = _this$props$terms === void 0 ? [] : _this$props$terms,
  9520     const newTerms = hasTerm ? Object(external_lodash_["without"])(terms, termId) : [...terms, termId];
 11953           taxonomy = _this$props.taxonomy;
  9521     onUpdateTerms(newTerms, taxonomy.rest_base);
 11954       var hasTerm = terms.indexOf(termId) !== -1;
  9522   }
 11955       var newTerms = hasTerm ? Object(external_this_lodash_["without"])(terms, termId) : [].concat(Object(toConsumableArray["a" /* default */])(terms), [termId]);
  9523 
 11956       onUpdateTerms(newTerms, taxonomy.rest_base);
  9524   onChangeFormName(event) {
       
  9525     const newValue = event.target.value.trim() === '' ? '' : event.target.value;
       
  9526     this.setState({
       
  9527       formName: newValue
       
  9528     });
       
  9529   }
       
  9530 
       
  9531   onChangeFormParent(newParent) {
       
  9532     this.setState({
       
  9533       formParent: newParent
       
  9534     });
       
  9535   }
       
  9536 
       
  9537   onToggleForm() {
       
  9538     this.setState(state => ({
       
  9539       showForm: !state.showForm
       
  9540     }));
       
  9541   }
       
  9542 
       
  9543   findTerm(terms, parent, name) {
       
  9544     return Object(external_lodash_["find"])(terms, term => {
       
  9545       return (!term.parent && !parent || parseInt(term.parent) === parseInt(parent)) && term.name.toLowerCase() === name.toLowerCase();
       
  9546     });
       
  9547   }
       
  9548 
       
  9549   onAddTerm(event) {
       
  9550     event.preventDefault();
       
  9551     const {
       
  9552       onUpdateTerms,
       
  9553       taxonomy,
       
  9554       terms,
       
  9555       slug
       
  9556     } = this.props;
       
  9557     const {
       
  9558       formName,
       
  9559       formParent,
       
  9560       adding,
       
  9561       availableTerms
       
  9562     } = this.state;
       
  9563 
       
  9564     if (formName === '' || adding) {
       
  9565       return;
       
  9566     } // check if the term we are adding already exists
       
  9567 
       
  9568 
       
  9569     const existingTerm = this.findTerm(availableTerms, formParent, formName);
       
  9570 
       
  9571     if (existingTerm) {
       
  9572       // if the term we are adding exists but is not selected select it
       
  9573       if (!Object(external_lodash_["some"])(terms, term => term === existingTerm.id)) {
       
  9574         onUpdateTerms([...terms, existingTerm.id], taxonomy.rest_base);
       
  9575       }
       
  9576 
       
  9577       this.setState({
       
  9578         formName: '',
       
  9579         formParent: ''
       
  9580       });
       
  9581       return;
 11957     }
  9582     }
 11958   }, {
  9583 
 11959     key: "onChangeFormName",
  9584     this.setState({
 11960     value: function onChangeFormName(event) {
  9585       adding: true
 11961       var newValue = event.target.value.trim() === '' ? '' : event.target.value;
  9586     });
       
  9587     this.addRequest = external_wp_apiFetch_default()({
       
  9588       path: `/wp/v2/${taxonomy.rest_base}`,
       
  9589       method: 'POST',
       
  9590       data: {
       
  9591         name: formName,
       
  9592         parent: formParent ? formParent : undefined
       
  9593       }
       
  9594     }); // Tries to create a term or fetch it if it already exists
       
  9595 
       
  9596     const findOrCreatePromise = this.addRequest.catch(error => {
       
  9597       const errorCode = error.code;
       
  9598 
       
  9599       if (errorCode === 'term_exists') {
       
  9600         // search the new category created since last fetch
       
  9601         this.addRequest = external_wp_apiFetch_default()({
       
  9602           path: Object(external_wp_url_["addQueryArgs"])(`/wp/v2/${taxonomy.rest_base}`, { ...hierarchical_term_selector_DEFAULT_QUERY,
       
  9603             parent: formParent || 0,
       
  9604             search: formName
       
  9605           })
       
  9606         });
       
  9607         return this.addRequest.then(searchResult => {
       
  9608           return this.findTerm(searchResult, formParent, formName);
       
  9609         });
       
  9610       }
       
  9611 
       
  9612       return Promise.reject(error);
       
  9613     });
       
  9614     findOrCreatePromise.then(term => {
       
  9615       const hasTerm = !!Object(external_lodash_["find"])(this.state.availableTerms, availableTerm => availableTerm.id === term.id);
       
  9616       const newAvailableTerms = hasTerm ? this.state.availableTerms : [term, ...this.state.availableTerms];
       
  9617       const termAddedMessage = Object(external_wp_i18n_["sprintf"])(
       
  9618       /* translators: %s: taxonomy name */
       
  9619       Object(external_wp_i18n_["_x"])('%s added', 'term'), Object(external_lodash_["get"])(this.props.taxonomy, ['labels', 'singular_name'], slug === 'category' ? Object(external_wp_i18n_["__"])('Category') : Object(external_wp_i18n_["__"])('Term')));
       
  9620       this.props.speak(termAddedMessage, 'assertive');
       
  9621       this.addRequest = null;
 11962       this.setState({
  9622       this.setState({
 11963         formName: newValue
  9623         adding: false,
       
  9624         formName: '',
       
  9625         formParent: '',
       
  9626         availableTerms: newAvailableTerms,
       
  9627         availableTermsTree: this.sortBySelected(buildTermsTree(newAvailableTerms))
 11964       });
  9628       });
 11965     }
  9629       onUpdateTerms([...terms, term.id], taxonomy.rest_base);
 11966   }, {
  9630     }, xhr => {
 11967     key: "onChangeFormParent",
  9631       if (xhr.statusText === 'abort') {
 11968     value: function onChangeFormParent(newParent) {
       
 11969       this.setState({
       
 11970         formParent: newParent
       
 11971       });
       
 11972     }
       
 11973   }, {
       
 11974     key: "onToggleForm",
       
 11975     value: function onToggleForm() {
       
 11976       this.setState(function (state) {
       
 11977         return {
       
 11978           showForm: !state.showForm
       
 11979         };
       
 11980       });
       
 11981     }
       
 11982   }, {
       
 11983     key: "findTerm",
       
 11984     value: function findTerm(terms, parent, name) {
       
 11985       return Object(external_this_lodash_["find"])(terms, function (term) {
       
 11986         return (!term.parent && !parent || parseInt(term.parent) === parseInt(parent)) && term.name.toLowerCase() === name.toLowerCase();
       
 11987       });
       
 11988     }
       
 11989   }, {
       
 11990     key: "onAddTerm",
       
 11991     value: function onAddTerm(event) {
       
 11992       var _this2 = this;
       
 11993 
       
 11994       event.preventDefault();
       
 11995       var _this$props2 = this.props,
       
 11996           onUpdateTerms = _this$props2.onUpdateTerms,
       
 11997           taxonomy = _this$props2.taxonomy,
       
 11998           terms = _this$props2.terms,
       
 11999           slug = _this$props2.slug;
       
 12000       var _this$state = this.state,
       
 12001           formName = _this$state.formName,
       
 12002           formParent = _this$state.formParent,
       
 12003           adding = _this$state.adding,
       
 12004           availableTerms = _this$state.availableTerms;
       
 12005 
       
 12006       if (formName === '' || adding) {
       
 12007         return;
       
 12008       } // check if the term we are adding already exists
       
 12009 
       
 12010 
       
 12011       var existingTerm = this.findTerm(availableTerms, formParent, formName);
       
 12012 
       
 12013       if (existingTerm) {
       
 12014         // if the term we are adding exists but is not selected select it
       
 12015         if (!Object(external_this_lodash_["some"])(terms, function (term) {
       
 12016           return term === existingTerm.id;
       
 12017         })) {
       
 12018           onUpdateTerms([].concat(Object(toConsumableArray["a" /* default */])(terms), [existingTerm.id]), taxonomy.rest_base);
       
 12019         }
       
 12020 
       
 12021         this.setState({
       
 12022           formName: '',
       
 12023           formParent: ''
       
 12024         });
       
 12025         return;
  9632         return;
 12026       }
  9633       }
 12027 
  9634 
       
  9635       this.addRequest = null;
 12028       this.setState({
  9636       this.setState({
 12029         adding: true
  9637         adding: false
 12030       });
  9638       });
 12031       this.addRequest = external_this_wp_apiFetch_default()({
  9639     });
 12032         path: "/wp/v2/".concat(taxonomy.rest_base),
  9640   }
 12033         method: 'POST',
  9641 
 12034         data: {
  9642   componentDidMount() {
 12035           name: formName,
  9643     this.fetchTerms();
 12036           parent: formParent ? formParent : undefined
  9644   }
 12037         }
  9645 
 12038       }); // Tries to create a term or fetch it if it already exists
  9646   componentWillUnmount() {
 12039 
  9647     Object(external_lodash_["invoke"])(this.fetchRequest, ['abort']);
 12040       var findOrCreatePromise = this.addRequest.catch(function (error) {
  9648     Object(external_lodash_["invoke"])(this.addRequest, ['abort']);
 12041         var errorCode = error.code;
  9649   }
 12042 
  9650 
 12043         if (errorCode === 'term_exists') {
  9651   componentDidUpdate(prevProps) {
 12044           // search the new category created since last fetch
  9652     if (this.props.taxonomy !== prevProps.taxonomy) {
 12045           _this2.addRequest = external_this_wp_apiFetch_default()({
       
 12046             path: Object(external_this_wp_url_["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), hierarchical_term_selector_objectSpread({}, hierarchical_term_selector_DEFAULT_QUERY, {
       
 12047               parent: formParent || 0,
       
 12048               search: formName
       
 12049             }))
       
 12050           });
       
 12051           return _this2.addRequest.then(function (searchResult) {
       
 12052             return _this2.findTerm(searchResult, formParent, formName);
       
 12053           });
       
 12054         }
       
 12055 
       
 12056         return Promise.reject(error);
       
 12057       });
       
 12058       findOrCreatePromise.then(function (term) {
       
 12059         var hasTerm = !!Object(external_this_lodash_["find"])(_this2.state.availableTerms, function (availableTerm) {
       
 12060           return availableTerm.id === term.id;
       
 12061         });
       
 12062         var newAvailableTerms = hasTerm ? _this2.state.availableTerms : [term].concat(Object(toConsumableArray["a" /* default */])(_this2.state.availableTerms));
       
 12063         var termAddedMessage = Object(external_this_wp_i18n_["sprintf"])(
       
 12064         /* translators: %s: taxonomy name */
       
 12065         Object(external_this_wp_i18n_["_x"])('%s added', 'term'), Object(external_this_lodash_["get"])(_this2.props.taxonomy, ['labels', 'singular_name'], slug === 'category' ? Object(external_this_wp_i18n_["__"])('Category') : Object(external_this_wp_i18n_["__"])('Term')));
       
 12066 
       
 12067         _this2.props.speak(termAddedMessage, 'assertive');
       
 12068 
       
 12069         _this2.addRequest = null;
       
 12070 
       
 12071         _this2.setState({
       
 12072           adding: false,
       
 12073           formName: '',
       
 12074           formParent: '',
       
 12075           availableTerms: newAvailableTerms,
       
 12076           availableTermsTree: _this2.sortBySelected(buildTermsTree(newAvailableTerms))
       
 12077         });
       
 12078 
       
 12079         onUpdateTerms([].concat(Object(toConsumableArray["a" /* default */])(terms), [term.id]), taxonomy.rest_base);
       
 12080       }, function (xhr) {
       
 12081         if (xhr.statusText === 'abort') {
       
 12082           return;
       
 12083         }
       
 12084 
       
 12085         _this2.addRequest = null;
       
 12086 
       
 12087         _this2.setState({
       
 12088           adding: false
       
 12089         });
       
 12090       });
       
 12091     }
       
 12092   }, {
       
 12093     key: "componentDidMount",
       
 12094     value: function componentDidMount() {
       
 12095       this.fetchTerms();
  9653       this.fetchTerms();
 12096     }
  9654     }
 12097   }, {
  9655   }
 12098     key: "componentWillUnmount",
  9656 
 12099     value: function componentWillUnmount() {
  9657   fetchTerms() {
 12100       Object(external_this_lodash_["invoke"])(this.fetchRequest, ['abort']);
  9658     const {
 12101       Object(external_this_lodash_["invoke"])(this.addRequest, ['abort']);
  9659       taxonomy
       
  9660     } = this.props;
       
  9661 
       
  9662     if (!taxonomy) {
       
  9663       return;
 12102     }
  9664     }
 12103   }, {
  9665 
 12104     key: "componentDidUpdate",
  9666     this.fetchRequest = external_wp_apiFetch_default()({
 12105     value: function componentDidUpdate(prevProps) {
  9667       path: Object(external_wp_url_["addQueryArgs"])(`/wp/v2/${taxonomy.rest_base}`, hierarchical_term_selector_DEFAULT_QUERY)
 12106       if (this.props.taxonomy !== prevProps.taxonomy) {
  9668     });
 12107         this.fetchTerms();
  9669     this.fetchRequest.then(terms => {
 12108       }
  9670       // resolve
 12109     }
  9671       const availableTermsTree = this.sortBySelected(buildTermsTree(terms));
 12110   }, {
  9672       this.fetchRequest = null;
 12111     key: "fetchTerms",
  9673       this.setState({
 12112     value: function fetchTerms() {
  9674         loading: false,
 12113       var _this3 = this;
  9675         availableTermsTree,
 12114 
  9676         availableTerms: terms
 12115       var taxonomy = this.props.taxonomy;
  9677       });
 12116 
  9678     }, xhr => {
 12117       if (!taxonomy) {
  9679       // reject
       
  9680       if (xhr.statusText === 'abort') {
 12118         return;
  9681         return;
 12119       }
  9682       }
 12120 
  9683 
 12121       this.fetchRequest = external_this_wp_apiFetch_default()({
  9684       this.fetchRequest = null;
 12122         path: Object(external_this_wp_url_["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), hierarchical_term_selector_DEFAULT_QUERY)
  9685       this.setState({
       
  9686         loading: false
 12123       });
  9687       });
 12124       this.fetchRequest.then(function (terms) {
  9688     });
 12125         // resolve
  9689   }
 12126         var availableTermsTree = _this3.sortBySelected(buildTermsTree(terms));
  9690 
 12127 
  9691   sortBySelected(termsTree) {
 12128         _this3.fetchRequest = null;
  9692     const {
 12129 
  9693       terms
 12130         _this3.setState({
  9694     } = this.props;
 12131           loading: false,
  9695 
 12132           availableTermsTree: availableTermsTree,
  9696     const treeHasSelection = termTree => {
 12133           availableTerms: terms
  9697       if (terms.indexOf(termTree.id) !== -1) {
 12134         });
  9698         return true;
 12135       }, function (xhr) {
  9699       }
 12136         // reject
  9700 
 12137         if (xhr.statusText === 'abort') {
  9701       if (undefined === termTree.children) {
 12138           return;
  9702         return false;
       
  9703       }
       
  9704 
       
  9705       const anyChildIsSelected = termTree.children.map(treeHasSelection).filter(child => child).length > 0;
       
  9706 
       
  9707       if (anyChildIsSelected) {
       
  9708         return true;
       
  9709       }
       
  9710 
       
  9711       return false;
       
  9712     };
       
  9713 
       
  9714     const termOrChildIsSelected = (termA, termB) => {
       
  9715       const termASelected = treeHasSelection(termA);
       
  9716       const termBSelected = treeHasSelection(termB);
       
  9717 
       
  9718       if (termASelected === termBSelected) {
       
  9719         return 0;
       
  9720       }
       
  9721 
       
  9722       if (termASelected && !termBSelected) {
       
  9723         return -1;
       
  9724       }
       
  9725 
       
  9726       if (!termASelected && termBSelected) {
       
  9727         return 1;
       
  9728       }
       
  9729 
       
  9730       return 0;
       
  9731     };
       
  9732 
       
  9733     termsTree.sort(termOrChildIsSelected);
       
  9734     return termsTree;
       
  9735   }
       
  9736 
       
  9737   setFilterValue(event) {
       
  9738     const {
       
  9739       availableTermsTree
       
  9740     } = this.state;
       
  9741     const filterValue = event.target.value;
       
  9742     const filteredTermsTree = availableTermsTree.map(this.getFilterMatcher(filterValue)).filter(term => term);
       
  9743 
       
  9744     const getResultCount = terms => {
       
  9745       let count = 0;
       
  9746 
       
  9747       for (let i = 0; i < terms.length; i++) {
       
  9748         count++;
       
  9749 
       
  9750         if (undefined !== terms[i].children) {
       
  9751           count += getResultCount(terms[i].children);
 12139         }
  9752         }
 12140 
  9753       }
 12141         _this3.fetchRequest = null;
  9754 
 12142 
  9755       return count;
 12143         _this3.setState({
  9756     };
 12144           loading: false
  9757 
 12145         });
  9758     this.setState({
 12146       });
  9759       filterValue,
       
  9760       filteredTermsTree
       
  9761     });
       
  9762     const resultCount = getResultCount(filteredTermsTree);
       
  9763     const resultsFoundMessage = Object(external_wp_i18n_["sprintf"])(
       
  9764     /* translators: %d: number of results */
       
  9765     Object(external_wp_i18n_["_n"])('%d result found.', '%d results found.', resultCount), resultCount);
       
  9766     this.props.debouncedSpeak(resultsFoundMessage, 'assertive');
       
  9767   }
       
  9768 
       
  9769   getFilterMatcher(filterValue) {
       
  9770     const matchTermsForFilter = originalTerm => {
       
  9771       if ('' === filterValue) {
       
  9772         return originalTerm;
       
  9773       } // Shallow clone, because we'll be filtering the term's children and
       
  9774       // don't want to modify the original term.
       
  9775 
       
  9776 
       
  9777       const term = { ...originalTerm
       
  9778       }; // Map and filter the children, recursive so we deal with grandchildren
       
  9779       // and any deeper levels.
       
  9780 
       
  9781       if (term.children.length > 0) {
       
  9782         term.children = term.children.map(matchTermsForFilter).filter(child => child);
       
  9783       } // If the term's name contains the filterValue, or it has children
       
  9784       // (i.e. some child matched at some point in the tree) then return it.
       
  9785 
       
  9786 
       
  9787       if (-1 !== term.name.toLowerCase().indexOf(filterValue.toLowerCase()) || term.children.length > 0) {
       
  9788         return term;
       
  9789       } // Otherwise, return false. After mapping, the list of terms will need
       
  9790       // to have false values filtered out.
       
  9791 
       
  9792 
       
  9793       return false;
       
  9794     };
       
  9795 
       
  9796     return matchTermsForFilter;
       
  9797   }
       
  9798 
       
  9799   renderTerms(renderedTerms) {
       
  9800     const {
       
  9801       terms = []
       
  9802     } = this.props;
       
  9803     return renderedTerms.map(term => {
       
  9804       return Object(external_wp_element_["createElement"])("div", {
       
  9805         key: term.id,
       
  9806         className: "editor-post-taxonomies__hierarchical-terms-choice"
       
  9807       }, Object(external_wp_element_["createElement"])(external_wp_components_["CheckboxControl"], {
       
  9808         checked: terms.indexOf(term.id) !== -1,
       
  9809         onChange: () => {
       
  9810           const termId = parseInt(term.id, 10);
       
  9811           this.onChange(termId);
       
  9812         },
       
  9813         label: Object(external_lodash_["unescape"])(term.name)
       
  9814       }), !!term.children.length && Object(external_wp_element_["createElement"])("div", {
       
  9815         className: "editor-post-taxonomies__hierarchical-terms-subchoices"
       
  9816       }, this.renderTerms(term.children)));
       
  9817     });
       
  9818   }
       
  9819 
       
  9820   render() {
       
  9821     const {
       
  9822       slug,
       
  9823       taxonomy,
       
  9824       instanceId,
       
  9825       hasCreateAction,
       
  9826       hasAssignAction
       
  9827     } = this.props;
       
  9828 
       
  9829     if (!hasAssignAction) {
       
  9830       return null;
 12147     }
  9831     }
 12148   }, {
  9832 
 12149     key: "sortBySelected",
  9833     const {
 12150     value: function sortBySelected(termsTree) {
  9834       availableTermsTree,
 12151       var terms = this.props.terms;
  9835       availableTerms,
 12152 
  9836       filteredTermsTree,
 12153       var treeHasSelection = function treeHasSelection(termTree) {
  9837       formName,
 12154         if (terms.indexOf(termTree.id) !== -1) {
  9838       formParent,
 12155           return true;
  9839       loading,
 12156         }
  9840       showForm,
 12157 
  9841       filterValue
 12158         if (undefined === termTree.children) {
  9842     } = this.state;
 12159           return false;
  9843 
 12160         }
  9844     const labelWithFallback = (labelProperty, fallbackIsCategory, fallbackIsNotCategory) => Object(external_lodash_["get"])(taxonomy, ['labels', labelProperty], slug === 'category' ? fallbackIsCategory : fallbackIsNotCategory);
 12161 
  9845 
 12162         var anyChildIsSelected = termTree.children.map(treeHasSelection).filter(function (child) {
  9846     const newTermButtonLabel = labelWithFallback('add_new_item', Object(external_wp_i18n_["__"])('Add new category'), Object(external_wp_i18n_["__"])('Add new term'));
 12163           return child;
  9847     const newTermLabel = labelWithFallback('new_item_name', Object(external_wp_i18n_["__"])('Add new category'), Object(external_wp_i18n_["__"])('Add new term'));
 12164         }).length > 0;
  9848     const parentSelectLabel = labelWithFallback('parent_item', Object(external_wp_i18n_["__"])('Parent Category'), Object(external_wp_i18n_["__"])('Parent Term'));
 12165 
  9849     const noParentOption = `— ${parentSelectLabel} —`;
 12166         if (anyChildIsSelected) {
  9850     const newTermSubmitLabel = newTermButtonLabel;
 12167           return true;
  9851     const inputId = `editor-post-taxonomies__hierarchical-terms-input-${instanceId}`;
 12168         }
  9852     const filterInputId = `editor-post-taxonomies__hierarchical-terms-filter-${instanceId}`;
 12169 
  9853     const filterLabel = Object(external_lodash_["get"])(this.props.taxonomy, ['labels', 'search_items'], Object(external_wp_i18n_["__"])('Search Terms'));
 12170         return false;
  9854     const groupLabel = Object(external_lodash_["get"])(this.props.taxonomy, ['name'], Object(external_wp_i18n_["__"])('Terms'));
 12171       };
  9855     const showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER;
 12172 
  9856     return [showFilter && Object(external_wp_element_["createElement"])("label", {
 12173       var termOrChildIsSelected = function termOrChildIsSelected(termA, termB) {
  9857       key: "filter-label",
 12174         var termASelected = treeHasSelection(termA);
  9858       htmlFor: filterInputId
 12175         var termBSelected = treeHasSelection(termB);
  9859     }, filterLabel), showFilter && Object(external_wp_element_["createElement"])("input", {
 12176 
  9860       type: "search",
 12177         if (termASelected === termBSelected) {
  9861       id: filterInputId,
 12178           return 0;
  9862       value: filterValue,
 12179         }
  9863       onChange: this.setFilterValue,
 12180 
  9864       className: "editor-post-taxonomies__hierarchical-terms-filter",
 12181         if (termASelected && !termBSelected) {
  9865       key: "term-filter-input"
 12182           return -1;
  9866     }), Object(external_wp_element_["createElement"])("div", {
 12183         }
  9867       className: "editor-post-taxonomies__hierarchical-terms-list",
 12184 
  9868       key: "term-list",
 12185         if (!termASelected && termBSelected) {
  9869       tabIndex: "0",
 12186           return 1;
  9870       role: "group",
 12187         }
  9871       "aria-label": groupLabel
 12188 
  9872     }, this.renderTerms('' !== filterValue ? filteredTermsTree : availableTermsTree)), !loading && hasCreateAction && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 12189         return 0;
  9873       key: "term-add-button",
 12190       };
  9874       onClick: this.onToggleForm,
 12191 
  9875       className: "editor-post-taxonomies__hierarchical-terms-add",
 12192       termsTree.sort(termOrChildIsSelected);
  9876       "aria-expanded": showForm,
 12193       return termsTree;
  9877       isLink: true
 12194     }
  9878     }, newTermButtonLabel), showForm && Object(external_wp_element_["createElement"])("form", {
 12195   }, {
  9879       onSubmit: this.onAddTerm,
 12196     key: "setFilterValue",
  9880       key: "hierarchical-terms-form"
 12197     value: function setFilterValue(event) {
  9881     }, Object(external_wp_element_["createElement"])("label", {
 12198       var availableTermsTree = this.state.availableTermsTree;
  9882       htmlFor: inputId,
 12199       var filterValue = event.target.value;
  9883       className: "editor-post-taxonomies__hierarchical-terms-label"
 12200       var filteredTermsTree = availableTermsTree.map(this.getFilterMatcher(filterValue)).filter(function (term) {
  9884     }, newTermLabel), Object(external_wp_element_["createElement"])("input", {
 12201         return term;
  9885       type: "text",
 12202       });
  9886       id: inputId,
 12203 
  9887       className: "editor-post-taxonomies__hierarchical-terms-input",
 12204       var getResultCount = function getResultCount(terms) {
  9888       value: formName,
 12205         var count = 0;
  9889       onChange: this.onChangeFormName,
 12206 
  9890       required: true
 12207         for (var i = 0; i < terms.length; i++) {
  9891     }), !!availableTerms.length && Object(external_wp_element_["createElement"])(external_wp_components_["TreeSelect"], {
 12208           count++;
  9892       label: parentSelectLabel,
 12209 
  9893       noOptionLabel: noParentOption,
 12210           if (undefined !== terms[i].children) {
  9894       onChange: this.onChangeFormParent,
 12211             count += getResultCount(terms[i].children);
  9895       selectedId: formParent,
 12212           }
  9896       tree: availableTermsTree
 12213         }
  9897     }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 12214 
  9898       isSecondary: true,
 12215         return count;
  9899       type: "submit",
 12216       };
  9900       className: "editor-post-taxonomies__hierarchical-terms-submit"
 12217 
  9901     }, newTermSubmitLabel))];
 12218       this.setState({
  9902   }
 12219         filterValue: filterValue,
  9903 
 12220         filteredTermsTree: filteredTermsTree
  9904 }
 12221       });
  9905 
 12222       var resultCount = getResultCount(filteredTermsTree);
  9906 /* harmony default export */ var hierarchical_term_selector = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, {
 12223       var resultsFoundMessage = Object(external_this_wp_i18n_["sprintf"])(
  9907   slug
 12224       /* translators: %d: number of results */
  9908 }) => {
 12225       Object(external_this_wp_i18n_["_n"])('%d result found.', '%d results found.', resultCount), resultCount);
  9909   const {
 12226       this.props.debouncedSpeak(resultsFoundMessage, 'assertive');
  9910     getCurrentPost
 12227     }
  9911   } = select('core/editor');
 12228   }, {
  9912   const {
 12229     key: "getFilterMatcher",
  9913     getTaxonomy
 12230     value: function getFilterMatcher(filterValue) {
  9914   } = select('core');
 12231       var matchTermsForFilter = function matchTermsForFilter(originalTerm) {
  9915   const taxonomy = getTaxonomy(slug);
 12232         if ('' === filterValue) {
       
 12233           return originalTerm;
       
 12234         } // Shallow clone, because we'll be filtering the term's children and
       
 12235         // don't want to modify the original term.
       
 12236 
       
 12237 
       
 12238         var term = hierarchical_term_selector_objectSpread({}, originalTerm); // Map and filter the children, recursive so we deal with grandchildren
       
 12239         // and any deeper levels.
       
 12240 
       
 12241 
       
 12242         if (term.children.length > 0) {
       
 12243           term.children = term.children.map(matchTermsForFilter).filter(function (child) {
       
 12244             return child;
       
 12245           });
       
 12246         } // If the term's name contains the filterValue, or it has children
       
 12247         // (i.e. some child matched at some point in the tree) then return it.
       
 12248 
       
 12249 
       
 12250         if (-1 !== term.name.toLowerCase().indexOf(filterValue.toLowerCase()) || term.children.length > 0) {
       
 12251           return term;
       
 12252         } // Otherwise, return false. After mapping, the list of terms will need
       
 12253         // to have false values filtered out.
       
 12254 
       
 12255 
       
 12256         return false;
       
 12257       };
       
 12258 
       
 12259       return matchTermsForFilter;
       
 12260     }
       
 12261   }, {
       
 12262     key: "renderTerms",
       
 12263     value: function renderTerms(renderedTerms) {
       
 12264       var _this4 = this;
       
 12265 
       
 12266       var _this$props$terms2 = this.props.terms,
       
 12267           terms = _this$props$terms2 === void 0 ? [] : _this$props$terms2;
       
 12268       return renderedTerms.map(function (term) {
       
 12269         return Object(external_this_wp_element_["createElement"])("div", {
       
 12270           key: term.id,
       
 12271           className: "editor-post-taxonomies__hierarchical-terms-choice"
       
 12272         }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
       
 12273           checked: terms.indexOf(term.id) !== -1,
       
 12274           onChange: function onChange() {
       
 12275             var termId = parseInt(term.id, 10);
       
 12276 
       
 12277             _this4.onChange(termId);
       
 12278           },
       
 12279           label: Object(external_this_lodash_["unescape"])(term.name)
       
 12280         }), !!term.children.length && Object(external_this_wp_element_["createElement"])("div", {
       
 12281           className: "editor-post-taxonomies__hierarchical-terms-subchoices"
       
 12282         }, _this4.renderTerms(term.children)));
       
 12283       });
       
 12284     }
       
 12285   }, {
       
 12286     key: "render",
       
 12287     value: function render() {
       
 12288       var _this$props3 = this.props,
       
 12289           slug = _this$props3.slug,
       
 12290           taxonomy = _this$props3.taxonomy,
       
 12291           instanceId = _this$props3.instanceId,
       
 12292           hasCreateAction = _this$props3.hasCreateAction,
       
 12293           hasAssignAction = _this$props3.hasAssignAction;
       
 12294 
       
 12295       if (!hasAssignAction) {
       
 12296         return null;
       
 12297       }
       
 12298 
       
 12299       var _this$state2 = this.state,
       
 12300           availableTermsTree = _this$state2.availableTermsTree,
       
 12301           availableTerms = _this$state2.availableTerms,
       
 12302           filteredTermsTree = _this$state2.filteredTermsTree,
       
 12303           formName = _this$state2.formName,
       
 12304           formParent = _this$state2.formParent,
       
 12305           loading = _this$state2.loading,
       
 12306           showForm = _this$state2.showForm,
       
 12307           filterValue = _this$state2.filterValue;
       
 12308 
       
 12309       var labelWithFallback = function labelWithFallback(labelProperty, fallbackIsCategory, fallbackIsNotCategory) {
       
 12310         return Object(external_this_lodash_["get"])(taxonomy, ['labels', labelProperty], slug === 'category' ? fallbackIsCategory : fallbackIsNotCategory);
       
 12311       };
       
 12312 
       
 12313       var newTermButtonLabel = labelWithFallback('add_new_item', Object(external_this_wp_i18n_["__"])('Add new category'), Object(external_this_wp_i18n_["__"])('Add new term'));
       
 12314       var newTermLabel = labelWithFallback('new_item_name', Object(external_this_wp_i18n_["__"])('Add new category'), Object(external_this_wp_i18n_["__"])('Add new term'));
       
 12315       var parentSelectLabel = labelWithFallback('parent_item', Object(external_this_wp_i18n_["__"])('Parent Category'), Object(external_this_wp_i18n_["__"])('Parent Term'));
       
 12316       var noParentOption = "\u2014 ".concat(parentSelectLabel, " \u2014");
       
 12317       var newTermSubmitLabel = newTermButtonLabel;
       
 12318       var inputId = "editor-post-taxonomies__hierarchical-terms-input-".concat(instanceId);
       
 12319       var filterInputId = "editor-post-taxonomies__hierarchical-terms-filter-".concat(instanceId);
       
 12320       var filterLabel = Object(external_this_lodash_["get"])(this.props.taxonomy, ['labels', 'search_items'], Object(external_this_wp_i18n_["__"])('Search Terms'));
       
 12321       var groupLabel = Object(external_this_lodash_["get"])(this.props.taxonomy, ['name'], Object(external_this_wp_i18n_["__"])('Terms'));
       
 12322       var showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER;
       
 12323       return [showFilter && Object(external_this_wp_element_["createElement"])("label", {
       
 12324         key: "filter-label",
       
 12325         htmlFor: filterInputId
       
 12326       }, filterLabel), showFilter && Object(external_this_wp_element_["createElement"])("input", {
       
 12327         type: "search",
       
 12328         id: filterInputId,
       
 12329         value: filterValue,
       
 12330         onChange: this.setFilterValue,
       
 12331         className: "editor-post-taxonomies__hierarchical-terms-filter",
       
 12332         key: "term-filter-input"
       
 12333       }), Object(external_this_wp_element_["createElement"])("div", {
       
 12334         className: "editor-post-taxonomies__hierarchical-terms-list",
       
 12335         key: "term-list",
       
 12336         tabIndex: "0",
       
 12337         role: "group",
       
 12338         "aria-label": groupLabel
       
 12339       }, this.renderTerms('' !== filterValue ? filteredTermsTree : availableTermsTree)), !loading && hasCreateAction && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 12340         key: "term-add-button",
       
 12341         onClick: this.onToggleForm,
       
 12342         className: "editor-post-taxonomies__hierarchical-terms-add",
       
 12343         "aria-expanded": showForm,
       
 12344         isLink: true
       
 12345       }, newTermButtonLabel), showForm && Object(external_this_wp_element_["createElement"])("form", {
       
 12346         onSubmit: this.onAddTerm,
       
 12347         key: "hierarchical-terms-form"
       
 12348       }, Object(external_this_wp_element_["createElement"])("label", {
       
 12349         htmlFor: inputId,
       
 12350         className: "editor-post-taxonomies__hierarchical-terms-label"
       
 12351       }, newTermLabel), Object(external_this_wp_element_["createElement"])("input", {
       
 12352         type: "text",
       
 12353         id: inputId,
       
 12354         className: "editor-post-taxonomies__hierarchical-terms-input",
       
 12355         value: formName,
       
 12356         onChange: this.onChangeFormName,
       
 12357         required: true
       
 12358       }), !!availableTerms.length && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TreeSelect"], {
       
 12359         label: parentSelectLabel,
       
 12360         noOptionLabel: noParentOption,
       
 12361         onChange: this.onChangeFormParent,
       
 12362         selectedId: formParent,
       
 12363         tree: availableTermsTree
       
 12364       }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 12365         isSecondary: true,
       
 12366         type: "submit",
       
 12367         className: "editor-post-taxonomies__hierarchical-terms-submit"
       
 12368       }, newTermSubmitLabel))];
       
 12369     }
       
 12370   }]);
       
 12371 
       
 12372   return HierarchicalTermSelector;
       
 12373 }(external_this_wp_element_["Component"]);
       
 12374 
       
 12375 /* harmony default export */ var hierarchical_term_selector = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
       
 12376   var slug = _ref.slug;
       
 12377 
       
 12378   var _select = select('core/editor'),
       
 12379       getCurrentPost = _select.getCurrentPost;
       
 12380 
       
 12381   var _select2 = select('core'),
       
 12382       getTaxonomy = _select2.getTaxonomy;
       
 12383 
       
 12384   var taxonomy = getTaxonomy(slug);
       
 12385   return {
  9916   return {
 12386     hasCreateAction: taxonomy ? Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-create-' + taxonomy.rest_base], false) : false,
  9917     hasCreateAction: taxonomy ? Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-create-' + taxonomy.rest_base], false) : false,
 12387     hasAssignAction: taxonomy ? Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-assign-' + taxonomy.rest_base], false) : false,
  9918     hasAssignAction: taxonomy ? Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-assign-' + taxonomy.rest_base], false) : false,
 12388     terms: taxonomy ? select('core/editor').getEditedPostAttribute(taxonomy.rest_base) : [],
  9919     terms: taxonomy ? select('core/editor').getEditedPostAttribute(taxonomy.rest_base) : [],
 12389     taxonomy: taxonomy
  9920     taxonomy
 12390   };
  9921   };
 12391 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
  9922 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
 12392   return {
  9923   onUpdateTerms(terms, restBase) {
 12393     onUpdateTerms: function onUpdateTerms(terms, restBase) {
  9924     dispatch('core/editor').editPost({
 12394       dispatch('core/editor').editPost(Object(defineProperty["a" /* default */])({}, restBase, terms));
  9925       [restBase]: terms
 12395     }
  9926     });
 12396   };
  9927   }
 12397 }), external_this_wp_components_["withSpokenMessages"], external_this_wp_compose_["withInstanceId"], Object(external_this_wp_components_["withFilters"])('editor.PostTaxonomyType')])(hierarchical_term_selector_HierarchicalTermSelector));
  9928 
       
  9929 })), external_wp_components_["withSpokenMessages"], external_wp_compose_["withInstanceId"], Object(external_wp_components_["withFilters"])('editor.PostTaxonomyType')])(hierarchical_term_selector_HierarchicalTermSelector));
 12398 
  9930 
 12399 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js
  9931 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js
 12400 
  9932 
 12401 
  9933 
 12402 /**
  9934 /**
 12414  * Internal dependencies
  9946  * Internal dependencies
 12415  */
  9947  */
 12416 
  9948 
 12417 
  9949 
 12418 
  9950 
 12419 function PostTaxonomies(_ref) {
  9951 function PostTaxonomies({
 12420   var postType = _ref.postType,
  9952   postType,
 12421       taxonomies = _ref.taxonomies,
  9953   taxonomies,
 12422       _ref$taxonomyWrapper = _ref.taxonomyWrapper,
  9954   taxonomyWrapper = external_lodash_["identity"]
 12423       taxonomyWrapper = _ref$taxonomyWrapper === void 0 ? external_this_lodash_["identity"] : _ref$taxonomyWrapper;
  9955 }) {
 12424   var availableTaxonomies = Object(external_this_lodash_["filter"])(taxonomies, function (taxonomy) {
  9956   const availableTaxonomies = Object(external_lodash_["filter"])(taxonomies, taxonomy => Object(external_lodash_["includes"])(taxonomy.types, postType));
 12425     return Object(external_this_lodash_["includes"])(taxonomy.types, postType);
  9957   const visibleTaxonomies = Object(external_lodash_["filter"])(availableTaxonomies, taxonomy => taxonomy.visibility.show_ui);
 12426   });
  9958   return visibleTaxonomies.map(taxonomy => {
 12427   var visibleTaxonomies = Object(external_this_lodash_["filter"])(availableTaxonomies, function (taxonomy) {
  9959     const TaxonomyComponent = taxonomy.hierarchical ? hierarchical_term_selector : flat_term_selector;
 12428     return taxonomy.visibility.show_ui;
  9960     return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], {
 12429   });
  9961       key: `taxonomy-${taxonomy.slug}`
 12430   return visibleTaxonomies.map(function (taxonomy) {
  9962     }, taxonomyWrapper(Object(external_wp_element_["createElement"])(TaxonomyComponent, {
 12431     var TaxonomyComponent = taxonomy.hierarchical ? hierarchical_term_selector : flat_term_selector;
       
 12432     return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], {
       
 12433       key: "taxonomy-".concat(taxonomy.slug)
       
 12434     }, taxonomyWrapper(Object(external_this_wp_element_["createElement"])(TaxonomyComponent, {
       
 12435       slug: taxonomy.slug
  9963       slug: taxonomy.slug
 12436     }), taxonomy));
  9964     }), taxonomy));
 12437   });
  9965   });
 12438 }
  9966 }
 12439 /* harmony default export */ var post_taxonomies = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
  9967 /* harmony default export */ var post_taxonomies = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 12440   return {
  9968   return {
 12441     postType: select('core/editor').getCurrentPostType(),
  9969     postType: select('core/editor').getCurrentPostType(),
 12442     taxonomies: select('core').getTaxonomies({
  9970     taxonomies: select('core').getTaxonomies({
 12443       per_page: -1
  9971       per_page: -1
 12444     })
  9972     })
 12454  * WordPress dependencies
  9982  * WordPress dependencies
 12455  */
  9983  */
 12456 
  9984 
 12457 
  9985 
 12458 
  9986 
 12459 function PostTaxonomiesCheck(_ref) {
  9987 function PostTaxonomiesCheck({
 12460   var postType = _ref.postType,
  9988   postType,
 12461       taxonomies = _ref.taxonomies,
  9989   taxonomies,
 12462       children = _ref.children;
  9990   children
 12463   var hasTaxonomies = Object(external_this_lodash_["some"])(taxonomies, function (taxonomy) {
  9991 }) {
 12464     return Object(external_this_lodash_["includes"])(taxonomy.types, postType);
  9992   const hasTaxonomies = Object(external_lodash_["some"])(taxonomies, taxonomy => Object(external_lodash_["includes"])(taxonomy.types, postType));
 12465   });
       
 12466 
  9993 
 12467   if (!hasTaxonomies) {
  9994   if (!hasTaxonomies) {
 12468     return null;
  9995     return null;
 12469   }
  9996   }
 12470 
  9997 
 12471   return children;
  9998   return children;
 12472 }
  9999 }
 12473 /* harmony default export */ var post_taxonomies_check = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
 10000 /* harmony default export */ var post_taxonomies_check = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 12474   return {
 10001   return {
 12475     postType: select('core/editor').getCurrentPostType(),
 10002     postType: select('core/editor').getCurrentPostType(),
 12476     taxonomies: select('core').getTaxonomies({
 10003     taxonomies: select('core').getTaxonomies({
 12477       per_page: -1
 10004       per_page: -1
 12478     })
 10005     })
 12479   };
 10006   };
 12480 })])(PostTaxonomiesCheck));
 10007 })])(PostTaxonomiesCheck));
 12481 
 10008 
 12482 // EXTERNAL MODULE: ./node_modules/react-autosize-textarea/lib/index.js
 10009 // EXTERNAL MODULE: ./node_modules/react-autosize-textarea/lib/index.js
 12483 var lib = __webpack_require__(97);
 10010 var lib = __webpack_require__("O6Fj");
 12484 var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
 10011 var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
 12485 
 10012 
 12486 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-text-editor/index.js
 10013 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-text-editor/index.js
 12487 
 10014 
 12488 
 10015 
 12489 
       
 12490 
       
 12491 
       
 12492 
       
 12493 
       
 12494 
       
 12495 function post_text_editor_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_text_editor_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); }; }
       
 12496 
       
 12497 function post_text_editor_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; } }
       
 12498 
       
 12499 /**
 10016 /**
 12500  * External dependencies
 10017  * External dependencies
 12501  */
 10018  */
 12502 
 10019 
 12503 /**
 10020 /**
 12508 
 10025 
 12509 
 10026 
 12510 
 10027 
 12511 
 10028 
 12512 
 10029 
 12513 var post_text_editor_PostTextEditor = /*#__PURE__*/function (_Component) {
 10030 function PostTextEditor() {
 12514   Object(inherits["a" /* default */])(PostTextEditor, _Component);
 10031   const postContent = Object(external_wp_data_["useSelect"])(select => select('core/editor').getEditedPostContent(), []);
 12515 
 10032   const {
 12516   var _super = post_text_editor_createSuper(PostTextEditor);
 10033     editPost,
 12517 
 10034     resetEditorBlocks
 12518   function PostTextEditor() {
 10035   } = Object(external_wp_data_["useDispatch"])('core/editor');
 12519     var _this;
 10036   const [value, setValue] = Object(external_wp_element_["useState"])(postContent);
 12520 
 10037   const [isDirty, setIsDirty] = Object(external_wp_element_["useState"])(false);
 12521     Object(classCallCheck["a" /* default */])(this, PostTextEditor);
 10038   const instanceId = Object(external_wp_compose_["useInstanceId"])(PostTextEditor);
 12522 
 10039 
 12523     _this = _super.apply(this, arguments);
 10040   if (!isDirty && value !== postContent) {
 12524     _this.edit = _this.edit.bind(Object(assertThisInitialized["a" /* default */])(_this));
 10041     setValue(postContent);
 12525     _this.stopEditing = _this.stopEditing.bind(Object(assertThisInitialized["a" /* default */])(_this));
 10042   }
 12526     _this.state = {};
 10043   /**
 12527     return _this;
 10044    * Handles a textarea change event to notify the onChange prop callback and
 12528   }
 10045    * reflect the new value in the component's own state. This marks the start
 12529 
 10046    * of the user's edits, if not already changed, preventing future props
 12530   Object(createClass["a" /* default */])(PostTextEditor, [{
 10047    * changes to value from replacing the rendered value. This is expected to
 12531     key: "edit",
 10048    * be followed by a reset to dirty state via `stopEditing`.
 12532 
 10049    *
 12533     /**
 10050    * @see stopEditing
 12534      * Handles a textarea change event to notify the onChange prop callback and
 10051    *
 12535      * reflect the new value in the component's own state. This marks the start
 10052    * @param {Event} event Change event.
 12536      * of the user's edits, if not already changed, preventing future props
 10053    */
 12537      * changes to value from replacing the rendered value. This is expected to
 10054 
 12538      * be followed by a reset to dirty state via `stopEditing`.
 10055 
 12539      *
 10056   const onChange = event => {
 12540      * @see stopEditing
 10057     const newValue = event.target.value;
 12541      *
 10058     editPost({
 12542      * @param {Event} event Change event.
 10059       content: newValue
 12543      */
 10060     });
 12544     value: function edit(event) {
 10061     setValue(newValue);
 12545       var value = event.target.value;
 10062     setIsDirty(true);
 12546       this.props.onChange(value);
 10063   };
 12547       this.setState({
 10064   /**
 12548         value: value,
 10065    * Function called when the user has completed their edits, responsible for
 12549         isDirty: true
 10066    * ensuring that changes, if made, are surfaced to the onPersist prop
 12550       });
 10067    * callback and resetting dirty state.
       
 10068    */
       
 10069 
       
 10070 
       
 10071   const stopEditing = () => {
       
 10072     if (isDirty) {
       
 10073       const blocks = Object(external_wp_blocks_["parse"])(value);
       
 10074       resetEditorBlocks(blocks);
       
 10075       setIsDirty(false);
 12551     }
 10076     }
 12552     /**
 10077   };
 12553      * Function called when the user has completed their edits, responsible for
 10078 
 12554      * ensuring that changes, if made, are surfaced to the onPersist prop
 10079   return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
 12555      * callback and resetting dirty state.
 10080     as: "label",
 12556      */
 10081     htmlFor: `post-content-${instanceId}`
 12557 
 10082   }, Object(external_wp_i18n_["__"])('Type text or HTML')), Object(external_wp_element_["createElement"])(lib_default.a, {
 12558   }, {
 10083     autoComplete: "off",
 12559     key: "stopEditing",
 10084     dir: "auto",
 12560     value: function stopEditing() {
 10085     value: value,
 12561       if (this.state.isDirty) {
 10086     onChange: onChange,
 12562         this.props.onPersist(this.state.value);
 10087     onBlur: stopEditing,
 12563         this.setState({
 10088     className: "editor-post-text-editor",
 12564           isDirty: false
 10089     id: `post-content-${instanceId}`,
 12565         });
 10090     placeholder: Object(external_wp_i18n_["__"])('Start writing with text or HTML')
       
 10091   }));
       
 10092 }
       
 10093 
       
 10094 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/index.js
       
 10095 
       
 10096 
       
 10097 /**
       
 10098  * External dependencies
       
 10099  */
       
 10100 
       
 10101 
       
 10102 /**
       
 10103  * WordPress dependencies
       
 10104  */
       
 10105 
       
 10106 
       
 10107 
       
 10108 
       
 10109 
       
 10110 
       
 10111 
       
 10112 
       
 10113 
       
 10114 
       
 10115 /**
       
 10116  * Internal dependencies
       
 10117  */
       
 10118 
       
 10119 
       
 10120 /**
       
 10121  * Constants
       
 10122  */
       
 10123 
       
 10124 const REGEXP_NEWLINES = /[\r\n]+/g;
       
 10125 function PostTitle() {
       
 10126   const instanceId = Object(external_wp_compose_["useInstanceId"])(PostTitle);
       
 10127   const ref = Object(external_wp_element_["useRef"])();
       
 10128   const [isSelected, setIsSelected] = Object(external_wp_element_["useState"])(false);
       
 10129   const {
       
 10130     editPost
       
 10131   } = Object(external_wp_data_["useDispatch"])('core/editor');
       
 10132   const {
       
 10133     insertDefaultBlock,
       
 10134     clearSelectedBlock,
       
 10135     insertBlocks
       
 10136   } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
       
 10137   const {
       
 10138     isCleanNewPost,
       
 10139     title,
       
 10140     placeholder,
       
 10141     isFocusMode,
       
 10142     hasFixedToolbar
       
 10143   } = Object(external_wp_data_["useSelect"])(select => {
       
 10144     const {
       
 10145       getEditedPostAttribute,
       
 10146       isCleanNewPost: _isCleanNewPost
       
 10147     } = select('core/editor');
       
 10148     const {
       
 10149       getSettings
       
 10150     } = select(external_wp_blockEditor_["store"]);
       
 10151     const {
       
 10152       titlePlaceholder,
       
 10153       focusMode,
       
 10154       hasFixedToolbar: _hasFixedToolbar
       
 10155     } = getSettings();
       
 10156     return {
       
 10157       isCleanNewPost: _isCleanNewPost(),
       
 10158       title: getEditedPostAttribute('title'),
       
 10159       placeholder: titlePlaceholder,
       
 10160       isFocusMode: focusMode,
       
 10161       hasFixedToolbar: _hasFixedToolbar
       
 10162     };
       
 10163   });
       
 10164   Object(external_wp_element_["useEffect"])(() => {
       
 10165     if (!ref.current) {
       
 10166       return;
       
 10167     }
       
 10168 
       
 10169     const {
       
 10170       ownerDocument
       
 10171     } = ref.current;
       
 10172     const {
       
 10173       activeElement,
       
 10174       body
       
 10175     } = ownerDocument; // Only autofocus the title when the post is entirely empty. This should
       
 10176     // only happen for a new post, which means we focus the title on new
       
 10177     // post so the author can start typing right away, without needing to
       
 10178     // click anything.
       
 10179 
       
 10180     if (isCleanNewPost && (!activeElement || body === activeElement)) {
       
 10181       ref.current.focus();
       
 10182     }
       
 10183   }, [isCleanNewPost]);
       
 10184 
       
 10185   function onEnterPress() {
       
 10186     insertDefaultBlock(undefined, undefined, 0);
       
 10187   }
       
 10188 
       
 10189   function onInsertBlockAfter(blocks) {
       
 10190     insertBlocks(blocks, 0);
       
 10191   }
       
 10192 
       
 10193   function onUpdate(newTitle) {
       
 10194     editPost({
       
 10195       title: newTitle
       
 10196     });
       
 10197   }
       
 10198 
       
 10199   function onSelect() {
       
 10200     setIsSelected(true);
       
 10201     clearSelectedBlock();
       
 10202   }
       
 10203 
       
 10204   function onUnselect() {
       
 10205     setIsSelected(false);
       
 10206   }
       
 10207 
       
 10208   function onChange(event) {
       
 10209     onUpdate(event.target.value.replace(REGEXP_NEWLINES, ' '));
       
 10210   }
       
 10211 
       
 10212   function onKeyDown(event) {
       
 10213     if (event.keyCode === external_wp_keycodes_["ENTER"]) {
       
 10214       event.preventDefault();
       
 10215       onEnterPress();
       
 10216     }
       
 10217   }
       
 10218 
       
 10219   function onPaste(event) {
       
 10220     const clipboardData = event.clipboardData;
       
 10221     let plainText = '';
       
 10222     let html = ''; // IE11 only supports `Text` as an argument for `getData` and will
       
 10223     // otherwise throw an invalid argument error, so we try the standard
       
 10224     // arguments first, then fallback to `Text` if they fail.
       
 10225 
       
 10226     try {
       
 10227       plainText = clipboardData.getData('text/plain');
       
 10228       html = clipboardData.getData('text/html');
       
 10229     } catch (error1) {
       
 10230       try {
       
 10231         html = clipboardData.getData('Text');
       
 10232       } catch (error2) {
       
 10233         // Some browsers like UC Browser paste plain text by default and
       
 10234         // don't support clipboardData at all, so allow default
       
 10235         // behaviour.
       
 10236         return;
       
 10237       }
       
 10238     } // Allows us to ask for this information when we get a report.
       
 10239 
       
 10240 
       
 10241     window.console.log('Received HTML:\n\n', html);
       
 10242     window.console.log('Received plain text:\n\n', plainText);
       
 10243     const content = Object(external_wp_blocks_["pasteHandler"])({
       
 10244       HTML: html,
       
 10245       plainText
       
 10246     });
       
 10247 
       
 10248     if (typeof content !== 'string' && content.length) {
       
 10249       event.preventDefault();
       
 10250       const [firstBlock] = content;
       
 10251 
       
 10252       if (!title && (firstBlock.name === 'core/heading' || firstBlock.name === 'core/paragraph')) {
       
 10253         onUpdate(firstBlock.attributes.content);
       
 10254         onInsertBlockAfter(content.slice(1));
       
 10255       } else {
       
 10256         onInsertBlockAfter(content);
 12566       }
 10257       }
 12567     }
 10258     }
 12568   }, {
 10259   } // The wp-block className is important for editor styles.
 12569     key: "render",
 10260   // This same block is used in both the visual and the code editor.
 12570     value: function render() {
 10261 
 12571       var value = this.state.value;
 10262 
 12572       var instanceId = this.props.instanceId;
 10263   const className = classnames_default()('wp-block editor-post-title editor-post-title__block', {
 12573       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
 10264     'is-selected': isSelected,
 12574         as: "label",
 10265     'is-focus-mode': isFocusMode,
 12575         htmlFor: "post-content-".concat(instanceId)
 10266     'has-fixed-toolbar': hasFixedToolbar
 12576       }, Object(external_this_wp_i18n_["__"])('Type text or HTML')), Object(external_this_wp_element_["createElement"])(lib_default.a, {
 10267   });
 12577         autoComplete: "off",
 10268   const decodedPlaceholder = Object(external_wp_htmlEntities_["decodeEntities"])(placeholder);
 12578         dir: "auto",
 10269   return Object(external_wp_element_["createElement"])(post_type_support_check, {
 12579         value: value,
 10270     supportKeys: "title"
 12580         onChange: this.edit,
 10271   }, Object(external_wp_element_["createElement"])("div", {
 12581         onBlur: this.stopEditing,
 10272     className: className
 12582         className: "editor-post-text-editor",
 10273   }, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
 12583         id: "post-content-".concat(instanceId),
 10274     as: "label",
 12584         placeholder: Object(external_this_wp_i18n_["__"])('Start writing with text or HTML')
 10275     htmlFor: `post-title-${instanceId}`
 12585       }));
 10276   }, decodedPlaceholder || Object(external_wp_i18n_["__"])('Add title')), Object(external_wp_element_["createElement"])(lib_default.a, {
 12586     }
 10277     ref: ref,
 12587   }], [{
 10278     id: `post-title-${instanceId}`,
 12588     key: "getDerivedStateFromProps",
 10279     className: "editor-post-title__input",
 12589     value: function getDerivedStateFromProps(props, state) {
 10280     value: title,
 12590       if (state.isDirty) {
 10281     onChange: onChange,
 12591         return null;
 10282     placeholder: decodedPlaceholder || Object(external_wp_i18n_["__"])('Add title'),
 12592       }
 10283     onFocus: onSelect,
 12593 
 10284     onBlur: onUnselect,
 12594       return {
 10285     onKeyDown: onKeyDown,
 12595         value: props.value,
 10286     onKeyPress: onUnselect,
 12596         isDirty: false
 10287     onPaste: onPaste
 12597       };
 10288   })));
 12598     }
 10289 }
 12599   }]);
 10290 
 12600 
 10291 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/index.js
 12601   return PostTextEditor;
       
 12602 }(external_this_wp_element_["Component"]);
       
 12603 /* harmony default export */ var post_text_editor = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
 12604   var _select = select('core/editor'),
       
 12605       getEditedPostContent = _select.getEditedPostContent;
       
 12606 
       
 12607   return {
       
 12608     value: getEditedPostContent()
       
 12609   };
       
 12610 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 12611   var _dispatch = dispatch('core/editor'),
       
 12612       editPost = _dispatch.editPost,
       
 12613       resetEditorBlocks = _dispatch.resetEditorBlocks;
       
 12614 
       
 12615   return {
       
 12616     onChange: function onChange(content) {
       
 12617       editPost({
       
 12618         content: content
       
 12619       });
       
 12620     },
       
 12621     onPersist: function onPersist(content) {
       
 12622       var blocks = Object(external_this_wp_blocks_["parse"])(content);
       
 12623       resetEditorBlocks(blocks);
       
 12624     }
       
 12625   };
       
 12626 }), external_this_wp_compose_["withInstanceId"]])(post_text_editor_PostTextEditor));
       
 12627 
       
 12628 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/index.js
       
 12629 
       
 12630 
       
 12631 
       
 12632 
       
 12633 
       
 12634 
       
 12635 
       
 12636 
       
 12637 
       
 12638 function post_title_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (post_title_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); }; }
       
 12639 
       
 12640 function post_title_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; } }
       
 12641 
       
 12642 /**
       
 12643  * External dependencies
       
 12644  */
       
 12645 
 10292 
 12646 
 10293 
 12647 /**
 10294 /**
 12648  * WordPress dependencies
 10295  * WordPress dependencies
 12649  */
 10296  */
 12650 
 10297 
 12651 
 10298 
 12652 
 10299 
 12653 
 10300 
 12654 
 10301 
 12655 
 10302 function PostTrash({
 12656 
 10303   isNew,
 12657 
 10304   postId,
 12658 
 10305   postType,
 12659 /**
 10306   ...props
 12660  * Internal dependencies
 10307 }) {
 12661  */
       
 12662 
       
 12663 
       
 12664 /**
       
 12665  * Constants
       
 12666  */
       
 12667 
       
 12668 var REGEXP_NEWLINES = /[\r\n]+/g;
       
 12669 
       
 12670 var post_title_PostTitle = /*#__PURE__*/function (_Component) {
       
 12671   Object(inherits["a" /* default */])(PostTitle, _Component);
       
 12672 
       
 12673   var _super = post_title_createSuper(PostTitle);
       
 12674 
       
 12675   function PostTitle() {
       
 12676     var _this;
       
 12677 
       
 12678     Object(classCallCheck["a" /* default */])(this, PostTitle);
       
 12679 
       
 12680     _this = _super.apply(this, arguments);
       
 12681     _this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 12682     _this.onSelect = _this.onSelect.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 12683     _this.onUnselect = _this.onUnselect.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 12684     _this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 12685     _this.onPaste = _this.onPaste.bind(Object(assertThisInitialized["a" /* default */])(_this));
       
 12686     _this.state = {
       
 12687       isSelected: false
       
 12688     };
       
 12689     return _this;
       
 12690   }
       
 12691 
       
 12692   Object(createClass["a" /* default */])(PostTitle, [{
       
 12693     key: "onSelect",
       
 12694     value: function onSelect() {
       
 12695       this.setState({
       
 12696         isSelected: true
       
 12697       });
       
 12698       this.props.clearSelectedBlock();
       
 12699     }
       
 12700   }, {
       
 12701     key: "onUnselect",
       
 12702     value: function onUnselect() {
       
 12703       this.setState({
       
 12704         isSelected: false
       
 12705       });
       
 12706     }
       
 12707   }, {
       
 12708     key: "onChange",
       
 12709     value: function onChange(event) {
       
 12710       var newTitle = event.target.value.replace(REGEXP_NEWLINES, ' ');
       
 12711       this.props.onUpdate(newTitle);
       
 12712     }
       
 12713   }, {
       
 12714     key: "onKeyDown",
       
 12715     value: function onKeyDown(event) {
       
 12716       if (event.keyCode === external_this_wp_keycodes_["ENTER"]) {
       
 12717         event.preventDefault();
       
 12718         this.props.onEnterPress();
       
 12719       }
       
 12720     }
       
 12721   }, {
       
 12722     key: "onPaste",
       
 12723     value: function onPaste(event) {
       
 12724       var _this$props = this.props,
       
 12725           title = _this$props.title,
       
 12726           onInsertBlockAfter = _this$props.onInsertBlockAfter,
       
 12727           onUpdate = _this$props.onUpdate;
       
 12728       var clipboardData = event.clipboardData;
       
 12729       var plainText = '';
       
 12730       var html = ''; // IE11 only supports `Text` as an argument for `getData` and will
       
 12731       // otherwise throw an invalid argument error, so we try the standard
       
 12732       // arguments first, then fallback to `Text` if they fail.
       
 12733 
       
 12734       try {
       
 12735         plainText = clipboardData.getData('text/plain');
       
 12736         html = clipboardData.getData('text/html');
       
 12737       } catch (error1) {
       
 12738         try {
       
 12739           html = clipboardData.getData('Text');
       
 12740         } catch (error2) {
       
 12741           // Some browsers like UC Browser paste plain text by default and
       
 12742           // don't support clipboardData at all, so allow default
       
 12743           // behaviour.
       
 12744           return;
       
 12745         }
       
 12746       } // Allows us to ask for this information when we get a report.
       
 12747 
       
 12748 
       
 12749       window.console.log('Received HTML:\n\n', html);
       
 12750       window.console.log('Received plain text:\n\n', plainText);
       
 12751       var content = Object(external_this_wp_blocks_["pasteHandler"])({
       
 12752         HTML: html,
       
 12753         plainText: plainText
       
 12754       });
       
 12755 
       
 12756       if (typeof content !== 'string' && content.length) {
       
 12757         event.preventDefault();
       
 12758 
       
 12759         var _content = Object(slicedToArray["a" /* default */])(content, 1),
       
 12760             firstBlock = _content[0];
       
 12761 
       
 12762         if (!title && (firstBlock.name === 'core/heading' || firstBlock.name === 'core/paragraph')) {
       
 12763           onUpdate(firstBlock.attributes.content);
       
 12764           onInsertBlockAfter(content.slice(1));
       
 12765         } else {
       
 12766           onInsertBlockAfter(content);
       
 12767         }
       
 12768       }
       
 12769     }
       
 12770   }, {
       
 12771     key: "render",
       
 12772     value: function render() {
       
 12773       var _this$props2 = this.props,
       
 12774           hasFixedToolbar = _this$props2.hasFixedToolbar,
       
 12775           isCleanNewPost = _this$props2.isCleanNewPost,
       
 12776           isFocusMode = _this$props2.isFocusMode,
       
 12777           instanceId = _this$props2.instanceId,
       
 12778           placeholder = _this$props2.placeholder,
       
 12779           title = _this$props2.title;
       
 12780       var isSelected = this.state.isSelected; // The wp-block className is important for editor styles.
       
 12781       // This same block is used in both the visual and the code editor.
       
 12782 
       
 12783       var className = classnames_default()('wp-block editor-post-title editor-post-title__block', {
       
 12784         'is-selected': isSelected,
       
 12785         'is-focus-mode': isFocusMode,
       
 12786         'has-fixed-toolbar': hasFixedToolbar
       
 12787       });
       
 12788       var decodedPlaceholder = Object(external_this_wp_htmlEntities_["decodeEntities"])(placeholder);
       
 12789       return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
       
 12790         supportKeys: "title"
       
 12791       }, Object(external_this_wp_element_["createElement"])("div", {
       
 12792         className: className
       
 12793       }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["VisuallyHidden"], {
       
 12794         as: "label",
       
 12795         htmlFor: "post-title-".concat(instanceId)
       
 12796       }, decodedPlaceholder || Object(external_this_wp_i18n_["__"])('Add title')), Object(external_this_wp_element_["createElement"])(lib_default.a, {
       
 12797         id: "post-title-".concat(instanceId),
       
 12798         className: "editor-post-title__input",
       
 12799         value: title,
       
 12800         onChange: this.onChange,
       
 12801         placeholder: decodedPlaceholder || Object(external_this_wp_i18n_["__"])('Add title'),
       
 12802         onFocus: this.onSelect,
       
 12803         onBlur: this.onUnselect,
       
 12804         onKeyDown: this.onKeyDown,
       
 12805         onKeyPress: this.onUnselect,
       
 12806         onPaste: this.onPaste
       
 12807         /*
       
 12808         	Only autofocus the title when the post is entirely empty.
       
 12809         	This should only happen for a new post, which means we
       
 12810         	focus the title on new post so the author can start typing
       
 12811         	right away, without needing to click anything.
       
 12812         */
       
 12813 
       
 12814         /* eslint-disable jsx-a11y/no-autofocus */
       
 12815         ,
       
 12816         autoFocus: (document.body === document.activeElement || !document.activeElement) && isCleanNewPost
       
 12817         /* eslint-enable jsx-a11y/no-autofocus */
       
 12818 
       
 12819       })));
       
 12820     }
       
 12821   }]);
       
 12822 
       
 12823   return PostTitle;
       
 12824 }(external_this_wp_element_["Component"]);
       
 12825 
       
 12826 var post_title_applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (select) {
       
 12827   var _select = select('core/editor'),
       
 12828       getEditedPostAttribute = _select.getEditedPostAttribute,
       
 12829       isCleanNewPost = _select.isCleanNewPost;
       
 12830 
       
 12831   var _select2 = select('core/block-editor'),
       
 12832       getSettings = _select2.getSettings;
       
 12833 
       
 12834   var _getSettings = getSettings(),
       
 12835       titlePlaceholder = _getSettings.titlePlaceholder,
       
 12836       focusMode = _getSettings.focusMode,
       
 12837       hasFixedToolbar = _getSettings.hasFixedToolbar;
       
 12838 
       
 12839   return {
       
 12840     isCleanNewPost: isCleanNewPost(),
       
 12841     title: getEditedPostAttribute('title'),
       
 12842     placeholder: titlePlaceholder,
       
 12843     isFocusMode: focusMode,
       
 12844     hasFixedToolbar: hasFixedToolbar
       
 12845   };
       
 12846 });
       
 12847 var post_title_applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 12848   var _dispatch = dispatch('core/block-editor'),
       
 12849       insertDefaultBlock = _dispatch.insertDefaultBlock,
       
 12850       clearSelectedBlock = _dispatch.clearSelectedBlock,
       
 12851       insertBlocks = _dispatch.insertBlocks;
       
 12852 
       
 12853   var _dispatch2 = dispatch('core/editor'),
       
 12854       editPost = _dispatch2.editPost;
       
 12855 
       
 12856   return {
       
 12857     onEnterPress: function onEnterPress() {
       
 12858       insertDefaultBlock(undefined, undefined, 0);
       
 12859     },
       
 12860     onInsertBlockAfter: function onInsertBlockAfter(blocks) {
       
 12861       insertBlocks(blocks, 0);
       
 12862     },
       
 12863     onUpdate: function onUpdate(title) {
       
 12864       editPost({
       
 12865         title: title
       
 12866       });
       
 12867     },
       
 12868     clearSelectedBlock: clearSelectedBlock
       
 12869   };
       
 12870 });
       
 12871 /* harmony default export */ var post_title = (Object(external_this_wp_compose_["compose"])(post_title_applyWithSelect, post_title_applyWithDispatch, external_this_wp_compose_["withInstanceId"])(post_title_PostTitle));
       
 12872 
       
 12873 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/index.js
       
 12874 
       
 12875 
       
 12876 
       
 12877 /**
       
 12878  * WordPress dependencies
       
 12879  */
       
 12880 
       
 12881 
       
 12882 
       
 12883 
       
 12884 
       
 12885 function PostTrash(_ref) {
       
 12886   var isNew = _ref.isNew,
       
 12887       postId = _ref.postId,
       
 12888       postType = _ref.postType,
       
 12889       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isNew", "postId", "postType"]);
       
 12890 
       
 12891   if (isNew || !postId) {
 10308   if (isNew || !postId) {
 12892     return null;
 10309     return null;
 12893   }
 10310   }
 12894 
 10311 
 12895   var onClick = function onClick() {
 10312   const onClick = () => props.trashPost(postId, postType);
 12896     return props.trashPost(postId, postType);
 10313 
 12897   };
 10314   return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 12898 
       
 12899   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
       
 12900     className: "editor-post-trash",
 10315     className: "editor-post-trash",
 12901     isDestructive: true,
 10316     isDestructive: true,
 12902     isTertiary: true,
 10317     isTertiary: true,
 12903     onClick: onClick
 10318     onClick: onClick
 12904   }, Object(external_this_wp_i18n_["__"])('Move to trash'));
 10319   }, Object(external_wp_i18n_["__"])('Move to trash'));
 12905 }
 10320 }
 12906 
 10321 
 12907 /* harmony default export */ var post_trash = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
 10322 /* harmony default export */ var post_trash = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 12908   var _select = select('core/editor'),
 10323   const {
 12909       isEditedPostNew = _select.isEditedPostNew,
 10324     isEditedPostNew,
 12910       getCurrentPostId = _select.getCurrentPostId,
 10325     getCurrentPostId,
 12911       getCurrentPostType = _select.getCurrentPostType;
 10326     getCurrentPostType
 12912 
 10327   } = select('core/editor');
 12913   return {
 10328   return {
 12914     isNew: isEditedPostNew(),
 10329     isNew: isEditedPostNew(),
 12915     postId: getCurrentPostId(),
 10330     postId: getCurrentPostId(),
 12916     postType: getCurrentPostType()
 10331     postType: getCurrentPostType()
 12917   };
 10332   };
 12918 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
 10333 }), Object(external_wp_data_["withDispatch"])(dispatch => ({
 12919   return {
 10334   trashPost: dispatch('core/editor').trashPost
 12920     trashPost: dispatch('core/editor').trashPost
 10335 }))])(PostTrash));
 12921   };
       
 12922 })])(PostTrash));
       
 12923 
 10336 
 12924 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/check.js
 10337 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/check.js
 12925 /**
 10338 /**
 12926  * WordPress dependencies
 10339  * WordPress dependencies
 12927  */
 10340  */
 12928 
 10341 
 12929 
 10342 
 12930 function PostTrashCheck(_ref) {
 10343 function PostTrashCheck({
 12931   var isNew = _ref.isNew,
 10344   isNew,
 12932       postId = _ref.postId,
 10345   postId,
 12933       canUserDelete = _ref.canUserDelete,
 10346   canUserDelete,
 12934       children = _ref.children;
 10347   children
 12935 
 10348 }) {
 12936   if (isNew || !postId || !canUserDelete) {
 10349   if (isNew || !postId || !canUserDelete) {
 12937     return null;
 10350     return null;
 12938   }
 10351   }
 12939 
 10352 
 12940   return children;
 10353   return children;
 12941 }
 10354 }
 12942 
 10355 
 12943 /* harmony default export */ var post_trash_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
 10356 /* harmony default export */ var post_trash_check = (Object(external_wp_data_["withSelect"])(select => {
 12944   var _select = select('core/editor'),
 10357   const {
 12945       isEditedPostNew = _select.isEditedPostNew,
 10358     isEditedPostNew,
 12946       getCurrentPostId = _select.getCurrentPostId,
 10359     getCurrentPostId,
 12947       getCurrentPostType = _select.getCurrentPostType;
 10360     getCurrentPostType
 12948 
 10361   } = select('core/editor');
 12949   var _select2 = select('core'),
 10362   const {
 12950       getPostType = _select2.getPostType,
 10363     getPostType,
 12951       canUser = _select2.canUser;
 10364     canUser
 12952 
 10365   } = select('core');
 12953   var postId = getCurrentPostId();
 10366   const postId = getCurrentPostId();
 12954   var postType = getPostType(getCurrentPostType());
 10367   const postType = getPostType(getCurrentPostType());
 12955   var resource = (postType === null || postType === void 0 ? void 0 : postType['rest_base']) || '';
 10368   const resource = (postType === null || postType === void 0 ? void 0 : postType.rest_base) || ''; // eslint-disable-line camelcase
       
 10369 
 12956   return {
 10370   return {
 12957     isNew: isEditedPostNew(),
 10371     isNew: isEditedPostNew(),
 12958     postId: postId,
 10372     postId,
 12959     canUserDelete: postId && resource ? canUser('delete', resource, postId) : false
 10373     canUserDelete: postId && resource ? canUser('delete', resource, postId) : false
 12960   };
 10374   };
 12961 })(PostTrashCheck));
 10375 })(PostTrashCheck));
 12962 
 10376 
 12963 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/check.js
 10377 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/check.js
 12969  * WordPress dependencies
 10383  * WordPress dependencies
 12970  */
 10384  */
 12971 
 10385 
 12972 
 10386 
 12973 
 10387 
 12974 function PostVisibilityCheck(_ref) {
 10388 function PostVisibilityCheck({
 12975   var hasPublishAction = _ref.hasPublishAction,
 10389   hasPublishAction,
 12976       render = _ref.render;
 10390   render
 12977   var canEdit = hasPublishAction;
 10391 }) {
       
 10392   const canEdit = hasPublishAction;
 12978   return render({
 10393   return render({
 12979     canEdit: canEdit
 10394     canEdit
 12980   });
 10395   });
 12981 }
 10396 }
 12982 /* harmony default export */ var post_visibility_check = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
 10397 /* harmony default export */ var post_visibility_check = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(select => {
 12983   var _select = select('core/editor'),
 10398   const {
 12984       getCurrentPost = _select.getCurrentPost,
 10399     getCurrentPost,
 12985       getCurrentPostType = _select.getCurrentPostType;
 10400     getCurrentPostType
 12986 
 10401   } = select('core/editor');
 12987   return {
 10402   return {
 12988     hasPublishAction: Object(external_this_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
 10403     hasPublishAction: Object(external_lodash_["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false),
 12989     postType: getCurrentPostType()
 10404     postType: getCurrentPostType()
 12990   };
 10405   };
 12991 })])(PostVisibilityCheck));
 10406 })])(PostVisibilityCheck));
 12992 
 10407 
 12993 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/info.js
 10408 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/info.js
 12995 
 10410 
 12996 /**
 10411 /**
 12997  * WordPress dependencies
 10412  * WordPress dependencies
 12998  */
 10413  */
 12999 
 10414 
 13000 var info_info = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 10415 const info_info = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 13001   xmlns: "http://www.w3.org/2000/svg",
 10416   xmlns: "http://www.w3.org/2000/svg",
 13002   viewBox: "0 0 24 24"
 10417   viewBox: "0 0 24 24"
 13003 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 10418 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 13004   d: "M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
 10419   d: "M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
 13005 }));
 10420 }));
 13006 /* harmony default export */ var library_info = (info_info);
 10421 /* harmony default export */ var library_info = (info_info);
 13007 
 10422 
 13008 // EXTERNAL MODULE: external {"this":["wp","wordcount"]}
 10423 // EXTERNAL MODULE: external ["wp","wordcount"]
 13009 var external_this_wp_wordcount_ = __webpack_require__(147);
 10424 var external_wp_wordcount_ = __webpack_require__("7fqt");
 13010 
 10425 
 13011 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/word-count/index.js
 10426 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/word-count/index.js
 13012 
 10427 
 13013 
 10428 
 13014 /**
 10429 /**
 13015  * WordPress dependencies
 10430  * WordPress dependencies
 13016  */
 10431  */
 13017 
 10432 
 13018 
 10433 
 13019 
 10434 
 13020 
 10435 function WordCount() {
 13021 function WordCount(_ref) {
 10436   const content = Object(external_wp_data_["useSelect"])(select => select('core/editor').getEditedPostAttribute('content'));
 13022   var content = _ref.content;
       
 13023 
       
 13024   /*
 10437   /*
 13025    * translators: If your word count is based on single characters (e.g. East Asian characters),
 10438    * translators: If your word count is based on single characters (e.g. East Asian characters),
 13026    * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
 10439    * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
 13027    * Do not translate into your own language.
 10440    * Do not translate into your own language.
 13028    */
 10441    */
 13029   var wordCountType = Object(external_this_wp_i18n_["_x"])('words', 'Word count type. Do not translate!');
 10442 
 13030 
 10443   const wordCountType = Object(external_wp_i18n_["_x"])('words', 'Word count type. Do not translate!');
 13031   return Object(external_this_wp_element_["createElement"])("span", {
 10444 
       
 10445   return Object(external_wp_element_["createElement"])("span", {
 13032     className: "word-count"
 10446     className: "word-count"
 13033   }, Object(external_this_wp_wordcount_["count"])(content, wordCountType));
 10447   }, Object(external_wp_wordcount_["count"])(content, wordCountType));
 13034 }
 10448 }
 13035 
 10449 
 13036 /* harmony default export */ var word_count = (Object(external_this_wp_data_["withSelect"])(function (select) {
 10450 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/character-count/index.js
 13037   return {
 10451 /**
 13038     content: select('core/editor').getEditedPostAttribute('content')
 10452  * WordPress dependencies
 13039   };
 10453  */
 13040 })(WordCount));
 10454 
       
 10455 
       
 10456 function CharacterCount() {
       
 10457   const content = Object(external_wp_data_["useSelect"])(select => select('core/editor').getEditedPostAttribute('content'));
       
 10458   return Object(external_wp_wordcount_["count"])(content, 'characters_including_spaces');
       
 10459 }
 13041 
 10460 
 13042 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/table-of-contents/panel.js
 10461 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/table-of-contents/panel.js
 13043 
 10462 
 13044 
 10463 
 13045 /**
 10464 /**
 13046  * WordPress dependencies
 10465  * WordPress dependencies
 13047  */
 10466  */
 13048 
 10467 
 13049 
 10468 
       
 10469 
 13050 /**
 10470 /**
 13051  * Internal dependencies
 10471  * Internal dependencies
 13052  */
 10472  */
 13053 
 10473 
 13054 
 10474 
 13055 
 10475 
 13056 
 10476 
 13057 function TableOfContentsPanel(_ref) {
 10477 
 13058   var hasOutlineItemsDisabled = _ref.hasOutlineItemsDisabled,
 10478 function TableOfContentsPanel({
 13059       onRequestClose = _ref.onRequestClose;
 10479   hasOutlineItemsDisabled,
 13060 
 10480   onRequestClose
 13061   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
 10481 }) {
 13062     var _select = select('core/block-editor'),
 10482   const {
 13063         getGlobalBlockCount = _select.getGlobalBlockCount;
 10483     headingCount,
 13064 
 10484     paragraphCount,
       
 10485     numberOfBlocks
       
 10486   } = Object(external_wp_data_["useSelect"])(select => {
       
 10487     const {
       
 10488       getGlobalBlockCount
       
 10489     } = select(external_wp_blockEditor_["store"]);
 13065     return {
 10490     return {
 13066       headingCount: getGlobalBlockCount('core/heading'),
 10491       headingCount: getGlobalBlockCount('core/heading'),
 13067       paragraphCount: getGlobalBlockCount('core/paragraph'),
 10492       paragraphCount: getGlobalBlockCount('core/paragraph'),
 13068       numberOfBlocks: getGlobalBlockCount()
 10493       numberOfBlocks: getGlobalBlockCount()
 13069     };
 10494     };
 13070   }, []),
 10495   }, []);
 13071       headingCount = _useSelect.headingCount,
       
 13072       paragraphCount = _useSelect.paragraphCount,
       
 13073       numberOfBlocks = _useSelect.numberOfBlocks;
       
 13074 
       
 13075   return (
 10496   return (
 13076     /*
 10497     /*
 13077      * Disable reason: The `list` ARIA role is redundant but
 10498      * Disable reason: The `list` ARIA role is redundant but
 13078      * Safari+VoiceOver won't announce the list otherwise.
 10499      * Safari+VoiceOver won't announce the list otherwise.
 13079      */
 10500      */
 13080 
 10501 
 13081     /* eslint-disable jsx-a11y/no-redundant-roles */
 10502     /* eslint-disable jsx-a11y/no-redundant-roles */
 13082     Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
 10503     Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", {
 13083       className: "table-of-contents__wrapper",
 10504       className: "table-of-contents__wrapper",
 13084       role: "note",
 10505       role: "note",
 13085       "aria-label": Object(external_this_wp_i18n_["__"])('Document Statistics'),
 10506       "aria-label": Object(external_wp_i18n_["__"])('Document Statistics'),
 13086       tabIndex: "0"
 10507       tabIndex: "0"
 13087     }, Object(external_this_wp_element_["createElement"])("ul", {
 10508     }, Object(external_wp_element_["createElement"])("ul", {
 13088       role: "list",
 10509       role: "list",
 13089       className: "table-of-contents__counts"
 10510       className: "table-of-contents__counts"
 13090     }, Object(external_this_wp_element_["createElement"])("li", {
 10511     }, Object(external_wp_element_["createElement"])("li", {
 13091       className: "table-of-contents__count"
 10512       className: "table-of-contents__count"
 13092     }, Object(external_this_wp_i18n_["__"])('Words'), Object(external_this_wp_element_["createElement"])(word_count, null)), Object(external_this_wp_element_["createElement"])("li", {
 10513     }, Object(external_wp_i18n_["__"])('Characters'), Object(external_wp_element_["createElement"])("span", {
       
 10514       className: "table-of-contents__number"
       
 10515     }, Object(external_wp_element_["createElement"])(CharacterCount, null))), Object(external_wp_element_["createElement"])("li", {
 13093       className: "table-of-contents__count"
 10516       className: "table-of-contents__count"
 13094     }, Object(external_this_wp_i18n_["__"])('Headings'), Object(external_this_wp_element_["createElement"])("span", {
 10517     }, Object(external_wp_i18n_["__"])('Words'), Object(external_wp_element_["createElement"])(WordCount, null)), Object(external_wp_element_["createElement"])("li", {
       
 10518       className: "table-of-contents__count"
       
 10519     }, Object(external_wp_i18n_["__"])('Headings'), Object(external_wp_element_["createElement"])("span", {
 13095       className: "table-of-contents__number"
 10520       className: "table-of-contents__number"
 13096     }, headingCount)), Object(external_this_wp_element_["createElement"])("li", {
 10521     }, headingCount)), Object(external_wp_element_["createElement"])("li", {
 13097       className: "table-of-contents__count"
 10522       className: "table-of-contents__count"
 13098     }, Object(external_this_wp_i18n_["__"])('Paragraphs'), Object(external_this_wp_element_["createElement"])("span", {
 10523     }, Object(external_wp_i18n_["__"])('Paragraphs'), Object(external_wp_element_["createElement"])("span", {
 13099       className: "table-of-contents__number"
 10524       className: "table-of-contents__number"
 13100     }, paragraphCount)), Object(external_this_wp_element_["createElement"])("li", {
 10525     }, paragraphCount)), Object(external_wp_element_["createElement"])("li", {
 13101       className: "table-of-contents__count"
 10526       className: "table-of-contents__count"
 13102     }, Object(external_this_wp_i18n_["__"])('Blocks'), Object(external_this_wp_element_["createElement"])("span", {
 10527     }, Object(external_wp_i18n_["__"])('Blocks'), Object(external_wp_element_["createElement"])("span", {
 13103       className: "table-of-contents__number"
 10528       className: "table-of-contents__number"
 13104     }, numberOfBlocks)))), headingCount > 0 && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("hr", null), Object(external_this_wp_element_["createElement"])("h2", {
 10529     }, numberOfBlocks)))), headingCount > 0 && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("hr", null), Object(external_wp_element_["createElement"])("h2", {
 13105       className: "table-of-contents__title"
 10530       className: "table-of-contents__title"
 13106     }, Object(external_this_wp_i18n_["__"])('Document Outline')), Object(external_this_wp_element_["createElement"])(document_outline, {
 10531     }, Object(external_wp_i18n_["__"])('Document Outline')), Object(external_wp_element_["createElement"])(document_outline, {
 13107       onSelect: onRequestClose,
 10532       onSelect: onRequestClose,
 13108       hasOutlineItemsDisabled: hasOutlineItemsDisabled
 10533       hasOutlineItemsDisabled: hasOutlineItemsDisabled
 13109     })))
 10534     })))
 13110     /* eslint-enable jsx-a11y/no-redundant-roles */
 10535     /* eslint-enable jsx-a11y/no-redundant-roles */
 13111 
 10536 
 13116 
 10541 
 13117 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/table-of-contents/index.js
 10542 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/table-of-contents/index.js
 13118 
 10543 
 13119 
 10544 
 13120 
 10545 
 13121 
       
 13122 /**
 10546 /**
 13123  * WordPress dependencies
 10547  * WordPress dependencies
 13124  */
 10548  */
 13125 
 10549 
 13126 
 10550 
 13127 
 10551 
 13128 
 10552 
 13129 
 10553 
       
 10554 
 13130 /**
 10555 /**
 13131  * Internal dependencies
 10556  * Internal dependencies
 13132  */
 10557  */
 13133 
 10558 
 13134 
 10559 
 13135 
 10560 
 13136 function TableOfContents(_ref, ref) {
 10561 function TableOfContents({
 13137   var hasOutlineItemsDisabled = _ref.hasOutlineItemsDisabled,
 10562   hasOutlineItemsDisabled,
 13138       props = Object(objectWithoutProperties["a" /* default */])(_ref, ["hasOutlineItemsDisabled"]);
 10563   repositionDropdown,
 13139 
 10564   ...props
 13140   var hasBlocks = Object(external_this_wp_data_["useSelect"])(function (select) {
 10565 }, ref) {
 13141     return !!select('core/block-editor').getBlockCount();
 10566   const hasBlocks = Object(external_wp_data_["useSelect"])(select => !!select(external_wp_blockEditor_["store"]).getBlockCount(), []);
 13142   }, []);
 10567   return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
 13143   return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 10568     position: repositionDropdown ? 'middle right right' : 'bottom',
 13144     position: "bottom",
       
 13145     className: "table-of-contents",
 10569     className: "table-of-contents",
 13146     contentClassName: "table-of-contents__popover",
 10570     contentClassName: "table-of-contents__popover",
 13147     renderToggle: function renderToggle(_ref2) {
 10571     renderToggle: ({
 13148       var isOpen = _ref2.isOpen,
 10572       isOpen,
 13149           onToggle = _ref2.onToggle;
 10573       onToggle
 13150       return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
 10574     }) => Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
 13151         ref: ref,
 10575       ref: ref,
 13152         onClick: hasBlocks ? onToggle : undefined,
 10576       onClick: hasBlocks ? onToggle : undefined,
 13153         icon: library_info,
 10577       icon: library_info,
 13154         "aria-expanded": isOpen,
 10578       "aria-expanded": isOpen,
 13155         label: Object(external_this_wp_i18n_["__"])('Content structure'),
 10579       "aria-haspopup": "true"
 13156         tooltipPosition: "bottom",
 10580       /* translators: button label text should, if possible, be under 16 characters. */
 13157         "aria-disabled": !hasBlocks
 10581       ,
 13158       }));
 10582       label: Object(external_wp_i18n_["__"])('Details'),
 13159     },
 10583       tooltipPosition: "bottom",
 13160     renderContent: function renderContent(_ref3) {
 10584       "aria-disabled": !hasBlocks
 13161       var onClose = _ref3.onClose;
 10585     })),
 13162       return Object(external_this_wp_element_["createElement"])(panel, {
 10586     renderContent: ({
 13163         onRequestClose: onClose,
 10587       onClose
 13164         hasOutlineItemsDisabled: hasOutlineItemsDisabled
 10588     }) => Object(external_wp_element_["createElement"])(panel, {
 13165       });
 10589       onRequestClose: onClose,
 13166     }
 10590       hasOutlineItemsDisabled: hasOutlineItemsDisabled
       
 10591     })
 13167   });
 10592   });
 13168 }
 10593 }
 13169 
 10594 
 13170 /* harmony default export */ var table_of_contents = (Object(external_this_wp_element_["forwardRef"])(TableOfContents));
 10595 /* harmony default export */ var table_of_contents = (Object(external_wp_element_["forwardRef"])(TableOfContents));
 13171 
 10596 
 13172 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/unsaved-changes-warning/index.js
 10597 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/unsaved-changes-warning/index.js
 13173 
       
 13174 
       
 13175 
       
 13176 
       
 13177 
       
 13178 
       
 13179 
       
 13180 function unsaved_changes_warning_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (unsaved_changes_warning_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); }; }
       
 13181 
       
 13182 function unsaved_changes_warning_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; } }
       
 13183 
       
 13184 /**
 10598 /**
 13185  * WordPress dependencies
 10599  * WordPress dependencies
 13186  */
 10600  */
 13187 
 10601 
 13188 
 10602 
 13189 
 10603 
 13190 
 10604 /**
 13191 var unsaved_changes_warning_UnsavedChangesWarning = /*#__PURE__*/function (_Component) {
 10605  * Warns the user if there are unsaved changes before leaving the editor.
 13192   Object(inherits["a" /* default */])(UnsavedChangesWarning, _Component);
 10606  * Compatible with Post Editor and Site Editor.
 13193 
 10607  *
 13194   var _super = unsaved_changes_warning_createSuper(UnsavedChangesWarning);
 10608  * @return {WPComponent} The component.
 13195 
 10609  */
 13196   function UnsavedChangesWarning() {
 10610 
 13197     var _this;
 10611 function UnsavedChangesWarning() {
 13198 
 10612   const isDirty = Object(external_wp_data_["useSelect"])(select => {
 13199     Object(classCallCheck["a" /* default */])(this, UnsavedChangesWarning);
 10613     return () => {
 13200 
 10614       const {
 13201     _this = _super.apply(this, arguments);
 10615         __experimentalGetDirtyEntityRecords
 13202     _this.warnIfUnsavedChanges = _this.warnIfUnsavedChanges.bind(Object(assertThisInitialized["a" /* default */])(_this));
 10616       } = select('core');
 13203     return _this;
 10617 
 13204   }
 10618       const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
 13205 
 10619 
 13206   Object(createClass["a" /* default */])(UnsavedChangesWarning, [{
 10620       return dirtyEntityRecords.length > 0;
 13207     key: "componentDidMount",
 10621     };
 13208     value: function componentDidMount() {
 10622   }, []);
 13209       window.addEventListener('beforeunload', this.warnIfUnsavedChanges);
 10623   /**
 13210     }
 10624    * Warns the user if there are unsaved changes before leaving the editor.
 13211   }, {
 10625    *
 13212     key: "componentWillUnmount",
 10626    * @param {Event} event `beforeunload` event.
 13213     value: function componentWillUnmount() {
 10627    *
 13214       window.removeEventListener('beforeunload', this.warnIfUnsavedChanges);
 10628    * @return {?string} Warning prompt message, if unsaved changes exist.
 13215     }
 10629    */
 13216     /**
 10630 
 13217      * Warns the user if there are unsaved changes before leaving the editor.
 10631   const warnIfUnsavedChanges = event => {
 13218      *
       
 13219      * @param {Event} event `beforeunload` event.
       
 13220      *
       
 13221      * @return {?string} Warning prompt message, if unsaved changes exist.
       
 13222      */
       
 13223 
       
 13224   }, {
       
 13225     key: "warnIfUnsavedChanges",
       
 13226     value: function warnIfUnsavedChanges(event) {
       
 13227       var isEditedPostDirty = this.props.isEditedPostDirty;
       
 13228 
       
 13229       if (isEditedPostDirty()) {
       
 13230         event.returnValue = Object(external_this_wp_i18n_["__"])('You have unsaved changes. If you proceed, they will be lost.');
       
 13231         return event.returnValue;
       
 13232       }
       
 13233     }
       
 13234   }, {
       
 13235     key: "render",
       
 13236     value: function render() {
       
 13237       return null;
       
 13238     }
       
 13239   }]);
       
 13240 
       
 13241   return UnsavedChangesWarning;
       
 13242 }(external_this_wp_element_["Component"]);
       
 13243 
       
 13244 /* harmony default export */ var unsaved_changes_warning = (Object(external_this_wp_data_["withSelect"])(function (select) {
       
 13245   return {
       
 13246     // We need to call the selector directly in the listener to avoid race
 10632     // We need to call the selector directly in the listener to avoid race
 13247     // conditions with `BrowserURL` where `componentDidUpdate` gets the
 10633     // conditions with `BrowserURL` where `componentDidUpdate` gets the
 13248     // new value of `isEditedPostDirty` before this component does,
 10634     // new value of `isEditedPostDirty` before this component does,
 13249     // causing this component to incorrectly think a trashed post is still dirty.
 10635     // causing this component to incorrectly think a trashed post is still dirty.
 13250     isEditedPostDirty: select('core/editor').isEditedPostDirty
 10636     if (isDirty()) {
       
 10637       event.returnValue = Object(external_wp_i18n_["__"])('You have unsaved changes. If you proceed, they will be lost.');
       
 10638       return event.returnValue;
       
 10639     }
 13251   };
 10640   };
 13252 })(unsaved_changes_warning_UnsavedChangesWarning));
 10641 
       
 10642   Object(external_wp_element_["useEffect"])(() => {
       
 10643     window.addEventListener('beforeunload', warnIfUnsavedChanges);
       
 10644     return () => {
       
 10645       window.removeEventListener('beforeunload', warnIfUnsavedChanges);
       
 10646     };
       
 10647   }, []);
       
 10648   return null;
       
 10649 }
       
 10650 
       
 10651 // EXTERNAL MODULE: external ["wp","reusableBlocks"]
       
 10652 var external_wp_reusableBlocks_ = __webpack_require__("diJD");
 13253 
 10653 
 13254 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/with-registry-provider.js
 10654 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/with-registry-provider.js
 13255 
 10655 
 13256 
 10656 
 13257 
       
 13258 
       
 13259 /**
 10657 /**
 13260  * WordPress dependencies
 10658  * WordPress dependencies
 13261  */
 10659  */
 13262 
 10660 
 13263 
 10661 
 13266 /**
 10664 /**
 13267  * Internal dependencies
 10665  * Internal dependencies
 13268  */
 10666  */
 13269 
 10667 
 13270 
 10668 
 13271 
 10669 const withRegistryProvider = Object(external_wp_compose_["createHigherOrderComponent"])(WrappedComponent => Object(external_wp_data_["withRegistry"])(props => {
 13272 var withRegistryProvider = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
 10670   const {
 13273   return Object(external_this_wp_data_["withRegistry"])(function (props) {
 10671     useSubRegistry = true,
 13274     var _props$useSubRegistry = props.useSubRegistry,
 10672     registry,
 13275         useSubRegistry = _props$useSubRegistry === void 0 ? true : _props$useSubRegistry,
 10673     ...additionalProps
 13276         registry = props.registry,
 10674   } = props;
 13277         additionalProps = Object(objectWithoutProperties["a" /* default */])(props, ["useSubRegistry", "registry"]);
 10675 
 13278 
 10676   if (!useSubRegistry) {
 13279     if (!useSubRegistry) {
 10677     return Object(external_wp_element_["createElement"])(WrappedComponent, additionalProps);
 13280       return Object(external_this_wp_element_["createElement"])(WrappedComponent, additionalProps);
 10678   }
 13281     }
 10679 
 13282 
 10680   const [subRegistry, setSubRegistry] = Object(external_wp_element_["useState"])(null);
 13283     var _useState = Object(external_this_wp_element_["useState"])(null),
 10681   Object(external_wp_element_["useEffect"])(() => {
 13284         _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
 10682     const newRegistry = Object(external_wp_data_["createRegistry"])({
 13285         subRegistry = _useState2[0],
 10683       'core/block-editor': external_wp_blockEditor_["storeConfig"]
 13286         setSubRegistry = _useState2[1];
 10684     }, registry);
 13287 
 10685     newRegistry.registerStore('core/editor', storeConfig);
 13288     Object(external_this_wp_element_["useEffect"])(function () {
 10686     setSubRegistry(newRegistry);
 13289       var newRegistry = Object(external_this_wp_data_["createRegistry"])({
 10687   }, [registry]);
 13290         'core/block-editor': external_this_wp_blockEditor_["storeConfig"]
 10688 
 13291       }, registry);
 10689   if (!subRegistry) {
 13292       var store = newRegistry.registerStore('core/editor', storeConfig); // This should be removed after the refactoring of the effects to controls.
 10690     return null;
 13293 
 10691   }
 13294       middlewares(store);
 10692 
 13295       setSubRegistry(newRegistry);
 10693   return Object(external_wp_element_["createElement"])(external_wp_data_["RegistryProvider"], {
 13296     }, [registry]);
 10694     value: subRegistry
 13297 
 10695   }, Object(external_wp_element_["createElement"])(WrappedComponent, additionalProps));
 13298     if (!subRegistry) {
 10696 }), 'withRegistryProvider');
 13299       return null;
       
 13300     }
       
 13301 
       
 13302     return Object(external_this_wp_element_["createElement"])(external_this_wp_data_["RegistryProvider"], {
       
 13303       value: subRegistry
       
 13304     }, Object(external_this_wp_element_["createElement"])(WrappedComponent, additionalProps));
       
 13305   });
       
 13306 }, 'withRegistryProvider');
       
 13307 /* harmony default export */ var with_registry_provider = (withRegistryProvider);
 10697 /* harmony default export */ var with_registry_provider = (withRegistryProvider);
 13308 
 10698 
 13309 // EXTERNAL MODULE: external {"this":["wp","mediaUtils"]}
 10699 // EXTERNAL MODULE: external ["wp","mediaUtils"]
 13310 var external_this_wp_mediaUtils_ = __webpack_require__(152);
 10700 var external_wp_mediaUtils_ = __webpack_require__("6aBm");
 13311 
 10701 
 13312 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/media-upload/index.js
 10702 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/media-upload/index.js
 13313 
       
 13314 
       
 13315 function media_upload_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; }
       
 13316 
       
 13317 function media_upload_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { media_upload_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 { media_upload_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 13318 
       
 13319 /**
 10703 /**
 13320  * External dependencies
 10704  * External dependencies
 13321  */
 10705  */
 13322 
 10706 
 13323 /**
 10707 /**
 13337  * @param   {?number}  $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.
 10721  * @param   {?number}  $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.
 13338  * @param   {Function} $0.onError           Function called when an error happens.
 10722  * @param   {Function} $0.onError           Function called when an error happens.
 13339  * @param   {Function} $0.onFileChange      Function called each time a file or a temporary representation of the file is available.
 10723  * @param   {Function} $0.onFileChange      Function called each time a file or a temporary representation of the file is available.
 13340  */
 10724  */
 13341 
 10725 
 13342 function mediaUpload(_ref) {
 10726 function mediaUpload({
 13343   var _ref$additionalData = _ref.additionalData,
 10727   additionalData = {},
 13344       additionalData = _ref$additionalData === void 0 ? {} : _ref$additionalData,
 10728   allowedTypes,
 13345       allowedTypes = _ref.allowedTypes,
 10729   filesList,
 13346       filesList = _ref.filesList,
 10730   maxUploadFileSize,
 13347       maxUploadFileSize = _ref.maxUploadFileSize,
 10731   onError = external_lodash_["noop"],
 13348       _ref$onError = _ref.onError,
 10732   onFileChange
 13349       _onError = _ref$onError === void 0 ? external_this_lodash_["noop"] : _ref$onError,
 10733 }) {
 13350       onFileChange = _ref.onFileChange;
 10734   const {
 13351 
 10735     getCurrentPostId,
 13352   var _select = Object(external_this_wp_data_["select"])('core/editor'),
 10736     getEditorSettings
 13353       getCurrentPostId = _select.getCurrentPostId,
 10737   } = Object(external_wp_data_["select"])('core/editor');
 13354       getEditorSettings = _select.getEditorSettings;
 10738   const wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;
 13355 
       
 13356   var wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;
       
 13357   maxUploadFileSize = maxUploadFileSize || getEditorSettings().maxUploadFileSize;
 10739   maxUploadFileSize = maxUploadFileSize || getEditorSettings().maxUploadFileSize;
 13358   Object(external_this_wp_mediaUtils_["uploadMedia"])({
 10740   Object(external_wp_mediaUtils_["uploadMedia"])({
 13359     allowedTypes: allowedTypes,
 10741     allowedTypes,
 13360     filesList: filesList,
 10742     filesList,
 13361     onFileChange: onFileChange,
 10743     onFileChange,
 13362     additionalData: media_upload_objectSpread({
 10744     additionalData: {
 13363       post: getCurrentPostId()
 10745       post: getCurrentPostId(),
 13364     }, additionalData),
 10746       ...additionalData
 13365     maxUploadFileSize: maxUploadFileSize,
       
 13366     onError: function onError(_ref2) {
       
 13367       var message = _ref2.message;
       
 13368       return _onError(message);
       
 13369     },
 10747     },
 13370     wpAllowedMimeTypes: wpAllowedMimeTypes
 10748     maxUploadFileSize,
       
 10749     onError: ({
       
 10750       message
       
 10751     }) => onError(message),
       
 10752     wpAllowedMimeTypes
 13371   });
 10753   });
 13372 }
 10754 }
 13373 
 10755 
 13374 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/reusable-blocks-buttons/reusable-block-convert-button.js
 10756 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/use-block-editor-settings.js
 13375 
       
 13376 
       
 13377 /**
 10757 /**
 13378  * External dependencies
 10758  * External dependencies
 13379  */
 10759  */
 13380 
 10760 
 13381 /**
 10761 /**
 13383  */
 10763  */
 13384 
 10764 
 13385 
 10765 
 13386 
 10766 
 13387 
 10767 
 13388 
 10768 /**
 13389 
 10769  * Internal dependencies
 13390 
 10770  */
 13391 function ReusableBlockConvertButton(_ref) {
 10771 
 13392   var isVisible = _ref.isVisible,
 10772 
 13393       isReusable = _ref.isReusable,
 10773 
 13394       onConvertToStatic = _ref.onConvertToStatic,
 10774 /**
 13395       onConvertToReusable = _ref.onConvertToReusable;
 10775  * React hook used to compute the block editor settings to use for the post editor.
 13396 
 10776  *
 13397   if (!isVisible) {
 10777  * @param {Object}  settings    EditorProvider settings prop.
 13398     return null;
 10778  * @param {boolean} hasTemplate Whether template mode is enabled.
 13399   }
 10779  *
 13400 
 10780  * @return {Object} Block Editor Settings.
 13401   return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockSettingsMenuControls"], null, function (_ref2) {
 10781  */
 13402     var onClose = _ref2.onClose;
 10782 
 13403     return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, !isReusable && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 10783 function useBlockEditorSettings(settings, hasTemplate) {
 13404       onClick: function onClick() {
 10784   const {
 13405         onConvertToReusable();
 10785     reusableBlocks,
 13406         onClose();
 10786     hasUploadPermissions,
 13407       }
 10787     canUseUnfilteredHTML,
 13408     }, Object(external_this_wp_i18n_["__"])('Add to Reusable blocks')), isReusable && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
 10788     isTitleSelected
 13409       onClick: function onClick() {
 10789   } = Object(external_wp_data_["useSelect"])(select => {
 13410         onConvertToStatic();
 10790     const {
 13411         onClose();
 10791       canUserUseUnfilteredHTML,
 13412       }
 10792       isPostTitleSelected
 13413     }, Object(external_this_wp_i18n_["__"])('Convert to Regular Block')));
 10793     } = select(store);
       
 10794     const {
       
 10795       canUser
       
 10796     } = select(external_wp_coreData_["store"]);
       
 10797     return {
       
 10798       canUseUnfilteredHTML: canUserUseUnfilteredHTML(),
       
 10799       reusableBlocks: select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_block',
       
 10800       /**
       
 10801        * Unbounded queries are not supported on native so as a workaround, we set per_page with the maximum value that native version can handle.
       
 10802        * Related issue: https://github.com/wordpress-mobile/gutenberg-mobile/issues/2661
       
 10803        */
       
 10804       {
       
 10805         per_page: external_wp_element_["Platform"].select({
       
 10806           web: -1,
       
 10807           native: 100
       
 10808         })
       
 10809       }),
       
 10810       hasUploadPermissions: Object(external_lodash_["defaultTo"])(canUser('create', 'media'), true),
       
 10811       // This selector is only defined on mobile.
       
 10812       isTitleSelected: isPostTitleSelected && isPostTitleSelected()
       
 10813     };
       
 10814   }, []);
       
 10815   const {
       
 10816     undo
       
 10817   } = Object(external_wp_data_["useDispatch"])(store);
       
 10818   return Object(external_wp_element_["useMemo"])(() => ({ ...Object(external_lodash_["pick"])(settings, ['__experimentalBlockDirectory', '__experimentalBlockPatternCategories', '__experimentalBlockPatterns', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', '__experimentalGlobalStylesUserEntityId', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', 'alignWide', 'allowedBlockTypes', 'bodyPlaceholder', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomGradients', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'focusMode', 'fontSizes', 'gradients', 'hasFixedToolbar', 'hasReducedUI', 'imageDefaultSize', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'keepCaretInsideBlock', 'maxWidth', 'onUpdateDefaultBlockStyles', 'styles', 'template', 'templateLock', 'titlePlaceholder', 'supportsLayout', 'widgetTypesToHideFromLegacyWidgetBlock']),
       
 10819     mediaUpload: hasUploadPermissions ? mediaUpload : undefined,
       
 10820     __experimentalReusableBlocks: reusableBlocks,
       
 10821     __experimentalFetchLinkSuggestions: (search, searchOptions) => Object(external_wp_coreData_["__experimentalFetchLinkSuggestions"])(search, searchOptions, settings),
       
 10822     __experimentalFetchRemoteUrlData: url => Object(external_wp_coreData_["__experimentalFetchRemoteUrlData"])(url),
       
 10823     __experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,
       
 10824     __experimentalUndo: undo,
       
 10825     __experimentalShouldInsertAtTheTop: isTitleSelected,
       
 10826     outlineMode: hasTemplate
       
 10827   }), [settings, hasUploadPermissions, reusableBlocks, canUseUnfilteredHTML, undo, isTitleSelected, hasTemplate]);
       
 10828 }
       
 10829 
       
 10830 /* harmony default export */ var use_block_editor_settings = (useBlockEditorSettings);
       
 10831 
       
 10832 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/index.js
       
 10833 
       
 10834 
       
 10835 /**
       
 10836  * WordPress dependencies
       
 10837  */
       
 10838 
       
 10839 
       
 10840 
       
 10841 
       
 10842 
       
 10843 
       
 10844 
       
 10845 /**
       
 10846  * Internal dependencies
       
 10847  */
       
 10848 
       
 10849 
       
 10850 
       
 10851 
       
 10852 
       
 10853 function EditorProvider({
       
 10854   __unstableTemplate,
       
 10855   post,
       
 10856   settings,
       
 10857   recovery,
       
 10858   initialEdits,
       
 10859   children
       
 10860 }) {
       
 10861   const defaultBlockContext = Object(external_wp_element_["useMemo"])(() => {
       
 10862     if (post.type === 'wp_template') {
       
 10863       return {};
       
 10864     }
       
 10865 
       
 10866     return {
       
 10867       postId: post.id,
       
 10868       postType: post.type
       
 10869     };
       
 10870   }, [post.id, post.type]);
       
 10871   const {
       
 10872     selection,
       
 10873     isReady
       
 10874   } = Object(external_wp_data_["useSelect"])(select => {
       
 10875     const {
       
 10876       getEditorSelection,
       
 10877       __unstableIsEditorReady
       
 10878     } = select(store);
       
 10879     return {
       
 10880       isReady: __unstableIsEditorReady(),
       
 10881       selection: getEditorSelection()
       
 10882     };
       
 10883   }, []);
       
 10884   const {
       
 10885     id,
       
 10886     type
       
 10887   } = __unstableTemplate !== null && __unstableTemplate !== void 0 ? __unstableTemplate : post;
       
 10888   const [blocks, onInput, onChange] = Object(external_wp_coreData_["useEntityBlockEditor"])('postType', type, {
       
 10889     id
 13414   });
 10890   });
 13415 }
 10891   const editorSettings = use_block_editor_settings(settings, !!__unstableTemplate);
 13416 /* harmony default export */ var reusable_block_convert_button = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref3) {
 10892   const {
 13417   var clientIds = _ref3.clientIds;
 10893     updatePostLock,
 13418 
 10894     setupEditor,
 13419   var _select = select('core/block-editor'),
 10895     updateEditorSettings,
 13420       getBlocksByClientId = _select.getBlocksByClientId,
 10896     __experimentalTearDownEditor
 13421       canInsertBlockType = _select.canInsertBlockType;
 10897   } = Object(external_wp_data_["useDispatch"])(store);
 13422 
 10898   const {
 13423   var _select2 = select('core/editor'),
 10899     createWarningNotice
 13424       getReusableBlock = _select2.__experimentalGetReusableBlock;
 10900   } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]); // Iniitialize and tear down the editor.
 13425 
 10901   // Ideally this should be synced on each change and not just something you do once.
 13426   var _select3 = select('core'),
 10902 
 13427       canUser = _select3.canUser;
 10903   Object(external_wp_element_["useLayoutEffect"])(() => {
 13428 
 10904     // Assume that we don't need to initialize in the case of an error recovery.
 13429   var blocks = getBlocksByClientId(clientIds);
 10905     if (recovery) {
 13430   var isReusable = blocks.length === 1 && blocks[0] && Object(external_this_wp_blocks_["isReusableBlock"])(blocks[0]) && !!getReusableBlock(blocks[0].attributes.ref); // Show 'Convert to Regular Block' when selected block is a reusable block
 10906       return;
 13431 
       
 13432   var isVisible = isReusable || // Hide 'Add to Reusable blocks' when reusable blocks are disabled
       
 13433   canInsertBlockType('core/block') && Object(external_this_lodash_["every"])(blocks, function (block) {
       
 13434     return (// Guard against the case where a regular block has *just* been converted
       
 13435       !!block && // Hide 'Add to Reusable blocks' on invalid blocks
       
 13436       block.isValid && // Hide 'Add to Reusable blocks' when block doesn't support being made reusable
       
 13437       Object(external_this_wp_blocks_["hasBlockSupport"])(block.name, 'reusable', true)
       
 13438     );
       
 13439   }) && // Hide 'Add to Reusable blocks' when current doesn't have permission to do that
       
 13440   !!canUser('create', 'blocks');
       
 13441   return {
       
 13442     isReusable: isReusable,
       
 13443     isVisible: isVisible
       
 13444   };
       
 13445 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref4) {
       
 13446   var clientIds = _ref4.clientIds;
       
 13447 
       
 13448   var _dispatch = dispatch('core/editor'),
       
 13449       convertBlockToReusable = _dispatch.__experimentalConvertBlockToReusable,
       
 13450       convertBlockToStatic = _dispatch.__experimentalConvertBlockToStatic;
       
 13451 
       
 13452   return {
       
 13453     onConvertToStatic: function onConvertToStatic() {
       
 13454       convertBlockToStatic(clientIds[0]);
       
 13455     },
       
 13456     onConvertToReusable: function onConvertToReusable() {
       
 13457       convertBlockToReusable(clientIds);
       
 13458     }
 10907     }
 13459   };
 10908 
 13460 })])(ReusableBlockConvertButton));
 10909     updatePostLock(settings.postLock);
 13461 
 10910     setupEditor(post, initialEdits, settings.template);
 13462 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/reusable-blocks-buttons/reusable-block-delete-button.js
 10911 
 13463 
 10912     if (settings.autosave) {
 13464 
 10913       createWarningNotice(Object(external_wp_i18n_["__"])('There is an autosave of this post that is more recent than the version below.'), {
 13465 /**
       
 13466  * WordPress dependencies
       
 13467  */
       
 13468 
       
 13469 
       
 13470 
       
 13471 
       
 13472 
       
 13473 
       
 13474 function ReusableBlockDeleteButton(_ref) {
       
 13475   var isVisible = _ref.isVisible,
       
 13476       isDisabled = _ref.isDisabled,
       
 13477       onDelete = _ref.onDelete;
       
 13478 
       
 13479   if (!isVisible) {
       
 13480     return null;
       
 13481   }
       
 13482 
       
 13483   return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockSettingsMenuControls"], null, function (_ref2) {
       
 13484     var onClose = _ref2.onClose;
       
 13485     return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 13486       disabled: isDisabled,
       
 13487       onClick: function onClick() {
       
 13488         var hasConfirmed = onDelete();
       
 13489 
       
 13490         if (hasConfirmed) {
       
 13491           onClose();
       
 13492         }
       
 13493       }
       
 13494     }, Object(external_this_wp_i18n_["__"])('Remove from Reusable blocks'));
       
 13495   });
       
 13496 }
       
 13497 /* harmony default export */ var reusable_block_delete_button = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, _ref3) {
       
 13498   var clientId = _ref3.clientId;
       
 13499 
       
 13500   var _select = select('core/block-editor'),
       
 13501       getBlock = _select.getBlock;
       
 13502 
       
 13503   var _select2 = select('core'),
       
 13504       canUser = _select2.canUser;
       
 13505 
       
 13506   var _select3 = select('core/editor'),
       
 13507       getReusableBlock = _select3.__experimentalGetReusableBlock;
       
 13508 
       
 13509   var block = getBlock(clientId);
       
 13510   var reusableBlock = block && Object(external_this_wp_blocks_["isReusableBlock"])(block) ? getReusableBlock(block.attributes.ref) : null;
       
 13511   return {
       
 13512     isVisible: !!reusableBlock && (reusableBlock.isTemporary || !!canUser('delete', 'blocks', reusableBlock.id)),
       
 13513     isDisabled: reusableBlock && reusableBlock.isTemporary
       
 13514   };
       
 13515 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref4, _ref5) {
       
 13516   var clientId = _ref4.clientId;
       
 13517   var select = _ref5.select;
       
 13518 
       
 13519   var _dispatch = dispatch('core/editor'),
       
 13520       deleteReusableBlock = _dispatch.__experimentalDeleteReusableBlock;
       
 13521 
       
 13522   var _select4 = select('core/block-editor'),
       
 13523       getBlock = _select4.getBlock;
       
 13524 
       
 13525   return {
       
 13526     onDelete: function onDelete() {
       
 13527       // TODO: Make this a <Confirm /> component or similar
       
 13528       // eslint-disable-next-line no-alert
       
 13529       var hasConfirmed = window.confirm( // eslint-disable-next-line @wordpress/i18n-no-collapsible-whitespace
       
 13530       Object(external_this_wp_i18n_["__"])('Are you sure you want to delete this Reusable Block?\n\n' + 'It will be permanently removed from all posts and pages that use it.'));
       
 13531 
       
 13532       if (hasConfirmed) {
       
 13533         var block = getBlock(clientId);
       
 13534         deleteReusableBlock(block.attributes.ref);
       
 13535       }
       
 13536 
       
 13537       return hasConfirmed;
       
 13538     }
       
 13539   };
       
 13540 })])(ReusableBlockDeleteButton));
       
 13541 
       
 13542 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/reusable-blocks-buttons/index.js
       
 13543 
       
 13544 
       
 13545 /**
       
 13546  * WordPress dependencies
       
 13547  */
       
 13548 
       
 13549 /**
       
 13550  * Internal dependencies
       
 13551  */
       
 13552 
       
 13553 
       
 13554 
       
 13555 
       
 13556 function ReusableBlocksButtons(_ref) {
       
 13557   var clientIds = _ref.clientIds;
       
 13558   return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(reusable_block_convert_button, {
       
 13559     clientIds: clientIds
       
 13560   }), clientIds.length === 1 && Object(external_this_wp_element_["createElement"])(reusable_block_delete_button, {
       
 13561     clientId: clientIds[0]
       
 13562   }));
       
 13563 }
       
 13564 
       
 13565 /* harmony default export */ var reusable_blocks_buttons = (Object(external_this_wp_data_["withSelect"])(function (select) {
       
 13566   var _select = select('core/block-editor'),
       
 13567       getSelectedBlockClientIds = _select.getSelectedBlockClientIds;
       
 13568 
       
 13569   return {
       
 13570     clientIds: getSelectedBlockClientIds()
       
 13571   };
       
 13572 })(ReusableBlocksButtons));
       
 13573 
       
 13574 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/convert-to-group-buttons/index.js
       
 13575 
       
 13576 
       
 13577 /**
       
 13578  * WordPress dependencies
       
 13579  */
       
 13580 
       
 13581 
       
 13582 
       
 13583 
       
 13584 
       
 13585 
       
 13586 function ConvertToGroupButton(_ref) {
       
 13587   var onConvertToGroup = _ref.onConvertToGroup,
       
 13588       onConvertFromGroup = _ref.onConvertFromGroup,
       
 13589       _ref$isGroupable = _ref.isGroupable,
       
 13590       isGroupable = _ref$isGroupable === void 0 ? false : _ref$isGroupable,
       
 13591       _ref$isUngroupable = _ref.isUngroupable,
       
 13592       isUngroupable = _ref$isUngroupable === void 0 ? false : _ref$isUngroupable;
       
 13593 
       
 13594   if (!isGroupable && !isUngroupable) {
       
 13595     return null;
       
 13596   }
       
 13597 
       
 13598   return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockSettingsMenuControls"], null, function (_ref2) {
       
 13599     var onClose = _ref2.onClose;
       
 13600     return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, isGroupable && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 13601       onClick: function onClick() {
       
 13602         onConvertToGroup();
       
 13603         onClose();
       
 13604       }
       
 13605     }, Object(external_this_wp_i18n_["_x"])('Group', 'verb')), isUngroupable && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
       
 13606       onClick: function onClick() {
       
 13607         onConvertFromGroup();
       
 13608         onClose();
       
 13609       }
       
 13610     }, Object(external_this_wp_i18n_["_x"])('Ungroup', 'Ungrouping blocks from within a Group block back into individual blocks within the Editor ')));
       
 13611   });
       
 13612 }
       
 13613 /* harmony default export */ var convert_to_group_buttons = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
       
 13614   var _select = select('core/block-editor'),
       
 13615       getBlockRootClientId = _select.getBlockRootClientId,
       
 13616       getBlocksByClientId = _select.getBlocksByClientId,
       
 13617       canInsertBlockType = _select.canInsertBlockType,
       
 13618       getSelectedBlockClientIds = _select.getSelectedBlockClientIds;
       
 13619 
       
 13620   var _select2 = select('core/blocks'),
       
 13621       getGroupingBlockName = _select2.getGroupingBlockName;
       
 13622 
       
 13623   var clientIds = getSelectedBlockClientIds();
       
 13624   var groupingBlockName = getGroupingBlockName();
       
 13625   var rootClientId = clientIds && clientIds.length > 0 ? getBlockRootClientId(clientIds[0]) : undefined;
       
 13626   var groupingBlockAvailable = canInsertBlockType(groupingBlockName, rootClientId);
       
 13627   var blocksSelection = getBlocksByClientId(clientIds);
       
 13628   var isSingleGroupingBlock = blocksSelection.length === 1 && blocksSelection[0] && blocksSelection[0].name === groupingBlockName; // Do we have
       
 13629   // 1. Grouping block available to be inserted?
       
 13630   // 2. One or more blocks selected
       
 13631   // (we allow single Blocks to become groups unless
       
 13632   // they are a soltiary group block themselves)
       
 13633 
       
 13634   var isGroupable = groupingBlockAvailable && blocksSelection.length && !isSingleGroupingBlock; // Do we have a single Group Block selected and does that group have inner blocks?
       
 13635 
       
 13636   var isUngroupable = isSingleGroupingBlock && !!blocksSelection[0].innerBlocks.length;
       
 13637   return {
       
 13638     clientIds: clientIds,
       
 13639     isGroupable: isGroupable,
       
 13640     isUngroupable: isUngroupable,
       
 13641     blocksSelection: blocksSelection,
       
 13642     groupingBlockName: groupingBlockName
       
 13643   };
       
 13644 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref3) {
       
 13645   var clientIds = _ref3.clientIds,
       
 13646       _ref3$blocksSelection = _ref3.blocksSelection,
       
 13647       blocksSelection = _ref3$blocksSelection === void 0 ? [] : _ref3$blocksSelection,
       
 13648       groupingBlockName = _ref3.groupingBlockName;
       
 13649 
       
 13650   var _dispatch = dispatch('core/block-editor'),
       
 13651       replaceBlocks = _dispatch.replaceBlocks;
       
 13652 
       
 13653   return {
       
 13654     onConvertToGroup: function onConvertToGroup() {
       
 13655       // Activate the `transform` on the Grouping Block which does the conversion
       
 13656       var newBlocks = Object(external_this_wp_blocks_["switchToBlockType"])(blocksSelection, groupingBlockName);
       
 13657 
       
 13658       if (newBlocks) {
       
 13659         replaceBlocks(clientIds, newBlocks);
       
 13660       }
       
 13661     },
       
 13662     onConvertFromGroup: function onConvertFromGroup() {
       
 13663       var innerBlocks = blocksSelection[0].innerBlocks;
       
 13664 
       
 13665       if (!innerBlocks.length) {
       
 13666         return;
       
 13667       }
       
 13668 
       
 13669       replaceBlocks(clientIds, innerBlocks);
       
 13670     }
       
 13671   };
       
 13672 })])(ConvertToGroupButton));
       
 13673 
       
 13674 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/index.js
       
 13675 
       
 13676 
       
 13677 
       
 13678 
       
 13679 
       
 13680 
       
 13681 
       
 13682 
       
 13683 
       
 13684 
       
 13685 function provider_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; }
       
 13686 
       
 13687 function provider_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { provider_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 { provider_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
 13688 
       
 13689 function provider_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (provider_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); }; }
       
 13690 
       
 13691 function provider_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; } }
       
 13692 
       
 13693 /**
       
 13694  * External dependencies
       
 13695  */
       
 13696 
       
 13697 
       
 13698 /**
       
 13699  * WordPress dependencies
       
 13700  */
       
 13701 
       
 13702 
       
 13703 
       
 13704 
       
 13705 
       
 13706 
       
 13707 
       
 13708 
       
 13709 
       
 13710 
       
 13711 /**
       
 13712  * Internal dependencies
       
 13713  */
       
 13714 
       
 13715 
       
 13716 
       
 13717 
       
 13718 
       
 13719 /**
       
 13720  * Fetches link suggestions from the API. This function is an exact copy of a function found at:
       
 13721  *
       
 13722  * wordpress/editor/src/components/provider/index.js
       
 13723  *
       
 13724  * It seems like there is no suitable package to import this from. Ideally it would be either part of core-data.
       
 13725  * Until we refactor it, just copying the code is the simplest solution.
       
 13726  *
       
 13727  * @param {Object} search
       
 13728  * @param {number} perPage
       
 13729  * @return {Promise<Object[]>} List of suggestions
       
 13730  */
       
 13731 
       
 13732 var fetchLinkSuggestions = /*#__PURE__*/function () {
       
 13733   var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee(search) {
       
 13734     var _ref2,
       
 13735         _ref2$perPage,
       
 13736         perPage,
       
 13737         posts,
       
 13738         _args = arguments;
       
 13739 
       
 13740     return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
       
 13741       while (1) {
       
 13742         switch (_context.prev = _context.next) {
       
 13743           case 0:
       
 13744             _ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$perPage = _ref2.perPage, perPage = _ref2$perPage === void 0 ? 20 : _ref2$perPage;
       
 13745             _context.next = 3;
       
 13746             return external_this_wp_apiFetch_default()({
       
 13747               path: Object(external_this_wp_url_["addQueryArgs"])('/wp/v2/search', {
       
 13748                 search: search,
       
 13749                 per_page: perPage,
       
 13750                 type: 'post'
       
 13751               })
       
 13752             });
       
 13753 
       
 13754           case 3:
       
 13755             posts = _context.sent;
       
 13756             return _context.abrupt("return", Object(external_this_lodash_["map"])(posts, function (post) {
       
 13757               return {
       
 13758                 id: post.id,
       
 13759                 url: post.url,
       
 13760                 title: Object(external_this_wp_htmlEntities_["decodeEntities"])(post.title) || Object(external_this_wp_i18n_["__"])('(no title)'),
       
 13761                 type: post.subtype || post.type
       
 13762               };
       
 13763             }));
       
 13764 
       
 13765           case 5:
       
 13766           case "end":
       
 13767             return _context.stop();
       
 13768         }
       
 13769       }
       
 13770     }, _callee);
       
 13771   }));
       
 13772 
       
 13773   return function fetchLinkSuggestions(_x) {
       
 13774     return _ref.apply(this, arguments);
       
 13775   };
       
 13776 }();
       
 13777 
       
 13778 var provider_EditorProvider = /*#__PURE__*/function (_Component) {
       
 13779   Object(inherits["a" /* default */])(EditorProvider, _Component);
       
 13780 
       
 13781   var _super = provider_createSuper(EditorProvider);
       
 13782 
       
 13783   function EditorProvider(props) {
       
 13784     var _this;
       
 13785 
       
 13786     Object(classCallCheck["a" /* default */])(this, EditorProvider);
       
 13787 
       
 13788     _this = _super.apply(this, arguments);
       
 13789     _this.getBlockEditorSettings = memize_default()(_this.getBlockEditorSettings, {
       
 13790       maxSize: 1
       
 13791     });
       
 13792     _this.getDefaultBlockContext = memize_default()(_this.getDefaultBlockContext, {
       
 13793       maxSize: 1
       
 13794     }); // Assume that we don't need to initialize in the case of an error recovery.
       
 13795 
       
 13796     if (props.recovery) {
       
 13797       return Object(possibleConstructorReturn["a" /* default */])(_this);
       
 13798     }
       
 13799 
       
 13800     props.updatePostLock(props.settings.postLock);
       
 13801     props.setupEditor(props.post, props.initialEdits, props.settings.template);
       
 13802 
       
 13803     if (props.settings.autosave) {
       
 13804       props.createWarningNotice(Object(external_this_wp_i18n_["__"])('There is an autosave of this post that is more recent than the version below.'), {
       
 13805         id: 'autosave-exists',
 10914         id: 'autosave-exists',
 13806         actions: [{
 10915         actions: [{
 13807           label: Object(external_this_wp_i18n_["__"])('View the autosave'),
 10916           label: Object(external_wp_i18n_["__"])('View the autosave'),
 13808           url: props.settings.autosave.editLink
 10917           url: settings.autosave.editLink
 13809         }]
 10918         }]
 13810       });
 10919       });
 13811     }
 10920     }
 13812 
 10921 
 13813     return _this;
 10922     return () => {
 13814   }
 10923       __experimentalTearDownEditor();
 13815 
 10924     };
 13816   Object(createClass["a" /* default */])(EditorProvider, [{
 10925   }, []); // Synchronize the editor settings as they change
 13817     key: "getBlockEditorSettings",
 10926 
 13818     value: function getBlockEditorSettings(settings, reusableBlocks, __experimentalFetchReusableBlocks, hasUploadPermissions, canUserUseUnfilteredHTML, undo, shouldInsertAtTheTop) {
 10927   Object(external_wp_element_["useEffect"])(() => {
 13819       return provider_objectSpread({}, Object(external_this_lodash_["pick"])(settings, ['__experimentalBlockDirectory', '__experimentalBlockPatterns', '__experimentalBlockPatternCategories', '__experimentalEnableCustomSpacing', '__experimentalEnableLegacyWidgetBlock', '__experimentalEnableLinkColor', '__experimentalEnableFullSiteEditing', '__experimentalEnableFullSiteEditingDemo', '__experimentalFeatures', '__experimentalGlobalStylesUserEntityId', '__experimentalGlobalStylesBase', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', 'alignWide', 'allowedBlockTypes', 'availableLegacyWidgets', 'bodyPlaceholder', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomGradients', 'enableCustomUnits', 'enableCustomLineHeight', 'focusMode', 'fontSizes', 'gradients', 'hasFixedToolbar', 'hasPermissionsToManageWidgets', 'imageEditing', 'imageSizes', 'imageDimensions', 'isRTL', 'keepCaretInsideBlock', 'maxWidth', 'onUpdateDefaultBlockStyles', 'styles', 'template', 'templateLock', 'titlePlaceholder']), {
 10928     updateEditorSettings(settings);
 13820         mediaUpload: hasUploadPermissions ? mediaUpload : undefined,
 10929   }, [settings]);
 13821         __experimentalReusableBlocks: reusableBlocks,
 10930 
 13822         __experimentalFetchReusableBlocks: __experimentalFetchReusableBlocks,
 10931   if (!isReady) {
 13823         __experimentalFetchLinkSuggestions: fetchLinkSuggestions,
 10932     return null;
 13824         __experimentalCanUserUseUnfilteredHTML: canUserUseUnfilteredHTML,
 10933   }
 13825         __experimentalUndo: undo,
 10934 
 13826         __experimentalShouldInsertAtTheTop: shouldInsertAtTheTop
 10935   return Object(external_wp_element_["createElement"])(external_wp_coreData_["EntityProvider"], {
 13827       });
 10936     kind: "root",
 13828     }
 10937     type: "site"
 13829   }, {
 10938   }, Object(external_wp_element_["createElement"])(external_wp_coreData_["EntityProvider"], {
 13830     key: "getDefaultBlockContext",
 10939     kind: "postType",
 13831     value: function getDefaultBlockContext(postId, postType) {
 10940     type: post.type,
 13832       return {
 10941     id: post.id
 13833         postId: postId,
 10942   }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockContextProvider"], {
 13834         postType: postType
 10943     value: defaultBlockContext
 13835       };
 10944   }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockEditorProvider"], {
 13836     }
 10945     value: blocks,
 13837   }, {
 10946     onChange: onChange,
 13838     key: "componentDidMount",
 10947     onInput: onInput,
 13839     value: function componentDidMount() {
 10948     selection: selection,
 13840       this.props.updateEditorSettings(this.props.settings);
 10949     settings: editorSettings,
 13841     }
 10950     useSubRegistry: false
 13842   }, {
 10951   }, children, Object(external_wp_element_["createElement"])(external_wp_reusableBlocks_["ReusableBlocksMenuItems"], null)))));
 13843     key: "componentDidUpdate",
 10952 }
 13844     value: function componentDidUpdate(prevProps) {
 10953 
 13845       if (this.props.settings !== prevProps.settings) {
 10954 /* harmony default export */ var provider = (with_registry_provider(EditorProvider));
 13846         this.props.updateEditorSettings(this.props.settings);
 10955 
 13847       }
 10956 // EXTERNAL MODULE: external ["wp","serverSideRender"]
 13848     }
 10957 var external_wp_serverSideRender_ = __webpack_require__("JREk");
 13849   }, {
 10958 var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_);
 13850     key: "componentWillUnmount",
       
 13851     value: function componentWillUnmount() {
       
 13852       this.props.tearDownEditor();
       
 13853     }
       
 13854   }, {
       
 13855     key: "render",
       
 13856     value: function render() {
       
 13857       var _this$props = this.props,
       
 13858           canUserUseUnfilteredHTML = _this$props.canUserUseUnfilteredHTML,
       
 13859           children = _this$props.children,
       
 13860           post = _this$props.post,
       
 13861           blocks = _this$props.blocks,
       
 13862           resetEditorBlocks = _this$props.resetEditorBlocks,
       
 13863           selectionStart = _this$props.selectionStart,
       
 13864           selectionEnd = _this$props.selectionEnd,
       
 13865           isReady = _this$props.isReady,
       
 13866           settings = _this$props.settings,
       
 13867           reusableBlocks = _this$props.reusableBlocks,
       
 13868           resetEditorBlocksWithoutUndoLevel = _this$props.resetEditorBlocksWithoutUndoLevel,
       
 13869           hasUploadPermissions = _this$props.hasUploadPermissions,
       
 13870           isPostTitleSelected = _this$props.isPostTitleSelected,
       
 13871           __experimentalFetchReusableBlocks = _this$props.__experimentalFetchReusableBlocks,
       
 13872           undo = _this$props.undo;
       
 13873 
       
 13874       if (!isReady) {
       
 13875         return null;
       
 13876       }
       
 13877 
       
 13878       var editorSettings = this.getBlockEditorSettings(settings, reusableBlocks, __experimentalFetchReusableBlocks, hasUploadPermissions, canUserUseUnfilteredHTML, undo, isPostTitleSelected);
       
 13879       var defaultBlockContext = this.getDefaultBlockContext(post.id, post.type);
       
 13880       return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__unstableEditorStyles"], {
       
 13881         styles: settings.styles
       
 13882       }), Object(external_this_wp_element_["createElement"])(external_this_wp_coreData_["EntityProvider"], {
       
 13883         kind: "root",
       
 13884         type: "site"
       
 13885       }, Object(external_this_wp_element_["createElement"])(external_this_wp_coreData_["EntityProvider"], {
       
 13886         kind: "postType",
       
 13887         type: post.type,
       
 13888         id: post.id
       
 13889       }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockContextProvider"], {
       
 13890         value: defaultBlockContext
       
 13891       }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorProvider"], {
       
 13892         value: blocks,
       
 13893         onInput: resetEditorBlocksWithoutUndoLevel,
       
 13894         onChange: resetEditorBlocks,
       
 13895         selectionStart: selectionStart,
       
 13896         selectionEnd: selectionEnd,
       
 13897         settings: editorSettings,
       
 13898         useSubRegistry: false
       
 13899       }, children, Object(external_this_wp_element_["createElement"])(reusable_blocks_buttons, null), Object(external_this_wp_element_["createElement"])(convert_to_group_buttons, null))))));
       
 13900     }
       
 13901   }]);
       
 13902 
       
 13903   return EditorProvider;
       
 13904 }(external_this_wp_element_["Component"]);
       
 13905 
       
 13906 /* harmony default export */ var provider = (Object(external_this_wp_compose_["compose"])([with_registry_provider, Object(external_this_wp_data_["withSelect"])(function (select) {
       
 13907   var _select = select('core/editor'),
       
 13908       canUserUseUnfilteredHTML = _select.canUserUseUnfilteredHTML,
       
 13909       isEditorReady = _select.__unstableIsEditorReady,
       
 13910       getEditorBlocks = _select.getEditorBlocks,
       
 13911       getEditorSelectionStart = _select.getEditorSelectionStart,
       
 13912       getEditorSelectionEnd = _select.getEditorSelectionEnd,
       
 13913       __experimentalGetReusableBlocks = _select.__experimentalGetReusableBlocks,
       
 13914       isPostTitleSelected = _select.isPostTitleSelected;
       
 13915 
       
 13916   var _select2 = select('core'),
       
 13917       canUser = _select2.canUser;
       
 13918 
       
 13919   return {
       
 13920     canUserUseUnfilteredHTML: canUserUseUnfilteredHTML(),
       
 13921     isReady: isEditorReady(),
       
 13922     blocks: getEditorBlocks(),
       
 13923     selectionStart: getEditorSelectionStart(),
       
 13924     selectionEnd: getEditorSelectionEnd(),
       
 13925     reusableBlocks: __experimentalGetReusableBlocks(),
       
 13926     hasUploadPermissions: Object(external_this_lodash_["defaultTo"])(canUser('create', 'media'), true),
       
 13927     // This selector is only defined on mobile.
       
 13928     isPostTitleSelected: isPostTitleSelected && isPostTitleSelected()
       
 13929   };
       
 13930 }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
       
 13931   var _dispatch = dispatch('core/editor'),
       
 13932       setupEditor = _dispatch.setupEditor,
       
 13933       updatePostLock = _dispatch.updatePostLock,
       
 13934       resetEditorBlocks = _dispatch.resetEditorBlocks,
       
 13935       updateEditorSettings = _dispatch.updateEditorSettings,
       
 13936       __experimentalFetchReusableBlocks = _dispatch.__experimentalFetchReusableBlocks,
       
 13937       __experimentalTearDownEditor = _dispatch.__experimentalTearDownEditor,
       
 13938       undo = _dispatch.undo;
       
 13939 
       
 13940   var _dispatch2 = dispatch('core/notices'),
       
 13941       createWarningNotice = _dispatch2.createWarningNotice;
       
 13942 
       
 13943   return {
       
 13944     setupEditor: setupEditor,
       
 13945     updatePostLock: updatePostLock,
       
 13946     createWarningNotice: createWarningNotice,
       
 13947     resetEditorBlocks: resetEditorBlocks,
       
 13948     updateEditorSettings: updateEditorSettings,
       
 13949     resetEditorBlocksWithoutUndoLevel: function resetEditorBlocksWithoutUndoLevel(blocks, options) {
       
 13950       resetEditorBlocks(blocks, provider_objectSpread({}, options, {
       
 13951         __unstableShouldCreateUndoLevel: false
       
 13952       }));
       
 13953     },
       
 13954     tearDownEditor: __experimentalTearDownEditor,
       
 13955     __experimentalFetchReusableBlocks: __experimentalFetchReusableBlocks,
       
 13956     undo: undo
       
 13957   };
       
 13958 })])(provider_EditorProvider));
       
 13959 
       
 13960 // EXTERNAL MODULE: external {"this":["wp","serverSideRender"]}
       
 13961 var external_this_wp_serverSideRender_ = __webpack_require__(83);
       
 13962 var external_this_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_serverSideRender_);
       
 13963 
 10959 
 13964 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/deprecated.js
 10960 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/deprecated.js
 13965 
 10961 
 13966 
 10962 
 13967 // Block Creation Components
 10963 // Block Creation Components
 13972 
 10968 
 13973 
 10969 
 13974 
 10970 
 13975 
 10971 
 13976 
 10972 
 13977 function deprecateComponent(name, Wrapped) {
 10973 function deprecateComponent(name, Wrapped, staticsToHoist = []) {
 13978   var staticsToHoist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
 10974   const Component = Object(external_wp_element_["forwardRef"])((props, ref) => {
 13979   var Component = Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 10975     external_wp_deprecated_default()('wp.editor.' + name, {
 13980     external_this_wp_deprecated_default()('wp.editor.' + name, {
 10976       since: '5.3',
 13981       alternative: 'wp.blockEditor.' + name
 10977       alternative: 'wp.blockEditor.' + name
 13982     });
 10978     });
 13983     return Object(external_this_wp_element_["createElement"])(Wrapped, Object(esm_extends["a" /* default */])({
 10979     return Object(external_wp_element_["createElement"])(Wrapped, Object(esm_extends["a" /* default */])({
 13984       ref: ref
 10980       ref: ref
 13985     }, props));
 10981     }, props));
 13986   });
 10982   });
 13987   staticsToHoist.forEach(function (staticName) {
 10983   staticsToHoist.forEach(staticName => {
 13988     Component[staticName] = deprecateComponent(name + '.' + staticName, Wrapped[staticName]);
 10984     Component[staticName] = deprecateComponent(name + '.' + staticName, Wrapped[staticName]);
 13989   });
 10985   });
 13990   return Component;
 10986   return Component;
 13991 }
 10987 }
 13992 
 10988 
 13993 function deprecateFunction(name, func) {
 10989 function deprecateFunction(name, func) {
 13994   return function () {
 10990   return (...args) => {
 13995     external_this_wp_deprecated_default()('wp.editor.' + name, {
 10991     external_wp_deprecated_default()('wp.editor.' + name, {
       
 10992       since: '5.3',
 13996       alternative: 'wp.blockEditor.' + name
 10993       alternative: 'wp.blockEditor.' + name
 13997     });
 10994     });
 13998     return func.apply(void 0, arguments);
 10995     return func(...args);
 13999   };
 10996   };
 14000 }
 10997 }
 14001 
 10998 
 14002 var RichText = deprecateComponent('RichText', external_this_wp_blockEditor_["RichText"], ['Content']);
 10999 const RichText = deprecateComponent('RichText', external_wp_blockEditor_["RichText"], ['Content']);
 14003 RichText.isEmpty = deprecateFunction('RichText.isEmpty', external_this_wp_blockEditor_["RichText"].isEmpty);
 11000 RichText.isEmpty = deprecateFunction('RichText.isEmpty', external_wp_blockEditor_["RichText"].isEmpty);
 14004 
 11001 
 14005 var Autocomplete = deprecateComponent('Autocomplete', external_this_wp_blockEditor_["Autocomplete"]);
 11002 const Autocomplete = deprecateComponent('Autocomplete', external_wp_blockEditor_["Autocomplete"]);
 14006 var AlignmentToolbar = deprecateComponent('AlignmentToolbar', external_this_wp_blockEditor_["AlignmentToolbar"]);
 11003 const AlignmentToolbar = deprecateComponent('AlignmentToolbar', external_wp_blockEditor_["AlignmentToolbar"]);
 14007 var BlockAlignmentToolbar = deprecateComponent('BlockAlignmentToolbar', external_this_wp_blockEditor_["BlockAlignmentToolbar"]);
 11004 const BlockAlignmentToolbar = deprecateComponent('BlockAlignmentToolbar', external_wp_blockEditor_["BlockAlignmentToolbar"]);
 14008 var BlockControls = deprecateComponent('BlockControls', external_this_wp_blockEditor_["BlockControls"], ['Slot']);
 11005 const BlockControls = deprecateComponent('BlockControls', external_wp_blockEditor_["BlockControls"], ['Slot']);
 14009 var deprecated_BlockEdit = deprecateComponent('BlockEdit', external_this_wp_blockEditor_["BlockEdit"]);
 11006 const deprecated_BlockEdit = deprecateComponent('BlockEdit', external_wp_blockEditor_["BlockEdit"]);
 14010 var BlockEditorKeyboardShortcuts = deprecateComponent('BlockEditorKeyboardShortcuts', external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"]);
 11007 const BlockEditorKeyboardShortcuts = deprecateComponent('BlockEditorKeyboardShortcuts', external_wp_blockEditor_["BlockEditorKeyboardShortcuts"]);
 14011 var BlockFormatControls = deprecateComponent('BlockFormatControls', external_this_wp_blockEditor_["BlockFormatControls"], ['Slot']);
 11008 const BlockFormatControls = deprecateComponent('BlockFormatControls', external_wp_blockEditor_["BlockFormatControls"], ['Slot']);
 14012 var BlockIcon = deprecateComponent('BlockIcon', external_this_wp_blockEditor_["BlockIcon"]);
 11009 const BlockIcon = deprecateComponent('BlockIcon', external_wp_blockEditor_["BlockIcon"]);
 14013 var BlockInspector = deprecateComponent('BlockInspector', external_this_wp_blockEditor_["BlockInspector"]);
 11010 const BlockInspector = deprecateComponent('BlockInspector', external_wp_blockEditor_["BlockInspector"]);
 14014 var BlockList = deprecateComponent('BlockList', external_this_wp_blockEditor_["BlockList"]);
 11011 const BlockList = deprecateComponent('BlockList', external_wp_blockEditor_["BlockList"]);
 14015 var BlockMover = deprecateComponent('BlockMover', external_this_wp_blockEditor_["BlockMover"]);
 11012 const BlockMover = deprecateComponent('BlockMover', external_wp_blockEditor_["BlockMover"]);
 14016 var BlockNavigationDropdown = deprecateComponent('BlockNavigationDropdown', external_this_wp_blockEditor_["BlockNavigationDropdown"]);
 11013 const BlockNavigationDropdown = deprecateComponent('BlockNavigationDropdown', external_wp_blockEditor_["BlockNavigationDropdown"]);
 14017 var BlockSelectionClearer = deprecateComponent('BlockSelectionClearer', external_this_wp_blockEditor_["BlockSelectionClearer"]);
 11014 const BlockSelectionClearer = deprecateComponent('BlockSelectionClearer', external_wp_blockEditor_["BlockSelectionClearer"]);
 14018 var BlockSettingsMenu = deprecateComponent('BlockSettingsMenu', external_this_wp_blockEditor_["BlockSettingsMenu"]);
 11015 const BlockSettingsMenu = deprecateComponent('BlockSettingsMenu', external_wp_blockEditor_["BlockSettingsMenu"]);
 14019 var BlockTitle = deprecateComponent('BlockTitle', external_this_wp_blockEditor_["BlockTitle"]);
 11016 const BlockTitle = deprecateComponent('BlockTitle', external_wp_blockEditor_["BlockTitle"]);
 14020 var BlockToolbar = deprecateComponent('BlockToolbar', external_this_wp_blockEditor_["BlockToolbar"]);
 11017 const BlockToolbar = deprecateComponent('BlockToolbar', external_wp_blockEditor_["BlockToolbar"]);
 14021 var ColorPalette = deprecateComponent('ColorPalette', external_this_wp_blockEditor_["ColorPalette"]);
 11018 const ColorPalette = deprecateComponent('ColorPalette', external_wp_blockEditor_["ColorPalette"]);
 14022 var ContrastChecker = deprecateComponent('ContrastChecker', external_this_wp_blockEditor_["ContrastChecker"]);
 11019 const ContrastChecker = deprecateComponent('ContrastChecker', external_wp_blockEditor_["ContrastChecker"]);
 14023 var CopyHandler = deprecateComponent('CopyHandler', external_this_wp_blockEditor_["CopyHandler"]);
 11020 const CopyHandler = deprecateComponent('CopyHandler', external_wp_blockEditor_["CopyHandler"]);
 14024 var DefaultBlockAppender = deprecateComponent('DefaultBlockAppender', external_this_wp_blockEditor_["DefaultBlockAppender"]);
 11021 const DefaultBlockAppender = deprecateComponent('DefaultBlockAppender', external_wp_blockEditor_["DefaultBlockAppender"]);
 14025 var FontSizePicker = deprecateComponent('FontSizePicker', external_this_wp_blockEditor_["FontSizePicker"]);
 11022 const FontSizePicker = deprecateComponent('FontSizePicker', external_wp_blockEditor_["FontSizePicker"]);
 14026 var Inserter = deprecateComponent('Inserter', external_this_wp_blockEditor_["Inserter"]);
 11023 const Inserter = deprecateComponent('Inserter', external_wp_blockEditor_["Inserter"]);
 14027 var InnerBlocks = deprecateComponent('InnerBlocks', external_this_wp_blockEditor_["InnerBlocks"], ['ButtonBlockAppender', 'DefaultBlockAppender', 'Content']);
 11024 const InnerBlocks = deprecateComponent('InnerBlocks', external_wp_blockEditor_["InnerBlocks"], ['ButtonBlockAppender', 'DefaultBlockAppender', 'Content']);
 14028 var InspectorAdvancedControls = deprecateComponent('InspectorAdvancedControls', external_this_wp_blockEditor_["InspectorAdvancedControls"], ['Slot']);
 11025 const InspectorAdvancedControls = deprecateComponent('InspectorAdvancedControls', external_wp_blockEditor_["InspectorAdvancedControls"], ['Slot']);
 14029 var InspectorControls = deprecateComponent('InspectorControls', external_this_wp_blockEditor_["InspectorControls"], ['Slot']);
 11026 const InspectorControls = deprecateComponent('InspectorControls', external_wp_blockEditor_["InspectorControls"], ['Slot']);
 14030 var PanelColorSettings = deprecateComponent('PanelColorSettings', external_this_wp_blockEditor_["PanelColorSettings"]);
 11027 const PanelColorSettings = deprecateComponent('PanelColorSettings', external_wp_blockEditor_["PanelColorSettings"]);
 14031 var PlainText = deprecateComponent('PlainText', external_this_wp_blockEditor_["PlainText"]);
 11028 const PlainText = deprecateComponent('PlainText', external_wp_blockEditor_["PlainText"]);
 14032 var RichTextShortcut = deprecateComponent('RichTextShortcut', external_this_wp_blockEditor_["RichTextShortcut"]);
 11029 const RichTextShortcut = deprecateComponent('RichTextShortcut', external_wp_blockEditor_["RichTextShortcut"]);
 14033 var RichTextToolbarButton = deprecateComponent('RichTextToolbarButton', external_this_wp_blockEditor_["RichTextToolbarButton"]);
 11030 const RichTextToolbarButton = deprecateComponent('RichTextToolbarButton', external_wp_blockEditor_["RichTextToolbarButton"]);
 14034 var __unstableRichTextInputEvent = deprecateComponent('__unstableRichTextInputEvent', external_this_wp_blockEditor_["__unstableRichTextInputEvent"]);
 11031 const __unstableRichTextInputEvent = deprecateComponent('__unstableRichTextInputEvent', external_wp_blockEditor_["__unstableRichTextInputEvent"]);
 14035 var MediaPlaceholder = deprecateComponent('MediaPlaceholder', external_this_wp_blockEditor_["MediaPlaceholder"]);
 11032 const MediaPlaceholder = deprecateComponent('MediaPlaceholder', external_wp_blockEditor_["MediaPlaceholder"]);
 14036 var MediaUpload = deprecateComponent('MediaUpload', external_this_wp_blockEditor_["MediaUpload"]);
 11033 const MediaUpload = deprecateComponent('MediaUpload', external_wp_blockEditor_["MediaUpload"]);
 14037 var MediaUploadCheck = deprecateComponent('MediaUploadCheck', external_this_wp_blockEditor_["MediaUploadCheck"]);
 11034 const MediaUploadCheck = deprecateComponent('MediaUploadCheck', external_wp_blockEditor_["MediaUploadCheck"]);
 14038 var MultiSelectScrollIntoView = deprecateComponent('MultiSelectScrollIntoView', external_this_wp_blockEditor_["MultiSelectScrollIntoView"]);
 11035 const MultiSelectScrollIntoView = deprecateComponent('MultiSelectScrollIntoView', external_wp_blockEditor_["MultiSelectScrollIntoView"]);
 14039 var NavigableToolbar = deprecateComponent('NavigableToolbar', external_this_wp_blockEditor_["NavigableToolbar"]);
 11036 const NavigableToolbar = deprecateComponent('NavigableToolbar', external_wp_blockEditor_["NavigableToolbar"]);
 14040 var ObserveTyping = deprecateComponent('ObserveTyping', external_this_wp_blockEditor_["ObserveTyping"]);
 11037 const ObserveTyping = deprecateComponent('ObserveTyping', external_wp_blockEditor_["ObserveTyping"]);
 14041 var PreserveScrollInReorder = deprecateComponent('PreserveScrollInReorder', external_this_wp_blockEditor_["PreserveScrollInReorder"]);
 11038 const PreserveScrollInReorder = deprecateComponent('PreserveScrollInReorder', external_wp_blockEditor_["PreserveScrollInReorder"]);
 14042 var SkipToSelectedBlock = deprecateComponent('SkipToSelectedBlock', external_this_wp_blockEditor_["SkipToSelectedBlock"]);
 11039 const SkipToSelectedBlock = deprecateComponent('SkipToSelectedBlock', external_wp_blockEditor_["SkipToSelectedBlock"]);
 14043 var URLInput = deprecateComponent('URLInput', external_this_wp_blockEditor_["URLInput"]);
 11040 const URLInput = deprecateComponent('URLInput', external_wp_blockEditor_["URLInput"]);
 14044 var URLInputButton = deprecateComponent('URLInputButton', external_this_wp_blockEditor_["URLInputButton"]);
 11041 const URLInputButton = deprecateComponent('URLInputButton', external_wp_blockEditor_["URLInputButton"]);
 14045 var URLPopover = deprecateComponent('URLPopover', external_this_wp_blockEditor_["URLPopover"]);
 11042 const URLPopover = deprecateComponent('URLPopover', external_wp_blockEditor_["URLPopover"]);
 14046 var Warning = deprecateComponent('Warning', external_this_wp_blockEditor_["Warning"]);
 11043 const Warning = deprecateComponent('Warning', external_wp_blockEditor_["Warning"]);
 14047 var WritingFlow = deprecateComponent('WritingFlow', external_this_wp_blockEditor_["WritingFlow"]);
 11044 const WritingFlow = deprecateComponent('WritingFlow', external_wp_blockEditor_["WritingFlow"]);
 14048 var createCustomColorsHOC = deprecateFunction('createCustomColorsHOC', external_this_wp_blockEditor_["createCustomColorsHOC"]);
 11045 const createCustomColorsHOC = deprecateFunction('createCustomColorsHOC', external_wp_blockEditor_["createCustomColorsHOC"]);
 14049 var getColorClassName = deprecateFunction('getColorClassName', external_this_wp_blockEditor_["getColorClassName"]);
 11046 const getColorClassName = deprecateFunction('getColorClassName', external_wp_blockEditor_["getColorClassName"]);
 14050 var getColorObjectByAttributeValues = deprecateFunction('getColorObjectByAttributeValues', external_this_wp_blockEditor_["getColorObjectByAttributeValues"]);
 11047 const getColorObjectByAttributeValues = deprecateFunction('getColorObjectByAttributeValues', external_wp_blockEditor_["getColorObjectByAttributeValues"]);
 14051 var getColorObjectByColorValue = deprecateFunction('getColorObjectByColorValue', external_this_wp_blockEditor_["getColorObjectByColorValue"]);
 11048 const getColorObjectByColorValue = deprecateFunction('getColorObjectByColorValue', external_wp_blockEditor_["getColorObjectByColorValue"]);
 14052 var getFontSize = deprecateFunction('getFontSize', external_this_wp_blockEditor_["getFontSize"]);
 11049 const getFontSize = deprecateFunction('getFontSize', external_wp_blockEditor_["getFontSize"]);
 14053 var getFontSizeClass = deprecateFunction('getFontSizeClass', external_this_wp_blockEditor_["getFontSizeClass"]);
 11050 const getFontSizeClass = deprecateFunction('getFontSizeClass', external_wp_blockEditor_["getFontSizeClass"]);
 14054 var withColorContext = deprecateFunction('withColorContext', external_this_wp_blockEditor_["withColorContext"]);
 11051 const withColorContext = deprecateFunction('withColorContext', external_wp_blockEditor_["withColorContext"]);
 14055 var withColors = deprecateFunction('withColors', external_this_wp_blockEditor_["withColors"]);
 11052 const withColors = deprecateFunction('withColors', external_wp_blockEditor_["withColors"]);
 14056 var withFontSizes = deprecateFunction('withFontSizes', external_this_wp_blockEditor_["withFontSizes"]);
 11053 const withFontSizes = deprecateFunction('withFontSizes', external_wp_blockEditor_["withFontSizes"]);
 14057 
 11054 
 14058 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/index.js
 11055 // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/index.js
 14059 // Block Creation Components
 11056 // Block Creation Components
 14060  // Post Related Components
 11057  // Post Related Components
 14061 
 11058 
 14113 
 11110 
 14114 
 11111 
 14115 
 11112 
 14116 
 11113 
 14117 
 11114 
       
 11115 
 14118  // State Related Components
 11116  // State Related Components
 14119 
 11117 
 14120 
 11118 
 14121 
 11119 
 14122 
 11120 
 14133  * WordPress dependencies
 11131  * WordPress dependencies
 14134  */
 11132  */
 14135 
 11133 
 14136 
 11134 
 14137 
 11135 
 14138 
       
 14139 
       
 14140 
       
 14141 
       
 14142 /**
 11136 /**
 14143  * Internal dependencies
 11137  * Internal dependencies
 14144  */
 11138  */
 14145 
       
 14146 
 11139 
 14147 
 11140 
 14148 
 11141 
 14149 
 11142 
 14150 
 11143 
 14155 
 11148 
 14156 
 11149 
 14157 
 11150 
 14158 /***/ }),
 11151 /***/ }),
 14159 
 11152 
 14160 /***/ 45:
 11153 /***/ "RMJe":
       
 11154 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11155 
       
 11156 "use strict";
       
 11157 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 11158 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11159 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
 11160 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11161 
       
 11162 
       
 11163 /**
       
 11164  * WordPress dependencies
       
 11165  */
       
 11166 
       
 11167 const check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11168   xmlns: "http://www.w3.org/2000/svg",
       
 11169   viewBox: "0 0 24 24"
       
 11170 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11171   d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
       
 11172 }));
       
 11173 /* harmony default export */ __webpack_exports__["a"] = (check);
       
 11174 
       
 11175 
       
 11176 /***/ }),
       
 11177 
       
 11178 /***/ "Rk8H":
       
 11179 /***/ (function(module, exports, __webpack_require__) {
       
 11180 
       
 11181 // Load in dependencies
       
 11182 var computedStyle = __webpack_require__("jTPX");
       
 11183 
       
 11184 /**
       
 11185  * Calculate the `line-height` of a given node
       
 11186  * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
       
 11187  * @returns {Number} `line-height` of the element in pixels
       
 11188  */
       
 11189 function lineHeight(node) {
       
 11190   // Grab the line-height via style
       
 11191   var lnHeightStr = computedStyle(node, 'line-height');
       
 11192   var lnHeight = parseFloat(lnHeightStr, 10);
       
 11193 
       
 11194   // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
       
 11195   if (lnHeightStr === lnHeight + '') {
       
 11196     // Save the old lineHeight style and update the em unit to the element
       
 11197     var _lnHeightStyle = node.style.lineHeight;
       
 11198     node.style.lineHeight = lnHeightStr + 'em';
       
 11199 
       
 11200     // Calculate the em based height
       
 11201     lnHeightStr = computedStyle(node, 'line-height');
       
 11202     lnHeight = parseFloat(lnHeightStr, 10);
       
 11203 
       
 11204     // Revert the lineHeight style
       
 11205     if (_lnHeightStyle) {
       
 11206       node.style.lineHeight = _lnHeightStyle;
       
 11207     } else {
       
 11208       delete node.style.lineHeight;
       
 11209     }
       
 11210   }
       
 11211 
       
 11212   // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
       
 11213   // DEV: `em` units are converted to `pt` in IE6
       
 11214   // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
       
 11215   if (lnHeightStr.indexOf('pt') !== -1) {
       
 11216     lnHeight *= 4;
       
 11217     lnHeight /= 3;
       
 11218   // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
       
 11219   } else if (lnHeightStr.indexOf('mm') !== -1) {
       
 11220     lnHeight *= 96;
       
 11221     lnHeight /= 25.4;
       
 11222   // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
       
 11223   } else if (lnHeightStr.indexOf('cm') !== -1) {
       
 11224     lnHeight *= 96;
       
 11225     lnHeight /= 2.54;
       
 11226   // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
       
 11227   } else if (lnHeightStr.indexOf('in') !== -1) {
       
 11228     lnHeight *= 96;
       
 11229   // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
       
 11230   } else if (lnHeightStr.indexOf('pc') !== -1) {
       
 11231     lnHeight *= 16;
       
 11232   }
       
 11233 
       
 11234   // Continue our computation
       
 11235   lnHeight = Math.round(lnHeight);
       
 11236 
       
 11237   // If the line-height is "normal", calculate by font-size
       
 11238   if (lnHeightStr === 'normal') {
       
 11239     // Create a temporary node
       
 11240     var nodeName = node.nodeName;
       
 11241     var _node = document.createElement(nodeName);
       
 11242     _node.innerHTML = '&nbsp;';
       
 11243 
       
 11244     // If we have a text area, reset it to only 1 row
       
 11245     // https://github.com/twolfson/line-height/issues/4
       
 11246     if (nodeName.toUpperCase() === 'TEXTAREA') {
       
 11247       _node.setAttribute('rows', '1');
       
 11248     }
       
 11249 
       
 11250     // Set the font-size of the element
       
 11251     var fontSizeStr = computedStyle(node, 'font-size');
       
 11252     _node.style.fontSize = fontSizeStr;
       
 11253 
       
 11254     // Remove default padding/border which can affect offset height
       
 11255     // https://github.com/twolfson/line-height/issues/4
       
 11256     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
       
 11257     _node.style.padding = '0px';
       
 11258     _node.style.border = '0px';
       
 11259 
       
 11260     // Append it to the body
       
 11261     var body = document.body;
       
 11262     body.appendChild(_node);
       
 11263 
       
 11264     // Assume the line height of the element is the height
       
 11265     var height = _node.offsetHeight;
       
 11266     lnHeight = height;
       
 11267 
       
 11268     // Remove our child from the DOM
       
 11269     body.removeChild(_node);
       
 11270   }
       
 11271 
       
 11272   // Return the calculated height
       
 11273   return lnHeight;
       
 11274 }
       
 11275 
       
 11276 // Export lineHeight
       
 11277 module.exports = lineHeight;
       
 11278 
       
 11279 
       
 11280 /***/ }),
       
 11281 
       
 11282 /***/ "RxS6":
 14161 /***/ (function(module, exports) {
 11283 /***/ (function(module, exports) {
 14162 
 11284 
 14163 (function() { module.exports = this["wp"]["apiFetch"]; }());
 11285 (function() { module.exports = window["wp"]["keycodes"]; }());
 14164 
 11286 
 14165 /***/ }),
 11287 /***/ }),
 14166 
 11288 
 14167 /***/ 5:
 11289 /***/ "TSYQ":
 14168 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 14169 
       
 14170 "use strict";
       
 14171 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
       
 14172 function _defineProperty(obj, key, value) {
       
 14173   if (key in obj) {
       
 14174     Object.defineProperty(obj, key, {
       
 14175       value: value,
       
 14176       enumerable: true,
       
 14177       configurable: true,
       
 14178       writable: true
       
 14179     });
       
 14180   } else {
       
 14181     obj[key] = value;
       
 14182   }
       
 14183 
       
 14184   return obj;
       
 14185 }
       
 14186 
       
 14187 /***/ }),
       
 14188 
       
 14189 /***/ 50:
       
 14190 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 14191 
       
 14192 "use strict";
       
 14193 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
       
 14194 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
       
 14195   try {
       
 14196     var info = gen[key](arg);
       
 14197     var value = info.value;
       
 14198   } catch (error) {
       
 14199     reject(error);
       
 14200     return;
       
 14201   }
       
 14202 
       
 14203   if (info.done) {
       
 14204     resolve(value);
       
 14205   } else {
       
 14206     Promise.resolve(value).then(_next, _throw);
       
 14207   }
       
 14208 }
       
 14209 
       
 14210 function _asyncToGenerator(fn) {
       
 14211   return function () {
       
 14212     var self = this,
       
 14213         args = arguments;
       
 14214     return new Promise(function (resolve, reject) {
       
 14215       var gen = fn.apply(self, args);
       
 14216 
       
 14217       function _next(value) {
       
 14218         asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
       
 14219       }
       
 14220 
       
 14221       function _throw(err) {
       
 14222         asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
       
 14223       }
       
 14224 
       
 14225       _next(undefined);
       
 14226     });
       
 14227   };
       
 14228 }
       
 14229 
       
 14230 /***/ }),
       
 14231 
       
 14232 /***/ 52:
       
 14233 /***/ (function(module, exports) {
       
 14234 
       
 14235 (function() { module.exports = this["wp"]["keyboardShortcuts"]; }());
       
 14236 
       
 14237 /***/ }),
       
 14238 
       
 14239 /***/ 6:
       
 14240 /***/ (function(module, exports) {
       
 14241 
       
 14242 (function() { module.exports = this["wp"]["primitives"]; }());
       
 14243 
       
 14244 /***/ }),
       
 14245 
       
 14246 /***/ 60:
       
 14247 /***/ (function(module, exports, __webpack_require__) {
 11290 /***/ (function(module, exports, __webpack_require__) {
 14248 
 11291 
 14249 /**
 11292 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 14250  * Memize options object.
 11293   Copyright (c) 2018 Jed Watson.
 14251  *
 11294   Licensed under the MIT License (MIT), see
 14252  * @typedef MemizeOptions
 11295   http://jedwatson.github.io/classnames
 14253  *
 11296 */
 14254  * @property {number} [maxSize] Maximum size of the cache.
 11297 /* global define */
 14255  */
 11298 
 14256 
 11299 (function () {
 14257 /**
 11300 	'use strict';
 14258  * Internal cache entry.
 11301 
 14259  *
 11302 	var hasOwn = {}.hasOwnProperty;
 14260  * @typedef MemizeCacheNode
 11303 
 14261  *
 11304 	function classNames() {
 14262  * @property {?MemizeCacheNode|undefined} [prev] Previous node.
 11305 		var classes = [];
 14263  * @property {?MemizeCacheNode|undefined} [next] Next node.
 11306 
 14264  * @property {Array<*>}                   args   Function arguments for cache
 11307 		for (var i = 0; i < arguments.length; i++) {
 14265  *                                               entry.
 11308 			var arg = arguments[i];
 14266  * @property {*}                          val    Function result.
 11309 			if (!arg) continue;
 14267  */
 11310 
 14268 
 11311 			var argType = typeof arg;
 14269 /**
 11312 
 14270  * Properties of the enhanced function for controlling cache.
 11313 			if (argType === 'string' || argType === 'number') {
 14271  *
 11314 				classes.push(arg);
 14272  * @typedef MemizeMemoizedFunction
 11315 			} else if (Array.isArray(arg)) {
 14273  *
 11316 				if (arg.length) {
 14274  * @property {()=>void} clear Clear the cache.
 11317 					var inner = classNames.apply(null, arg);
 14275  */
 11318 					if (inner) {
 14276 
 11319 						classes.push(inner);
 14277 /**
 11320 					}
 14278  * Accepts a function to be memoized, and returns a new memoized function, with
 11321 				}
 14279  * optional options.
 11322 			} else if (argType === 'object') {
 14280  *
 11323 				if (arg.toString === Object.prototype.toString) {
 14281  * @template {Function} F
 11324 					for (var key in arg) {
 14282  *
 11325 						if (hasOwn.call(arg, key) && arg[key]) {
 14283  * @param {F}             fn        Function to memoize.
 11326 							classes.push(key);
 14284  * @param {MemizeOptions} [options] Options object.
 11327 						}
 14285  *
 11328 					}
 14286  * @return {F & MemizeMemoizedFunction} Memoized function.
 11329 				} else {
 14287  */
 11330 					classes.push(arg.toString());
 14288 function memize( fn, options ) {
       
 14289 	var size = 0;
       
 14290 
       
 14291 	/** @type {?MemizeCacheNode|undefined} */
       
 14292 	var head;
       
 14293 
       
 14294 	/** @type {?MemizeCacheNode|undefined} */
       
 14295 	var tail;
       
 14296 
       
 14297 	options = options || {};
       
 14298 
       
 14299 	function memoized( /* ...args */ ) {
       
 14300 		var node = head,
       
 14301 			len = arguments.length,
       
 14302 			args, i;
       
 14303 
       
 14304 		searchCache: while ( node ) {
       
 14305 			// Perform a shallow equality test to confirm that whether the node
       
 14306 			// under test is a candidate for the arguments passed. Two arrays
       
 14307 			// are shallowly equal if their length matches and each entry is
       
 14308 			// strictly equal between the two sets. Avoid abstracting to a
       
 14309 			// function which could incur an arguments leaking deoptimization.
       
 14310 
       
 14311 			// Check whether node arguments match arguments length
       
 14312 			if ( node.args.length !== arguments.length ) {
       
 14313 				node = node.next;
       
 14314 				continue;
       
 14315 			}
       
 14316 
       
 14317 			// Check whether node arguments match arguments values
       
 14318 			for ( i = 0; i < len; i++ ) {
       
 14319 				if ( node.args[ i ] !== arguments[ i ] ) {
       
 14320 					node = node.next;
       
 14321 					continue searchCache;
       
 14322 				}
 11331 				}
 14323 			}
 11332 			}
 14324 
 11333 		}
 14325 			// At this point we can assume we've found a match
 11334 
 14326 
 11335 		return classes.join(' ');
 14327 			// Surface matched node to head if not already
 11336 	}
 14328 			if ( node !== head ) {
 11337 
 14329 				// As tail, shift to previous. Must only shift if not also
 11338 	if ( true && module.exports) {
 14330 				// head, since if both head and tail, there is no previous.
 11339 		classNames.default = classNames;
 14331 				if ( node === tail ) {
 11340 		module.exports = classNames;
 14332 					tail = node.prev;
 11341 	} else if (true) {
 14333 				}
 11342 		// register as 'classnames', consistent with npm package name
 14334 
 11343 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 14335 				// Adjust siblings to point to each other. If node was tail,
 11344 			return classNames;
 14336 				// this also handles new tail's empty `next` assignment.
 11345 		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 14337 				/** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
 11346 				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 14338 				if ( node.next ) {
 11347 	} else {}
 14339 					node.next.prev = node.prev;
 11348 }());
 14340 				}
 11349 
 14341 
 11350 
 14342 				node.next = head;
 11351 /***/ }),
 14343 				node.prev = null;
 11352 
 14344 				/** @type {MemizeCacheNode} */ ( head ).prev = node;
 11353 /***/ "Tqx9":
 14345 				head = node;
 11354 /***/ (function(module, exports) {
       
 11355 
       
 11356 (function() { module.exports = window["wp"]["primitives"]; }());
       
 11357 
       
 11358 /***/ }),
       
 11359 
       
 11360 /***/ "WbBG":
       
 11361 /***/ (function(module, exports, __webpack_require__) {
       
 11362 
       
 11363 "use strict";
       
 11364 /**
       
 11365  * Copyright (c) 2013-present, Facebook, Inc.
       
 11366  *
       
 11367  * This source code is licensed under the MIT license found in the
       
 11368  * LICENSE file in the root directory of this source tree.
       
 11369  */
       
 11370 
       
 11371 
       
 11372 
       
 11373 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
       
 11374 
       
 11375 module.exports = ReactPropTypesSecret;
       
 11376 
       
 11377 
       
 11378 /***/ }),
       
 11379 
       
 11380 /***/ "YLtl":
       
 11381 /***/ (function(module, exports) {
       
 11382 
       
 11383 (function() { module.exports = window["lodash"]; }());
       
 11384 
       
 11385 /***/ }),
       
 11386 
       
 11387 /***/ "axFQ":
       
 11388 /***/ (function(module, exports) {
       
 11389 
       
 11390 (function() { module.exports = window["wp"]["blockEditor"]; }());
       
 11391 
       
 11392 /***/ }),
       
 11393 
       
 11394 /***/ "bWcr":
       
 11395 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11396 
       
 11397 "use strict";
       
 11398 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 11399 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11400 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
 11401 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11402 
       
 11403 
       
 11404 /**
       
 11405  * WordPress dependencies
       
 11406  */
       
 11407 
       
 11408 const closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11409   xmlns: "http://www.w3.org/2000/svg",
       
 11410   viewBox: "0 0 24 24"
       
 11411 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11412   d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
       
 11413 }));
       
 11414 /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
       
 11415 
       
 11416 
       
 11417 /***/ }),
       
 11418 
       
 11419 /***/ "cDcd":
       
 11420 /***/ (function(module, exports) {
       
 11421 
       
 11422 (function() { module.exports = window["React"]; }());
       
 11423 
       
 11424 /***/ }),
       
 11425 
       
 11426 /***/ "diJD":
       
 11427 /***/ (function(module, exports) {
       
 11428 
       
 11429 (function() { module.exports = window["wp"]["reusableBlocks"]; }());
       
 11430 
       
 11431 /***/ }),
       
 11432 
       
 11433 /***/ "g56x":
       
 11434 /***/ (function(module, exports) {
       
 11435 
       
 11436 (function() { module.exports = window["wp"]["hooks"]; }());
       
 11437 
       
 11438 /***/ }),
       
 11439 
       
 11440 /***/ "hF7m":
       
 11441 /***/ (function(module, exports) {
       
 11442 
       
 11443 (function() { module.exports = window["wp"]["keyboardShortcuts"]; }());
       
 11444 
       
 11445 /***/ }),
       
 11446 
       
 11447 /***/ "iClF":
       
 11448 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11449 
       
 11450 "use strict";
       
 11451 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 11452 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11453 /**
       
 11454  * WordPress dependencies
       
 11455  */
       
 11456 
       
 11457 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
       
 11458 
       
 11459 /**
       
 11460  * Return an SVG icon.
       
 11461  *
       
 11462  * @param {IconProps} props icon is the SVG component to render
       
 11463  *                          size is a number specifiying the icon size in pixels
       
 11464  *                          Other props will be passed to wrapped SVG component
       
 11465  *
       
 11466  * @return {JSX.Element}  Icon component
       
 11467  */
       
 11468 
       
 11469 function Icon({
       
 11470   icon,
       
 11471   size = 24,
       
 11472   ...props
       
 11473 }) {
       
 11474   return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, {
       
 11475     width: size,
       
 11476     height: size,
       
 11477     ...props
       
 11478   });
       
 11479 }
       
 11480 
       
 11481 /* harmony default export */ __webpack_exports__["a"] = (Icon);
       
 11482 
       
 11483 
       
 11484 /***/ }),
       
 11485 
       
 11486 /***/ "jTPX":
       
 11487 /***/ (function(module, exports) {
       
 11488 
       
 11489 // This code has been refactored for 140 bytes
       
 11490 // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
       
 11491 var computedStyle = function (el, prop, getComputedStyle) {
       
 11492   getComputedStyle = window.getComputedStyle;
       
 11493 
       
 11494   // In one fell swoop
       
 11495   return (
       
 11496     // If we have getComputedStyle
       
 11497     getComputedStyle ?
       
 11498       // Query it
       
 11499       // TODO: From CSS-Query notes, we might need (node, null) for FF
       
 11500       getComputedStyle(el) :
       
 11501 
       
 11502     // Otherwise, we are in IE and use currentStyle
       
 11503       el.currentStyle
       
 11504   )[
       
 11505     // Switch to camelCase for CSSOM
       
 11506     // DEV: Grabbed from jQuery
       
 11507     // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
       
 11508     // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
       
 11509     prop.replace(/-(\w)/gi, function (word, letter) {
       
 11510       return letter.toUpperCase();
       
 11511     })
       
 11512   ];
       
 11513 };
       
 11514 
       
 11515 module.exports = computedStyle;
       
 11516 
       
 11517 
       
 11518 /***/ }),
       
 11519 
       
 11520 /***/ "jZUy":
       
 11521 /***/ (function(module, exports) {
       
 11522 
       
 11523 (function() { module.exports = window["wp"]["coreData"]; }());
       
 11524 
       
 11525 /***/ }),
       
 11526 
       
 11527 /***/ "l3Sj":
       
 11528 /***/ (function(module, exports) {
       
 11529 
       
 11530 (function() { module.exports = window["wp"]["i18n"]; }());
       
 11531 
       
 11532 /***/ }),
       
 11533 
       
 11534 /***/ "onLe":
       
 11535 /***/ (function(module, exports) {
       
 11536 
       
 11537 (function() { module.exports = window["wp"]["notices"]; }());
       
 11538 
       
 11539 /***/ }),
       
 11540 
       
 11541 /***/ "pPDe":
       
 11542 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11543 
       
 11544 "use strict";
       
 11545 
       
 11546 
       
 11547 var LEAF_KEY, hasWeakMap;
       
 11548 
       
 11549 /**
       
 11550  * Arbitrary value used as key for referencing cache object in WeakMap tree.
       
 11551  *
       
 11552  * @type {Object}
       
 11553  */
       
 11554 LEAF_KEY = {};
       
 11555 
       
 11556 /**
       
 11557  * Whether environment supports WeakMap.
       
 11558  *
       
 11559  * @type {boolean}
       
 11560  */
       
 11561 hasWeakMap = typeof WeakMap !== 'undefined';
       
 11562 
       
 11563 /**
       
 11564  * Returns the first argument as the sole entry in an array.
       
 11565  *
       
 11566  * @param {*} value Value to return.
       
 11567  *
       
 11568  * @return {Array} Value returned as entry in array.
       
 11569  */
       
 11570 function arrayOf( value ) {
       
 11571 	return [ value ];
       
 11572 }
       
 11573 
       
 11574 /**
       
 11575  * Returns true if the value passed is object-like, or false otherwise. A value
       
 11576  * is object-like if it can support property assignment, e.g. object or array.
       
 11577  *
       
 11578  * @param {*} value Value to test.
       
 11579  *
       
 11580  * @return {boolean} Whether value is object-like.
       
 11581  */
       
 11582 function isObjectLike( value ) {
       
 11583 	return !! value && 'object' === typeof value;
       
 11584 }
       
 11585 
       
 11586 /**
       
 11587  * Creates and returns a new cache object.
       
 11588  *
       
 11589  * @return {Object} Cache object.
       
 11590  */
       
 11591 function createCache() {
       
 11592 	var cache = {
       
 11593 		clear: function() {
       
 11594 			cache.head = null;
       
 11595 		},
       
 11596 	};
       
 11597 
       
 11598 	return cache;
       
 11599 }
       
 11600 
       
 11601 /**
       
 11602  * Returns true if entries within the two arrays are strictly equal by
       
 11603  * reference from a starting index.
       
 11604  *
       
 11605  * @param {Array}  a         First array.
       
 11606  * @param {Array}  b         Second array.
       
 11607  * @param {number} fromIndex Index from which to start comparison.
       
 11608  *
       
 11609  * @return {boolean} Whether arrays are shallowly equal.
       
 11610  */
       
 11611 function isShallowEqual( a, b, fromIndex ) {
       
 11612 	var i;
       
 11613 
       
 11614 	if ( a.length !== b.length ) {
       
 11615 		return false;
       
 11616 	}
       
 11617 
       
 11618 	for ( i = fromIndex; i < a.length; i++ ) {
       
 11619 		if ( a[ i ] !== b[ i ] ) {
       
 11620 			return false;
       
 11621 		}
       
 11622 	}
       
 11623 
       
 11624 	return true;
       
 11625 }
       
 11626 
       
 11627 /**
       
 11628  * Returns a memoized selector function. The getDependants function argument is
       
 11629  * called before the memoized selector and is expected to return an immutable
       
 11630  * reference or array of references on which the selector depends for computing
       
 11631  * its own return value. The memoize cache is preserved only as long as those
       
 11632  * dependant references remain the same. If getDependants returns a different
       
 11633  * reference(s), the cache is cleared and the selector value regenerated.
       
 11634  *
       
 11635  * @param {Function} selector      Selector function.
       
 11636  * @param {Function} getDependants Dependant getter returning an immutable
       
 11637  *                                 reference or array of reference used in
       
 11638  *                                 cache bust consideration.
       
 11639  *
       
 11640  * @return {Function} Memoized selector.
       
 11641  */
       
 11642 /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
       
 11643 	var rootCache, getCache;
       
 11644 
       
 11645 	// Use object source as dependant if getter not provided
       
 11646 	if ( ! getDependants ) {
       
 11647 		getDependants = arrayOf;
       
 11648 	}
       
 11649 
       
 11650 	/**
       
 11651 	 * Returns the root cache. If WeakMap is supported, this is assigned to the
       
 11652 	 * root WeakMap cache set, otherwise it is a shared instance of the default
       
 11653 	 * cache object.
       
 11654 	 *
       
 11655 	 * @return {(WeakMap|Object)} Root cache object.
       
 11656 	 */
       
 11657 	function getRootCache() {
       
 11658 		return rootCache;
       
 11659 	}
       
 11660 
       
 11661 	/**
       
 11662 	 * Returns the cache for a given dependants array. When possible, a WeakMap
       
 11663 	 * will be used to create a unique cache for each set of dependants. This
       
 11664 	 * is feasible due to the nature of WeakMap in allowing garbage collection
       
 11665 	 * to occur on entries where the key object is no longer referenced. Since
       
 11666 	 * WeakMap requires the key to be an object, this is only possible when the
       
 11667 	 * dependant is object-like. The root cache is created as a hierarchy where
       
 11668 	 * each top-level key is the first entry in a dependants set, the value a
       
 11669 	 * WeakMap where each key is the next dependant, and so on. This continues
       
 11670 	 * so long as the dependants are object-like. If no dependants are object-
       
 11671 	 * like, then the cache is shared across all invocations.
       
 11672 	 *
       
 11673 	 * @see isObjectLike
       
 11674 	 *
       
 11675 	 * @param {Array} dependants Selector dependants.
       
 11676 	 *
       
 11677 	 * @return {Object} Cache object.
       
 11678 	 */
       
 11679 	function getWeakMapCache( dependants ) {
       
 11680 		var caches = rootCache,
       
 11681 			isUniqueByDependants = true,
       
 11682 			i, dependant, map, cache;
       
 11683 
       
 11684 		for ( i = 0; i < dependants.length; i++ ) {
       
 11685 			dependant = dependants[ i ];
       
 11686 
       
 11687 			// Can only compose WeakMap from object-like key.
       
 11688 			if ( ! isObjectLike( dependant ) ) {
       
 11689 				isUniqueByDependants = false;
       
 11690 				break;
 14346 			}
 11691 			}
 14347 
 11692 
 14348 			// Return immediately
 11693 			// Does current segment of cache already have a WeakMap?
 14349 			return node.val;
 11694 			if ( caches.has( dependant ) ) {
       
 11695 				// Traverse into nested WeakMap.
       
 11696 				caches = caches.get( dependant );
       
 11697 			} else {
       
 11698 				// Create, set, and traverse into a new one.
       
 11699 				map = new WeakMap();
       
 11700 				caches.set( dependant, map );
       
 11701 				caches = map;
       
 11702 			}
 14350 		}
 11703 		}
 14351 
 11704 
 14352 		// No cached value found. Continue to insertion phase:
 11705 		// We use an arbitrary (but consistent) object as key for the last item
 14353 
 11706 		// in the WeakMap to serve as our running cache.
 14354 		// Create a copy of arguments (avoid leaking deoptimization)
 11707 		if ( ! caches.has( LEAF_KEY ) ) {
       
 11708 			cache = createCache();
       
 11709 			cache.isUniqueByDependants = isUniqueByDependants;
       
 11710 			caches.set( LEAF_KEY, cache );
       
 11711 		}
       
 11712 
       
 11713 		return caches.get( LEAF_KEY );
       
 11714 	}
       
 11715 
       
 11716 	// Assign cache handler by availability of WeakMap
       
 11717 	getCache = hasWeakMap ? getWeakMapCache : getRootCache;
       
 11718 
       
 11719 	/**
       
 11720 	 * Resets root memoization cache.
       
 11721 	 */
       
 11722 	function clear() {
       
 11723 		rootCache = hasWeakMap ? new WeakMap() : createCache();
       
 11724 	}
       
 11725 
       
 11726 	// eslint-disable-next-line jsdoc/check-param-names
       
 11727 	/**
       
 11728 	 * The augmented selector call, considering first whether dependants have
       
 11729 	 * changed before passing it to underlying memoize function.
       
 11730 	 *
       
 11731 	 * @param {Object} source    Source object for derivation.
       
 11732 	 * @param {...*}   extraArgs Additional arguments to pass to selector.
       
 11733 	 *
       
 11734 	 * @return {*} Selector result.
       
 11735 	 */
       
 11736 	function callSelector( /* source, ...extraArgs */ ) {
       
 11737 		var len = arguments.length,
       
 11738 			cache, node, i, args, dependants;
       
 11739 
       
 11740 		// Create copy of arguments (avoid leaking deoptimization).
 14355 		args = new Array( len );
 11741 		args = new Array( len );
 14356 		for ( i = 0; i < len; i++ ) {
 11742 		for ( i = 0; i < len; i++ ) {
 14357 			args[ i ] = arguments[ i ];
 11743 			args[ i ] = arguments[ i ];
 14358 		}
 11744 		}
 14359 
 11745 
       
 11746 		dependants = getDependants.apply( null, args );
       
 11747 		cache = getCache( dependants );
       
 11748 
       
 11749 		// If not guaranteed uniqueness by dependants (primitive type or lack
       
 11750 		// of WeakMap support), shallow compare against last dependants and, if
       
 11751 		// references have changed, destroy cache to recalculate result.
       
 11752 		if ( ! cache.isUniqueByDependants ) {
       
 11753 			if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
       
 11754 				cache.clear();
       
 11755 			}
       
 11756 
       
 11757 			cache.lastDependants = dependants;
       
 11758 		}
       
 11759 
       
 11760 		node = cache.head;
       
 11761 		while ( node ) {
       
 11762 			// Check whether node arguments match arguments
       
 11763 			if ( ! isShallowEqual( node.args, args, 1 ) ) {
       
 11764 				node = node.next;
       
 11765 				continue;
       
 11766 			}
       
 11767 
       
 11768 			// At this point we can assume we've found a match
       
 11769 
       
 11770 			// Surface matched node to head if not already
       
 11771 			if ( node !== cache.head ) {
       
 11772 				// Adjust siblings to point to each other.
       
 11773 				node.prev.next = node.next;
       
 11774 				if ( node.next ) {
       
 11775 					node.next.prev = node.prev;
       
 11776 				}
       
 11777 
       
 11778 				node.next = cache.head;
       
 11779 				node.prev = null;
       
 11780 				cache.head.prev = node;
       
 11781 				cache.head = node;
       
 11782 			}
       
 11783 
       
 11784 			// Return immediately
       
 11785 			return node.val;
       
 11786 		}
       
 11787 
       
 11788 		// No cached value found. Continue to insertion phase:
       
 11789 
 14360 		node = {
 11790 		node = {
 14361 			args: args,
       
 14362 
       
 14363 			// Generate the result from original function
 11791 			// Generate the result from original function
 14364 			val: fn.apply( null, args ),
 11792 			val: selector.apply( null, args ),
 14365 		};
 11793 		};
       
 11794 
       
 11795 		// Avoid including the source object in the cache.
       
 11796 		args[ 0 ] = null;
       
 11797 		node.args = args;
 14366 
 11798 
 14367 		// Don't need to check whether node is already head, since it would
 11799 		// Don't need to check whether node is already head, since it would
 14368 		// have been returned above already if it was
 11800 		// have been returned above already if it was
 14369 
 11801 
 14370 		// Shift existing head down list
 11802 		// Shift existing head down list
 14371 		if ( head ) {
 11803 		if ( cache.head ) {
 14372 			head.prev = node;
 11804 			cache.head.prev = node;
 14373 			node.next = head;
 11805 			node.next = cache.head;
 14374 		} else {
       
 14375 			// If no head, follows that there's no tail (at initial or reset)
       
 14376 			tail = node;
       
 14377 		}
 11806 		}
 14378 
 11807 
 14379 		// Trim tail if we're reached max size and are pending cache insertion
 11808 		cache.head = node;
 14380 		if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
       
 14381 			tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
       
 14382 			/** @type {MemizeCacheNode} */ ( tail ).next = null;
       
 14383 		} else {
       
 14384 			size++;
       
 14385 		}
       
 14386 
       
 14387 		head = node;
       
 14388 
 11809 
 14389 		return node.val;
 11810 		return node.val;
 14390 	}
 11811 	}
 14391 
 11812 
 14392 	memoized.clear = function() {
 11813 	callSelector.getDependants = getDependants;
 14393 		head = null;
 11814 	callSelector.clear = clear;
 14394 		tail = null;
 11815 	clear();
 14395 		size = 0;
 11816 
 14396 	};
 11817 	return callSelector;
 14397 
 11818 });
 14398 	if ( false ) {}
       
 14399 
       
 14400 	// Ignore reason: There's not a clear solution to create an intersection of
       
 14401 	// the function with additional properties, where the goal is to retain the
       
 14402 	// function signature of the incoming argument and add control properties
       
 14403 	// on the return value.
       
 14404 
       
 14405 	// @ts-ignore
       
 14406 	return memoized;
       
 14407 }
       
 14408 
       
 14409 module.exports = memize;
       
 14410 
 11819 
 14411 
 11820 
 14412 /***/ }),
 11821 /***/ }),
 14413 
 11822 
 14414 /***/ 7:
 11823 /***/ "qRz9":
 14415 /***/ (function(module, exports) {
 11824 /***/ (function(module, exports) {
 14416 
 11825 
 14417 (function() { module.exports = this["wp"]["blockEditor"]; }());
 11826 (function() { module.exports = window["wp"]["richText"]; }());
 14418 
 11827 
 14419 /***/ }),
 11828 /***/ }),
 14420 
 11829 
 14421 /***/ 75:
 11830 /***/ "rmEH":
 14422 /***/ (function(module, exports) {
 11831 /***/ (function(module, exports) {
 14423 
 11832 
 14424 (function() { module.exports = this["wp"]["htmlEntities"]; }());
 11833 (function() { module.exports = window["wp"]["htmlEntities"]; }());
 14425 
 11834 
 14426 /***/ }),
 11835 /***/ }),
 14427 
 11836 
 14428 /***/ 79:
 11837 /***/ "tI+e":
 14429 /***/ (function(module, exports) {
 11838 /***/ (function(module, exports) {
 14430 
 11839 
 14431 (function() { module.exports = this["wp"]["date"]; }());
 11840 (function() { module.exports = window["wp"]["components"]; }());
 14432 
 11841 
 14433 /***/ }),
 11842 /***/ }),
 14434 
 11843 
 14435 /***/ 8:
 11844 /***/ "w95h":
       
 11845 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11846 
       
 11847 "use strict";
       
 11848 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 11849 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11850 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
 11851 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11852 
       
 11853 
       
 11854 /**
       
 11855  * WordPress dependencies
       
 11856  */
       
 11857 
       
 11858 const close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11859   xmlns: "http://www.w3.org/2000/svg",
       
 11860   viewBox: "0 0 24 24"
       
 11861 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11862   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"
       
 11863 }));
       
 11864 /* harmony default export */ __webpack_exports__["a"] = (close);
       
 11865 
       
 11866 
       
 11867 /***/ }),
       
 11868 
       
 11869 /***/ "wduq":
       
 11870 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
 11871 
       
 11872 "use strict";
       
 11873 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
       
 11874 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
 11875 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
       
 11876 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
 11877 
       
 11878 
       
 11879 /**
       
 11880  * WordPress dependencies
       
 11881  */
       
 11882 
       
 11883 const wordpress = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
 11884   xmlns: "http://www.w3.org/2000/svg",
       
 11885   viewBox: "-2 -2 24 24"
       
 11886 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
 11887   d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
       
 11888 }));
       
 11889 /* harmony default export */ __webpack_exports__["a"] = (wordpress);
       
 11890 
       
 11891 
       
 11892 /***/ }),
       
 11893 
       
 11894 /***/ "wx14":
 14436 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 11895 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 14437 
 11896 
 14438 "use strict";
 11897 "use strict";
 14439 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 11898 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 14440 function _extends() {
 11899 function _extends() {
 14455   return _extends.apply(this, arguments);
 11914   return _extends.apply(this, arguments);
 14456 }
 11915 }
 14457 
 11916 
 14458 /***/ }),
 11917 /***/ }),
 14459 
 11918 
 14460 /***/ 81:
 11919 /***/ "ywyh":
 14461 /***/ (function(module, exports) {
 11920 /***/ (function(module, exports) {
 14462 
 11921 
 14463 (function() { module.exports = this["wp"]["viewport"]; }());
 11922 (function() { module.exports = window["wp"]["apiFetch"]; }());
 14464 
       
 14465 /***/ }),
       
 14466 
       
 14467 /***/ 83:
       
 14468 /***/ (function(module, exports) {
       
 14469 
       
 14470 (function() { module.exports = this["wp"]["serverSideRender"]; }());
       
 14471 
       
 14472 /***/ }),
       
 14473 
       
 14474 /***/ 9:
       
 14475 /***/ (function(module, exports) {
       
 14476 
       
 14477 (function() { module.exports = this["wp"]["compose"]; }());
       
 14478 
       
 14479 /***/ }),
       
 14480 
       
 14481 /***/ 97:
       
 14482 /***/ (function(module, exports, __webpack_require__) {
       
 14483 
       
 14484 "use strict";
       
 14485 
       
 14486 exports.__esModule = true;
       
 14487 var TextareaAutosize_1 = __webpack_require__(173);
       
 14488 exports["default"] = TextareaAutosize_1["default"];
       
 14489 
       
 14490 
       
 14491 /***/ }),
       
 14492 
       
 14493 /***/ 98:
       
 14494 /***/ (function(module, exports) {
       
 14495 
       
 14496 (function() { module.exports = this["wp"]["coreData"]; }());
       
 14497 
 11923 
 14498 /***/ })
 11924 /***/ })
 14499 
 11925 
 14500 /******/ });
 11926 /******/ });