wp/wp-includes/js/jquery/ui/effect.js
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
     1 /*!
     1 /*!
     2  * jQuery UI Effects 1.12.1
     2  * jQuery UI Effects 1.13.1
     3  * http://jqueryui.com
     3  * http://jqueryui.com
     4  *
     4  *
     5  * Copyright jQuery Foundation and other contributors
     5  * Copyright jQuery Foundation and other contributors
     6  * Released under the MIT license.
     6  * Released under the MIT license.
     7  * http://jquery.org/license
     7  * http://jquery.org/license
     8  */
     8  */
     9 
     9 
    10 //>>label: Effects Core
    10 //>>label: Effects Core
    11 //>>group: Effects
    11 //>>group: Effects
    12 // jscs:disable maximumLineLength
    12 /* eslint-disable max-len */
    13 //>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
    13 //>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
    14 // jscs:enable maximumLineLength
    14 /* eslint-enable max-len */
    15 //>>docs: http://api.jqueryui.com/category/effects-core/
    15 //>>docs: http://api.jqueryui.com/category/effects-core/
    16 //>>demos: http://jqueryui.com/effect/
    16 //>>demos: http://jqueryui.com/effect/
    17 
    17 
    18 ( function( factory ) {
    18 ( function( factory ) {
       
    19 	"use strict";
       
    20 
    19 	if ( typeof define === "function" && define.amd ) {
    21 	if ( typeof define === "function" && define.amd ) {
    20 
    22 
    21 		// AMD. Register as an anonymous module.
    23 		// AMD. Register as an anonymous module.
    22 		define( [ "jquery" ], factory );
    24 		define( [ "jquery" ], factory );
    23 	} else {
    25 	} else {
    24 
    26 
    25 		// Browser globals
    27 		// Browser globals
    26 		factory( jQuery );
    28 		factory( jQuery );
    27 	}
    29 	}
    28 }( function( $ ) {
    30 } )( function( $ ) {
       
    31 "use strict";
    29 
    32 
    30 // Include version.js
    33 // Include version.js
    31 $.ui = $.ui || {};
    34 $.ui = $.ui || {};
    32 $.ui.version = "1.12.1";
    35 $.ui.version = "1.13.1";
    33 
    36 
    34 var dataSpace = "ui-effects-",
    37 // Source: jquery-var-for-color.js
    35 	dataSpaceStyle = "ui-effects-style",
    38 // Create a local jQuery because jQuery Color relies on it and the
    36 	dataSpaceAnimated = "ui-effects-animated",
    39 // global may not exist with AMD and a custom build (#10199).
    37 
    40 // This module is a noop if used as a regular AMD module.
    38 	// Create a local jQuery because jQuery Color relies on it and the
    41 // eslint-disable-next-line no-unused-vars
    39 	// global may not exist with AMD and a custom build (#10199)
    42 var jQuery = $;
    40 	jQuery = $;
    43 
    41 
       
    42 $.effects = {
       
    43 	effect: {}
       
    44 };
       
    45 
    44 
    46 /*!
    45 /*!
    47  * jQuery Color Animations v2.1.2
    46  * jQuery Color Animations v2.2.0
    48  * https://github.com/jquery/jquery-color
    47  * https://github.com/jquery/jquery-color
    49  *
    48  *
    50  * Copyright 2014 jQuery Foundation and other contributors
    49  * Copyright OpenJS Foundation and other contributors
    51  * Released under the MIT license.
    50  * Released under the MIT license.
    52  * http://jquery.org/license
    51  * http://jquery.org/license
    53  *
    52  *
    54  * Date: Wed Jan 16 08:47:09 2013 -0600
    53  * Date: Sun May 10 09:02:36 2020 +0200
    55  */
    54  */
    56 ( function( jQuery, undefined ) {
       
    57 
    55 
    58 	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
    56 	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
    59 		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
    57 		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
    60 
    58 
    61 	// Plusequals test for += 100 -= 100
    59 	class2type = {},
       
    60 	toString = class2type.toString,
       
    61 
       
    62 	// plusequals test for += 100 -= 100
    62 	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
    63 	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
    63 
    64 
    64 	// A set of RE's that can match strings and generate color tuples.
    65 	// a set of RE's that can match strings and generate color tuples.
    65 	stringParsers = [ {
    66 	stringParsers = [ {
    66 			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
    67 			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
    67 			parse: function( execResult ) {
    68 			parse: function( execResult ) {
    68 				return [
    69 				return [
    69 					execResult[ 1 ],
    70 					execResult[ 1 ],
    82 					execResult[ 4 ]
    83 					execResult[ 4 ]
    83 				];
    84 				];
    84 			}
    85 			}
    85 		}, {
    86 		}, {
    86 
    87 
    87 			// This regex ignores A-F because it's compared against an already lowercased string
    88 			// this regex ignores A-F because it's compared against an already lowercased string
    88 			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
    89 			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
    89 			parse: function( execResult ) {
    90 			parse: function( execResult ) {
    90 				return [
    91 				return [
    91 					parseInt( execResult[ 1 ], 16 ),
    92 					parseInt( execResult[ 1 ], 16 ),
    92 					parseInt( execResult[ 2 ], 16 ),
    93 					parseInt( execResult[ 2 ], 16 ),
    93 					parseInt( execResult[ 3 ], 16 )
    94 					parseInt( execResult[ 3 ], 16 ),
       
    95 					execResult[ 4 ] ?
       
    96 						( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
       
    97 						1
    94 				];
    98 				];
    95 			}
    99 			}
    96 		}, {
   100 		}, {
    97 
   101 
    98 			// This regex ignores A-F because it's compared against an already lowercased string
   102 			// this regex ignores A-F because it's compared against an already lowercased string
    99 			re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
   103 			re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
   100 			parse: function( execResult ) {
   104 			parse: function( execResult ) {
   101 				return [
   105 				return [
   102 					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
   106 					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
   103 					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
   107 					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
   104 					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
   108 					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
       
   109 					execResult[ 4 ] ?
       
   110 						( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
       
   111 							.toFixed( 2 ) :
       
   112 						1
   105 				];
   113 				];
   106 			}
   114 			}
   107 		}, {
   115 		}, {
   108 			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
   116 			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
   109 			space: "hsla",
   117 			space: "hsla",
   115 					execResult[ 4 ]
   123 					execResult[ 4 ]
   116 				];
   124 				];
   117 			}
   125 			}
   118 		} ],
   126 		} ],
   119 
   127 
   120 	// JQuery.Color( )
   128 	// jQuery.Color( )
   121 	color = jQuery.Color = function( color, green, blue, alpha ) {
   129 	color = jQuery.Color = function( color, green, blue, alpha ) {
   122 		return new jQuery.Color.fn.parse( color, green, blue, alpha );
   130 		return new jQuery.Color.fn.parse( color, green, blue, alpha );
   123 	},
   131 	},
   124 	spaces = {
   132 	spaces = {
   125 		rgba: {
   133 		rgba: {
   169 			floor: true
   177 			floor: true
   170 		}
   178 		}
   171 	},
   179 	},
   172 	support = color.support = {},
   180 	support = color.support = {},
   173 
   181 
   174 	// Element for support tests
   182 	// element for support tests
   175 	supportElem = jQuery( "<p>" )[ 0 ],
   183 	supportElem = jQuery( "<p>" )[ 0 ],
   176 
   184 
   177 	// Colors = jQuery.Color.names
   185 	// colors = jQuery.Color.names
   178 	colors,
   186 	colors,
   179 
   187 
   180 	// Local aliases of functions called often
   188 	// local aliases of functions called often
   181 	each = jQuery.each;
   189 	each = jQuery.each;
   182 
   190 
   183 // Determine rgba support immediately
   191 // determine rgba support immediately
   184 supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
   192 supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
   185 support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
   193 support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
   186 
   194 
   187 // Define cache name and alpha properties
   195 // define cache name and alpha properties
   188 // for rgba and hsla spaces
   196 // for rgba and hsla spaces
   189 each( spaces, function( spaceName, space ) {
   197 each( spaces, function( spaceName, space ) {
   190 	space.cache = "_" + spaceName;
   198 	space.cache = "_" + spaceName;
   191 	space.props.alpha = {
   199 	space.props.alpha = {
   192 		idx: 3,
   200 		idx: 3,
   193 		type: "percent",
   201 		type: "percent",
   194 		def: 1
   202 		def: 1
   195 	};
   203 	};
   196 } );
   204 } );
   197 
   205 
       
   206 // Populate the class2type map
       
   207 jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
       
   208 	function( _i, name ) {
       
   209 		class2type[ "[object " + name + "]" ] = name.toLowerCase();
       
   210 	} );
       
   211 
       
   212 function getType( obj ) {
       
   213 	if ( obj == null ) {
       
   214 		return obj + "";
       
   215 	}
       
   216 
       
   217 	return typeof obj === "object" ?
       
   218 		class2type[ toString.call( obj ) ] || "object" :
       
   219 		typeof obj;
       
   220 }
       
   221 
   198 function clamp( value, prop, allowEmpty ) {
   222 function clamp( value, prop, allowEmpty ) {
   199 	var type = propTypes[ prop.type ] || {};
   223 	var type = propTypes[ prop.type ] || {};
   200 
   224 
   201 	if ( value == null ) {
   225 	if ( value == null ) {
   202 		return ( allowEmpty || !prop.def ) ? null : prop.def;
   226 		return ( allowEmpty || !prop.def ) ? null : prop.def;
   211 		return prop.def;
   235 		return prop.def;
   212 	}
   236 	}
   213 
   237 
   214 	if ( type.mod ) {
   238 	if ( type.mod ) {
   215 
   239 
   216 		// We add mod before modding to make sure that negatives values
   240 		// we add mod before modding to make sure that negatives values
   217 		// get converted properly: -10 -> 350
   241 		// get converted properly: -10 -> 350
   218 		return ( value + type.mod ) % type.mod;
   242 		return ( value + type.mod ) % type.mod;
   219 	}
   243 	}
   220 
   244 
   221 	// For now all property types without mod have min and max
   245 	// for now all property types without mod have min and max
   222 	return 0 > value ? 0 : type.max < value ? type.max : value;
   246 	return Math.min( type.max, Math.max( 0, value ) );
   223 }
   247 }
   224 
   248 
   225 function stringParse( string ) {
   249 function stringParse( string ) {
   226 	var inst = color(),
   250 	var inst = color(),
   227 		rgba = inst._rgba = [];
   251 		rgba = inst._rgba = [];
   228 
   252 
   229 	string = string.toLowerCase();
   253 	string = string.toLowerCase();
   230 
   254 
   231 	each( stringParsers, function( i, parser ) {
   255 	each( stringParsers, function( _i, parser ) {
   232 		var parsed,
   256 		var parsed,
   233 			match = parser.re.exec( string ),
   257 			match = parser.re.exec( string ),
   234 			values = match && parser.parse( match ),
   258 			values = match && parser.parse( match ),
   235 			spaceName = parser.space || "rgba";
   259 			spaceName = parser.space || "rgba";
   236 
   260 
   237 		if ( values ) {
   261 		if ( values ) {
   238 			parsed = inst[ spaceName ]( values );
   262 			parsed = inst[ spaceName ]( values );
   239 
   263 
   240 			// If this was an rgba parse the assignment might happen twice
   264 			// if this was an rgba parse the assignment might happen twice
   241 			// oh well....
   265 			// oh well....
   242 			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
   266 			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
   243 			rgba = inst._rgba = parsed._rgba;
   267 			rgba = inst._rgba = parsed._rgba;
   244 
   268 
   245 			// Exit each( stringParsers ) here because we matched
   269 			// exit each( stringParsers ) here because we matched
   246 			return false;
   270 			return false;
   247 		}
   271 		}
   248 	} );
   272 	} );
   249 
   273 
   250 	// Found a stringParser that handled it
   274 	// Found a stringParser that handled it
   251 	if ( rgba.length ) {
   275 	if ( rgba.length ) {
   252 
   276 
   253 		// If this came from a parsed string, force "transparent" when alpha is 0
   277 		// if this came from a parsed string, force "transparent" when alpha is 0
   254 		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
   278 		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
   255 		if ( rgba.join() === "0,0,0,0" ) {
   279 		if ( rgba.join() === "0,0,0,0" ) {
   256 			jQuery.extend( rgba, colors.transparent );
   280 			jQuery.extend( rgba, colors.transparent );
   257 		}
   281 		}
   258 		return inst;
   282 		return inst;
   259 	}
   283 	}
   260 
   284 
   261 	// Named colors
   285 	// named colors
   262 	return colors[ string ];
   286 	return colors[ string ];
   263 }
   287 }
   264 
   288 
   265 color.fn = jQuery.extend( color.prototype, {
   289 color.fn = jQuery.extend( color.prototype, {
   266 	parse: function( red, green, blue, alpha ) {
   290 	parse: function( red, green, blue, alpha ) {
   272 			red = jQuery( red ).css( green );
   296 			red = jQuery( red ).css( green );
   273 			green = undefined;
   297 			green = undefined;
   274 		}
   298 		}
   275 
   299 
   276 		var inst = this,
   300 		var inst = this,
   277 			type = jQuery.type( red ),
   301 			type = getType( red ),
   278 			rgba = this._rgba = [];
   302 			rgba = this._rgba = [];
   279 
   303 
   280 		// More than 1 argument specified - assume ( red, green, blue, alpha )
   304 		// more than 1 argument specified - assume ( red, green, blue, alpha )
   281 		if ( green !== undefined ) {
   305 		if ( green !== undefined ) {
   282 			red = [ red, green, blue, alpha ];
   306 			red = [ red, green, blue, alpha ];
   283 			type = "array";
   307 			type = "array";
   284 		}
   308 		}
   285 
   309 
   286 		if ( type === "string" ) {
   310 		if ( type === "string" ) {
   287 			return this.parse( stringParse( red ) || colors._default );
   311 			return this.parse( stringParse( red ) || colors._default );
   288 		}
   312 		}
   289 
   313 
   290 		if ( type === "array" ) {
   314 		if ( type === "array" ) {
   291 			each( spaces.rgba.props, function( key, prop ) {
   315 			each( spaces.rgba.props, function( _key, prop ) {
   292 				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
   316 				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
   293 			} );
   317 			} );
   294 			return this;
   318 			return this;
   295 		}
   319 		}
   296 
   320 
   297 		if ( type === "object" ) {
   321 		if ( type === "object" ) {
   298 			if ( red instanceof color ) {
   322 			if ( red instanceof color ) {
   299 				each( spaces, function( spaceName, space ) {
   323 				each( spaces, function( _spaceName, space ) {
   300 					if ( red[ space.cache ] ) {
   324 					if ( red[ space.cache ] ) {
   301 						inst[ space.cache ] = red[ space.cache ].slice();
   325 						inst[ space.cache ] = red[ space.cache ].slice();
   302 					}
   326 					}
   303 				} );
   327 				} );
   304 			} else {
   328 			} else {
   305 				each( spaces, function( spaceName, space ) {
   329 				each( spaces, function( _spaceName, space ) {
   306 					var cache = space.cache;
   330 					var cache = space.cache;
   307 					each( space.props, function( key, prop ) {
   331 					each( space.props, function( key, prop ) {
   308 
   332 
   309 						// If the cache doesn't exist, and we know how to convert
   333 						// if the cache doesn't exist, and we know how to convert
   310 						if ( !inst[ cache ] && space.to ) {
   334 						if ( !inst[ cache ] && space.to ) {
   311 
   335 
   312 							// If the value was null, we don't need to copy it
   336 							// if the value was null, we don't need to copy it
   313 							// if the key was alpha, we don't need to copy it either
   337 							// if the key was alpha, we don't need to copy it either
   314 							if ( key === "alpha" || red[ key ] == null ) {
   338 							if ( key === "alpha" || red[ key ] == null ) {
   315 								return;
   339 								return;
   316 							}
   340 							}
   317 							inst[ cache ] = space.to( inst._rgba );
   341 							inst[ cache ] = space.to( inst._rgba );
   318 						}
   342 						}
   319 
   343 
   320 						// This is the only case where we allow nulls for ALL properties.
   344 						// this is the only case where we allow nulls for ALL properties.
   321 						// call clamp with alwaysAllowEmpty
   345 						// call clamp with alwaysAllowEmpty
   322 						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
   346 						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
   323 					} );
   347 					} );
   324 
   348 
   325 					// Everything defined but alpha?
   349 					// everything defined but alpha?
   326 					if ( inst[ cache ] &&
   350 					if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
   327 							jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
   351 
   328 
   352 						// use the default of 1
   329 						// Use the default of 1
   353 						if ( inst[ cache ][ 3 ] == null ) {
   330 						inst[ cache ][ 3 ] = 1;
   354 							inst[ cache ][ 3 ] = 1;
       
   355 						}
       
   356 
   331 						if ( space.from ) {
   357 						if ( space.from ) {
   332 							inst._rgba = space.from( inst[ cache ] );
   358 							inst._rgba = space.from( inst[ cache ] );
   333 						}
   359 						}
   334 					}
   360 					}
   335 				} );
   361 				} );
   375 			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
   401 			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
   376 			start = startColor[ space.cache ] || space.to( startColor._rgba ),
   402 			start = startColor[ space.cache ] || space.to( startColor._rgba ),
   377 			result = start.slice();
   403 			result = start.slice();
   378 
   404 
   379 		end = end[ space.cache ];
   405 		end = end[ space.cache ];
   380 		each( space.props, function( key, prop ) {
   406 		each( space.props, function( _key, prop ) {
   381 			var index = prop.idx,
   407 			var index = prop.idx,
   382 				startValue = start[ index ],
   408 				startValue = start[ index ],
   383 				endValue = end[ index ],
   409 				endValue = end[ index ],
   384 				type = propTypes[ prop.type ] || {};
   410 				type = propTypes[ prop.type ] || {};
   385 
   411 
   386 			// If null, don't override start value
   412 			// if null, don't override start value
   387 			if ( endValue === null ) {
   413 			if ( endValue === null ) {
   388 				return;
   414 				return;
   389 			}
   415 			}
   390 
   416 
   391 			// If null - use end
   417 			// if null - use end
   392 			if ( startValue === null ) {
   418 			if ( startValue === null ) {
   393 				result[ index ] = endValue;
   419 				result[ index ] = endValue;
   394 			} else {
   420 			} else {
   395 				if ( type.mod ) {
   421 				if ( type.mod ) {
   396 					if ( endValue - startValue > type.mod / 2 ) {
   422 					if ( endValue - startValue > type.mod / 2 ) {
   404 		} );
   430 		} );
   405 		return this[ spaceName ]( result );
   431 		return this[ spaceName ]( result );
   406 	},
   432 	},
   407 	blend: function( opaque ) {
   433 	blend: function( opaque ) {
   408 
   434 
   409 		// If we are already opaque - return ourself
   435 		// if we are already opaque - return ourself
   410 		if ( this._rgba[ 3 ] === 1 ) {
   436 		if ( this._rgba[ 3 ] === 1 ) {
   411 			return this;
   437 			return this;
   412 		}
   438 		}
   413 
   439 
   414 		var rgb = this._rgba.slice(),
   440 		var rgb = this._rgba.slice(),
   420 		} ) );
   446 		} ) );
   421 	},
   447 	},
   422 	toRgbaString: function() {
   448 	toRgbaString: function() {
   423 		var prefix = "rgba(",
   449 		var prefix = "rgba(",
   424 			rgba = jQuery.map( this._rgba, function( v, i ) {
   450 			rgba = jQuery.map( this._rgba, function( v, i ) {
   425 				return v == null ? ( i > 2 ? 1 : 0 ) : v;
   451 				if ( v != null ) {
       
   452 					return v;
       
   453 				}
       
   454 				return i > 2 ? 1 : 0;
   426 			} );
   455 			} );
   427 
   456 
   428 		if ( rgba[ 3 ] === 1 ) {
   457 		if ( rgba[ 3 ] === 1 ) {
   429 			rgba.pop();
   458 			rgba.pop();
   430 			prefix = "rgb(";
   459 			prefix = "rgb(";
   437 			hsla = jQuery.map( this.hsla(), function( v, i ) {
   466 			hsla = jQuery.map( this.hsla(), function( v, i ) {
   438 				if ( v == null ) {
   467 				if ( v == null ) {
   439 					v = i > 2 ? 1 : 0;
   468 					v = i > 2 ? 1 : 0;
   440 				}
   469 				}
   441 
   470 
   442 				// Catch 1 and 2
   471 				// catch 1 and 2
   443 				if ( i && i < 3 ) {
   472 				if ( i && i < 3 ) {
   444 					v = Math.round( v * 100 ) + "%";
   473 					v = Math.round( v * 100 ) + "%";
   445 				}
   474 				}
   446 				return v;
   475 				return v;
   447 			} );
   476 			} );
   460 			rgba.push( ~~( alpha * 255 ) );
   489 			rgba.push( ~~( alpha * 255 ) );
   461 		}
   490 		}
   462 
   491 
   463 		return "#" + jQuery.map( rgba, function( v ) {
   492 		return "#" + jQuery.map( rgba, function( v ) {
   464 
   493 
   465 			// Default to 0 when nulls exist
   494 			// default to 0 when nulls exist
   466 			v = ( v || 0 ).toString( 16 );
   495 			v = ( v || 0 ).toString( 16 );
   467 			return v.length === 1 ? "0" + v : v;
   496 			return v.length === 1 ? "0" + v : v;
   468 		} ).join( "" );
   497 		} ).join( "" );
   469 	},
   498 	},
   470 	toString: function() {
   499 	toString: function() {
   471 		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
   500 		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
   472 	}
   501 	}
   473 } );
   502 } );
   474 color.fn.parse.prototype = color.fn;
   503 color.fn.parse.prototype = color.fn;
   475 
   504 
   476 // Hsla conversions adapted from:
   505 // hsla conversions adapted from:
   477 // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
   506 // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
   478 
   507 
   479 function hue2rgb( p, q, h ) {
   508 function hue2rgb( p, q, h ) {
   480 	h = ( h + 1 ) % 1;
   509 	h = ( h + 1 ) % 1;
   481 	if ( h * 6 < 1 ) {
   510 	if ( h * 6 < 1 ) {
   513 		h = ( 60 * ( b - r ) / diff ) + 120;
   542 		h = ( 60 * ( b - r ) / diff ) + 120;
   514 	} else {
   543 	} else {
   515 		h = ( 60 * ( r - g ) / diff ) + 240;
   544 		h = ( 60 * ( r - g ) / diff ) + 240;
   516 	}
   545 	}
   517 
   546 
   518 	// Chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
   547 	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
   519 	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
   548 	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
   520 	if ( diff === 0 ) {
   549 	if ( diff === 0 ) {
   521 		s = 0;
   550 		s = 0;
   522 	} else if ( l <= 0.5 ) {
   551 	} else if ( l <= 0.5 ) {
   523 		s = diff / add;
   552 		s = diff / add;
   544 		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
   573 		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
   545 		a
   574 		a
   546 	];
   575 	];
   547 };
   576 };
   548 
   577 
       
   578 
   549 each( spaces, function( spaceName, space ) {
   579 each( spaces, function( spaceName, space ) {
   550 	var props = space.props,
   580 	var props = space.props,
   551 		cache = space.cache,
   581 		cache = space.cache,
   552 		to = space.to,
   582 		to = space.to,
   553 		from = space.from;
   583 		from = space.from;
   554 
   584 
   555 	// Makes rgba() and hsla()
   585 	// makes rgba() and hsla()
   556 	color.fn[ spaceName ] = function( value ) {
   586 	color.fn[ spaceName ] = function( value ) {
   557 
   587 
   558 		// Generate a cache for this space if it doesn't exist
   588 		// generate a cache for this space if it doesn't exist
   559 		if ( to && !this[ cache ] ) {
   589 		if ( to && !this[ cache ] ) {
   560 			this[ cache ] = to( this._rgba );
   590 			this[ cache ] = to( this._rgba );
   561 		}
   591 		}
   562 		if ( value === undefined ) {
   592 		if ( value === undefined ) {
   563 			return this[ cache ].slice();
   593 			return this[ cache ].slice();
   564 		}
   594 		}
   565 
   595 
   566 		var ret,
   596 		var ret,
   567 			type = jQuery.type( value ),
   597 			type = getType( value ),
   568 			arr = ( type === "array" || type === "object" ) ? value : arguments,
   598 			arr = ( type === "array" || type === "object" ) ? value : arguments,
   569 			local = this[ cache ].slice();
   599 			local = this[ cache ].slice();
   570 
   600 
   571 		each( props, function( key, prop ) {
   601 		each( props, function( key, prop ) {
   572 			var val = arr[ type === "object" ? key : prop.idx ];
   602 			var val = arr[ type === "object" ? key : prop.idx ];
   583 		} else {
   613 		} else {
   584 			return color( local );
   614 			return color( local );
   585 		}
   615 		}
   586 	};
   616 	};
   587 
   617 
   588 	// Makes red() green() blue() alpha() hue() saturation() lightness()
   618 	// makes red() green() blue() alpha() hue() saturation() lightness()
   589 	each( props, function( key, prop ) {
   619 	each( props, function( key, prop ) {
   590 
   620 
   591 		// Alpha is included in more than one space
   621 		// alpha is included in more than one space
   592 		if ( color.fn[ key ] ) {
   622 		if ( color.fn[ key ] ) {
   593 			return;
   623 			return;
   594 		}
   624 		}
   595 		color.fn[ key ] = function( value ) {
   625 		color.fn[ key ] = function( value ) {
   596 			var vtype = jQuery.type( value ),
   626 			var local, cur, match, fn,
   597 				fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
   627 				vtype = getType( value );
   598 				local = this[ fn ](),
   628 
   599 				cur = local[ prop.idx ],
   629 			if ( key === "alpha" ) {
   600 				match;
   630 				fn = this._hsla ? "hsla" : "rgba";
       
   631 			} else {
       
   632 				fn = spaceName;
       
   633 			}
       
   634 			local = this[ fn ]();
       
   635 			cur = local[ prop.idx ];
   601 
   636 
   602 			if ( vtype === "undefined" ) {
   637 			if ( vtype === "undefined" ) {
   603 				return cur;
   638 				return cur;
   604 			}
   639 			}
   605 
   640 
   606 			if ( vtype === "function" ) {
   641 			if ( vtype === "function" ) {
   607 				value = value.call( this, cur );
   642 				value = value.call( this, cur );
   608 				vtype = jQuery.type( value );
   643 				vtype = getType( value );
   609 			}
   644 			}
   610 			if ( value == null && prop.empty ) {
   645 			if ( value == null && prop.empty ) {
   611 				return this;
   646 				return this;
   612 			}
   647 			}
   613 			if ( vtype === "string" ) {
   648 			if ( vtype === "string" ) {
   620 			return this[ fn ]( local );
   655 			return this[ fn ]( local );
   621 		};
   656 		};
   622 	} );
   657 	} );
   623 } );
   658 } );
   624 
   659 
   625 // Add cssHook and .fx.step function for each named hook.
   660 // add cssHook and .fx.step function for each named hook.
   626 // accept a space separated string of properties
   661 // accept a space separated string of properties
   627 color.hook = function( hook ) {
   662 color.hook = function( hook ) {
   628 	var hooks = hook.split( " " );
   663 	var hooks = hook.split( " " );
   629 	each( hooks, function( i, hook ) {
   664 	each( hooks, function( _i, hook ) {
   630 		jQuery.cssHooks[ hook ] = {
   665 		jQuery.cssHooks[ hook ] = {
   631 			set: function( elem, value ) {
   666 			set: function( elem, value ) {
   632 				var parsed, curElem,
   667 				var parsed, curElem,
   633 					backgroundColor = "";
   668 					backgroundColor = "";
   634 
   669 
   635 				if ( value !== "transparent" && ( jQuery.type( value ) !== "string" ||
   670 				if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
   636 						( parsed = stringParse( value ) ) ) ) {
       
   637 					value = color( parsed || value );
   671 					value = color( parsed || value );
   638 					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
   672 					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
   639 						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
   673 						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
   640 						while (
   674 						while (
   641 							( backgroundColor === "" || backgroundColor === "transparent" ) &&
   675 							( backgroundColor === "" || backgroundColor === "transparent" ) &&
   657 				}
   691 				}
   658 				try {
   692 				try {
   659 					elem.style[ hook ] = value;
   693 					elem.style[ hook ] = value;
   660 				} catch ( e ) {
   694 				} catch ( e ) {
   661 
   695 
   662 					// Wrapped to prevent IE from throwing errors on "invalid" values like
   696 					// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
   663 					// 'auto' or 'inherit'
       
   664 				}
   697 				}
   665 			}
   698 			}
   666 		};
   699 		};
   667 		jQuery.fx.step[ hook ] = function( fx ) {
   700 		jQuery.fx.step[ hook ] = function( fx ) {
   668 			if ( !fx.colorInit ) {
   701 			if ( !fx.colorInit ) {
   680 
   713 
   681 jQuery.cssHooks.borderColor = {
   714 jQuery.cssHooks.borderColor = {
   682 	expand: function( value ) {
   715 	expand: function( value ) {
   683 		var expanded = {};
   716 		var expanded = {};
   684 
   717 
   685 		each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
   718 		each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
   686 			expanded[ "border" + part + "Color" ] = value;
   719 			expanded[ "border" + part + "Color" ] = value;
   687 		} );
   720 		} );
   688 		return expanded;
   721 		return expanded;
   689 	}
   722 	}
   690 };
   723 };
   716 	transparent: [ null, null, null, 0 ],
   749 	transparent: [ null, null, null, 0 ],
   717 
   750 
   718 	_default: "#ffffff"
   751 	_default: "#ffffff"
   719 };
   752 };
   720 
   753 
   721 } )( jQuery );
   754 
       
   755 var dataSpace = "ui-effects-",
       
   756 	dataSpaceStyle = "ui-effects-style",
       
   757 	dataSpaceAnimated = "ui-effects-animated";
       
   758 
       
   759 $.effects = {
       
   760 	effect: {}
       
   761 };
   722 
   762 
   723 /******************************************************************************/
   763 /******************************************************************************/
   724 /****************************** CLASS ANIMATIONS ******************************/
   764 /****************************** CLASS ANIMATIONS ******************************/
   725 /******************************************************************************/
   765 /******************************************************************************/
   726 ( function() {
   766 ( function() {
   748 			}
   788 			}
   749 		};
   789 		};
   750 	}
   790 	}
   751 );
   791 );
   752 
   792 
       
   793 function camelCase( string ) {
       
   794 	return string.replace( /-([\da-z])/gi, function( all, letter ) {
       
   795 		return letter.toUpperCase();
       
   796 	} );
       
   797 }
       
   798 
   753 function getElementStyles( elem ) {
   799 function getElementStyles( elem ) {
   754 	var key, len,
   800 	var key, len,
   755 		style = elem.ownerDocument.defaultView ?
   801 		style = elem.ownerDocument.defaultView ?
   756 			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
   802 			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
   757 			elem.currentStyle,
   803 			elem.currentStyle,
   760 	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
   806 	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
   761 		len = style.length;
   807 		len = style.length;
   762 		while ( len-- ) {
   808 		while ( len-- ) {
   763 			key = style[ len ];
   809 			key = style[ len ];
   764 			if ( typeof style[ key ] === "string" ) {
   810 			if ( typeof style[ key ] === "string" ) {
   765 				styles[ $.camelCase( key ) ] = style[ key ];
   811 				styles[ camelCase( key ) ] = style[ key ];
   766 			}
   812 			}
   767 		}
   813 		}
   768 
   814 
   769 	// Support: Opera, IE <9
   815 		// Support: Opera, IE <9
   770 	} else {
   816 	} else {
   771 		for ( key in style ) {
   817 		for ( key in style ) {
   772 			if ( typeof style[ key ] === "string" ) {
   818 			if ( typeof style[ key ] === "string" ) {
   773 				styles[ key ] = style[ key ];
   819 				styles[ key ] = style[ key ];
   774 			}
   820 			}
   934 /*********************************** EFFECTS **********************************/
   980 /*********************************** EFFECTS **********************************/
   935 /******************************************************************************/
   981 /******************************************************************************/
   936 
   982 
   937 ( function() {
   983 ( function() {
   938 
   984 
   939 if ( $.expr && $.expr.filters && $.expr.filters.animated ) {
   985 if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
   940 	$.expr.filters.animated = ( function( orig ) {
   986 	$.expr.pseudos.animated = ( function( orig ) {
   941 		return function( elem ) {
   987 		return function( elem ) {
   942 			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
   988 			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
   943 		};
   989 		};
   944 	} )( $.expr.filters.animated );
   990 	} )( $.expr.pseudos.animated );
   945 }
   991 }
   946 
   992 
   947 if ( $.uiBackCompat !== false ) {
   993 if ( $.uiBackCompat !== false ) {
   948 	$.extend( $.effects, {
   994 	$.extend( $.effects, {
   949 
   995 
  1008 
  1054 
  1009 			// Support: Firefox
  1055 			// Support: Firefox
  1010 			// Firefox incorrectly exposes anonymous content
  1056 			// Firefox incorrectly exposes anonymous content
  1011 			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
  1057 			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
  1012 			try {
  1058 			try {
       
  1059 				// eslint-disable-next-line no-unused-expressions
  1013 				active.id;
  1060 				active.id;
  1014 			} catch ( e ) {
  1061 			} catch ( e ) {
  1015 				active = document.body;
  1062 				active = document.body;
  1016 			}
  1063 			}
  1017 
  1064 
  1070 		}
  1117 		}
  1071 	} );
  1118 	} );
  1072 }
  1119 }
  1073 
  1120 
  1074 $.extend( $.effects, {
  1121 $.extend( $.effects, {
  1075 	version: "1.12.1",
  1122 	version: "1.13.1",
  1076 
  1123 
  1077 	define: function( name, mode, effect ) {
  1124 	define: function( name, mode, effect ) {
  1078 		if ( !effect ) {
  1125 		if ( !effect ) {
  1079 			effect = mode;
  1126 			effect = mode;
  1080 			mode = "effect";
  1127 			mode = "effect";
  1152 	// Translates a [top,left] array into a baseline value
  1199 	// Translates a [top,left] array into a baseline value
  1153 	getBaseline: function( origin, original ) {
  1200 	getBaseline: function( origin, original ) {
  1154 		var y, x;
  1201 		var y, x;
  1155 
  1202 
  1156 		switch ( origin[ 0 ] ) {
  1203 		switch ( origin[ 0 ] ) {
  1157 		case "top":
  1204 			case "top":
  1158 			y = 0;
  1205 				y = 0;
  1159 			break;
  1206 				break;
  1160 		case "middle":
  1207 			case "middle":
  1161 			y = 0.5;
  1208 				y = 0.5;
  1162 			break;
  1209 				break;
  1163 		case "bottom":
  1210 			case "bottom":
  1164 			y = 1;
  1211 				y = 1;
  1165 			break;
  1212 				break;
  1166 		default:
  1213 			default:
  1167 			y = origin[ 0 ] / original.height;
  1214 				y = origin[ 0 ] / original.height;
  1168 		}
  1215 		}
  1169 
  1216 
  1170 		switch ( origin[ 1 ] ) {
  1217 		switch ( origin[ 1 ] ) {
  1171 		case "left":
  1218 			case "left":
  1172 			x = 0;
  1219 				x = 0;
  1173 			break;
  1220 				break;
  1174 		case "center":
  1221 			case "center":
  1175 			x = 0.5;
  1222 				x = 0.5;
  1176 			break;
  1223 				break;
  1177 		case "right":
  1224 			case "right":
  1178 			x = 1;
  1225 				x = 1;
  1179 			break;
  1226 				break;
  1180 		default:
  1227 			default:
  1181 			x = origin[ 1 ] / original.width;
  1228 				x = origin[ 1 ] / original.width;
  1182 		}
  1229 		}
  1183 
  1230 
  1184 		return {
  1231 		return {
  1185 			x: x,
  1232 			x: x,
  1186 			y: y
  1233 			y: y
  1201 			marginTop: element.css( "marginTop" ),
  1248 			marginTop: element.css( "marginTop" ),
  1202 			marginBottom: element.css( "marginBottom" ),
  1249 			marginBottom: element.css( "marginBottom" ),
  1203 			marginLeft: element.css( "marginLeft" ),
  1250 			marginLeft: element.css( "marginLeft" ),
  1204 			marginRight: element.css( "marginRight" )
  1251 			marginRight: element.css( "marginRight" )
  1205 		} )
  1252 		} )
  1206 		.outerWidth( element.outerWidth() )
  1253 			.outerWidth( element.outerWidth() )
  1207 		.outerHeight( element.outerHeight() );
  1254 			.outerHeight( element.outerHeight() );
  1208 
  1255 
  1209 		if ( /^(static|relative)/.test( cssPosition ) ) {
  1256 		if ( /^(static|relative)/.test( cssPosition ) ) {
  1210 			cssPosition = "absolute";
  1257 			cssPosition = "absolute";
  1211 
  1258 
  1212 			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
  1259 			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
  1223 				marginBottom: element.css( "marginBottom" ),
  1270 				marginBottom: element.css( "marginBottom" ),
  1224 				marginLeft: element.css( "marginLeft" ),
  1271 				marginLeft: element.css( "marginLeft" ),
  1225 				marginRight: element.css( "marginRight" ),
  1272 				marginRight: element.css( "marginRight" ),
  1226 				"float": element.css( "float" )
  1273 				"float": element.css( "float" )
  1227 			} )
  1274 			} )
  1228 			.outerWidth( element.outerWidth() )
  1275 				.outerWidth( element.outerWidth() )
  1229 			.outerHeight( element.outerHeight() )
  1276 				.outerHeight( element.outerHeight() )
  1230 			.addClass( "ui-effects-placeholder" );
  1277 				.addClass( "ui-effects-placeholder" );
  1231 
  1278 
  1232 			element.data( dataSpace + "placeholder", placeholder );
  1279 			element.data( dataSpace + "placeholder", placeholder );
  1233 		}
  1280 		}
  1234 
  1281 
  1235 		element.css( {
  1282 		element.css( {
  1241 		return placeholder;
  1288 		return placeholder;
  1242 	},
  1289 	},
  1243 
  1290 
  1244 	removePlaceholder: function( element ) {
  1291 	removePlaceholder: function( element ) {
  1245 		var dataKey = dataSpace + "placeholder",
  1292 		var dataKey = dataSpace + "placeholder",
  1246 				placeholder = element.data( dataKey );
  1293 			placeholder = element.data( dataKey );
  1247 
  1294 
  1248 		if ( placeholder ) {
  1295 		if ( placeholder ) {
  1249 			placeholder.remove();
  1296 			placeholder.remove();
  1250 			element.removeData( dataKey );
  1297 			element.removeData( dataKey );
  1251 		}
  1298 		}
  1286 	if ( options == null ) {
  1333 	if ( options == null ) {
  1287 		options = {};
  1334 		options = {};
  1288 	}
  1335 	}
  1289 
  1336 
  1290 	// Catch (effect, callback)
  1337 	// Catch (effect, callback)
  1291 	if ( $.isFunction( options ) ) {
  1338 	if ( typeof options === "function" ) {
  1292 		callback = options;
  1339 		callback = options;
  1293 		speed = null;
  1340 		speed = null;
  1294 		options = {};
  1341 		options = {};
  1295 	}
  1342 	}
  1296 
  1343 
  1300 		speed = options;
  1347 		speed = options;
  1301 		options = {};
  1348 		options = {};
  1302 	}
  1349 	}
  1303 
  1350 
  1304 	// Catch (effect, options, callback)
  1351 	// Catch (effect, options, callback)
  1305 	if ( $.isFunction( speed ) ) {
  1352 	if ( typeof speed === "function" ) {
  1306 		callback = speed;
  1353 		callback = speed;
  1307 		speed = null;
  1354 		speed = null;
  1308 	}
  1355 	}
  1309 
  1356 
  1310 	// Add options to effect
  1357 	// Add options to effect
  1313 	}
  1360 	}
  1314 
  1361 
  1315 	speed = speed || options.duration;
  1362 	speed = speed || options.duration;
  1316 	effect.duration = $.fx.off ? 0 :
  1363 	effect.duration = $.fx.off ? 0 :
  1317 		typeof speed === "number" ? speed :
  1364 		typeof speed === "number" ? speed :
  1318 		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
  1365 			speed in $.fx.speeds ? $.fx.speeds[ speed ] :
  1319 		$.fx.speeds._default;
  1366 				$.fx.speeds._default;
  1320 
  1367 
  1321 	effect.complete = callback || options.complete;
  1368 	effect.complete = callback || options.complete;
  1322 
  1369 
  1323 	return effect;
  1370 	return effect;
  1324 }
  1371 }
  1334 	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
  1381 	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
  1335 		return true;
  1382 		return true;
  1336 	}
  1383 	}
  1337 
  1384 
  1338 	// Complete callback
  1385 	// Complete callback
  1339 	if ( $.isFunction( option ) ) {
  1386 	if ( typeof option === "function" ) {
  1340 		return true;
  1387 		return true;
  1341 	}
  1388 	}
  1342 
  1389 
  1343 	// Options hash (but not naming an effect)
  1390 	// Options hash (but not naming an effect)
  1344 	if ( typeof option === "object" && !option.effect ) {
  1391 	if ( typeof option === "object" && !option.effect ) {
  1361 			modes = [],
  1408 			modes = [],
  1362 			prefilter = function( next ) {
  1409 			prefilter = function( next ) {
  1363 				var el = $( this ),
  1410 				var el = $( this ),
  1364 					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
  1411 					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
  1365 
  1412 
  1366 				// Sentinel for duck-punching the :animated psuedo-selector
  1413 				// Sentinel for duck-punching the :animated pseudo-selector
  1367 				el.data( dataSpaceAnimated, true );
  1414 				el.data( dataSpaceAnimated, true );
  1368 
  1415 
  1369 				// Save effect mode for later use,
  1416 				// Save effect mode for later use,
  1370 				// we can't just call $.effects.mode again later,
  1417 				// we can't just call $.effects.mode again later,
  1371 				// as the .show() below destroys the initial state
  1418 				// as the .show() below destroys the initial state
  1372 				modes.push( normalizedMode );
  1419 				modes.push( normalizedMode );
  1373 
  1420 
  1374 				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.13
  1421 				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
  1375 				if ( defaultMode && ( normalizedMode === "show" ||
  1422 				if ( defaultMode && ( normalizedMode === "show" ||
  1376 						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
  1423 					( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
  1377 					el.show();
  1424 					el.show();
  1378 				}
  1425 				}
  1379 
  1426 
  1380 				if ( !defaultMode || normalizedMode !== "none" ) {
  1427 				if ( !defaultMode || normalizedMode !== "none" ) {
  1381 					$.effects.saveStyle( el );
  1428 					$.effects.saveStyle( el );
  1382 				}
  1429 				}
  1383 
  1430 
  1384 				if ( $.isFunction( next ) ) {
  1431 				if ( typeof next === "function" ) {
  1385 					next();
  1432 					next();
  1386 				}
  1433 				}
  1387 			};
  1434 			};
  1388 
  1435 
  1389 		if ( $.fx.off || !effectMethod ) {
  1436 		if ( $.fx.off || !effectMethod ) {
  1414 
  1461 
  1415 				done();
  1462 				done();
  1416 			}
  1463 			}
  1417 
  1464 
  1418 			function done() {
  1465 			function done() {
  1419 				if ( $.isFunction( complete ) ) {
  1466 				if ( typeof complete === "function" ) {
  1420 					complete.call( elem[ 0 ] );
  1467 					complete.call( elem[ 0 ] );
  1421 				}
  1468 				}
  1422 
  1469 
  1423 				if ( $.isFunction( next ) ) {
  1470 				if ( typeof next === "function" ) {
  1424 					next();
  1471 					next();
  1425 				}
  1472 				}
  1426 			}
  1473 			}
  1427 
  1474 
  1428 			// Override mode option on a per element basis,
  1475 			// Override mode option on a per element basis,
  1527 				left: endPosition.left - fixLeft,
  1574 				left: endPosition.left - fixLeft,
  1528 				height: target.innerHeight(),
  1575 				height: target.innerHeight(),
  1529 				width: target.innerWidth()
  1576 				width: target.innerWidth()
  1530 			},
  1577 			},
  1531 			startPosition = element.offset(),
  1578 			startPosition = element.offset(),
  1532 			transfer = $( "<div class='ui-effects-transfer'></div>" )
  1579 			transfer = $( "<div class='ui-effects-transfer'></div>" );
  1533 				.appendTo( "body" )
  1580 
  1534 				.addClass( options.className )
  1581 		transfer
  1535 				.css( {
  1582 			.appendTo( "body" )
  1536 					top: startPosition.top - fixTop,
  1583 			.addClass( options.className )
  1537 					left: startPosition.left - fixLeft,
  1584 			.css( {
  1538 					height: element.innerHeight(),
  1585 				top: startPosition.top - fixTop,
  1539 					width: element.innerWidth(),
  1586 				left: startPosition.left - fixLeft,
  1540 					position: targetFixed ? "fixed" : "absolute"
  1587 				height: element.innerHeight(),
  1541 				} )
  1588 				width: element.innerWidth(),
  1542 				.animate( animation, options.duration, options.easing, function() {
  1589 				position: targetFixed ? "fixed" : "absolute"
  1543 					transfer.remove();
  1590 			} )
  1544 					if ( $.isFunction( done ) ) {
  1591 			.animate( animation, options.duration, options.easing, function() {
  1545 						done();
  1592 				transfer.remove();
  1546 					}
  1593 				if ( typeof done === "function" ) {
  1547 				} );
  1594 					done();
       
  1595 				}
       
  1596 			} );
  1548 	}
  1597 	}
  1549 } );
  1598 } );
  1550 
  1599 
  1551 function parseClip( str, element ) {
  1600 function parseClip( str, element ) {
  1552 		var outerWidth = element.outerWidth(),
  1601 	var outerWidth = element.outerWidth(),
  1553 			outerHeight = element.outerHeight(),
  1602 		outerHeight = element.outerHeight(),
  1554 			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
  1603 		clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
  1555 			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
  1604 		values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
  1556 
  1605 
  1557 		return {
  1606 	return {
  1558 			top: parseFloat( values[ 1 ] ) || 0,
  1607 		top: parseFloat( values[ 1 ] ) || 0,
  1559 			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
  1608 		right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
  1560 			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
  1609 		bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
  1561 			left: parseFloat( values[ 4 ] ) || 0
  1610 		left: parseFloat( values[ 4 ] ) || 0
  1562 		};
  1611 	};
  1563 }
  1612 }
  1564 
  1613 
  1565 $.fx.step.clip = function( fx ) {
  1614 $.fx.step.clip = function( fx ) {
  1566 	if ( !fx.clipInit ) {
  1615 	if ( !fx.clipInit ) {
  1567 		fx.start = $( fx.elem ).cssClip();
  1616 		fx.start = $( fx.elem ).cssClip();
  1634 
  1683 
  1635 } )();
  1684 } )();
  1636 
  1685 
  1637 return $.effects;
  1686 return $.effects;
  1638 
  1687 
  1639 } ) );
  1688 } );