11/*!
2- * jQuery Migrate - v3.4.1 - 2023-02-23T15 :31Z
2+ * jQuery Migrate - v3.5.2 - 2024-07-17T22 :31Z
33 * Copyright OpenJS Foundation and other contributors
44 */
55( function ( factory ) {
2424} ) ( function ( jQuery , window ) {
2525"use strict" ;
2626
27- jQuery . migrateVersion = "3.4.1 " ;
27+ jQuery . migrateVersion = "3.5.2 " ;
2828
2929// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
3030function compareVersions ( v1 , v2 ) {
@@ -84,26 +84,26 @@ jQuery.migrateIsPatchEnabled = function( patchCode ) {
8484
8585( function ( ) {
8686
87- // Support: IE9 only
88- // IE9 only creates console object when dev tools are first opened
89- // IE9 console is a host object, callable but doesn't have .apply()
90- if ( ! window . console || ! window . console . log ) {
91- return ;
92- }
87+ // Support: IE9 only
88+ // IE9 only creates console object when dev tools are first opened
89+ // IE9 console is a host object, callable but doesn't have .apply()
90+ if ( ! window . console || ! window . console . log ) {
91+ return ;
92+ }
9393
94- // Need jQuery 3.x-4.x and no older Migrate loaded
95- if ( ! jQuery || ! jQueryVersionSince ( "3.0.0" ) ||
96- jQueryVersionSince ( "5.0.0" ) ) {
97- window . console . log ( "JQMIGRATE: jQuery 3.x-4.x REQUIRED" ) ;
98- }
99- if ( jQuery . migrateWarnings ) {
100- window . console . log ( "JQMIGRATE: Migrate plugin loaded multiple times" ) ;
101- }
94+ // Need jQuery 3.x-4.x and no older Migrate loaded
95+ if ( ! jQuery || ! jQueryVersionSince ( "3.0.0" ) ||
96+ jQueryVersionSince ( "5.0.0" ) ) {
97+ window . console . log ( "JQMIGRATE: jQuery 3.x-4.x REQUIRED" ) ;
98+ }
99+ if ( jQuery . migrateWarnings ) {
100+ window . console . log ( "JQMIGRATE: Migrate plugin loaded multiple times" ) ;
101+ }
102102
103- // Show a message on the console so devs know we're active
104- window . console . log ( "JQMIGRATE: Migrate is installed" +
105- ( jQuery . migrateMute ? "" : " with logging active" ) +
106- ", version " + jQuery . migrateVersion ) ;
103+ // Show a message on the console so devs know we're active
104+ window . console . log ( "JQMIGRATE: Migrate is installed" +
105+ ( jQuery . migrateMute ? "" : " with logging active" ) +
106+ ", version " + jQuery . migrateVersion ) ;
107107
108108} ) ( ) ;
109109
@@ -320,7 +320,8 @@ if ( jQueryVersionSince( "3.2.0" ) ) {
320320
321321if ( jQueryVersionSince ( "3.3.0" ) ) {
322322
323- migratePatchAndWarnFunc ( jQuery , "isNumeric" , function ( obj ) {
323+ migratePatchAndWarnFunc ( jQuery , "isNumeric" ,
324+ function ( obj ) {
324325
325326 // As of jQuery 3.0, isNumeric is limited to
326327 // strings and numbers (primitives or objects)
@@ -417,14 +418,15 @@ if ( !jQueryVersionSince( "4.0.0" ) ) {
417418
418419var oldRemoveAttr = jQuery . fn . removeAttr ,
419420 oldToggleClass = jQuery . fn . toggleClass ,
421+ rbooleans = / ^ (?: c h e c k e d | s e l e c t e d | a s y n c | a u t o f o c u s | a u t o p l a y | c o n t r o l s | d e f e r | d i s a b l e d | h i d d e n | i s m a p | l o o p | m u l t i p l e | o p e n | r e a d o n l y | r e q u i r e d | s c o p e d ) $ / i,
420422 rmatchNonSpace = / \S + / g;
421423
422424migratePatchFunc ( jQuery . fn , "removeAttr" , function ( name ) {
423425 var self = this ,
424426 patchNeeded = false ;
425427
426428 jQuery . each ( name . match ( rmatchNonSpace ) , function ( _i , attr ) {
427- if ( jQuery . expr . match . bool . test ( attr ) ) {
429+ if ( rbooleans . test ( attr ) ) {
428430
429431 // Only warn if at least a single node had the property set to
430432 // something else than `false`. Otherwise, this Migrate patch
@@ -472,8 +474,8 @@ migratePatchFunc( jQuery.fn, "toggleClass", function( state ) {
472474 if ( this . setAttribute ) {
473475 this . setAttribute ( "class" ,
474476 className || state === false ?
475- "" :
476- jQuery . data ( this , "__className__" ) || ""
477+ "" :
478+ jQuery . data ( this , "__className__" ) || ""
477479 ) ;
478480 }
479481 } ) ;
@@ -564,7 +566,7 @@ if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) {
564566}
565567
566568// In jQuery >=4 where jQuery.cssNumber is missing fill it with the latest 3.x version:
567- // https://github.com/jquery/jquery/blob/3.6.0 /src/css.js#L212-L233
569+ // https://github.com/jquery/jquery/blob/3.7.1 /src/css.js#L216-L246
568570// This way, number values for the CSS properties below won't start triggering
569571// Migrate warnings when jQuery gets updated to >=4.0.0 (gh-438).
570572if ( jQueryVersionSince ( "4.0.0" ) ) {
@@ -573,8 +575,9 @@ if ( jQueryVersionSince( "4.0.0" ) ) {
573575 // in a `jQuery.fn.css` patch and this usage shouldn't warn.
574576 internalCssNumber = {
575577 animationIterationCount : true ,
578+ aspectRatio : true ,
579+ borderImageSlice : true ,
576580 columnCount : true ,
577- fillOpacity : true ,
578581 flexGrow : true ,
579582 flexShrink : true ,
580583 fontWeight : true ,
@@ -589,9 +592,17 @@ if ( jQueryVersionSince( "4.0.0" ) ) {
589592 opacity : true ,
590593 order : true ,
591594 orphans : true ,
595+ scale : true ,
592596 widows : true ,
593597 zIndex : true ,
594- zoom : true
598+ zoom : true ,
599+
600+ // SVG-related
601+ fillOpacity : true ,
602+ floodOpacity : true ,
603+ stopOpacity : true ,
604+ strokeMiterlimit : true ,
605+ strokeOpacity : true
595606 } ;
596607
597608 if ( typeof Proxy !== "undefined" ) {
@@ -837,16 +848,16 @@ jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
837848jQuery . each ( ( "blur focus focusin focusout resize scroll click dblclick " +
838849 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
839850 "change select submit keydown keypress keyup contextmenu" ) . split ( " " ) ,
840- function ( _i , name ) {
851+ function ( _i , name ) {
841852
842853 // Handle event binding
843854 migratePatchAndWarnFunc ( jQuery . fn , name , function ( data , fn ) {
844855 return arguments . length > 0 ?
845856 this . on ( name , null , data , fn ) :
846857 this . trigger ( name ) ;
847- } ,
848- "shorthand-deprecated-v3" ,
849- "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
858+ } ,
859+ "shorthand-deprecated-v3" ,
860+ "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
850861} ) ;
851862
852863// Trigger "ready" event only once, on document ready
@@ -898,9 +909,11 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\
898909 * Deprecated, please use `jQuery.migrateDisablePatches( "self-closed-tags" )` instead.
899910 * @deprecated
900911 */
901- jQuery . UNSAFE_restoreLegacyHtmlPrefilter = function ( ) {
912+ migratePatchAndWarnFunc ( jQuery , "UNSAFE_restoreLegacyHtmlPrefilter" , function ( ) {
902913 jQuery . migrateEnablePatches ( "self-closed-tags" ) ;
903- } ;
914+ } , "legacy-self-closed-tags" ,
915+ "jQuery.UNSAFE_restoreLegacyHtmlPrefilter deprecated; use " +
916+ "`jQuery.migrateEnablePatches( \"self-closed-tags\" )`" ) ;
904917
905918migratePatchFunc ( jQuery , "htmlPrefilter" , function ( html ) {
906919 warnIfChanged ( html ) ;
0 commit comments