: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const shortcut = select(external_wp_keyboardShortcuts_namespaceObject.store).getShortcutRepresentation('core/editor/toggle-sidebar');
const sidebar = select(store).getActiveComplementaryArea('core');
const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
if (!_isEditorSidebarOpened) {
_tabName = !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart() ? sidebars.block : sidebars.document;
keyboardShortcut: shortcut,
showSummary: ![TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE].includes(select(store_store).getCurrentPostType()),
renderingMode: select(store_store).getRenderingMode()
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const onTabSelect = (0,external_wp_element_namespaceObject.useCallback)(newSelectedTabId => {
if (!!newSelectedTabId) {
enableComplementaryArea('core', newSelectedTabId);
}, [enableComplementaryArea]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(sidebar_Tabs, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarContent, {
keyboardShortcut: keyboardShortcut,
showSummary: showSummary,
renderingMode: renderingMode,
onActionPerformed: onActionPerformed,
/* harmony default export */ const components_sidebar = (Sidebar);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor/index.js
// This could be part of the settings.
// The following abstractions are not ideal but necessary
// to account for site editor and post editor differences for now.
enableRegionNavigation = true
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_coreData_namespaceObject.store);
post: getEntityRecord('postType', postType, postId),
template: templateId ? getEntityRecord('postType', TEMPLATE_POST_TYPE, templateId) : undefined,
hasLoadedPost: hasFinishedResolution('getEntityRecord', ['postType', postType, postId])
}, [postType, postId, templateId]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ExperimentalEditorProvider, {
__unstableTemplate: template,
children: [hasLoadedPost && !post && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
children: (0,external_wp_i18n_namespaceObject.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorInterface, {
enableRegionNavigation: enableRegionNavigation,
customSaveButton: customSaveButton,
customSavePanel: customSavePanel,
forceDisableBlockTools: forceDisableBlockTools,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(components_sidebar, {
onActionPerformed: onActionPerformed,
extraPanels: extraSidebarPanels
/* harmony default export */ const editor = (Editor);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/preferences-modal/enable-publish-sidebar.js
PreferenceBaseOption: enable_publish_sidebar_PreferenceBaseOption
} = unlock(external_wp_preferences_namespaceObject.privateApis);
/* harmony default export */ const enable_publish_sidebar = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_data_namespaceObject.withSelect)(select => ({
isChecked: select(store_store).isPublishSidebarEnabled()
})), (0,external_wp_data_namespaceObject.withDispatch)(dispatch => {
} = dispatch(store_store);
onChange: isEnabled => isEnabled ? enablePublishSidebar() : disablePublishSidebar()
}))(enable_publish_sidebar_PreferenceBaseOption));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-manager/checklist.js
function BlockTypesChecklist({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
className: "editor-block-manager__checklist",
children: blockTypes.map(blockType => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "editor-block-manager__checklist-item",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
__nextHasNoMarginBottom: true,
checked: value.includes(blockType.name),
onChange: (...args) => onItemChange(blockType.name, ...args)
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
/* harmony default export */ const checklist = (BlockTypesChecklist);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-manager/category.js
function BlockManagerCategory({
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(BlockManagerCategory);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_preferences_namespaceObject.store);
allowedBlockTypes: getEditorSettings().allowedBlockTypes,
hiddenBlockTypes: get('core', 'hiddenBlockTypes')
const filteredBlockTypes = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (allowedBlockTypes === true) {
return blockTypes.filter(({
return allowedBlockTypes?.includes(name);
}, [allowedBlockTypes, blockTypes]);
} = unlock((0,external_wp_data_namespaceObject.useDispatch)(store_store));
const toggleVisible = (0,external_wp_element_namespaceObject.useCallback)((blockName, nextIsChecked) => {
showBlockTypes(blockName);
hideBlockTypes(blockName);
}, [showBlockTypes, hideBlockTypes]);
const toggleAllVisible = (0,external_wp_element_namespaceObject.useCallback)(nextIsChecked => {
const blockNames = blockTypes.map(({
showBlockTypes(blockNames);
hideBlockTypes(blockNames);
}, [blockTypes, showBlockTypes, hideBlockTypes]);
if (!filteredBlockTypes.length) {
const checkedBlockNames = filteredBlockTypes.map(({
}) => name).filter(type => !(hiddenBlockTypes !== null && hiddenBlockTypes !== void 0 ? hiddenBlockTypes : []).includes(type));
const titleId = 'editor-block-manager__category-title-' + instanceId;
const isAllChecked = checkedBlockNames.length === filteredBlockTypes.length;
const isIndeterminate = !isAllChecked && checkedBlockNames.length > 0;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
"aria-labelledby": titleId,
className: "editor-block-manager__category",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
__nextHasNoMarginBottom: true,
onChange: toggleAllVisible,
className: "editor-block-manager__category-title",
indeterminate: isIndeterminate,
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(checklist, {
blockTypes: filteredBlockTypes,
value: checkedBlockNames,
onItemChange: toggleVisible
/* harmony default export */ const block_manager_category = (BlockManagerCategory);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-manager/index.js
const debouncedSpeak = (0,external_wp_compose_namespaceObject.useDebounce)(external_wp_a11y_namespaceObject.speak, 500);
const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)('');
// Filtering occurs here (as opposed to `withSelect`) to avoid
// wasted renders by consequence of `Array#filter` producing
// a new value reference on each call.
blockTypes = blockTypes.filter(blockType => hasBlockSupport(blockType, 'inserter', true) && (!search || isMatchingSearchTerm(blockType, search)) && (!blockType.parent || blockType.parent.includes('core/post-content')));
// Announce search results on change
(0,external_wp_element_namespaceObject.useEffect)(() => {
const count = blockTypes.length;
const resultsFoundMessage = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of results. */
(0,external_wp_i18n_namespaceObject._n)('%d result found.', '%d results found.', count), count);
debouncedSpeak(resultsFoundMessage);
}, [blockTypes.length, search, debouncedSpeak]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "editor-block-manager__content",
children: [!!numberOfHiddenBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "editor-block-manager__disabled-blocks-count",
children: [(0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of blocks. */
(0,external_wp_i18n_namespaceObject._n)('%d block is hidden.', '%d blocks are hidden.', numberOfHiddenBlocks), numberOfHiddenBlocks), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: () => enableAllBlockTypes(blockTypes),
children: (0,external_wp_i18n_namespaceObject.__)('Reset')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SearchControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Search for a block'),
placeholder: (0,external_wp_i18n_namespaceObject.__)('Search for a block'),
onChange: nextSearch => setSearch(nextSearch),
className: "editor-block-manager__search"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Available block types'),
className: "editor-block-manager__results",
children: [blockTypes.length === 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "editor-block-manager__no-results",
children: (0,external_wp_i18n_namespaceObject.__)('No blocks found.')
}), categories.map(category => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_manager_category, {
blockTypes: blockTypes.filter(blockType => blockType.category === category.slug)
}, category.slug)), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_manager_category, {
title: (0,external_wp_i18n_namespaceObject.__)('Uncategorized'),
blockTypes: blockTypes.filter(({
/* harmony default export */ const block_manager = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_data_namespaceObject.withSelect)(select => {
} = select(external_wp_blocks_namespaceObject.store);
} = select(external_wp_preferences_namespaceObject.store);
// Some hidden blocks become unregistered
// by removing for instance the plugin that registered them, yet
// they're still remain as hidden by the user's action.
// We consider "hidden", blocks which were hidden and
const blockTypes = getBlockTypes();
const hiddenBlockTypes = ((_get = get('core', 'hiddenBlockTypes')) !== null && _get !== void 0 ? _get : []).filter(hiddenBlock => {
return blockTypes.some(registeredBlock => registeredBlock.name === hiddenBlock);
const numberOfHiddenBlocks = Array.isArray(hiddenBlockTypes) && hiddenBlockTypes.length;
categories: getCategories(),
}), (0,external_wp_data_namespaceObject.withDispatch)(dispatch => {
} = unlock(dispatch(store_store));
enableAllBlockTypes: blockTypes => {
const blockNames = blockTypes.map(({
showBlockTypes(blockNames);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/preferences-modal/index.js
} = unlock(external_wp_preferences_namespaceObject.privateApis);
function EditorPreferencesModal({
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
showBlockBreadcrumbsOption
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_preferences_namespaceObject.store);
const isRichEditingEnabled = getEditorSettings().richEditingEnabled;
const isDistractionFreeEnabled = get('core', 'distractionFree');
showBlockBreadcrumbsOption: !isDistractionFreeEnabled && isLargeViewport && isRichEditingEnabled,
isActive: isModalActive('editor/preferences')
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
const sections = (0,external_wp_element_namespaceObject.useMemo)(() => [{
tabLabel: (0,external_wp_i18n_namespaceObject.__)('General'),
content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(PreferencesModalSection, {
title: (0,external_wp_i18n_namespaceObject.__)('Interface'),
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferenceToggleControl, {
featureName: "showListViewByDefault",
help: (0,external_wp_i18n_namespaceObject.__)('Opens the List View sidebar by default.'),
label: (0,external_wp_i18n_namespaceObject.__)('Always open List View')
}), showBlockBreadcrumbsOption && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferenceToggleControl, {
featureName: "showBlockBreadcrumbs",
help: (0,external_wp_i18n_namespaceObject.__)('Display the block hierarchy trail at the bottom of the editor.'),
label: (0,external_wp_i18n_namespaceObject.__)('Show block breadcrumbs')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferenceToggleControl, {
featureName: "allowRightClickOverrides",
help: (0,external_wp_i18n_namespaceObject.__)('Allows contextual List View menus via right-click, overriding browser defaults.'),
label: (0,external_wp_i18n_namespaceObject.__)('Allow right-click contextual menus')