: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
* Creates a blocks repeater for replacing the current block with a selected block type.
* @return {WPCompleter} A blocks completer.
function createBlockCompleter() {
className: 'block-editor-autocompleters__block',
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getSelectedBlockClientId,
const selectedBlockClientId = getSelectedBlockClientId();
const _rootClientId = getBlockRootClientId(selectedBlockClientId);
selectedBlockName: selectedBlockClientId ? getBlockName(selectedBlockClientId) : null,
rootClientId: _rootClientId,
prioritizedBlocks: getBlockListSettings(_rootClientId)?.prioritizedInserterBlocks
const [items, categories, collections] = use_block_types_state(rootClientId, block_noop, true);
const filteredItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : orderInserterBlockItems(orderBy(items, 'frecency', 'desc'), prioritizedBlocks);
return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES);
}, [filterValue, selectedBlockName, items, categories, collections, prioritizedBlocks]);
const options = (0,external_wp_element_namespaceObject.useMemo)(() => filteredItems.map(blockItem => {
key: `block-${blockItem.id}`,
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
allowContext(before, after) {
return !(/\S/.test(before) || /\S/.test(after));
getOptionCompletion(inserterItem) {
value: syncStatus === 'unsynced' ? (0,external_wp_blocks_namespaceObject.parse)(content, {
__unstableSkipMigrationLogs: true
}) : (0,external_wp_blocks_namespaceObject.createBlock)(name, initialAttributes, (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(innerBlocks))
* Creates a blocks repeater for replacing the current block with a selected block type.
* @return {WPCompleter} A blocks completer.
/* harmony default export */ const block = (createBlockCompleter());
;// CONCATENATED MODULE: external ["wp","apiFetch"]
const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post.js
const post = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"
/* harmony default export */ const library_post = (post);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/autocompleters/link.js
// Disable Reason: Needs to be refactored.
// eslint-disable-next-line no-restricted-imports
const SHOWN_SUGGESTIONS = 10;
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
* Creates a suggestion list for links to posts or pages.
* @return {WPCompleter} A links completer.
function createLinkCompleter() {
className: 'block-editor-autocompleters__link',
options: async letters => {
let options = await external_wp_apiFetch_default()({
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp/v2/search', {
per_page: SHOWN_SUGGESTIONS,
options = options.filter(option => option.title !== '');
getOptionKeywords(item) {
const expansionWords = item.title.split(/\s+/);
return [...expansionWords];
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
icon: item.subtype === 'page' ? library_page : library_post
getOptionCompletion(item) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
* Creates a suggestion list for links to posts or pages..
* @return {WPCompleter} A link completer.
/* harmony default export */ const autocompleters_link = (createLinkCompleter());
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/autocomplete/index.js
* Shared reference to an empty array for cases where it is important to avoid
* returning a new array reference on every invocation.
const autocomplete_EMPTY_ARRAY = [];
completers = autocomplete_EMPTY_ARRAY
} = useBlockEditContext();
return (0,external_wp_element_namespaceObject.useMemo)(() => {
let filteredCompleters = [...completers, autocompleters_link];
if (name === (0,external_wp_blocks_namespaceObject.getDefaultBlockName)() || (0,external_wp_blocks_namespaceObject.getBlockSupport)(name, '__experimentalSlashInserter', false)) {
filteredCompleters = [...filteredCompleters, block];
if ((0,external_wp_hooks_namespaceObject.hasFilter)('editor.Autocomplete.completers')) {
// Provide copies so filters may directly modify them.
if (filteredCompleters === completers) {
filteredCompleters = filteredCompleters.map(completer => ({
filteredCompleters = (0,external_wp_hooks_namespaceObject.applyFilters)('editor.Autocomplete.completers', filteredCompleters, name);
return filteredCompleters;
function useBlockEditorAutocompleteProps(props) {
return (0,external_wp_components_namespaceObject.__unstableUseAutocompleteProps)({
completers: useCompleters(props)
* Wrap the default Autocomplete component with one that supports a filter hook
* for customizing its list of autocompleters.
* @type {import('react').FC}
function BlockEditorAutocomplete(props) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Autocomplete, {
completers: useCompleters(props)
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/autocomplete/README.md
/* harmony default export */ const autocomplete = (BlockEditorAutocomplete);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
const fullscreen = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"
/* harmony default export */ const library_fullscreen = (fullscreen);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-full-height-alignment-control/index.js
function BlockFullHeightAlignmentControl({
label = (0,external_wp_i18n_namespaceObject.__)('Toggle full height'),
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
icon: library_fullscreen,
onClick: () => onToggle(!isActive),
/* harmony default export */ const block_full_height_alignment_control = (BlockFullHeightAlignmentControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-matrix-control/index.js
const block_alignment_matrix_control_noop = () => {};
function BlockAlignmentMatrixControl(props) {
label = (0,external_wp_i18n_namespaceObject.__)('Change matrix alignment'),
onChange = block_alignment_matrix_control_noop,
const icon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalAlignmentMatrixControl.Icon, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
placement: 'bottom-start'
const openOnArrowDown = event => {
if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
onKeyDown: openOnArrowDown,
renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalAlignmentMatrixControl, {
/* harmony default export */ const block_alignment_matrix_control = (BlockAlignmentMatrixControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-title/use-block-display-title.js
* Returns the block's configured title as a string, or empty if the title
* useBlockDisplayTitle( { clientId: 'afd1cb17-2c08-4e7a-91be-007ba7ddc3a1', maximumLength: 17 } );
* @param {string} props.clientId Client ID of block.
* @param {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated.
* @param {string|undefined} props.context The context to pass to `getBlockLabel`.
* @return {?string} Block title.
function useBlockDisplayTitle({
const blockTitle = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_blocks_namespaceObject.store);
const blockName = getBlockName(clientId);
const blockType = getBlockType(blockName);
const attributes = getBlockAttributes(clientId);
const label = (0,external_wp_blocks_namespaceObject.__experimentalGetBlockLabel)(blockType, attributes, context);
// If the label is defined we prioritize it over a possible block variation title match.
if (label !== blockType.title) {
const match = getActiveBlockVariation(blockName, attributes);
// Label will fallback to the title if no label is defined for the current label context.
return match?.title || blockType.title;
if (maximumLength && maximumLength > 0 && blockTitle.length > maximumLength) {
return blockTitle.slice(0, maximumLength - omission.length) + omission;
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-title/index.js
* Renders the block's configured title as a string, or empty if the title
* <BlockTitle clientId="afd1cb17-2c08-4e7a-91be-007ba7ddc3a1" maximumLength={ 17 }/>
* @param {string} props.clientId Client ID of block.
* @param {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated.
* @param {string|undefined} props.context The context to pass to `getBlockLabel`.
* @return {JSX.Element} Block title.
return useBlockDisplayTitle({
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-breadcrumb/index.js
* Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
* @param {Object} props Component props.
* @param {string} props.rootLabelText Translated label for the root element of the breadcrumb trail.
* @return {Element} Block Breadcrumb.
function BlockBreadcrumb({
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getSelectedBlockClientId,
} = unlock(select(store));
const selectedBlockClientId = getSelectedBlockClientId();
parents: getEnabledBlockParents(selectedBlockClientId),
clientId: selectedBlockClientId,
hasSelection: !!getSelectionStart().clientId
const rootLabel = rootLabelText || (0,external_wp_i18n_namespaceObject.__)('Document');
* Disable reason: The `list` ARIA role is redundant but
* Safari+VoiceOver won't announce the list otherwise.
/* eslint-disable jsx-a11y/no-redundant-roles */
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("ul", {
className: "block-editor-block-breadcrumb",
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Block breadcrumb'),
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {