Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: block-editor.js
className: !hasSelection ? 'block-editor-block-breadcrumb__current' : undefined,
[39000] Fix | Delete
"aria-current": !hasSelection ? 'true' : undefined,
[39001] Fix | Delete
children: [hasSelection && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[39002] Fix | Delete
className: "block-editor-block-breadcrumb__button",
[39003] Fix | Delete
variant: "tertiary",
[39004] Fix | Delete
onClick: clearSelectedBlock,
[39005] Fix | Delete
children: rootLabel
[39006] Fix | Delete
}), !hasSelection && rootLabel, !!clientId && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
[39007] Fix | Delete
icon: chevron_right_small,
[39008] Fix | Delete
className: "block-editor-block-breadcrumb__separator"
[39009] Fix | Delete
})]
[39010] Fix | Delete
}), parents.map(parentClientId => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
[39011] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[39012] Fix | Delete
className: "block-editor-block-breadcrumb__button",
[39013] Fix | Delete
variant: "tertiary",
[39014] Fix | Delete
onClick: () => selectBlock(parentClientId),
[39015] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockTitle, {
[39016] Fix | Delete
clientId: parentClientId,
[39017] Fix | Delete
maximumLength: 35
[39018] Fix | Delete
})
[39019] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
[39020] Fix | Delete
icon: chevron_right_small,
[39021] Fix | Delete
className: "block-editor-block-breadcrumb__separator"
[39022] Fix | Delete
})]
[39023] Fix | Delete
}, parentClientId)), !!clientId && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
[39024] Fix | Delete
className: "block-editor-block-breadcrumb__current",
[39025] Fix | Delete
"aria-current": "true",
[39026] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockTitle, {
[39027] Fix | Delete
clientId: clientId,
[39028] Fix | Delete
maximumLength: 35
[39029] Fix | Delete
})
[39030] Fix | Delete
})]
[39031] Fix | Delete
})
[39032] Fix | Delete
/* eslint-enable jsx-a11y/no-redundant-roles */;
[39033] Fix | Delete
}
[39034] Fix | Delete
/* harmony default export */ const block_breadcrumb = (BlockBreadcrumb);
[39035] Fix | Delete
[39036] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-content-overlay/index.js
[39037] Fix | Delete
/**
[39038] Fix | Delete
* WordPress dependencies
[39039] Fix | Delete
*/
[39040] Fix | Delete
[39041] Fix | Delete
[39042] Fix | Delete
/**
[39043] Fix | Delete
* Internal dependencies
[39044] Fix | Delete
*/
[39045] Fix | Delete
[39046] Fix | Delete
function useBlockOverlayActive(clientId) {
[39047] Fix | Delete
return (0,external_wp_data_namespaceObject.useSelect)(select => {
[39048] Fix | Delete
const {
[39049] Fix | Delete
__unstableHasActiveBlockOverlayActive
[39050] Fix | Delete
} = select(store);
[39051] Fix | Delete
return __unstableHasActiveBlockOverlayActive(clientId);
[39052] Fix | Delete
}, [clientId]);
[39053] Fix | Delete
}
[39054] Fix | Delete
[39055] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-context/index.js
[39056] Fix | Delete
/**
[39057] Fix | Delete
* WordPress dependencies
[39058] Fix | Delete
*/
[39059] Fix | Delete
[39060] Fix | Delete
[39061] Fix | Delete
/** @typedef {import('react').ReactNode} ReactNode */
[39062] Fix | Delete
[39063] Fix | Delete
/**
[39064] Fix | Delete
* @typedef BlockContextProviderProps
[39065] Fix | Delete
*
[39066] Fix | Delete
* @property {Record<string,*>} value Context value to merge with current
[39067] Fix | Delete
* value.
[39068] Fix | Delete
* @property {ReactNode} children Component children.
[39069] Fix | Delete
*/
[39070] Fix | Delete
[39071] Fix | Delete
/** @type {import('react').Context<Record<string,*>>} */
[39072] Fix | Delete
[39073] Fix | Delete
const block_context_Context = (0,external_wp_element_namespaceObject.createContext)({});
[39074] Fix | Delete
[39075] Fix | Delete
/**
[39076] Fix | Delete
* Component which merges passed value with current consumed block context.
[39077] Fix | Delete
*
[39078] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-context/README.md
[39079] Fix | Delete
*
[39080] Fix | Delete
* @param {BlockContextProviderProps} props
[39081] Fix | Delete
*/
[39082] Fix | Delete
function BlockContextProvider({
[39083] Fix | Delete
value,
[39084] Fix | Delete
children
[39085] Fix | Delete
}) {
[39086] Fix | Delete
const context = (0,external_wp_element_namespaceObject.useContext)(block_context_Context);
[39087] Fix | Delete
const nextValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({
[39088] Fix | Delete
...context,
[39089] Fix | Delete
...value
[39090] Fix | Delete
}), [context, value]);
[39091] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_context_Context.Provider, {
[39092] Fix | Delete
value: nextValue,
[39093] Fix | Delete
children: children
[39094] Fix | Delete
});
[39095] Fix | Delete
}
[39096] Fix | Delete
/* harmony default export */ const block_context = (block_context_Context);
[39097] Fix | Delete
[39098] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/edit.js
[39099] Fix | Delete
/**
[39100] Fix | Delete
* External dependencies
[39101] Fix | Delete
*/
[39102] Fix | Delete
[39103] Fix | Delete
[39104] Fix | Delete
/**
[39105] Fix | Delete
* WordPress dependencies
[39106] Fix | Delete
*/
[39107] Fix | Delete
[39108] Fix | Delete
[39109] Fix | Delete
[39110] Fix | Delete
[39111] Fix | Delete
/**
[39112] Fix | Delete
* Internal dependencies
[39113] Fix | Delete
*/
[39114] Fix | Delete
[39115] Fix | Delete
[39116] Fix | Delete
/**
[39117] Fix | Delete
* Default value used for blocks which do not define their own context needs,
[39118] Fix | Delete
* used to guarantee that a block's `context` prop will always be an object. It
[39119] Fix | Delete
* is assigned as a constant since it is always expected to be an empty object,
[39120] Fix | Delete
* and in order to avoid unnecessary React reconciliations of a changing object.
[39121] Fix | Delete
*
[39122] Fix | Delete
* @type {{}}
[39123] Fix | Delete
*/
[39124] Fix | Delete
[39125] Fix | Delete
const DEFAULT_BLOCK_CONTEXT = {};
[39126] Fix | Delete
const Edit = props => {
[39127] Fix | Delete
const {
[39128] Fix | Delete
name
[39129] Fix | Delete
} = props;
[39130] Fix | Delete
const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
[39131] Fix | Delete
if (!blockType) {
[39132] Fix | Delete
return null;
[39133] Fix | Delete
}
[39134] Fix | Delete
[39135] Fix | Delete
// `edit` and `save` are functions or components describing the markup
[39136] Fix | Delete
// with which a block is displayed. If `blockType` is valid, assign
[39137] Fix | Delete
// them preferentially as the render value for the block.
[39138] Fix | Delete
const Component = blockType.edit || blockType.save;
[39139] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
[39140] Fix | Delete
...props
[39141] Fix | Delete
});
[39142] Fix | Delete
};
[39143] Fix | Delete
const EditWithFilters = (0,external_wp_components_namespaceObject.withFilters)('editor.BlockEdit')(Edit);
[39144] Fix | Delete
const EditWithGeneratedProps = props => {
[39145] Fix | Delete
const {
[39146] Fix | Delete
attributes = {},
[39147] Fix | Delete
name
[39148] Fix | Delete
} = props;
[39149] Fix | Delete
const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
[39150] Fix | Delete
const blockContext = (0,external_wp_element_namespaceObject.useContext)(block_context);
[39151] Fix | Delete
[39152] Fix | Delete
// Assign context values using the block type's declared context needs.
[39153] Fix | Delete
const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
[39154] Fix | Delete
return blockType && blockType.usesContext ? Object.fromEntries(Object.entries(blockContext).filter(([key]) => blockType.usesContext.includes(key))) : DEFAULT_BLOCK_CONTEXT;
[39155] Fix | Delete
}, [blockType, blockContext]);
[39156] Fix | Delete
if (!blockType) {
[39157] Fix | Delete
return null;
[39158] Fix | Delete
}
[39159] Fix | Delete
if (blockType.apiVersion > 1) {
[39160] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditWithFilters, {
[39161] Fix | Delete
...props,
[39162] Fix | Delete
context: context
[39163] Fix | Delete
});
[39164] Fix | Delete
}
[39165] Fix | Delete
[39166] Fix | Delete
// Generate a class name for the block's editable form.
[39167] Fix | Delete
const generatedClassName = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'className', true) ? (0,external_wp_blocks_namespaceObject.getBlockDefaultClassName)(name) : null;
[39168] Fix | Delete
const className = dist_clsx(generatedClassName, attributes.className, props.className);
[39169] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditWithFilters, {
[39170] Fix | Delete
...props,
[39171] Fix | Delete
context: context,
[39172] Fix | Delete
className: className
[39173] Fix | Delete
});
[39174] Fix | Delete
};
[39175] Fix | Delete
/* harmony default export */ const block_edit_edit = (EditWithGeneratedProps);
[39176] Fix | Delete
[39177] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
[39178] Fix | Delete
/**
[39179] Fix | Delete
* WordPress dependencies
[39180] Fix | Delete
*/
[39181] Fix | Delete
[39182] Fix | Delete
[39183] Fix | Delete
const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[39184] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[39185] Fix | Delete
viewBox: "0 0 24 24",
[39186] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[39187] Fix | Delete
d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
[39188] Fix | Delete
})
[39189] Fix | Delete
});
[39190] Fix | Delete
/* harmony default export */ const more_vertical = (moreVertical);
[39191] Fix | Delete
[39192] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/warning/index.js
[39193] Fix | Delete
/**
[39194] Fix | Delete
* External dependencies
[39195] Fix | Delete
*/
[39196] Fix | Delete
[39197] Fix | Delete
[39198] Fix | Delete
/**
[39199] Fix | Delete
* WordPress dependencies
[39200] Fix | Delete
*/
[39201] Fix | Delete
[39202] Fix | Delete
[39203] Fix | Delete
[39204] Fix | Delete
[39205] Fix | Delete
[39206] Fix | Delete
[39207] Fix | Delete
function Warning({
[39208] Fix | Delete
className,
[39209] Fix | Delete
actions,
[39210] Fix | Delete
children,
[39211] Fix | Delete
secondaryActions
[39212] Fix | Delete
}) {
[39213] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[39214] Fix | Delete
style: {
[39215] Fix | Delete
display: 'contents',
[39216] Fix | Delete
all: 'initial'
[39217] Fix | Delete
},
[39218] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[39219] Fix | Delete
className: dist_clsx(className, 'block-editor-warning'),
[39220] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[39221] Fix | Delete
className: "block-editor-warning__contents",
[39222] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[39223] Fix | Delete
className: "block-editor-warning__message",
[39224] Fix | Delete
children: children
[39225] Fix | Delete
}), (external_wp_element_namespaceObject.Children.count(actions) > 0 || secondaryActions) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[39226] Fix | Delete
className: "block-editor-warning__actions",
[39227] Fix | Delete
children: [external_wp_element_namespaceObject.Children.count(actions) > 0 && external_wp_element_namespaceObject.Children.map(actions, (action, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[39228] Fix | Delete
className: "block-editor-warning__action",
[39229] Fix | Delete
children: action
[39230] Fix | Delete
}, i)), secondaryActions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
[39231] Fix | Delete
className: "block-editor-warning__secondary",
[39232] Fix | Delete
icon: more_vertical,
[39233] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('More options'),
[39234] Fix | Delete
popoverProps: {
[39235] Fix | Delete
position: 'bottom left',
[39236] Fix | Delete
className: 'block-editor-warning__dropdown'
[39237] Fix | Delete
},
[39238] Fix | Delete
noIcons: true,
[39239] Fix | Delete
children: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
[39240] Fix | Delete
children: secondaryActions.map((item, pos) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
[39241] Fix | Delete
onClick: item.onClick,
[39242] Fix | Delete
children: item.title
[39243] Fix | Delete
}, pos))
[39244] Fix | Delete
})
[39245] Fix | Delete
})]
[39246] Fix | Delete
})]
[39247] Fix | Delete
})
[39248] Fix | Delete
})
[39249] Fix | Delete
});
[39250] Fix | Delete
}
[39251] Fix | Delete
[39252] Fix | Delete
/**
[39253] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md
[39254] Fix | Delete
*/
[39255] Fix | Delete
/* harmony default export */ const warning = (Warning);
[39256] Fix | Delete
[39257] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/multiple-usage-warning.js
[39258] Fix | Delete
/**
[39259] Fix | Delete
* WordPress dependencies
[39260] Fix | Delete
*/
[39261] Fix | Delete
[39262] Fix | Delete
[39263] Fix | Delete
[39264] Fix | Delete
[39265] Fix | Delete
[39266] Fix | Delete
/**
[39267] Fix | Delete
* Internal dependencies
[39268] Fix | Delete
*/
[39269] Fix | Delete
[39270] Fix | Delete
[39271] Fix | Delete
[39272] Fix | Delete
[39273] Fix | Delete
function MultipleUsageWarning({
[39274] Fix | Delete
originalBlockClientId,
[39275] Fix | Delete
name,
[39276] Fix | Delete
onReplace
[39277] Fix | Delete
}) {
[39278] Fix | Delete
const {
[39279] Fix | Delete
selectBlock
[39280] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[39281] Fix | Delete
const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
[39282] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(warning, {
[39283] Fix | Delete
actions: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[39284] Fix | Delete
variant: "secondary",
[39285] Fix | Delete
onClick: () => selectBlock(originalBlockClientId),
[39286] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Find original')
[39287] Fix | Delete
}, "find-original"), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[39288] Fix | Delete
variant: "secondary",
[39289] Fix | Delete
onClick: () => onReplace([]),
[39290] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Remove')
[39291] Fix | Delete
}, "remove")],
[39292] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("strong", {
[39293] Fix | Delete
children: [blockType?.title, ": "]
[39294] Fix | Delete
}), (0,external_wp_i18n_namespaceObject.__)('This block can only be used once.')]
[39295] Fix | Delete
});
[39296] Fix | Delete
}
[39297] Fix | Delete
[39298] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/private-block-context.js
[39299] Fix | Delete
/**
[39300] Fix | Delete
* WordPress dependencies
[39301] Fix | Delete
*/
[39302] Fix | Delete
[39303] Fix | Delete
const PrivateBlockContext = (0,external_wp_element_namespaceObject.createContext)({});
[39304] Fix | Delete
[39305] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/index.js
[39306] Fix | Delete
/**
[39307] Fix | Delete
* WordPress dependencies
[39308] Fix | Delete
*/
[39309] Fix | Delete
[39310] Fix | Delete
[39311] Fix | Delete
[39312] Fix | Delete
/**
[39313] Fix | Delete
* Internal dependencies
[39314] Fix | Delete
*/
[39315] Fix | Delete
[39316] Fix | Delete
[39317] Fix | Delete
[39318] Fix | Delete
[39319] Fix | Delete
[39320] Fix | Delete
/**
[39321] Fix | Delete
* The `useBlockEditContext` hook provides information about the block this hook is being used in.
[39322] Fix | Delete
* It returns an object with the `name`, `isSelected` state, and the `clientId` of the block.
[39323] Fix | Delete
* It is useful if you want to create custom hooks that need access to the current blocks clientId
[39324] Fix | Delete
* but don't want to rely on the data getting passed in as a parameter.
[39325] Fix | Delete
*
[39326] Fix | Delete
* @return {Object} Block edit context
[39327] Fix | Delete
*/
[39328] Fix | Delete
[39329] Fix | Delete
[39330] Fix | Delete
[39331] Fix | Delete
function BlockEdit({
[39332] Fix | Delete
mayDisplayControls,
[39333] Fix | Delete
mayDisplayParentControls,
[39334] Fix | Delete
blockEditingMode,
[39335] Fix | Delete
isPreviewMode,
[39336] Fix | Delete
// The remaining props are passed through the BlockEdit filters and are thus
[39337] Fix | Delete
// public API!
[39338] Fix | Delete
...props
[39339] Fix | Delete
}) {
[39340] Fix | Delete
const {
[39341] Fix | Delete
name,
[39342] Fix | Delete
isSelected,
[39343] Fix | Delete
clientId,
[39344] Fix | Delete
attributes = {},
[39345] Fix | Delete
__unstableLayoutClassNames
[39346] Fix | Delete
} = props;
[39347] Fix | Delete
const {
[39348] Fix | Delete
layout = null,
[39349] Fix | Delete
metadata = {}
[39350] Fix | Delete
} = attributes;
[39351] Fix | Delete
const {
[39352] Fix | Delete
bindings
[39353] Fix | Delete
} = metadata;
[39354] Fix | Delete
const layoutSupport = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, 'layout', false) || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, '__experimentalLayout', false);
[39355] Fix | Delete
const {
[39356] Fix | Delete
originalBlockClientId
[39357] Fix | Delete
} = (0,external_wp_element_namespaceObject.useContext)(PrivateBlockContext);
[39358] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Provider
[39359] Fix | Delete
// It is important to return the same object if props haven't
[39360] Fix | Delete
// changed to avoid unnecessary rerenders.
[39361] Fix | Delete
// See https://reactjs.org/docs/context.html#caveats.
[39362] Fix | Delete
, {
[39363] Fix | Delete
value: (0,external_wp_element_namespaceObject.useMemo)(() => ({
[39364] Fix | Delete
name,
[39365] Fix | Delete
isSelected,
[39366] Fix | Delete
clientId,
[39367] Fix | Delete
layout: layoutSupport ? layout : null,
[39368] Fix | Delete
__unstableLayoutClassNames,
[39369] Fix | Delete
// We use symbols in favour of an __unstable prefix to avoid
[39370] Fix | Delete
// usage outside of the package (this context is exposed).
[39371] Fix | Delete
[mayDisplayControlsKey]: mayDisplayControls,
[39372] Fix | Delete
[mayDisplayParentControlsKey]: mayDisplayParentControls,
[39373] Fix | Delete
[blockEditingModeKey]: blockEditingMode,
[39374] Fix | Delete
[blockBindingsKey]: bindings,
[39375] Fix | Delete
[isPreviewModeKey]: isPreviewMode
[39376] Fix | Delete
}), [name, isSelected, clientId, layoutSupport, layout, __unstableLayoutClassNames, mayDisplayControls, mayDisplayParentControls, blockEditingMode, bindings, isPreviewMode]),
[39377] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_edit_edit, {
[39378] Fix | Delete
...props
[39379] Fix | Delete
}), originalBlockClientId && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MultipleUsageWarning, {
[39380] Fix | Delete
originalBlockClientId: originalBlockClientId,
[39381] Fix | Delete
name: name,
[39382] Fix | Delete
onReplace: props.onReplace
[39383] Fix | Delete
})]
[39384] Fix | Delete
});
[39385] Fix | Delete
}
[39386] Fix | Delete
[39387] Fix | Delete
// EXTERNAL MODULE: ./node_modules/diff/lib/diff/character.js
[39388] Fix | Delete
var character = __webpack_require__(8021);
[39389] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-compare/block-view.js
[39390] Fix | Delete
/**
[39391] Fix | Delete
* WordPress dependencies
[39392] Fix | Delete
*/
[39393] Fix | Delete
[39394] Fix | Delete
[39395] Fix | Delete
[39396] Fix | Delete
[39397] Fix | Delete
[39398] Fix | Delete
function BlockView({
[39399] Fix | Delete
title,
[39400] Fix | Delete
rawContent,
[39401] Fix | Delete
renderedContent,
[39402] Fix | Delete
action,
[39403] Fix | Delete
actionText,
[39404] Fix | Delete
className
[39405] Fix | Delete
}) {
[39406] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[39407] Fix | Delete
className: className,
[39408] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[39409] Fix | Delete
className: "block-editor-block-compare__content",
[39410] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
[39411] Fix | Delete
className: "block-editor-block-compare__heading",
[39412] Fix | Delete
children: title
[39413] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[39414] Fix | Delete
className: "block-editor-block-compare__html",
[39415] Fix | Delete
children: rawContent
[39416] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[39417] Fix | Delete
className: "block-editor-block-compare__preview edit-post-visual-editor",
[39418] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, {
[39419] Fix | Delete
children: (0,external_wp_dom_namespaceObject.safeHTML)(renderedContent)
[39420] Fix | Delete
})
[39421] Fix | Delete
})]
[39422] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[39423] Fix | Delete
className: "block-editor-block-compare__action",
[39424] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[39425] Fix | Delete
variant: "secondary",
[39426] Fix | Delete
tabIndex: "0",
[39427] Fix | Delete
onClick: action,
[39428] Fix | Delete
children: actionText
[39429] Fix | Delete
})
[39430] Fix | Delete
})]
[39431] Fix | Delete
});
[39432] Fix | Delete
}
[39433] Fix | Delete
[39434] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-compare/index.js
[39435] Fix | Delete
/**
[39436] Fix | Delete
* External dependencies
[39437] Fix | Delete
*/
[39438] Fix | Delete
[39439] Fix | Delete
// diff doesn't tree-shake correctly, so we import from the individual
[39440] Fix | Delete
// module here, to avoid including too much of the library
[39441] Fix | Delete
[39442] Fix | Delete
[39443] Fix | Delete
/**
[39444] Fix | Delete
* WordPress dependencies
[39445] Fix | Delete
*/
[39446] Fix | Delete
[39447] Fix | Delete
[39448] Fix | Delete
[39449] Fix | Delete
/**
[39450] Fix | Delete
* Internal dependencies
[39451] Fix | Delete
*/
[39452] Fix | Delete
[39453] Fix | Delete
[39454] Fix | Delete
[39455] Fix | Delete
function BlockCompare({
[39456] Fix | Delete
block,
[39457] Fix | Delete
onKeep,
[39458] Fix | Delete
onConvert,
[39459] Fix | Delete
convertor,
[39460] Fix | Delete
convertButtonText
[39461] Fix | Delete
}) {
[39462] Fix | Delete
function getDifference(originalContent, newContent) {
[39463] Fix | Delete
const difference = (0,character/* diffChars */.JJ)(originalContent, newContent);
[39464] Fix | Delete
return difference.map((item, pos) => {
[39465] Fix | Delete
const classes = dist_clsx({
[39466] Fix | Delete
'block-editor-block-compare__added': item.added,
[39467] Fix | Delete
'block-editor-block-compare__removed': item.removed
[39468] Fix | Delete
});
[39469] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[39470] Fix | Delete
className: classes,
[39471] Fix | Delete
children: item.value
[39472] Fix | Delete
}, pos);
[39473] Fix | Delete
});
[39474] Fix | Delete
}
[39475] Fix | Delete
function getConvertedContent(convertedBlock) {
[39476] Fix | Delete
// The convertor may return an array of items or a single item.
[39477] Fix | Delete
const newBlocks = Array.isArray(convertedBlock) ? convertedBlock : [convertedBlock];
[39478] Fix | Delete
[39479] Fix | Delete
// Get converted block details.
[39480] Fix | Delete
const newContent = newBlocks.map(item => (0,external_wp_blocks_namespaceObject.getSaveContent)(item.name, item.attributes, item.innerBlocks));
[39481] Fix | Delete
return newContent.join('');
[39482] Fix | Delete
}
[39483] Fix | Delete
const converted = getConvertedContent(convertor(block));
[39484] Fix | Delete
const difference = getDifference(block.originalContent, converted);
[39485] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[39486] Fix | Delete
className: "block-editor-block-compare__wrapper",
[39487] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockView, {
[39488] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Current'),
[39489] Fix | Delete
className: "block-editor-block-compare__current",
[39490] Fix | Delete
action: onKeep,
[39491] Fix | Delete
actionText: (0,external_wp_i18n_namespaceObject.__)('Convert to HTML'),
[39492] Fix | Delete
rawContent: block.originalContent,
[39493] Fix | Delete
renderedContent: block.originalContent
[39494] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockView, {
[39495] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('After Conversion'),
[39496] Fix | Delete
className: "block-editor-block-compare__converted",
[39497] Fix | Delete
action: onConvert,
[39498] Fix | Delete
actionText: convertButtonText,
[39499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function