[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> edit-site.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["editSite"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = "IqXm");
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ "0Ene":
  91  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92  
  93  "use strict";
  94  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  95  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  96  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  97  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  98  
  99  
 100  /**
 101   * WordPress dependencies
 102   */
 103  
 104  const plugins = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 105    xmlns: "http://www.w3.org/2000/svg",
 106    viewBox: "0 0 24 24"
 107  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 108    d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"
 109  }));
 110  /* harmony default export */ __webpack_exports__["a"] = (plugins);
 111  
 112  
 113  /***/ }),
 114  
 115  /***/ "1ZqX":
 116  /***/ (function(module, exports) {
 117  
 118  (function() { module.exports = window["wp"]["data"]; }());
 119  
 120  /***/ }),
 121  
 122  /***/ "1iEr":
 123  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 124  
 125  "use strict";
 126  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 127  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 128  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 129  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 130  
 131  
 132  /**
 133   * WordPress dependencies
 134   */
 135  
 136  const chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 137    xmlns: "http://www.w3.org/2000/svg",
 138    viewBox: "0 0 24 24"
 139  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 140    d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
 141  }));
 142  /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
 143  
 144  
 145  /***/ }),
 146  
 147  /***/ "2gm7":
 148  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 149  
 150  "use strict";
 151  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 152  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 153  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 154  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 155  
 156  
 157  /**
 158   * WordPress dependencies
 159   */
 160  
 161  const chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 162    xmlns: "http://www.w3.org/2000/svg",
 163    viewBox: "0 0 24 24"
 164  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 165    d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
 166  }));
 167  /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
 168  
 169  
 170  /***/ }),
 171  
 172  /***/ "51Zz":
 173  /***/ (function(module, exports) {
 174  
 175  (function() { module.exports = window["wp"]["dataControls"]; }());
 176  
 177  /***/ }),
 178  
 179  /***/ "6aBm":
 180  /***/ (function(module, exports) {
 181  
 182  (function() { module.exports = window["wp"]["mediaUtils"]; }());
 183  
 184  /***/ }),
 185  
 186  /***/ "B9Az":
 187  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 188  
 189  "use strict";
 190  
 191  // EXTERNAL MODULE: external ["wp","element"]
 192  var external_wp_element_ = __webpack_require__("GRId");
 193  
 194  // EXTERNAL MODULE: external ["wp","primitives"]
 195  var external_wp_primitives_ = __webpack_require__("Tqx9");
 196  
 197  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
 198  
 199  
 200  /**
 201   * WordPress dependencies
 202   */
 203  
 204  const pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 205    xmlns: "http://www.w3.org/2000/svg",
 206    viewBox: "0 0 24 24"
 207  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 208    d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"
 209  }));
 210  /* harmony default export */ var library_pencil = (pencil);
 211  
 212  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
 213  /**
 214   * Internal dependencies
 215   */
 216  
 217  /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil);
 218  
 219  
 220  /***/ }),
 221  
 222  /***/ "Cg8A":
 223  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 224  
 225  "use strict";
 226  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 227  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 228  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 229  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 230  
 231  
 232  /**
 233   * WordPress dependencies
 234   */
 235  
 236  const cog = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 237    xmlns: "http://www.w3.org/2000/svg",
 238    viewBox: "0 0 24 24"
 239  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 240    fillRule: "evenodd",
 241    d: "M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",
 242    clipRule: "evenodd"
 243  }));
 244  /* harmony default export */ __webpack_exports__["a"] = (cog);
 245  
 246  
 247  /***/ }),
 248  
 249  /***/ "Civd":
 250  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 251  
 252  "use strict";
 253  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 254  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 255  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 256  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 257  
 258  
 259  /**
 260   * WordPress dependencies
 261   */
 262  
 263  const layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 264    xmlns: "http://www.w3.org/2000/svg",
 265    viewBox: "0 0 24 24"
 266  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 267    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"
 268  }));
 269  /* harmony default export */ __webpack_exports__["a"] = (layout);
 270  
 271  
 272  /***/ }),
 273  
 274  /***/ "GRId":
 275  /***/ (function(module, exports) {
 276  
 277  (function() { module.exports = window["wp"]["element"]; }());
 278  
 279  /***/ }),
 280  
 281  /***/ "HSyU":
 282  /***/ (function(module, exports) {
 283  
 284  (function() { module.exports = window["wp"]["blocks"]; }());
 285  
 286  /***/ }),
 287  
 288  /***/ "IqXm":
 289  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 290  
 291  "use strict";
 292  // ESM COMPAT FLAG
 293  __webpack_require__.r(__webpack_exports__);
 294  
 295  // EXPORTS
 296  __webpack_require__.d(__webpack_exports__, "reinitializeEditor", function() { return /* binding */ reinitializeEditor; });
 297  __webpack_require__.d(__webpack_exports__, "initializeEditor", function() { return /* binding */ initializeEditor; });
 298  __webpack_require__.d(__webpack_exports__, "__experimentalMainDashboardButton", function() { return /* reexport */ main_dashboard_button; });
 299  __webpack_require__.d(__webpack_exports__, "__experimentalNavigationToggle", function() { return /* reexport */ navigation_toggle; });
 300  __webpack_require__.d(__webpack_exports__, "PluginSidebar", function() { return /* reexport */ PluginSidebarEditSite; });
 301  __webpack_require__.d(__webpack_exports__, "PluginSidebarMoreMenuItem", function() { return /* reexport */ PluginSidebarMoreMenuItem; });
 302  __webpack_require__.d(__webpack_exports__, "PluginMoreMenuItem", function() { return /* reexport */ plugin_more_menu_item; });
 303  
 304  // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/actions.js
 305  var actions_namespaceObject = {};
 306  __webpack_require__.r(actions_namespaceObject);
 307  __webpack_require__.d(actions_namespaceObject, "toggleFeature", function() { return actions_toggleFeature; });
 308  __webpack_require__.d(actions_namespaceObject, "__experimentalSetPreviewDeviceType", function() { return __experimentalSetPreviewDeviceType; });
 309  __webpack_require__.d(actions_namespaceObject, "setTemplate", function() { return actions_setTemplate; });
 310  __webpack_require__.d(actions_namespaceObject, "addTemplate", function() { return addTemplate; });
 311  __webpack_require__.d(actions_namespaceObject, "removeTemplate", function() { return actions_removeTemplate; });
 312  __webpack_require__.d(actions_namespaceObject, "setTemplatePart", function() { return actions_setTemplatePart; });
 313  __webpack_require__.d(actions_namespaceObject, "setHomeTemplateId", function() { return setHomeTemplateId; });
 314  __webpack_require__.d(actions_namespaceObject, "setPage", function() { return actions_setPage; });
 315  __webpack_require__.d(actions_namespaceObject, "showHomepage", function() { return actions_showHomepage; });
 316  __webpack_require__.d(actions_namespaceObject, "setNavigationPanelActiveMenu", function() { return setNavigationPanelActiveMenu; });
 317  __webpack_require__.d(actions_namespaceObject, "openNavigationPanelToMenu", function() { return openNavigationPanelToMenu; });
 318  __webpack_require__.d(actions_namespaceObject, "setIsNavigationPanelOpened", function() { return actions_setIsNavigationPanelOpened; });
 319  __webpack_require__.d(actions_namespaceObject, "setIsInserterOpened", function() { return actions_setIsInserterOpened; });
 320  __webpack_require__.d(actions_namespaceObject, "updateSettings", function() { return actions_updateSettings; });
 321  __webpack_require__.d(actions_namespaceObject, "setIsListViewOpened", function() { return actions_setIsListViewOpened; });
 322  __webpack_require__.d(actions_namespaceObject, "revertTemplate", function() { return actions_revertTemplate; });
 323  __webpack_require__.d(actions_namespaceObject, "openGeneralSidebar", function() { return openGeneralSidebar; });
 324  __webpack_require__.d(actions_namespaceObject, "closeGeneralSidebar", function() { return closeGeneralSidebar; });
 325  
 326  // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-site/build-module/store/selectors.js
 327  var selectors_namespaceObject = {};
 328  __webpack_require__.r(selectors_namespaceObject);
 329  __webpack_require__.d(selectors_namespaceObject, "isFeatureActive", function() { return isFeatureActive; });
 330  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetPreviewDeviceType", function() { return selectors_experimentalGetPreviewDeviceType; });
 331  __webpack_require__.d(selectors_namespaceObject, "getCanUserCreateMedia", function() { return getCanUserCreateMedia; });
 332  __webpack_require__.d(selectors_namespaceObject, "getReusableBlocks", function() { return getReusableBlocks; });
 333  __webpack_require__.d(selectors_namespaceObject, "getSettings", function() { return selectors_getSettings; });
 334  __webpack_require__.d(selectors_namespaceObject, "getHomeTemplateId", function() { return getHomeTemplateId; });
 335  __webpack_require__.d(selectors_namespaceObject, "getEditedPostType", function() { return selectors_getEditedPostType; });
 336  __webpack_require__.d(selectors_namespaceObject, "getEditedPostId", function() { return selectors_getEditedPostId; });
 337  __webpack_require__.d(selectors_namespaceObject, "getPage", function() { return selectors_getPage; });
 338  __webpack_require__.d(selectors_namespaceObject, "getNavigationPanelActiveMenu", function() { return getNavigationPanelActiveMenu; });
 339  __webpack_require__.d(selectors_namespaceObject, "getCurrentTemplateNavigationPanelSubMenu", function() { return getCurrentTemplateNavigationPanelSubMenu; });
 340  __webpack_require__.d(selectors_namespaceObject, "isNavigationOpened", function() { return selectors_isNavigationOpened; });
 341  __webpack_require__.d(selectors_namespaceObject, "isInserterOpened", function() { return selectors_isInserterOpened; });
 342  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetInsertionPoint", function() { return __experimentalGetInsertionPoint; });
 343  __webpack_require__.d(selectors_namespaceObject, "isListViewOpened", function() { return selectors_isListViewOpened; });
 344  __webpack_require__.d(selectors_namespaceObject, "getCurrentTemplateTemplateParts", function() { return getCurrentTemplateTemplateParts; });
 345  
 346  // EXTERNAL MODULE: external ["wp","element"]
 347  var external_wp_element_ = __webpack_require__("GRId");
 348  
 349  // EXTERNAL MODULE: external ["wp","blocks"]
 350  var external_wp_blocks_ = __webpack_require__("HSyU");
 351  
 352  // EXTERNAL MODULE: external ["wp","blockLibrary"]
 353  var external_wp_blockLibrary_ = __webpack_require__("QyPg");
 354  
 355  // EXTERNAL MODULE: external ["wp","data"]
 356  var external_wp_data_ = __webpack_require__("1ZqX");
 357  
 358  // EXTERNAL MODULE: external ["wp","coreData"]
 359  var external_wp_coreData_ = __webpack_require__("jZUy");
 360  
 361  // EXTERNAL MODULE: external ["wp","editor"]
 362  var external_wp_editor_ = __webpack_require__("jSdM");
 363  
 364  // EXTERNAL MODULE: external ["wp","viewport"]
 365  var external_wp_viewport_ = __webpack_require__("KEfo");
 366  
 367  // EXTERNAL MODULE: external ["wp","url"]
 368  var external_wp_url_ = __webpack_require__("Mmq9");
 369  
 370  // EXTERNAL MODULE: external ["wp","plugins"]
 371  var external_wp_plugins_ = __webpack_require__("TvNi");
 372  
 373  // EXTERNAL MODULE: external "lodash"
 374  var external_lodash_ = __webpack_require__("YLtl");
 375  
 376  // EXTERNAL MODULE: external ["wp","components"]
 377  var external_wp_components_ = __webpack_require__("tI+e");
 378  
 379  // EXTERNAL MODULE: external ["wp","i18n"]
 380  var external_wp_i18n_ = __webpack_require__("l3Sj");
 381  
 382  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/tools-more-menu-group/index.js
 383  
 384  
 385  /**
 386   * External dependencies
 387   */
 388  
 389  /**
 390   * WordPress dependencies
 391   */
 392  
 393  
 394  
 395  const {
 396    Fill: ToolsMoreMenuGroup,
 397    Slot
 398  } = Object(external_wp_components_["createSlotFill"])('EditSiteToolsMoreMenuGroup');
 399  
 400  ToolsMoreMenuGroup.Slot = _ref => {
 401    let {
 402      fillProps
 403    } = _ref;
 404    return Object(external_wp_element_["createElement"])(Slot, {
 405      fillProps: fillProps
 406    }, fills => !Object(external_lodash_["isEmpty"])(fills) && Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
 407      label: Object(external_wp_i18n_["__"])('Tools')
 408    }, fills));
 409  };
 410  
 411  /* harmony default export */ var tools_more_menu_group = (ToolsMoreMenuGroup);
 412  
 413  // EXTERNAL MODULE: ./node_modules/downloadjs/download.js
 414  var download = __webpack_require__("rrFr");
 415  var download_default = /*#__PURE__*/__webpack_require__.n(download);
 416  
 417  // EXTERNAL MODULE: external ["wp","apiFetch"]
 418  var external_wp_apiFetch_ = __webpack_require__("ywyh");
 419  var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_);
 420  
 421  // EXTERNAL MODULE: external ["wp","primitives"]
 422  var external_wp_primitives_ = __webpack_require__("Tqx9");
 423  
 424  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/download.js
 425  
 426  
 427  /**
 428   * WordPress dependencies
 429   */
 430  
 431  const download_download = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 432    xmlns: "http://www.w3.org/2000/svg",
 433    viewBox: "0 0 24 24"
 434  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 435    d: "M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"
 436  }));
 437  /* harmony default export */ var library_download = (download_download);
 438  
 439  // EXTERNAL MODULE: external ["wp","notices"]
 440  var external_wp_notices_ = __webpack_require__("onLe");
 441  
 442  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/plugins/site-export.js
 443  
 444  
 445  /**
 446   * External dependencies
 447   */
 448  
 449  /**
 450   * WordPress dependencies
 451   */
 452  
 453  
 454  
 455  
 456  
 457  
 458  
 459  function SiteExport() {
 460    const {
 461      createErrorNotice
 462    } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
 463  
 464    async function handleExport() {
 465      try {
 466        const response = await external_wp_apiFetch_default()({
 467          path: '/wp-block-editor/v1/export',
 468          parse: false
 469        });
 470        const blob = await response.blob();
 471        download_default()(blob, 'edit-site-export.zip', 'application/zip');
 472      } catch (errorResponse) {
 473        let error = {};
 474  
 475        try {
 476          error = await errorResponse.json();
 477        } catch (e) {}
 478  
 479        const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : Object(external_wp_i18n_["__"])('An error occurred while creating the site export.');
 480        createErrorNotice(errorMessage, {
 481          type: 'snackbar'
 482        });
 483      }
 484    }
 485  
 486    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
 487      role: "menuitem",
 488      icon: library_download,
 489      onClick: handleExport,
 490      info: Object(external_wp_i18n_["__"])('Download your templates and template parts.')
 491    }, Object(external_wp_i18n_["_x"])('Export', 'site exporter menu item'));
 492  }
 493  
 494  // EXTERNAL MODULE: external ["wp","dataControls"]
 495  var external_wp_dataControls_ = __webpack_require__("51Zz");
 496  
 497  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/defaults.js
 498  const PREFERENCES_DEFAULTS = {
 499    features: {
 500      welcomeGuide: true,
 501      welcomeGuideStyles: true
 502    }
 503  };
 504  
 505  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/constants.js
 506  /**
 507   * The identifier for the data store.
 508   *
 509   * @type {string}
 510   */
 511  const STORE_NAME = 'core/edit-site';
 512  const TEMPLATE_PART_AREA_HEADER = 'header';
 513  const TEMPLATE_PART_AREA_FOOTER = 'footer';
 514  const TEMPLATE_PART_AREA_SIDEBAR = 'sidebar';
 515  const TEMPLATE_PART_AREA_GENERAL = 'uncategorized';
 516  
 517  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-panel/constants.js
 518  /**
 519   * WordPress dependencies
 520   */
 521  
 522  /**
 523   * Internal dependencies
 524   */
 525  
 526  
 527  const TEMPLATES_PRIMARY = ['index', 'singular', 'archive', 'single', 'page', 'home', '404', 'search'];
 528  const TEMPLATES_SECONDARY = ['author', 'category', 'taxonomy', 'date', 'tag', 'attachment', 'single-post', 'front-page'];
 529  const TEMPLATES_TOP_LEVEL = [...TEMPLATES_PRIMARY, ...TEMPLATES_SECONDARY];
 530  const TEMPLATES_GENERAL = ['page-home'];
 531  const TEMPLATES_POSTS_PREFIXES = ['post-', 'author-', 'single-post-', 'tag-'];
 532  const TEMPLATES_PAGES_PREFIXES = ['page-'];
 533  const TEMPLATE_OVERRIDES = {
 534    singular: ['single', 'page'],
 535    index: ['archive', '404', 'search', 'singular', 'home'],
 536    home: ['front-page']
 537  };
 538  const MENU_ROOT = 'root';
 539  const MENU_TEMPLATE_PARTS = 'template-parts';
 540  const MENU_TEMPLATES = 'templates';
 541  const MENU_TEMPLATES_GENERAL = 'templates-general';
 542  const MENU_TEMPLATES_PAGES = 'templates-pages';
 543  const MENU_TEMPLATES_POSTS = 'templates-posts';
 544  const MENU_TEMPLATES_UNUSED = 'templates-unused';
 545  const MENU_TEMPLATE_PARTS_HEADERS = 'template-parts-headers';
 546  const MENU_TEMPLATE_PARTS_FOOTERS = 'template-parts-footers';
 547  const MENU_TEMPLATE_PARTS_SIDEBARS = 'template-parts-sidebars';
 548  const MENU_TEMPLATE_PARTS_GENERAL = 'template-parts-general';
 549  const TEMPLATE_PARTS_SUB_MENUS = [{
 550    area: TEMPLATE_PART_AREA_HEADER,
 551    menu: MENU_TEMPLATE_PARTS_HEADERS,
 552    title: Object(external_wp_i18n_["__"])('headers')
 553  }, {
 554    area: TEMPLATE_PART_AREA_FOOTER,
 555    menu: MENU_TEMPLATE_PARTS_FOOTERS,
 556    title: Object(external_wp_i18n_["__"])('footers')
 557  }, {
 558    area: TEMPLATE_PART_AREA_SIDEBAR,
 559    menu: MENU_TEMPLATE_PARTS_SIDEBARS,
 560    title: Object(external_wp_i18n_["__"])('sidebars')
 561  }, {
 562    area: TEMPLATE_PART_AREA_GENERAL,
 563    menu: MENU_TEMPLATE_PARTS_GENERAL,
 564    title: Object(external_wp_i18n_["__"])('general')
 565  }];
 566  
 567  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/reducer.js
 568  /**
 569   * WordPress dependencies
 570   */
 571  
 572  /**
 573   * Internal dependencies
 574   */
 575  
 576  
 577  
 578  /**
 579   * Reducer returning the user preferences.
 580   *
 581   * @param {Object} state  Current state.
 582   * @param {Object} action Dispatched action.
 583   * @return {Object} Updated state.
 584   */
 585  
 586  const preferences = Object(external_wp_data_["combineReducers"])({
 587    features() {
 588      let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PREFERENCES_DEFAULTS.features;
 589      let action = arguments.length > 1 ? arguments[1] : undefined;
 590  
 591      switch (action.type) {
 592        case 'TOGGLE_FEATURE':
 593          {
 594            return { ...state,
 595              [action.feature]: !state[action.feature]
 596            };
 597          }
 598  
 599        default:
 600          return state;
 601      }
 602    }
 603  
 604  });
 605  /**
 606   * Reducer returning the editing canvas device type.
 607   *
 608   * @param {Object} state  Current state.
 609   * @param {Object} action Dispatched action.
 610   *
 611   * @return {Object} Updated state.
 612   */
 613  
 614  function reducer_deviceType() {
 615    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Desktop';
 616    let action = arguments.length > 1 ? arguments[1] : undefined;
 617  
 618    switch (action.type) {
 619      case 'SET_PREVIEW_DEVICE_TYPE':
 620        return action.deviceType;
 621    }
 622  
 623    return state;
 624  }
 625  /**
 626   * Reducer returning the settings.
 627   *
 628   * @param {Object} state  Current state.
 629   * @param {Object} action Dispatched action.
 630   *
 631   * @return {Object} Updated state.
 632   */
 633  
 634  function reducer_settings() {
 635    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 636    let action = arguments.length > 1 ? arguments[1] : undefined;
 637  
 638    switch (action.type) {
 639      case 'UPDATE_SETTINGS':
 640        return { ...state,
 641          ...action.settings
 642        };
 643    }
 644  
 645    return state;
 646  }
 647  /**
 648   * Reducer keeping track of the currently edited Post Type,
 649   * Post Id and the context provided to fill the content of the block editor.
 650   *
 651   * @param {Object} state  Current edited post.
 652   * @param {Object} action Dispatched action.
 653   *
 654   * @return {Object} Updated state.
 655   */
 656  
 657  function editedPost() {
 658    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 659    let action = arguments.length > 1 ? arguments[1] : undefined;
 660  
 661    switch (action.type) {
 662      case 'SET_TEMPLATE':
 663      case 'SET_PAGE':
 664        return {
 665          type: 'wp_template',
 666          id: action.templateId,
 667          page: action.page
 668        };
 669  
 670      case 'SET_TEMPLATE_PART':
 671        return {
 672          type: 'wp_template_part',
 673          id: action.templatePartId
 674        };
 675    }
 676  
 677    return state;
 678  }
 679  /**
 680   * Reducer for information about the site's homepage.
 681   *
 682   * @param {Object} state  Current state.
 683   * @param {Object} action Dispatched action.
 684   *
 685   * @return {Object} Updated state.
 686   */
 687  
 688  function homeTemplateId(state, action) {
 689    switch (action.type) {
 690      case 'SET_HOME_TEMPLATE':
 691        return action.homeTemplateId;
 692    }
 693  
 694    return state;
 695  }
 696  /**
 697   * Reducer for information about the navigation panel, such as its active menu
 698   * and whether it should be opened or closed.
 699   *
 700   * Note: this reducer interacts with the inserter and list view panels reducers
 701   * to make sure that only one of the three panels is open at the same time.
 702   *
 703   * @param {Object} state  Current state.
 704   * @param {Object} action Dispatched action.
 705   */
 706  
 707  function navigationPanel() {
 708    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
 709      menu: MENU_ROOT,
 710      isOpen: false
 711    };
 712    let action = arguments.length > 1 ? arguments[1] : undefined;
 713  
 714    switch (action.type) {
 715      case 'SET_NAVIGATION_PANEL_ACTIVE_MENU':
 716        return { ...state,
 717          menu: action.menu
 718        };
 719  
 720      case 'OPEN_NAVIGATION_PANEL_TO_MENU':
 721        return { ...state,
 722          isOpen: true,
 723          menu: action.menu
 724        };
 725  
 726      case 'SET_IS_NAVIGATION_PANEL_OPENED':
 727        return { ...state,
 728          menu: !action.isOpen ? MENU_ROOT : state.menu,
 729          // Set menu to root when closing panel.
 730          isOpen: action.isOpen
 731        };
 732  
 733      case 'SET_IS_LIST_VIEW_OPENED':
 734        return { ...state,
 735          menu: state.isOpen && action.isOpen ? MENU_ROOT : state.menu,
 736          // Set menu to root when closing panel.
 737          isOpen: action.isOpen ? false : state.isOpen
 738        };
 739  
 740      case 'SET_IS_INSERTER_OPENED':
 741        return { ...state,
 742          menu: state.isOpen && action.value ? MENU_ROOT : state.menu,
 743          // Set menu to root when closing panel.
 744          isOpen: action.value ? false : state.isOpen
 745        };
 746    }
 747  
 748    return state;
 749  }
 750  /**
 751   * Reducer to set the block inserter panel open or closed.
 752   *
 753   * Note: this reducer interacts with the navigation and list view panels reducers
 754   * to make sure that only one of the three panels is open at the same time.
 755   *
 756   * @param {boolean|Object} state  Current state.
 757   * @param {Object}         action Dispatched action.
 758   */
 759  
 760  function blockInserterPanel() {
 761    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
 762    let action = arguments.length > 1 ? arguments[1] : undefined;
 763  
 764    switch (action.type) {
 765      case 'OPEN_NAVIGATION_PANEL_TO_MENU':
 766        return false;
 767  
 768      case 'SET_IS_NAVIGATION_PANEL_OPENED':
 769      case 'SET_IS_LIST_VIEW_OPENED':
 770        return action.isOpen ? false : state;
 771  
 772      case 'SET_IS_INSERTER_OPENED':
 773        return action.value;
 774    }
 775  
 776    return state;
 777  }
 778  /**
 779   * Reducer to set the list view panel open or closed.
 780   *
 781   * Note: this reducer interacts with the navigation and inserter panels reducers
 782   * to make sure that only one of the three panels is open at the same time.
 783   *
 784   * @param {Object} state  Current state.
 785   * @param {Object} action Dispatched action.
 786   */
 787  
 788  function listViewPanel() {
 789    let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
 790    let action = arguments.length > 1 ? arguments[1] : undefined;
 791  
 792    switch (action.type) {
 793      case 'OPEN_NAVIGATION_PANEL_TO_MENU':
 794        return false;
 795  
 796      case 'SET_IS_NAVIGATION_PANEL_OPENED':
 797        return action.isOpen ? false : state;
 798  
 799      case 'SET_IS_INSERTER_OPENED':
 800        return action.value ? false : state;
 801  
 802      case 'SET_IS_LIST_VIEW_OPENED':
 803        return action.isOpen;
 804    }
 805  
 806    return state;
 807  }
 808  /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({
 809    preferences,
 810    deviceType: reducer_deviceType,
 811    settings: reducer_settings,
 812    editedPost,
 813    homeTemplateId,
 814    navigationPanel,
 815    blockInserterPanel,
 816    listViewPanel
 817  }));
 818  
 819  // EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 17 modules
 820  var build_module = __webpack_require__("U60i");
 821  
 822  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/is-template-revertable.js
 823  /**
 824   * Check if a template is revertable to its original theme-provided template file.
 825   *
 826   * @param {Object} template The template entity to check.
 827   * @return {boolean} Whether the template is revertable.
 828   */
 829  function isTemplateRevertable(template) {
 830    if (!template) {
 831      return false;
 832    }
 833    /* eslint-disable camelcase */
 834  
 835  
 836    return (template === null || template === void 0 ? void 0 : template.source) === 'custom' && (template === null || template === void 0 ? void 0 : template.has_theme_file);
 837    /* eslint-enable camelcase */
 838  }
 839  
 840  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/actions.js
 841  /**
 842   * WordPress dependencies
 843   */
 844  
 845  
 846  
 847  
 848  
 849  
 850  
 851  
 852  /**
 853   * Internal dependencies
 854   */
 855  
 856  
 857  
 858  /**
 859   * Returns an action object used to toggle a feature flag.
 860   *
 861   * @param {string} feature Feature name.
 862   *
 863   * @return {Object} Action object.
 864   */
 865  
 866  function actions_toggleFeature(feature) {
 867    return {
 868      type: 'TOGGLE_FEATURE',
 869      feature
 870    };
 871  }
 872  /**
 873   * Returns an action object used to toggle the width of the editing canvas.
 874   *
 875   * @param {string} deviceType
 876   *
 877   * @return {Object} Action object.
 878   */
 879  
 880  function __experimentalSetPreviewDeviceType(deviceType) {
 881    return {
 882      type: 'SET_PREVIEW_DEVICE_TYPE',
 883      deviceType
 884    };
 885  }
 886  /**
 887   * Returns an action object used to set a template.
 888   *
 889   * @param {number} templateId   The template ID.
 890   * @param {string} templateSlug The template slug.
 891   * @return {Object} Action object.
 892   */
 893  
 894  function* actions_setTemplate(templateId, templateSlug) {
 895    const pageContext = {
 896      templateSlug
 897    };
 898  
 899    if (!templateSlug) {
 900      const template = yield external_wp_data_["controls"].resolveSelect(external_wp_coreData_["store"], 'getEntityRecord', 'postType', 'wp_template', templateId);
 901      pageContext.templateSlug = template === null || template === void 0 ? void 0 : template.slug;
 902    }
 903  
 904    return {
 905      type: 'SET_TEMPLATE',
 906      templateId,
 907      page: {
 908        context: pageContext
 909      }
 910    };
 911  }
 912  /**
 913   * Adds a new template, and sets it as the current template.
 914   *
 915   * @param {Object} template The template.
 916   *
 917   * @return {Object} Action object used to set the current template.
 918   */
 919  
 920  function* addTemplate(template) {
 921    const newTemplate = yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'saveEntityRecord', 'postType', 'wp_template', template);
 922  
 923    if (template.content) {
 924      yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'editEntityRecord', 'postType', 'wp_template', newTemplate.id, {
 925        blocks: Object(external_wp_blocks_["parse"])(template.content)
 926      }, {
 927        undoIgnore: true
 928      });
 929    }
 930  
 931    return {
 932      type: 'SET_TEMPLATE',
 933      templateId: newTemplate.id,
 934      page: {
 935        context: {
 936          templateSlug: newTemplate.slug
 937        }
 938      }
 939    };
 940  }
 941  /**
 942   * Removes a template.
 943   *
 944   * @param {Object} template The template object.
 945   */
 946  
 947  function* actions_removeTemplate(template) {
 948    try {
 949      yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'deleteEntityRecord', 'postType', template.type, template.id, {
 950        force: true
 951      });
 952      const lastError = yield external_wp_data_["controls"].select(external_wp_coreData_["store"], 'getLastEntityDeleteError', 'postType', template.type, template.id);
 953  
 954      if (lastError) {
 955        throw lastError;
 956      }
 957  
 958      yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createSuccessNotice', Object(external_wp_i18n_["sprintf"])(
 959      /* translators: The template/part's name. */
 960      Object(external_wp_i18n_["__"])('"%s" removed.'), template.title.rendered), {
 961        type: 'snackbar'
 962      });
 963    } catch (error) {
 964      const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : Object(external_wp_i18n_["__"])('An error occurred while deleting the template.');
 965      yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', errorMessage, {
 966        type: 'snackbar'
 967      });
 968    }
 969  }
 970  /**
 971   * Returns an action object used to set a template part.
 972   *
 973   * @param {string} templatePartId The template part ID.
 974   *
 975   * @return {Object} Action object.
 976   */
 977  
 978  function actions_setTemplatePart(templatePartId) {
 979    return {
 980      type: 'SET_TEMPLATE_PART',
 981      templatePartId
 982    };
 983  }
 984  /**
 985   * Updates the homeTemplateId state with the templateId of the page resolved
 986   * from the given path.
 987   *
 988   * @param {number} homeTemplateId The template ID for the homepage.
 989   */
 990  
 991  function setHomeTemplateId(homeTemplateId) {
 992    return {
 993      type: 'SET_HOME_TEMPLATE',
 994      homeTemplateId
 995    };
 996  }
 997  /**
 998   * Resolves the template for a page and displays both. If no path is given, attempts
 999   * to use the postId to generate a path like `?p=${ postId }`.
1000   *
1001   * @param {Object} page         The page object.
1002   * @param {string} page.type    The page type.
1003   * @param {string} page.slug    The page slug.
1004   * @param {string} page.path    The page path.
1005   * @param {Object} page.context The page context.
1006   *
1007   * @return {number} The resolved template ID for the page route.
1008   */
1009  
1010  function* actions_setPage(page) {
1011    var _page$context;
1012  
1013    if (!page.path && (_page$context = page.context) !== null && _page$context !== void 0 && _page$context.postId) {
1014      const entity = yield external_wp_data_["controls"].resolveSelect(external_wp_coreData_["store"], 'getEntityRecord', 'postType', page.context.postType || 'post', page.context.postId);
1015      page.path = Object(external_wp_url_["getPathAndQueryString"])(entity.link);
1016    }
1017  
1018    const {
1019      id: templateId,
1020      slug: templateSlug
1021    } = yield external_wp_data_["controls"].resolveSelect(external_wp_coreData_["store"], '__experimentalGetTemplateForLink', page.path);
1022    yield {
1023      type: 'SET_PAGE',
1024      page: !templateSlug ? page : { ...page,
1025        context: { ...page.context,
1026          templateSlug
1027        }
1028      },
1029      templateId
1030    };
1031    return templateId;
1032  }
1033  /**
1034   * Displays the site homepage for editing in the editor.
1035   */
1036  
1037  function* actions_showHomepage() {
1038    const {
1039      show_on_front: showOnFront,
1040      page_on_front: frontpageId
1041    } = yield external_wp_data_["controls"].resolveSelect(external_wp_coreData_["store"], 'getEntityRecord', 'root', 'site');
1042    const {
1043      siteUrl
1044    } = yield external_wp_data_["controls"].select(STORE_NAME, 'getSettings');
1045    const page = {
1046      path: siteUrl,
1047      context: showOnFront === 'page' ? {
1048        postType: 'page',
1049        postId: frontpageId
1050      } : {}
1051    };
1052    const homeTemplate = yield* actions_setPage(page);
1053    yield setHomeTemplateId(homeTemplate);
1054  }
1055  /**
1056   * Returns an action object used to set the active navigation panel menu.
1057   *
1058   * @param {string} menu Menu prop of active menu.
1059   *
1060   * @return {Object} Action object.
1061   */
1062  
1063  function setNavigationPanelActiveMenu(menu) {
1064    return {
1065      type: 'SET_NAVIGATION_PANEL_ACTIVE_MENU',
1066      menu
1067    };
1068  }
1069  /**
1070   * Opens the navigation panel and sets its active menu at the same time.
1071   *
1072   * @param {string} menu Identifies the menu to open.
1073   */
1074  
1075  function openNavigationPanelToMenu(menu) {
1076    return {
1077      type: 'OPEN_NAVIGATION_PANEL_TO_MENU',
1078      menu
1079    };
1080  }
1081  /**
1082   * Sets whether the navigation panel should be open.
1083   *
1084   * @param {boolean} isOpen If true, opens the nav panel. If false, closes it. It
1085   *                         does not toggle the state, but sets it directly.
1086   */
1087  
1088  function actions_setIsNavigationPanelOpened(isOpen) {
1089    return {
1090      type: 'SET_IS_NAVIGATION_PANEL_OPENED',
1091      isOpen
1092    };
1093  }
1094  /**
1095   * Returns an action object used to open/close the inserter.
1096   *
1097   * @param {boolean|Object} value                Whether the inserter should be
1098   *                                              opened (true) or closed (false).
1099   *                                              To specify an insertion point,
1100   *                                              use an object.
1101   * @param {string}         value.rootClientId   The root client ID to insert at.
1102   * @param {number}         value.insertionIndex The index to insert at.
1103   *
1104   * @return {Object} Action object.
1105   */
1106  
1107  function actions_setIsInserterOpened(value) {
1108    return {
1109      type: 'SET_IS_INSERTER_OPENED',
1110      value
1111    };
1112  }
1113  /**
1114   * Returns an action object used to update the settings.
1115   *
1116   * @param {Object} settings New settings.
1117   *
1118   * @return {Object} Action object.
1119   */
1120  
1121  function actions_updateSettings(settings) {
1122    return {
1123      type: 'UPDATE_SETTINGS',
1124      settings
1125    };
1126  }
1127  /**
1128   * Sets whether the list view panel should be open.
1129   *
1130   * @param {boolean} isOpen If true, opens the list view. If false, closes it.
1131   *                         It does not toggle the state, but sets it directly.
1132   */
1133  
1134  function actions_setIsListViewOpened(isOpen) {
1135    return {
1136      type: 'SET_IS_LIST_VIEW_OPENED',
1137      isOpen
1138    };
1139  }
1140  /**
1141   * Reverts a template to its original theme-provided file.
1142   *
1143   * @param {Object}  template            The template to revert.
1144   * @param {Object}  [options]
1145   * @param {boolean} [options.allowUndo] Whether to allow the user to undo
1146   *                                      reverting the template. Default true.
1147   */
1148  
1149  function* actions_revertTemplate(template) {
1150    let {
1151      allowUndo = true
1152    } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1153  
1154    if (!isTemplateRevertable(template)) {
1155      yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', Object(external_wp_i18n_["__"])('This template is not revertable.'), {
1156        type: 'snackbar'
1157      });
1158      return;
1159    }
1160  
1161    try {
1162      var _fileTemplate$content;
1163  
1164      const templateEntity = yield external_wp_data_["controls"].select(external_wp_coreData_["store"], 'getEntity', 'postType', template.type);
1165  
1166      if (!templateEntity) {
1167        yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', Object(external_wp_i18n_["__"])('The editor has encountered an unexpected error. Please reload.'), {
1168          type: 'snackbar'
1169        });
1170        return;
1171      }
1172  
1173      const fileTemplatePath = Object(external_wp_url_["addQueryArgs"])(`$templateEntity.baseURL}/$template.id}`, {
1174        context: 'edit',
1175        source: 'theme'
1176      });
1177      const fileTemplate = yield Object(external_wp_dataControls_["apiFetch"])({
1178        path: fileTemplatePath
1179      });
1180  
1181      if (!fileTemplate) {
1182        yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', Object(external_wp_i18n_["__"])('The editor has encountered an unexpected error. Please reload.'), {
1183          type: 'snackbar'
1184        });
1185        return;
1186      }
1187  
1188      const serializeBlocks = _ref => {
1189        let {
1190          blocks: blocksForSerialization = []
1191        } = _ref;
1192        return Object(external_wp_blocks_["__unstableSerializeAndClean"])(blocksForSerialization);
1193      };
1194  
1195      const edited = yield external_wp_data_["controls"].select(external_wp_coreData_["store"], 'getEditedEntityRecord', 'postType', template.type, template.id); // We are fixing up the undo level here to make sure we can undo
1196      // the revert in the header toolbar correctly.
1197  
1198      yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'editEntityRecord', 'postType', template.type, template.id, {
1199        content: serializeBlocks,
1200        // required to make the `undo` behave correctly
1201        blocks: edited.blocks,
1202        // required to revert the blocks in the editor
1203        source: 'custom' // required to avoid turning the editor into a dirty state
1204  
1205      }, {
1206        undoIgnore: true // required to merge this edit with the last undo level
1207  
1208      });
1209      const blocks = Object(external_wp_blocks_["parse"])(fileTemplate === null || fileTemplate === void 0 ? void 0 : (_fileTemplate$content = fileTemplate.content) === null || _fileTemplate$content === void 0 ? void 0 : _fileTemplate$content.raw);
1210      yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'editEntityRecord', 'postType', template.type, fileTemplate.id, {
1211        content: serializeBlocks,
1212        blocks,
1213        source: 'theme'
1214      });
1215  
1216      if (allowUndo) {
1217        const undoRevert = async () => {
1218          await Object(external_wp_data_["dispatch"])(external_wp_coreData_["store"]).editEntityRecord('postType', template.type, edited.id, {
1219            content: serializeBlocks,
1220            blocks: edited.blocks,
1221            source: 'custom'
1222          });
1223        };
1224  
1225        yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createSuccessNotice', Object(external_wp_i18n_["__"])('Template reverted.'), {
1226          type: 'snackbar',
1227          actions: [{
1228            label: Object(external_wp_i18n_["__"])('Undo'),
1229            onClick: undoRevert
1230          }]
1231        });
1232      } else {
1233        yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createSuccessNotice', Object(external_wp_i18n_["__"])('Template reverted.'));
1234      }
1235    } catch (error) {
1236      const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : Object(external_wp_i18n_["__"])('Template revert failed. Please reload.');
1237      yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', errorMessage, {
1238        type: 'snackbar'
1239      });
1240    }
1241  }
1242  /**
1243   * Returns an action object used in signalling that the user opened an editor sidebar.
1244   *
1245   * @param {?string} name Sidebar name to be opened.
1246   *
1247   * @yield {Object} Action object.
1248   */
1249  
1250  function* openGeneralSidebar(name) {
1251    yield external_wp_data_["controls"].dispatch(build_module["i" /* store */], 'enableComplementaryArea', STORE_NAME, name);
1252  }
1253  /**
1254   * Returns an action object signalling that the user closed the sidebar.
1255   *
1256   * @yield {Object} Action object.
1257   */
1258  
1259  function* closeGeneralSidebar() {
1260    yield external_wp_data_["controls"].dispatch(build_module["i" /* store */], 'disableComplementaryArea', STORE_NAME);
1261  }
1262  
1263  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
1264  var rememo = __webpack_require__("pPDe");
1265  
1266  // EXTERNAL MODULE: external ["wp","mediaUtils"]
1267  var external_wp_mediaUtils_ = __webpack_require__("6aBm");
1268  
1269  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js
1270  /**
1271   * External dependencies
1272   */
1273  
1274  /**
1275   * Internal dependencies
1276   */
1277  
1278  
1279  function isTemplateSuperseded(slug, existingSlugs, showOnFront) {
1280    if (!TEMPLATE_OVERRIDES[slug]) {
1281      return false;
1282    } // `home` template is unused if it is superseded by `front-page`
1283    // or "show on front" is set to show a page rather than blog posts.
1284  
1285  
1286    if (slug === 'home' && showOnFront !== 'posts') {
1287      return true;
1288    }
1289  
1290    return TEMPLATE_OVERRIDES[slug].every(overrideSlug => existingSlugs.includes(overrideSlug) || isTemplateSuperseded(overrideSlug, existingSlugs, showOnFront));
1291  }
1292  function getTemplateLocation(slug) {
1293    const isTopLevelTemplate = TEMPLATES_TOP_LEVEL.includes(slug);
1294  
1295    if (isTopLevelTemplate) {
1296      return MENU_TEMPLATES;
1297    }
1298  
1299    const isGeneralTemplate = TEMPLATES_GENERAL.includes(slug);
1300  
1301    if (isGeneralTemplate) {
1302      return MENU_TEMPLATES_GENERAL;
1303    }
1304  
1305    const isPostsTemplate = TEMPLATES_POSTS_PREFIXES.some(prefix => slug.startsWith(prefix));
1306  
1307    if (isPostsTemplate) {
1308      return MENU_TEMPLATES_POSTS;
1309    }
1310  
1311    const isPagesTemplate = TEMPLATES_PAGES_PREFIXES.some(prefix => slug.startsWith(prefix));
1312  
1313    if (isPagesTemplate) {
1314      return MENU_TEMPLATES_PAGES;
1315    }
1316  
1317    return MENU_TEMPLATES_GENERAL;
1318  }
1319  function getUnusedTemplates(templates, showOnFront) {
1320    const templateSlugs = Object(external_lodash_["map"])(templates, 'slug');
1321    const supersededTemplates = templates.filter(_ref => {
1322      let {
1323        slug
1324      } = _ref;
1325      return isTemplateSuperseded(slug, templateSlugs, showOnFront);
1326    });
1327    return supersededTemplates;
1328  }
1329  function getTemplatesLocationMap(templates) {
1330    return templates.reduce((obj, template) => {
1331      obj[template.slug] = getTemplateLocation(template.slug);
1332      return obj;
1333    }, {});
1334  }
1335  
1336  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/selectors.js
1337  /**
1338   * External dependencies
1339   */
1340  
1341  
1342  /**
1343   * WordPress dependencies
1344   */
1345  
1346  
1347  
1348  
1349  
1350  
1351  /**
1352   * Internal dependencies
1353   */
1354  
1355  
1356  
1357  /**
1358   * @typedef {'template'|'template_type'} TemplateType Template type.
1359   */
1360  
1361  /**
1362   * Returns whether the given feature is enabled or not.
1363   *
1364   * @param {Object} state   Global application state.
1365   * @param {string} feature Feature slug.
1366   *
1367   * @return {boolean} Is active.
1368   */
1369  
1370  function isFeatureActive(state, feature) {
1371    return Object(external_lodash_["get"])(state.preferences.features, [feature], false);
1372  }
1373  /**
1374   * Returns the current editing canvas device type.
1375   *
1376   * @param {Object} state Global application state.
1377   *
1378   * @return {string} Device type.
1379   */
1380  
1381  function selectors_experimentalGetPreviewDeviceType(state) {
1382    return state.deviceType;
1383  }
1384  /**
1385   * Returns whether the current user can create media or not.
1386   *
1387   * @param {Object} state Global application state.
1388   *
1389   * @return {Object} Whether the current user can create media or not.
1390   */
1391  
1392  const getCanUserCreateMedia = Object(external_wp_data_["createRegistrySelector"])(select => () => select(external_wp_coreData_["store"]).canUser('create', 'media'));
1393  /**
1394   * Returns any available Reusable blocks.
1395   *
1396   * @param {Object} state Global application state.
1397   *
1398   * @return {Array} The available reusable blocks.
1399   */
1400  
1401  const getReusableBlocks = Object(external_wp_data_["createRegistrySelector"])(select => () => {
1402    const isWeb = external_wp_element_["Platform"].OS === 'web';
1403    return isWeb ? select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_block', {
1404      per_page: -1
1405    }) : [];
1406  });
1407  /**
1408   * Returns the settings, taking into account active features and permissions.
1409   *
1410   * @param {Object}   state             Global application state.
1411   * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.
1412   *
1413   * @return {Object} Settings.
1414   */
1415  
1416  const selectors_getSettings = Object(rememo["a" /* default */])((state, setIsInserterOpen) => {
1417    const settings = { ...state.settings,
1418      outlineMode: true,
1419      focusMode: isFeatureActive(state, 'focusMode'),
1420      hasFixedToolbar: isFeatureActive(state, 'fixedToolbar'),
1421      __experimentalSetIsInserterOpened: setIsInserterOpen,
1422      __experimentalReusableBlocks: getReusableBlocks(state)
1423    };
1424    const canUserCreateMedia = getCanUserCreateMedia(state);
1425  
1426    if (!canUserCreateMedia) {
1427      return settings;
1428    }
1429  
1430    settings.mediaUpload = _ref => {
1431      let {
1432        onError,
1433        ...rest
1434      } = _ref;
1435      Object(external_wp_mediaUtils_["uploadMedia"])({
1436        wpAllowedMimeTypes: state.settings.allowedMimeTypes,
1437        onError: _ref2 => {
1438          let {
1439            message
1440          } = _ref2;
1441          return onError(message);
1442        },
1443        ...rest
1444      });
1445    };
1446  
1447    return settings;
1448  }, state => [getCanUserCreateMedia(state), state.settings, isFeatureActive(state, 'focusMode'), isFeatureActive(state, 'fixedToolbar'), getReusableBlocks(state)]);
1449  /**
1450   * Returns the current home template ID.
1451   *
1452   * @param {Object} state Global application state.
1453   *
1454   * @return {number?} Home template ID.
1455   */
1456  
1457  function getHomeTemplateId(state) {
1458    return state.homeTemplateId;
1459  }
1460  
1461  function getCurrentEditedPost(state) {
1462    return state.editedPost;
1463  }
1464  /**
1465   * Returns the current edited post type (wp_template or wp_template_part).
1466   *
1467   * @param {Object} state Global application state.
1468   *
1469   * @return {TemplateType?} Template type.
1470   */
1471  
1472  
1473  function selectors_getEditedPostType(state) {
1474    return getCurrentEditedPost(state).type;
1475  }
1476  /**
1477   * Returns the ID of the currently edited template or template part.
1478   *
1479   * @param {Object} state Global application state.
1480   *
1481   * @return {string?} Post ID.
1482   */
1483  
1484  function selectors_getEditedPostId(state) {
1485    return getCurrentEditedPost(state).id;
1486  }
1487  /**
1488   * Returns the current page object.
1489   *
1490   * @param {Object} state Global application state.
1491   *
1492   * @return {Object} Page.
1493   */
1494  
1495  function selectors_getPage(state) {
1496    return getCurrentEditedPost(state).page;
1497  }
1498  /**
1499   * Returns the active menu in the navigation panel.
1500   *
1501   * @param {Object} state Global application state.
1502   *
1503   * @return {string} Active menu.
1504   */
1505  
1506  function getNavigationPanelActiveMenu(state) {
1507    return state.navigationPanel.menu;
1508  }
1509  /**
1510   * Returns the current template or template part's corresponding
1511   * navigation panel's sub menu, to be used with `openNavigationPanelToMenu`.
1512   *
1513   * @param {Object} state Global application state.
1514   *
1515   * @return {string} The current template or template part's sub menu.
1516   */
1517  
1518  const getCurrentTemplateNavigationPanelSubMenu = Object(external_wp_data_["createRegistrySelector"])(select => state => {
1519    const templateType = selectors_getEditedPostType(state);
1520    const templateId = selectors_getEditedPostId(state);
1521    const template = templateId ? select(external_wp_coreData_["store"]).getEntityRecord('postType', templateType, templateId) : null;
1522  
1523    if (!template) {
1524      return MENU_ROOT;
1525    }
1526  
1527    if ('wp_template_part' === templateType) {
1528      var _TEMPLATE_PARTS_SUB_M;
1529  
1530      return ((_TEMPLATE_PARTS_SUB_M = TEMPLATE_PARTS_SUB_MENUS.find(submenu => submenu.area === (template === null || template === void 0 ? void 0 : template.area))) === null || _TEMPLATE_PARTS_SUB_M === void 0 ? void 0 : _TEMPLATE_PARTS_SUB_M.menu) || MENU_TEMPLATE_PARTS;
1531    }
1532  
1533    const templates = select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_template');
1534    const showOnFront = select(external_wp_coreData_["store"]).getEditedEntityRecord('root', 'site').show_on_front;
1535  
1536    if (isTemplateSuperseded(template.slug, Object(external_lodash_["map"])(templates, 'slug'), showOnFront)) {
1537      return MENU_TEMPLATES_UNUSED;
1538    }
1539  
1540    return getTemplateLocation(template.slug);
1541  });
1542  /**
1543   * Returns the current opened/closed state of the navigation panel.
1544   *
1545   * @param {Object} state Global application state.
1546   *
1547   * @return {boolean} True if the navigation panel should be open; false if closed.
1548   */
1549  
1550  function selectors_isNavigationOpened(state) {
1551    return state.navigationPanel.isOpen;
1552  }
1553  /**
1554   * Returns the current opened/closed state of the inserter panel.
1555   *
1556   * @param {Object} state Global application state.
1557   *
1558   * @return {boolean} True if the inserter panel should be open; false if closed.
1559   */
1560  
1561  function selectors_isInserterOpened(state) {
1562    return !!state.blockInserterPanel;
1563  }
1564  /**
1565   * Get the insertion point for the inserter.
1566   *
1567   * @param {Object} state Global application state.
1568   *
1569   * @return {Object} The root client ID, index to insert at and starting filter value.
1570   */
1571  
1572  function __experimentalGetInsertionPoint(state) {
1573    const {
1574      rootClientId,
1575      insertionIndex,
1576      filterValue
1577    } = state.blockInserterPanel;
1578    return {
1579      rootClientId,
1580      insertionIndex,
1581      filterValue
1582    };
1583  }
1584  /**
1585   * Returns the current opened/closed state of the list view panel.
1586   *
1587   * @param {Object} state Global application state.
1588   *
1589   * @return {boolean} True if the list view panel should be open; false if closed.
1590   */
1591  
1592  function selectors_isListViewOpened(state) {
1593    return state.listViewPanel;
1594  }
1595  /**
1596   * Returns the template parts and their blocks for the current edited template.
1597   *
1598   * @param {Object} state Global application state.
1599   * @return {Array} Template parts and their blocks in an array.
1600   */
1601  
1602  const getCurrentTemplateTemplateParts = Object(external_wp_data_["createRegistrySelector"])(select => state => {
1603    var _template$blocks;
1604  
1605    const templateType = selectors_getEditedPostType(state);
1606    const templateId = selectors_getEditedPostId(state);
1607    const template = select(external_wp_coreData_["store"]).getEditedEntityRecord('postType', templateType, templateId);
1608    const templateParts = select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_template_part', {
1609      per_page: -1
1610    });
1611    const templatePartsById = Object(external_lodash_["keyBy"])(templateParts, templatePart => templatePart.id);
1612    return ((_template$blocks = template.blocks) !== null && _template$blocks !== void 0 ? _template$blocks : []).filter(block => Object(external_wp_blocks_["isTemplatePart"])(block)).map(block => {
1613      const {
1614        attributes: {
1615          theme,
1616          slug
1617        }
1618      } = block;
1619      const templatePartId = `$theme}//${slug}`;
1620      const templatePart = templatePartsById[templatePartId];
1621      return {
1622        templatePart,
1623        block
1624      };
1625    }).filter(_ref3 => {
1626      let {
1627        templatePart
1628      } = _ref3;
1629      return !!templatePart;
1630    });
1631  });
1632  
1633  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/store/index.js
1634  /**
1635   * WordPress dependencies
1636   */
1637  
1638  
1639  /**
1640   * Internal dependencies
1641   */
1642  
1643  
1644  
1645  
1646  
1647  const storeConfig = {
1648    reducer: reducer,
1649    actions: actions_namespaceObject,
1650    selectors: selectors_namespaceObject,
1651    controls: external_wp_dataControls_["controls"],
1652    persist: ['preferences']
1653  };
1654  const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, storeConfig); // Once we build a more generic persistence plugin that works across types of stores
1655  // we'd be able to replace this with a register call.
1656  
1657  Object(external_wp_data_["registerStore"])(STORE_NAME, storeConfig);
1658  
1659  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/plugins/welcome-guide-menu-item.js
1660  
1661  
1662  /**
1663   * WordPress dependencies
1664   */
1665  
1666  
1667  
1668  /**
1669   * Internal dependencies
1670   */
1671  
1672  
1673  function WelcomeGuideMenuItem() {
1674    const {
1675      toggleFeature
1676    } = Object(external_wp_data_["useDispatch"])(store);
1677    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
1678      onClick: () => toggleFeature('welcomeGuide')
1679    }, Object(external_wp_i18n_["__"])('Welcome Guide'));
1680  }
1681  
1682  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/plugins/index.js
1683  
1684  
1685  /**
1686   * WordPress dependencies
1687   */
1688  
1689  /**
1690   * Internal dependencies
1691   */
1692  
1693  
1694  
1695  
1696  Object(external_wp_plugins_["registerPlugin"])('edit-site', {
1697    render() {
1698      return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(tools_more_menu_group, null, Object(external_wp_element_["createElement"])(SiteExport, null), Object(external_wp_element_["createElement"])(WelcomeGuideMenuItem, null)));
1699    }
1700  
1701  });
1702  
1703  // EXTERNAL MODULE: external ["wp","hooks"]
1704  var external_wp_hooks_ = __webpack_require__("g56x");
1705  
1706  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/components.js
1707  /**
1708   * WordPress dependencies
1709   */
1710  
1711  
1712  Object(external_wp_hooks_["addFilter"])('editor.MediaUpload', 'core/edit-site/components/media-upload', () => external_wp_mediaUtils_["MediaUpload"]);
1713  
1714  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/index.js
1715  /**
1716   * Internal dependencies
1717   */
1718  
1719  
1720  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
1721  var esm_extends = __webpack_require__("wx14");
1722  
1723  // CONCATENATED MODULE: ./node_modules/history/index.js
1724  var r,B=r||(r={});B.Pop="POP";B.Push="PUSH";B.Replace="REPLACE";var C= false?undefined:function(b){return b};function D(b,h){if(!b){"undefined"!==typeof console&&console.warn(h);try{throw Error(h);}catch(e){}}}function E(b){b.preventDefault();b.returnValue=""}
1725  function F(){var b=[];return{get length(){return b.length},push:function(h){b.push(h);return function(){b=b.filter(function(e){return e!==h})}},call:function(h){b.forEach(function(e){return e&&e(h)})}}}function H(){return Math.random().toString(36).substr(2,8)}function I(b){var h=b.pathname;h=void 0===h?"/":h;var e=b.search;e=void 0===e?"":e;b=b.hash;b=void 0===b?"":b;e&&"?"!==e&&(h+="?"===e.charAt(0)?e:"?"+e);b&&"#"!==b&&(h+="#"===b.charAt(0)?b:"#"+b);return h}
1726  function J(b){var h={};if(b){var e=b.indexOf("#");0<=e&&(h.hash=b.substr(e),b=b.substr(0,e));e=b.indexOf("?");0<=e&&(h.search=b.substr(e),b=b.substr(0,e));b&&(h.pathname=b)}return h}
1727  function createBrowserHistory(b){function h(){var c=p.location,a=m.state||{};return[a.idx,C({pathname:c.pathname,search:c.search,hash:c.hash,state:a.usr||null,key:a.key||"default"})]}function e(c){return"string"===typeof c?c:I(c)}function x(c,a){void 0===a&&(a=null);return C(Object(esm_extends["a" /* default */])({pathname:q.pathname,hash:"",search:""},"string"===typeof c?J(c):c,{state:a,key:H()}))}function z(c){t=c;c=h();v=c[0];q=c[1];d.call({action:t,location:q})}function A(c,a){function f(){A(c,a)}var l=r.Push,k=x(c,
1728  a);if(!g.length||(g.call({action:l,location:k,retry:f}),!1)){var n=[{usr:k.state,key:k.key,idx:v+1},e(k)];k=n[0];n=n[1];try{m.pushState(k,"",n)}catch(G){p.location.assign(n)}z(l)}}function y(c,a){function f(){y(c,a)}var l=r.Replace,k=x(c,a);g.length&&(g.call({action:l,location:k,retry:f}),1)||(k=[{usr:k.state,key:k.key,idx:v},e(k)],m.replaceState(k[0],"",k[1]),z(l))}function w(c){m.go(c)}void 0===b&&(b={});b=b.window;var p=void 0===b?document.defaultView:b,m=p.history,u=null;p.addEventListener("popstate",
1729  function(){if(u)g.call(u),u=null;else{var c=r.Pop,a=h(),f=a[0];a=a[1];if(g.length)if(null!=f){var l=v-f;l&&(u={action:c,location:a,retry:function(){w(-1*l)}},w(l))}else false?undefined:
1730  void 0;else z(c)}});var t=r.Pop;b=h();var v=b[0],q=b[1],d=F(),g=F();null==v&&(v=0,m.replaceState(Object(esm_extends["a" /* default */])({},m.state,{idx:v}),""));return{get action(){return t},get location(){return q},createHref:e,push:A,replace:y,go:w,back:function(){w(-1)},forward:function(){w(1)},listen:function(c){return d.push(c)},block:function(c){var a=g.push(c);1===g.length&&p.addEventListener("beforeunload",E);return function(){a();g.length||p.removeEventListener("beforeunload",E)}}}};
1731  function createHashHistory(b){function h(){var a=J(m.location.hash.substr(1)),f=a.pathname,l=a.search;a=a.hash;var k=u.state||{};return[k.idx,C({pathname:void 0===f?"/":f,search:void 0===l?"":l,hash:void 0===a?"":a,state:k.usr||null,key:k.key||"default"})]}function e(){if(t)c.call(t),t=null;else{var a=r.Pop,f=h(),l=f[0];f=f[1];if(c.length)if(null!=l){var k=q-l;k&&(t={action:a,location:f,retry:function(){p(-1*k)}},p(k))}else false?undefined:
1732  void 0;else A(a)}}function x(a){var f=document.querySelector("base"),l="";f&&f.getAttribute("href")&&(f=m.location.href,l=f.indexOf("#"),l=-1===l?f:f.slice(0,l));return l+"#"+("string"===typeof a?a:I(a))}function z(a,f){void 0===f&&(f=null);return C(Object(esm_extends["a" /* default */])({pathname:d.pathname,hash:"",search:""},"string"===typeof a?J(a):a,{state:f,key:H()}))}function A(a){v=a;a=h();q=a[0];d=a[1];g.call({action:v,location:d})}function y(a,f){function l(){y(a,f)}var k=r.Push,n=z(a,f); false?
1733  undefined:void 0;if(!c.length||(c.call({action:k,location:n,retry:l}),!1)){var G=[{usr:n.state,key:n.key,idx:q+1},x(n)];n=G[0];G=G[1];try{u.pushState(n,"",G)}catch(K){m.location.assign(G)}A(k)}}function w(a,f){function l(){w(a,f)}var k=r.Replace,n=z(a,f); false?undefined:void 0;c.length&&(c.call({action:k,location:n,retry:l}),1)||(n=[{usr:n.state,key:n.key,idx:q},x(n)],u.replaceState(n[0],"",n[1]),A(k))}function p(a){u.go(a)}void 0===b&&(b={});b=b.window;var m=void 0===b?document.defaultView:b,u=m.history,t=null;m.addEventListener("popstate",e);m.addEventListener("hashchange",function(){var a=h()[1];I(a)!==I(d)&&e()});var v=r.Pop;b=h();var q=b[0],d=b[1],g=F(),c=F();null==q&&(q=0,u.replaceState(Object(esm_extends["a" /* default */])({},u.state,{idx:q}),""));return{get action(){return v},get location(){return d},
1734  createHref:x,push:y,replace:w,go:p,back:function(){p(-1)},forward:function(){p(1)},listen:function(a){return g.push(a)},block:function(a){var f=c.push(a);1===c.length&&m.addEventListener("beforeunload",E);return function(){f();c.length||m.removeEventListener("beforeunload",E)}}}};
1735  function createMemoryHistory(b){function h(d,g){void 0===g&&(g=null);return C(Object(esm_extends["a" /* default */])({pathname:t.pathname,search:"",hash:""},"string"===typeof d?J(d):d,{state:g,key:H()}))}function e(d,g,c){return!q.length||(q.call({action:d,location:g,retry:c}),!1)}function x(d,g){u=d;t=g;v.call({action:u,location:t})}function z(d,g){var c=r.Push,a=h(d,g); false?undefined:
1736  void 0;e(c,a,function(){z(d,g)})&&(m+=1,p.splice(m,p.length,a),x(c,a))}function A(d,g){var c=r.Replace,a=h(d,g); false?undefined:void 0;e(c,a,function(){A(d,g)})&&(p[m]=a,x(c,a))}function y(d){var g=Math.min(Math.max(m+d,0),p.length-1),c=r.Pop,a=p[g];e(c,a,function(){y(d)})&&(m=g,x(c,a))}void 0===b&&(b={});var w=b;b=w.initialEntries;w=w.initialIndex;var p=(void 0===
1737  b?["/"]:b).map(function(d){var g=C(Object(esm_extends["a" /* default */])({pathname:"/",search:"",hash:"",state:null,key:H()},"string"===typeof d?J(d):d)); false?undefined:void 0;return g}),m=Math.min(Math.max(null==w?p.length-1:w,0),p.length-1),u=r.Pop,t=p[m],v=F(),q=F();return{get index(){return m},get action(){return u},get location(){return t},createHref:function(d){return"string"===
1738  typeof d?d:I(d)},push:z,replace:A,go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(d){return v.push(d)},block:function(d){return q.push(d)}}};
1739  
1740  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/history.js
1741  /**
1742   * External dependencies
1743   */
1744  
1745  /**
1746   * WordPress dependencies
1747   */
1748  
1749  
1750  const history_history = createBrowserHistory();
1751  const originalHistoryPush = history_history.push;
1752  const originalHistoryReplace = history_history.replace;
1753  
1754  function push(params, state) {
1755    return originalHistoryPush.call(history_history, Object(external_wp_url_["addQueryArgs"])(window.location.href, params), state);
1756  }
1757  
1758  function history_replace(params, state) {
1759    return originalHistoryReplace.call(history_history, Object(external_wp_url_["addQueryArgs"])(window.location.href, params), state);
1760  }
1761  
1762  history_history.push = push;
1763  history_history.replace = history_replace;
1764  /* harmony default export */ var utils_history = (history_history);
1765  
1766  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/index.js
1767  
1768  
1769  /**
1770   * WordPress dependencies
1771   */
1772  
1773  /**
1774   * Internal dependencies
1775   */
1776  
1777  
1778  const RoutesContext = Object(external_wp_element_["createContext"])();
1779  const HistoryContext = Object(external_wp_element_["createContext"])();
1780  function useLocation() {
1781    return Object(external_wp_element_["useContext"])(RoutesContext);
1782  }
1783  function useHistory() {
1784    return Object(external_wp_element_["useContext"])(HistoryContext);
1785  }
1786  
1787  function getLocationWithParams(location) {
1788    const searchParams = new URLSearchParams(location.search);
1789    return { ...location,
1790      params: Object.fromEntries(searchParams.entries())
1791    };
1792  }
1793  
1794  function Routes(_ref) {
1795    let {
1796      children
1797    } = _ref;
1798    const [location, setLocation] = Object(external_wp_element_["useState"])(() => getLocationWithParams(utils_history.location));
1799    Object(external_wp_element_["useEffect"])(() => {
1800      return utils_history.listen(_ref2 => {
1801        let {
1802          location: updatedLocation
1803        } = _ref2;
1804        setLocation(getLocationWithParams(updatedLocation));
1805      });
1806    }, []);
1807    return Object(external_wp_element_["createElement"])(HistoryContext.Provider, {
1808      value: utils_history
1809    }, Object(external_wp_element_["createElement"])(RoutesContext.Provider, {
1810      value: location
1811    }, children(location)));
1812  }
1813  
1814  // EXTERNAL MODULE: external ["wp","blockEditor"]
1815  var external_wp_blockEditor_ = __webpack_require__("axFQ");
1816  
1817  // EXTERNAL MODULE: external ["wp","keyboardShortcuts"]
1818  var external_wp_keyboardShortcuts_ = __webpack_require__("hF7m");
1819  
1820  // EXTERNAL MODULE: external ["wp","compose"]
1821  var external_wp_compose_ = __webpack_require__("K9lf");
1822  
1823  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
1824  var plus = __webpack_require__("Q4Sy");
1825  
1826  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
1827  var list_view = __webpack_require__("OzlF");
1828  
1829  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
1830  var more_vertical = __webpack_require__("VKE3");
1831  
1832  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
1833  var check = __webpack_require__("RMJe");
1834  
1835  // EXTERNAL MODULE: external ["wp","a11y"]
1836  var external_wp_a11y_ = __webpack_require__("gdqT");
1837  
1838  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/feature-toggle/index.js
1839  
1840  
1841  /**
1842   * External dependencies
1843   */
1844  
1845  /**
1846   * WordPress dependencies
1847   */
1848  
1849  
1850  
1851  
1852  
1853  
1854  /**
1855   * Internal dependencies
1856   */
1857  
1858  
1859  function FeatureToggle(_ref) {
1860    let {
1861      feature,
1862      label,
1863      info,
1864      messageActivated,
1865      messageDeactivated
1866    } = _ref;
1867  
1868    const speakMessage = () => {
1869      if (isActive) {
1870        Object(external_wp_a11y_["speak"])(messageDeactivated || Object(external_wp_i18n_["__"])('Feature deactivated'));
1871      } else {
1872        Object(external_wp_a11y_["speak"])(messageActivated || Object(external_wp_i18n_["__"])('Feature activated'));
1873      }
1874    };
1875  
1876    const isActive = Object(external_wp_data_["useSelect"])(select => {
1877      return select(store).isFeatureActive(feature);
1878    }, []);
1879    const {
1880      toggleFeature
1881    } = Object(external_wp_data_["useDispatch"])(store);
1882    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
1883      icon: isActive && check["a" /* default */],
1884      isSelected: isActive,
1885      onClick: Object(external_lodash_["flow"])(toggleFeature.bind(null, feature), speakMessage),
1886      role: "menuitemcheckbox",
1887      info: info
1888    }, label);
1889  }
1890  
1891  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/more-menu/index.js
1892  
1893  
1894  /**
1895   * WordPress dependencies
1896   */
1897  
1898  
1899  
1900  
1901  /**
1902   * Internal dependencies
1903   */
1904  
1905  
1906  
1907  const POPOVER_PROPS = {
1908    className: 'edit-site-more-menu__content',
1909    position: 'bottom left'
1910  };
1911  const TOGGLE_PROPS = {
1912    tooltipPosition: 'bottom'
1913  };
1914  
1915  const MoreMenu = () => Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
1916    className: "edit-site-more-menu",
1917    icon: more_vertical["a" /* default */],
1918    label: Object(external_wp_i18n_["__"])('More tools & options'),
1919    popoverProps: POPOVER_PROPS,
1920    toggleProps: TOGGLE_PROPS
1921  }, _ref => {
1922    let {
1923      onClose
1924    } = _ref;
1925    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
1926      label: Object(external_wp_i18n_["_x"])('View', 'noun')
1927    }, Object(external_wp_element_["createElement"])(FeatureToggle, {
1928      feature: "fixedToolbar",
1929      label: Object(external_wp_i18n_["__"])('Top toolbar'),
1930      info: Object(external_wp_i18n_["__"])('Access all block and document tools in a single place'),
1931      messageActivated: Object(external_wp_i18n_["__"])('Top toolbar activated'),
1932      messageDeactivated: Object(external_wp_i18n_["__"])('Top toolbar deactivated')
1933    }), Object(external_wp_element_["createElement"])(FeatureToggle, {
1934      feature: "focusMode",
1935      label: Object(external_wp_i18n_["__"])('Spotlight mode'),
1936      info: Object(external_wp_i18n_["__"])('Focus on one block at a time'),
1937      messageActivated: Object(external_wp_i18n_["__"])('Spotlight mode activated'),
1938      messageDeactivated: Object(external_wp_i18n_["__"])('Spotlight mode deactivated')
1939    }), Object(external_wp_element_["createElement"])(build_module["a" /* ActionItem */].Slot, {
1940      name: "core/edit-site/plugin-more-menu",
1941      label: Object(external_wp_i18n_["__"])('Plugins'),
1942      as: external_wp_components_["MenuGroup"],
1943      fillProps: {
1944        onClick: onClose
1945      }
1946    })), Object(external_wp_element_["createElement"])(tools_more_menu_group.Slot, {
1947      fillProps: {
1948        onClose
1949      }
1950    }));
1951  });
1952  
1953  /* harmony default export */ var more_menu = (MoreMenu);
1954  
1955  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/save-button/index.js
1956  
1957  
1958  /**
1959   * External dependencies
1960   */
1961  
1962  /**
1963   * WordPress dependencies
1964   */
1965  
1966  
1967  
1968  
1969  
1970  function SaveButton(_ref) {
1971    let {
1972      openEntitiesSavedStates,
1973      isEntitiesSavedStatesOpen
1974    } = _ref;
1975    const {
1976      isDirty,
1977      isSaving
1978    } = Object(external_wp_data_["useSelect"])(select => {
1979      const {
1980        __experimentalGetDirtyEntityRecords,
1981        isSavingEntityRecord
1982      } = select(external_wp_coreData_["store"]);
1983  
1984      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
1985  
1986      return {
1987        isDirty: dirtyEntityRecords.length > 0,
1988        isSaving: Object(external_lodash_["some"])(dirtyEntityRecords, record => isSavingEntityRecord(record.kind, record.name, record.key))
1989      };
1990    }, []);
1991    const disabled = !isDirty || isSaving;
1992    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
1993      variant: "primary",
1994      className: "edit-site-save-button__button",
1995      "aria-disabled": disabled,
1996      "aria-expanded": isEntitiesSavedStatesOpen,
1997      disabled: disabled,
1998      isBusy: isSaving,
1999      onClick: disabled ? undefined : openEntitiesSavedStates
2000    }, Object(external_wp_i18n_["__"])('Save')));
2001  }
2002  
2003  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
2004  var library_undo = __webpack_require__("Ntru");
2005  
2006  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
2007  var library_redo = __webpack_require__("K2cm");
2008  
2009  // EXTERNAL MODULE: external ["wp","keycodes"]
2010  var external_wp_keycodes_ = __webpack_require__("RxS6");
2011  
2012  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/undo-redo/undo.js
2013  
2014  
2015  /**
2016   * WordPress dependencies
2017   */
2018  
2019  
2020  
2021  
2022  
2023  
2024  function UndoButton() {
2025    const hasUndo = Object(external_wp_data_["useSelect"])(select => select(external_wp_coreData_["store"]).hasUndo(), []);
2026    const {
2027      undo
2028    } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
2029    return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2030      icon: !Object(external_wp_i18n_["isRTL"])() ? library_undo["a" /* default */] : library_redo["a" /* default */],
2031      label: Object(external_wp_i18n_["__"])('Undo'),
2032      shortcut: external_wp_keycodes_["displayShortcut"].primary('z') // If there are no undo levels we don't want to actually disable this
2033      // button, because it will remove focus for keyboard users.
2034      // See: https://github.com/WordPress/gutenberg/issues/3486
2035      ,
2036      "aria-disabled": !hasUndo,
2037      onClick: hasUndo ? undo : undefined
2038    });
2039  }
2040  
2041  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/undo-redo/redo.js
2042  
2043  
2044  /**
2045   * WordPress dependencies
2046   */
2047  
2048  
2049  
2050  
2051  
2052  
2053  function RedoButton() {
2054    const hasRedo = Object(external_wp_data_["useSelect"])(select => select(external_wp_coreData_["store"]).hasRedo(), []);
2055    const {
2056      redo
2057    } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
2058    return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2059      icon: !Object(external_wp_i18n_["isRTL"])() ? library_redo["a" /* default */] : library_undo["a" /* default */],
2060      label: Object(external_wp_i18n_["__"])('Redo'),
2061      shortcut: external_wp_keycodes_["displayShortcut"].primaryShift('z') // If there are no undo levels we don't want to actually disable this
2062      // button, because it will remove focus for keyboard users.
2063      // See: https://github.com/WordPress/gutenberg/issues/3486
2064      ,
2065      "aria-disabled": !hasRedo,
2066      onClick: hasRedo ? redo : undefined
2067    });
2068  }
2069  
2070  // EXTERNAL MODULE: ./node_modules/classnames/index.js
2071  var classnames = __webpack_require__("TSYQ");
2072  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
2073  
2074  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
2075  var chevron_down = __webpack_require__("NWDH");
2076  
2077  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/document-actions/index.js
2078  
2079  
2080  /**
2081   * External dependencies
2082   */
2083  
2084  /**
2085   * WordPress dependencies
2086   */
2087  
2088  
2089  
2090  
2091  
2092  
2093  
2094  
2095  
2096  function getBlockDisplayText(block) {
2097    if (block) {
2098      const blockType = Object(external_wp_blocks_["getBlockType"])(block.name);
2099      return blockType ? Object(external_wp_blocks_["__experimentalGetBlockLabel"])(blockType, block.attributes) : null;
2100    }
2101  
2102    return null;
2103  }
2104  
2105  function useSecondaryText() {
2106    const {
2107      getBlock
2108    } = Object(external_wp_data_["useSelect"])(external_wp_blockEditor_["store"]);
2109    const activeEntityBlockId = Object(external_wp_data_["useSelect"])(select => select(external_wp_blockEditor_["store"]).__experimentalGetActiveBlockIdByBlockNames(['core/template-part']), []);
2110  
2111    if (activeEntityBlockId) {
2112      return {
2113        label: getBlockDisplayText(getBlock(activeEntityBlockId)),
2114        isActive: true
2115      };
2116    }
2117  
2118    return {};
2119  }
2120  /**
2121   * @param {Object}   props             Props for the DocumentActions component.
2122   * @param {string}   props.entityTitle The title to display.
2123   * @param {string}   props.entityLabel A label to use for entity-related options.
2124   *                                     E.g. "template" would be used for "edit
2125   *                                     template" and "show template details".
2126   * @param {boolean}  props.isLoaded    Whether the data is available.
2127   * @param {Function} props.children    React component to use for the
2128   *                                     information dropdown area. Should be a
2129   *                                     function which accepts dropdown props.
2130   */
2131  
2132  
2133  function DocumentActions(_ref) {
2134    let {
2135      entityTitle,
2136      entityLabel,
2137      isLoaded,
2138      children: dropdownContent
2139    } = _ref;
2140    const {
2141      label
2142    } = useSecondaryText(); // The title ref is passed to the popover as the anchorRef so that the
2143    // dropdown is centered over the whole title area rather than just one
2144    // part of it.
2145  
2146    const titleRef = Object(external_wp_element_["useRef"])(); // Return a simple loading indicator until we have information to show.
2147  
2148    if (!isLoaded) {
2149      return Object(external_wp_element_["createElement"])("div", {
2150        className: "edit-site-document-actions"
2151      }, Object(external_wp_i18n_["__"])('Loading…'));
2152    } // Return feedback that the template does not seem to exist.
2153  
2154  
2155    if (!entityTitle) {
2156      return Object(external_wp_element_["createElement"])("div", {
2157        className: "edit-site-document-actions"
2158      }, Object(external_wp_i18n_["__"])('Template not found'));
2159    }
2160  
2161    return Object(external_wp_element_["createElement"])("div", {
2162      className: classnames_default()('edit-site-document-actions', {
2163        'has-secondary-label': !!label
2164      })
2165    }, Object(external_wp_element_["createElement"])("div", {
2166      ref: titleRef,
2167      className: "edit-site-document-actions__title-wrapper"
2168    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalText"], {
2169      size: "body",
2170      className: "edit-site-document-actions__title",
2171      as: "h1"
2172    }, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
2173      as: "span"
2174    }, Object(external_wp_i18n_["sprintf"])(
2175    /* translators: %s: the entity being edited, like "template"*/
2176    Object(external_wp_i18n_["__"])('Editing %s: '), entityLabel)), entityTitle), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalText"], {
2177      size: "body",
2178      className: "edit-site-document-actions__secondary-item"
2179    }, label !== null && label !== void 0 ? label : ''), dropdownContent && Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
2180      popoverProps: {
2181        anchorRef: titleRef.current
2182      },
2183      position: "bottom center",
2184      renderToggle: _ref2 => {
2185        let {
2186          isOpen,
2187          onToggle
2188        } = _ref2;
2189        return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2190          className: "edit-site-document-actions__get-info",
2191          icon: chevron_down["a" /* default */],
2192          "aria-expanded": isOpen,
2193          "aria-haspopup": "true",
2194          onClick: onToggle,
2195          label: Object(external_wp_i18n_["sprintf"])(
2196          /* translators: %s: the entity to see details about, like "template"*/
2197          Object(external_wp_i18n_["__"])('Show %s details'), entityLabel)
2198        });
2199      },
2200      contentClassName: "edit-site-document-actions__info-dropdown",
2201      renderContent: dropdownContent
2202    })));
2203  }
2204  
2205  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/link.js
2206  
2207  
2208  
2209  /**
2210   * WordPress dependencies
2211   */
2212  
2213  /**
2214   * Internal dependencies
2215   */
2216  
2217  
2218  function useLink() {
2219    let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2220    let state = arguments.length > 1 ? arguments[1] : undefined;
2221    let shouldReplace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2222    const history = useHistory();
2223  
2224    function onClick(event) {
2225      event.preventDefault();
2226  
2227      if (shouldReplace) {
2228        history.replace(params, state);
2229      } else {
2230        history.push(params, state);
2231      }
2232    }
2233  
2234    return {
2235      href: Object(external_wp_url_["addQueryArgs"])(window.location.href, params),
2236      onClick
2237    };
2238  }
2239  function Link(_ref) {
2240    let {
2241      params = {},
2242      state,
2243      replace: shouldReplace = false,
2244      children,
2245      ...props
2246    } = _ref;
2247    const {
2248      href,
2249      onClick
2250    } = useLink(params, state, shouldReplace);
2251    return Object(external_wp_element_["createElement"])("a", Object(esm_extends["a" /* default */])({
2252      href: href,
2253      onClick: onClick
2254    }, props), children);
2255  }
2256  
2257  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-details/template-areas.js
2258  
2259  
2260  
2261  /**
2262   * WordPress dependencies
2263   */
2264  
2265  
2266  
2267  
2268  
2269  
2270  /**
2271   * Internal dependencies
2272   */
2273  
2274  
2275  
2276  
2277  
2278  
2279  function TemplatePartItemMore(_ref) {
2280    var _templatePart$title;
2281  
2282    let {
2283      onClose,
2284      templatePart,
2285      closeTemplateDetailsDropdown
2286    } = _ref;
2287    const {
2288      revertTemplate
2289    } = Object(external_wp_data_["useDispatch"])(store);
2290    const {
2291      params
2292    } = useLocation();
2293    const editLinkProps = useLink({
2294      postId: templatePart.id,
2295      postType: templatePart.type
2296    }, {
2297      fromTemplateId: params.postId
2298    });
2299  
2300    function editTemplatePart(event) {
2301      editLinkProps.onClick(event);
2302      onClose();
2303      closeTemplateDetailsDropdown();
2304    }
2305  
2306    function clearCustomizations() {
2307      revertTemplate(templatePart);
2308      onClose();
2309      closeTemplateDetailsDropdown();
2310    }
2311  
2312    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], Object(esm_extends["a" /* default */])({}, editLinkProps, {
2313      onClick: editTemplatePart
2314    }), Object(external_wp_i18n_["sprintf"])(
2315    /* translators: %s: template part title */
2316    Object(external_wp_i18n_["__"])('Edit %s'), (_templatePart$title = templatePart.title) === null || _templatePart$title === void 0 ? void 0 : _templatePart$title.rendered))), isTemplateRevertable(templatePart) && Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
2317      info: Object(external_wp_i18n_["__"])('Restore template to default state'),
2318      onClick: clearCustomizations
2319    }, Object(external_wp_i18n_["__"])('Clear customizations'))));
2320  }
2321  
2322  function TemplatePartItem(_ref2) {
2323    let {
2324      templatePart,
2325      clientId,
2326      closeTemplateDetailsDropdown
2327    } = _ref2;
2328    const {
2329      selectBlock,
2330      toggleBlockHighlight
2331    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
2332    const templatePartArea = Object(external_wp_data_["useSelect"])(select => {
2333      const defaultAreas = select(external_wp_editor_["store"]).__experimentalGetDefaultTemplatePartAreas();
2334  
2335      return defaultAreas.find(defaultArea => defaultArea.area === templatePart.area);
2336    }, [templatePart.area]);
2337  
2338    const highlightBlock = () => toggleBlockHighlight(clientId, true);
2339  
2340    const cancelHighlightBlock = () => toggleBlockHighlight(clientId, false);
2341  
2342    return Object(external_wp_element_["createElement"])("div", {
2343      role: "menuitem",
2344      className: "edit-site-template-details__template-areas-item"
2345    }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
2346      role: "button",
2347      icon: templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.icon,
2348      iconPosition: "left",
2349      onClick: () => {
2350        selectBlock(clientId);
2351      },
2352      onMouseOver: highlightBlock,
2353      onMouseLeave: cancelHighlightBlock,
2354      onFocus: highlightBlock,
2355      onBlur: cancelHighlightBlock
2356    }, templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.label), Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
2357      icon: more_vertical["a" /* default */],
2358      label: Object(external_wp_i18n_["__"])('More options'),
2359      className: "edit-site-template-details__template-areas-item-more"
2360    }, _ref3 => {
2361      let {
2362        onClose
2363      } = _ref3;
2364      return Object(external_wp_element_["createElement"])(TemplatePartItemMore, {
2365        onClose: onClose,
2366        templatePart: templatePart,
2367        closeTemplateDetailsDropdown: closeTemplateDetailsDropdown
2368      });
2369    }));
2370  }
2371  
2372  function TemplateAreas(_ref4) {
2373    let {
2374      closeTemplateDetailsDropdown
2375    } = _ref4;
2376    const templateParts = Object(external_wp_data_["useSelect"])(select => select(store).getCurrentTemplateTemplateParts(), []);
2377  
2378    if (!templateParts.length) {
2379      return null;
2380    }
2381  
2382    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
2383      label: Object(external_wp_i18n_["__"])('Areas'),
2384      className: "edit-site-template-details__group edit-site-template-details__template-areas"
2385    }, templateParts.map(_ref5 => {
2386      let {
2387        templatePart,
2388        block
2389      } = _ref5;
2390      return Object(external_wp_element_["createElement"])(TemplatePartItem, {
2391        key: templatePart.slug,
2392        clientId: block.clientId,
2393        templatePart: templatePart,
2394        closeTemplateDetailsDropdown: closeTemplateDetailsDropdown
2395      });
2396    }));
2397  }
2398  
2399  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-details/edit-template-title.js
2400  
2401  
2402  /**
2403   * WordPress dependencies
2404   */
2405  
2406  
2407  
2408  function EditTemplateTitle(_ref) {
2409    let {
2410      template
2411    } = _ref;
2412    const [title, setTitle] = Object(external_wp_coreData_["useEntityProp"])('postType', template.type, 'title', template.id);
2413    return Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
2414      label: Object(external_wp_i18n_["__"])('Title'),
2415      value: title,
2416      help: Object(external_wp_i18n_["__"])('Give the template a title that indicates its purpose, e.g. "Full Width".'),
2417      onChange: newTitle => {
2418        setTitle(newTitle || template.slug);
2419      }
2420    });
2421  }
2422  
2423  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-details/index.js
2424  
2425  
2426  
2427  /**
2428   * WordPress dependencies
2429   */
2430  
2431  
2432  
2433  
2434  
2435  /**
2436   * Internal dependencies
2437   */
2438  
2439  
2440  
2441  
2442  
2443  
2444  
2445  function TemplateDetails(_ref) {
2446    let {
2447      template,
2448      onClose
2449    } = _ref;
2450    const {
2451      title,
2452      description
2453    } = Object(external_wp_data_["useSelect"])(select => select(external_wp_editor_["store"]).__experimentalGetTemplateInfo(template), []);
2454    const {
2455      revertTemplate
2456    } = Object(external_wp_data_["useDispatch"])(store);
2457    const templateSubMenu = Object(external_wp_element_["useMemo"])(() => {
2458      if ((template === null || template === void 0 ? void 0 : template.type) === 'wp_template') {
2459        return {
2460          title: Object(external_wp_i18n_["__"])('templates'),
2461          menu: MENU_TEMPLATES
2462        };
2463      }
2464  
2465      return TEMPLATE_PARTS_SUB_MENUS.find(_ref2 => {
2466        let {
2467          area
2468        } = _ref2;
2469        return area === (template === null || template === void 0 ? void 0 : template.area);
2470      });
2471    }, [template]);
2472    const browseAllLinkProps = useLink({
2473      // TODO: We should update this to filter by template part's areas as well.
2474      postType: template.type,
2475      postId: undefined
2476    });
2477  
2478    if (!template) {
2479      return null;
2480    }
2481  
2482    const revert = () => {
2483      revertTemplate(template);
2484      onClose();
2485    };
2486  
2487    return Object(external_wp_element_["createElement"])("div", {
2488      className: "edit-site-template-details"
2489    }, Object(external_wp_element_["createElement"])("div", {
2490      className: "edit-site-template-details__group"
2491    }, template.is_custom ? Object(external_wp_element_["createElement"])(EditTemplateTitle, {
2492      template: template
2493    }) : Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHeading"], {
2494      level: 4,
2495      weight: 600,
2496      className: "edit-site-template-details__title"
2497    }, title), description && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalText"], {
2498      size: "body",
2499      className: "edit-site-template-details__description",
2500      as: "p"
2501    }, description)), Object(external_wp_element_["createElement"])(TemplateAreas, {
2502      closeTemplateDetailsDropdown: onClose
2503    }), isTemplateRevertable(template) && Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
2504      className: "edit-site-template-details__group edit-site-template-details__revert"
2505    }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
2506      className: "edit-site-template-details__revert-button",
2507      info: Object(external_wp_i18n_["__"])('Restore template to default state'),
2508      onClick: revert
2509    }, Object(external_wp_i18n_["__"])('Clear customizations'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], Object(esm_extends["a" /* default */])({
2510      className: "edit-site-template-details__show-all-button"
2511    }, browseAllLinkProps), Object(external_wp_i18n_["sprintf"])(
2512    /* translators: the template part's area name ("Headers", "Sidebars") or "templates". */
2513    Object(external_wp_i18n_["__"])('Browse all %s'), templateSubMenu.title)));
2514  }
2515  
2516  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header/index.js
2517  
2518  
2519  /**
2520   * WordPress dependencies
2521   */
2522  
2523  
2524  
2525  
2526  
2527  
2528  
2529  
2530  
2531  
2532  
2533  /**
2534   * Internal dependencies
2535   */
2536  
2537  
2538  
2539  
2540  
2541  
2542  
2543  
2544  
2545  const preventDefault = event => {
2546    event.preventDefault();
2547  };
2548  
2549  function Header(_ref) {
2550    let {
2551      openEntitiesSavedStates,
2552      isEntitiesSavedStatesOpen
2553    } = _ref;
2554    const inserterButton = Object(external_wp_element_["useRef"])();
2555    const {
2556      deviceType,
2557      entityTitle,
2558      template,
2559      templateType,
2560      isInserterOpen,
2561      isListViewOpen,
2562      listViewShortcut,
2563      isLoaded
2564    } = Object(external_wp_data_["useSelect"])(select => {
2565      const {
2566        __experimentalGetPreviewDeviceType,
2567        getEditedPostType,
2568        getEditedPostId,
2569        isInserterOpened,
2570        isListViewOpened
2571      } = select(store);
2572      const {
2573        getEditedEntityRecord
2574      } = select(external_wp_coreData_["store"]);
2575      const {
2576        __experimentalGetTemplateInfo: getTemplateInfo
2577      } = select(external_wp_editor_["store"]);
2578      const {
2579        getShortcutRepresentation
2580      } = select(external_wp_keyboardShortcuts_["store"]);
2581      const postType = getEditedPostType();
2582      const postId = getEditedPostId();
2583      const record = getEditedEntityRecord('postType', postType, postId);
2584  
2585      const _isLoaded = !!postId;
2586  
2587      return {
2588        deviceType: __experimentalGetPreviewDeviceType(),
2589        entityTitle: getTemplateInfo(record).title,
2590        isLoaded: _isLoaded,
2591        template: record,
2592        templateType: postType,
2593        isInserterOpen: isInserterOpened(),
2594        isListViewOpen: isListViewOpened(),
2595        listViewShortcut: getShortcutRepresentation('core/edit-site/toggle-list-view')
2596      };
2597    }, []);
2598    const {
2599      __experimentalSetPreviewDeviceType: setPreviewDeviceType,
2600      setIsInserterOpened,
2601      setIsListViewOpened
2602    } = Object(external_wp_data_["useDispatch"])(store);
2603    const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
2604    const openInserter = Object(external_wp_element_["useCallback"])(() => {
2605      if (isInserterOpen) {
2606        // Focusing the inserter button closes the inserter popover
2607        inserterButton.current.focus();
2608      } else {
2609        setIsInserterOpened(true);
2610      }
2611    }, [isInserterOpen, setIsInserterOpened]);
2612    const toggleListView = Object(external_wp_element_["useCallback"])(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
2613    const isFocusMode = templateType === 'wp_template_part';
2614    return Object(external_wp_element_["createElement"])("div", {
2615      className: "edit-site-header"
2616    }, Object(external_wp_element_["createElement"])("div", {
2617      className: "edit-site-header_start"
2618    }, Object(external_wp_element_["createElement"])("div", {
2619      className: "edit-site-header__toolbar"
2620    }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2621      ref: inserterButton,
2622      variant: "primary",
2623      isPressed: isInserterOpen,
2624      className: "edit-site-header-toolbar__inserter-toggle",
2625      onMouseDown: preventDefault,
2626      onClick: openInserter,
2627      icon: plus["a" /* default */],
2628      label: Object(external_wp_i18n_["_x"])('Toggle block inserter', 'Generic label for block inserter button')
2629    }), isLargeViewport && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ToolSelector"], null), Object(external_wp_element_["createElement"])(UndoButton, null), Object(external_wp_element_["createElement"])(RedoButton, null), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
2630      className: "edit-site-header-toolbar__list-view-toggle",
2631      icon: list_view["a" /* default */],
2632      isPressed: isListViewOpen
2633      /* translators: button label text should, if possible, be under 16 characters. */
2634      ,
2635      label: Object(external_wp_i18n_["__"])('List View'),
2636      onClick: toggleListView,
2637      shortcut: listViewShortcut
2638    })))), Object(external_wp_element_["createElement"])("div", {
2639      className: "edit-site-header_center"
2640    }, Object(external_wp_element_["createElement"])(DocumentActions, {
2641      entityTitle: entityTitle,
2642      entityLabel: templateType === 'wp_template_part' ? 'template part' : 'template',
2643      isLoaded: isLoaded
2644    }, _ref2 => {
2645      let {
2646        onClose
2647      } = _ref2;
2648      return Object(external_wp_element_["createElement"])(TemplateDetails, {
2649        template: template,
2650        onClose: onClose
2651      });
2652    })), Object(external_wp_element_["createElement"])("div", {
2653      className: "edit-site-header_end"
2654    }, Object(external_wp_element_["createElement"])("div", {
2655      className: "edit-site-header__actions"
2656    }, !isFocusMode && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPreviewOptions"], {
2657      deviceType: deviceType,
2658      setDeviceType: setPreviewDeviceType
2659    }), Object(external_wp_element_["createElement"])(SaveButton, {
2660      openEntitiesSavedStates: openEntitiesSavedStates,
2661      isEntitiesSavedStatesOpen: isEntitiesSavedStatesOpen
2662    }), Object(external_wp_element_["createElement"])(build_module["h" /* PinnedItems */].Slot, {
2663      scope: "core/edit-site"
2664    }), Object(external_wp_element_["createElement"])(more_menu, null))));
2665  }
2666  
2667  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/cog.js
2668  var cog = __webpack_require__("Cg8A");
2669  
2670  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/default-sidebar.js
2671  
2672  
2673  /**
2674   * WordPress dependencies
2675   */
2676  
2677  function DefaultSidebar(_ref) {
2678    let {
2679      className,
2680      identifier,
2681      title,
2682      icon,
2683      children,
2684      closeLabel,
2685      header,
2686      headerClassName
2687    } = _ref;
2688    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(build_module["b" /* ComplementaryArea */], {
2689      className: className,
2690      scope: "core/edit-site",
2691      identifier: identifier,
2692      title: title,
2693      icon: icon,
2694      closeLabel: closeLabel,
2695      header: header,
2696      headerClassName: headerClassName
2697    }, children), Object(external_wp_element_["createElement"])(build_module["c" /* ComplementaryAreaMoreMenuItem */], {
2698      scope: "core/edit-site",
2699      identifier: identifier,
2700      icon: icon
2701    }, title));
2702  }
2703  
2704  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/styles.js
2705  
2706  
2707  /**
2708   * WordPress dependencies
2709   */
2710  
2711  const styles_styles = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
2712    viewBox: "0 0 24 24",
2713    xmlns: "http://www.w3.org/2000/svg"
2714  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
2715    d: "M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"
2716  }));
2717  /* harmony default export */ var library_styles = (styles_styles);
2718  
2719  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
2720  var build_module_icon = __webpack_require__("iClF");
2721  
2722  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
2723  var chevron_left = __webpack_require__("2gm7");
2724  
2725  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
2726  var chevron_right = __webpack_require__("1iEr");
2727  
2728  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/utils.js
2729  /**
2730   * External dependencies
2731   */
2732  
2733  /* Supporting data */
2734  
2735  const ROOT_BLOCK_NAME = 'root';
2736  const ROOT_BLOCK_SELECTOR = 'body';
2737  const ROOT_BLOCK_SUPPORTS = ['background', 'backgroundColor', 'color', 'linkColor', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', 'padding'];
2738  const PRESET_METADATA = [{
2739    path: ['color', 'palette'],
2740    valueKey: 'color',
2741    cssVarInfix: 'color',
2742    classes: [{
2743      classSuffix: 'color',
2744      propertyName: 'color'
2745    }, {
2746      classSuffix: 'background-color',
2747      propertyName: 'background-color'
2748    }, {
2749      classSuffix: 'border-color',
2750      propertyName: 'border-color'
2751    }]
2752  }, {
2753    path: ['color', 'gradients'],
2754    valueKey: 'gradient',
2755    cssVarInfix: 'gradient',
2756    classes: [{
2757      classSuffix: 'gradient-background',
2758      propertyName: 'background'
2759    }]
2760  }, {
2761    path: ['typography', 'fontSizes'],
2762    valueKey: 'size',
2763    cssVarInfix: 'font-size',
2764    classes: [{
2765      classSuffix: 'font-size',
2766      propertyName: 'font-size'
2767    }]
2768  }, {
2769    path: ['typography', 'fontFamilies'],
2770    valueKey: 'fontFamily',
2771    cssVarInfix: 'font-family',
2772    classes: [{
2773      classSuffix: 'font-family',
2774      propertyName: 'font-family'
2775    }]
2776  }];
2777  const STYLE_PATH_TO_CSS_VAR_INFIX = {
2778    'color.background': 'color',
2779    'color.text': 'color',
2780    'elements.link.color.text': 'color',
2781    'color.gradient': 'gradient',
2782    'typography.fontSize': 'font-size',
2783    'typography.fontFamily': 'font-family'
2784  };
2785  
2786  function findInPresetsBy(features, blockName, presetPath, presetProperty, presetValueValue) {
2787    // Block presets take priority above root level presets.
2788    const orderedPresetsByOrigin = [Object(external_lodash_["get"])(features, ['blocks', blockName, ...presetPath]), Object(external_lodash_["get"])(features, presetPath)];
2789  
2790    for (const presetByOrigin of orderedPresetsByOrigin) {
2791      if (presetByOrigin) {
2792        // Preset origins ordered by priority.
2793        const origins = ['custom', 'theme', 'default'];
2794  
2795        for (const origin of origins) {
2796          const presets = presetByOrigin[origin];
2797  
2798          if (presets) {
2799            const presetObject = Object(external_lodash_["find"])(presets, preset => preset[presetProperty] === presetValueValue);
2800  
2801            if (presetObject) {
2802              if (presetProperty === 'slug') {
2803                return presetObject;
2804              } // if there is a highest priority preset with the same slug but different value the preset we found was overwritten and should be ignored.
2805  
2806  
2807              const highestPresetObjectWithSameSlug = findInPresetsBy(features, blockName, presetPath, 'slug', presetObject.slug);
2808  
2809              if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
2810                return presetObject;
2811              }
2812  
2813              return undefined;
2814            }
2815          }
2816        }
2817      }
2818    }
2819  }
2820  
2821  function getPresetVariableFromValue(features, blockName, variableStylePath, presetPropertyValue) {
2822    if (!presetPropertyValue) {
2823      return presetPropertyValue;
2824    }
2825  
2826    const cssVarInfix = STYLE_PATH_TO_CSS_VAR_INFIX[variableStylePath];
2827    const metadata = Object(external_lodash_["find"])(PRESET_METADATA, ['cssVarInfix', cssVarInfix]);
2828  
2829    if (!metadata) {
2830      // The property doesn't have preset data
2831      // so the value should be returned as it is.
2832      return presetPropertyValue;
2833    }
2834  
2835    const {
2836      valueKey,
2837      path
2838    } = metadata;
2839    const presetObject = findInPresetsBy(features, blockName, path, valueKey, presetPropertyValue);
2840  
2841    if (!presetObject) {
2842      // Value wasn't found in the presets,
2843      // so it must be a custom value.
2844      return presetPropertyValue;
2845    }
2846  
2847    return `var:preset|$cssVarInfix}|$presetObject.slug}`;
2848  }
2849  
2850  function getValueFromPresetVariable(features, blockName, variable, _ref) {
2851    let [presetType, slug] = _ref;
2852    const metadata = Object(external_lodash_["find"])(PRESET_METADATA, ['cssVarInfix', presetType]);
2853  
2854    if (!metadata) {
2855      return variable;
2856    }
2857  
2858    const presetObject = findInPresetsBy(features, blockName, metadata.path, 'slug', slug);
2859  
2860    if (presetObject) {
2861      const {
2862        valueKey
2863      } = metadata;
2864      const result = presetObject[valueKey];
2865      return getValueFromVariable(features, blockName, result);
2866    }
2867  
2868    return variable;
2869  }
2870  
2871  function getValueFromCustomVariable(features, blockName, variable, path) {
2872    var _get;
2873  
2874    const result = (_get = Object(external_lodash_["get"])(features, ['blocks', blockName, 'custom', ...path])) !== null && _get !== void 0 ? _get : Object(external_lodash_["get"])(features, ['custom', ...path]);
2875  
2876    if (!result) {
2877      return variable;
2878    } // A variable may reference another variable so we need recursion until we find the value.
2879  
2880  
2881    return getValueFromVariable(features, blockName, result);
2882  }
2883  
2884  function getValueFromVariable(features, blockName, variable) {
2885    if (!variable || !Object(external_lodash_["isString"])(variable)) {
2886      return variable;
2887    }
2888  
2889    const USER_VALUE_PREFIX = 'var:';
2890    const THEME_VALUE_PREFIX = 'var(--wp--';
2891    const THEME_VALUE_SUFFIX = ')';
2892    let parsedVar;
2893  
2894    if (variable.startsWith(USER_VALUE_PREFIX)) {
2895      parsedVar = variable.slice(USER_VALUE_PREFIX.length).split('|');
2896    } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
2897      parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split('--');
2898    } else {
2899      // We don't know how to parse the value: either is raw of uses complex CSS such as `calc(1px * var(--wp--variable) )`
2900      return variable;
2901    }
2902  
2903    const [type, ...path] = parsedVar;
2904  
2905    if (type === 'preset') {
2906      return getValueFromPresetVariable(features, blockName, variable, path);
2907    }
2908  
2909    if (type === 'custom') {
2910      return getValueFromCustomVariable(features, blockName, variable, path);
2911    }
2912  
2913    return variable;
2914  }
2915  
2916  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/context.js
2917  /**
2918   * WordPress dependencies
2919   */
2920  
2921  const DEFAULT_GLOBAL_STYLES_CONTEXT = {
2922    user: {},
2923    base: {},
2924    merged: {},
2925    setUserConfig: () => {}
2926  };
2927  const GlobalStylesContext = Object(external_wp_element_["createContext"])(DEFAULT_GLOBAL_STYLES_CONTEXT);
2928  
2929  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/hooks.js
2930  /**
2931   * External dependencies
2932   */
2933  
2934  /**
2935   * WordPress dependencies
2936   */
2937  
2938  
2939  
2940  
2941  /**
2942   * Internal dependencies
2943   */
2944  
2945  
2946  
2947  const EMPTY_CONFIG = {
2948    isGlobalStylesUserThemeJSON: true,
2949    version: 1
2950  };
2951  const useGlobalStylesReset = () => {
2952    const {
2953      user: config,
2954      setUserConfig
2955    } = Object(external_wp_element_["useContext"])(GlobalStylesContext);
2956    const canReset = !!config && !Object(external_lodash_["isEqual"])(config, EMPTY_CONFIG);
2957    return [canReset, Object(external_wp_element_["useCallback"])(() => setUserConfig(() => EMPTY_CONFIG), [setUserConfig])];
2958  };
2959  function useSetting(path, blockName) {
2960    var _getSettingValueForCo;
2961  
2962    let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'all';
2963    const {
2964      merged: mergedConfig,
2965      base: baseConfig,
2966      user: userConfig,
2967      setUserConfig
2968    } = Object(external_wp_element_["useContext"])(GlobalStylesContext);
2969    const fullPath = !blockName ? `settings.$path}` : `settings.blocks.$blockName}.$path}`;
2970  
2971    const setSetting = newValue => {
2972      setUserConfig(currentConfig => {
2973        const newUserConfig = Object(external_lodash_["cloneDeep"])(currentConfig);
2974        const pathToSet = external_wp_blocks_["__EXPERIMENTAL_PATHS_WITH_MERGE"][path] ? fullPath + '.custom' : fullPath;
2975        Object(external_lodash_["set"])(newUserConfig, pathToSet, newValue);
2976        return newUserConfig;
2977      });
2978    };
2979  
2980    const getSettingValueForContext = name => {
2981      const currentPath = !name ? `settings.$path}` : `settings.blocks.$name}.$path}`;
2982  
2983      const getSettingValue = configToUse => {
2984        const result = Object(external_lodash_["get"])(configToUse, currentPath);
2985  
2986        if (external_wp_blocks_["__EXPERIMENTAL_PATHS_WITH_MERGE"][path]) {
2987          var _ref, _result$custom;
2988  
2989          return (_ref = (_result$custom = result === null || result === void 0 ? void 0 : result.custom) !== null && _result$custom !== void 0 ? _result$custom : result === null || result === void 0 ? void 0 : result.theme) !== null && _ref !== void 0 ? _ref : result === null || result === void 0 ? void 0 : result.default;
2990        }
2991  
2992        return result;
2993      };
2994  
2995      let result;
2996  
2997      switch (source) {
2998        case 'all':
2999          result = getSettingValue(mergedConfig);
3000          break;
3001  
3002        case 'user':
3003          result = getSettingValue(userConfig);
3004          break;
3005  
3006        case 'base':
3007          result = getSettingValue(baseConfig);
3008          break;
3009  
3010        default:
3011          throw 'Unsupported source';
3012      }
3013  
3014      return result;
3015    }; // Unlike styles settings get inherited from top level settings.
3016  
3017  
3018    const resultWithFallback = (_getSettingValueForCo = getSettingValueForContext(blockName)) !== null && _getSettingValueForCo !== void 0 ? _getSettingValueForCo : getSettingValueForContext();
3019    return [resultWithFallback, setSetting];
3020  }
3021  function useStyle(path, blockName) {
3022    var _get;
3023  
3024    let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'all';
3025    const {
3026      merged: mergedConfig,
3027      base: baseConfig,
3028      user: userConfig,
3029      setUserConfig
3030    } = Object(external_wp_element_["useContext"])(GlobalStylesContext);
3031    const finalPath = !blockName ? `styles.$path}` : `styles.blocks.$blockName}.$path}`;
3032  
3033    const setStyle = newValue => {
3034      setUserConfig(currentConfig => {
3035        const newUserConfig = Object(external_lodash_["cloneDeep"])(currentConfig);
3036        Object(external_lodash_["set"])(newUserConfig, finalPath, getPresetVariableFromValue(mergedConfig.settings, blockName, path, newValue));
3037        return newUserConfig;
3038      });
3039    };
3040  
3041    let result;
3042  
3043    switch (source) {
3044      case 'all':
3045        result = getValueFromVariable(mergedConfig.settings, blockName, (_get = Object(external_lodash_["get"])(userConfig, finalPath)) !== null && _get !== void 0 ? _get : Object(external_lodash_["get"])(baseConfig, finalPath));
3046        break;
3047  
3048      case 'user':
3049        result = getValueFromVariable(mergedConfig.settings, blockName, Object(external_lodash_["get"])(userConfig, finalPath));
3050        break;
3051  
3052      case 'base':
3053        result = getValueFromVariable(baseConfig.settings, blockName, Object(external_lodash_["get"])(baseConfig, finalPath));
3054        break;
3055  
3056      default:
3057        throw 'Unsupported source';
3058    }
3059  
3060    return [result, setStyle];
3061  }
3062  const hooks_ROOT_BLOCK_SUPPORTS = ['background', 'backgroundColor', 'color', 'linkColor', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'textDecoration', 'textTransform', 'padding'];
3063  function getSupportedGlobalStylesPanels(name) {
3064    if (!name) {
3065      return hooks_ROOT_BLOCK_SUPPORTS;
3066    }
3067  
3068    const blockType = Object(external_wp_blocks_["getBlockType"])(name);
3069  
3070    if (!blockType) {
3071      return [];
3072    }
3073  
3074    const supportKeys = [];
3075    Object.keys(external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"]).forEach(styleName => {
3076      if (!external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][styleName].support) {
3077        return;
3078      } // Opting out means that, for certain support keys like background color,
3079      // blocks have to explicitly set the support value false. If the key is
3080      // unset, we still enable it.
3081  
3082  
3083      if (external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][styleName].requiresOptOut) {
3084        if (Object(external_lodash_["has"])(blockType.supports, external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][styleName].support[0]) && Object(external_lodash_["get"])(blockType.supports, external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][styleName].support) !== false) {
3085          return supportKeys.push(styleName);
3086        }
3087      }
3088  
3089      if (Object(external_lodash_["get"])(blockType.supports, external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"][styleName].support, false)) {
3090        return supportKeys.push(styleName);
3091      }
3092    });
3093    return supportKeys;
3094  }
3095  function useColorsPerOrigin(name) {
3096    const [customColors] = useSetting('color.palette.custom', name);
3097    const [themeColors] = useSetting('color.palette.theme', name);
3098    const [defaultColors] = useSetting('color.palette.default', name);
3099    const [shouldDisplayDefaultColors] = useSetting('color.defaultPalette');
3100    return Object(external_wp_element_["useMemo"])(() => {
3101      const result = [];
3102  
3103      if (themeColors && themeColors.length) {
3104        result.push({
3105          name: Object(external_wp_i18n_["_x"])('Theme', 'Indicates this palette comes from the theme.'),
3106          colors: themeColors
3107        });
3108      }
3109  
3110      if (shouldDisplayDefaultColors && defaultColors && defaultColors.length) {
3111        result.push({
3112          name: Object(external_wp_i18n_["_x"])('Default', 'Indicates this palette comes from WordPress.'),
3113          colors: defaultColors
3114        });
3115      }
3116  
3117      if (customColors && customColors.length) {
3118        result.push({
3119          name: Object(external_wp_i18n_["_x"])('Custom', 'Indicates this palette is created by the user.'),
3120          colors: customColors
3121        });
3122      }
3123  
3124      return result;
3125    }, [customColors, themeColors, defaultColors]);
3126  }
3127  function useGradientsPerOrigin(name) {
3128    const [customGradients] = useSetting('color.gradients.custom', name);
3129    const [themeGradients] = useSetting('color.gradients.theme', name);
3130    const [defaultGradients] = useSetting('color.gradients.default', name);
3131    const [shouldDisplayDefaultGradients] = useSetting('color.defaultGradients');
3132    return Object(external_wp_element_["useMemo"])(() => {
3133      const result = [];
3134  
3135      if (themeGradients && themeGradients.length) {
3136        result.push({
3137          name: Object(external_wp_i18n_["_x"])('Theme', 'Indicates this palette comes from the theme.'),
3138          gradients: themeGradients
3139        });
3140      }
3141  
3142      if (shouldDisplayDefaultGradients && defaultGradients && defaultGradients.length) {
3143        result.push({
3144          name: Object(external_wp_i18n_["_x"])('Default', 'Indicates this palette comes from WordPress.'),
3145          gradients: defaultGradients
3146        });
3147      }
3148  
3149      if (customGradients && customGradients.length) {
3150        result.push({
3151          name: Object(external_wp_i18n_["_x"])('Custom', 'Indicates this palette is created by the user.'),
3152          gradients: customGradients
3153        });
3154      }
3155  
3156      return result;
3157    }, [customGradients, themeGradients, defaultGradients]);
3158  }
3159  
3160  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/preview.js
3161  
3162  
3163  /**
3164   * WordPress dependencies
3165   */
3166  
3167  /**
3168   * Internal dependencies
3169   */
3170  
3171  
3172  
3173  const StylesPreview = () => {
3174    const [fontFamily = 'serif'] = useStyle('typography.fontFamily');
3175    const [textColor = 'black'] = useStyle('color.text');
3176    const [linkColor = 'blue'] = useStyle('elements.link.color.text');
3177    const [backgroundColor = 'white'] = useStyle('color.background');
3178    const [gradientValue] = useStyle('color.gradient');
3179    return Object(external_wp_element_["createElement"])(external_wp_components_["Card"], {
3180      className: "edit-site-global-styles-preview",
3181      style: {
3182        background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor
3183      }
3184    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
3185      spacing: 5
3186    }, Object(external_wp_element_["createElement"])("div", {
3187      style: {
3188        fontFamily,
3189        fontSize: '80px',
3190        color: textColor
3191      }
3192    }, "Aa"), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
3193      spacing: 2
3194    }, Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
3195      colorValue: textColor
3196    }), Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
3197      colorValue: linkColor
3198    }))));
3199  };
3200  
3201  /* harmony default export */ var preview = (StylesPreview);
3202  
3203  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/navigation-button.js
3204  
3205  
3206  
3207  /**
3208   * WordPress dependencies
3209   */
3210  
3211  
3212  
3213  function NavigationButton(_ref) {
3214    let {
3215      path,
3216      icon,
3217      children,
3218      isBack = false,
3219      ...props
3220    } = _ref;
3221    const navigator = Object(external_wp_components_["__experimentalUseNavigator"])();
3222    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItem"], Object(esm_extends["a" /* default */])({
3223      onClick: () => navigator.push(path, {
3224        isBack
3225      })
3226    }, props), icon && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
3227      justify: "flex-start"
3228    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
3229      icon: icon,
3230      size: 24
3231    })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, children)), !icon && children);
3232  }
3233  
3234  /* harmony default export */ var navigation_button = (NavigationButton);
3235  
3236  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/typography.js
3237  
3238  
3239  /**
3240   * WordPress dependencies
3241   */
3242  
3243  const typography = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
3244    xmlns: "http://www.w3.org/2000/svg",
3245    viewBox: "0 0 24 24"
3246  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
3247    d: "M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"
3248  }));
3249  /* harmony default export */ var library_typography = (typography);
3250  
3251  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/color.js
3252  
3253  
3254  /**
3255   * WordPress dependencies
3256   */
3257  
3258  const color_color = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
3259    viewBox: "0 0 24 24",
3260    xmlns: "http://www.w3.org/2000/svg"
3261  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
3262    d: "M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"
3263  }));
3264  /* harmony default export */ var library_color = (color_color);
3265  
3266  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
3267  var layout = __webpack_require__("Civd");
3268  
3269  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/border-panel.js
3270  
3271  
3272  /**
3273   * WordPress dependencies
3274   */
3275  
3276  
3277  
3278  /**
3279   * Internal dependencies
3280   */
3281  
3282  
3283  const MIN_BORDER_WIDTH = 0; // Defining empty array here instead of inline avoids unnecessary re-renders of
3284  // color control.
3285  
3286  const EMPTY_ARRAY = [];
3287  function useHasBorderPanel(name) {
3288    const controls = [useHasBorderColorControl(name), useHasBorderRadiusControl(name), useHasBorderStyleControl(name), useHasBorderWidthControl(name)];
3289    return controls.some(Boolean);
3290  }
3291  
3292  function useHasBorderColorControl(name) {
3293    const supports = getSupportedGlobalStylesPanels(name);
3294    return useSetting('border.color', name)[0] && supports.includes('borderColor');
3295  }
3296  
3297  function useHasBorderRadiusControl(name) {
3298    const supports = getSupportedGlobalStylesPanels(name);
3299    return useSetting('border.radius', name)[0] && supports.includes('borderRadius');
3300  }
3301  
3302  function useHasBorderStyleControl(name) {
3303    const supports = getSupportedGlobalStylesPanels(name);
3304    return useSetting('border.style', name)[0] && supports.includes('borderStyle');
3305  }
3306  
3307  function useHasBorderWidthControl(name) {
3308    const supports = getSupportedGlobalStylesPanels(name);
3309    return useSetting('border.width', name)[0] && supports.includes('borderWidth');
3310  }
3311  
3312  function BorderPanel(_ref) {
3313    let {
3314      name
3315    } = _ref;
3316    const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
3317      availableUnits: useSetting('spacing.units')[0] || ['px', 'em', 'rem']
3318    }); // Border width.
3319  
3320    const hasBorderWidth = useHasBorderWidthControl(name);
3321    const [borderWidthValue, setBorderWidth] = useStyle('border.width', name); // Border style.
3322  
3323    const hasBorderStyle = useHasBorderStyleControl(name);
3324    const [borderStyle, setBorderStyle] = useStyle('border.style', name); // Border color.
3325  
3326    const [colors = EMPTY_ARRAY] = useSetting('color.palette');
3327    const disableCustomColors = !useSetting('color.custom')[0];
3328    const disableCustomGradients = !useSetting('color.customGradient')[0];
3329    const hasBorderColor = useHasBorderColorControl(name);
3330    const [borderColor, setBorderColor] = useStyle('border.color', name); // Border radius.
3331  
3332    const hasBorderRadius = useHasBorderRadiusControl(name);
3333    const [borderRadiusValues, setBorderRadius] = useStyle('border.radius', name);
3334    return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
3335      title: Object(external_wp_i18n_["__"])('Border'),
3336      initialOpen: true
3337    }, (hasBorderWidth || hasBorderStyle) && Object(external_wp_element_["createElement"])("div", {
3338      className: "edit-site-global-styles-sidebar__border-controls-row"
3339    }, hasBorderWidth && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], {
3340      value: borderWidthValue,
3341      label: Object(external_wp_i18n_["__"])('Width'),
3342      min: MIN_BORDER_WIDTH,
3343      onChange: value => {
3344        setBorderWidth(value || undefined);
3345      },
3346      units: units
3347    }), hasBorderStyle && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBorderStyleControl"], {
3348      value: borderStyle,
3349      onChange: setBorderStyle
3350    })), hasBorderColor && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalColorGradientControl"], {
3351      label: Object(external_wp_i18n_["__"])('Color'),
3352      colorValue: borderColor,
3353      colors: colors,
3354      gradients: undefined,
3355      disableCustomColors: disableCustomColors,
3356      disableCustomGradients: disableCustomGradients,
3357      onColorChange: setBorderColor
3358    }), hasBorderRadius && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBorderRadiusControl"], {
3359      values: borderRadiusValues,
3360      onChange: setBorderRadius
3361    }));
3362  }
3363  
3364  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-utils.js
3365  /**
3366   * Internal dependencies
3367   */
3368  
3369  function useHasColorPanel(name) {
3370    const supports = getSupportedGlobalStylesPanels(name);
3371    return supports.includes('color') || supports.includes('backgroundColor') || supports.includes('background') || supports.includes('linkColor');
3372  }
3373  
3374  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/dimensions-panel.js
3375  
3376  
3377  /**
3378   * WordPress dependencies
3379   */
3380  
3381  
3382  
3383  /**
3384   * Internal dependencies
3385   */
3386  
3387  
3388  const AXIAL_SIDES = ['horizontal', 'vertical'];
3389  function useHasDimensionsPanel(name) {
3390    const hasPadding = useHasPadding(name);
3391    const hasMargin = useHasMargin(name);
3392    const hasGap = useHasGap(name);
3393    return hasPadding || hasMargin || hasGap;
3394  }
3395  
3396  function useHasPadding(name) {
3397    const supports = getSupportedGlobalStylesPanels(name);
3398    const [settings] = useSetting('spacing.padding', name);
3399    return settings && supports.includes('padding');
3400  }
3401  
3402  function useHasMargin(name) {
3403    const supports = getSupportedGlobalStylesPanels(name);
3404    const [settings] = useSetting('spacing.margin', name);
3405    return settings && supports.includes('margin');
3406  }
3407  
3408  function useHasGap(name) {
3409    const supports = getSupportedGlobalStylesPanels(name);
3410    const [settings] = useSetting('spacing.blockGap', name);
3411    return settings && supports.includes('--wp--style--block-gap');
3412  }
3413  
3414  function filterValuesBySides(values, sides) {
3415    if (!sides) {
3416      // If no custom side configuration all sides are opted into by default.
3417      return values;
3418    } // Only include sides opted into within filtered values.
3419  
3420  
3421    const filteredValues = {};
3422    sides.forEach(side => {
3423      if (side === 'vertical') {
3424        filteredValues.top = values.top;
3425        filteredValues.bottom = values.bottom;
3426      }
3427  
3428      if (side === 'horizontal') {
3429        filteredValues.left = values.left;
3430        filteredValues.right = values.right;
3431      }
3432  
3433      filteredValues[side] = values[side];
3434    });
3435    return filteredValues;
3436  }
3437  
3438  function splitStyleValue(value) {
3439    // Check for shorthand value ( a string value ).
3440    if (value && typeof value === 'string') {
3441      // Convert to value for individual sides for BoxControl.
3442      return {
3443        top: value,
3444        right: value,
3445        bottom: value,
3446        left: value
3447      };
3448    }
3449  
3450    return value;
3451  }
3452  
3453  function DimensionsPanel(_ref) {
3454    let {
3455      name
3456    } = _ref;
3457    const showPaddingControl = useHasPadding(name);
3458    const showMarginControl = useHasMargin(name);
3459    const showGapControl = useHasGap(name);
3460    const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
3461      availableUnits: useSetting('spacing.units', name)[0] || ['%', 'px', 'em', 'rem', 'vw']
3462    });
3463    const [rawPadding, setRawPadding] = useStyle('spacing.padding', name);
3464    const paddingValues = splitStyleValue(rawPadding);
3465    const paddingSides = Object(external_wp_blockEditor_["__experimentalUseCustomSides"])(name, 'padding');
3466    const isAxialPadding = paddingSides && paddingSides.some(side => AXIAL_SIDES.includes(side));
3467  
3468    const setPaddingValues = newPaddingValues => {
3469      const padding = filterValuesBySides(newPaddingValues, paddingSides);
3470      setRawPadding(padding);
3471    };
3472  
3473    const resetPaddingValue = () => setPaddingValues({});
3474  
3475    const hasPaddingValue = () => !!paddingValues && Object.keys(paddingValues).length;
3476  
3477    const [rawMargin, setRawMargin] = useStyle('spacing.margin', name);
3478    const marginValues = splitStyleValue(rawMargin);
3479    const marginSides = Object(external_wp_blockEditor_["__experimentalUseCustomSides"])(name, 'margin');
3480    const isAxialMargin = marginSides && marginSides.some(side => AXIAL_SIDES.includes(side));
3481  
3482    const setMarginValues = newMarginValues => {
3483      const margin = filterValuesBySides(newMarginValues, marginSides);
3484      setRawMargin(margin);
3485    };
3486  
3487    const resetMarginValue = () => setMarginValues({});
3488  
3489    const hasMarginValue = () => !!marginValues && Object.keys(marginValues).length;
3490  
3491    const [gapValue, setGapValue] = useStyle('spacing.blockGap', name);
3492  
3493    const resetGapValue = () => setGapValue(undefined);
3494  
3495    const hasGapValue = () => !!gapValue;
3496  
3497    const resetAll = () => {
3498      resetPaddingValue();
3499      resetMarginValue();
3500      resetGapValue();
3501    };
3502  
3503    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolsPanel"], {
3504      label: Object(external_wp_i18n_["__"])('Dimensions'),
3505      resetAll: resetAll
3506    }, showPaddingControl && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolsPanelItem"], {
3507      hasValue: hasPaddingValue,
3508      label: Object(external_wp_i18n_["__"])('Padding'),
3509      onDeselect: resetPaddingValue,
3510      isShownByDefault: true
3511    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalBoxControl"], {
3512      values: paddingValues,
3513      onChange: setPaddingValues,
3514      label: Object(external_wp_i18n_["__"])('Padding'),
3515      sides: paddingSides,
3516      units: units,
3517      allowReset: false,
3518      splitOnAxis: isAxialPadding
3519    })), showMarginControl && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolsPanelItem"], {
3520      hasValue: hasMarginValue,
3521      label: Object(external_wp_i18n_["__"])('Margin'),
3522      onDeselect: resetMarginValue,
3523      isShownByDefault: true
3524    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalBoxControl"], {
3525      values: marginValues,
3526      onChange: setMarginValues,
3527      label: Object(external_wp_i18n_["__"])('Margin'),
3528      sides: marginSides,
3529      units: units,
3530      allowReset: false,
3531      splitOnAxis: isAxialMargin
3532    })), showGapControl && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolsPanelItem"], {
3533      hasValue: hasGapValue,
3534      label: Object(external_wp_i18n_["__"])('Block spacing'),
3535      onDeselect: resetGapValue,
3536      isShownByDefault: true
3537    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], {
3538      label: Object(external_wp_i18n_["__"])('Block spacing'),
3539      __unstableInputWidth: "80px",
3540      min: 0,
3541      onChange: setGapValue,
3542      units: units,
3543      value: gapValue
3544    })));
3545  }
3546  
3547  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/typography-panel.js
3548  
3549  
3550  /**
3551   * WordPress dependencies
3552   */
3553  
3554  
3555  /**
3556   * Internal dependencies
3557   */
3558  
3559  
3560  function useHasTypographyPanel(name) {
3561    const hasLineHeight = useHasLineHeightControl(name);
3562    const hasFontAppearance = useHasAppearanceControl(name);
3563    const hasLetterSpacing = useHasLetterSpacingControl(name);
3564    const supports = getSupportedGlobalStylesPanels(name);
3565    return hasLineHeight || hasFontAppearance || hasLetterSpacing || supports.includes('fontSize');
3566  }
3567  
3568  function useHasLineHeightControl(name) {
3569    const supports = getSupportedGlobalStylesPanels(name);
3570    return useSetting('typography.lineHeight', name)[0] && supports.includes('lineHeight');
3571  }
3572  
3573  function useHasAppearanceControl(name) {
3574    const supports = getSupportedGlobalStylesPanels(name);
3575    const hasFontStyles = useSetting('typography.fontStyle', name)[0] && supports.includes('fontStyle');
3576    const hasFontWeights = useSetting('typography.fontWeight', name)[0] && supports.includes('fontWeight');
3577    return hasFontStyles || hasFontWeights;
3578  }
3579  
3580  function useHasLetterSpacingControl(name) {
3581    const supports = getSupportedGlobalStylesPanels(name);
3582    return useSetting('typography.letterSpacing', name)[0] && supports.includes('letterSpacing');
3583  }
3584  
3585  function TypographyPanel(_ref) {
3586    let {
3587      name,
3588      element
3589    } = _ref;
3590    const supports = getSupportedGlobalStylesPanels(name);
3591    const prefix = element === 'text' || !element ? '' : `elements.$element}.`;
3592    const [fontSizes] = useSetting('typography.fontSizes', name);
3593    const disableCustomFontSizes = !useSetting('typography.customFontSize', name)[0];
3594    const [fontFamilies] = useSetting('typography.fontFamilies', name);
3595    const hasFontStyles = useSetting('typography.fontStyle', name)[0] && supports.includes('fontStyle');
3596    const hasFontWeights = useSetting('typography.fontWeight', name)[0] && supports.includes('fontWeight');
3597    const hasLineHeightEnabled = useHasLineHeightControl(name);
3598    const hasAppearanceControl = useHasAppearanceControl(name);
3599    const hasLetterSpacingControl = useHasLetterSpacingControl(name);
3600    const [fontFamily, setFontFamily] = useStyle(prefix + 'typography.fontFamily', name);
3601    const [fontSize, setFontSize] = useStyle(prefix + 'typography.fontSize', name);
3602    const [fontStyle, setFontStyle] = useStyle(prefix + 'typography.fontStyle', name);
3603    const [fontWeight, setFontWeight] = useStyle(prefix + 'typography.fontWeight', name);
3604    const [lineHeight, setLineHeight] = useStyle(prefix + 'typography.lineHeight', name);
3605    const [letterSpacing, setLetterSpacing] = useStyle(prefix + 'typography.letterSpacing', name);
3606    const [backgroundColor] = useStyle(prefix + 'color.background', name);
3607    const [gradientValue] = useStyle(prefix + 'color.gradient', name);
3608    const [color] = useStyle(prefix + 'color.text', name);
3609    const extraStyles = element === 'link' ? {
3610      textDecoration: 'underline'
3611    } : {};
3612    return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
3613      className: "edit-site-typography-panel",
3614      initialOpen: true
3615    }, Object(external_wp_element_["createElement"])("div", {
3616      className: "edit-site-typography-panel__preview",
3617      style: {
3618        fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
3619        background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
3620        color,
3621        fontSize,
3622        fontStyle,
3623        fontWeight,
3624        letterSpacing,
3625        ...extraStyles
3626      }
3627    }, "Aa"), supports.includes('fontFamily') && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalFontFamilyControl"], {
3628      fontFamilies: fontFamilies,
3629      value: fontFamily,
3630      onChange: setFontFamily
3631    }), supports.includes('fontSize') && Object(external_wp_element_["createElement"])(external_wp_components_["FontSizePicker"], {
3632      value: fontSize,
3633      onChange: setFontSize,
3634      fontSizes: fontSizes,
3635      disableCustomFontSizes: disableCustomFontSizes
3636    }), hasLineHeightEnabled && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["LineHeightControl"], {
3637      value: lineHeight,
3638      onChange: setLineHeight
3639    }), hasAppearanceControl && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalFontAppearanceControl"], {
3640      value: {
3641        fontStyle,
3642        fontWeight
3643      },
3644      onChange: _ref2 => {
3645        let {
3646          fontStyle: newFontStyle,
3647          fontWeight: newFontWeight
3648        } = _ref2;
3649        setFontStyle(newFontStyle);
3650        setFontWeight(newFontWeight);
3651      },
3652      hasFontStyles: hasFontStyles,
3653      hasFontWeights: hasFontWeights
3654    }), hasLetterSpacingControl && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLetterSpacingControl"], {
3655      value: letterSpacing,
3656      onChange: setLetterSpacing
3657    }));
3658  }
3659  
3660  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/context-menu.js
3661  
3662  
3663  /**
3664   * WordPress dependencies
3665   */
3666  
3667  
3668  
3669  /**
3670   * Internal dependencies
3671   */
3672  
3673  
3674  
3675  
3676  
3677  
3678  
3679  function ContextMenu(_ref) {
3680    let {
3681      name,
3682      parentMenu = ''
3683    } = _ref;
3684    const hasTypographyPanel = useHasTypographyPanel(name);
3685    const hasColorPanel = useHasColorPanel(name);
3686    const hasBorderPanel = useHasBorderPanel(name);
3687    const hasDimensionsPanel = useHasDimensionsPanel(name);
3688    const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
3689    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItemGroup"], null, hasTypographyPanel && Object(external_wp_element_["createElement"])(navigation_button, {
3690      icon: library_typography,
3691      path: parentMenu + '/typography'
3692    }, Object(external_wp_i18n_["__"])('Typography')), hasColorPanel && Object(external_wp_element_["createElement"])(navigation_button, {
3693      icon: library_color,
3694      path: parentMenu + '/colors'
3695    }, Object(external_wp_i18n_["__"])('Colors')), hasLayoutPanel && Object(external_wp_element_["createElement"])(navigation_button, {
3696      icon: layout["a" /* default */],
3697      path: parentMenu + '/layout'
3698    }, Object(external_wp_i18n_["__"])('Layout')));
3699  }
3700  
3701  /* harmony default export */ var context_menu = (ContextMenu);
3702  
3703  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-root.js
3704  
3705  
3706  /**
3707   * WordPress dependencies
3708   */
3709  
3710  
3711  
3712  /**
3713   * Internal dependencies
3714   */
3715  
3716  
3717  
3718  
3719  
3720  function ScreenRoot() {
3721    return Object(external_wp_element_["createElement"])(external_wp_components_["Card"], {
3722      size: "small"
3723    }, Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, Object(external_wp_element_["createElement"])(preview, null)), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, Object(external_wp_element_["createElement"])(context_menu, null)), Object(external_wp_element_["createElement"])(external_wp_components_["CardDivider"], null), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItemGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItem"], null, Object(external_wp_i18n_["__"])('Customize the appearance of specific blocks for the whole site.')), Object(external_wp_element_["createElement"])(navigation_button, {
3724      path: "/blocks"
3725    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
3726      justify: "space-between"
3727    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_i18n_["__"])('Blocks')), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
3728      icon: Object(external_wp_i18n_["isRTL"])() ? chevron_left["a" /* default */] : chevron_right["a" /* default */]
3729    })))))));
3730  }
3731  
3732  /* harmony default export */ var screen_root = (ScreenRoot);
3733  
3734  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/header.js
3735  
3736  
3737  /**
3738   * WordPress dependencies
3739   */
3740  
3741  
3742  
3743  /**
3744   * Internal dependencies
3745   */
3746  
3747  
3748  
3749  function ScreenHeader(_ref) {
3750    let {
3751      back,
3752      title,
3753      description
3754    } = _ref;
3755    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
3756      spacing: 2
3757    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
3758      spacing: 2
3759    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalView"], null, Object(external_wp_element_["createElement"])(navigation_button, {
3760      path: back,
3761      icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
3762        icon: Object(external_wp_i18n_["isRTL"])() ? chevron_right["a" /* default */] : chevron_left["a" /* default */],
3763        variant: "muted"
3764      }),
3765      size: "small",
3766      isBack: true,
3767      "aria-label": Object(external_wp_i18n_["__"])('Navigate to the previous view')
3768    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalSpacer"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHeading"], {
3769      level: 5
3770    }, title))), description && Object(external_wp_element_["createElement"])("p", {
3771      className: "edit-site-global-styles-header__description"
3772    }, description));
3773  }
3774  
3775  /* harmony default export */ var global_styles_header = (ScreenHeader);
3776  
3777  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-block-list.js
3778  
3779  
3780  /**
3781   * WordPress dependencies
3782   */
3783  
3784  
3785  
3786  
3787  /**
3788   * Internal dependencies
3789   */
3790  
3791  
3792  
3793  
3794  
3795  
3796  
3797  
3798  function BlockMenuItem(_ref) {
3799    let {
3800      block
3801    } = _ref;
3802    const hasTypographyPanel = useHasTypographyPanel(block.name);
3803    const hasColorPanel = useHasColorPanel(block.name);
3804    const hasBorderPanel = useHasBorderPanel(block.name);
3805    const hasDimensionsPanel = useHasDimensionsPanel(block.name);
3806    const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
3807    const hasBlockMenuItem = hasTypographyPanel || hasColorPanel || hasLayoutPanel;
3808  
3809    if (!hasBlockMenuItem) {
3810      return null;
3811    }
3812  
3813    return Object(external_wp_element_["createElement"])(navigation_button, {
3814      path: '/blocks/' + block.name
3815    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
3816      justify: "flex-start"
3817    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
3818      icon: block.icon
3819    })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, block.title)));
3820  }
3821  
3822  function ScreenBlockList() {
3823    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
3824      back: "/",
3825      title: Object(external_wp_i18n_["__"])('Blocks'),
3826      description: Object(external_wp_i18n_["__"])('Customize the appearance of specific blocks and for the whole site.')
3827    }), Object(external_wp_blocks_["getBlockTypes"])().map(block => Object(external_wp_element_["createElement"])(BlockMenuItem, {
3828      block: block,
3829      key: 'menu-itemblock-' + block.name
3830    })));
3831  }
3832  
3833  /* harmony default export */ var screen_block_list = (ScreenBlockList);
3834  
3835  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-block.js
3836  
3837  
3838  /**
3839   * WordPress dependencies
3840   */
3841  
3842  /**
3843   * Internal dependencies
3844   */
3845  
3846  
3847  
3848  
3849  function ScreenBlock(_ref) {
3850    let {
3851      name
3852    } = _ref;
3853    const blockType = Object(external_wp_blocks_["getBlockType"])(name);
3854    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
3855      back: "/blocks",
3856      title: blockType.title
3857    }), Object(external_wp_element_["createElement"])(context_menu, {
3858      parentMenu: '/blocks/' + name,
3859      name: name
3860    }));
3861  }
3862  
3863  /* harmony default export */ var screen_block = (ScreenBlock);
3864  
3865  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/subtitle.js
3866  
3867  
3868  /**
3869   * WordPress dependencies
3870   */
3871  
3872  
3873  function Subtitle(_ref) {
3874    let {
3875      children
3876    } = _ref;
3877    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHeading"], {
3878      className: "edit-site-global-styles-subtitle",
3879      level: 2
3880    }, children);
3881  }
3882  
3883  /* harmony default export */ var subtitle = (Subtitle);
3884  
3885  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typography.js
3886  
3887  
3888  /**
3889   * WordPress dependencies
3890   */
3891  
3892  
3893  /**
3894   * Internal dependencies
3895   */
3896  
3897  
3898  
3899  
3900  
3901  
3902  
3903  function Item(_ref) {
3904    let {
3905      name,
3906      parentMenu,
3907      element,
3908      label
3909    } = _ref;
3910    const hasSupport = !name;
3911    const prefix = element === 'text' || !element ? '' : `elements.$element}.`;
3912    const extraStyles = element === 'link' ? {
3913      textDecoration: 'underline'
3914    } : {};
3915    const [fontFamily] = useStyle(prefix + 'typography.fontFamily', name);
3916    const [fontStyle] = useStyle(prefix + 'typography.fontStyle', name);
3917    const [fontWeight] = useStyle(prefix + 'typography.fontWeight', name);
3918    const [letterSpacing] = useStyle(prefix + 'typography.letterSpacing', name);
3919    const [backgroundColor] = useStyle(prefix + 'color.background', name);
3920    const [gradientValue] = useStyle(prefix + 'color.gradient', name);
3921    const [color] = useStyle(prefix + 'color.text', name);
3922  
3923    if (!hasSupport) {
3924      return null;
3925    }
3926  
3927    return Object(external_wp_element_["createElement"])(navigation_button, {
3928      path: parentMenu + '/typography/' + element
3929    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
3930      justify: "flex-start"
3931    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], {
3932      className: "edit-site-global-styles-screen-typography__indicator",
3933      style: {
3934        fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
3935        background: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor,
3936        color,
3937        fontStyle,
3938        fontWeight,
3939        letterSpacing,
3940        ...extraStyles
3941      }
3942    }, Object(external_wp_i18n_["__"])('Aa')), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, label)));
3943  }
3944  
3945  function ScreenTypography(_ref2) {
3946    let {
3947      name
3948    } = _ref2;
3949    const parentMenu = name === undefined ? '' : '/blocks/' + name;
3950    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
3951      back: parentMenu ? parentMenu : '/',
3952      title: Object(external_wp_i18n_["__"])('Typography'),
3953      description: Object(external_wp_i18n_["__"])('Manage the typography settings for different elements.')
3954    }), !name && Object(external_wp_element_["createElement"])("div", {
3955      className: "edit-site-global-styles-screen-typography"
3956    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
3957      spacing: 3
3958    }, Object(external_wp_element_["createElement"])(subtitle, null, Object(external_wp_i18n_["__"])('Elements')), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItemGroup"], {
3959      isBordered: true,
3960      isSeparated: true
3961    }, Object(external_wp_element_["createElement"])(Item, {
3962      name: name,
3963      parentMenu: parentMenu,
3964      element: "text",
3965      label: Object(external_wp_i18n_["__"])('Text')
3966    }), Object(external_wp_element_["createElement"])(Item, {
3967      name: name,
3968      parentMenu: parentMenu,
3969      element: "link",
3970      label: Object(external_wp_i18n_["__"])('Links')
3971    })))), !!name && Object(external_wp_element_["createElement"])(TypographyPanel, {
3972      name: name,
3973      element: "text"
3974    }));
3975  }
3976  
3977  /* harmony default export */ var screen_typography = (ScreenTypography);
3978  
3979  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-typography-element.js
3980  
3981  
3982  /**
3983   * WordPress dependencies
3984   */
3985  
3986  /**
3987   * Internal dependencies
3988   */
3989  
3990  
3991  
3992  const screen_typography_element_elements = {
3993    text: {
3994      description: Object(external_wp_i18n_["__"])('Manage the fonts used on the site.'),
3995      title: Object(external_wp_i18n_["__"])('Text')
3996    },
3997    link: {
3998      description: Object(external_wp_i18n_["__"])('Manage the fonts and typography used on the links.'),
3999      title: Object(external_wp_i18n_["__"])('Links')
4000    }
4001  };
4002  
4003  function ScreenTypographyElement(_ref) {
4004    let {
4005      name,
4006      element
4007    } = _ref;
4008    const parentMenu = name === undefined ? '/typography' : '/blocks/' + name + '/typography';
4009    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4010      back: parentMenu,
4011      title: screen_typography_element_elements[element].title,
4012      description: screen_typography_element_elements[element].description
4013    }), Object(external_wp_element_["createElement"])(TypographyPanel, {
4014      name: name,
4015      element: element
4016    }));
4017  }
4018  
4019  /* harmony default export */ var screen_typography_element = (ScreenTypographyElement);
4020  
4021  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/palette.js
4022  
4023  
4024  /**
4025   * WordPress dependencies
4026   */
4027  
4028  
4029  
4030  /**
4031   * Internal dependencies
4032   */
4033  
4034  
4035  
4036  
4037  const EMPTY_COLORS = [];
4038  
4039  function Palette(_ref) {
4040    let {
4041      name
4042    } = _ref;
4043    const [customColors] = useSetting('color.palette.custom');
4044    const [themeColors] = useSetting('color.palette.theme');
4045    const [defaultColors] = useSetting('color.palette.default');
4046    const [defaultPaletteEnabled] = useSetting('color.defaultPalette', name);
4047    const colors = Object(external_wp_element_["useMemo"])(() => [...(customColors || EMPTY_COLORS), ...(themeColors || EMPTY_COLORS), ...(defaultColors && defaultPaletteEnabled ? defaultColors : EMPTY_COLORS)], [customColors, themeColors, defaultColors, defaultPaletteEnabled]);
4048    const screenPath = !name ? '/colors/palette' : '/blocks/' + name + '/colors/palette';
4049    const paletteButtonText = colors.length > 0 ? Object(external_wp_i18n_["sprintf"])( // Translators: %d: Number of palette colors.
4050    Object(external_wp_i18n_["_n"])('%d color', '%d colors', colors.length), colors.length) : Object(external_wp_i18n_["__"])('Add custom colors');
4051    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
4052      spacing: 3
4053    }, Object(external_wp_element_["createElement"])(subtitle, null, Object(external_wp_i18n_["__"])('Palette')), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItemGroup"], {
4054      isBordered: true,
4055      isSeparated: true
4056    }, Object(external_wp_element_["createElement"])(navigation_button, {
4057      path: screenPath
4058    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
4059      isReversed: colors.length === 0
4060    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexBlock"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalZStack"], {
4061      isLayered: false,
4062      offset: -8
4063    }, colors.slice(0, 5).map(_ref2 => {
4064      let {
4065        color
4066      } = _ref2;
4067      return Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
4068        key: color,
4069        colorValue: color
4070      });
4071    }))), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, paletteButtonText)))));
4072  }
4073  
4074  /* harmony default export */ var palette = (Palette);
4075  
4076  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-colors.js
4077  
4078  
4079  /**
4080   * WordPress dependencies
4081   */
4082  
4083  
4084  /**
4085   * Internal dependencies
4086   */
4087  
4088  
4089  
4090  
4091  
4092  
4093  
4094  function BackgroundColorItem(_ref) {
4095    let {
4096      name,
4097      parentMenu
4098    } = _ref;
4099    const supports = getSupportedGlobalStylesPanels(name);
4100    const hasSupport = supports.includes('backgroundColor') || supports.includes('background');
4101    const [backgroundColor] = useStyle('color.background', name);
4102    const [gradientValue] = useStyle('color.gradient', name);
4103  
4104    if (!hasSupport) {
4105      return null;
4106    }
4107  
4108    return Object(external_wp_element_["createElement"])(navigation_button, {
4109      path: parentMenu + '/colors/background'
4110    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
4111      justify: "flex-start"
4112    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
4113      colorValue: gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor
4114    })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_i18n_["__"])('Background'))));
4115  }
4116  
4117  function TextColorItem(_ref2) {
4118    let {
4119      name,
4120      parentMenu
4121    } = _ref2;
4122    const supports = getSupportedGlobalStylesPanels(name);
4123    const hasSupport = supports.includes('color');
4124    const [color] = useStyle('color.text', name);
4125  
4126    if (!hasSupport) {
4127      return null;
4128    }
4129  
4130    return Object(external_wp_element_["createElement"])(navigation_button, {
4131      path: parentMenu + '/colors/text'
4132    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
4133      justify: "flex-start"
4134    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
4135      colorValue: color
4136    })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_i18n_["__"])('Text'))));
4137  }
4138  
4139  function LinkColorItem(_ref3) {
4140    let {
4141      name,
4142      parentMenu
4143    } = _ref3;
4144    const supports = getSupportedGlobalStylesPanels(name);
4145    const hasSupport = supports.includes('linkColor');
4146    const [color] = useStyle('elements.link.color.text', name);
4147  
4148    if (!hasSupport) {
4149      return null;
4150    }
4151  
4152    return Object(external_wp_element_["createElement"])(navigation_button, {
4153      path: parentMenu + '/colors/link'
4154    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHStack"], {
4155      justify: "flex-start"
4156    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], {
4157      colorValue: color
4158    })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_i18n_["__"])('Links'))));
4159  }
4160  
4161  function ScreenColors(_ref4) {
4162    let {
4163      name
4164    } = _ref4;
4165    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4166    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4167      back: parentMenu ? parentMenu : '/',
4168      title: Object(external_wp_i18n_["__"])('Colors'),
4169      description: Object(external_wp_i18n_["__"])('Manage palettes and the default color of different global elements on the website.')
4170    }), Object(external_wp_element_["createElement"])("div", {
4171      className: "edit-site-global-styles-screen-colors"
4172    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
4173      spacing: 10
4174    }, Object(external_wp_element_["createElement"])(palette, {
4175      name: name
4176    }), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
4177      spacing: 3
4178    }, Object(external_wp_element_["createElement"])(subtitle, null, Object(external_wp_i18n_["__"])('Elements')), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalItemGroup"], {
4179      isBordered: true,
4180      isSeparated: true
4181    }, Object(external_wp_element_["createElement"])(BackgroundColorItem, {
4182      name: name,
4183      parentMenu: parentMenu
4184    }), Object(external_wp_element_["createElement"])(TextColorItem, {
4185      name: name,
4186      parentMenu: parentMenu
4187    }), Object(external_wp_element_["createElement"])(LinkColorItem, {
4188      name: name,
4189      parentMenu: parentMenu
4190    }))))));
4191  }
4192  
4193  /* harmony default export */ var screen_colors = (ScreenColors);
4194  
4195  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/color-palette-panel.js
4196  
4197  
4198  /**
4199   * WordPress dependencies
4200   */
4201  
4202  
4203  /**
4204   * Internal dependencies
4205   */
4206  
4207  
4208  function ColorPalettePanel(_ref) {
4209    let {
4210      name
4211    } = _ref;
4212    const [themeColors, setThemeColors] = useSetting('color.palette.theme', name);
4213    const [baseThemeColors] = useSetting('color.palette.theme', name, 'base');
4214    const [defaultColors, setDefaultColors] = useSetting('color.palette.default', name);
4215    const [baseDefaultColors] = useSetting('color.palette.default', name, 'base');
4216    const [customColors, setCustomColors] = useSetting('color.palette.custom', name);
4217    const [defaultPaletteEnabled] = useSetting('color.defaultPalette', name);
4218    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
4219      className: "edit-site-global-styles-color-palette-panel",
4220      spacing: 10
4221    }, !!themeColors && !!themeColors.length && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalPaletteEdit"], {
4222      canReset: themeColors !== baseThemeColors,
4223      canOnlyChangeValues: true,
4224      colors: themeColors,
4225      onChange: setThemeColors,
4226      paletteLabel: Object(external_wp_i18n_["__"])('Theme')
4227    }), !!defaultColors && !!defaultColors.length && !!defaultPaletteEnabled && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalPaletteEdit"], {
4228      canReset: defaultColors !== baseDefaultColors,
4229      canOnlyChangeValues: true,
4230      colors: defaultColors,
4231      onChange: setDefaultColors,
4232      paletteLabel: Object(external_wp_i18n_["__"])('Default')
4233    }), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalPaletteEdit"], {
4234      colors: customColors,
4235      onChange: setCustomColors,
4236      paletteLabel: Object(external_wp_i18n_["__"])('Custom'),
4237      emptyMessage: Object(external_wp_i18n_["__"])('Custom colors are empty! Add some colors to create your own color palette.'),
4238      slugPrefix: "custom-"
4239    }));
4240  }
4241  
4242  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/gradients-palette-panel.js
4243  
4244  
4245  /**
4246   * External dependencies
4247   */
4248  
4249  /**
4250   * WordPress dependencies
4251   */
4252  
4253  
4254  
4255  /**
4256   * Internal dependencies
4257   */
4258  
4259  
4260  
4261  function GradientPalettePanel(_ref) {
4262    let {
4263      name
4264    } = _ref;
4265    const [themeGradients, setThemeGradients] = useSetting('color.gradients.theme', name);
4266    const [baseThemeGradients] = useSetting('color.gradients.theme', name, 'base');
4267    const [defaultGradients, setDefaultGradients] = useSetting('color.gradients.default', name);
4268    const [baseDefaultGradients] = useSetting('color.gradients.default', name, 'base');
4269    const [customGradients, setCustomGradients] = useSetting('color.gradients.custom', name);
4270    const [defaultPaletteEnabled] = useSetting('color.defaultGradients', name);
4271    const [duotonePalette] = useSetting('color.duotone') || [];
4272    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalVStack"], {
4273      className: "edit-site-global-styles-gradient-palette-panel",
4274      spacing: 10
4275    }, !!themeGradients && !!themeGradients.length && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalPaletteEdit"], {
4276      canReset: themeGradients !== baseThemeGradients,
4277      canOnlyChangeValues: true,
4278      gradients: themeGradients,
4279      onChange: setThemeGradients,
4280      paletteLabel: Object(external_wp_i18n_["__"])('Theme')
4281    }), !!defaultGradients && !!defaultGradients.length && !!defaultPaletteEnabled && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalPaletteEdit"], {
4282      canReset: defaultGradients !== baseDefaultGradients,
4283      canOnlyChangeValues: true,
4284      gradients: defaultGradients,
4285      onChange: setDefaultGradients,
4286      paletteLabel: Object(external_wp_i18n_["__"])('Default')
4287    }), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalPaletteEdit"], {
4288      gradients: customGradients,
4289      onChange: setCustomGradients,
4290      paletteLabel: Object(external_wp_i18n_["__"])('Custom'),
4291      emptyMessage: Object(external_wp_i18n_["__"])('Custom gradients are empty! Add some gradients to create your own palette.'),
4292      slugPrefix: "custom-"
4293    }), Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(subtitle, null, Object(external_wp_i18n_["__"])('Duotone')), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalSpacer"], {
4294      margin: 3
4295    }), Object(external_wp_element_["createElement"])(external_wp_components_["DuotonePicker"], {
4296      duotonePalette: duotonePalette,
4297      disableCustomDuotone: true,
4298      disableCustomColors: true,
4299      clearable: false,
4300      onChange: external_lodash_["noop"]
4301    })));
4302  }
4303  
4304  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-color-palette.js
4305  
4306  
4307  /**
4308   * WordPress dependencies
4309   */
4310  
4311  
4312  
4313  /**
4314   * Internal dependencies
4315   */
4316  
4317  
4318  
4319  
4320  
4321  function ScreenColorPalette(_ref) {
4322    let {
4323      name
4324    } = _ref;
4325    const [currentTab, setCurrentTab] = Object(external_wp_element_["useState"])('solid');
4326    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4327    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4328      back: parentMenu + '/colors',
4329      title: Object(external_wp_i18n_["__"])('Palette'),
4330      description: Object(external_wp_i18n_["__"])('Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.')
4331    }), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToggleGroupControl"], {
4332      className: "edit-site-screen-color-palette-toggle",
4333      value: currentTab,
4334      onChange: setCurrentTab,
4335      label: Object(external_wp_i18n_["__"])('Select palette type'),
4336      hideLabelFromVision: true,
4337      isBlock: true
4338    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToggleGroupControlOption"], {
4339      value: "solid",
4340      label: Object(external_wp_i18n_["__"])('Solid')
4341    }), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToggleGroupControlOption"], {
4342      value: "gradient",
4343      label: Object(external_wp_i18n_["__"])('Gradient')
4344    })), currentTab === 'solid' && Object(external_wp_element_["createElement"])(ColorPalettePanel, {
4345      name: name
4346    }), currentTab === 'gradient' && Object(external_wp_element_["createElement"])(GradientPalettePanel, {
4347      name: name
4348    }));
4349  }
4350  
4351  /* harmony default export */ var screen_color_palette = (ScreenColorPalette);
4352  
4353  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-background-color.js
4354  
4355  
4356  /**
4357   * WordPress dependencies
4358   */
4359  
4360  
4361  /**
4362   * Internal dependencies
4363   */
4364  
4365  
4366  
4367  
4368  function ScreenBackgroundColor(_ref) {
4369    let {
4370      name
4371    } = _ref;
4372    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4373    const supports = getSupportedGlobalStylesPanels(name);
4374    const [solids] = useSetting('color.palette', name);
4375    const [gradients] = useSetting('color.gradients', name);
4376    const [areCustomSolidsEnabled] = useSetting('color.custom', name);
4377    const [areCustomGradientsEnabled] = useSetting('color.customGradient', name);
4378    const colorsPerOrigin = useColorsPerOrigin(name);
4379    const gradientsPerOrigin = useGradientsPerOrigin(name);
4380    const [isBackgroundEnabled] = useSetting('color.background', name);
4381    const hasBackgroundColor = supports.includes('backgroundColor') && isBackgroundEnabled && (solids.length > 0 || areCustomSolidsEnabled);
4382    const hasGradientColor = supports.includes('background') && (gradients.length > 0 || areCustomGradientsEnabled);
4383    const [backgroundColor, setBackgroundColor] = useStyle('color.background', name);
4384    const [userBackgroundColor] = useStyle('color.background', name, 'user');
4385    const [gradient, setGradient] = useStyle('color.gradient', name);
4386    const [userGradient] = useStyle('color.gradient', name, 'user');
4387  
4388    if (!hasBackgroundColor && !hasGradientColor) {
4389      return null;
4390    }
4391  
4392    const settings = [];
4393    let backgroundSettings = {};
4394  
4395    if (hasBackgroundColor) {
4396      backgroundSettings = {
4397        colorValue: backgroundColor,
4398        onColorChange: setBackgroundColor
4399      };
4400  
4401      if (backgroundColor) {
4402        backgroundSettings.clearable = backgroundColor === userBackgroundColor;
4403      }
4404    }
4405  
4406    let gradientSettings = {};
4407  
4408    if (hasGradientColor) {
4409      gradientSettings = {
4410        gradientValue: gradient,
4411        onGradientChange: setGradient
4412      };
4413  
4414      if (gradient) {
4415        gradientSettings.clearable = gradient === userGradient;
4416      }
4417    }
4418  
4419    settings.push({ ...backgroundSettings,
4420      ...gradientSettings,
4421      label: Object(external_wp_i18n_["__"])('Background color')
4422    });
4423    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4424      back: parentMenu + '/colors',
4425      title: Object(external_wp_i18n_["__"])('Background'),
4426      description: Object(external_wp_i18n_["__"])('Set a background color or gradient for the whole website.')
4427    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPanelColorGradientSettings"], {
4428      title: Object(external_wp_i18n_["__"])('Color'),
4429      settings: settings,
4430      colors: colorsPerOrigin,
4431      gradients: gradientsPerOrigin,
4432      disableCustomColors: !areCustomSolidsEnabled,
4433      disableCustomGradients: !areCustomGradientsEnabled,
4434      __experimentalHasMultipleOrigins: true,
4435      showTitle: false,
4436      enableAlpha: true,
4437      __experimentalIsRenderedInSidebar: true
4438    }));
4439  }
4440  
4441  /* harmony default export */ var screen_background_color = (ScreenBackgroundColor);
4442  
4443  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-text-color.js
4444  
4445  
4446  /**
4447   * WordPress dependencies
4448   */
4449  
4450  
4451  /**
4452   * Internal dependencies
4453   */
4454  
4455  
4456  
4457  
4458  function ScreenTextColor(_ref) {
4459    let {
4460      name
4461    } = _ref;
4462    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4463    const supports = getSupportedGlobalStylesPanels(name);
4464    const [solids] = useSetting('color.palette', name);
4465    const [areCustomSolidsEnabled] = useSetting('color.custom', name);
4466    const [isTextEnabled] = useSetting('color.text', name);
4467    const colorsPerOrigin = useColorsPerOrigin(name);
4468    const hasTextColor = supports.includes('color') && isTextEnabled && (solids.length > 0 || areCustomSolidsEnabled);
4469    const [color, setColor] = useStyle('color.text', name);
4470    const [userColor] = useStyle('color.text', name, 'user');
4471  
4472    if (!hasTextColor) {
4473      return null;
4474    }
4475  
4476    const settings = [{
4477      colorValue: color,
4478      onColorChange: setColor,
4479      label: Object(external_wp_i18n_["__"])('Text color'),
4480      clearable: color === userColor
4481    }];
4482    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4483      back: parentMenu + '/colors',
4484      title: Object(external_wp_i18n_["__"])('Text'),
4485      description: Object(external_wp_i18n_["__"])('Set the default color used for text across the site.')
4486    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPanelColorGradientSettings"], {
4487      title: Object(external_wp_i18n_["__"])('Color'),
4488      settings: settings,
4489      colors: colorsPerOrigin,
4490      disableCustomColors: !areCustomSolidsEnabled,
4491      __experimentalHasMultipleOrigins: true,
4492      showTitle: false,
4493      enableAlpha: true,
4494      __experimentalIsRenderedInSidebar: true
4495    }));
4496  }
4497  
4498  /* harmony default export */ var screen_text_color = (ScreenTextColor);
4499  
4500  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-link-color.js
4501  
4502  
4503  /**
4504   * WordPress dependencies
4505   */
4506  
4507  
4508  /**
4509   * Internal dependencies
4510   */
4511  
4512  
4513  
4514  
4515  function ScreenLinkColor(_ref) {
4516    let {
4517      name
4518    } = _ref;
4519    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4520    const supports = getSupportedGlobalStylesPanels(name);
4521    const [solids] = useSetting('color.palette', name);
4522    const [areCustomSolidsEnabled] = useSetting('color.custom', name);
4523    const colorsPerOrigin = useColorsPerOrigin(name);
4524    const [isLinkEnabled] = useSetting('color.link', name);
4525    const hasLinkColor = supports.includes('linkColor') && isLinkEnabled && (solids.length > 0 || areCustomSolidsEnabled);
4526    const [linkColor, setLinkColor] = useStyle('elements.link.color.text', name);
4527    const [userLinkColor] = useStyle('elements.link.color.text', name, 'user');
4528  
4529    if (!hasLinkColor) {
4530      return null;
4531    }
4532  
4533    const settings = [{
4534      colorValue: linkColor,
4535      onColorChange: setLinkColor,
4536      label: Object(external_wp_i18n_["__"])('Link color'),
4537      clearable: linkColor === userLinkColor
4538    }];
4539    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4540      back: parentMenu + '/colors',
4541      title: Object(external_wp_i18n_["__"])('Links'),
4542      description: Object(external_wp_i18n_["__"])('Set the default color used for links across the site.')
4543    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPanelColorGradientSettings"], {
4544      title: Object(external_wp_i18n_["__"])('Color'),
4545      settings: settings,
4546      colors: colorsPerOrigin,
4547      disableCustomColors: !areCustomSolidsEnabled,
4548      __experimentalHasMultipleOrigins: true,
4549      showTitle: false,
4550      enableAlpha: true,
4551      __experimentalIsRenderedInSidebar: true
4552    }));
4553  }
4554  
4555  /* harmony default export */ var screen_link_color = (ScreenLinkColor);
4556  
4557  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/screen-layout.js
4558  
4559  
4560  /**
4561   * WordPress dependencies
4562   */
4563  
4564  /**
4565   * Internal dependencies
4566   */
4567  
4568  
4569  
4570  
4571  
4572  function ScreenLayout(_ref) {
4573    let {
4574      name
4575    } = _ref;
4576    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4577    const hasBorderPanel = useHasBorderPanel(name);
4578    const hasDimensionsPanel = useHasDimensionsPanel(name);
4579    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(global_styles_header, {
4580      back: parentMenu ? parentMenu : '/',
4581      title: Object(external_wp_i18n_["__"])('Layout')
4582    }), hasDimensionsPanel && Object(external_wp_element_["createElement"])(DimensionsPanel, {
4583      name: name
4584    }), hasBorderPanel && Object(external_wp_element_["createElement"])(BorderPanel, {
4585      name: name
4586    }));
4587  }
4588  
4589  /* harmony default export */ var screen_layout = (ScreenLayout);
4590  
4591  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/ui.js
4592  
4593  
4594  /**
4595   * WordPress dependencies
4596   */
4597  
4598  
4599  /**
4600   * Internal dependencies
4601   */
4602  
4603  
4604  
4605  
4606  
4607  
4608  
4609  
4610  
4611  
4612  
4613  
4614  
4615  function ContextScreens(_ref) {
4616    let {
4617      name
4618    } = _ref;
4619    const parentMenu = name === undefined ? '' : '/blocks/' + name;
4620    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4621      path: parentMenu + '/typography'
4622    }, Object(external_wp_element_["createElement"])(screen_typography, {
4623      name: name
4624    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4625      path: parentMenu + '/typography/text'
4626    }, Object(external_wp_element_["createElement"])(screen_typography_element, {
4627      name: name,
4628      element: "text"
4629    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4630      path: parentMenu + '/typography/link'
4631    }, Object(external_wp_element_["createElement"])(screen_typography_element, {
4632      name: name,
4633      element: "link"
4634    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4635      path: parentMenu + '/colors'
4636    }, Object(external_wp_element_["createElement"])(screen_colors, {
4637      name: name
4638    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4639      path: parentMenu + '/colors/palette'
4640    }, Object(external_wp_element_["createElement"])(screen_color_palette, {
4641      name: name
4642    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4643      path: parentMenu + '/colors/background'
4644    }, Object(external_wp_element_["createElement"])(screen_background_color, {
4645      name: name
4646    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4647      path: parentMenu + '/colors/text'
4648    }, Object(external_wp_element_["createElement"])(screen_text_color, {
4649      name: name
4650    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4651      path: parentMenu + '/colors/link'
4652    }, Object(external_wp_element_["createElement"])(screen_link_color, {
4653      name: name
4654    })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4655      path: parentMenu + '/layout'
4656    }, Object(external_wp_element_["createElement"])(screen_layout, {
4657      name: name
4658    })));
4659  }
4660  
4661  function GlobalStylesUI() {
4662    const blocks = Object(external_wp_blocks_["getBlockTypes"])();
4663    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorProvider"], {
4664      initialPath: "/"
4665    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4666      path: "/"
4667    }, Object(external_wp_element_["createElement"])(screen_root, null)), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4668      path: "/blocks"
4669    }, Object(external_wp_element_["createElement"])(screen_block_list, null)), blocks.map(block => Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigatorScreen"], {
4670      key: 'menu-block-' + block.name,
4671      path: '/blocks/' + block.name
4672    }, Object(external_wp_element_["createElement"])(screen_block, {
4673      name: block.name
4674    }))), Object(external_wp_element_["createElement"])(ContextScreens, null), blocks.map(block => Object(external_wp_element_["createElement"])(ContextScreens, {
4675      key: 'screens-block-' + block.name,
4676      name: block.name
4677    })));
4678  }
4679  
4680  /* harmony default export */ var ui = (GlobalStylesUI);
4681  
4682  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/use-global-styles-output.js
4683  /**
4684   * External dependencies
4685   */
4686  
4687  /**
4688   * WordPress dependencies
4689   */
4690  
4691  
4692  
4693  /**
4694   * Internal dependencies
4695   */
4696  
4697  /**
4698   * Internal dependencies
4699   */
4700  
4701  
4702  
4703  
4704  function compileStyleValue(uncompiledValue) {
4705    const VARIABLE_REFERENCE_PREFIX = 'var:';
4706    const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';
4707    const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';
4708  
4709    if (Object(external_lodash_["startsWith"])(uncompiledValue, VARIABLE_REFERENCE_PREFIX)) {
4710      const variable = uncompiledValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
4711      return `var(--wp--$variable})`;
4712    }
4713  
4714    return uncompiledValue;
4715  }
4716  /**
4717   * Transform given preset tree into a set of style declarations.
4718   *
4719   * @param {Object} blockPresets
4720   *
4721   * @return {Array} An array of style declarations.
4722   */
4723  
4724  
4725  function getPresetsDeclarations() {
4726    let blockPresets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4727    return Object(external_lodash_["reduce"])(PRESET_METADATA, (declarations, _ref) => {
4728      let {
4729        path,
4730        valueKey,
4731        cssVarInfix
4732      } = _ref;
4733      const presetByOrigin = Object(external_lodash_["get"])(blockPresets, path, []);
4734      ['default', 'theme', 'custom'].forEach(origin => {
4735        if (presetByOrigin[origin]) {
4736          presetByOrigin[origin].forEach(value => {
4737            declarations.push(`--wp--preset--$cssVarInfix}--$Object(external_lodash_["kebabCase"])(value.slug)}: $value[valueKey]}`);
4738          });
4739        }
4740      });
4741      return declarations;
4742    }, []);
4743  }
4744  /**
4745   * Transform given preset tree into a set of preset class declarations.
4746   *
4747   * @param {string} blockSelector
4748   * @param {Object} blockPresets
4749   * @return {string} CSS declarations for the preset classes.
4750   */
4751  
4752  
4753  function getPresetsClasses(blockSelector) {
4754    let blockPresets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4755    return Object(external_lodash_["reduce"])(PRESET_METADATA, (declarations, _ref2) => {
4756      let {
4757        path,
4758        cssVarInfix,
4759        classes
4760      } = _ref2;
4761  
4762      if (!classes) {
4763        return declarations;
4764      }
4765  
4766      const presetByOrigin = Object(external_lodash_["get"])(blockPresets, path, []);
4767      ['default', 'theme', 'custom'].forEach(origin => {
4768        if (presetByOrigin[origin]) {
4769          presetByOrigin[origin].forEach(_ref3 => {
4770            let {
4771              slug
4772            } = _ref3;
4773            classes.forEach(_ref4 => {
4774              let {
4775                classSuffix,
4776                propertyName
4777              } = _ref4;
4778              const classSelectorToUse = `.has-$Object(external_lodash_["kebabCase"])(slug)}-$classSuffix}`;
4779              const selectorToUse = blockSelector.split(',') // Selector can be "h1, h2, h3"
4780              .map(selector => `$selector}$classSelectorToUse}`).join(',');
4781              const value = `var(--wp--preset--$cssVarInfix}--$Object(external_lodash_["kebabCase"])(slug)})`;
4782              declarations += `$selectorToUse}{$propertyName}: $value} !important;}`;
4783            });
4784          });
4785        }
4786      });
4787      return declarations;
4788    }, '');
4789  }
4790  
4791  function flattenTree() {
4792    let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4793    let prefix = arguments.length > 1 ? arguments[1] : undefined;
4794    let token = arguments.length > 2 ? arguments[2] : undefined;
4795    let result = [];
4796    Object.keys(input).forEach(key => {
4797      const newKey = prefix + Object(external_lodash_["kebabCase"])(key.replace('/', '-'));
4798      const newLeaf = input[key];
4799  
4800      if (newLeaf instanceof Object) {
4801        const newPrefix = newKey + token;
4802        result = [...result, ...flattenTree(newLeaf, newPrefix, token)];
4803      } else {
4804        result.push(`$newKey}: $newLeaf}`);
4805      }
4806    });
4807    return result;
4808  }
4809  /**
4810   * Transform given style tree into a set of style declarations.
4811   *
4812   * @param {Object} blockStyles Block styles.
4813   *
4814   * @return {Array} An array of style declarations.
4815   */
4816  
4817  
4818  function getStylesDeclarations() {
4819    let blockStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4820    return Object(external_lodash_["reduce"])(external_wp_blocks_["__EXPERIMENTAL_STYLE_PROPERTY"], (declarations, _ref5, key) => {
4821      let {
4822        value,
4823        properties
4824      } = _ref5;
4825      const pathToValue = value;
4826  
4827      if (Object(external_lodash_["first"])(pathToValue) === 'elements') {
4828        return declarations;
4829      }
4830  
4831      const styleValue = Object(external_lodash_["get"])(blockStyles, pathToValue);
4832  
4833      if (!!properties && !Object(external_lodash_["isString"])(styleValue)) {
4834        Object.entries(properties).forEach(entry => {
4835          const [name, prop] = entry;
4836  
4837          if (!Object(external_lodash_["get"])(styleValue, [prop], false)) {
4838            // Do not create a declaration
4839            // for sub-properties that don't have any value.
4840            return;
4841          }
4842  
4843          const cssProperty = Object(external_lodash_["kebabCase"])(name);
4844          declarations.push(`$cssProperty}: $compileStyleValue(Object(external_lodash_["get"])(styleValue, [prop]))}`);
4845        });
4846      } else if (Object(external_lodash_["get"])(blockStyles, pathToValue, false)) {
4847        const cssProperty = key.startsWith('--') ? key : Object(external_lodash_["kebabCase"])(key);
4848        declarations.push(`$cssProperty}: $compileStyleValue(Object(external_lodash_["get"])(blockStyles, pathToValue))}`);
4849      }
4850  
4851      return declarations;
4852    }, []);
4853  }
4854  
4855  const getNodesWithStyles = (tree, blockSelectors) => {
4856    var _tree$styles, _tree$styles2;
4857  
4858    const nodes = [];
4859  
4860    if (!(tree !== null && tree !== void 0 && tree.styles)) {
4861      return nodes;
4862    }
4863  
4864    const pickStyleKeys = treeToPickFrom => Object(external_lodash_["pickBy"])(treeToPickFrom, (value, key) => ['border', 'color', 'spacing', 'typography'].includes(key)); // Top-level.
4865  
4866  
4867    const styles = pickStyleKeys(tree.styles);
4868  
4869    if (!!styles) {
4870      nodes.push({
4871        styles,
4872        selector: ROOT_BLOCK_SELECTOR
4873      });
4874    }
4875  
4876    Object(external_lodash_["forEach"])((_tree$styles = tree.styles) === null || _tree$styles === void 0 ? void 0 : _tree$styles.elements, (value, key) => {
4877      if (!!value && !!external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"][key]) {
4878        nodes.push({
4879          styles: value,
4880          selector: external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"][key]
4881        });
4882      }
4883    }); // Iterate over blocks: they can have styles & elements.
4884  
4885    Object(external_lodash_["forEach"])((_tree$styles2 = tree.styles) === null || _tree$styles2 === void 0 ? void 0 : _tree$styles2.blocks, (node, blockName) => {
4886      var _blockSelectors$block;
4887  
4888      const blockStyles = pickStyleKeys(node);
4889  
4890      if (!!blockStyles && !!(blockSelectors !== null && blockSelectors !== void 0 && (_blockSelectors$block = blockSelectors[blockName]) !== null && _blockSelectors$block !== void 0 && _blockSelectors$block.selector)) {
4891        nodes.push({
4892          styles: blockStyles,
4893          selector: blockSelectors[blockName].selector
4894        });
4895      }
4896  
4897      Object(external_lodash_["forEach"])(node === null || node === void 0 ? void 0 : node.elements, (value, elementName) => {
4898        if (!!value && !!(blockSelectors !== null && blockSelectors !== void 0 && blockSelectors[blockName]) && !!(external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"] !== null && external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"] !== void 0 && external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"][elementName])) {
4899          nodes.push({
4900            styles: value,
4901            selector: blockSelectors[blockName].selector.split(',').map(sel => sel + ' ' + external_wp_blocks_["__EXPERIMENTAL_ELEMENTS"][elementName]).join(',')
4902          });
4903        }
4904      });
4905    });
4906    return nodes;
4907  };
4908  const getNodesWithSettings = (tree, blockSelectors) => {
4909    var _tree$settings, _tree$settings2;
4910  
4911    const nodes = [];
4912  
4913    if (!(tree !== null && tree !== void 0 && tree.settings)) {
4914      return nodes;
4915    }
4916  
4917    const pickPresets = treeToPickFrom => {
4918      const presets = {};
4919      PRESET_METADATA.forEach(_ref6 => {
4920        let {
4921          path
4922        } = _ref6;
4923        const value = Object(external_lodash_["get"])(treeToPickFrom, path, false);
4924  
4925        if (value !== false) {
4926          Object(external_lodash_["set"])(presets, path, value);
4927        }
4928      });
4929      return presets;
4930    }; // Top-level.
4931  
4932  
4933    const presets = pickPresets(tree.settings);
4934    const custom = (_tree$settings = tree.settings) === null || _tree$settings === void 0 ? void 0 : _tree$settings.custom;
4935  
4936    if (!Object(external_lodash_["isEmpty"])(presets) || !!custom) {
4937      nodes.push({
4938        presets,
4939        custom,
4940        selector: ROOT_BLOCK_SELECTOR
4941      });
4942    } // Blocks.
4943  
4944  
4945    Object(external_lodash_["forEach"])((_tree$settings2 = tree.settings) === null || _tree$settings2 === void 0 ? void 0 : _tree$settings2.blocks, (node, blockName) => {
4946      const blockPresets = pickPresets(node);
4947      const blockCustom = node.custom;
4948  
4949      if (!Object(external_lodash_["isEmpty"])(blockPresets) || !!blockCustom) {
4950        nodes.push({
4951          presets: blockPresets,
4952          custom: blockCustom,
4953          selector: blockSelectors[blockName].selector
4954        });
4955      }
4956    });
4957    return nodes;
4958  };
4959  const toCustomProperties = (tree, blockSelectors) => {
4960    const settings = getNodesWithSettings(tree, blockSelectors);
4961    let ruleset = '';
4962    settings.forEach(_ref7 => {
4963      let {
4964        presets,
4965        custom,
4966        selector
4967      } = _ref7;
4968      const declarations = getPresetsDeclarations(presets);
4969      const customProps = flattenTree(custom, '--wp--custom--', '--');
4970  
4971      if (customProps.length > 0) {
4972        declarations.push(...customProps);
4973      }
4974  
4975      if (declarations.length > 0) {
4976        ruleset = ruleset + `$selector}{$declarations.join(';')};}`;
4977      }
4978    });
4979    return ruleset;
4980  };
4981  const toStyles = (tree, blockSelectors) => {
4982    const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
4983    const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
4984    let ruleset = '.wp-site-blocks > * { margin-top: 0; margin-bottom: 0; }.wp-site-blocks > * + * { margin-top: var( --wp--style--block-gap ); }';
4985    nodesWithStyles.forEach(_ref8 => {
4986      let {
4987        selector,
4988        styles
4989      } = _ref8;
4990      const declarations = getStylesDeclarations(styles);
4991  
4992      if (declarations.length === 0) {
4993        return;
4994      }
4995  
4996      ruleset = ruleset + `$selector}{$declarations.join(';')};}`;
4997    });
4998    nodesWithSettings.forEach(_ref9 => {
4999      let {
5000        selector,
5001        presets
5002      } = _ref9;
5003  
5004      if (ROOT_BLOCK_SELECTOR === selector) {
5005        // Do not add extra specificity for top-level classes.
5006        selector = '';
5007      }
5008  
5009      const classes = getPresetsClasses(selector, presets);
5010  
5011      if (!Object(external_lodash_["isEmpty"])(classes)) {
5012        ruleset = ruleset + classes;
5013      }
5014    });
5015    return ruleset;
5016  };
5017  
5018  const getBlockSelectors = blockTypes => {
5019    const result = {};
5020    blockTypes.forEach(blockType => {
5021      var _blockType$supports$_, _blockType$supports;
5022  
5023      const name = blockType.name;
5024      const selector = (_blockType$supports$_ = blockType === null || blockType === void 0 ? void 0 : (_blockType$supports = blockType.supports) === null || _blockType$supports === void 0 ? void 0 : _blockType$supports.__experimentalSelector) !== null && _blockType$supports$_ !== void 0 ? _blockType$supports$_ : '.wp-block-' + name.replace('core/', '').replace('/', '-');
5025      result[name] = {
5026        name,
5027        selector
5028      };
5029    });
5030    return result;
5031  };
5032  
5033  function useGlobalStylesOutput() {
5034    const [stylesheets, setStylesheets] = Object(external_wp_element_["useState"])([]);
5035    const [settings, setSettings] = Object(external_wp_element_["useState"])({});
5036    const {
5037      merged: mergedConfig
5038    } = Object(external_wp_element_["useContext"])(GlobalStylesContext);
5039    Object(external_wp_element_["useEffect"])(() => {
5040      if (!(mergedConfig !== null && mergedConfig !== void 0 && mergedConfig.styles) || !(mergedConfig !== null && mergedConfig !== void 0 && mergedConfig.settings)) {
5041        return;
5042      }
5043  
5044      const blockSelectors = getBlockSelectors(Object(external_wp_blocks_["getBlockTypes"])());
5045      const customProperties = toCustomProperties(mergedConfig, blockSelectors);
5046      const globalStyles = toStyles(mergedConfig, blockSelectors);
5047      setStylesheets([{
5048        css: customProperties,
5049        isGlobalStyles: true
5050      }, {
5051        css: globalStyles,
5052        isGlobalStyles: true
5053      }]);
5054      setSettings(mergedConfig.settings);
5055    }, [mergedConfig]);
5056    return [stylesheets, settings];
5057  }
5058  
5059  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/index.js
5060  
5061  
5062  
5063  
5064  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/global-styles-sidebar.js
5065  
5066  
5067  /**
5068   * WordPress dependencies
5069   */
5070  
5071  
5072  
5073  
5074  /**
5075   * Internal dependencies
5076   */
5077  
5078  
5079  
5080  
5081  function GlobalStylesSidebar() {
5082    const [canReset, onReset] = useGlobalStylesReset();
5083    const {
5084      toggleFeature
5085    } = Object(external_wp_data_["useDispatch"])(store);
5086    return Object(external_wp_element_["createElement"])(DefaultSidebar, {
5087      className: "edit-site-global-styles-sidebar",
5088      identifier: "edit-site/global-styles",
5089      title: Object(external_wp_i18n_["__"])('Styles'),
5090      icon: library_styles,
5091      closeLabel: Object(external_wp_i18n_["__"])('Close global styles sidebar'),
5092      header: Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], null, Object(external_wp_element_["createElement"])(external_wp_components_["FlexBlock"], null, Object(external_wp_element_["createElement"])("strong", null, Object(external_wp_i18n_["__"])('Styles')), Object(external_wp_element_["createElement"])("span", {
5093        className: "edit-site-global-styles-sidebar__beta"
5094      }, Object(external_wp_i18n_["__"])('Beta'))), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
5095        icon: more_vertical["a" /* default */],
5096        label: Object(external_wp_i18n_["__"])('More Global Styles Actions'),
5097        toggleProps: {
5098          disabled: !canReset
5099        },
5100        controls: [{
5101          title: Object(external_wp_i18n_["__"])('Reset to defaults'),
5102          onClick: onReset
5103        }, {
5104          title: Object(external_wp_i18n_["__"])('Welcome Guide'),
5105          onClick: () => toggleFeature('welcomeGuideStyles')
5106        }]
5107      })))
5108    }, Object(external_wp_element_["createElement"])(ui, null));
5109  }
5110  
5111  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/constants.js
5112  const SIDEBAR_TEMPLATE = 'edit-site/template';
5113  const SIDEBAR_BLOCK = 'edit-site/block-inspector';
5114  
5115  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/settings-header/index.js
5116  
5117  
5118  /**
5119   * WordPress dependencies
5120   */
5121  
5122  
5123  
5124  
5125  /**
5126   * Internal dependencies
5127   */
5128  
5129  
5130  
5131  
5132  const SettingsHeader = _ref => {
5133    let {
5134      sidebarName
5135    } = _ref;
5136    const {
5137      enableComplementaryArea
5138    } = Object(external_wp_data_["useDispatch"])(build_module["i" /* store */]);
5139  
5140    const openTemplateSettings = () => enableComplementaryArea(STORE_NAME, SIDEBAR_TEMPLATE);
5141  
5142    const openBlockSettings = () => enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
5143  
5144    const [templateAriaLabel, templateActiveClass] = sidebarName === SIDEBAR_TEMPLATE ? // translators: ARIA label for the Template sidebar tab, selected.
5145    [Object(external_wp_i18n_["__"])('Template (selected)'), 'is-active'] : // translators: ARIA label for the Template Settings Sidebar tab, not selected.
5146    [Object(external_wp_i18n_["__"])('Template'), ''];
5147    const [blockAriaLabel, blockActiveClass] = sidebarName === SIDEBAR_BLOCK ? // translators: ARIA label for the Block Settings Sidebar tab, selected.
5148    [Object(external_wp_i18n_["__"])('Block (selected)'), 'is-active'] : // translators: ARIA label for the Block Settings Sidebar tab, not selected.
5149    [Object(external_wp_i18n_["__"])('Block'), ''];
5150    /* Use a list so screen readers will announce how many tabs there are. */
5151  
5152    return Object(external_wp_element_["createElement"])("ul", null, Object(external_wp_element_["createElement"])("li", null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5153      onClick: openTemplateSettings,
5154      className: `edit-site-sidebar__panel-tab $templateActiveClass}`,
5155      "aria-label": templateAriaLabel // translators: Data label for the Template Settings Sidebar tab.
5156      ,
5157      "data-label": Object(external_wp_i18n_["__"])('Template')
5158    }, // translators: Text label for the Template Settings Sidebar tab.
5159    Object(external_wp_i18n_["__"])('Template'))), Object(external_wp_element_["createElement"])("li", null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5160      onClick: openBlockSettings,
5161      className: `edit-site-sidebar__panel-tab $blockActiveClass}`,
5162      "aria-label": blockAriaLabel // translators: Data label for the Block Settings Sidebar tab.
5163      ,
5164      "data-label": Object(external_wp_i18n_["__"])('Block')
5165    }, // translators: Text label for the Block Settings Sidebar tab.
5166    Object(external_wp_i18n_["__"])('Block'))));
5167  };
5168  
5169  /* harmony default export */ var settings_header = (SettingsHeader);
5170  
5171  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/template-card/template-areas.js
5172  
5173  
5174  /**
5175   * WordPress dependencies
5176   */
5177  
5178  
5179  
5180  
5181  
5182  /**
5183   * Internal dependencies
5184   */
5185  
5186  
5187  
5188  function TemplateAreaItem(_ref) {
5189    let {
5190      area,
5191      clientId
5192    } = _ref;
5193    const {
5194      selectBlock,
5195      toggleBlockHighlight
5196    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
5197    const templatePartArea = Object(external_wp_data_["useSelect"])(select => {
5198      const defaultAreas = select(external_wp_editor_["store"]).__experimentalGetDefaultTemplatePartAreas();
5199  
5200      return defaultAreas.find(defaultArea => defaultArea.area === area);
5201    }, [area]);
5202  
5203    const highlightBlock = () => toggleBlockHighlight(clientId, true);
5204  
5205    const cancelHighlightBlock = () => toggleBlockHighlight(clientId, false);
5206  
5207    return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5208      className: "edit-site-template-card__template-areas-item",
5209      icon: templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.icon,
5210      onMouseOver: highlightBlock,
5211      onMouseLeave: cancelHighlightBlock,
5212      onFocus: highlightBlock,
5213      onBlur: cancelHighlightBlock,
5214      onClick: () => {
5215        selectBlock(clientId);
5216      }
5217    }, templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.label);
5218  }
5219  
5220  function template_areas_TemplateAreas() {
5221    const templateParts = Object(external_wp_data_["useSelect"])(select => select(store).getCurrentTemplateTemplateParts(), []);
5222  
5223    if (!templateParts.length) {
5224      return null;
5225    }
5226  
5227    return Object(external_wp_element_["createElement"])("section", {
5228      className: "edit-site-template-card__template-areas"
5229    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalHeading"], {
5230      level: 3,
5231      className: "edit-site-template-card__template-areas-title"
5232    }, Object(external_wp_i18n_["__"])('Areas')), Object(external_wp_element_["createElement"])("ul", {
5233      className: "edit-site-template-card__template-areas-list"
5234    }, templateParts.map(_ref2 => {
5235      let {
5236        templatePart,
5237        block
5238      } = _ref2;
5239      return Object(external_wp_element_["createElement"])("li", {
5240        key: templatePart.slug
5241      }, Object(external_wp_element_["createElement"])(TemplateAreaItem, {
5242        area: templatePart.area,
5243        clientId: block.clientId
5244      }));
5245    })));
5246  }
5247  
5248  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/template-card/index.js
5249  
5250  
5251  /**
5252   * WordPress dependencies
5253   */
5254  
5255  
5256  
5257  
5258  /**
5259   * Internal dependencies
5260   */
5261  
5262  
5263  
5264  function TemplateCard() {
5265    const {
5266      title,
5267      description,
5268      icon
5269    } = Object(external_wp_data_["useSelect"])(select => {
5270      const {
5271        getEditedPostType,
5272        getEditedPostId
5273      } = select(store);
5274      const {
5275        getEntityRecord
5276      } = select(external_wp_coreData_["store"]);
5277      const {
5278        __experimentalGetTemplateInfo: getTemplateInfo
5279      } = select(external_wp_editor_["store"]);
5280      const postType = getEditedPostType();
5281      const postId = getEditedPostId();
5282      const record = getEntityRecord('postType', postType, postId);
5283      const info = record ? getTemplateInfo(record) : {};
5284      return info;
5285    }, []);
5286  
5287    if (!title && !description) {
5288      return null;
5289    }
5290  
5291    return Object(external_wp_element_["createElement"])("div", {
5292      className: "edit-site-template-card"
5293    }, Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
5294      className: "edit-site-template-card__icon",
5295      icon: icon
5296    }), Object(external_wp_element_["createElement"])("div", {
5297      className: "edit-site-template-card__content"
5298    }, Object(external_wp_element_["createElement"])("h2", {
5299      className: "edit-site-template-card__title"
5300    }, title), Object(external_wp_element_["createElement"])("div", {
5301      className: "edit-site-template-card__description"
5302    }, description), Object(external_wp_element_["createElement"])(template_areas_TemplateAreas, null)));
5303  }
5304  
5305  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar/index.js
5306  
5307  
5308  /**
5309   * WordPress dependencies
5310   */
5311  
5312  
5313  
5314  
5315  
5316  
5317  
5318  /**
5319   * Internal dependencies
5320   */
5321  
5322  
5323  
5324  
5325  
5326  
5327  
5328  const {
5329    Slot: InspectorSlot,
5330    Fill: InspectorFill
5331  } = Object(external_wp_components_["createSlotFill"])('EditSiteSidebarInspector');
5332  const SidebarInspectorFill = InspectorFill;
5333  function SidebarComplementaryAreaFills() {
5334    const {
5335      sidebar,
5336      isEditorSidebarOpened,
5337      hasBlockSelection
5338    } = Object(external_wp_data_["useSelect"])(select => {
5339      const _sidebar = select(build_module["i" /* store */]).getActiveComplementaryArea(STORE_NAME);
5340  
5341      const _isEditorSidebarOpened = [SIDEBAR_BLOCK, SIDEBAR_TEMPLATE].includes(_sidebar);
5342  
5343      return {
5344        sidebar: _sidebar,
5345        isEditorSidebarOpened: _isEditorSidebarOpened,
5346        hasBlockSelection: !!select(external_wp_blockEditor_["store"]).getBlockSelectionStart()
5347      };
5348    }, []);
5349    const {
5350      enableComplementaryArea
5351    } = Object(external_wp_data_["useDispatch"])(build_module["i" /* store */]);
5352    Object(external_wp_element_["useEffect"])(() => {
5353      if (!isEditorSidebarOpened) return;
5354  
5355      if (hasBlockSelection) {
5356        enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
5357      } else {
5358        enableComplementaryArea(STORE_NAME, SIDEBAR_TEMPLATE);
5359      }
5360    }, [hasBlockSelection, isEditorSidebarOpened]);
5361    let sidebarName = sidebar;
5362  
5363    if (!isEditorSidebarOpened) {
5364      sidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;
5365    }
5366  
5367    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(DefaultSidebar, {
5368      identifier: sidebarName,
5369      title: Object(external_wp_i18n_["__"])('Settings'),
5370      icon: cog["a" /* default */],
5371      closeLabel: Object(external_wp_i18n_["__"])('Close settings sidebar'),
5372      header: Object(external_wp_element_["createElement"])(settings_header, {
5373        sidebarName: sidebarName
5374      }),
5375      headerClassName: "edit-site-sidebar__panel-tabs"
5376    }, sidebarName === SIDEBAR_TEMPLATE && Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(TemplateCard, null)), sidebarName === SIDEBAR_BLOCK && Object(external_wp_element_["createElement"])(InspectorSlot, {
5377      bubblesVirtually: true
5378    })), Object(external_wp_element_["createElement"])(GlobalStylesSidebar, null));
5379  }
5380  
5381  // EXTERNAL MODULE: external ["wp","htmlEntities"]
5382  var external_wp_htmlEntities_ = __webpack_require__("rmEH");
5383  
5384  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/home.js
5385  
5386  
5387  /**
5388   * WordPress dependencies
5389   */
5390  
5391  const home = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
5392    xmlns: "http://www.w3.org/2000/svg",
5393    viewBox: "0 0 24 24"
5394  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
5395    d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"
5396  }));
5397  /* harmony default export */ var library_home = (home);
5398  
5399  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol-filled.js
5400  var symbol_filled = __webpack_require__("OE6V");
5401  
5402  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/main-dashboard-button/index.js
5403  
5404  
5405  /**
5406   * WordPress dependencies
5407   */
5408  
5409  const slotName = '__experimentalMainDashboardButton';
5410  const {
5411    Fill,
5412    Slot: MainDashboardButtonSlot
5413  } = Object(external_wp_components_["createSlotFill"])(slotName);
5414  const MainDashboardButton = Fill;
5415  
5416  const main_dashboard_button_Slot = _ref => {
5417    let {
5418      children
5419    } = _ref;
5420    const slot = Object(external_wp_components_["__experimentalUseSlot"])(slotName);
5421    const hasFills = Boolean(slot.fills && slot.fills.length);
5422  
5423    if (!hasFills) {
5424      return children;
5425    }
5426  
5427    return Object(external_wp_element_["createElement"])(MainDashboardButtonSlot, {
5428      bubblesVirtually: true
5429    });
5430  };
5431  
5432  MainDashboardButton.Slot = main_dashboard_button_Slot;
5433  /* harmony default export */ var main_dashboard_button = (MainDashboardButton);
5434  
5435  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-panel/index.js
5436  
5437  
5438  
5439  /**
5440   * External dependencies
5441   */
5442  
5443  /**
5444   * WordPress dependencies
5445   */
5446  
5447  
5448  
5449  
5450  
5451  
5452  
5453  
5454  /**
5455   * Internal dependencies
5456   */
5457  
5458  
5459  
5460  
5461  const SITE_EDITOR_KEY = 'site-editor';
5462  
5463  function NavLink(_ref) {
5464    let {
5465      params,
5466      replace,
5467      ...props
5468    } = _ref;
5469    const linkProps = useLink(params, replace);
5470    return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigationItem"], Object(esm_extends["a" /* default */])({}, linkProps, props));
5471  }
5472  
5473  const NavigationPanel = _ref2 => {
5474    let {
5475      activeItem = SITE_EDITOR_KEY
5476    } = _ref2;
5477    const {
5478      isNavigationOpen,
5479      siteTitle
5480    } = Object(external_wp_data_["useSelect"])(select => {
5481      const {
5482        getEntityRecord
5483      } = select(external_wp_coreData_["store"]);
5484      const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
5485      return {
5486        siteTitle: siteData.name,
5487        isNavigationOpen: select(store).isNavigationOpened()
5488      };
5489    }, []);
5490    const {
5491      setIsNavigationPanelOpened
5492    } = Object(external_wp_data_["useDispatch"])(store);
5493  
5494    const closeOnEscape = event => {
5495      if (event.keyCode === external_wp_keycodes_["ESCAPE"] && !event.defaultPrevented) {
5496        event.preventDefault();
5497        setIsNavigationPanelOpened(false);
5498      }
5499    };
5500  
5501    return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
5502      Object(external_wp_element_["createElement"])("div", {
5503        className: classnames_default()(`edit-site-navigation-panel`, {
5504          'is-open': isNavigationOpen
5505        }),
5506        onKeyDown: closeOnEscape
5507      }, Object(external_wp_element_["createElement"])("div", {
5508        className: "edit-site-navigation-panel__inner"
5509      }, Object(external_wp_element_["createElement"])("div", {
5510        className: "edit-site-navigation-panel__site-title-container"
5511      }, Object(external_wp_element_["createElement"])("div", {
5512        className: "edit-site-navigation-panel__site-title"
5513      }, Object(external_wp_htmlEntities_["decodeEntities"])(siteTitle))), Object(external_wp_element_["createElement"])("div", {
5514        className: "edit-site-navigation-panel__scroll-container"
5515      }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigation"], {
5516        activeItem: activeItem
5517      }, Object(external_wp_element_["createElement"])(main_dashboard_button.Slot, null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigationBackButton"], {
5518        backButtonLabel: Object(external_wp_i18n_["__"])('Dashboard'),
5519        className: "edit-site-navigation-panel__back-to-dashboard",
5520        href: "index.php"
5521      })), Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigationMenu"], null, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalNavigationGroup"], {
5522        title: Object(external_wp_i18n_["__"])('Editor')
5523      }, Object(external_wp_element_["createElement"])(NavLink, {
5524        icon: library_home,
5525        title: Object(external_wp_i18n_["__"])('Site'),
5526        item: SITE_EDITOR_KEY,
5527        params: {
5528          postId: undefined,
5529          postType: undefined
5530        }
5531      }), Object(external_wp_element_["createElement"])(NavLink, {
5532        icon: layout["a" /* default */],
5533        title: Object(external_wp_i18n_["__"])('Templates'),
5534        item: "wp_template",
5535        params: {
5536          postId: undefined,
5537          postType: 'wp_template'
5538        }
5539      }), Object(external_wp_element_["createElement"])(NavLink, {
5540        icon: symbol_filled["a" /* default */],
5541        title: Object(external_wp_i18n_["__"])('Template Parts'),
5542        item: "wp_template_part",
5543        params: {
5544          postId: undefined,
5545          postType: 'wp_template_part'
5546        }
5547      })))))))
5548    );
5549  };
5550  
5551  /* harmony default export */ var navigation_panel = (NavigationPanel);
5552  
5553  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
5554  var wordpress = __webpack_require__("wduq");
5555  
5556  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/navigation-toggle/index.js
5557  
5558  
5559  /**
5560   * WordPress dependencies
5561   */
5562  
5563  
5564  
5565  
5566  
5567  
5568  
5569  /**
5570   * Internal dependencies
5571   */
5572  
5573  
5574  
5575  function NavigationToggle(_ref) {
5576    let {
5577      icon
5578    } = _ref;
5579    const {
5580      isNavigationOpen,
5581      isRequestingSiteIcon,
5582      siteIconUrl
5583    } = Object(external_wp_data_["useSelect"])(select => {
5584      const {
5585        getEntityRecord,
5586        isResolving
5587      } = select(external_wp_coreData_["store"]);
5588      const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
5589      return {
5590        isNavigationOpen: select(store).isNavigationOpened(),
5591        isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
5592        siteIconUrl: siteData.site_icon_url
5593      };
5594    }, []);
5595    const {
5596      setIsNavigationPanelOpened
5597    } = Object(external_wp_data_["useDispatch"])(store);
5598    const disableMotion = Object(external_wp_compose_["useReducedMotion"])();
5599    const navigationToggleRef = Object(external_wp_element_["useRef"])();
5600    Object(external_wp_element_["useEffect"])(() => {
5601      // TODO: Remove this effect when alternative solution is merged.
5602      // See: https://github.com/WordPress/gutenberg/pull/37314
5603      if (!isNavigationOpen) {
5604        navigationToggleRef.current.focus();
5605      }
5606    }, [isNavigationOpen]);
5607  
5608    const toggleNavigationPanel = () => setIsNavigationPanelOpened(!isNavigationOpen);
5609  
5610    let buttonIcon = Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
5611      size: "36px",
5612      icon: wordpress["a" /* default */]
5613    });
5614    const effect = {
5615      expand: {
5616        scale: 1.7,
5617        borderRadius: 0,
5618        transition: {
5619          type: 'tween',
5620          duration: '0.2'
5621        }
5622      }
5623    };
5624  
5625    if (siteIconUrl) {
5626      buttonIcon = Object(external_wp_element_["createElement"])(external_wp_components_["__unstableMotion"].img, {
5627        variants: !disableMotion && effect,
5628        alt: Object(external_wp_i18n_["__"])('Site Icon'),
5629        className: "edit-site-navigation-toggle__site-icon",
5630        src: siteIconUrl
5631      });
5632    } else if (isRequestingSiteIcon) {
5633      buttonIcon = null;
5634    } else if (icon) {
5635      buttonIcon = Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
5636        size: "36px",
5637        icon: icon
5638      });
5639    }
5640  
5641    return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableMotion"].div, {
5642      className: 'edit-site-navigation-toggle' + (isNavigationOpen ? ' is-open' : ''),
5643      whileHover: "expand"
5644    }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5645      className: "edit-site-navigation-toggle__button has-icon",
5646      label: Object(external_wp_i18n_["__"])('Toggle navigation'),
5647      ref: navigationToggleRef // isPressed will add unwanted styles.
5648      ,
5649      "aria-pressed": isNavigationOpen,
5650      onClick: toggleNavigationPanel,
5651      showTooltip: true
5652    }, buttonIcon));
5653  }
5654  
5655  /* harmony default export */ var navigation_toggle = (NavigationToggle);
5656  
5657  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigation-sidebar/index.js
5658  
5659  
5660  /**
5661   * WordPress dependencies
5662   */
5663  
5664  
5665  
5666  
5667  /**
5668   * Internal dependencies
5669   */
5670  
5671  
5672  
5673  
5674  const {
5675    Fill: NavigationPanelPreviewFill,
5676    Slot: NavigationPanelPreviewSlot
5677  } = Object(external_wp_components_["createSlotFill"])('EditSiteNavigationPanelPreview');
5678  const {
5679    Fill: NavigationSidebarFill,
5680    Slot: NavigationSidebarSlot
5681  } = Object(external_wp_components_["createSlotFill"])('EditSiteNavigationSidebar');
5682  
5683  function NavigationSidebar(_ref) {
5684    let {
5685      isDefaultOpen = false,
5686      activeTemplateType
5687    } = _ref;
5688    const isDesktopViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
5689    const {
5690      setIsNavigationPanelOpened
5691    } = Object(external_wp_data_["useDispatch"])(store);
5692    Object(external_wp_element_["useEffect"])(function autoOpenNavigationPanelOnViewportChange() {
5693      setIsNavigationPanelOpened(isDefaultOpen && isDesktopViewport);
5694    }, [isDefaultOpen, isDesktopViewport, setIsNavigationPanelOpened]);
5695    return Object(external_wp_element_["createElement"])(NavigationSidebarFill, null, Object(external_wp_element_["createElement"])(navigation_toggle, null), Object(external_wp_element_["createElement"])(navigation_panel, {
5696      activeItem: activeTemplateType
5697    }), Object(external_wp_element_["createElement"])(NavigationPanelPreviewSlot, null));
5698  }
5699  
5700  NavigationSidebar.Slot = NavigationSidebarSlot;
5701  /* harmony default export */ var navigation_sidebar = (NavigationSidebar);
5702  
5703  // EXTERNAL MODULE: external ["wp","reusableBlocks"]
5704  var external_wp_reusableBlocks_ = __webpack_require__("diJD");
5705  
5706  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/convert-to-regular.js
5707  
5708  
5709  /**
5710   * WordPress dependencies
5711   */
5712  
5713  
5714  
5715  
5716  function ConvertToRegularBlocks(_ref) {
5717    let {
5718      clientId
5719    } = _ref;
5720    const {
5721      getBlocks
5722    } = Object(external_wp_data_["useSelect"])(external_wp_blockEditor_["store"]);
5723    const {
5724      replaceBlocks
5725    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
5726    return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockSettingsMenuControls"], null, _ref2 => {
5727      let {
5728        onClose
5729      } = _ref2;
5730      return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
5731        onClick: () => {
5732          replaceBlocks(clientId, getBlocks(clientId));
5733          onClose();
5734        }
5735      }, Object(external_wp_i18n_["__"])('Detach blocks from template part'));
5736    });
5737  }
5738  
5739  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/create-template-part-modal/index.js
5740  
5741  
5742  /**
5743   * WordPress dependencies
5744   */
5745  
5746  
5747  
5748  
5749  
5750  
5751  
5752  /**
5753   * Internal dependencies
5754   */
5755  
5756  
5757  function CreateTemplatePartModal(_ref) {
5758    let {
5759      closeModal,
5760      onCreate
5761    } = _ref;
5762    const [title, setTitle] = Object(external_wp_element_["useState"])('');
5763    const [area, setArea] = Object(external_wp_element_["useState"])(TEMPLATE_PART_AREA_GENERAL);
5764    const [isSubmitting, setIsSubmitting] = Object(external_wp_element_["useState"])(false);
5765    const instanceId = Object(external_wp_compose_["useInstanceId"])(CreateTemplatePartModal);
5766    const templatePartAreas = Object(external_wp_data_["useSelect"])(select => select(external_wp_editor_["store"]).__experimentalGetDefaultTemplatePartAreas(), []);
5767    return Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], {
5768      title: Object(external_wp_i18n_["__"])('Create a template part'),
5769      closeLabel: Object(external_wp_i18n_["__"])('Close'),
5770      onRequestClose: closeModal,
5771      overlayClassName: "edit-site-create-template-part-modal"
5772    }, Object(external_wp_element_["createElement"])("form", {
5773      onSubmit: async event => {
5774        event.preventDefault();
5775  
5776        if (!title) {
5777          return;
5778        }
5779  
5780        setIsSubmitting(true);
5781        await onCreate({
5782          title,
5783          area
5784        });
5785      }
5786    }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
5787      label: Object(external_wp_i18n_["__"])('Name'),
5788      value: title,
5789      onChange: setTitle,
5790      required: true
5791    }), Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
5792      label: Object(external_wp_i18n_["__"])('Area'),
5793      id: `edit-site-create-template-part-modal__area-selection-$instanceId}`,
5794      className: "edit-site-create-template-part-modal__area-base-control"
5795    }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalRadioGroup"], {
5796      label: Object(external_wp_i18n_["__"])('Area'),
5797      className: "edit-site-create-template-part-modal__area-radio-group",
5798      id: `edit-site-create-template-part-modal__area-selection-$instanceId}`,
5799      onChange: setArea,
5800      checked: area
5801    }, templatePartAreas.map(_ref2 => {
5802      let {
5803        icon,
5804        label,
5805        area: value,
5806        description
5807      } = _ref2;
5808      return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalRadio"], {
5809        key: label,
5810        value: value,
5811        className: "edit-site-create-template-part-modal__area-radio"
5812      }, Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
5813        align: "start",
5814        justify: "start"
5815      }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
5816        icon: icon
5817      })), Object(external_wp_element_["createElement"])(external_wp_components_["FlexBlock"], {
5818        className: "edit-site-create-template-part-modal__option-label"
5819      }, label, Object(external_wp_element_["createElement"])("div", null, description)), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], {
5820        className: "edit-site-create-template-part-modal__checkbox"
5821      }, area === value && Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
5822        icon: check["a" /* default */]
5823      }))));
5824    }))), Object(external_wp_element_["createElement"])(external_wp_components_["Flex"], {
5825      className: "edit-site-create-template-part-modal__modal-actions",
5826      justify: "flex-end"
5827    }, Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5828      variant: "secondary",
5829      onClick: () => {
5830        closeModal();
5831      }
5832    }, Object(external_wp_i18n_["__"])('Cancel'))), Object(external_wp_element_["createElement"])(external_wp_components_["FlexItem"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5833      variant: "primary",
5834      type: "submit",
5835      disabled: !title,
5836      isBusy: isSubmitting
5837    }, Object(external_wp_i18n_["__"])('Create'))))));
5838  }
5839  
5840  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/convert-to-template-part.js
5841  
5842  
5843  /**
5844   * External dependencies
5845   */
5846  
5847  /**
5848   * WordPress dependencies
5849   */
5850  
5851  
5852  
5853  
5854  
5855  
5856  
5857  
5858  
5859  /**
5860   * Internal dependencies
5861   */
5862  
5863  
5864  function ConvertToTemplatePart(_ref) {
5865    let {
5866      clientIds,
5867      blocks
5868    } = _ref;
5869    const [isModalOpen, setIsModalOpen] = Object(external_wp_element_["useState"])(false);
5870    const {
5871      replaceBlocks
5872    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
5873    const {
5874      saveEntityRecord
5875    } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
5876    const {
5877      createSuccessNotice
5878    } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
5879  
5880    const onConvert = async _ref2 => {
5881      let {
5882        title,
5883        area
5884      } = _ref2;
5885      const templatePart = await saveEntityRecord('postType', 'wp_template_part', {
5886        slug: Object(external_lodash_["kebabCase"])(title),
5887        title,
5888        content: Object(external_wp_blocks_["serialize"])(blocks),
5889        area
5890      });
5891      replaceBlocks(clientIds, Object(external_wp_blocks_["createBlock"])('core/template-part', {
5892        slug: templatePart.slug,
5893        theme: templatePart.theme
5894      }));
5895      createSuccessNotice(Object(external_wp_i18n_["__"])('Template part created.'), {
5896        type: 'snackbar'
5897      }); // The modal and this component will be unmounted because of `replaceBlocks` above,
5898      // so no need to call `closeModal` or `onClose`.
5899    };
5900  
5901    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockSettingsMenuControls"], null, () => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
5902      onClick: () => {
5903        setIsModalOpen(true);
5904      }
5905    }, Object(external_wp_i18n_["__"])('Make template part'))), isModalOpen && Object(external_wp_element_["createElement"])(CreateTemplatePartModal, {
5906      closeModal: () => {
5907        setIsModalOpen(false);
5908      },
5909      onCreate: onConvert
5910    }));
5911  }
5912  
5913  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/template-part-converter/index.js
5914  
5915  
5916  /**
5917   * WordPress dependencies
5918   */
5919  
5920  
5921  /**
5922   * Internal dependencies
5923   */
5924  
5925  
5926  
5927  function TemplatePartConverter() {
5928    var _blocks$;
5929  
5930    const {
5931      clientIds,
5932      blocks
5933    } = Object(external_wp_data_["useSelect"])(select => {
5934      const {
5935        getSelectedBlockClientIds,
5936        getBlocksByClientId
5937      } = select(external_wp_blockEditor_["store"]);
5938      const selectedBlockClientIds = getSelectedBlockClientIds();
5939      return {
5940        clientIds: selectedBlockClientIds,
5941        blocks: getBlocksByClientId(selectedBlockClientIds)
5942      };
5943    }, []); // Allow converting a single template part to standard blocks.
5944  
5945    if (blocks.length === 1 && ((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.name) === 'core/template-part') {
5946      return Object(external_wp_element_["createElement"])(ConvertToRegularBlocks, {
5947        clientId: clientIds[0]
5948      });
5949    }
5950  
5951    return Object(external_wp_element_["createElement"])(ConvertToTemplatePart, {
5952      clientIds: clientIds,
5953      blocks: blocks
5954    });
5955  }
5956  
5957  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
5958  var edit = __webpack_require__("B9Az");
5959  
5960  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/navigate-to-link/index.js
5961  
5962  
5963  /**
5964   * WordPress dependencies
5965   */
5966  
5967  
5968  
5969  
5970  
5971  
5972  
5973  function NavigateToLink(_ref) {
5974    let {
5975      type,
5976      id,
5977      activePage,
5978      onActivePageChange
5979    } = _ref;
5980    const post = Object(external_wp_data_["useSelect"])(select => type && id && type !== 'URL' && select(external_wp_coreData_["store"]).getEntityRecord('postType', type, id), [type, id]);
5981    const onClick = Object(external_wp_element_["useMemo"])(() => {
5982      if (!(post !== null && post !== void 0 && post.link)) return null;
5983      const path = Object(external_wp_url_["getPathAndQueryString"])(post.link);
5984      if (path === (activePage === null || activePage === void 0 ? void 0 : activePage.path)) return null;
5985      return () => onActivePageChange({
5986        type,
5987        slug: post.slug,
5988        path,
5989        context: {
5990          postType: post.type,
5991          postId: post.id
5992        }
5993      });
5994    }, [post, activePage === null || activePage === void 0 ? void 0 : activePage.path, onActivePageChange]);
5995    return onClick && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
5996      icon: edit["a" /* default */],
5997      label: Object(external_wp_i18n_["__"])('Edit Page Template'),
5998      onClick: onClick
5999    });
6000  }
6001  
6002  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/block-inspector-button.js
6003  
6004  
6005  /**
6006   * WordPress dependencies
6007   */
6008  
6009  
6010  
6011  
6012  
6013  
6014  /**
6015   * Internal dependencies
6016   */
6017  
6018  
6019  
6020  
6021  function BlockInspectorButton(_ref) {
6022    let {
6023      onClick = () => {}
6024    } = _ref;
6025    const {
6026      shortcut,
6027      isBlockInspectorOpen
6028    } = Object(external_wp_data_["useSelect"])(select => ({
6029      shortcut: select(external_wp_keyboardShortcuts_["store"]).getShortcutRepresentation('core/edit-site/toggle-block-settings-sidebar'),
6030      isBlockInspectorOpen: select(build_module["i" /* store */]).getActiveComplementaryArea(store.name) === SIDEBAR_BLOCK
6031    }), []);
6032    const {
6033      enableComplementaryArea,
6034      disableComplementaryArea
6035    } = Object(external_wp_data_["useDispatch"])(build_module["i" /* store */]);
6036    const label = isBlockInspectorOpen ? Object(external_wp_i18n_["__"])('Hide more settings') : Object(external_wp_i18n_["__"])('Show more settings');
6037    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
6038      onClick: () => {
6039        if (isBlockInspectorOpen) {
6040          disableComplementaryArea(STORE_NAME);
6041          Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Block settings closed'));
6042        } else {
6043          enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
6044          Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Additional settings are now available in the Editor block settings sidebar'));
6045        } // Close dropdown menu.
6046  
6047  
6048        onClick();
6049      },
6050      shortcut: shortcut
6051    }, label);
6052  }
6053  
6054  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/edit-template-part-menu-button/index.js
6055  
6056  
6057  
6058  /**
6059   * WordPress dependencies
6060   */
6061  
6062  
6063  
6064  
6065  
6066  
6067  /**
6068   * Internal dependencies
6069   */
6070  
6071  
6072  
6073  function EditTemplatePartMenuButton() {
6074    return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockSettingsMenuControls"], null, _ref => {
6075      let {
6076        selectedClientIds,
6077        onClose
6078      } = _ref;
6079      return Object(external_wp_element_["createElement"])(EditTemplatePartMenuItem, {
6080        selectedClientId: selectedClientIds[0],
6081        onClose: onClose
6082      });
6083    });
6084  }
6085  
6086  function EditTemplatePartMenuItem(_ref2) {
6087    let {
6088      selectedClientId,
6089      onClose
6090    } = _ref2;
6091    const {
6092      params
6093    } = useLocation();
6094    const selectedTemplatePart = Object(external_wp_data_["useSelect"])(select => {
6095      const block = select(external_wp_blockEditor_["store"]).getBlock(selectedClientId);
6096  
6097      if (block && Object(external_wp_blocks_["isTemplatePart"])(block)) {
6098        const {
6099          theme,
6100          slug
6101        } = block.attributes;
6102        return select(external_wp_coreData_["store"]).getEntityRecord('postType', 'wp_template_part', // Ideally this should be an official public API.
6103        `$theme}//${slug}`);
6104      }
6105    }, [selectedClientId]);
6106    const linkProps = useLink({
6107      postId: selectedTemplatePart === null || selectedTemplatePart === void 0 ? void 0 : selectedTemplatePart.id,
6108      postType: selectedTemplatePart === null || selectedTemplatePart === void 0 ? void 0 : selectedTemplatePart.type
6109    }, {
6110      fromTemplateId: params.postId
6111    });
6112  
6113    if (!selectedTemplatePart) {
6114      return null;
6115    }
6116  
6117    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], Object(esm_extends["a" /* default */])({}, linkProps, {
6118      onClick: event => {
6119        linkProps.onClick(event);
6120        onClose();
6121      }
6122    }),
6123    /* translators: %s: template part title */
6124    Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Edit %s'), selectedTemplatePart.slug));
6125  }
6126  
6127  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/arrow-left.js
6128  var arrow_left = __webpack_require__("cjQ8");
6129  
6130  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/back-button.js
6131  
6132  
6133  /**
6134   * WordPress dependencies
6135   */
6136  
6137  
6138  
6139  /**
6140   * Internal dependencies
6141   */
6142  
6143  
6144  
6145  function BackButton() {
6146    var _location$state;
6147  
6148    const location = useLocation();
6149    const history = useHistory();
6150    const isTemplatePart = location.params.postType === 'wp_template_part';
6151    const previousTemplateId = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.fromTemplateId;
6152  
6153    if (!isTemplatePart || !previousTemplateId) {
6154      return null;
6155    }
6156  
6157    return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
6158      className: "edit-site-visual-editor__back-button",
6159      icon: arrow_left["a" /* default */],
6160      onClick: () => {
6161        history.back();
6162      }
6163    }, Object(external_wp_i18n_["__"])('Back'));
6164  }
6165  
6166  /* harmony default export */ var back_button = (BackButton);
6167  
6168  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/resize-handle.js
6169  
6170  
6171  /**
6172   * WordPress dependencies
6173   */
6174  
6175  
6176  
6177  const DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.
6178  
6179  function ResizeHandle(_ref) {
6180    let {
6181      direction,
6182      resizeWidthBy
6183    } = _ref;
6184  
6185    function handleKeyDown(event) {
6186      const {
6187        keyCode
6188      } = event;
6189  
6190      if (direction === 'left' && keyCode === external_wp_keycodes_["LEFT"] || direction === 'right' && keyCode === external_wp_keycodes_["RIGHT"]) {
6191        resizeWidthBy(DELTA_DISTANCE);
6192      } else if (direction === 'left' && keyCode === external_wp_keycodes_["RIGHT"] || direction === 'right' && keyCode === external_wp_keycodes_["LEFT"]) {
6193        resizeWidthBy(-DELTA_DISTANCE);
6194      }
6195    }
6196  
6197    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("button", {
6198      className: `resizable-editor__drag-handle is-$direction}`,
6199      "aria-label": Object(external_wp_i18n_["__"])('Drag to resize'),
6200      "aria-describedby": `resizable-editor__resize-help-$direction}`,
6201      onKeyDown: handleKeyDown
6202    }), Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], {
6203      id: `resizable-editor__resize-help-$direction}`
6204    }, Object(external_wp_i18n_["__"])('Use left and right arrow keys to resize the canvas.')));
6205  }
6206  
6207  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/resizable-editor.js
6208  
6209  
6210  
6211  /**
6212   * WordPress dependencies
6213   */
6214  
6215  
6216  
6217  
6218  
6219  /**
6220   * Internal dependencies
6221   */
6222  
6223  
6224  
6225  const DEFAULT_STYLES = {
6226    width: '100%',
6227    height: '100%'
6228  }; // Removes the inline styles in the drag handles.
6229  
6230  const HANDLE_STYLES_OVERRIDE = {
6231    position: undefined,
6232    userSelect: undefined,
6233    cursor: undefined,
6234    width: undefined,
6235    height: undefined,
6236    top: undefined,
6237    right: undefined,
6238    bottom: undefined,
6239    left: undefined
6240  };
6241  
6242  function ResizableEditor(_ref) {
6243    let {
6244      enableResizing,
6245      settings,
6246      ...props
6247    } = _ref;
6248    const deviceType = Object(external_wp_data_["useSelect"])(select => select(store).__experimentalGetPreviewDeviceType(), []);
6249    const deviceStyles = Object(external_wp_blockEditor_["__experimentalUseResizeCanvas"])(deviceType);
6250    const [width, setWidth] = Object(external_wp_element_["useState"])(DEFAULT_STYLES.width);
6251    const [height, setHeight] = Object(external_wp_element_["useState"])(DEFAULT_STYLES.height);
6252    const iframeRef = Object(external_wp_element_["useRef"])();
6253    const mouseMoveTypingResetRef = Object(external_wp_blockEditor_["__unstableUseMouseMoveTypingReset"])();
6254    const ref = Object(external_wp_compose_["useMergeRefs"])([iframeRef, mouseMoveTypingResetRef]);
6255    Object(external_wp_element_["useEffect"])(function autoResizeIframeHeight() {
6256      const iframe = iframeRef.current;
6257  
6258      if (!iframe || !enableResizing) {
6259        return;
6260      }
6261  
6262      let animationFrame = null;
6263  
6264      function resizeHeight() {
6265        if (!animationFrame) {
6266          // Throttle the updates on animation frame.
6267          animationFrame = iframe.contentWindow.requestAnimationFrame(() => {
6268            setHeight(iframe.contentDocument.documentElement.scrollHeight);
6269            animationFrame = null;
6270          });
6271        }
6272      }
6273  
6274      let resizeObserver;
6275  
6276      function registerObserver() {
6277        var _resizeObserver;
6278  
6279        (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 ? void 0 : _resizeObserver.disconnect();
6280        resizeObserver = new iframe.contentWindow.ResizeObserver(resizeHeight); // Observing the <html> rather than the <body> because the latter
6281        // gets destroyed and remounted after initialization in <Iframe>.
6282  
6283        resizeObserver.observe(iframe.contentDocument.documentElement);
6284        resizeHeight();
6285      } // This is only required in Firefox for some unknown reasons.
6286  
6287  
6288      iframe.addEventListener('load', registerObserver); // This is required in Chrome and Safari.
6289  
6290      registerObserver();
6291      return () => {
6292        var _iframe$contentWindow, _resizeObserver2;
6293  
6294        (_iframe$contentWindow = iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : _iframe$contentWindow.cancelAnimationFrame(animationFrame);
6295        (_resizeObserver2 = resizeObserver) === null || _resizeObserver2 === void 0 ? void 0 : _resizeObserver2.disconnect();
6296        iframe.removeEventListener('load', registerObserver);
6297      };
6298    }, [enableResizing]);
6299    const resizeWidthBy = Object(external_wp_element_["useCallback"])(deltaPixels => {
6300      if (iframeRef.current) {
6301        setWidth(iframeRef.current.offsetWidth + deltaPixels);
6302      }
6303    }, []);
6304    return Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
6305      size: {
6306        width,
6307        height
6308      },
6309      onResizeStop: (event, direction, element) => {
6310        setWidth(element.style.width);
6311      },
6312      minWidth: 300,
6313      maxWidth: "100%",
6314      maxHeight: "100%",
6315      enable: {
6316        right: enableResizing,
6317        left: enableResizing
6318      },
6319      showHandle: enableResizing // The editor is centered horizontally, resizing it only
6320      // moves half the distance. Hence double the ratio to correctly
6321      // align the cursor to the resizer handle.
6322      ,
6323      resizeRatio: 2,
6324      handleComponent: {
6325        left: Object(external_wp_element_["createElement"])(ResizeHandle, {
6326          direction: "left",
6327          resizeWidthBy: resizeWidthBy
6328        }),
6329        right: Object(external_wp_element_["createElement"])(ResizeHandle, {
6330          direction: "right",
6331          resizeWidthBy: resizeWidthBy
6332        })
6333      },
6334      handleClasses: undefined,
6335      handleStyles: {
6336        left: HANDLE_STYLES_OVERRIDE,
6337        right: HANDLE_STYLES_OVERRIDE
6338      }
6339    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableIframe"], Object(esm_extends["a" /* default */])({
6340      style: enableResizing ? undefined : deviceStyles,
6341      head: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableEditorStyles"], {
6342        styles: settings.styles
6343      }), Object(external_wp_element_["createElement"])("style", null, // Forming a "block formatting context" to prevent margin collapsing.
6344      // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
6345      `.is-root-container { display: flow-root; }`), enableResizing && Object(external_wp_element_["createElement"])("style", null, // Force the <html> and <body>'s heights to fit the content.
6346      `html, body { height: -moz-fit-content !important; height: fit-content !important; min-height: 0 !important; }`, // Some themes will have `min-height: 100vh` for the root container,
6347      // which isn't a requirement in auto resize mode.
6348      `.is-root-container { min-height: 0 !important; }`)),
6349      ref: ref,
6350      name: "editor-canvas",
6351      className: "edit-site-visual-editor__editor-canvas"
6352    }, props)));
6353  }
6354  
6355  /* harmony default export */ var resizable_editor = (ResizableEditor);
6356  
6357  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/index.js
6358  
6359  
6360  
6361  /**
6362   * External dependencies
6363   */
6364  
6365  /**
6366   * WordPress dependencies
6367   */
6368  
6369  
6370  
6371  
6372  
6373  
6374  
6375  /**
6376   * Internal dependencies
6377   */
6378  
6379  
6380  
6381  
6382  
6383  
6384  
6385  
6386  
6387  const LAYOUT = {
6388    type: 'default',
6389    // At the root level of the site editor, no alignments should be allowed.
6390    alignments: []
6391  };
6392  function BlockEditor(_ref) {
6393    let {
6394      setIsInserterOpen
6395    } = _ref;
6396    const {
6397      settings,
6398      templateType,
6399      templateId,
6400      page
6401    } = Object(external_wp_data_["useSelect"])(select => {
6402      const {
6403        getSettings,
6404        getEditedPostType,
6405        getEditedPostId,
6406        getPage
6407      } = select(store);
6408      return {
6409        settings: getSettings(setIsInserterOpen),
6410        templateType: getEditedPostType(),
6411        templateId: getEditedPostId(),
6412        page: getPage()
6413      };
6414    }, [setIsInserterOpen]);
6415    const [blocks, onInput, onChange] = Object(external_wp_coreData_["useEntityBlockEditor"])('postType', templateType);
6416    const {
6417      setPage
6418    } = Object(external_wp_data_["useDispatch"])(store);
6419    const contentRef = Object(external_wp_element_["useRef"])();
6420    const mergedRefs = Object(external_wp_compose_["useMergeRefs"])([contentRef, Object(external_wp_blockEditor_["__unstableUseTypingObserver"])()]);
6421    const isMobileViewport = Object(external_wp_compose_["useViewportMatch"])('small', '<');
6422    const {
6423      clearSelectedBlock
6424    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
6425    const isTemplatePart = templateType === 'wp_template_part';
6426    return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockEditorProvider"], {
6427      settings: settings,
6428      value: blocks,
6429      onInput: onInput,
6430      onChange: onChange,
6431      useSubRegistry: false
6432    }, Object(external_wp_element_["createElement"])(EditTemplatePartMenuButton, null), Object(external_wp_element_["createElement"])(TemplatePartConverter, null), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"].ViewerFill, null, Object(external_wp_element_["useCallback"])(fillProps => Object(external_wp_element_["createElement"])(NavigateToLink, Object(esm_extends["a" /* default */])({}, fillProps, {
6433      activePage: page,
6434      onActivePageChange: setPage
6435    })), [page])), Object(external_wp_element_["createElement"])(SidebarInspectorFill, null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockInspector"], null)), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockTools"], {
6436      className: classnames_default()('edit-site-visual-editor', {
6437        'is-focus-mode': isTemplatePart
6438      }),
6439      __unstableContentRef: contentRef,
6440      onClick: event => {
6441        // Clear selected block when clicking on the gray background.
6442        if (event.target === event.currentTarget) {
6443          clearSelectedBlock();
6444        }
6445      }
6446    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockEditorKeyboardShortcuts"].Register, null), Object(external_wp_element_["createElement"])(back_button, null), Object(external_wp_element_["createElement"])(resizable_editor // Reinitialize the editor and reset the states when the template changes.
6447    , {
6448      key: templateId,
6449      enableResizing: isTemplatePart && // Disable resizing in mobile viewport.
6450      !isMobileViewport,
6451      settings: settings,
6452      contentRef: mergedRefs
6453    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockList"], {
6454      className: "edit-site-block-editor__block-list wp-site-blocks",
6455      __experimentalLayout: LAYOUT,
6456      renderAppender: isTemplatePart ? false : undefined
6457    })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableBlockSettingsMenuFirstItem"], null, _ref2 => {
6458      let {
6459        onClose
6460      } = _ref2;
6461      return Object(external_wp_element_["createElement"])(BlockInspectorButton, {
6462        onClick: onClose
6463      });
6464    })), Object(external_wp_element_["createElement"])(external_wp_reusableBlocks_["ReusableBlocksMenuItems"], null));
6465  }
6466  
6467  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/keyboard-shortcuts/index.js
6468  /**
6469   * WordPress dependencies
6470   */
6471  
6472  
6473  
6474  
6475  
6476  
6477  /**
6478   * Internal dependencies
6479   */
6480  
6481  
6482  
6483  
6484  
6485  function KeyboardShortcuts(_ref) {
6486    let {
6487      openEntitiesSavedStates
6488    } = _ref;
6489    const {
6490      __experimentalGetDirtyEntityRecords,
6491      isSavingEntityRecord
6492    } = Object(external_wp_data_["useSelect"])(external_wp_coreData_["store"]);
6493    const isListViewOpen = Object(external_wp_data_["useSelect"])(select => select(store).isListViewOpened(), []);
6494    const isBlockInspectorOpen = Object(external_wp_data_["useSelect"])(select => select(build_module["i" /* store */]).getActiveComplementaryArea(store.name) === SIDEBAR_BLOCK, []);
6495    const {
6496      redo,
6497      undo
6498    } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
6499    const {
6500      setIsListViewOpened
6501    } = Object(external_wp_data_["useDispatch"])(store);
6502    const {
6503      enableComplementaryArea,
6504      disableComplementaryArea
6505    } = Object(external_wp_data_["useDispatch"])(build_module["i" /* store */]);
6506    Object(external_wp_keyboardShortcuts_["useShortcut"])('core/edit-site/save', event => {
6507      event.preventDefault();
6508  
6509      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
6510  
6511      const isDirty = !!dirtyEntityRecords.length;
6512      const isSaving = dirtyEntityRecords.some(record => isSavingEntityRecord(record.kind, record.name, record.key));
6513  
6514      if (!isSaving && isDirty) {
6515        openEntitiesSavedStates();
6516      }
6517    });
6518    Object(external_wp_keyboardShortcuts_["useShortcut"])('core/edit-site/undo', event => {
6519      undo();
6520      event.preventDefault();
6521    });
6522    Object(external_wp_keyboardShortcuts_["useShortcut"])('core/edit-site/redo', event => {
6523      redo();
6524      event.preventDefault();
6525    });
6526    Object(external_wp_keyboardShortcuts_["useShortcut"])('core/edit-site/toggle-list-view', () => {
6527      setIsListViewOpened(!isListViewOpen);
6528    });
6529    Object(external_wp_keyboardShortcuts_["useShortcut"])('core/edit-site/toggle-block-settings-sidebar', event => {
6530      // This shortcut has no known clashes, but use preventDefault to prevent any
6531      // obscure shortcuts from triggering.
6532      event.preventDefault();
6533  
6534      if (isBlockInspectorOpen) {
6535        disableComplementaryArea(STORE_NAME);
6536      } else {
6537        enableComplementaryArea(STORE_NAME, SIDEBAR_BLOCK);
6538      }
6539    });
6540    return null;
6541  }
6542  
6543  function KeyboardShortcutsRegister() {
6544    // Registering the shortcuts
6545    const {
6546      registerShortcut
6547    } = Object(external_wp_data_["useDispatch"])(external_wp_keyboardShortcuts_["store"]);
6548    Object(external_wp_element_["useEffect"])(() => {
6549      registerShortcut({
6550        name: 'core/edit-site/save',
6551        category: 'global',
6552        description: Object(external_wp_i18n_["__"])('Save your changes.'),
6553        keyCombination: {
6554          modifier: 'primary',
6555          character: 's'
6556        }
6557      });
6558      registerShortcut({
6559        name: 'core/edit-site/undo',
6560        category: 'global',
6561        description: Object(external_wp_i18n_["__"])('Undo your last changes.'),
6562        keyCombination: {
6563          modifier: 'primary',
6564          character: 'z'
6565        }
6566      });
6567      registerShortcut({
6568        name: 'core/edit-site/redo',
6569        category: 'global',
6570        description: Object(external_wp_i18n_["__"])('Redo your last undo.'),
6571        keyCombination: {
6572          modifier: 'primaryShift',
6573          character: 'z'
6574        }
6575      });
6576      registerShortcut({
6577        name: 'core/edit-site/toggle-list-view',
6578        category: 'global',
6579        description: Object(external_wp_i18n_["__"])('Open the block list view.'),
6580        keyCombination: {
6581          modifier: 'access',
6582          character: 'o'
6583        }
6584      });
6585      registerShortcut({
6586        name: 'core/edit-site/toggle-block-settings-sidebar',
6587        category: 'global',
6588        description: Object(external_wp_i18n_["__"])('Show or hide the block settings sidebar.'),
6589        keyCombination: {
6590          modifier: 'primaryShift',
6591          character: ','
6592        }
6593      });
6594      registerShortcut({
6595        name: 'core/edit-site/next-region',
6596        category: 'global',
6597        description: Object(external_wp_i18n_["__"])('Navigate to the next part of the editor.'),
6598        keyCombination: {
6599          modifier: 'ctrl',
6600          character: '`'
6601        },
6602        aliases: [{
6603          modifier: 'access',
6604          character: 'n'
6605        }]
6606      });
6607      registerShortcut({
6608        name: 'core/edit-site/previous-region',
6609        category: 'global',
6610        description: Object(external_wp_i18n_["__"])('Navigate to the previous part of the editor.'),
6611        keyCombination: {
6612          modifier: 'ctrlShift',
6613          character: '`'
6614        },
6615        aliases: [{
6616          modifier: 'access',
6617          character: 'p'
6618        }]
6619      });
6620    }, [registerShortcut]);
6621    return null;
6622  }
6623  
6624  KeyboardShortcuts.Register = KeyboardShortcutsRegister;
6625  /* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts);
6626  
6627  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/url-query-controller/index.js
6628  /**
6629   * WordPress dependencies
6630   */
6631  
6632  
6633  /**
6634   * Internal dependencies
6635   */
6636  
6637  
6638  
6639  function URLQueryController() {
6640    const {
6641      setTemplate,
6642      setTemplatePart,
6643      showHomepage,
6644      setPage
6645    } = Object(external_wp_data_["useDispatch"])(store);
6646    const history = useHistory();
6647    const {
6648      params: {
6649        postId,
6650        postType
6651      }
6652    } = useLocation();
6653    const {
6654      getPage,
6655      getEditedPostId,
6656      getEditedPostType
6657    } = Object(external_wp_data_["useSelect"])(store); // Set correct entity on page navigation.
6658  
6659    Object(external_wp_element_["useEffect"])(() => {
6660      let isMounted = true;
6661  
6662      if ('page' === postType || 'post' === postType) {
6663        setPage({
6664          context: {
6665            postType,
6666            postId
6667          }
6668        }); // Resolves correct template based on ID.
6669      } else if ('wp_template' === postType) {
6670        setTemplate(postId);
6671      } else if ('wp_template_part' === postType) {
6672        setTemplatePart(postId);
6673      } else {
6674        showHomepage().then(() => {
6675          var _page$context, _page$context2;
6676  
6677          if (!isMounted) {
6678            return;
6679          }
6680  
6681          const page = getPage();
6682          const editedPostId = getEditedPostId();
6683          const editedPostType = getEditedPostType();
6684  
6685          if (page !== null && page !== void 0 && (_page$context = page.context) !== null && _page$context !== void 0 && _page$context.postId && page !== null && page !== void 0 && (_page$context2 = page.context) !== null && _page$context2 !== void 0 && _page$context2.postType) {
6686            history.replace({
6687              postId: page.context.postId,
6688              postType: page.context.postType
6689            });
6690          } else if (editedPostId && editedPostType) {
6691            history.replace({
6692              postId: editedPostId,
6693              postType: editedPostType
6694            });
6695          }
6696        });
6697      }
6698  
6699      return () => {
6700        isMounted = false;
6701      };
6702    }, [postId, postType]);
6703    return null;
6704  }
6705  
6706  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
6707  var library_close = __webpack_require__("w95h");
6708  
6709  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/secondary-sidebar/inserter-sidebar.js
6710  
6711  
6712  
6713  /**
6714   * WordPress dependencies
6715   */
6716  
6717  
6718  
6719  
6720  
6721  /**
6722   * Internal dependencies
6723   */
6724  
6725  
6726  function InserterSidebar() {
6727    const {
6728      setIsInserterOpened
6729    } = Object(external_wp_data_["useDispatch"])(store);
6730    const insertionPoint = Object(external_wp_data_["useSelect"])(select => select(store).__experimentalGetInsertionPoint(), []);
6731    const isMobile = Object(external_wp_compose_["useViewportMatch"])('medium', '<');
6732    const [inserterDialogRef, inserterDialogProps] = Object(external_wp_compose_["__experimentalUseDialog"])({
6733      onClose: () => setIsInserterOpened(false)
6734    });
6735    return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
6736      ref: inserterDialogRef
6737    }, inserterDialogProps, {
6738      className: "edit-site-editor__inserter-panel"
6739    }), Object(external_wp_element_["createElement"])("div", {
6740      className: "edit-site-editor__inserter-panel-header"
6741    }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
6742      icon: library_close["a" /* default */],
6743      onClick: () => setIsInserterOpened(false)
6744    })), Object(external_wp_element_["createElement"])("div", {
6745      className: "edit-site-editor__inserter-panel-content"
6746    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLibrary"], {
6747      showInserterHelpPanel: true,
6748      shouldFocusBlock: isMobile,
6749      rootClientId: insertionPoint.rootClientId,
6750      __experimentalInsertionIndex: insertionPoint.insertionIndex,
6751      __experimentalFilterValue: insertionPoint.filterValue
6752    })));
6753  }
6754  
6755  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
6756  var close_small = __webpack_require__("bWcr");
6757  
6758  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/secondary-sidebar/list-view-sidebar.js
6759  
6760  
6761  /**
6762   * WordPress dependencies
6763   */
6764  
6765  
6766  
6767  
6768  
6769  
6770  
6771  /**
6772   * Internal dependencies
6773   */
6774  
6775  
6776  function ListViewSidebar() {
6777    const {
6778      setIsListViewOpened
6779    } = Object(external_wp_data_["useDispatch"])(store);
6780    const {
6781      clearSelectedBlock,
6782      selectBlock
6783    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
6784  
6785    async function selectEditorBlock(clientId) {
6786      await clearSelectedBlock();
6787      selectBlock(clientId, -1);
6788    }
6789  
6790    const focusOnMountRef = Object(external_wp_compose_["useFocusOnMount"])('firstElement');
6791    const focusReturnRef = Object(external_wp_compose_["useFocusReturn"])();
6792  
6793    function closeOnEscape(event) {
6794      if (event.keyCode === external_wp_keycodes_["ESCAPE"] && !event.defaultPrevented) {
6795        setIsListViewOpened(false);
6796      }
6797    }
6798  
6799    const instanceId = Object(external_wp_compose_["useInstanceId"])(ListViewSidebar);
6800    const labelId = `edit-site-editor__list-view-panel-label-$instanceId}`;
6801    return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
6802      Object(external_wp_element_["createElement"])("div", {
6803        "aria-labelledby": labelId,
6804        className: "edit-site-editor__list-view-panel",
6805        onKeyDown: closeOnEscape
6806      }, Object(external_wp_element_["createElement"])("div", {
6807        className: "edit-site-editor__list-view-panel-header"
6808      }, Object(external_wp_element_["createElement"])("strong", {
6809        id: labelId
6810      }, Object(external_wp_i18n_["__"])('List view')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
6811        icon: close_small["a" /* default */],
6812        label: Object(external_wp_i18n_["__"])('Close list view sidebar'),
6813        onClick: () => setIsListViewOpened(false)
6814      })), Object(external_wp_element_["createElement"])("div", {
6815        className: "edit-site-editor__list-view-panel-content",
6816        ref: Object(external_wp_compose_["useMergeRefs"])([focusReturnRef, focusOnMountRef])
6817      }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalListView"], {
6818        onSelect: selectEditorBlock,
6819        showNestedBlocks: true,
6820        __experimentalFeatures: true,
6821        __experimentalPersistentListViewFeatures: true
6822      })))
6823    );
6824  }
6825  
6826  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/error-boundary/index.js
6827  
6828  
6829  /**
6830   * WordPress dependencies
6831   */
6832  
6833  
6834  
6835  
6836  
6837  
6838  function CopyButton(_ref) {
6839    let {
6840      text,
6841      children
6842    } = _ref;
6843    const ref = Object(external_wp_compose_["useCopyToClipboard"])(text);
6844    return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
6845      variant: "secondary",
6846      ref: ref
6847    }, children);
6848  }
6849  
6850  class error_boundary_ErrorBoundary extends external_wp_element_["Component"] {
6851    constructor() {
6852      super(...arguments);
6853      this.reboot = this.reboot.bind(this);
6854      this.state = {
6855        error: null
6856      };
6857    }
6858  
6859    static getDerivedStateFromError(error) {
6860      return {
6861        error
6862      };
6863    }
6864  
6865    reboot() {
6866      this.props.onError();
6867    }
6868  
6869    render() {
6870      const {
6871        error
6872      } = this.state;
6873  
6874      if (!error) {
6875        return this.props.children;
6876      }
6877  
6878      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], {
6879        className: "editor-error-boundary",
6880        actions: [Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
6881          key: "recovery",
6882          onClick: this.reboot,
6883          variant: "secondary"
6884        }, Object(external_wp_i18n_["__"])('Attempt Recovery')), Object(external_wp_element_["createElement"])(CopyButton, {
6885          key: "copy-error",
6886          text: error.stack
6887        }, Object(external_wp_i18n_["__"])('Copy Error'))]
6888      }, Object(external_wp_i18n_["__"])('The editor has encountered an unexpected error.'));
6889    }
6890  
6891  }
6892  
6893  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/image.js
6894  
6895  function WelcomeGuideImage(_ref) {
6896    let {
6897      nonAnimatedSrc,
6898      animatedSrc
6899    } = _ref;
6900    return Object(external_wp_element_["createElement"])("picture", {
6901      className: "edit-site-welcome-guide__image"
6902    }, Object(external_wp_element_["createElement"])("source", {
6903      srcSet: nonAnimatedSrc,
6904      media: "(prefers-reduced-motion: reduce)"
6905    }), Object(external_wp_element_["createElement"])("img", {
6906      src: animatedSrc,
6907      width: "312",
6908      height: "240",
6909      alt: ""
6910    }));
6911  }
6912  
6913  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/editor.js
6914  
6915  
6916  /**
6917   * WordPress dependencies
6918   */
6919  
6920  
6921  
6922  
6923  /**
6924   * Internal dependencies
6925   */
6926  
6927  
6928  
6929  function WelcomeGuideEditor() {
6930    const {
6931      toggleFeature
6932    } = Object(external_wp_data_["useDispatch"])(store);
6933    const isActive = Object(external_wp_data_["useSelect"])(select => select(store).isFeatureActive('welcomeGuide'), []);
6934  
6935    if (!isActive) {
6936      return null;
6937    }
6938  
6939    return Object(external_wp_element_["createElement"])(external_wp_components_["Guide"], {
6940      className: "edit-site-welcome-guide",
6941      contentLabel: Object(external_wp_i18n_["__"])('Welcome to the site editor'),
6942      finishButtonText: Object(external_wp_i18n_["__"])('Get Started'),
6943      onFinish: () => toggleFeature('welcomeGuide'),
6944      pages: [{
6945        image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, {
6946          nonAnimatedSrc: "https://s.w.org/images/block-editor/edit-your-site.svg?1",
6947          animatedSrc: "https://s.w.org/images/block-editor/edit-your-site.gif?1"
6948        }),
6949        content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", {
6950          className: "edit-site-welcome-guide__heading"
6951        }, Object(external_wp_i18n_["__"])('Edit your site')), Object(external_wp_element_["createElement"])("p", {
6952          className: "edit-site-welcome-guide__text"
6953        }, Object(external_wp_i18n_["__"])('Design everything on your site — from the header right down to the footer — using blocks.')), Object(external_wp_element_["createElement"])("p", {
6954          className: "edit-site-welcome-guide__text"
6955        }, Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["__"])('Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'), {
6956          StylesIconImage: Object(external_wp_element_["createElement"])("img", {
6957            alt: Object(external_wp_i18n_["__"])('styles'),
6958            src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"
6959          })
6960        })))
6961      }]
6962    });
6963  }
6964  
6965  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/styles.js
6966  
6967  
6968  /**
6969   * WordPress dependencies
6970   */
6971  
6972  
6973  
6974  
6975  /**
6976   * Internal dependencies
6977   */
6978  
6979  
6980  
6981  function WelcomeGuideStyles() {
6982    const {
6983      toggleFeature
6984    } = Object(external_wp_data_["useDispatch"])(store);
6985    const {
6986      isActive,
6987      isStylesOpen
6988    } = Object(external_wp_data_["useSelect"])(select => {
6989      const sidebar = select(build_module["i" /* store */]).getActiveComplementaryArea(store.name);
6990      return {
6991        isActive: select(store).isFeatureActive('welcomeGuideStyles'),
6992        isStylesOpen: sidebar === 'edit-site/global-styles'
6993      };
6994    }, []);
6995  
6996    if (!isActive || !isStylesOpen) {
6997      return null;
6998    }
6999  
7000    return Object(external_wp_element_["createElement"])(external_wp_components_["Guide"], {
7001      className: "edit-site-welcome-guide",
7002      contentLabel: Object(external_wp_i18n_["__"])('Welcome to styles'),
7003      finishButtonText: Object(external_wp_i18n_["__"])('Get Started'),
7004      onFinish: () => toggleFeature('welcomeGuideStyles'),
7005      pages: [{
7006        image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, {
7007          nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.svg?1",
7008          animatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.gif?1"
7009        }),
7010        content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", {
7011          className: "edit-site-welcome-guide__heading"
7012        }, Object(external_wp_i18n_["__"])('Welcome to Styles')), Object(external_wp_element_["createElement"])("p", {
7013          className: "edit-site-welcome-guide__text"
7014        }, Object(external_wp_i18n_["__"])('Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.')))
7015      }, {
7016        image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, {
7017          nonAnimatedSrc: "https://s.w.org/images/block-editor/set-the-design.svg?1",
7018          animatedSrc: "https://s.w.org/images/block-editor/set-the-design.gif?1"
7019        }),
7020        content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", {
7021          className: "edit-site-welcome-guide__heading"
7022        }, Object(external_wp_i18n_["__"])('Set the design')), Object(external_wp_element_["createElement"])("p", {
7023          className: "edit-site-welcome-guide__text"
7024        }, Object(external_wp_i18n_["__"])('You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle! ')))
7025      }, {
7026        image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, {
7027          nonAnimatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.svg?1",
7028          animatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.gif?1"
7029        }),
7030        content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", {
7031          className: "edit-site-welcome-guide__heading"
7032        }, Object(external_wp_i18n_["__"])('Personalize blocks')), Object(external_wp_element_["createElement"])("p", {
7033          className: "edit-site-welcome-guide__text"
7034        }, Object(external_wp_i18n_["__"])('You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.')))
7035      }, {
7036        image: Object(external_wp_element_["createElement"])(WelcomeGuideImage, {
7037          nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
7038          animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
7039        }),
7040        content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("h1", {
7041          className: "edit-site-welcome-guide__heading"
7042        }, Object(external_wp_i18n_["__"])('Learn more')), Object(external_wp_element_["createElement"])("p", {
7043          className: "edit-site-welcome-guide__text"
7044        }, Object(external_wp_i18n_["__"])('New to block themes and styling your site? '), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
7045          href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/styles-overview/')
7046        }, Object(external_wp_i18n_["__"])('Here’s a detailed guide to learn how to make the most of it.'))))
7047      }]
7048    });
7049  }
7050  
7051  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/welcome-guide/index.js
7052  
7053  
7054  /**
7055   * Internal dependencies
7056   */
7057  
7058  
7059  function WelcomeGuide() {
7060    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(WelcomeGuideEditor, null), Object(external_wp_element_["createElement"])(WelcomeGuideStyles, null));
7061  }
7062  
7063  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor/global-styles-renderer.js
7064  /**
7065   * WordPress dependencies
7066   */
7067  
7068  
7069  /**
7070   * Internal dependencies
7071   */
7072  
7073  
7074  /**
7075   * Internal dependencies
7076   */
7077  
7078  
7079  
7080  function useGlobalStylesRenderer() {
7081    const [styles, settings] = useGlobalStylesOutput();
7082    const {
7083      getSettings
7084    } = Object(external_wp_data_["useSelect"])(store);
7085    const {
7086      updateSettings
7087    } = Object(external_wp_data_["useDispatch"])(store);
7088    Object(external_wp_element_["useEffect"])(() => {
7089      var _currentStoreSettings;
7090  
7091      if (!styles || !settings) {
7092        return;
7093      }
7094  
7095      const currentStoreSettings = getSettings();
7096      const nonGlobalStyles = currentStoreSettings === null || currentStoreSettings === void 0 ? void 0 : (_currentStoreSettings = currentStoreSettings.styles) === null || _currentStoreSettings === void 0 ? void 0 : _currentStoreSettings.filter(style => !style.isGlobalStyles);
7097      updateSettings({ ...currentStoreSettings,
7098        styles: [...nonGlobalStyles, ...styles],
7099        __experimentalFeatures: settings
7100      });
7101    }, [styles, settings]);
7102  }
7103  
7104  function GlobalStylesRenderer() {
7105    useGlobalStylesRenderer();
7106    return null;
7107  }
7108  
7109  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/global-styles/global-styles-provider.js
7110  
7111  
7112  /**
7113   * External dependencies
7114   */
7115  
7116  /**
7117   * WordPress dependencies
7118   */
7119  
7120  
7121  
7122  
7123  /**
7124   * Internal dependencies
7125   */
7126  
7127  
7128  
7129  function mergeTreesCustomizer(_, srcValue) {
7130    // We only pass as arrays the presets,
7131    // in which case we want the new array of values
7132    // to override the old array (no merging).
7133    if (Array.isArray(srcValue)) {
7134      return srcValue;
7135    }
7136  }
7137  
7138  function mergeBaseAndUserConfigs(base, user) {
7139    return Object(external_lodash_["mergeWith"])({}, base, user, mergeTreesCustomizer);
7140  }
7141  
7142  const cleanEmptyObject = object => {
7143    if (!Object(external_lodash_["isObject"])(object) || Array.isArray(object)) {
7144      return object;
7145    }
7146  
7147    const cleanedNestedObjects = Object(external_lodash_["pickBy"])(Object(external_lodash_["mapValues"])(object, cleanEmptyObject), external_lodash_["identity"]);
7148    return Object(external_lodash_["isEmpty"])(cleanedNestedObjects) ? undefined : cleanedNestedObjects;
7149  };
7150  
7151  function useGlobalStylesUserConfig() {
7152    const {
7153      globalStylesId,
7154      settings,
7155      styles
7156    } = Object(external_wp_data_["useSelect"])(select => {
7157      const _globalStylesId = select(external_wp_coreData_["store"]).__experimentalGetCurrentGlobalStylesId();
7158  
7159      const record = _globalStylesId ? select(external_wp_coreData_["store"]).getEditedEntityRecord('root', 'globalStyles', _globalStylesId) : undefined;
7160      return {
7161        globalStylesId: _globalStylesId,
7162        settings: record === null || record === void 0 ? void 0 : record.settings,
7163        styles: record === null || record === void 0 ? void 0 : record.styles
7164      };
7165    }, []);
7166    const {
7167      getEditedEntityRecord
7168    } = Object(external_wp_data_["useSelect"])(external_wp_coreData_["store"]);
7169    const {
7170      editEntityRecord
7171    } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
7172    const config = Object(external_wp_element_["useMemo"])(() => {
7173      return {
7174        settings: settings !== null && settings !== void 0 ? settings : {},
7175        styles: styles !== null && styles !== void 0 ? styles : {}
7176      };
7177    }, [settings, styles]);
7178    const setConfig = Object(external_wp_element_["useCallback"])(callback => {
7179      var _record$styles, _record$settings;
7180  
7181      const record = getEditedEntityRecord('root', 'globalStyles', globalStylesId);
7182      const currentConfig = {
7183        styles: (_record$styles = record === null || record === void 0 ? void 0 : record.styles) !== null && _record$styles !== void 0 ? _record$styles : {},
7184        settings: (_record$settings = record === null || record === void 0 ? void 0 : record.settings) !== null && _record$settings !== void 0 ? _record$settings : {}
7185      };
7186      const updatedConfig = callback(currentConfig);
7187      editEntityRecord('root', 'globalStyles', globalStylesId, {
7188        styles: cleanEmptyObject(updatedConfig.styles) || {},
7189        settings: cleanEmptyObject(updatedConfig.settings) || {}
7190      });
7191    }, [globalStylesId]);
7192    return [!!settings || !!styles, config, setConfig];
7193  }
7194  
7195  function useGlobalStylesBaseConfig() {
7196    const baseConfig = Object(external_wp_data_["useSelect"])(select => {
7197      return select(external_wp_coreData_["store"]).__experimentalGetCurrentThemeBaseGlobalStyles();
7198    }, []);
7199    return [!!baseConfig, baseConfig];
7200  }
7201  
7202  function useGlobalStylesContext() {
7203    const [isUserConfigReady, userConfig, setUserConfig] = useGlobalStylesUserConfig();
7204    const [isBaseConfigReady, baseConfig] = useGlobalStylesBaseConfig();
7205    const mergedConfig = Object(external_wp_element_["useMemo"])(() => {
7206      if (!baseConfig || !userConfig) {
7207        return {};
7208      }
7209  
7210      return mergeBaseAndUserConfigs(baseConfig, userConfig);
7211    }, [userConfig, baseConfig]);
7212    const context = Object(external_wp_element_["useMemo"])(() => {
7213      return {
7214        isReady: isUserConfigReady && isBaseConfigReady,
7215        user: userConfig,
7216        base: baseConfig,
7217        merged: mergedConfig,
7218        setUserConfig
7219      };
7220    }, [mergedConfig, userConfig, baseConfig, setUserConfig, isUserConfigReady, isBaseConfigReady]);
7221    return context;
7222  }
7223  
7224  function GlobalStylesProvider(_ref) {
7225    let {
7226      children
7227    } = _ref;
7228    const context = useGlobalStylesContext();
7229  
7230    if (!context.isReady) {
7231      return null;
7232    }
7233  
7234    return Object(external_wp_element_["createElement"])(GlobalStylesContext.Provider, {
7235      value: context
7236    }, children);
7237  }
7238  
7239  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/routes/use-title.js
7240  /**
7241   * WordPress dependencies
7242   */
7243  
7244  
7245  
7246  
7247  
7248  /**
7249   * Internal dependencies
7250   */
7251  
7252  
7253  function useTitle(title) {
7254    const location = useLocation();
7255    const siteTitle = Object(external_wp_data_["useSelect"])(select => {
7256      var _select$getEntityReco;
7257  
7258      return (_select$getEntityReco = select(external_wp_coreData_["store"]).getEntityRecord('root', 'site')) === null || _select$getEntityReco === void 0 ? void 0 : _select$getEntityReco.title;
7259    }, []);
7260    const isInitialLocationRef = Object(external_wp_element_["useRef"])(true);
7261    Object(external_wp_element_["useEffect"])(() => {
7262      isInitialLocationRef.current = false;
7263    }, [location]);
7264    Object(external_wp_element_["useEffect"])(() => {
7265      // Don't update or announce the title for initial page load.
7266      if (isInitialLocationRef.current) {
7267        return;
7268      }
7269  
7270      if (title && siteTitle) {
7271        // @see https://github.com/WordPress/wordpress-develop/blob/94849898192d271d533e09756007e176feb80697/src/wp-admin/admin-header.php#L67-L68
7272        const formattedTitle = Object(external_wp_i18n_["sprintf"])(
7273        /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
7274        Object(external_wp_i18n_["__"])('%1$s ‹ %2$s — WordPress'), title, siteTitle);
7275        document.title = formattedTitle; // Announce title on route change for screen readers.
7276  
7277        Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["sprintf"])(
7278        /* translators: The page title that is currently displaying. */
7279        Object(external_wp_i18n_["__"])('Now displaying: %s'), document.title), 'assertive');
7280      }
7281    }, [title, siteTitle, location]);
7282  }
7283  
7284  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/editor/index.js
7285  
7286  
7287  /**
7288   * WordPress dependencies
7289   */
7290  
7291  
7292  
7293  
7294  
7295  
7296  
7297  
7298  
7299  
7300  /**
7301   * Internal dependencies
7302   */
7303  
7304  
7305  
7306  
7307  
7308  
7309  
7310  
7311  
7312  
7313  
7314  
7315  
7316  
7317  
7318  const interfaceLabels = {
7319    secondarySidebar: Object(external_wp_i18n_["__"])('Block Library'),
7320    drawer: Object(external_wp_i18n_["__"])('Navigation Sidebar')
7321  };
7322  
7323  function Editor(_ref) {
7324    let {
7325      onError
7326    } = _ref;
7327    const {
7328      isInserterOpen,
7329      isListViewOpen,
7330      sidebarIsOpened,
7331      settings,
7332      entityId,
7333      templateType,
7334      page,
7335      template,
7336      templateResolved,
7337      isNavigationOpen,
7338      previousShortcut,
7339      nextShortcut
7340    } = Object(external_wp_data_["useSelect"])(select => {
7341      const {
7342        isInserterOpened,
7343        isListViewOpened,
7344        getSettings,
7345        getEditedPostType,
7346        getEditedPostId,
7347        getPage,
7348        isNavigationOpened
7349      } = select(store);
7350      const {
7351        hasFinishedResolution,
7352        getEntityRecord
7353      } = select(external_wp_coreData_["store"]);
7354      const postType = getEditedPostType();
7355      const postId = getEditedPostId(); // The currently selected entity to display. Typically template or template part.
7356  
7357      return {
7358        isInserterOpen: isInserterOpened(),
7359        isListViewOpen: isListViewOpened(),
7360        sidebarIsOpened: !!select(build_module["i" /* store */]).getActiveComplementaryArea(store.name),
7361        settings: getSettings(),
7362        templateType: postType,
7363        page: getPage(),
7364        template: postId ? getEntityRecord('postType', postType, postId) : null,
7365        templateResolved: postId ? hasFinishedResolution('getEntityRecord', ['postType', postType, postId]) : false,
7366        entityId: postId,
7367        isNavigationOpen: isNavigationOpened(),
7368        previousShortcut: select(external_wp_keyboardShortcuts_["store"]).getAllShortcutKeyCombinations('core/edit-site/previous-region'),
7369        nextShortcut: select(external_wp_keyboardShortcuts_["store"]).getAllShortcutKeyCombinations('core/edit-site/next-region')
7370      };
7371    }, []);
7372    const {
7373      setPage,
7374      setIsInserterOpened
7375    } = Object(external_wp_data_["useDispatch"])(store);
7376    const [isEntitiesSavedStatesOpen, setIsEntitiesSavedStatesOpen] = Object(external_wp_element_["useState"])(false);
7377    const openEntitiesSavedStates = Object(external_wp_element_["useCallback"])(() => setIsEntitiesSavedStatesOpen(true), []);
7378    const closeEntitiesSavedStates = Object(external_wp_element_["useCallback"])(() => {
7379      setIsEntitiesSavedStatesOpen(false);
7380    }, []);
7381    const blockContext = Object(external_wp_element_["useMemo"])(() => ({ ...(page === null || page === void 0 ? void 0 : page.context),
7382      queryContext: [(page === null || page === void 0 ? void 0 : page.context.queryContext) || {
7383        page: 1
7384      }, newQueryContext => setPage({ ...page,
7385        context: { ...(page === null || page === void 0 ? void 0 : page.context),
7386          queryContext: { ...(page === null || page === void 0 ? void 0 : page.context.queryContext),
7387            ...newQueryContext
7388          }
7389        }
7390      })]
7391    }), [page === null || page === void 0 ? void 0 : page.context]);
7392    Object(external_wp_element_["useEffect"])(() => {
7393      if (isNavigationOpen) {
7394        document.body.classList.add('is-navigation-sidebar-open');
7395      } else {
7396        document.body.classList.remove('is-navigation-sidebar-open');
7397      }
7398    }, [isNavigationOpen]); // Don't render the Editor until the settings are set and loaded
7399  
7400    const isReady = (settings === null || settings === void 0 ? void 0 : settings.siteUrl) && templateType !== undefined && entityId !== undefined;
7401  
7402    const secondarySidebar = () => {
7403      if (isInserterOpen) {
7404        return Object(external_wp_element_["createElement"])(InserterSidebar, null);
7405      }
7406  
7407      if (isListViewOpen) {
7408        return Object(external_wp_element_["createElement"])(ListViewSidebar, null);
7409      }
7410  
7411      return null;
7412    }; // Only announce the title once the editor is ready to prevent "Replace"
7413    // action in <URlQueryController> from double-announcing.
7414  
7415  
7416    useTitle(isReady && Object(external_wp_i18n_["__"])('Editor (beta)'));
7417    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(URLQueryController, null), isReady && Object(external_wp_element_["createElement"])(external_wp_keyboardShortcuts_["ShortcutProvider"], null, Object(external_wp_element_["createElement"])(external_wp_coreData_["EntityProvider"], {
7418      kind: "root",
7419      type: "site"
7420    }, Object(external_wp_element_["createElement"])(external_wp_coreData_["EntityProvider"], {
7421      kind: "postType",
7422      type: templateType,
7423      id: entityId
7424    }, Object(external_wp_element_["createElement"])(GlobalStylesProvider, null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockContextProvider"], {
7425      value: blockContext
7426    }, Object(external_wp_element_["createElement"])(GlobalStylesRenderer, null), Object(external_wp_element_["createElement"])(error_boundary_ErrorBoundary, {
7427      onError: onError
7428    }, Object(external_wp_element_["createElement"])(keyboard_shortcuts.Register, null), Object(external_wp_element_["createElement"])(SidebarComplementaryAreaFills, null), Object(external_wp_element_["createElement"])(build_module["e" /* InterfaceSkeleton */], {
7429      labels: interfaceLabels,
7430      secondarySidebar: secondarySidebar(),
7431      sidebar: sidebarIsOpened && Object(external_wp_element_["createElement"])(build_module["b" /* ComplementaryArea */].Slot, {
7432        scope: "core/edit-site"
7433      }),
7434      drawer: Object(external_wp_element_["createElement"])(navigation_sidebar.Slot, null),
7435      header: Object(external_wp_element_["createElement"])(Header, {
7436        openEntitiesSavedStates: openEntitiesSavedStates
7437      }),
7438      notices: Object(external_wp_element_["createElement"])(external_wp_editor_["EditorSnackbars"], null),
7439      content: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_editor_["EditorNotices"], null), template && Object(external_wp_element_["createElement"])(BlockEditor, {
7440        setIsInserterOpen: setIsInserterOpened
7441      }), templateResolved && !template && (settings === null || settings === void 0 ? void 0 : settings.siteUrl) && entityId && Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], {
7442        status: "warning",
7443        isDismissible: false
7444      }, Object(external_wp_i18n_["__"])("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")), Object(external_wp_element_["createElement"])(keyboard_shortcuts, {
7445        openEntitiesSavedStates: openEntitiesSavedStates
7446      })),
7447      actions: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, isEntitiesSavedStatesOpen ? Object(external_wp_element_["createElement"])(external_wp_editor_["EntitiesSavedStates"], {
7448        close: closeEntitiesSavedStates
7449      }) : Object(external_wp_element_["createElement"])("div", {
7450        className: "edit-site-editor__toggle-save-panel"
7451      }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
7452        variant: "secondary",
7453        className: "edit-site-editor__toggle-save-panel-button",
7454        onClick: openEntitiesSavedStates,
7455        "aria-expanded": false
7456      }, Object(external_wp_i18n_["__"])('Open save panel')))),
7457      footer: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockBreadcrumb"], null),
7458      shortcuts: {
7459        previous: previousShortcut,
7460        next: nextShortcut
7461      }
7462    }), Object(external_wp_element_["createElement"])(WelcomeGuide, null), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"].Slot, null), Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], null))))))));
7463  }
7464  
7465  /* harmony default export */ var editor = (Editor);
7466  
7467  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/list/use-register-shortcuts.js
7468  /**
7469   * WordPress dependencies
7470   */
7471  
7472  
7473  
7474  
7475  function useRegisterShortcuts() {
7476    const {
7477      registerShortcut
7478    } = Object(external_wp_data_["useDispatch"])(external_wp_keyboardShortcuts_["store"]);
7479    Object(external_wp_element_["useEffect"])(() => {
7480      registerShortcut({
7481        name: 'core/edit-site/next-region',
7482        category: 'global',
7483        description: Object(external_wp_i18n_["__"])('Navigate to the next part of the editor.'),
7484        keyCombination: {
7485          modifier: 'ctrl',
7486          character: '`'
7487        },
7488        aliases: [{
7489          modifier: 'access',
7490          character: 'n'
7491        }]
7492      });
7493      registerShortcut({
7494        name: 'core/edit-site/previous-region',
7495        category: 'global',
7496        description: Object(external_wp_i18n_["__"])('Navigate to the previous part of the editor.'),
7497        keyCombination: {
7498          modifier: 'ctrlShift',
7499          character: '`'
7500        },
7501        aliases: [{
7502          modifier: 'access',
7503          character: 'p'
7504        }]
7505      });
7506    }, []);
7507  }
7508  
7509  // CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/add-new-template/new-template.js
7510  
7511  
7512  /**
7513   * External dependencies
7514   */
7515  
7516  /**
7517   * WordPress dependencies
7518   */
7519  
7520  
7521  
7522  
7523  
7524  
7525  
7526  /**
7527   * Internal dependencies
7528   */
7529  
7530  
7531  const DEFAULT_TEMPLATE_SLUGS = ['front-page', 'single-post', 'page', 'archive', 'search', '404', 'index'];
7532  function NewTemplate(_ref) {
7533    let {
7534      postType
7535    } = _ref;
7536    const history = useHistory();
7537    const {
7538      templates,
7539      defaultTemplateTypes
7540    } = Object(external_wp_data_["useSelect"])(select => ({
7541      templates: select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_template', {
7542        per_page: -1
7543      }),
7544      defaultTemplateTypes: select(external_wp_editor_["store"]).__experimentalGetDefaultTemplateTypes()
7545    }), []);
7546    const {
7547      saveEntityRecord
7548    } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]);
7549    const {
7550      createErrorNotice
7551    } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
7552    const {
7553      getLastEntitySaveError
7554    } = Object(external_wp_data_["useSelect"])(external_wp_coreData_["store"]);
7555  
7556    async function createTemplate(_ref2) {
7557      let {
7558        slug
7559      } = _ref2;
7560  
7561      try {
7562        const {
7563          title,
7564          description
7565        } = Object(external_lodash_["find"])(defaultTemplateTypes, {
7566          slug
7567        });
7568        const template = await saveEntityRecord('postType', 'wp_template', {
7569          excerpt: description,
7570          // Slugs need to be strings, so this is for template `404`
7571          slug: slug.toString(),
7572          status: 'publish',
7573          title
7574        });
7575        const lastEntitySaveError = getLastEntitySaveError('postType', 'wp_template', template.id);
7576  
7577        if (lastEntitySaveError) {
7578          throw lastEntitySaveError;
7579        } // Navigate to the created template editor.
7580  
7581  
7582        history.push({
7583          postId: template.id,
7584          postType: template.type
7585        }); // TODO: Add a success notice?
7586      } catch (error) {
7587        const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : Object(external_wp_i18n_["__"])('An error occurred while creating the template.');
7588        createErrorNotice(errorMessage, {
7589          type: 'snackbar'
7590        });
7591      }
7592    }
7593  
7594    const existingTemplateSlugs = Object(external_lodash_["map"])(templates, 'slug');
7595    const missingTemplates = Object(external_lodash_["filter"])(defaultTemplateTypes, template => Object(external_lodash_["includes"])(DEFAULT_TEMPLATE_SLUGS, template.slug) && !Object(external_lodash_["includes"])(existingTemplateSlugs, template.slug));
7596  
7597    if (!missingTemplates.length) {
7598      return null;
7599    }
7600  
7601    return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
7602      className: "edit-site-new-template-dropdown",
7603      icon: null,
7604      text: postType.labels.add_new,
7605      label: postType.labels.add_new_item,
7606      popoverProps: {
7607        noArrow: false
7608      },
7609      toggleProps: {
7610        variant: 'primary'
7611      }
7612    }, () => Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
7613      className: "edit-site-new-template-dropdown__popover"
7614    }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
7615      label: postType.labels.add_new_item
7616    }, Object(external_lodash_["map"])(missingTemplates, _ref3 => {
7617      let {
7618        title,
7619        description,
7620        slug
7621