| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488 | define( [	"./core",	"./core/isAttached",	"./var/flat",	"./var/isFunction",	"./var/push",	"./var/rcheckableType",	"./core/access",	"./manipulation/var/rtagName",	"./manipulation/var/rscriptType",	"./manipulation/wrapMap",	"./manipulation/getAll",	"./manipulation/setGlobalEval",	"./manipulation/buildFragment",	"./manipulation/support",	"./data/var/dataPriv",	"./data/var/dataUser",	"./data/var/acceptData",	"./core/DOMEval",	"./core/nodeName",	"./core/init",	"./traversing",	"./selector",	"./event"], function( jQuery, isAttached, flat, isFunction, push, rcheckableType,	access, rtagName, rscriptType,	wrapMap, getAll, setGlobalEval, buildFragment, support,	dataPriv, dataUser, acceptData, DOMEval, nodeName ) {"use strict";var	// Support: IE <=10 - 11, Edge 12 - 13 only	// In IE/Edge using regex groups here causes severe slowdowns.	// See https://connect.microsoft.com/IE/feedback/details/1736512/	rnoInnerhtml = /<script|<style|<link/i,	// checked="checked" or checked	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,	rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;// Prefer a tbody over its parent table for containing new rowsfunction manipulationTarget( elem, content ) {	if ( nodeName( elem, "table" ) &&		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;	}	return elem;}// Replace/restore the type attribute of script elements for safe DOM manipulationfunction disableScript( elem ) {	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;	return elem;}function restoreScript( elem ) {	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {		elem.type = elem.type.slice( 5 );	} else {		elem.removeAttribute( "type" );	}	return elem;}function cloneCopyEvent( src, dest ) {	var i, l, type, pdataOld, udataOld, udataCur, events;	if ( dest.nodeType !== 1 ) {		return;	}	// 1. Copy private data: events, handlers, etc.	if ( dataPriv.hasData( src ) ) {		pdataOld = dataPriv.get( src );		events = pdataOld.events;		if ( events ) {			dataPriv.remove( dest, "handle events" );			for ( type in events ) {				for ( i = 0, l = events[ type ].length; i < l; i++ ) {					jQuery.event.add( dest, type, events[ type ][ i ] );				}			}		}	}	// 2. Copy user data	if ( dataUser.hasData( src ) ) {		udataOld = dataUser.access( src );		udataCur = jQuery.extend( {}, udataOld );		dataUser.set( dest, udataCur );	}}// Fix IE bugs, see support testsfunction fixInput( src, dest ) {	var nodeName = dest.nodeName.toLowerCase();	// Fails to persist the checked state of a cloned checkbox or radio button.	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {		dest.checked = src.checked;	// Fails to return the selected option to the default selected state when cloning options	} else if ( nodeName === "input" || nodeName === "textarea" ) {		dest.defaultValue = src.defaultValue;	}}function domManip( collection, args, callback, ignored ) {	// Flatten any nested arrays	args = flat( args );	var fragment, first, scripts, hasScripts, node, doc,		i = 0,		l = collection.length,		iNoClone = l - 1,		value = args[ 0 ],		valueIsFunction = isFunction( value );	// We can't cloneNode fragments that contain checked, in WebKit	if ( valueIsFunction ||			( l > 1 && typeof value === "string" &&				!support.checkClone && rchecked.test( value ) ) ) {		return collection.each( function( index ) {			var self = collection.eq( index );			if ( valueIsFunction ) {				args[ 0 ] = value.call( this, index, self.html() );			}			domManip( self, args, callback, ignored );		} );	}	if ( l ) {		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );		first = fragment.firstChild;		if ( fragment.childNodes.length === 1 ) {			fragment = first;		}		// Require either new content or an interest in ignored elements to invoke the callback		if ( first || ignored ) {			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );			hasScripts = scripts.length;			// Use the original fragment for the last item			// instead of the first because it can end up			// being emptied incorrectly in certain situations (trac-8070).			for ( ; i < l; i++ ) {				node = fragment;				if ( i !== iNoClone ) {					node = jQuery.clone( node, true, true );					// Keep references to cloned scripts for later restoration					if ( hasScripts ) {						// Support: Android <=4.0 only, PhantomJS 1 only						// push.apply(_, arraylike) throws on ancient WebKit						jQuery.merge( scripts, getAll( node, "script" ) );					}				}				callback.call( collection[ i ], node, i );			}			if ( hasScripts ) {				doc = scripts[ scripts.length - 1 ].ownerDocument;				// Reenable scripts				jQuery.map( scripts, restoreScript );				// Evaluate executable scripts on first document insertion				for ( i = 0; i < hasScripts; i++ ) {					node = scripts[ i ];					if ( rscriptType.test( node.type || "" ) &&						!dataPriv.access( node, "globalEval" ) &&						jQuery.contains( doc, node ) ) {						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {							// Optional AJAX dependency, but won't run scripts if not present							if ( jQuery._evalUrl && !node.noModule ) {								jQuery._evalUrl( node.src, {									nonce: node.nonce || node.getAttribute( "nonce" )								}, doc );							}						} else {							// Unwrap a CDATA section containing script contents. This shouldn't be							// needed as in XML documents they're already not visible when							// inspecting element contents and in HTML documents they have no							// meaning but we're preserving that logic for backwards compatibility.							// This will be removed completely in 4.0. See gh-4904.							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );						}					}				}			}		}	}	return collection;}function remove( elem, selector, keepData ) {	var node,		nodes = selector ? jQuery.filter( selector, elem ) : elem,		i = 0;	for ( ; ( node = nodes[ i ] ) != null; i++ ) {		if ( !keepData && node.nodeType === 1 ) {			jQuery.cleanData( getAll( node ) );		}		if ( node.parentNode ) {			if ( keepData && isAttached( node ) ) {				setGlobalEval( getAll( node, "script" ) );			}			node.parentNode.removeChild( node );		}	}	return elem;}jQuery.extend( {	htmlPrefilter: function( html ) {		return html;	},	clone: function( elem, dataAndEvents, deepDataAndEvents ) {		var i, l, srcElements, destElements,			clone = elem.cloneNode( true ),			inPage = isAttached( elem );		// Fix IE cloning issues		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&				!jQuery.isXMLDoc( elem ) ) {			// We eschew jQuery#find here for performance reasons:			// https://jsperf.com/getall-vs-sizzle/2			destElements = getAll( clone );			srcElements = getAll( elem );			for ( i = 0, l = srcElements.length; i < l; i++ ) {				fixInput( srcElements[ i ], destElements[ i ] );			}		}		// Copy the events from the original to the clone		if ( dataAndEvents ) {			if ( deepDataAndEvents ) {				srcElements = srcElements || getAll( elem );				destElements = destElements || getAll( clone );				for ( i = 0, l = srcElements.length; i < l; i++ ) {					cloneCopyEvent( srcElements[ i ], destElements[ i ] );				}			} else {				cloneCopyEvent( elem, clone );			}		}		// Preserve script evaluation history		destElements = getAll( clone, "script" );		if ( destElements.length > 0 ) {			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );		}		// Return the cloned set		return clone;	},	cleanData: function( elems ) {		var data, elem, type,			special = jQuery.event.special,			i = 0;		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {			if ( acceptData( elem ) ) {				if ( ( data = elem[ dataPriv.expando ] ) ) {					if ( data.events ) {						for ( type in data.events ) {							if ( special[ type ] ) {								jQuery.event.remove( elem, type );							// This is a shortcut to avoid jQuery.event.remove's overhead							} else {								jQuery.removeEvent( elem, type, data.handle );							}						}					}					// Support: Chrome <=35 - 45+					// Assign undefined instead of using delete, see Data#remove					elem[ dataPriv.expando ] = undefined;				}				if ( elem[ dataUser.expando ] ) {					// Support: Chrome <=35 - 45+					// Assign undefined instead of using delete, see Data#remove					elem[ dataUser.expando ] = undefined;				}			}		}	}} );jQuery.fn.extend( {	detach: function( selector ) {		return remove( this, selector, true );	},	remove: function( selector ) {		return remove( this, selector );	},	text: function( value ) {		return access( this, function( value ) {			return value === undefined ?				jQuery.text( this ) :				this.empty().each( function() {					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {						this.textContent = value;					}				} );		}, null, value, arguments.length );	},	append: function() {		return domManip( this, arguments, function( elem ) {			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {				var target = manipulationTarget( this, elem );				target.appendChild( elem );			}		} );	},	prepend: function() {		return domManip( this, arguments, function( elem ) {			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {				var target = manipulationTarget( this, elem );				target.insertBefore( elem, target.firstChild );			}		} );	},	before: function() {		return domManip( this, arguments, function( elem ) {			if ( this.parentNode ) {				this.parentNode.insertBefore( elem, this );			}		} );	},	after: function() {		return domManip( this, arguments, function( elem ) {			if ( this.parentNode ) {				this.parentNode.insertBefore( elem, this.nextSibling );			}		} );	},	empty: function() {		var elem,			i = 0;		for ( ; ( elem = this[ i ] ) != null; i++ ) {			if ( elem.nodeType === 1 ) {				// Prevent memory leaks				jQuery.cleanData( getAll( elem, false ) );				// Remove any remaining nodes				elem.textContent = "";			}		}		return this;	},	clone: function( dataAndEvents, deepDataAndEvents ) {		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;		return this.map( function() {			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );		} );	},	html: function( value ) {		return access( this, function( value ) {			var elem = this[ 0 ] || {},				i = 0,				l = this.length;			if ( value === undefined && elem.nodeType === 1 ) {				return elem.innerHTML;			}			// See if we can take a shortcut and just use innerHTML			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {				value = jQuery.htmlPrefilter( value );				try {					for ( ; i < l; i++ ) {						elem = this[ i ] || {};						// Remove element nodes and prevent memory leaks						if ( elem.nodeType === 1 ) {							jQuery.cleanData( getAll( elem, false ) );							elem.innerHTML = value;						}					}					elem = 0;				// If using innerHTML throws an exception, use the fallback method				} catch ( e ) {}			}			if ( elem ) {				this.empty().append( value );			}		}, null, value, arguments.length );	},	replaceWith: function() {		var ignored = [];		// Make the changes, replacing each non-ignored context element with the new content		return domManip( this, arguments, function( elem ) {			var parent = this.parentNode;			if ( jQuery.inArray( this, ignored ) < 0 ) {				jQuery.cleanData( getAll( this ) );				if ( parent ) {					parent.replaceChild( elem, this );				}			}		// Force callback invocation		}, ignored );	}} );jQuery.each( {	appendTo: "append",	prependTo: "prepend",	insertBefore: "before",	insertAfter: "after",	replaceAll: "replaceWith"}, function( name, original ) {	jQuery.fn[ name ] = function( selector ) {		var elems,			ret = [],			insert = jQuery( selector ),			last = insert.length - 1,			i = 0;		for ( ; i <= last; i++ ) {			elems = i === last ? this : this.clone( true );			jQuery( insert[ i ] )[ original ]( elems );			// Support: Android <=4.0 only, PhantomJS 1 only			// .get() because push.apply(_, arraylike) throws on ancient WebKit			push.apply( ret, elems.get() );		}		return this.pushStack( ret );	};} );return jQuery;} );
 |