diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js --- a/wp/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js Fri Sep 05 18:40:08 2025 +0200 @@ -1,33 +1,1 @@ -// element-closest | CC0-1.0 | github.com/jonathantneal/closest - -(function (ElementProto) { - if (typeof ElementProto.matches !== 'function') { - ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) { - var element = this; - var elements = (element.document || element.ownerDocument).querySelectorAll(selector); - var index = 0; - - while (elements[index] && elements[index] !== element) { - ++index; - } - - return Boolean(elements[index]); - }; - } - - if (typeof ElementProto.closest !== 'function') { - ElementProto.closest = function closest(selector) { - var element = this; - - while (element && element.nodeType === 1) { - if (element.matches(selector)) { - return element; - } - - element = element.parentNode; - } - - return null; - }; - } -})(window.Element.prototype); +!function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window);