PageSourceSearch

https://spbindia.com/wp-content/plugins/enable-jquery-migrate-help…/jquery-migrate-1.4.1-wp.js?ver=1.4.1-wp

js spbindia.com collected 2026-09-25 02:11:55 UTC 23,673 bytes, 763 lines download raw bytes

1/*!
2 * jQuery Migrate - v1.4.1 - 2016-05-19
3 * Copyright jQuery Foundation and other contributors
4 */
5(function( jQuery, window, undefined ) {
6// See http://bugs.jquery.com/ticket/13335
7// "use strict";
8
9
10jQuery.migrateVersion = "1.4.1";
11
12
13var warnedAbout = {};
14
15// List of warnings already given; public read only
16jQuery.migrateWarnings = [];
17
18// Set to true to prevent console output; migrateWarnings still maintained
19// jQuery.migrateMute = false;
20
21// Show a message on the console so devs know we're active
22if ( window.console && window.console.log ) {
23	window.console.log( "JQMIGRATE: Migrate is installed" +
24		( jQuery.migrateMute ? "" : " with logging active" ) +
25		", version " + jQuery.migrateVersion );
26}
27
28// Set to false to disable traces that appear with warnings
29if ( jQuery.migrateTrace === undefined ) {
30	jQuery.migrateTrace = true;
31}
32
33// Forget any warnings we've already given; public
34jQuery.migrateReset = function() {
35	warnedAbout = {};
36	jQuery.migrateWarnings.length = 0;
37};
38
39function migrateWarn( msg) {
40	var console = window.console;
41	var error   = new Error();
42
43	// WP: Add all warnings to jQuery.migrateWarnings.
44	var tracedError = {
45		warning: msg,
46		trace: error.stack || error
47	};
48
49	jQuery.migrateWarnings.push( tracedError );
50	// WP: end.
51
52	if ( ! warnedAbout[ msg ] ) {
53		warnedAbout[ msg ] = true;
54
55		if ( console && console.warn && !jQuery.migrateMute ) {
56			console.warn( "JQMIGRATE: " + msg );
57			if ( jQuery.migrateTrace && console.trace ) {
58				console.trace();
59			}
60		}
61	}
62}
63
64function migrateWarnProp( obj, prop, value, msg ) {
65	if ( Object.defineProperty ) {
66		// On ES5 browsers (non-oldIE), warn if the code tries to get prop;
67		// allow property to be overwritten in case some other plugin wants it
68		try {
69			Object.defineProperty( obj, prop, {
70				configurable: true,
71				enumerable: true,
72				get: function() {
73					migrateWarn( msg );
74					return value;
75				},
76				set: function( newValue ) {
77					migrateWarn( msg );
78					value = newValue;
79				}
80			});
81			return;
82		} catch( err ) {
83			// IE8 is a dope about Object.defineProperty, can't warn there
84		}
85	}
86
87	// Non-ES5 (or broken) browser; just set the property
88	jQuery._definePropertyBroken = true;
89	obj[ prop ] = value;
90}
91
92if ( document.compatMode === "BackCompat" ) {
93	// jQuery has never supported or tested Quirks Mode
94	migrateWarn( "jQuery is not compatible with Quirks Mode" );
95}
96
97
98var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
99	oldAttr = jQuery.attr,
100	valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
101		function() { return null; },
102	valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
103		function() { return undefined; },
104	rnoType = /^(?:input|button)$/i,
105	rnoAttrNodeType = /^[238]$/,
106	rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
107	ruseDefault = /^(?:checked|selected)$/i;
108
109// jQuery.attrFn
110migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
111
112jQuery.attr = function( elem, name, value, pass ) {
113	var lowerName = name.toLowerCase(),
114		nType = elem && elem.nodeType;
115
116	if ( pass ) {
117		// Since pass is used internally, we only warn for new jQuery
118		// versions where there isn't a pass arg in the formal params
119		if ( oldAttr.length < 4 ) {
120			migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
121		}
122		if ( elem && !rnoAttrNodeType.test( nType ) &&
123			(attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
124			return jQuery( elem )[ name ]( value );
125		}
126	}
127
128	// Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
129	// for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
130	if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
131		migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
132	}
133
134	// Restore boolHook for boolean property/attribute synchronization
135	if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
136		jQuery.attrHooks[ lowerName ] = {
137			get: function( elem, name ) {
138				// Align boolean attributes with corresponding properties
139				// Fall back to attribute presence where some booleans are not supported
140				var attrNode,
141					property = jQuery.prop( elem, name );
142				return property === true || typeof property !== "boolean" &&
143					( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
144
145					name.toLowerCase() :
146					undefined;
147			},
148			set: function( elem, value, name ) {
149				var propName;
150				if ( value === false ) {
151					// Remove boolean attributes when set to false
152					jQuery.removeAttr( elem, name );
153				} else {
154					// value is true since we know at this point it's type boolean and not false
155					// Set boolean attributes to the same name and set the DOM property
156					propName = jQuery.propFix[ name ] || name;
157					if ( propName in elem ) {
158						// Only set the IDL specifically if it already exists on the element
159						elem[ propName ] = true;
160					}
161
162					elem.setAttribute( name, name.toLowerCase() );
163				}
164				return name;
165			}
166		};
167
168		// Warn only for attributes that can remain distinct from their properties post-1.9
169		if ( ruseDefault.test( lowerName ) ) {
170			migrateWarn( "jQuery.fn.attr('" + lowerName + "') might use property instead of attribute" );
171		}
172	}
173
174	return oldAttr.call( jQuery, elem, name, value );
175};
176
177// attrHooks: value
178jQuery.attrHooks.value = {
179	get: function( elem, name ) {
180		var nodeName = ( elem.nodeName || "" ).toLowerCase();
181		if ( nodeName === "button" ) {
182			return valueAttrGet.apply( this, arguments );
183		}
184		if ( nodeName !== "input" && nodeName !== "option" ) {
185			migrateWarn("jQuery.fn.attr('value') no longer gets properties");
186		}
187		return name in elem ?
188			elem.value :
189			null;
190	},
191	set: function( elem, value ) {
192		var nodeName = ( elem.nodeName || "" ).toLowerCase();
193		if ( nodeName === "button" ) {
194			return valueAttrSet.apply( this, arguments );
195		}
196		if ( nodeName !== "input" && nodeName !== "option" ) {
197			migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
198		}
199		// Does not return so that setAttribute is also used
200		elem.value = value;
201	}
202};
203
204
205var matched, browser,
206	oldInit = jQuery.fn.init,
207	oldFind = jQuery.find,
208	oldParseJSON = jQuery.parseJSON,
209	rspaceAngle = /^\s*</,
210	rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
211	rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
212	// Note: XSS check is done below after string is trimmed
213	rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
214
215// $(html) "looks like html" rule change
216jQuery.fn.init = function( selector, context, rootjQuery ) {
217	var match, ret;
218
219	if ( selector && typeof selector === "string" ) {
220		if ( !jQuery.isPlainObject( context ) &&
221				(match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
222
223			// This is an HTML string according to the "old" rules; is it still?
224			if ( !rspaceAngle.test( selector ) ) {
225				migrateWarn("$(html) HTML strings must start with '<' character");
226			}
227			if ( match[ 3 ] ) {
228				migrateWarn("$(html) HTML text after last tag is ignored");
229			}
230
231			// Consistently reject any HTML-like string starting with a hash (gh-9521)
232			// Note that this may break jQuery 1.6.x code that otherwise would work.
233			if ( match[ 0 ].charAt( 0 ) === "#" ) {
234				migrateWarn("HTML string cannot start with a '#' character");
235				jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
236			}
237
238			// Now process using loose rules; let pre-1.8 play too
239			// Is this a jQuery context? parseHTML expects a DOM element (#178)
240			if ( context && context.context && context.context.nodeType ) {
241				context = context.context;
242			}
243
244			if ( jQuery.parseHTML ) {
245				return oldInit.call( this,
246						jQuery.parseHTML( match[ 2 ], context && context.ownerDocument ||
247							context || document, true ), context, rootjQuery );
248			}
249		}
250	}
251
252	ret = oldInit.apply( this, arguments );
253
254	// Fill in selector and context properties so .live() works
255	if ( selector && selector.selector !== undefined ) {
256		// A jQuery object, copy its properties
257		ret.selector = selector.selector;
258		ret.context = selector.context;
259
260	} else {
261		ret.selector = typeof selector === "string" ? selector : "";
262		if ( selector ) {
263			ret.context = selector.nodeType? selector : context || document;
264		}
265	}
266
267	return ret;
268};
269jQuery.fn.init.prototype = jQuery.fn;
270
271jQuery.find = function( selector ) {
272	var args = Array.prototype.slice.call( arguments );
273
274	// Support: PhantomJS 1.x
275	// String#match fails to match when used with a //g RegExp, only on some strings
276	if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
277
278		// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
279		// First see if qS thinks it's a valid selector, if so avoid a false positive
280		try {
281			document.querySelector( selector );
282		} catch ( err1 ) {
283
284			// Didn't *look* valid to qSA, warn and try quoting what we think is the value
285			selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
286				return "[" + attr + op + "\"" + value + "\"]";
287			} );
288
289			// If the regexp *may* have created an invalid selector, don't update it
290			// Note that there may be false alarms if selector uses jQuery extensions
291			try {
292				document.querySelector( selector );
293				migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
294				args[ 0 ] = selector;
295			} catch ( err2 ) {
296				migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
297			}
298		}
299	}
300
301	return oldFind.apply( this, args );
302};
303
304// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
305var findProp;
306for ( findProp in oldFind ) {
307	if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
308		jQuery.find[ findProp ] = oldFind[ findProp ];
309	}
310}
311
312// Let $.parseJSON(falsy_value) return null
313jQuery.parseJSON = function( json ) {
314	if ( !json ) {
315		migrateWarn("jQuery.parseJSON requires a valid JSON string");
316		return null;
317	}
318	return oldParseJSON.apply( this, arguments );
319};
320
321jQuery.uaMatch = function( ua ) {
322	ua = ua.toLowerCase();
323
324	var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
325		/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
326		/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
327		/(msie) ([\w.]+)/.exec( ua ) ||
328		ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
329		[];
330
331	return {
332		browser: match[ 1 ] || "",
333		version: match[ 2 ] || "0"
334	};
335};
336
337// Don't clobber any existing jQuery.browser in case it's different
338if ( !jQuery.browser ) {
339	matched = jQuery.uaMatch( navigator.userAgent );
340	browser = {};
341
342	if ( matched.browser ) {
343		browser[ matched.browser ] = true;
344		browser.version = matched.version;
345	}
346
347	// Chrome is Webkit, but Webkit is also Safari.
348	if ( browser.chrome ) {
349		browser.webkit = true;
350	} else if ( browser.webkit ) {
351		browser.safari = true;
352	}
353
354	jQuery.browser = browser;
355}
356
357// Warn if the code tries to get jQuery.browser
358migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
359
360// jQuery.boxModel deprecated in 1.3, jQuery.support.boxModel deprecated in 1.7
361jQuery.boxModel = jQuery.support.boxModel = (document.compatMode === "CSS1Compat");
362migrateWarnProp( jQuery, "boxModel", jQuery.boxModel, "jQuery.boxModel is deprecated" );
363migrateWarnProp( jQuery.support, "boxModel", jQuery.support.boxModel, "jQuery.support.boxModel is deprecated" );
364
365jQuery.sub = function() {
366	function jQuerySub( selector, context ) {
367		return new jQuerySub.fn.init( selector, context );
368	}
369	jQuery.extend( true, jQuerySub, this );
370	jQuerySub.superclass = this;
371	jQuerySub.fn = jQuerySub.prototype = this();
372	jQuerySub.fn.constructor = jQuerySub;
373	jQuerySub.sub = this.sub;
374	jQuerySub.fn.init = function init( selector, context ) {
375		var instance = jQuery.fn.init.call( this, selector, context, rootjQuerySub );
376		return instance instanceof jQuerySub ?
377			instance :
378			jQuerySub( instance );
379	};
380	jQuerySub.fn.init.prototype = jQuerySub.fn;
381	var rootjQuerySub = jQuerySub(document);
382	migrateWarn( "jQuery.sub() is deprecated" );
383	return jQuerySub;
384};
385
386// The number of elements contained in the matched element set
387jQuery.fn.size = function() {
388	migrateWarn( "jQuery.fn.size() is deprecated; use the .length property" );
389	return this.length;
390};
391
392
393var internalSwapCall = false;
394
395// If this version of jQuery has .swap(), don't false-alarm on internal uses
396if ( jQuery.swap ) {
397	jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
398		var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
399
400		if ( oldHook ) {
401			jQuery.cssHooks[ name ].get = function() {
402				var ret;
403
404				internalSwapCall = true;
405				ret = oldHook.apply( this, arguments );
406				internalSwapCall = false;
407				return ret;
408			};
409		}
410	});
411}
412
413jQuery.swap = function( elem, options, callback, args ) {
414	var ret, name,
415		old = {};
416
417	if ( !internalSwapCall ) {
418		migrateWarn( "jQuery.swap() is undocumented and deprecated" );
419	}
420
421	// Remember the old values, and insert the new ones
422	for ( name in options ) {
423		old[ name ] = elem.style[ name ];
424		elem.style[ name ] = options[ name ];
425	}
426
427	ret = callback.apply( elem, args || [] );
428
429	// Revert the old values
430	for ( name in options ) {
431		elem.style[ name ] = old[ name ];
432	}
433
434	return ret;
435};
436
437
438// Ensure that $.ajax gets the new parseJSON defined in core.js
439jQuery.ajaxSetup({
440	converters: {
441		"text json": jQuery.parseJSON
442	}
443});
444
445
446var oldFnData = jQuery.fn.data;
447
448jQuery.fn.data = function( name ) {
449	var ret, evt,
450		elem = this[0];
451
452	// Handles 1.7 which has this behavior and 1.8 which doesn't
453	if ( elem && name === "events" && arguments.length === 1 ) {
454		ret = jQuery.data( elem, name );
455		evt = jQuery._data( elem, name );
456		if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
457			migrateWarn("Use of jQuery.fn.data('events') is deprecated");
458			return evt;
459		}
460	}
461	return oldFnData.apply( this, arguments );
462};
463
464
465var rscriptType = /\/(java|ecma)script/i;
466
467// Since jQuery.clean is used internally on older versions, we only shim if it's missing
468if ( !jQuery.clean ) {
469	jQuery.clean = function( elems, context, fragment, scripts ) {
470		// Set context per 1.8 logic
471		context = context || document;
472		context = !context.nodeType && context[0] || context;
473		context = context.ownerDocument || context;
474
475		migrateWarn("jQuery.clean() is deprecated");
476
477		var i, elem, handleScript, jsTags,
478			ret = [];
479
480		jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
481
482		// Complex logic lifted directly from jQuery 1.8
483		if ( fragment ) {
484			// Special handling of each script element
485			handleScript = function( elem ) {
486				// Check if we consider it executable
487				if ( !elem.type || rscriptType.test( elem.type ) ) {
488					// Detach the script and store it in the scripts array (if provided) or the fragment
489					// Return truthy to indicate that it has been handled
490					return scripts ?
491						scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
492						fragment.appendChild( elem );
493				}
494			};
495
496			for ( i = 0; (elem = ret[i]) != null; i++ ) {
497				// Check if we're done after handling an executable script
498				if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
499					// Append to fragment and handle embedded scripts
500					fragment.appendChild( elem );
501					if ( typeof elem.getElementsByTagName !== "undefined" ) {
502						// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
503						jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
504
505						// Splice the scripts into ret after their former ancestor and advance our index beyond them
506						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
507						i += jsTags.length;
508					}
509				}
510			}
511		}
512
513		return ret;
514	};
515}
516
517var eventAdd = jQuery.event.add,
518	eventRemove = jQuery.event.remove,
519	eventTrigger = jQuery.event.trigger,
520	oldToggle = jQuery.fn.toggle,
521	oldLive = jQuery.fn.live,
522	oldDie = jQuery.fn.die,
523	oldLoad = jQuery.fn.load,
524	ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
525	rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
526	rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
527	hoverHack = function( events ) {
528		if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
529			return events;
530		}
531		if ( rhoverHack.test( events ) ) {
532			migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
533		}
534		return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
535	};
536
537// Event props removed in 1.9, put them back if needed; no practical way to warn them
538if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
539	jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
540}
541
542// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
543if ( jQuery.event.dispatch ) {
544	migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
545}
546
547// Support for 'hover' pseudo-event and ajax event warnings
548jQuery.event.add = function( elem, types, handler, data, selector ){
549	if ( elem !== document && rajaxEvent.test( types ) ) {
550		migrateWarn( "AJAX events should be attached to document: " + types );
551	}
552	eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
553};
554jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
555	eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
556};
557
558jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
559
560	jQuery.fn[ name ] = function() {
561		var args = Array.prototype.slice.call( arguments, 0 );
562
563		// If this is an ajax load() the first arg should be the string URL;
564		// technically this could also be the "Anything" arg of the event .load()
565		// which just goes to show why this dumb signature has been deprecated!
566		// jQuery custom builds that exclude the Ajax module justifiably die here.
567		if ( name === "load" && typeof args[ 0 ] === "string" ) {
568			return oldLoad.apply( this, args );
569		}
570
571		migrateWarn( "jQuery.fn." + name + "() is deprecated" );
572
573		args.splice( 0, 0, name );
574		if ( arguments.length ) {
575			return this.bind.apply( this, args );
576		}
577
578		// Use .triggerHandler here because:
579		// - load and unload events don't need to bubble, only applied to window or image
580		// - error event should not bubble to window, although it does pre-1.7
581		// See http://bugs.jquery.com/ticket/11820
582		this.triggerHandler.apply( this, args );
583		return this;
584	};
585
586});
587
588jQuery.fn.toggle = function( fn, fn2 ) {
589
590	// Don't mess with animation or css toggles
591	if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
592		return oldToggle.apply( this, arguments );
593	}
594	migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
595
596	// Save reference to arguments for access in closure
597	var args = arguments,
598		guid = fn.guid || jQuery.guid++,
599		i = 0,
600		toggler = function( event ) {
601			// Figure out which function to execute
602			var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
603			jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
604
605			// Make sure that clicks stop
606			event.preventDefault();
607
608			// and execute the function
609			return args[ lastToggle ].apply( this, arguments ) || false;
610		};
611
612	// link all the functions, so any of them can unbind this click handler
613	toggler.guid = guid;
614	while ( i < args.length ) {
615		args[ i++ ].guid = guid;
616	}
617
618	return this.click( toggler );
619};
620
621jQuery.fn.live = function( types, data, fn ) {
622	migrateWarn("jQuery.fn.live() is deprecated");
623	if ( oldLive ) {
624		return oldLive.apply( this, arguments );
625	}
626	jQuery( this.context ).on( types, this.selector, data, fn );
627	return this;
628};
629
630jQuery.fn.die = function( types, fn ) {
631	migrateWarn("jQuery.fn.die() is deprecated");
632	if ( oldDie ) {
633		return oldDie.apply( this, arguments );
634	}
635	jQuery( this.context ).off( types, this.selector || "**", fn );
636	return this;
637};
638
639// Turn global events into document-triggered events
640jQuery.event.trigger = function( event, data, elem, onlyHandlers  ){
641	if ( !elem && !rajaxEvent.test( event ) ) {
642		migrateWarn( "Global events are undocumented and deprecated" );
643	}
644	return eventTrigger.call( this,  event, data, elem || document, onlyHandlers  );
645};
646jQuery.each( ajaxEvents.split("|"),
647	function( _, name ) {
648		jQuery.event.special[ name ] = {
649			setup: function() {
650				var elem = this;
651
652				// The document needs no shimming; must be !== for oldIE
653				if ( elem !== document ) {
654					jQuery.event.add( document, name + "." + jQuery.guid, function() {
655						jQuery.event.trigger( name, Array.prototype.slice.call( arguments, 1 ), elem, true );
656					});
657					jQuery._data( this, name, jQuery.guid++ );
658				}
659				return false;
660			},
661			teardown: function() {
662				if ( this !== document ) {
663					jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
664				}
665				return false;
666			}
667		};
668	}
669);
670
671jQuery.event.special.ready = {
672	setup: function() {
673		if ( this === document ) {
674			migrateWarn( "'ready' event is deprecated" );
675		}
676	}
677};
678
679var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
680	oldFnFind = jQuery.fn.find;
681
682jQuery.fn.andSelf = function() {
683	migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
684	return oldSelf.apply( this, arguments );
685};
686
687jQuery.fn.find = function( selector ) {
688	var ret = oldFnFind.apply( this, arguments );
689	ret.context = this.context;
690	ret.selector = this.selector ? this.selector + " " + selector : selector;
691	return ret;
692};
693
694
695// jQuery 1.6 did not support Callbacks, do not warn there
696if ( jQuery.Callbacks ) {
697
698	var oldDeferred = jQuery.Deferred,
699		tuples = [
700			// action, add listener, callbacks, .then handlers, final state
701			[ "resolve", "done", jQuery.Callbacks("once memory"),
702				jQuery.Callbacks("once memory"), "resolved" ],
703			[ "reject", "fail", jQuery.Callbacks("once memory"),
704				jQuery.Callbacks("once memory"), "rejected" ],
705			[ "notify", "progress", jQuery.Callbacks("memory"),
706				jQuery.Callbacks("memory") ]
707		];
708
709	jQuery.Deferred = function( func ) {
710		var deferred = oldDeferred(),
711			promise = deferred.promise();
712
713		deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
714			var fns = arguments;
715
716			migrateWarn( "deferred.pipe() is deprecated" );
717
718			return jQuery.Deferred(function( newDefer ) {
719				jQuery.each( tuples, function( i, tuple ) {
720					var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
721					// deferred.done(function() { bind to newDefer or newDefer.resolve })
722					// deferred.fail(function() { bind to newDefer or newDefer.reject })
723					// deferred.progress(function() { bind to newDefer or newDefer.notify })
724					deferred[ tuple[1] ](function() {
725						var returned = fn && fn.apply( this, arguments );
726						if ( returned && jQuery.isFunction( returned.promise ) ) {
727							returned.promise()
728								.done( newDefer.resolve )
729								.fail( newDefer.reject )
730								.progress( newDefer.notify );
731						} else {
732							newDefer[ tuple[ 0 ] + "With" ](
733								this === promise ? newDefer.promise() : this,
734								fn ? [ returned ] : arguments
735							);
736						}
737					});
738				});
739				fns = null;
740			}).promise();
741
742		};
743
744		deferred.isResolved = function() {
745			migrateWarn( "deferred.isResolved is deprecated" );
746			return deferred.state() === "resolved";
747		};
748
749		deferred.isRejected = function() {
750			migrateWarn( "deferred.isRejected is deprecated" );
751			return deferred.state() === "rejected";
752		};
753
754		if ( func ) {
755			func.call( deferred, deferred );
756		}
757
758		return deferred;
759	};
760
761}
762
763})( jQuery, window );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.