: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Represents a label component for a post URL.
* @return {Component} The PostURLLabel component.
function PostURLLabel() {
return usePostURLLabel();
* Custom hook to get the label for the post URL.
* @return {string} The filtered and decoded post URL label.
function usePostURLLabel() {
const postLink = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getPermalink(), []);
return (0,external_wp_url_namespaceObject.filterURLForDisplay)((0,external_wp_url_namespaceObject.safeDecodeURIComponent)(postLink));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/panel.js
* Renders the `PostURLPanel` component.
* @return {JSX.Element} The rendered PostURLPanel component.
function PostURLPanel() {
// Use internal state instead of a ref to make sure that the component
// re-renders when the popover's anchor updates.
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
// Memoize popoverProps to avoid returning a new object every time.
const popoverProps = (0,external_wp_element_namespaceObject.useMemo)(() => ({
// Anchor the popover to the middle of the entire row so that it doesn't
// move around when the label changes.
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostURLCheck, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_row, {
label: (0,external_wp_i18n_namespaceObject.__)('Link'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
popoverProps: popoverProps,
className: "editor-post-url__panel-dropdown",
contentClassName: "editor-post-url__panel-dialog",
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostURLToggle, {
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostURL, {
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_coreData_namespaceObject.store);
const siteSettings = getEditedEntityRecord('root', 'site');
const _id = getCurrentPostId();
slug: select(store_store).getEditedPostSlug(),
isFrontPage: siteSettings?.page_on_front === _id,
postLink: getCurrentPost()?.link
const decodedSlug = (0,external_wp_url_namespaceObject.safeDecodeURIComponent)(slug);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
className: "editor-post-url__panel-toggle",
// translators: %s: Current post link.
"aria-label": (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Change link: %s'), decodedSlug),
children: isFrontPage ? postLink : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: ["/", decodedSlug]
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-visibility/check.js
* Determines if the current post can be edited (published)
* and passes this information to the provided render function.
* @param {Object} props The component props.
* @param {Function} props.render Function to render the component.
* Receives an object with a `canEdit` property.
* @return {JSX.Element} The rendered component.
function PostVisibilityCheck({
const canEdit = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _select$getCurrentPos;
return (_select$getCurrentPos = select(store_store).getCurrentPost()._links?.['wp:action-publish']) !== null && _select$getCurrentPos !== void 0 ? _select$getCurrentPos : false;
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/info.js
const info = /*#__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: "M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
/* harmony default export */ const library_info = (info);
;// CONCATENATED MODULE: external ["wp","wordcount"]
const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/word-count/index.js
const content = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getEditedPostAttribute('content'), []);
* translators: If your word count is based on single characters (e.g. East Asian characters),
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
* Do not translate into your own language.
const wordCountType = (0,external_wp_i18n_namespaceObject._x)('words', 'Word count type. Do not translate!');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
children: (0,external_wp_wordcount_namespaceObject.count)(content, wordCountType)
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/time-to-read/index.js
* Average reading rate - based on average taken from
* https://irisreading.com/average-reading-speed-in-various-languages/
* (Characters/minute used for Chinese rather than words).
* @type {number} A rough estimate of the average reading rate across multiple languages.
const AVERAGE_READING_RATE = 189;
const content = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getEditedPostAttribute('content'), []);
* translators: If your word count is based on single characters (e.g. East Asian characters),
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
* Do not translate into your own language.
const wordCountType = (0,external_wp_i18n_namespaceObject._x)('words', 'Word count type. Do not translate!');
const minutesToRead = Math.round((0,external_wp_wordcount_namespaceObject.count)(content, wordCountType) / AVERAGE_READING_RATE);
const minutesToReadString = minutesToRead === 0 ? (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('<span>< 1</span> minute'), {
span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {})
}) : (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s is the number of minutes the post will take to read. */
(0,external_wp_i18n_namespaceObject._n)('<span>%d</span> minute', '<span>%d</span> minutes', minutesToRead), minutesToRead), {
span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {})
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "time-to-read",
children: minutesToReadString
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/character-count/index.js
* Renders the character count of the post content.
* @return {number} The character count.
function CharacterCount() {
const content = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getEditedPostAttribute('content'), []);
return (0,external_wp_wordcount_namespaceObject.count)(content, 'characters_including_spaces');
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/table-of-contents/panel.js
function TableOfContentsPanel({
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
} = select(external_wp_blockEditor_namespaceObject.store);
headingCount: getGlobalBlockCount('core/heading'),
paragraphCount: getGlobalBlockCount('core/paragraph'),
numberOfBlocks: getGlobalBlockCount()
* Disable reason: The `list` ARIA role is redundant but
* Safari+VoiceOver won't announce the list otherwise.
/* eslint-disable jsx-a11y/no-redundant-roles */
(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "table-of-contents__wrapper",
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Document Statistics'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("ul", {
className: "table-of-contents__counts",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "table-of-contents__count",
children: [(0,external_wp_i18n_namespaceObject.__)('Words'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WordCount, {})]
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "table-of-contents__count",
children: [(0,external_wp_i18n_namespaceObject.__)('Characters'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "table-of-contents__number",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CharacterCount, {})
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "table-of-contents__count",
children: [(0,external_wp_i18n_namespaceObject.__)('Time to read'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TimeToRead, {})]
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "table-of-contents__count",
children: [(0,external_wp_i18n_namespaceObject.__)('Headings'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "table-of-contents__number",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "table-of-contents__count",
children: [(0,external_wp_i18n_namespaceObject.__)('Paragraphs'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "table-of-contents__number",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
className: "table-of-contents__count",
children: [(0,external_wp_i18n_namespaceObject.__)('Blocks'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "table-of-contents__number",
}), headingCount > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
className: "table-of-contents__title",
children: (0,external_wp_i18n_namespaceObject.__)('Document Outline')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DocumentOutline, {
onSelect: onRequestClose,
hasOutlineItemsDisabled: hasOutlineItemsDisabled
/* eslint-enable jsx-a11y/no-redundant-roles */
/* harmony default export */ const table_of_contents_panel = (TableOfContentsPanel);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/table-of-contents/index.js
function TableOfContents({
const hasBlocks = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_blockEditor_namespaceObject.store).getBlockCount(), []);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
placement: repositionDropdown ? 'right' : 'bottom'
className: "table-of-contents",
contentClassName: "table-of-contents__popover",
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: hasBlocks ? onToggle : undefined,
/* translators: button label text should, if possible, be under 16 characters. */,
label: (0,external_wp_i18n_namespaceObject.__)('Details'),
tooltipPosition: "bottom",
"aria-disabled": !hasBlocks
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(table_of_contents_panel, {
hasOutlineItemsDisabled: hasOutlineItemsDisabled
/* harmony default export */ const table_of_contents = ((0,external_wp_element_namespaceObject.forwardRef)(TableOfContents));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/unsaved-changes-warning/index.js
* Warns the user if there are unsaved changes before leaving the editor.
* Compatible with Post Editor and Site Editor.
* @return {Component} The component.
function UnsavedChangesWarning() {
__experimentalGetDirtyEntityRecords
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store);
(0,external_wp_element_namespaceObject.useEffect)(() => {
* Warns the user if there are unsaved changes before leaving the editor.
* @param {Event} event `beforeunload` event.
* @return {string | undefined} Warning prompt message, if unsaved changes exist.
const warnIfUnsavedChanges = event => {
// We need to call the selector directly in the listener to avoid race
// conditions with `BrowserURL` where `componentDidUpdate` gets the
// new value of `isEditedPostDirty` before this component does,
// causing this component to incorrectly think a trashed post is still dirty.
const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
if (dirtyEntityRecords.length > 0) {
event.returnValue = (0,external_wp_i18n_namespaceObject.__)('You have unsaved changes. If you proceed, they will be lost.');
return event.returnValue;
window.addEventListener('beforeunload', warnIfUnsavedChanges);
window.removeEventListener('beforeunload', warnIfUnsavedChanges);
}, [__experimentalGetDirtyEntityRecords]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/with-registry-provider.js
function getSubRegistry(subRegistries, registry, useSubRegistry) {
let subRegistry = subRegistries.get(registry);
subRegistry = (0,external_wp_data_namespaceObject.createRegistry)({
'core/block-editor': external_wp_blockEditor_namespaceObject.storeConfig
// Todo: The interface store should also be created per instance.
subRegistry.registerStore('core/editor', storeConfig);
subRegistries.set(registry, subRegistry);
const withRegistryProvider = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => ({
const registry = (0,external_wp_data_namespaceObject.useRegistry)();