Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
var proto = Object.getPrototypeOf(arg);
[50000] Fix | Delete
if (proto == null) return true;
[50001] Fix | Delete
return ((_proto$constructor = proto.constructor) === null || _proto$constructor === void 0 ? void 0 : _proto$constructor.toString()) === Object.toString();
[50002] Fix | Delete
}
[50003] Fix | Delete
[50004] Fix | Delete
[50005] Fix | Delete
[50006] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/splitProps.js
[50007] Fix | Delete
[50008] Fix | Delete
[50009] Fix | Delete
[50010] Fix | Delete
[50011] Fix | Delete
/**
[50012] Fix | Delete
* Splits an object (`props`) into a tuple where the first item is an object
[50013] Fix | Delete
* with the passed `keys`, and the second item is an object with these keys
[50014] Fix | Delete
* omitted.
[50015] Fix | Delete
*
[50016] Fix | Delete
* @deprecated will be removed in version 2
[50017] Fix | Delete
*
[50018] Fix | Delete
* @example
[50019] Fix | Delete
* import { splitProps } from "reakit-utils";
[50020] Fix | Delete
*
[50021] Fix | Delete
* splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
[50022] Fix | Delete
*/
[50023] Fix | Delete
[50024] Fix | Delete
function __deprecatedSplitProps(props, keys) {
[50025] Fix | Delete
var propsKeys = Object.keys(props);
[50026] Fix | Delete
var picked = {};
[50027] Fix | Delete
var omitted = {};
[50028] Fix | Delete
[50029] Fix | Delete
for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) {
[50030] Fix | Delete
var key = _propsKeys[_i];
[50031] Fix | Delete
[50032] Fix | Delete
if (keys.indexOf(key) >= 0) {
[50033] Fix | Delete
picked[key] = props[key];
[50034] Fix | Delete
} else {
[50035] Fix | Delete
omitted[key] = props[key];
[50036] Fix | Delete
}
[50037] Fix | Delete
}
[50038] Fix | Delete
[50039] Fix | Delete
return [picked, omitted];
[50040] Fix | Delete
}
[50041] Fix | Delete
/**
[50042] Fix | Delete
* Splits an object (`props`) into a tuple where the first item
[50043] Fix | Delete
* is the `state` property, and the second item is the rest of the properties.
[50044] Fix | Delete
*
[50045] Fix | Delete
* It is also backward compatible with version 1. If `keys` are passed then
[50046] Fix | Delete
* splits an object (`props`) into a tuple where the first item is an object
[50047] Fix | Delete
* with the passed `keys`, and the second item is an object with these keys
[50048] Fix | Delete
* omitted.
[50049] Fix | Delete
*
[50050] Fix | Delete
* @example
[50051] Fix | Delete
* import { splitProps } from "reakit-utils";
[50052] Fix | Delete
*
[50053] Fix | Delete
* splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
[50054] Fix | Delete
*
[50055] Fix | Delete
* @example
[50056] Fix | Delete
* import { splitProps } from "reakit-utils";
[50057] Fix | Delete
*
[50058] Fix | Delete
* splitProps({ state: { a: "a" }, b: "b" }); // [{ a: "a" }, { b: "b" }]
[50059] Fix | Delete
*/
[50060] Fix | Delete
[50061] Fix | Delete
[50062] Fix | Delete
function splitProps(props, keys) {
[50063] Fix | Delete
if (keys === void 0) {
[50064] Fix | Delete
keys = [];
[50065] Fix | Delete
}
[50066] Fix | Delete
[50067] Fix | Delete
if (!isPlainObject(props.state)) {
[50068] Fix | Delete
return __deprecatedSplitProps(props, keys);
[50069] Fix | Delete
}
[50070] Fix | Delete
[50071] Fix | Delete
var _deprecatedSplitProp = __deprecatedSplitProps(props, [].concat(keys, ["state"])),
[50072] Fix | Delete
picked = _deprecatedSplitProp[0],
[50073] Fix | Delete
omitted = _deprecatedSplitProp[1];
[50074] Fix | Delete
[50075] Fix | Delete
var state = picked.state,
[50076] Fix | Delete
restPicked = Object(_rollupPluginBabelHelpers_1f0bf8c2["a" /* _ */])(picked, ["state"]);
[50077] Fix | Delete
[50078] Fix | Delete
return [Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, state), restPicked), omitted];
[50079] Fix | Delete
}
[50080] Fix | Delete
[50081] Fix | Delete
[50082] Fix | Delete
[50083] Fix | Delete
// EXTERNAL MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/shallowEqual.js
[50084] Fix | Delete
var shallowEqual = __webpack_require__("PU+x");
[50085] Fix | Delete
[50086] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/normalizePropsAreEqual.js
[50087] Fix | Delete
[50088] Fix | Delete
[50089] Fix | Delete
[50090] Fix | Delete
[50091] Fix | Delete
/**
[50092] Fix | Delete
* This higher order functions take `propsAreEqual` function and
[50093] Fix | Delete
* returns a new function which normalizes the props.
[50094] Fix | Delete
*
[50095] Fix | Delete
* Normalizing in our case is making sure the `propsAreEqual` works with
[50096] Fix | Delete
* both version 1 (object spreading) and version 2 (state object) state passing.
[50097] Fix | Delete
*
[50098] Fix | Delete
* To achieve this, the returned function in case of a state object
[50099] Fix | Delete
* will spread the state object in both `prev` and `next props.
[50100] Fix | Delete
*
[50101] Fix | Delete
* Other case it just returns the function as is which makes sure
[50102] Fix | Delete
* that we are still backward compatible
[50103] Fix | Delete
*/
[50104] Fix | Delete
function normalizePropsAreEqual(propsAreEqual) {
[50105] Fix | Delete
if (propsAreEqual.name === "normalizePropsAreEqualInner") {
[50106] Fix | Delete
return propsAreEqual;
[50107] Fix | Delete
}
[50108] Fix | Delete
[50109] Fix | Delete
return function normalizePropsAreEqualInner(prev, next) {
[50110] Fix | Delete
if (!isPlainObject(prev.state) || !isPlainObject(next.state)) {
[50111] Fix | Delete
return propsAreEqual(prev, next);
[50112] Fix | Delete
}
[50113] Fix | Delete
[50114] Fix | Delete
return propsAreEqual(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, prev.state), prev), Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, next.state), next));
[50115] Fix | Delete
};
[50116] Fix | Delete
}
[50117] Fix | Delete
[50118] Fix | Delete
[50119] Fix | Delete
[50120] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/node_modules/reakit-system/es/createComponent.js
[50121] Fix | Delete
[50122] Fix | Delete
[50123] Fix | Delete
[50124] Fix | Delete
[50125] Fix | Delete
[50126] Fix | Delete
[50127] Fix | Delete
[50128] Fix | Delete
[50129] Fix | Delete
function forwardRef(component) {
[50130] Fix | Delete
return /*#__PURE__*/Object(external_React_["forwardRef"])(component);
[50131] Fix | Delete
}
[50132] Fix | Delete
[50133] Fix | Delete
function memo(component, propsAreEqual) {
[50134] Fix | Delete
return /*#__PURE__*/Object(external_React_["memo"])(component, propsAreEqual);
[50135] Fix | Delete
}
[50136] Fix | Delete
[50137] Fix | Delete
/**
[50138] Fix | Delete
* Creates a React component.
[50139] Fix | Delete
*
[50140] Fix | Delete
* @example
[50141] Fix | Delete
* import { createComponent } from "reakit-system";
[50142] Fix | Delete
*
[50143] Fix | Delete
* const A = createComponent({ as: "a" });
[50144] Fix | Delete
*
[50145] Fix | Delete
* @param options
[50146] Fix | Delete
*/
[50147] Fix | Delete
function createComponent(_ref) {
[50148] Fix | Delete
var type = _ref.as,
[50149] Fix | Delete
useHook = _ref.useHook,
[50150] Fix | Delete
shouldMemo = _ref.memo,
[50151] Fix | Delete
_ref$propsAreEqual = _ref.propsAreEqual,
[50152] Fix | Delete
propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual,
[50153] Fix | Delete
_ref$keys = _ref.keys,
[50154] Fix | Delete
keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys,
[50155] Fix | Delete
_ref$useCreateElement = _ref.useCreateElement,
[50156] Fix | Delete
useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement["a" /* useCreateElement */] : _ref$useCreateElement;
[50157] Fix | Delete
[50158] Fix | Delete
var Comp = function Comp(_ref2, ref) {
[50159] Fix | Delete
var _ref2$as = _ref2.as,
[50160] Fix | Delete
as = _ref2$as === void 0 ? type : _ref2$as,
[50161] Fix | Delete
props = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_ref2, ["as"]);
[50162] Fix | Delete
[50163] Fix | Delete
if (useHook) {
[50164] Fix | Delete
var _as$render;
[50165] Fix | Delete
[50166] Fix | Delete
var _splitProps = splitProps(props, keys),
[50167] Fix | Delete
_options = _splitProps[0],
[50168] Fix | Delete
htmlProps = _splitProps[1];
[50169] Fix | Delete
[50170] Fix | Delete
var _useHook = useHook(_options, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
[50171] Fix | Delete
ref: ref
[50172] Fix | Delete
}, htmlProps)),
[50173] Fix | Delete
wrapElement = _useHook.wrapElement,
[50174] Fix | Delete
elementProps = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_useHook, ["wrapElement"]); // @ts-ignore
[50175] Fix | Delete
[50176] Fix | Delete
[50177] Fix | Delete
var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys;
[50178] Fix | Delete
var asOptions = asKeys && splitProps(props, asKeys)[0];
[50179] Fix | Delete
var allProps = asOptions ? Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, elementProps), asOptions) : elementProps;
[50180] Fix | Delete
[50181] Fix | Delete
var _element = useCreateElement$1(as, allProps);
[50182] Fix | Delete
[50183] Fix | Delete
if (wrapElement) {
[50184] Fix | Delete
return wrapElement(_element);
[50185] Fix | Delete
}
[50186] Fix | Delete
[50187] Fix | Delete
return _element;
[50188] Fix | Delete
}
[50189] Fix | Delete
[50190] Fix | Delete
return useCreateElement$1(as, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
[50191] Fix | Delete
ref: ref
[50192] Fix | Delete
}, props));
[50193] Fix | Delete
};
[50194] Fix | Delete
[50195] Fix | Delete
if (false) {}
[50196] Fix | Delete
[50197] Fix | Delete
Comp = forwardRef(Comp);
[50198] Fix | Delete
[50199] Fix | Delete
if (shouldMemo) {
[50200] Fix | Delete
Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual));
[50201] Fix | Delete
}
[50202] Fix | Delete
[50203] Fix | Delete
Comp.__keys = keys;
[50204] Fix | Delete
Comp.unstable_propsAreEqual = normalizePropsAreEqual(propsAreEqual || shallowEqual["a" /* shallowEqual */]);
[50205] Fix | Delete
return Comp;
[50206] Fix | Delete
}
[50207] Fix | Delete
[50208] Fix | Delete
[50209] Fix | Delete
[50210] Fix | Delete
[50211] Fix | Delete
/***/ }),
[50212] Fix | Delete
[50213] Fix | Delete
/***/ "dRQD":
[50214] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[50215] Fix | Delete
[50216] Fix | Delete
"use strict";
[50217] Fix | Delete
[50218] Fix | Delete
[50219] Fix | Delete
Object.defineProperty(exports, "__esModule", {
[50220] Fix | Delete
value: true
[50221] Fix | Delete
});
[50222] Fix | Delete
exports['default'] = isTransitionEndSupported;
[50223] Fix | Delete
function isTransitionEndSupported() {
[50224] Fix | Delete
return !!(typeof window !== 'undefined' && 'TransitionEvent' in window);
[50225] Fix | Delete
}
[50226] Fix | Delete
[50227] Fix | Delete
/***/ }),
[50228] Fix | Delete
[50229] Fix | Delete
/***/ "dSD1":
[50230] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[50231] Fix | Delete
[50232] Fix | Delete
"use strict";
[50233] Fix | Delete
[50234] Fix | Delete
// EXPORTS
[50235] Fix | Delete
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ slot_fill_Slot; });
[50236] Fix | Delete
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ slot_fill_Fill; });
[50237] Fix | Delete
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createSlotFill; });
[50238] Fix | Delete
[50239] Fix | Delete
// UNUSED EXPORTS: useSlot, Provider
[50240] Fix | Delete
[50241] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
[50242] Fix | Delete
var esm_extends = __webpack_require__("wx14");
[50243] Fix | Delete
[50244] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
[50245] Fix | Delete
var objectWithoutProperties = __webpack_require__("Ff2n");
[50246] Fix | Delete
[50247] Fix | Delete
// EXTERNAL MODULE: external ["wp","element"]
[50248] Fix | Delete
var external_wp_element_ = __webpack_require__("GRId");
[50249] Fix | Delete
[50250] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
[50251] Fix | Delete
var classCallCheck = __webpack_require__("1OyB");
[50252] Fix | Delete
[50253] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
[50254] Fix | Delete
var createClass = __webpack_require__("vuIU");
[50255] Fix | Delete
[50256] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
[50257] Fix | Delete
var assertThisInitialized = __webpack_require__("JX7q");
[50258] Fix | Delete
[50259] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
[50260] Fix | Delete
var getPrototypeOf = __webpack_require__("foSv");
[50261] Fix | Delete
[50262] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/superPropBase.js
[50263] Fix | Delete
[50264] Fix | Delete
function _superPropBase(object, property) {
[50265] Fix | Delete
while (!Object.prototype.hasOwnProperty.call(object, property)) {
[50266] Fix | Delete
object = Object(getPrototypeOf["a" /* default */])(object);
[50267] Fix | Delete
if (object === null) break;
[50268] Fix | Delete
}
[50269] Fix | Delete
[50270] Fix | Delete
return object;
[50271] Fix | Delete
}
[50272] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/get.js
[50273] Fix | Delete
[50274] Fix | Delete
function get_get(target, property, receiver) {
[50275] Fix | Delete
if (typeof Reflect !== "undefined" && Reflect.get) {
[50276] Fix | Delete
get_get = Reflect.get;
[50277] Fix | Delete
} else {
[50278] Fix | Delete
get_get = function _get(target, property, receiver) {
[50279] Fix | Delete
var base = _superPropBase(target, property);
[50280] Fix | Delete
if (!base) return;
[50281] Fix | Delete
var desc = Object.getOwnPropertyDescriptor(base, property);
[50282] Fix | Delete
[50283] Fix | Delete
if (desc.get) {
[50284] Fix | Delete
return desc.get.call(receiver);
[50285] Fix | Delete
}
[50286] Fix | Delete
[50287] Fix | Delete
return desc.value;
[50288] Fix | Delete
};
[50289] Fix | Delete
}
[50290] Fix | Delete
[50291] Fix | Delete
return get_get(target, property, receiver || target);
[50292] Fix | Delete
}
[50293] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
[50294] Fix | Delete
var inherits = __webpack_require__("Ji7U");
[50295] Fix | Delete
[50296] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
[50297] Fix | Delete
var possibleConstructorReturn = __webpack_require__("md7G");
[50298] Fix | Delete
[50299] Fix | Delete
// EXTERNAL MODULE: external "lodash"
[50300] Fix | Delete
var external_lodash_ = __webpack_require__("YLtl");
[50301] Fix | Delete
[50302] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/context.js + 1 modules
[50303] Fix | Delete
var context = __webpack_require__("bSjX");
[50304] Fix | Delete
[50305] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/slot.js
[50306] Fix | Delete
[50307] Fix | Delete
[50308] Fix | Delete
[50309] Fix | Delete
[50310] Fix | Delete
[50311] Fix | Delete
[50312] Fix | Delete
[50313] Fix | Delete
[50314] Fix | Delete
[50315] Fix | Delete
[50316] Fix | Delete
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
[50317] Fix | Delete
[50318] Fix | Delete
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
[50319] Fix | Delete
[50320] Fix | Delete
/**
[50321] Fix | Delete
* External dependencies
[50322] Fix | Delete
*/
[50323] Fix | Delete
[50324] Fix | Delete
/**
[50325] Fix | Delete
* WordPress dependencies
[50326] Fix | Delete
*/
[50327] Fix | Delete
[50328] Fix | Delete
[50329] Fix | Delete
/**
[50330] Fix | Delete
* Internal dependencies
[50331] Fix | Delete
*/
[50332] Fix | Delete
[50333] Fix | Delete
[50334] Fix | Delete
[50335] Fix | Delete
var slot_SlotComponent = /*#__PURE__*/function (_Component) {
[50336] Fix | Delete
Object(inherits["a" /* default */])(SlotComponent, _Component);
[50337] Fix | Delete
[50338] Fix | Delete
var _super = _createSuper(SlotComponent);
[50339] Fix | Delete
[50340] Fix | Delete
function SlotComponent() {
[50341] Fix | Delete
var _this;
[50342] Fix | Delete
[50343] Fix | Delete
Object(classCallCheck["a" /* default */])(this, SlotComponent);
[50344] Fix | Delete
[50345] Fix | Delete
_this = _super.apply(this, arguments);
[50346] Fix | Delete
_this.isUnmounted = false;
[50347] Fix | Delete
_this.bindNode = _this.bindNode.bind(Object(assertThisInitialized["a" /* default */])(_this));
[50348] Fix | Delete
return _this;
[50349] Fix | Delete
}
[50350] Fix | Delete
[50351] Fix | Delete
Object(createClass["a" /* default */])(SlotComponent, [{
[50352] Fix | Delete
key: "componentDidMount",
[50353] Fix | Delete
value: function componentDidMount() {
[50354] Fix | Delete
var registerSlot = this.props.registerSlot;
[50355] Fix | Delete
registerSlot(this.props.name, this);
[50356] Fix | Delete
}
[50357] Fix | Delete
}, {
[50358] Fix | Delete
key: "componentWillUnmount",
[50359] Fix | Delete
value: function componentWillUnmount() {
[50360] Fix | Delete
var unregisterSlot = this.props.unregisterSlot;
[50361] Fix | Delete
this.isUnmounted = true;
[50362] Fix | Delete
unregisterSlot(this.props.name, this);
[50363] Fix | Delete
}
[50364] Fix | Delete
}, {
[50365] Fix | Delete
key: "componentDidUpdate",
[50366] Fix | Delete
value: function componentDidUpdate(prevProps) {
[50367] Fix | Delete
var _this$props = this.props,
[50368] Fix | Delete
name = _this$props.name,
[50369] Fix | Delete
unregisterSlot = _this$props.unregisterSlot,
[50370] Fix | Delete
registerSlot = _this$props.registerSlot;
[50371] Fix | Delete
[50372] Fix | Delete
if (prevProps.name !== name) {
[50373] Fix | Delete
unregisterSlot(prevProps.name);
[50374] Fix | Delete
registerSlot(name, this);
[50375] Fix | Delete
}
[50376] Fix | Delete
}
[50377] Fix | Delete
}, {
[50378] Fix | Delete
key: "bindNode",
[50379] Fix | Delete
value: function bindNode(node) {
[50380] Fix | Delete
this.node = node;
[50381] Fix | Delete
}
[50382] Fix | Delete
}, {
[50383] Fix | Delete
key: "forceUpdate",
[50384] Fix | Delete
value: function forceUpdate() {
[50385] Fix | Delete
if (this.isUnmounted) {
[50386] Fix | Delete
return;
[50387] Fix | Delete
}
[50388] Fix | Delete
[50389] Fix | Delete
get_get(Object(getPrototypeOf["a" /* default */])(SlotComponent.prototype), "forceUpdate", this).call(this);
[50390] Fix | Delete
}
[50391] Fix | Delete
}, {
[50392] Fix | Delete
key: "render",
[50393] Fix | Delete
value: function render() {
[50394] Fix | Delete
var _this$props2 = this.props,
[50395] Fix | Delete
children = _this$props2.children,
[50396] Fix | Delete
name = _this$props2.name,
[50397] Fix | Delete
_this$props2$fillProp = _this$props2.fillProps,
[50398] Fix | Delete
fillProps = _this$props2$fillProp === void 0 ? {} : _this$props2$fillProp,
[50399] Fix | Delete
getFills = _this$props2.getFills;
[50400] Fix | Delete
var fills = Object(external_lodash_["map"])(getFills(name, this), function (fill) {
[50401] Fix | Delete
var fillKey = fill.occurrence;
[50402] Fix | Delete
var fillChildren = Object(external_lodash_["isFunction"])(fill.children) ? fill.children(fillProps) : fill.children;
[50403] Fix | Delete
return external_wp_element_["Children"].map(fillChildren, function (child, childIndex) {
[50404] Fix | Delete
if (!child || Object(external_lodash_["isString"])(child)) {
[50405] Fix | Delete
return child;
[50406] Fix | Delete
}
[50407] Fix | Delete
[50408] Fix | Delete
var childKey = "".concat(fillKey, "---").concat(child.key || childIndex);
[50409] Fix | Delete
return Object(external_wp_element_["cloneElement"])(child, {
[50410] Fix | Delete
key: childKey
[50411] Fix | Delete
});
[50412] Fix | Delete
});
[50413] Fix | Delete
}).filter( // In some cases fills are rendered only when some conditions apply.
[50414] Fix | Delete
// This ensures that we only use non-empty fills when rendering, i.e.,
[50415] Fix | Delete
// it allows us to render wrappers only when the fills are actually present.
[50416] Fix | Delete
Object(external_lodash_["negate"])(external_wp_element_["isEmptyElement"]));
[50417] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_lodash_["isFunction"])(children) ? children(fills) : fills);
[50418] Fix | Delete
}
[50419] Fix | Delete
}]);
[50420] Fix | Delete
[50421] Fix | Delete
return SlotComponent;
[50422] Fix | Delete
}(external_wp_element_["Component"]);
[50423] Fix | Delete
[50424] Fix | Delete
var slot_Slot = function Slot(props) {
[50425] Fix | Delete
return Object(external_wp_element_["createElement"])(context["a" /* Consumer */], null, function (_ref) {
[50426] Fix | Delete
var registerSlot = _ref.registerSlot,
[50427] Fix | Delete
unregisterSlot = _ref.unregisterSlot,
[50428] Fix | Delete
getFills = _ref.getFills;
[50429] Fix | Delete
return Object(external_wp_element_["createElement"])(slot_SlotComponent, Object(esm_extends["a" /* default */])({}, props, {
[50430] Fix | Delete
registerSlot: registerSlot,
[50431] Fix | Delete
unregisterSlot: unregisterSlot,
[50432] Fix | Delete
getFills: getFills
[50433] Fix | Delete
}));
[50434] Fix | Delete
});
[50435] Fix | Delete
};
[50436] Fix | Delete
[50437] Fix | Delete
/* harmony default export */ var slot_fill_slot = (slot_Slot);
[50438] Fix | Delete
[50439] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/fill.js
[50440] Fix | Delete
[50441] Fix | Delete
[50442] Fix | Delete
[50443] Fix | Delete
/**
[50444] Fix | Delete
* External dependencies
[50445] Fix | Delete
*/
[50446] Fix | Delete
[50447] Fix | Delete
/**
[50448] Fix | Delete
* WordPress dependencies
[50449] Fix | Delete
*/
[50450] Fix | Delete
[50451] Fix | Delete
[50452] Fix | Delete
/**
[50453] Fix | Delete
* Internal dependencies
[50454] Fix | Delete
*/
[50455] Fix | Delete
[50456] Fix | Delete
[50457] Fix | Delete
var occurrences = 0;
[50458] Fix | Delete
[50459] Fix | Delete
function fill_FillComponent(_ref) {
[50460] Fix | Delete
var name = _ref.name,
[50461] Fix | Delete
children = _ref.children,
[50462] Fix | Delete
registerFill = _ref.registerFill,
[50463] Fix | Delete
unregisterFill = _ref.unregisterFill;
[50464] Fix | Delete
var slot = Object(context["c" /* useSlot */])(name);
[50465] Fix | Delete
var ref = Object(external_wp_element_["useRef"])({
[50466] Fix | Delete
name: name,
[50467] Fix | Delete
children: children
[50468] Fix | Delete
});
[50469] Fix | Delete
[50470] Fix | Delete
if (!ref.current.occurrence) {
[50471] Fix | Delete
ref.current.occurrence = ++occurrences;
[50472] Fix | Delete
}
[50473] Fix | Delete
[50474] Fix | Delete
Object(external_wp_element_["useLayoutEffect"])(function () {
[50475] Fix | Delete
registerFill(name, ref.current);
[50476] Fix | Delete
return function () {
[50477] Fix | Delete
return unregisterFill(name, ref.current);
[50478] Fix | Delete
};
[50479] Fix | Delete
}, []);
[50480] Fix | Delete
Object(external_wp_element_["useLayoutEffect"])(function () {
[50481] Fix | Delete
ref.current.children = children;
[50482] Fix | Delete
[50483] Fix | Delete
if (slot) {
[50484] Fix | Delete
slot.forceUpdate();
[50485] Fix | Delete
}
[50486] Fix | Delete
}, [children]);
[50487] Fix | Delete
Object(external_wp_element_["useLayoutEffect"])(function () {
[50488] Fix | Delete
if (name === ref.current.name) {
[50489] Fix | Delete
// ignore initial effect
[50490] Fix | Delete
return;
[50491] Fix | Delete
}
[50492] Fix | Delete
[50493] Fix | Delete
unregisterFill(ref.current.name, ref.current);
[50494] Fix | Delete
ref.current.name = name;
[50495] Fix | Delete
registerFill(name, ref.current);
[50496] Fix | Delete
}, [name]);
[50497] Fix | Delete
[50498] Fix | Delete
if (!slot || !slot.node) {
[50499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function