Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
// EXTERNAL MODULE: ./node_modules/reakit/es/_rollupPluginBabelHelpers-1f0bf8c2.js
[11500] Fix | Delete
var _rollupPluginBabelHelpers_1f0bf8c2 = __webpack_require__("BZp5");
[11501] Fix | Delete
[11502] Fix | Delete
// EXTERNAL MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/useIsomorphicEffect.js
[11503] Fix | Delete
var useIsomorphicEffect = __webpack_require__("KohD");
[11504] Fix | Delete
[11505] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/useSealedState.js
[11506] Fix | Delete
[11507] Fix | Delete
[11508] Fix | Delete
/**
[11509] Fix | Delete
* React custom hook that returns the very first value passed to `initialState`,
[11510] Fix | Delete
* even if it changes between re-renders.
[11511] Fix | Delete
*/
[11512] Fix | Delete
function useSealedState(initialState) {
[11513] Fix | Delete
var _React$useState = Object(external_React_["useState"])(initialState),
[11514] Fix | Delete
sealed = _React$useState[0];
[11515] Fix | Delete
[11516] Fix | Delete
return sealed;
[11517] Fix | Delete
}
[11518] Fix | Delete
[11519] Fix | Delete
[11520] Fix | Delete
[11521] Fix | Delete
// EXTERNAL MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/getDocument.js
[11522] Fix | Delete
var getDocument = __webpack_require__("Ccil");
[11523] Fix | Delete
[11524] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/reverse-30eaa122.js
[11525] Fix | Delete
[11526] Fix | Delete
[11527] Fix | Delete
function groupItems(items) {
[11528] Fix | Delete
var groups = [[]];
[11529] Fix | Delete
[11530] Fix | Delete
var _loop = function _loop() {
[11531] Fix | Delete
var item = _step.value;
[11532] Fix | Delete
var group = groups.find(function (g) {
[11533] Fix | Delete
return !g[0] || g[0].groupId === item.groupId;
[11534] Fix | Delete
});
[11535] Fix | Delete
[11536] Fix | Delete
if (group) {
[11537] Fix | Delete
group.push(item);
[11538] Fix | Delete
} else {
[11539] Fix | Delete
groups.push([item]);
[11540] Fix | Delete
}
[11541] Fix | Delete
};
[11542] Fix | Delete
[11543] Fix | Delete
for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2["c" /* b */])(items), _step; !(_step = _iterator()).done;) {
[11544] Fix | Delete
_loop();
[11545] Fix | Delete
}
[11546] Fix | Delete
[11547] Fix | Delete
return groups;
[11548] Fix | Delete
}
[11549] Fix | Delete
[11550] Fix | Delete
function flatten(grid) {
[11551] Fix | Delete
var flattened = [];
[11552] Fix | Delete
[11553] Fix | Delete
for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2["c" /* b */])(grid), _step; !(_step = _iterator()).done;) {
[11554] Fix | Delete
var row = _step.value;
[11555] Fix | Delete
flattened.push.apply(flattened, row);
[11556] Fix | Delete
}
[11557] Fix | Delete
[11558] Fix | Delete
return flattened;
[11559] Fix | Delete
}
[11560] Fix | Delete
[11561] Fix | Delete
function reverse(array) {
[11562] Fix | Delete
return array.slice().reverse();
[11563] Fix | Delete
}
[11564] Fix | Delete
[11565] Fix | Delete
[11566] Fix | Delete
[11567] Fix | Delete
// EXTERNAL MODULE: ./node_modules/reakit/es/getCurrentId-5aa9849e.js
[11568] Fix | Delete
var getCurrentId_5aa9849e = __webpack_require__("iYXd");
[11569] Fix | Delete
[11570] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/findEnabledItemById-8ddca752.js
[11571] Fix | Delete
function findEnabledItemById(items, id) {
[11572] Fix | Delete
if (!id) return undefined;
[11573] Fix | Delete
return items === null || items === void 0 ? void 0 : items.find(function (item) {
[11574] Fix | Delete
return item.id === id && !item.disabled;
[11575] Fix | Delete
});
[11576] Fix | Delete
}
[11577] Fix | Delete
[11578] Fix | Delete
[11579] Fix | Delete
[11580] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/applyState.js
[11581] Fix | Delete
function isUpdater(argument) {
[11582] Fix | Delete
return typeof argument === "function";
[11583] Fix | Delete
}
[11584] Fix | Delete
/**
[11585] Fix | Delete
* Receives a `setState` argument and calls it with `currentValue` if it's a
[11586] Fix | Delete
* function. Otherwise return the argument as the new value.
[11587] Fix | Delete
*
[11588] Fix | Delete
* @example
[11589] Fix | Delete
* import { applyState } from "reakit-utils";
[11590] Fix | Delete
*
[11591] Fix | Delete
* applyState((value) => value + 1, 1); // 2
[11592] Fix | Delete
* applyState(2, 1); // 2
[11593] Fix | Delete
*/
[11594] Fix | Delete
[11595] Fix | Delete
[11596] Fix | Delete
function applyState(argument, currentValue) {
[11597] Fix | Delete
if (isUpdater(argument)) {
[11598] Fix | Delete
return argument(currentValue);
[11599] Fix | Delete
}
[11600] Fix | Delete
[11601] Fix | Delete
return argument;
[11602] Fix | Delete
}
[11603] Fix | Delete
[11604] Fix | Delete
[11605] Fix | Delete
[11606] Fix | Delete
// EXTERNAL MODULE: ./node_modules/reakit/es/Id/IdProvider.js
[11607] Fix | Delete
var IdProvider = __webpack_require__("KCH1");
[11608] Fix | Delete
[11609] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/Id/IdState.js
[11610] Fix | Delete
[11611] Fix | Delete
[11612] Fix | Delete
[11613] Fix | Delete
[11614] Fix | Delete
function unstable_useIdState(initialState) {
[11615] Fix | Delete
if (initialState === void 0) {
[11616] Fix | Delete
initialState = {};
[11617] Fix | Delete
}
[11618] Fix | Delete
[11619] Fix | Delete
var _useSealedState = useSealedState(initialState),
[11620] Fix | Delete
initialBaseId = _useSealedState.baseId;
[11621] Fix | Delete
[11622] Fix | Delete
var generateId = Object(external_React_["useContext"])(IdProvider["a" /* unstable_IdContext */]);
[11623] Fix | Delete
var idCountRef = Object(external_React_["useRef"])(0);
[11624] Fix | Delete
[11625] Fix | Delete
var _React$useState = Object(external_React_["useState"])(function () {
[11626] Fix | Delete
return initialBaseId || generateId();
[11627] Fix | Delete
}),
[11628] Fix | Delete
baseId = _React$useState[0],
[11629] Fix | Delete
setBaseId = _React$useState[1];
[11630] Fix | Delete
[11631] Fix | Delete
return {
[11632] Fix | Delete
baseId: baseId,
[11633] Fix | Delete
setBaseId: setBaseId,
[11634] Fix | Delete
unstable_idCountRef: idCountRef
[11635] Fix | Delete
};
[11636] Fix | Delete
}
[11637] Fix | Delete
[11638] Fix | Delete
[11639] Fix | Delete
[11640] Fix | Delete
// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/CompositeState.js
[11641] Fix | Delete
[11642] Fix | Delete
[11643] Fix | Delete
[11644] Fix | Delete
[11645] Fix | Delete
[11646] Fix | Delete
[11647] Fix | Delete
[11648] Fix | Delete
[11649] Fix | Delete
[11650] Fix | Delete
[11651] Fix | Delete
[11652] Fix | Delete
[11653] Fix | Delete
function isElementPreceding(element1, element2) {
[11654] Fix | Delete
return Boolean(element2.compareDocumentPosition(element1) & Node.DOCUMENT_POSITION_PRECEDING);
[11655] Fix | Delete
}
[11656] Fix | Delete
[11657] Fix | Delete
function findDOMIndex(items, item) {
[11658] Fix | Delete
return items.findIndex(function (currentItem) {
[11659] Fix | Delete
if (!currentItem.ref.current || !item.ref.current) {
[11660] Fix | Delete
return false;
[11661] Fix | Delete
}
[11662] Fix | Delete
[11663] Fix | Delete
return isElementPreceding(item.ref.current, currentItem.ref.current);
[11664] Fix | Delete
});
[11665] Fix | Delete
}
[11666] Fix | Delete
[11667] Fix | Delete
function getMaxLength(rows) {
[11668] Fix | Delete
var maxLength = 0;
[11669] Fix | Delete
[11670] Fix | Delete
for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2["c" /* b */])(rows), _step; !(_step = _iterator()).done;) {
[11671] Fix | Delete
var length = _step.value.length;
[11672] Fix | Delete
[11673] Fix | Delete
if (length > maxLength) {
[11674] Fix | Delete
maxLength = length;
[11675] Fix | Delete
}
[11676] Fix | Delete
}
[11677] Fix | Delete
[11678] Fix | Delete
return maxLength;
[11679] Fix | Delete
}
[11680] Fix | Delete
[11681] Fix | Delete
/**
[11682] Fix | Delete
* Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]
[11683] Fix | Delete
*/
[11684] Fix | Delete
[11685] Fix | Delete
function verticalizeItems(items) {
[11686] Fix | Delete
var groups = groupItems(items);
[11687] Fix | Delete
var maxLength = getMaxLength(groups);
[11688] Fix | Delete
var verticalized = [];
[11689] Fix | Delete
[11690] Fix | Delete
for (var i = 0; i < maxLength; i += 1) {
[11691] Fix | Delete
for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2["c" /* b */])(groups), _step; !(_step = _iterator()).done;) {
[11692] Fix | Delete
var group = _step.value;
[11693] Fix | Delete
[11694] Fix | Delete
if (group[i]) {
[11695] Fix | Delete
verticalized.push(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, group[i]), {}, {
[11696] Fix | Delete
// If there's no groupId, it means that it's not a grid composite,
[11697] Fix | Delete
// but a single row instead. So, instead of verticalizing it, that
[11698] Fix | Delete
// is, assigning a different groupId based on the column index, we
[11699] Fix | Delete
// keep it undefined so they will be part of the same group.
[11700] Fix | Delete
// It's useful when using up/down on one-dimensional composites.
[11701] Fix | Delete
groupId: group[i].groupId ? "" + i : undefined
[11702] Fix | Delete
}));
[11703] Fix | Delete
}
[11704] Fix | Delete
}
[11705] Fix | Delete
}
[11706] Fix | Delete
[11707] Fix | Delete
return verticalized;
[11708] Fix | Delete
}
[11709] Fix | Delete
[11710] Fix | Delete
function createEmptyItem(groupId) {
[11711] Fix | Delete
return {
[11712] Fix | Delete
id: "__EMPTY_ITEM__",
[11713] Fix | Delete
disabled: true,
[11714] Fix | Delete
ref: {
[11715] Fix | Delete
current: null
[11716] Fix | Delete
},
[11717] Fix | Delete
groupId: groupId
[11718] Fix | Delete
};
[11719] Fix | Delete
}
[11720] Fix | Delete
/**
[11721] Fix | Delete
* Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]
[11722] Fix | Delete
*/
[11723] Fix | Delete
[11724] Fix | Delete
[11725] Fix | Delete
function fillGroups(groups, currentId, shift) {
[11726] Fix | Delete
var maxLength = getMaxLength(groups);
[11727] Fix | Delete
[11728] Fix | Delete
for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2["c" /* b */])(groups), _step; !(_step = _iterator()).done;) {
[11729] Fix | Delete
var group = _step.value;
[11730] Fix | Delete
[11731] Fix | Delete
for (var i = 0; i < maxLength; i += 1) {
[11732] Fix | Delete
var item = group[i];
[11733] Fix | Delete
[11734] Fix | Delete
if (!item || shift && item.disabled) {
[11735] Fix | Delete
var isFrist = i === 0;
[11736] Fix | Delete
var previousItem = isFrist && shift ? Object(getCurrentId_5aa9849e["a" /* f */])(group) : group[i - 1];
[11737] Fix | Delete
group[i] = previousItem && currentId !== (previousItem === null || previousItem === void 0 ? void 0 : previousItem.id) && shift ? previousItem : createEmptyItem(previousItem === null || previousItem === void 0 ? void 0 : previousItem.groupId);
[11738] Fix | Delete
}
[11739] Fix | Delete
}
[11740] Fix | Delete
}
[11741] Fix | Delete
[11742] Fix | Delete
return groups;
[11743] Fix | Delete
}
[11744] Fix | Delete
[11745] Fix | Delete
var nullItem = {
[11746] Fix | Delete
id: null,
[11747] Fix | Delete
ref: {
[11748] Fix | Delete
current: null
[11749] Fix | Delete
}
[11750] Fix | Delete
};
[11751] Fix | Delete
function placeItemsAfter(items, id, shouldInsertNullItem) {
[11752] Fix | Delete
var index = items.findIndex(function (item) {
[11753] Fix | Delete
return item.id === id;
[11754] Fix | Delete
});
[11755] Fix | Delete
return [].concat(items.slice(index + 1), shouldInsertNullItem ? [nullItem] : [], items.slice(0, index));
[11756] Fix | Delete
}
[11757] Fix | Delete
[11758] Fix | Delete
function getItemsInGroup(items, groupId) {
[11759] Fix | Delete
return items.filter(function (item) {
[11760] Fix | Delete
return item.groupId === groupId;
[11761] Fix | Delete
});
[11762] Fix | Delete
}
[11763] Fix | Delete
[11764] Fix | Delete
var map = {
[11765] Fix | Delete
horizontal: "vertical",
[11766] Fix | Delete
vertical: "horizontal"
[11767] Fix | Delete
};
[11768] Fix | Delete
function getOppositeOrientation(orientation) {
[11769] Fix | Delete
return orientation && map[orientation];
[11770] Fix | Delete
}
[11771] Fix | Delete
[11772] Fix | Delete
function addItemAtIndex(array, item, index) {
[11773] Fix | Delete
if (!(index in array)) {
[11774] Fix | Delete
return [].concat(array, [item]);
[11775] Fix | Delete
}
[11776] Fix | Delete
[11777] Fix | Delete
return [].concat(array.slice(0, index), [item], array.slice(index));
[11778] Fix | Delete
}
[11779] Fix | Delete
[11780] Fix | Delete
function sortBasedOnDOMPosition(items) {
[11781] Fix | Delete
var pairs = items.map(function (item, index) {
[11782] Fix | Delete
return [index, item];
[11783] Fix | Delete
});
[11784] Fix | Delete
var isOrderDifferent = false;
[11785] Fix | Delete
pairs.sort(function (_ref, _ref2) {
[11786] Fix | Delete
var indexA = _ref[0],
[11787] Fix | Delete
a = _ref[1];
[11788] Fix | Delete
var indexB = _ref2[0],
[11789] Fix | Delete
b = _ref2[1];
[11790] Fix | Delete
var elementA = a.ref.current;
[11791] Fix | Delete
var elementB = b.ref.current;
[11792] Fix | Delete
if (!elementA || !elementB) return 0; // a before b
[11793] Fix | Delete
[11794] Fix | Delete
if (isElementPreceding(elementA, elementB)) {
[11795] Fix | Delete
if (indexA > indexB) {
[11796] Fix | Delete
isOrderDifferent = true;
[11797] Fix | Delete
}
[11798] Fix | Delete
[11799] Fix | Delete
return -1;
[11800] Fix | Delete
} // a after b
[11801] Fix | Delete
[11802] Fix | Delete
[11803] Fix | Delete
if (indexA < indexB) {
[11804] Fix | Delete
isOrderDifferent = true;
[11805] Fix | Delete
}
[11806] Fix | Delete
[11807] Fix | Delete
return 1;
[11808] Fix | Delete
});
[11809] Fix | Delete
[11810] Fix | Delete
if (isOrderDifferent) {
[11811] Fix | Delete
return pairs.map(function (_ref3) {
[11812] Fix | Delete
var _ = _ref3[0],
[11813] Fix | Delete
item = _ref3[1];
[11814] Fix | Delete
return item;
[11815] Fix | Delete
});
[11816] Fix | Delete
}
[11817] Fix | Delete
[11818] Fix | Delete
return items;
[11819] Fix | Delete
}
[11820] Fix | Delete
[11821] Fix | Delete
function setItemsBasedOnDOMPosition(items, setItems) {
[11822] Fix | Delete
var sortedItems = sortBasedOnDOMPosition(items);
[11823] Fix | Delete
[11824] Fix | Delete
if (items !== sortedItems) {
[11825] Fix | Delete
setItems(sortedItems);
[11826] Fix | Delete
}
[11827] Fix | Delete
}
[11828] Fix | Delete
[11829] Fix | Delete
function getCommonParent(items) {
[11830] Fix | Delete
var _firstItem$ref$curren;
[11831] Fix | Delete
[11832] Fix | Delete
var firstItem = items[0],
[11833] Fix | Delete
nextItems = items.slice(1);
[11834] Fix | Delete
var parentElement = firstItem === null || firstItem === void 0 ? void 0 : (_firstItem$ref$curren = firstItem.ref.current) === null || _firstItem$ref$curren === void 0 ? void 0 : _firstItem$ref$curren.parentElement;
[11835] Fix | Delete
[11836] Fix | Delete
var _loop = function _loop() {
[11837] Fix | Delete
var parent = parentElement;
[11838] Fix | Delete
[11839] Fix | Delete
if (nextItems.every(function (item) {
[11840] Fix | Delete
return parent.contains(item.ref.current);
[11841] Fix | Delete
})) {
[11842] Fix | Delete
return {
[11843] Fix | Delete
v: parentElement
[11844] Fix | Delete
};
[11845] Fix | Delete
}
[11846] Fix | Delete
[11847] Fix | Delete
parentElement = parentElement.parentElement;
[11848] Fix | Delete
};
[11849] Fix | Delete
[11850] Fix | Delete
while (parentElement) {
[11851] Fix | Delete
var _ret = _loop();
[11852] Fix | Delete
[11853] Fix | Delete
if (typeof _ret === "object") return _ret.v;
[11854] Fix | Delete
}
[11855] Fix | Delete
[11856] Fix | Delete
return Object(getDocument["a" /* getDocument */])(parentElement).body;
[11857] Fix | Delete
} // istanbul ignore next: JSDOM doesn't support IntersectionObverser
[11858] Fix | Delete
// See https://github.com/jsdom/jsdom/issues/2032
[11859] Fix | Delete
[11860] Fix | Delete
[11861] Fix | Delete
function useIntersectionObserver(items, setItems) {
[11862] Fix | Delete
var previousItems = Object(external_React_["useRef"])([]);
[11863] Fix | Delete
Object(external_React_["useEffect"])(function () {
[11864] Fix | Delete
var callback = function callback() {
[11865] Fix | Delete
var hasPreviousItems = !!previousItems.current.length; // We don't want to sort items if items have been just registered.
[11866] Fix | Delete
[11867] Fix | Delete
if (hasPreviousItems) {
[11868] Fix | Delete
setItemsBasedOnDOMPosition(items, setItems);
[11869] Fix | Delete
}
[11870] Fix | Delete
[11871] Fix | Delete
previousItems.current = items;
[11872] Fix | Delete
};
[11873] Fix | Delete
[11874] Fix | Delete
var root = getCommonParent(items);
[11875] Fix | Delete
var observer = new IntersectionObserver(callback, {
[11876] Fix | Delete
root: root
[11877] Fix | Delete
});
[11878] Fix | Delete
[11879] Fix | Delete
for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2["c" /* b */])(items), _step; !(_step = _iterator()).done;) {
[11880] Fix | Delete
var item = _step.value;
[11881] Fix | Delete
[11882] Fix | Delete
if (item.ref.current) {
[11883] Fix | Delete
observer.observe(item.ref.current);
[11884] Fix | Delete
}
[11885] Fix | Delete
}
[11886] Fix | Delete
[11887] Fix | Delete
return function () {
[11888] Fix | Delete
observer.disconnect();
[11889] Fix | Delete
};
[11890] Fix | Delete
}, [items]);
[11891] Fix | Delete
}
[11892] Fix | Delete
[11893] Fix | Delete
function useTimeoutObserver(items, setItems) {
[11894] Fix | Delete
Object(external_React_["useEffect"])(function () {
[11895] Fix | Delete
var callback = function callback() {
[11896] Fix | Delete
return setItemsBasedOnDOMPosition(items, setItems);
[11897] Fix | Delete
};
[11898] Fix | Delete
[11899] Fix | Delete
var timeout = setTimeout(callback, 250);
[11900] Fix | Delete
return function () {
[11901] Fix | Delete
return clearTimeout(timeout);
[11902] Fix | Delete
};
[11903] Fix | Delete
});
[11904] Fix | Delete
}
[11905] Fix | Delete
[11906] Fix | Delete
function useSortBasedOnDOMPosition(items, setItems) {
[11907] Fix | Delete
if (typeof IntersectionObserver === "function") {
[11908] Fix | Delete
useIntersectionObserver(items, setItems);
[11909] Fix | Delete
} else {
[11910] Fix | Delete
useTimeoutObserver(items, setItems);
[11911] Fix | Delete
}
[11912] Fix | Delete
}
[11913] Fix | Delete
[11914] Fix | Delete
function CompositeState_reducer(state, action) {
[11915] Fix | Delete
var virtual = state.unstable_virtual,
[11916] Fix | Delete
rtl = state.rtl,
[11917] Fix | Delete
orientation = state.orientation,
[11918] Fix | Delete
items = state.items,
[11919] Fix | Delete
groups = state.groups,
[11920] Fix | Delete
currentId = state.currentId,
[11921] Fix | Delete
loop = state.loop,
[11922] Fix | Delete
wrap = state.wrap,
[11923] Fix | Delete
pastIds = state.pastIds,
[11924] Fix | Delete
shift = state.shift,
[11925] Fix | Delete
moves = state.unstable_moves,
[11926] Fix | Delete
includesBaseElement = state.unstable_includesBaseElement,
[11927] Fix | Delete
initialVirtual = state.initialVirtual,
[11928] Fix | Delete
initialRTL = state.initialRTL,
[11929] Fix | Delete
initialOrientation = state.initialOrientation,
[11930] Fix | Delete
initialCurrentId = state.initialCurrentId,
[11931] Fix | Delete
initialLoop = state.initialLoop,
[11932] Fix | Delete
initialWrap = state.initialWrap,
[11933] Fix | Delete
initialShift = state.initialShift,
[11934] Fix | Delete
hasSetCurrentId = state.hasSetCurrentId;
[11935] Fix | Delete
[11936] Fix | Delete
switch (action.type) {
[11937] Fix | Delete
case "registerGroup":
[11938] Fix | Delete
{
[11939] Fix | Delete
var _group = action.group; // If there are no groups yet, just add it as the first one
[11940] Fix | Delete
[11941] Fix | Delete
if (groups.length === 0) {
[11942] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, state), {}, {
[11943] Fix | Delete
groups: [_group]
[11944] Fix | Delete
});
[11945] Fix | Delete
} // Finds the group index based on DOM position
[11946] Fix | Delete
[11947] Fix | Delete
[11948] Fix | Delete
var index = findDOMIndex(groups, _group);
[11949] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, state), {}, {
[11950] Fix | Delete
groups: addItemAtIndex(groups, _group, index)
[11951] Fix | Delete
});
[11952] Fix | Delete
}
[11953] Fix | Delete
[11954] Fix | Delete
case "unregisterGroup":
[11955] Fix | Delete
{
[11956] Fix | Delete
var _id = action.id;
[11957] Fix | Delete
var nextGroups = groups.filter(function (group) {
[11958] Fix | Delete
return group.id !== _id;
[11959] Fix | Delete
}); // The group isn't registered, so do nothing
[11960] Fix | Delete
[11961] Fix | Delete
if (nextGroups.length === groups.length) {
[11962] Fix | Delete
return state;
[11963] Fix | Delete
}
[11964] Fix | Delete
[11965] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, state), {}, {
[11966] Fix | Delete
groups: nextGroups
[11967] Fix | Delete
});
[11968] Fix | Delete
}
[11969] Fix | Delete
[11970] Fix | Delete
case "registerItem":
[11971] Fix | Delete
{
[11972] Fix | Delete
var _item = action.item; // Finds the item group based on the DOM hierarchy
[11973] Fix | Delete
[11974] Fix | Delete
var _group2 = groups.find(function (r) {
[11975] Fix | Delete
var _r$ref$current;
[11976] Fix | Delete
[11977] Fix | Delete
return (_r$ref$current = r.ref.current) === null || _r$ref$current === void 0 ? void 0 : _r$ref$current.contains(_item.ref.current);
[11978] Fix | Delete
}); // Group will be null if it's a one-dimensional composite
[11979] Fix | Delete
[11980] Fix | Delete
[11981] Fix | Delete
var nextItem = Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({
[11982] Fix | Delete
groupId: _group2 === null || _group2 === void 0 ? void 0 : _group2.id
[11983] Fix | Delete
}, _item);
[11984] Fix | Delete
[11985] Fix | Delete
var _index = findDOMIndex(items, nextItem);
[11986] Fix | Delete
[11987] Fix | Delete
var nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, state), {}, {
[11988] Fix | Delete
items: addItemAtIndex(items, nextItem, _index)
[11989] Fix | Delete
});
[11990] Fix | Delete
[11991] Fix | Delete
if (!hasSetCurrentId && !moves && initialCurrentId === undefined) {
[11992] Fix | Delete
var _findFirstEnabledItem;
[11993] Fix | Delete
[11994] Fix | Delete
// Sets currentId to the first enabled item. This runs whenever an item
[11995] Fix | Delete
// is registered because the first enabled item may be registered
[11996] Fix | Delete
// asynchronously.
[11997] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])(Object(_rollupPluginBabelHelpers_1f0bf8c2["b" /* a */])({}, nextState), {}, {
[11998] Fix | Delete
currentId: (_findFirstEnabledItem = Object(getCurrentId_5aa9849e["a" /* f */])(nextState.items)) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id
[11999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function