: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "components-panel__header interface-complementary-area-header__small",
children: [smallScreenTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
className: "interface-complementary-area-header__small-title",
children: smallScreenTitle
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: dist_clsx('components-panel__header', 'interface-complementary-area-header', className),
children: [children, toggleButton]
/* harmony default export */ const complementary_area_header = (ComplementaryAreaHeader);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
function ActionItemSlot({
as: Component = external_wp_components_namespaceObject.ButtonGroup,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
bubblesVirtually: bubblesVirtually,
if (!external_wp_element_namespaceObject.Children.toArray(fills).length) {
// Special handling exists for backward compatibility.
// It ensures that menu items created by plugin authors aren't
// duplicated with automatically injected menu items coming
// from pinnable plugin sidebars.
// @see https://github.com/WordPress/gutenberg/issues/14457
const initializedByPlugins = [];
external_wp_element_namespaceObject.Children.forEach(fills, ({
__unstableExplicitMenuItem,
if (__unstableTarget && __unstableExplicitMenuItem) {
initializedByPlugins.push(__unstableTarget);
const children = external_wp_element_namespaceObject.Children.map(fills, child => {
if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
as: Component = external_wp_components_namespaceObject.Button,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
onClick: onClick || fpOnClick ? (...args) => {
(onClick || noop)(...args);
(fpOnClick || noop)(...args);
ActionItem.Slot = ActionItemSlot;
/* harmony default export */ const action_item = (ActionItem);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
const PluginsMenuItem = ({
// Menu item is marked with unstable prop for backward compatibility.
// They are removed so they don't leak to DOM elements.
// @see https://github.com/WordPress/gutenberg/issues/14457
__unstableExplicitMenuItem,
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
function ComplementaryAreaMoreMenuItem({
__unstableExplicitMenuItem,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(action_item, {
__unstableExplicitMenuItem: __unstableExplicitMenuItem,
__unstableTarget: `${scope}/${target}`,
name: `${scope}/plugin-more-menu`,
role: "menuitemcheckbox",
selectedIcon: library_check,
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
name: `PinnedItems/${scope}`,
function PinnedItemsSlot({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
name: `PinnedItems/${scope}`,
children: fills => fills?.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: dist_clsx(className, 'interface-pinned-items'),
PinnedItems.Slot = PinnedItemsSlot;
/* harmony default export */ const pinned_items = (PinnedItems);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js
const ANIMATION_DURATION = 0.3;
function ComplementaryAreaSlot({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
name: `ComplementaryArea/${scope}`,
const SIDEBAR_WIDTH = 280;
function ComplementaryAreaFill({
const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
// This is used to delay the exit animation to the next tick.
// The reason this is done is to allow us to apply the right transition properties
// When we switch from an open sidebar to another open sidebar.
// we don't want to animate in this case.
const previousActiveArea = (0,external_wp_compose_namespaceObject.usePrevious)(activeArea);
const previousIsActive = (0,external_wp_compose_namespaceObject.usePrevious)(isActive);
const [, setState] = (0,external_wp_element_namespaceObject.useState)({});
(0,external_wp_element_namespaceObject.useEffect)(() => {
duration: disableMotion || isMobileViewport || !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea ? 0 : ANIMATION_DURATION,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
name: `ComplementaryArea/${scope}`,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
children: (previousIsActive || isActive) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
animate: isMobileViewport ? 'mobileOpen' : 'open',
className: "interface-complementary-area__fill",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
width: isMobileViewport ? '100vw' : SIDEBAR_WIDTH
function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
const previousIsSmall = (0,external_wp_element_namespaceObject.useRef)(false);
const shouldOpenWhenNotSmall = (0,external_wp_element_namespaceObject.useRef)(false);
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
(0,external_wp_element_namespaceObject.useEffect)(() => {
// If the complementary area is active and the editor is switching from
// a big to a small window size.
if (isActive && isSmall && !previousIsSmall.current) {
disableComplementaryArea(scope);
// Flag the complementary area to be reopened when the window size
// goes from small to big.
shouldOpenWhenNotSmall.current = true;
// If there is a flag indicating the complementary area should be
// enabled when we go from small to big window size and we are going
// from a small to big window size.
shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) {
// Remove the flag indicating the complementary area should be
shouldOpenWhenNotSmall.current = false;
enableComplementaryArea(scope, identifier);
// If the flag is indicating the current complementary should be
// reopened but another complementary area becomes active, remove
shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) {
shouldOpenWhenNotSmall.current = false;
if (isSmall !== previousIsSmall.current) {
previousIsSmall.current = isSmall;
}, [isActive, isSmall, scope, identifier, activeArea, disableComplementaryArea, enableComplementaryArea]);
function ComplementaryArea({
closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'),
// This state is used to delay the rendering of the Fill
// until the initial effect runs.
// This prevents the animation from running on mount if
// the complementary area is active by default.
const [isReady, setIsReady] = (0,external_wp_element_namespaceObject.useState)(false);
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getActiveComplementaryArea,
isComplementaryAreaLoading,
} = select(external_wp_preferences_namespaceObject.store);
const _activeArea = getActiveComplementaryArea(scope);
isLoading: isComplementaryAreaLoading(scope),
isActive: _activeArea === identifier,
isPinned: isItemPinned(scope, identifier),
isSmall: select(external_wp_viewport_namespaceObject.store).isViewportMatch('< medium'),
isLarge: select(external_wp_viewport_namespaceObject.store).isViewportMatch('large'),
showIconLabels: get('core', 'showIconLabels')
useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall);
disableComplementaryArea,
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
(0,external_wp_element_namespaceObject.useEffect)(() => {
// Set initial visibility: For large screens, enable if it's active by
// default. For small screens, always initially disable.
if (isActiveByDefault && activeArea === undefined && !isSmall) {
enableComplementaryArea(scope, identifier);
} else if (activeArea === undefined && isSmall) {
disableComplementaryArea(scope, identifier);
}, [activeArea, isActiveByDefault, scope, identifier, isSmall, enableComplementaryArea, disableComplementaryArea]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items, {
children: isPinned && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
isPressed: isActive && (!showIconLabels || isLarge),
"aria-expanded": isActive,
"aria-disabled": isLoading,
icon: showIconLabels ? library_check : icon,
showTooltip: !showIconLabels,
variant: showIconLabels ? 'tertiary' : undefined,
}), name && isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaMoreMenuItem, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ComplementaryAreaFill, {
className: dist_clsx('interface-complementary-area', className),
id: identifier.replace('/', ':'),
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_header, {
className: headerClassName,
onClose: () => disableComplementaryArea(scope),
smallScreenTitle: smallScreenTitle,
shortcut: toggleShortcut,
children: header || /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
className: "interface-complementary-area-header__title",
}), isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
className: "interface-complementary-area__pin-unpin-item",
icon: isPinned ? star_filled : star_empty,
label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'),
onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier),
"aria-expanded": isPinned,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Panel, {
className: panelClassName,
const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea);
ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
/* harmony default export */ const complementary_area = (ComplementaryAreaWrapped);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/fullscreen-mode/index.js
const FullscreenMode = ({
(0,external_wp_element_namespaceObject.useEffect)(() => {
// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes
// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled
// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as
// a consequence of the FullscreenMode setup.
if (document.body.classList.contains('sticky-menu')) {
document.body.classList.remove('sticky-menu');
document.body.classList.add('sticky-menu');
(0,external_wp_element_namespaceObject.useEffect)(() => {
document.body.classList.add('is-fullscreen-mode');
document.body.classList.remove('is-fullscreen-mode');
document.body.classList.remove('is-fullscreen-mode');
/* harmony default export */ const fullscreen_mode = (FullscreenMode);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/navigable-region/index.js
function NavigableRegion({