wp/wp-includes/js/dist/customize-widgets.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /******/ (function() { // webpackBootstrap
     1 /******/ (() => { // webpackBootstrap
       
     2 /******/ 	"use strict";
     2 /******/ 	var __webpack_modules__ = ({
     3 /******/ 	var __webpack_modules__ = ({
     3 
     4 
     4 /***/ 4403:
     5 /***/ 7734:
     5 /***/ (function(module, exports) {
     6 /***/ ((module) => {
     6 
     7 
     7 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
     8 
     8   Copyright (c) 2018 Jed Watson.
     9 
     9   Licensed under the MIT License (MIT), see
    10 // do not edit .js files directly - edit src/index.jst
    10   http://jedwatson.github.io/classnames
    11 
    11 */
    12 
    12 /* global define */
    13   var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
    13 
    14 
    14 (function () {
    15 
    15 	'use strict';
    16 module.exports = function equal(a, b) {
    16 
    17   if (a === b) return true;
    17 	var hasOwn = {}.hasOwnProperty;
    18 
    18 
    19   if (a && b && typeof a == 'object' && typeof b == 'object') {
    19 	function classNames() {
    20     if (a.constructor !== b.constructor) return false;
    20 		var classes = [];
    21 
    21 
    22     var length, i, keys;
    22 		for (var i = 0; i < arguments.length; i++) {
    23     if (Array.isArray(a)) {
    23 			var arg = arguments[i];
    24       length = a.length;
    24 			if (!arg) continue;
    25       if (length != b.length) return false;
    25 
    26       for (i = length; i-- !== 0;)
    26 			var argType = typeof arg;
    27         if (!equal(a[i], b[i])) return false;
    27 
    28       return true;
    28 			if (argType === 'string' || argType === 'number') {
    29     }
    29 				classes.push(arg);
    30 
    30 			} else if (Array.isArray(arg)) {
    31 
    31 				if (arg.length) {
    32     if ((a instanceof Map) && (b instanceof Map)) {
    32 					var inner = classNames.apply(null, arg);
    33       if (a.size !== b.size) return false;
    33 					if (inner) {
    34       for (i of a.entries())
    34 						classes.push(inner);
    35         if (!b.has(i[0])) return false;
    35 					}
    36       for (i of a.entries())
    36 				}
    37         if (!equal(i[1], b.get(i[0]))) return false;
    37 			} else if (argType === 'object') {
    38       return true;
    38 				if (arg.toString === Object.prototype.toString) {
    39     }
    39 					for (var key in arg) {
    40 
    40 						if (hasOwn.call(arg, key) && arg[key]) {
    41     if ((a instanceof Set) && (b instanceof Set)) {
    41 							classes.push(key);
    42       if (a.size !== b.size) return false;
    42 						}
    43       for (i of a.entries())
    43 					}
    44         if (!b.has(i[0])) return false;
    44 				} else {
    45       return true;
    45 					classes.push(arg.toString());
    46     }
    46 				}
    47 
    47 			}
    48     if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
    48 		}
    49       length = a.length;
    49 
    50       if (length != b.length) return false;
    50 		return classes.join(' ');
    51       for (i = length; i-- !== 0;)
    51 	}
    52         if (a[i] !== b[i]) return false;
    52 
    53       return true;
    53 	if ( true && module.exports) {
    54     }
    54 		classNames.default = classNames;
    55 
    55 		module.exports = classNames;
    56 
    56 	} else if (true) {
    57     if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
    57 		// register as 'classnames', consistent with npm package name
    58     if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
    58 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
    59     if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
    59 			return classNames;
    60 
    60 		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
    61     keys = Object.keys(a);
    61 		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    62     length = keys.length;
    62 	} else {}
    63     if (length !== Object.keys(b).length) return false;
    63 }());
    64 
       
    65     for (i = length; i-- !== 0;)
       
    66       if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
       
    67 
       
    68     for (i = length; i-- !== 0;) {
       
    69       var key = keys[i];
       
    70 
       
    71       if (!equal(a[key], b[key])) return false;
       
    72     }
       
    73 
       
    74     return true;
       
    75   }
       
    76 
       
    77   // true if both NaN, false otherwise
       
    78   return a!==a && b!==b;
       
    79 };
    64 
    80 
    65 
    81 
    66 /***/ })
    82 /***/ })
    67 
    83 
    68 /******/ 	});
    84 /******/ 	});
    91 /******/ 		return module.exports;
   107 /******/ 		return module.exports;
    92 /******/ 	}
   108 /******/ 	}
    93 /******/ 	
   109 /******/ 	
    94 /************************************************************************/
   110 /************************************************************************/
    95 /******/ 	/* webpack/runtime/compat get default export */
   111 /******/ 	/* webpack/runtime/compat get default export */
    96 /******/ 	!function() {
   112 /******/ 	(() => {
    97 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
   113 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
    98 /******/ 		__webpack_require__.n = function(module) {
   114 /******/ 		__webpack_require__.n = (module) => {
    99 /******/ 			var getter = module && module.__esModule ?
   115 /******/ 			var getter = module && module.__esModule ?
   100 /******/ 				function() { return module['default']; } :
   116 /******/ 				() => (module['default']) :
   101 /******/ 				function() { return module; };
   117 /******/ 				() => (module);
   102 /******/ 			__webpack_require__.d(getter, { a: getter });
   118 /******/ 			__webpack_require__.d(getter, { a: getter });
   103 /******/ 			return getter;
   119 /******/ 			return getter;
   104 /******/ 		};
   120 /******/ 		};
   105 /******/ 	}();
   121 /******/ 	})();
   106 /******/ 	
   122 /******/ 	
   107 /******/ 	/* webpack/runtime/define property getters */
   123 /******/ 	/* webpack/runtime/define property getters */
   108 /******/ 	!function() {
   124 /******/ 	(() => {
   109 /******/ 		// define getter functions for harmony exports
   125 /******/ 		// define getter functions for harmony exports
   110 /******/ 		__webpack_require__.d = function(exports, definition) {
   126 /******/ 		__webpack_require__.d = (exports, definition) => {
   111 /******/ 			for(var key in definition) {
   127 /******/ 			for(var key in definition) {
   112 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
   128 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
   113 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
   129 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
   114 /******/ 				}
   130 /******/ 				}
   115 /******/ 			}
   131 /******/ 			}
   116 /******/ 		};
   132 /******/ 		};
   117 /******/ 	}();
   133 /******/ 	})();
   118 /******/ 	
   134 /******/ 	
   119 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
   135 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
   120 /******/ 	!function() {
   136 /******/ 	(() => {
   121 /******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
   137 /******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
   122 /******/ 	}();
   138 /******/ 	})();
   123 /******/ 	
   139 /******/ 	
   124 /******/ 	/* webpack/runtime/make namespace object */
   140 /******/ 	/* webpack/runtime/make namespace object */
   125 /******/ 	!function() {
   141 /******/ 	(() => {
   126 /******/ 		// define __esModule on exports
   142 /******/ 		// define __esModule on exports
   127 /******/ 		__webpack_require__.r = function(exports) {
   143 /******/ 		__webpack_require__.r = (exports) => {
   128 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
   144 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
   129 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
   145 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
   130 /******/ 			}
   146 /******/ 			}
   131 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
   147 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
   132 /******/ 		};
   148 /******/ 		};
   133 /******/ 	}();
   149 /******/ 	})();
   134 /******/ 	
   150 /******/ 	
   135 /************************************************************************/
   151 /************************************************************************/
   136 var __webpack_exports__ = {};
   152 var __webpack_exports__ = {};
   137 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
   153 // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
   138 !function() {
   154 (() => {
   139 "use strict";
       
   140 // ESM COMPAT FLAG
   155 // ESM COMPAT FLAG
   141 __webpack_require__.r(__webpack_exports__);
   156 __webpack_require__.r(__webpack_exports__);
   142 
   157 
   143 // EXPORTS
   158 // EXPORTS
   144 __webpack_require__.d(__webpack_exports__, {
   159 __webpack_require__.d(__webpack_exports__, {
   145   "initialize": function() { return /* binding */ initialize; }
   160   initialize: () => (/* binding */ initialize),
       
   161   store: () => (/* reexport */ store)
   146 });
   162 });
   147 
   163 
   148 // NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
   164 // NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
   149 var selectors_namespaceObject = {};
   165 var selectors_namespaceObject = {};
   150 __webpack_require__.r(selectors_namespaceObject);
   166 __webpack_require__.r(selectors_namespaceObject);
   151 __webpack_require__.d(selectors_namespaceObject, {
   167 __webpack_require__.d(selectors_namespaceObject, {
   152   "__experimentalGetInsertionPoint": function() { return __experimentalGetInsertionPoint; },
   168   __experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint),
   153   "isInserterOpened": function() { return isInserterOpened; }
   169   isInserterOpened: () => (isInserterOpened)
   154 });
   170 });
   155 
   171 
   156 // NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
   172 // NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
   157 var actions_namespaceObject = {};
   173 var actions_namespaceObject = {};
   158 __webpack_require__.r(actions_namespaceObject);
   174 __webpack_require__.r(actions_namespaceObject);
   159 __webpack_require__.d(actions_namespaceObject, {
   175 __webpack_require__.d(actions_namespaceObject, {
   160   "setIsInserterOpened": function() { return setIsInserterOpened; }
   176   setIsInserterOpened: () => (setIsInserterOpened)
   161 });
   177 });
   162 
   178 
   163 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
       
   164 var store_actions_namespaceObject = {};
       
   165 __webpack_require__.r(store_actions_namespaceObject);
       
   166 __webpack_require__.d(store_actions_namespaceObject, {
       
   167   "disableComplementaryArea": function() { return disableComplementaryArea; },
       
   168   "enableComplementaryArea": function() { return enableComplementaryArea; },
       
   169   "pinItem": function() { return pinItem; },
       
   170   "setFeatureDefaults": function() { return setFeatureDefaults; },
       
   171   "setFeatureValue": function() { return setFeatureValue; },
       
   172   "toggleFeature": function() { return toggleFeature; },
       
   173   "unpinItem": function() { return unpinItem; }
       
   174 });
       
   175 
       
   176 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
       
   177 var store_selectors_namespaceObject = {};
       
   178 __webpack_require__.r(store_selectors_namespaceObject);
       
   179 __webpack_require__.d(store_selectors_namespaceObject, {
       
   180   "getActiveComplementaryArea": function() { return getActiveComplementaryArea; },
       
   181   "isFeatureActive": function() { return isFeatureActive; },
       
   182   "isItemPinned": function() { return isItemPinned; }
       
   183 });
       
   184 
       
   185 ;// CONCATENATED MODULE: external ["wp","element"]
   179 ;// CONCATENATED MODULE: external ["wp","element"]
   186 var external_wp_element_namespaceObject = window["wp"]["element"];
   180 const external_wp_element_namespaceObject = window["wp"]["element"];
   187 ;// CONCATENATED MODULE: external ["wp","blockLibrary"]
   181 ;// CONCATENATED MODULE: external ["wp","blockLibrary"]
   188 var external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
   182 const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
   189 ;// CONCATENATED MODULE: external ["wp","widgets"]
   183 ;// CONCATENATED MODULE: external ["wp","widgets"]
   190 var external_wp_widgets_namespaceObject = window["wp"]["widgets"];
   184 const external_wp_widgets_namespaceObject = window["wp"]["widgets"];
   191 ;// CONCATENATED MODULE: external ["wp","blocks"]
   185 ;// CONCATENATED MODULE: external ["wp","blocks"]
   192 var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
   186 const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
   193 ;// CONCATENATED MODULE: external ["wp","data"]
   187 ;// CONCATENATED MODULE: external ["wp","data"]
   194 var external_wp_data_namespaceObject = window["wp"]["data"];
   188 const external_wp_data_namespaceObject = window["wp"]["data"];
   195 ;// CONCATENATED MODULE: external ["wp","preferences"]
   189 ;// CONCATENATED MODULE: external ["wp","preferences"]
   196 var external_wp_preferences_namespaceObject = window["wp"]["preferences"];
   190 const external_wp_preferences_namespaceObject = window["wp"]["preferences"];
   197 ;// CONCATENATED MODULE: external ["wp","components"]
   191 ;// CONCATENATED MODULE: external ["wp","components"]
   198 var external_wp_components_namespaceObject = window["wp"]["components"];
   192 const external_wp_components_namespaceObject = window["wp"]["components"];
   199 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
       
   200 var external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
       
   201 ;// CONCATENATED MODULE: external ["wp","i18n"]
   193 ;// CONCATENATED MODULE: external ["wp","i18n"]
   202 var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
   194 const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
   203 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
   195 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
   204 var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
   196 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
   205 ;// CONCATENATED MODULE: external ["wp","compose"]
   197 ;// CONCATENATED MODULE: external ["wp","compose"]
   206 var external_wp_compose_namespaceObject = window["wp"]["compose"];
   198 const external_wp_compose_namespaceObject = window["wp"]["compose"];
       
   199 ;// CONCATENATED MODULE: external ["wp","hooks"]
       
   200 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
       
   201 ;// CONCATENATED MODULE: external "ReactJSXRuntime"
       
   202 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
   207 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js
   203 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js
   208 
   204 /**
   209 
   205  * WordPress dependencies
   210 /**
   206  */
   211  * WordPress dependencies
   207 
   212  */
   208 
   213 
   209 
   214 
   210 
   215 
   211 
   216 
   212 
   217 
   213 
   218 
   214 function CopyButton({
   219 function CopyButton(_ref) {
   215   text,
   220   let {
   216   children
   221     text,
   217 }) {
   222     children
       
   223   } = _ref;
       
   224   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
   218   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
   225   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
   219   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
   226     variant: "secondary",
   220     variant: "secondary",
   227     ref: ref
   221     ref: ref,
   228   }, children);
   222     children: children
   229 }
   223   });
   230 
   224 }
   231 class ErrorBoundary extends external_wp_element_namespaceObject.Component {
   225 class ErrorBoundary extends external_wp_element_namespaceObject.Component {
   232   constructor() {
   226   constructor() {
   233     super(...arguments);
   227     super(...arguments);
   234     this.state = {
   228     this.state = {
   235       error: null
   229       error: null
   236     };
   230     };
   237   }
   231   }
   238 
       
   239   componentDidCatch(error) {
   232   componentDidCatch(error) {
   240     this.setState({
   233     this.setState({
   241       error
   234       error
   242     });
   235     });
   243   }
   236     (0,external_wp_hooks_namespaceObject.doAction)('editor.ErrorBoundary.errorLogged', error);
   244 
   237   }
   245   render() {
   238   render() {
   246     const {
   239     const {
   247       error
   240       error
   248     } = this.state;
   241     } = this.state;
   249 
       
   250     if (!error) {
   242     if (!error) {
   251       return this.props.children;
   243       return this.props.children;
   252     }
   244     }
   253 
   245     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
   254     return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, {
       
   255       className: "customize-widgets-error-boundary",
   246       className: "customize-widgets-error-boundary",
   256       actions: [(0,external_wp_element_namespaceObject.createElement)(CopyButton, {
   247       actions: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CopyButton, {
   257         key: "copy-error",
   248         text: error.stack,
   258         text: error.stack
   249         children: (0,external_wp_i18n_namespaceObject.__)('Copy Error')
   259       }, (0,external_wp_i18n_namespaceObject.__)('Copy Error'))]
   250       }, "copy-error")],
   260     }, (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.'));
   251       children: (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.')
   261   }
   252     });
   262 
   253   }
   263 }
   254 }
   264 
   255 
   265 ;// CONCATENATED MODULE: external "lodash"
       
   266 var external_lodash_namespaceObject = window["lodash"];
       
   267 ;// CONCATENATED MODULE: external ["wp","coreData"]
   256 ;// CONCATENATED MODULE: external ["wp","coreData"]
   268 var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
   257 const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
   269 ;// CONCATENATED MODULE: external ["wp","mediaUtils"]
   258 ;// CONCATENATED MODULE: external ["wp","mediaUtils"]
   270 var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
   259 const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
   271 ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
       
   272 function _extends() {
       
   273   _extends = Object.assign ? Object.assign.bind() : function (target) {
       
   274     for (var i = 1; i < arguments.length; i++) {
       
   275       var source = arguments[i];
       
   276 
       
   277       for (var key in source) {
       
   278         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
   279           target[key] = source[key];
       
   280         }
       
   281       }
       
   282     }
       
   283 
       
   284     return target;
       
   285   };
       
   286   return _extends.apply(this, arguments);
       
   287 }
       
   288 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js
   260 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js
   289 
   261 /**
   290 
   262  * WordPress dependencies
   291 
   263  */
   292 /**
   264 
   293  * WordPress dependencies
   265 
   294  */
   266 
   295 
   267 
   296 
   268 
   297 
   269 
   298 
   270 function BlockInspectorButton({
   299 
   271   inspector,
   300 
   272   closeMenu,
   301 function BlockInspectorButton(_ref) {
   273   ...props
   302   let {
   274 }) {
   303     inspector,
       
   304     closeMenu,
       
   305     ...props
       
   306   } = _ref;
       
   307   const selectedBlockClientId = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSelectedBlockClientId(), []);
   275   const selectedBlockClientId = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getSelectedBlockClientId(), []);
   308   const selectedBlock = (0,external_wp_element_namespaceObject.useMemo)(() => document.getElementById(`block-${selectedBlockClientId}`), [selectedBlockClientId]);
   276   const selectedBlock = (0,external_wp_element_namespaceObject.useMemo)(() => document.getElementById(`block-${selectedBlockClientId}`), [selectedBlockClientId]);
   309   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, _extends({
   277   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
   310     onClick: () => {
   278     onClick: () => {
   311       // Open the inspector.
   279       // Open the inspector.
   312       inspector.open({
   280       inspector.open({
   313         returnFocusWhenClose: selectedBlock
   281         returnFocusWhenClose: selectedBlock
   314       }); // Then close the dropdown menu.
   282       });
   315 
   283       // Then close the dropdown menu.
   316       closeMenu();
   284       closeMenu();
   317     }
   285     },
   318   }, props), (0,external_wp_i18n_namespaceObject.__)('Show more settings'));
   286     ...props,
   319 }
   287     children: (0,external_wp_i18n_namespaceObject.__)('Show more settings')
   320 
   288   });
   321 /* harmony default export */ var block_inspector_button = (BlockInspectorButton);
   289 }
   322 
   290 /* harmony default export */ const block_inspector_button = (BlockInspectorButton);
   323 // EXTERNAL MODULE: ./node_modules/classnames/index.js
   291 
   324 var classnames = __webpack_require__(4403);
   292 ;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
   325 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
   293 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
   326 ;// CONCATENATED MODULE: external ["wp","keycodes"]
   294 ;// CONCATENATED MODULE: external ["wp","keycodes"]
   327 var external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
   295 const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
   328 ;// CONCATENATED MODULE: external ["wp","primitives"]
   296 ;// CONCATENATED MODULE: external ["wp","primitives"]
   329 var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
   297 const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
   330 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
   298 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
   331 
   299 /**
   332 
   300  * WordPress dependencies
   333 /**
   301  */
   334  * WordPress dependencies
   302 
   335  */
   303 
   336 
   304 const undo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   337 const undo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   338   xmlns: "http://www.w3.org/2000/svg",
   305   xmlns: "http://www.w3.org/2000/svg",
   339   viewBox: "0 0 24 24"
   306   viewBox: "0 0 24 24",
   340 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   307   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   341   d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
   308     d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
   342 }));
   309   })
   343 /* harmony default export */ var library_undo = (undo);
   310 });
       
   311 /* harmony default export */ const library_undo = (undo);
   344 
   312 
   345 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
   313 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
   346 
   314 /**
   347 
   315  * WordPress dependencies
   348 /**
   316  */
   349  * WordPress dependencies
   317 
   350  */
   318 
   351 
   319 const redo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   352 const redo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   353   xmlns: "http://www.w3.org/2000/svg",
   320   xmlns: "http://www.w3.org/2000/svg",
   354   viewBox: "0 0 24 24"
   321   viewBox: "0 0 24 24",
   355 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   322   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   356   d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
   323     d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
   357 }));
   324   })
   358 /* harmony default export */ var library_redo = (redo);
   325 });
       
   326 /* harmony default export */ const library_redo = (redo);
   359 
   327 
   360 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
   328 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
   361 
   329 /**
   362 
   330  * WordPress dependencies
   363 /**
   331  */
   364  * WordPress dependencies
   332 
   365  */
   333 
   366 
   334 const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   367 const plus = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   368   xmlns: "http://www.w3.org/2000/svg",
   335   xmlns: "http://www.w3.org/2000/svg",
   369   viewBox: "0 0 24 24"
   336   viewBox: "0 0 24 24",
   370 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   337   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   371   d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
   338     d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
   372 }));
   339   })
   373 /* harmony default export */ var library_plus = (plus);
   340 });
       
   341 /* harmony default export */ const library_plus = (plus);
   374 
   342 
   375 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
   343 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
   376 
   344 /**
   377 
   345  * WordPress dependencies
   378 /**
   346  */
   379  * WordPress dependencies
   347 
   380  */
   348 
   381 
   349 const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   382 const closeSmall = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   383   xmlns: "http://www.w3.org/2000/svg",
   350   xmlns: "http://www.w3.org/2000/svg",
   384   viewBox: "0 0 24 24"
   351   viewBox: "0 0 24 24",
   385 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   352   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   386   d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
   353     d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
   387 }));
   354   })
   388 /* harmony default export */ var close_small = (closeSmall);
   355 });
       
   356 /* harmony default export */ const close_small = (closeSmall);
   389 
   357 
   390 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js
   358 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js
   391 /**
   359 /**
   392  * WordPress dependencies
   360  * WordPress dependencies
   393  */
   361  */
       
   362 
   394 
   363 
   395 /**
   364 /**
   396  * Reducer tracking whether the inserter is open.
   365  * Reducer tracking whether the inserter is open.
   397  *
   366  *
   398  * @param {boolean|Object} state
   367  * @param {boolean|Object} state
   399  * @param {Object}         action
   368  * @param {Object}         action
   400  */
   369  */
   401 
   370 function blockInserterPanel(state = false, action) {
   402 function blockInserterPanel() {
       
   403   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
   404   let action = arguments.length > 1 ? arguments[1] : undefined;
       
   405 
       
   406   switch (action.type) {
   371   switch (action.type) {
   407     case 'SET_IS_INSERTER_OPENED':
   372     case 'SET_IS_INSERTER_OPENED':
   408       return action.value;
   373       return action.value;
   409   }
   374   }
   410 
       
   411   return state;
   375   return state;
   412 }
   376 }
   413 
   377 /* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
   414 /* harmony default export */ var reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
       
   415   blockInserterPanel
   378   blockInserterPanel
   416 }));
   379 }));
   417 
   380 
   418 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
   381 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
       
   382 const EMPTY_INSERTION_POINT = {
       
   383   rootClientId: undefined,
       
   384   insertionIndex: undefined
       
   385 };
       
   386 
   419 /**
   387 /**
   420  * Returns true if the inserter is opened.
   388  * Returns true if the inserter is opened.
   421  *
   389  *
   422  * @param {Object} state Global application state.
   390  * @param {Object} state Global application state.
   423  *
   391  *
       
   392  * @example
       
   393  * ```js
       
   394  * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';
       
   395  * import { __ } from '@wordpress/i18n';
       
   396  * import { useSelect } from '@wordpress/data';
       
   397  *
       
   398  * const ExampleComponent = () => {
       
   399  *    const { isInserterOpened } = useSelect(
       
   400  *        ( select ) => select( customizeWidgetsStore ),
       
   401  *        []
       
   402  *    );
       
   403  *
       
   404  *    return isInserterOpened()
       
   405  *        ? __( 'Inserter is open' )
       
   406  *        : __( 'Inserter is closed.' );
       
   407  * };
       
   408  * ```
       
   409  *
   424  * @return {boolean} Whether the inserter is opened.
   410  * @return {boolean} Whether the inserter is opened.
   425  */
   411  */
   426 function isInserterOpened(state) {
   412 function isInserterOpened(state) {
   427   return !!state.blockInserterPanel;
   413   return !!state.blockInserterPanel;
   428 }
   414 }
       
   415 
   429 /**
   416 /**
   430  * Get the insertion point for the inserter.
   417  * Get the insertion point for the inserter.
   431  *
   418  *
   432  * @param {Object} state Global application state.
   419  * @param {Object} state Global application state.
   433  *
   420  *
   434  * @return {Object} The root client ID and index to insert at.
   421  * @return {Object} The root client ID and index to insert at.
   435  */
   422  */
   436 
       
   437 function __experimentalGetInsertionPoint(state) {
   423 function __experimentalGetInsertionPoint(state) {
   438   const {
   424   if (typeof state.blockInserterPanel === 'boolean') {
   439     rootClientId,
   425     return EMPTY_INSERTION_POINT;
   440     insertionIndex
   426   }
   441   } = state.blockInserterPanel;
   427   return state.blockInserterPanel;
   442   return {
       
   443     rootClientId,
       
   444     insertionIndex
       
   445   };
       
   446 }
   428 }
   447 
   429 
   448 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
   430 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
   449 /**
   431 /**
   450  * Returns an action object used to open/close the inserter.
   432  * Returns an action object used to open/close the inserter.
   454  *                                              To specify an insertion point,
   436  *                                              To specify an insertion point,
   455  *                                              use an object.
   437  *                                              use an object.
   456  * @param {string}         value.rootClientId   The root client ID to insert at.
   438  * @param {string}         value.rootClientId   The root client ID to insert at.
   457  * @param {number}         value.insertionIndex The index to insert at.
   439  * @param {number}         value.insertionIndex The index to insert at.
   458  *
   440  *
       
   441  * @example
       
   442  * ```js
       
   443  * import { useState } from 'react';
       
   444  * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';
       
   445  * import { __ } from '@wordpress/i18n';
       
   446  * import { useDispatch } from '@wordpress/data';
       
   447  * import { Button } from '@wordpress/components';
       
   448  *
       
   449  * const ExampleComponent = () => {
       
   450  *   const { setIsInserterOpened } = useDispatch( customizeWidgetsStore );
       
   451  *   const [ isOpen, setIsOpen ] = useState( false );
       
   452  *
       
   453  *    return (
       
   454  *        <Button
       
   455  *            onClick={ () => {
       
   456  *                setIsInserterOpened( ! isOpen );
       
   457  *                setIsOpen( ! isOpen );
       
   458  *            } }
       
   459  *        >
       
   460  *            { __( 'Open/close inserter' ) }
       
   461  *        </Button>
       
   462  *    );
       
   463  * };
       
   464  * ```
       
   465  *
   459  * @return {Object} Action object.
   466  * @return {Object} Action object.
   460  */
   467  */
   461 function setIsInserterOpened(value) {
   468 function setIsInserterOpened(value) {
   462   return {
   469   return {
   463     type: 'SET_IS_INSERTER_OPENED',
   470     type: 'SET_IS_INSERTER_OPENED',
   474 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/index.js
   481 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/index.js
   475 /**
   482 /**
   476  * WordPress dependencies
   483  * WordPress dependencies
   477  */
   484  */
   478 
   485 
       
   486 
   479 /**
   487 /**
   480  * Internal dependencies
   488  * Internal dependencies
   481  */
   489  */
   482 
   490 
   483 
   491 
   489  *
   497  *
   490  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registering-a-store
   498  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registering-a-store
   491  *
   499  *
   492  * @type {Object}
   500  * @type {Object}
   493  */
   501  */
   494 
       
   495 const storeConfig = {
   502 const storeConfig = {
   496   reducer: reducer,
   503   reducer: reducer,
   497   selectors: selectors_namespaceObject,
   504   selectors: selectors_namespaceObject,
   498   actions: actions_namespaceObject
   505   actions: actions_namespaceObject
   499 };
   506 };
       
   507 
   500 /**
   508 /**
   501  * Store definition for the edit widgets namespace.
   509  * Store definition for the edit widgets namespace.
   502  *
   510  *
   503  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
   511  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
   504  *
   512  *
   505  * @type {Object}
   513  * @type {Object}
   506  */
   514  */
   507 
       
   508 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig);
   515 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig);
   509 (0,external_wp_data_namespaceObject.register)(store);
   516 (0,external_wp_data_namespaceObject.register)(store);
   510 
   517 
   511 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/index.js
   518 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/index.js
   512 
   519 /**
   513 
   520  * WordPress dependencies
   514 /**
   521  */
   515  * WordPress dependencies
   522 
   516  */
       
   517 
   523 
   518 
   524 
   519 
   525 
   520 
   526 
   521 
   527 
   524  * Internal dependencies
   530  * Internal dependencies
   525  */
   531  */
   526 
   532 
   527 
   533 
   528 
   534 
   529 function Inserter(_ref) {
   535 function Inserter({
   530   let {
   536   setIsOpened
   531     setIsOpened
   537 }) {
   532   } = _ref;
       
   533   const inserterTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(Inserter, 'customize-widget-layout__inserter-panel-title');
   538   const inserterTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(Inserter, 'customize-widget-layout__inserter-panel-title');
   534   const insertionPoint = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).__experimentalGetInsertionPoint(), []);
   539   const insertionPoint = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).__experimentalGetInsertionPoint(), []);
   535   return (0,external_wp_element_namespaceObject.createElement)("div", {
   540   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
   536     className: "customize-widgets-layout__inserter-panel",
   541     className: "customize-widgets-layout__inserter-panel",
   537     "aria-labelledby": inserterTitleId
   542     "aria-labelledby": inserterTitleId,
   538   }, (0,external_wp_element_namespaceObject.createElement)("div", {
   543     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
   539     className: "customize-widgets-layout__inserter-panel-header"
   544       className: "customize-widgets-layout__inserter-panel-header",
   540   }, (0,external_wp_element_namespaceObject.createElement)("h2", {
   545       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
   541     id: inserterTitleId,
   546         id: inserterTitleId,
   542     className: "customize-widgets-layout__inserter-panel-header-title"
   547         className: "customize-widgets-layout__inserter-panel-header-title",
   543   }, (0,external_wp_i18n_namespaceObject.__)('Add a block')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
   548         children: (0,external_wp_i18n_namespaceObject.__)('Add a block')
   544     className: "customize-widgets-layout__inserter-panel-header-close-button",
   549       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
   545     icon: close_small,
   550         className: "customize-widgets-layout__inserter-panel-header-close-button",
   546     onClick: () => setIsOpened(false),
   551         icon: close_small,
   547     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Close inserter')
   552         onClick: () => setIsOpened(false),
   548   })), (0,external_wp_element_namespaceObject.createElement)("div", {
   553         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Close inserter')
   549     className: "customize-widgets-layout__inserter-panel-content"
   554       })]
   550   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, {
   555     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
   551     rootClientId: insertionPoint.rootClientId,
   556       className: "customize-widgets-layout__inserter-panel-content",
   552     __experimentalInsertionIndex: insertionPoint.insertionIndex,
   557       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, {
   553     showInserterHelpPanel: true,
   558         rootClientId: insertionPoint.rootClientId,
   554     onSelect: () => setIsOpened(false)
   559         __experimentalInsertionIndex: insertionPoint.insertionIndex,
   555   })));
   560         showInserterHelpPanel: true,
   556 }
   561         onSelect: () => setIsOpened(false)
   557 
   562       })
   558 /* harmony default export */ var components_inserter = (Inserter);
   563     })]
       
   564   });
       
   565 }
       
   566 /* harmony default export */ const components_inserter = (Inserter);
       
   567 
       
   568 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
       
   569 /**
       
   570  * WordPress dependencies
       
   571  */
       
   572 
       
   573 
       
   574 const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
   575   xmlns: "http://www.w3.org/2000/svg",
       
   576   viewBox: "0 0 24 24",
       
   577   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
   578     d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
       
   579   })
       
   580 });
       
   581 /* harmony default export */ const more_vertical = (moreVertical);
   559 
   582 
   560 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
   583 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
   561 
   584 /**
   562 
   585  * WordPress dependencies
   563 /**
   586  */
   564  * WordPress dependencies
   587 
   565  */
   588 
   566 
   589 const external = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   567 const external = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   568   xmlns: "http://www.w3.org/2000/svg",
   590   xmlns: "http://www.w3.org/2000/svg",
   569   viewBox: "0 0 24 24"
   591   viewBox: "0 0 24 24",
   570 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   592   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   571   d: "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"
   593     d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
   572 }));
   594   })
   573 /* harmony default export */ var library_external = (external);
       
   574 
       
   575 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
       
   576 
       
   577 
       
   578 /**
       
   579  * WordPress dependencies
       
   580  */
       
   581 
       
   582 const moreVertical = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   583   xmlns: "http://www.w3.org/2000/svg",
       
   584   viewBox: "0 0 24 24"
       
   585 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
   586   d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
       
   587 }));
       
   588 /* harmony default export */ var more_vertical = (moreVertical);
       
   589 
       
   590 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/more-menu-dropdown/index.js
       
   591 
       
   592 
       
   593 /**
       
   594  * External dependencies
       
   595  */
       
   596 
       
   597 /**
       
   598  * WordPress dependencies
       
   599  */
       
   600 
       
   601 
       
   602 
       
   603 
       
   604 function MoreMenuDropdown(_ref) {
       
   605   let {
       
   606     as: DropdownComponent = external_wp_components_namespaceObject.DropdownMenu,
       
   607     className,
       
   608 
       
   609     /* translators: button label text should, if possible, be under 16 characters. */
       
   610     label = (0,external_wp_i18n_namespaceObject.__)('Options'),
       
   611     popoverProps,
       
   612     toggleProps,
       
   613     children
       
   614   } = _ref;
       
   615   return (0,external_wp_element_namespaceObject.createElement)(DropdownComponent, {
       
   616     className: classnames_default()('interface-more-menu-dropdown', className),
       
   617     icon: more_vertical,
       
   618     label: label,
       
   619     popoverProps: {
       
   620       position: 'bottom left',
       
   621       ...popoverProps,
       
   622       className: classnames_default()('interface-more-menu-dropdown__content', popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.className)
       
   623     },
       
   624     toggleProps: {
       
   625       tooltipPosition: 'bottom',
       
   626       ...toggleProps
       
   627     }
       
   628   }, onClose => children(onClose));
       
   629 }
       
   630 
       
   631 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
       
   632 
       
   633 
       
   634 
       
   635 
       
   636 
       
   637 
       
   638 
       
   639 
       
   640 
       
   641 
       
   642 
       
   643 
       
   644 
       
   645 ;// CONCATENATED MODULE: external ["wp","deprecated"]
       
   646 var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
       
   647 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
       
   648 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
       
   649 /**
       
   650  * WordPress dependencies
       
   651  */
       
   652 
       
   653 
       
   654 /**
       
   655  * Enable the complementary area.
       
   656  *
       
   657  * @param {string} scope Complementary area scope.
       
   658  * @param {string} area  Area identifier.
       
   659  */
       
   660 
       
   661 const enableComplementaryArea = (scope, area) => _ref => {
       
   662   let {
       
   663     registry
       
   664   } = _ref;
       
   665 
       
   666   // Return early if there's no area.
       
   667   if (!area) {
       
   668     return;
       
   669   }
       
   670 
       
   671   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', area);
       
   672 };
       
   673 /**
       
   674  * Disable the complementary area.
       
   675  *
       
   676  * @param {string} scope Complementary area scope.
       
   677  */
       
   678 
       
   679 const disableComplementaryArea = scope => _ref2 => {
       
   680   let {
       
   681     registry
       
   682   } = _ref2;
       
   683   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', null);
       
   684 };
       
   685 /**
       
   686  * Pins an item.
       
   687  *
       
   688  * @param {string} scope Item scope.
       
   689  * @param {string} item  Item identifier.
       
   690  *
       
   691  * @return {Object} Action object.
       
   692  */
       
   693 
       
   694 const pinItem = (scope, item) => _ref3 => {
       
   695   let {
       
   696     registry
       
   697   } = _ref3;
       
   698 
       
   699   // Return early if there's no item.
       
   700   if (!item) {
       
   701     return;
       
   702   }
       
   703 
       
   704   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems'); // The item is already pinned, there's nothing to do.
       
   705 
       
   706   if ((pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) === true) {
       
   707     return;
       
   708   }
       
   709 
       
   710   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems,
       
   711     [item]: true
       
   712   });
       
   713 };
       
   714 /**
       
   715  * Unpins an item.
       
   716  *
       
   717  * @param {string} scope Item scope.
       
   718  * @param {string} item  Item identifier.
       
   719  */
       
   720 
       
   721 const unpinItem = (scope, item) => _ref4 => {
       
   722   let {
       
   723     registry
       
   724   } = _ref4;
       
   725 
       
   726   // Return early if there's no item.
       
   727   if (!item) {
       
   728     return;
       
   729   }
       
   730 
       
   731   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
       
   732   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems,
       
   733     [item]: false
       
   734   });
       
   735 };
       
   736 /**
       
   737  * Returns an action object used in signalling that a feature should be toggled.
       
   738  *
       
   739  * @param {string} scope       The feature scope (e.g. core/edit-post).
       
   740  * @param {string} featureName The feature name.
       
   741  */
       
   742 
       
   743 function toggleFeature(scope, featureName) {
       
   744   return function (_ref5) {
       
   745     let {
       
   746       registry
       
   747     } = _ref5;
       
   748     external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, {
       
   749       since: '6.0',
       
   750       alternative: `dispatch( 'core/preferences' ).toggle`
       
   751     });
       
   752     registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName);
       
   753   };
       
   754 }
       
   755 /**
       
   756  * Returns an action object used in signalling that a feature should be set to
       
   757  * a true or false value
       
   758  *
       
   759  * @param {string}  scope       The feature scope (e.g. core/edit-post).
       
   760  * @param {string}  featureName The feature name.
       
   761  * @param {boolean} value       The value to set.
       
   762  *
       
   763  * @return {Object} Action object.
       
   764  */
       
   765 
       
   766 function setFeatureValue(scope, featureName, value) {
       
   767   return function (_ref6) {
       
   768     let {
       
   769       registry
       
   770     } = _ref6;
       
   771     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, {
       
   772       since: '6.0',
       
   773       alternative: `dispatch( 'core/preferences' ).set`
       
   774     });
       
   775     registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value);
       
   776   };
       
   777 }
       
   778 /**
       
   779  * Returns an action object used in signalling that defaults should be set for features.
       
   780  *
       
   781  * @param {string}                  scope    The feature scope (e.g. core/edit-post).
       
   782  * @param {Object<string, boolean>} defaults A key/value map of feature names to values.
       
   783  *
       
   784  * @return {Object} Action object.
       
   785  */
       
   786 
       
   787 function setFeatureDefaults(scope, defaults) {
       
   788   return function (_ref7) {
       
   789     let {
       
   790       registry
       
   791     } = _ref7;
       
   792     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, {
       
   793       since: '6.0',
       
   794       alternative: `dispatch( 'core/preferences' ).setDefaults`
       
   795     });
       
   796     registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults);
       
   797   };
       
   798 }
       
   799 
       
   800 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
       
   801 /**
       
   802  * WordPress dependencies
       
   803  */
       
   804 
       
   805 
       
   806 
       
   807 /**
       
   808  * Returns the complementary area that is active in a given scope.
       
   809  *
       
   810  * @param {Object} state Global application state.
       
   811  * @param {string} scope Item scope.
       
   812  *
       
   813  * @return {string} The complementary area that is active in the given scope.
       
   814  */
       
   815 
       
   816 const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
       
   817   return select(external_wp_preferences_namespaceObject.store).get(scope, 'complementaryArea');
       
   818 });
   595 });
   819 /**
   596 /* harmony default export */ const library_external = (external);
   820  * Returns a boolean indicating if an item is pinned or not.
   597 
   821  *
   598 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
   822  * @param {Object} state Global application state.
   599 const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
   823  * @param {string} scope Scope.
       
   824  * @param {string} item  Item to check.
       
   825  *
       
   826  * @return {boolean} True if the item is pinned and false otherwise.
       
   827  */
       
   828 
       
   829 const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => {
       
   830   var _pinnedItems$item;
       
   831 
       
   832   const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
       
   833   return (_pinnedItems$item = pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
       
   834 });
       
   835 /**
       
   836  * Returns a boolean indicating whether a feature is active for a particular
       
   837  * scope.
       
   838  *
       
   839  * @param {Object} state       The store state.
       
   840  * @param {string} scope       The scope of the feature (e.g. core/edit-post).
       
   841  * @param {string} featureName The name of the feature.
       
   842  *
       
   843  * @return {boolean} Is the feature enabled?
       
   844  */
       
   845 
       
   846 const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => {
       
   847   external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
       
   848     since: '6.0',
       
   849     alternative: `select( 'core/preferences' ).get( scope, featureName )`
       
   850   });
       
   851   return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName);
       
   852 });
       
   853 
       
   854 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
       
   855 /**
       
   856  * The identifier for the data store.
       
   857  *
       
   858  * @type {string}
       
   859  */
       
   860 const constants_STORE_NAME = 'core/interface';
       
   861 
       
   862 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
       
   863 /**
       
   864  * WordPress dependencies
       
   865  */
       
   866 
       
   867 /**
       
   868  * Internal dependencies
       
   869  */
       
   870 
       
   871 
       
   872 
       
   873 
       
   874 /**
       
   875  * Store definition for the interface namespace.
       
   876  *
       
   877  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
       
   878  *
       
   879  * @type {Object}
       
   880  */
       
   881 
       
   882 const store_store = (0,external_wp_data_namespaceObject.createReduxStore)(constants_STORE_NAME, {
       
   883   reducer: () => {},
       
   884   actions: store_actions_namespaceObject,
       
   885   selectors: store_selectors_namespaceObject
       
   886 }); // Once we build a more generic persistence plugin that works across types of stores
       
   887 // we'd be able to replace this with a register call.
       
   888 
       
   889 (0,external_wp_data_namespaceObject.register)(store_store);
       
   890 
       
   891 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
       
   892 
       
   893 
       
   894 
       
   895 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
   600 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
   896 /**
   601 /**
   897  * WordPress dependencies
   602  * WordPress dependencies
   898  */
   603  */
   899 
   604 
   921     character: 'k'
   626     character: 'k'
   922   },
   627   },
   923   description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.')
   628   description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.')
   924 }, {
   629 }, {
   925   keyCombination: {
   630   keyCombination: {
       
   631     character: '[['
       
   632   },
       
   633   description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.')
       
   634 }, {
       
   635   keyCombination: {
   926     modifier: 'primary',
   636     modifier: 'primary',
   927     character: 'u'
   637     character: 'u'
   928   },
   638   },
   929   description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.')
   639   description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.')
       
   640 }, {
       
   641   keyCombination: {
       
   642     modifier: 'access',
       
   643     character: 'd'
       
   644   },
       
   645   description: (0,external_wp_i18n_namespaceObject.__)('Strikethrough the selected text.')
       
   646 }, {
       
   647   keyCombination: {
       
   648     modifier: 'access',
       
   649     character: 'x'
       
   650   },
       
   651   description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text inline code.')
       
   652 }, {
       
   653   keyCombination: {
       
   654     modifier: 'access',
       
   655     character: '0'
       
   656   },
       
   657   aliases: [{
       
   658     modifier: 'access',
       
   659     character: '7'
       
   660   }],
       
   661   description: (0,external_wp_i18n_namespaceObject.__)('Convert the current heading to a paragraph.')
       
   662 }, {
       
   663   keyCombination: {
       
   664     modifier: 'access',
       
   665     character: '1-6'
       
   666   },
       
   667   description: (0,external_wp_i18n_namespaceObject.__)('Convert the current paragraph or heading to a heading of level 1 to 6.')
       
   668 }, {
       
   669   keyCombination: {
       
   670     modifier: 'primaryShift',
       
   671     character: 'SPACE'
       
   672   },
       
   673   description: (0,external_wp_i18n_namespaceObject.__)('Add non breaking space.')
   930 }];
   674 }];
   931 
   675 
   932 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
   676 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
   933 
   677 /**
   934 
   678  * WordPress dependencies
   935 /**
   679  */
   936  * External dependencies
   680 
   937  */
   681 
   938 
   682 
   939 /**
   683 
   940  * WordPress dependencies
   684 
   941  */
   685 function KeyCombination({
   942 
   686   keyCombination,
   943 
   687   forceAriaLabel
   944 
   688 }) {
   945 
       
   946 function KeyCombination(_ref) {
       
   947   let {
       
   948     keyCombination,
       
   949     forceAriaLabel
       
   950   } = _ref;
       
   951   const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
   689   const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
   952   const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
   690   const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
   953   return (0,external_wp_element_namespaceObject.createElement)("kbd", {
   691   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {
   954     className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
   692     className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
   955     "aria-label": forceAriaLabel || ariaLabel
   693     "aria-label": forceAriaLabel || ariaLabel,
   956   }, (0,external_lodash_namespaceObject.castArray)(shortcut).map((character, index) => {
   694     children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
   957     if (character === '+') {
   695       if (character === '+') {
   958       return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, {
   696         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, {
   959         key: index
   697           children: character
   960       }, character);
   698         }, index);
   961     }
   699       }
   962 
   700       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {
   963     return (0,external_wp_element_namespaceObject.createElement)("kbd", {
   701         className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
   964       key: index,
   702         children: character
   965       className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key"
   703       }, index);
   966     }, character);
   704     })
   967   }));
   705   });
   968 }
   706 }
   969 
   707 function Shortcut({
   970 function Shortcut(_ref2) {
   708   description,
   971   let {
   709   keyCombination,
   972     description,
   710   aliases = [],
   973     keyCombination,
   711   ariaLabel
   974     aliases = [],
   712 }) {
   975     ariaLabel
   713   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
   976   } = _ref2;
   714     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
   977   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
   715       className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description",
   978     className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description"
   716       children: description
   979   }, description), (0,external_wp_element_namespaceObject.createElement)("div", {
   717     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
   980     className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term"
   718       className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term",
   981   }, (0,external_wp_element_namespaceObject.createElement)(KeyCombination, {
   719       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, {
   982     keyCombination: keyCombination,
   720         keyCombination: keyCombination,
   983     forceAriaLabel: ariaLabel
   721         forceAriaLabel: ariaLabel
   984   }), aliases.map((alias, index) => (0,external_wp_element_namespaceObject.createElement)(KeyCombination, {
   722       }), aliases.map((alias, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, {
   985     keyCombination: alias,
   723         keyCombination: alias,
   986     forceAriaLabel: ariaLabel,
   724         forceAriaLabel: ariaLabel
   987     key: index
   725       }, index))]
   988   }))));
   726     })]
   989 }
   727   });
   990 
   728 }
   991 /* harmony default export */ var keyboard_shortcut_help_modal_shortcut = (Shortcut);
   729 /* harmony default export */ const keyboard_shortcut_help_modal_shortcut = (Shortcut);
   992 
   730 
   993 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
   731 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
   994 
   732 /**
   995 
   733  * WordPress dependencies
   996 /**
   734  */
   997  * WordPress dependencies
   735 
   998  */
       
   999 
   736 
  1000 
   737 
  1001 /**
   738 /**
  1002  * Internal dependencies
   739  * Internal dependencies
  1003  */
   740  */
  1004 
   741 
  1005 
   742 
  1006 
   743 function DynamicShortcut({
  1007 function DynamicShortcut(_ref) {
   744   name
  1008   let {
   745 }) {
  1009     name
       
  1010   } = _ref;
       
  1011   const {
   746   const {
  1012     keyCombination,
   747     keyCombination,
  1013     description,
   748     description,
  1014     aliases
   749     aliases
  1015   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
   750   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  1022       keyCombination: getShortcutKeyCombination(name),
   757       keyCombination: getShortcutKeyCombination(name),
  1023       aliases: getShortcutAliases(name),
   758       aliases: getShortcutAliases(name),
  1024       description: getShortcutDescription(name)
   759       description: getShortcutDescription(name)
  1025     };
   760     };
  1026   }, [name]);
   761   }, [name]);
  1027 
       
  1028   if (!keyCombination) {
   762   if (!keyCombination) {
  1029     return null;
   763     return null;
  1030   }
   764   }
  1031 
   765   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, {
  1032   return (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, {
       
  1033     keyCombination: keyCombination,
   766     keyCombination: keyCombination,
  1034     description: description,
   767     description: description,
  1035     aliases: aliases
   768     aliases: aliases
  1036   });
   769   });
  1037 }
   770 }
  1038 
   771 /* harmony default export */ const dynamic_shortcut = (DynamicShortcut);
  1039 /* harmony default export */ var dynamic_shortcut = (DynamicShortcut);
       
  1040 
   772 
  1041 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
   773 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
  1042 
       
  1043 
       
  1044 /**
   774 /**
  1045  * External dependencies
   775  * External dependencies
  1046  */
   776  */
  1047 
   777 
  1048 
   778 
  1060 
   790 
  1061 
   791 
  1062 
   792 
  1063 
   793 
  1064 
   794 
  1065 const ShortcutList = _ref => {
   795 const ShortcutList = ({
  1066   let {
   796   shortcuts
  1067     shortcuts
   797 }) =>
  1068   } = _ref;
   798 /*#__PURE__*/
  1069   return (
   799 /*
  1070     /*
   800  * Disable reason: The `list` ARIA role is redundant but
  1071      * Disable reason: The `list` ARIA role is redundant but
   801  * Safari+VoiceOver won't announce the list otherwise.
  1072      * Safari+VoiceOver won't announce the list otherwise.
   802  */
  1073      */
   803 /* eslint-disable jsx-a11y/no-redundant-roles */
  1074 
   804 (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
  1075     /* eslint-disable jsx-a11y/no-redundant-roles */
   805   className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
  1076     (0,external_wp_element_namespaceObject.createElement)("ul", {
   806   role: "list",
  1077       className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
   807   children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
  1078       role: "list"
   808     className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
  1079     }, shortcuts.map((shortcut, index) => (0,external_wp_element_namespaceObject.createElement)("li", {
   809     children: typeof shortcut === 'string' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dynamic_shortcut, {
  1080       className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
       
  1081       key: index
       
  1082     }, (0,external_lodash_namespaceObject.isString)(shortcut) ? (0,external_wp_element_namespaceObject.createElement)(dynamic_shortcut, {
       
  1083       name: shortcut
   810       name: shortcut
  1084     }) : (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, shortcut))))
   811     }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, {
  1085     /* eslint-enable jsx-a11y/no-redundant-roles */
   812       ...shortcut
  1086 
   813     })
  1087   );
   814   }, index))
  1088 };
   815 })
  1089 
   816 /* eslint-enable jsx-a11y/no-redundant-roles */;
  1090 const ShortcutSection = _ref2 => {
   817 const ShortcutSection = ({
  1091   let {
   818   title,
  1092     title,
   819   shortcuts,
  1093     shortcuts,
   820   className
  1094     className
   821 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("section", {
  1095   } = _ref2;
   822   className: dist_clsx('customize-widgets-keyboard-shortcut-help-modal__section', className),
  1096   return (0,external_wp_element_namespaceObject.createElement)("section", {
   823   children: [!!title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
  1097     className: classnames_default()('customize-widgets-keyboard-shortcut-help-modal__section', className)
   824     className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
  1098   }, !!title && (0,external_wp_element_namespaceObject.createElement)("h2", {
   825     children: title
  1099     className: "customize-widgets-keyboard-shortcut-help-modal__section-title"
   826   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutList, {
  1100   }, title), (0,external_wp_element_namespaceObject.createElement)(ShortcutList, {
       
  1101     shortcuts: shortcuts
   827     shortcuts: shortcuts
  1102   }));
   828   })]
  1103 };
   829 });
  1104 
   830 const ShortcutCategorySection = ({
  1105 const ShortcutCategorySection = _ref3 => {
   831   title,
  1106   let {
   832   categoryName,
  1107     title,
   833   additionalShortcuts = []
  1108     categoryName,
   834 }) => {
  1109     additionalShortcuts = []
       
  1110   } = _ref3;
       
  1111   const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => {
   835   const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => {
  1112     return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName);
   836     return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName);
  1113   }, [categoryName]);
   837   }, [categoryName]);
  1114   return (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
   838   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
  1115     title: title,
   839     title: title,
  1116     shortcuts: categoryShortcuts.concat(additionalShortcuts)
   840     shortcuts: categoryShortcuts.concat(additionalShortcuts)
  1117   });
   841   });
  1118 };
   842 };
  1119 
   843 function KeyboardShortcutHelpModal({
  1120 function KeyboardShortcutHelpModal(_ref4) {
   844   isModalActive,
  1121   let {
   845   toggleModal
  1122     isModalActive,
   846 }) {
  1123     toggleModal
       
  1124   } = _ref4;
       
  1125   const {
   847   const {
  1126     registerShortcut
   848     registerShortcut
  1127   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
   849   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
  1128   registerShortcut({
   850   registerShortcut({
  1129     name: 'core/customize-widgets/keyboard-shortcuts',
   851     name: 'core/customize-widgets/keyboard-shortcuts',
  1133       modifier: 'access',
   855       modifier: 'access',
  1134       character: 'h'
   856       character: 'h'
  1135     }
   857     }
  1136   });
   858   });
  1137   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleModal);
   859   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleModal);
  1138 
       
  1139   if (!isModalActive) {
   860   if (!isModalActive) {
  1140     return null;
   861     return null;
  1141   }
   862   }
  1142 
   863   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Modal, {
  1143   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
       
  1144     className: "customize-widgets-keyboard-shortcut-help-modal",
   864     className: "customize-widgets-keyboard-shortcut-help-modal",
  1145     title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
   865     title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
  1146     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
   866     onRequestClose: toggleModal,
  1147     onRequestClose: toggleModal
   867     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
  1148   }, (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
   868       className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
  1149     className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
   869       shortcuts: ['core/customize-widgets/keyboard-shortcuts']
  1150     shortcuts: ['core/customize-widgets/keyboard-shortcuts']
   870     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  1151   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
   871       title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'),
  1152     title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'),
   872       categoryName: "global"
  1153     categoryName: "global"
   873     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  1154   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
   874       title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'),
  1155     title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'),
   875       categoryName: "selection"
  1156     categoryName: "selection"
   876     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  1157   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
   877       title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
  1158     title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
   878       categoryName: "block",
  1159     categoryName: "block",
   879       additionalShortcuts: [{
  1160     additionalShortcuts: [{
   880         keyCombination: {
  1161       keyCombination: {
   881           character: '/'
  1162         character: '/'
   882         },
  1163       },
   883         description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'),
  1164       description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'),
   884         /* translators: The forward-slash character. e.g. '/'. */
  1165 
   885         ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash')
  1166       /* translators: The forward-slash character. e.g. '/'. */
   886       }]
  1167       ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash')
   887     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
  1168     }]
   888       title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'),
  1169   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
   889       shortcuts: textFormattingShortcuts
  1170     title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'),
   890     })]
  1171     shortcuts: textFormattingShortcuts
   891   });
  1172   }));
       
  1173 }
   892 }
  1174 
   893 
  1175 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/more-menu/index.js
   894 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/more-menu/index.js
  1176 
       
  1177 
       
  1178 /**
   895 /**
  1179  * WordPress dependencies
   896  * WordPress dependencies
  1180  */
   897  */
  1181 
   898 
  1182 
   899 
  1187 
   904 
  1188 
   905 
  1189 /**
   906 /**
  1190  * Internal dependencies
   907  * Internal dependencies
  1191  */
   908  */
       
   909 
       
   910 
  1192 
   911 
  1193 
   912 
  1194 function MoreMenu() {
   913 function MoreMenu() {
  1195   const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
   914   const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
  1196 
       
  1197   const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
   915   const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
  1198 
       
  1199   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
   916   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
  1200   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(MoreMenuDropdown, {
   917   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1201     as: external_wp_components_namespaceObject.ToolbarDropdownMenu
   918     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarDropdownMenu, {
  1202   }, () => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
   919       icon: more_vertical,
  1203     label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun')
   920       label: (0,external_wp_i18n_namespaceObject.__)('Options'),
  1204   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
   921       popoverProps: {
  1205     scope: "core/customize-widgets",
   922         placement: 'bottom-end',
  1206     name: "fixedToolbar",
   923         className: 'more-menu-dropdown__content'
  1207     label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'),
   924       },
  1208     info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'),
   925       toggleProps: {
  1209     messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'),
   926         tooltipPosition: 'bottom',
  1210     messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated')
   927         size: 'compact'
  1211   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
   928       },
  1212     label: (0,external_wp_i18n_namespaceObject.__)('Tools')
   929       children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1213   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
   930         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
  1214     onClick: () => {
   931           label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun'),
  1215       setIsKeyboardShortcutsModalVisible(true);
   932           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  1216     },
   933             scope: "core/customize-widgets",
  1217     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h')
   934             name: "fixedToolbar",
  1218   }, (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
   935             label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'),
  1219     scope: "core/customize-widgets",
   936             info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'),
  1220     name: "welcomeGuide",
   937             messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'),
  1221     label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
   938             messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated')
  1222   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
   939           })
  1223     role: "menuitem",
   940         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
  1224     icon: library_external,
   941           label: (0,external_wp_i18n_namespaceObject.__)('Tools'),
  1225     href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/block-based-widgets-editor/'),
   942           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
  1226     target: "_blank",
   943             onClick: () => {
  1227     rel: "noopener noreferrer"
   944               setIsKeyboardShortcutsModalVisible(true);
  1228   }, (0,external_wp_i18n_namespaceObject.__)('Help'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
   945             },
  1229     as: "span"
   946             shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h'),
  1230   },
   947             children: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')
  1231   /* translators: accessibility text */
   948           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  1232   (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)')))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
   949             scope: "core/customize-widgets",
  1233     label: (0,external_wp_i18n_namespaceObject.__)('Preferences')
   950             name: "welcomeGuide",
  1234   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
   951             label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
  1235     scope: "core/customize-widgets",
   952           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuItem, {
  1236     name: "keepCaretInsideBlock",
   953             role: "menuitem",
  1237     label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'),
   954             icon: library_external,
  1238     info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'),
   955             href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
  1239     messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'),
   956             target: "_blank",
  1240     messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated')
   957             rel: "noopener noreferrer",
  1241   })))), (0,external_wp_element_namespaceObject.createElement)(KeyboardShortcutHelpModal, {
   958             children: [(0,external_wp_i18n_namespaceObject.__)('Help'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
  1242     isModalActive: isKeyboardShortcutsModalActive,
   959               as: "span",
  1243     toggleModal: toggleKeyboardShortcutsModal
   960               children: /* translators: accessibility text */
  1244   }));
   961               (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)')
       
   962             })]
       
   963           })]
       
   964         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
       
   965           label: (0,external_wp_i18n_namespaceObject.__)('Preferences'),
       
   966           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
       
   967             scope: "core/customize-widgets",
       
   968             name: "keepCaretInsideBlock",
       
   969             label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'),
       
   970             info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'),
       
   971             messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'),
       
   972             messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated')
       
   973           })
       
   974         })]
       
   975       })
       
   976     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyboardShortcutHelpModal, {
       
   977       isModalActive: isKeyboardShortcutsModalActive,
       
   978       toggleModal: toggleKeyboardShortcutsModal
       
   979     })]
       
   980   });
  1245 }
   981 }
  1246 
   982 
  1247 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/header/index.js
   983 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/header/index.js
  1248 
       
  1249 
       
  1250 /**
   984 /**
  1251  * External dependencies
   985  * External dependencies
  1252  */
   986  */
  1253 
   987 
       
   988 
  1254 /**
   989 /**
  1255  * WordPress dependencies
   990  * WordPress dependencies
  1256  */
   991  */
  1257 
   992 
  1258 
   993 
  1266  */
  1001  */
  1267 
  1002 
  1268 
  1003 
  1269 
  1004 
  1270 
  1005 
  1271 function Header(_ref) {
  1006 
  1272   let {
  1007 function Header({
  1273     sidebar,
  1008   sidebar,
  1274     inserter,
  1009   inserter,
  1275     isInserterOpened,
  1010   isInserterOpened,
  1276     setIsInserterOpened,
  1011   setIsInserterOpened,
  1277     isFixedToolbarActive
  1012   isFixedToolbarActive
  1278   } = _ref;
  1013 }) {
  1279   const [[hasUndo, hasRedo], setUndoRedo] = (0,external_wp_element_namespaceObject.useState)([sidebar.hasUndo(), sidebar.hasRedo()]);
  1014   const [[hasUndo, hasRedo], setUndoRedo] = (0,external_wp_element_namespaceObject.useState)([sidebar.hasUndo(), sidebar.hasRedo()]);
       
  1015   const shortcut = (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') : external_wp_keycodes_namespaceObject.displayShortcut.primary('y');
  1280   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1016   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1281     return sidebar.subscribeHistory(() => {
  1017     return sidebar.subscribeHistory(() => {
  1282       setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]);
  1018       setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]);
  1283     });
  1019     });
  1284   }, [sidebar]);
  1020   }, [sidebar]);
  1285   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
  1021   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1286     className: classnames_default()('customize-widgets-header', {
  1022     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1287       'is-fixed-toolbar-active': isFixedToolbarActive
  1023       className: dist_clsx('customize-widgets-header', {
  1288     })
  1024         'is-fixed-toolbar-active': isFixedToolbarActive
  1289   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.NavigableToolbar, {
  1025       }),
  1290     className: "customize-widgets-header-toolbar",
  1026       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.NavigableToolbar, {
  1291     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools')
  1027         className: "customize-widgets-header-toolbar",
  1292   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
  1028         "aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools'),
  1293     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo
  1029         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
  1294     /* translators: button label text should, if possible, be under 16 characters. */
  1030           icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo
  1295     ,
  1031           /* translators: button label text should, if possible, be under 16 characters. */,
  1296     label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
  1032           label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
  1297     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z') // If there are no undo levels we don't want to actually disable this
  1033           shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z')
  1298     // button, because it will remove focus for keyboard users.
  1034           // If there are no undo levels we don't want to actually disable this
  1299     // See: https://github.com/WordPress/gutenberg/issues/3486
  1035           // button, because it will remove focus for keyboard users.
  1300     ,
  1036           // See: https://github.com/WordPress/gutenberg/issues/3486
  1301     "aria-disabled": !hasUndo,
  1037           ,
  1302     onClick: sidebar.undo,
  1038           "aria-disabled": !hasUndo,
  1303     className: "customize-widgets-editor-history-button undo-button"
  1039           onClick: sidebar.undo,
  1304   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
  1040           className: "customize-widgets-editor-history-button undo-button"
  1305     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo
  1041         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
  1306     /* translators: button label text should, if possible, be under 16 characters. */
  1042           icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo
  1307     ,
  1043           /* translators: button label text should, if possible, be under 16 characters. */,
  1308     label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
  1044           label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
  1309     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') // If there are no undo levels we don't want to actually disable this
  1045           shortcut: shortcut
  1310     // button, because it will remove focus for keyboard users.
  1046           // If there are no undo levels we don't want to actually disable this
  1311     // See: https://github.com/WordPress/gutenberg/issues/3486
  1047           // button, because it will remove focus for keyboard users.
  1312     ,
  1048           // See: https://github.com/WordPress/gutenberg/issues/3486
  1313     "aria-disabled": !hasRedo,
  1049           ,
  1314     onClick: sidebar.redo,
  1050           "aria-disabled": !hasRedo,
  1315     className: "customize-widgets-editor-history-button redo-button"
  1051           onClick: sidebar.redo,
  1316   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
  1052           className: "customize-widgets-editor-history-button redo-button"
  1317     className: "customize-widgets-header-toolbar__inserter-toggle",
  1053         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
  1318     isPressed: isInserterOpened,
  1054           className: "customize-widgets-header-toolbar__inserter-toggle",
  1319     variant: "primary",
  1055           isPressed: isInserterOpened,
  1320     icon: library_plus,
  1056           variant: "primary",
  1321     label: (0,external_wp_i18n_namespaceObject._x)('Add block', 'Generic label for block inserter button'),
  1057           icon: library_plus,
  1322     onClick: () => {
  1058           label: (0,external_wp_i18n_namespaceObject._x)('Add block', 'Generic label for block inserter button'),
  1323       setIsInserterOpened(isOpen => !isOpen);
  1059           onClick: () => {
  1324     }
  1060             setIsInserterOpened(isOpen => !isOpen);
  1325   }), (0,external_wp_element_namespaceObject.createElement)(MoreMenu, null))), (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(components_inserter, {
  1061           }
  1326     setIsOpened: setIsInserterOpened
  1062         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {})]
  1327   }), inserter.contentContainer[0]));
  1063       })
  1328 }
  1064     }), (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(components_inserter, {
  1329 
  1065       setIsOpened: setIsInserterOpened
  1330 /* harmony default export */ var header = (Header);
  1066     }), inserter.contentContainer[0])]
       
  1067   });
       
  1068 }
       
  1069 /* harmony default export */ const header = (Header);
  1331 
  1070 
  1332 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js
  1071 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js
  1333 /**
  1072 /**
  1334  * WordPress dependencies
  1073  * WordPress dependencies
  1335  */
  1074  */
  1336 
  1075 
  1337 
  1076 
       
  1077 
  1338 /**
  1078 /**
  1339  * Internal dependencies
  1079  * Internal dependencies
  1340  */
  1080  */
  1341 
       
  1342 
  1081 
  1343 function useInserter(inserter) {
  1082 function useInserter(inserter) {
  1344   const isInserterOpened = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isInserterOpened(), []);
  1083   const isInserterOpened = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isInserterOpened(), []);
  1345   const {
  1084   const {
  1346     setIsInserterOpened
  1085     setIsInserterOpened
  1352       inserter.close();
  1091       inserter.close();
  1353     }
  1092     }
  1354   }, [inserter, isInserterOpened]);
  1093   }, [inserter, isInserterOpened]);
  1355   return [isInserterOpened, (0,external_wp_element_namespaceObject.useCallback)(updater => {
  1094   return [isInserterOpened, (0,external_wp_element_namespaceObject.useCallback)(updater => {
  1356     let isOpen = updater;
  1095     let isOpen = updater;
  1357 
       
  1358     if (typeof updater === 'function') {
  1096     if (typeof updater === 'function') {
  1359       isOpen = updater((0,external_wp_data_namespaceObject.select)(store).isInserterOpened());
  1097       isOpen = updater((0,external_wp_data_namespaceObject.select)(store).isInserterOpened());
  1360     }
  1098     }
  1361 
       
  1362     setIsInserterOpened(isOpen);
  1099     setIsInserterOpened(isOpen);
  1363   }, [setIsInserterOpened])];
  1100   }, [setIsInserterOpened])];
  1364 }
  1101 }
  1365 
  1102 
       
  1103 // EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
       
  1104 var es6 = __webpack_require__(7734);
       
  1105 var es6_default = /*#__PURE__*/__webpack_require__.n(es6);
  1366 ;// CONCATENATED MODULE: external ["wp","isShallowEqual"]
  1106 ;// CONCATENATED MODULE: external ["wp","isShallowEqual"]
  1367 var external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"];
  1107 const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"];
  1368 var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject);
  1108 var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject);
  1369 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js
  1109 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js
  1370 // @ts-check
  1110 // @ts-check
  1371 
  1111 /**
  1372 /**
  1112  * WordPress dependencies
  1373  * WordPress dependencies
  1113  */
  1374  */
  1114 
  1375 
       
  1376 
       
  1377 /**
       
  1378  * External dependencies
       
  1379  */
       
  1380 
  1115 
  1381 
  1116 
  1382 /**
  1117 /**
  1383  * Convert settingId to widgetId.
  1118  * Convert settingId to widgetId.
  1384  *
  1119  *
  1385  * @param {string} settingId The setting id.
  1120  * @param {string} settingId The setting id.
  1386  * @return {string} The widget id.
  1121  * @return {string} The widget id.
  1387  */
  1122  */
  1388 
       
  1389 function settingIdToWidgetId(settingId) {
  1123 function settingIdToWidgetId(settingId) {
  1390   const matches = settingId.match(/^widget_(.+)(?:\[(\d+)\])$/);
  1124   const matches = settingId.match(/^widget_(.+)(?:\[(\d+)\])$/);
  1391 
       
  1392   if (matches) {
  1125   if (matches) {
  1393     const idBase = matches[1];
  1126     const idBase = matches[1];
  1394     const number = parseInt(matches[2], 10);
  1127     const number = parseInt(matches[2], 10);
  1395     return `${idBase}-${number}`;
  1128     return `${idBase}-${number}`;
  1396   }
  1129   }
  1397 
       
  1398   return settingId;
  1130   return settingId;
  1399 }
  1131 }
       
  1132 
  1400 /**
  1133 /**
  1401  * Transform a block to a customizable widget.
  1134  * Transform a block to a customizable widget.
  1402  *
  1135  *
  1403  * @param {WPBlock} block          The block to be transformed from.
  1136  * @param {WPBlock} block          The block to be transformed from.
  1404  * @param {Object}  existingWidget The widget to be extended from.
  1137  * @param {Object}  existingWidget The widget to be extended from.
  1405  * @return {Object} The transformed widget.
  1138  * @return {Object} The transformed widget.
  1406  */
  1139  */
  1407 
  1140 function blockToWidget(block, existingWidget = null) {
  1408 function blockToWidget(block) {
       
  1409   let existingWidget = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
  1410   let widget;
  1141   let widget;
  1411   const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance);
  1142   const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance);
  1412 
       
  1413   if (isValidLegacyWidgetBlock) {
  1143   if (isValidLegacyWidgetBlock) {
  1414     if (block.attributes.id) {
  1144     if (block.attributes.id) {
  1415       // Widget that does not extend WP_Widget.
  1145       // Widget that does not extend WP_Widget.
  1416       widget = {
  1146       widget = {
  1417         id: block.attributes.id
  1147         id: block.attributes.id
  1420       const {
  1150       const {
  1421         encoded,
  1151         encoded,
  1422         hash,
  1152         hash,
  1423         raw,
  1153         raw,
  1424         ...rest
  1154         ...rest
  1425       } = block.attributes.instance; // Widget that extends WP_Widget.
  1155       } = block.attributes.instance;
  1426 
  1156 
       
  1157       // Widget that extends WP_Widget.
  1427       widget = {
  1158       widget = {
  1428         idBase: block.attributes.idBase,
  1159         idBase: block.attributes.idBase,
  1429         instance: { ...(existingWidget === null || existingWidget === void 0 ? void 0 : existingWidget.instance),
  1160         instance: {
       
  1161           ...existingWidget?.instance,
  1430           // Required only for the customizer.
  1162           // Required only for the customizer.
  1431           is_widget_customizer_js_value: true,
  1163           is_widget_customizer_js_value: true,
  1432           encoded_serialized_instance: encoded,
  1164           encoded_serialized_instance: encoded,
  1433           instance_hash_key: hash,
  1165           instance_hash_key: hash,
  1434           raw_instance: raw,
  1166           raw_instance: raw,
  1446       instance: {
  1178       instance: {
  1447         raw_instance: instance
  1179         raw_instance: instance
  1448       }
  1180       }
  1449     };
  1181     };
  1450   }
  1182   }
  1451 
  1183   const {
  1452   return { ...(0,external_lodash_namespaceObject.omit)(existingWidget, ['form', 'rendered']),
  1184     form,
       
  1185     rendered,
       
  1186     ...restExistingWidget
       
  1187   } = existingWidget || {};
       
  1188   return {
       
  1189     ...restExistingWidget,
  1453     ...widget
  1190     ...widget
  1454   };
  1191   };
  1455 }
  1192 }
       
  1193 
  1456 /**
  1194 /**
  1457  * Transform a widget to a block.
  1195  * Transform a widget to a block.
  1458  *
  1196  *
  1459  * @param {Object} widget          The widget to be transformed from.
  1197  * @param {Object} widget          The widget to be transformed from.
  1460  * @param {string} widget.id       The widget id.
  1198  * @param {string} widget.id       The widget id.
  1461  * @param {string} widget.idBase   The id base of the widget.
  1199  * @param {string} widget.idBase   The id base of the widget.
  1462  * @param {number} widget.number   The number/index of the widget.
  1200  * @param {number} widget.number   The number/index of the widget.
  1463  * @param {Object} widget.instance The instance of the widget.
  1201  * @param {Object} widget.instance The instance of the widget.
  1464  * @return {WPBlock} The transformed block.
  1202  * @return {WPBlock} The transformed block.
  1465  */
  1203  */
  1466 
  1204 function widgetToBlock({
  1467 function widgetToBlock(_ref) {
  1205   id,
  1468   let {
  1206   idBase,
  1469     id,
  1207   number,
  1470     idBase,
  1208   instance
  1471     number,
  1209 }) {
  1472     instance
       
  1473   } = _ref;
       
  1474   let block;
  1210   let block;
  1475   const {
  1211   const {
  1476     encoded_serialized_instance: encoded,
  1212     encoded_serialized_instance: encoded,
  1477     instance_hash_key: hash,
  1213     instance_hash_key: hash,
  1478     raw_instance: raw,
  1214     raw_instance: raw,
  1479     ...rest
  1215     ...rest
  1480   } = instance;
  1216   } = instance;
  1481 
       
  1482   if (idBase === 'block') {
  1217   if (idBase === 'block') {
  1483     const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)(raw.content);
  1218     var _raw$content;
       
  1219     const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)((_raw$content = raw.content) !== null && _raw$content !== void 0 ? _raw$content : '', {
       
  1220       __unstableSkipAutop: true
       
  1221     });
  1484     block = parsedBlocks.length ? parsedBlocks[0] : (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {});
  1222     block = parsedBlocks.length ? parsedBlocks[0] : (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {});
  1485   } else if (number) {
  1223   } else if (number) {
  1486     // Widget that extends WP_Widget.
  1224     // Widget that extends WP_Widget.
  1487     block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', {
  1225     block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', {
  1488       idBase,
  1226       idBase,
  1497     // Widget that does not extend WP_Widget.
  1235     // Widget that does not extend WP_Widget.
  1498     block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', {
  1236     block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', {
  1499       id
  1237       id
  1500     });
  1238     });
  1501   }
  1239   }
  1502 
       
  1503   return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(block, id);
  1240   return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(block, id);
  1504 }
  1241 }
  1505 
  1242 
  1506 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js
  1243 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js
  1507 /**
  1244 /**
  1508  * External dependencies
  1245  * External dependencies
  1509  */
  1246  */
  1510 
  1247 
       
  1248 
  1511 /**
  1249 /**
  1512  * WordPress dependencies
  1250  * WordPress dependencies
  1513  */
  1251  */
  1514 
  1252 
  1515 
  1253 
  1516 
  1254 
  1517 
  1255 
  1518 /**
  1256 /**
  1519  * Internal dependencies
  1257  * Internal dependencies
  1520  */
  1258  */
  1521 
       
  1522 
       
  1523 
  1259 
  1524 function widgetsToBlocks(widgets) {
  1260 function widgetsToBlocks(widgets) {
  1525   return widgets.map(widget => widgetToBlock(widget));
  1261   return widgets.map(widget => widgetToBlock(widget));
  1526 }
  1262 }
  1527 
       
  1528 function useSidebarBlockEditor(sidebar) {
  1263 function useSidebarBlockEditor(sidebar) {
  1529   const [blocks, setBlocks] = (0,external_wp_element_namespaceObject.useState)(() => widgetsToBlocks(sidebar.getWidgets()));
  1264   const [blocks, setBlocks] = (0,external_wp_element_namespaceObject.useState)(() => widgetsToBlocks(sidebar.getWidgets()));
  1530   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1265   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1531     return sidebar.subscribe((prevWidgets, nextWidgets) => {
  1266     return sidebar.subscribe((prevWidgets, nextWidgets) => {
  1532       setBlocks(prevBlocks => {
  1267       setBlocks(prevBlocks => {
  1533         const prevWidgetsMap = new Map(prevWidgets.map(widget => [widget.id, widget]));
  1268         const prevWidgetsMap = new Map(prevWidgets.map(widget => [widget.id, widget]));
  1534         const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block]));
  1269         const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block]));
  1535         const nextBlocks = nextWidgets.map(nextWidget => {
  1270         const nextBlocks = nextWidgets.map(nextWidget => {
  1536           const prevWidget = prevWidgetsMap.get(nextWidget.id); // Bail out updates.
  1271           const prevWidget = prevWidgetsMap.get(nextWidget.id);
  1537 
  1272 
       
  1273           // Bail out updates.
  1538           if (prevWidget && prevWidget === nextWidget) {
  1274           if (prevWidget && prevWidget === nextWidget) {
  1539             return prevBlocksMap.get(nextWidget.id);
  1275             return prevBlocksMap.get(nextWidget.id);
  1540           }
  1276           }
  1541 
       
  1542           return widgetToBlock(nextWidget);
  1277           return widgetToBlock(nextWidget);
  1543         }); // Bail out updates.
  1278         });
  1544 
  1279 
       
  1280         // Bail out updates.
  1545         if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
  1281         if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
  1546           return prevBlocks;
  1282           return prevBlocks;
  1547         }
  1283         }
  1548 
       
  1549         return nextBlocks;
  1284         return nextBlocks;
  1550       });
  1285       });
  1551     });
  1286     });
  1552   }, [sidebar]);
  1287   }, [sidebar]);
  1553   const onChangeBlocks = (0,external_wp_element_namespaceObject.useCallback)(nextBlocks => {
  1288   const onChangeBlocks = (0,external_wp_element_namespaceObject.useCallback)(nextBlocks => {
  1554     setBlocks(prevBlocks => {
  1289     setBlocks(prevBlocks => {
  1555       if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
  1290       if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
  1556         return prevBlocks;
  1291         return prevBlocks;
  1557       }
  1292       }
  1558 
       
  1559       const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block]));
  1293       const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block]));
  1560       const nextWidgets = nextBlocks.map(nextBlock => {
  1294       const nextWidgets = nextBlocks.map(nextBlock => {
  1561         const widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(nextBlock); // Update existing widgets.
  1295         const widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(nextBlock);
  1562 
  1296 
       
  1297         // Update existing widgets.
  1563         if (widgetId && prevBlocksMap.has(widgetId)) {
  1298         if (widgetId && prevBlocksMap.has(widgetId)) {
  1564           const prevBlock = prevBlocksMap.get(widgetId);
  1299           const prevBlock = prevBlocksMap.get(widgetId);
  1565           const prevWidget = sidebar.getWidget(widgetId); // Bail out updates by returning the previous widgets.
  1300           const prevWidget = sidebar.getWidget(widgetId);
       
  1301 
       
  1302           // Bail out updates by returning the previous widgets.
  1566           // Deep equality is necessary until the block editor's internals changes.
  1303           // Deep equality is necessary until the block editor's internals changes.
  1567 
  1304           if (es6_default()(nextBlock, prevBlock) && prevWidget) {
  1568           if ((0,external_lodash_namespaceObject.isEqual)(nextBlock, prevBlock) && prevWidget) {
       
  1569             return prevWidget;
  1305             return prevWidget;
  1570           }
  1306           }
  1571 
       
  1572           return blockToWidget(nextBlock, prevWidget);
  1307           return blockToWidget(nextBlock, prevWidget);
  1573         } // Add a new widget.
  1308         }
  1574 
  1309 
  1575 
  1310         // Add a new widget.
  1576         return blockToWidget(nextBlock);
  1311         return blockToWidget(nextBlock);
  1577       }); // Bail out updates if the updated widgets are the same.
  1312       });
  1578 
  1313 
       
  1314       // Bail out updates if the updated widgets are the same.
  1579       if (external_wp_isShallowEqual_default()(sidebar.getWidgets(), nextWidgets)) {
  1315       if (external_wp_isShallowEqual_default()(sidebar.getWidgets(), nextWidgets)) {
  1580         return prevBlocks;
  1316         return prevBlocks;
  1581       }
  1317       }
  1582 
       
  1583       const addedWidgetIds = sidebar.setWidgets(nextWidgets);
  1318       const addedWidgetIds = sidebar.setWidgets(nextWidgets);
  1584       return nextBlocks.reduce((updatedNextBlocks, nextBlock, index) => {
  1319       return nextBlocks.reduce((updatedNextBlocks, nextBlock, index) => {
  1585         const addedWidgetId = addedWidgetIds[index];
  1320         const addedWidgetId = addedWidgetIds[index];
  1586 
       
  1587         if (addedWidgetId !== null) {
  1321         if (addedWidgetId !== null) {
  1588           // Only create a new instance if necessary to prevent
  1322           // Only create a new instance if necessary to prevent
  1589           // the whole editor from re-rendering on every edit.
  1323           // the whole editor from re-rendering on every edit.
  1590           if (updatedNextBlocks === nextBlocks) {
  1324           if (updatedNextBlocks === nextBlocks) {
  1591             updatedNextBlocks = nextBlocks.slice();
  1325             updatedNextBlocks = nextBlocks.slice();
  1592           }
  1326           }
  1593 
       
  1594           updatedNextBlocks[index] = (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(nextBlock, addedWidgetId);
  1327           updatedNextBlocks[index] = (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(nextBlock, addedWidgetId);
  1595         }
  1328         }
  1596 
       
  1597         return updatedNextBlocks;
  1329         return updatedNextBlocks;
  1598       }, nextBlocks);
  1330       }, nextBlocks);
  1599     });
  1331     });
  1600   }, [sidebar]);
  1332   }, [sidebar]);
  1601   return [blocks, onChangeBlocks, onChangeBlocks];
  1333   return [blocks, onChangeBlocks, onChangeBlocks];
  1602 }
  1334 }
  1603 
  1335 
  1604 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js
  1336 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js
  1605 
  1337 /**
  1606 
  1338  * WordPress dependencies
  1607 /**
  1339  */
  1608  * WordPress dependencies
  1340 
  1609  */
       
  1610 
  1341 
  1611 /**
  1342 /**
  1612  * Internal dependencies
  1343  * Internal dependencies
  1613  */
  1344  */
  1614 
  1345 
  1615 
  1346 
  1616 const FocusControlContext = (0,external_wp_element_namespaceObject.createContext)();
  1347 const FocusControlContext = (0,external_wp_element_namespaceObject.createContext)();
  1617 function FocusControl(_ref) {
  1348 function FocusControl({
  1618   let {
  1349   api,
  1619     api,
  1350   sidebarControls,
  1620     sidebarControls,
  1351   children
  1621     children
  1352 }) {
  1622   } = _ref;
       
  1623   const [focusedWidgetIdRef, setFocusedWidgetIdRef] = (0,external_wp_element_namespaceObject.useState)({
  1353   const [focusedWidgetIdRef, setFocusedWidgetIdRef] = (0,external_wp_element_namespaceObject.useState)({
  1624     current: null
  1354     current: null
  1625   });
  1355   });
  1626   const focusWidget = (0,external_wp_element_namespaceObject.useCallback)(widgetId => {
  1356   const focusWidget = (0,external_wp_element_namespaceObject.useCallback)(widgetId => {
  1627     for (const sidebarControl of sidebarControls) {
  1357     for (const sidebarControl of sidebarControls) {
  1628       const widgets = sidebarControl.setting.get();
  1358       const widgets = sidebarControl.setting.get();
  1629 
       
  1630       if (widgets.includes(widgetId)) {
  1359       if (widgets.includes(widgetId)) {
  1631         sidebarControl.sectionInstance.expand({
  1360         sidebarControl.sectionInstance.expand({
  1632           // Schedule it after the complete callback so that
  1361           // Schedule it after the complete callback so that
  1633           // it won't be overridden by the "Back" button focus.
  1362           // it won't be overridden by the "Back" button focus.
  1634           completeCallback() {
  1363           completeCallback() {
  1636             // the same widget id can also triggers the focus control.
  1365             // the same widget id can also triggers the focus control.
  1637             setFocusedWidgetIdRef({
  1366             setFocusedWidgetIdRef({
  1638               current: widgetId
  1367               current: widgetId
  1639             });
  1368             });
  1640           }
  1369           }
  1641 
       
  1642         });
  1370         });
  1643         break;
  1371         break;
  1644       }
  1372       }
  1645     }
  1373     }
  1646   }, [sidebarControls]);
  1374   }, [sidebarControls]);
  1647   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1375   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1648     function handleFocus(settingId) {
  1376     function handleFocus(settingId) {
  1649       const widgetId = settingIdToWidgetId(settingId);
  1377       const widgetId = settingIdToWidgetId(settingId);
  1650       focusWidget(widgetId);
  1378       focusWidget(widgetId);
  1651     }
  1379     }
  1652 
  1380     let previewBound = false;
  1653     function handleReady() {
  1381     function handleReady() {
  1654       api.previewer.preview.bind('focus-control-for-setting', handleFocus);
  1382       api.previewer.preview.bind('focus-control-for-setting', handleFocus);
  1655     }
  1383       previewBound = true;
  1656 
  1384     }
  1657     api.previewer.bind('ready', handleReady);
  1385     api.previewer.bind('ready', handleReady);
  1658     return () => {
  1386     return () => {
  1659       api.previewer.unbind('ready', handleReady);
  1387       api.previewer.unbind('ready', handleReady);
  1660       api.previewer.preview.unbind('focus-control-for-setting', handleFocus);
  1388       if (previewBound) {
       
  1389         api.previewer.preview.unbind('focus-control-for-setting', handleFocus);
       
  1390       }
  1661     };
  1391     };
  1662   }, [api, focusWidget]);
  1392   }, [api, focusWidget]);
  1663   const context = (0,external_wp_element_namespaceObject.useMemo)(() => [focusedWidgetIdRef, focusWidget], [focusedWidgetIdRef, focusWidget]);
  1393   const context = (0,external_wp_element_namespaceObject.useMemo)(() => [focusedWidgetIdRef, focusWidget], [focusedWidgetIdRef, focusWidget]);
  1664   return (0,external_wp_element_namespaceObject.createElement)(FocusControlContext.Provider, {
  1394   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FocusControlContext.Provider, {
  1665     value: context
  1395     value: context,
  1666   }, children);
  1396     children: children
       
  1397   });
  1667 }
  1398 }
  1668 const useFocusControl = () => (0,external_wp_element_namespaceObject.useContext)(FocusControlContext);
  1399 const useFocusControl = () => (0,external_wp_element_namespaceObject.useContext)(FocusControlContext);
  1669 
  1400 
  1670 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js
  1401 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js
  1671 /**
  1402 /**
  1673  */
  1404  */
  1674 
  1405 
  1675 
  1406 
  1676 
  1407 
  1677 
  1408 
       
  1409 
  1678 /**
  1410 /**
  1679  * Internal dependencies
  1411  * Internal dependencies
  1680  */
  1412  */
  1681 
       
  1682 
  1413 
  1683 function useBlocksFocusControl(blocks) {
  1414 function useBlocksFocusControl(blocks) {
  1684   const {
  1415   const {
  1685     selectBlock
  1416     selectBlock
  1686   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  1417   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  1690     blocksRef.current = blocks;
  1421     blocksRef.current = blocks;
  1691   }, [blocks]);
  1422   }, [blocks]);
  1692   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1423   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1693     if (focusedWidgetIdRef.current) {
  1424     if (focusedWidgetIdRef.current) {
  1694       const focusedBlock = blocksRef.current.find(block => (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block) === focusedWidgetIdRef.current);
  1425       const focusedBlock = blocksRef.current.find(block => (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block) === focusedWidgetIdRef.current);
  1695 
       
  1696       if (focusedBlock) {
  1426       if (focusedBlock) {
  1697         selectBlock(focusedBlock.clientId); // If the block is already being selected, the DOM node won't
  1427         selectBlock(focusedBlock.clientId);
       
  1428         // If the block is already being selected, the DOM node won't
  1698         // get focused again automatically.
  1429         // get focused again automatically.
  1699         // We select the DOM and focus it manually here.
  1430         // We select the DOM and focus it manually here.
  1700 
       
  1701         const blockNode = document.querySelector(`[data-block="${focusedBlock.clientId}"]`);
  1431         const blockNode = document.querySelector(`[data-block="${focusedBlock.clientId}"]`);
  1702         blockNode === null || blockNode === void 0 ? void 0 : blockNode.focus();
  1432         blockNode?.focus();
  1703       }
  1433       }
  1704     }
  1434     }
  1705   }, [focusedWidgetIdRef, selectBlock]);
  1435   }, [focusedWidgetIdRef, selectBlock]);
  1706 }
  1436 }
  1707 
  1437 
       
  1438 ;// CONCATENATED MODULE: external ["wp","privateApis"]
       
  1439 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
       
  1440 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/lock-unlock.js
       
  1441 /**
       
  1442  * WordPress dependencies
       
  1443  */
       
  1444 
       
  1445 const {
       
  1446   lock,
       
  1447   unlock
       
  1448 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/customize-widgets');
       
  1449 
  1708 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
  1450 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
  1709 
  1451 /**
  1710 
  1452  * WordPress dependencies
  1711 /**
  1453  */
  1712  * WordPress dependencies
  1454 
  1713  */
       
  1714 
  1455 
  1715 /**
  1456 /**
  1716  * Internal dependencies
  1457  * Internal dependencies
  1717  */
  1458  */
  1718 
  1459 
  1719 
  1460 
  1720 
  1461 
  1721 function SidebarEditorProvider(_ref) {
  1462 
  1722   let {
  1463 const {
  1723     sidebar,
  1464   ExperimentalBlockEditorProvider
  1724     settings,
  1465 } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
  1725     children
  1466 function SidebarEditorProvider({
  1726   } = _ref;
  1467   sidebar,
       
  1468   settings,
       
  1469   children
       
  1470 }) {
  1727   const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar);
  1471   const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar);
  1728   useBlocksFocusControl(blocks);
  1472   useBlocksFocusControl(blocks);
  1729   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockEditorProvider, {
  1473   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ExperimentalBlockEditorProvider, {
  1730     value: blocks,
  1474     value: blocks,
  1731     onInput: onInput,
  1475     onInput: onInput,
  1732     onChange: onChange,
  1476     onChange: onChange,
  1733     settings: settings,
  1477     settings: settings,
  1734     useSubRegistry: false
  1478     useSubRegistry: false,
  1735   }, children);
  1479     children: children
       
  1480   });
  1736 }
  1481 }
  1737 
  1482 
  1738 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.js
  1483 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.js
  1739 
  1484 /**
  1740 
  1485  * WordPress dependencies
  1741 /**
  1486  */
  1742  * WordPress dependencies
  1487 
  1743  */
  1488 
  1744 
  1489 
  1745 
  1490 
  1746 
  1491 
  1747 
  1492 
  1748 function WelcomeGuide(_ref) {
  1493 function WelcomeGuide({
  1749   let {
  1494   sidebar
  1750     sidebar
  1495 }) {
  1751   } = _ref;
       
  1752   const {
  1496   const {
  1753     toggle
  1497     toggle
  1754   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
  1498   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
  1755   const isEntirelyBlockWidgets = sidebar.getWidgets().every(widget => widget.id.startsWith('block-'));
  1499   const isEntirelyBlockWidgets = sidebar.getWidgets().every(widget => widget.id.startsWith('block-'));
  1756   return (0,external_wp_element_namespaceObject.createElement)("div", {
  1500   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1757     className: "customize-widgets-welcome-guide"
  1501     className: "customize-widgets-welcome-guide",
  1758   }, (0,external_wp_element_namespaceObject.createElement)("div", {
  1502     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1759     className: "customize-widgets-welcome-guide__image__wrapper"
  1503       className: "customize-widgets-welcome-guide__image__wrapper",
  1760   }, (0,external_wp_element_namespaceObject.createElement)("picture", null, (0,external_wp_element_namespaceObject.createElement)("source", {
  1504       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", {
  1761     srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg",
  1505         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
  1762     media: "(prefers-reduced-motion: reduce)"
  1506           srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg",
  1763   }), (0,external_wp_element_namespaceObject.createElement)("img", {
  1507           media: "(prefers-reduced-motion: reduce)"
  1764     className: "customize-widgets-welcome-guide__image",
  1508         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
  1765     src: "https://s.w.org/images/block-editor/welcome-editor.gif",
  1509           className: "customize-widgets-welcome-guide__image",
  1766     width: "312",
  1510           src: "https://s.w.org/images/block-editor/welcome-editor.gif",
  1767     height: "240",
  1511           width: "312",
  1768     alt: ""
  1512           height: "240",
  1769   }))), (0,external_wp_element_namespaceObject.createElement)("h1", {
  1513           alt: ""
  1770     className: "customize-widgets-welcome-guide__heading"
  1514         })]
  1771   }, (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')), (0,external_wp_element_namespaceObject.createElement)("p", {
  1515       })
  1772     className: "customize-widgets-welcome-guide__text"
  1516     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
  1773   }, isEntirelyBlockWidgets ? (0,external_wp_i18n_namespaceObject.__)('Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.') : (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  1517       className: "customize-widgets-welcome-guide__heading",
  1774     className: "customize-widgets-welcome-guide__button",
  1518       children: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')
  1775     variant: "primary",
  1519     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  1776     onClick: () => toggle('core/customize-widgets', 'welcomeGuide')
  1520       className: "customize-widgets-welcome-guide__text",
  1777   }, (0,external_wp_i18n_namespaceObject.__)('Got it')), (0,external_wp_element_namespaceObject.createElement)("hr", {
  1521       children: isEntirelyBlockWidgets ? (0,external_wp_i18n_namespaceObject.__)('Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.') : (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')
  1778     className: "customize-widgets-welcome-guide__separator"
  1522     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  1779   }), !isEntirelyBlockWidgets && (0,external_wp_element_namespaceObject.createElement)("p", {
  1523       className: "customize-widgets-welcome-guide__button",
  1780     className: "customize-widgets-welcome-guide__more-info"
  1524       variant: "primary",
  1781   }, (0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
  1525       onClick: () => toggle('core/customize-widgets', 'welcomeGuide'),
  1782     href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/')
  1526       children: (0,external_wp_i18n_namespaceObject.__)('Got it')
  1783   }, (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.'))), (0,external_wp_element_namespaceObject.createElement)("p", {
  1527     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {
  1784     className: "customize-widgets-welcome-guide__more-info"
  1528       className: "customize-widgets-welcome-guide__separator"
  1785   }, (0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
  1529     }), !isEntirelyBlockWidgets && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
  1786     href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/wordpress-editor/')
  1530       className: "customize-widgets-welcome-guide__more-info",
  1787   }, (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide."))));
  1531       children: [(0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
       
  1532         href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/'),
       
  1533         children: (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.')
       
  1534       })]
       
  1535     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
       
  1536       className: "customize-widgets-welcome-guide__more-info",
       
  1537       children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
       
  1538         href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'),
       
  1539         children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")
       
  1540       })]
       
  1541     })]
       
  1542   });
  1788 }
  1543 }
  1789 
  1544 
  1790 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.js
  1545 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.js
  1791 /**
  1546 /**
  1792  * WordPress dependencies
  1547  * WordPress dependencies
  1794 
  1549 
  1795 
  1550 
  1796 
  1551 
  1797 
  1552 
  1798 
  1553 
  1799 function KeyboardShortcuts(_ref) {
  1554 function KeyboardShortcuts({
  1800   let {
  1555   undo,
  1801     undo,
  1556   redo,
  1802     redo,
  1557   save
  1803     save
  1558 }) {
  1804   } = _ref;
       
  1805   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/undo', event => {
  1559   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/undo', event => {
  1806     undo();
  1560     undo();
  1807     event.preventDefault();
  1561     event.preventDefault();
  1808   });
  1562   });
  1809   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/redo', event => {
  1563   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/customize-widgets/redo', event => {
  1814     event.preventDefault();
  1568     event.preventDefault();
  1815     save();
  1569     save();
  1816   });
  1570   });
  1817   return null;
  1571   return null;
  1818 }
  1572 }
  1819 
       
  1820 function KeyboardShortcutsRegister() {
  1573 function KeyboardShortcutsRegister() {
  1821   const {
  1574   const {
  1822     registerShortcut,
  1575     registerShortcut,
  1823     unregisterShortcut
  1576     unregisterShortcut
  1824   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
  1577   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
  1837       category: 'global',
  1590       category: 'global',
  1838       description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
  1591       description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
  1839       keyCombination: {
  1592       keyCombination: {
  1840         modifier: 'primaryShift',
  1593         modifier: 'primaryShift',
  1841         character: 'z'
  1594         character: 'z'
  1842       }
  1595       },
       
  1596       // Disable on Apple OS because it conflicts with the browser's
       
  1597       // history shortcut. It's a fine alias for both Windows and Linux.
       
  1598       // Since there's no conflict for Ctrl+Shift+Z on both Windows and
       
  1599       // Linux, we keep it as the default for consistency.
       
  1600       aliases: (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? [] : [{
       
  1601         modifier: 'primary',
       
  1602         character: 'y'
       
  1603       }]
  1843     });
  1604     });
  1844     registerShortcut({
  1605     registerShortcut({
  1845       name: 'core/customize-widgets/save',
  1606       name: 'core/customize-widgets/save',
  1846       category: 'global',
  1607       category: 'global',
  1847       description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'),
  1608       description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'),
  1856       unregisterShortcut('core/customize-widgets/save');
  1617       unregisterShortcut('core/customize-widgets/save');
  1857     };
  1618     };
  1858   }, [registerShortcut]);
  1619   }, [registerShortcut]);
  1859   return null;
  1620   return null;
  1860 }
  1621 }
  1861 
       
  1862 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  1622 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  1863 /* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts);
  1623 /* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts);
  1864 
  1624 
  1865 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js
  1625 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js
  1866 
  1626 /**
  1867 
  1627  * WordPress dependencies
  1868 
  1628  */
  1869 /**
  1629 
  1870  * WordPress dependencies
       
  1871  */
       
  1872 
  1630 
  1873 
  1631 
  1874 
  1632 
  1875 function BlockAppender(props) {
  1633 function BlockAppender(props) {
  1876   const ref = (0,external_wp_element_namespaceObject.useRef)();
  1634   const ref = (0,external_wp_element_namespaceObject.useRef)();
  1877   const isBlocksListEmpty = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlockCount() === 0); // Move the focus to the block appender to prevent focus from
  1635   const isBlocksListEmpty = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlockCount() === 0);
       
  1636 
       
  1637   // Move the focus to the block appender to prevent focus from
  1878   // being lost when emptying the widget area.
  1638   // being lost when emptying the widget area.
  1879 
       
  1880   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1639   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1881     if (isBlocksListEmpty && ref.current) {
  1640     if (isBlocksListEmpty && ref.current) {
  1882       const {
  1641       const {
  1883         ownerDocument
  1642         ownerDocument
  1884       } = ref.current;
  1643       } = ref.current;
  1885 
       
  1886       if (!ownerDocument.activeElement || ownerDocument.activeElement === ownerDocument.body) {
  1644       if (!ownerDocument.activeElement || ownerDocument.activeElement === ownerDocument.body) {
  1887         ref.current.focus();
  1645         ref.current.focus();
  1888       }
  1646       }
  1889     }
  1647     }
  1890   }, [isBlocksListEmpty]);
  1648   }, [isBlocksListEmpty]);
  1891   return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ButtonBlockAppender, _extends({}, props, {
  1649   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.ButtonBlockAppender, {
       
  1650     ...props,
  1892     ref: ref
  1651     ref: ref
  1893   }));
  1652   });
  1894 }
  1653 }
  1895 
  1654 
  1896 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.js
  1655 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.js
  1897 
  1656 /**
  1898 
  1657  * WordPress dependencies
  1899 /**
  1658  */
  1900  * External dependencies
  1659 
  1901  */
  1660 
  1902 
       
  1903 /**
       
  1904  * WordPress dependencies
       
  1905  */
       
  1906 
  1661 
  1907 
  1662 
  1908 
  1663 
  1909 
  1664 
  1910 
  1665 
  1919 
  1674 
  1920 
  1675 
  1921 
  1676 
  1922 
  1677 
  1923 
  1678 
  1924 function SidebarBlockEditor(_ref) {
  1679 
  1925   let {
  1680 
  1926     blockEditorSettings,
  1681 
  1927     sidebar,
  1682 const {
  1928     inserter,
  1683   ExperimentalBlockCanvas: BlockCanvas
  1929     inspector
  1684 } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
  1930   } = _ref;
  1685 const {
       
  1686   BlockKeyboardShortcuts
       
  1687 } = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
       
  1688 function SidebarBlockEditor({
       
  1689   blockEditorSettings,
       
  1690   sidebar,
       
  1691   inserter,
       
  1692   inspector
       
  1693 }) {
  1931   const [isInserterOpened, setIsInserterOpened] = useInserter(inserter);
  1694   const [isInserterOpened, setIsInserterOpened] = useInserter(inserter);
       
  1695   const isMediumViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small');
  1932   const {
  1696   const {
  1933     hasUploadPermissions,
  1697     hasUploadPermissions,
  1934     isFixedToolbarActive,
  1698     isFixedToolbarActive,
  1935     keepCaretInsideBlock,
  1699     keepCaretInsideBlock,
  1936     isWelcomeGuideActive
  1700     isWelcomeGuideActive
  1937   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  1701   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  1702     var _select$canUser;
  1938     const {
  1703     const {
  1939       get
  1704       get
  1940     } = select(external_wp_preferences_namespaceObject.store);
  1705     } = select(external_wp_preferences_namespaceObject.store);
  1941     return {
  1706     return {
  1942       hasUploadPermissions: (0,external_lodash_namespaceObject.defaultTo)(select(external_wp_coreData_namespaceObject.store).canUser('create', 'media'), true),
  1707       hasUploadPermissions: (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('create', 'media')) !== null && _select$canUser !== void 0 ? _select$canUser : true,
  1943       isFixedToolbarActive: !!get('core/customize-widgets', 'fixedToolbar'),
  1708       isFixedToolbarActive: !!get('core/customize-widgets', 'fixedToolbar'),
  1944       keepCaretInsideBlock: !!get('core/customize-widgets', 'keepCaretInsideBlock'),
  1709       keepCaretInsideBlock: !!get('core/customize-widgets', 'keepCaretInsideBlock'),
  1945       isWelcomeGuideActive: !!get('core/customize-widgets', 'welcomeGuide')
  1710       isWelcomeGuideActive: !!get('core/customize-widgets', 'welcomeGuide')
  1946     };
  1711     };
  1947   }, []);
  1712   }, []);
  1948   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
  1713   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
  1949     let mediaUploadBlockEditor;
  1714     let mediaUploadBlockEditor;
  1950 
       
  1951     if (hasUploadPermissions) {
  1715     if (hasUploadPermissions) {
  1952       mediaUploadBlockEditor = _ref2 => {
  1716       mediaUploadBlockEditor = ({
  1953         let {
  1717         onError,
  1954           onError,
  1718         ...argumentsObject
  1955           ...argumentsObject
  1719       }) => {
  1956         } = _ref2;
       
  1957         (0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
  1720         (0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
  1958           wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
  1721           wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
  1959           onError: _ref3 => {
  1722           onError: ({
  1960             let {
  1723             message
  1961               message
  1724           }) => onError(message),
  1962             } = _ref3;
       
  1963             return onError(message);
       
  1964           },
       
  1965           ...argumentsObject
  1725           ...argumentsObject
  1966         });
  1726         });
  1967       };
  1727       };
  1968     }
  1728     }
  1969 
  1729     return {
  1970     return { ...blockEditorSettings,
  1730       ...blockEditorSettings,
  1971       __experimentalSetIsInserterOpened: setIsInserterOpened,
  1731       __experimentalSetIsInserterOpened: setIsInserterOpened,
  1972       mediaUpload: mediaUploadBlockEditor,
  1732       mediaUpload: mediaUploadBlockEditor,
  1973       hasFixedToolbar: isFixedToolbarActive,
  1733       hasFixedToolbar: isFixedToolbarActive || !isMediumViewport,
  1974       keepCaretInsideBlock,
  1734       keepCaretInsideBlock,
  1975       __unstableHasCustomAppender: true
  1735       __unstableHasCustomAppender: true
  1976     };
  1736     };
  1977   }, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, keepCaretInsideBlock, setIsInserterOpened]);
  1737   }, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, isMediumViewport, keepCaretInsideBlock, setIsInserterOpened]);
  1978 
       
  1979   if (isWelcomeGuideActive) {
  1738   if (isWelcomeGuideActive) {
  1980     return (0,external_wp_element_namespaceObject.createElement)(WelcomeGuide, {
  1739     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {
  1981       sidebar: sidebar
  1740       sidebar: sidebar
  1982     });
  1741     });
  1983   }
  1742   }
  1984 
  1743   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1985   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockEditorKeyboardShortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(SidebarEditorProvider, {
  1744     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts.Register, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(SidebarEditorProvider, {
  1986     sidebar: sidebar,
  1745       sidebar: sidebar,
  1987     settings: settings
  1746       settings: settings,
  1988   }, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, {
  1747       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {
  1989     undo: sidebar.undo,
  1748         undo: sidebar.undo,
  1990     redo: sidebar.redo,
  1749         redo: sidebar.redo,
  1991     save: sidebar.save
  1750         save: sidebar.save
  1992   }), (0,external_wp_element_namespaceObject.createElement)(header, {
  1751       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {
  1993     sidebar: sidebar,
  1752         sidebar: sidebar,
  1994     inserter: inserter,
  1753         inserter: inserter,
  1995     isInserterOpened: isInserterOpened,
  1754         isInserterOpened: isInserterOpened,
  1996     setIsInserterOpened: setIsInserterOpened,
  1755         setIsInserterOpened: setIsInserterOpened,
  1997     isFixedToolbarActive: isFixedToolbarActive
  1756         isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport
  1998   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.CopyHandler, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTools, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
  1757       }), (isFixedToolbarActive || !isMediumViewport) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, {
  1999     styles: settings.defaultEditorStyles
  1758         hideDragHandle: true
  2000   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSelectionClearer, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.WritingFlow, {
  1759       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockCanvas, {
  2001     className: "editor-styles-wrapper"
  1760         shouldIframe: false,
  2002   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ObserveTyping, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, {
  1761         styles: settings.defaultEditorStyles,
  2003     renderAppender: BlockAppender
  1762         height: "100%",
  2004   })))))), (0,external_wp_element_namespaceObject.createPortal)( // This is a temporary hack to prevent button component inside <BlockInspector>
  1763         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {
  2005   // from submitting form when type="button" is not specified.
  1764           renderAppender: BlockAppender
  2006   (0,external_wp_element_namespaceObject.createElement)("form", {
  1765         })
  2007     onSubmit: event => event.preventDefault()
  1766       }), (0,external_wp_element_namespaceObject.createPortal)(
  2008   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockInspector, null)), inspector.contentContainer[0])), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, null, _ref4 => {
  1767       /*#__PURE__*/
  2009     let {
  1768       // This is a temporary hack to prevent button component inside <BlockInspector>
  2010       onClose
  1769       // from submitting form when type="button" is not specified.
  2011     } = _ref4;
  1770       (0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
  2012     return (0,external_wp_element_namespaceObject.createElement)(block_inspector_button, {
  1771         onSubmit: event => event.preventDefault(),
  2013       inspector: inspector,
  1772         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockInspector, {})
  2014       closeMenu: onClose
  1773       }), inspector.contentContainer[0])]
  2015     });
  1774     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, {
  2016   }));
  1775       children: ({
       
  1776         onClose
       
  1777       }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_inspector_button, {
       
  1778         inspector: inspector,
       
  1779         closeMenu: onClose
       
  1780       })
       
  1781     })]
       
  1782   });
  2017 }
  1783 }
  2018 
  1784 
  2019 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js
  1785 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js
  2020 
  1786 /**
  2021 
  1787  * WordPress dependencies
  2022 /**
  1788  */
  2023  * WordPress dependencies
  1789 
  2024  */
       
  2025 
  1790 
  2026 const SidebarControlsContext = (0,external_wp_element_namespaceObject.createContext)();
  1791 const SidebarControlsContext = (0,external_wp_element_namespaceObject.createContext)();
  2027 function SidebarControls(_ref) {
  1792 function SidebarControls({
  2028   let {
  1793   sidebarControls,
  2029     sidebarControls,
  1794   activeSidebarControl,
  2030     activeSidebarControl,
  1795   children
  2031     children
  1796 }) {
  2032   } = _ref;
       
  2033   const context = (0,external_wp_element_namespaceObject.useMemo)(() => ({
  1797   const context = (0,external_wp_element_namespaceObject.useMemo)(() => ({
  2034     sidebarControls,
  1798     sidebarControls,
  2035     activeSidebarControl
  1799     activeSidebarControl
  2036   }), [sidebarControls, activeSidebarControl]);
  1800   }), [sidebarControls, activeSidebarControl]);
  2037   return (0,external_wp_element_namespaceObject.createElement)(SidebarControlsContext.Provider, {
  1801   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarControlsContext.Provider, {
  2038     value: context
  1802     value: context,
  2039   }, children);
  1803     children: children
       
  1804   });
  2040 }
  1805 }
  2041 function useSidebarControls() {
  1806 function useSidebarControls() {
  2042   const {
  1807   const {
  2043     sidebarControls
  1808     sidebarControls
  2044   } = (0,external_wp_element_namespaceObject.useContext)(SidebarControlsContext);
  1809   } = (0,external_wp_element_namespaceObject.useContext)(SidebarControlsContext);
  2053 
  1818 
  2054 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.js
  1819 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.js
  2055 /**
  1820 /**
  2056  * WordPress dependencies
  1821  * WordPress dependencies
  2057  */
  1822  */
       
  1823 
  2058 
  1824 
  2059 
  1825 
  2060 
  1826 
  2061 /**
  1827 /**
  2062  * We can't just use <BlockSelectionClearer> because the customizer has
  1828  * We can't just use <BlockSelectionClearer> because the customizer has
  2072  * not by explicitly focusing outside the editor, hence no need for clearing.
  1838  * not by explicitly focusing outside the editor, hence no need for clearing.
  2073  *
  1839  *
  2074  * @param {Object} sidebarControl The sidebar control instance.
  1840  * @param {Object} sidebarControl The sidebar control instance.
  2075  * @param {Object} popoverRef     The ref object of the popover node container.
  1841  * @param {Object} popoverRef     The ref object of the popover node container.
  2076  */
  1842  */
  2077 
       
  2078 function useClearSelectedBlock(sidebarControl, popoverRef) {
  1843 function useClearSelectedBlock(sidebarControl, popoverRef) {
  2079   const {
  1844   const {
  2080     hasSelectedBlock,
  1845     hasSelectedBlock,
  2081     hasMultiSelection
  1846     hasMultiSelection
  2082   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
  1847   } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
  2087     if (popoverRef.current && sidebarControl) {
  1852     if (popoverRef.current && sidebarControl) {
  2088       const inspector = sidebarControl.inspector;
  1853       const inspector = sidebarControl.inspector;
  2089       const container = sidebarControl.container[0];
  1854       const container = sidebarControl.container[0];
  2090       const ownerDocument = container.ownerDocument;
  1855       const ownerDocument = container.ownerDocument;
  2091       const ownerWindow = ownerDocument.defaultView;
  1856       const ownerWindow = ownerDocument.defaultView;
  2092 
       
  2093       function handleClearSelectedBlock(element) {
  1857       function handleClearSelectedBlock(element) {
  2094         if ( // 1. Make sure there are blocks being selected.
  1858         if (
  2095         (hasSelectedBlock() || hasMultiSelection()) && // 2. The element should exist in the DOM (not deleted).
  1859         // 1. Make sure there are blocks being selected.
  2096         element && ownerDocument.contains(element) && // 3. It should also not exist in the container, the popover, nor the dialog.
  1860         (hasSelectedBlock() || hasMultiSelection()) &&
  2097         !container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
  1861         // 2. The element should exist in the DOM (not deleted).
       
  1862         element && ownerDocument.contains(element) &&
       
  1863         // 3. It should also not exist in the container, the popover, nor the dialog.
       
  1864         !container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') &&
       
  1865         // 4. The inspector should not be opened.
  2098         !inspector.expanded()) {
  1866         !inspector.expanded()) {
  2099           clearSelectedBlock();
  1867           clearSelectedBlock();
  2100         }
  1868         }
  2101       } // Handle mouse down in the same document.
  1869       }
  2102 
  1870 
  2103 
  1871       // Handle mouse down in the same document.
  2104       function handleMouseDown(event) {
  1872       function handleMouseDown(event) {
  2105         handleClearSelectedBlock(event.target);
  1873         handleClearSelectedBlock(event.target);
  2106       } // Handle focusing outside the current document, like to iframes.
  1874       }
  2107 
  1875       // Handle focusing outside the current document, like to iframes.
  2108 
       
  2109       function handleBlur() {
  1876       function handleBlur() {
  2110         handleClearSelectedBlock(ownerDocument.activeElement);
  1877         handleClearSelectedBlock(ownerDocument.activeElement);
  2111       }
  1878       }
  2112 
       
  2113       ownerDocument.addEventListener('mousedown', handleMouseDown);
  1879       ownerDocument.addEventListener('mousedown', handleMouseDown);
  2114       ownerWindow.addEventListener('blur', handleBlur);
  1880       ownerWindow.addEventListener('blur', handleBlur);
  2115       return () => {
  1881       return () => {
  2116         ownerDocument.removeEventListener('mousedown', handleMouseDown);
  1882         ownerDocument.removeEventListener('mousedown', handleMouseDown);
  2117         ownerWindow.removeEventListener('blur', handleBlur);
  1883         ownerWindow.removeEventListener('blur', handleBlur);
  2119     }
  1885     }
  2120   }, [popoverRef, sidebarControl, hasSelectedBlock, hasMultiSelection, clearSelectedBlock]);
  1886   }, [popoverRef, sidebarControl, hasSelectedBlock, hasMultiSelection, clearSelectedBlock]);
  2121 }
  1887 }
  2122 
  1888 
  2123 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js
  1889 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js
  2124 
       
  2125 
       
  2126 /**
  1890 /**
  2127  * WordPress dependencies
  1891  * WordPress dependencies
  2128  */
  1892  */
  2129 
  1893 
  2130 
  1894 
  2136 
  1900 
  2137 
  1901 
  2138 
  1902 
  2139 
  1903 
  2140 
  1904 
  2141 function CustomizeWidgets(_ref) {
  1905 
  2142   let {
  1906 function CustomizeWidgets({
  2143     api,
  1907   api,
  2144     sidebarControls,
  1908   sidebarControls,
  2145     blockEditorSettings
  1909   blockEditorSettings
  2146   } = _ref;
  1910 }) {
  2147   const [activeSidebarControl, setActiveSidebarControl] = (0,external_wp_element_namespaceObject.useState)(null);
  1911   const [activeSidebarControl, setActiveSidebarControl] = (0,external_wp_element_namespaceObject.useState)(null);
  2148   const parentContainer = document.getElementById('customize-theme-controls');
  1912   const parentContainer = document.getElementById('customize-theme-controls');
  2149   const popoverRef = (0,external_wp_element_namespaceObject.useRef)();
  1913   const popoverRef = (0,external_wp_element_namespaceObject.useRef)();
  2150   useClearSelectedBlock(activeSidebarControl, popoverRef);
  1914   useClearSelectedBlock(activeSidebarControl, popoverRef);
  2151   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1915   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2156     }));
  1920     }));
  2157     return () => {
  1921     return () => {
  2158       unsubscribers.forEach(unsubscriber => unsubscriber());
  1922       unsubscribers.forEach(unsubscriber => unsubscriber());
  2159     };
  1923     };
  2160   }, [sidebarControls]);
  1924   }, [sidebarControls]);
  2161   const activeSidebar = activeSidebarControl && (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(ErrorBoundary, null, (0,external_wp_element_namespaceObject.createElement)(SidebarBlockEditor, {
  1925   const activeSidebar = activeSidebarControl && (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, {
  2162     key: activeSidebarControl.id,
  1926     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarBlockEditor, {
  2163     blockEditorSettings: blockEditorSettings,
  1927       blockEditorSettings: blockEditorSettings,
  2164     sidebar: activeSidebarControl.sidebarAdapter,
  1928       sidebar: activeSidebarControl.sidebarAdapter,
  2165     inserter: activeSidebarControl.inserter,
  1929       inserter: activeSidebarControl.inserter,
  2166     inspector: activeSidebarControl.inspector
  1930       inspector: activeSidebarControl.inspector
  2167   })), activeSidebarControl.container[0]); // We have to portal this to the parent of both the editor and the inspector,
  1931     }, activeSidebarControl.id)
       
  1932   }), activeSidebarControl.container[0]);
       
  1933 
       
  1934   // We have to portal this to the parent of both the editor and the inspector,
  2168   // so that the popovers will appear above both of them.
  1935   // so that the popovers will appear above both of them.
  2169 
  1936   const popover = parentContainer && (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  2170   const popover = parentContainer && (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)("div", {
       
  2171     className: "customize-widgets-popover",
  1937     className: "customize-widgets-popover",
  2172     ref: popoverRef
  1938     ref: popoverRef,
  2173   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover.Slot, null)), parentContainer);
  1939     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover.Slot, {})
  2174   return (0,external_wp_element_namespaceObject.createElement)(external_wp_keyboardShortcuts_namespaceObject.ShortcutProvider, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_wp_element_namespaceObject.createElement)(SidebarControls, {
  1940   }), parentContainer);
  2175     sidebarControls: sidebarControls,
  1941   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, {
  2176     activeSidebarControl: activeSidebarControl
  1942     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarControls, {
  2177   }, (0,external_wp_element_namespaceObject.createElement)(FocusControl, {
  1943       sidebarControls: sidebarControls,
  2178     api: api,
  1944       activeSidebarControl: activeSidebarControl,
  2179     sidebarControls: sidebarControls
  1945       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(FocusControl, {
  2180   }, activeSidebar, popover))));
  1946         api: api,
       
  1947         sidebarControls: sidebarControls,
       
  1948         children: [activeSidebar, popover]
       
  1949       })
       
  1950     })
       
  1951   });
  2181 }
  1952 }
  2182 
  1953 
  2183 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inspector-section.js
  1954 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inspector-section.js
  2184 function getInspectorSection() {
  1955 function getInspectorSection() {
  2185   const {
  1956   const {
  2192       super(id, options);
  1963       super(id, options);
  2193       this.parentSection = options.parentSection;
  1964       this.parentSection = options.parentSection;
  2194       this.returnFocusWhenClose = null;
  1965       this.returnFocusWhenClose = null;
  2195       this._isOpen = false;
  1966       this._isOpen = false;
  2196     }
  1967     }
  2197 
       
  2198     get isOpen() {
  1968     get isOpen() {
  2199       return this._isOpen;
  1969       return this._isOpen;
  2200     }
  1970     }
  2201 
       
  2202     set isOpen(value) {
  1971     set isOpen(value) {
  2203       this._isOpen = value;
  1972       this._isOpen = value;
  2204       this.triggerActiveCallbacks();
  1973       this.triggerActiveCallbacks();
  2205     }
  1974     }
  2206 
       
  2207     ready() {
  1975     ready() {
  2208       this.contentContainer[0].classList.add('customize-widgets-layout__inspector');
  1976       this.contentContainer[0].classList.add('customize-widgets-layout__inspector');
  2209     }
  1977     }
  2210 
       
  2211     isContextuallyActive() {
  1978     isContextuallyActive() {
  2212       return this.isOpen;
  1979       return this.isOpen;
  2213     }
  1980     }
  2214 
       
  2215     onChangeExpanded(expanded, args) {
  1981     onChangeExpanded(expanded, args) {
  2216       super.onChangeExpanded(expanded, args);
  1982       super.onChangeExpanded(expanded, args);
  2217 
       
  2218       if (this.parentSection && !args.unchanged) {
  1983       if (this.parentSection && !args.unchanged) {
  2219         if (expanded) {
  1984         if (expanded) {
  2220           this.parentSection.collapse({
  1985           this.parentSection.collapse({
  2221             manualTransition: true
  1986             manualTransition: true
  2222           });
  1987           });
  2231             }
  1996             }
  2232           });
  1997           });
  2233         }
  1998         }
  2234       }
  1999       }
  2235     }
  2000     }
  2236 
  2001     open({
  2237     open() {
  2002       returnFocusWhenClose
  2238       let {
  2003     } = {}) {
  2239         returnFocusWhenClose
       
  2240       } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  2241       this.isOpen = true;
  2004       this.isOpen = true;
  2242       this.returnFocusWhenClose = returnFocusWhenClose;
  2005       this.returnFocusWhenClose = returnFocusWhenClose;
  2243       this.expand({
  2006       this.expand({
  2244         allowMultiple: true
  2007         allowMultiple: true
  2245       });
  2008       });
  2246     }
  2009     }
  2247 
       
  2248     close() {
  2010     close() {
  2249       this.collapse({
  2011       this.collapse({
  2250         allowMultiple: true
  2012         allowMultiple: true
  2251       });
  2013       });
  2252     }
  2014     }
  2253 
       
  2254     collapse(options) {
  2015     collapse(options) {
  2255       // Overridden collapse() function. Mostly call the parent collapse(), but also
  2016       // Overridden collapse() function. Mostly call the parent collapse(), but also
  2256       // move our .isOpen to false.
  2017       // move our .isOpen to false.
  2257       // Initially, I tried tracking this with onChangeExpanded(), but it doesn't work
  2018       // Initially, I tried tracking this with onChangeExpanded(), but it doesn't work
  2258       // because the block settings sidebar is a layer "on top of" the G editor sidebar.
  2019       // because the block settings sidebar is a layer "on top of" the G editor sidebar.
  2262       // inspector-section would run with expanded=true, but I want
  2023       // inspector-section would run with expanded=true, but I want
  2263       // isOpen to be false when the block settings is closed.
  2024       // isOpen to be false when the block settings is closed.
  2264       this.isOpen = false;
  2025       this.isOpen = false;
  2265       super.collapse(options);
  2026       super.collapse(options);
  2266     }
  2027     }
  2267 
       
  2268     triggerActiveCallbacks() {
  2028     triggerActiveCallbacks() {
  2269       // Manually fire the callbacks associated with moving this.active
  2029       // Manually fire the callbacks associated with moving this.active
  2270       // from false to true.  "active" is always true for this section,
  2030       // from false to true.  "active" is always true for this section,
  2271       // and "isContextuallyActive" reflects if the block settings
  2031       // and "isContextuallyActive" reflects if the block settings
  2272       // sidebar is currently visible, that is, it has replaced the main
  2032       // sidebar is currently visible, that is, it has replaced the main
  2278       // triggering the "this.active" callbacks, we force the WP
  2038       // triggering the "this.active" callbacks, we force the WP
  2279       // customizer to query our .isContextuallyActive() function and
  2039       // customizer to query our .isContextuallyActive() function and
  2280       // update its view of our status.
  2040       // update its view of our status.
  2281       this.active.callbacks.fireWith(this.active, [false, true]);
  2041       this.active.callbacks.fireWith(this.active, [false, true]);
  2282     }
  2042     }
  2283 
       
  2284   };
  2043   };
  2285 }
  2044 }
  2286 
  2045 
  2287 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-section.js
  2046 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-section.js
  2288 /**
  2047 /**
  2289  * WordPress dependencies
  2048  * WordPress dependencies
  2290  */
  2049  */
  2291 
  2050 
       
  2051 
  2292 /**
  2052 /**
  2293  * Internal dependencies
  2053  * Internal dependencies
  2294  */
  2054  */
  2295 
  2055 
  2296 
       
  2297 
       
  2298 const getInspectorSectionId = sidebarId => `widgets-inspector-${sidebarId}`;
  2056 const getInspectorSectionId = sidebarId => `widgets-inspector-${sidebarId}`;
  2299 
       
  2300 function getSidebarSection() {
  2057 function getSidebarSection() {
  2301   const {
  2058   const {
  2302     wp: {
  2059     wp: {
  2303       customize
  2060       customize
  2304     }
  2061     }
  2317         customizeAction: [(0,external_wp_i18n_namespaceObject.__)('Customizing'), (0,external_wp_i18n_namespaceObject.__)('Widgets'), this.params.title].join(' ▸ ')
  2074         customizeAction: [(0,external_wp_i18n_namespaceObject.__)('Customizing'), (0,external_wp_i18n_namespaceObject.__)('Widgets'), this.params.title].join(' ▸ ')
  2318       });
  2075       });
  2319       customize.section.add(this.inspector);
  2076       customize.section.add(this.inspector);
  2320       this.contentContainer[0].classList.add('customize-widgets__sidebar-section');
  2077       this.contentContainer[0].classList.add('customize-widgets__sidebar-section');
  2321     }
  2078     }
  2322 
       
  2323     hasSubSectionOpened() {
  2079     hasSubSectionOpened() {
  2324       return this.inspector.expanded();
  2080       return this.inspector.expanded();
  2325     }
  2081     }
  2326 
       
  2327     onChangeExpanded(expanded, _args) {
  2082     onChangeExpanded(expanded, _args) {
  2328       const controls = this.controls();
  2083       const controls = this.controls();
  2329       const args = { ..._args,
  2084       const args = {
  2330 
  2085         ..._args,
  2331         completeCallback() {
  2086         completeCallback() {
  2332           var _args$completeCallbac;
       
  2333 
       
  2334           controls.forEach(control => {
  2087           controls.forEach(control => {
  2335             var _control$onChangeSect;
  2088             control.onChangeSectionExpanded?.(expanded, args);
  2336 
       
  2337             (_control$onChangeSect = control.onChangeSectionExpanded) === null || _control$onChangeSect === void 0 ? void 0 : _control$onChangeSect.call(control, expanded, args);
       
  2338           });
  2089           });
  2339           (_args$completeCallbac = _args.completeCallback) === null || _args$completeCallbac === void 0 ? void 0 : _args$completeCallbac.call(_args);
  2090           _args.completeCallback?.();
  2340         }
  2091         }
  2341 
       
  2342       };
  2092       };
  2343 
       
  2344       if (args.manualTransition) {
  2093       if (args.manualTransition) {
  2345         if (expanded) {
  2094         if (expanded) {
  2346           this.contentContainer.addClass(['busy', 'open']);
  2095           this.contentContainer.addClass(['busy', 'open']);
  2347           this.contentContainer.removeClass('is-sub-section-open');
  2096           this.contentContainer.removeClass('is-sub-section-open');
  2348           this.contentContainer.closest('.wp-full-overlay').addClass('section-open');
  2097           this.contentContainer.closest('.wp-full-overlay').addClass('section-open');
  2349         } else {
  2098         } else {
  2350           this.contentContainer.addClass(['busy', 'is-sub-section-open']);
  2099           this.contentContainer.addClass(['busy', 'is-sub-section-open']);
  2351           this.contentContainer.closest('.wp-full-overlay').addClass('section-open');
  2100           this.contentContainer.closest('.wp-full-overlay').addClass('section-open');
  2352           this.contentContainer.removeClass('open');
  2101           this.contentContainer.removeClass('open');
  2353         }
  2102         }
  2354 
       
  2355         const handleTransitionEnd = () => {
  2103         const handleTransitionEnd = () => {
  2356           this.contentContainer.removeClass('busy');
  2104           this.contentContainer.removeClass('busy');
  2357           args.completeCallback();
  2105           args.completeCallback();
  2358         };
  2106         };
  2359 
       
  2360         if (isReducedMotion) {
  2107         if (isReducedMotion) {
  2361           handleTransitionEnd();
  2108           handleTransitionEnd();
  2362         } else {
  2109         } else {
  2363           this.contentContainer.one('transitionend', handleTransitionEnd);
  2110           this.contentContainer.one('transitionend', handleTransitionEnd);
  2364         }
  2111         }
  2365       } else {
  2112       } else {
  2366         super.onChangeExpanded(expanded, args);
  2113         super.onChangeExpanded(expanded, args);
  2367       }
  2114       }
  2368     }
  2115     }
  2369 
       
  2370   };
  2116   };
  2371 }
  2117 }
  2372 
  2118 
  2373 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.js
  2119 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.js
  2374 /**
  2120 /**
  2376  */
  2122  */
  2377 
  2123 
  2378 const {
  2124 const {
  2379   wp
  2125   wp
  2380 } = window;
  2126 } = window;
  2381 
       
  2382 function parseWidgetId(widgetId) {
  2127 function parseWidgetId(widgetId) {
  2383   const matches = widgetId.match(/^(.+)-(\d+)$/);
  2128   const matches = widgetId.match(/^(.+)-(\d+)$/);
  2384 
       
  2385   if (matches) {
  2129   if (matches) {
  2386     return {
  2130     return {
  2387       idBase: matches[1],
  2131       idBase: matches[1],
  2388       number: parseInt(matches[2], 10)
  2132       number: parseInt(matches[2], 10)
  2389     };
  2133     };
  2390   } // Likely an old single widget.
  2134   }
  2391 
  2135 
  2392 
  2136   // Likely an old single widget.
  2393   return {
  2137   return {
  2394     idBase: widgetId
  2138     idBase: widgetId
  2395   };
  2139   };
  2396 }
  2140 }
  2397 
       
  2398 function widgetIdToSettingId(widgetId) {
  2141 function widgetIdToSettingId(widgetId) {
  2399   const {
  2142   const {
  2400     idBase,
  2143     idBase,
  2401     number
  2144     number
  2402   } = parseWidgetId(widgetId);
  2145   } = parseWidgetId(widgetId);
  2403 
       
  2404   if (number) {
  2146   if (number) {
  2405     return `widget_${idBase}[${number}]`;
  2147     return `widget_${idBase}[${number}]`;
  2406   }
  2148   }
  2407 
       
  2408   return `widget_${idBase}`;
  2149   return `widget_${idBase}`;
  2409 }
  2150 }
       
  2151 
  2410 /**
  2152 /**
  2411  * This is a custom debounce function to call different callbacks depending on
  2153  * This is a custom debounce function to call different callbacks depending on
  2412  * whether it's the _leading_ call or not.
  2154  * whether it's the _leading_ call or not.
  2413  *
  2155  *
  2414  * @param {Function} leading  The callback that gets called first.
  2156  * @param {Function} leading  The callback that gets called first.
  2415  * @param {Function} callback The callback that gets called after the first time.
  2157  * @param {Function} callback The callback that gets called after the first time.
  2416  * @param {number}   timeout  The debounced time in milliseconds.
  2158  * @param {number}   timeout  The debounced time in milliseconds.
  2417  * @return {Function} The debounced function.
  2159  * @return {Function} The debounced function.
  2418  */
  2160  */
  2419 
       
  2420 
       
  2421 function debounce(leading, callback, timeout) {
  2161 function debounce(leading, callback, timeout) {
  2422   let isLeading = false;
  2162   let isLeading = false;
  2423   let timerID;
  2163   let timerID;
  2424 
  2164   function debounced(...args) {
  2425   function debounced() {
       
  2426     for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
       
  2427       args[_key] = arguments[_key];
       
  2428     }
       
  2429 
       
  2430     const result = (isLeading ? callback : leading).apply(this, args);
  2165     const result = (isLeading ? callback : leading).apply(this, args);
  2431     isLeading = true;
  2166     isLeading = true;
  2432     clearTimeout(timerID);
  2167     clearTimeout(timerID);
  2433     timerID = setTimeout(() => {
  2168     timerID = setTimeout(() => {
  2434       isLeading = false;
  2169       isLeading = false;
  2435     }, timeout);
  2170     }, timeout);
  2436     return result;
  2171     return result;
  2437   }
  2172   }
  2438 
       
  2439   debounced.cancel = () => {
  2173   debounced.cancel = () => {
  2440     isLeading = false;
  2174     isLeading = false;
  2441     clearTimeout(timerID);
  2175     clearTimeout(timerID);
  2442   };
  2176   };
  2443 
       
  2444   return debounced;
  2177   return debounced;
  2445 }
  2178 }
  2446 
       
  2447 class SidebarAdapter {
  2179 class SidebarAdapter {
  2448   constructor(setting, api) {
  2180   constructor(setting, api) {
  2449     this.setting = setting;
  2181     this.setting = setting;
  2450     this.api = api;
  2182     this.api = api;
  2451     this.locked = false;
  2183     this.locked = false;
  2452     this.widgetsCache = new WeakMap();
  2184     this.widgetsCache = new WeakMap();
  2453     this.subscribers = new Set();
  2185     this.subscribers = new Set();
  2454     this.history = [this._getWidgetIds().map(widgetId => this.getWidget(widgetId))];
  2186     this.history = [this._getWidgetIds().map(widgetId => this.getWidget(widgetId))];
  2455     this.historyIndex = 0;
  2187     this.historyIndex = 0;
  2456     this.historySubscribers = new Set(); // Debounce the input for 1 second.
  2188     this.historySubscribers = new Set();
  2457 
  2189     // Debounce the input for 1 second.
  2458     this._debounceSetHistory = debounce(this._pushHistory, this._replaceHistory, 1000);
  2190     this._debounceSetHistory = debounce(this._pushHistory, this._replaceHistory, 1000);
  2459     this.setting.bind(this._handleSettingChange.bind(this));
  2191     this.setting.bind(this._handleSettingChange.bind(this));
  2460     this.api.bind('change', this._handleAllSettingsChange.bind(this));
  2192     this.api.bind('change', this._handleAllSettingsChange.bind(this));
  2461     this.undo = this.undo.bind(this);
  2193     this.undo = this.undo.bind(this);
  2462     this.redo = this.redo.bind(this);
  2194     this.redo = this.redo.bind(this);
  2463     this.save = this.save.bind(this);
  2195     this.save = this.save.bind(this);
  2464   }
  2196   }
  2465 
       
  2466   subscribe(callback) {
  2197   subscribe(callback) {
  2467     this.subscribers.add(callback);
  2198     this.subscribers.add(callback);
  2468     return () => {
  2199     return () => {
  2469       this.subscribers.delete(callback);
  2200       this.subscribers.delete(callback);
  2470     };
  2201     };
  2471   }
  2202   }
  2472 
       
  2473   getWidgets() {
  2203   getWidgets() {
  2474     return this.history[this.historyIndex];
  2204     return this.history[this.historyIndex];
  2475   }
  2205   }
  2476 
  2206   _emit(...args) {
  2477   _emit() {
       
  2478     for (const callback of this.subscribers) {
  2207     for (const callback of this.subscribers) {
  2479       callback(...arguments);
  2208       callback(...args);
  2480     }
  2209     }
  2481   }
  2210   }
  2482 
       
  2483   _getWidgetIds() {
  2211   _getWidgetIds() {
  2484     return this.setting.get();
  2212     return this.setting.get();
  2485   }
  2213   }
  2486 
       
  2487   _pushHistory() {
  2214   _pushHistory() {
  2488     this.history = [...this.history.slice(0, this.historyIndex + 1), this._getWidgetIds().map(widgetId => this.getWidget(widgetId))];
  2215     this.history = [...this.history.slice(0, this.historyIndex + 1), this._getWidgetIds().map(widgetId => this.getWidget(widgetId))];
  2489     this.historyIndex += 1;
  2216     this.historyIndex += 1;
  2490     this.historySubscribers.forEach(listener => listener());
  2217     this.historySubscribers.forEach(listener => listener());
  2491   }
  2218   }
  2492 
       
  2493   _replaceHistory() {
  2219   _replaceHistory() {
  2494     this.history[this.historyIndex] = this._getWidgetIds().map(widgetId => this.getWidget(widgetId));
  2220     this.history[this.historyIndex] = this._getWidgetIds().map(widgetId => this.getWidget(widgetId));
  2495   }
  2221   }
  2496 
       
  2497   _handleSettingChange() {
  2222   _handleSettingChange() {
  2498     if (this.locked) {
  2223     if (this.locked) {
  2499       return;
  2224       return;
  2500     }
  2225     }
  2501 
       
  2502     const prevWidgets = this.getWidgets();
  2226     const prevWidgets = this.getWidgets();
  2503 
       
  2504     this._pushHistory();
  2227     this._pushHistory();
  2505 
       
  2506     this._emit(prevWidgets, this.getWidgets());
  2228     this._emit(prevWidgets, this.getWidgets());
  2507   }
  2229   }
  2508 
       
  2509   _handleAllSettingsChange(setting) {
  2230   _handleAllSettingsChange(setting) {
  2510     if (this.locked) {
  2231     if (this.locked) {
  2511       return;
  2232       return;
  2512     }
  2233     }
  2513 
       
  2514     if (!setting.id.startsWith('widget_')) {
  2234     if (!setting.id.startsWith('widget_')) {
  2515       return;
  2235       return;
  2516     }
  2236     }
  2517 
       
  2518     const widgetId = settingIdToWidgetId(setting.id);
  2237     const widgetId = settingIdToWidgetId(setting.id);
  2519 
       
  2520     if (!this.setting.get().includes(widgetId)) {
  2238     if (!this.setting.get().includes(widgetId)) {
  2521       return;
  2239       return;
  2522     }
  2240     }
  2523 
       
  2524     const prevWidgets = this.getWidgets();
  2241     const prevWidgets = this.getWidgets();
  2525 
       
  2526     this._pushHistory();
  2242     this._pushHistory();
  2527 
       
  2528     this._emit(prevWidgets, this.getWidgets());
  2243     this._emit(prevWidgets, this.getWidgets());
  2529   }
  2244   }
  2530 
       
  2531   _createWidget(widget) {
  2245   _createWidget(widget) {
  2532     const widgetModel = wp.customize.Widgets.availableWidgets.findWhere({
  2246     const widgetModel = wp.customize.Widgets.availableWidgets.findWhere({
  2533       id_base: widget.idBase
  2247       id_base: widget.idBase
  2534     });
  2248     });
  2535     let number = widget.number;
  2249     let number = widget.number;
  2536 
       
  2537     if (widgetModel.get('is_multi') && !number) {
  2250     if (widgetModel.get('is_multi') && !number) {
  2538       widgetModel.set('multi_number', widgetModel.get('multi_number') + 1);
  2251       widgetModel.set('multi_number', widgetModel.get('multi_number') + 1);
  2539       number = widgetModel.get('multi_number');
  2252       number = widgetModel.get('multi_number');
  2540     }
  2253     }
  2541 
       
  2542     const settingId = number ? `widget_${widget.idBase}[${number}]` : `widget_${widget.idBase}`;
  2254     const settingId = number ? `widget_${widget.idBase}[${number}]` : `widget_${widget.idBase}`;
  2543     const settingArgs = {
  2255     const settingArgs = {
  2544       transport: wp.customize.Widgets.data.selectiveRefreshableWidgets[widgetModel.get('id_base')] ? 'postMessage' : 'refresh',
  2256       transport: wp.customize.Widgets.data.selectiveRefreshableWidgets[widgetModel.get('id_base')] ? 'postMessage' : 'refresh',
  2545       previewer: this.setting.previewer
  2257       previewer: this.setting.previewer
  2546     };
  2258     };
  2547     const setting = this.api.create(settingId, settingId, '', settingArgs);
  2259     const setting = this.api.create(settingId, settingId, '', settingArgs);
  2548     setting.set(widget.instance);
  2260     setting.set(widget.instance);
  2549     const widgetId = settingIdToWidgetId(settingId);
  2261     const widgetId = settingIdToWidgetId(settingId);
  2550     return widgetId;
  2262     return widgetId;
  2551   }
  2263   }
  2552 
       
  2553   _removeWidget(widget) {
  2264   _removeWidget(widget) {
  2554     const settingId = widgetIdToSettingId(widget.id);
  2265     const settingId = widgetIdToSettingId(widget.id);
  2555     const setting = this.api(settingId);
  2266     const setting = this.api(settingId);
  2556 
       
  2557     if (setting) {
  2267     if (setting) {
  2558       const instance = setting.get();
  2268       const instance = setting.get();
  2559       this.widgetsCache.delete(instance);
  2269       this.widgetsCache.delete(instance);
  2560     }
  2270     }
  2561 
       
  2562     this.api.remove(settingId);
  2271     this.api.remove(settingId);
  2563   }
  2272   }
  2564 
       
  2565   _updateWidget(widget) {
  2273   _updateWidget(widget) {
  2566     const prevWidget = this.getWidget(widget.id); // Bail out update if nothing changed.
  2274     const prevWidget = this.getWidget(widget.id);
  2567 
  2275 
       
  2276     // Bail out update if nothing changed.
  2568     if (prevWidget === widget) {
  2277     if (prevWidget === widget) {
  2569       return widget.id;
  2278       return widget.id;
  2570     } // Update existing setting if only the widget's instance changed.
  2279     }
  2571 
  2280 
  2572 
  2281     // Update existing setting if only the widget's instance changed.
  2573     if (prevWidget.idBase && widget.idBase && prevWidget.idBase === widget.idBase) {
  2282     if (prevWidget.idBase && widget.idBase && prevWidget.idBase === widget.idBase) {
  2574       const settingId = widgetIdToSettingId(widget.id);
  2283       const settingId = widgetIdToSettingId(widget.id);
  2575       this.api(settingId).set(widget.instance);
  2284       this.api(settingId).set(widget.instance);
  2576       return widget.id;
  2285       return widget.id;
  2577     } // Otherwise delete and re-create.
  2286     }
  2578 
  2287 
  2579 
  2288     // Otherwise delete and re-create.
  2580     this._removeWidget(widget);
  2289     this._removeWidget(widget);
  2581 
       
  2582     return this._createWidget(widget);
  2290     return this._createWidget(widget);
  2583   }
  2291   }
  2584 
       
  2585   getWidget(widgetId) {
  2292   getWidget(widgetId) {
  2586     if (!widgetId) {
  2293     if (!widgetId) {
  2587       return null;
  2294       return null;
  2588     }
  2295     }
  2589 
       
  2590     const {
  2296     const {
  2591       idBase,
  2297       idBase,
  2592       number
  2298       number
  2593     } = parseWidgetId(widgetId);
  2299     } = parseWidgetId(widgetId);
  2594     const settingId = widgetIdToSettingId(widgetId);
  2300     const settingId = widgetIdToSettingId(widgetId);
  2595     const setting = this.api(settingId);
  2301     const setting = this.api(settingId);
  2596 
       
  2597     if (!setting) {
  2302     if (!setting) {
  2598       return null;
  2303       return null;
  2599     }
  2304     }
  2600 
       
  2601     const instance = setting.get();
  2305     const instance = setting.get();
  2602 
       
  2603     if (this.widgetsCache.has(instance)) {
  2306     if (this.widgetsCache.has(instance)) {
  2604       return this.widgetsCache.get(instance);
  2307       return this.widgetsCache.get(instance);
  2605     }
  2308     }
  2606 
       
  2607     const widget = {
  2309     const widget = {
  2608       id: widgetId,
  2310       id: widgetId,
  2609       idBase,
  2311       idBase,
  2610       number,
  2312       number,
  2611       instance
  2313       instance
  2612     };
  2314     };
  2613     this.widgetsCache.set(instance, widget);
  2315     this.widgetsCache.set(instance, widget);
  2614     return widget;
  2316     return widget;
  2615   }
  2317   }
  2616 
       
  2617   _updateWidgets(nextWidgets) {
  2318   _updateWidgets(nextWidgets) {
  2618     this.locked = true;
  2319     this.locked = true;
  2619     const addedWidgetIds = [];
  2320     const addedWidgetIds = [];
  2620     const nextWidgetIds = nextWidgets.map(nextWidget => {
  2321     const nextWidgetIds = nextWidgets.map(nextWidget => {
  2621       if (nextWidget.id && this.getWidget(nextWidget.id)) {
  2322       if (nextWidget.id && this.getWidget(nextWidget.id)) {
  2622         addedWidgetIds.push(null);
  2323         addedWidgetIds.push(null);
  2623         return this._updateWidget(nextWidget);
  2324         return this._updateWidget(nextWidget);
  2624       }
  2325       }
  2625 
       
  2626       const widgetId = this._createWidget(nextWidget);
  2326       const widgetId = this._createWidget(nextWidget);
  2627 
       
  2628       addedWidgetIds.push(widgetId);
  2327       addedWidgetIds.push(widgetId);
  2629       return widgetId;
  2328       return widgetId;
  2630     });
  2329     });
  2631     const deletedWidgets = this.getWidgets().filter(widget => !nextWidgetIds.includes(widget.id));
  2330     const deletedWidgets = this.getWidgets().filter(widget => !nextWidgetIds.includes(widget.id));
  2632     deletedWidgets.forEach(widget => this._removeWidget(widget));
  2331     deletedWidgets.forEach(widget => this._removeWidget(widget));
  2633     this.setting.set(nextWidgetIds);
  2332     this.setting.set(nextWidgetIds);
  2634     this.locked = false;
  2333     this.locked = false;
  2635     return addedWidgetIds;
  2334     return addedWidgetIds;
  2636   }
  2335   }
  2637 
       
  2638   setWidgets(nextWidgets) {
  2336   setWidgets(nextWidgets) {
  2639     const addedWidgetIds = this._updateWidgets(nextWidgets);
  2337     const addedWidgetIds = this._updateWidgets(nextWidgets);
  2640 
       
  2641     this._debounceSetHistory();
  2338     this._debounceSetHistory();
  2642 
       
  2643     return addedWidgetIds;
  2339     return addedWidgetIds;
  2644   }
  2340   }
       
  2341 
  2645   /**
  2342   /**
  2646    * Undo/Redo related features
  2343    * Undo/Redo related features
  2647    */
  2344    */
  2648 
       
  2649 
       
  2650   hasUndo() {
  2345   hasUndo() {
  2651     return this.historyIndex > 0;
  2346     return this.historyIndex > 0;
  2652   }
  2347   }
  2653 
       
  2654   hasRedo() {
  2348   hasRedo() {
  2655     return this.historyIndex < this.history.length - 1;
  2349     return this.historyIndex < this.history.length - 1;
  2656   }
  2350   }
  2657 
       
  2658   _seek(historyIndex) {
  2351   _seek(historyIndex) {
  2659     const currentWidgets = this.getWidgets();
  2352     const currentWidgets = this.getWidgets();
  2660     this.historyIndex = historyIndex;
  2353     this.historyIndex = historyIndex;
  2661     const widgets = this.history[this.historyIndex];
  2354     const widgets = this.history[this.historyIndex];
  2662 
       
  2663     this._updateWidgets(widgets);
  2355     this._updateWidgets(widgets);
  2664 
       
  2665     this._emit(currentWidgets, this.getWidgets());
  2356     this._emit(currentWidgets, this.getWidgets());
  2666 
       
  2667     this.historySubscribers.forEach(listener => listener());
  2357     this.historySubscribers.forEach(listener => listener());
  2668 
       
  2669     this._debounceSetHistory.cancel();
  2358     this._debounceSetHistory.cancel();
  2670   }
  2359   }
  2671 
       
  2672   undo() {
  2360   undo() {
  2673     if (!this.hasUndo()) {
  2361     if (!this.hasUndo()) {
  2674       return;
  2362       return;
  2675     }
  2363     }
  2676 
       
  2677     this._seek(this.historyIndex - 1);
  2364     this._seek(this.historyIndex - 1);
  2678   }
  2365   }
  2679 
       
  2680   redo() {
  2366   redo() {
  2681     if (!this.hasRedo()) {
  2367     if (!this.hasRedo()) {
  2682       return;
  2368       return;
  2683     }
  2369     }
  2684 
       
  2685     this._seek(this.historyIndex + 1);
  2370     this._seek(this.historyIndex + 1);
  2686   }
  2371   }
  2687 
       
  2688   subscribeHistory(listener) {
  2372   subscribeHistory(listener) {
  2689     this.historySubscribers.add(listener);
  2373     this.historySubscribers.add(listener);
  2690     return () => {
  2374     return () => {
  2691       this.historySubscribers.delete(listener);
  2375       this.historySubscribers.delete(listener);
  2692     };
  2376     };
  2693   }
  2377   }
  2694 
       
  2695   save() {
  2378   save() {
  2696     this.api.previewer.save();
  2379     this.api.previewer.save();
  2697   }
  2380   }
  2698 
       
  2699 }
  2381 }
  2700 
  2382 
  2701 ;// CONCATENATED MODULE: external ["wp","dom"]
  2383 ;// CONCATENATED MODULE: external ["wp","dom"]
  2702 var external_wp_dom_namespaceObject = window["wp"]["dom"];
  2384 const external_wp_dom_namespaceObject = window["wp"]["dom"];
  2703 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inserter-outer-section.js
  2385 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/inserter-outer-section.js
  2704 /**
  2386 /**
  2705  * WordPress dependencies
  2387  * WordPress dependencies
  2706  */
  2388  */
  2707 
  2389 
  2708 
  2390 
  2709 
  2391 
       
  2392 
  2710 /**
  2393 /**
  2711  * Internal dependencies
  2394  * Internal dependencies
  2712  */
  2395  */
  2713 
       
  2714 
  2396 
  2715 function getInserterOuterSection() {
  2397 function getInserterOuterSection() {
  2716   const {
  2398   const {
  2717     wp: {
  2399     wp: {
  2718       customize
  2400       customize
  2719     }
  2401     }
  2720   } = window;
  2402   } = window;
  2721   const OuterSection = customize.OuterSection; // Override the OuterSection class to handle multiple outer sections.
  2403   const OuterSection = customize.OuterSection;
       
  2404   // Override the OuterSection class to handle multiple outer sections.
  2722   // It closes all the other outer sections whenever one is opened.
  2405   // It closes all the other outer sections whenever one is opened.
  2723   // The result is that at most one outer section can be opened at the same time.
  2406   // The result is that at most one outer section can be opened at the same time.
  2724 
       
  2725   customize.OuterSection = class extends OuterSection {
  2407   customize.OuterSection = class extends OuterSection {
  2726     onChangeExpanded(expanded, args) {
  2408     onChangeExpanded(expanded, args) {
  2727       if (expanded) {
  2409       if (expanded) {
  2728         customize.section.each(section => {
  2410         customize.section.each(section => {
  2729           if (section.params.type === 'outer' && section.id !== this.id) {
  2411           if (section.params.type === 'outer' && section.id !== this.id) {
  2731               section.collapse();
  2413               section.collapse();
  2732             }
  2414             }
  2733           }
  2415           }
  2734         });
  2416         });
  2735       }
  2417       }
  2736 
       
  2737       return super.onChangeExpanded(expanded, args);
  2418       return super.onChangeExpanded(expanded, args);
  2738     }
  2419     }
  2739 
  2420   };
  2740   }; // Handle constructor so that "params.type" can be correctly pointed to "outer".
  2421   // Handle constructor so that "params.type" can be correctly pointed to "outer".
  2741 
       
  2742   customize.sectionConstructor.outer = customize.OuterSection;
  2422   customize.sectionConstructor.outer = customize.OuterSection;
  2743   return class InserterOuterSection extends customize.OuterSection {
  2423   return class InserterOuterSection extends customize.OuterSection {
  2744     constructor() {
  2424     constructor(...args) {
  2745       super(...arguments); // This is necessary since we're creating a new class which is not identical to the original OuterSection.
  2425       super(...args);
       
  2426 
       
  2427       // This is necessary since we're creating a new class which is not identical to the original OuterSection.
  2746       // @See https://github.com/WordPress/wordpress-develop/blob/42b05c397c50d9dc244083eff52991413909d4bd/src/js/_enqueues/wp/customize/controls.js#L1427-L1436
  2428       // @See https://github.com/WordPress/wordpress-develop/blob/42b05c397c50d9dc244083eff52991413909d4bd/src/js/_enqueues/wp/customize/controls.js#L1427-L1436
  2747 
       
  2748       this.params.type = 'outer';
  2429       this.params.type = 'outer';
  2749       this.activeElementBeforeExpanded = null;
  2430       this.activeElementBeforeExpanded = null;
  2750       const ownerWindow = this.contentContainer[0].ownerDocument.defaultView; // Handle closing the inserter when pressing the Escape key.
  2431       const ownerWindow = this.contentContainer[0].ownerDocument.defaultView;
  2751 
  2432 
       
  2433       // Handle closing the inserter when pressing the Escape key.
  2752       ownerWindow.addEventListener('keydown', event => {
  2434       ownerWindow.addEventListener('keydown', event => {
  2753         if (this.expanded() && (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE || event.code === 'Escape') && !event.defaultPrevented) {
  2435         if (this.expanded() && (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE || event.code === 'Escape') && !event.defaultPrevented) {
  2754           event.preventDefault();
  2436           event.preventDefault();
  2755           event.stopPropagation();
  2437           event.stopPropagation();
  2756           (0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false);
  2438           (0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false);
  2757         }
  2439         }
  2758       }, // Use capture mode to make this run before other event listeners.
  2440       },
       
  2441       // Use capture mode to make this run before other event listeners.
  2759       true);
  2442       true);
  2760       this.contentContainer.addClass('widgets-inserter'); // Set a flag if the state is being changed from open() or close().
  2443       this.contentContainer.addClass('widgets-inserter');
       
  2444 
       
  2445       // Set a flag if the state is being changed from open() or close().
  2761       // Don't propagate the event if it's an internal action to prevent infinite loop.
  2446       // Don't propagate the event if it's an internal action to prevent infinite loop.
  2762 
       
  2763       this.isFromInternalAction = false;
  2447       this.isFromInternalAction = false;
  2764       this.expanded.bind(() => {
  2448       this.expanded.bind(() => {
  2765         if (!this.isFromInternalAction) {
  2449         if (!this.isFromInternalAction) {
  2766           // Propagate the event to React to sync the state.
  2450           // Propagate the event to React to sync the state.
  2767           (0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(this.expanded());
  2451           (0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(this.expanded());
  2768         }
  2452         }
  2769 
       
  2770         this.isFromInternalAction = false;
  2453         this.isFromInternalAction = false;
  2771       });
  2454       });
  2772     }
  2455     }
  2773 
       
  2774     open() {
  2456     open() {
  2775       if (!this.expanded()) {
  2457       if (!this.expanded()) {
  2776         const contentContainer = this.contentContainer[0];
  2458         const contentContainer = this.contentContainer[0];
  2777         this.activeElementBeforeExpanded = contentContainer.ownerDocument.activeElement;
  2459         this.activeElementBeforeExpanded = contentContainer.ownerDocument.activeElement;
  2778         this.isFromInternalAction = true;
  2460         this.isFromInternalAction = true;
  2780           completeCallback() {
  2462           completeCallback() {
  2781             // We have to do this in a "completeCallback" or else the elements will not yet be visible/tabbable.
  2463             // We have to do this in a "completeCallback" or else the elements will not yet be visible/tabbable.
  2782             // The first one should be the close button,
  2464             // The first one should be the close button,
  2783             // we want to skip it and choose the second one instead, which is the search box.
  2465             // we want to skip it and choose the second one instead, which is the search box.
  2784             const searchBox = external_wp_dom_namespaceObject.focus.tabbable.find(contentContainer)[1];
  2466             const searchBox = external_wp_dom_namespaceObject.focus.tabbable.find(contentContainer)[1];
  2785 
       
  2786             if (searchBox) {
  2467             if (searchBox) {
  2787               searchBox.focus();
  2468               searchBox.focus();
  2788             }
  2469             }
  2789           }
  2470           }
  2790 
       
  2791         });
  2471         });
  2792       }
  2472       }
  2793     }
  2473     }
  2794 
       
  2795     close() {
  2474     close() {
  2796       if (this.expanded()) {
  2475       if (this.expanded()) {
  2797         const contentContainer = this.contentContainer[0];
  2476         const contentContainer = this.contentContainer[0];
  2798         const activeElement = contentContainer.ownerDocument.activeElement;
  2477         const activeElement = contentContainer.ownerDocument.activeElement;
  2799         this.isFromInternalAction = true;
  2478         this.isFromInternalAction = true;
  2809               if (this.activeElementBeforeExpanded) {
  2488               if (this.activeElementBeforeExpanded) {
  2810                 this.activeElementBeforeExpanded.focus();
  2489                 this.activeElementBeforeExpanded.focus();
  2811               }
  2490               }
  2812             }
  2491             }
  2813           }
  2492           }
  2814 
       
  2815         });
  2493         });
  2816       }
  2494       }
  2817     }
  2495     }
  2818 
       
  2819   };
  2496   };
  2820 }
  2497 }
  2821 
  2498 
  2822 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-control.js
  2499 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-control.js
  2823 /**
  2500 /**
  2824  * WordPress dependencies
  2501  * WordPress dependencies
  2825  */
  2502  */
  2826 
  2503 
       
  2504 
  2827 /**
  2505 /**
  2828  * Internal dependencies
  2506  * Internal dependencies
  2829  */
  2507  */
  2830 
  2508 
  2831 
  2509 
  2832 
  2510 
  2833 
       
  2834 
       
  2835 const getInserterId = controlId => `widgets-inserter-${controlId}`;
  2511 const getInserterId = controlId => `widgets-inserter-${controlId}`;
  2836 
       
  2837 function getSidebarControl() {
  2512 function getSidebarControl() {
  2838   const {
  2513   const {
  2839     wp: {
  2514     wp: {
  2840       customize
  2515       customize
  2841     }
  2516     }
  2842   } = window;
  2517   } = window;
  2843   return class SidebarControl extends customize.Control {
  2518   return class SidebarControl extends customize.Control {
  2844     constructor() {
  2519     constructor(...args) {
  2845       super(...arguments);
  2520       super(...args);
  2846       this.subscribers = new Set();
  2521       this.subscribers = new Set();
  2847     }
  2522     }
  2848 
       
  2849     ready() {
  2523     ready() {
  2850       const InserterOuterSection = getInserterOuterSection();
  2524       const InserterOuterSection = getInserterOuterSection();
  2851       this.inserter = new InserterOuterSection(getInserterId(this.id), {});
  2525       this.inserter = new InserterOuterSection(getInserterId(this.id), {});
  2852       customize.section.add(this.inserter);
  2526       customize.section.add(this.inserter);
  2853       this.sectionInstance = customize.section(this.section());
  2527       this.sectionInstance = customize.section(this.section());
  2854       this.inspector = this.sectionInstance.inspector;
  2528       this.inspector = this.sectionInstance.inspector;
  2855       this.sidebarAdapter = new SidebarAdapter(this.setting, customize);
  2529       this.sidebarAdapter = new SidebarAdapter(this.setting, customize);
  2856     }
  2530     }
  2857 
       
  2858     subscribe(callback) {
  2531     subscribe(callback) {
  2859       this.subscribers.add(callback);
  2532       this.subscribers.add(callback);
  2860       return () => {
  2533       return () => {
  2861         this.subscribers.delete(callback);
  2534         this.subscribers.delete(callback);
  2862       };
  2535       };
  2863     }
  2536     }
  2864 
       
  2865     onChangeSectionExpanded(expanded, args) {
  2537     onChangeSectionExpanded(expanded, args) {
  2866       if (!args.unchanged) {
  2538       if (!args.unchanged) {
  2867         // Close the inserter when the section collapses.
  2539         // Close the inserter when the section collapses.
  2868         if (!expanded) {
  2540         if (!expanded) {
  2869           (0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false);
  2541           (0,external_wp_data_namespaceObject.dispatch)(store).setIsInserterOpened(false);
  2870         }
  2542         }
  2871 
       
  2872         this.subscribers.forEach(subscriber => subscriber(expanded, args));
  2543         this.subscribers.forEach(subscriber => subscriber(expanded, args));
  2873       }
  2544       }
  2874     }
  2545     }
  2875 
       
  2876   };
  2546   };
  2877 }
  2547 }
  2878 
  2548 
  2879 ;// CONCATENATED MODULE: external ["wp","hooks"]
       
  2880 var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
       
  2881 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.js
  2549 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.js
  2882 
       
  2883 
       
  2884 /**
       
  2885  * External dependencies
       
  2886  */
       
  2887 
       
  2888 /**
  2550 /**
  2889  * WordPress dependencies
  2551  * WordPress dependencies
  2890  */
  2552  */
  2891 
  2553 
  2892 
  2554 
  2895 
  2557 
  2896 
  2558 
  2897 /**
  2559 /**
  2898  * Internal dependencies
  2560  * Internal dependencies
  2899  */
  2561  */
       
  2562 
       
  2563 
  2900 
  2564 
  2901 
  2565 
  2902 
  2566 
  2903 
  2567 
  2904 const withMoveToSidebarToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
  2568 const withMoveToSidebarToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
  2905   let widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(props);
  2569   let widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(props);
  2906   const sidebarControls = useSidebarControls();
  2570   const sidebarControls = useSidebarControls();
  2907   const activeSidebarControl = useActiveSidebarControl();
  2571   const activeSidebarControl = useActiveSidebarControl();
  2908   const hasMultipleSidebars = (sidebarControls === null || sidebarControls === void 0 ? void 0 : sidebarControls.length) > 1;
  2572   const hasMultipleSidebars = sidebarControls?.length > 1;
  2909   const blockName = props.name;
  2573   const blockName = props.name;
  2910   const clientId = props.clientId;
  2574   const clientId = props.clientId;
  2911   const canInsertBlockInSidebar = (0,external_wp_data_namespaceObject.useSelect)(select => {
  2575   const canInsertBlockInSidebar = (0,external_wp_data_namespaceObject.useSelect)(select => {
  2912     // Use an empty string to represent the root block list, which
  2576     // Use an empty string to represent the root block list, which
  2913     // in the customizer editor represents a sidebar/widget area.
  2577     // in the customizer editor represents a sidebar/widget area.
  2916   const block = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId), [clientId]);
  2580   const block = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId), [clientId]);
  2917   const {
  2581   const {
  2918     removeBlock
  2582     removeBlock
  2919   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  2583   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  2920   const [, focusWidget] = useFocusControl();
  2584   const [, focusWidget] = useFocusControl();
  2921 
       
  2922   function moveToSidebar(sidebarControlId) {
  2585   function moveToSidebar(sidebarControlId) {
  2923     const newSidebarControl = sidebarControls.find(sidebarControl => sidebarControl.id === sidebarControlId);
  2586     const newSidebarControl = sidebarControls.find(sidebarControl => sidebarControl.id === sidebarControlId);
  2924 
       
  2925     if (widgetId) {
  2587     if (widgetId) {
  2926       /**
  2588       /**
  2927        * If there's a widgetId, move it to the other sidebar.
  2589        * If there's a widgetId, move it to the other sidebar.
  2928        */
  2590        */
  2929       const oldSetting = activeSidebarControl.setting;
  2591       const oldSetting = activeSidebarControl.setting;
  2930       const newSetting = newSidebarControl.setting;
  2592       const newSetting = newSidebarControl.setting;
  2931       oldSetting((0,external_lodash_namespaceObject.without)(oldSetting(), widgetId));
  2593       oldSetting(oldSetting().filter(id => id !== widgetId));
  2932       newSetting([...newSetting(), widgetId]);
  2594       newSetting([...newSetting(), widgetId]);
  2933     } else {
  2595     } else {
  2934       /**
  2596       /**
  2935        * If there isn't a widgetId, it's most likely a inner block.
  2597        * If there isn't a widgetId, it's most likely a inner block.
  2936        * First, remove the block in the original sidebar,
  2598        * First, remove the block in the original sidebar,
  2937        * then, create a new widget in the new sidebar and get back its widgetId.
  2599        * then, create a new widget in the new sidebar and get back its widgetId.
  2938        */
  2600        */
  2939       const sidebarAdapter = newSidebarControl.sidebarAdapter;
  2601       const sidebarAdapter = newSidebarControl.sidebarAdapter;
  2940       removeBlock(clientId);
  2602       removeBlock(clientId);
  2941       const addedWidgetIds = sidebarAdapter.setWidgets([...sidebarAdapter.getWidgets(), blockToWidget(block)]); // The last non-null id is the added widget's id.
  2603       const addedWidgetIds = sidebarAdapter.setWidgets([...sidebarAdapter.getWidgets(), blockToWidget(block)]);
  2942 
  2604       // The last non-null id is the added widget's id.
  2943       widgetId = addedWidgetIds.reverse().find(id => !!id);
  2605       widgetId = addedWidgetIds.reverse().find(id => !!id);
  2944     } // Move focus to the moved widget and expand the sidebar.
  2606     }
  2945 
  2607 
  2946 
  2608     // Move focus to the moved widget and expand the sidebar.
  2947     focusWidget(widgetId);
  2609     focusWidget(widgetId);
  2948   }
  2610   }
  2949 
  2611   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  2950   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(BlockEdit, props), hasMultipleSidebars && canInsertBlockInSidebar && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_widgets_namespaceObject.MoveToWidgetArea, {
  2612     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, {
  2951     widgetAreas: sidebarControls.map(sidebarControl => ({
  2613       ...props
  2952       id: sidebarControl.id,
  2614     }), hasMultipleSidebars && canInsertBlockInSidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
  2953       name: sidebarControl.params.label,
  2615       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_widgets_namespaceObject.MoveToWidgetArea, {
  2954       description: sidebarControl.params.description
  2616         widgetAreas: sidebarControls.map(sidebarControl => ({
  2955     })),
  2617           id: sidebarControl.id,
  2956     currentWidgetAreaId: activeSidebarControl === null || activeSidebarControl === void 0 ? void 0 : activeSidebarControl.id,
  2618           name: sidebarControl.params.label,
  2957     onSelect: moveToSidebar
  2619           description: sidebarControl.params.description
  2958   })));
  2620         })),
       
  2621         currentWidgetAreaId: activeSidebarControl?.id,
       
  2622         onSelect: moveToSidebar
       
  2623       })
       
  2624     })]
       
  2625   });
  2959 }, 'withMoveToSidebarToolbarItem');
  2626 }, 'withMoveToSidebarToolbarItem');
  2960 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/block-edit', withMoveToSidebarToolbarItem);
  2627 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/block-edit', withMoveToSidebarToolbarItem);
  2961 
  2628 
  2962 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js
  2629 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js
  2963 /**
  2630 /**
  2964  * WordPress dependencies
  2631  * WordPress dependencies
  2965  */
  2632  */
  2966 
  2633 
  2967 
  2634 
  2968 
       
  2969 const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload;
  2635 const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload;
  2970 
       
  2971 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload);
  2636 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload);
  2972 
  2637 
  2973 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js
  2638 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js
  2974 
  2639 /**
  2975 
  2640  * WordPress dependencies
  2976 
  2641  */
  2977 /**
  2642 
  2978  * WordPress dependencies
       
  2979  */
       
  2980 
  2643 
  2981 
  2644 
  2982 const {
  2645 const {
  2983   wp: wide_widget_display_wp
  2646   wp: wide_widget_display_wp
  2984 } = window;
  2647 } = window;
  2985 const withWideWidgetDisplay = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
  2648 const withWideWidgetDisplay = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
  2986   var _wp$customize$Widgets, _wp$customize$Widgets2;
  2649   var _wp$customize$Widgets;
  2987 
       
  2988   const {
  2650   const {
  2989     idBase
  2651     idBase
  2990   } = props.attributes;
  2652   } = props.attributes;
  2991   const isWide = (_wp$customize$Widgets = (_wp$customize$Widgets2 = wide_widget_display_wp.customize.Widgets.data.availableWidgets.find(widget => widget.id_base === idBase)) === null || _wp$customize$Widgets2 === void 0 ? void 0 : _wp$customize$Widgets2.is_wide) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false;
  2653   const isWide = (_wp$customize$Widgets = wide_widget_display_wp.customize.Widgets.data.availableWidgets.find(widget => widget.id_base === idBase)?.is_wide) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false;
  2992   return (0,external_wp_element_namespaceObject.createElement)(BlockEdit, _extends({}, props, {
  2654   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, {
       
  2655     ...props,
  2993     isWide: isWide
  2656     isWide: isWide
  2994   }));
  2657   });
  2995 }, 'withWideWidgetDisplay');
  2658 }, 'withWideWidgetDisplay');
  2996 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/wide-widget-display', withWideWidgetDisplay);
  2659 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/customize-widgets/wide-widget-display', withWideWidgetDisplay);
  2997 
  2660 
  2998 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js
  2661 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js
  2999 /**
  2662 /**
  3002 
  2665 
  3003 
  2666 
  3004 
  2667 
  3005 
  2668 
  3006 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/index.js
  2669 ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/index.js
  3007 
  2670 /**
  3008 
  2671  * WordPress dependencies
  3009 /**
  2672  */
  3010  * WordPress dependencies
  2673 
  3011  */
       
  3012 
  2674 
  3013 
  2675 
  3014 
  2676 
  3015 
  2677 
  3016 
  2678 
  3026 const {
  2688 const {
  3027   wp: build_module_wp
  2689   wp: build_module_wp
  3028 } = window;
  2690 } = window;
  3029 const DISABLED_BLOCKS = ['core/more', 'core/block', 'core/freeform', 'core/template-part'];
  2691 const DISABLED_BLOCKS = ['core/more', 'core/block', 'core/freeform', 'core/template-part'];
  3030 const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
  2692 const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
       
  2693 
  3031 /**
  2694 /**
  3032  * Initializes the widgets block editor in the customizer.
  2695  * Initializes the widgets block editor in the customizer.
  3033  *
  2696  *
  3034  * @param {string} editorName          The editor name.
  2697  * @param {string} editorName          The editor name.
  3035  * @param {Object} blockEditorSettings Block editor settings.
  2698  * @param {Object} blockEditorSettings Block editor settings.
  3036  */
  2699  */
  3037 
       
  3038 function initialize(editorName, blockEditorSettings) {
  2700 function initialize(editorName, blockEditorSettings) {
  3039   (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/customize-widgets', {
  2701   (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/customize-widgets', {
  3040     fixedToolbar: false,
  2702     fixedToolbar: false,
  3041     welcomeGuide: true
  2703     welcomeGuide: true
  3042   });
  2704   });
  3043 
  2705   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
  3044   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).__experimentalReapplyBlockTypeFilters();
       
  3045 
       
  3046   const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => {
  2706   const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => {
  3047     return !(DISABLED_BLOCKS.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation'));
  2707     return !(DISABLED_BLOCKS.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation'));
  3048   });
  2708   });
  3049 
       
  3050   (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks);
  2709   (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks);
  3051   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)();
  2710   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)();
  3052 
       
  3053   if (false) {}
  2711   if (false) {}
  3054 
       
  3055   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetVariations)(blockEditorSettings);
  2712   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetVariations)(blockEditorSettings);
  3056   (0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)(); // As we are unregistering `core/freeform` to avoid the Classic block, we must
  2713   (0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)();
       
  2714 
       
  2715   // As we are unregistering `core/freeform` to avoid the Classic block, we must
  3057   // replace it with something as the default freeform content handler. Failure to
  2716   // replace it with something as the default freeform content handler. Failure to
  3058   // do this will result in errors in the default block parser.
  2717   // do this will result in errors in the default block parser.
  3059   // see: https://github.com/WordPress/gutenberg/issues/33097
  2718   // see: https://github.com/WordPress/gutenberg/issues/33097
  3060 
       
  3061   (0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)('core/html');
  2719   (0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)('core/html');
  3062   const SidebarControl = getSidebarControl(blockEditorSettings);
  2720   const SidebarControl = getSidebarControl(blockEditorSettings);
  3063   build_module_wp.customize.sectionConstructor.sidebar = getSidebarSection();
  2721   build_module_wp.customize.sectionConstructor.sidebar = getSidebarSection();
  3064   build_module_wp.customize.controlConstructor.sidebar_block_editor = SidebarControl;
  2722   build_module_wp.customize.controlConstructor.sidebar_block_editor = SidebarControl;
  3065   const container = document.createElement('div');
  2723   const container = document.createElement('div');
  3069     build_module_wp.customize.control.each(control => {
  2727     build_module_wp.customize.control.each(control => {
  3070       if (control instanceof SidebarControl) {
  2728       if (control instanceof SidebarControl) {
  3071         sidebarControls.push(control);
  2729         sidebarControls.push(control);
  3072       }
  2730       }
  3073     });
  2731     });
  3074     (0,external_wp_element_namespaceObject.render)((0,external_wp_element_namespaceObject.createElement)(CustomizeWidgets, {
  2732     (0,external_wp_element_namespaceObject.createRoot)(container).render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomizeWidgets, {
  3075       api: build_module_wp.customize,
  2733       api: build_module_wp.customize,
  3076       sidebarControls: sidebarControls,
  2734       sidebarControls: sidebarControls,
  3077       blockEditorSettings: blockEditorSettings
  2735       blockEditorSettings: blockEditorSettings
  3078     }), container);
  2736     }));
  3079   });
  2737   });
  3080 }
  2738 }
  3081 
  2739 
  3082 }();
  2740 
       
  2741 })();
       
  2742 
  3083 (window.wp = window.wp || {}).customizeWidgets = __webpack_exports__;
  2743 (window.wp = window.wp || {}).customizeWidgets = __webpack_exports__;
  3084 /******/ })()
  2744 /******/ })()
  3085 ;
  2745 ;