File "index.min.js.map"

Full Path: /home/pumpbmko/public_html/wp-content-20250114123711/plugins/gutenberg/build/edit-widgets/index.min.js.map
File size: 230.97 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"./build/edit-widgets/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,m5CCL9D,MAAM,EAA+BC,OAAW,GAAU,OCApD,EAA+BA,OAAW,GAAQ,KCAlD,EAA+BA,OAAW,GAAc,W,aCA9D,MAAM,EAA+BA,OAAW,GAAW,QCArD,EAA+BA,OAAW,GAAgB,aCA1D,EAA+BA,OAAW,GAAY,SCAtD,EAA+BA,OAAW,GAAW,QCArD,EAA+BA,OAAW,GAAe,YCAzD,EAA+BA,OAAW,GAAY,S,aC4F5D,SAAeC,EAAAA,EAAAA,iBAAiB,CAC/BC,mBApDM,SAA6BC,GAAQ,EAAOC,GAClD,OAASA,EAAOC,MACf,IAAK,0BACJ,OAAOD,EAAOE,QAAiBH,EAChC,IAAK,yBACJ,OAAOC,EAAOL,MAEhB,OAAOI,CACR,EA6CCI,yBANM,SAAmCJ,EAAQ,CAAE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,YAAa,oBAAqB,CAC9D0sB,cAAc,EACdC,cAAc,EACdC,sBAAsB,EACtBC,aAAa,KAGd7tB,EAAAA,EAAAA,UAAU8tB,EAAAA,OAAcC,2BACxBC,EAAAA,EAAAA,oBAAoBR,IACpBS,EAAAA,EAAAA,8BAECC,EAAAA,EAAAA,8CAA8C,CAC7CC,gBAAiBnR,MAGnBoR,EAAAA,EAAAA,gCAAgCpU,GAChCqU,GAAexe,IACfye,EAAAA,EAAAA,4BAEAtU,EAASuU,mCAAqC,CAAEC,EAAQC,KACvDC,EAAAA,EAAAA,oCAAsBF,EAAQC,EAAezU,IAM9C2U,EAAAA,EAAAA,+BAA+B,aAE/BrB,EAAKpR,QACJvd,EAAAA,EAAAA,KAACiwB,EAAAA,WAAU,CAAA7vB,UACVJ,EAAAA,EAAAA,KAACkwB,GAAM,CAACpR,oBAAsBzD,OAIzBsT,CACR,CAKO,MAAMwB,GAAa1B,GAEnB,SAAS2B,KACfzvB,IAAY,oCAAqC,CAChDqB,MAAO,MACPlB,QAAS,OAEX,CAOA,MAAM4uB,GAAkB1gB,IACvB,IAAOA,EACN,OAED,MAAM,SAAEyL,EAAQ,SAAEY,EAAQ,KAAEra,GAASgO,EAChCyL,IACJ4V,EAAAA,EAAAA,+CAA+C,CAAE,CAAErvB,GAAQyZ,KAE5D6V,EAAAA,EAAAA,mBAAmBtvB,EAAMqa,EAAU,G","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"deprecated\"]","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"blockLibrary\"]","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/external window [\"wp\",\"widgets\"]","webpack://wp/external window [\"wp\",\"preferences\"]","webpack://wp/external window [\"wp\",\"apiFetch\"]","../../packages/edit-widgets/src/store/reducer.js","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/./node_modules/clsx/dist/clsx.mjs","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/external window \"ReactJSXRuntime\"","../../packages/icons/src/library/check.js","../../packages/icons/src/library/star-filled.js","../../packages/icons/src/library/star-empty.js","webpack://wp/external window [\"wp\",\"viewport\"]","webpack://wp/external window [\"wp\",\"compose\"]","../../packages/icons/src/library/close-small.js","../../packages/interface/src/store/deprecated.js","../../packages/interface/src/store/actions.js","../../packages/interface/src/store/selectors.js","../../packages/interface/src/store/reducer.js","../../packages/interface/src/store/index.js","../../packages/interface/src/store/constants.js","webpack://wp/external window [\"wp\",\"plugins\"]","../../packages/interface/src/components/complementary-area-context/index.js","../../packages/interface/src/components/complementary-area-toggle/index.js","../../packages/interface/src/components/complementary-area-header/index.js","../../packages/interface/src/components/action-item/index.js","../../packages/interface/src/components/complementary-area-more-menu-item/index.js","../../packages/interface/src/components/pinned-items/index.js","../../packages/interface/src/components/complementary-area/index.js","../../packages/interface/src/components/navigable-region/index.js","../../packages/interface/src/components/interface-skeleton/index.js","webpack://wp/external window [\"wp\",\"blockEditor\"]","../../packages/edit-widgets/src/store/transformers.js","../../packages/edit-widgets/src/store/utils.js","../../packages/edit-widgets/src/store/constants.js","../../packages/edit-widgets/src/store/actions.js","../../packages/edit-widgets/src/store/resolvers.js","../../packages/edit-widgets/src/store/selectors.js","../../packages/edit-widgets/src/store/private-selectors.js","webpack://wp/external window [\"wp\",\"privateApis\"]","../../packages/edit-widgets/src/lock-unlock.js","../../packages/edit-widgets/src/store/index.js","webpack://wp/external window [\"wp\",\"hooks\"]","../../packages/edit-widgets/src/filters/move-to-widget-area.js","webpack://wp/external window [\"wp\",\"mediaUtils\"]","../../packages/edit-widgets/src/filters/replace-media-upload.js","../../packages/edit-widgets/src/blocks/widget-area/edit/use-is-dragging-within.js","../../packages/edit-widgets/src/blocks/widget-area/edit/inner-blocks.js","../../packages/edit-widgets/src/blocks/widget-area/edit/index.js","../../packages/edit-widgets/src/blocks/widget-area/index.js","../../packages/edit-widgets/src/components/error-boundary/index.js","webpack://wp/external window [\"wp\",\"patterns\"]","webpack://wp/external window [\"wp\",\"keyboardShortcuts\"]","webpack://wp/external window [\"wp\",\"keycodes\"]","../../packages/edit-widgets/src/components/keyboard-shortcuts/index.js","../../packages/edit-widgets/src/constants.js","../../packages/edit-widgets/src/components/widget-areas-block-editor-provider/index.js","../../packages/edit-widgets/src/hooks/use-last-selected-widget-area.js","../../packages/icons/src/library/drawer-left.js","../../packages/icons/src/library/drawer-right.js","../../packages/icons/src/library/block-default.js","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/external window [\"wp\",\"dom\"]","../../packages/edit-widgets/src/components/sidebar/widget-areas.js","../../packages/edit-widgets/src/components/sidebar/index.js","../../packages/icons/src/library/plus.js","../../packages/icons/src/library/list-view.js","../../packages/icons/src/library/undo.js","../../packages/icons/src/library/redo.js","../../packages/edit-widgets/src/components/header/undo-redo/undo.js","../../packages/edit-widgets/src/components/header/undo-redo/redo.js","../../packages/edit-widgets/src/components/header/document-tools/index.js","../../packages/edit-widgets/src/components/save-button/index.js","../../packages/icons/src/library/more-vertical.js","../../packages/icons/src/library/external.js","../../packages/edit-widgets/src/components/keyboard-shortcut-help-modal/config.js","../../packages/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js","../../packages/edit-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js","../../packages/edit-widgets/src/components/keyboard-shortcut-help-modal/index.js","../../packages/edit-widgets/src/components/more-menu/tools-more-menu-group.js","../../packages/edit-widgets/src/components/more-menu/index.js","../../packages/edit-widgets/src/components/header/index.js","../../packages/edit-widgets/src/components/notices/index.js","../../packages/edit-widgets/src/components/widget-areas-block-editor-content/index.js","../../packages/icons/src/library/close.js","../../packages/edit-widgets/src/hooks/use-widget-library-insertion-point.js","../../packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js","../../packages/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js","../../packages/edit-widgets/src/components/secondary-sidebar/index.js","../../packages/edit-widgets/src/components/layout/interface.js","../../packages/edit-widgets/src/components/layout/unsaved-changes-warning.js","../../packages/edit-widgets/src/components/welcome-guide/index.js","../../packages/edit-widgets/src/components/layout/index.js","../../packages/edit-widgets/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockLibrary\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"widgets\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"preferences\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Controls the open state of the widget areas.\n *\n * @param {Object} state  Redux state.\n * @param {Object} action Redux action.\n *\n * @return {Array} Updated state.\n */\nexport function widgetAreasOpenState( state = {}, action ) {\n\tconst { type } = action;\n\tswitch ( type ) {\n\t\tcase 'SET_WIDGET_AREAS_OPEN_STATE': {\n\t\t\treturn action.widgetAreasOpenState;\n\t\t}\n\t\tcase 'SET_IS_WIDGET_AREA_OPEN': {\n\t\t\tconst { clientId, isOpen } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ clientId ]: isOpen,\n\t\t\t};\n\t\t}\n\t\tdefault: {\n\t\t\treturn state;\n\t\t}\n\t}\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the inserter sidebar toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the inserter sidebar toggle button.\n */\nexport function inserterSidebarToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport default combineReducers( {\n\tblockInserterPanel,\n\tinserterSidebarToggleRef,\n\tlistViewPanel,\n\tlistViewToggleRef,\n\twidgetAreasOpenState,\n} );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","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}export 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}export default clsx;","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactJSXRuntime\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst check = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z\" />\n\t</SVG>\n);\n\nexport default check;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z\" />\n\t</SVG>\n);\n\nexport default starFilled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starEmpty = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default starEmpty;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"viewport\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst closeSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path 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\" />\n\t</SVG>\n);\n\nexport default closeSmall;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Set a default complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area  Area identifier.\n *\n * @return {Object} Action object.\n */\nexport const setDefaultComplementaryArea = ( scope, area ) => {\n\tscope = normalizeComplementaryAreaScope( scope );\n\tarea = normalizeComplementaryAreaName( scope, area );\n\treturn {\n\t\ttype: 'SET_DEFAULT_COMPLEMENTARY_AREA',\n\t\tscope,\n\t\tarea,\n\t};\n};\n\n/**\n * Enable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area  Area identifier.\n */\nexport const enableComplementaryArea =\n\t( scope, area ) =>\n\t( { registry, dispatch } ) => {\n\t\t// Return early if there's no area.\n\t\tif ( ! area ) {\n\t\t\treturn;\n\t\t}\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tarea = normalizeComplementaryAreaName( scope, area );\n\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( ! isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', true );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'ENABLE_COMPLEMENTARY_AREA',\n\t\t\tscope,\n\t\t\tarea,\n\t\t} );\n\t};\n\n/**\n * Disable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n */\nexport const disableComplementaryArea =\n\t( scope ) =>\n\t( { registry } ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', false );\n\t\t}\n\t};\n\n/**\n * Pins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item  Item identifier.\n *\n * @return {Object} Action object.\n */\nexport const pinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\t// The item is already pinned, there's nothing to do.\n\t\tif ( pinnedItems?.[ item ] === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: true,\n\t\t} );\n\t};\n\n/**\n * Unpins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item  Item identifier.\n */\nexport const unpinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: false,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope       The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).toggleFeature`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).toggle`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).toggle( scope, featureName );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string}  scope       The feature scope (e.g. core/edit-post).\n * @param {string}  featureName The feature name.\n * @param {boolean} value       The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureValue`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).set`,\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( scope, featureName, !! value );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string}                  scope    The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureDefaults`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).setDefaults`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).setDefaults( scope, defaults );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string | null | undefined} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\n\t\t// Return `undefined` to indicate that the user has never toggled\n\t\t// visibility, this is the vanilla default. Other code relies on this\n\t\t// nuance in the return value.\n\t\tif ( isComplementaryAreaVisible === undefined ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Return `null` to indicate the user hid the complementary area.\n\t\tif ( isComplementaryAreaVisible === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn state?.complementaryAreas?.[ scope ];\n\t}\n);\n\nexport const isComplementaryAreaLoading = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\t\tconst identifier = state?.complementaryAreas?.[ scope ];\n\n\t\treturn isVisible && identifier === undefined;\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item  Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state       The store state.\n * @param {string} scope       The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `select( 'core/preferences' ).get( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state     Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\nexport function complementaryAreas( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEFAULT_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\n\t\t\t// If there's already an area, don't overwrite it.\n\t\t\tif ( state[ scope ] ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t\tcase 'ENABLE_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer for storing the name of the open modal, or null if no modal is open.\n *\n * @param {Object} state  Previous state.\n * @param {Object} action Action object containing the `name` of the modal\n *\n * @return {Object} Updated state\n */\nexport function activeModal( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'OPEN_MODAL':\n\t\t\treturn action.name;\n\t\tcase 'CLOSE_MODAL':\n\t\t\treturn null;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tcomplementaryAreas,\n\tactiveModal,\n} );\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport reducer from './reducer';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregister( store );\n","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/interface';\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"plugins\"];","/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\nimport complementaryAreaContext from '../complementary-area-context';\n\nfunction ComplementaryAreaToggle( {\n\tas = Button,\n\tscope,\n\tidentifier,\n\ticon,\n\tselectedIcon,\n\tname,\n\t...props\n} ) {\n\tconst ComponentToUse = as;\n\tconst isSelected = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( scope ) ===\n\t\t\tidentifier,\n\t\t[ identifier, scope ]\n\t);\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\treturn (\n\t\t<ComponentToUse\n\t\t\ticon={ selectedIcon && isSelected ? selectedIcon : icon }\n\t\t\taria-controls={ identifier.replace( '/', ':' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tif ( isSelected ) {\n\t\t\t\t\tdisableComplementaryArea( scope );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( scope, identifier );\n\t\t\t\t}\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default complementaryAreaContext( ComplementaryAreaToggle );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\n\nconst ComplementaryAreaHeader = ( {\n\tsmallScreenTitle,\n\tchildren,\n\tclassName,\n\ttoggleButtonProps,\n} ) => {\n\tconst toggleButton = (\n\t\t<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />\n\t);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"components-panel__header interface-complementary-area-header__small\">\n\t\t\t\t{ smallScreenTitle && (\n\t\t\t\t\t<h2 className=\"interface-complementary-area-header__small-title\">\n\t\t\t\t\t\t{ smallScreenTitle }\n\t\t\t\t\t</h2>\n\t\t\t\t) }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-panel__header',\n\t\t\t\t\t'interface-complementary-area-header',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default ComplementaryAreaHeader;\n","/**\n * WordPress dependencies\n */\nimport { ButtonGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = ButtonGroup,\n\tfillProps = {},\n\tbubblesVirtually,\n\t...props\n} ) {\n\treturn (\n\t\t<Slot\n\t\t\tname={ name }\n\t\t\tbubblesVirtually={ bubblesVirtually }\n\t\t\tfillProps={ fillProps }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif ( ! Children.toArray( fills ).length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Special handling exists for backward compatibility.\n\t\t\t\t// It ensures that menu items created by plugin authors aren't\n\t\t\t\t// duplicated with automatically injected menu items coming\n\t\t\t\t// from pinnable plugin sidebars.\n\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t\tconst initializedByPlugins = [];\n\t\t\t\tChildren.forEach(\n\t\t\t\t\tfills,\n\t\t\t\t\t( {\n\t\t\t\t\t\tprops: { __unstableExplicitMenuItem, __unstableTarget },\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tif ( __unstableTarget && __unstableExplicitMenuItem ) {\n\t\t\t\t\t\t\tinitializedByPlugins.push( __unstableTarget );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tconst children = Children.map( fills, ( child ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! child.props.__unstableExplicitMenuItem &&\n\t\t\t\t\t\tinitializedByPlugins.includes(\n\t\t\t\t\t\t\tchild.props.__unstableTarget\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} );\n\n\t\t\t\treturn <Component { ...props }>{ children }</Component>;\n\t\t\t} }\n\t\t</Slot>\n\t);\n}\n\nfunction ActionItem( { name, as: Component = Button, onClick, ...props } ) {\n\treturn (\n\t\t<Fill name={ name }>\n\t\t\t{ ( { onClick: fpOnClick } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\tonClick || fpOnClick\n\t\t\t\t\t\t\t\t? ( ...args ) => {\n\t\t\t\t\t\t\t\t\t\t( onClick || noop )( ...args );\n\t\t\t\t\t\t\t\t\t\t( fpOnClick || noop )( ...args );\n\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Fill>\n\t);\n}\n\nActionItem.Slot = ActionItemSlot;\n\nexport default ActionItem;\n","/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\nimport { MenuItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport ActionItem from '../action-item';\n\nconst PluginsMenuItem = ( {\n\t// Menu item is marked with unstable prop for backward compatibility.\n\t// They are removed so they don't leak to DOM elements.\n\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t__unstableExplicitMenuItem,\n\t__unstableTarget,\n\t...restProps\n} ) => <MenuItem { ...restProps } />;\n\nexport default function ComplementaryAreaMoreMenuItem( {\n\tscope,\n\ttarget,\n\t__unstableExplicitMenuItem,\n\t...props\n} ) {\n\treturn (\n\t\t<ComplementaryAreaToggle\n\t\t\tas={ ( toggleProps ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ActionItem\n\t\t\t\t\t\t__unstableExplicitMenuItem={\n\t\t\t\t\t\t\t__unstableExplicitMenuItem\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableTarget={ `${ scope }/${ target }` }\n\t\t\t\t\t\tas={ PluginsMenuItem }\n\t\t\t\t\t\tname={ `${ scope }/plugin-more-menu` }\n\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tselectedIcon={ check }\n\t\t\tname={ target }\n\t\t\tscope={ scope }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Slot, Fill } from '@wordpress/components';\n\nfunction PinnedItems( { scope, ...props } ) {\n\treturn <Fill name={ `PinnedItems/${ scope }` } { ...props } />;\n}\n\nfunction PinnedItemsSlot( { scope, className, ...props } ) {\n\treturn (\n\t\t<Slot name={ `PinnedItems/${ scope }` } { ...props }>\n\t\t\t{ ( fills ) =>\n\t\t\t\tfills?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t'interface-pinned-items'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t</Slot>\n\t);\n}\n\nPinnedItems.Slot = PinnedItemsSlot;\n\nexport default PinnedItems;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tPanel,\n\tSlot,\n\tFill,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tusePrevious,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport withComplementaryAreaContext from '../complementary-area-context';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nconst ANIMATION_DURATION = 0.3;\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nconst SIDEBAR_WIDTH = 280;\nconst variants = {\n\topen: { width: SIDEBAR_WIDTH },\n\tclosed: { width: 0 },\n\tmobileOpen: { width: '100vw' },\n};\n\nfunction ComplementaryAreaFill( {\n\tactiveArea,\n\tisActive,\n\tscope,\n\tchildren,\n\tclassName,\n\tid,\n} ) {\n\tconst disableMotion = useReducedMotion();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\t// This is used to delay the exit animation to the next tick.\n\t// The reason this is done is to allow us to apply the right transition properties\n\t// When we switch from an open sidebar to another open sidebar.\n\t// we don't want to animate in this case.\n\tconst previousActiveArea = usePrevious( activeArea );\n\tconst previousIsActive = usePrevious( isActive );\n\tconst [ , setState ] = useState( {} );\n\tuseEffect( () => {\n\t\tsetState( {} );\n\t}, [ isActive ] );\n\tconst transition = {\n\t\ttype: 'tween',\n\t\tduration:\n\t\t\tdisableMotion ||\n\t\t\tisMobileViewport ||\n\t\t\t( !! previousActiveArea &&\n\t\t\t\t!! activeArea &&\n\t\t\t\tactiveArea !== previousActiveArea )\n\t\t\t\t? 0\n\t\t\t\t: ANIMATION_DURATION,\n\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t};\n\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t{ ( previousIsActive || isActive ) && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ variants }\n\t\t\t\t\t\tinitial=\"closed\"\n\t\t\t\t\t\tanimate={ isMobileViewport ? 'mobileOpen' : 'open' }\n\t\t\t\t\t\texit=\"closed\"\n\t\t\t\t\t\ttransition={ transition }\n\t\t\t\t\t\tclassName=\"interface-complementary-area__fill\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\twidth: isMobileViewport\n\t\t\t\t\t\t\t\t\t? '100vw'\n\t\t\t\t\t\t\t\t\t: SIDEBAR_WIDTH,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmall = useRef( false );\n\tconst shouldOpenWhenNotSmall = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmall.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmall.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmall.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmall.current ) {\n\t\t\tpreviousIsSmall.current = isSmall;\n\t\t}\n\t}, [\n\t\tisActive,\n\t\tisSmall,\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tdisableComplementaryArea,\n\t\tenableComplementaryArea,\n\t] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier,\n\theader,\n\theaderClassName,\n\ticon,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\tsmallScreenTitle,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n} ) {\n\t// This state is used to delay the rendering of the Fill\n\t// until the initial effect runs.\n\t// This prevents the animation from running on mount if\n\t// the complementary area is active by default.\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst {\n\t\tisLoading,\n\t\tisActive,\n\t\tisPinned,\n\t\tactiveArea,\n\t\tisSmall,\n\t\tisLarge,\n\t\tshowIconLabels,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\tisItemPinned,\n\t\t\t} = select( interfaceStore );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\treturn {\n\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\tactiveArea: _activeArea,\n\t\t\t\tisSmall: select( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t},\n\t\t[ identifier, scope ]\n\t);\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t\tsetIsReady( true );\n\t}, [\n\t\tactiveArea,\n\t\tisActiveByDefault,\n\t\tscope,\n\t\tidentifier,\n\t\tisSmall,\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t] );\n\n\tif ( ! isReady ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t<ComplementaryAreaFill\n\t\t\t\tactiveArea={ activeArea }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tclassName={ clsx( 'interface-complementary-area', className ) }\n\t\t\t\tscope={ scope }\n\t\t\t\tid={ identifier.replace( '/', ':' ) }\n\t\t\t>\n\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\tsmallScreenTitle={ smallScreenTitle }\n\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\tscope,\n\t\t\t\t\t\tidentifier,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ header || (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h2 className=\"interface-complementary-area-header__title\">\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t{ isPinnable && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\ticon={ isPinned ? starFilled : starEmpty }\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\tidentifier\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</ComplementaryAreaHeader>\n\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t</ComplementaryAreaFill>\n\t\t</>\n\t);\n}\n\nconst ComplementaryAreaWrapped =\n\twithComplementaryAreaContext( ComplementaryArea );\n\nComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryAreaWrapped;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nexport default function NavigableRegion( {\n\tchildren,\n\tclassName,\n\tariaLabel,\n\tas: Tag = 'div',\n\t...props\n} ) {\n\treturn (\n\t\t<Tag\n\t\t\tclassName={ clsx( 'interface-navigable-region', className ) }\n\t\t\taria-label={ ariaLabel }\n\t\t\trole=\"region\"\n\t\t\ttabIndex=\"-1\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</Tag>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\t__unstableUseNavigateRegions as useNavigateRegions,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tuseMergeRefs,\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NavigableRegion from '../navigable-region';\n\nconst ANIMATION_DURATION = 0.25;\nconst commonTransition = {\n\ttype: 'tween',\n\tduration: ANIMATION_DURATION,\n\tease: [ 0.6, 0, 0.4, 1 ],\n};\n\nfunction useHTMLClass( className ) {\n\tuseEffect( () => {\n\t\tconst element =\n\t\t\tdocument && document.querySelector( `html:not(.${ className })` );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\t\telement.classList.toggle( className );\n\t\treturn () => {\n\t\t\telement.classList.toggle( className );\n\t\t};\n\t}, [ className ] );\n}\n\nconst headerVariants = {\n\thidden: { opacity: 1, marginTop: -60 },\n\tvisible: { opacity: 1, marginTop: 0 },\n\tdistractionFreeHover: {\n\t\topacity: 1,\n\t\tmarginTop: 0,\n\t\ttransition: {\n\t\t\t...commonTransition,\n\t\t\tdelay: 0.2,\n\t\t\tdelayChildren: 0.2,\n\t\t},\n\t},\n\tdistractionFreeHidden: {\n\t\topacity: 0,\n\t\tmarginTop: -60,\n\t},\n\tdistractionFreeDisabled: {\n\t\topacity: 0,\n\t\tmarginTop: 0,\n\t\ttransition: {\n\t\t\t...commonTransition,\n\t\t\tdelay: 0.8,\n\t\t\tdelayChildren: 0.8,\n\t\t},\n\t},\n};\n\nfunction InterfaceSkeleton(\n\t{\n\t\tisDistractionFree,\n\t\tfooter,\n\t\theader,\n\t\teditorNotices,\n\t\tsidebar,\n\t\tsecondarySidebar,\n\t\tcontent,\n\t\tactions,\n\t\tlabels,\n\t\tclassName,\n\t\tenableRegionNavigation = true,\n\t\t// Todo: does this need to be a prop.\n\t\t// Can we use a dependency to keyboard-shortcuts directly?\n\t\tshortcuts,\n\t},\n\tref\n) {\n\tconst [ secondarySidebarResizeListener, secondarySidebarSize ] =\n\t\tuseResizeObserver();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst disableMotion = useReducedMotion();\n\tconst defaultTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : ANIMATION_DURATION,\n\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t};\n\tconst navigateRegionsProps = useNavigateRegions( shortcuts );\n\tuseHTMLClass( 'interface-interface-skeleton__html-container' );\n\n\tconst defaultLabels = {\n\t\t/* translators: accessibility text for the top bar landmark region. */\n\t\theader: _x( 'Header', 'header landmark area' ),\n\t\t/* translators: accessibility text for the content landmark region. */\n\t\tbody: __( 'Content' ),\n\t\t/* translators: accessibility text for the secondary sidebar landmark region. */\n\t\tsecondarySidebar: __( 'Block Library' ),\n\t\t/* translators: accessibility text for the settings landmark region. */\n\t\tsidebar: __( 'Settings' ),\n\t\t/* translators: accessibility text for the publish landmark region. */\n\t\tactions: __( 'Publish' ),\n\t\t/* translators: accessibility text for the footer landmark region. */\n\t\tfooter: __( 'Footer' ),\n\t};\n\n\tconst mergedLabels = { ...defaultLabels, ...labels };\n\n\treturn (\n\t\t<div\n\t\t\t{ ...( enableRegionNavigation ? navigateRegionsProps : {} ) }\n\t\t\tref={ useMergeRefs( [\n\t\t\t\tref,\n\t\t\t\tenableRegionNavigation ? navigateRegionsProps.ref : undefined,\n\t\t\t] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'interface-interface-skeleton',\n\t\t\t\tnavigateRegionsProps.className,\n\t\t\t\t!! footer && 'has-footer'\n\t\t\t) }\n\t\t>\n\t\t\t<div className=\"interface-interface-skeleton__editor\">\n\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t{ !! header && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__header\"\n\t\t\t\t\t\t\taria-label={ mergedLabels.header }\n\t\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHidden'\n\t\t\t\t\t\t\t\t\t: 'hidden'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHover'\n\t\t\t\t\t\t\t\t\t: 'visible'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t? 'distractionFreeDisabled'\n\t\t\t\t\t\t\t\t\t: 'visible'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texit={\n\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHidden'\n\t\t\t\t\t\t\t\t\t: 'hidden'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariants={ headerVariants }\n\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ header }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isDistractionFree && (\n\t\t\t\t\t<div className=\"interface-interface-skeleton__header\">\n\t\t\t\t\t\t{ editorNotices }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div className=\"interface-interface-skeleton__body\">\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{ !! secondarySidebar && (\n\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__secondary-sidebar\"\n\t\t\t\t\t\t\t\tariaLabel={ mergedLabels.secondarySidebar }\n\t\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\t\tinitial=\"closed\"\n\t\t\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t\t\tisMobileViewport ? 'mobileOpen' : 'open'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\texit=\"closed\"\n\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\topen: { width: secondarySidebarSize.width },\n\t\t\t\t\t\t\t\t\tclosed: { width: 0 },\n\t\t\t\t\t\t\t\t\tmobileOpen: { width: '100vw' },\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\twidth: isMobileViewport\n\t\t\t\t\t\t\t\t\t\t\t? '100vw'\n\t\t\t\t\t\t\t\t\t\t\t: 'fit-content',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ secondarySidebarResizeListener }\n\t\t\t\t\t\t\t\t\t{ secondarySidebar }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\tclassName=\"interface-interface-skeleton__content\"\n\t\t\t\t\t\tariaLabel={ mergedLabels.body }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ content }\n\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t{ !! sidebar && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__sidebar\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.sidebar }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sidebar }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! actions && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__actions\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.actions }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ !! footer && (\n\t\t\t\t<NavigableRegion\n\t\t\t\t\tclassName=\"interface-interface-skeleton__footer\"\n\t\t\t\t\tariaLabel={ mergedLabels.footer }\n\t\t\t\t>\n\t\t\t\t\t{ footer }\n\t\t\t\t</NavigableRegion>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InterfaceSkeleton );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","/**\n * WordPress dependencies\n */\nimport { createBlock, parse, serialize } from '@wordpress/blocks';\nimport { addWidgetIdToBlock } from '@wordpress/widgets';\n\n/**\n * Converts a widget entity record into a block.\n *\n * @param {Object} widget The widget entity record.\n * @return {Object} a block (converted from the entity record).\n */\nexport function transformWidgetToBlock( widget ) {\n\tif ( widget.id_base === 'block' ) {\n\t\tconst parsedBlocks = parse( widget.instance.raw.content, {\n\t\t\t__unstableSkipAutop: true,\n\t\t} );\n\t\tif ( ! parsedBlocks.length ) {\n\t\t\treturn addWidgetIdToBlock(\n\t\t\t\tcreateBlock( 'core/paragraph', {}, [] ),\n\t\t\t\twidget.id\n\t\t\t);\n\t\t}\n\t\treturn addWidgetIdToBlock( parsedBlocks[ 0 ], widget.id );\n\t}\n\n\tlet attributes;\n\tif ( widget._embedded.about[ 0 ].is_multi ) {\n\t\tattributes = {\n\t\t\tidBase: widget.id_base,\n\t\t\tinstance: widget.instance,\n\t\t};\n\t} else {\n\t\tattributes = {\n\t\t\tid: widget.id,\n\t\t};\n\t}\n\n\treturn addWidgetIdToBlock(\n\t\tcreateBlock( 'core/legacy-widget', attributes, [] ),\n\t\twidget.id\n\t);\n}\n\n/**\n * Converts a block to a widget entity record.\n *\n * @param {Object}  block         The block.\n * @param {Object?} relatedWidget A related widget entity record from the API (optional).\n * @return {Object} the widget object (converted from block).\n */\nexport function transformBlockToWidget( block, relatedWidget = {} ) {\n\tlet widget;\n\n\tconst isValidLegacyWidgetBlock =\n\t\tblock.name === 'core/legacy-widget' &&\n\t\t( block.attributes.id || block.attributes.instance );\n\n\tif ( isValidLegacyWidgetBlock ) {\n\t\twidget = {\n\t\t\t...relatedWidget,\n\t\t\tid: block.attributes.id ?? relatedWidget.id,\n\t\t\tid_base: block.attributes.idBase ?? relatedWidget.id_base,\n\t\t\tinstance: block.attributes.instance ?? relatedWidget.instance,\n\t\t};\n\t} else {\n\t\twidget = {\n\t\t\t...relatedWidget,\n\t\t\tid_base: 'block',\n\t\t\tinstance: {\n\t\t\t\traw: {\n\t\t\t\t\tcontent: serialize( block ),\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\t// Delete read-only properties.\n\tdelete widget.rendered;\n\tdelete widget.rendered_form;\n\n\treturn widget;\n}\n","/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id     Post ID.\n * @param {Array}  blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n","/**\n * Module Constants\n */\nexport const STORE_NAME = 'core/edit-widgets';\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { getWidgetIdFromBlock } from '@wordpress/widgets';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { transformBlockToWidget } from './transformers';\nimport {\n\tbuildWidgetAreaPostId,\n\tbuildWidgetAreasQuery,\n\tcreateStubPost,\n\tKIND,\n\tPOST_TYPE,\n\tWIDGET_AREA_ENTITY_TYPE,\n} from './utils';\nimport { STORE_NAME as editWidgetsStoreName } from './constants';\n\n/**\n * Persists a stub post with given ID to core data store. The post is meant to be in-memory only and\n * shouldn't be saved via the API.\n *\n * @param {string} id     Post ID.\n * @param {Array}  blocks Blocks the post should consist of.\n * @return {Object} The post object.\n */\nexport const persistStubPost =\n\t( id, blocks ) =>\n\t( { registry } ) => {\n\t\tconst stubPost = createStubPost( id, blocks );\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.receiveEntityRecords(\n\t\t\t\tKIND,\n\t\t\t\tPOST_TYPE,\n\t\t\t\tstubPost,\n\t\t\t\t{ id: stubPost.id },\n\t\t\t\tfalse\n\t\t\t);\n\t\treturn stubPost;\n\t};\n\n/**\n * Converts all the blocks from edited widget areas into widgets,\n * and submits a batch request to save everything at once.\n *\n * Creates a snackbar notice on either success or error.\n *\n * @return {Function} An action creator.\n */\nexport const saveEditedWidgetAreas =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst editedWidgetAreas = select.getEditedWidgetAreas();\n\t\tif ( ! editedWidgetAreas?.length ) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tawait dispatch.saveWidgetAreas( editedWidgetAreas );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createSuccessNotice( __( 'Widgets saved.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t} catch ( e ) {\n\t\t\tregistry.dispatch( noticesStore ).createErrorNotice(\n\t\t\t\t/* translators: %s: The error message. */\n\t\t\t\tsprintf( __( 'There was an error. %s' ), e.message ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n/**\n * Converts all the blocks from specified widget areas into widgets,\n * and submits a batch request to save everything at once.\n *\n * @param {Object[]} widgetAreas Widget areas to save.\n * @return {Function} An action creator.\n */\nexport const saveWidgetAreas =\n\t( widgetAreas ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\ttry {\n\t\t\tfor ( const widgetArea of widgetAreas ) {\n\t\t\t\tawait dispatch.saveWidgetArea( widgetArea.id );\n\t\t\t}\n\t\t} finally {\n\t\t\t// saveEditedEntityRecord resets the resolution status, let's fix it manually.\n\t\t\tawait registry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.finishResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tKIND,\n\t\t\t\t\tWIDGET_AREA_ENTITY_TYPE,\n\t\t\t\t\tbuildWidgetAreasQuery()\n\t\t\t\t);\n\t\t}\n\t};\n\n/**\n * Converts all the blocks from a widget area specified by ID into widgets,\n * and submits a batch request to save everything at once.\n *\n * @param {string} widgetAreaId ID of the widget area to process.\n * @return {Function} An action creator.\n */\nexport const saveWidgetArea =\n\t( widgetAreaId ) =>\n\tasync ( { dispatch, select, registry } ) => {\n\t\tconst widgets = select.getWidgets();\n\n\t\tconst post = registry\n\t\t\t.select( coreStore )\n\t\t\t.getEditedEntityRecord(\n\t\t\t\tKIND,\n\t\t\t\tPOST_TYPE,\n\t\t\t\tbuildWidgetAreaPostId( widgetAreaId )\n\t\t\t);\n\n\t\t// Get all widgets from this area\n\t\tconst areaWidgets = Object.values( widgets ).filter(\n\t\t\t( { sidebar } ) => sidebar === widgetAreaId\n\t\t);\n\n\t\t// Remove all duplicate reference widget instances for legacy widgets.\n\t\t// Why? We filter out the widgets with duplicate IDs to prevent adding more than one instance of a widget\n\t\t// implemented using a function. WordPress doesn't support having more than one instance of these, if you try to\n\t\t// save multiple instances of these in different sidebars you will run into undefined behaviors.\n\t\tconst usedReferenceWidgets = [];\n\t\tconst widgetsBlocks = post.blocks.filter( ( block ) => {\n\t\t\tconst { id } = block.attributes;\n\n\t\t\tif ( block.name === 'core/legacy-widget' && id ) {\n\t\t\t\tif ( usedReferenceWidgets.includes( id ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tusedReferenceWidgets.push( id );\n\t\t\t}\n\t\t\treturn true;\n\t\t} );\n\n\t\t// Determine which widgets have been deleted. We can tell if a widget is\n\t\t// deleted and not just moved to a different area by looking to see if\n\t\t// getWidgetAreaForWidgetId() finds something.\n\t\tconst deletedWidgets = [];\n\t\tfor ( const widget of areaWidgets ) {\n\t\t\tconst widgetsNewArea = select.getWidgetAreaForWidgetId( widget.id );\n\t\t\tif ( ! widgetsNewArea ) {\n\t\t\t\tdeletedWidgets.push( widget );\n\t\t\t}\n\t\t}\n\n\t\tconst batchMeta = [];\n\t\tconst batchTasks = [];\n\t\tconst sidebarWidgetsIds = [];\n\t\tfor ( let i = 0; i < widgetsBlocks.length; i++ ) {\n\t\t\tconst block = widgetsBlocks[ i ];\n\t\t\tconst widgetId = getWidgetIdFromBlock( block );\n\t\t\tconst oldWidget = widgets[ widgetId ];\n\t\t\tconst widget = transformBlockToWidget( block, oldWidget );\n\n\t\t\t// We'll replace the null widgetId after save, but we track it here\n\t\t\t// since order is important.\n\t\t\tsidebarWidgetsIds.push( widgetId );\n\n\t\t\t// Check oldWidget as widgetId might refer to an ID which has been\n\t\t\t// deleted, e.g. if a deleted block is restored via undo after saving.\n\t\t\tif ( oldWidget ) {\n\t\t\t\t// Update an existing widget.\n\t\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'widget',\n\t\t\t\t\twidgetId,\n\t\t\t\t\t{\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tsidebar: widgetAreaId,\n\t\t\t\t\t},\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\n\t\t\t\tconst hasEdits = registry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.hasEditsForEntityRecord( 'root', 'widget', widgetId );\n\n\t\t\t\tif ( ! hasEdits ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tbatchTasks.push( ( { saveEditedEntityRecord } ) =>\n\t\t\t\t\tsaveEditedEntityRecord( 'root', 'widget', widgetId )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Create a new widget.\n\t\t\t\tbatchTasks.push( ( { saveEntityRecord } ) =>\n\t\t\t\t\tsaveEntityRecord( 'root', 'widget', {\n\t\t\t\t\t\t...widget,\n\t\t\t\t\t\tsidebar: widgetAreaId,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tbatchMeta.push( {\n\t\t\t\tblock,\n\t\t\t\tposition: i,\n\t\t\t\tclientId: block.clientId,\n\t\t\t} );\n\t\t}\n\t\tfor ( const widget of deletedWidgets ) {\n\t\t\tbatchTasks.push( ( { deleteEntityRecord } ) =>\n\t\t\t\tdeleteEntityRecord( 'root', 'widget', widget.id, {\n\t\t\t\t\tforce: true,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tconst records = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.__experimentalBatch( batchTasks );\n\t\tconst preservedRecords = records.filter(\n\t\t\t( record ) => ! record.hasOwnProperty( 'deleted' )\n\t\t);\n\n\t\tconst failedWidgetNames = [];\n\n\t\tfor ( let i = 0; i < preservedRecords.length; i++ ) {\n\t\t\tconst widget = preservedRecords[ i ];\n\t\t\tconst { block, position } = batchMeta[ i ];\n\n\t\t\t// Set __internalWidgetId on the block. This will be persisted to the\n\t\t\t// store when we dispatch receiveEntityRecords( post ) below.\n\t\t\tpost.blocks[ position ].attributes.__internalWidgetId = widget.id;\n\n\t\t\tconst error = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError( 'root', 'widget', widget.id );\n\t\t\tif ( error ) {\n\t\t\t\tfailedWidgetNames.push( block.attributes?.name || block?.name );\n\t\t\t}\n\n\t\t\tif ( ! sidebarWidgetsIds[ position ] ) {\n\t\t\t\tsidebarWidgetsIds[ position ] = widget.id;\n\t\t\t}\n\t\t}\n\n\t\tif ( failedWidgetNames.length ) {\n\t\t\tthrow new Error(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: List of widget names */\n\t\t\t\t\t__( 'Could not save the following widgets: %s.' ),\n\t\t\t\t\tfailedWidgetNames.join( ', ' )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\tKIND,\n\t\t\tWIDGET_AREA_ENTITY_TYPE,\n\t\t\twidgetAreaId,\n\t\t\t{\n\t\t\t\twidgets: sidebarWidgetsIds,\n\t\t\t},\n\t\t\t{ undoIgnore: true }\n\t\t);\n\n\t\tdispatch( trySaveWidgetArea( widgetAreaId ) );\n\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.receiveEntityRecords( KIND, POST_TYPE, post, undefined );\n\t};\n\nconst trySaveWidgetArea =\n\t( widgetAreaId ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEditedEntityRecord(\n\t\t\t\tKIND,\n\t\t\t\tWIDGET_AREA_ENTITY_TYPE,\n\t\t\t\twidgetAreaId,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Sets the clientId stored for a particular widgetId.\n *\n * @param {number} clientId Client id.\n * @param {number} widgetId Widget id.\n *\n * @return {Object} Action.\n */\nexport function setWidgetIdForClientId( clientId, widgetId ) {\n\treturn {\n\t\ttype: 'SET_WIDGET_ID_FOR_CLIENT_ID',\n\t\tclientId,\n\t\twidgetId,\n\t};\n}\n\n/**\n * Sets the open state of all the widget areas.\n *\n * @param {Object} widgetAreasOpenState The open states of all the widget areas.\n *\n * @return {Object} Action.\n */\nexport function setWidgetAreasOpenState( widgetAreasOpenState ) {\n\treturn {\n\t\ttype: 'SET_WIDGET_AREAS_OPEN_STATE',\n\t\twidgetAreasOpenState,\n\t};\n}\n\n/**\n * Sets the open state of the widget area.\n *\n * @param {string}  clientId The clientId of the widget area.\n * @param {boolean} isOpen   Whether the widget area should be opened.\n *\n * @return {Object} Action.\n */\nexport function setIsWidgetAreaOpen( clientId, isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_WIDGET_AREA_OPEN',\n\t\tclientId,\n\t\tisOpen,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value                Whether the inserter should be\n *                                              opened (true) or closed (false).\n *                                              To specify an insertion point,\n *                                              use an object.\n * @param {string}         value.rootClientId   The root client ID to insert at.\n * @param {number}         value.insertionIndex The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setIsInserterOpened( value ) {\n\treturn {\n\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\tvalue,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed the sidebar.\n *\n * @return {Object} Action creator.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.disableComplementaryArea( editWidgetsStoreName );\n\t};\n\n/**\n * Action that handles moving a block between widget areas\n *\n * @param {string} clientId     The clientId of the block to move.\n * @param {string} widgetAreaId The id of the widget area to move the block to.\n */\nexport const moveBlockToWidgetArea =\n\t( clientId, widgetAreaId ) =>\n\tasync ( { dispatch, select, registry } ) => {\n\t\tconst sourceRootClientId = registry\n\t\t\t.select( blockEditorStore )\n\t\t\t.getBlockRootClientId( clientId );\n\n\t\t// Search the top level blocks (widget areas) for the one with the matching\n\t\t// id attribute. Makes the assumption that all top-level blocks are widget\n\t\t// areas.\n\t\tconst widgetAreas = registry.select( blockEditorStore ).getBlocks();\n\t\tconst destinationWidgetAreaBlock = widgetAreas.find(\n\t\t\t( { attributes } ) => attributes.id === widgetAreaId\n\t\t);\n\t\tconst destinationRootClientId = destinationWidgetAreaBlock.clientId;\n\n\t\t// Get the index for moving to the end of the destination widget area.\n\t\tconst destinationInnerBlocksClientIds = registry\n\t\t\t.select( blockEditorStore )\n\t\t\t.getBlockOrder( destinationRootClientId );\n\t\tconst destinationIndex = destinationInnerBlocksClientIds.length;\n\n\t\t// Reveal the widget area, if it's not open.\n\t\tconst isDestinationWidgetAreaOpen = select.getIsWidgetAreaOpen(\n\t\t\tdestinationRootClientId\n\t\t);\n\n\t\tif ( ! isDestinationWidgetAreaOpen ) {\n\t\t\tdispatch.setIsWidgetAreaOpen( destinationRootClientId, true );\n\t\t}\n\n\t\t// Move the block.\n\t\tregistry\n\t\t\t.dispatch( blockEditorStore )\n\t\t\t.moveBlocksToPosition(\n\t\t\t\t[ clientId ],\n\t\t\t\tsourceRootClientId,\n\t\t\t\tdestinationRootClientId,\n\t\t\t\tdestinationIndex\n\t\t\t);\n\t};\n","/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { persistStubPost, setWidgetAreasOpenState } from './actions';\nimport {\n\tKIND,\n\tWIDGET_AREA_ENTITY_TYPE,\n\tbuildWidgetsQuery,\n\tbuildWidgetAreasQuery,\n\tbuildWidgetAreaPostId,\n\tbuildWidgetAreasPostId,\n} from './utils';\nimport { transformWidgetToBlock } from './transformers';\n\n/**\n * Creates a \"stub\" widgets post reflecting all available widget areas. The\n * post is meant as a convenient to only exists in runtime and should never be saved. It\n * enables a convenient way of editing the widgets by using a regular post editor.\n *\n * Fetches all widgets from all widgets aras, converts them into blocks, and hydrates a new post with them.\n *\n * @return {Function} An action creator.\n */\nexport const getWidgetAreas =\n\t() =>\n\tasync ( { dispatch, registry } ) => {\n\t\tconst query = buildWidgetAreasQuery();\n\t\tconst widgetAreas = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getEntityRecords( KIND, WIDGET_AREA_ENTITY_TYPE, query );\n\n\t\tconst widgetAreaBlocks = [];\n\t\tconst sortedWidgetAreas = widgetAreas.sort( ( a, b ) => {\n\t\t\tif ( a.id === 'wp_inactive_widgets' ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif ( b.id === 'wp_inactive_widgets' ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t} );\n\t\tfor ( const widgetArea of sortedWidgetAreas ) {\n\t\t\twidgetAreaBlocks.push(\n\t\t\t\tcreateBlock( 'core/widget-area', {\n\t\t\t\t\tid: widgetArea.id,\n\t\t\t\t\tname: widgetArea.name,\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tif ( ! widgetArea.widgets.length ) {\n\t\t\t\t// If this widget area has no widgets, it won't get a post setup by\n\t\t\t\t// the getWidgets resolver.\n\t\t\t\tdispatch(\n\t\t\t\t\tpersistStubPost(\n\t\t\t\t\t\tbuildWidgetAreaPostId( widgetArea.id ),\n\t\t\t\t\t\t[]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst widgetAreasOpenState = {};\n\t\twidgetAreaBlocks.forEach( ( widgetAreaBlock, index ) => {\n\t\t\t// Defaults to open the first widget area.\n\t\t\twidgetAreasOpenState[ widgetAreaBlock.clientId ] = index === 0;\n\t\t} );\n\t\tdispatch( setWidgetAreasOpenState( widgetAreasOpenState ) );\n\n\t\tdispatch(\n\t\t\tpersistStubPost( buildWidgetAreasPostId(), widgetAreaBlocks )\n\t\t);\n\t};\n\n/**\n * Fetches all widgets from all widgets ares, and groups them by widget area Id.\n *\n * @return {Function} An action creator.\n */\nexport const getWidgets =\n\t() =>\n\tasync ( { dispatch, registry } ) => {\n\t\tconst query = buildWidgetsQuery();\n\t\tconst widgets = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getEntityRecords( 'root', 'widget', query );\n\n\t\tconst groupedBySidebar = {};\n\n\t\tfor ( const widget of widgets ) {\n\t\t\tconst block = transformWidgetToBlock( widget );\n\t\t\tgroupedBySidebar[ widget.sidebar ] =\n\t\t\t\tgroupedBySidebar[ widget.sidebar ] || [];\n\t\t\tgroupedBySidebar[ widget.sidebar ].push( block );\n\t\t}\n\n\t\tfor ( const sidebarId in groupedBySidebar ) {\n\t\t\tif ( groupedBySidebar.hasOwnProperty( sidebarId ) ) {\n\t\t\t\t// Persist the actual post containing the widget block\n\t\t\t\tdispatch(\n\t\t\t\t\tpersistStubPost(\n\t\t\t\t\t\tbuildWidgetAreaPostId( sidebarId ),\n\t\t\t\t\t\tgroupedBySidebar[ sidebarId ]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n","/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { getWidgetIdFromBlock } from '@wordpress/widgets';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport {\n\tbuildWidgetsQuery,\n\tbuildWidgetAreasQuery,\n\tbuildWidgetAreaPostId,\n\tKIND,\n\tPOST_TYPE,\n\tWIDGET_AREA_ENTITY_TYPE,\n} from './utils';\nimport { STORE_NAME as editWidgetsStoreName } from './constants';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n};\n\n/**\n * Returns all API widgets.\n *\n * @return {Object[]} API List of widgets.\n */\nexport const getWidgets = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t() => {\n\t\t\tconst widgets = select( coreStore ).getEntityRecords(\n\t\t\t\t'root',\n\t\t\t\t'widget',\n\t\t\t\tbuildWidgetsQuery()\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t// Key widgets by their ID.\n\t\t\t\twidgets?.reduce(\n\t\t\t\t\t( allWidgets, widget ) => ( {\n\t\t\t\t\t\t...allWidgets,\n\t\t\t\t\t\t[ widget.id ]: widget,\n\t\t\t\t\t} ),\n\t\t\t\t\t{}\n\t\t\t\t) ?? {}\n\t\t\t);\n\t\t},\n\t\t() => [\n\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t'root',\n\t\t\t\t'widget',\n\t\t\t\tbuildWidgetsQuery()\n\t\t\t),\n\t\t]\n\t)\n);\n\n/**\n * Returns API widget data for a particular widget ID.\n *\n * @param {number} id Widget ID.\n *\n * @return {Object} API widget data for a particular widget ID.\n */\nexport const getWidget = createRegistrySelector(\n\t( select ) => ( state, id ) => {\n\t\tconst widgets = select( editWidgetsStoreName ).getWidgets();\n\t\treturn widgets[ id ];\n\t}\n);\n\n/**\n * Returns all API widget areas.\n *\n * @return {Object[]} API List of widget areas.\n */\nexport const getWidgetAreas = createRegistrySelector( ( select ) => () => {\n\tconst query = buildWidgetAreasQuery();\n\treturn select( coreStore ).getEntityRecords(\n\t\tKIND,\n\t\tWIDGET_AREA_ENTITY_TYPE,\n\t\tquery\n\t);\n} );\n\n/**\n * Returns widgetArea containing a block identify by given widgetId\n *\n * @param {string} widgetId The ID of the widget.\n * @return {Object} Containing widget area.\n */\nexport const getWidgetAreaForWidgetId = createRegistrySelector(\n\t( select ) => ( state, widgetId ) => {\n\t\tconst widgetAreas = select( editWidgetsStoreName ).getWidgetAreas();\n\t\treturn widgetAreas.find( ( widgetArea ) => {\n\t\t\tconst post = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tKIND,\n\t\t\t\tPOST_TYPE,\n\t\t\t\tbuildWidgetAreaPostId( widgetArea.id )\n\t\t\t);\n\t\t\tconst blockWidgetIds = post.blocks.map( ( block ) =>\n\t\t\t\tgetWidgetIdFromBlock( block )\n\t\t\t);\n\t\t\treturn blockWidgetIds.includes( widgetId );\n\t\t} );\n\t}\n);\n\n/**\n * Given a child client id, returns the parent widget area block.\n *\n * @param {string} clientId The client id of a block in a widget area.\n *\n * @return {WPBlock} The widget area block.\n */\nexport const getParentWidgetAreaBlock = createRegistrySelector(\n\t( select ) => ( state, clientId ) => {\n\t\tconst { getBlock, getBlockName, getBlockParents } =\n\t\t\tselect( blockEditorStore );\n\t\tconst blockParents = getBlockParents( clientId );\n\t\tconst widgetAreaClientId = blockParents.find(\n\t\t\t( parentClientId ) =>\n\t\t\t\tgetBlockName( parentClientId ) === 'core/widget-area'\n\t\t);\n\t\treturn getBlock( widgetAreaClientId );\n\t}\n);\n\n/**\n * Returns all edited widget area entity records.\n *\n * @return {Object[]} List of edited widget area entity records.\n */\nexport const getEditedWidgetAreas = createRegistrySelector(\n\t( select ) => ( state, ids ) => {\n\t\tlet widgetAreas = select( editWidgetsStoreName ).getWidgetAreas();\n\t\tif ( ! widgetAreas ) {\n\t\t\treturn [];\n\t\t}\n\t\tif ( ids ) {\n\t\t\twidgetAreas = widgetAreas.filter( ( { id } ) =>\n\t\t\t\tids.includes( id )\n\t\t\t);\n\t\t}\n\t\treturn widgetAreas\n\t\t\t.filter( ( { id } ) =>\n\t\t\t\tselect( coreStore ).hasEditsForEntityRecord(\n\t\t\t\t\tKIND,\n\t\t\t\t\tPOST_TYPE,\n\t\t\t\t\tbuildWidgetAreaPostId( id )\n\t\t\t\t)\n\t\t\t)\n\t\t\t.map( ( { id } ) =>\n\t\t\t\tselect( coreStore ).getEditedEntityRecord(\n\t\t\t\t\tKIND,\n\t\t\t\t\tWIDGET_AREA_ENTITY_TYPE,\n\t\t\t\t\tid\n\t\t\t\t)\n\t\t\t);\n\t}\n);\n\n/**\n * Returns all blocks representing reference widgets.\n *\n * @param {string} referenceWidgetName Optional. If given, only reference widgets with this name will be returned.\n * @return {Array}  List of all blocks representing reference widgets\n */\nexport const getReferenceWidgetBlocks = createRegistrySelector(\n\t( select ) =>\n\t\t( state, referenceWidgetName = null ) => {\n\t\t\tconst results = [];\n\t\t\tconst widgetAreas = select( editWidgetsStoreName ).getWidgetAreas();\n\t\t\tfor ( const _widgetArea of widgetAreas ) {\n\t\t\t\tconst post = select( coreStore ).getEditedEntityRecord(\n\t\t\t\t\tKIND,\n\t\t\t\t\tPOST_TYPE,\n\t\t\t\t\tbuildWidgetAreaPostId( _widgetArea.id )\n\t\t\t\t);\n\t\t\t\tfor ( const block of post.blocks ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tblock.name === 'core/legacy-widget' &&\n\t\t\t\t\t\t( ! referenceWidgetName ||\n\t\t\t\t\t\t\tblock.attributes?.referenceWidgetName ===\n\t\t\t\t\t\t\t\treferenceWidgetName )\n\t\t\t\t\t) {\n\t\t\t\t\t\tresults.push( block );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n);\n\n/**\n * Returns true if any widget area is currently being saved.\n *\n * @return {boolean} True if any widget area is currently being saved. False otherwise.\n */\nexport const isSavingWidgetAreas = createRegistrySelector( ( select ) => () => {\n\tconst widgetAreasIds = select( editWidgetsStoreName )\n\t\t.getWidgetAreas()\n\t\t?.map( ( { id } ) => id );\n\tif ( ! widgetAreasIds ) {\n\t\treturn false;\n\t}\n\n\tfor ( const id of widgetAreasIds ) {\n\t\tconst isSaving = select( coreStore ).isSavingEntityRecord(\n\t\t\tKIND,\n\t\t\tWIDGET_AREA_ENTITY_TYPE,\n\t\t\tid\n\t\t);\n\t\tif ( isSaving ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tconst widgetIds = [\n\t\t...Object.keys( select( editWidgetsStoreName ).getWidgets() ),\n\t\tundefined, // account for new widgets without an ID\n\t];\n\tfor ( const id of widgetIds ) {\n\t\tconst isSaving = select( coreStore ).isSavingEntityRecord(\n\t\t\t'root',\n\t\t\t'widget',\n\t\t\tid\n\t\t);\n\t\tif ( isSaving ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n} );\n\n/**\n * Gets whether the widget area is opened.\n *\n * @param {Array}  state    The open state of the widget areas.\n * @param {string} clientId The clientId of the widget area.\n *\n * @return {boolean} True if the widget area is open.\n */\nexport const getIsWidgetAreaOpen = ( state, clientId ) => {\n\tconst { widgetAreasOpenState } = state;\n\treturn !! widgetAreasOpenState[ clientId ];\n};\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tif ( typeof state.blockInserterPanel === 'boolean' ) {\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n\n\treturn state.blockInserterPanel;\n}\n\n/**\n * Returns true if a block can be inserted into a widget area.\n *\n * @param {Array}  state     The open state of the widget areas.\n * @param {string} blockName The name of the block being inserted.\n *\n * @return {boolean} True if the block can be inserted in a widget area.\n */\nexport const canInsertBlockInWidgetArea = createRegistrySelector(\n\t( select ) => ( state, blockName ) => {\n\t\t// Widget areas are always top-level blocks, which getBlocks will return.\n\t\tconst widgetAreas = select( blockEditorStore ).getBlocks();\n\n\t\t// Makes an assumption that a block that can be inserted into one\n\t\t// widget area can be inserted into any widget area. Uses the first\n\t\t// widget area for testing whether the block can be inserted.\n\t\tconst [ firstWidgetArea ] = widgetAreas;\n\t\treturn select( blockEditorStore ).canInsertBlockType(\n\t\t\tblockName,\n\t\t\tfirstWidgetArea.clientId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n","export function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\n\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"privateApis\"];","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-widgets'\n\t);\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as resolvers from './resolvers';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#register\n *\n * @type {Object}\n */\nconst storeConfig = {\n\treducer,\n\tselectors,\n\tresolvers,\n\tactions,\n};\n\n/**\n * Store definition for the edit widgets namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\n\n// This package uses a few in-memory post types as wrappers for convenience.\n// This middleware prevents any network requests related to these types as they are\n// bound to fail anyway.\napiFetch.use( function ( options, next ) {\n\tif ( options.path?.indexOf( '/wp/v2/types/widget-area' ) === 0 ) {\n\t\treturn Promise.resolve( {} );\n\t}\n\n\treturn next( options );\n} );\n\nunlock( store ).registerPrivateSelectors( privateSelectors );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","/**\n * WordPress dependencies\n */\n\nimport { BlockControls } from '@wordpress/block-editor';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { addFilter } from '@wordpress/hooks';\nimport { MoveToWidgetArea } from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../store';\n\nconst withMoveToWidgetAreaToolbarItem = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { clientId, name: blockName } = props;\n\t\tconst { widgetAreas, currentWidgetAreaId, canInsertBlockInWidgetArea } =\n\t\t\tuseSelect(\n\t\t\t\t( select ) => {\n\t\t\t\t\t// Component won't display for a widget area, so don't run selectors.\n\t\t\t\t\tif ( blockName === 'core/widget-area' ) {\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst selectors = select( editWidgetsStore );\n\n\t\t\t\t\tconst widgetAreaBlock =\n\t\t\t\t\t\tselectors.getParentWidgetAreaBlock( clientId );\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\twidgetAreas: selectors.getWidgetAreas(),\n\t\t\t\t\t\tcurrentWidgetAreaId: widgetAreaBlock?.attributes?.id,\n\t\t\t\t\t\tcanInsertBlockInWidgetArea:\n\t\t\t\t\t\t\tselectors.canInsertBlockInWidgetArea( blockName ),\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t[ clientId, blockName ]\n\t\t\t);\n\n\t\tconst { moveBlockToWidgetArea } = useDispatch( editWidgetsStore );\n\t\tconst hasMultipleWidgetAreas = widgetAreas?.length > 1;\n\t\tconst isMoveToWidgetAreaVisible =\n\t\t\tblockName !== 'core/widget-area' &&\n\t\t\thasMultipleWidgetAreas &&\n\t\t\tcanInsertBlockInWidgetArea;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ isMoveToWidgetAreaVisible && (\n\t\t\t\t\t<BlockControls>\n\t\t\t\t\t\t<MoveToWidgetArea\n\t\t\t\t\t\t\twidgetAreas={ widgetAreas }\n\t\t\t\t\t\t\tcurrentWidgetAreaId={ currentWidgetAreaId }\n\t\t\t\t\t\t\tonSelect={ ( widgetAreaId ) => {\n\t\t\t\t\t\t\t\tmoveBlockToWidgetArea(\n\t\t\t\t\t\t\t\t\tprops.clientId,\n\t\t\t\t\t\t\t\t\twidgetAreaId\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BlockControls>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withMoveToWidgetAreaToolbarItem'\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-widgets/block-edit',\n\twithMoveToWidgetAreaToolbarItem\n);\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"mediaUtils\"];","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { MediaUpload } from '@wordpress/media-utils';\n\nconst replaceMediaUpload = () => MediaUpload;\n\naddFilter(\n\t'editor.MediaUpload',\n\t'core/edit-widgets/replace-media-upload',\n\treplaceMediaUpload\n);\n","/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * A React hook to determine if it's dragging within the target element.\n *\n * @param {RefObject<HTMLElement>} elementRef The target elementRef object.\n *\n * @return {boolean} Is dragging within the target element.\n */\nconst useIsDraggingWithin = ( elementRef ) => {\n\tconst [ isDraggingWithin, setIsDraggingWithin ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst { ownerDocument } = elementRef.current;\n\n\t\tfunction handleDragStart( event ) {\n\t\t\t// Check the first time when the dragging starts.\n\t\t\thandleDragEnter( event );\n\t\t}\n\n\t\t// Set to false whenever the user cancel the drag event by either releasing the mouse or press Escape.\n\t\tfunction handleDragEnd() {\n\t\t\tsetIsDraggingWithin( false );\n\t\t}\n\n\t\tfunction handleDragEnter( event ) {\n\t\t\t// Check if the current target is inside the item element.\n\t\t\tif ( elementRef.current.contains( event.target ) ) {\n\t\t\t\tsetIsDraggingWithin( true );\n\t\t\t} else {\n\t\t\t\tsetIsDraggingWithin( false );\n\t\t\t}\n\t\t}\n\n\t\t// Bind these events to the document to catch all drag events.\n\t\t// Ideally, we can also use `event.relatedTarget`, but sadly that doesn't work in Safari.\n\t\townerDocument.addEventListener( 'dragstart', handleDragStart );\n\t\townerDocument.addEventListener( 'dragend', handleDragEnd );\n\t\townerDocument.addEventListener( 'dragenter', handleDragEnter );\n\n\t\treturn () => {\n\t\t\townerDocument.removeEventListener( 'dragstart', handleDragStart );\n\t\t\townerDocument.removeEventListener( 'dragend', handleDragEnd );\n\t\t\townerDocument.removeEventListener( 'dragenter', handleDragEnter );\n\t\t};\n\t}, [] );\n\n\treturn isDraggingWithin;\n};\n\nexport default useIsDraggingWithin;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityBlockEditor } from '@wordpress/core-data';\nimport { InnerBlocks, useInnerBlocksProps } from '@wordpress/block-editor';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useIsDraggingWithin from './use-is-dragging-within';\n\nexport default function WidgetAreaInnerBlocks( { id } ) {\n\tconst [ blocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'root',\n\t\t'postType'\n\t);\n\tconst innerBlocksRef = useRef();\n\tconst isDraggingWithinInnerBlocks = useIsDraggingWithin( innerBlocksRef );\n\tconst shouldHighlightDropZone = isDraggingWithinInnerBlocks;\n\t// Using the experimental hook so that we can control the className of the element.\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{ ref: innerBlocksRef },\n\t\t{\n\t\t\tvalue: blocks,\n\t\t\tonInput,\n\t\t\tonChange,\n\t\t\ttemplateLock: false,\n\t\t\trenderAppender: InnerBlocks.ButtonBlockAppender,\n\t\t}\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tdata-widget-area-id={ id }\n\t\t\tclassName={ clsx(\n\t\t\t\t'wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper',\n\t\t\t\t{\n\t\t\t\t\t'wp-block-widget-area__highlight-drop-zone':\n\t\t\t\t\t\tshouldHighlightDropZone,\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useCallback, useRef } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { EntityProvider } from '@wordpress/core-data';\nimport {\n\t__unstableDisclosureContent as DisclosureContent,\n\tPanel,\n\tPanelBody,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreaInnerBlocks from './inner-blocks';\nimport { store as editWidgetsStore } from '../../../store';\nimport useIsDraggingWithin from './use-is-dragging-within';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\nexport default function WidgetAreaEdit( {\n\tclientId,\n\tclassName,\n\tattributes: { id, name },\n} ) {\n\tconst isOpen = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getIsWidgetAreaOpen( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst { setIsWidgetAreaOpen } = useDispatch( editWidgetsStore );\n\n\tconst wrapper = useRef();\n\tconst setOpen = useCallback(\n\t\t( openState ) => setIsWidgetAreaOpen( clientId, openState ),\n\t\t[ clientId ]\n\t);\n\tconst isDragging = useIsDragging( wrapper );\n\tconst isDraggingWithin = useIsDraggingWithin( wrapper );\n\n\tconst [ openedWhileDragging, setOpenedWhileDragging ] = useState( false );\n\tuseEffect( () => {\n\t\tif ( ! isDragging ) {\n\t\t\tsetOpenedWhileDragging( false );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isDraggingWithin && ! isOpen ) {\n\t\t\tsetOpen( true );\n\t\t\tsetOpenedWhileDragging( true );\n\t\t} else if ( ! isDraggingWithin && isOpen && openedWhileDragging ) {\n\t\t\tsetOpen( false );\n\t\t}\n\t}, [ isOpen, isDragging, isDraggingWithin, openedWhileDragging ] );\n\n\treturn (\n\t\t<Panel className={ className } ref={ wrapper }>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ name }\n\t\t\t\topened={ isOpen }\n\t\t\t\tonToggle={ () => {\n\t\t\t\t\tsetIsWidgetAreaOpen( clientId, ! isOpen );\n\t\t\t\t} }\n\t\t\t\tscrollAfterOpen={ ! isDragging }\n\t\t\t>\n\t\t\t\t{ ( { opened } ) => (\n\t\t\t\t\t// This is required to ensure LegacyWidget blocks are not\n\t\t\t\t\t// unmounted when the panel is collapsed. Unmounting legacy\n\t\t\t\t\t// widgets may have unintended consequences (e.g.  TinyMCE\n\t\t\t\t\t// not being properly reinitialized)\n\t\t\t\t\t<DisclosureContent\n\t\t\t\t\t\tclassName=\"wp-block-widget-area__panel-body-content\"\n\t\t\t\t\t\tvisible={ opened }\n\t\t\t\t\t>\n\t\t\t\t\t\t<EntityProvider\n\t\t\t\t\t\t\tkind=\"root\"\n\t\t\t\t\t\t\ttype=\"postType\"\n\t\t\t\t\t\t\tid={ `widget-area-${ id }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<WidgetAreaInnerBlocks id={ id } />\n\t\t\t\t\t\t</EntityProvider>\n\t\t\t\t\t</DisclosureContent>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</Panel>\n\t);\n}\n\n/**\n * A React hook to determine if dragging is active.\n *\n * @param {RefObject<HTMLElement>} elementRef The target elementRef object.\n *\n * @return {boolean} Is dragging within the entire document.\n */\nconst useIsDragging = ( elementRef ) => {\n\tconst [ isDragging, setIsDragging ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst { ownerDocument } = elementRef.current;\n\n\t\tfunction handleDragStart() {\n\t\t\tsetIsDragging( true );\n\t\t}\n\n\t\tfunction handleDragEnd() {\n\t\t\tsetIsDragging( false );\n\t\t}\n\n\t\townerDocument.addEventListener( 'dragstart', handleDragStart );\n\t\townerDocument.addEventListener( 'dragend', handleDragEnd );\n\n\t\treturn () => {\n\t\t\townerDocument.removeEventListener( 'dragstart', handleDragStart );\n\t\t\townerDocument.removeEventListener( 'dragend', handleDragEnd );\n\t\t};\n\t}, [] );\n\n\treturn isDragging;\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ttitle: __( 'Widget Area' ),\n\tdescription: __( 'A widget area container.' ),\n\t__experimentalLabel: ( { name: label } ) => label,\n\tedit,\n};\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nfunction ErrorBoundaryWarning( { message, error } ) {\n\tconst actions = [\n\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t{ __( 'Copy Error' ) }\n\t\t</CopyButton>,\n\t];\n\n\treturn (\n\t\t<Warning className=\"edit-widgets-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"patterns\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keyboardShortcuts\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t  ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n","export const ALLOW_REUSABLE_BLOCKS = false;\nexport const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;\n","/**\n * WordPress dependencies\n */\nimport { SlotFillProvider } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEntityBlockEditor, store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcuts from '../keyboard-shortcuts';\nimport { buildWidgetAreasPostId, KIND, POST_TYPE } from '../../store/utils';\nimport useLastSelectedWidgetArea from '../../hooks/use-last-selected-widget-area';\nimport { store as editWidgetsStore } from '../../store';\nimport { ALLOW_REUSABLE_BLOCKS } from '../../constants';\nimport { unlock } from '../../lock-unlock';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { PatternsMenuItems } = unlock( editPatternsPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nconst EMPTY_ARRAY = [];\n\nexport default function WidgetAreasBlockEditorProvider( {\n\tblockEditorSettings,\n\tchildren,\n\t...props\n} ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\thasUploadPermissions,\n\t\treusableBlocks,\n\t\tisFixedToolbarActive,\n\t\tkeepCaretInsideBlock,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t} = useSelect( ( select ) => {\n\t\tconst { canUser, getEntityRecord, getEntityRecords } =\n\t\t\tselect( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\thasUploadPermissions:\n\t\t\t\tcanUser( 'create', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'media',\n\t\t\t\t} ) ?? true,\n\t\t\treusableBlocks: ALLOW_REUSABLE_BLOCKS\n\t\t\t\t? getEntityRecords( 'postType', 'wp_block' )\n\t\t\t\t: EMPTY_ARRAY,\n\t\t\tisFixedToolbarActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tkeepCaretInsideBlock: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'keepCaretInsideBlock'\n\t\t\t),\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editWidgetsStore );\n\n\tconst settings = useMemo( () => {\n\t\tlet mediaUploadBlockEditor;\n\t\tif ( hasUploadPermissions ) {\n\t\t\tmediaUploadBlockEditor = ( { onError, ...argumentsObject } ) => {\n\t\t\t\tuploadMedia( {\n\t\t\t\t\twpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,\n\t\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t\t...argumentsObject,\n\t\t\t\t} );\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...blockEditorSettings,\n\t\t\t__experimentalReusableBlocks: reusableBlocks,\n\t\t\thasFixedToolbar: isFixedToolbarActive || ! isLargeViewport,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tmediaUpload: mediaUploadBlockEditor,\n\t\t\ttemplateLock: 'all',\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t};\n\t}, [\n\t\thasUploadPermissions,\n\t\tblockEditorSettings,\n\t\tisFixedToolbarActive,\n\t\tisLargeViewport,\n\t\tkeepCaretInsideBlock,\n\t\treusableBlocks,\n\t\tsetIsInserterOpened,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t] );\n\n\tconst widgetAreaId = useLastSelectedWidgetArea();\n\n\tconst [ blocks, onInput, onChange ] = useEntityBlockEditor(\n\t\tKIND,\n\t\tPOST_TYPE,\n\t\t{ id: buildWidgetAreasPostId() }\n\t);\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<KeyboardShortcuts.Register />\n\t\t\t<BlockKeyboardShortcuts />\n\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\tvalue={ blocks }\n\t\t\t\tonInput={ onInput }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tsettings={ settings }\n\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t<PatternsMenuItems rootClientId={ widgetAreaId } />\n\t\t\t</ExperimentalBlockEditorProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as widgetsEditorStore } from '../store';\nimport { buildWidgetAreasPostId, KIND, POST_TYPE } from '../store/utils';\n\n/**\n * A react hook that returns the client id of the last widget area to have\n * been selected, or to have a selected block within it.\n *\n * @return {string} clientId of the widget area last selected.\n */\nconst useLastSelectedWidgetArea = () =>\n\tuseSelect( ( select ) => {\n\t\tconst { getBlockSelectionEnd, getBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst selectionEndClientId = getBlockSelectionEnd();\n\n\t\t// If the selected block is a widget area, return its clientId.\n\t\tif ( getBlockName( selectionEndClientId ) === 'core/widget-area' ) {\n\t\t\treturn selectionEndClientId;\n\t\t}\n\n\t\tconst { getParentWidgetAreaBlock } = select( widgetsEditorStore );\n\t\tconst widgetAreaBlock =\n\t\t\tgetParentWidgetAreaBlock( selectionEndClientId );\n\t\tconst widgetAreaBlockClientId = widgetAreaBlock?.clientId;\n\n\t\tif ( widgetAreaBlockClientId ) {\n\t\t\treturn widgetAreaBlockClientId;\n\t\t}\n\n\t\t// If no widget area has been selected, return the clientId of the first\n\t\t// area.\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst widgetAreasPost = getEntityRecord(\n\t\t\tKIND,\n\t\t\tPOST_TYPE,\n\t\t\tbuildWidgetAreasPostId()\n\t\t);\n\t\treturn widgetAreasPost?.blocks[ 0 ]?.clientId;\n\t}, [] );\n\nexport default useLastSelectedWidgetArea;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerLeft = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drawerLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerRight = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drawerRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockDefault = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z\" />\n\t</SVG>\n);\n\nexport default blockDefault;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tPlatform,\n\tuseContext,\n\tuseCallback,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';\n\n// Widget areas were one called block areas, so use 'edit-widgets/block-areas'\n// for backwards compatibility.\nconst WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreas from './widget-areas';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction SidebarHeader( { selectedWidgetAreaBlock } ) {\n\treturn (\n\t\t<Tabs.TabList>\n\t\t\t<Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>\n\t\t\t\t{ selectedWidgetAreaBlock\n\t\t\t\t\t? selectedWidgetAreaBlock.attributes.name\n\t\t\t\t\t: __( 'Widget Areas' ) }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n}\n\nfunction SidebarContent( {\n\thasSelectedNonAreaBlock,\n\tcurrentArea,\n\tisGeneralSidebarOpen,\n\tselectedWidgetAreaBlock,\n} ) {\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\thasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === WIDGET_AREAS_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tBLOCK_INSPECTOR_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\tif (\n\t\t\t! hasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === BLOCK_INSPECTOR_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tWIDGET_AREAS_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\t// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`\n\t\t// out of the dep array because we want this effect to run based on\n\t\t// block selection changes, not sidebar state changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );\n\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tclassName=\"edit-widgets-sidebar\"\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader\n\t\t\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\theaderClassName=\"edit-widgets-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\tscope=\"core/edit-widgets\"\n\t\t\tidentifier={ currentArea }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ WIDGET_AREAS_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<WidgetAreas\n\t\t\t\t\t\tselectedWidgetAreaId={\n\t\t\t\t\t\t\tselectedWidgetAreaBlock?.attributes.id\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ BLOCK_INSPECTOR_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t{ hasSelectedNonAreaBlock ? (\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Pretend that Widget Areas are part of the UI by not\n\t\t\t\t\t\t// showing the Block Inspector when one is selected.\n\t\t\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</ComplementaryArea>\n\t);\n}\n\nexport default function Sidebar() {\n\tconst {\n\t\tcurrentArea,\n\t\thasSelectedNonAreaBlock,\n\t\tisGeneralSidebarOpen,\n\t\tselectedWidgetAreaBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock, getBlock, getBlockParentsByBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\tconst selectedBlock = getSelectedBlock();\n\n\t\tconst activeArea = getActiveComplementaryArea( editWidgetsStore.name );\n\n\t\tlet currentSelection = activeArea;\n\t\tif ( ! currentSelection ) {\n\t\t\tif ( selectedBlock ) {\n\t\t\t\tcurrentSelection = BLOCK_INSPECTOR_IDENTIFIER;\n\t\t\t} else {\n\t\t\t\tcurrentSelection = WIDGET_AREAS_IDENTIFIER;\n\t\t\t}\n\t\t}\n\n\t\tlet widgetAreaBlock;\n\t\tif ( selectedBlock ) {\n\t\t\tif ( selectedBlock.name === 'core/widget-area' ) {\n\t\t\t\twidgetAreaBlock = selectedBlock;\n\t\t\t} else {\n\t\t\t\twidgetAreaBlock = getBlock(\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\t\t'core/widget-area'\n\t\t\t\t\t)[ 0 ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcurrentArea: currentSelection,\n\t\t\thasSelectedNonAreaBlock: !! (\n\t\t\t\tselectedBlock && selectedBlock.name !== 'core/widget-area'\n\t\t\t),\n\t\t\tisGeneralSidebarOpen: !! activeArea,\n\t\t\tselectedWidgetAreaBlock: widgetAreaBlock,\n\t\t};\n\t}, [] );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\t// `newSelectedTabId` could technically be falsey if no tab is selected (i.e.\n\t// the initial render) or when we don't want a tab displayed (i.e. the\n\t// sidebar is closed). These cases should both be covered by the `!!` check\n\t// below, so we shouldn't need any additional falsey handling.\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea(\n\t\t\t\t\teditWidgetsStore.name,\n\t\t\t\t\tnewSelectedTabId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop. Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isGeneralSidebarOpen ? currentArea : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\thasSelectedNonAreaBlock={ hasSelectedNonAreaBlock }\n\t\t\t\tcurrentArea={ currentArea }\n\t\t\t\tisGeneralSidebarOpen={ isGeneralSidebarOpen }\n\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plus = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst listView = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z\" />\n\t</SVG>\n);\n\nexport default listView;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst undo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path 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\" />\n\t</SVG>\n);\n\nexport default undo;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst redo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path 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\" />\n\t</SVG>\n);\n\nexport default redo;\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction RedoButton( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( coreStore ).hasRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( RedoButton );\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport UndoButton from '../undo-redo/undo';\nimport RedoButton from '../undo-redo/redo';\nimport { store as editWidgetsStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nfunction DocumentTools() {\n\tconst isMediumViewport = useViewportMatch( 'medium' );\n\n\tconst {\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisInserterOpened,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tisListViewOpened,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editWidgetsStore ) );\n\t\treturn {\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editWidgetsStore );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserterSidebar = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpen ),\n\t\t[ setIsInserterOpened, isInserterOpen ]\n\t);\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"edit-widgets-header-toolbar\"\n\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<ToolbarItem\n\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\tas={ Button }\n\t\t\t\tclassName=\"edit-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tisPressed={ isInserterOpen }\n\t\t\t\tonMouseDown={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} }\n\t\t\t\tonClick={ toggleInserterSidebar }\n\t\t\t\ticon={ plus }\n\t\t\t\t/* translators: button label text should, if possible, be under 16\n\t\t\t\t\tcharacters. */\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Toggle block inserter',\n\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t) }\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t\t{ isMediumViewport && (\n\t\t\t\t<>\n\t\t\t\t\t<ToolbarItem as={ UndoButton } />\n\t\t\t\t\t<ToolbarItem as={ RedoButton } />\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-widgets-header-toolbar__list-view-toggle\"\n\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'List View' ) }\n\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving } = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas, isSavingWidgetAreas } =\n\t\t\tselect( editWidgetsStore );\n\n\t\treturn {\n\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t};\n\t}, [] );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tconst isDisabled = isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst moreVertical = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z\" />\n\t</SVG>\n);\n\nexport default moreVertical;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst external = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path 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\" />\n\t</SVG>\n);\n\nexport default external;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n","/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t  )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t  )\n\t\t: keyCombination.character;\n\tconst shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ shortcuts.map( ( character, index ) => {\n\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<kbd\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ character }\n\t\t\t\t\t</kbd>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'edit-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tuseShortcut( 'core/edit-widgets/keyboard-shortcuts', toggleModal, {\n\t\tbindGlobal: true,\n\t} );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditWidgetsToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) => fills.length > 0 && fills }\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n","/**\n * WordPress dependencies\n */\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external, moreVertical } from '@wordpress/icons';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/edit-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( onClose ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"themeStyles\"\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Make the editor look like your theme.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Display block breadcrumbs' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows block breadcrumbs at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { BlockToolbar } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Popover, VisuallyHidden } from '@wordpress/components';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport DocumentTools from './document-tools';\nimport SaveButton from '../save-button';\nimport MoreMenu from '../more-menu';\n\nfunction Header() {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst { hasFixedToolbar } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasFixedToolbar: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-header\">\n\t\t\t\t<div className=\"edit-widgets-header__navigable-toolbar-wrapper\">\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<h1 className=\"edit-widgets-header__title\">\n\t\t\t\t\t\t\t{ __( 'Widgets' ) }\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isLargeViewport && (\n\t\t\t\t\t\t<VisuallyHidden\n\t\t\t\t\t\t\tas=\"h1\"\n\t\t\t\t\t\t\tclassName=\"edit-widgets-header__title\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Widgets' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) }\n\t\t\t\t\t<DocumentTools />\n\t\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"selected-block-tools-wrapper\">\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"edit-widgets-header__actions\">\n\t\t\t\t\t<SaveButton />\n\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Header;\n","/**\n * WordPress dependencies\n */\nimport { NoticeList, SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n","/**\n * WordPress dependencies\n */\nimport {\n\tBlockList,\n\tBlockToolbar,\n\tBlockTools,\n\tBlockSelectionClearer,\n\tWritingFlow,\n\t__unstableEditorStyles as EditorStyles,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport Notices from '../notices';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\nexport default function WidgetAreasBlockEditorContent( {\n\tblockEditorSettings,\n} ) {\n\tconst hasThemeStyles = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'themeStyles'\n\t\t\t),\n\t\t[]\n\t);\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst styles = useMemo( () => {\n\t\treturn hasThemeStyles ? blockEditorSettings.styles : [];\n\t}, [ blockEditorSettings, hasThemeStyles ] );\n\n\treturn (\n\t\t<div className=\"edit-widgets-block-editor\">\n\t\t\t<Notices />\n\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t<BlockTools>\n\t\t\t\t<KeyboardShortcuts />\n\t\t\t\t<EditorStyles\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tscope=\".editor-styles-wrapper\"\n\t\t\t\t/>\n\t\t\t\t<BlockSelectionClearer>\n\t\t\t\t\t<WritingFlow>\n\t\t\t\t\t\t<BlockList className=\"edit-widgets-main-block-list\" />\n\t\t\t\t\t</WritingFlow>\n\t\t\t\t</BlockSelectionClearer>\n\t\t\t</BlockTools>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst close = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z\" />\n\t</SVG>\n);\n\nexport default close;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../store';\nimport { buildWidgetAreasPostId, KIND, POST_TYPE } from '../store/utils';\n\nconst useWidgetLibraryInsertionPoint = () => {\n\tconst firstRootId = useSelect( ( select ) => {\n\t\t// Default to the first widget area\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst widgetAreasPost = getEntityRecord(\n\t\t\tKIND,\n\t\t\tPOST_TYPE,\n\t\t\tbuildWidgetAreasPostId()\n\t\t);\n\t\treturn widgetAreasPost?.blocks[ 0 ]?.clientId;\n\t}, [] );\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockSelectionEnd,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetBlockIndex,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst insertionPoint =\n\t\t\t\tselect( editWidgetsStore ).__experimentalGetInsertionPoint();\n\n\t\t\t// \"Browse all\" in the quick inserter will set the rootClientId to the current block.\n\t\t\t// Otherwise, it will just be undefined, and we'll have to handle it differently below.\n\t\t\tif ( insertionPoint.rootClientId ) {\n\t\t\t\treturn insertionPoint;\n\t\t\t}\n\n\t\t\tconst clientId = getBlockSelectionEnd() || firstRootId;\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\t// If the selected block is at the root level, it's a widget area and\n\t\t\t// blocks can't be inserted here. Return this block as the root and the\n\t\t\t// last child clientId indicating insertion at the end.\n\t\t\tif ( clientId && rootClientId === '' ) {\n\t\t\t\treturn {\n\t\t\t\t\trootClientId: clientId,\n\t\t\t\t\tinsertionIndex: getBlockOrder( clientId ).length,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\trootClientId,\n\t\t\t\tinsertionIndex: getBlockIndex( clientId ) + 1,\n\t\t\t};\n\t\t},\n\t\t[ firstRootId ]\n\t);\n};\n\nexport default useWidgetLibraryInsertionPoint;\n","/**\n * WordPress dependencies\n */\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { close } from '@wordpress/icons';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useWidgetLibraryInsertionPoint from '../../hooks/use-widget-library-insertion-point';\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { rootClientId, insertionIndex } = useWidgetLibraryInsertionPoint();\n\n\tconst { setIsInserterOpened } = useDispatch( editWidgetsStore );\n\n\tconst closeInserter = useCallback( () => {\n\t\treturn setIsInserterOpened( false );\n\t}, [ setIsInserterOpened ] );\n\n\tconst TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: closeInserter,\n\t\tfocusOnMount: true,\n\t} );\n\n\tconst libraryRef = useRef();\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-widgets-layout__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-widgets-layout__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tonClick={ closeInserter }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"edit-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={ insertionIndex }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editWidgetsStore ) );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"edit-widgets-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div className=\"edit-widgets-editor__list-view-panel-header\">\n\t\t\t\t<strong>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ closeListView }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [ focusOnMountRef, setDropZoneElement ] ) }\n\t\t\t>\n\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Internal dependencies\n */\nimport InserterSidebar from './inserter-sidebar';\nimport ListViewSidebar from './list-view-sidebar';\n\nexport default function SecondarySidebar() {\n\tconst { isInserterOpen, isListViewOpen } = useSelect( ( select ) => {\n\t\tconst { isInserterOpened, isListViewOpened } =\n\t\t\tselect( editWidgetsStore );\n\t\treturn {\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t};\n\t}, [] );\n\n\tif ( isInserterOpen ) {\n\t\treturn <InserterSidebar />;\n\t}\n\tif ( isListViewOpen ) {\n\t\treturn <ListViewSidebar />;\n\t}\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\n\tconst hasSecondarySidebar = isListViewOpened || isInserterOpened;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }\n\t\t\tsidebar={ <ComplementaryArea.Slot scope=\"core/edit-widgets\" /> }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {Component} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst isDirty = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas } = select( editWidgetsStore );\n\t\tconst editedWidgetAreas = getEditedWidgetAreas();\n\n\t\treturn editedWidgetAreas?.length > 0;\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\tif ( isDirty ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ isDirty ] );\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s “block” area 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.',\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s 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.',\n\t\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Want to stick with the old widgets?'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Get the Classic Widgets plugin.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Make each block your own' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Get to know the block library' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-widgets-welcome-guide__inserter-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn how to use the block editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'New to the block editor? Want to learn more about using it? '\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( \"Here's a detailed guide.\" ) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n\nfunction WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-widgets-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { PluginArea } from '@wordpress/plugins';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundary from '../error-boundary';\nimport WidgetAreasBlockEditorProvider from '../widget-areas-block-editor-provider';\nimport Sidebar from '../sidebar';\nimport Interface from './interface';\nimport UnsavedChangesWarning from './unsaved-changes-warning';\nimport WelcomeGuide from '../welcome-guide';\n\nfunction Layout( { blockEditorSettings } ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<ErrorBoundary>\n\t\t\t<WidgetAreasBlockEditorProvider\n\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t>\n\t\t\t\t<Interface blockEditorSettings={ blockEditorSettings } />\n\t\t\t\t<Sidebar />\n\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t<WelcomeGuide />\n\t\t\t</WidgetAreasBlockEditorProvider>\n\t\t</ErrorBoundary>\n\t);\n}\n\nexport default Layout;\n","/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tunstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase\n\tsetFreeformContentHandlerName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { StrictMode, createRoot } from '@wordpress/element';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { __experimentalFetchLinkSuggestions as fetchLinkSuggestions } from '@wordpress/core-data';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterLegacyWidgetVariations,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport './store';\nimport './filters';\nimport * as widgetArea from './blocks/widget-area';\n\nimport Layout from './components/layout';\nimport {\n\tALLOW_REUSABLE_BLOCKS,\n\tENABLE_EXPERIMENTAL_FSE_BLOCKS,\n} from './constants';\n\nconst disabledBlocks = [\n\t'core/more',\n\t'core/freeform',\n\t'core/template-part',\n\t...( ALLOW_REUSABLE_BLOCKS ? [] : [ 'core/block' ] ),\n];\n\n/**\n * Initializes the block editor in the widgets screen.\n *\n * @param {string} id       ID of the root element to render the screen in.\n * @param {Object} settings Block editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter( ( block ) => {\n\t\treturn ! (\n\t\t\tdisabledBlocks.includes( block.name ) ||\n\t\t\tblock.name.startsWith( 'core/post' ) ||\n\t\t\tblock.name.startsWith( 'core/query' ) ||\n\t\t\tblock.name.startsWith( 'core/site' ) ||\n\t\t\tblock.name.startsWith( 'core/navigation' )\n\t\t);\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-widgets', {\n\t\tfixedToolbar: false,\n\t\twelcomeGuide: true,\n\t\tshowBlockBreadcrumbs: true,\n\t\tthemeStyles: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tregisterCoreBlocks( coreBlocks );\n\tregisterLegacyWidgetBlock();\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS,\n\t\t} );\n\t}\n\tregisterLegacyWidgetVariations( settings );\n\tregisterBlock( widgetArea );\n\tregisterWidgetGroupBlock();\n\n\tsettings.__experimentalFetchLinkSuggestions = ( search, searchOptions ) =>\n\t\tfetchLinkSuggestions( search, searchOptions, settings );\n\n\t// As we are unregistering `core/freeform` to avoid the Classic block, we must\n\t// replace it with something as the default freeform content handler. Failure to\n\t// do this will result in errors in the default block parser.\n\t// see: https://github.com/WordPress/gutenberg/issues/33097\n\tsetFreeformContentHandlerName( 'core/html' );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<Layout blockEditorSettings={ settings } />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\n/**\n * Compatibility export under the old `initialize` name.\n */\nexport const initialize = initializeEditor;\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editWidgets.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tif ( metadata ) {\n\t\tunstable__bootstrapServerSideBlockDefinitions( { [ name ]: metadata } );\n\t}\n\tregisterBlockType( name, settings );\n};\n\nexport { store } from './store';\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","combineReducers","blockInserterPanel","state","action","type","isOpen","inserterSidebarToggleRef","current","listViewPanel","listViewToggleRef","widgetAreasOpenState","clientId","r","e","t","f","n","Array","isArray","length","arguments","_jsx","SVG","xmlns","viewBox","children","Path","fillRule","clipRule","normalizeComplementaryAreaScope","scope","includes","deprecated","alternative","hint","version","normalizeComplementaryAreaName","name","setDefaultComplementaryArea","area","enableComplementaryArea","registry","dispatch","select","preferencesStore","set","disableComplementaryArea","pinItem","item","pinnedItems","unpinItem","toggleFeature","featureName","since","toggle","setFeatureValue","setFeatureDefaults","defaults","setDefaults","openModal","closeModal","getActiveComplementaryArea","createRegistrySelector","isComplementaryAreaVisible","undefined","complementaryAreas","isComplementaryAreaLoading","isVisible","identifier","isItemPinned","_pinnedItems$item","isFeatureActive","isModalActive","modalName","activeModal","store","createReduxStore","reducer","actions","selectors","register","withPluginContext","context","ownProps","icon","complementaryAreaContext","as","Button","selectedIcon","props","ComponentToUse","isSelected","useSelect","interfaceStore","useDispatch","replace","onClick","ComplementaryAreaHeader","smallScreenTitle","className","toggleButtonProps","toggleButton","ComplementaryAreaToggle","closeSmall","_jsxs","_Fragment","clsx","tabIndex","noop","ActionItem","Component","Fill","fpOnClick","args","Slot","ButtonGroup","fillProps","bubblesVirtually","fills","Children","toArray","initializedByPlugins","forEach","__unstableExplicitMenuItem","__unstableTarget","push","map","child","PluginsMenuItem","restProps","MenuItem","ComplementaryAreaMoreMenuItem","target","toggleProps","role","check","PinnedItems","variants","open","width","closed","mobileOpen","ComplementaryAreaFill","activeArea","isActive","id","disableMotion","useReducedMotion","isMobileViewport","useViewportMatch","previousActiveArea","usePrevious","previousIsActive","setState","useState","useEffect","transition","duration","ease","AnimatePresence","initial","motion","div","animate","exit","style","ComplementaryAreaWrapped","withComplementaryAreaContext","closeLabel","__","header","headerClassName","isPinnable","panelClassName","title","toggleShortcut","isActiveByDefault","isReady","setIsReady","isLoading","isPinned","isSmall","isLarge","showIconLabels","_activeArea","viewportStore","isViewportMatch","previousIsSmall","useRef","shouldOpenWhenNotSmall","useAdjustComplementaryListener","isPressed","label","showTooltip","variant","size","onClose","shortcut","starFilled","starEmpty","Panel","NavigableRegion","ariaLabel","Tag","commonTransition","headerVariants","hidden","opacity","marginTop","visible","distractionFreeHover","delay","delayChildren","distractionFreeHidden","distractionFreeDisabled","forwardRef","isDistractionFree","footer","editorNotices","sidebar","secondarySidebar","content","labels","enableRegionNavigation","shortcuts","ref","secondarySidebarResizeListener","secondarySidebarSize","useResizeObserver","defaultTransition","navigateRegionsProps","useNavigateRegions","element","document","querySelector","classList","useHTMLClass","mergedLabels","_x","body","useMergeRefs","whileHover","position","height","right","transformWidgetToBlock","widget","id_base","parsedBlocks","parse","instance","raw","__unstableSkipAutop","addWidgetIdToBlock","createBlock","attributes","_embedded","about","is_multi","idBase","transformBlockToWidget","block","relatedWidget","_block$attributes$id","_block$attributes$idB","_block$attributes$ins","serialize","rendered","rendered_form","KIND","WIDGET_AREA_ENTITY_TYPE","POST_TYPE","buildWidgetAreaPostId","widgetAreaId","STORE_NAME","persistStubPost","blocks","stubPost","createStubPost","slug","status","meta","coreStore","receiveEntityRecords","saveEditedWidgetAreas","async","editedWidgetAreas","getEditedWidgetAreas","saveWidgetAreas","noticesStore","createSuccessNotice","createErrorNotice","sprintf","message","widgetAreas","widgetArea","saveWidgetArea","finishResolution","per_page","widgets","getWidgets","post","getEditedEntityRecord","areaWidgets","values","filter","usedReferenceWidgets","widgetsBlocks","deletedWidgets","getWidgetAreaForWidgetId","batchMeta","batchTasks","sidebarWidgetsIds","i","widgetId","getWidgetIdFromBlock","oldWidget","editEntityRecord","undoIgnore","hasEditsForEntityRecord","saveEditedEntityRecord","saveEntityRecord","deleteEntityRecord","force","preservedRecords","__experimentalBatch","record","failedWidgetNames","__internalWidgetId","getLastEntitySaveError","Error","join","trySaveWidgetArea","throwOnError","setWidgetIdForClientId","setWidgetAreasOpenState","setIsWidgetAreaOpen","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","editWidgetsStoreName","moveBlockToWidgetArea","sourceRootClientId","blockEditorStore","getBlockRootClientId","destinationRootClientId","getBlocks","find","destinationIndex","getBlockOrder","getIsWidgetAreaOpen","moveBlocksToPosition","getWidgetAreas","widgetAreaBlocks","sortedWidgetAreas","resolveSelect","getEntityRecords","sort","b","widgetAreaBlock","index","_embed","groupedBySidebar","sidebarId","EMPTY_INSERTION_POINT","rootClientId","insertionIndex","createSelector","_widgets$reduce","reduce","allWidgets","getWidget","getParentWidgetAreaBlock","getBlock","getBlockName","getBlockParents","parentClientId","ids","getReferenceWidgetBlocks","referenceWidgetName","results","_widgetArea","isSavingWidgetAreas","widgetAreasIds","isSavingEntityRecord","widgetIds","keys","isInserterOpened","__experimentalGetInsertionPoint","canInsertBlockInWidgetArea","blockName","firstWidgetArea","canInsertBlockType","isListViewOpened","getListViewToggleRef","getInserterSidebarToggleRef","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","storeConfig","resolvers","apiFetch","options","next","path","indexOf","Promise","resolve","registerPrivateSelectors","privateSelectors","withMoveToWidgetAreaToolbarItem","createHigherOrderComponent","BlockEdit","currentWidgetAreaId","editWidgetsStore","isMoveToWidgetAreaVisible","BlockControls","MoveToWidgetArea","onSelect","addFilter","replaceMediaUpload","MediaUpload","elementRef","isDraggingWithin","setIsDraggingWithin","ownerDocument","handleDragStart","event","handleDragEnter","handleDragEnd","contains","addEventListener","removeEventListener","WidgetAreaInnerBlocks","onInput","onChange","useEntityBlockEditor","innerBlocksRef","shouldHighlightDropZone","useIsDraggingWithin","innerBlocksProps","useInnerBlocksProps","templateLock","renderAppender","InnerBlocks","ButtonBlockAppender","metadata","$schema","category","supports","html","inserter","customClassName","reusable","__experimentalToolbar","__experimentalParentSelector","__experimentalDisableBlockOverlay","editorStyle","settings","description","__experimentalLabel","edit","wrapper","setOpen","useCallback","openState","isDragging","setIsDragging","useIsDragging","openedWhileDragging","setOpenedWhileDragging","PanelBody","opened","onToggle","scrollAfterOpen","DisclosureContent","EntityProvider","kind","CopyButton","text","useCopyToClipboard","ErrorBoundaryWarning","error","stack","Warning","ErrorBoundary","constructor","super","this","componentDidCatch","doAction","getDerivedStateFromError","render","KeyboardShortcuts","redo","undo","useShortcut","preventDefault","Register","registerShortcut","keyboardShortcutsStore","keyCombination","modifier","character","aliases","isAppleOS","ENABLE_EXPERIMENTAL_FSE_BLOCKS","ExperimentalBlockEditorProvider","blockEditorPrivateApis","PatternsMenuItems","editPatternsPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","EMPTY_ARRAY","WidgetAreasBlockEditorProvider","blockEditorSettings","isLargeViewport","hasUploadPermissions","reusableBlocks","isFixedToolbarActive","keepCaretInsideBlock","pageOnFront","pageForPosts","_canUser","canUser","getEntityRecord","siteSettings","page_on_front","page_for_posts","useMemo","mediaUploadBlockEditor","onError","argumentsObject","uploadMedia","wpAllowedMimeTypes","allowedMimeTypes","__experimentalReusableBlocks","hasFixedToolbar","mediaUpload","__experimentalSetIsInserterOpened","getBlockSelectionEnd","selectionEndClientId","widgetsEditorStore","widgetAreaBlockClientId","widgetAreasPost","SlotFillProvider","useSubRegistry","WidgetAreas","selectedWidgetAreaId","selectedWidgetArea","BlockIcon","blockDefault","dangerouslySetInnerHTML","__html","safeHTML","href","addQueryArgs","return","location","pathname","SIDEBAR_ACTIVE_BY_DEFAULT","Platform","web","native","BLOCK_INSPECTOR_IDENTIFIER","WIDGET_AREAS_IDENTIFIER","Tabs","componentsPrivateApis","SidebarHeader","selectedWidgetAreaBlock","TabList","Tab","tabId","SidebarContent","hasSelectedNonAreaBlock","currentArea","isGeneralSidebarOpen","tabsContextValue","useContext","Context","ComplementaryArea","Provider","isRTL","drawerLeft","drawerRight","TabPanel","focusable","BlockInspector","Sidebar","getSelectedBlock","getBlockParentsByBlockName","selectedBlock","currentSelection","onTabSelect","newSelectedTabId","selectedTabId","selectOnMove","hasUndo","redoIcon","undoIcon","displayShortcut","primary","primaryShift","hasRedo","isMediumViewport","isInserterOpen","isListViewOpen","toggleListView","toggleInserterSidebar","NavigableToolbar","ToolbarItem","onMouseDown","plus","UndoButton","RedoButton","listView","hasEditedWidgetAreaIds","isSaving","isDisabled","isBusy","textFormattingShortcuts","KeyCombination","forceAriaLabel","displayShortcutList","shortcutAriaLabel","Fragment","alias","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","Shortcut","ShortcutList","DynamicShortcut","ShortcutSection","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","toggleModal","bindGlobal","Modal","onRequestClose","ToolsMoreMenuGroup","createSlotFill","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","toggleKeyboardShortcutsModal","DropdownMenu","moreVertical","popoverProps","placement","tooltipPosition","MenuGroup","PreferenceToggleMenuItem","info","messageActivated","messageDeactivated","access","external","rel","VisuallyHidden","blockToolbarRef","DocumentTools","BlockToolbar","hideDragHandle","Popover","SaveButton","removeNotice","notices","getNotices","dismissibleNotices","isDismissible","nonDismissibleNotices","snackbarNotices","slice","NoticeList","onRemove","SnackbarList","WidgetAreasBlockEditorContent","hasThemeStyles","styles","Notices","BlockTools","EditorStyles","BlockSelectionClearer","WritingFlow","BlockList","useWidgetLibraryInsertionPoint","firstRootId","getBlockIndex","insertionPoint","InserterSidebar","closeInserter","TagName","inserterDialogRef","inserterDialogProps","useDialog","focusOnMount","libraryRef","close","Library","showInserterHelpPanel","shouldFocusBlock","__experimentalInsertionIndex","ListViewSidebar","dropZoneElement","setDropZoneElement","focusOnMountRef","useFocusOnMount","closeListView","focus","closeOnEscape","keyCode","ESCAPE","defaultPrevented","onKeyDown","ListView","SecondarySidebar","interfaceLabels","isHugeViewport","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","previousShortcut","nextShortcut","getAllShortcutKeyCombinations","secondarySidebarLabel","hasSecondarySidebar","InterfaceSkeleton","Header","BlockBreadcrumb","rootLabelText","previous","UnsavedChangesWarning","isDirty","warnIfUnsavedChanges","returnValue","WelcomeGuide","_widgetAreas$filter$l","isEntirelyBlockWidgets","every","startsWith","numWidgetAreas","Guide","contentLabel","finishButtonText","onFinish","pages","image","WelcomeGuideImage","nonAnimatedSrc","animatedSrc","_n","ExternalLink","createInterpolateElement","InserterIconImage","alt","src","srcSet","media","Interface","PluginArea","disabledBlocks","initializeEditor","getElementById","root","createRoot","coreBlocks","__experimentalGetCoreBlocks","fixedToolbar","welcomeGuide","showBlockBreadcrumbs","themeStyles","blocksStore","reapplyBlockTypeFilters","registerCoreBlocks","registerLegacyWidgetBlock","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","registerLegacyWidgetVariations","registerBlock","registerWidgetGroupBlock","__experimentalFetchLinkSuggestions","search","searchOptions","fetchLinkSuggestions","setFreeformContentHandlerName","StrictMode","Layout","initialize","reinitializeEditor","unstable__bootstrapServerSideBlockDefinitions","registerBlockType"],"sourceRoot":""}