' + // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
Object(external_wp_i18n_["__"])('One of the hardest things to do in technology is disrupt yourself.') + '
',
citation: Object(external_wp_i18n_["__"])('Matt Mullenweg')
}
},
transforms: pullquote_transforms,
edit: pullquote_edit,
save: pullquote_save_save,
deprecated: pullquote_deprecated
};
// EXTERNAL MODULE: external ["wp","reusableBlocks"]
var external_wp_reusableBlocks_ = __webpack_require__("diJD");
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/ungroup.js
/**
* WordPress dependencies
*/
const ungroup = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
d: "M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"
}));
/* harmony default export */ var library_ungroup = (ungroup);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/edit.js
/**
* WordPress dependencies
*/
function ReusableBlockEdit({
attributes: {
ref
},
clientId
}) {
const [hasAlreadyRendered, RecursionProvider] = Object(external_wp_blockEditor_["__experimentalUseNoRecursiveRenders"])(ref);
const {
isMissing,
hasResolved
} = Object(external_wp_data_["useSelect"])(select => {
const persistedBlock = select(external_wp_coreData_["store"]).getEntityRecord('postType', 'wp_block', ref);
const hasResolvedBlock = select(external_wp_coreData_["store"]).hasFinishedResolution('getEntityRecord', ['postType', 'wp_block', ref]);
return {
hasResolved: hasResolvedBlock,
isMissing: hasResolvedBlock && !persistedBlock
};
}, [ref, clientId]);
const {
__experimentalConvertBlockToStatic: convertBlockToStatic
} = Object(external_wp_data_["useDispatch"])(external_wp_reusableBlocks_["store"]);
const [blocks, onInput, onChange] = Object(external_wp_coreData_["useEntityBlockEditor"])('postType', 'wp_block', {
id: ref
});
const [title, setTitle] = Object(external_wp_coreData_["useEntityProp"])('postType', 'wp_block', 'title', ref);
const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({}, {
value: blocks,
onInput,
onChange,
renderAppender: blocks !== null && blocks !== void 0 && blocks.length ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender
});
const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
if (hasAlreadyRendered) {
return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block cannot be rendered inside itself.')));
}
if (isMissing) {
return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block has been deleted or is unavailable.')));
}
if (!hasResolved) {
return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)));
}
return Object(external_wp_element_["createElement"])(RecursionProvider, null, Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
onClick: () => convertBlockToStatic(clientId),
label: Object(external_wp_i18n_["__"])('Convert to regular blocks'),
icon: library_ungroup,
showTooltip: true
}))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
label: Object(external_wp_i18n_["__"])('Name'),
value: title,
onChange: setTitle
}))), Object(external_wp_element_["createElement"])("div", {
className: "block-library-block__reusable-block-container"
}, Object(external_wp_element_["createElement"])("div", innerBlocksProps))));
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/index.js
/**
* Internal dependencies
*/
const block_metadata = {
apiVersion: 2,
name: "core/block",
title: "Reusable block",
category: "reusable",
description: "Create and save content to reuse across your site. Update the block, and the changes apply everywhere it\u2019s used.",
textdomain: "default",
attributes: {
ref: {
type: "number"
}
},
supports: {
customClassName: false,
html: false,
inserter: false
},
editorStyle: "wp-block-editor"
};
const {
name: block_name
} = block_metadata;
const block_settings = {
edit: ReusableBlockEdit
};
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rss.js
/**
* WordPress dependencies
*/
const rss = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"
}));
/* harmony default export */ var library_rss = (rss);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/edit.js
/**
* WordPress dependencies
*/
const DEFAULT_MIN_ITEMS = 1;
const DEFAULT_MAX_ITEMS = 10;
function RSSEdit({
attributes,
setAttributes
}) {
const [isEditing, setIsEditing] = Object(external_wp_element_["useState"])(!attributes.feedURL);
const {
blockLayout,
columns,
displayAuthor,
displayDate,
displayExcerpt,
excerptLength,
feedURL,
itemsToShow
} = attributes;
function toggleAttribute(propName) {
return () => {
const value = attributes[propName];
setAttributes({
[propName]: !value
});
};
}
function onSubmitURL(event) {
event.preventDefault();
if (feedURL) {
setIsEditing(false);
}
}
const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
if (isEditing) {
return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
icon: library_rss,
label: "RSS"
}, Object(external_wp_element_["createElement"])("form", {
onSubmit: onSubmitURL,
className: "wp-block-rss__placeholder-form"
}, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
placeholder: Object(external_wp_i18n_["__"])('Enter URL here…'),
value: feedURL,
onChange: value => setAttributes({
feedURL: value
}),
className: "wp-block-rss__placeholder-input"
}), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
isPrimary: true,
type: "submit"
}, Object(external_wp_i18n_["__"])('Use URL')))));
}
const toolbarControls = [{
icon: library_edit["a" /* default */],
title: Object(external_wp_i18n_["__"])('Edit RSS URL'),
onClick: () => setIsEditing(true)
}, {
icon: library_list,
title: Object(external_wp_i18n_["__"])('List view'),
onClick: () => setAttributes({
blockLayout: 'list'
}),
isActive: blockLayout === 'list'
}, {
icon: grid["a" /* default */],
title: Object(external_wp_i18n_["__"])('Grid view'),
onClick: () => setAttributes({
blockLayout: 'grid'
}),
isActive: blockLayout === 'grid'
}];
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
controls: toolbarControls
})), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
title: Object(external_wp_i18n_["__"])('RSS settings')
}, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
label: Object(external_wp_i18n_["__"])('Number of items'),
value: itemsToShow,
onChange: value => setAttributes({
itemsToShow: value
}),
min: DEFAULT_MIN_ITEMS,
max: DEFAULT_MAX_ITEMS,
required: true
}), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
label: Object(external_wp_i18n_["__"])('Display author'),
checked: displayAuthor,
onChange: toggleAttribute('displayAuthor')
}), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
label: Object(external_wp_i18n_["__"])('Display date'),
checked: displayDate,
onChange: toggleAttribute('displayDate')
}), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
label: Object(external_wp_i18n_["__"])('Display excerpt'),
checked: displayExcerpt,
onChange: toggleAttribute('displayExcerpt')
}), displayExcerpt && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
label: Object(external_wp_i18n_["__"])('Max number of words in excerpt'),
value: excerptLength,
onChange: value => setAttributes({
excerptLength: value
}),
min: 10,
max: 100,
required: true
}), blockLayout === 'grid' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
label: Object(external_wp_i18n_["__"])('Columns'),
value: columns,
onChange: value => setAttributes({
columns: value
}),
min: 2,
max: 6,
required: true
}))), Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, {
block: "core/rss",
attributes: attributes
}))));
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const rss_metadata = {
apiVersion: 2,
name: "core/rss",
title: "RSS",
category: "widgets",
description: "Display entries from any RSS or Atom feed.",
keywords: ["atom", "feed"],
textdomain: "default",
attributes: {
columns: {
type: "number",
"default": 2
},
blockLayout: {
type: "string",
"default": "list"
},
feedURL: {
type: "string",
"default": ""
},
itemsToShow: {
type: "number",
"default": 5
},
displayExcerpt: {
type: "boolean",
"default": false
},
displayAuthor: {
type: "boolean",
"default": false
},
displayDate: {
type: "boolean",
"default": false
},
excerptLength: {
type: "number",
"default": 55
}
},
supports: {
align: true,
html: false
},
editorStyle: "wp-block-rss-editor",
style: "wp-block-rss"
};
const {
name: rss_name
} = rss_metadata;
const rss_settings = {
icon: library_rss,
example: {
attributes: {
feedURL: 'https://wordpress.org'
}
},
edit: RSSEdit
};
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/icons.js
/**
* WordPress dependencies
*/
const buttonOnly = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "7",
y: "10",
width: "10",
height: "4",
rx: "1",
fill: "currentColor"
}));
const buttonOutside = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "4.75",
y: "15.25",
width: "6.5",
height: "9.5",
transform: "rotate(-90 4.75 15.25)",
stroke: "currentColor",
strokeWidth: "1.5",
fill: "none"
}), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "16",
y: "10",
width: "4",
height: "4",
rx: "1",
fill: "currentColor"
}));
const buttonInside = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "4.75",
y: "15.25",
width: "6.5",
height: "14.5",
transform: "rotate(-90 4.75 15.25)",
stroke: "currentColor",
strokeWidth: "1.5",
fill: "none"
}), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "14",
y: "10",
width: "4",
height: "4",
rx: "1",
fill: "currentColor"
}));
const noButton = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "4.75",
y: "15.25",
width: "6.5",
height: "14.5",
transform: "rotate(-90 4.75 15.25)",
stroke: "currentColor",
fill: "none",
strokeWidth: "1.5"
}));
const buttonWithIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "4.75",
y: "7.75",
width: "14.5",
height: "8.5",
rx: "1.25",
stroke: "currentColor",
fill: "none",
strokeWidth: "1.5"
}), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "8",
y: "11",
width: "8",
height: "2",
fill: "currentColor"
}));
const toggleLabel = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "4.75",
y: "17.25",
width: "5.5",
height: "14.5",
transform: "rotate(-90 4.75 17.25)",
stroke: "currentColor",
fill: "none",
strokeWidth: "1.5"
}), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], {
x: "4",
y: "7",
width: "10",
height: "2",
fill: "currentColor"
}));
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/utils.js
/**
* Constants
*/
const PC_WIDTH_DEFAULT = 50;
const PX_WIDTH_DEFAULT = 350;
const MIN_WIDTH = 220;
const MIN_WIDTH_UNIT = 'px';
/**
* Returns a boolean whether passed unit is percentage
*
* @param {string} unit Block width unit.
*
* @return {boolean} Whether unit is '%'.
*/
function utils_isPercentageUnit(unit) {
return unit === '%';
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/edit.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
// Used to calculate border radius adjustment to avoid "fat" corners when
// button is placed inside wrapper.
const DEFAULT_INNER_PADDING = 4;
function SearchEdit({
className,
attributes,
setAttributes,
toggleSelection,
isSelected
}) {
var _style$border;
const {
label,
showLabel,
placeholder,
width,
widthUnit,
align,
buttonText,
buttonPosition,
buttonUseIcon,
style
} = attributes;
const borderRadius = style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius;
const unitControlInstanceId = Object(external_wp_compose_["useInstanceId"])(external_wp_blockEditor_["__experimentalUnitControl"]);
const unitControlInputId = `wp-block-search__width-${unitControlInstanceId}`;
const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({
availableUnits: ['%', 'px'],
defaultValues: {
'%': PC_WIDTH_DEFAULT,
px: PX_WIDTH_DEFAULT
}
});
const getBlockClassNames = () => {
return classnames_default()(className, 'button-inside' === buttonPosition ? 'wp-block-search__button-inside' : undefined, 'button-outside' === buttonPosition ? 'wp-block-search__button-outside' : undefined, 'no-button' === buttonPosition ? 'wp-block-search__no-button' : undefined, 'button-only' === buttonPosition ? 'wp-block-search__button-only' : undefined, !buttonUseIcon && 'no-button' !== buttonPosition ? 'wp-block-search__text-button' : undefined, buttonUseIcon && 'no-button' !== buttonPosition ? 'wp-block-search__icon-button' : undefined);
};
const getButtonPositionIcon = () => {
switch (buttonPosition) {
case 'button-inside':
return buttonInside;
case 'button-outside':
return buttonOutside;
case 'no-button':
return noButton;
case 'button-only':
return buttonOnly;
}
};
const getResizableSides = () => {
if ('button-only' === buttonPosition) {
return {};
}
return {
right: align === 'right' ? false : true,
left: align === 'right' ? true : false
};
};
const renderTextField = () => {
return Object(external_wp_element_["createElement"])("input", {
className: "wp-block-search__input",
style: {
borderRadius
},
"aria-label": Object(external_wp_i18n_["__"])('Optional placeholder text') // We hide the placeholder field's placeholder when there is a value. This
// stops screen readers from reading the placeholder field's placeholder
// which is confusing.
,
placeholder: placeholder ? undefined : Object(external_wp_i18n_["__"])('Optional placeholder…'),
value: placeholder,
onChange: event => setAttributes({
placeholder: event.target.value
})
});
};
const renderButton = () => {
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, buttonUseIcon && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
icon: library_search["a" /* default */],
className: "wp-block-search__button",
style: {
borderRadius
}
}), !buttonUseIcon && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
className: "wp-block-search__button",
style: {
borderRadius
},
"aria-label": Object(external_wp_i18n_["__"])('Button text'),
placeholder: Object(external_wp_i18n_["__"])('Add button text…'),
withoutInteractiveFormatting: true,
value: buttonText,
onChange: html => setAttributes({
buttonText: html
})
}));
};
const controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
title: Object(external_wp_i18n_["__"])('Toggle search label'),
icon: toggleLabel,
onClick: () => {
setAttributes({
showLabel: !showLabel
});
},
className: showLabel ? 'is-pressed' : undefined
}), Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
icon: getButtonPositionIcon(),
label: Object(external_wp_i18n_["__"])('Change button position')
}, ({
onClose
}) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
className: "wp-block-search__button-position-menu"
}, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
icon: noButton,
onClick: () => {
setAttributes({
buttonPosition: 'no-button'
});
onClose();
}
}, Object(external_wp_i18n_["__"])('No Button')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
icon: buttonOutside,
onClick: () => {
setAttributes({
buttonPosition: 'button-outside'
});
onClose();
}
}, Object(external_wp_i18n_["__"])('Button Outside')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
icon: buttonInside,
onClick: () => {
setAttributes({
buttonPosition: 'button-inside'
});
onClose();
}
}, Object(external_wp_i18n_["__"])('Button Inside')))), 'no-button' !== buttonPosition && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
title: Object(external_wp_i18n_["__"])('Use button with icon'),
icon: buttonWithIcon,
onClick: () => {
setAttributes({
buttonUseIcon: !buttonUseIcon
});
},
className: buttonUseIcon ? 'is-pressed' : undefined
}))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
title: Object(external_wp_i18n_["__"])('Display Settings')
}, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], {
label: Object(external_wp_i18n_["__"])('Width'),
id: unitControlInputId
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalUnitControl"], {
id: unitControlInputId,
min: `${MIN_WIDTH}${MIN_WIDTH_UNIT}`,
onChange: newWidth => {
const filteredWidth = widthUnit === '%' && parseInt(newWidth, 10) > 100 ? 100 : newWidth;
setAttributes({
width: parseInt(filteredWidth, 10)
});
},
onUnitChange: newUnit => {
setAttributes({
width: '%' === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
widthUnit: newUnit
});
},
style: {
maxWidth: 80
},
value: `${width}${widthUnit}`,
unit: widthUnit,
units: units
}), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
className: "wp-block-search__components-button-group",
"aria-label": Object(external_wp_i18n_["__"])('Percentage Width')
}, [25, 50, 75, 100].map(widthValue => {
return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
key: widthValue,
isSmall: true,
isPrimary: `${widthValue}%` === `${width}${widthUnit}`,
onClick: () => setAttributes({
width: widthValue,
widthUnit: '%'
})
}, widthValue, "%");
}))))));
const getWrapperStyles = () => {
var _style$border2;
if ('button-inside' === buttonPosition && style !== null && style !== void 0 && (_style$border2 = style.border) !== null && _style$border2 !== void 0 && _style$border2.radius) {
var _style$border3;
// We have button inside wrapper and a border radius value to apply.
// Add default padding so we don't get "fat" corners.
const outerRadius = parseInt(style === null || style === void 0 ? void 0 : (_style$border3 = style.border) === null || _style$border3 === void 0 ? void 0 : _style$border3.radius, 10) + DEFAULT_INNER_PADDING;
return {
borderRadius: `${outerRadius}px`
};
}
return undefined;
};
const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
className: getBlockClassNames()
});
return Object(external_wp_element_["createElement"])("div", blockProps, controls, showLabel && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
className: "wp-block-search__label",
"aria-label": Object(external_wp_i18n_["__"])('Label text'),
placeholder: Object(external_wp_i18n_["__"])('Add label…'),
withoutInteractiveFormatting: true,
value: label,
onChange: html => setAttributes({
label: html
})
}), Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
size: {
width: `${width}${widthUnit}`
},
className: "wp-block-search__inside-wrapper",
style: getWrapperStyles(),
minWidth: MIN_WIDTH,
enable: getResizableSides(),
onResizeStart: (event, direction, elt) => {
setAttributes({
width: parseInt(elt.offsetWidth, 10),
widthUnit: 'px'
});
toggleSelection(false);
},
onResizeStop: (event, direction, elt, delta) => {
setAttributes({
width: parseInt(width + delta.width, 10)
});
toggleSelection(true);
},
showHandle: isSelected
}, ('button-inside' === buttonPosition || 'button-outside' === buttonPosition) && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, renderTextField(), renderButton()), 'button-only' === buttonPosition && renderButton(), 'no-button' === buttonPosition && renderTextField()));
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/variations.js
/**
* WordPress dependencies
*/
const search_variations_variations = [{
name: 'default',
isDefault: true,
attributes: {
buttonText: Object(external_wp_i18n_["__"])('Search'),
label: Object(external_wp_i18n_["__"])('Search')
}
}];
/* harmony default export */ var search_variations = (search_variations_variations);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const search_metadata = {
apiVersion: 2,
name: "core/search",
title: "Search",
category: "widgets",
description: "Help visitors find your content.",
keywords: ["find"],
textdomain: "default",
attributes: {
label: {
type: "string",
__experimentalRole: "content"
},
showLabel: {
type: "boolean",
"default": true
},
placeholder: {
type: "string",
"default": "",
__experimentalRole: "content"
},
width: {
type: "number"
},
widthUnit: {
type: "string"
},
buttonText: {
type: "string",
__experimentalRole: "content"
},
buttonPosition: {
type: "string",
"default": "button-outside"
},
buttonUseIcon: {
type: "boolean",
"default": false
}
},
supports: {
align: ["left", "center", "right"],
__experimentalBorder: {
radius: true,
__experimentalSkipSerialization: true
},
html: false
},
editorStyle: "wp-block-search-editor",
style: "wp-block-search"
};
const {
name: search_name
} = search_metadata;
const search_settings = {
icon: library_search["a" /* default */],
example: {},
variations: search_variations,
edit: SearchEdit
};
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/group.js
/**
* WordPress dependencies
*/
const group = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg"
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"
}));
/* harmony default export */ var library_group = (group);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/deprecated.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
const migrateAttributes = attributes => {
if (!attributes.tagName) {
attributes = { ...attributes,
tagName: 'div'
};
}
if (!attributes.customTextColor && !attributes.customBackgroundColor) {
return attributes;
}
const style = {
color: {}
};
if (attributes.customTextColor) {
style.color.text = attributes.customTextColor;
}
if (attributes.customBackgroundColor) {
style.color.background = attributes.customBackgroundColor;
}
return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor']),
style
};
};
const group_deprecated_deprecated = [// Version of the block with the double div.
{
attributes: {
tagName: {
type: 'string',
default: 'div'
},
templateLock: {
type: 'string'
}
},
supports: {
align: ['wide', 'full'],
anchor: true,
color: {
gradients: true,
link: true
},
spacing: {
padding: true
},
__experimentalBorder: {
radius: true
}
},
save({
attributes
}) {
const {
tagName: Tag
} = attributes;
return Object(external_wp_element_["createElement"])(Tag, external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("div", {
className: "wp-block-group__inner-container"
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
}
}, // Version of the block without global styles support
{
attributes: {
backgroundColor: {
type: 'string'
},
customBackgroundColor: {
type: 'string'
},
textColor: {
type: 'string'
},
customTextColor: {
type: 'string'
}
},
supports: {
align: ['wide', 'full'],
anchor: true,
html: false
},
migrate: migrateAttributes,
save({
attributes
}) {
const {
backgroundColor,
customBackgroundColor,
textColor,
customTextColor
} = attributes;
const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
const className = classnames_default()(backgroundClass, textClass, {
'has-text-color': textColor || customTextColor,
'has-background': backgroundColor || customBackgroundColor
});
const styles = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
return Object(external_wp_element_["createElement"])("div", {
className: className,
style: styles
}, Object(external_wp_element_["createElement"])("div", {
className: "wp-block-group__inner-container"
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
}
}, // Version of the group block with a bug that made text color class not applied.
{
attributes: {
backgroundColor: {
type: 'string'
},
customBackgroundColor: {
type: 'string'
},
textColor: {
type: 'string'
},
customTextColor: {
type: 'string'
}
},
migrate: migrateAttributes,
supports: {
align: ['wide', 'full'],
anchor: true,
html: false
},
save({
attributes
}) {
const {
backgroundColor,
customBackgroundColor,
textColor,
customTextColor
} = attributes;
const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
const className = classnames_default()(backgroundClass, {
'has-text-color': textColor || customTextColor,
'has-background': backgroundColor || customBackgroundColor
});
const styles = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor,
color: textClass ? undefined : customTextColor
};
return Object(external_wp_element_["createElement"])("div", {
className: className,
style: styles
}, Object(external_wp_element_["createElement"])("div", {
className: "wp-block-group__inner-container"
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)));
}
}, // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
{
attributes: {
backgroundColor: {
type: 'string'
},
customBackgroundColor: {
type: 'string'
}
},
supports: {
align: ['wide', 'full'],
anchor: true,
html: false
},
migrate: migrateAttributes,
save({
attributes
}) {
const {
backgroundColor,
customBackgroundColor
} = attributes;
const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
const className = classnames_default()(backgroundClass, {
'has-background': backgroundColor || customBackgroundColor
});
const styles = {
backgroundColor: backgroundClass ? undefined : customBackgroundColor
};
return Object(external_wp_element_["createElement"])("div", {
className: className,
style: styles
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
}
}];
/* harmony default export */ var group_deprecated = (group_deprecated_deprecated);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/edit.js
/**
* WordPress dependencies
*/
function GroupEdit({
attributes,
setAttributes,
clientId
}) {
const {
hasInnerBlocks,
themeSupportsLayout
} = Object(external_wp_data_["useSelect"])(select => {
var _getSettings;
const {
getBlock,
getSettings
} = select(external_wp_blockEditor_["store"]);
const block = getBlock(clientId);
return {
hasInnerBlocks: !!(block && block.innerBlocks.length),
themeSupportsLayout: (_getSettings = getSettings()) === null || _getSettings === void 0 ? void 0 : _getSettings.supportsLayout
};
}, [clientId]);
const defaultLayout = Object(external_wp_blockEditor_["useSetting"])('layout') || {};
const {
tagName: TagName = 'div',
templateLock,
layout = {}
} = attributes;
const usedLayout = !!layout && layout.inherit ? defaultLayout : layout;
const {
contentSize,
wideSize
} = usedLayout;
const _layout = Object(external_wp_element_["useMemo"])(() => {
if (themeSupportsLayout) {
const alignments = contentSize || wideSize ? ['wide', 'full', 'left', 'center', 'right'] : ['left', 'center', 'right'];
return {
type: 'default',
// Find a way to inject this in the support flag code (hooks).
alignments
};
}
return undefined;
}, [themeSupportsLayout, contentSize, wideSize]);
const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
const innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(themeSupportsLayout ? blockProps : {
className: 'wp-block-group__inner-container'
}, {
templateLock,
renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender,
__experimentalLayout: _layout
});
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
label: Object(external_wp_i18n_["__"])('HTML element'),
options: [{
label: Object(external_wp_i18n_["__"])('Default ()'),
value: 'div'
}, {
label: '
',
value: 'header'
}, {
label: '',
value: 'main'
}, {
label: '',
value: 'section'
}, {
label: '',
value: 'article'
}, {
label: '