: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const getLinkDestinations = () => {
const linkDestinations = [{
linkDestination: LINK_DESTINATION_MEDIA,
title: (0,external_wp_i18n_namespaceObject.__)('Link to image file'),
url: mediaType === 'image' ? mediaUrl : undefined,
if (mediaType === 'image' && mediaLink) {
linkDestination: LINK_DESTINATION_ATTACHMENT,
title: (0,external_wp_i18n_namespaceObject.__)('Link to attachment page'),
url: mediaType === 'image' ? mediaLink : undefined,
const onSetHref = value => {
const linkDestinations = getLinkDestinations();
let linkDestinationInput;
linkDestinationInput = LINK_DESTINATION_NONE;
linkDestinationInput = (linkDestinations.find(destination => {
return destination.url === value;
linkDestination: LINK_DESTINATION_CUSTOM
linkDestination: linkDestinationInput,
const onSetNewTab = value => {
const updatedLinkTarget = getUpdatedLinkTargetSettings(value);
onChangeUrl(updatedLinkTarget);
const onSetLinkRel = value => {
const onSetLinkClass = value => {
const advancedOptions = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Open in new tab'),
checked: linkTarget === '_blank'
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Link rel'),
value: rel !== null && rel !== void 0 ? rel : '',
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Link CSS class'),
const linkEditorValue = urlInput !== null ? urlInput : url;
const hideLightboxPanel = !lightboxEnabled || lightboxEnabled && !showLightboxSetting;
const showLinkEditor = !linkEditorValue && hideLightboxPanel;
const urlLabel = (getLinkDestinations().find(destination => destination.linkDestination === linkDestination) || {}).title;
const PopoverChildren = () => {
if (lightboxEnabled && showLightboxSetting && !url && !isEditingLink) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "block-editor-url-popover__expand-on-click",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
children: (0,external_wp_i18n_namespaceObject.__)('Expand on click')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "description",
children: (0,external_wp_i18n_namespaceObject.__)('Scales the image with a lightbox effect')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
label: (0,external_wp_i18n_namespaceObject.__)('Disable expand on click'),
} else if (!url || isEditingLink) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(url_popover.LinkEditor, {
className: "block-editor-format-toolbar__link-container-content",
onChangeInputValue: setUrlInput,
onSubmit: onSubmitLinkChange(),
autocompleteRef: autocompleteRef
} else if (url && !isEditingLink) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(url_popover.LinkViewer, {
className: "block-editor-format-toolbar__link-container-content",
onEditLinkClick: startEditLink,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
label: (0,external_wp_i18n_namespaceObject.__)('Remove link'),
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
className: "components-toolbar__control",
label: (0,external_wp_i18n_namespaceObject.__)('Link'),
isActive: !!url || lightboxEnabled && showLightboxSetting
}), isOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(url_popover, {
onFocusOutside: onFocusOutside(),
renderSettings: hideLightboxPanel ? () => advancedOptions : null,
additionalControls: showLinkEditor && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.NavigableMenu, {
children: [getLinkDestinations().map(link => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
}, link.linkDestination)), showLightboxSetting && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
className: "block-editor-url-popover__expand-on-click",
icon: library_fullscreen,
info: (0,external_wp_i18n_namespaceObject.__)('Scale the image with a lightbox effect.'),
linkDestination: LINK_DESTINATION_NONE,
children: (0,external_wp_i18n_namespaceObject.__)('Expand on click')
children: PopoverChildren()
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/preview-options/index.js
function PreviewOptions() {
external_wp_deprecated_default()('wp.blockEditor.PreviewOptions', {
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-resize-canvas/index.js
* Function to resize the editor window.
* @param {string} deviceType Used for determining the size of the container (e.g. Desktop, Tablet, Mobile)
* @return {Object} Inline styles to be added to resizable container.
function useResizeCanvas(deviceType) {
const [actualWidth, updateActualWidth] = (0,external_wp_element_namespaceObject.useState)(window.innerWidth);
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (deviceType === 'Desktop') {
const resizeListener = () => updateActualWidth(window.innerWidth);
window.addEventListener('resize', resizeListener);
window.removeEventListener('resize', resizeListener);
const getCanvasWidth = device => {
return deviceWidth < actualWidth ? deviceWidth : actualWidth;
const marginValue = () => window.innerHeight < 800 ? 36 : 72;
const contentInlineStyles = device => {
const height = device === 'Mobile' ? '768px' : '1024px';
const marginVertical = marginValue() + 'px';
const marginHorizontal = 'auto';
width: getCanvasWidth(device),
// Keeping margin styles separate to avoid warnings
// when those props get overridden in the iframe component
marginTop: marginVertical,
marginBottom: marginVertical,
marginLeft: marginHorizontal,
marginRight: marginHorizontal,
borderRadius: '2px 2px 2px 2px',
border: '1px solid #ddd',
marginLeft: marginHorizontal,
marginRight: marginHorizontal
return contentInlineStyles(deviceType);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/skip-to-selected-block/index.js
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/skip-to-selected-block/README.md
function SkipToSelectedBlock() {
const selectedBlockClientId = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getBlockSelectionStart(), []);
const ref = useBlockRef(selectedBlockClientId);
return selectedBlockClientId ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
className: "block-editor-skip-to-selected-block",
children: (0,external_wp_i18n_namespaceObject.__)('Skip to the selected block')
;// CONCATENATED MODULE: external ["wp","wordcount"]
const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/multi-selection-inspector/index.js
function MultiSelectionInspector({
const words = (0,external_wp_wordcount_namespaceObject.count)((0,external_wp_blocks_namespaceObject.serialize)(blocks), 'words');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "block-editor-multi-selection-inspector__card",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "block-editor-multi-selection-inspector__card-content",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "block-editor-multi-selection-inspector__card-title",
children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of blocks */
(0,external_wp_i18n_namespaceObject._n)('%d Block', '%d Blocks', blocks.length), blocks.length)
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "block-editor-multi-selection-inspector__card-description",
children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of words */
(0,external_wp_i18n_namespaceObject._n)('%d word selected.', '%d words selected.', words), words)
/* harmony default export */ const multi_selection_inspector = ((0,external_wp_data_namespaceObject.withSelect)(select => {
blocks: getMultiSelectedBlocks()
})(MultiSelectionInspector));
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cog.js
const cog = /*#__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.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",
/* harmony default export */ const library_cog = (cog);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/styles.js
const styles = /*#__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 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"
/* harmony default export */ const library_styles = (styles);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls-tabs/utils.js
title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
className: 'block-editor-block-inspector__tab-item'
title: (0,external_wp_i18n_namespaceObject.__)('Styles'),
className: 'block-editor-block-inspector__tab-item'
title: (0,external_wp_i18n_namespaceObject.__)('List View'),
className: 'block-editor-block-inspector__tab-item'
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls-tabs/advanced-controls-panel.js
const AdvancedControls = () => {
const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(InspectorAdvancedControls.slotName);
const hasFills = Boolean(fills && fills.length);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
className: "block-editor-block-inspector__advanced",
title: (0,external_wp_i18n_namespaceObject.__)('Advanced'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inspector_controls.Slot, {
/* harmony default export */ const advanced_controls_panel = (AdvancedControls);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls-tabs/position-controls-panel.js
const PositionControlsPanel = () => {
const [initialOpen, setInitialOpen] = (0,external_wp_element_namespaceObject.useState)();
// Determine whether the panel should be expanded.
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getSelectedBlockClientIds
const clientIds = getSelectedBlockClientIds();
multiSelectedBlocks: getBlocksByClientId(clientIds)
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
// If any selected block has a position set, open the panel by default.
// The first block's value will still be used within the control though.
if (initialOpen === undefined) {
setInitialOpen(multiSelectedBlocks.some(({
}) => !!attributes?.style?.position?.type));
}, [initialOpen, multiSelectedBlocks, setInitialOpen]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
className: "block-editor-block-inspector__position",
title: (0,external_wp_i18n_namespaceObject.__)('Position'),
initialOpen: initialOpen !== null && initialOpen !== void 0 ? initialOpen : false,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inspector_controls.Slot, {
const PositionControls = () => {
const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(inspector_controls_groups.position.Slot.__unstableName);
const hasFills = Boolean(fills && fills.length);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PositionControlsPanel, {});
/* harmony default export */ const position_controls_panel = (PositionControls);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
const close_close = /*#__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 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
/* harmony default export */ const library_close = (close_close);