: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
// If a block variation match is found change the name to be the same with the
// one that is used for block variations in the Inserter (`getItemFromVariation`).
const match = (0,external_wp_data_namespaceObject.select)(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(blockName, attributes);
if (blockName === 'core/block') {
id += '/' + attributes.ref;
count: prevUsage[id] ? prevUsage[id].count + 1 : 1
insertUsage: nextInsertUsage
* Reducer returning an object where each key is a block client ID, its value
* representing the settings for its nested blocks.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
const blockListSettings = (state = {}, action) => {
// Even if the replaced blocks have the same client ID, our logic
// should correct the state.
return Object.fromEntries(Object.entries(state).filter(([id]) => !action.clientIds.includes(id)));
case 'UPDATE_BLOCK_LIST_SETTINGS':
const updates = typeof action.clientId === 'string' ? {
[action.clientId]: action.settings
// Remove settings that are the same as the current state.
for (const clientId in updates) {
if (!updates[clientId]) {
delete updates[clientId];
} else if (es6_default()(state[clientId], updates[clientId])) {
delete updates[clientId];
if (Object.keys(updates).length === 0) {
for (const clientId in updates) {
if (!updates[clientId]) {
* Reducer returning which mode is enabled.
* @param {string} state Current state.
* @param {Object} action Dispatched action.
* @return {string} Updated state.
function editorMode(state = 'edit', action) {
// Let inserting block in navigation mode always trigger Edit mode.
if (action.type === 'INSERT_BLOCKS' && state === 'navigation') {
if (action.type === 'SET_EDITOR_MODE') {
* Reducer returning whether the block moving mode is enabled or not.
* @param {string|null} state Current state.
* @param {Object} action Dispatched action.
* @return {string|null} Updated state.
function hasBlockMovingClientId(state = null, action) {
if (action.type === 'SET_BLOCK_MOVING_MODE') {
return action.hasBlockMovingClientId;
if (action.type === 'SET_EDITOR_MODE') {
* Reducer return an updated state representing the most recent block attribute
* update. The state is structured as an object where the keys represent the
* client IDs of blocks, the values a subset of attributes from the most recent
* block update. The state is always reset to null if the last action is
* anything other than an attributes update.
* @param {Object<string,Object>} state Current state.
* @param {Object} action Action object.
* @return {[string,Object]} Updated state.
function lastBlockAttributesChange(state = null, action) {
if (!action.updates.attributes) {
[action.clientId]: action.updates.attributes
case 'UPDATE_BLOCK_ATTRIBUTES':
return action.clientIds.reduce((accumulator, id) => ({
[id]: action.uniqueByBlock ? action.attributes[id] : action.attributes
* Reducer returning current highlighted block.
* @param {boolean} state Current highlighted block.
* @param {Object} action Dispatched action.
* @return {string} Updated state.
function highlightedBlock(state, action) {
case 'TOGGLE_BLOCK_HIGHLIGHT':
} else if (state === clientId) {
if (action.clientId !== state) {
* Reducer returning current expanded block in the list view.
* @param {string|null} state Current expanded block.
* @param {Object} action Dispatched action.
* @return {string|null} Updated state.
function expandedBlock(state = null, action) {
case 'SET_BLOCK_EXPANDED_IN_LIST_VIEW':
if (action.clientId !== state) {
* Reducer returning the block insertion event list state.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function lastBlockInserted(state = {}, action) {
if (!action.blocks.length) {
const clientIds = action.blocks.map(block => {
const source = action.meta?.source;
* Reducer returning the block that is eding temporarily edited as blocks.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function temporarilyEditingAsBlocks(state = '', action) {
if (action.type === 'SET_TEMPORARILY_EDITING_AS_BLOCKS') {
return action.temporarilyEditingAsBlocks;
* Reducer returning the focus mode that should be used when temporarily edit as blocks finishes.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function temporarilyEditingFocusModeRevert(state = '', action) {
if (action.type === 'SET_TEMPORARILY_EDITING_AS_BLOCKS') {
return action.focusModeToRevert;
* Reducer returning a map of block client IDs to block editing modes.
* @param {Map} state Current state.
* @param {Object} action Dispatched action.
* @return {Map} Updated state.
function blockEditingModes(state = new Map(), action) {
case 'SET_BLOCK_EDITING_MODE':
return new Map(state).set(action.clientId, action.mode);
case 'UNSET_BLOCK_EDITING_MODE':
const newState = new Map(state);
newState.delete(action.clientId);
return state.has('') ? new Map().set('', state.get('')) : state;
* Reducer returning the clientId of the block settings menu that is currently open.
* @param {string|null} state Current state.
* @param {Object} action Dispatched action.
* @return {string|null} Updated state.
function openedBlockSettingsMenu(state = null, action) {
if ('SET_OPENED_BLOCK_SETTINGS_MENU' === action.type) {
return (_action$clientId = action?.clientId) !== null && _action$clientId !== void 0 ? _action$clientId : null;
* Reducer returning a map of style IDs to style overrides.
* @param {Map} state Current state.
* @param {Object} action Dispatched action.
* @return {Map} Updated state.
function styleOverrides(state = new Map(), action) {
case 'SET_STYLE_OVERRIDE':
return new Map(state).set(action.id, action.style);
case 'DELETE_STYLE_OVERRIDE':
const newState = new Map(state);
newState.delete(action.id);
* Reducer returning a map of the registered inserter media categories.
* @param {Array} state Current state.
* @param {Object} action Dispatched action.
* @return {Array} Updated state.
function registeredInserterMediaCategories(state = [], action) {
case 'REGISTER_INSERTER_MEDIA_CATEGORY':
return [...state, action.category];
* Reducer setting last focused element
* @param {boolean} state Current state.
* @param {Object} action Dispatched action.
* @return {boolean} Updated state.
function lastFocus(state = false, action) {
const combinedReducers = (0,external_wp_data_namespaceObject.combineReducers)({
lastBlockAttributesChange,
temporarilyEditingAsBlocks,
temporarilyEditingFocusModeRevert,
registeredInserterMediaCategories
function withAutomaticChangeReset(reducer) {
return (state, action) => {
const nextState = reducer(state, action);
// Take over the last value without creating a new reference.
nextState.automaticChangeStatus = state.automaticChangeStatus;
if (action.type === 'MARK_AUTOMATIC_CHANGE') {
automaticChangeStatus: 'pending'
if (action.type === 'MARK_AUTOMATIC_CHANGE_FINAL' && state.automaticChangeStatus === 'pending') {
automaticChangeStatus: 'final'
// If there's a change that doesn't affect blocks or selection, maintain
if (nextState.blocks === state.blocks && nextState.selection === state.selection) {
// As long as the state is not final, ignore any selection changes.
if (nextState.automaticChangeStatus !== 'final' && nextState.selection !== state.selection) {
// Reset the status if blocks change or selection changes (when status is final).
automaticChangeStatus: undefined
/* harmony default export */ const reducer = (withAutomaticChangeReset(combinedReducers));
;// CONCATENATED MODULE: external ["wp","primitives"]
const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
;// CONCATENATED MODULE: external "ReactJSXRuntime"
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol.js
const symbol = /*#__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: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"
/* harmony default export */ const library_symbol = (symbol);
;// CONCATENATED MODULE: external ["wp","richText"]
const external_wp_richText_namespaceObject = window["wp"]["richText"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/private-keys.js
const globalStylesDataKey = Symbol('globalStylesDataKey');
const selectBlockPatternsKey = Symbol('selectBlockPatternsKey');
const reusableBlocksSelectKey = Symbol('reusableBlocksSelect');
;// CONCATENATED MODULE: external ["wp","privateApis"]
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/lock-unlock.js
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/block-editor');
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/constants.js
const STORE_NAME = 'core/block-editor';
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/utils.js
const withRootClientIdOptionKey = Symbol('withRootClientId');
const parsedPatternCache = new WeakMap();
function parsePattern(pattern) {
const blocks = (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
__unstableSkipMigrationLogs: true
if (blocks.length === 1) {
...(blocks[0].attributes.metadata || {}),
categories: pattern.categories,
patternName: pattern.name,
name: blocks[0].attributes.metadata?.name || pattern.title
function getParsedPattern(pattern) {
let parsedPattern = parsedPatternCache.get(pattern);