2024-01-31 13:59:56 +01:00
|
|
|
/******/ (() => { // webpackBootstrap
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/ "use strict";
|
|
|
|
/******/ // The require scope
|
|
|
|
/******/ var __webpack_require__ = {};
|
|
|
|
/******/
|
|
|
|
/************************************************************************/
|
|
|
|
/******/ /* webpack/runtime/define property getters */
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ (() => {
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/ // define getter functions for harmony exports
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ __webpack_require__.d = (exports, definition) => {
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/ for(var key in definition) {
|
|
|
|
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
|
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
|
|
/******/ }
|
|
|
|
/******/ }
|
|
|
|
/******/ };
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ })();
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/
|
|
|
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ (() => {
|
|
|
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
|
|
/******/ })();
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/
|
|
|
|
/******/ /* webpack/runtime/make namespace object */
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ (() => {
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/ // define __esModule on exports
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ __webpack_require__.r = (exports) => {
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
/******/ }
|
|
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
2018-12-14 05:41:57 +01:00
|
|
|
/******/ };
|
2024-01-31 13:59:56 +01:00
|
|
|
/******/ })();
|
2022-04-11 14:04:30 +02:00
|
|
|
/******/
|
2018-12-14 05:41:57 +01:00
|
|
|
/************************************************************************/
|
2022-04-11 14:04:30 +02:00
|
|
|
var __webpack_exports__ = {};
|
2021-01-28 03:04:13 +01:00
|
|
|
// ESM COMPAT FLAG
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
2018-12-14 05:41:57 +01:00
|
|
|
|
2021-01-28 03:04:13 +01:00
|
|
|
// EXPORTS
|
2022-04-11 14:04:30 +02:00
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
2024-01-31 13:59:56 +01:00
|
|
|
"default": () => (/* binding */ isShallowEqual),
|
|
|
|
isShallowEqualArrays: () => (/* reexport */ isShallowEqualArrays),
|
|
|
|
isShallowEqualObjects: () => (/* reexport */ isShallowEqualObjects)
|
2022-04-11 14:04:30 +02:00
|
|
|
});
|
2018-12-14 05:41:57 +01:00
|
|
|
|
2022-04-11 14:04:30 +02:00
|
|
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/objects.js
|
2018-12-14 05:41:57 +01:00
|
|
|
/**
|
2021-01-28 03:04:13 +01:00
|
|
|
* Returns true if the two objects are shallow equal, or false otherwise.
|
2018-12-14 05:41:57 +01:00
|
|
|
*
|
2021-01-28 03:04:13 +01:00
|
|
|
* @param {import('.').ComparableObject} a First object to compare.
|
|
|
|
* @param {import('.').ComparableObject} b Second object to compare.
|
2018-12-14 05:41:57 +01:00
|
|
|
*
|
2021-01-28 03:04:13 +01:00
|
|
|
* @return {boolean} Whether the two objects are shallow equal.
|
2018-12-14 05:41:57 +01:00
|
|
|
*/
|
2021-01-28 03:04:13 +01:00
|
|
|
function isShallowEqualObjects(a, b) {
|
|
|
|
if (a === b) {
|
|
|
|
return true;
|
|
|
|
}
|
2021-05-19 17:09:27 +02:00
|
|
|
const aKeys = Object.keys(a);
|
|
|
|
const bKeys = Object.keys(b);
|
2021-01-28 03:04:13 +01:00
|
|
|
if (aKeys.length !== bKeys.length) {
|
|
|
|
return false;
|
|
|
|
}
|
2021-05-19 17:09:27 +02:00
|
|
|
let i = 0;
|
2021-01-28 03:04:13 +01:00
|
|
|
while (i < aKeys.length) {
|
2021-05-19 17:09:27 +02:00
|
|
|
const key = aKeys[i];
|
|
|
|
const aValue = a[key];
|
2023-09-26 16:23:26 +02:00
|
|
|
if (
|
|
|
|
// In iterating only the keys of the first object after verifying
|
2021-01-28 03:04:13 +01:00
|
|
|
// equal lengths, account for the case that an explicit `undefined`
|
|
|
|
// value in the first is implicitly undefined in the second.
|
|
|
|
//
|
|
|
|
// Example: isShallowEqualObjects( { a: undefined }, { b: 5 } )
|
|
|
|
aValue === undefined && !b.hasOwnProperty(key) || aValue !== b[key]) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2018-12-14 05:41:57 +01:00
|
|
|
|
2022-04-11 14:04:30 +02:00
|
|
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/arrays.js
|
2018-12-14 05:41:57 +01:00
|
|
|
/**
|
2021-01-28 03:04:13 +01:00
|
|
|
* Returns true if the two arrays are shallow equal, or false otherwise.
|
2018-12-14 05:41:57 +01:00
|
|
|
*
|
2021-01-28 03:04:13 +01:00
|
|
|
* @param {any[]} a First array to compare.
|
|
|
|
* @param {any[]} b Second array to compare.
|
2018-12-14 05:41:57 +01:00
|
|
|
*
|
2021-01-28 03:04:13 +01:00
|
|
|
* @return {boolean} Whether the two arrays are shallow equal.
|
2018-12-14 05:41:57 +01:00
|
|
|
*/
|
2021-01-28 03:04:13 +01:00
|
|
|
function isShallowEqualArrays(a, b) {
|
|
|
|
if (a === b) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (a.length !== b.length) {
|
|
|
|
return false;
|
|
|
|
}
|
2021-05-19 17:09:27 +02:00
|
|
|
for (let i = 0, len = a.length; i < len; i++) {
|
2021-01-28 03:04:13 +01:00
|
|
|
if (a[i] !== b[i]) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
2018-12-14 05:41:57 +01:00
|
|
|
}
|
|
|
|
|
2022-04-11 14:04:30 +02:00
|
|
|
;// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/index.js
|
2021-01-28 03:04:13 +01:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2018-12-14 05:41:57 +01:00
|
|
|
|
2018-12-18 04:14:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-26 16:23:26 +02:00
|
|
|
|
2021-01-28 03:04:13 +01:00
|
|
|
/**
|
|
|
|
* @typedef {Record<string, any>} ComparableObject
|
|
|
|
*/
|
2018-12-18 04:14:52 +01:00
|
|
|
|
|
|
|
/**
|
2021-01-28 03:04:13 +01:00
|
|
|
* Returns true if the two arrays or objects are shallow equal, or false
|
2023-06-27 16:24:19 +02:00
|
|
|
* otherwise. Also handles primitive values, just in case.
|
2018-12-18 04:14:52 +01:00
|
|
|
*
|
2023-06-27 16:24:19 +02:00
|
|
|
* @param {unknown} a First object or array to compare.
|
|
|
|
* @param {unknown} b Second object or array to compare.
|
2018-12-18 04:14:52 +01:00
|
|
|
*
|
2021-01-28 03:04:13 +01:00
|
|
|
* @return {boolean} Whether the two values are shallow equal.
|
2018-12-18 04:14:52 +01:00
|
|
|
*/
|
2021-01-28 03:04:13 +01:00
|
|
|
function isShallowEqual(a, b) {
|
|
|
|
if (a && b) {
|
|
|
|
if (a.constructor === Object && b.constructor === Object) {
|
|
|
|
return isShallowEqualObjects(a, b);
|
|
|
|
} else if (Array.isArray(a) && Array.isArray(b)) {
|
|
|
|
return isShallowEqualArrays(a, b);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return a === b;
|
2018-12-18 04:14:52 +01:00
|
|
|
}
|
|
|
|
|
2022-04-11 14:04:30 +02:00
|
|
|
(window.wp = window.wp || {}).isShallowEqual = __webpack_exports__;
|
|
|
|
/******/ })()
|
|
|
|
;
|