diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/js/jquery/jquery-migrate.js
--- a/wp/wp-includes/js/jquery/jquery-migrate.js Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/js/jquery/jquery-migrate.js Wed Sep 21 18:19:35 2022 +0200
@@ -1,30 +1,85 @@
-/*!
- * jQuery Migrate - v1.4.1 - 2016-05-19
- * Copyright jQuery Foundation and other contributors
- */
-(function( jQuery, window, undefined ) {
-// See http://bugs.jquery.com/ticket/13335
-// "use strict";
-
+/*!
+ * jQuery Migrate - v3.3.2 - 2020-11-18T08:29Z
+ * Copyright OpenJS Foundation and other contributors
+ */
+( function( factory ) {
+ "use strict";
+
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define( [ "jquery" ], function( jQuery ) {
+ return factory( jQuery, window );
+ } );
+ } else if ( typeof module === "object" && module.exports ) {
+
+ // Node/CommonJS
+ // eslint-disable-next-line no-undef
+ module.exports = factory( require( "jquery" ), window );
+ } else {
+
+ // Browser globals
+ factory( jQuery, window );
+ }
+} )( function( jQuery, window ) {
+"use strict";
+
+jQuery.migrateVersion = "3.3.2";
+
+// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
+function compareVersions( v1, v2 ) {
+ var i,
+ rVersionParts = /^(\d+)\.(\d+)\.(\d+)/,
+ v1p = rVersionParts.exec( v1 ) || [ ],
+ v2p = rVersionParts.exec( v2 ) || [ ];
-jQuery.migrateVersion = "1.4.1";
-
+ for ( i = 1; i <= 3; i++ ) {
+ if ( +v1p[ i ] > +v2p[ i ] ) {
+ return 1;
+ }
+ if ( +v1p[ i ] < +v2p[ i ] ) {
+ return -1;
+ }
+ }
+ return 0;
+}
+
+function jQueryVersionSince( version ) {
+ return compareVersions( jQuery.fn.jquery, version ) >= 0;
+}
+
+( function() {
+
+ // Support: IE9 only
+ // IE9 only creates console object when dev tools are first opened
+ // IE9 console is a host object, callable but doesn't have .apply()
+ if ( !window.console || !window.console.log ) {
+ return;
+ }
+
+ // Need jQuery 3.0.0+ and no older Migrate loaded
+ if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ) {
+ window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
+ }
+ if ( jQuery.migrateWarnings ) {
+ window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" );
+ }
+
+ // Show a message on the console so devs know we're active
+ window.console.log( "JQMIGRATE: Migrate is installed" +
+ ( jQuery.migrateMute ? "" : " with logging active" ) +
+ ", version " + jQuery.migrateVersion );
+
+} )();
var warnedAbout = {};
+// By default each warning is only reported once.
+jQuery.migrateDeduplicateWarnings = true;
+
// List of warnings already given; public read only
jQuery.migrateWarnings = [];
-// Set to true to prevent console output; migrateWarnings still maintained
-// jQuery.migrateMute = false;
-
-// Show a message on the console so devs know we're active
-if ( window.console && window.console.log ) {
- window.console.log( "JQMIGRATE: Migrate is installed" +
- ( jQuery.migrateMute ? "" : " with logging active" ) +
- ", version " + jQuery.migrateVersion );
-}
-
// Set to false to disable traces that appear with warnings
if ( jQuery.migrateTrace === undefined ) {
jQuery.migrateTrace = true;
@@ -36,9 +91,9 @@
jQuery.migrateWarnings.length = 0;
};
-function migrateWarn( msg) {
+function migrateWarn( msg ) {
var console = window.console;
- if ( !warnedAbout[ msg ] ) {
+ if ( !jQuery.migrateDeduplicateWarnings || !warnedAbout[ msg ] ) {
warnedAbout[ msg ] = true;
jQuery.migrateWarnings.push( msg );
if ( console && console.warn && !jQuery.migrateMute ) {
@@ -51,209 +106,56 @@
}
function migrateWarnProp( obj, prop, value, msg ) {
- if ( Object.defineProperty ) {
- // On ES5 browsers (non-oldIE), warn if the code tries to get prop;
- // allow property to be overwritten in case some other plugin wants it
- try {
- Object.defineProperty( obj, prop, {
- configurable: true,
- enumerable: true,
- get: function() {
- migrateWarn( msg );
- return value;
- },
- set: function( newValue ) {
- migrateWarn( msg );
- value = newValue;
- }
- });
- return;
- } catch( err ) {
- // IE8 is a dope about Object.defineProperty, can't warn there
+ Object.defineProperty( obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ migrateWarn( msg );
+ return value;
+ },
+ set: function( newValue ) {
+ migrateWarn( msg );
+ value = newValue;
}
- }
-
- // Non-ES5 (or broken) browser; just set the property
- jQuery._definePropertyBroken = true;
- obj[ prop ] = value;
+ } );
}
-if ( document.compatMode === "BackCompat" ) {
- // jQuery has never supported or tested Quirks Mode
+function migrateWarnFunc( obj, prop, newFunc, msg ) {
+ obj[ prop ] = function() {
+ migrateWarn( msg );
+ return newFunc.apply( this, arguments );
+ };
+}
+
+if ( window.document.compatMode === "BackCompat" ) {
+
+ // JQuery has never supported or tested Quirks Mode
migrateWarn( "jQuery is not compatible with Quirks Mode" );
}
-
-var attrFn = jQuery( "", { size: 1 } ).attr("size") && jQuery.attrFn,
- oldAttr = jQuery.attr,
- valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
- function() { return null; },
- valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
- function() { return undefined; },
- rnoType = /^(?:input|button)$/i,
- rnoAttrNodeType = /^[238]$/,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- ruseDefault = /^(?:checked|selected)$/i;
+var findProp,
+ class2type = {},
+ oldInit = jQuery.fn.init,
+ oldFind = jQuery.find,
-// jQuery.attrFn
-migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
+ rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
+ rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
-jQuery.attr = function( elem, name, value, pass ) {
- var lowerName = name.toLowerCase(),
- nType = elem && elem.nodeType;
+ // Support: Android <=4.0 only
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
- if ( pass ) {
- // Since pass is used internally, we only warn for new jQuery
- // versions where there isn't a pass arg in the formal params
- if ( oldAttr.length < 4 ) {
- migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
- }
- if ( elem && !rnoAttrNodeType.test( nType ) &&
- (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
- return jQuery( elem )[ name ]( value );
- }
- }
+jQuery.fn.init = function( arg1 ) {
+ var args = Array.prototype.slice.call( arguments );
- // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
- // for disconnected elements we don't warn on $( "