: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
className: dist_clsx('interface-navigable-region', className),
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
const interface_skeleton_ANIMATION_DURATION = 0.25;
const commonTransition = {
duration: interface_skeleton_ANIMATION_DURATION,
function useHTMLClass(className) {
(0,external_wp_element_namespaceObject.useEffect)(() => {
const element = document && document.querySelector(`html:not(.${className})`);
element.classList.toggle(className);
element.classList.toggle(className);
distractionFreeDisabled: {
function InterfaceSkeleton({
enableRegionNavigation = true,
// Todo: does this need to be a prop.
// Can we use a dependency to keyboard-shortcuts directly?
const [secondarySidebarResizeListener, secondarySidebarSize] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
const defaultTransition = {
duration: disableMotion ? 0 : interface_skeleton_ANIMATION_DURATION,
const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts);
useHTMLClass('interface-interface-skeleton__html-container');
/* translators: accessibility text for the top bar landmark region. */
header: (0,external_wp_i18n_namespaceObject._x)('Header', 'header landmark area'),
/* translators: accessibility text for the content landmark region. */
body: (0,external_wp_i18n_namespaceObject.__)('Content'),
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'),
/* translators: accessibility text for the settings landmark region. */
sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'),
/* translators: accessibility text for the publish landmark region. */
actions: (0,external_wp_i18n_namespaceObject.__)('Publish'),
/* translators: accessibility text for the footer landmark region. */
footer: (0,external_wp_i18n_namespaceObject.__)('Footer')
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
...(enableRegionNavigation ? navigateRegionsProps : {}),
ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]),
className: dist_clsx(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer'),
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "interface-interface-skeleton__editor",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
children: !!header && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
as: external_wp_components_namespaceObject.__unstableMotion.div,
className: "interface-interface-skeleton__header",
"aria-label": mergedLabels.header,
initial: isDistractionFree ? 'distractionFreeHidden' : 'hidden',
whileHover: isDistractionFree ? 'distractionFreeHover' : 'visible',
animate: isDistractionFree ? 'distractionFreeDisabled' : 'visible',
exit: isDistractionFree ? 'distractionFreeHidden' : 'hidden',
variants: headerVariants,
transition: defaultTransition,
}), isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "interface-interface-skeleton__header",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "interface-interface-skeleton__body",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
children: !!secondarySidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
className: "interface-interface-skeleton__secondary-sidebar",
ariaLabel: mergedLabels.secondarySidebar,
as: external_wp_components_namespaceObject.__unstableMotion.div,
animate: isMobileViewport ? 'mobileOpen' : 'open',
width: secondarySidebarSize.width
transition: defaultTransition,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
width: isMobileViewport ? '100vw' : 'fit-content',
children: [secondarySidebarResizeListener, secondarySidebar]
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
className: "interface-interface-skeleton__content",
ariaLabel: mergedLabels.body,
}), !!sidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
className: "interface-interface-skeleton__sidebar",
ariaLabel: mergedLabels.sidebar,
}), !!actions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
className: "interface-interface-skeleton__actions",
ariaLabel: mergedLabels.actions,
}), !!footer && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
className: "interface-interface-skeleton__footer",
ariaLabel: mergedLabels.footer,
/* harmony default export */ const interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton));
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/index.js
* Component handles the keyboard shortcuts for the editor.
* It provides functionality for various keyboard shortcuts such as toggling editor mode,
* toggling distraction-free mode, undo/redo, saving the post, toggling list view,
* and toggling the sidebar.
function EditorKeyboardShortcuts() {
const isModeToggleDisabled = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(store_store).getEditorSettings();
return !richEditingEnabled || !codeEditingEnabled;
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
getActiveComplementaryArea
} = (0,external_wp_data_namespaceObject.useSelect)(store);
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
} = (0,external_wp_data_namespaceObject.useSelect)(store_store);
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-mode', () => {
switchEditorMode(getEditorMode() === 'visual' ? 'text' : 'visual');
isDisabled: isModeToggleDisabled
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-distraction-free', () => {
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/undo', event => {
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/redo', event => {
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/save', event => {
* Do not save the post if post saving is locked.
if (isPostSavingLocked()) {
// TODO: This should be handled in the `savePost` effect in
// considering `isSaveable`. See note on `isEditedPostSaveable`
// selector about dirtiness and meta-boxes.
// See: `isEditedPostSaveable`
if (!isEditedPostDirty()) {
// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-list-view', event => {
if (!isListViewOpened()) {
setIsListViewOpened(true);
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-sidebar', event => {
// This shortcut has no known clashes, but use preventDefault to prevent any
// obscure shortcuts from triggering.
const isEditorSidebarOpened = ['edit-post/document', 'edit-post/block'].includes(getActiveComplementaryArea('core'));
if (isEditorSidebarOpened) {
disableComplementaryArea('core');
const sidebarToOpen = getBlockSelectionStart() ? 'edit-post/block' : 'edit-post/document';
enableComplementaryArea('core', sidebarToOpen);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js
class AutosaveMonitor extends external_wp_element_namespaceObject.Component {
this.needsAutosave = !!(props.isDirty && props.isAutosaveable);
if (!this.props.disableIntervalChecks) {
componentDidUpdate(prevProps) {
if (this.props.disableIntervalChecks) {
if (this.props.editsReference !== prevProps.editsReference) {
if (this.props.interval !== prevProps.interval) {
clearTimeout(this.timerId);
if (!this.props.isDirty) {
this.needsAutosave = false;
if (this.props.isAutosaving && !prevProps.isAutosaving) {
this.needsAutosave = false;
if (this.props.editsReference !== prevProps.editsReference) {
this.needsAutosave = true;
clearTimeout(this.timerId);
setAutosaveTimer(timeout = this.props.interval * 1000) {
this.timerId = setTimeout(() => {
this.autosaveTimerHandler();
if (!this.props.isAutosaveable) {
this.setAutosaveTimer(1000);
if (this.needsAutosave) {
this.needsAutosave = false;
* Monitors the changes made to the edited post and triggers autosave if necessary.
* The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.
* The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as
* the specific way of detecting changes.
* * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.
* * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.
* @param {Object} props - The properties passed to the component.
* @param {Function} props.autosave - The function to call when changes need to be saved.
* @param {number} props.interval - The maximum time in seconds between an unsaved change and an autosave.
* @param {boolean} props.isAutosaveable - If false, the check for changes is retried every second.
* @param {boolean} props.disableIntervalChecks - If true, disables the timer and any change will immediately trigger `props.autosave()`.
* @param {boolean} props.isDirty - Indicates if there are unsaved changes.
* <AutosaveMonitor interval={30000} />
/* harmony default export */ const autosave_monitor = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_data_namespaceObject.withSelect)((select, ownProps) => {
getReferenceByDistinctEdits
} = select(external_wp_coreData_namespaceObject.store);
isEditedPostAutosaveable,
interval = getEditorSettings().autosaveInterval
editsReference: getReferenceByDistinctEdits(),
isDirty: isEditedPostDirty(),
isAutosaveable: isEditedPostAutosaveable(),
isAutosaving: isAutosavingPost(),
}), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, ownProps) => ({
autosave = dispatch(store_store).autosave
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js
const chevronRightSmall = /*#__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: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"
/* harmony default export */ const chevron_right_small = (chevronRightSmall);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js
const chevronLeftSmall = /*#__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: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"
/* harmony default export */ const chevron_left_small = (chevronLeftSmall);
;// CONCATENATED MODULE: external ["wp","keycodes"]
const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
;// CONCATENATED MODULE: external ["wp","commands"]
const external_wp_commands_namespaceObject = window["wp"]["commands"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-bar/index.js