mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Grouped Backports to the 6.2 branch.
- Editor: Fix Path Traversal issue on Windows in Template-Part Block. - Editor: Sanitize Template Part HTML tag on save. - HTML API: Run URL attributes through `esc_url()`. Merges [58470], [58471], [58472] and [58473] to the 6.2 branch. Props xknown, peterwilsoncc, jorbin, bernhard-reiter, azaozz, dmsnell, gziolo. Built from https://develop.svn.wordpress.org/branches/6.2@58479 git-svn-id: http://core.svn.wordpress.org/branches/6.2@57928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cafed0a790
commit
0d21ceb669
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -839,7 +839,7 @@ function _filter_block_content_callback( $matches ) {
|
||||
* @return array The filtered and sanitized block object result.
|
||||
*/
|
||||
function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) {
|
||||
$block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols );
|
||||
$block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols, $block );
|
||||
|
||||
if ( is_array( $block['innerBlocks'] ) ) {
|
||||
foreach ( $block['innerBlocks'] as $i => $inner_block ) {
|
||||
@ -855,6 +855,7 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array()
|
||||
* non-allowable HTML.
|
||||
*
|
||||
* @since 5.3.1
|
||||
* @since 6.5.5 Added the `$block_context` parameter.
|
||||
*
|
||||
* @param string[]|string $value The attribute value to filter.
|
||||
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
|
||||
@ -862,13 +863,18 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array()
|
||||
* for the list of accepted context names.
|
||||
* @param string[] $allowed_protocols Optional. Array of allowed URL protocols.
|
||||
* Defaults to the result of wp_allowed_protocols().
|
||||
* @param array $block_context Optional. The block the attribute belongs to, in parsed block array format.
|
||||
* @return string[]|string The filtered and sanitized result.
|
||||
*/
|
||||
function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array() ) {
|
||||
function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array(), $block_context = null ) {
|
||||
if ( is_array( $value ) ) {
|
||||
foreach ( $value as $key => $inner_value ) {
|
||||
$filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols );
|
||||
$filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols );
|
||||
$filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols, $block_context );
|
||||
$filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols, $block_context );
|
||||
|
||||
if ( isset( $block_context['blockName'] ) && 'core/template-part' === $block_context['blockName'] ) {
|
||||
$filtered_value = filter_block_core_template_part_attributes( $filtered_value, $filtered_key, $allowed_html );
|
||||
}
|
||||
|
||||
if ( $filtered_key !== $key ) {
|
||||
unset( $value[ $key ] );
|
||||
@ -883,6 +889,28 @@ function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = ar
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitizes the value of the Template Part block's `tagName` attribute.
|
||||
*
|
||||
* @since 6.5.5
|
||||
*
|
||||
* @param string $attribute_value The attribute value to filter.
|
||||
* @param string $attribute_name The attribute name.
|
||||
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
|
||||
* or a context name such as 'post'. See wp_kses_allowed_html()
|
||||
* for the list of accepted context names.
|
||||
* @return string The sanitized attribute value.
|
||||
*/
|
||||
function filter_block_core_template_part_attributes( $attribute_value, $attribute_name, $allowed_html ) {
|
||||
if ( empty( $attribute_value ) || 'tagName' !== $attribute_name ) {
|
||||
return $attribute_value;
|
||||
}
|
||||
if ( ! is_array( $allowed_html ) ) {
|
||||
$allowed_html = wp_kses_allowed_html( $allowed_html );
|
||||
}
|
||||
return isset( $allowed_html[ $attribute_value ] ) ? $attribute_value : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses blocks out of a content string, and renders those appropriate for the excerpt.
|
||||
*
|
||||
|
@ -155,7 +155,7 @@ function render_block_core_template_part( $attributes ) {
|
||||
global $wp_embed;
|
||||
$content = $wp_embed->autoembed( $content );
|
||||
|
||||
if ( empty( $attributes['tagName'] ) ) {
|
||||
if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) {
|
||||
$area_tag = 'div';
|
||||
if ( $area_definition && isset( $area_definition['area_tag'] ) ) {
|
||||
$area_tag = $area_definition['area_tag'];
|
||||
|
@ -4720,12 +4720,13 @@ EOF;
|
||||
* Escapes an HTML tag name.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @since 6.5.5 Allow hyphens in tag names (i.e. custom elements).
|
||||
*
|
||||
* @param string $tag_name
|
||||
* @return string
|
||||
*/
|
||||
function tag_escape( $tag_name ) {
|
||||
$safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) );
|
||||
$safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) );
|
||||
/**
|
||||
* Filters a string cleaned and escaped for output as an HTML tag.
|
||||
*
|
||||
|
@ -6001,6 +6001,9 @@ function validate_file( $file, $allowed_files = array() ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Normalize path for Windows servers
|
||||
$file = wp_normalize_path( $file );
|
||||
|
||||
// `../` on its own is not allowed:
|
||||
if ( '../' === $file ) {
|
||||
return 1;
|
||||
|
@ -1867,7 +1867,14 @@ class WP_HTML_Tag_Processor {
|
||||
if ( true === $value ) {
|
||||
$updated_attribute = $name;
|
||||
} else {
|
||||
$escaped_new_value = esc_attr( $value );
|
||||
$comparable_name = strtolower( $name );
|
||||
|
||||
/*
|
||||
* Escape URL attributes.
|
||||
*
|
||||
* @see https://html.spec.whatwg.org/#attributes-3
|
||||
*/
|
||||
$escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes() ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$updated_attribute = "{$name}=\"{$escaped_new_value}\"";
|
||||
}
|
||||
|
||||
|
18
wp-includes/js/dist/block-directory.js
vendored
18
wp-includes/js/dist/block-directory.js
vendored
@ -1220,19 +1220,15 @@ var external_wp_components_namespaceObject = window["wp"]["components"];
|
||||
var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","htmlEntities"]
|
||||
var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
|
||||
|
2
wp-includes/js/dist/block-directory.min.js
vendored
2
wp-includes/js/dist/block-directory.min.js
vendored
File diff suppressed because one or more lines are too long
23
wp-includes/js/dist/block-editor.js
vendored
23
wp-includes/js/dist/block-editor.js
vendored
@ -13138,7 +13138,10 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
||||
if (typeof window !== 'undefined' && obj === window) {
|
||||
return '{ [object Window] }';
|
||||
}
|
||||
if (obj === __webpack_require__.g) {
|
||||
if (
|
||||
(typeof globalThis !== 'undefined' && obj === globalThis)
|
||||
|| (typeof __webpack_require__.g !== 'undefined' && obj === __webpack_require__.g)
|
||||
) {
|
||||
return '{ [object globalThis] }';
|
||||
}
|
||||
if (!isDate(obj) && !isRegExp(obj)) {
|
||||
@ -17768,19 +17771,15 @@ function migrateLightBlockWrapper(settings) {
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
|
4
wp-includes/js/dist/block-editor.min.js
vendored
4
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
18
wp-includes/js/dist/block-library.js
vendored
18
wp-includes/js/dist/block-library.js
vendored
@ -2152,19 +2152,15 @@ const commentAuthorAvatar = (0,external_wp_element_namespaceObject.createElement
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(7153);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
2
wp-includes/js/dist/block-library.min.js
vendored
2
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
200
wp-includes/js/dist/components.js
vendored
200
wp-includes/js/dist/components.js
vendored
@ -2605,19 +2605,15 @@ __webpack_require__.d(toggle_group_control_option_base_styles_namespaceObject, {
|
||||
var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function extends_extends() {
|
||||
extends_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return extends_extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return extends_extends.apply(this, arguments);
|
||||
return n;
|
||||
}, extends_extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
@ -5222,12 +5218,21 @@ function floating_ui_utils_getPaddingObject(padding) {
|
||||
};
|
||||
}
|
||||
function floating_ui_utils_rectToClientRect(rect) {
|
||||
const {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height
|
||||
} = rect;
|
||||
return {
|
||||
...rect,
|
||||
top: rect.y,
|
||||
left: rect.x,
|
||||
right: rect.x + rect.width,
|
||||
bottom: rect.y + rect.height
|
||||
width,
|
||||
height,
|
||||
top: y,
|
||||
left: x,
|
||||
right: x + width,
|
||||
bottom: y + height,
|
||||
x,
|
||||
y
|
||||
};
|
||||
}
|
||||
|
||||
@ -5422,9 +5427,10 @@ async function detectOverflow(state, options) {
|
||||
strategy
|
||||
}));
|
||||
const rect = elementContext === 'floating' ? {
|
||||
...rects.floating,
|
||||
x,
|
||||
y
|
||||
y,
|
||||
width: rects.floating.width,
|
||||
height: rects.floating.height
|
||||
} : rects.reference;
|
||||
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
||||
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
||||
@ -5964,6 +5970,8 @@ async function convertValueToCoords(state, options) {
|
||||
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
||||
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
||||
const rawValue = floating_ui_utils_evaluate(options, state);
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
let {
|
||||
mainAxis,
|
||||
crossAxis,
|
||||
@ -6214,16 +6222,16 @@ const size = function (options) {
|
||||
widthSide = side;
|
||||
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
||||
}
|
||||
const overflowAvailableHeight = height - overflow[heightSide];
|
||||
const overflowAvailableWidth = width - overflow[widthSide];
|
||||
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
||||
const maximumClippingWidth = width - overflow.left - overflow.right;
|
||||
const overflowAvailableHeight = floating_ui_utils_min(height - overflow[heightSide], maximumClippingHeight);
|
||||
const overflowAvailableWidth = floating_ui_utils_min(width - overflow[widthSide], maximumClippingWidth);
|
||||
const noShift = !state.middlewareData.shift;
|
||||
let availableHeight = overflowAvailableHeight;
|
||||
let availableWidth = overflowAvailableWidth;
|
||||
if (isYAxis) {
|
||||
const maximumClippingWidth = width - overflow.left - overflow.right;
|
||||
availableWidth = alignment || noShift ? floating_ui_utils_min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
||||
} else {
|
||||
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
||||
availableHeight = alignment || noShift ? floating_ui_utils_min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
||||
}
|
||||
if (noShift && !alignment) {
|
||||
@ -6315,9 +6323,8 @@ function getContainingBlock(element) {
|
||||
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
||||
if (isContainingBlock(currentNode)) {
|
||||
return currentNode;
|
||||
} else {
|
||||
currentNode = getParentNode(currentNode);
|
||||
}
|
||||
currentNode = getParentNode(currentNode);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -6393,7 +6400,6 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
||||
|
||||
|
||||
|
||||
|
||||
function getCssDimensions(element) {
|
||||
const css = floating_ui_utils_dom_getComputedStyle(element);
|
||||
// In testing environments, the `width` and `height` properties are empty
|
||||
@ -6522,10 +6528,10 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
||||
}
|
||||
|
||||
const topLayerSelectors = [':popover-open', ':modal'];
|
||||
function isTopLayer(floating) {
|
||||
function isTopLayer(element) {
|
||||
return topLayerSelectors.some(selector => {
|
||||
try {
|
||||
return floating.matches(selector);
|
||||
return element.matches(selector);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
@ -6713,7 +6719,7 @@ function getClippingRect(_ref) {
|
||||
rootBoundary,
|
||||
strategy
|
||||
} = _ref;
|
||||
const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
||||
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
||||
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
||||
const firstClippingAncestor = clippingAncestors[0];
|
||||
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
||||
@ -6775,6 +6781,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
||||
};
|
||||
}
|
||||
|
||||
function isStaticPositioned(element) {
|
||||
return floating_ui_utils_dom_getComputedStyle(element).position === 'static';
|
||||
}
|
||||
|
||||
function getTrueOffsetParent(element, polyfill) {
|
||||
if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') {
|
||||
return null;
|
||||
@ -6788,29 +6798,41 @@ function getTrueOffsetParent(element, polyfill) {
|
||||
// Gets the closest ancestor positioned element. Handles some edge cases,
|
||||
// such as table ancestors and cross browser bugs.
|
||||
function getOffsetParent(element, polyfill) {
|
||||
const window = floating_ui_utils_dom_getWindow(element);
|
||||
if (!isHTMLElement(element) || isTopLayer(element)) {
|
||||
return window;
|
||||
const win = floating_ui_utils_dom_getWindow(element);
|
||||
if (isTopLayer(element)) {
|
||||
return win;
|
||||
}
|
||||
if (!isHTMLElement(element)) {
|
||||
let svgOffsetParent = getParentNode(element);
|
||||
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
||||
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
||||
return svgOffsetParent;
|
||||
}
|
||||
svgOffsetParent = getParentNode(svgOffsetParent);
|
||||
}
|
||||
return win;
|
||||
}
|
||||
let offsetParent = getTrueOffsetParent(element, polyfill);
|
||||
while (offsetParent && isTableElement(offsetParent) && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static') {
|
||||
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
||||
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
||||
}
|
||||
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
||||
return window;
|
||||
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
||||
return win;
|
||||
}
|
||||
return offsetParent || getContainingBlock(element) || window;
|
||||
return offsetParent || getContainingBlock(element) || win;
|
||||
}
|
||||
|
||||
const getElementRects = async function (data) {
|
||||
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
||||
const getDimensionsFn = this.getDimensions;
|
||||
const floatingDimensions = await getDimensionsFn(data.floating);
|
||||
return {
|
||||
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
||||
floating: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
...(await getDimensionsFn(data.floating))
|
||||
width: floatingDimensions.width,
|
||||
height: floatingDimensions.height
|
||||
}
|
||||
};
|
||||
};
|
||||
@ -6880,9 +6902,11 @@ function observeMove(element, onMove) {
|
||||
return refresh();
|
||||
}
|
||||
if (!ratio) {
|
||||
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
||||
// to prevent an infinite loop of updates.
|
||||
timeoutId = setTimeout(() => {
|
||||
refresh(false, 1e-7);
|
||||
}, 100);
|
||||
}, 1000);
|
||||
} else {
|
||||
refresh(false, ratio);
|
||||
}
|
||||
@ -6986,6 +7010,25 @@ function autoUpdate(reference, floating, update, options) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves with an object of overflow side offsets that determine how much the
|
||||
* element is overflowing a given clipping boundary on each side.
|
||||
* - positive = overflowing the boundary by that number of pixels
|
||||
* - negative = how many pixels left before it will overflow
|
||||
* - 0 = lies flush with the boundary
|
||||
* @see https://floating-ui.com/docs/detectOverflow
|
||||
*/
|
||||
const floating_ui_dom_detectOverflow = (/* unused pure expression or super */ null && (detectOverflow$1));
|
||||
|
||||
/**
|
||||
* Modifies the placement by translating the floating element along the
|
||||
* specified axes.
|
||||
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
||||
* object may be passed.
|
||||
* @see https://floating-ui.com/docs/offset
|
||||
*/
|
||||
const floating_ui_dom_offset = offset;
|
||||
|
||||
/**
|
||||
* Optimizes the visibility of the floating element by choosing the placement
|
||||
* that has the most space available automatically, without needing to specify a
|
||||
@ -22815,7 +22858,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
|
||||
};
|
||||
}
|
||||
|
||||
}, offset(offsetProp), computedFlipProp ? floating_ui_dom_flip() : undefined, computedResizeProp ? floating_ui_dom_size({
|
||||
}, floating_ui_dom_offset(offsetProp), computedFlipProp ? floating_ui_dom_flip() : undefined, computedResizeProp ? floating_ui_dom_size({
|
||||
apply(sizeProps) {
|
||||
var _refs$floating$curren;
|
||||
|
||||
@ -52342,6 +52385,7 @@ function _typeof(o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, _typeof(o);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/requiredArgs/index.js
|
||||
function requiredArgs(required, args) {
|
||||
if (args.length < required) {
|
||||
@ -64529,8 +64573,16 @@ var calculateNewMax = function (parentSize, innerWidth, innerHeight, maxWidth, m
|
||||
minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),
|
||||
};
|
||||
};
|
||||
/**
|
||||
* transform T | [T, T] to [T, T]
|
||||
* @param val
|
||||
* @returns
|
||||
*/
|
||||
// tslint:disable-next-line
|
||||
var normalizeToPair = function (val) { return (Array.isArray(val) ? val : [val, val]); };
|
||||
var definedProps = [
|
||||
'as',
|
||||
'ref',
|
||||
'style',
|
||||
'className',
|
||||
'grid',
|
||||
@ -64565,6 +64617,7 @@ var baseClassName = '__resizable_base__';
|
||||
var Resizable = /** @class */ (function (_super) {
|
||||
lib_extends(Resizable, _super);
|
||||
function Resizable(props) {
|
||||
var _a, _b, _c, _d;
|
||||
var _this = _super.call(this, props) || this;
|
||||
_this.ratio = 1;
|
||||
_this.resizable = null;
|
||||
@ -64610,19 +64663,10 @@ var Resizable = /** @class */ (function (_super) {
|
||||
}
|
||||
parent.removeChild(base);
|
||||
};
|
||||
_this.ref = function (c) {
|
||||
if (c) {
|
||||
_this.resizable = c;
|
||||
}
|
||||
};
|
||||
_this.state = {
|
||||
isResizing: false,
|
||||
width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'
|
||||
? 'auto'
|
||||
: _this.propsSize && _this.propsSize.width,
|
||||
height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'
|
||||
? 'auto'
|
||||
: _this.propsSize && _this.propsSize.height,
|
||||
width: (_b = (_a = _this.propsSize) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 'auto',
|
||||
height: (_d = (_c = _this.propsSize) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 'auto',
|
||||
direction: 'right',
|
||||
original: {
|
||||
x: 0,
|
||||
@ -64709,10 +64753,11 @@ var Resizable = /** @class */ (function (_super) {
|
||||
var _this = this;
|
||||
var size = this.props.size;
|
||||
var getSize = function (key) {
|
||||
var _a;
|
||||
if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {
|
||||
return 'auto';
|
||||
}
|
||||
if (_this.propsSize && _this.propsSize[key] && _this.propsSize[key].toString().endsWith('%')) {
|
||||
if (_this.propsSize && _this.propsSize[key] && ((_a = _this.propsSize[key]) === null || _a === void 0 ? void 0 : _a.toString().endsWith('%'))) {
|
||||
if (_this.state[key].toString().endsWith('%')) {
|
||||
return _this.state[key].toString();
|
||||
}
|
||||
@ -64853,33 +64898,33 @@ var Resizable = /** @class */ (function (_super) {
|
||||
};
|
||||
Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {
|
||||
var scale = this.props.scale || 1;
|
||||
var resizeRatio = this.props.resizeRatio || 1;
|
||||
var _a = this.state, direction = _a.direction, original = _a.original;
|
||||
var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;
|
||||
var _a = normalizeToPair(this.props.resizeRatio || 1), resizeRatioX = _a[0], resizeRatioY = _a[1];
|
||||
var _b = this.state, direction = _b.direction, original = _b.original;
|
||||
var _c = this.props, lockAspectRatio = _c.lockAspectRatio, lockAspectRatioExtraHeight = _c.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _c.lockAspectRatioExtraWidth;
|
||||
var newWidth = original.width;
|
||||
var newHeight = original.height;
|
||||
var extraHeight = lockAspectRatioExtraHeight || 0;
|
||||
var extraWidth = lockAspectRatioExtraWidth || 0;
|
||||
if (hasDirection('right', direction)) {
|
||||
newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale;
|
||||
newWidth = original.width + ((clientX - original.x) * resizeRatioX) / scale;
|
||||
if (lockAspectRatio) {
|
||||
newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
|
||||
}
|
||||
}
|
||||
if (hasDirection('left', direction)) {
|
||||
newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale;
|
||||
newWidth = original.width - ((clientX - original.x) * resizeRatioX) / scale;
|
||||
if (lockAspectRatio) {
|
||||
newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
|
||||
}
|
||||
}
|
||||
if (hasDirection('bottom', direction)) {
|
||||
newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale;
|
||||
newHeight = original.height + ((clientY - original.y) * resizeRatioY) / scale;
|
||||
if (lockAspectRatio) {
|
||||
newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
|
||||
}
|
||||
}
|
||||
if (hasDirection('top', direction)) {
|
||||
newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale;
|
||||
newHeight = original.height - ((clientY - original.y) * resizeRatioY) / scale;
|
||||
if (lockAspectRatio) {
|
||||
newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
|
||||
}
|
||||
@ -65040,8 +65085,10 @@ var Resizable = /** @class */ (function (_super) {
|
||||
var newGridWidth = snap(newWidth, this.props.grid[0]);
|
||||
var newGridHeight = snap(newHeight, this.props.grid[1]);
|
||||
var gap = this.props.snapGap || 0;
|
||||
newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
|
||||
newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
|
||||
var w = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
|
||||
var h = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
|
||||
newWidth = w;
|
||||
newHeight = h;
|
||||
}
|
||||
var delta = {
|
||||
width: newWidth - original.width,
|
||||
@ -65085,16 +65132,25 @@ var Resizable = /** @class */ (function (_super) {
|
||||
else if (this.flexDir === 'column') {
|
||||
newState.flexBasis = newState.height;
|
||||
}
|
||||
// For v18, update state sync
|
||||
(0,external_ReactDOM_namespaceObject.flushSync)(function () {
|
||||
_this.setState(newState);
|
||||
});
|
||||
var widthChanged = this.state.width !== newState.width;
|
||||
var heightChanged = this.state.height !== newState.height;
|
||||
var flexBaseChanged = this.state.flexBasis !== newState.flexBasis;
|
||||
var changed = widthChanged || heightChanged || flexBaseChanged;
|
||||
if (changed) {
|
||||
// For v18, update state sync
|
||||
(0,external_ReactDOM_namespaceObject.flushSync)(function () {
|
||||
_this.setState(newState);
|
||||
});
|
||||
}
|
||||
if (this.props.onResize) {
|
||||
this.props.onResize(event, direction, this.resizable, delta);
|
||||
if (changed) {
|
||||
this.props.onResize(event, direction, this.resizable, delta);
|
||||
}
|
||||
}
|
||||
};
|
||||
Resizable.prototype.onMouseUp = function (event) {
|
||||
var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;
|
||||
var _a, _b;
|
||||
var _c = this.state, isResizing = _c.isResizing, direction = _c.direction, original = _c.original;
|
||||
if (!isResizing || !this.resizable) {
|
||||
return;
|
||||
}
|
||||
@ -65106,7 +65162,7 @@ var Resizable = /** @class */ (function (_super) {
|
||||
this.props.onResizeStop(event, direction, this.resizable, delta);
|
||||
}
|
||||
if (this.props.size) {
|
||||
this.setState(this.props.size);
|
||||
this.setState({ width: (_a = this.props.size.width) !== null && _a !== void 0 ? _a : 'auto', height: (_b = this.props.size.height) !== null && _b !== void 0 ? _b : 'auto' });
|
||||
}
|
||||
this.unbindEvents();
|
||||
this.setState({
|
||||
@ -65115,7 +65171,8 @@ var Resizable = /** @class */ (function (_super) {
|
||||
});
|
||||
};
|
||||
Resizable.prototype.updateSize = function (size) {
|
||||
this.setState({ width: size.width, height: size.height });
|
||||
var _a, _b;
|
||||
this.setState({ width: (_a = size.width) !== null && _a !== void 0 ? _a : 'auto', height: (_b = size.height) !== null && _b !== void 0 ? _b : 'auto' });
|
||||
};
|
||||
Resizable.prototype.renderResizer = function () {
|
||||
var _this = this;
|
||||
@ -65146,7 +65203,14 @@ var Resizable = /** @class */ (function (_super) {
|
||||
style.flexBasis = this.state.flexBasis;
|
||||
}
|
||||
var Wrapper = this.props.as || 'div';
|
||||
return (external_React_.createElement(Wrapper, lib_assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps),
|
||||
return (external_React_.createElement(Wrapper, lib_assign({ style: style, className: this.props.className }, extendsProps, {
|
||||
// `ref` is after `extendsProps` to ensure this one wins over a version
|
||||
// passed in
|
||||
ref: function (c) {
|
||||
if (c) {
|
||||
_this.resizable = c;
|
||||
}
|
||||
} }),
|
||||
this.state.isResizing && external_React_.createElement("div", { style: this.state.backgroundStyle }),
|
||||
this.props.children,
|
||||
this.renderResizer()));
|
||||
|
4
wp-includes/js/dist/components.min.js
vendored
4
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
18
wp-includes/js/dist/compose.js
vendored
18
wp-includes/js/dist/compose.js
vendored
@ -3015,19 +3015,15 @@ const pure = createHigherOrderComponent(function (WrappedComponent) {
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","deprecated"]
|
||||
var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
|
||||
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
|
||||
|
2
wp-includes/js/dist/compose.min.js
vendored
2
wp-includes/js/dist/compose.min.js
vendored
File diff suppressed because one or more lines are too long
18
wp-includes/js/dist/customize-widgets.js
vendored
18
wp-includes/js/dist/customize-widgets.js
vendored
@ -372,19 +372,15 @@ var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
|
||||
var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js
|
||||
|
||||
|
||||
|
2
wp-includes/js/dist/customize-widgets.min.js
vendored
2
wp-includes/js/dist/customize-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
43
wp-includes/js/dist/data.js
vendored
43
wp-includes/js/dist/data.js
vendored
@ -534,6 +534,7 @@ function _typeof(o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, _typeof(o);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
||||
|
||||
function toPrimitive(t, r) {
|
||||
@ -546,6 +547,7 @@ function toPrimitive(t, r) {
|
||||
}
|
||||
return ("string" === r ? String : Number)(t);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
||||
|
||||
|
||||
@ -553,22 +555,18 @@ function toPropertyKey(t) {
|
||||
var i = toPrimitive(t, "string");
|
||||
return "symbol" == _typeof(i) ? i : i + "";
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
key = toPropertyKey(key);
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
function _defineProperty(e, r, t) {
|
||||
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
||||
value: t,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : e[r] = t, e;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
||||
|
||||
function ownKeys(e, r) {
|
||||
@ -592,6 +590,7 @@ function _objectSpread2(e) {
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js
|
||||
|
||||
|
||||
@ -3529,19 +3528,15 @@ persistencePlugin.__unstableMigrate = () => {};
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: external ["wp","priorityQueue"]
|
||||
|
2
wp-includes/js/dist/data.min.js
vendored
2
wp-includes/js/dist/data.min.js
vendored
@ -6,4 +6,4 @@
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
function we(e){return"[object Object]"===Object.prototype.toString.call(e)}function Oe(e){var t,r;return!1!==we(e)&&(void 0===(t=e.constructor)||!1!==we(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}let Re;const Ee={getItem(e){return Re&&Re[e]?Re[e]:null},setItem(e,t){Re||Ee.clear(),Re[e]=String(t)},clear(){Re=Object.create(null)}};var _e=Ee;let Ie;try{Ie=window.localStorage,Ie.setItem("__wpDataTestLocalStorage",""),Ie.removeItem("__wpDataTestLocalStorage")}catch(e){Ie=_e}const Te=Ie,Ne="WP_DATA";function Ae(e,t){const r=function(e){const{storage:t=Te,storageKey:r=Ne}=e;let n;return{get:function(){if(void 0===n){const e=t.getItem(r);if(null===e)n={};else try{n=JSON.parse(e)}catch(e){n={}}}return n},set:function(e,o){n={...n,[e]:o},t.setItem(r,JSON.stringify(n))}}}(t);return{registerStore(t,n){if(!n.persist)return e.registerStore(t,n);const o=r.get()[t];if(void 0!==o){let e=n.reducer(n.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});e=Oe(e)&&Oe(o)?(0,u.merge)({},e,o):o,n={...n,initialState:e}}const i=e.registerStore(t,n);return i.subscribe(function(e,t,n){let o;if(Array.isArray(n)){const e=n.reduce(((e,t)=>Object.assign(e,{[t]:(e,r)=>r.nextState[t]})),{});i=rt(e),o=(e,t)=>t.nextState===e?e:i(e,t)}else o=(e,t)=>t.nextState;var i;let s=o(void 0,{nextState:e()});return()=>{const n=o(s,{nextState:e()});n!==s&&(r.set(t,n),s=n)}}(i.getState,t,n.persist)),i}}}Ae.__unstableMigrate=()=>{};var je=Ae;function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Le.apply(this,arguments)}var Pe=window.wp.element,Fe=window.wp.priorityQueue,Ce=window.wp.isShallowEqual,Ue=r.n(Ce);const xe=(0,Pe.createContext)(me),{Consumer:ke,Provider:De}=xe,Me=ke;var Ve=De;function Ge(){return(0,Pe.useContext)(xe)}const He=(0,Pe.createContext)(!1),{Consumer:Ke,Provider:We}=He;var Xe=We;const ze=(0,Fe.createQueue)();function Je(e,t){const r=t?e.suspendSelect:e.select,n={};let o,i,s,u,c=!1;return(t,a,l)=>{const f=()=>t(r,e);function p(e){if(c&&t===o)return i;const r=e();Ue()(i,r)||(i=r),c=!0}if(s&&!l&&(c=!1,ze.cancel(n)),!u||a&&t!==o){const t={current:null};p((()=>e.__unstableMarkListeningStores(f,t))),v=t.current,u=t=>{c=!1;const r=()=>{c=!1,t()},o=()=>{s?ze.add(n,r):r()},i=v.map((t=>e.subscribe(o,t)));return()=>{for(const e of i)null==e||e();ze.cancel(n)}}}else p(f);var v;return s=l,o=t,{subscribe:u,getValue:function(){return p(f),i}}}}function $e(e,t,r){const n=Ge(),o=(0,Pe.useContext)(He),i=(0,Pe.useMemo)((()=>Je(n,e)),[n]),s=(0,Pe.useCallback)(t,r),{subscribe:u,getValue:c}=i(s,!!r,o),a=(0,Pe.useSyncExternalStore)(u,c,c);return(0,Pe.useDebugValue)(a),a}function Be(e,t){const r="function"!=typeof e,n=(0,Pe.useRef)(r);if(r!==n.current){const e=n.current?"static":"mapping";throw new Error(`Switching useSelect from ${e} to ${r?"static":"mapping"} is not allowed`)}return r?(o=e,Ge().select(o)):$e(!1,e,t);var o}function Qe(e,t){return $e(!0,e,t)}var qe=e=>(0,T.createHigherOrderComponent)((t=>(0,T.pure)((r=>{const n=Be(((t,n)=>e(t,r,n)));return(0,Pe.createElement)(t,Le({},r,n))}))),"withSelect");var Ye=(e,t)=>{const r=Ge(),n=(0,Pe.useRef)(e);return(0,T.useIsomorphicLayoutEffect)((()=>{n.current=e})),(0,Pe.useMemo)((()=>{const e=n.current(r.dispatch,r);return(0,u.mapValues)(e,((e,t)=>("function"!=typeof e&&console.warn(`Property ${t} returned from dispatchMap in useDispatchWithMap must be a function.`),function(){return n.current(r.dispatch,r)[t](...arguments)})))}),[r,...t])};var Ze=e=>(0,T.createHigherOrderComponent)((t=>r=>{const n=Ye(((t,n)=>e(t,r,n)),[]);return(0,Pe.createElement)(t,Le({},r,n))}),"withDispatch");var et=(0,T.createHigherOrderComponent)((e=>t=>(0,Pe.createElement)(Me,null,(r=>(0,Pe.createElement)(e,Le({},t,{registry:r}))))),"withRegistry");var tt=e=>{const{dispatch:t}=Ge();return void 0===e?t:t(e)};const rt=s(),nt=me.select,ot=me.resolveSelect,it=me.suspendSelect,st=me.dispatch,ut=me.subscribe,ct=me.registerGenericStore,at=me.registerStore,lt=me.use,ft=me.register}(),(window.wp=window.wp||{}).data=n}();
|
||||
function we(e){return"[object Object]"===Object.prototype.toString.call(e)}function Oe(e){var t,r;return!1!==we(e)&&(void 0===(t=e.constructor)||!1!==we(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}let Re;const Ee={getItem(e){return Re&&Re[e]?Re[e]:null},setItem(e,t){Re||Ee.clear(),Re[e]=String(t)},clear(){Re=Object.create(null)}};var _e=Ee;let Ie;try{Ie=window.localStorage,Ie.setItem("__wpDataTestLocalStorage",""),Ie.removeItem("__wpDataTestLocalStorage")}catch(e){Ie=_e}const Te=Ie,Ne="WP_DATA";function Ae(e,t){const r=function(e){const{storage:t=Te,storageKey:r=Ne}=e;let n;return{get:function(){if(void 0===n){const e=t.getItem(r);if(null===e)n={};else try{n=JSON.parse(e)}catch(e){n={}}}return n},set:function(e,o){n={...n,[e]:o},t.setItem(r,JSON.stringify(n))}}}(t);return{registerStore(t,n){if(!n.persist)return e.registerStore(t,n);const o=r.get()[t];if(void 0!==o){let e=n.reducer(n.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});e=Oe(e)&&Oe(o)?(0,u.merge)({},e,o):o,n={...n,initialState:e}}const i=e.registerStore(t,n);return i.subscribe(function(e,t,n){let o;if(Array.isArray(n)){const e=n.reduce(((e,t)=>Object.assign(e,{[t]:(e,r)=>r.nextState[t]})),{});i=rt(e),o=(e,t)=>t.nextState===e?e:i(e,t)}else o=(e,t)=>t.nextState;var i;let s=o(void 0,{nextState:e()});return()=>{const n=o(s,{nextState:e()});n!==s&&(r.set(t,n),s=n)}}(i.getState,t,n.persist)),i}}}Ae.__unstableMigrate=()=>{};var je=Ae;function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Le.apply(null,arguments)}var Pe=window.wp.element,Fe=window.wp.priorityQueue,Ce=window.wp.isShallowEqual,Ue=r.n(Ce);const xe=(0,Pe.createContext)(me),{Consumer:ke,Provider:De}=xe,Me=ke;var Ve=De;function Ge(){return(0,Pe.useContext)(xe)}const He=(0,Pe.createContext)(!1),{Consumer:Ke,Provider:We}=He;var Xe=We;const ze=(0,Fe.createQueue)();function Je(e,t){const r=t?e.suspendSelect:e.select,n={};let o,i,s,u,c=!1;return(t,a,l)=>{const f=()=>t(r,e);function p(e){if(c&&t===o)return i;const r=e();Ue()(i,r)||(i=r),c=!0}if(s&&!l&&(c=!1,ze.cancel(n)),!u||a&&t!==o){const t={current:null};p((()=>e.__unstableMarkListeningStores(f,t))),v=t.current,u=t=>{c=!1;const r=()=>{c=!1,t()},o=()=>{s?ze.add(n,r):r()},i=v.map((t=>e.subscribe(o,t)));return()=>{for(const e of i)null==e||e();ze.cancel(n)}}}else p(f);var v;return s=l,o=t,{subscribe:u,getValue:function(){return p(f),i}}}}function $e(e,t,r){const n=Ge(),o=(0,Pe.useContext)(He),i=(0,Pe.useMemo)((()=>Je(n,e)),[n]),s=(0,Pe.useCallback)(t,r),{subscribe:u,getValue:c}=i(s,!!r,o),a=(0,Pe.useSyncExternalStore)(u,c,c);return(0,Pe.useDebugValue)(a),a}function Be(e,t){const r="function"!=typeof e,n=(0,Pe.useRef)(r);if(r!==n.current){const e=n.current?"static":"mapping";throw new Error(`Switching useSelect from ${e} to ${r?"static":"mapping"} is not allowed`)}return r?(o=e,Ge().select(o)):$e(!1,e,t);var o}function Qe(e,t){return $e(!0,e,t)}var qe=e=>(0,T.createHigherOrderComponent)((t=>(0,T.pure)((r=>{const n=Be(((t,n)=>e(t,r,n)));return(0,Pe.createElement)(t,Le({},r,n))}))),"withSelect");var Ye=(e,t)=>{const r=Ge(),n=(0,Pe.useRef)(e);return(0,T.useIsomorphicLayoutEffect)((()=>{n.current=e})),(0,Pe.useMemo)((()=>{const e=n.current(r.dispatch,r);return(0,u.mapValues)(e,((e,t)=>("function"!=typeof e&&console.warn(`Property ${t} returned from dispatchMap in useDispatchWithMap must be a function.`),function(){return n.current(r.dispatch,r)[t](...arguments)})))}),[r,...t])};var Ze=e=>(0,T.createHigherOrderComponent)((t=>r=>{const n=Ye(((t,n)=>e(t,r,n)),[]);return(0,Pe.createElement)(t,Le({},r,n))}),"withDispatch");var et=(0,T.createHigherOrderComponent)((e=>t=>(0,Pe.createElement)(Me,null,(r=>(0,Pe.createElement)(e,Le({},t,{registry:r}))))),"withRegistry");var tt=e=>{const{dispatch:t}=Ge();return void 0===e?t:t(e)};const rt=s(),nt=me.select,ot=me.resolveSelect,it=me.suspendSelect,st=me.dispatch,ut=me.subscribe,ct=me.registerGenericStore,at=me.registerStore,lt=me.use,ft=me.register}(),(window.wp=window.wp||{}).data=n}();
|
18
wp-includes/js/dist/edit-post.js
vendored
18
wp-includes/js/dist/edit-post.js
vendored
@ -298,19 +298,15 @@ const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpl
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","components"]
|
||||
var external_wp_components_namespaceObject = window["wp"]["components"];
|
||||
;// CONCATENATED MODULE: external ["wp","blockEditor"]
|
||||
|
2
wp-includes/js/dist/edit-post.min.js
vendored
2
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
18
wp-includes/js/dist/edit-site.js
vendored
18
wp-includes/js/dist/edit-site.js
vendored
@ -1385,19 +1385,15 @@ var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
|
||||
var external_wp_editor_namespaceObject = window["wp"]["editor"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function extends_extends() {
|
||||
extends_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return extends_extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return extends_extends.apply(this, arguments);
|
||||
return n;
|
||||
}, extends_extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(7153);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
2
wp-includes/js/dist/edit-site.min.js
vendored
2
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
18
wp-includes/js/dist/edit-widgets.js
vendored
18
wp-includes/js/dist/edit-widgets.js
vendored
@ -366,19 +366,15 @@ var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
||||
var external_wp_notices_namespaceObject = window["wp"]["notices"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(7153);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
2
wp-includes/js/dist/edit-widgets.min.js
vendored
2
wp-includes/js/dist/edit-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
19
wp-includes/js/dist/editor.js
vendored
19
wp-includes/js/dist/editor.js
vendored
@ -1687,19 +1687,15 @@ __webpack_require__.d(actions_namespaceObject, {
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: external "lodash"
|
||||
@ -9144,6 +9140,7 @@ function _typeof(o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, _typeof(o);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/requiredArgs/index.js
|
||||
function requiredArgs(required, args) {
|
||||
if (args.length < required) {
|
||||
|
2
wp-includes/js/dist/editor.min.js
vendored
2
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
18
wp-includes/js/dist/keyboard-shortcuts.js
vendored
18
wp-includes/js/dist/keyboard-shortcuts.js
vendored
@ -737,19 +737,15 @@ function useShortcut(name, callback) {
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/components/shortcut-provider.js
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ShortcutProvider:function(){return j},__unstableUseShortcutEventMatch:function(){return T},store:function(){return C},useShortcut:function(){return k}});var n={};e.r(n),e.d(n,{registerShortcut:function(){return i},unregisterShortcut:function(){return u}});var r={};e.r(r),e.d(r,{getAllShortcutKeyCombinations:function(){return w},getAllShortcutRawKeyCombinations:function(){return m},getCategoryShortcuts:function(){return R},getShortcutAliases:function(){return b},getShortcutDescription:function(){return S},getShortcutKeyCombination:function(){return g},getShortcutRepresentation:function(){return v}});var o=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...r}=e;return r}return e};function i(e){let{name:t,category:n,description:r,keyCombination:o,aliases:a}=e;return{type:"REGISTER_SHORTCUT",name:t,category:n,keyCombination:o,aliases:a,description:r}}function u(e){return{type:"UNREGISTER_SHORTCUT",name:e}}var c={};function s(e){return[e]}function l(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function f(e,t){var n,r=t||s;function o(e){var t,r,o,a,i,u=n,s=!0;for(t=0;t<e.length;t++){if(r=e[t],!(i=r)||"object"!=typeof i){s=!1;break}u.has(r)?u=u.get(r):(o=new WeakMap,u.set(r,o),u=o)}return u.has(c)||((a=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,u.set(c,a)),u.get(c)}function a(){n=new WeakMap}function i(){var t,n,a,i,u,c=arguments.length;for(i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];for((t=o(u=r.apply(null,i))).isUniqueByDependants||(t.lastDependants&&!l(u,t.lastDependants,0)&&t.clear(),t.lastDependants=u),n=t.head;n;){if(l(n.args,i,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,i)},i[0]=null,n.args=i,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return i.getDependants=r,i.clear=a,a(),i}var d=window.wp.keycodes;const p=[],h={display:d.displayShortcut,raw:d.rawShortcut,ariaLabel:d.shortcutAriaLabel};function y(e,t){return e?e.modifier?h[t][e.modifier](e.character):e.character:null}function g(e,t){return e[t]?e[t].keyCombination:null}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";const r=g(e,t);return y(r,n)}function S(e,t){return e[t]?e[t].description:null}function b(e,t){return e[t]&&e[t].aliases?e[t].aliases:p}const w=f(((e,t)=>[g(e,t),...b(e,t)].filter(Boolean)),((e,t)=>[e[t]])),m=f(((e,t)=>w(e,t).map((e=>y(e,"raw")))),((e,t)=>[e[t]])),R=f(((e,t)=>Object.entries(e).filter((e=>{let[,n]=e;return n.category===t})).map((e=>{let[t]=e;return t}))),(e=>[e])),C=(0,o.createReduxStore)("core/keyboard-shortcuts",{reducer:a,actions:n,selectors:r});(0,o.register)(C);var O=window.wp.element;function T(){const{getAllShortcutKeyCombinations:e}=(0,o.useSelect)(C);return function(t,n){return e(t).some((e=>{let{modifier:t,character:r}=e;return d.isKeyboardEvent[t](n,r)}))}}const E=(0,O.createContext)();function k(e,t){let{isDisabled:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,O.useContext)(E),o=T(),a=(0,O.useRef)();a.current=t,(0,O.useEffect)((()=>{if(!n)return r.current.add(t),()=>{r.current.delete(t)};function t(t){o(e,t)&&a.current(t)}}),[e,n])}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}const{Provider:x}=E;function j(e){const t=(0,O.useRef)(new Set);return(0,O.createElement)(x,{value:t},(0,O.createElement)("div",D({},e,{onKeyDown:function(n){e.onKeyDown&&e.onKeyDown(n);for(const e of t.current)e(n)}})))}(window.wp=window.wp||{}).keyboardShortcuts=t}();
|
||||
!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ShortcutProvider:function(){return U},__unstableUseShortcutEventMatch:function(){return E},store:function(){return C},useShortcut:function(){return k}});var n={};e.r(n),e.d(n,{registerShortcut:function(){return u},unregisterShortcut:function(){return i}});var r={};e.r(r),e.d(r,{getAllShortcutKeyCombinations:function(){return w},getAllShortcutRawKeyCombinations:function(){return m},getCategoryShortcuts:function(){return R},getShortcutAliases:function(){return b},getShortcutDescription:function(){return S},getShortcutKeyCombination:function(){return g},getShortcutRepresentation:function(){return v}});var o=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...r}=e;return r}return e};function u(e){let{name:t,category:n,description:r,keyCombination:o,aliases:a}=e;return{type:"REGISTER_SHORTCUT",name:t,category:n,keyCombination:o,aliases:a,description:r}}function i(e){return{type:"UNREGISTER_SHORTCUT",name:e}}var c={};function s(e){return[e]}function l(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function f(e,t){var n,r=t||s;function o(e){var t,r,o,a,u,i=n,s=!0;for(t=0;t<e.length;t++){if(r=e[t],!(u=r)||"object"!=typeof u){s=!1;break}i.has(r)?i=i.get(r):(o=new WeakMap,i.set(r,o),i=o)}return i.has(c)||((a=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,i.set(c,a)),i.get(c)}function a(){n=new WeakMap}function u(){var t,n,a,u,i,c=arguments.length;for(u=new Array(c),a=0;a<c;a++)u[a]=arguments[a];for((t=o(i=r.apply(null,u))).isUniqueByDependants||(t.lastDependants&&!l(i,t.lastDependants,0)&&t.clear(),t.lastDependants=i),n=t.head;n;){if(l(n.args,u,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,u)},u[0]=null,n.args=u,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return u.getDependants=r,u.clear=a,a(),u}var d=window.wp.keycodes;const p=[],h={display:d.displayShortcut,raw:d.rawShortcut,ariaLabel:d.shortcutAriaLabel};function y(e,t){return e?e.modifier?h[t][e.modifier](e.character):e.character:null}function g(e,t){return e[t]?e[t].keyCombination:null}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";const r=g(e,t);return y(r,n)}function S(e,t){return e[t]?e[t].description:null}function b(e,t){return e[t]&&e[t].aliases?e[t].aliases:p}const w=f(((e,t)=>[g(e,t),...b(e,t)].filter(Boolean)),((e,t)=>[e[t]])),m=f(((e,t)=>w(e,t).map((e=>y(e,"raw")))),((e,t)=>[e[t]])),R=f(((e,t)=>Object.entries(e).filter((e=>{let[,n]=e;return n.category===t})).map((e=>{let[t]=e;return t}))),(e=>[e])),C=(0,o.createReduxStore)("core/keyboard-shortcuts",{reducer:a,actions:n,selectors:r});(0,o.register)(C);var T=window.wp.element;function E(){const{getAllShortcutKeyCombinations:e}=(0,o.useSelect)(C);return function(t,n){return e(t).some((e=>{let{modifier:t,character:r}=e;return d.isKeyboardEvent[t](n,r)}))}}const O=(0,T.createContext)();function k(e,t){let{isDisabled:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,T.useContext)(O),o=E(),a=(0,T.useRef)();a.current=t,(0,T.useEffect)((()=>{if(!n)return r.current.add(t),()=>{r.current.delete(t)};function t(t){o(e,t)&&a.current(t)}}),[e,n])}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}const{Provider:x}=O;function U(e){const t=(0,T.useRef)(new Set);return(0,T.createElement)(x,{value:t},(0,T.createElement)("div",D({},e,{onKeyDown:function(n){e.onKeyDown&&e.onKeyDown(n);for(const e of t.current)e(n)}})))}(window.wp=window.wp||{}).keyboardShortcuts=t}();
|
18
wp-includes/js/dist/plugins.js
vendored
18
wp-includes/js/dist/plugins.js
vendored
@ -263,19 +263,15 @@ var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
|
||||
var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","compose"]
|
||||
var external_wp_compose_namespaceObject = window["wp"]["compose"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js
|
||||
|
2
wp-includes/js/dist/plugins.min.js
vendored
2
wp-includes/js/dist/plugins.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
!function(){var e={9756:function(e){e.exports=function(e,n){var t,r,i=0;function o(){var o,u,s=t,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(u=0;u<l;u++)if(s.args[u]!==arguments[u]){s=s.next;continue e}return s!==t&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t,s.prev=null,t.prev=s,t=s),s.val}s=s.next}for(o=new Array(l),u=0;u<l;u++)o[u]=arguments[u];return s={args:o,val:e.apply(null,o)},t?(t.prev=s,s.next=t):r=s,i===n.maxSize?(r=r.prev).next=null:i++,t=s,s.val}return n=n||{},o.clear=function(){t=null,r=null,i=0},o}}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";t.r(r),t.d(r,{PluginArea:function(){return x},getPlugin:function(){return h},getPlugins:function(){return w},registerPlugin:function(){return f},unregisterPlugin:function(){return v},withPluginContext:function(){return c}});var e=window.wp.element,n=t(9756),i=t.n(n),o=window.wp.hooks;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}var s=window.wp.compose;const{Consumer:l,Provider:a}=(0,e.createContext)({name:null,icon:null}),c=n=>(0,s.createHigherOrderComponent)((t=>r=>(0,e.createElement)(l,null,(i=>(0,e.createElement)(t,u({},r,n(i,r)))))),"withPluginContext");class p extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){const{name:n,onError:t}=this.props;t&&t(n,e)}render(){return this.state.hasError?null:this.props.children}}var g=window.wp.primitives;var d=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));const m={};function f(e,n){if("object"!=typeof n)return console.error("No settings object provided!"),null;if("string"!=typeof e)return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;m[e]&&console.error(`Plugin "${e}" is already registered.`),n=(0,o.applyFilters)("plugins.registerPlugin",n,e);const{render:t,scope:r}=n;if("function"!=typeof t)return console.error('The "render" property must be specified and must be a valid function.'),null;if(r){if("string"!=typeof r)return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(r))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return m[e]={name:e,icon:d,...n},(0,o.doAction)("plugins.pluginRegistered",n,e),n}function v(e){if(!m[e])return void console.error('Plugin "'+e+'" is not registered.');const n=m[e];return delete m[e],(0,o.doAction)("plugins.pluginUnregistered",n,e),n}function h(e){return m[e]}function w(e){return Object.values(m).filter((n=>n.scope===e))}class P extends e.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=i()(((e,n)=>({name:e,icon:n}))),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:w(this.props.scope).map((e=>{let{icon:n,name:t,render:r}=e;return{Plugin:r,context:this.memoizedContext(t,n)}}))}}componentDidMount(){(0,o.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),(0,o.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}componentWillUnmount(){(0,o.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,o.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return(0,e.createElement)("div",{style:{display:"none"}},this.state.plugins.map((n=>{let{context:t,Plugin:r}=n;return(0,e.createElement)(a,{key:t.name,value:t},(0,e.createElement)(p,{name:t.name,onError:this.props.onError},(0,e.createElement)(r,null)))})))}}var x=P}(),(window.wp=window.wp||{}).plugins=r}();
|
||||
!function(){var e={9756:function(e){e.exports=function(e,n){var r,t,i=0;function o(){var o,u,l=r,s=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(u=0;u<s;u++)if(l.args[u]!==arguments[u]){l=l.next;continue e}return l!==r&&(l===t&&(t=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=r,l.prev=null,r.prev=l,r=l),l.val}l=l.next}for(o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return l={args:o,val:e.apply(null,o)},r?(r.prev=l,l.next=r):t=l,i===n.maxSize?(t=t.prev).next=null:i++,r=l,l.val}return n=n||{},o.clear=function(){r=null,t=null,i=0},o}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};!function(){"use strict";r.r(t),r.d(t,{PluginArea:function(){return x},getPlugin:function(){return h},getPlugins:function(){return w},registerPlugin:function(){return f},unregisterPlugin:function(){return v},withPluginContext:function(){return c}});var e=window.wp.element,n=r(9756),i=r.n(n),o=window.wp.hooks;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},u.apply(null,arguments)}var l=window.wp.compose;const{Consumer:s,Provider:a}=(0,e.createContext)({name:null,icon:null}),c=n=>(0,l.createHigherOrderComponent)((r=>t=>(0,e.createElement)(s,null,(i=>(0,e.createElement)(r,u({},t,n(i,t)))))),"withPluginContext");class p extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){const{name:n,onError:r}=this.props;r&&r(n,e)}render(){return this.state.hasError?null:this.props.children}}var g=window.wp.primitives;var d=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));const m={};function f(e,n){if("object"!=typeof n)return console.error("No settings object provided!"),null;if("string"!=typeof e)return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;m[e]&&console.error(`Plugin "${e}" is already registered.`),n=(0,o.applyFilters)("plugins.registerPlugin",n,e);const{render:r,scope:t}=n;if("function"!=typeof r)return console.error('The "render" property must be specified and must be a valid function.'),null;if(t){if("string"!=typeof t)return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(t))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return m[e]={name:e,icon:d,...n},(0,o.doAction)("plugins.pluginRegistered",n,e),n}function v(e){if(!m[e])return void console.error('Plugin "'+e+'" is not registered.');const n=m[e];return delete m[e],(0,o.doAction)("plugins.pluginUnregistered",n,e),n}function h(e){return m[e]}function w(e){return Object.values(m).filter((n=>n.scope===e))}class P extends e.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=i()(((e,n)=>({name:e,icon:n}))),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:w(this.props.scope).map((e=>{let{icon:n,name:r,render:t}=e;return{Plugin:t,context:this.memoizedContext(r,n)}}))}}componentDidMount(){(0,o.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),(0,o.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}componentWillUnmount(){(0,o.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,o.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return(0,e.createElement)("div",{style:{display:"none"}},this.state.plugins.map((n=>{let{context:r,Plugin:t}=n;return(0,e.createElement)(a,{key:r.name,value:r},(0,e.createElement)(p,{name:r.name,onError:this.props.onError},(0,e.createElement)(t,null)))})))}}var x=P}(),(window.wp=window.wp||{}).plugins=t}();
|
18
wp-includes/js/dist/server-side-render.js
vendored
18
wp-includes/js/dist/server-side-render.js
vendored
@ -149,19 +149,15 @@ __webpack_require__.d(__webpack_exports__, {
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: external ["wp","data"]
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
!function(){"use strict";var e={5619:function(e){e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;var n,o,u;if(Array.isArray(r)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(!e(r[o],t[o]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(o of r.entries())if(!t.has(o[0]))return!1;for(o of r.entries())if(!e(o[1],t.get(o[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(o of r.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(r)&&ArrayBuffer.isView(t)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(r[o]!==t[o])return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((n=(u=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,u[o]))return!1;for(o=n;0!=o--;){var i=u[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t}}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var u=r[n]={exports:{}};return e[n](u,u.exports,t),u.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)};var n={};!function(){function e(){return e=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},e.apply(this,arguments)}t.d(n,{default:function(){return b}});var r=window.wp.element,o=window.wp.data,u=t(5619),i=t.n(u),s=window.wp.compose,c=window.wp.i18n,l=window.wp.apiFetch,a=t.n(l),f=window.wp.url,p=window.wp.components,d=window.wp.blocks;const w={};function m(e){let{className:t}=e;return(0,r.createElement)(p.Placeholder,{className:t},(0,c.__)("Block rendered as empty."))}function g(e){let{response:t,className:n}=e;const o=(0,c.sprintf)((0,c.__)("Error loading block: %s"),t.errorMsg);return(0,r.createElement)(p.Placeholder,{className:n},o)}function y(e){let{children:t,showLoader:n}=e;return(0,r.createElement)("div",{style:{position:"relative"}},n&&(0,r.createElement)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"}},(0,r.createElement)(p.Spinner,null)),(0,r.createElement)("div",{style:{opacity:n?"0.3":1}},t))}function v(t){const{attributes:n,block:o,className:u,httpMethod:c="GET",urlQueryArgs:l,skipBlockSupportAttributes:p=!1,EmptyResponsePlaceholder:v=m,ErrorResponsePlaceholder:h=g,LoadingResponsePlaceholder:b=y}=t,E=(0,r.useRef)(!0),[O,S]=(0,r.useState)(!1),P=(0,r.useRef)(),[j,k]=(0,r.useState)(null),x=(0,s.usePrevious)(t),[A,M]=(0,r.useState)(!1);function R(){var e,r;if(!E.current)return;M(!0);let t=n&&(0,d.__experimentalSanitizeBlockAttributes)(o,n);p&&(t=function(e){const{backgroundColor:r,borderColor:t,fontFamily:n,fontSize:o,gradient:u,textColor:i,className:s,...c}=e,{border:l,color:a,elements:f,spacing:p,typography:d,...m}=(null==e?void 0:e.style)||w;return{...c,style:m}}(t));const u="POST"===c,i=u?null:null!==(e=t)&&void 0!==e?e:null,s=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,f.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==r?{attributes:r}:{},...t})}(o,i,l),m=u?{attributes:null!==(r=t)&&void 0!==r?r:null}:null,g=P.current=a()({path:s,data:m,method:u?"POST":"GET"}).then((e=>{E.current&&g===P.current&&e&&k(e.rendered)})).catch((e=>{E.current&&g===P.current&&k({error:!0,errorMsg:e.message})})).finally((()=>{E.current&&g===P.current&&M(!1)}));return g}const T=(0,s.useDebounce)(R,500);(0,r.useEffect)((()=>()=>{E.current=!1}),[]),(0,r.useEffect)((()=>{void 0===x?R():i()(x,t)||T()})),(0,r.useEffect)((()=>{if(!A)return;const e=setTimeout((()=>{S(!0)}),1e3);return()=>clearTimeout(e)}),[A]);const _=!!j,N=""===j,z=null==j?void 0:j.error;return A?(0,r.createElement)(b,e({},t,{showLoader:O}),_&&(0,r.createElement)(r.RawHTML,{className:u},j)):N||!_?(0,r.createElement)(v,t):z?(0,r.createElement)(h,e({response:j},t)):(0,r.createElement)(r.RawHTML,{className:u},j)}const h={};var b=(0,o.withSelect)((e=>{const r=e("core/editor");if(r){const e=r.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return h}))((t=>{let{urlQueryArgs:n=h,currentPostId:o,...u}=t;const i=(0,r.useMemo)((()=>o?{post_id:o,...n}:n),[o,n]);return(0,r.createElement)(v,e({urlQueryArgs:i},u))}))}(),(window.wp=window.wp||{}).serverSideRender=n.default}();
|
||||
!function(){"use strict";var e={5619:function(e){e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;var n,o,u;if(Array.isArray(r)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(!e(r[o],t[o]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(o of r.entries())if(!t.has(o[0]))return!1;for(o of r.entries())if(!e(o[1],t.get(o[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(o of r.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(r)&&ArrayBuffer.isView(t)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(r[o]!==t[o])return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((n=(u=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,u[o]))return!1;for(o=n;0!=o--;){var i=u[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t}}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var u=r[n]={exports:{}};return e[n](u,u.exports,t),u.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)};var n={};!function(){function e(){return e=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},e.apply(null,arguments)}t.d(n,{default:function(){return b}});var r=window.wp.element,o=window.wp.data,u=t(5619),i=t.n(u),s=window.wp.compose,l=window.wp.i18n,c=window.wp.apiFetch,a=t.n(c),f=window.wp.url,p=window.wp.components,d=window.wp.blocks;const w={};function m(e){let{className:t}=e;return(0,r.createElement)(p.Placeholder,{className:t},(0,l.__)("Block rendered as empty."))}function g(e){let{response:t,className:n}=e;const o=(0,l.sprintf)((0,l.__)("Error loading block: %s"),t.errorMsg);return(0,r.createElement)(p.Placeholder,{className:n},o)}function y(e){let{children:t,showLoader:n}=e;return(0,r.createElement)("div",{style:{position:"relative"}},n&&(0,r.createElement)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"}},(0,r.createElement)(p.Spinner,null)),(0,r.createElement)("div",{style:{opacity:n?"0.3":1}},t))}function v(t){const{attributes:n,block:o,className:u,httpMethod:l="GET",urlQueryArgs:c,skipBlockSupportAttributes:p=!1,EmptyResponsePlaceholder:v=m,ErrorResponsePlaceholder:h=g,LoadingResponsePlaceholder:b=y}=t,E=(0,r.useRef)(!0),[O,S]=(0,r.useState)(!1),P=(0,r.useRef)(),[j,k]=(0,r.useState)(null),x=(0,s.usePrevious)(t),[A,M]=(0,r.useState)(!1);function R(){var e,r;if(!E.current)return;M(!0);let t=n&&(0,d.__experimentalSanitizeBlockAttributes)(o,n);p&&(t=function(e){const{backgroundColor:r,borderColor:t,fontFamily:n,fontSize:o,gradient:u,textColor:i,className:s,...l}=e,{border:c,color:a,elements:f,spacing:p,typography:d,...m}=(null==e?void 0:e.style)||w;return{...l,style:m}}(t));const u="POST"===l,i=u?null:null!==(e=t)&&void 0!==e?e:null,s=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,f.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==r?{attributes:r}:{},...t})}(o,i,c),m=u?{attributes:null!==(r=t)&&void 0!==r?r:null}:null,g=P.current=a()({path:s,data:m,method:u?"POST":"GET"}).then((e=>{E.current&&g===P.current&&e&&k(e.rendered)})).catch((e=>{E.current&&g===P.current&&k({error:!0,errorMsg:e.message})})).finally((()=>{E.current&&g===P.current&&M(!1)}));return g}const T=(0,s.useDebounce)(R,500);(0,r.useEffect)((()=>()=>{E.current=!1}),[]),(0,r.useEffect)((()=>{void 0===x?R():i()(x,t)||T()})),(0,r.useEffect)((()=>{if(!A)return;const e=setTimeout((()=>{S(!0)}),1e3);return()=>clearTimeout(e)}),[A]);const _=!!j,N=""===j,z=null==j?void 0:j.error;return A?(0,r.createElement)(b,e({},t,{showLoader:O}),_&&(0,r.createElement)(r.RawHTML,{className:u},j)):N||!_?(0,r.createElement)(v,t):z?(0,r.createElement)(h,e({response:j},t)):(0,r.createElement)(r.RawHTML,{className:u},j)}const h={};var b=(0,o.withSelect)((e=>{const r=e("core/editor");if(r){const e=r.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return h}))((t=>{let{urlQueryArgs:n=h,currentPostId:o,...u}=t;const i=(0,r.useMemo)((()=>o?{post_id:o,...n}:n),[o,n]);return(0,r.createElement)(v,e({urlQueryArgs:i},u))}))}(),(window.wp=window.wp||{}).serverSideRender=n.default}();
|
18
wp-includes/js/dist/viewport.js
vendored
18
wp-includes/js/dist/viewport.js
vendored
@ -229,19 +229,15 @@ const addDimensionsEventListener = (breakpoints, operators) => {
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||||
for (var e = 1; e < arguments.length; e++) {
|
||||
var t = arguments[e];
|
||||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
return n;
|
||||
}, _extends.apply(null, arguments);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/with-viewport-match.js
|
||||
|
2
wp-includes/js/dist/viewport.min.js
vendored
2
wp-includes/js/dist/viewport.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
!function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ifViewportMatches:function(){return f},store:function(){return s},withViewportMatch:function(){return l}});var r={};e.r(r),e.d(r,{setIsMatching:function(){return c}});var n={};e.r(n),e.d(n,{isViewportMatch:function(){return u}});var o=window.wp.compose,i=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_IS_MATCHING"===t.type?t.values:e};function c(e){return{type:"SET_IS_MATCHING",values:e}}function u(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}const s=(0,i.createReduxStore)("core/viewport",{reducer:a,actions:r,selectors:n});(0,i.register)(s);var d=(e,t)=>{const r=(0,o.debounce)((()=>{const e=Object.fromEntries(a.map((e=>{let[t,r]=e;return[t,r.matches]})));(0,i.dispatch)(s).setIsMatching(e)}),0,{leading:!0}),n=Object.entries(t),a=Object.entries(e).flatMap((e=>{let[t,o]=e;return n.map((e=>{let[n,i]=e;const a=window.matchMedia(`(${i}: ${o}px)`);return a.addEventListener("change",r),[`${n} ${t}`,a]}))}));window.addEventListener("orientationchange",r),r(),r.flush()};function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(this,arguments)}var w=window.wp.element;var l=e=>{const t=Object.entries(e);return(0,o.createHigherOrderComponent)((e=>(0,o.pure)((r=>{const n=Object.fromEntries(t.map((e=>{let[t,r]=e,[n,i]=r.split(" ");return void 0===i&&(i=n,n=">="),[t,(0,o.useViewportMatch)(i,n)]})));return(0,w.createElement)(e,p({},r,n))}))),"withViewportMatch")};var f=e=>(0,o.createHigherOrderComponent)((0,o.compose)([l({isViewportMatch:e}),(0,o.ifCondition)((e=>e.isViewportMatch))]),"ifViewportMatches");d({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"}),(window.wp=window.wp||{}).viewport=t}();
|
||||
!function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ifViewportMatches:function(){return f},store:function(){return s},withViewportMatch:function(){return w}});var r={};e.r(r),e.d(r,{setIsMatching:function(){return c}});var n={};e.r(n),e.d(n,{isViewportMatch:function(){return u}});var i=window.wp.compose,o=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_IS_MATCHING"===t.type?t.values:e};function c(e){return{type:"SET_IS_MATCHING",values:e}}function u(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}const s=(0,o.createReduxStore)("core/viewport",{reducer:a,actions:r,selectors:n});(0,o.register)(s);var d=(e,t)=>{const r=(0,i.debounce)((()=>{const e=Object.fromEntries(a.map((e=>{let[t,r]=e;return[t,r.matches]})));(0,o.dispatch)(s).setIsMatching(e)}),0,{leading:!0}),n=Object.entries(t),a=Object.entries(e).flatMap((e=>{let[t,i]=e;return n.map((e=>{let[n,o]=e;const a=window.matchMedia(`(${o}: ${i}px)`);return a.addEventListener("change",r),[`${n} ${t}`,a]}))}));window.addEventListener("orientationchange",r),r(),r.flush()};function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(null,arguments)}var l=window.wp.element;var w=e=>{const t=Object.entries(e);return(0,i.createHigherOrderComponent)((e=>(0,i.pure)((r=>{const n=Object.fromEntries(t.map((e=>{let[t,r]=e,[n,o]=r.split(" ");return void 0===o&&(o=n,n=">="),[t,(0,i.useViewportMatch)(o,n)]})));return(0,l.createElement)(e,p({},r,n))}))),"withViewportMatch")};var f=e=>(0,i.createHigherOrderComponent)((0,i.compose)([w({isViewportMatch:e}),(0,i.ifCondition)((e=>e.isViewportMatch))]),"ifViewportMatches");d({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"}),(window.wp=window.wp||{}).viewport=t}();
|
Loading…
x
Reference in New Issue
Block a user