1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Touchgui/www/lib/jquery/jquery-2.1.1.js Thu Jun 04 14:50:33 2015 +0200 1.3 @@ -0,0 +1,9190 @@ 1.4 +/*! 1.5 + * jQuery JavaScript Library v2.1.1 1.6 + * http://jquery.com/ 1.7 + * 1.8 + * Includes Sizzle.js 1.9 + * http://sizzlejs.com/ 1.10 + * 1.11 + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors 1.12 + * Released under the MIT license 1.13 + * http://jquery.org/license 1.14 + * 1.15 + * Date: 2014-05-01T17:11Z 1.16 + */ 1.17 + 1.18 +(function( global, factory ) { 1.19 + 1.20 + if ( typeof module === "object" && typeof module.exports === "object" ) { 1.21 + // For CommonJS and CommonJS-like environments where a proper window is present, 1.22 + // execute the factory and get jQuery 1.23 + // For environments that do not inherently posses a window with a document 1.24 + // (such as Node.js), expose a jQuery-making factory as module.exports 1.25 + // This accentuates the need for the creation of a real window 1.26 + // e.g. var jQuery = require("jquery")(window); 1.27 + // See ticket #14549 for more info 1.28 + module.exports = global.document ? 1.29 + factory( global, true ) : 1.30 + function( w ) { 1.31 + if ( !w.document ) { 1.32 + throw new Error( "jQuery requires a window with a document" ); 1.33 + } 1.34 + return factory( w ); 1.35 + }; 1.36 + } else { 1.37 + factory( global ); 1.38 + } 1.39 + 1.40 +// Pass this if window is not defined yet 1.41 +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 1.42 + 1.43 +// Can't do this because several apps including ASP.NET trace 1.44 +// the stack via arguments.caller.callee and Firefox dies if 1.45 +// you try to trace through "use strict" call chains. (#13335) 1.46 +// Support: Firefox 18+ 1.47 +// 1.48 + 1.49 +var arr = []; 1.50 + 1.51 +var slice = arr.slice; 1.52 + 1.53 +var concat = arr.concat; 1.54 + 1.55 +var push = arr.push; 1.56 + 1.57 +var indexOf = arr.indexOf; 1.58 + 1.59 +var class2type = {}; 1.60 + 1.61 +var toString = class2type.toString; 1.62 + 1.63 +var hasOwn = class2type.hasOwnProperty; 1.64 + 1.65 +var support = {}; 1.66 + 1.67 + 1.68 + 1.69 +var 1.70 + // Use the correct document accordingly with window argument (sandbox) 1.71 + document = window.document, 1.72 + 1.73 + version = "2.1.1", 1.74 + 1.75 + // Define a local copy of jQuery 1.76 + jQuery = function( selector, context ) { 1.77 + // The jQuery object is actually just the init constructor 'enhanced' 1.78 + // Need init if jQuery is called (just allow error to be thrown if not included) 1.79 + return new jQuery.fn.init( selector, context ); 1.80 + }, 1.81 + 1.82 + // Support: Android<4.1 1.83 + // Make sure we trim BOM and NBSP 1.84 + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 1.85 + 1.86 + // Matches dashed string for camelizing 1.87 + rmsPrefix = /^-ms-/, 1.88 + rdashAlpha = /-([\da-z])/gi, 1.89 + 1.90 + // Used by jQuery.camelCase as callback to replace() 1.91 + fcamelCase = function( all, letter ) { 1.92 + return letter.toUpperCase(); 1.93 + }; 1.94 + 1.95 +jQuery.fn = jQuery.prototype = { 1.96 + // The current version of jQuery being used 1.97 + jquery: version, 1.98 + 1.99 + constructor: jQuery, 1.100 + 1.101 + // Start with an empty selector 1.102 + selector: "", 1.103 + 1.104 + // The default length of a jQuery object is 0 1.105 + length: 0, 1.106 + 1.107 + toArray: function() { 1.108 + return slice.call( this ); 1.109 + }, 1.110 + 1.111 + // Get the Nth element in the matched element set OR 1.112 + // Get the whole matched element set as a clean array 1.113 + get: function( num ) { 1.114 + return num != null ? 1.115 + 1.116 + // Return just the one element from the set 1.117 + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : 1.118 + 1.119 + // Return all the elements in a clean array 1.120 + slice.call( this ); 1.121 + }, 1.122 + 1.123 + // Take an array of elements and push it onto the stack 1.124 + // (returning the new matched element set) 1.125 + pushStack: function( elems ) { 1.126 + 1.127 + // Build a new jQuery matched element set 1.128 + var ret = jQuery.merge( this.constructor(), elems ); 1.129 + 1.130 + // Add the old object onto the stack (as a reference) 1.131 + ret.prevObject = this; 1.132 + ret.context = this.context; 1.133 + 1.134 + // Return the newly-formed element set 1.135 + return ret; 1.136 + }, 1.137 + 1.138 + // Execute a callback for every element in the matched set. 1.139 + // (You can seed the arguments with an array of args, but this is 1.140 + // only used internally.) 1.141 + each: function( callback, args ) { 1.142 + return jQuery.each( this, callback, args ); 1.143 + }, 1.144 + 1.145 + map: function( callback ) { 1.146 + return this.pushStack( jQuery.map(this, function( elem, i ) { 1.147 + return callback.call( elem, i, elem ); 1.148 + })); 1.149 + }, 1.150 + 1.151 + slice: function() { 1.152 + return this.pushStack( slice.apply( this, arguments ) ); 1.153 + }, 1.154 + 1.155 + first: function() { 1.156 + return this.eq( 0 ); 1.157 + }, 1.158 + 1.159 + last: function() { 1.160 + return this.eq( -1 ); 1.161 + }, 1.162 + 1.163 + eq: function( i ) { 1.164 + var len = this.length, 1.165 + j = +i + ( i < 0 ? len : 0 ); 1.166 + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); 1.167 + }, 1.168 + 1.169 + end: function() { 1.170 + return this.prevObject || this.constructor(null); 1.171 + }, 1.172 + 1.173 + // For internal use only. 1.174 + // Behaves like an Array's method, not like a jQuery method. 1.175 + push: push, 1.176 + sort: arr.sort, 1.177 + splice: arr.splice 1.178 +}; 1.179 + 1.180 +jQuery.extend = jQuery.fn.extend = function() { 1.181 + var options, name, src, copy, copyIsArray, clone, 1.182 + target = arguments[0] || {}, 1.183 + i = 1, 1.184 + length = arguments.length, 1.185 + deep = false; 1.186 + 1.187 + // Handle a deep copy situation 1.188 + if ( typeof target === "boolean" ) { 1.189 + deep = target; 1.190 + 1.191 + // skip the boolean and the target 1.192 + target = arguments[ i ] || {}; 1.193 + i++; 1.194 + } 1.195 + 1.196 + // Handle case when target is a string or something (possible in deep copy) 1.197 + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { 1.198 + target = {}; 1.199 + } 1.200 + 1.201 + // extend jQuery itself if only one argument is passed 1.202 + if ( i === length ) { 1.203 + target = this; 1.204 + i--; 1.205 + } 1.206 + 1.207 + for ( ; i < length; i++ ) { 1.208 + // Only deal with non-null/undefined values 1.209 + if ( (options = arguments[ i ]) != null ) { 1.210 + // Extend the base object 1.211 + for ( name in options ) { 1.212 + src = target[ name ]; 1.213 + copy = options[ name ]; 1.214 + 1.215 + // Prevent never-ending loop 1.216 + if ( target === copy ) { 1.217 + continue; 1.218 + } 1.219 + 1.220 + // Recurse if we're merging plain objects or arrays 1.221 + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { 1.222 + if ( copyIsArray ) { 1.223 + copyIsArray = false; 1.224 + clone = src && jQuery.isArray(src) ? src : []; 1.225 + 1.226 + } else { 1.227 + clone = src && jQuery.isPlainObject(src) ? src : {}; 1.228 + } 1.229 + 1.230 + // Never move original objects, clone them 1.231 + target[ name ] = jQuery.extend( deep, clone, copy ); 1.232 + 1.233 + // Don't bring in undefined values 1.234 + } else if ( copy !== undefined ) { 1.235 + target[ name ] = copy; 1.236 + } 1.237 + } 1.238 + } 1.239 + } 1.240 + 1.241 + // Return the modified object 1.242 + return target; 1.243 +}; 1.244 + 1.245 +jQuery.extend({ 1.246 + // Unique for each copy of jQuery on the page 1.247 + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 1.248 + 1.249 + // Assume jQuery is ready without the ready module 1.250 + isReady: true, 1.251 + 1.252 + error: function( msg ) { 1.253 + throw new Error( msg ); 1.254 + }, 1.255 + 1.256 + noop: function() {}, 1.257 + 1.258 + // See test/unit/core.js for details concerning isFunction. 1.259 + // Since version 1.3, DOM methods and functions like alert 1.260 + // aren't supported. They return false on IE (#2968). 1.261 + isFunction: function( obj ) { 1.262 + return jQuery.type(obj) === "function"; 1.263 + }, 1.264 + 1.265 + isArray: Array.isArray, 1.266 + 1.267 + isWindow: function( obj ) { 1.268 + return obj != null && obj === obj.window; 1.269 + }, 1.270 + 1.271 + isNumeric: function( obj ) { 1.272 + // parseFloat NaNs numeric-cast false positives (null|true|false|"") 1.273 + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 1.274 + // subtraction forces infinities to NaN 1.275 + return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; 1.276 + }, 1.277 + 1.278 + isPlainObject: function( obj ) { 1.279 + // Not plain objects: 1.280 + // - Any object or value whose internal [[Class]] property is not "[object Object]" 1.281 + // - DOM nodes 1.282 + // - window 1.283 + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { 1.284 + return false; 1.285 + } 1.286 + 1.287 + if ( obj.constructor && 1.288 + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { 1.289 + return false; 1.290 + } 1.291 + 1.292 + // If the function hasn't returned already, we're confident that 1.293 + // |obj| is a plain object, created by {} or constructed with new Object 1.294 + return true; 1.295 + }, 1.296 + 1.297 + isEmptyObject: function( obj ) { 1.298 + var name; 1.299 + for ( name in obj ) { 1.300 + return false; 1.301 + } 1.302 + return true; 1.303 + }, 1.304 + 1.305 + type: function( obj ) { 1.306 + if ( obj == null ) { 1.307 + return obj + ""; 1.308 + } 1.309 + // Support: Android < 4.0, iOS < 6 (functionish RegExp) 1.310 + return typeof obj === "object" || typeof obj === "function" ? 1.311 + class2type[ toString.call(obj) ] || "object" : 1.312 + typeof obj; 1.313 + }, 1.314 + 1.315 + // Evaluates a script in a global context 1.316 + globalEval: function( code ) { 1.317 + var script, 1.318 + indirect = eval; 1.319 + 1.320 + code = jQuery.trim( code ); 1.321 + 1.322 + if ( code ) { 1.323 + // If the code includes a valid, prologue position 1.324 + // strict mode pragma, execute code by injecting a 1.325 + // script tag into the document. 1.326 + if ( code.indexOf("use strict") === 1 ) { 1.327 + script = document.createElement("script"); 1.328 + script.text = code; 1.329 + document.head.appendChild( script ).parentNode.removeChild( script ); 1.330 + } else { 1.331 + // Otherwise, avoid the DOM node creation, insertion 1.332 + // and removal by using an indirect global eval 1.333 + indirect( code ); 1.334 + } 1.335 + } 1.336 + }, 1.337 + 1.338 + // Convert dashed to camelCase; used by the css and data modules 1.339 + // Microsoft forgot to hump their vendor prefix (#9572) 1.340 + camelCase: function( string ) { 1.341 + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 1.342 + }, 1.343 + 1.344 + nodeName: function( elem, name ) { 1.345 + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 1.346 + }, 1.347 + 1.348 + // args is for internal usage only 1.349 + each: function( obj, callback, args ) { 1.350 + var value, 1.351 + i = 0, 1.352 + length = obj.length, 1.353 + isArray = isArraylike( obj ); 1.354 + 1.355 + if ( args ) { 1.356 + if ( isArray ) { 1.357 + for ( ; i < length; i++ ) { 1.358 + value = callback.apply( obj[ i ], args ); 1.359 + 1.360 + if ( value === false ) { 1.361 + break; 1.362 + } 1.363 + } 1.364 + } else { 1.365 + for ( i in obj ) { 1.366 + value = callback.apply( obj[ i ], args ); 1.367 + 1.368 + if ( value === false ) { 1.369 + break; 1.370 + } 1.371 + } 1.372 + } 1.373 + 1.374 + // A special, fast, case for the most common use of each 1.375 + } else { 1.376 + if ( isArray ) { 1.377 + for ( ; i < length; i++ ) { 1.378 + value = callback.call( obj[ i ], i, obj[ i ] ); 1.379 + 1.380 + if ( value === false ) { 1.381 + break; 1.382 + } 1.383 + } 1.384 + } else { 1.385 + for ( i in obj ) { 1.386 + value = callback.call( obj[ i ], i, obj[ i ] ); 1.387 + 1.388 + if ( value === false ) { 1.389 + break; 1.390 + } 1.391 + } 1.392 + } 1.393 + } 1.394 + 1.395 + return obj; 1.396 + }, 1.397 + 1.398 + // Support: Android<4.1 1.399 + trim: function( text ) { 1.400 + return text == null ? 1.401 + "" : 1.402 + ( text + "" ).replace( rtrim, "" ); 1.403 + }, 1.404 + 1.405 + // results is for internal usage only 1.406 + makeArray: function( arr, results ) { 1.407 + var ret = results || []; 1.408 + 1.409 + if ( arr != null ) { 1.410 + if ( isArraylike( Object(arr) ) ) { 1.411 + jQuery.merge( ret, 1.412 + typeof arr === "string" ? 1.413 + [ arr ] : arr 1.414 + ); 1.415 + } else { 1.416 + push.call( ret, arr ); 1.417 + } 1.418 + } 1.419 + 1.420 + return ret; 1.421 + }, 1.422 + 1.423 + inArray: function( elem, arr, i ) { 1.424 + return arr == null ? -1 : indexOf.call( arr, elem, i ); 1.425 + }, 1.426 + 1.427 + merge: function( first, second ) { 1.428 + var len = +second.length, 1.429 + j = 0, 1.430 + i = first.length; 1.431 + 1.432 + for ( ; j < len; j++ ) { 1.433 + first[ i++ ] = second[ j ]; 1.434 + } 1.435 + 1.436 + first.length = i; 1.437 + 1.438 + return first; 1.439 + }, 1.440 + 1.441 + grep: function( elems, callback, invert ) { 1.442 + var callbackInverse, 1.443 + matches = [], 1.444 + i = 0, 1.445 + length = elems.length, 1.446 + callbackExpect = !invert; 1.447 + 1.448 + // Go through the array, only saving the items 1.449 + // that pass the validator function 1.450 + for ( ; i < length; i++ ) { 1.451 + callbackInverse = !callback( elems[ i ], i ); 1.452 + if ( callbackInverse !== callbackExpect ) { 1.453 + matches.push( elems[ i ] ); 1.454 + } 1.455 + } 1.456 + 1.457 + return matches; 1.458 + }, 1.459 + 1.460 + // arg is for internal usage only 1.461 + map: function( elems, callback, arg ) { 1.462 + var value, 1.463 + i = 0, 1.464 + length = elems.length, 1.465 + isArray = isArraylike( elems ), 1.466 + ret = []; 1.467 + 1.468 + // Go through the array, translating each of the items to their new values 1.469 + if ( isArray ) { 1.470 + for ( ; i < length; i++ ) { 1.471 + value = callback( elems[ i ], i, arg ); 1.472 + 1.473 + if ( value != null ) { 1.474 + ret.push( value ); 1.475 + } 1.476 + } 1.477 + 1.478 + // Go through every key on the object, 1.479 + } else { 1.480 + for ( i in elems ) { 1.481 + value = callback( elems[ i ], i, arg ); 1.482 + 1.483 + if ( value != null ) { 1.484 + ret.push( value ); 1.485 + } 1.486 + } 1.487 + } 1.488 + 1.489 + // Flatten any nested arrays 1.490 + return concat.apply( [], ret ); 1.491 + }, 1.492 + 1.493 + // A global GUID counter for objects 1.494 + guid: 1, 1.495 + 1.496 + // Bind a function to a context, optionally partially applying any 1.497 + // arguments. 1.498 + proxy: function( fn, context ) { 1.499 + var tmp, args, proxy; 1.500 + 1.501 + if ( typeof context === "string" ) { 1.502 + tmp = fn[ context ]; 1.503 + context = fn; 1.504 + fn = tmp; 1.505 + } 1.506 + 1.507 + // Quick check to determine if target is callable, in the spec 1.508 + // this throws a TypeError, but we will just return undefined. 1.509 + if ( !jQuery.isFunction( fn ) ) { 1.510 + return undefined; 1.511 + } 1.512 + 1.513 + // Simulated bind 1.514 + args = slice.call( arguments, 2 ); 1.515 + proxy = function() { 1.516 + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 1.517 + }; 1.518 + 1.519 + // Set the guid of unique handler to the same of original handler, so it can be removed 1.520 + proxy.guid = fn.guid = fn.guid || jQuery.guid++; 1.521 + 1.522 + return proxy; 1.523 + }, 1.524 + 1.525 + now: Date.now, 1.526 + 1.527 + // jQuery.support is not used in Core but other projects attach their 1.528 + // properties to it so it needs to exist. 1.529 + support: support 1.530 +}); 1.531 + 1.532 +// Populate the class2type map 1.533 +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { 1.534 + class2type[ "[object " + name + "]" ] = name.toLowerCase(); 1.535 +}); 1.536 + 1.537 +function isArraylike( obj ) { 1.538 + var length = obj.length, 1.539 + type = jQuery.type( obj ); 1.540 + 1.541 + if ( type === "function" || jQuery.isWindow( obj ) ) { 1.542 + return false; 1.543 + } 1.544 + 1.545 + if ( obj.nodeType === 1 && length ) { 1.546 + return true; 1.547 + } 1.548 + 1.549 + return type === "array" || length === 0 || 1.550 + typeof length === "number" && length > 0 && ( length - 1 ) in obj; 1.551 +} 1.552 +var Sizzle = 1.553 +/*! 1.554 + * Sizzle CSS Selector Engine v1.10.19 1.555 + * http://sizzlejs.com/ 1.556 + * 1.557 + * Copyright 2013 jQuery Foundation, Inc. and other contributors 1.558 + * Released under the MIT license 1.559 + * http://jquery.org/license 1.560 + * 1.561 + * Date: 2014-04-18 1.562 + */ 1.563 +(function( window ) { 1.564 + 1.565 +var i, 1.566 + support, 1.567 + Expr, 1.568 + getText, 1.569 + isXML, 1.570 + tokenize, 1.571 + compile, 1.572 + select, 1.573 + outermostContext, 1.574 + sortInput, 1.575 + hasDuplicate, 1.576 + 1.577 + // Local document vars 1.578 + setDocument, 1.579 + document, 1.580 + docElem, 1.581 + documentIsHTML, 1.582 + rbuggyQSA, 1.583 + rbuggyMatches, 1.584 + matches, 1.585 + contains, 1.586 + 1.587 + // Instance-specific data 1.588 + expando = "sizzle" + -(new Date()), 1.589 + preferredDoc = window.document, 1.590 + dirruns = 0, 1.591 + done = 0, 1.592 + classCache = createCache(), 1.593 + tokenCache = createCache(), 1.594 + compilerCache = createCache(), 1.595 + sortOrder = function( a, b ) { 1.596 + if ( a === b ) { 1.597 + hasDuplicate = true; 1.598 + } 1.599 + return 0; 1.600 + }, 1.601 + 1.602 + // General-purpose constants 1.603 + strundefined = typeof undefined, 1.604 + MAX_NEGATIVE = 1 << 31, 1.605 + 1.606 + // Instance methods 1.607 + hasOwn = ({}).hasOwnProperty, 1.608 + arr = [], 1.609 + pop = arr.pop, 1.610 + push_native = arr.push, 1.611 + push = arr.push, 1.612 + slice = arr.slice, 1.613 + // Use a stripped-down indexOf if we can't use a native one 1.614 + indexOf = arr.indexOf || function( elem ) { 1.615 + var i = 0, 1.616 + len = this.length; 1.617 + for ( ; i < len; i++ ) { 1.618 + if ( this[i] === elem ) { 1.619 + return i; 1.620 + } 1.621 + } 1.622 + return -1; 1.623 + }, 1.624 + 1.625 + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 1.626 + 1.627 + // Regular expressions 1.628 + 1.629 + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace 1.630 + whitespace = "[\\x20\\t\\r\\n\\f]", 1.631 + // http://www.w3.org/TR/css3-syntax/#characters 1.632 + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", 1.633 + 1.634 + // Loosely modeled on CSS identifier characters 1.635 + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors 1.636 + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 1.637 + identifier = characterEncoding.replace( "w", "w#" ), 1.638 + 1.639 + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 1.640 + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + 1.641 + // Operator (capture 2) 1.642 + "*([*^$|!~]?=)" + whitespace + 1.643 + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 1.644 + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + 1.645 + "*\\]", 1.646 + 1.647 + pseudos = ":(" + characterEncoding + ")(?:\\((" + 1.648 + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 1.649 + // 1. quoted (capture 3; capture 4 or capture 5) 1.650 + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 1.651 + // 2. simple (capture 6) 1.652 + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 1.653 + // 3. anything else (capture 2) 1.654 + ".*" + 1.655 + ")\\)|)", 1.656 + 1.657 + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 1.658 + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), 1.659 + 1.660 + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 1.661 + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), 1.662 + 1.663 + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), 1.664 + 1.665 + rpseudo = new RegExp( pseudos ), 1.666 + ridentifier = new RegExp( "^" + identifier + "$" ), 1.667 + 1.668 + matchExpr = { 1.669 + "ID": new RegExp( "^#(" + characterEncoding + ")" ), 1.670 + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), 1.671 + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), 1.672 + "ATTR": new RegExp( "^" + attributes ), 1.673 + "PSEUDO": new RegExp( "^" + pseudos ), 1.674 + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + 1.675 + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + 1.676 + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 1.677 + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 1.678 + // For use in libraries implementing .is() 1.679 + // We use this for POS matching in `select` 1.680 + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + 1.681 + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 1.682 + }, 1.683 + 1.684 + rinputs = /^(?:input|select|textarea|button)$/i, 1.685 + rheader = /^h\d$/i, 1.686 + 1.687 + rnative = /^[^{]+\{\s*\[native \w/, 1.688 + 1.689 + // Easily-parseable/retrievable ID or TAG or CLASS selectors 1.690 + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 1.691 + 1.692 + rsibling = /[+~]/, 1.693 + rescape = /'|\\/g, 1.694 + 1.695 + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 1.696 + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), 1.697 + funescape = function( _, escaped, escapedWhitespace ) { 1.698 + var high = "0x" + escaped - 0x10000; 1.699 + // NaN means non-codepoint 1.700 + // Support: Firefox<24 1.701 + // Workaround erroneous numeric interpretation of +"0x" 1.702 + return high !== high || escapedWhitespace ? 1.703 + escaped : 1.704 + high < 0 ? 1.705 + // BMP codepoint 1.706 + String.fromCharCode( high + 0x10000 ) : 1.707 + // Supplemental Plane codepoint (surrogate pair) 1.708 + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 1.709 + }; 1.710 + 1.711 +// Optimize for push.apply( _, NodeList ) 1.712 +try { 1.713 + push.apply( 1.714 + (arr = slice.call( preferredDoc.childNodes )), 1.715 + preferredDoc.childNodes 1.716 + ); 1.717 + // Support: Android<4.0 1.718 + // Detect silently failing push.apply 1.719 + arr[ preferredDoc.childNodes.length ].nodeType; 1.720 +} catch ( e ) { 1.721 + push = { apply: arr.length ? 1.722 + 1.723 + // Leverage slice if possible 1.724 + function( target, els ) { 1.725 + push_native.apply( target, slice.call(els) ); 1.726 + } : 1.727 + 1.728 + // Support: IE<9 1.729 + // Otherwise append directly 1.730 + function( target, els ) { 1.731 + var j = target.length, 1.732 + i = 0; 1.733 + // Can't trust NodeList.length 1.734 + while ( (target[j++] = els[i++]) ) {} 1.735 + target.length = j - 1; 1.736 + } 1.737 + }; 1.738 +} 1.739 + 1.740 +function Sizzle( selector, context, results, seed ) { 1.741 + var match, elem, m, nodeType, 1.742 + // QSA vars 1.743 + i, groups, old, nid, newContext, newSelector; 1.744 + 1.745 + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { 1.746 + setDocument( context ); 1.747 + } 1.748 + 1.749 + context = context || document; 1.750 + results = results || []; 1.751 + 1.752 + if ( !selector || typeof selector !== "string" ) { 1.753 + return results; 1.754 + } 1.755 + 1.756 + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { 1.757 + return []; 1.758 + } 1.759 + 1.760 + if ( documentIsHTML && !seed ) { 1.761 + 1.762 + // Shortcuts 1.763 + if ( (match = rquickExpr.exec( selector )) ) { 1.764 + // Speed-up: Sizzle("#ID") 1.765 + if ( (m = match[1]) ) { 1.766 + if ( nodeType === 9 ) { 1.767 + elem = context.getElementById( m ); 1.768 + // Check parentNode to catch when Blackberry 4.6 returns 1.769 + // nodes that are no longer in the document (jQuery #6963) 1.770 + if ( elem && elem.parentNode ) { 1.771 + // Handle the case where IE, Opera, and Webkit return items 1.772 + // by name instead of ID 1.773 + if ( elem.id === m ) { 1.774 + results.push( elem ); 1.775 + return results; 1.776 + } 1.777 + } else { 1.778 + return results; 1.779 + } 1.780 + } else { 1.781 + // Context is not a document 1.782 + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && 1.783 + contains( context, elem ) && elem.id === m ) { 1.784 + results.push( elem ); 1.785 + return results; 1.786 + } 1.787 + } 1.788 + 1.789 + // Speed-up: Sizzle("TAG") 1.790 + } else if ( match[2] ) { 1.791 + push.apply( results, context.getElementsByTagName( selector ) ); 1.792 + return results; 1.793 + 1.794 + // Speed-up: Sizzle(".CLASS") 1.795 + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { 1.796 + push.apply( results, context.getElementsByClassName( m ) ); 1.797 + return results; 1.798 + } 1.799 + } 1.800 + 1.801 + // QSA path 1.802 + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { 1.803 + nid = old = expando; 1.804 + newContext = context; 1.805 + newSelector = nodeType === 9 && selector; 1.806 + 1.807 + // qSA works strangely on Element-rooted queries 1.808 + // We can work around this by specifying an extra ID on the root 1.809 + // and working up from there (Thanks to Andrew Dupont for the technique) 1.810 + // IE 8 doesn't work on object elements 1.811 + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { 1.812 + groups = tokenize( selector ); 1.813 + 1.814 + if ( (old = context.getAttribute("id")) ) { 1.815 + nid = old.replace( rescape, "\\$&" ); 1.816 + } else { 1.817 + context.setAttribute( "id", nid ); 1.818 + } 1.819 + nid = "[id='" + nid + "'] "; 1.820 + 1.821 + i = groups.length; 1.822 + while ( i-- ) { 1.823 + groups[i] = nid + toSelector( groups[i] ); 1.824 + } 1.825 + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; 1.826 + newSelector = groups.join(","); 1.827 + } 1.828 + 1.829 + if ( newSelector ) { 1.830 + try { 1.831 + push.apply( results, 1.832 + newContext.querySelectorAll( newSelector ) 1.833 + ); 1.834 + return results; 1.835 + } catch(qsaError) { 1.836 + } finally { 1.837 + if ( !old ) { 1.838 + context.removeAttribute("id"); 1.839 + } 1.840 + } 1.841 + } 1.842 + } 1.843 + } 1.844 + 1.845 + // All others 1.846 + return select( selector.replace( rtrim, "$1" ), context, results, seed ); 1.847 +} 1.848 + 1.849 +/** 1.850 + * Create key-value caches of limited size 1.851 + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with 1.852 + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 1.853 + * deleting the oldest entry 1.854 + */ 1.855 +function createCache() { 1.856 + var keys = []; 1.857 + 1.858 + function cache( key, value ) { 1.859 + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 1.860 + if ( keys.push( key + " " ) > Expr.cacheLength ) { 1.861 + // Only keep the most recent entries 1.862 + delete cache[ keys.shift() ]; 1.863 + } 1.864 + return (cache[ key + " " ] = value); 1.865 + } 1.866 + return cache; 1.867 +} 1.868 + 1.869 +/** 1.870 + * Mark a function for special use by Sizzle 1.871 + * @param {Function} fn The function to mark 1.872 + */ 1.873 +function markFunction( fn ) { 1.874 + fn[ expando ] = true; 1.875 + return fn; 1.876 +} 1.877 + 1.878 +/** 1.879 + * Support testing using an element 1.880 + * @param {Function} fn Passed the created div and expects a boolean result 1.881 + */ 1.882 +function assert( fn ) { 1.883 + var div = document.createElement("div"); 1.884 + 1.885 + try { 1.886 + return !!fn( div ); 1.887 + } catch (e) { 1.888 + return false; 1.889 + } finally { 1.890 + // Remove from its parent by default 1.891 + if ( div.parentNode ) { 1.892 + div.parentNode.removeChild( div ); 1.893 + } 1.894 + // release memory in IE 1.895 + div = null; 1.896 + } 1.897 +} 1.898 + 1.899 +/** 1.900 + * Adds the same handler for all of the specified attrs 1.901 + * @param {String} attrs Pipe-separated list of attributes 1.902 + * @param {Function} handler The method that will be applied 1.903 + */ 1.904 +function addHandle( attrs, handler ) { 1.905 + var arr = attrs.split("|"), 1.906 + i = attrs.length; 1.907 + 1.908 + while ( i-- ) { 1.909 + Expr.attrHandle[ arr[i] ] = handler; 1.910 + } 1.911 +} 1.912 + 1.913 +/** 1.914 + * Checks document order of two siblings 1.915 + * @param {Element} a 1.916 + * @param {Element} b 1.917 + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 1.918 + */ 1.919 +function siblingCheck( a, b ) { 1.920 + var cur = b && a, 1.921 + diff = cur && a.nodeType === 1 && b.nodeType === 1 && 1.922 + ( ~b.sourceIndex || MAX_NEGATIVE ) - 1.923 + ( ~a.sourceIndex || MAX_NEGATIVE ); 1.924 + 1.925 + // Use IE sourceIndex if available on both nodes 1.926 + if ( diff ) { 1.927 + return diff; 1.928 + } 1.929 + 1.930 + // Check if b follows a 1.931 + if ( cur ) { 1.932 + while ( (cur = cur.nextSibling) ) { 1.933 + if ( cur === b ) { 1.934 + return -1; 1.935 + } 1.936 + } 1.937 + } 1.938 + 1.939 + return a ? 1 : -1; 1.940 +} 1.941 + 1.942 +/** 1.943 + * Returns a function to use in pseudos for input types 1.944 + * @param {String} type 1.945 + */ 1.946 +function createInputPseudo( type ) { 1.947 + return function( elem ) { 1.948 + var name = elem.nodeName.toLowerCase(); 1.949 + return name === "input" && elem.type === type; 1.950 + }; 1.951 +} 1.952 + 1.953 +/** 1.954 + * Returns a function to use in pseudos for buttons 1.955 + * @param {String} type 1.956 + */ 1.957 +function createButtonPseudo( type ) { 1.958 + return function( elem ) { 1.959 + var name = elem.nodeName.toLowerCase(); 1.960 + return (name === "input" || name === "button") && elem.type === type; 1.961 + }; 1.962 +} 1.963 + 1.964 +/** 1.965 + * Returns a function to use in pseudos for positionals 1.966 + * @param {Function} fn 1.967 + */ 1.968 +function createPositionalPseudo( fn ) { 1.969 + return markFunction(function( argument ) { 1.970 + argument = +argument; 1.971 + return markFunction(function( seed, matches ) { 1.972 + var j, 1.973 + matchIndexes = fn( [], seed.length, argument ), 1.974 + i = matchIndexes.length; 1.975 + 1.976 + // Match elements found at the specified indexes 1.977 + while ( i-- ) { 1.978 + if ( seed[ (j = matchIndexes[i]) ] ) { 1.979 + seed[j] = !(matches[j] = seed[j]); 1.980 + } 1.981 + } 1.982 + }); 1.983 + }); 1.984 +} 1.985 + 1.986 +/** 1.987 + * Checks a node for validity as a Sizzle context 1.988 + * @param {Element|Object=} context 1.989 + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 1.990 + */ 1.991 +function testContext( context ) { 1.992 + return context && typeof context.getElementsByTagName !== strundefined && context; 1.993 +} 1.994 + 1.995 +// Expose support vars for convenience 1.996 +support = Sizzle.support = {}; 1.997 + 1.998 +/** 1.999 + * Detects XML nodes 1.1000 + * @param {Element|Object} elem An element or a document 1.1001 + * @returns {Boolean} True iff elem is a non-HTML XML node 1.1002 + */ 1.1003 +isXML = Sizzle.isXML = function( elem ) { 1.1004 + // documentElement is verified for cases where it doesn't yet exist 1.1005 + // (such as loading iframes in IE - #4833) 1.1006 + var documentElement = elem && (elem.ownerDocument || elem).documentElement; 1.1007 + return documentElement ? documentElement.nodeName !== "HTML" : false; 1.1008 +}; 1.1009 + 1.1010 +/** 1.1011 + * Sets document-related variables once based on the current document 1.1012 + * @param {Element|Object} [doc] An element or document object to use to set the document 1.1013 + * @returns {Object} Returns the current document 1.1014 + */ 1.1015 +setDocument = Sizzle.setDocument = function( node ) { 1.1016 + var hasCompare, 1.1017 + doc = node ? node.ownerDocument || node : preferredDoc, 1.1018 + parent = doc.defaultView; 1.1019 + 1.1020 + // If no document and documentElement is available, return 1.1021 + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { 1.1022 + return document; 1.1023 + } 1.1024 + 1.1025 + // Set our document 1.1026 + document = doc; 1.1027 + docElem = doc.documentElement; 1.1028 + 1.1029 + // Support tests 1.1030 + documentIsHTML = !isXML( doc ); 1.1031 + 1.1032 + // Support: IE>8 1.1033 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, 1.1034 + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 1.1035 + // IE6-8 do not support the defaultView property so parent will be undefined 1.1036 + if ( parent && parent !== parent.top ) { 1.1037 + // IE11 does not have attachEvent, so all must suffer 1.1038 + if ( parent.addEventListener ) { 1.1039 + parent.addEventListener( "unload", function() { 1.1040 + setDocument(); 1.1041 + }, false ); 1.1042 + } else if ( parent.attachEvent ) { 1.1043 + parent.attachEvent( "onunload", function() { 1.1044 + setDocument(); 1.1045 + }); 1.1046 + } 1.1047 + } 1.1048 + 1.1049 + /* Attributes 1.1050 + ---------------------------------------------------------------------- */ 1.1051 + 1.1052 + // Support: IE<8 1.1053 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) 1.1054 + support.attributes = assert(function( div ) { 1.1055 + div.className = "i"; 1.1056 + return !div.getAttribute("className"); 1.1057 + }); 1.1058 + 1.1059 + /* getElement(s)By* 1.1060 + ---------------------------------------------------------------------- */ 1.1061 + 1.1062 + // Check if getElementsByTagName("*") returns only elements 1.1063 + support.getElementsByTagName = assert(function( div ) { 1.1064 + div.appendChild( doc.createComment("") ); 1.1065 + return !div.getElementsByTagName("*").length; 1.1066 + }); 1.1067 + 1.1068 + // Check if getElementsByClassName can be trusted 1.1069 + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { 1.1070 + div.innerHTML = "<div class='a'></div><div class='a i'></div>"; 1.1071 + 1.1072 + // Support: Safari<4 1.1073 + // Catch class over-caching 1.1074 + div.firstChild.className = "i"; 1.1075 + // Support: Opera<10 1.1076 + // Catch gEBCN failure to find non-leading classes 1.1077 + return div.getElementsByClassName("i").length === 2; 1.1078 + }); 1.1079 + 1.1080 + // Support: IE<10 1.1081 + // Check if getElementById returns elements by name 1.1082 + // The broken getElementById methods don't pick up programatically-set names, 1.1083 + // so use a roundabout getElementsByName test 1.1084 + support.getById = assert(function( div ) { 1.1085 + docElem.appendChild( div ).id = expando; 1.1086 + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; 1.1087 + }); 1.1088 + 1.1089 + // ID find and filter 1.1090 + if ( support.getById ) { 1.1091 + Expr.find["ID"] = function( id, context ) { 1.1092 + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { 1.1093 + var m = context.getElementById( id ); 1.1094 + // Check parentNode to catch when Blackberry 4.6 returns 1.1095 + // nodes that are no longer in the document #6963 1.1096 + return m && m.parentNode ? [ m ] : []; 1.1097 + } 1.1098 + }; 1.1099 + Expr.filter["ID"] = function( id ) { 1.1100 + var attrId = id.replace( runescape, funescape ); 1.1101 + return function( elem ) { 1.1102 + return elem.getAttribute("id") === attrId; 1.1103 + }; 1.1104 + }; 1.1105 + } else { 1.1106 + // Support: IE6/7 1.1107 + // getElementById is not reliable as a find shortcut 1.1108 + delete Expr.find["ID"]; 1.1109 + 1.1110 + Expr.filter["ID"] = function( id ) { 1.1111 + var attrId = id.replace( runescape, funescape ); 1.1112 + return function( elem ) { 1.1113 + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); 1.1114 + return node && node.value === attrId; 1.1115 + }; 1.1116 + }; 1.1117 + } 1.1118 + 1.1119 + // Tag 1.1120 + Expr.find["TAG"] = support.getElementsByTagName ? 1.1121 + function( tag, context ) { 1.1122 + if ( typeof context.getElementsByTagName !== strundefined ) { 1.1123 + return context.getElementsByTagName( tag ); 1.1124 + } 1.1125 + } : 1.1126 + function( tag, context ) { 1.1127 + var elem, 1.1128 + tmp = [], 1.1129 + i = 0, 1.1130 + results = context.getElementsByTagName( tag ); 1.1131 + 1.1132 + // Filter out possible comments 1.1133 + if ( tag === "*" ) { 1.1134 + while ( (elem = results[i++]) ) { 1.1135 + if ( elem.nodeType === 1 ) { 1.1136 + tmp.push( elem ); 1.1137 + } 1.1138 + } 1.1139 + 1.1140 + return tmp; 1.1141 + } 1.1142 + return results; 1.1143 + }; 1.1144 + 1.1145 + // Class 1.1146 + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { 1.1147 + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { 1.1148 + return context.getElementsByClassName( className ); 1.1149 + } 1.1150 + }; 1.1151 + 1.1152 + /* QSA/matchesSelector 1.1153 + ---------------------------------------------------------------------- */ 1.1154 + 1.1155 + // QSA and matchesSelector support 1.1156 + 1.1157 + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 1.1158 + rbuggyMatches = []; 1.1159 + 1.1160 + // qSa(:focus) reports false when true (Chrome 21) 1.1161 + // We allow this because of a bug in IE8/9 that throws an error 1.1162 + // whenever `document.activeElement` is accessed on an iframe 1.1163 + // So, we allow :focus to pass through QSA all the time to avoid the IE error 1.1164 + // See http://bugs.jquery.com/ticket/13378 1.1165 + rbuggyQSA = []; 1.1166 + 1.1167 + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { 1.1168 + // Build QSA regex 1.1169 + // Regex strategy adopted from Diego Perini 1.1170 + assert(function( div ) { 1.1171 + // Select is set to empty string on purpose 1.1172 + // This is to test IE's treatment of not explicitly 1.1173 + // setting a boolean content attribute, 1.1174 + // since its presence should be enough 1.1175 + // http://bugs.jquery.com/ticket/12359 1.1176 + div.innerHTML = "<select msallowclip=''><option selected=''></option></select>"; 1.1177 + 1.1178 + // Support: IE8, Opera 11-12.16 1.1179 + // Nothing should be selected when empty strings follow ^= or $= or *= 1.1180 + // The test attribute must be unknown in Opera but "safe" for WinRT 1.1181 + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 1.1182 + if ( div.querySelectorAll("[msallowclip^='']").length ) { 1.1183 + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 1.1184 + } 1.1185 + 1.1186 + // Support: IE8 1.1187 + // Boolean attributes and "value" are not treated correctly 1.1188 + if ( !div.querySelectorAll("[selected]").length ) { 1.1189 + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 1.1190 + } 1.1191 + 1.1192 + // Webkit/Opera - :checked should return selected option elements 1.1193 + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1.1194 + // IE8 throws error here and will not see later tests 1.1195 + if ( !div.querySelectorAll(":checked").length ) { 1.1196 + rbuggyQSA.push(":checked"); 1.1197 + } 1.1198 + }); 1.1199 + 1.1200 + assert(function( div ) { 1.1201 + // Support: Windows 8 Native Apps 1.1202 + // The type and name attributes are restricted during .innerHTML assignment 1.1203 + var input = doc.createElement("input"); 1.1204 + input.setAttribute( "type", "hidden" ); 1.1205 + div.appendChild( input ).setAttribute( "name", "D" ); 1.1206 + 1.1207 + // Support: IE8 1.1208 + // Enforce case-sensitivity of name attribute 1.1209 + if ( div.querySelectorAll("[name=d]").length ) { 1.1210 + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 1.1211 + } 1.1212 + 1.1213 + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 1.1214 + // IE8 throws error here and will not see later tests 1.1215 + if ( !div.querySelectorAll(":enabled").length ) { 1.1216 + rbuggyQSA.push( ":enabled", ":disabled" ); 1.1217 + } 1.1218 + 1.1219 + // Opera 10-11 does not throw on post-comma invalid pseudos 1.1220 + div.querySelectorAll("*,:x"); 1.1221 + rbuggyQSA.push(",.*:"); 1.1222 + }); 1.1223 + } 1.1224 + 1.1225 + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || 1.1226 + docElem.webkitMatchesSelector || 1.1227 + docElem.mozMatchesSelector || 1.1228 + docElem.oMatchesSelector || 1.1229 + docElem.msMatchesSelector) )) ) { 1.1230 + 1.1231 + assert(function( div ) { 1.1232 + // Check to see if it's possible to do matchesSelector 1.1233 + // on a disconnected node (IE 9) 1.1234 + support.disconnectedMatch = matches.call( div, "div" ); 1.1235 + 1.1236 + // This should fail with an exception 1.1237 + // Gecko does not error, returns false instead 1.1238 + matches.call( div, "[s!='']:x" ); 1.1239 + rbuggyMatches.push( "!=", pseudos ); 1.1240 + }); 1.1241 + } 1.1242 + 1.1243 + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); 1.1244 + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); 1.1245 + 1.1246 + /* Contains 1.1247 + ---------------------------------------------------------------------- */ 1.1248 + hasCompare = rnative.test( docElem.compareDocumentPosition ); 1.1249 + 1.1250 + // Element contains another 1.1251 + // Purposefully does not implement inclusive descendent 1.1252 + // As in, an element does not contain itself 1.1253 + contains = hasCompare || rnative.test( docElem.contains ) ? 1.1254 + function( a, b ) { 1.1255 + var adown = a.nodeType === 9 ? a.documentElement : a, 1.1256 + bup = b && b.parentNode; 1.1257 + return a === bup || !!( bup && bup.nodeType === 1 && ( 1.1258 + adown.contains ? 1.1259 + adown.contains( bup ) : 1.1260 + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 1.1261 + )); 1.1262 + } : 1.1263 + function( a, b ) { 1.1264 + if ( b ) { 1.1265 + while ( (b = b.parentNode) ) { 1.1266 + if ( b === a ) { 1.1267 + return true; 1.1268 + } 1.1269 + } 1.1270 + } 1.1271 + return false; 1.1272 + }; 1.1273 + 1.1274 + /* Sorting 1.1275 + ---------------------------------------------------------------------- */ 1.1276 + 1.1277 + // Document order sorting 1.1278 + sortOrder = hasCompare ? 1.1279 + function( a, b ) { 1.1280 + 1.1281 + // Flag for duplicate removal 1.1282 + if ( a === b ) { 1.1283 + hasDuplicate = true; 1.1284 + return 0; 1.1285 + } 1.1286 + 1.1287 + // Sort on method existence if only one input has compareDocumentPosition 1.1288 + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 1.1289 + if ( compare ) { 1.1290 + return compare; 1.1291 + } 1.1292 + 1.1293 + // Calculate position if both inputs belong to the same document 1.1294 + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? 1.1295 + a.compareDocumentPosition( b ) : 1.1296 + 1.1297 + // Otherwise we know they are disconnected 1.1298 + 1; 1.1299 + 1.1300 + // Disconnected nodes 1.1301 + if ( compare & 1 || 1.1302 + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { 1.1303 + 1.1304 + // Choose the first element that is related to our preferred document 1.1305 + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { 1.1306 + return -1; 1.1307 + } 1.1308 + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { 1.1309 + return 1; 1.1310 + } 1.1311 + 1.1312 + // Maintain original order 1.1313 + return sortInput ? 1.1314 + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 1.1315 + 0; 1.1316 + } 1.1317 + 1.1318 + return compare & 4 ? -1 : 1; 1.1319 + } : 1.1320 + function( a, b ) { 1.1321 + // Exit early if the nodes are identical 1.1322 + if ( a === b ) { 1.1323 + hasDuplicate = true; 1.1324 + return 0; 1.1325 + } 1.1326 + 1.1327 + var cur, 1.1328 + i = 0, 1.1329 + aup = a.parentNode, 1.1330 + bup = b.parentNode, 1.1331 + ap = [ a ], 1.1332 + bp = [ b ]; 1.1333 + 1.1334 + // Parentless nodes are either documents or disconnected 1.1335 + if ( !aup || !bup ) { 1.1336 + return a === doc ? -1 : 1.1337 + b === doc ? 1 : 1.1338 + aup ? -1 : 1.1339 + bup ? 1 : 1.1340 + sortInput ? 1.1341 + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 1.1342 + 0; 1.1343 + 1.1344 + // If the nodes are siblings, we can do a quick check 1.1345 + } else if ( aup === bup ) { 1.1346 + return siblingCheck( a, b ); 1.1347 + } 1.1348 + 1.1349 + // Otherwise we need full lists of their ancestors for comparison 1.1350 + cur = a; 1.1351 + while ( (cur = cur.parentNode) ) { 1.1352 + ap.unshift( cur ); 1.1353 + } 1.1354 + cur = b; 1.1355 + while ( (cur = cur.parentNode) ) { 1.1356 + bp.unshift( cur ); 1.1357 + } 1.1358 + 1.1359 + // Walk down the tree looking for a discrepancy 1.1360 + while ( ap[i] === bp[i] ) { 1.1361 + i++; 1.1362 + } 1.1363 + 1.1364 + return i ? 1.1365 + // Do a sibling check if the nodes have a common ancestor 1.1366 + siblingCheck( ap[i], bp[i] ) : 1.1367 + 1.1368 + // Otherwise nodes in our document sort first 1.1369 + ap[i] === preferredDoc ? -1 : 1.1370 + bp[i] === preferredDoc ? 1 : 1.1371 + 0; 1.1372 + }; 1.1373 + 1.1374 + return doc; 1.1375 +}; 1.1376 + 1.1377 +Sizzle.matches = function( expr, elements ) { 1.1378 + return Sizzle( expr, null, null, elements ); 1.1379 +}; 1.1380 + 1.1381 +Sizzle.matchesSelector = function( elem, expr ) { 1.1382 + // Set document vars if needed 1.1383 + if ( ( elem.ownerDocument || elem ) !== document ) { 1.1384 + setDocument( elem ); 1.1385 + } 1.1386 + 1.1387 + // Make sure that attribute selectors are quoted 1.1388 + expr = expr.replace( rattributeQuotes, "='$1']" ); 1.1389 + 1.1390 + if ( support.matchesSelector && documentIsHTML && 1.1391 + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 1.1392 + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 1.1393 + 1.1394 + try { 1.1395 + var ret = matches.call( elem, expr ); 1.1396 + 1.1397 + // IE 9's matchesSelector returns false on disconnected nodes 1.1398 + if ( ret || support.disconnectedMatch || 1.1399 + // As well, disconnected nodes are said to be in a document 1.1400 + // fragment in IE 9 1.1401 + elem.document && elem.document.nodeType !== 11 ) { 1.1402 + return ret; 1.1403 + } 1.1404 + } catch(e) {} 1.1405 + } 1.1406 + 1.1407 + return Sizzle( expr, document, null, [ elem ] ).length > 0; 1.1408 +}; 1.1409 + 1.1410 +Sizzle.contains = function( context, elem ) { 1.1411 + // Set document vars if needed 1.1412 + if ( ( context.ownerDocument || context ) !== document ) { 1.1413 + setDocument( context ); 1.1414 + } 1.1415 + return contains( context, elem ); 1.1416 +}; 1.1417 + 1.1418 +Sizzle.attr = function( elem, name ) { 1.1419 + // Set document vars if needed 1.1420 + if ( ( elem.ownerDocument || elem ) !== document ) { 1.1421 + setDocument( elem ); 1.1422 + } 1.1423 + 1.1424 + var fn = Expr.attrHandle[ name.toLowerCase() ], 1.1425 + // Don't get fooled by Object.prototype properties (jQuery #13807) 1.1426 + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 1.1427 + fn( elem, name, !documentIsHTML ) : 1.1428 + undefined; 1.1429 + 1.1430 + return val !== undefined ? 1.1431 + val : 1.1432 + support.attributes || !documentIsHTML ? 1.1433 + elem.getAttribute( name ) : 1.1434 + (val = elem.getAttributeNode(name)) && val.specified ? 1.1435 + val.value : 1.1436 + null; 1.1437 +}; 1.1438 + 1.1439 +Sizzle.error = function( msg ) { 1.1440 + throw new Error( "Syntax error, unrecognized expression: " + msg ); 1.1441 +}; 1.1442 + 1.1443 +/** 1.1444 + * Document sorting and removing duplicates 1.1445 + * @param {ArrayLike} results 1.1446 + */ 1.1447 +Sizzle.uniqueSort = function( results ) { 1.1448 + var elem, 1.1449 + duplicates = [], 1.1450 + j = 0, 1.1451 + i = 0; 1.1452 + 1.1453 + // Unless we *know* we can detect duplicates, assume their presence 1.1454 + hasDuplicate = !support.detectDuplicates; 1.1455 + sortInput = !support.sortStable && results.slice( 0 ); 1.1456 + results.sort( sortOrder ); 1.1457 + 1.1458 + if ( hasDuplicate ) { 1.1459 + while ( (elem = results[i++]) ) { 1.1460 + if ( elem === results[ i ] ) { 1.1461 + j = duplicates.push( i ); 1.1462 + } 1.1463 + } 1.1464 + while ( j-- ) { 1.1465 + results.splice( duplicates[ j ], 1 ); 1.1466 + } 1.1467 + } 1.1468 + 1.1469 + // Clear input after sorting to release objects 1.1470 + // See https://github.com/jquery/sizzle/pull/225 1.1471 + sortInput = null; 1.1472 + 1.1473 + return results; 1.1474 +}; 1.1475 + 1.1476 +/** 1.1477 + * Utility function for retrieving the text value of an array of DOM nodes 1.1478 + * @param {Array|Element} elem 1.1479 + */ 1.1480 +getText = Sizzle.getText = function( elem ) { 1.1481 + var node, 1.1482 + ret = "", 1.1483 + i = 0, 1.1484 + nodeType = elem.nodeType; 1.1485 + 1.1486 + if ( !nodeType ) { 1.1487 + // If no nodeType, this is expected to be an array 1.1488 + while ( (node = elem[i++]) ) { 1.1489 + // Do not traverse comment nodes 1.1490 + ret += getText( node ); 1.1491 + } 1.1492 + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 1.1493 + // Use textContent for elements 1.1494 + // innerText usage removed for consistency of new lines (jQuery #11153) 1.1495 + if ( typeof elem.textContent === "string" ) { 1.1496 + return elem.textContent; 1.1497 + } else { 1.1498 + // Traverse its children 1.1499 + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 1.1500 + ret += getText( elem ); 1.1501 + } 1.1502 + } 1.1503 + } else if ( nodeType === 3 || nodeType === 4 ) { 1.1504 + return elem.nodeValue; 1.1505 + } 1.1506 + // Do not include comment or processing instruction nodes 1.1507 + 1.1508 + return ret; 1.1509 +}; 1.1510 + 1.1511 +Expr = Sizzle.selectors = { 1.1512 + 1.1513 + // Can be adjusted by the user 1.1514 + cacheLength: 50, 1.1515 + 1.1516 + createPseudo: markFunction, 1.1517 + 1.1518 + match: matchExpr, 1.1519 + 1.1520 + attrHandle: {}, 1.1521 + 1.1522 + find: {}, 1.1523 + 1.1524 + relative: { 1.1525 + ">": { dir: "parentNode", first: true }, 1.1526 + " ": { dir: "parentNode" }, 1.1527 + "+": { dir: "previousSibling", first: true }, 1.1528 + "~": { dir: "previousSibling" } 1.1529 + }, 1.1530 + 1.1531 + preFilter: { 1.1532 + "ATTR": function( match ) { 1.1533 + match[1] = match[1].replace( runescape, funescape ); 1.1534 + 1.1535 + // Move the given value to match[3] whether quoted or unquoted 1.1536 + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); 1.1537 + 1.1538 + if ( match[2] === "~=" ) { 1.1539 + match[3] = " " + match[3] + " "; 1.1540 + } 1.1541 + 1.1542 + return match.slice( 0, 4 ); 1.1543 + }, 1.1544 + 1.1545 + "CHILD": function( match ) { 1.1546 + /* matches from matchExpr["CHILD"] 1.1547 + 1 type (only|nth|...) 1.1548 + 2 what (child|of-type) 1.1549 + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 1.1550 + 4 xn-component of xn+y argument ([+-]?\d*n|) 1.1551 + 5 sign of xn-component 1.1552 + 6 x of xn-component 1.1553 + 7 sign of y-component 1.1554 + 8 y of y-component 1.1555 + */ 1.1556 + match[1] = match[1].toLowerCase(); 1.1557 + 1.1558 + if ( match[1].slice( 0, 3 ) === "nth" ) { 1.1559 + // nth-* requires argument 1.1560 + if ( !match[3] ) { 1.1561 + Sizzle.error( match[0] ); 1.1562 + } 1.1563 + 1.1564 + // numeric x and y parameters for Expr.filter.CHILD 1.1565 + // remember that false/true cast respectively to 0/1 1.1566 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); 1.1567 + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); 1.1568 + 1.1569 + // other types prohibit arguments 1.1570 + } else if ( match[3] ) { 1.1571 + Sizzle.error( match[0] ); 1.1572 + } 1.1573 + 1.1574 + return match; 1.1575 + }, 1.1576 + 1.1577 + "PSEUDO": function( match ) { 1.1578 + var excess, 1.1579 + unquoted = !match[6] && match[2]; 1.1580 + 1.1581 + if ( matchExpr["CHILD"].test( match[0] ) ) { 1.1582 + return null; 1.1583 + } 1.1584 + 1.1585 + // Accept quoted arguments as-is 1.1586 + if ( match[3] ) { 1.1587 + match[2] = match[4] || match[5] || ""; 1.1588 + 1.1589 + // Strip excess characters from unquoted arguments 1.1590 + } else if ( unquoted && rpseudo.test( unquoted ) && 1.1591 + // Get excess from tokenize (recursively) 1.1592 + (excess = tokenize( unquoted, true )) && 1.1593 + // advance to the next closing parenthesis 1.1594 + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { 1.1595 + 1.1596 + // excess is a negative index 1.1597 + match[0] = match[0].slice( 0, excess ); 1.1598 + match[2] = unquoted.slice( 0, excess ); 1.1599 + } 1.1600 + 1.1601 + // Return only captures needed by the pseudo filter method (type and argument) 1.1602 + return match.slice( 0, 3 ); 1.1603 + } 1.1604 + }, 1.1605 + 1.1606 + filter: { 1.1607 + 1.1608 + "TAG": function( nodeNameSelector ) { 1.1609 + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 1.1610 + return nodeNameSelector === "*" ? 1.1611 + function() { return true; } : 1.1612 + function( elem ) { 1.1613 + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 1.1614 + }; 1.1615 + }, 1.1616 + 1.1617 + "CLASS": function( className ) { 1.1618 + var pattern = classCache[ className + " " ]; 1.1619 + 1.1620 + return pattern || 1.1621 + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && 1.1622 + classCache( className, function( elem ) { 1.1623 + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); 1.1624 + }); 1.1625 + }, 1.1626 + 1.1627 + "ATTR": function( name, operator, check ) { 1.1628 + return function( elem ) { 1.1629 + var result = Sizzle.attr( elem, name ); 1.1630 + 1.1631 + if ( result == null ) { 1.1632 + return operator === "!="; 1.1633 + } 1.1634 + if ( !operator ) { 1.1635 + return true; 1.1636 + } 1.1637 + 1.1638 + result += ""; 1.1639 + 1.1640 + return operator === "=" ? result === check : 1.1641 + operator === "!=" ? result !== check : 1.1642 + operator === "^=" ? check && result.indexOf( check ) === 0 : 1.1643 + operator === "*=" ? check && result.indexOf( check ) > -1 : 1.1644 + operator === "$=" ? check && result.slice( -check.length ) === check : 1.1645 + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : 1.1646 + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 1.1647 + false; 1.1648 + }; 1.1649 + }, 1.1650 + 1.1651 + "CHILD": function( type, what, argument, first, last ) { 1.1652 + var simple = type.slice( 0, 3 ) !== "nth", 1.1653 + forward = type.slice( -4 ) !== "last", 1.1654 + ofType = what === "of-type"; 1.1655 + 1.1656 + return first === 1 && last === 0 ? 1.1657 + 1.1658 + // Shortcut for :nth-*(n) 1.1659 + function( elem ) { 1.1660 + return !!elem.parentNode; 1.1661 + } : 1.1662 + 1.1663 + function( elem, context, xml ) { 1.1664 + var cache, outerCache, node, diff, nodeIndex, start, 1.1665 + dir = simple !== forward ? "nextSibling" : "previousSibling", 1.1666 + parent = elem.parentNode, 1.1667 + name = ofType && elem.nodeName.toLowerCase(), 1.1668 + useCache = !xml && !ofType; 1.1669 + 1.1670 + if ( parent ) { 1.1671 + 1.1672 + // :(first|last|only)-(child|of-type) 1.1673 + if ( simple ) { 1.1674 + while ( dir ) { 1.1675 + node = elem; 1.1676 + while ( (node = node[ dir ]) ) { 1.1677 + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { 1.1678 + return false; 1.1679 + } 1.1680 + } 1.1681 + // Reverse direction for :only-* (if we haven't yet done so) 1.1682 + start = dir = type === "only" && !start && "nextSibling"; 1.1683 + } 1.1684 + return true; 1.1685 + } 1.1686 + 1.1687 + start = [ forward ? parent.firstChild : parent.lastChild ]; 1.1688 + 1.1689 + // non-xml :nth-child(...) stores cache data on `parent` 1.1690 + if ( forward && useCache ) { 1.1691 + // Seek `elem` from a previously-cached index 1.1692 + outerCache = parent[ expando ] || (parent[ expando ] = {}); 1.1693 + cache = outerCache[ type ] || []; 1.1694 + nodeIndex = cache[0] === dirruns && cache[1]; 1.1695 + diff = cache[0] === dirruns && cache[2]; 1.1696 + node = nodeIndex && parent.childNodes[ nodeIndex ]; 1.1697 + 1.1698 + while ( (node = ++nodeIndex && node && node[ dir ] || 1.1699 + 1.1700 + // Fallback to seeking `elem` from the start 1.1701 + (diff = nodeIndex = 0) || start.pop()) ) { 1.1702 + 1.1703 + // When found, cache indexes on `parent` and break 1.1704 + if ( node.nodeType === 1 && ++diff && node === elem ) { 1.1705 + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; 1.1706 + break; 1.1707 + } 1.1708 + } 1.1709 + 1.1710 + // Use previously-cached element index if available 1.1711 + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { 1.1712 + diff = cache[1]; 1.1713 + 1.1714 + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) 1.1715 + } else { 1.1716 + // Use the same loop as above to seek `elem` from the start 1.1717 + while ( (node = ++nodeIndex && node && node[ dir ] || 1.1718 + (diff = nodeIndex = 0) || start.pop()) ) { 1.1719 + 1.1720 + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { 1.1721 + // Cache the index of each encountered element 1.1722 + if ( useCache ) { 1.1723 + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; 1.1724 + } 1.1725 + 1.1726 + if ( node === elem ) { 1.1727 + break; 1.1728 + } 1.1729 + } 1.1730 + } 1.1731 + } 1.1732 + 1.1733 + // Incorporate the offset, then check against cycle size 1.1734 + diff -= last; 1.1735 + return diff === first || ( diff % first === 0 && diff / first >= 0 ); 1.1736 + } 1.1737 + }; 1.1738 + }, 1.1739 + 1.1740 + "PSEUDO": function( pseudo, argument ) { 1.1741 + // pseudo-class names are case-insensitive 1.1742 + // http://www.w3.org/TR/selectors/#pseudo-classes 1.1743 + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 1.1744 + // Remember that setFilters inherits from pseudos 1.1745 + var args, 1.1746 + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 1.1747 + Sizzle.error( "unsupported pseudo: " + pseudo ); 1.1748 + 1.1749 + // The user may use createPseudo to indicate that 1.1750 + // arguments are needed to create the filter function 1.1751 + // just as Sizzle does 1.1752 + if ( fn[ expando ] ) { 1.1753 + return fn( argument ); 1.1754 + } 1.1755 + 1.1756 + // But maintain support for old signatures 1.1757 + if ( fn.length > 1 ) { 1.1758 + args = [ pseudo, pseudo, "", argument ]; 1.1759 + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 1.1760 + markFunction(function( seed, matches ) { 1.1761 + var idx, 1.1762 + matched = fn( seed, argument ), 1.1763 + i = matched.length; 1.1764 + while ( i-- ) { 1.1765 + idx = indexOf.call( seed, matched[i] ); 1.1766 + seed[ idx ] = !( matches[ idx ] = matched[i] ); 1.1767 + } 1.1768 + }) : 1.1769 + function( elem ) { 1.1770 + return fn( elem, 0, args ); 1.1771 + }; 1.1772 + } 1.1773 + 1.1774 + return fn; 1.1775 + } 1.1776 + }, 1.1777 + 1.1778 + pseudos: { 1.1779 + // Potentially complex pseudos 1.1780 + "not": markFunction(function( selector ) { 1.1781 + // Trim the selector passed to compile 1.1782 + // to avoid treating leading and trailing 1.1783 + // spaces as combinators 1.1784 + var input = [], 1.1785 + results = [], 1.1786 + matcher = compile( selector.replace( rtrim, "$1" ) ); 1.1787 + 1.1788 + return matcher[ expando ] ? 1.1789 + markFunction(function( seed, matches, context, xml ) { 1.1790 + var elem, 1.1791 + unmatched = matcher( seed, null, xml, [] ), 1.1792 + i = seed.length; 1.1793 + 1.1794 + // Match elements unmatched by `matcher` 1.1795 + while ( i-- ) { 1.1796 + if ( (elem = unmatched[i]) ) { 1.1797 + seed[i] = !(matches[i] = elem); 1.1798 + } 1.1799 + } 1.1800 + }) : 1.1801 + function( elem, context, xml ) { 1.1802 + input[0] = elem; 1.1803 + matcher( input, null, xml, results ); 1.1804 + return !results.pop(); 1.1805 + }; 1.1806 + }), 1.1807 + 1.1808 + "has": markFunction(function( selector ) { 1.1809 + return function( elem ) { 1.1810 + return Sizzle( selector, elem ).length > 0; 1.1811 + }; 1.1812 + }), 1.1813 + 1.1814 + "contains": markFunction(function( text ) { 1.1815 + return function( elem ) { 1.1816 + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; 1.1817 + }; 1.1818 + }), 1.1819 + 1.1820 + // "Whether an element is represented by a :lang() selector 1.1821 + // is based solely on the element's language value 1.1822 + // being equal to the identifier C, 1.1823 + // or beginning with the identifier C immediately followed by "-". 1.1824 + // The matching of C against the element's language value is performed case-insensitively. 1.1825 + // The identifier C does not have to be a valid language name." 1.1826 + // http://www.w3.org/TR/selectors/#lang-pseudo 1.1827 + "lang": markFunction( function( lang ) { 1.1828 + // lang value must be a valid identifier 1.1829 + if ( !ridentifier.test(lang || "") ) { 1.1830 + Sizzle.error( "unsupported lang: " + lang ); 1.1831 + } 1.1832 + lang = lang.replace( runescape, funescape ).toLowerCase(); 1.1833 + return function( elem ) { 1.1834 + var elemLang; 1.1835 + do { 1.1836 + if ( (elemLang = documentIsHTML ? 1.1837 + elem.lang : 1.1838 + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { 1.1839 + 1.1840 + elemLang = elemLang.toLowerCase(); 1.1841 + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 1.1842 + } 1.1843 + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); 1.1844 + return false; 1.1845 + }; 1.1846 + }), 1.1847 + 1.1848 + // Miscellaneous 1.1849 + "target": function( elem ) { 1.1850 + var hash = window.location && window.location.hash; 1.1851 + return hash && hash.slice( 1 ) === elem.id; 1.1852 + }, 1.1853 + 1.1854 + "root": function( elem ) { 1.1855 + return elem === docElem; 1.1856 + }, 1.1857 + 1.1858 + "focus": function( elem ) { 1.1859 + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 1.1860 + }, 1.1861 + 1.1862 + // Boolean properties 1.1863 + "enabled": function( elem ) { 1.1864 + return elem.disabled === false; 1.1865 + }, 1.1866 + 1.1867 + "disabled": function( elem ) { 1.1868 + return elem.disabled === true; 1.1869 + }, 1.1870 + 1.1871 + "checked": function( elem ) { 1.1872 + // In CSS3, :checked should return both checked and selected elements 1.1873 + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1.1874 + var nodeName = elem.nodeName.toLowerCase(); 1.1875 + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); 1.1876 + }, 1.1877 + 1.1878 + "selected": function( elem ) { 1.1879 + // Accessing this property makes selected-by-default 1.1880 + // options in Safari work properly 1.1881 + if ( elem.parentNode ) { 1.1882 + elem.parentNode.selectedIndex; 1.1883 + } 1.1884 + 1.1885 + return elem.selected === true; 1.1886 + }, 1.1887 + 1.1888 + // Contents 1.1889 + "empty": function( elem ) { 1.1890 + // http://www.w3.org/TR/selectors/#empty-pseudo 1.1891 + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 1.1892 + // but not by others (comment: 8; processing instruction: 7; etc.) 1.1893 + // nodeType < 6 works because attributes (2) do not appear as children 1.1894 + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 1.1895 + if ( elem.nodeType < 6 ) { 1.1896 + return false; 1.1897 + } 1.1898 + } 1.1899 + return true; 1.1900 + }, 1.1901 + 1.1902 + "parent": function( elem ) { 1.1903 + return !Expr.pseudos["empty"]( elem ); 1.1904 + }, 1.1905 + 1.1906 + // Element/input types 1.1907 + "header": function( elem ) { 1.1908 + return rheader.test( elem.nodeName ); 1.1909 + }, 1.1910 + 1.1911 + "input": function( elem ) { 1.1912 + return rinputs.test( elem.nodeName ); 1.1913 + }, 1.1914 + 1.1915 + "button": function( elem ) { 1.1916 + var name = elem.nodeName.toLowerCase(); 1.1917 + return name === "input" && elem.type === "button" || name === "button"; 1.1918 + }, 1.1919 + 1.1920 + "text": function( elem ) { 1.1921 + var attr; 1.1922 + return elem.nodeName.toLowerCase() === "input" && 1.1923 + elem.type === "text" && 1.1924 + 1.1925 + // Support: IE<8 1.1926 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 1.1927 + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); 1.1928 + }, 1.1929 + 1.1930 + // Position-in-collection 1.1931 + "first": createPositionalPseudo(function() { 1.1932 + return [ 0 ]; 1.1933 + }), 1.1934 + 1.1935 + "last": createPositionalPseudo(function( matchIndexes, length ) { 1.1936 + return [ length - 1 ]; 1.1937 + }), 1.1938 + 1.1939 + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { 1.1940 + return [ argument < 0 ? argument + length : argument ]; 1.1941 + }), 1.1942 + 1.1943 + "even": createPositionalPseudo(function( matchIndexes, length ) { 1.1944 + var i = 0; 1.1945 + for ( ; i < length; i += 2 ) { 1.1946 + matchIndexes.push( i ); 1.1947 + } 1.1948 + return matchIndexes; 1.1949 + }), 1.1950 + 1.1951 + "odd": createPositionalPseudo(function( matchIndexes, length ) { 1.1952 + var i = 1; 1.1953 + for ( ; i < length; i += 2 ) { 1.1954 + matchIndexes.push( i ); 1.1955 + } 1.1956 + return matchIndexes; 1.1957 + }), 1.1958 + 1.1959 + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { 1.1960 + var i = argument < 0 ? argument + length : argument; 1.1961 + for ( ; --i >= 0; ) { 1.1962 + matchIndexes.push( i ); 1.1963 + } 1.1964 + return matchIndexes; 1.1965 + }), 1.1966 + 1.1967 + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { 1.1968 + var i = argument < 0 ? argument + length : argument; 1.1969 + for ( ; ++i < length; ) { 1.1970 + matchIndexes.push( i ); 1.1971 + } 1.1972 + return matchIndexes; 1.1973 + }) 1.1974 + } 1.1975 +}; 1.1976 + 1.1977 +Expr.pseudos["nth"] = Expr.pseudos["eq"]; 1.1978 + 1.1979 +// Add button/input type pseudos 1.1980 +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 1.1981 + Expr.pseudos[ i ] = createInputPseudo( i ); 1.1982 +} 1.1983 +for ( i in { submit: true, reset: true } ) { 1.1984 + Expr.pseudos[ i ] = createButtonPseudo( i ); 1.1985 +} 1.1986 + 1.1987 +// Easy API for creating new setFilters 1.1988 +function setFilters() {} 1.1989 +setFilters.prototype = Expr.filters = Expr.pseudos; 1.1990 +Expr.setFilters = new setFilters(); 1.1991 + 1.1992 +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 1.1993 + var matched, match, tokens, type, 1.1994 + soFar, groups, preFilters, 1.1995 + cached = tokenCache[ selector + " " ]; 1.1996 + 1.1997 + if ( cached ) { 1.1998 + return parseOnly ? 0 : cached.slice( 0 ); 1.1999 + } 1.2000 + 1.2001 + soFar = selector; 1.2002 + groups = []; 1.2003 + preFilters = Expr.preFilter; 1.2004 + 1.2005 + while ( soFar ) { 1.2006 + 1.2007 + // Comma and first run 1.2008 + if ( !matched || (match = rcomma.exec( soFar )) ) { 1.2009 + if ( match ) { 1.2010 + // Don't consume trailing commas as valid 1.2011 + soFar = soFar.slice( match[0].length ) || soFar; 1.2012 + } 1.2013 + groups.push( (tokens = []) ); 1.2014 + } 1.2015 + 1.2016 + matched = false; 1.2017 + 1.2018 + // Combinators 1.2019 + if ( (match = rcombinators.exec( soFar )) ) { 1.2020 + matched = match.shift(); 1.2021 + tokens.push({ 1.2022 + value: matched, 1.2023 + // Cast descendant combinators to space 1.2024 + type: match[0].replace( rtrim, " " ) 1.2025 + }); 1.2026 + soFar = soFar.slice( matched.length ); 1.2027 + } 1.2028 + 1.2029 + // Filters 1.2030 + for ( type in Expr.filter ) { 1.2031 + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || 1.2032 + (match = preFilters[ type ]( match ))) ) { 1.2033 + matched = match.shift(); 1.2034 + tokens.push({ 1.2035 + value: matched, 1.2036 + type: type, 1.2037 + matches: match 1.2038 + }); 1.2039 + soFar = soFar.slice( matched.length ); 1.2040 + } 1.2041 + } 1.2042 + 1.2043 + if ( !matched ) { 1.2044 + break; 1.2045 + } 1.2046 + } 1.2047 + 1.2048 + // Return the length of the invalid excess 1.2049 + // if we're just parsing 1.2050 + // Otherwise, throw an error or return tokens 1.2051 + return parseOnly ? 1.2052 + soFar.length : 1.2053 + soFar ? 1.2054 + Sizzle.error( selector ) : 1.2055 + // Cache the tokens 1.2056 + tokenCache( selector, groups ).slice( 0 ); 1.2057 +}; 1.2058 + 1.2059 +function toSelector( tokens ) { 1.2060 + var i = 0, 1.2061 + len = tokens.length, 1.2062 + selector = ""; 1.2063 + for ( ; i < len; i++ ) { 1.2064 + selector += tokens[i].value; 1.2065 + } 1.2066 + return selector; 1.2067 +} 1.2068 + 1.2069 +function addCombinator( matcher, combinator, base ) { 1.2070 + var dir = combinator.dir, 1.2071 + checkNonElements = base && dir === "parentNode", 1.2072 + doneName = done++; 1.2073 + 1.2074 + return combinator.first ? 1.2075 + // Check against closest ancestor/preceding element 1.2076 + function( elem, context, xml ) { 1.2077 + while ( (elem = elem[ dir ]) ) { 1.2078 + if ( elem.nodeType === 1 || checkNonElements ) { 1.2079 + return matcher( elem, context, xml ); 1.2080 + } 1.2081 + } 1.2082 + } : 1.2083 + 1.2084 + // Check against all ancestor/preceding elements 1.2085 + function( elem, context, xml ) { 1.2086 + var oldCache, outerCache, 1.2087 + newCache = [ dirruns, doneName ]; 1.2088 + 1.2089 + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching 1.2090 + if ( xml ) { 1.2091 + while ( (elem = elem[ dir ]) ) { 1.2092 + if ( elem.nodeType === 1 || checkNonElements ) { 1.2093 + if ( matcher( elem, context, xml ) ) { 1.2094 + return true; 1.2095 + } 1.2096 + } 1.2097 + } 1.2098 + } else { 1.2099 + while ( (elem = elem[ dir ]) ) { 1.2100 + if ( elem.nodeType === 1 || checkNonElements ) { 1.2101 + outerCache = elem[ expando ] || (elem[ expando ] = {}); 1.2102 + if ( (oldCache = outerCache[ dir ]) && 1.2103 + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 1.2104 + 1.2105 + // Assign to newCache so results back-propagate to previous elements 1.2106 + return (newCache[ 2 ] = oldCache[ 2 ]); 1.2107 + } else { 1.2108 + // Reuse newcache so results back-propagate to previous elements 1.2109 + outerCache[ dir ] = newCache; 1.2110 + 1.2111 + // A match means we're done; a fail means we have to keep checking 1.2112 + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { 1.2113 + return true; 1.2114 + } 1.2115 + } 1.2116 + } 1.2117 + } 1.2118 + } 1.2119 + }; 1.2120 +} 1.2121 + 1.2122 +function elementMatcher( matchers ) { 1.2123 + return matchers.length > 1 ? 1.2124 + function( elem, context, xml ) { 1.2125 + var i = matchers.length; 1.2126 + while ( i-- ) { 1.2127 + if ( !matchers[i]( elem, context, xml ) ) { 1.2128 + return false; 1.2129 + } 1.2130 + } 1.2131 + return true; 1.2132 + } : 1.2133 + matchers[0]; 1.2134 +} 1.2135 + 1.2136 +function multipleContexts( selector, contexts, results ) { 1.2137 + var i = 0, 1.2138 + len = contexts.length; 1.2139 + for ( ; i < len; i++ ) { 1.2140 + Sizzle( selector, contexts[i], results ); 1.2141 + } 1.2142 + return results; 1.2143 +} 1.2144 + 1.2145 +function condense( unmatched, map, filter, context, xml ) { 1.2146 + var elem, 1.2147 + newUnmatched = [], 1.2148 + i = 0, 1.2149 + len = unmatched.length, 1.2150 + mapped = map != null; 1.2151 + 1.2152 + for ( ; i < len; i++ ) { 1.2153 + if ( (elem = unmatched[i]) ) { 1.2154 + if ( !filter || filter( elem, context, xml ) ) { 1.2155 + newUnmatched.push( elem ); 1.2156 + if ( mapped ) { 1.2157 + map.push( i ); 1.2158 + } 1.2159 + } 1.2160 + } 1.2161 + } 1.2162 + 1.2163 + return newUnmatched; 1.2164 +} 1.2165 + 1.2166 +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 1.2167 + if ( postFilter && !postFilter[ expando ] ) { 1.2168 + postFilter = setMatcher( postFilter ); 1.2169 + } 1.2170 + if ( postFinder && !postFinder[ expando ] ) { 1.2171 + postFinder = setMatcher( postFinder, postSelector ); 1.2172 + } 1.2173 + return markFunction(function( seed, results, context, xml ) { 1.2174 + var temp, i, elem, 1.2175 + preMap = [], 1.2176 + postMap = [], 1.2177 + preexisting = results.length, 1.2178 + 1.2179 + // Get initial elements from seed or context 1.2180 + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), 1.2181 + 1.2182 + // Prefilter to get matcher input, preserving a map for seed-results synchronization 1.2183 + matcherIn = preFilter && ( seed || !selector ) ? 1.2184 + condense( elems, preMap, preFilter, context, xml ) : 1.2185 + elems, 1.2186 + 1.2187 + matcherOut = matcher ? 1.2188 + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 1.2189 + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 1.2190 + 1.2191 + // ...intermediate processing is necessary 1.2192 + [] : 1.2193 + 1.2194 + // ...otherwise use results directly 1.2195 + results : 1.2196 + matcherIn; 1.2197 + 1.2198 + // Find primary matches 1.2199 + if ( matcher ) { 1.2200 + matcher( matcherIn, matcherOut, context, xml ); 1.2201 + } 1.2202 + 1.2203 + // Apply postFilter 1.2204 + if ( postFilter ) { 1.2205 + temp = condense( matcherOut, postMap ); 1.2206 + postFilter( temp, [], context, xml ); 1.2207 + 1.2208 + // Un-match failing elements by moving them back to matcherIn 1.2209 + i = temp.length; 1.2210 + while ( i-- ) { 1.2211 + if ( (elem = temp[i]) ) { 1.2212 + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); 1.2213 + } 1.2214 + } 1.2215 + } 1.2216 + 1.2217 + if ( seed ) { 1.2218 + if ( postFinder || preFilter ) { 1.2219 + if ( postFinder ) { 1.2220 + // Get the final matcherOut by condensing this intermediate into postFinder contexts 1.2221 + temp = []; 1.2222 + i = matcherOut.length; 1.2223 + while ( i-- ) { 1.2224 + if ( (elem = matcherOut[i]) ) { 1.2225 + // Restore matcherIn since elem is not yet a final match 1.2226 + temp.push( (matcherIn[i] = elem) ); 1.2227 + } 1.2228 + } 1.2229 + postFinder( null, (matcherOut = []), temp, xml ); 1.2230 + } 1.2231 + 1.2232 + // Move matched elements from seed to results to keep them synchronized 1.2233 + i = matcherOut.length; 1.2234 + while ( i-- ) { 1.2235 + if ( (elem = matcherOut[i]) && 1.2236 + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { 1.2237 + 1.2238 + seed[temp] = !(results[temp] = elem); 1.2239 + } 1.2240 + } 1.2241 + } 1.2242 + 1.2243 + // Add elements to results, through postFinder if defined 1.2244 + } else { 1.2245 + matcherOut = condense( 1.2246 + matcherOut === results ? 1.2247 + matcherOut.splice( preexisting, matcherOut.length ) : 1.2248 + matcherOut 1.2249 + ); 1.2250 + if ( postFinder ) { 1.2251 + postFinder( null, results, matcherOut, xml ); 1.2252 + } else { 1.2253 + push.apply( results, matcherOut ); 1.2254 + } 1.2255 + } 1.2256 + }); 1.2257 +} 1.2258 + 1.2259 +function matcherFromTokens( tokens ) { 1.2260 + var checkContext, matcher, j, 1.2261 + len = tokens.length, 1.2262 + leadingRelative = Expr.relative[ tokens[0].type ], 1.2263 + implicitRelative = leadingRelative || Expr.relative[" "], 1.2264 + i = leadingRelative ? 1 : 0, 1.2265 + 1.2266 + // The foundational matcher ensures that elements are reachable from top-level context(s) 1.2267 + matchContext = addCombinator( function( elem ) { 1.2268 + return elem === checkContext; 1.2269 + }, implicitRelative, true ), 1.2270 + matchAnyContext = addCombinator( function( elem ) { 1.2271 + return indexOf.call( checkContext, elem ) > -1; 1.2272 + }, implicitRelative, true ), 1.2273 + matchers = [ function( elem, context, xml ) { 1.2274 + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 1.2275 + (checkContext = context).nodeType ? 1.2276 + matchContext( elem, context, xml ) : 1.2277 + matchAnyContext( elem, context, xml ) ); 1.2278 + } ]; 1.2279 + 1.2280 + for ( ; i < len; i++ ) { 1.2281 + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { 1.2282 + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; 1.2283 + } else { 1.2284 + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); 1.2285 + 1.2286 + // Return special upon seeing a positional matcher 1.2287 + if ( matcher[ expando ] ) { 1.2288 + // Find the next relative operator (if any) for proper handling 1.2289 + j = ++i; 1.2290 + for ( ; j < len; j++ ) { 1.2291 + if ( Expr.relative[ tokens[j].type ] ) { 1.2292 + break; 1.2293 + } 1.2294 + } 1.2295 + return setMatcher( 1.2296 + i > 1 && elementMatcher( matchers ), 1.2297 + i > 1 && toSelector( 1.2298 + // If the preceding token was a descendant combinator, insert an implicit any-element `*` 1.2299 + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) 1.2300 + ).replace( rtrim, "$1" ), 1.2301 + matcher, 1.2302 + i < j && matcherFromTokens( tokens.slice( i, j ) ), 1.2303 + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), 1.2304 + j < len && toSelector( tokens ) 1.2305 + ); 1.2306 + } 1.2307 + matchers.push( matcher ); 1.2308 + } 1.2309 + } 1.2310 + 1.2311 + return elementMatcher( matchers ); 1.2312 +} 1.2313 + 1.2314 +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 1.2315 + var bySet = setMatchers.length > 0, 1.2316 + byElement = elementMatchers.length > 0, 1.2317 + superMatcher = function( seed, context, xml, results, outermost ) { 1.2318 + var elem, j, matcher, 1.2319 + matchedCount = 0, 1.2320 + i = "0", 1.2321 + unmatched = seed && [], 1.2322 + setMatched = [], 1.2323 + contextBackup = outermostContext, 1.2324 + // We must always have either seed elements or outermost context 1.2325 + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), 1.2326 + // Use integer dirruns iff this is the outermost matcher 1.2327 + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), 1.2328 + len = elems.length; 1.2329 + 1.2330 + if ( outermost ) { 1.2331 + outermostContext = context !== document && context; 1.2332 + } 1.2333 + 1.2334 + // Add elements passing elementMatchers directly to results 1.2335 + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below 1.2336 + // Support: IE<9, Safari 1.2337 + // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 1.2338 + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { 1.2339 + if ( byElement && elem ) { 1.2340 + j = 0; 1.2341 + while ( (matcher = elementMatchers[j++]) ) { 1.2342 + if ( matcher( elem, context, xml ) ) { 1.2343 + results.push( elem ); 1.2344 + break; 1.2345 + } 1.2346 + } 1.2347 + if ( outermost ) { 1.2348 + dirruns = dirrunsUnique; 1.2349 + } 1.2350 + } 1.2351 + 1.2352 + // Track unmatched elements for set filters 1.2353 + if ( bySet ) { 1.2354 + // They will have gone through all possible matchers 1.2355 + if ( (elem = !matcher && elem) ) { 1.2356 + matchedCount--; 1.2357 + } 1.2358 + 1.2359 + // Lengthen the array for every element, matched or not 1.2360 + if ( seed ) { 1.2361 + unmatched.push( elem ); 1.2362 + } 1.2363 + } 1.2364 + } 1.2365 + 1.2366 + // Apply set filters to unmatched elements 1.2367 + matchedCount += i; 1.2368 + if ( bySet && i !== matchedCount ) { 1.2369 + j = 0; 1.2370 + while ( (matcher = setMatchers[j++]) ) { 1.2371 + matcher( unmatched, setMatched, context, xml ); 1.2372 + } 1.2373 + 1.2374 + if ( seed ) { 1.2375 + // Reintegrate element matches to eliminate the need for sorting 1.2376 + if ( matchedCount > 0 ) { 1.2377 + while ( i-- ) { 1.2378 + if ( !(unmatched[i] || setMatched[i]) ) { 1.2379 + setMatched[i] = pop.call( results ); 1.2380 + } 1.2381 + } 1.2382 + } 1.2383 + 1.2384 + // Discard index placeholder values to get only actual matches 1.2385 + setMatched = condense( setMatched ); 1.2386 + } 1.2387 + 1.2388 + // Add matches to results 1.2389 + push.apply( results, setMatched ); 1.2390 + 1.2391 + // Seedless set matches succeeding multiple successful matchers stipulate sorting 1.2392 + if ( outermost && !seed && setMatched.length > 0 && 1.2393 + ( matchedCount + setMatchers.length ) > 1 ) { 1.2394 + 1.2395 + Sizzle.uniqueSort( results ); 1.2396 + } 1.2397 + } 1.2398 + 1.2399 + // Override manipulation of globals by nested matchers 1.2400 + if ( outermost ) { 1.2401 + dirruns = dirrunsUnique; 1.2402 + outermostContext = contextBackup; 1.2403 + } 1.2404 + 1.2405 + return unmatched; 1.2406 + }; 1.2407 + 1.2408 + return bySet ? 1.2409 + markFunction( superMatcher ) : 1.2410 + superMatcher; 1.2411 +} 1.2412 + 1.2413 +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 1.2414 + var i, 1.2415 + setMatchers = [], 1.2416 + elementMatchers = [], 1.2417 + cached = compilerCache[ selector + " " ]; 1.2418 + 1.2419 + if ( !cached ) { 1.2420 + // Generate a function of recursive functions that can be used to check each element 1.2421 + if ( !match ) { 1.2422 + match = tokenize( selector ); 1.2423 + } 1.2424 + i = match.length; 1.2425 + while ( i-- ) { 1.2426 + cached = matcherFromTokens( match[i] ); 1.2427 + if ( cached[ expando ] ) { 1.2428 + setMatchers.push( cached ); 1.2429 + } else { 1.2430 + elementMatchers.push( cached ); 1.2431 + } 1.2432 + } 1.2433 + 1.2434 + // Cache the compiled function 1.2435 + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); 1.2436 + 1.2437 + // Save selector and tokenization 1.2438 + cached.selector = selector; 1.2439 + } 1.2440 + return cached; 1.2441 +}; 1.2442 + 1.2443 +/** 1.2444 + * A low-level selection function that works with Sizzle's compiled 1.2445 + * selector functions 1.2446 + * @param {String|Function} selector A selector or a pre-compiled 1.2447 + * selector function built with Sizzle.compile 1.2448 + * @param {Element} context 1.2449 + * @param {Array} [results] 1.2450 + * @param {Array} [seed] A set of elements to match against 1.2451 + */ 1.2452 +select = Sizzle.select = function( selector, context, results, seed ) { 1.2453 + var i, tokens, token, type, find, 1.2454 + compiled = typeof selector === "function" && selector, 1.2455 + match = !seed && tokenize( (selector = compiled.selector || selector) ); 1.2456 + 1.2457 + results = results || []; 1.2458 + 1.2459 + // Try to minimize operations if there is no seed and only one group 1.2460 + if ( match.length === 1 ) { 1.2461 + 1.2462 + // Take a shortcut and set the context if the root selector is an ID 1.2463 + tokens = match[0] = match[0].slice( 0 ); 1.2464 + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && 1.2465 + support.getById && context.nodeType === 9 && documentIsHTML && 1.2466 + Expr.relative[ tokens[1].type ] ) { 1.2467 + 1.2468 + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; 1.2469 + if ( !context ) { 1.2470 + return results; 1.2471 + 1.2472 + // Precompiled matchers will still verify ancestry, so step up a level 1.2473 + } else if ( compiled ) { 1.2474 + context = context.parentNode; 1.2475 + } 1.2476 + 1.2477 + selector = selector.slice( tokens.shift().value.length ); 1.2478 + } 1.2479 + 1.2480 + // Fetch a seed set for right-to-left matching 1.2481 + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; 1.2482 + while ( i-- ) { 1.2483 + token = tokens[i]; 1.2484 + 1.2485 + // Abort if we hit a combinator 1.2486 + if ( Expr.relative[ (type = token.type) ] ) { 1.2487 + break; 1.2488 + } 1.2489 + if ( (find = Expr.find[ type ]) ) { 1.2490 + // Search, expanding context for leading sibling combinators 1.2491 + if ( (seed = find( 1.2492 + token.matches[0].replace( runescape, funescape ), 1.2493 + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context 1.2494 + )) ) { 1.2495 + 1.2496 + // If seed is empty or no tokens remain, we can return early 1.2497 + tokens.splice( i, 1 ); 1.2498 + selector = seed.length && toSelector( tokens ); 1.2499 + if ( !selector ) { 1.2500 + push.apply( results, seed ); 1.2501 + return results; 1.2502 + } 1.2503 + 1.2504 + break; 1.2505 + } 1.2506 + } 1.2507 + } 1.2508 + } 1.2509 + 1.2510 + // Compile and execute a filtering function if one is not provided 1.2511 + // Provide `match` to avoid retokenization if we modified the selector above 1.2512 + ( compiled || compile( selector, match ) )( 1.2513 + seed, 1.2514 + context, 1.2515 + !documentIsHTML, 1.2516 + results, 1.2517 + rsibling.test( selector ) && testContext( context.parentNode ) || context 1.2518 + ); 1.2519 + return results; 1.2520 +}; 1.2521 + 1.2522 +// One-time assignments 1.2523 + 1.2524 +// Sort stability 1.2525 +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; 1.2526 + 1.2527 +// Support: Chrome<14 1.2528 +// Always assume duplicates if they aren't passed to the comparison function 1.2529 +support.detectDuplicates = !!hasDuplicate; 1.2530 + 1.2531 +// Initialize against the default document 1.2532 +setDocument(); 1.2533 + 1.2534 +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 1.2535 +// Detached nodes confoundingly follow *each other* 1.2536 +support.sortDetached = assert(function( div1 ) { 1.2537 + // Should return 1, but returns 4 (following) 1.2538 + return div1.compareDocumentPosition( document.createElement("div") ) & 1; 1.2539 +}); 1.2540 + 1.2541 +// Support: IE<8 1.2542 +// Prevent attribute/property "interpolation" 1.2543 +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 1.2544 +if ( !assert(function( div ) { 1.2545 + div.innerHTML = "<a href='#'></a>"; 1.2546 + return div.firstChild.getAttribute("href") === "#" ; 1.2547 +}) ) { 1.2548 + addHandle( "type|href|height|width", function( elem, name, isXML ) { 1.2549 + if ( !isXML ) { 1.2550 + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 1.2551 + } 1.2552 + }); 1.2553 +} 1.2554 + 1.2555 +// Support: IE<9 1.2556 +// Use defaultValue in place of getAttribute("value") 1.2557 +if ( !support.attributes || !assert(function( div ) { 1.2558 + div.innerHTML = "<input/>"; 1.2559 + div.firstChild.setAttribute( "value", "" ); 1.2560 + return div.firstChild.getAttribute( "value" ) === ""; 1.2561 +}) ) { 1.2562 + addHandle( "value", function( elem, name, isXML ) { 1.2563 + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 1.2564 + return elem.defaultValue; 1.2565 + } 1.2566 + }); 1.2567 +} 1.2568 + 1.2569 +// Support: IE<9 1.2570 +// Use getAttributeNode to fetch booleans when getAttribute lies 1.2571 +if ( !assert(function( div ) { 1.2572 + return div.getAttribute("disabled") == null; 1.2573 +}) ) { 1.2574 + addHandle( booleans, function( elem, name, isXML ) { 1.2575 + var val; 1.2576 + if ( !isXML ) { 1.2577 + return elem[ name ] === true ? name.toLowerCase() : 1.2578 + (val = elem.getAttributeNode( name )) && val.specified ? 1.2579 + val.value : 1.2580 + null; 1.2581 + } 1.2582 + }); 1.2583 +} 1.2584 + 1.2585 +return Sizzle; 1.2586 + 1.2587 +})( window ); 1.2588 + 1.2589 + 1.2590 + 1.2591 +jQuery.find = Sizzle; 1.2592 +jQuery.expr = Sizzle.selectors; 1.2593 +jQuery.expr[":"] = jQuery.expr.pseudos; 1.2594 +jQuery.unique = Sizzle.uniqueSort; 1.2595 +jQuery.text = Sizzle.getText; 1.2596 +jQuery.isXMLDoc = Sizzle.isXML; 1.2597 +jQuery.contains = Sizzle.contains; 1.2598 + 1.2599 + 1.2600 + 1.2601 +var rneedsContext = jQuery.expr.match.needsContext; 1.2602 + 1.2603 +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); 1.2604 + 1.2605 + 1.2606 + 1.2607 +var risSimple = /^.[^:#\[\.,]*$/; 1.2608 + 1.2609 +// Implement the identical functionality for filter and not 1.2610 +function winnow( elements, qualifier, not ) { 1.2611 + if ( jQuery.isFunction( qualifier ) ) { 1.2612 + return jQuery.grep( elements, function( elem, i ) { 1.2613 + /* jshint -W018 */ 1.2614 + return !!qualifier.call( elem, i, elem ) !== not; 1.2615 + }); 1.2616 + 1.2617 + } 1.2618 + 1.2619 + if ( qualifier.nodeType ) { 1.2620 + return jQuery.grep( elements, function( elem ) { 1.2621 + return ( elem === qualifier ) !== not; 1.2622 + }); 1.2623 + 1.2624 + } 1.2625 + 1.2626 + if ( typeof qualifier === "string" ) { 1.2627 + if ( risSimple.test( qualifier ) ) { 1.2628 + return jQuery.filter( qualifier, elements, not ); 1.2629 + } 1.2630 + 1.2631 + qualifier = jQuery.filter( qualifier, elements ); 1.2632 + } 1.2633 + 1.2634 + return jQuery.grep( elements, function( elem ) { 1.2635 + return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; 1.2636 + }); 1.2637 +} 1.2638 + 1.2639 +jQuery.filter = function( expr, elems, not ) { 1.2640 + var elem = elems[ 0 ]; 1.2641 + 1.2642 + if ( not ) { 1.2643 + expr = ":not(" + expr + ")"; 1.2644 + } 1.2645 + 1.2646 + return elems.length === 1 && elem.nodeType === 1 ? 1.2647 + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : 1.2648 + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 1.2649 + return elem.nodeType === 1; 1.2650 + })); 1.2651 +}; 1.2652 + 1.2653 +jQuery.fn.extend({ 1.2654 + find: function( selector ) { 1.2655 + var i, 1.2656 + len = this.length, 1.2657 + ret = [], 1.2658 + self = this; 1.2659 + 1.2660 + if ( typeof selector !== "string" ) { 1.2661 + return this.pushStack( jQuery( selector ).filter(function() { 1.2662 + for ( i = 0; i < len; i++ ) { 1.2663 + if ( jQuery.contains( self[ i ], this ) ) { 1.2664 + return true; 1.2665 + } 1.2666 + } 1.2667 + }) ); 1.2668 + } 1.2669 + 1.2670 + for ( i = 0; i < len; i++ ) { 1.2671 + jQuery.find( selector, self[ i ], ret ); 1.2672 + } 1.2673 + 1.2674 + // Needed because $( selector, context ) becomes $( context ).find( selector ) 1.2675 + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); 1.2676 + ret.selector = this.selector ? this.selector + " " + selector : selector; 1.2677 + return ret; 1.2678 + }, 1.2679 + filter: function( selector ) { 1.2680 + return this.pushStack( winnow(this, selector || [], false) ); 1.2681 + }, 1.2682 + not: function( selector ) { 1.2683 + return this.pushStack( winnow(this, selector || [], true) ); 1.2684 + }, 1.2685 + is: function( selector ) { 1.2686 + return !!winnow( 1.2687 + this, 1.2688 + 1.2689 + // If this is a positional/relative selector, check membership in the returned set 1.2690 + // so $("p:first").is("p:last") won't return true for a doc with two "p". 1.2691 + typeof selector === "string" && rneedsContext.test( selector ) ? 1.2692 + jQuery( selector ) : 1.2693 + selector || [], 1.2694 + false 1.2695 + ).length; 1.2696 + } 1.2697 +}); 1.2698 + 1.2699 + 1.2700 +// Initialize a jQuery object 1.2701 + 1.2702 + 1.2703 +// A central reference to the root jQuery(document) 1.2704 +var rootjQuery, 1.2705 + 1.2706 + // A simple way to check for HTML strings 1.2707 + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 1.2708 + // Strict HTML recognition (#11290: must start with <) 1.2709 + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, 1.2710 + 1.2711 + init = jQuery.fn.init = function( selector, context ) { 1.2712 + var match, elem; 1.2713 + 1.2714 + // HANDLE: $(""), $(null), $(undefined), $(false) 1.2715 + if ( !selector ) { 1.2716 + return this; 1.2717 + } 1.2718 + 1.2719 + // Handle HTML strings 1.2720 + if ( typeof selector === "string" ) { 1.2721 + if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { 1.2722 + // Assume that strings that start and end with <> are HTML and skip the regex check 1.2723 + match = [ null, selector, null ]; 1.2724 + 1.2725 + } else { 1.2726 + match = rquickExpr.exec( selector ); 1.2727 + } 1.2728 + 1.2729 + // Match html or make sure no context is specified for #id 1.2730 + if ( match && (match[1] || !context) ) { 1.2731 + 1.2732 + // HANDLE: $(html) -> $(array) 1.2733 + if ( match[1] ) { 1.2734 + context = context instanceof jQuery ? context[0] : context; 1.2735 + 1.2736 + // scripts is true for back-compat 1.2737 + // Intentionally let the error be thrown if parseHTML is not present 1.2738 + jQuery.merge( this, jQuery.parseHTML( 1.2739 + match[1], 1.2740 + context && context.nodeType ? context.ownerDocument || context : document, 1.2741 + true 1.2742 + ) ); 1.2743 + 1.2744 + // HANDLE: $(html, props) 1.2745 + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { 1.2746 + for ( match in context ) { 1.2747 + // Properties of context are called as methods if possible 1.2748 + if ( jQuery.isFunction( this[ match ] ) ) { 1.2749 + this[ match ]( context[ match ] ); 1.2750 + 1.2751 + // ...and otherwise set as attributes 1.2752 + } else { 1.2753 + this.attr( match, context[ match ] ); 1.2754 + } 1.2755 + } 1.2756 + } 1.2757 + 1.2758 + return this; 1.2759 + 1.2760 + // HANDLE: $(#id) 1.2761 + } else { 1.2762 + elem = document.getElementById( match[2] ); 1.2763 + 1.2764 + // Check parentNode to catch when Blackberry 4.6 returns 1.2765 + // nodes that are no longer in the document #6963 1.2766 + if ( elem && elem.parentNode ) { 1.2767 + // Inject the element directly into the jQuery object 1.2768 + this.length = 1; 1.2769 + this[0] = elem; 1.2770 + } 1.2771 + 1.2772 + this.context = document; 1.2773 + this.selector = selector; 1.2774 + return this; 1.2775 + } 1.2776 + 1.2777 + // HANDLE: $(expr, $(...)) 1.2778 + } else if ( !context || context.jquery ) { 1.2779 + return ( context || rootjQuery ).find( selector ); 1.2780 + 1.2781 + // HANDLE: $(expr, context) 1.2782 + // (which is just equivalent to: $(context).find(expr) 1.2783 + } else { 1.2784 + return this.constructor( context ).find( selector ); 1.2785 + } 1.2786 + 1.2787 + // HANDLE: $(DOMElement) 1.2788 + } else if ( selector.nodeType ) { 1.2789 + this.context = this[0] = selector; 1.2790 + this.length = 1; 1.2791 + return this; 1.2792 + 1.2793 + // HANDLE: $(function) 1.2794 + // Shortcut for document ready 1.2795 + } else if ( jQuery.isFunction( selector ) ) { 1.2796 + return typeof rootjQuery.ready !== "undefined" ? 1.2797 + rootjQuery.ready( selector ) : 1.2798 + // Execute immediately if ready is not present 1.2799 + selector( jQuery ); 1.2800 + } 1.2801 + 1.2802 + if ( selector.selector !== undefined ) { 1.2803 + this.selector = selector.selector; 1.2804 + this.context = selector.context; 1.2805 + } 1.2806 + 1.2807 + return jQuery.makeArray( selector, this ); 1.2808 + }; 1.2809 + 1.2810 +// Give the init function the jQuery prototype for later instantiation 1.2811 +init.prototype = jQuery.fn; 1.2812 + 1.2813 +// Initialize central reference 1.2814 +rootjQuery = jQuery( document ); 1.2815 + 1.2816 + 1.2817 +var rparentsprev = /^(?:parents|prev(?:Until|All))/, 1.2818 + // methods guaranteed to produce a unique set when starting from a unique set 1.2819 + guaranteedUnique = { 1.2820 + children: true, 1.2821 + contents: true, 1.2822 + next: true, 1.2823 + prev: true 1.2824 + }; 1.2825 + 1.2826 +jQuery.extend({ 1.2827 + dir: function( elem, dir, until ) { 1.2828 + var matched = [], 1.2829 + truncate = until !== undefined; 1.2830 + 1.2831 + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { 1.2832 + if ( elem.nodeType === 1 ) { 1.2833 + if ( truncate && jQuery( elem ).is( until ) ) { 1.2834 + break; 1.2835 + } 1.2836 + matched.push( elem ); 1.2837 + } 1.2838 + } 1.2839 + return matched; 1.2840 + }, 1.2841 + 1.2842 + sibling: function( n, elem ) { 1.2843 + var matched = []; 1.2844 + 1.2845 + for ( ; n; n = n.nextSibling ) { 1.2846 + if ( n.nodeType === 1 && n !== elem ) { 1.2847 + matched.push( n ); 1.2848 + } 1.2849 + } 1.2850 + 1.2851 + return matched; 1.2852 + } 1.2853 +}); 1.2854 + 1.2855 +jQuery.fn.extend({ 1.2856 + has: function( target ) { 1.2857 + var targets = jQuery( target, this ), 1.2858 + l = targets.length; 1.2859 + 1.2860 + return this.filter(function() { 1.2861 + var i = 0; 1.2862 + for ( ; i < l; i++ ) { 1.2863 + if ( jQuery.contains( this, targets[i] ) ) { 1.2864 + return true; 1.2865 + } 1.2866 + } 1.2867 + }); 1.2868 + }, 1.2869 + 1.2870 + closest: function( selectors, context ) { 1.2871 + var cur, 1.2872 + i = 0, 1.2873 + l = this.length, 1.2874 + matched = [], 1.2875 + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? 1.2876 + jQuery( selectors, context || this.context ) : 1.2877 + 0; 1.2878 + 1.2879 + for ( ; i < l; i++ ) { 1.2880 + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { 1.2881 + // Always skip document fragments 1.2882 + if ( cur.nodeType < 11 && (pos ? 1.2883 + pos.index(cur) > -1 : 1.2884 + 1.2885 + // Don't pass non-elements to Sizzle 1.2886 + cur.nodeType === 1 && 1.2887 + jQuery.find.matchesSelector(cur, selectors)) ) { 1.2888 + 1.2889 + matched.push( cur ); 1.2890 + break; 1.2891 + } 1.2892 + } 1.2893 + } 1.2894 + 1.2895 + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); 1.2896 + }, 1.2897 + 1.2898 + // Determine the position of an element within 1.2899 + // the matched set of elements 1.2900 + index: function( elem ) { 1.2901 + 1.2902 + // No argument, return index in parent 1.2903 + if ( !elem ) { 1.2904 + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 1.2905 + } 1.2906 + 1.2907 + // index in selector 1.2908 + if ( typeof elem === "string" ) { 1.2909 + return indexOf.call( jQuery( elem ), this[ 0 ] ); 1.2910 + } 1.2911 + 1.2912 + // Locate the position of the desired element 1.2913 + return indexOf.call( this, 1.2914 + 1.2915 + // If it receives a jQuery object, the first element is used 1.2916 + elem.jquery ? elem[ 0 ] : elem 1.2917 + ); 1.2918 + }, 1.2919 + 1.2920 + add: function( selector, context ) { 1.2921 + return this.pushStack( 1.2922 + jQuery.unique( 1.2923 + jQuery.merge( this.get(), jQuery( selector, context ) ) 1.2924 + ) 1.2925 + ); 1.2926 + }, 1.2927 + 1.2928 + addBack: function( selector ) { 1.2929 + return this.add( selector == null ? 1.2930 + this.prevObject : this.prevObject.filter(selector) 1.2931 + ); 1.2932 + } 1.2933 +}); 1.2934 + 1.2935 +function sibling( cur, dir ) { 1.2936 + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} 1.2937 + return cur; 1.2938 +} 1.2939 + 1.2940 +jQuery.each({ 1.2941 + parent: function( elem ) { 1.2942 + var parent = elem.parentNode; 1.2943 + return parent && parent.nodeType !== 11 ? parent : null; 1.2944 + }, 1.2945 + parents: function( elem ) { 1.2946 + return jQuery.dir( elem, "parentNode" ); 1.2947 + }, 1.2948 + parentsUntil: function( elem, i, until ) { 1.2949 + return jQuery.dir( elem, "parentNode", until ); 1.2950 + }, 1.2951 + next: function( elem ) { 1.2952 + return sibling( elem, "nextSibling" ); 1.2953 + }, 1.2954 + prev: function( elem ) { 1.2955 + return sibling( elem, "previousSibling" ); 1.2956 + }, 1.2957 + nextAll: function( elem ) { 1.2958 + return jQuery.dir( elem, "nextSibling" ); 1.2959 + }, 1.2960 + prevAll: function( elem ) { 1.2961 + return jQuery.dir( elem, "previousSibling" ); 1.2962 + }, 1.2963 + nextUntil: function( elem, i, until ) { 1.2964 + return jQuery.dir( elem, "nextSibling", until ); 1.2965 + }, 1.2966 + prevUntil: function( elem, i, until ) { 1.2967 + return jQuery.dir( elem, "previousSibling", until ); 1.2968 + }, 1.2969 + siblings: function( elem ) { 1.2970 + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); 1.2971 + }, 1.2972 + children: function( elem ) { 1.2973 + return jQuery.sibling( elem.firstChild ); 1.2974 + }, 1.2975 + contents: function( elem ) { 1.2976 + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); 1.2977 + } 1.2978 +}, function( name, fn ) { 1.2979 + jQuery.fn[ name ] = function( until, selector ) { 1.2980 + var matched = jQuery.map( this, fn, until ); 1.2981 + 1.2982 + if ( name.slice( -5 ) !== "Until" ) { 1.2983 + selector = until; 1.2984 + } 1.2985 + 1.2986 + if ( selector && typeof selector === "string" ) { 1.2987 + matched = jQuery.filter( selector, matched ); 1.2988 + } 1.2989 + 1.2990 + if ( this.length > 1 ) { 1.2991 + // Remove duplicates 1.2992 + if ( !guaranteedUnique[ name ] ) { 1.2993 + jQuery.unique( matched ); 1.2994 + } 1.2995 + 1.2996 + // Reverse order for parents* and prev-derivatives 1.2997 + if ( rparentsprev.test( name ) ) { 1.2998 + matched.reverse(); 1.2999 + } 1.3000 + } 1.3001 + 1.3002 + return this.pushStack( matched ); 1.3003 + }; 1.3004 +}); 1.3005 +var rnotwhite = (/\S+/g); 1.3006 + 1.3007 + 1.3008 + 1.3009 +// String to Object options format cache 1.3010 +var optionsCache = {}; 1.3011 + 1.3012 +// Convert String-formatted options into Object-formatted ones and store in cache 1.3013 +function createOptions( options ) { 1.3014 + var object = optionsCache[ options ] = {}; 1.3015 + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { 1.3016 + object[ flag ] = true; 1.3017 + }); 1.3018 + return object; 1.3019 +} 1.3020 + 1.3021 +/* 1.3022 + * Create a callback list using the following parameters: 1.3023 + * 1.3024 + * options: an optional list of space-separated options that will change how 1.3025 + * the callback list behaves or a more traditional option object 1.3026 + * 1.3027 + * By default a callback list will act like an event callback list and can be 1.3028 + * "fired" multiple times. 1.3029 + * 1.3030 + * Possible options: 1.3031 + * 1.3032 + * once: will ensure the callback list can only be fired once (like a Deferred) 1.3033 + * 1.3034 + * memory: will keep track of previous values and will call any callback added 1.3035 + * after the list has been fired right away with the latest "memorized" 1.3036 + * values (like a Deferred) 1.3037 + * 1.3038 + * unique: will ensure a callback can only be added once (no duplicate in the list) 1.3039 + * 1.3040 + * stopOnFalse: interrupt callings when a callback returns false 1.3041 + * 1.3042 + */ 1.3043 +jQuery.Callbacks = function( options ) { 1.3044 + 1.3045 + // Convert options from String-formatted to Object-formatted if needed 1.3046 + // (we check in cache first) 1.3047 + options = typeof options === "string" ? 1.3048 + ( optionsCache[ options ] || createOptions( options ) ) : 1.3049 + jQuery.extend( {}, options ); 1.3050 + 1.3051 + var // Last fire value (for non-forgettable lists) 1.3052 + memory, 1.3053 + // Flag to know if list was already fired 1.3054 + fired, 1.3055 + // Flag to know if list is currently firing 1.3056 + firing, 1.3057 + // First callback to fire (used internally by add and fireWith) 1.3058 + firingStart, 1.3059 + // End of the loop when firing 1.3060 + firingLength, 1.3061 + // Index of currently firing callback (modified by remove if needed) 1.3062 + firingIndex, 1.3063 + // Actual callback list 1.3064 + list = [], 1.3065 + // Stack of fire calls for repeatable lists 1.3066 + stack = !options.once && [], 1.3067 + // Fire callbacks 1.3068 + fire = function( data ) { 1.3069 + memory = options.memory && data; 1.3070 + fired = true; 1.3071 + firingIndex = firingStart || 0; 1.3072 + firingStart = 0; 1.3073 + firingLength = list.length; 1.3074 + firing = true; 1.3075 + for ( ; list && firingIndex < firingLength; firingIndex++ ) { 1.3076 + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { 1.3077 + memory = false; // To prevent further calls using add 1.3078 + break; 1.3079 + } 1.3080 + } 1.3081 + firing = false; 1.3082 + if ( list ) { 1.3083 + if ( stack ) { 1.3084 + if ( stack.length ) { 1.3085 + fire( stack.shift() ); 1.3086 + } 1.3087 + } else if ( memory ) { 1.3088 + list = []; 1.3089 + } else { 1.3090 + self.disable(); 1.3091 + } 1.3092 + } 1.3093 + }, 1.3094 + // Actual Callbacks object 1.3095 + self = { 1.3096 + // Add a callback or a collection of callbacks to the list 1.3097 + add: function() { 1.3098 + if ( list ) { 1.3099 + // First, we save the current length 1.3100 + var start = list.length; 1.3101 + (function add( args ) { 1.3102 + jQuery.each( args, function( _, arg ) { 1.3103 + var type = jQuery.type( arg ); 1.3104 + if ( type === "function" ) { 1.3105 + if ( !options.unique || !self.has( arg ) ) { 1.3106 + list.push( arg ); 1.3107 + } 1.3108 + } else if ( arg && arg.length && type !== "string" ) { 1.3109 + // Inspect recursively 1.3110 + add( arg ); 1.3111 + } 1.3112 + }); 1.3113 + })( arguments ); 1.3114 + // Do we need to add the callbacks to the 1.3115 + // current firing batch? 1.3116 + if ( firing ) { 1.3117 + firingLength = list.length; 1.3118 + // With memory, if we're not firing then 1.3119 + // we should call right away 1.3120 + } else if ( memory ) { 1.3121 + firingStart = start; 1.3122 + fire( memory ); 1.3123 + } 1.3124 + } 1.3125 + return this; 1.3126 + }, 1.3127 + // Remove a callback from the list 1.3128 + remove: function() { 1.3129 + if ( list ) { 1.3130 + jQuery.each( arguments, function( _, arg ) { 1.3131 + var index; 1.3132 + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 1.3133 + list.splice( index, 1 ); 1.3134 + // Handle firing indexes 1.3135 + if ( firing ) { 1.3136 + if ( index <= firingLength ) { 1.3137 + firingLength--; 1.3138 + } 1.3139 + if ( index <= firingIndex ) { 1.3140 + firingIndex--; 1.3141 + } 1.3142 + } 1.3143 + } 1.3144 + }); 1.3145 + } 1.3146 + return this; 1.3147 + }, 1.3148 + // Check if a given callback is in the list. 1.3149 + // If no argument is given, return whether or not list has callbacks attached. 1.3150 + has: function( fn ) { 1.3151 + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); 1.3152 + }, 1.3153 + // Remove all callbacks from the list 1.3154 + empty: function() { 1.3155 + list = []; 1.3156 + firingLength = 0; 1.3157 + return this; 1.3158 + }, 1.3159 + // Have the list do nothing anymore 1.3160 + disable: function() { 1.3161 + list = stack = memory = undefined; 1.3162 + return this; 1.3163 + }, 1.3164 + // Is it disabled? 1.3165 + disabled: function() { 1.3166 + return !list; 1.3167 + }, 1.3168 + // Lock the list in its current state 1.3169 + lock: function() { 1.3170 + stack = undefined; 1.3171 + if ( !memory ) { 1.3172 + self.disable(); 1.3173 + } 1.3174 + return this; 1.3175 + }, 1.3176 + // Is it locked? 1.3177 + locked: function() { 1.3178 + return !stack; 1.3179 + }, 1.3180 + // Call all callbacks with the given context and arguments 1.3181 + fireWith: function( context, args ) { 1.3182 + if ( list && ( !fired || stack ) ) { 1.3183 + args = args || []; 1.3184 + args = [ context, args.slice ? args.slice() : args ]; 1.3185 + if ( firing ) { 1.3186 + stack.push( args ); 1.3187 + } else { 1.3188 + fire( args ); 1.3189 + } 1.3190 + } 1.3191 + return this; 1.3192 + }, 1.3193 + // Call all the callbacks with the given arguments 1.3194 + fire: function() { 1.3195 + self.fireWith( this, arguments ); 1.3196 + return this; 1.3197 + }, 1.3198 + // To know if the callbacks have already been called at least once 1.3199 + fired: function() { 1.3200 + return !!fired; 1.3201 + } 1.3202 + }; 1.3203 + 1.3204 + return self; 1.3205 +}; 1.3206 + 1.3207 + 1.3208 +jQuery.extend({ 1.3209 + 1.3210 + Deferred: function( func ) { 1.3211 + var tuples = [ 1.3212 + // action, add listener, listener list, final state 1.3213 + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], 1.3214 + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], 1.3215 + [ "notify", "progress", jQuery.Callbacks("memory") ] 1.3216 + ], 1.3217 + state = "pending", 1.3218 + promise = { 1.3219 + state: function() { 1.3220 + return state; 1.3221 + }, 1.3222 + always: function() { 1.3223 + deferred.done( arguments ).fail( arguments ); 1.3224 + return this; 1.3225 + }, 1.3226 + then: function( /* fnDone, fnFail, fnProgress */ ) { 1.3227 + var fns = arguments; 1.3228 + return jQuery.Deferred(function( newDefer ) { 1.3229 + jQuery.each( tuples, function( i, tuple ) { 1.3230 + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; 1.3231 + // deferred[ done | fail | progress ] for forwarding actions to newDefer 1.3232 + deferred[ tuple[1] ](function() { 1.3233 + var returned = fn && fn.apply( this, arguments ); 1.3234 + if ( returned && jQuery.isFunction( returned.promise ) ) { 1.3235 + returned.promise() 1.3236 + .done( newDefer.resolve ) 1.3237 + .fail( newDefer.reject ) 1.3238 + .progress( newDefer.notify ); 1.3239 + } else { 1.3240 + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); 1.3241 + } 1.3242 + }); 1.3243 + }); 1.3244 + fns = null; 1.3245 + }).promise(); 1.3246 + }, 1.3247 + // Get a promise for this deferred 1.3248 + // If obj is provided, the promise aspect is added to the object 1.3249 + promise: function( obj ) { 1.3250 + return obj != null ? jQuery.extend( obj, promise ) : promise; 1.3251 + } 1.3252 + }, 1.3253 + deferred = {}; 1.3254 + 1.3255 + // Keep pipe for back-compat 1.3256 + promise.pipe = promise.then; 1.3257 + 1.3258 + // Add list-specific methods 1.3259 + jQuery.each( tuples, function( i, tuple ) { 1.3260 + var list = tuple[ 2 ], 1.3261 + stateString = tuple[ 3 ]; 1.3262 + 1.3263 + // promise[ done | fail | progress ] = list.add 1.3264 + promise[ tuple[1] ] = list.add; 1.3265 + 1.3266 + // Handle state 1.3267 + if ( stateString ) { 1.3268 + list.add(function() { 1.3269 + // state = [ resolved | rejected ] 1.3270 + state = stateString; 1.3271 + 1.3272 + // [ reject_list | resolve_list ].disable; progress_list.lock 1.3273 + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); 1.3274 + } 1.3275 + 1.3276 + // deferred[ resolve | reject | notify ] 1.3277 + deferred[ tuple[0] ] = function() { 1.3278 + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); 1.3279 + return this; 1.3280 + }; 1.3281 + deferred[ tuple[0] + "With" ] = list.fireWith; 1.3282 + }); 1.3283 + 1.3284 + // Make the deferred a promise 1.3285 + promise.promise( deferred ); 1.3286 + 1.3287 + // Call given func if any 1.3288 + if ( func ) { 1.3289 + func.call( deferred, deferred ); 1.3290 + } 1.3291 + 1.3292 + // All done! 1.3293 + return deferred; 1.3294 + }, 1.3295 + 1.3296 + // Deferred helper 1.3297 + when: function( subordinate /* , ..., subordinateN */ ) { 1.3298 + var i = 0, 1.3299 + resolveValues = slice.call( arguments ), 1.3300 + length = resolveValues.length, 1.3301 + 1.3302 + // the count of uncompleted subordinates 1.3303 + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, 1.3304 + 1.3305 + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. 1.3306 + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 1.3307 + 1.3308 + // Update function for both resolve and progress values 1.3309 + updateFunc = function( i, contexts, values ) { 1.3310 + return function( value ) { 1.3311 + contexts[ i ] = this; 1.3312 + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 1.3313 + if ( values === progressValues ) { 1.3314 + deferred.notifyWith( contexts, values ); 1.3315 + } else if ( !( --remaining ) ) { 1.3316 + deferred.resolveWith( contexts, values ); 1.3317 + } 1.3318 + }; 1.3319 + }, 1.3320 + 1.3321 + progressValues, progressContexts, resolveContexts; 1.3322 + 1.3323 + // add listeners to Deferred subordinates; treat others as resolved 1.3324 + if ( length > 1 ) { 1.3325 + progressValues = new Array( length ); 1.3326 + progressContexts = new Array( length ); 1.3327 + resolveContexts = new Array( length ); 1.3328 + for ( ; i < length; i++ ) { 1.3329 + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { 1.3330 + resolveValues[ i ].promise() 1.3331 + .done( updateFunc( i, resolveContexts, resolveValues ) ) 1.3332 + .fail( deferred.reject ) 1.3333 + .progress( updateFunc( i, progressContexts, progressValues ) ); 1.3334 + } else { 1.3335 + --remaining; 1.3336 + } 1.3337 + } 1.3338 + } 1.3339 + 1.3340 + // if we're not waiting on anything, resolve the master 1.3341 + if ( !remaining ) { 1.3342 + deferred.resolveWith( resolveContexts, resolveValues ); 1.3343 + } 1.3344 + 1.3345 + return deferred.promise(); 1.3346 + } 1.3347 +}); 1.3348 + 1.3349 + 1.3350 +// The deferred used on DOM ready 1.3351 +var readyList; 1.3352 + 1.3353 +jQuery.fn.ready = function( fn ) { 1.3354 + // Add the callback 1.3355 + jQuery.ready.promise().done( fn ); 1.3356 + 1.3357 + return this; 1.3358 +}; 1.3359 + 1.3360 +jQuery.extend({ 1.3361 + // Is the DOM ready to be used? Set to true once it occurs. 1.3362 + isReady: false, 1.3363 + 1.3364 + // A counter to track how many items to wait for before 1.3365 + // the ready event fires. See #6781 1.3366 + readyWait: 1, 1.3367 + 1.3368 + // Hold (or release) the ready event 1.3369 + holdReady: function( hold ) { 1.3370 + if ( hold ) { 1.3371 + jQuery.readyWait++; 1.3372 + } else { 1.3373 + jQuery.ready( true ); 1.3374 + } 1.3375 + }, 1.3376 + 1.3377 + // Handle when the DOM is ready 1.3378 + ready: function( wait ) { 1.3379 + 1.3380 + // Abort if there are pending holds or we're already ready 1.3381 + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 1.3382 + return; 1.3383 + } 1.3384 + 1.3385 + // Remember that the DOM is ready 1.3386 + jQuery.isReady = true; 1.3387 + 1.3388 + // If a normal DOM Ready event fired, decrement, and wait if need be 1.3389 + if ( wait !== true && --jQuery.readyWait > 0 ) { 1.3390 + return; 1.3391 + } 1.3392 + 1.3393 + // If there are functions bound, to execute 1.3394 + readyList.resolveWith( document, [ jQuery ] ); 1.3395 + 1.3396 + // Trigger any bound ready events 1.3397 + if ( jQuery.fn.triggerHandler ) { 1.3398 + jQuery( document ).triggerHandler( "ready" ); 1.3399 + jQuery( document ).off( "ready" ); 1.3400 + } 1.3401 + } 1.3402 +}); 1.3403 + 1.3404 +/** 1.3405 + * The ready event handler and self cleanup method 1.3406 + */ 1.3407 +function completed() { 1.3408 + document.removeEventListener( "DOMContentLoaded", completed, false ); 1.3409 + window.removeEventListener( "load", completed, false ); 1.3410 + jQuery.ready(); 1.3411 +} 1.3412 + 1.3413 +jQuery.ready.promise = function( obj ) { 1.3414 + if ( !readyList ) { 1.3415 + 1.3416 + readyList = jQuery.Deferred(); 1.3417 + 1.3418 + // Catch cases where $(document).ready() is called after the browser event has already occurred. 1.3419 + // we once tried to use readyState "interactive" here, but it caused issues like the one 1.3420 + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 1.3421 + if ( document.readyState === "complete" ) { 1.3422 + // Handle it asynchronously to allow scripts the opportunity to delay ready 1.3423 + setTimeout( jQuery.ready ); 1.3424 + 1.3425 + } else { 1.3426 + 1.3427 + // Use the handy event callback 1.3428 + document.addEventListener( "DOMContentLoaded", completed, false ); 1.3429 + 1.3430 + // A fallback to window.onload, that will always work 1.3431 + window.addEventListener( "load", completed, false ); 1.3432 + } 1.3433 + } 1.3434 + return readyList.promise( obj ); 1.3435 +}; 1.3436 + 1.3437 +// Kick off the DOM ready check even if the user does not 1.3438 +jQuery.ready.promise(); 1.3439 + 1.3440 + 1.3441 + 1.3442 + 1.3443 +// Multifunctional method to get and set values of a collection 1.3444 +// The value/s can optionally be executed if it's a function 1.3445 +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 1.3446 + var i = 0, 1.3447 + len = elems.length, 1.3448 + bulk = key == null; 1.3449 + 1.3450 + // Sets many values 1.3451 + if ( jQuery.type( key ) === "object" ) { 1.3452 + chainable = true; 1.3453 + for ( i in key ) { 1.3454 + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); 1.3455 + } 1.3456 + 1.3457 + // Sets one value 1.3458 + } else if ( value !== undefined ) { 1.3459 + chainable = true; 1.3460 + 1.3461 + if ( !jQuery.isFunction( value ) ) { 1.3462 + raw = true; 1.3463 + } 1.3464 + 1.3465 + if ( bulk ) { 1.3466 + // Bulk operations run against the entire set 1.3467 + if ( raw ) { 1.3468 + fn.call( elems, value ); 1.3469 + fn = null; 1.3470 + 1.3471 + // ...except when executing function values 1.3472 + } else { 1.3473 + bulk = fn; 1.3474 + fn = function( elem, key, value ) { 1.3475 + return bulk.call( jQuery( elem ), value ); 1.3476 + }; 1.3477 + } 1.3478 + } 1.3479 + 1.3480 + if ( fn ) { 1.3481 + for ( ; i < len; i++ ) { 1.3482 + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); 1.3483 + } 1.3484 + } 1.3485 + } 1.3486 + 1.3487 + return chainable ? 1.3488 + elems : 1.3489 + 1.3490 + // Gets 1.3491 + bulk ? 1.3492 + fn.call( elems ) : 1.3493 + len ? fn( elems[0], key ) : emptyGet; 1.3494 +}; 1.3495 + 1.3496 + 1.3497 +/** 1.3498 + * Determines whether an object can have data 1.3499 + */ 1.3500 +jQuery.acceptData = function( owner ) { 1.3501 + // Accepts only: 1.3502 + // - Node 1.3503 + // - Node.ELEMENT_NODE 1.3504 + // - Node.DOCUMENT_NODE 1.3505 + // - Object 1.3506 + // - Any 1.3507 + /* jshint -W018 */ 1.3508 + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 1.3509 +}; 1.3510 + 1.3511 + 1.3512 +function Data() { 1.3513 + // Support: Android < 4, 1.3514 + // Old WebKit does not have Object.preventExtensions/freeze method, 1.3515 + // return new empty object instead with no [[set]] accessor 1.3516 + Object.defineProperty( this.cache = {}, 0, { 1.3517 + get: function() { 1.3518 + return {}; 1.3519 + } 1.3520 + }); 1.3521 + 1.3522 + this.expando = jQuery.expando + Math.random(); 1.3523 +} 1.3524 + 1.3525 +Data.uid = 1; 1.3526 +Data.accepts = jQuery.acceptData; 1.3527 + 1.3528 +Data.prototype = { 1.3529 + key: function( owner ) { 1.3530 + // We can accept data for non-element nodes in modern browsers, 1.3531 + // but we should not, see #8335. 1.3532 + // Always return the key for a frozen object. 1.3533 + if ( !Data.accepts( owner ) ) { 1.3534 + return 0; 1.3535 + } 1.3536 + 1.3537 + var descriptor = {}, 1.3538 + // Check if the owner object already has a cache key 1.3539 + unlock = owner[ this.expando ]; 1.3540 + 1.3541 + // If not, create one 1.3542 + if ( !unlock ) { 1.3543 + unlock = Data.uid++; 1.3544 + 1.3545 + // Secure it in a non-enumerable, non-writable property 1.3546 + try { 1.3547 + descriptor[ this.expando ] = { value: unlock }; 1.3548 + Object.defineProperties( owner, descriptor ); 1.3549 + 1.3550 + // Support: Android < 4 1.3551 + // Fallback to a less secure definition 1.3552 + } catch ( e ) { 1.3553 + descriptor[ this.expando ] = unlock; 1.3554 + jQuery.extend( owner, descriptor ); 1.3555 + } 1.3556 + } 1.3557 + 1.3558 + // Ensure the cache object 1.3559 + if ( !this.cache[ unlock ] ) { 1.3560 + this.cache[ unlock ] = {}; 1.3561 + } 1.3562 + 1.3563 + return unlock; 1.3564 + }, 1.3565 + set: function( owner, data, value ) { 1.3566 + var prop, 1.3567 + // There may be an unlock assigned to this node, 1.3568 + // if there is no entry for this "owner", create one inline 1.3569 + // and set the unlock as though an owner entry had always existed 1.3570 + unlock = this.key( owner ), 1.3571 + cache = this.cache[ unlock ]; 1.3572 + 1.3573 + // Handle: [ owner, key, value ] args 1.3574 + if ( typeof data === "string" ) { 1.3575 + cache[ data ] = value; 1.3576 + 1.3577 + // Handle: [ owner, { properties } ] args 1.3578 + } else { 1.3579 + // Fresh assignments by object are shallow copied 1.3580 + if ( jQuery.isEmptyObject( cache ) ) { 1.3581 + jQuery.extend( this.cache[ unlock ], data ); 1.3582 + // Otherwise, copy the properties one-by-one to the cache object 1.3583 + } else { 1.3584 + for ( prop in data ) { 1.3585 + cache[ prop ] = data[ prop ]; 1.3586 + } 1.3587 + } 1.3588 + } 1.3589 + return cache; 1.3590 + }, 1.3591 + get: function( owner, key ) { 1.3592 + // Either a valid cache is found, or will be created. 1.3593 + // New caches will be created and the unlock returned, 1.3594 + // allowing direct access to the newly created 1.3595 + // empty data object. A valid owner object must be provided. 1.3596 + var cache = this.cache[ this.key( owner ) ]; 1.3597 + 1.3598 + return key === undefined ? 1.3599 + cache : cache[ key ]; 1.3600 + }, 1.3601 + access: function( owner, key, value ) { 1.3602 + var stored; 1.3603 + // In cases where either: 1.3604 + // 1.3605 + // 1. No key was specified 1.3606 + // 2. A string key was specified, but no value provided 1.3607 + // 1.3608 + // Take the "read" path and allow the get method to determine 1.3609 + // which value to return, respectively either: 1.3610 + // 1.3611 + // 1. The entire cache object 1.3612 + // 2. The data stored at the key 1.3613 + // 1.3614 + if ( key === undefined || 1.3615 + ((key && typeof key === "string") && value === undefined) ) { 1.3616 + 1.3617 + stored = this.get( owner, key ); 1.3618 + 1.3619 + return stored !== undefined ? 1.3620 + stored : this.get( owner, jQuery.camelCase(key) ); 1.3621 + } 1.3622 + 1.3623 + // [*]When the key is not a string, or both a key and value 1.3624 + // are specified, set or extend (existing objects) with either: 1.3625 + // 1.3626 + // 1. An object of properties 1.3627 + // 2. A key and value 1.3628 + // 1.3629 + this.set( owner, key, value ); 1.3630 + 1.3631 + // Since the "set" path can have two possible entry points 1.3632 + // return the expected data based on which path was taken[*] 1.3633 + return value !== undefined ? value : key; 1.3634 + }, 1.3635 + remove: function( owner, key ) { 1.3636 + var i, name, camel, 1.3637 + unlock = this.key( owner ), 1.3638 + cache = this.cache[ unlock ]; 1.3639 + 1.3640 + if ( key === undefined ) { 1.3641 + this.cache[ unlock ] = {}; 1.3642 + 1.3643 + } else { 1.3644 + // Support array or space separated string of keys 1.3645 + if ( jQuery.isArray( key ) ) { 1.3646 + // If "name" is an array of keys... 1.3647 + // When data is initially created, via ("key", "val") signature, 1.3648 + // keys will be converted to camelCase. 1.3649 + // Since there is no way to tell _how_ a key was added, remove 1.3650 + // both plain key and camelCase key. #12786 1.3651 + // This will only penalize the array argument path. 1.3652 + name = key.concat( key.map( jQuery.camelCase ) ); 1.3653 + } else { 1.3654 + camel = jQuery.camelCase( key ); 1.3655 + // Try the string as a key before any manipulation 1.3656 + if ( key in cache ) { 1.3657 + name = [ key, camel ]; 1.3658 + } else { 1.3659 + // If a key with the spaces exists, use it. 1.3660 + // Otherwise, create an array by matching non-whitespace 1.3661 + name = camel; 1.3662 + name = name in cache ? 1.3663 + [ name ] : ( name.match( rnotwhite ) || [] ); 1.3664 + } 1.3665 + } 1.3666 + 1.3667 + i = name.length; 1.3668 + while ( i-- ) { 1.3669 + delete cache[ name[ i ] ]; 1.3670 + } 1.3671 + } 1.3672 + }, 1.3673 + hasData: function( owner ) { 1.3674 + return !jQuery.isEmptyObject( 1.3675 + this.cache[ owner[ this.expando ] ] || {} 1.3676 + ); 1.3677 + }, 1.3678 + discard: function( owner ) { 1.3679 + if ( owner[ this.expando ] ) { 1.3680 + delete this.cache[ owner[ this.expando ] ]; 1.3681 + } 1.3682 + } 1.3683 +}; 1.3684 +var data_priv = new Data(); 1.3685 + 1.3686 +var data_user = new Data(); 1.3687 + 1.3688 + 1.3689 + 1.3690 +/* 1.3691 + Implementation Summary 1.3692 + 1.3693 + 1. Enforce API surface and semantic compatibility with 1.9.x branch 1.3694 + 2. Improve the module's maintainability by reducing the storage 1.3695 + paths to a single mechanism. 1.3696 + 3. Use the same single mechanism to support "private" and "user" data. 1.3697 + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 1.3698 + 5. Avoid exposing implementation details on user objects (eg. expando properties) 1.3699 + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 1.3700 +*/ 1.3701 +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 1.3702 + rmultiDash = /([A-Z])/g; 1.3703 + 1.3704 +function dataAttr( elem, key, data ) { 1.3705 + var name; 1.3706 + 1.3707 + // If nothing was found internally, try to fetch any 1.3708 + // data from the HTML5 data-* attribute 1.3709 + if ( data === undefined && elem.nodeType === 1 ) { 1.3710 + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); 1.3711 + data = elem.getAttribute( name ); 1.3712 + 1.3713 + if ( typeof data === "string" ) { 1.3714 + try { 1.3715 + data = data === "true" ? true : 1.3716 + data === "false" ? false : 1.3717 + data === "null" ? null : 1.3718 + // Only convert to a number if it doesn't change the string 1.3719 + +data + "" === data ? +data : 1.3720 + rbrace.test( data ) ? jQuery.parseJSON( data ) : 1.3721 + data; 1.3722 + } catch( e ) {} 1.3723 + 1.3724 + // Make sure we set the data so it isn't changed later 1.3725 + data_user.set( elem, key, data ); 1.3726 + } else { 1.3727 + data = undefined; 1.3728 + } 1.3729 + } 1.3730 + return data; 1.3731 +} 1.3732 + 1.3733 +jQuery.extend({ 1.3734 + hasData: function( elem ) { 1.3735 + return data_user.hasData( elem ) || data_priv.hasData( elem ); 1.3736 + }, 1.3737 + 1.3738 + data: function( elem, name, data ) { 1.3739 + return data_user.access( elem, name, data ); 1.3740 + }, 1.3741 + 1.3742 + removeData: function( elem, name ) { 1.3743 + data_user.remove( elem, name ); 1.3744 + }, 1.3745 + 1.3746 + // TODO: Now that all calls to _data and _removeData have been replaced 1.3747 + // with direct calls to data_priv methods, these can be deprecated. 1.3748 + _data: function( elem, name, data ) { 1.3749 + return data_priv.access( elem, name, data ); 1.3750 + }, 1.3751 + 1.3752 + _removeData: function( elem, name ) { 1.3753 + data_priv.remove( elem, name ); 1.3754 + } 1.3755 +}); 1.3756 + 1.3757 +jQuery.fn.extend({ 1.3758 + data: function( key, value ) { 1.3759 + var i, name, data, 1.3760 + elem = this[ 0 ], 1.3761 + attrs = elem && elem.attributes; 1.3762 + 1.3763 + // Gets all values 1.3764 + if ( key === undefined ) { 1.3765 + if ( this.length ) { 1.3766 + data = data_user.get( elem ); 1.3767 + 1.3768 + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { 1.3769 + i = attrs.length; 1.3770 + while ( i-- ) { 1.3771 + 1.3772 + // Support: IE11+ 1.3773 + // The attrs elements can be null (#14894) 1.3774 + if ( attrs[ i ] ) { 1.3775 + name = attrs[ i ].name; 1.3776 + if ( name.indexOf( "data-" ) === 0 ) { 1.3777 + name = jQuery.camelCase( name.slice(5) ); 1.3778 + dataAttr( elem, name, data[ name ] ); 1.3779 + } 1.3780 + } 1.3781 + } 1.3782 + data_priv.set( elem, "hasDataAttrs", true ); 1.3783 + } 1.3784 + } 1.3785 + 1.3786 + return data; 1.3787 + } 1.3788 + 1.3789 + // Sets multiple values 1.3790 + if ( typeof key === "object" ) { 1.3791 + return this.each(function() { 1.3792 + data_user.set( this, key ); 1.3793 + }); 1.3794 + } 1.3795 + 1.3796 + return access( this, function( value ) { 1.3797 + var data, 1.3798 + camelKey = jQuery.camelCase( key ); 1.3799 + 1.3800 + // The calling jQuery object (element matches) is not empty 1.3801 + // (and therefore has an element appears at this[ 0 ]) and the 1.3802 + // `value` parameter was not undefined. An empty jQuery object 1.3803 + // will result in `undefined` for elem = this[ 0 ] which will 1.3804 + // throw an exception if an attempt to read a data cache is made. 1.3805 + if ( elem && value === undefined ) { 1.3806 + // Attempt to get data from the cache 1.3807 + // with the key as-is 1.3808 + data = data_user.get( elem, key ); 1.3809 + if ( data !== undefined ) { 1.3810 + return data; 1.3811 + } 1.3812 + 1.3813 + // Attempt to get data from the cache 1.3814 + // with the key camelized 1.3815 + data = data_user.get( elem, camelKey ); 1.3816 + if ( data !== undefined ) { 1.3817 + return data; 1.3818 + } 1.3819 + 1.3820 + // Attempt to "discover" the data in 1.3821 + // HTML5 custom data-* attrs 1.3822 + data = dataAttr( elem, camelKey, undefined ); 1.3823 + if ( data !== undefined ) { 1.3824 + return data; 1.3825 + } 1.3826 + 1.3827 + // We tried really hard, but the data doesn't exist. 1.3828 + return; 1.3829 + } 1.3830 + 1.3831 + // Set the data... 1.3832 + this.each(function() { 1.3833 + // First, attempt to store a copy or reference of any 1.3834 + // data that might've been store with a camelCased key. 1.3835 + var data = data_user.get( this, camelKey ); 1.3836 + 1.3837 + // For HTML5 data-* attribute interop, we have to 1.3838 + // store property names with dashes in a camelCase form. 1.3839 + // This might not apply to all properties...* 1.3840 + data_user.set( this, camelKey, value ); 1.3841 + 1.3842 + // *... In the case of properties that might _actually_ 1.3843 + // have dashes, we need to also store a copy of that 1.3844 + // unchanged property. 1.3845 + if ( key.indexOf("-") !== -1 && data !== undefined ) { 1.3846 + data_user.set( this, key, value ); 1.3847 + } 1.3848 + }); 1.3849 + }, null, value, arguments.length > 1, null, true ); 1.3850 + }, 1.3851 + 1.3852 + removeData: function( key ) { 1.3853 + return this.each(function() { 1.3854 + data_user.remove( this, key ); 1.3855 + }); 1.3856 + } 1.3857 +}); 1.3858 + 1.3859 + 1.3860 +jQuery.extend({ 1.3861 + queue: function( elem, type, data ) { 1.3862 + var queue; 1.3863 + 1.3864 + if ( elem ) { 1.3865 + type = ( type || "fx" ) + "queue"; 1.3866 + queue = data_priv.get( elem, type ); 1.3867 + 1.3868 + // Speed up dequeue by getting out quickly if this is just a lookup 1.3869 + if ( data ) { 1.3870 + if ( !queue || jQuery.isArray( data ) ) { 1.3871 + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); 1.3872 + } else { 1.3873 + queue.push( data ); 1.3874 + } 1.3875 + } 1.3876 + return queue || []; 1.3877 + } 1.3878 + }, 1.3879 + 1.3880 + dequeue: function( elem, type ) { 1.3881 + type = type || "fx"; 1.3882 + 1.3883 + var queue = jQuery.queue( elem, type ), 1.3884 + startLength = queue.length, 1.3885 + fn = queue.shift(), 1.3886 + hooks = jQuery._queueHooks( elem, type ), 1.3887 + next = function() { 1.3888 + jQuery.dequeue( elem, type ); 1.3889 + }; 1.3890 + 1.3891 + // If the fx queue is dequeued, always remove the progress sentinel 1.3892 + if ( fn === "inprogress" ) { 1.3893 + fn = queue.shift(); 1.3894 + startLength--; 1.3895 + } 1.3896 + 1.3897 + if ( fn ) { 1.3898 + 1.3899 + // Add a progress sentinel to prevent the fx queue from being 1.3900 + // automatically dequeued 1.3901 + if ( type === "fx" ) { 1.3902 + queue.unshift( "inprogress" ); 1.3903 + } 1.3904 + 1.3905 + // clear up the last queue stop function 1.3906 + delete hooks.stop; 1.3907 + fn.call( elem, next, hooks ); 1.3908 + } 1.3909 + 1.3910 + if ( !startLength && hooks ) { 1.3911 + hooks.empty.fire(); 1.3912 + } 1.3913 + }, 1.3914 + 1.3915 + // not intended for public consumption - generates a queueHooks object, or returns the current one 1.3916 + _queueHooks: function( elem, type ) { 1.3917 + var key = type + "queueHooks"; 1.3918 + return data_priv.get( elem, key ) || data_priv.access( elem, key, { 1.3919 + empty: jQuery.Callbacks("once memory").add(function() { 1.3920 + data_priv.remove( elem, [ type + "queue", key ] ); 1.3921 + }) 1.3922 + }); 1.3923 + } 1.3924 +}); 1.3925 + 1.3926 +jQuery.fn.extend({ 1.3927 + queue: function( type, data ) { 1.3928 + var setter = 2; 1.3929 + 1.3930 + if ( typeof type !== "string" ) { 1.3931 + data = type; 1.3932 + type = "fx"; 1.3933 + setter--; 1.3934 + } 1.3935 + 1.3936 + if ( arguments.length < setter ) { 1.3937 + return jQuery.queue( this[0], type ); 1.3938 + } 1.3939 + 1.3940 + return data === undefined ? 1.3941 + this : 1.3942 + this.each(function() { 1.3943 + var queue = jQuery.queue( this, type, data ); 1.3944 + 1.3945 + // ensure a hooks for this queue 1.3946 + jQuery._queueHooks( this, type ); 1.3947 + 1.3948 + if ( type === "fx" && queue[0] !== "inprogress" ) { 1.3949 + jQuery.dequeue( this, type ); 1.3950 + } 1.3951 + }); 1.3952 + }, 1.3953 + dequeue: function( type ) { 1.3954 + return this.each(function() { 1.3955 + jQuery.dequeue( this, type ); 1.3956 + }); 1.3957 + }, 1.3958 + clearQueue: function( type ) { 1.3959 + return this.queue( type || "fx", [] ); 1.3960 + }, 1.3961 + // Get a promise resolved when queues of a certain type 1.3962 + // are emptied (fx is the type by default) 1.3963 + promise: function( type, obj ) { 1.3964 + var tmp, 1.3965 + count = 1, 1.3966 + defer = jQuery.Deferred(), 1.3967 + elements = this, 1.3968 + i = this.length, 1.3969 + resolve = function() { 1.3970 + if ( !( --count ) ) { 1.3971 + defer.resolveWith( elements, [ elements ] ); 1.3972 + } 1.3973 + }; 1.3974 + 1.3975 + if ( typeof type !== "string" ) { 1.3976 + obj = type; 1.3977 + type = undefined; 1.3978 + } 1.3979 + type = type || "fx"; 1.3980 + 1.3981 + while ( i-- ) { 1.3982 + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); 1.3983 + if ( tmp && tmp.empty ) { 1.3984 + count++; 1.3985 + tmp.empty.add( resolve ); 1.3986 + } 1.3987 + } 1.3988 + resolve(); 1.3989 + return defer.promise( obj ); 1.3990 + } 1.3991 +}); 1.3992 +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; 1.3993 + 1.3994 +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 1.3995 + 1.3996 +var isHidden = function( elem, el ) { 1.3997 + // isHidden might be called from jQuery#filter function; 1.3998 + // in that case, element will be second argument 1.3999 + elem = el || elem; 1.4000 + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); 1.4001 + }; 1.4002 + 1.4003 +var rcheckableType = (/^(?:checkbox|radio)$/i); 1.4004 + 1.4005 + 1.4006 + 1.4007 +(function() { 1.4008 + var fragment = document.createDocumentFragment(), 1.4009 + div = fragment.appendChild( document.createElement( "div" ) ), 1.4010 + input = document.createElement( "input" ); 1.4011 + 1.4012 + // #11217 - WebKit loses check when the name is after the checked attribute 1.4013 + // Support: Windows Web Apps (WWA) 1.4014 + // `name` and `type` need .setAttribute for WWA 1.4015 + input.setAttribute( "type", "radio" ); 1.4016 + input.setAttribute( "checked", "checked" ); 1.4017 + input.setAttribute( "name", "t" ); 1.4018 + 1.4019 + div.appendChild( input ); 1.4020 + 1.4021 + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 1.4022 + // old WebKit doesn't clone checked state correctly in fragments 1.4023 + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 1.4024 + 1.4025 + // Make sure textarea (and checkbox) defaultValue is properly cloned 1.4026 + // Support: IE9-IE11+ 1.4027 + div.innerHTML = "<textarea>x</textarea>"; 1.4028 + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 1.4029 +})(); 1.4030 +var strundefined = typeof undefined; 1.4031 + 1.4032 + 1.4033 + 1.4034 +support.focusinBubbles = "onfocusin" in window; 1.4035 + 1.4036 + 1.4037 +var 1.4038 + rkeyEvent = /^key/, 1.4039 + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, 1.4040 + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 1.4041 + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; 1.4042 + 1.4043 +function returnTrue() { 1.4044 + return true; 1.4045 +} 1.4046 + 1.4047 +function returnFalse() { 1.4048 + return false; 1.4049 +} 1.4050 + 1.4051 +function safeActiveElement() { 1.4052 + try { 1.4053 + return document.activeElement; 1.4054 + } catch ( err ) { } 1.4055 +} 1.4056 + 1.4057 +/* 1.4058 + * Helper functions for managing events -- not part of the public interface. 1.4059 + * Props to Dean Edwards' addEvent library for many of the ideas. 1.4060 + */ 1.4061 +jQuery.event = { 1.4062 + 1.4063 + global: {}, 1.4064 + 1.4065 + add: function( elem, types, handler, data, selector ) { 1.4066 + 1.4067 + var handleObjIn, eventHandle, tmp, 1.4068 + events, t, handleObj, 1.4069 + special, handlers, type, namespaces, origType, 1.4070 + elemData = data_priv.get( elem ); 1.4071 + 1.4072 + // Don't attach events to noData or text/comment nodes (but allow plain objects) 1.4073 + if ( !elemData ) { 1.4074 + return; 1.4075 + } 1.4076 + 1.4077 + // Caller can pass in an object of custom data in lieu of the handler 1.4078 + if ( handler.handler ) { 1.4079 + handleObjIn = handler; 1.4080 + handler = handleObjIn.handler; 1.4081 + selector = handleObjIn.selector; 1.4082 + } 1.4083 + 1.4084 + // Make sure that the handler has a unique ID, used to find/remove it later 1.4085 + if ( !handler.guid ) { 1.4086 + handler.guid = jQuery.guid++; 1.4087 + } 1.4088 + 1.4089 + // Init the element's event structure and main handler, if this is the first 1.4090 + if ( !(events = elemData.events) ) { 1.4091 + events = elemData.events = {}; 1.4092 + } 1.4093 + if ( !(eventHandle = elemData.handle) ) { 1.4094 + eventHandle = elemData.handle = function( e ) { 1.4095 + // Discard the second event of a jQuery.event.trigger() and 1.4096 + // when an event is called after a page has unloaded 1.4097 + return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? 1.4098 + jQuery.event.dispatch.apply( elem, arguments ) : undefined; 1.4099 + }; 1.4100 + } 1.4101 + 1.4102 + // Handle multiple events separated by a space 1.4103 + types = ( types || "" ).match( rnotwhite ) || [ "" ]; 1.4104 + t = types.length; 1.4105 + while ( t-- ) { 1.4106 + tmp = rtypenamespace.exec( types[t] ) || []; 1.4107 + type = origType = tmp[1]; 1.4108 + namespaces = ( tmp[2] || "" ).split( "." ).sort(); 1.4109 + 1.4110 + // There *must* be a type, no attaching namespace-only handlers 1.4111 + if ( !type ) { 1.4112 + continue; 1.4113 + } 1.4114 + 1.4115 + // If event changes its type, use the special event handlers for the changed type 1.4116 + special = jQuery.event.special[ type ] || {}; 1.4117 + 1.4118 + // If selector defined, determine special event api type, otherwise given type 1.4119 + type = ( selector ? special.delegateType : special.bindType ) || type; 1.4120 + 1.4121 + // Update special based on newly reset type 1.4122 + special = jQuery.event.special[ type ] || {}; 1.4123 + 1.4124 + // handleObj is passed to all event handlers 1.4125 + handleObj = jQuery.extend({ 1.4126 + type: type, 1.4127 + origType: origType, 1.4128 + data: data, 1.4129 + handler: handler, 1.4130 + guid: handler.guid, 1.4131 + selector: selector, 1.4132 + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 1.4133 + namespace: namespaces.join(".") 1.4134 + }, handleObjIn ); 1.4135 + 1.4136 + // Init the event handler queue if we're the first 1.4137 + if ( !(handlers = events[ type ]) ) { 1.4138 + handlers = events[ type ] = []; 1.4139 + handlers.delegateCount = 0; 1.4140 + 1.4141 + // Only use addEventListener if the special events handler returns false 1.4142 + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 1.4143 + if ( elem.addEventListener ) { 1.4144 + elem.addEventListener( type, eventHandle, false ); 1.4145 + } 1.4146 + } 1.4147 + } 1.4148 + 1.4149 + if ( special.add ) { 1.4150 + special.add.call( elem, handleObj ); 1.4151 + 1.4152 + if ( !handleObj.handler.guid ) { 1.4153 + handleObj.handler.guid = handler.guid; 1.4154 + } 1.4155 + } 1.4156 + 1.4157 + // Add to the element's handler list, delegates in front 1.4158 + if ( selector ) { 1.4159 + handlers.splice( handlers.delegateCount++, 0, handleObj ); 1.4160 + } else { 1.4161 + handlers.push( handleObj ); 1.4162 + } 1.4163 + 1.4164 + // Keep track of which events have ever been used, for event optimization 1.4165 + jQuery.event.global[ type ] = true; 1.4166 + } 1.4167 + 1.4168 + }, 1.4169 + 1.4170 + // Detach an event or set of events from an element 1.4171 + remove: function( elem, types, handler, selector, mappedTypes ) { 1.4172 + 1.4173 + var j, origCount, tmp, 1.4174 + events, t, handleObj, 1.4175 + special, handlers, type, namespaces, origType, 1.4176 + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); 1.4177 + 1.4178 + if ( !elemData || !(events = elemData.events) ) { 1.4179 + return; 1.4180 + } 1.4181 + 1.4182 + // Once for each type.namespace in types; type may be omitted 1.4183 + types = ( types || "" ).match( rnotwhite ) || [ "" ]; 1.4184 + t = types.length; 1.4185 + while ( t-- ) { 1.4186 + tmp = rtypenamespace.exec( types[t] ) || []; 1.4187 + type = origType = tmp[1]; 1.4188 + namespaces = ( tmp[2] || "" ).split( "." ).sort(); 1.4189 + 1.4190 + // Unbind all events (on this namespace, if provided) for the element 1.4191 + if ( !type ) { 1.4192 + for ( type in events ) { 1.4193 + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 1.4194 + } 1.4195 + continue; 1.4196 + } 1.4197 + 1.4198 + special = jQuery.event.special[ type ] || {}; 1.4199 + type = ( selector ? special.delegateType : special.bindType ) || type; 1.4200 + handlers = events[ type ] || []; 1.4201 + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); 1.4202 + 1.4203 + // Remove matching events 1.4204 + origCount = j = handlers.length; 1.4205 + while ( j-- ) { 1.4206 + handleObj = handlers[ j ]; 1.4207 + 1.4208 + if ( ( mappedTypes || origType === handleObj.origType ) && 1.4209 + ( !handler || handler.guid === handleObj.guid ) && 1.4210 + ( !tmp || tmp.test( handleObj.namespace ) ) && 1.4211 + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { 1.4212 + handlers.splice( j, 1 ); 1.4213 + 1.4214 + if ( handleObj.selector ) { 1.4215 + handlers.delegateCount--; 1.4216 + } 1.4217 + if ( special.remove ) { 1.4218 + special.remove.call( elem, handleObj ); 1.4219 + } 1.4220 + } 1.4221 + } 1.4222 + 1.4223 + // Remove generic event handler if we removed something and no more handlers exist 1.4224 + // (avoids potential for endless recursion during removal of special event handlers) 1.4225 + if ( origCount && !handlers.length ) { 1.4226 + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 1.4227 + jQuery.removeEvent( elem, type, elemData.handle ); 1.4228 + } 1.4229 + 1.4230 + delete events[ type ]; 1.4231 + } 1.4232 + } 1.4233 + 1.4234 + // Remove the expando if it's no longer used 1.4235 + if ( jQuery.isEmptyObject( events ) ) { 1.4236 + delete elemData.handle; 1.4237 + data_priv.remove( elem, "events" ); 1.4238 + } 1.4239 + }, 1.4240 + 1.4241 + trigger: function( event, data, elem, onlyHandlers ) { 1.4242 + 1.4243 + var i, cur, tmp, bubbleType, ontype, handle, special, 1.4244 + eventPath = [ elem || document ], 1.4245 + type = hasOwn.call( event, "type" ) ? event.type : event, 1.4246 + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; 1.4247 + 1.4248 + cur = tmp = elem = elem || document; 1.4249 + 1.4250 + // Don't do events on text and comment nodes 1.4251 + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 1.4252 + return; 1.4253 + } 1.4254 + 1.4255 + // focus/blur morphs to focusin/out; ensure we're not firing them right now 1.4256 + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 1.4257 + return; 1.4258 + } 1.4259 + 1.4260 + if ( type.indexOf(".") >= 0 ) { 1.4261 + // Namespaced trigger; create a regexp to match event type in handle() 1.4262 + namespaces = type.split("."); 1.4263 + type = namespaces.shift(); 1.4264 + namespaces.sort(); 1.4265 + } 1.4266 + ontype = type.indexOf(":") < 0 && "on" + type; 1.4267 + 1.4268 + // Caller can pass in a jQuery.Event object, Object, or just an event type string 1.4269 + event = event[ jQuery.expando ] ? 1.4270 + event : 1.4271 + new jQuery.Event( type, typeof event === "object" && event ); 1.4272 + 1.4273 + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 1.4274 + event.isTrigger = onlyHandlers ? 2 : 3; 1.4275 + event.namespace = namespaces.join("."); 1.4276 + event.namespace_re = event.namespace ? 1.4277 + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : 1.4278 + null; 1.4279 + 1.4280 + // Clean up the event in case it is being reused 1.4281 + event.result = undefined; 1.4282 + if ( !event.target ) { 1.4283 + event.target = elem; 1.4284 + } 1.4285 + 1.4286 + // Clone any incoming data and prepend the event, creating the handler arg list 1.4287 + data = data == null ? 1.4288 + [ event ] : 1.4289 + jQuery.makeArray( data, [ event ] ); 1.4290 + 1.4291 + // Allow special events to draw outside the lines 1.4292 + special = jQuery.event.special[ type ] || {}; 1.4293 + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 1.4294 + return; 1.4295 + } 1.4296 + 1.4297 + // Determine event propagation path in advance, per W3C events spec (#9951) 1.4298 + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 1.4299 + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { 1.4300 + 1.4301 + bubbleType = special.delegateType || type; 1.4302 + if ( !rfocusMorph.test( bubbleType + type ) ) { 1.4303 + cur = cur.parentNode; 1.4304 + } 1.4305 + for ( ; cur; cur = cur.parentNode ) { 1.4306 + eventPath.push( cur ); 1.4307 + tmp = cur; 1.4308 + } 1.4309 + 1.4310 + // Only add window if we got to document (e.g., not plain obj or detached DOM) 1.4311 + if ( tmp === (elem.ownerDocument || document) ) { 1.4312 + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 1.4313 + } 1.4314 + } 1.4315 + 1.4316 + // Fire handlers on the event path 1.4317 + i = 0; 1.4318 + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { 1.4319 + 1.4320 + event.type = i > 1 ? 1.4321 + bubbleType : 1.4322 + special.bindType || type; 1.4323 + 1.4324 + // jQuery handler 1.4325 + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); 1.4326 + if ( handle ) { 1.4327 + handle.apply( cur, data ); 1.4328 + } 1.4329 + 1.4330 + // Native handler 1.4331 + handle = ontype && cur[ ontype ]; 1.4332 + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { 1.4333 + event.result = handle.apply( cur, data ); 1.4334 + if ( event.result === false ) { 1.4335 + event.preventDefault(); 1.4336 + } 1.4337 + } 1.4338 + } 1.4339 + event.type = type; 1.4340 + 1.4341 + // If nobody prevented the default action, do it now 1.4342 + if ( !onlyHandlers && !event.isDefaultPrevented() ) { 1.4343 + 1.4344 + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && 1.4345 + jQuery.acceptData( elem ) ) { 1.4346 + 1.4347 + // Call a native DOM method on the target with the same name name as the event. 1.4348 + // Don't do default actions on window, that's where global variables be (#6170) 1.4349 + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { 1.4350 + 1.4351 + // Don't re-trigger an onFOO event when we call its FOO() method 1.4352 + tmp = elem[ ontype ]; 1.4353 + 1.4354 + if ( tmp ) { 1.4355 + elem[ ontype ] = null; 1.4356 + } 1.4357 + 1.4358 + // Prevent re-triggering of the same event, since we already bubbled it above 1.4359 + jQuery.event.triggered = type; 1.4360 + elem[ type ](); 1.4361 + jQuery.event.triggered = undefined; 1.4362 + 1.4363 + if ( tmp ) { 1.4364 + elem[ ontype ] = tmp; 1.4365 + } 1.4366 + } 1.4367 + } 1.4368 + } 1.4369 + 1.4370 + return event.result; 1.4371 + }, 1.4372 + 1.4373 + dispatch: function( event ) { 1.4374 + 1.4375 + // Make a writable jQuery.Event from the native event object 1.4376 + event = jQuery.event.fix( event ); 1.4377 + 1.4378 + var i, j, ret, matched, handleObj, 1.4379 + handlerQueue = [], 1.4380 + args = slice.call( arguments ), 1.4381 + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], 1.4382 + special = jQuery.event.special[ event.type ] || {}; 1.4383 + 1.4384 + // Use the fix-ed jQuery.Event rather than the (read-only) native event 1.4385 + args[0] = event; 1.4386 + event.delegateTarget = this; 1.4387 + 1.4388 + // Call the preDispatch hook for the mapped type, and let it bail if desired 1.4389 + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 1.4390 + return; 1.4391 + } 1.4392 + 1.4393 + // Determine handlers 1.4394 + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 1.4395 + 1.4396 + // Run delegates first; they may want to stop propagation beneath us 1.4397 + i = 0; 1.4398 + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { 1.4399 + event.currentTarget = matched.elem; 1.4400 + 1.4401 + j = 0; 1.4402 + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { 1.4403 + 1.4404 + // Triggered event must either 1) have no namespace, or 1.4405 + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). 1.4406 + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { 1.4407 + 1.4408 + event.handleObj = handleObj; 1.4409 + event.data = handleObj.data; 1.4410 + 1.4411 + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) 1.4412 + .apply( matched.elem, args ); 1.4413 + 1.4414 + if ( ret !== undefined ) { 1.4415 + if ( (event.result = ret) === false ) { 1.4416 + event.preventDefault(); 1.4417 + event.stopPropagation(); 1.4418 + } 1.4419 + } 1.4420 + } 1.4421 + } 1.4422 + } 1.4423 + 1.4424 + // Call the postDispatch hook for the mapped type 1.4425 + if ( special.postDispatch ) { 1.4426 + special.postDispatch.call( this, event ); 1.4427 + } 1.4428 + 1.4429 + return event.result; 1.4430 + }, 1.4431 + 1.4432 + handlers: function( event, handlers ) { 1.4433 + var i, matches, sel, handleObj, 1.4434 + handlerQueue = [], 1.4435 + delegateCount = handlers.delegateCount, 1.4436 + cur = event.target; 1.4437 + 1.4438 + // Find delegate handlers 1.4439 + // Black-hole SVG <use> instance trees (#13180) 1.4440 + // Avoid non-left-click bubbling in Firefox (#3861) 1.4441 + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { 1.4442 + 1.4443 + for ( ; cur !== this; cur = cur.parentNode || this ) { 1.4444 + 1.4445 + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 1.4446 + if ( cur.disabled !== true || event.type !== "click" ) { 1.4447 + matches = []; 1.4448 + for ( i = 0; i < delegateCount; i++ ) { 1.4449 + handleObj = handlers[ i ]; 1.4450 + 1.4451 + // Don't conflict with Object.prototype properties (#13203) 1.4452 + sel = handleObj.selector + " "; 1.4453 + 1.4454 + if ( matches[ sel ] === undefined ) { 1.4455 + matches[ sel ] = handleObj.needsContext ? 1.4456 + jQuery( sel, this ).index( cur ) >= 0 : 1.4457 + jQuery.find( sel, this, null, [ cur ] ).length; 1.4458 + } 1.4459 + if ( matches[ sel ] ) { 1.4460 + matches.push( handleObj ); 1.4461 + } 1.4462 + } 1.4463 + if ( matches.length ) { 1.4464 + handlerQueue.push({ elem: cur, handlers: matches }); 1.4465 + } 1.4466 + } 1.4467 + } 1.4468 + } 1.4469 + 1.4470 + // Add the remaining (directly-bound) handlers 1.4471 + if ( delegateCount < handlers.length ) { 1.4472 + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); 1.4473 + } 1.4474 + 1.4475 + return handlerQueue; 1.4476 + }, 1.4477 + 1.4478 + // Includes some event props shared by KeyEvent and MouseEvent 1.4479 + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), 1.4480 + 1.4481 + fixHooks: {}, 1.4482 + 1.4483 + keyHooks: { 1.4484 + props: "char charCode key keyCode".split(" "), 1.4485 + filter: function( event, original ) { 1.4486 + 1.4487 + // Add which for key events 1.4488 + if ( event.which == null ) { 1.4489 + event.which = original.charCode != null ? original.charCode : original.keyCode; 1.4490 + } 1.4491 + 1.4492 + return event; 1.4493 + } 1.4494 + }, 1.4495 + 1.4496 + mouseHooks: { 1.4497 + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), 1.4498 + filter: function( event, original ) { 1.4499 + var eventDoc, doc, body, 1.4500 + button = original.button; 1.4501 + 1.4502 + // Calculate pageX/Y if missing and clientX/Y available 1.4503 + if ( event.pageX == null && original.clientX != null ) { 1.4504 + eventDoc = event.target.ownerDocument || document; 1.4505 + doc = eventDoc.documentElement; 1.4506 + body = eventDoc.body; 1.4507 + 1.4508 + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); 1.4509 + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); 1.4510 + } 1.4511 + 1.4512 + // Add which for click: 1 === left; 2 === middle; 3 === right 1.4513 + // Note: button is not normalized, so don't use it 1.4514 + if ( !event.which && button !== undefined ) { 1.4515 + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); 1.4516 + } 1.4517 + 1.4518 + return event; 1.4519 + } 1.4520 + }, 1.4521 + 1.4522 + fix: function( event ) { 1.4523 + if ( event[ jQuery.expando ] ) { 1.4524 + return event; 1.4525 + } 1.4526 + 1.4527 + // Create a writable copy of the event object and normalize some properties 1.4528 + var i, prop, copy, 1.4529 + type = event.type, 1.4530 + originalEvent = event, 1.4531 + fixHook = this.fixHooks[ type ]; 1.4532 + 1.4533 + if ( !fixHook ) { 1.4534 + this.fixHooks[ type ] = fixHook = 1.4535 + rmouseEvent.test( type ) ? this.mouseHooks : 1.4536 + rkeyEvent.test( type ) ? this.keyHooks : 1.4537 + {}; 1.4538 + } 1.4539 + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; 1.4540 + 1.4541 + event = new jQuery.Event( originalEvent ); 1.4542 + 1.4543 + i = copy.length; 1.4544 + while ( i-- ) { 1.4545 + prop = copy[ i ]; 1.4546 + event[ prop ] = originalEvent[ prop ]; 1.4547 + } 1.4548 + 1.4549 + // Support: Cordova 2.5 (WebKit) (#13255) 1.4550 + // All events should have a target; Cordova deviceready doesn't 1.4551 + if ( !event.target ) { 1.4552 + event.target = document; 1.4553 + } 1.4554 + 1.4555 + // Support: Safari 6.0+, Chrome < 28 1.4556 + // Target should not be a text node (#504, #13143) 1.4557 + if ( event.target.nodeType === 3 ) { 1.4558 + event.target = event.target.parentNode; 1.4559 + } 1.4560 + 1.4561 + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; 1.4562 + }, 1.4563 + 1.4564 + special: { 1.4565 + load: { 1.4566 + // Prevent triggered image.load events from bubbling to window.load 1.4567 + noBubble: true 1.4568 + }, 1.4569 + focus: { 1.4570 + // Fire native event if possible so blur/focus sequence is correct 1.4571 + trigger: function() { 1.4572 + if ( this !== safeActiveElement() && this.focus ) { 1.4573 + this.focus(); 1.4574 + return false; 1.4575 + } 1.4576 + }, 1.4577 + delegateType: "focusin" 1.4578 + }, 1.4579 + blur: { 1.4580 + trigger: function() { 1.4581 + if ( this === safeActiveElement() && this.blur ) { 1.4582 + this.blur(); 1.4583 + return false; 1.4584 + } 1.4585 + }, 1.4586 + delegateType: "focusout" 1.4587 + }, 1.4588 + click: { 1.4589 + // For checkbox, fire native event so checked state will be right 1.4590 + trigger: function() { 1.4591 + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { 1.4592 + this.click(); 1.4593 + return false; 1.4594 + } 1.4595 + }, 1.4596 + 1.4597 + // For cross-browser consistency, don't fire native .click() on links 1.4598 + _default: function( event ) { 1.4599 + return jQuery.nodeName( event.target, "a" ); 1.4600 + } 1.4601 + }, 1.4602 + 1.4603 + beforeunload: { 1.4604 + postDispatch: function( event ) { 1.4605 + 1.4606 + // Support: Firefox 20+ 1.4607 + // Firefox doesn't alert if the returnValue field is not set. 1.4608 + if ( event.result !== undefined && event.originalEvent ) { 1.4609 + event.originalEvent.returnValue = event.result; 1.4610 + } 1.4611 + } 1.4612 + } 1.4613 + }, 1.4614 + 1.4615 + simulate: function( type, elem, event, bubble ) { 1.4616 + // Piggyback on a donor event to simulate a different one. 1.4617 + // Fake originalEvent to avoid donor's stopPropagation, but if the 1.4618 + // simulated event prevents default then we do the same on the donor. 1.4619 + var e = jQuery.extend( 1.4620 + new jQuery.Event(), 1.4621 + event, 1.4622 + { 1.4623 + type: type, 1.4624 + isSimulated: true, 1.4625 + originalEvent: {} 1.4626 + } 1.4627 + ); 1.4628 + if ( bubble ) { 1.4629 + jQuery.event.trigger( e, null, elem ); 1.4630 + } else { 1.4631 + jQuery.event.dispatch.call( elem, e ); 1.4632 + } 1.4633 + if ( e.isDefaultPrevented() ) { 1.4634 + event.preventDefault(); 1.4635 + } 1.4636 + } 1.4637 +}; 1.4638 + 1.4639 +jQuery.removeEvent = function( elem, type, handle ) { 1.4640 + if ( elem.removeEventListener ) { 1.4641 + elem.removeEventListener( type, handle, false ); 1.4642 + } 1.4643 +}; 1.4644 + 1.4645 +jQuery.Event = function( src, props ) { 1.4646 + // Allow instantiation without the 'new' keyword 1.4647 + if ( !(this instanceof jQuery.Event) ) { 1.4648 + return new jQuery.Event( src, props ); 1.4649 + } 1.4650 + 1.4651 + // Event object 1.4652 + if ( src && src.type ) { 1.4653 + this.originalEvent = src; 1.4654 + this.type = src.type; 1.4655 + 1.4656 + // Events bubbling up the document may have been marked as prevented 1.4657 + // by a handler lower down the tree; reflect the correct value. 1.4658 + this.isDefaultPrevented = src.defaultPrevented || 1.4659 + src.defaultPrevented === undefined && 1.4660 + // Support: Android < 4.0 1.4661 + src.returnValue === false ? 1.4662 + returnTrue : 1.4663 + returnFalse; 1.4664 + 1.4665 + // Event type 1.4666 + } else { 1.4667 + this.type = src; 1.4668 + } 1.4669 + 1.4670 + // Put explicitly provided properties onto the event object 1.4671 + if ( props ) { 1.4672 + jQuery.extend( this, props ); 1.4673 + } 1.4674 + 1.4675 + // Create a timestamp if incoming event doesn't have one 1.4676 + this.timeStamp = src && src.timeStamp || jQuery.now(); 1.4677 + 1.4678 + // Mark it as fixed 1.4679 + this[ jQuery.expando ] = true; 1.4680 +}; 1.4681 + 1.4682 +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 1.4683 +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 1.4684 +jQuery.Event.prototype = { 1.4685 + isDefaultPrevented: returnFalse, 1.4686 + isPropagationStopped: returnFalse, 1.4687 + isImmediatePropagationStopped: returnFalse, 1.4688 + 1.4689 + preventDefault: function() { 1.4690 + var e = this.originalEvent; 1.4691 + 1.4692 + this.isDefaultPrevented = returnTrue; 1.4693 + 1.4694 + if ( e && e.preventDefault ) { 1.4695 + e.preventDefault(); 1.4696 + } 1.4697 + }, 1.4698 + stopPropagation: function() { 1.4699 + var e = this.originalEvent; 1.4700 + 1.4701 + this.isPropagationStopped = returnTrue; 1.4702 + 1.4703 + if ( e && e.stopPropagation ) { 1.4704 + e.stopPropagation(); 1.4705 + } 1.4706 + }, 1.4707 + stopImmediatePropagation: function() { 1.4708 + var e = this.originalEvent; 1.4709 + 1.4710 + this.isImmediatePropagationStopped = returnTrue; 1.4711 + 1.4712 + if ( e && e.stopImmediatePropagation ) { 1.4713 + e.stopImmediatePropagation(); 1.4714 + } 1.4715 + 1.4716 + this.stopPropagation(); 1.4717 + } 1.4718 +}; 1.4719 + 1.4720 +// Create mouseenter/leave events using mouseover/out and event-time checks 1.4721 +// Support: Chrome 15+ 1.4722 +jQuery.each({ 1.4723 + mouseenter: "mouseover", 1.4724 + mouseleave: "mouseout", 1.4725 + pointerenter: "pointerover", 1.4726 + pointerleave: "pointerout" 1.4727 +}, function( orig, fix ) { 1.4728 + jQuery.event.special[ orig ] = { 1.4729 + delegateType: fix, 1.4730 + bindType: fix, 1.4731 + 1.4732 + handle: function( event ) { 1.4733 + var ret, 1.4734 + target = this, 1.4735 + related = event.relatedTarget, 1.4736 + handleObj = event.handleObj; 1.4737 + 1.4738 + // For mousenter/leave call the handler if related is outside the target. 1.4739 + // NB: No relatedTarget if the mouse left/entered the browser window 1.4740 + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { 1.4741 + event.type = handleObj.origType; 1.4742 + ret = handleObj.handler.apply( this, arguments ); 1.4743 + event.type = fix; 1.4744 + } 1.4745 + return ret; 1.4746 + } 1.4747 + }; 1.4748 +}); 1.4749 + 1.4750 +// Create "bubbling" focus and blur events 1.4751 +// Support: Firefox, Chrome, Safari 1.4752 +if ( !support.focusinBubbles ) { 1.4753 + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { 1.4754 + 1.4755 + // Attach a single capturing handler on the document while someone wants focusin/focusout 1.4756 + var handler = function( event ) { 1.4757 + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); 1.4758 + }; 1.4759 + 1.4760 + jQuery.event.special[ fix ] = { 1.4761 + setup: function() { 1.4762 + var doc = this.ownerDocument || this, 1.4763 + attaches = data_priv.access( doc, fix ); 1.4764 + 1.4765 + if ( !attaches ) { 1.4766 + doc.addEventListener( orig, handler, true ); 1.4767 + } 1.4768 + data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); 1.4769 + }, 1.4770 + teardown: function() { 1.4771 + var doc = this.ownerDocument || this, 1.4772 + attaches = data_priv.access( doc, fix ) - 1; 1.4773 + 1.4774 + if ( !attaches ) { 1.4775 + doc.removeEventListener( orig, handler, true ); 1.4776 + data_priv.remove( doc, fix ); 1.4777 + 1.4778 + } else { 1.4779 + data_priv.access( doc, fix, attaches ); 1.4780 + } 1.4781 + } 1.4782 + }; 1.4783 + }); 1.4784 +} 1.4785 + 1.4786 +jQuery.fn.extend({ 1.4787 + 1.4788 + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { 1.4789 + var origFn, type; 1.4790 + 1.4791 + // Types can be a map of types/handlers 1.4792 + if ( typeof types === "object" ) { 1.4793 + // ( types-Object, selector, data ) 1.4794 + if ( typeof selector !== "string" ) { 1.4795 + // ( types-Object, data ) 1.4796 + data = data || selector; 1.4797 + selector = undefined; 1.4798 + } 1.4799 + for ( type in types ) { 1.4800 + this.on( type, selector, data, types[ type ], one ); 1.4801 + } 1.4802 + return this; 1.4803 + } 1.4804 + 1.4805 + if ( data == null && fn == null ) { 1.4806 + // ( types, fn ) 1.4807 + fn = selector; 1.4808 + data = selector = undefined; 1.4809 + } else if ( fn == null ) { 1.4810 + if ( typeof selector === "string" ) { 1.4811 + // ( types, selector, fn ) 1.4812 + fn = data; 1.4813 + data = undefined; 1.4814 + } else { 1.4815 + // ( types, data, fn ) 1.4816 + fn = data; 1.4817 + data = selector; 1.4818 + selector = undefined; 1.4819 + } 1.4820 + } 1.4821 + if ( fn === false ) { 1.4822 + fn = returnFalse; 1.4823 + } else if ( !fn ) { 1.4824 + return this; 1.4825 + } 1.4826 + 1.4827 + if ( one === 1 ) { 1.4828 + origFn = fn; 1.4829 + fn = function( event ) { 1.4830 + // Can use an empty set, since event contains the info 1.4831 + jQuery().off( event ); 1.4832 + return origFn.apply( this, arguments ); 1.4833 + }; 1.4834 + // Use same guid so caller can remove using origFn 1.4835 + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 1.4836 + } 1.4837 + return this.each( function() { 1.4838 + jQuery.event.add( this, types, fn, data, selector ); 1.4839 + }); 1.4840 + }, 1.4841 + one: function( types, selector, data, fn ) { 1.4842 + return this.on( types, selector, data, fn, 1 ); 1.4843 + }, 1.4844 + off: function( types, selector, fn ) { 1.4845 + var handleObj, type; 1.4846 + if ( types && types.preventDefault && types.handleObj ) { 1.4847 + // ( event ) dispatched jQuery.Event 1.4848 + handleObj = types.handleObj; 1.4849 + jQuery( types.delegateTarget ).off( 1.4850 + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, 1.4851 + handleObj.selector, 1.4852 + handleObj.handler 1.4853 + ); 1.4854 + return this; 1.4855 + } 1.4856 + if ( typeof types === "object" ) { 1.4857 + // ( types-object [, selector] ) 1.4858 + for ( type in types ) { 1.4859 + this.off( type, selector, types[ type ] ); 1.4860 + } 1.4861 + return this; 1.4862 + } 1.4863 + if ( selector === false || typeof selector === "function" ) { 1.4864 + // ( types [, fn] ) 1.4865 + fn = selector; 1.4866 + selector = undefined; 1.4867 + } 1.4868 + if ( fn === false ) { 1.4869 + fn = returnFalse; 1.4870 + } 1.4871 + return this.each(function() { 1.4872 + jQuery.event.remove( this, types, fn, selector ); 1.4873 + }); 1.4874 + }, 1.4875 + 1.4876 + trigger: function( type, data ) { 1.4877 + return this.each(function() { 1.4878 + jQuery.event.trigger( type, data, this ); 1.4879 + }); 1.4880 + }, 1.4881 + triggerHandler: function( type, data ) { 1.4882 + var elem = this[0]; 1.4883 + if ( elem ) { 1.4884 + return jQuery.event.trigger( type, data, elem, true ); 1.4885 + } 1.4886 + } 1.4887 +}); 1.4888 + 1.4889 + 1.4890 +var 1.4891 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, 1.4892 + rtagName = /<([\w:]+)/, 1.4893 + rhtml = /<|&#?\w+;/, 1.4894 + rnoInnerhtml = /<(?:script|style|link)/i, 1.4895 + // checked="checked" or checked 1.4896 + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 1.4897 + rscriptType = /^$|\/(?:java|ecma)script/i, 1.4898 + rscriptTypeMasked = /^true\/(.*)/, 1.4899 + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, 1.4900 + 1.4901 + // We have to close these tags to support XHTML (#13200) 1.4902 + wrapMap = { 1.4903 + 1.4904 + // Support: IE 9 1.4905 + option: [ 1, "<select multiple='multiple'>", "</select>" ], 1.4906 + 1.4907 + thead: [ 1, "<table>", "</table>" ], 1.4908 + col: [ 2, "<table><colgroup>", "</colgroup></table>" ], 1.4909 + tr: [ 2, "<table><tbody>", "</tbody></table>" ], 1.4910 + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 1.4911 + 1.4912 + _default: [ 0, "", "" ] 1.4913 + }; 1.4914 + 1.4915 +// Support: IE 9 1.4916 +wrapMap.optgroup = wrapMap.option; 1.4917 + 1.4918 +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 1.4919 +wrapMap.th = wrapMap.td; 1.4920 + 1.4921 +// Support: 1.x compatibility 1.4922 +// Manipulating tables requires a tbody 1.4923 +function manipulationTarget( elem, content ) { 1.4924 + return jQuery.nodeName( elem, "table" ) && 1.4925 + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? 1.4926 + 1.4927 + elem.getElementsByTagName("tbody")[0] || 1.4928 + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : 1.4929 + elem; 1.4930 +} 1.4931 + 1.4932 +// Replace/restore the type attribute of script elements for safe DOM manipulation 1.4933 +function disableScript( elem ) { 1.4934 + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; 1.4935 + return elem; 1.4936 +} 1.4937 +function restoreScript( elem ) { 1.4938 + var match = rscriptTypeMasked.exec( elem.type ); 1.4939 + 1.4940 + if ( match ) { 1.4941 + elem.type = match[ 1 ]; 1.4942 + } else { 1.4943 + elem.removeAttribute("type"); 1.4944 + } 1.4945 + 1.4946 + return elem; 1.4947 +} 1.4948 + 1.4949 +// Mark scripts as having already been evaluated 1.4950 +function setGlobalEval( elems, refElements ) { 1.4951 + var i = 0, 1.4952 + l = elems.length; 1.4953 + 1.4954 + for ( ; i < l; i++ ) { 1.4955 + data_priv.set( 1.4956 + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) 1.4957 + ); 1.4958 + } 1.4959 +} 1.4960 + 1.4961 +function cloneCopyEvent( src, dest ) { 1.4962 + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; 1.4963 + 1.4964 + if ( dest.nodeType !== 1 ) { 1.4965 + return; 1.4966 + } 1.4967 + 1.4968 + // 1. Copy private data: events, handlers, etc. 1.4969 + if ( data_priv.hasData( src ) ) { 1.4970 + pdataOld = data_priv.access( src ); 1.4971 + pdataCur = data_priv.set( dest, pdataOld ); 1.4972 + events = pdataOld.events; 1.4973 + 1.4974 + if ( events ) { 1.4975 + delete pdataCur.handle; 1.4976 + pdataCur.events = {}; 1.4977 + 1.4978 + for ( type in events ) { 1.4979 + for ( i = 0, l = events[ type ].length; i < l; i++ ) { 1.4980 + jQuery.event.add( dest, type, events[ type ][ i ] ); 1.4981 + } 1.4982 + } 1.4983 + } 1.4984 + } 1.4985 + 1.4986 + // 2. Copy user data 1.4987 + if ( data_user.hasData( src ) ) { 1.4988 + udataOld = data_user.access( src ); 1.4989 + udataCur = jQuery.extend( {}, udataOld ); 1.4990 + 1.4991 + data_user.set( dest, udataCur ); 1.4992 + } 1.4993 +} 1.4994 + 1.4995 +function getAll( context, tag ) { 1.4996 + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : 1.4997 + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : 1.4998 + []; 1.4999 + 1.5000 + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? 1.5001 + jQuery.merge( [ context ], ret ) : 1.5002 + ret; 1.5003 +} 1.5004 + 1.5005 +// Support: IE >= 9 1.5006 +function fixInput( src, dest ) { 1.5007 + var nodeName = dest.nodeName.toLowerCase(); 1.5008 + 1.5009 + // Fails to persist the checked state of a cloned checkbox or radio button. 1.5010 + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 1.5011 + dest.checked = src.checked; 1.5012 + 1.5013 + // Fails to return the selected option to the default selected state when cloning options 1.5014 + } else if ( nodeName === "input" || nodeName === "textarea" ) { 1.5015 + dest.defaultValue = src.defaultValue; 1.5016 + } 1.5017 +} 1.5018 + 1.5019 +jQuery.extend({ 1.5020 + clone: function( elem, dataAndEvents, deepDataAndEvents ) { 1.5021 + var i, l, srcElements, destElements, 1.5022 + clone = elem.cloneNode( true ), 1.5023 + inPage = jQuery.contains( elem.ownerDocument, elem ); 1.5024 + 1.5025 + // Support: IE >= 9 1.5026 + // Fix Cloning issues 1.5027 + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && 1.5028 + !jQuery.isXMLDoc( elem ) ) { 1.5029 + 1.5030 + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 1.5031 + destElements = getAll( clone ); 1.5032 + srcElements = getAll( elem ); 1.5033 + 1.5034 + for ( i = 0, l = srcElements.length; i < l; i++ ) { 1.5035 + fixInput( srcElements[ i ], destElements[ i ] ); 1.5036 + } 1.5037 + } 1.5038 + 1.5039 + // Copy the events from the original to the clone 1.5040 + if ( dataAndEvents ) { 1.5041 + if ( deepDataAndEvents ) { 1.5042 + srcElements = srcElements || getAll( elem ); 1.5043 + destElements = destElements || getAll( clone ); 1.5044 + 1.5045 + for ( i = 0, l = srcElements.length; i < l; i++ ) { 1.5046 + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); 1.5047 + } 1.5048 + } else { 1.5049 + cloneCopyEvent( elem, clone ); 1.5050 + } 1.5051 + } 1.5052 + 1.5053 + // Preserve script evaluation history 1.5054 + destElements = getAll( clone, "script" ); 1.5055 + if ( destElements.length > 0 ) { 1.5056 + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 1.5057 + } 1.5058 + 1.5059 + // Return the cloned set 1.5060 + return clone; 1.5061 + }, 1.5062 + 1.5063 + buildFragment: function( elems, context, scripts, selection ) { 1.5064 + var elem, tmp, tag, wrap, contains, j, 1.5065 + fragment = context.createDocumentFragment(), 1.5066 + nodes = [], 1.5067 + i = 0, 1.5068 + l = elems.length; 1.5069 + 1.5070 + for ( ; i < l; i++ ) { 1.5071 + elem = elems[ i ]; 1.5072 + 1.5073 + if ( elem || elem === 0 ) { 1.5074 + 1.5075 + // Add nodes directly 1.5076 + if ( jQuery.type( elem ) === "object" ) { 1.5077 + // Support: QtWebKit 1.5078 + // jQuery.merge because push.apply(_, arraylike) throws 1.5079 + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 1.5080 + 1.5081 + // Convert non-html into a text node 1.5082 + } else if ( !rhtml.test( elem ) ) { 1.5083 + nodes.push( context.createTextNode( elem ) ); 1.5084 + 1.5085 + // Convert html into DOM nodes 1.5086 + } else { 1.5087 + tmp = tmp || fragment.appendChild( context.createElement("div") ); 1.5088 + 1.5089 + // Deserialize a standard representation 1.5090 + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 1.5091 + wrap = wrapMap[ tag ] || wrapMap._default; 1.5092 + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ]; 1.5093 + 1.5094 + // Descend through wrappers to the right content 1.5095 + j = wrap[ 0 ]; 1.5096 + while ( j-- ) { 1.5097 + tmp = tmp.lastChild; 1.5098 + } 1.5099 + 1.5100 + // Support: QtWebKit 1.5101 + // jQuery.merge because push.apply(_, arraylike) throws 1.5102 + jQuery.merge( nodes, tmp.childNodes ); 1.5103 + 1.5104 + // Remember the top-level container 1.5105 + tmp = fragment.firstChild; 1.5106 + 1.5107 + // Fixes #12346 1.5108 + // Support: Webkit, IE 1.5109 + tmp.textContent = ""; 1.5110 + } 1.5111 + } 1.5112 + } 1.5113 + 1.5114 + // Remove wrapper from fragment 1.5115 + fragment.textContent = ""; 1.5116 + 1.5117 + i = 0; 1.5118 + while ( (elem = nodes[ i++ ]) ) { 1.5119 + 1.5120 + // #4087 - If origin and destination elements are the same, and this is 1.5121 + // that element, do not do anything 1.5122 + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { 1.5123 + continue; 1.5124 + } 1.5125 + 1.5126 + contains = jQuery.contains( elem.ownerDocument, elem ); 1.5127 + 1.5128 + // Append to fragment 1.5129 + tmp = getAll( fragment.appendChild( elem ), "script" ); 1.5130 + 1.5131 + // Preserve script evaluation history 1.5132 + if ( contains ) { 1.5133 + setGlobalEval( tmp ); 1.5134 + } 1.5135 + 1.5136 + // Capture executables 1.5137 + if ( scripts ) { 1.5138 + j = 0; 1.5139 + while ( (elem = tmp[ j++ ]) ) { 1.5140 + if ( rscriptType.test( elem.type || "" ) ) { 1.5141 + scripts.push( elem ); 1.5142 + } 1.5143 + } 1.5144 + } 1.5145 + } 1.5146 + 1.5147 + return fragment; 1.5148 + }, 1.5149 + 1.5150 + cleanData: function( elems ) { 1.5151 + var data, elem, type, key, 1.5152 + special = jQuery.event.special, 1.5153 + i = 0; 1.5154 + 1.5155 + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { 1.5156 + if ( jQuery.acceptData( elem ) ) { 1.5157 + key = elem[ data_priv.expando ]; 1.5158 + 1.5159 + if ( key && (data = data_priv.cache[ key ]) ) { 1.5160 + if ( data.events ) { 1.5161 + for ( type in data.events ) { 1.5162 + if ( special[ type ] ) { 1.5163 + jQuery.event.remove( elem, type ); 1.5164 + 1.5165 + // This is a shortcut to avoid jQuery.event.remove's overhead 1.5166 + } else { 1.5167 + jQuery.removeEvent( elem, type, data.handle ); 1.5168 + } 1.5169 + } 1.5170 + } 1.5171 + if ( data_priv.cache[ key ] ) { 1.5172 + // Discard any remaining `private` data 1.5173 + delete data_priv.cache[ key ]; 1.5174 + } 1.5175 + } 1.5176 + } 1.5177 + // Discard any remaining `user` data 1.5178 + delete data_user.cache[ elem[ data_user.expando ] ]; 1.5179 + } 1.5180 + } 1.5181 +}); 1.5182 + 1.5183 +jQuery.fn.extend({ 1.5184 + text: function( value ) { 1.5185 + return access( this, function( value ) { 1.5186 + return value === undefined ? 1.5187 + jQuery.text( this ) : 1.5188 + this.empty().each(function() { 1.5189 + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 1.5190 + this.textContent = value; 1.5191 + } 1.5192 + }); 1.5193 + }, null, value, arguments.length ); 1.5194 + }, 1.5195 + 1.5196 + append: function() { 1.5197 + return this.domManip( arguments, function( elem ) { 1.5198 + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 1.5199 + var target = manipulationTarget( this, elem ); 1.5200 + target.appendChild( elem ); 1.5201 + } 1.5202 + }); 1.5203 + }, 1.5204 + 1.5205 + prepend: function() { 1.5206 + return this.domManip( arguments, function( elem ) { 1.5207 + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 1.5208 + var target = manipulationTarget( this, elem ); 1.5209 + target.insertBefore( elem, target.firstChild ); 1.5210 + } 1.5211 + }); 1.5212 + }, 1.5213 + 1.5214 + before: function() { 1.5215 + return this.domManip( arguments, function( elem ) { 1.5216 + if ( this.parentNode ) { 1.5217 + this.parentNode.insertBefore( elem, this ); 1.5218 + } 1.5219 + }); 1.5220 + }, 1.5221 + 1.5222 + after: function() { 1.5223 + return this.domManip( arguments, function( elem ) { 1.5224 + if ( this.parentNode ) { 1.5225 + this.parentNode.insertBefore( elem, this.nextSibling ); 1.5226 + } 1.5227 + }); 1.5228 + }, 1.5229 + 1.5230 + remove: function( selector, keepData /* Internal Use Only */ ) { 1.5231 + var elem, 1.5232 + elems = selector ? jQuery.filter( selector, this ) : this, 1.5233 + i = 0; 1.5234 + 1.5235 + for ( ; (elem = elems[i]) != null; i++ ) { 1.5236 + if ( !keepData && elem.nodeType === 1 ) { 1.5237 + jQuery.cleanData( getAll( elem ) ); 1.5238 + } 1.5239 + 1.5240 + if ( elem.parentNode ) { 1.5241 + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { 1.5242 + setGlobalEval( getAll( elem, "script" ) ); 1.5243 + } 1.5244 + elem.parentNode.removeChild( elem ); 1.5245 + } 1.5246 + } 1.5247 + 1.5248 + return this; 1.5249 + }, 1.5250 + 1.5251 + empty: function() { 1.5252 + var elem, 1.5253 + i = 0; 1.5254 + 1.5255 + for ( ; (elem = this[i]) != null; i++ ) { 1.5256 + if ( elem.nodeType === 1 ) { 1.5257 + 1.5258 + // Prevent memory leaks 1.5259 + jQuery.cleanData( getAll( elem, false ) ); 1.5260 + 1.5261 + // Remove any remaining nodes 1.5262 + elem.textContent = ""; 1.5263 + } 1.5264 + } 1.5265 + 1.5266 + return this; 1.5267 + }, 1.5268 + 1.5269 + clone: function( dataAndEvents, deepDataAndEvents ) { 1.5270 + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 1.5271 + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 1.5272 + 1.5273 + return this.map(function() { 1.5274 + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 1.5275 + }); 1.5276 + }, 1.5277 + 1.5278 + html: function( value ) { 1.5279 + return access( this, function( value ) { 1.5280 + var elem = this[ 0 ] || {}, 1.5281 + i = 0, 1.5282 + l = this.length; 1.5283 + 1.5284 + if ( value === undefined && elem.nodeType === 1 ) { 1.5285 + return elem.innerHTML; 1.5286 + } 1.5287 + 1.5288 + // See if we can take a shortcut and just use innerHTML 1.5289 + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 1.5290 + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 1.5291 + 1.5292 + value = value.replace( rxhtmlTag, "<$1></$2>" ); 1.5293 + 1.5294 + try { 1.5295 + for ( ; i < l; i++ ) { 1.5296 + elem = this[ i ] || {}; 1.5297 + 1.5298 + // Remove element nodes and prevent memory leaks 1.5299 + if ( elem.nodeType === 1 ) { 1.5300 + jQuery.cleanData( getAll( elem, false ) ); 1.5301 + elem.innerHTML = value; 1.5302 + } 1.5303 + } 1.5304 + 1.5305 + elem = 0; 1.5306 + 1.5307 + // If using innerHTML throws an exception, use the fallback method 1.5308 + } catch( e ) {} 1.5309 + } 1.5310 + 1.5311 + if ( elem ) { 1.5312 + this.empty().append( value ); 1.5313 + } 1.5314 + }, null, value, arguments.length ); 1.5315 + }, 1.5316 + 1.5317 + replaceWith: function() { 1.5318 + var arg = arguments[ 0 ]; 1.5319 + 1.5320 + // Make the changes, replacing each context element with the new content 1.5321 + this.domManip( arguments, function( elem ) { 1.5322 + arg = this.parentNode; 1.5323 + 1.5324 + jQuery.cleanData( getAll( this ) ); 1.5325 + 1.5326 + if ( arg ) { 1.5327 + arg.replaceChild( elem, this ); 1.5328 + } 1.5329 + }); 1.5330 + 1.5331 + // Force removal if there was no new content (e.g., from empty arguments) 1.5332 + return arg && (arg.length || arg.nodeType) ? this : this.remove(); 1.5333 + }, 1.5334 + 1.5335 + detach: function( selector ) { 1.5336 + return this.remove( selector, true ); 1.5337 + }, 1.5338 + 1.5339 + domManip: function( args, callback ) { 1.5340 + 1.5341 + // Flatten any nested arrays 1.5342 + args = concat.apply( [], args ); 1.5343 + 1.5344 + var fragment, first, scripts, hasScripts, node, doc, 1.5345 + i = 0, 1.5346 + l = this.length, 1.5347 + set = this, 1.5348 + iNoClone = l - 1, 1.5349 + value = args[ 0 ], 1.5350 + isFunction = jQuery.isFunction( value ); 1.5351 + 1.5352 + // We can't cloneNode fragments that contain checked, in WebKit 1.5353 + if ( isFunction || 1.5354 + ( l > 1 && typeof value === "string" && 1.5355 + !support.checkClone && rchecked.test( value ) ) ) { 1.5356 + return this.each(function( index ) { 1.5357 + var self = set.eq( index ); 1.5358 + if ( isFunction ) { 1.5359 + args[ 0 ] = value.call( this, index, self.html() ); 1.5360 + } 1.5361 + self.domManip( args, callback ); 1.5362 + }); 1.5363 + } 1.5364 + 1.5365 + if ( l ) { 1.5366 + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); 1.5367 + first = fragment.firstChild; 1.5368 + 1.5369 + if ( fragment.childNodes.length === 1 ) { 1.5370 + fragment = first; 1.5371 + } 1.5372 + 1.5373 + if ( first ) { 1.5374 + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 1.5375 + hasScripts = scripts.length; 1.5376 + 1.5377 + // Use the original fragment for the last item instead of the first because it can end up 1.5378 + // being emptied incorrectly in certain situations (#8070). 1.5379 + for ( ; i < l; i++ ) { 1.5380 + node = fragment; 1.5381 + 1.5382 + if ( i !== iNoClone ) { 1.5383 + node = jQuery.clone( node, true, true ); 1.5384 + 1.5385 + // Keep references to cloned scripts for later restoration 1.5386 + if ( hasScripts ) { 1.5387 + // Support: QtWebKit 1.5388 + // jQuery.merge because push.apply(_, arraylike) throws 1.5389 + jQuery.merge( scripts, getAll( node, "script" ) ); 1.5390 + } 1.5391 + } 1.5392 + 1.5393 + callback.call( this[ i ], node, i ); 1.5394 + } 1.5395 + 1.5396 + if ( hasScripts ) { 1.5397 + doc = scripts[ scripts.length - 1 ].ownerDocument; 1.5398 + 1.5399 + // Reenable scripts 1.5400 + jQuery.map( scripts, restoreScript ); 1.5401 + 1.5402 + // Evaluate executable scripts on first document insertion 1.5403 + for ( i = 0; i < hasScripts; i++ ) { 1.5404 + node = scripts[ i ]; 1.5405 + if ( rscriptType.test( node.type || "" ) && 1.5406 + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { 1.5407 + 1.5408 + if ( node.src ) { 1.5409 + // Optional AJAX dependency, but won't run scripts if not present 1.5410 + if ( jQuery._evalUrl ) { 1.5411 + jQuery._evalUrl( node.src ); 1.5412 + } 1.5413 + } else { 1.5414 + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); 1.5415 + } 1.5416 + } 1.5417 + } 1.5418 + } 1.5419 + } 1.5420 + } 1.5421 + 1.5422 + return this; 1.5423 + } 1.5424 +}); 1.5425 + 1.5426 +jQuery.each({ 1.5427 + appendTo: "append", 1.5428 + prependTo: "prepend", 1.5429 + insertBefore: "before", 1.5430 + insertAfter: "after", 1.5431 + replaceAll: "replaceWith" 1.5432 +}, function( name, original ) { 1.5433 + jQuery.fn[ name ] = function( selector ) { 1.5434 + var elems, 1.5435 + ret = [], 1.5436 + insert = jQuery( selector ), 1.5437 + last = insert.length - 1, 1.5438 + i = 0; 1.5439 + 1.5440 + for ( ; i <= last; i++ ) { 1.5441 + elems = i === last ? this : this.clone( true ); 1.5442 + jQuery( insert[ i ] )[ original ]( elems ); 1.5443 + 1.5444 + // Support: QtWebKit 1.5445 + // .get() because push.apply(_, arraylike) throws 1.5446 + push.apply( ret, elems.get() ); 1.5447 + } 1.5448 + 1.5449 + return this.pushStack( ret ); 1.5450 + }; 1.5451 +}); 1.5452 + 1.5453 + 1.5454 +var iframe, 1.5455 + elemdisplay = {}; 1.5456 + 1.5457 +/** 1.5458 + * Retrieve the actual display of a element 1.5459 + * @param {String} name nodeName of the element 1.5460 + * @param {Object} doc Document object 1.5461 + */ 1.5462 +// Called only from within defaultDisplay 1.5463 +function actualDisplay( name, doc ) { 1.5464 + var style, 1.5465 + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), 1.5466 + 1.5467 + // getDefaultComputedStyle might be reliably used only on attached element 1.5468 + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? 1.5469 + 1.5470 + // Use of this method is a temporary fix (more like optmization) until something better comes along, 1.5471 + // since it was removed from specification and supported only in FF 1.5472 + style.display : jQuery.css( elem[ 0 ], "display" ); 1.5473 + 1.5474 + // We don't have any data stored on the element, 1.5475 + // so use "detach" method as fast way to get rid of the element 1.5476 + elem.detach(); 1.5477 + 1.5478 + return display; 1.5479 +} 1.5480 + 1.5481 +/** 1.5482 + * Try to determine the default display value of an element 1.5483 + * @param {String} nodeName 1.5484 + */ 1.5485 +function defaultDisplay( nodeName ) { 1.5486 + var doc = document, 1.5487 + display = elemdisplay[ nodeName ]; 1.5488 + 1.5489 + if ( !display ) { 1.5490 + display = actualDisplay( nodeName, doc ); 1.5491 + 1.5492 + // If the simple way fails, read from inside an iframe 1.5493 + if ( display === "none" || !display ) { 1.5494 + 1.5495 + // Use the already-created iframe if possible 1.5496 + iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement ); 1.5497 + 1.5498 + // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse 1.5499 + doc = iframe[ 0 ].contentDocument; 1.5500 + 1.5501 + // Support: IE 1.5502 + doc.write(); 1.5503 + doc.close(); 1.5504 + 1.5505 + display = actualDisplay( nodeName, doc ); 1.5506 + iframe.detach(); 1.5507 + } 1.5508 + 1.5509 + // Store the correct default display 1.5510 + elemdisplay[ nodeName ] = display; 1.5511 + } 1.5512 + 1.5513 + return display; 1.5514 +} 1.5515 +var rmargin = (/^margin/); 1.5516 + 1.5517 +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 1.5518 + 1.5519 +var getStyles = function( elem ) { 1.5520 + return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); 1.5521 + }; 1.5522 + 1.5523 + 1.5524 + 1.5525 +function curCSS( elem, name, computed ) { 1.5526 + var width, minWidth, maxWidth, ret, 1.5527 + style = elem.style; 1.5528 + 1.5529 + computed = computed || getStyles( elem ); 1.5530 + 1.5531 + // Support: IE9 1.5532 + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 1.5533 + if ( computed ) { 1.5534 + ret = computed.getPropertyValue( name ) || computed[ name ]; 1.5535 + } 1.5536 + 1.5537 + if ( computed ) { 1.5538 + 1.5539 + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { 1.5540 + ret = jQuery.style( elem, name ); 1.5541 + } 1.5542 + 1.5543 + // Support: iOS < 6 1.5544 + // A tribute to the "awesome hack by Dean Edwards" 1.5545 + // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels 1.5546 + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values 1.5547 + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { 1.5548 + 1.5549 + // Remember the original values 1.5550 + width = style.width; 1.5551 + minWidth = style.minWidth; 1.5552 + maxWidth = style.maxWidth; 1.5553 + 1.5554 + // Put in the new values to get a computed value out 1.5555 + style.minWidth = style.maxWidth = style.width = ret; 1.5556 + ret = computed.width; 1.5557 + 1.5558 + // Revert the changed values 1.5559 + style.width = width; 1.5560 + style.minWidth = minWidth; 1.5561 + style.maxWidth = maxWidth; 1.5562 + } 1.5563 + } 1.5564 + 1.5565 + return ret !== undefined ? 1.5566 + // Support: IE 1.5567 + // IE returns zIndex value as an integer. 1.5568 + ret + "" : 1.5569 + ret; 1.5570 +} 1.5571 + 1.5572 + 1.5573 +function addGetHookIf( conditionFn, hookFn ) { 1.5574 + // Define the hook, we'll check on the first run if it's really needed. 1.5575 + return { 1.5576 + get: function() { 1.5577 + if ( conditionFn() ) { 1.5578 + // Hook not needed (or it's not possible to use it due to missing dependency), 1.5579 + // remove it. 1.5580 + // Since there are no other hooks for marginRight, remove the whole object. 1.5581 + delete this.get; 1.5582 + return; 1.5583 + } 1.5584 + 1.5585 + // Hook needed; redefine it so that the support test is not executed again. 1.5586 + 1.5587 + return (this.get = hookFn).apply( this, arguments ); 1.5588 + } 1.5589 + }; 1.5590 +} 1.5591 + 1.5592 + 1.5593 +(function() { 1.5594 + var pixelPositionVal, boxSizingReliableVal, 1.5595 + docElem = document.documentElement, 1.5596 + container = document.createElement( "div" ), 1.5597 + div = document.createElement( "div" ); 1.5598 + 1.5599 + if ( !div.style ) { 1.5600 + return; 1.5601 + } 1.5602 + 1.5603 + div.style.backgroundClip = "content-box"; 1.5604 + div.cloneNode( true ).style.backgroundClip = ""; 1.5605 + support.clearCloneStyle = div.style.backgroundClip === "content-box"; 1.5606 + 1.5607 + container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" + 1.5608 + "position:absolute"; 1.5609 + container.appendChild( div ); 1.5610 + 1.5611 + // Executing both pixelPosition & boxSizingReliable tests require only one layout 1.5612 + // so they're executed at the same time to save the second computation. 1.5613 + function computePixelPositionAndBoxSizingReliable() { 1.5614 + div.style.cssText = 1.5615 + // Support: Firefox<29, Android 2.3 1.5616 + // Vendor-prefix box-sizing 1.5617 + "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + 1.5618 + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + 1.5619 + "border:1px;padding:1px;width:4px;position:absolute"; 1.5620 + div.innerHTML = ""; 1.5621 + docElem.appendChild( container ); 1.5622 + 1.5623 + var divStyle = window.getComputedStyle( div, null ); 1.5624 + pixelPositionVal = divStyle.top !== "1%"; 1.5625 + boxSizingReliableVal = divStyle.width === "4px"; 1.5626 + 1.5627 + docElem.removeChild( container ); 1.5628 + } 1.5629 + 1.5630 + // Support: node.js jsdom 1.5631 + // Don't assume that getComputedStyle is a property of the global object 1.5632 + if ( window.getComputedStyle ) { 1.5633 + jQuery.extend( support, { 1.5634 + pixelPosition: function() { 1.5635 + // This test is executed only once but we still do memoizing 1.5636 + // since we can use the boxSizingReliable pre-computing. 1.5637 + // No need to check if the test was already performed, though. 1.5638 + computePixelPositionAndBoxSizingReliable(); 1.5639 + return pixelPositionVal; 1.5640 + }, 1.5641 + boxSizingReliable: function() { 1.5642 + if ( boxSizingReliableVal == null ) { 1.5643 + computePixelPositionAndBoxSizingReliable(); 1.5644 + } 1.5645 + return boxSizingReliableVal; 1.5646 + }, 1.5647 + reliableMarginRight: function() { 1.5648 + // Support: Android 2.3 1.5649 + // Check if div with explicit width and no margin-right incorrectly 1.5650 + // gets computed margin-right based on width of container. (#3333) 1.5651 + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 1.5652 + // This support function is only executed once so no memoizing is needed. 1.5653 + var ret, 1.5654 + marginDiv = div.appendChild( document.createElement( "div" ) ); 1.5655 + 1.5656 + // Reset CSS: box-sizing; display; margin; border; padding 1.5657 + marginDiv.style.cssText = div.style.cssText = 1.5658 + // Support: Firefox<29, Android 2.3 1.5659 + // Vendor-prefix box-sizing 1.5660 + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + 1.5661 + "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; 1.5662 + marginDiv.style.marginRight = marginDiv.style.width = "0"; 1.5663 + div.style.width = "1px"; 1.5664 + docElem.appendChild( container ); 1.5665 + 1.5666 + ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight ); 1.5667 + 1.5668 + docElem.removeChild( container ); 1.5669 + 1.5670 + return ret; 1.5671 + } 1.5672 + }); 1.5673 + } 1.5674 +})(); 1.5675 + 1.5676 + 1.5677 +// A method for quickly swapping in/out CSS properties to get correct calculations. 1.5678 +jQuery.swap = function( elem, options, callback, args ) { 1.5679 + var ret, name, 1.5680 + old = {}; 1.5681 + 1.5682 + // Remember the old values, and insert the new ones 1.5683 + for ( name in options ) { 1.5684 + old[ name ] = elem.style[ name ]; 1.5685 + elem.style[ name ] = options[ name ]; 1.5686 + } 1.5687 + 1.5688 + ret = callback.apply( elem, args || [] ); 1.5689 + 1.5690 + // Revert the old values 1.5691 + for ( name in options ) { 1.5692 + elem.style[ name ] = old[ name ]; 1.5693 + } 1.5694 + 1.5695 + return ret; 1.5696 +}; 1.5697 + 1.5698 + 1.5699 +var 1.5700 + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" 1.5701 + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 1.5702 + rdisplayswap = /^(none|table(?!-c[ea]).+)/, 1.5703 + rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), 1.5704 + rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ), 1.5705 + 1.5706 + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 1.5707 + cssNormalTransform = { 1.5708 + letterSpacing: "0", 1.5709 + fontWeight: "400" 1.5710 + }, 1.5711 + 1.5712 + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; 1.5713 + 1.5714 +// return a css property mapped to a potentially vendor prefixed property 1.5715 +function vendorPropName( style, name ) { 1.5716 + 1.5717 + // shortcut for names that are not vendor prefixed 1.5718 + if ( name in style ) { 1.5719 + return name; 1.5720 + } 1.5721 + 1.5722 + // check for vendor prefixed names 1.5723 + var capName = name[0].toUpperCase() + name.slice(1), 1.5724 + origName = name, 1.5725 + i = cssPrefixes.length; 1.5726 + 1.5727 + while ( i-- ) { 1.5728 + name = cssPrefixes[ i ] + capName; 1.5729 + if ( name in style ) { 1.5730 + return name; 1.5731 + } 1.5732 + } 1.5733 + 1.5734 + return origName; 1.5735 +} 1.5736 + 1.5737 +function setPositiveNumber( elem, value, subtract ) { 1.5738 + var matches = rnumsplit.exec( value ); 1.5739 + return matches ? 1.5740 + // Guard against undefined "subtract", e.g., when used as in cssHooks 1.5741 + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : 1.5742 + value; 1.5743 +} 1.5744 + 1.5745 +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { 1.5746 + var i = extra === ( isBorderBox ? "border" : "content" ) ? 1.5747 + // If we already have the right measurement, avoid augmentation 1.5748 + 4 : 1.5749 + // Otherwise initialize for horizontal or vertical properties 1.5750 + name === "width" ? 1 : 0, 1.5751 + 1.5752 + val = 0; 1.5753 + 1.5754 + for ( ; i < 4; i += 2 ) { 1.5755 + // both box models exclude margin, so add it if we want it 1.5756 + if ( extra === "margin" ) { 1.5757 + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); 1.5758 + } 1.5759 + 1.5760 + if ( isBorderBox ) { 1.5761 + // border-box includes padding, so remove it if we want content 1.5762 + if ( extra === "content" ) { 1.5763 + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 1.5764 + } 1.5765 + 1.5766 + // at this point, extra isn't border nor margin, so remove border 1.5767 + if ( extra !== "margin" ) { 1.5768 + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 1.5769 + } 1.5770 + } else { 1.5771 + // at this point, extra isn't content, so add padding 1.5772 + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 1.5773 + 1.5774 + // at this point, extra isn't content nor padding, so add border 1.5775 + if ( extra !== "padding" ) { 1.5776 + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 1.5777 + } 1.5778 + } 1.5779 + } 1.5780 + 1.5781 + return val; 1.5782 +} 1.5783 + 1.5784 +function getWidthOrHeight( elem, name, extra ) { 1.5785 + 1.5786 + // Start with offset property, which is equivalent to the border-box value 1.5787 + var valueIsBorderBox = true, 1.5788 + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 1.5789 + styles = getStyles( elem ), 1.5790 + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 1.5791 + 1.5792 + // some non-html elements return undefined for offsetWidth, so check for null/undefined 1.5793 + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 1.5794 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 1.5795 + if ( val <= 0 || val == null ) { 1.5796 + // Fall back to computed then uncomputed css if necessary 1.5797 + val = curCSS( elem, name, styles ); 1.5798 + if ( val < 0 || val == null ) { 1.5799 + val = elem.style[ name ]; 1.5800 + } 1.5801 + 1.5802 + // Computed unit is not pixels. Stop here and return. 1.5803 + if ( rnumnonpx.test(val) ) { 1.5804 + return val; 1.5805 + } 1.5806 + 1.5807 + // we need the check for style in case a browser which returns unreliable values 1.5808 + // for getComputedStyle silently falls back to the reliable elem.style 1.5809 + valueIsBorderBox = isBorderBox && 1.5810 + ( support.boxSizingReliable() || val === elem.style[ name ] ); 1.5811 + 1.5812 + // Normalize "", auto, and prepare for extra 1.5813 + val = parseFloat( val ) || 0; 1.5814 + } 1.5815 + 1.5816 + // use the active box-sizing model to add/subtract irrelevant styles 1.5817 + return ( val + 1.5818 + augmentWidthOrHeight( 1.5819 + elem, 1.5820 + name, 1.5821 + extra || ( isBorderBox ? "border" : "content" ), 1.5822 + valueIsBorderBox, 1.5823 + styles 1.5824 + ) 1.5825 + ) + "px"; 1.5826 +} 1.5827 + 1.5828 +function showHide( elements, show ) { 1.5829 + var display, elem, hidden, 1.5830 + values = [], 1.5831 + index = 0, 1.5832 + length = elements.length; 1.5833 + 1.5834 + for ( ; index < length; index++ ) { 1.5835 + elem = elements[ index ]; 1.5836 + if ( !elem.style ) { 1.5837 + continue; 1.5838 + } 1.5839 + 1.5840 + values[ index ] = data_priv.get( elem, "olddisplay" ); 1.5841 + display = elem.style.display; 1.5842 + if ( show ) { 1.5843 + // Reset the inline display of this element to learn if it is 1.5844 + // being hidden by cascaded rules or not 1.5845 + if ( !values[ index ] && display === "none" ) { 1.5846 + elem.style.display = ""; 1.5847 + } 1.5848 + 1.5849 + // Set elements which have been overridden with display: none 1.5850 + // in a stylesheet to whatever the default browser style is 1.5851 + // for such an element 1.5852 + if ( elem.style.display === "" && isHidden( elem ) ) { 1.5853 + values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) ); 1.5854 + } 1.5855 + } else { 1.5856 + hidden = isHidden( elem ); 1.5857 + 1.5858 + if ( display !== "none" || !hidden ) { 1.5859 + data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); 1.5860 + } 1.5861 + } 1.5862 + } 1.5863 + 1.5864 + // Set the display of most of the elements in a second loop 1.5865 + // to avoid the constant reflow 1.5866 + for ( index = 0; index < length; index++ ) { 1.5867 + elem = elements[ index ]; 1.5868 + if ( !elem.style ) { 1.5869 + continue; 1.5870 + } 1.5871 + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { 1.5872 + elem.style.display = show ? values[ index ] || "" : "none"; 1.5873 + } 1.5874 + } 1.5875 + 1.5876 + return elements; 1.5877 +} 1.5878 + 1.5879 +jQuery.extend({ 1.5880 + // Add in style property hooks for overriding the default 1.5881 + // behavior of getting and setting a style property 1.5882 + cssHooks: { 1.5883 + opacity: { 1.5884 + get: function( elem, computed ) { 1.5885 + if ( computed ) { 1.5886 + // We should always get a number back from opacity 1.5887 + var ret = curCSS( elem, "opacity" ); 1.5888 + return ret === "" ? "1" : ret; 1.5889 + } 1.5890 + } 1.5891 + } 1.5892 + }, 1.5893 + 1.5894 + // Don't automatically add "px" to these possibly-unitless properties 1.5895 + cssNumber: { 1.5896 + "columnCount": true, 1.5897 + "fillOpacity": true, 1.5898 + "flexGrow": true, 1.5899 + "flexShrink": true, 1.5900 + "fontWeight": true, 1.5901 + "lineHeight": true, 1.5902 + "opacity": true, 1.5903 + "order": true, 1.5904 + "orphans": true, 1.5905 + "widows": true, 1.5906 + "zIndex": true, 1.5907 + "zoom": true 1.5908 + }, 1.5909 + 1.5910 + // Add in properties whose names you wish to fix before 1.5911 + // setting or getting the value 1.5912 + cssProps: { 1.5913 + // normalize float css property 1.5914 + "float": "cssFloat" 1.5915 + }, 1.5916 + 1.5917 + // Get and set the style property on a DOM Node 1.5918 + style: function( elem, name, value, extra ) { 1.5919 + // Don't set styles on text and comment nodes 1.5920 + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 1.5921 + return; 1.5922 + } 1.5923 + 1.5924 + // Make sure that we're working with the right name 1.5925 + var ret, type, hooks, 1.5926 + origName = jQuery.camelCase( name ), 1.5927 + style = elem.style; 1.5928 + 1.5929 + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); 1.5930 + 1.5931 + // gets hook for the prefixed version 1.5932 + // followed by the unprefixed version 1.5933 + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 1.5934 + 1.5935 + // Check if we're setting a value 1.5936 + if ( value !== undefined ) { 1.5937 + type = typeof value; 1.5938 + 1.5939 + // convert relative number strings (+= or -=) to relative numbers. #7345 1.5940 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { 1.5941 + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); 1.5942 + // Fixes bug #9237 1.5943 + type = "number"; 1.5944 + } 1.5945 + 1.5946 + // Make sure that null and NaN values aren't set. See: #7116 1.5947 + if ( value == null || value !== value ) { 1.5948 + return; 1.5949 + } 1.5950 + 1.5951 + // If a number was passed in, add 'px' to the (except for certain CSS properties) 1.5952 + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { 1.5953 + value += "px"; 1.5954 + } 1.5955 + 1.5956 + // Fixes #8908, it can be done more correctly by specifying setters in cssHooks, 1.5957 + // but it would mean to define eight (for every problematic property) identical functions 1.5958 + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 1.5959 + style[ name ] = "inherit"; 1.5960 + } 1.5961 + 1.5962 + // If a hook was provided, use that value, otherwise just set the specified value 1.5963 + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { 1.5964 + style[ name ] = value; 1.5965 + } 1.5966 + 1.5967 + } else { 1.5968 + // If a hook was provided get the non-computed value from there 1.5969 + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { 1.5970 + return ret; 1.5971 + } 1.5972 + 1.5973 + // Otherwise just get the value from the style object 1.5974 + return style[ name ]; 1.5975 + } 1.5976 + }, 1.5977 + 1.5978 + css: function( elem, name, extra, styles ) { 1.5979 + var val, num, hooks, 1.5980 + origName = jQuery.camelCase( name ); 1.5981 + 1.5982 + // Make sure that we're working with the right name 1.5983 + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); 1.5984 + 1.5985 + // gets hook for the prefixed version 1.5986 + // followed by the unprefixed version 1.5987 + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 1.5988 + 1.5989 + // If a hook was provided get the computed value from there 1.5990 + if ( hooks && "get" in hooks ) { 1.5991 + val = hooks.get( elem, true, extra ); 1.5992 + } 1.5993 + 1.5994 + // Otherwise, if a way to get the computed value exists, use that 1.5995 + if ( val === undefined ) { 1.5996 + val = curCSS( elem, name, styles ); 1.5997 + } 1.5998 + 1.5999 + //convert "normal" to computed value 1.6000 + if ( val === "normal" && name in cssNormalTransform ) { 1.6001 + val = cssNormalTransform[ name ]; 1.6002 + } 1.6003 + 1.6004 + // Return, converting to number if forced or a qualifier was provided and val looks numeric 1.6005 + if ( extra === "" || extra ) { 1.6006 + num = parseFloat( val ); 1.6007 + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; 1.6008 + } 1.6009 + return val; 1.6010 + } 1.6011 +}); 1.6012 + 1.6013 +jQuery.each([ "height", "width" ], function( i, name ) { 1.6014 + jQuery.cssHooks[ name ] = { 1.6015 + get: function( elem, computed, extra ) { 1.6016 + if ( computed ) { 1.6017 + // certain elements can have dimension info if we invisibly show them 1.6018 + // however, it must have a current display style that would benefit from this 1.6019 + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? 1.6020 + jQuery.swap( elem, cssShow, function() { 1.6021 + return getWidthOrHeight( elem, name, extra ); 1.6022 + }) : 1.6023 + getWidthOrHeight( elem, name, extra ); 1.6024 + } 1.6025 + }, 1.6026 + 1.6027 + set: function( elem, value, extra ) { 1.6028 + var styles = extra && getStyles( elem ); 1.6029 + return setPositiveNumber( elem, value, extra ? 1.6030 + augmentWidthOrHeight( 1.6031 + elem, 1.6032 + name, 1.6033 + extra, 1.6034 + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 1.6035 + styles 1.6036 + ) : 0 1.6037 + ); 1.6038 + } 1.6039 + }; 1.6040 +}); 1.6041 + 1.6042 +// Support: Android 2.3 1.6043 +jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, 1.6044 + function( elem, computed ) { 1.6045 + if ( computed ) { 1.6046 + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 1.6047 + // Work around by temporarily setting element display to inline-block 1.6048 + return jQuery.swap( elem, { "display": "inline-block" }, 1.6049 + curCSS, [ elem, "marginRight" ] ); 1.6050 + } 1.6051 + } 1.6052 +); 1.6053 + 1.6054 +// These hooks are used by animate to expand properties 1.6055 +jQuery.each({ 1.6056 + margin: "", 1.6057 + padding: "", 1.6058 + border: "Width" 1.6059 +}, function( prefix, suffix ) { 1.6060 + jQuery.cssHooks[ prefix + suffix ] = { 1.6061 + expand: function( value ) { 1.6062 + var i = 0, 1.6063 + expanded = {}, 1.6064 + 1.6065 + // assumes a single number if not a string 1.6066 + parts = typeof value === "string" ? value.split(" ") : [ value ]; 1.6067 + 1.6068 + for ( ; i < 4; i++ ) { 1.6069 + expanded[ prefix + cssExpand[ i ] + suffix ] = 1.6070 + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 1.6071 + } 1.6072 + 1.6073 + return expanded; 1.6074 + } 1.6075 + }; 1.6076 + 1.6077 + if ( !rmargin.test( prefix ) ) { 1.6078 + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 1.6079 + } 1.6080 +}); 1.6081 + 1.6082 +jQuery.fn.extend({ 1.6083 + css: function( name, value ) { 1.6084 + return access( this, function( elem, name, value ) { 1.6085 + var styles, len, 1.6086 + map = {}, 1.6087 + i = 0; 1.6088 + 1.6089 + if ( jQuery.isArray( name ) ) { 1.6090 + styles = getStyles( elem ); 1.6091 + len = name.length; 1.6092 + 1.6093 + for ( ; i < len; i++ ) { 1.6094 + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 1.6095 + } 1.6096 + 1.6097 + return map; 1.6098 + } 1.6099 + 1.6100 + return value !== undefined ? 1.6101 + jQuery.style( elem, name, value ) : 1.6102 + jQuery.css( elem, name ); 1.6103 + }, name, value, arguments.length > 1 ); 1.6104 + }, 1.6105 + show: function() { 1.6106 + return showHide( this, true ); 1.6107 + }, 1.6108 + hide: function() { 1.6109 + return showHide( this ); 1.6110 + }, 1.6111 + toggle: function( state ) { 1.6112 + if ( typeof state === "boolean" ) { 1.6113 + return state ? this.show() : this.hide(); 1.6114 + } 1.6115 + 1.6116 + return this.each(function() { 1.6117 + if ( isHidden( this ) ) { 1.6118 + jQuery( this ).show(); 1.6119 + } else { 1.6120 + jQuery( this ).hide(); 1.6121 + } 1.6122 + }); 1.6123 + } 1.6124 +}); 1.6125 + 1.6126 + 1.6127 +function Tween( elem, options, prop, end, easing ) { 1.6128 + return new Tween.prototype.init( elem, options, prop, end, easing ); 1.6129 +} 1.6130 +jQuery.Tween = Tween; 1.6131 + 1.6132 +Tween.prototype = { 1.6133 + constructor: Tween, 1.6134 + init: function( elem, options, prop, end, easing, unit ) { 1.6135 + this.elem = elem; 1.6136 + this.prop = prop; 1.6137 + this.easing = easing || "swing"; 1.6138 + this.options = options; 1.6139 + this.start = this.now = this.cur(); 1.6140 + this.end = end; 1.6141 + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 1.6142 + }, 1.6143 + cur: function() { 1.6144 + var hooks = Tween.propHooks[ this.prop ]; 1.6145 + 1.6146 + return hooks && hooks.get ? 1.6147 + hooks.get( this ) : 1.6148 + Tween.propHooks._default.get( this ); 1.6149 + }, 1.6150 + run: function( percent ) { 1.6151 + var eased, 1.6152 + hooks = Tween.propHooks[ this.prop ]; 1.6153 + 1.6154 + if ( this.options.duration ) { 1.6155 + this.pos = eased = jQuery.easing[ this.easing ]( 1.6156 + percent, this.options.duration * percent, 0, 1, this.options.duration 1.6157 + ); 1.6158 + } else { 1.6159 + this.pos = eased = percent; 1.6160 + } 1.6161 + this.now = ( this.end - this.start ) * eased + this.start; 1.6162 + 1.6163 + if ( this.options.step ) { 1.6164 + this.options.step.call( this.elem, this.now, this ); 1.6165 + } 1.6166 + 1.6167 + if ( hooks && hooks.set ) { 1.6168 + hooks.set( this ); 1.6169 + } else { 1.6170 + Tween.propHooks._default.set( this ); 1.6171 + } 1.6172 + return this; 1.6173 + } 1.6174 +}; 1.6175 + 1.6176 +Tween.prototype.init.prototype = Tween.prototype; 1.6177 + 1.6178 +Tween.propHooks = { 1.6179 + _default: { 1.6180 + get: function( tween ) { 1.6181 + var result; 1.6182 + 1.6183 + if ( tween.elem[ tween.prop ] != null && 1.6184 + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { 1.6185 + return tween.elem[ tween.prop ]; 1.6186 + } 1.6187 + 1.6188 + // passing an empty string as a 3rd parameter to .css will automatically 1.6189 + // attempt a parseFloat and fallback to a string if the parse fails 1.6190 + // so, simple values such as "10px" are parsed to Float. 1.6191 + // complex values such as "rotate(1rad)" are returned as is. 1.6192 + result = jQuery.css( tween.elem, tween.prop, "" ); 1.6193 + // Empty strings, null, undefined and "auto" are converted to 0. 1.6194 + return !result || result === "auto" ? 0 : result; 1.6195 + }, 1.6196 + set: function( tween ) { 1.6197 + // use step hook for back compat - use cssHook if its there - use .style if its 1.6198 + // available and use plain properties where available 1.6199 + if ( jQuery.fx.step[ tween.prop ] ) { 1.6200 + jQuery.fx.step[ tween.prop ]( tween ); 1.6201 + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { 1.6202 + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 1.6203 + } else { 1.6204 + tween.elem[ tween.prop ] = tween.now; 1.6205 + } 1.6206 + } 1.6207 + } 1.6208 +}; 1.6209 + 1.6210 +// Support: IE9 1.6211 +// Panic based approach to setting things on disconnected nodes 1.6212 + 1.6213 +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 1.6214 + set: function( tween ) { 1.6215 + if ( tween.elem.nodeType && tween.elem.parentNode ) { 1.6216 + tween.elem[ tween.prop ] = tween.now; 1.6217 + } 1.6218 + } 1.6219 +}; 1.6220 + 1.6221 +jQuery.easing = { 1.6222 + linear: function( p ) { 1.6223 + return p; 1.6224 + }, 1.6225 + swing: function( p ) { 1.6226 + return 0.5 - Math.cos( p * Math.PI ) / 2; 1.6227 + } 1.6228 +}; 1.6229 + 1.6230 +jQuery.fx = Tween.prototype.init; 1.6231 + 1.6232 +// Back Compat <1.8 extension point 1.6233 +jQuery.fx.step = {}; 1.6234 + 1.6235 + 1.6236 + 1.6237 + 1.6238 +var 1.6239 + fxNow, timerId, 1.6240 + rfxtypes = /^(?:toggle|show|hide)$/, 1.6241 + rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ), 1.6242 + rrun = /queueHooks$/, 1.6243 + animationPrefilters = [ defaultPrefilter ], 1.6244 + tweeners = { 1.6245 + "*": [ function( prop, value ) { 1.6246 + var tween = this.createTween( prop, value ), 1.6247 + target = tween.cur(), 1.6248 + parts = rfxnum.exec( value ), 1.6249 + unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 1.6250 + 1.6251 + // Starting value computation is required for potential unit mismatches 1.6252 + start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && 1.6253 + rfxnum.exec( jQuery.css( tween.elem, prop ) ), 1.6254 + scale = 1, 1.6255 + maxIterations = 20; 1.6256 + 1.6257 + if ( start && start[ 3 ] !== unit ) { 1.6258 + // Trust units reported by jQuery.css 1.6259 + unit = unit || start[ 3 ]; 1.6260 + 1.6261 + // Make sure we update the tween properties later on 1.6262 + parts = parts || []; 1.6263 + 1.6264 + // Iteratively approximate from a nonzero starting point 1.6265 + start = +target || 1; 1.6266 + 1.6267 + do { 1.6268 + // If previous iteration zeroed out, double until we get *something* 1.6269 + // Use a string for doubling factor so we don't accidentally see scale as unchanged below 1.6270 + scale = scale || ".5"; 1.6271 + 1.6272 + // Adjust and apply 1.6273 + start = start / scale; 1.6274 + jQuery.style( tween.elem, prop, start + unit ); 1.6275 + 1.6276 + // Update scale, tolerating zero or NaN from tween.cur() 1.6277 + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough 1.6278 + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); 1.6279 + } 1.6280 + 1.6281 + // Update tween properties 1.6282 + if ( parts ) { 1.6283 + start = tween.start = +start || +target || 0; 1.6284 + tween.unit = unit; 1.6285 + // If a +=/-= token was provided, we're doing a relative animation 1.6286 + tween.end = parts[ 1 ] ? 1.6287 + start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : 1.6288 + +parts[ 2 ]; 1.6289 + } 1.6290 + 1.6291 + return tween; 1.6292 + } ] 1.6293 + }; 1.6294 + 1.6295 +// Animations created synchronously will run synchronously 1.6296 +function createFxNow() { 1.6297 + setTimeout(function() { 1.6298 + fxNow = undefined; 1.6299 + }); 1.6300 + return ( fxNow = jQuery.now() ); 1.6301 +} 1.6302 + 1.6303 +// Generate parameters to create a standard animation 1.6304 +function genFx( type, includeWidth ) { 1.6305 + var which, 1.6306 + i = 0, 1.6307 + attrs = { height: type }; 1.6308 + 1.6309 + // if we include width, step value is 1 to do all cssExpand values, 1.6310 + // if we don't include width, step value is 2 to skip over Left and Right 1.6311 + includeWidth = includeWidth ? 1 : 0; 1.6312 + for ( ; i < 4 ; i += 2 - includeWidth ) { 1.6313 + which = cssExpand[ i ]; 1.6314 + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 1.6315 + } 1.6316 + 1.6317 + if ( includeWidth ) { 1.6318 + attrs.opacity = attrs.width = type; 1.6319 + } 1.6320 + 1.6321 + return attrs; 1.6322 +} 1.6323 + 1.6324 +function createTween( value, prop, animation ) { 1.6325 + var tween, 1.6326 + collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), 1.6327 + index = 0, 1.6328 + length = collection.length; 1.6329 + for ( ; index < length; index++ ) { 1.6330 + if ( (tween = collection[ index ].call( animation, prop, value )) ) { 1.6331 + 1.6332 + // we're done with this property 1.6333 + return tween; 1.6334 + } 1.6335 + } 1.6336 +} 1.6337 + 1.6338 +function defaultPrefilter( elem, props, opts ) { 1.6339 + /* jshint validthis: true */ 1.6340 + var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, 1.6341 + anim = this, 1.6342 + orig = {}, 1.6343 + style = elem.style, 1.6344 + hidden = elem.nodeType && isHidden( elem ), 1.6345 + dataShow = data_priv.get( elem, "fxshow" ); 1.6346 + 1.6347 + // handle queue: false promises 1.6348 + if ( !opts.queue ) { 1.6349 + hooks = jQuery._queueHooks( elem, "fx" ); 1.6350 + if ( hooks.unqueued == null ) { 1.6351 + hooks.unqueued = 0; 1.6352 + oldfire = hooks.empty.fire; 1.6353 + hooks.empty.fire = function() { 1.6354 + if ( !hooks.unqueued ) { 1.6355 + oldfire(); 1.6356 + } 1.6357 + }; 1.6358 + } 1.6359 + hooks.unqueued++; 1.6360 + 1.6361 + anim.always(function() { 1.6362 + // doing this makes sure that the complete handler will be called 1.6363 + // before this completes 1.6364 + anim.always(function() { 1.6365 + hooks.unqueued--; 1.6366 + if ( !jQuery.queue( elem, "fx" ).length ) { 1.6367 + hooks.empty.fire(); 1.6368 + } 1.6369 + }); 1.6370 + }); 1.6371 + } 1.6372 + 1.6373 + // height/width overflow pass 1.6374 + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { 1.6375 + // Make sure that nothing sneaks out 1.6376 + // Record all 3 overflow attributes because IE9-10 do not 1.6377 + // change the overflow attribute when overflowX and 1.6378 + // overflowY are set to the same value 1.6379 + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 1.6380 + 1.6381 + // Set display property to inline-block for height/width 1.6382 + // animations on inline elements that are having width/height animated 1.6383 + display = jQuery.css( elem, "display" ); 1.6384 + 1.6385 + // Test default display if display is currently "none" 1.6386 + checkDisplay = display === "none" ? 1.6387 + data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; 1.6388 + 1.6389 + if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { 1.6390 + style.display = "inline-block"; 1.6391 + } 1.6392 + } 1.6393 + 1.6394 + if ( opts.overflow ) { 1.6395 + style.overflow = "hidden"; 1.6396 + anim.always(function() { 1.6397 + style.overflow = opts.overflow[ 0 ]; 1.6398 + style.overflowX = opts.overflow[ 1 ]; 1.6399 + style.overflowY = opts.overflow[ 2 ]; 1.6400 + }); 1.6401 + } 1.6402 + 1.6403 + // show/hide pass 1.6404 + for ( prop in props ) { 1.6405 + value = props[ prop ]; 1.6406 + if ( rfxtypes.exec( value ) ) { 1.6407 + delete props[ prop ]; 1.6408 + toggle = toggle || value === "toggle"; 1.6409 + if ( value === ( hidden ? "hide" : "show" ) ) { 1.6410 + 1.6411 + // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden 1.6412 + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 1.6413 + hidden = true; 1.6414 + } else { 1.6415 + continue; 1.6416 + } 1.6417 + } 1.6418 + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 1.6419 + 1.6420 + // Any non-fx value stops us from restoring the original display value 1.6421 + } else { 1.6422 + display = undefined; 1.6423 + } 1.6424 + } 1.6425 + 1.6426 + if ( !jQuery.isEmptyObject( orig ) ) { 1.6427 + if ( dataShow ) { 1.6428 + if ( "hidden" in dataShow ) { 1.6429 + hidden = dataShow.hidden; 1.6430 + } 1.6431 + } else { 1.6432 + dataShow = data_priv.access( elem, "fxshow", {} ); 1.6433 + } 1.6434 + 1.6435 + // store state if its toggle - enables .stop().toggle() to "reverse" 1.6436 + if ( toggle ) { 1.6437 + dataShow.hidden = !hidden; 1.6438 + } 1.6439 + if ( hidden ) { 1.6440 + jQuery( elem ).show(); 1.6441 + } else { 1.6442 + anim.done(function() { 1.6443 + jQuery( elem ).hide(); 1.6444 + }); 1.6445 + } 1.6446 + anim.done(function() { 1.6447 + var prop; 1.6448 + 1.6449 + data_priv.remove( elem, "fxshow" ); 1.6450 + for ( prop in orig ) { 1.6451 + jQuery.style( elem, prop, orig[ prop ] ); 1.6452 + } 1.6453 + }); 1.6454 + for ( prop in orig ) { 1.6455 + tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 1.6456 + 1.6457 + if ( !( prop in dataShow ) ) { 1.6458 + dataShow[ prop ] = tween.start; 1.6459 + if ( hidden ) { 1.6460 + tween.end = tween.start; 1.6461 + tween.start = prop === "width" || prop === "height" ? 1 : 0; 1.6462 + } 1.6463 + } 1.6464 + } 1.6465 + 1.6466 + // If this is a noop like .hide().hide(), restore an overwritten display value 1.6467 + } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) { 1.6468 + style.display = display; 1.6469 + } 1.6470 +} 1.6471 + 1.6472 +function propFilter( props, specialEasing ) { 1.6473 + var index, name, easing, value, hooks; 1.6474 + 1.6475 + // camelCase, specialEasing and expand cssHook pass 1.6476 + for ( index in props ) { 1.6477 + name = jQuery.camelCase( index ); 1.6478 + easing = specialEasing[ name ]; 1.6479 + value = props[ index ]; 1.6480 + if ( jQuery.isArray( value ) ) { 1.6481 + easing = value[ 1 ]; 1.6482 + value = props[ index ] = value[ 0 ]; 1.6483 + } 1.6484 + 1.6485 + if ( index !== name ) { 1.6486 + props[ name ] = value; 1.6487 + delete props[ index ]; 1.6488 + } 1.6489 + 1.6490 + hooks = jQuery.cssHooks[ name ]; 1.6491 + if ( hooks && "expand" in hooks ) { 1.6492 + value = hooks.expand( value ); 1.6493 + delete props[ name ]; 1.6494 + 1.6495 + // not quite $.extend, this wont overwrite keys already present. 1.6496 + // also - reusing 'index' from above because we have the correct "name" 1.6497 + for ( index in value ) { 1.6498 + if ( !( index in props ) ) { 1.6499 + props[ index ] = value[ index ]; 1.6500 + specialEasing[ index ] = easing; 1.6501 + } 1.6502 + } 1.6503 + } else { 1.6504 + specialEasing[ name ] = easing; 1.6505 + } 1.6506 + } 1.6507 +} 1.6508 + 1.6509 +function Animation( elem, properties, options ) { 1.6510 + var result, 1.6511 + stopped, 1.6512 + index = 0, 1.6513 + length = animationPrefilters.length, 1.6514 + deferred = jQuery.Deferred().always( function() { 1.6515 + // don't match elem in the :animated selector 1.6516 + delete tick.elem; 1.6517 + }), 1.6518 + tick = function() { 1.6519 + if ( stopped ) { 1.6520 + return false; 1.6521 + } 1.6522 + var currentTime = fxNow || createFxNow(), 1.6523 + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 1.6524 + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) 1.6525 + temp = remaining / animation.duration || 0, 1.6526 + percent = 1 - temp, 1.6527 + index = 0, 1.6528 + length = animation.tweens.length; 1.6529 + 1.6530 + for ( ; index < length ; index++ ) { 1.6531 + animation.tweens[ index ].run( percent ); 1.6532 + } 1.6533 + 1.6534 + deferred.notifyWith( elem, [ animation, percent, remaining ]); 1.6535 + 1.6536 + if ( percent < 1 && length ) { 1.6537 + return remaining; 1.6538 + } else { 1.6539 + deferred.resolveWith( elem, [ animation ] ); 1.6540 + return false; 1.6541 + } 1.6542 + }, 1.6543 + animation = deferred.promise({ 1.6544 + elem: elem, 1.6545 + props: jQuery.extend( {}, properties ), 1.6546 + opts: jQuery.extend( true, { specialEasing: {} }, options ), 1.6547 + originalProperties: properties, 1.6548 + originalOptions: options, 1.6549 + startTime: fxNow || createFxNow(), 1.6550 + duration: options.duration, 1.6551 + tweens: [], 1.6552 + createTween: function( prop, end ) { 1.6553 + var tween = jQuery.Tween( elem, animation.opts, prop, end, 1.6554 + animation.opts.specialEasing[ prop ] || animation.opts.easing ); 1.6555 + animation.tweens.push( tween ); 1.6556 + return tween; 1.6557 + }, 1.6558 + stop: function( gotoEnd ) { 1.6559 + var index = 0, 1.6560 + // if we are going to the end, we want to run all the tweens 1.6561 + // otherwise we skip this part 1.6562 + length = gotoEnd ? animation.tweens.length : 0; 1.6563 + if ( stopped ) { 1.6564 + return this; 1.6565 + } 1.6566 + stopped = true; 1.6567 + for ( ; index < length ; index++ ) { 1.6568 + animation.tweens[ index ].run( 1 ); 1.6569 + } 1.6570 + 1.6571 + // resolve when we played the last frame 1.6572 + // otherwise, reject 1.6573 + if ( gotoEnd ) { 1.6574 + deferred.resolveWith( elem, [ animation, gotoEnd ] ); 1.6575 + } else { 1.6576 + deferred.rejectWith( elem, [ animation, gotoEnd ] ); 1.6577 + } 1.6578 + return this; 1.6579 + } 1.6580 + }), 1.6581 + props = animation.props; 1.6582 + 1.6583 + propFilter( props, animation.opts.specialEasing ); 1.6584 + 1.6585 + for ( ; index < length ; index++ ) { 1.6586 + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); 1.6587 + if ( result ) { 1.6588 + return result; 1.6589 + } 1.6590 + } 1.6591 + 1.6592 + jQuery.map( props, createTween, animation ); 1.6593 + 1.6594 + if ( jQuery.isFunction( animation.opts.start ) ) { 1.6595 + animation.opts.start.call( elem, animation ); 1.6596 + } 1.6597 + 1.6598 + jQuery.fx.timer( 1.6599 + jQuery.extend( tick, { 1.6600 + elem: elem, 1.6601 + anim: animation, 1.6602 + queue: animation.opts.queue 1.6603 + }) 1.6604 + ); 1.6605 + 1.6606 + // attach callbacks from options 1.6607 + return animation.progress( animation.opts.progress ) 1.6608 + .done( animation.opts.done, animation.opts.complete ) 1.6609 + .fail( animation.opts.fail ) 1.6610 + .always( animation.opts.always ); 1.6611 +} 1.6612 + 1.6613 +jQuery.Animation = jQuery.extend( Animation, { 1.6614 + 1.6615 + tweener: function( props, callback ) { 1.6616 + if ( jQuery.isFunction( props ) ) { 1.6617 + callback = props; 1.6618 + props = [ "*" ]; 1.6619 + } else { 1.6620 + props = props.split(" "); 1.6621 + } 1.6622 + 1.6623 + var prop, 1.6624 + index = 0, 1.6625 + length = props.length; 1.6626 + 1.6627 + for ( ; index < length ; index++ ) { 1.6628 + prop = props[ index ]; 1.6629 + tweeners[ prop ] = tweeners[ prop ] || []; 1.6630 + tweeners[ prop ].unshift( callback ); 1.6631 + } 1.6632 + }, 1.6633 + 1.6634 + prefilter: function( callback, prepend ) { 1.6635 + if ( prepend ) { 1.6636 + animationPrefilters.unshift( callback ); 1.6637 + } else { 1.6638 + animationPrefilters.push( callback ); 1.6639 + } 1.6640 + } 1.6641 +}); 1.6642 + 1.6643 +jQuery.speed = function( speed, easing, fn ) { 1.6644 + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 1.6645 + complete: fn || !fn && easing || 1.6646 + jQuery.isFunction( speed ) && speed, 1.6647 + duration: speed, 1.6648 + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing 1.6649 + }; 1.6650 + 1.6651 + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : 1.6652 + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; 1.6653 + 1.6654 + // normalize opt.queue - true/undefined/null -> "fx" 1.6655 + if ( opt.queue == null || opt.queue === true ) { 1.6656 + opt.queue = "fx"; 1.6657 + } 1.6658 + 1.6659 + // Queueing 1.6660 + opt.old = opt.complete; 1.6661 + 1.6662 + opt.complete = function() { 1.6663 + if ( jQuery.isFunction( opt.old ) ) { 1.6664 + opt.old.call( this ); 1.6665 + } 1.6666 + 1.6667 + if ( opt.queue ) { 1.6668 + jQuery.dequeue( this, opt.queue ); 1.6669 + } 1.6670 + }; 1.6671 + 1.6672 + return opt; 1.6673 +}; 1.6674 + 1.6675 +jQuery.fn.extend({ 1.6676 + fadeTo: function( speed, to, easing, callback ) { 1.6677 + 1.6678 + // show any hidden elements after setting opacity to 0 1.6679 + return this.filter( isHidden ).css( "opacity", 0 ).show() 1.6680 + 1.6681 + // animate to the value specified 1.6682 + .end().animate({ opacity: to }, speed, easing, callback ); 1.6683 + }, 1.6684 + animate: function( prop, speed, easing, callback ) { 1.6685 + var empty = jQuery.isEmptyObject( prop ), 1.6686 + optall = jQuery.speed( speed, easing, callback ), 1.6687 + doAnimation = function() { 1.6688 + // Operate on a copy of prop so per-property easing won't be lost 1.6689 + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 1.6690 + 1.6691 + // Empty animations, or finishing resolves immediately 1.6692 + if ( empty || data_priv.get( this, "finish" ) ) { 1.6693 + anim.stop( true ); 1.6694 + } 1.6695 + }; 1.6696 + doAnimation.finish = doAnimation; 1.6697 + 1.6698 + return empty || optall.queue === false ? 1.6699 + this.each( doAnimation ) : 1.6700 + this.queue( optall.queue, doAnimation ); 1.6701 + }, 1.6702 + stop: function( type, clearQueue, gotoEnd ) { 1.6703 + var stopQueue = function( hooks ) { 1.6704 + var stop = hooks.stop; 1.6705 + delete hooks.stop; 1.6706 + stop( gotoEnd ); 1.6707 + }; 1.6708 + 1.6709 + if ( typeof type !== "string" ) { 1.6710 + gotoEnd = clearQueue; 1.6711 + clearQueue = type; 1.6712 + type = undefined; 1.6713 + } 1.6714 + if ( clearQueue && type !== false ) { 1.6715 + this.queue( type || "fx", [] ); 1.6716 + } 1.6717 + 1.6718 + return this.each(function() { 1.6719 + var dequeue = true, 1.6720 + index = type != null && type + "queueHooks", 1.6721 + timers = jQuery.timers, 1.6722 + data = data_priv.get( this ); 1.6723 + 1.6724 + if ( index ) { 1.6725 + if ( data[ index ] && data[ index ].stop ) { 1.6726 + stopQueue( data[ index ] ); 1.6727 + } 1.6728 + } else { 1.6729 + for ( index in data ) { 1.6730 + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 1.6731 + stopQueue( data[ index ] ); 1.6732 + } 1.6733 + } 1.6734 + } 1.6735 + 1.6736 + for ( index = timers.length; index--; ) { 1.6737 + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { 1.6738 + timers[ index ].anim.stop( gotoEnd ); 1.6739 + dequeue = false; 1.6740 + timers.splice( index, 1 ); 1.6741 + } 1.6742 + } 1.6743 + 1.6744 + // start the next in the queue if the last step wasn't forced 1.6745 + // timers currently will call their complete callbacks, which will dequeue 1.6746 + // but only if they were gotoEnd 1.6747 + if ( dequeue || !gotoEnd ) { 1.6748 + jQuery.dequeue( this, type ); 1.6749 + } 1.6750 + }); 1.6751 + }, 1.6752 + finish: function( type ) { 1.6753 + if ( type !== false ) { 1.6754 + type = type || "fx"; 1.6755 + } 1.6756 + return this.each(function() { 1.6757 + var index, 1.6758 + data = data_priv.get( this ), 1.6759 + queue = data[ type + "queue" ], 1.6760 + hooks = data[ type + "queueHooks" ], 1.6761 + timers = jQuery.timers, 1.6762 + length = queue ? queue.length : 0; 1.6763 + 1.6764 + // enable finishing flag on private data 1.6765 + data.finish = true; 1.6766 + 1.6767 + // empty the queue first 1.6768 + jQuery.queue( this, type, [] ); 1.6769 + 1.6770 + if ( hooks && hooks.stop ) { 1.6771 + hooks.stop.call( this, true ); 1.6772 + } 1.6773 + 1.6774 + // look for any active animations, and finish them 1.6775 + for ( index = timers.length; index--; ) { 1.6776 + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 1.6777 + timers[ index ].anim.stop( true ); 1.6778 + timers.splice( index, 1 ); 1.6779 + } 1.6780 + } 1.6781 + 1.6782 + // look for any animations in the old queue and finish them 1.6783 + for ( index = 0; index < length; index++ ) { 1.6784 + if ( queue[ index ] && queue[ index ].finish ) { 1.6785 + queue[ index ].finish.call( this ); 1.6786 + } 1.6787 + } 1.6788 + 1.6789 + // turn off finishing flag 1.6790 + delete data.finish; 1.6791 + }); 1.6792 + } 1.6793 +}); 1.6794 + 1.6795 +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { 1.6796 + var cssFn = jQuery.fn[ name ]; 1.6797 + jQuery.fn[ name ] = function( speed, easing, callback ) { 1.6798 + return speed == null || typeof speed === "boolean" ? 1.6799 + cssFn.apply( this, arguments ) : 1.6800 + this.animate( genFx( name, true ), speed, easing, callback ); 1.6801 + }; 1.6802 +}); 1.6803 + 1.6804 +// Generate shortcuts for custom animations 1.6805 +jQuery.each({ 1.6806 + slideDown: genFx("show"), 1.6807 + slideUp: genFx("hide"), 1.6808 + slideToggle: genFx("toggle"), 1.6809 + fadeIn: { opacity: "show" }, 1.6810 + fadeOut: { opacity: "hide" }, 1.6811 + fadeToggle: { opacity: "toggle" } 1.6812 +}, function( name, props ) { 1.6813 + jQuery.fn[ name ] = function( speed, easing, callback ) { 1.6814 + return this.animate( props, speed, easing, callback ); 1.6815 + }; 1.6816 +}); 1.6817 + 1.6818 +jQuery.timers = []; 1.6819 +jQuery.fx.tick = function() { 1.6820 + var timer, 1.6821 + i = 0, 1.6822 + timers = jQuery.timers; 1.6823 + 1.6824 + fxNow = jQuery.now(); 1.6825 + 1.6826 + for ( ; i < timers.length; i++ ) { 1.6827 + timer = timers[ i ]; 1.6828 + // Checks the timer has not already been removed 1.6829 + if ( !timer() && timers[ i ] === timer ) { 1.6830 + timers.splice( i--, 1 ); 1.6831 + } 1.6832 + } 1.6833 + 1.6834 + if ( !timers.length ) { 1.6835 + jQuery.fx.stop(); 1.6836 + } 1.6837 + fxNow = undefined; 1.6838 +}; 1.6839 + 1.6840 +jQuery.fx.timer = function( timer ) { 1.6841 + jQuery.timers.push( timer ); 1.6842 + if ( timer() ) { 1.6843 + jQuery.fx.start(); 1.6844 + } else { 1.6845 + jQuery.timers.pop(); 1.6846 + } 1.6847 +}; 1.6848 + 1.6849 +jQuery.fx.interval = 13; 1.6850 + 1.6851 +jQuery.fx.start = function() { 1.6852 + if ( !timerId ) { 1.6853 + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); 1.6854 + } 1.6855 +}; 1.6856 + 1.6857 +jQuery.fx.stop = function() { 1.6858 + clearInterval( timerId ); 1.6859 + timerId = null; 1.6860 +}; 1.6861 + 1.6862 +jQuery.fx.speeds = { 1.6863 + slow: 600, 1.6864 + fast: 200, 1.6865 + // Default speed 1.6866 + _default: 400 1.6867 +}; 1.6868 + 1.6869 + 1.6870 +// Based off of the plugin by Clint Helfers, with permission. 1.6871 +// http://blindsignals.com/index.php/2009/07/jquery-delay/ 1.6872 +jQuery.fn.delay = function( time, type ) { 1.6873 + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 1.6874 + type = type || "fx"; 1.6875 + 1.6876 + return this.queue( type, function( next, hooks ) { 1.6877 + var timeout = setTimeout( next, time ); 1.6878 + hooks.stop = function() { 1.6879 + clearTimeout( timeout ); 1.6880 + }; 1.6881 + }); 1.6882 +}; 1.6883 + 1.6884 + 1.6885 +(function() { 1.6886 + var input = document.createElement( "input" ), 1.6887 + select = document.createElement( "select" ), 1.6888 + opt = select.appendChild( document.createElement( "option" ) ); 1.6889 + 1.6890 + input.type = "checkbox"; 1.6891 + 1.6892 + // Support: iOS 5.1, Android 4.x, Android 2.3 1.6893 + // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere) 1.6894 + support.checkOn = input.value !== ""; 1.6895 + 1.6896 + // Must access the parent to make an option select properly 1.6897 + // Support: IE9, IE10 1.6898 + support.optSelected = opt.selected; 1.6899 + 1.6900 + // Make sure that the options inside disabled selects aren't marked as disabled 1.6901 + // (WebKit marks them as disabled) 1.6902 + select.disabled = true; 1.6903 + support.optDisabled = !opt.disabled; 1.6904 + 1.6905 + // Check if an input maintains its value after becoming a radio 1.6906 + // Support: IE9, IE10 1.6907 + input = document.createElement( "input" ); 1.6908 + input.value = "t"; 1.6909 + input.type = "radio"; 1.6910 + support.radioValue = input.value === "t"; 1.6911 +})(); 1.6912 + 1.6913 + 1.6914 +var nodeHook, boolHook, 1.6915 + attrHandle = jQuery.expr.attrHandle; 1.6916 + 1.6917 +jQuery.fn.extend({ 1.6918 + attr: function( name, value ) { 1.6919 + return access( this, jQuery.attr, name, value, arguments.length > 1 ); 1.6920 + }, 1.6921 + 1.6922 + removeAttr: function( name ) { 1.6923 + return this.each(function() { 1.6924 + jQuery.removeAttr( this, name ); 1.6925 + }); 1.6926 + } 1.6927 +}); 1.6928 + 1.6929 +jQuery.extend({ 1.6930 + attr: function( elem, name, value ) { 1.6931 + var hooks, ret, 1.6932 + nType = elem.nodeType; 1.6933 + 1.6934 + // don't get/set attributes on text, comment and attribute nodes 1.6935 + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { 1.6936 + return; 1.6937 + } 1.6938 + 1.6939 + // Fallback to prop when attributes are not supported 1.6940 + if ( typeof elem.getAttribute === strundefined ) { 1.6941 + return jQuery.prop( elem, name, value ); 1.6942 + } 1.6943 + 1.6944 + // All attributes are lowercase 1.6945 + // Grab necessary hook if one is defined 1.6946 + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 1.6947 + name = name.toLowerCase(); 1.6948 + hooks = jQuery.attrHooks[ name ] || 1.6949 + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); 1.6950 + } 1.6951 + 1.6952 + if ( value !== undefined ) { 1.6953 + 1.6954 + if ( value === null ) { 1.6955 + jQuery.removeAttr( elem, name ); 1.6956 + 1.6957 + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { 1.6958 + return ret; 1.6959 + 1.6960 + } else { 1.6961 + elem.setAttribute( name, value + "" ); 1.6962 + return value; 1.6963 + } 1.6964 + 1.6965 + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { 1.6966 + return ret; 1.6967 + 1.6968 + } else { 1.6969 + ret = jQuery.find.attr( elem, name ); 1.6970 + 1.6971 + // Non-existent attributes return null, we normalize to undefined 1.6972 + return ret == null ? 1.6973 + undefined : 1.6974 + ret; 1.6975 + } 1.6976 + }, 1.6977 + 1.6978 + removeAttr: function( elem, value ) { 1.6979 + var name, propName, 1.6980 + i = 0, 1.6981 + attrNames = value && value.match( rnotwhite ); 1.6982 + 1.6983 + if ( attrNames && elem.nodeType === 1 ) { 1.6984 + while ( (name = attrNames[i++]) ) { 1.6985 + propName = jQuery.propFix[ name ] || name; 1.6986 + 1.6987 + // Boolean attributes get special treatment (#10870) 1.6988 + if ( jQuery.expr.match.bool.test( name ) ) { 1.6989 + // Set corresponding property to false 1.6990 + elem[ propName ] = false; 1.6991 + } 1.6992 + 1.6993 + elem.removeAttribute( name ); 1.6994 + } 1.6995 + } 1.6996 + }, 1.6997 + 1.6998 + attrHooks: { 1.6999 + type: { 1.7000 + set: function( elem, value ) { 1.7001 + if ( !support.radioValue && value === "radio" && 1.7002 + jQuery.nodeName( elem, "input" ) ) { 1.7003 + // Setting the type on a radio button after the value resets the value in IE6-9 1.7004 + // Reset value to default in case type is set after value during creation 1.7005 + var val = elem.value; 1.7006 + elem.setAttribute( "type", value ); 1.7007 + if ( val ) { 1.7008 + elem.value = val; 1.7009 + } 1.7010 + return value; 1.7011 + } 1.7012 + } 1.7013 + } 1.7014 + } 1.7015 +}); 1.7016 + 1.7017 +// Hooks for boolean attributes 1.7018 +boolHook = { 1.7019 + set: function( elem, value, name ) { 1.7020 + if ( value === false ) { 1.7021 + // Remove boolean attributes when set to false 1.7022 + jQuery.removeAttr( elem, name ); 1.7023 + } else { 1.7024 + elem.setAttribute( name, name ); 1.7025 + } 1.7026 + return name; 1.7027 + } 1.7028 +}; 1.7029 +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { 1.7030 + var getter = attrHandle[ name ] || jQuery.find.attr; 1.7031 + 1.7032 + attrHandle[ name ] = function( elem, name, isXML ) { 1.7033 + var ret, handle; 1.7034 + if ( !isXML ) { 1.7035 + // Avoid an infinite loop by temporarily removing this function from the getter 1.7036 + handle = attrHandle[ name ]; 1.7037 + attrHandle[ name ] = ret; 1.7038 + ret = getter( elem, name, isXML ) != null ? 1.7039 + name.toLowerCase() : 1.7040 + null; 1.7041 + attrHandle[ name ] = handle; 1.7042 + } 1.7043 + return ret; 1.7044 + }; 1.7045 +}); 1.7046 + 1.7047 + 1.7048 + 1.7049 + 1.7050 +var rfocusable = /^(?:input|select|textarea|button)$/i; 1.7051 + 1.7052 +jQuery.fn.extend({ 1.7053 + prop: function( name, value ) { 1.7054 + return access( this, jQuery.prop, name, value, arguments.length > 1 ); 1.7055 + }, 1.7056 + 1.7057 + removeProp: function( name ) { 1.7058 + return this.each(function() { 1.7059 + delete this[ jQuery.propFix[ name ] || name ]; 1.7060 + }); 1.7061 + } 1.7062 +}); 1.7063 + 1.7064 +jQuery.extend({ 1.7065 + propFix: { 1.7066 + "for": "htmlFor", 1.7067 + "class": "className" 1.7068 + }, 1.7069 + 1.7070 + prop: function( elem, name, value ) { 1.7071 + var ret, hooks, notxml, 1.7072 + nType = elem.nodeType; 1.7073 + 1.7074 + // don't get/set properties on text, comment and attribute nodes 1.7075 + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { 1.7076 + return; 1.7077 + } 1.7078 + 1.7079 + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); 1.7080 + 1.7081 + if ( notxml ) { 1.7082 + // Fix name and attach hooks 1.7083 + name = jQuery.propFix[ name ] || name; 1.7084 + hooks = jQuery.propHooks[ name ]; 1.7085 + } 1.7086 + 1.7087 + if ( value !== undefined ) { 1.7088 + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? 1.7089 + ret : 1.7090 + ( elem[ name ] = value ); 1.7091 + 1.7092 + } else { 1.7093 + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? 1.7094 + ret : 1.7095 + elem[ name ]; 1.7096 + } 1.7097 + }, 1.7098 + 1.7099 + propHooks: { 1.7100 + tabIndex: { 1.7101 + get: function( elem ) { 1.7102 + return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ? 1.7103 + elem.tabIndex : 1.7104 + -1; 1.7105 + } 1.7106 + } 1.7107 + } 1.7108 +}); 1.7109 + 1.7110 +// Support: IE9+ 1.7111 +// Selectedness for an option in an optgroup can be inaccurate 1.7112 +if ( !support.optSelected ) { 1.7113 + jQuery.propHooks.selected = { 1.7114 + get: function( elem ) { 1.7115 + var parent = elem.parentNode; 1.7116 + if ( parent && parent.parentNode ) { 1.7117 + parent.parentNode.selectedIndex; 1.7118 + } 1.7119 + return null; 1.7120 + } 1.7121 + }; 1.7122 +} 1.7123 + 1.7124 +jQuery.each([ 1.7125 + "tabIndex", 1.7126 + "readOnly", 1.7127 + "maxLength", 1.7128 + "cellSpacing", 1.7129 + "cellPadding", 1.7130 + "rowSpan", 1.7131 + "colSpan", 1.7132 + "useMap", 1.7133 + "frameBorder", 1.7134 + "contentEditable" 1.7135 +], function() { 1.7136 + jQuery.propFix[ this.toLowerCase() ] = this; 1.7137 +}); 1.7138 + 1.7139 + 1.7140 + 1.7141 + 1.7142 +var rclass = /[\t\r\n\f]/g; 1.7143 + 1.7144 +jQuery.fn.extend({ 1.7145 + addClass: function( value ) { 1.7146 + var classes, elem, cur, clazz, j, finalValue, 1.7147 + proceed = typeof value === "string" && value, 1.7148 + i = 0, 1.7149 + len = this.length; 1.7150 + 1.7151 + if ( jQuery.isFunction( value ) ) { 1.7152 + return this.each(function( j ) { 1.7153 + jQuery( this ).addClass( value.call( this, j, this.className ) ); 1.7154 + }); 1.7155 + } 1.7156 + 1.7157 + if ( proceed ) { 1.7158 + // The disjunction here is for better compressibility (see removeClass) 1.7159 + classes = ( value || "" ).match( rnotwhite ) || []; 1.7160 + 1.7161 + for ( ; i < len; i++ ) { 1.7162 + elem = this[ i ]; 1.7163 + cur = elem.nodeType === 1 && ( elem.className ? 1.7164 + ( " " + elem.className + " " ).replace( rclass, " " ) : 1.7165 + " " 1.7166 + ); 1.7167 + 1.7168 + if ( cur ) { 1.7169 + j = 0; 1.7170 + while ( (clazz = classes[j++]) ) { 1.7171 + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 1.7172 + cur += clazz + " "; 1.7173 + } 1.7174 + } 1.7175 + 1.7176 + // only assign if different to avoid unneeded rendering. 1.7177 + finalValue = jQuery.trim( cur ); 1.7178 + if ( elem.className !== finalValue ) { 1.7179 + elem.className = finalValue; 1.7180 + } 1.7181 + } 1.7182 + } 1.7183 + } 1.7184 + 1.7185 + return this; 1.7186 + }, 1.7187 + 1.7188 + removeClass: function( value ) { 1.7189 + var classes, elem, cur, clazz, j, finalValue, 1.7190 + proceed = arguments.length === 0 || typeof value === "string" && value, 1.7191 + i = 0, 1.7192 + len = this.length; 1.7193 + 1.7194 + if ( jQuery.isFunction( value ) ) { 1.7195 + return this.each(function( j ) { 1.7196 + jQuery( this ).removeClass( value.call( this, j, this.className ) ); 1.7197 + }); 1.7198 + } 1.7199 + if ( proceed ) { 1.7200 + classes = ( value || "" ).match( rnotwhite ) || []; 1.7201 + 1.7202 + for ( ; i < len; i++ ) { 1.7203 + elem = this[ i ]; 1.7204 + // This expression is here for better compressibility (see addClass) 1.7205 + cur = elem.nodeType === 1 && ( elem.className ? 1.7206 + ( " " + elem.className + " " ).replace( rclass, " " ) : 1.7207 + "" 1.7208 + ); 1.7209 + 1.7210 + if ( cur ) { 1.7211 + j = 0; 1.7212 + while ( (clazz = classes[j++]) ) { 1.7213 + // Remove *all* instances 1.7214 + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { 1.7215 + cur = cur.replace( " " + clazz + " ", " " ); 1.7216 + } 1.7217 + } 1.7218 + 1.7219 + // only assign if different to avoid unneeded rendering. 1.7220 + finalValue = value ? jQuery.trim( cur ) : ""; 1.7221 + if ( elem.className !== finalValue ) { 1.7222 + elem.className = finalValue; 1.7223 + } 1.7224 + } 1.7225 + } 1.7226 + } 1.7227 + 1.7228 + return this; 1.7229 + }, 1.7230 + 1.7231 + toggleClass: function( value, stateVal ) { 1.7232 + var type = typeof value; 1.7233 + 1.7234 + if ( typeof stateVal === "boolean" && type === "string" ) { 1.7235 + return stateVal ? this.addClass( value ) : this.removeClass( value ); 1.7236 + } 1.7237 + 1.7238 + if ( jQuery.isFunction( value ) ) { 1.7239 + return this.each(function( i ) { 1.7240 + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); 1.7241 + }); 1.7242 + } 1.7243 + 1.7244 + return this.each(function() { 1.7245 + if ( type === "string" ) { 1.7246 + // toggle individual class names 1.7247 + var className, 1.7248 + i = 0, 1.7249 + self = jQuery( this ), 1.7250 + classNames = value.match( rnotwhite ) || []; 1.7251 + 1.7252 + while ( (className = classNames[ i++ ]) ) { 1.7253 + // check each className given, space separated list 1.7254 + if ( self.hasClass( className ) ) { 1.7255 + self.removeClass( className ); 1.7256 + } else { 1.7257 + self.addClass( className ); 1.7258 + } 1.7259 + } 1.7260 + 1.7261 + // Toggle whole class name 1.7262 + } else if ( type === strundefined || type === "boolean" ) { 1.7263 + if ( this.className ) { 1.7264 + // store className if set 1.7265 + data_priv.set( this, "__className__", this.className ); 1.7266 + } 1.7267 + 1.7268 + // If the element has a class name or if we're passed "false", 1.7269 + // then remove the whole classname (if there was one, the above saved it). 1.7270 + // Otherwise bring back whatever was previously saved (if anything), 1.7271 + // falling back to the empty string if nothing was stored. 1.7272 + this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || ""; 1.7273 + } 1.7274 + }); 1.7275 + }, 1.7276 + 1.7277 + hasClass: function( selector ) { 1.7278 + var className = " " + selector + " ", 1.7279 + i = 0, 1.7280 + l = this.length; 1.7281 + for ( ; i < l; i++ ) { 1.7282 + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { 1.7283 + return true; 1.7284 + } 1.7285 + } 1.7286 + 1.7287 + return false; 1.7288 + } 1.7289 +}); 1.7290 + 1.7291 + 1.7292 + 1.7293 + 1.7294 +var rreturn = /\r/g; 1.7295 + 1.7296 +jQuery.fn.extend({ 1.7297 + val: function( value ) { 1.7298 + var hooks, ret, isFunction, 1.7299 + elem = this[0]; 1.7300 + 1.7301 + if ( !arguments.length ) { 1.7302 + if ( elem ) { 1.7303 + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 1.7304 + 1.7305 + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { 1.7306 + return ret; 1.7307 + } 1.7308 + 1.7309 + ret = elem.value; 1.7310 + 1.7311 + return typeof ret === "string" ? 1.7312 + // handle most common string cases 1.7313 + ret.replace(rreturn, "") : 1.7314 + // handle cases where value is null/undef or number 1.7315 + ret == null ? "" : ret; 1.7316 + } 1.7317 + 1.7318 + return; 1.7319 + } 1.7320 + 1.7321 + isFunction = jQuery.isFunction( value ); 1.7322 + 1.7323 + return this.each(function( i ) { 1.7324 + var val; 1.7325 + 1.7326 + if ( this.nodeType !== 1 ) { 1.7327 + return; 1.7328 + } 1.7329 + 1.7330 + if ( isFunction ) { 1.7331 + val = value.call( this, i, jQuery( this ).val() ); 1.7332 + } else { 1.7333 + val = value; 1.7334 + } 1.7335 + 1.7336 + // Treat null/undefined as ""; convert numbers to string 1.7337 + if ( val == null ) { 1.7338 + val = ""; 1.7339 + 1.7340 + } else if ( typeof val === "number" ) { 1.7341 + val += ""; 1.7342 + 1.7343 + } else if ( jQuery.isArray( val ) ) { 1.7344 + val = jQuery.map( val, function( value ) { 1.7345 + return value == null ? "" : value + ""; 1.7346 + }); 1.7347 + } 1.7348 + 1.7349 + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 1.7350 + 1.7351 + // If set returns undefined, fall back to normal setting 1.7352 + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { 1.7353 + this.value = val; 1.7354 + } 1.7355 + }); 1.7356 + } 1.7357 +}); 1.7358 + 1.7359 +jQuery.extend({ 1.7360 + valHooks: { 1.7361 + option: { 1.7362 + get: function( elem ) { 1.7363 + var val = jQuery.find.attr( elem, "value" ); 1.7364 + return val != null ? 1.7365 + val : 1.7366 + // Support: IE10-11+ 1.7367 + // option.text throws exceptions (#14686, #14858) 1.7368 + jQuery.trim( jQuery.text( elem ) ); 1.7369 + } 1.7370 + }, 1.7371 + select: { 1.7372 + get: function( elem ) { 1.7373 + var value, option, 1.7374 + options = elem.options, 1.7375 + index = elem.selectedIndex, 1.7376 + one = elem.type === "select-one" || index < 0, 1.7377 + values = one ? null : [], 1.7378 + max = one ? index + 1 : options.length, 1.7379 + i = index < 0 ? 1.7380 + max : 1.7381 + one ? index : 0; 1.7382 + 1.7383 + // Loop through all the selected options 1.7384 + for ( ; i < max; i++ ) { 1.7385 + option = options[ i ]; 1.7386 + 1.7387 + // IE6-9 doesn't update selected after form reset (#2551) 1.7388 + if ( ( option.selected || i === index ) && 1.7389 + // Don't return options that are disabled or in a disabled optgroup 1.7390 + ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) && 1.7391 + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { 1.7392 + 1.7393 + // Get the specific value for the option 1.7394 + value = jQuery( option ).val(); 1.7395 + 1.7396 + // We don't need an array for one selects 1.7397 + if ( one ) { 1.7398 + return value; 1.7399 + } 1.7400 + 1.7401 + // Multi-Selects return an array 1.7402 + values.push( value ); 1.7403 + } 1.7404 + } 1.7405 + 1.7406 + return values; 1.7407 + }, 1.7408 + 1.7409 + set: function( elem, value ) { 1.7410 + var optionSet, option, 1.7411 + options = elem.options, 1.7412 + values = jQuery.makeArray( value ), 1.7413 + i = options.length; 1.7414 + 1.7415 + while ( i-- ) { 1.7416 + option = options[ i ]; 1.7417 + if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) { 1.7418 + optionSet = true; 1.7419 + } 1.7420 + } 1.7421 + 1.7422 + // force browsers to behave consistently when non-matching value is set 1.7423 + if ( !optionSet ) { 1.7424 + elem.selectedIndex = -1; 1.7425 + } 1.7426 + return values; 1.7427 + } 1.7428 + } 1.7429 + } 1.7430 +}); 1.7431 + 1.7432 +// Radios and checkboxes getter/setter 1.7433 +jQuery.each([ "radio", "checkbox" ], function() { 1.7434 + jQuery.valHooks[ this ] = { 1.7435 + set: function( elem, value ) { 1.7436 + if ( jQuery.isArray( value ) ) { 1.7437 + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); 1.7438 + } 1.7439 + } 1.7440 + }; 1.7441 + if ( !support.checkOn ) { 1.7442 + jQuery.valHooks[ this ].get = function( elem ) { 1.7443 + // Support: Webkit 1.7444 + // "" is returned instead of "on" if a value isn't specified 1.7445 + return elem.getAttribute("value") === null ? "on" : elem.value; 1.7446 + }; 1.7447 + } 1.7448 +}); 1.7449 + 1.7450 + 1.7451 + 1.7452 + 1.7453 +// Return jQuery for attributes-only inclusion 1.7454 + 1.7455 + 1.7456 +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + 1.7457 + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 1.7458 + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { 1.7459 + 1.7460 + // Handle event binding 1.7461 + jQuery.fn[ name ] = function( data, fn ) { 1.7462 + return arguments.length > 0 ? 1.7463 + this.on( name, null, data, fn ) : 1.7464 + this.trigger( name ); 1.7465 + }; 1.7466 +}); 1.7467 + 1.7468 +jQuery.fn.extend({ 1.7469 + hover: function( fnOver, fnOut ) { 1.7470 + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 1.7471 + }, 1.7472 + 1.7473 + bind: function( types, data, fn ) { 1.7474 + return this.on( types, null, data, fn ); 1.7475 + }, 1.7476 + unbind: function( types, fn ) { 1.7477 + return this.off( types, null, fn ); 1.7478 + }, 1.7479 + 1.7480 + delegate: function( selector, types, data, fn ) { 1.7481 + return this.on( types, selector, data, fn ); 1.7482 + }, 1.7483 + undelegate: function( selector, types, fn ) { 1.7484 + // ( namespace ) or ( selector, types [, fn] ) 1.7485 + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); 1.7486 + } 1.7487 +}); 1.7488 + 1.7489 + 1.7490 +var nonce = jQuery.now(); 1.7491 + 1.7492 +var rquery = (/\?/); 1.7493 + 1.7494 + 1.7495 + 1.7496 +// Support: Android 2.3 1.7497 +// Workaround failure to string-cast null input 1.7498 +jQuery.parseJSON = function( data ) { 1.7499 + return JSON.parse( data + "" ); 1.7500 +}; 1.7501 + 1.7502 + 1.7503 +// Cross-browser xml parsing 1.7504 +jQuery.parseXML = function( data ) { 1.7505 + var xml, tmp; 1.7506 + if ( !data || typeof data !== "string" ) { 1.7507 + return null; 1.7508 + } 1.7509 + 1.7510 + // Support: IE9 1.7511 + try { 1.7512 + tmp = new DOMParser(); 1.7513 + xml = tmp.parseFromString( data, "text/xml" ); 1.7514 + } catch ( e ) { 1.7515 + xml = undefined; 1.7516 + } 1.7517 + 1.7518 + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 1.7519 + jQuery.error( "Invalid XML: " + data ); 1.7520 + } 1.7521 + return xml; 1.7522 +}; 1.7523 + 1.7524 + 1.7525 +var 1.7526 + // Document location 1.7527 + ajaxLocParts, 1.7528 + ajaxLocation, 1.7529 + 1.7530 + rhash = /#.*$/, 1.7531 + rts = /([?&])_=[^&]*/, 1.7532 + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 1.7533 + // #7653, #8125, #8152: local protocol detection 1.7534 + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 1.7535 + rnoContent = /^(?:GET|HEAD)$/, 1.7536 + rprotocol = /^\/\//, 1.7537 + rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, 1.7538 + 1.7539 + /* Prefilters 1.7540 + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 1.7541 + * 2) These are called: 1.7542 + * - BEFORE asking for a transport 1.7543 + * - AFTER param serialization (s.data is a string if s.processData is true) 1.7544 + * 3) key is the dataType 1.7545 + * 4) the catchall symbol "*" can be used 1.7546 + * 5) execution will start with transport dataType and THEN continue down to "*" if needed 1.7547 + */ 1.7548 + prefilters = {}, 1.7549 + 1.7550 + /* Transports bindings 1.7551 + * 1) key is the dataType 1.7552 + * 2) the catchall symbol "*" can be used 1.7553 + * 3) selection will start with transport dataType and THEN go to "*" if needed 1.7554 + */ 1.7555 + transports = {}, 1.7556 + 1.7557 + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 1.7558 + allTypes = "*/".concat("*"); 1.7559 + 1.7560 +// #8138, IE may throw an exception when accessing 1.7561 +// a field from window.location if document.domain has been set 1.7562 +try { 1.7563 + ajaxLocation = location.href; 1.7564 +} catch( e ) { 1.7565 + // Use the href attribute of an A element 1.7566 + // since IE will modify it given document.location 1.7567 + ajaxLocation = document.createElement( "a" ); 1.7568 + ajaxLocation.href = ""; 1.7569 + ajaxLocation = ajaxLocation.href; 1.7570 +} 1.7571 + 1.7572 +// Segment location into parts 1.7573 +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; 1.7574 + 1.7575 +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 1.7576 +function addToPrefiltersOrTransports( structure ) { 1.7577 + 1.7578 + // dataTypeExpression is optional and defaults to "*" 1.7579 + return function( dataTypeExpression, func ) { 1.7580 + 1.7581 + if ( typeof dataTypeExpression !== "string" ) { 1.7582 + func = dataTypeExpression; 1.7583 + dataTypeExpression = "*"; 1.7584 + } 1.7585 + 1.7586 + var dataType, 1.7587 + i = 0, 1.7588 + dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; 1.7589 + 1.7590 + if ( jQuery.isFunction( func ) ) { 1.7591 + // For each dataType in the dataTypeExpression 1.7592 + while ( (dataType = dataTypes[i++]) ) { 1.7593 + // Prepend if requested 1.7594 + if ( dataType[0] === "+" ) { 1.7595 + dataType = dataType.slice( 1 ) || "*"; 1.7596 + (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); 1.7597 + 1.7598 + // Otherwise append 1.7599 + } else { 1.7600 + (structure[ dataType ] = structure[ dataType ] || []).push( func ); 1.7601 + } 1.7602 + } 1.7603 + } 1.7604 + }; 1.7605 +} 1.7606 + 1.7607 +// Base inspection function for prefilters and transports 1.7608 +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 1.7609 + 1.7610 + var inspected = {}, 1.7611 + seekingTransport = ( structure === transports ); 1.7612 + 1.7613 + function inspect( dataType ) { 1.7614 + var selected; 1.7615 + inspected[ dataType ] = true; 1.7616 + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 1.7617 + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 1.7618 + if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 1.7619 + options.dataTypes.unshift( dataTypeOrTransport ); 1.7620 + inspect( dataTypeOrTransport ); 1.7621 + return false; 1.7622 + } else if ( seekingTransport ) { 1.7623 + return !( selected = dataTypeOrTransport ); 1.7624 + } 1.7625 + }); 1.7626 + return selected; 1.7627 + } 1.7628 + 1.7629 + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 1.7630 +} 1.7631 + 1.7632 +// A special extend for ajax options 1.7633 +// that takes "flat" options (not to be deep extended) 1.7634 +// Fixes #9887 1.7635 +function ajaxExtend( target, src ) { 1.7636 + var key, deep, 1.7637 + flatOptions = jQuery.ajaxSettings.flatOptions || {}; 1.7638 + 1.7639 + for ( key in src ) { 1.7640 + if ( src[ key ] !== undefined ) { 1.7641 + ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; 1.7642 + } 1.7643 + } 1.7644 + if ( deep ) { 1.7645 + jQuery.extend( true, target, deep ); 1.7646 + } 1.7647 + 1.7648 + return target; 1.7649 +} 1.7650 + 1.7651 +/* Handles responses to an ajax request: 1.7652 + * - finds the right dataType (mediates between content-type and expected dataType) 1.7653 + * - returns the corresponding response 1.7654 + */ 1.7655 +function ajaxHandleResponses( s, jqXHR, responses ) { 1.7656 + 1.7657 + var ct, type, finalDataType, firstDataType, 1.7658 + contents = s.contents, 1.7659 + dataTypes = s.dataTypes; 1.7660 + 1.7661 + // Remove auto dataType and get content-type in the process 1.7662 + while ( dataTypes[ 0 ] === "*" ) { 1.7663 + dataTypes.shift(); 1.7664 + if ( ct === undefined ) { 1.7665 + ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 1.7666 + } 1.7667 + } 1.7668 + 1.7669 + // Check if we're dealing with a known content-type 1.7670 + if ( ct ) { 1.7671 + for ( type in contents ) { 1.7672 + if ( contents[ type ] && contents[ type ].test( ct ) ) { 1.7673 + dataTypes.unshift( type ); 1.7674 + break; 1.7675 + } 1.7676 + } 1.7677 + } 1.7678 + 1.7679 + // Check to see if we have a response for the expected dataType 1.7680 + if ( dataTypes[ 0 ] in responses ) { 1.7681 + finalDataType = dataTypes[ 0 ]; 1.7682 + } else { 1.7683 + // Try convertible dataTypes 1.7684 + for ( type in responses ) { 1.7685 + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { 1.7686 + finalDataType = type; 1.7687 + break; 1.7688 + } 1.7689 + if ( !firstDataType ) { 1.7690 + firstDataType = type; 1.7691 + } 1.7692 + } 1.7693 + // Or just use first one 1.7694 + finalDataType = finalDataType || firstDataType; 1.7695 + } 1.7696 + 1.7697 + // If we found a dataType 1.7698 + // We add the dataType to the list if needed 1.7699 + // and return the corresponding response 1.7700 + if ( finalDataType ) { 1.7701 + if ( finalDataType !== dataTypes[ 0 ] ) { 1.7702 + dataTypes.unshift( finalDataType ); 1.7703 + } 1.7704 + return responses[ finalDataType ]; 1.7705 + } 1.7706 +} 1.7707 + 1.7708 +/* Chain conversions given the request and the original response 1.7709 + * Also sets the responseXXX fields on the jqXHR instance 1.7710 + */ 1.7711 +function ajaxConvert( s, response, jqXHR, isSuccess ) { 1.7712 + var conv2, current, conv, tmp, prev, 1.7713 + converters = {}, 1.7714 + // Work with a copy of dataTypes in case we need to modify it for conversion 1.7715 + dataTypes = s.dataTypes.slice(); 1.7716 + 1.7717 + // Create converters map with lowercased keys 1.7718 + if ( dataTypes[ 1 ] ) { 1.7719 + for ( conv in s.converters ) { 1.7720 + converters[ conv.toLowerCase() ] = s.converters[ conv ]; 1.7721 + } 1.7722 + } 1.7723 + 1.7724 + current = dataTypes.shift(); 1.7725 + 1.7726 + // Convert to each sequential dataType 1.7727 + while ( current ) { 1.7728 + 1.7729 + if ( s.responseFields[ current ] ) { 1.7730 + jqXHR[ s.responseFields[ current ] ] = response; 1.7731 + } 1.7732 + 1.7733 + // Apply the dataFilter if provided 1.7734 + if ( !prev && isSuccess && s.dataFilter ) { 1.7735 + response = s.dataFilter( response, s.dataType ); 1.7736 + } 1.7737 + 1.7738 + prev = current; 1.7739 + current = dataTypes.shift(); 1.7740 + 1.7741 + if ( current ) { 1.7742 + 1.7743 + // There's only work to do if current dataType is non-auto 1.7744 + if ( current === "*" ) { 1.7745 + 1.7746 + current = prev; 1.7747 + 1.7748 + // Convert response if prev dataType is non-auto and differs from current 1.7749 + } else if ( prev !== "*" && prev !== current ) { 1.7750 + 1.7751 + // Seek a direct converter 1.7752 + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 1.7753 + 1.7754 + // If none found, seek a pair 1.7755 + if ( !conv ) { 1.7756 + for ( conv2 in converters ) { 1.7757 + 1.7758 + // If conv2 outputs current 1.7759 + tmp = conv2.split( " " ); 1.7760 + if ( tmp[ 1 ] === current ) { 1.7761 + 1.7762 + // If prev can be converted to accepted input 1.7763 + conv = converters[ prev + " " + tmp[ 0 ] ] || 1.7764 + converters[ "* " + tmp[ 0 ] ]; 1.7765 + if ( conv ) { 1.7766 + // Condense equivalence converters 1.7767 + if ( conv === true ) { 1.7768 + conv = converters[ conv2 ]; 1.7769 + 1.7770 + // Otherwise, insert the intermediate dataType 1.7771 + } else if ( converters[ conv2 ] !== true ) { 1.7772 + current = tmp[ 0 ]; 1.7773 + dataTypes.unshift( tmp[ 1 ] ); 1.7774 + } 1.7775 + break; 1.7776 + } 1.7777 + } 1.7778 + } 1.7779 + } 1.7780 + 1.7781 + // Apply converter (if not an equivalence) 1.7782 + if ( conv !== true ) { 1.7783 + 1.7784 + // Unless errors are allowed to bubble, catch and return them 1.7785 + if ( conv && s[ "throws" ] ) { 1.7786 + response = conv( response ); 1.7787 + } else { 1.7788 + try { 1.7789 + response = conv( response ); 1.7790 + } catch ( e ) { 1.7791 + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; 1.7792 + } 1.7793 + } 1.7794 + } 1.7795 + } 1.7796 + } 1.7797 + } 1.7798 + 1.7799 + return { state: "success", data: response }; 1.7800 +} 1.7801 + 1.7802 +jQuery.extend({ 1.7803 + 1.7804 + // Counter for holding the number of active queries 1.7805 + active: 0, 1.7806 + 1.7807 + // Last-Modified header cache for next request 1.7808 + lastModified: {}, 1.7809 + etag: {}, 1.7810 + 1.7811 + ajaxSettings: { 1.7812 + url: ajaxLocation, 1.7813 + type: "GET", 1.7814 + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), 1.7815 + global: true, 1.7816 + processData: true, 1.7817 + async: true, 1.7818 + contentType: "application/x-www-form-urlencoded; charset=UTF-8", 1.7819 + /* 1.7820 + timeout: 0, 1.7821 + data: null, 1.7822 + dataType: null, 1.7823 + username: null, 1.7824 + password: null, 1.7825 + cache: null, 1.7826 + throws: false, 1.7827 + traditional: false, 1.7828 + headers: {}, 1.7829 + */ 1.7830 + 1.7831 + accepts: { 1.7832 + "*": allTypes, 1.7833 + text: "text/plain", 1.7834 + html: "text/html", 1.7835 + xml: "application/xml, text/xml", 1.7836 + json: "application/json, text/javascript" 1.7837 + }, 1.7838 + 1.7839 + contents: { 1.7840 + xml: /xml/, 1.7841 + html: /html/, 1.7842 + json: /json/ 1.7843 + }, 1.7844 + 1.7845 + responseFields: { 1.7846 + xml: "responseXML", 1.7847 + text: "responseText", 1.7848 + json: "responseJSON" 1.7849 + }, 1.7850 + 1.7851 + // Data converters 1.7852 + // Keys separate source (or catchall "*") and destination types with a single space 1.7853 + converters: { 1.7854 + 1.7855 + // Convert anything to text 1.7856 + "* text": String, 1.7857 + 1.7858 + // Text to html (true = no transformation) 1.7859 + "text html": true, 1.7860 + 1.7861 + // Evaluate text as a json expression 1.7862 + "text json": jQuery.parseJSON, 1.7863 + 1.7864 + // Parse text as xml 1.7865 + "text xml": jQuery.parseXML 1.7866 + }, 1.7867 + 1.7868 + // For options that shouldn't be deep extended: 1.7869 + // you can add your own custom options here if 1.7870 + // and when you create one that shouldn't be 1.7871 + // deep extended (see ajaxExtend) 1.7872 + flatOptions: { 1.7873 + url: true, 1.7874 + context: true 1.7875 + } 1.7876 + }, 1.7877 + 1.7878 + // Creates a full fledged settings object into target 1.7879 + // with both ajaxSettings and settings fields. 1.7880 + // If target is omitted, writes into ajaxSettings. 1.7881 + ajaxSetup: function( target, settings ) { 1.7882 + return settings ? 1.7883 + 1.7884 + // Building a settings object 1.7885 + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 1.7886 + 1.7887 + // Extending ajaxSettings 1.7888 + ajaxExtend( jQuery.ajaxSettings, target ); 1.7889 + }, 1.7890 + 1.7891 + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 1.7892 + ajaxTransport: addToPrefiltersOrTransports( transports ), 1.7893 + 1.7894 + // Main method 1.7895 + ajax: function( url, options ) { 1.7896 + 1.7897 + // If url is an object, simulate pre-1.5 signature 1.7898 + if ( typeof url === "object" ) { 1.7899 + options = url; 1.7900 + url = undefined; 1.7901 + } 1.7902 + 1.7903 + // Force options to be an object 1.7904 + options = options || {}; 1.7905 + 1.7906 + var transport, 1.7907 + // URL without anti-cache param 1.7908 + cacheURL, 1.7909 + // Response headers 1.7910 + responseHeadersString, 1.7911 + responseHeaders, 1.7912 + // timeout handle 1.7913 + timeoutTimer, 1.7914 + // Cross-domain detection vars 1.7915 + parts, 1.7916 + // To know if global events are to be dispatched 1.7917 + fireGlobals, 1.7918 + // Loop variable 1.7919 + i, 1.7920 + // Create the final options object 1.7921 + s = jQuery.ajaxSetup( {}, options ), 1.7922 + // Callbacks context 1.7923 + callbackContext = s.context || s, 1.7924 + // Context for global events is callbackContext if it is a DOM node or jQuery collection 1.7925 + globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? 1.7926 + jQuery( callbackContext ) : 1.7927 + jQuery.event, 1.7928 + // Deferreds 1.7929 + deferred = jQuery.Deferred(), 1.7930 + completeDeferred = jQuery.Callbacks("once memory"), 1.7931 + // Status-dependent callbacks 1.7932 + statusCode = s.statusCode || {}, 1.7933 + // Headers (they are sent all at once) 1.7934 + requestHeaders = {}, 1.7935 + requestHeadersNames = {}, 1.7936 + // The jqXHR state 1.7937 + state = 0, 1.7938 + // Default abort message 1.7939 + strAbort = "canceled", 1.7940 + // Fake xhr 1.7941 + jqXHR = { 1.7942 + readyState: 0, 1.7943 + 1.7944 + // Builds headers hashtable if needed 1.7945 + getResponseHeader: function( key ) { 1.7946 + var match; 1.7947 + if ( state === 2 ) { 1.7948 + if ( !responseHeaders ) { 1.7949 + responseHeaders = {}; 1.7950 + while ( (match = rheaders.exec( responseHeadersString )) ) { 1.7951 + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; 1.7952 + } 1.7953 + } 1.7954 + match = responseHeaders[ key.toLowerCase() ]; 1.7955 + } 1.7956 + return match == null ? null : match; 1.7957 + }, 1.7958 + 1.7959 + // Raw string 1.7960 + getAllResponseHeaders: function() { 1.7961 + return state === 2 ? responseHeadersString : null; 1.7962 + }, 1.7963 + 1.7964 + // Caches the header 1.7965 + setRequestHeader: function( name, value ) { 1.7966 + var lname = name.toLowerCase(); 1.7967 + if ( !state ) { 1.7968 + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; 1.7969 + requestHeaders[ name ] = value; 1.7970 + } 1.7971 + return this; 1.7972 + }, 1.7973 + 1.7974 + // Overrides response content-type header 1.7975 + overrideMimeType: function( type ) { 1.7976 + if ( !state ) { 1.7977 + s.mimeType = type; 1.7978 + } 1.7979 + return this; 1.7980 + }, 1.7981 + 1.7982 + // Status-dependent callbacks 1.7983 + statusCode: function( map ) { 1.7984 + var code; 1.7985 + if ( map ) { 1.7986 + if ( state < 2 ) { 1.7987 + for ( code in map ) { 1.7988 + // Lazy-add the new callback in a way that preserves old ones 1.7989 + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 1.7990 + } 1.7991 + } else { 1.7992 + // Execute the appropriate callbacks 1.7993 + jqXHR.always( map[ jqXHR.status ] ); 1.7994 + } 1.7995 + } 1.7996 + return this; 1.7997 + }, 1.7998 + 1.7999 + // Cancel the request 1.8000 + abort: function( statusText ) { 1.8001 + var finalText = statusText || strAbort; 1.8002 + if ( transport ) { 1.8003 + transport.abort( finalText ); 1.8004 + } 1.8005 + done( 0, finalText ); 1.8006 + return this; 1.8007 + } 1.8008 + }; 1.8009 + 1.8010 + // Attach deferreds 1.8011 + deferred.promise( jqXHR ).complete = completeDeferred.add; 1.8012 + jqXHR.success = jqXHR.done; 1.8013 + jqXHR.error = jqXHR.fail; 1.8014 + 1.8015 + // Remove hash character (#7531: and string promotion) 1.8016 + // Add protocol if not provided (prefilters might expect it) 1.8017 + // Handle falsy url in the settings object (#10093: consistency with old signature) 1.8018 + // We also use the url parameter if available 1.8019 + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ) 1.8020 + .replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); 1.8021 + 1.8022 + // Alias method option to type as per ticket #12004 1.8023 + s.type = options.method || options.type || s.method || s.type; 1.8024 + 1.8025 + // Extract dataTypes list 1.8026 + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; 1.8027 + 1.8028 + // A cross-domain request is in order when we have a protocol:host:port mismatch 1.8029 + if ( s.crossDomain == null ) { 1.8030 + parts = rurl.exec( s.url.toLowerCase() ); 1.8031 + s.crossDomain = !!( parts && 1.8032 + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || 1.8033 + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== 1.8034 + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) 1.8035 + ); 1.8036 + } 1.8037 + 1.8038 + // Convert data if not already a string 1.8039 + if ( s.data && s.processData && typeof s.data !== "string" ) { 1.8040 + s.data = jQuery.param( s.data, s.traditional ); 1.8041 + } 1.8042 + 1.8043 + // Apply prefilters 1.8044 + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 1.8045 + 1.8046 + // If request was aborted inside a prefilter, stop there 1.8047 + if ( state === 2 ) { 1.8048 + return jqXHR; 1.8049 + } 1.8050 + 1.8051 + // We can fire global events as of now if asked to 1.8052 + fireGlobals = s.global; 1.8053 + 1.8054 + // Watch for a new set of requests 1.8055 + if ( fireGlobals && jQuery.active++ === 0 ) { 1.8056 + jQuery.event.trigger("ajaxStart"); 1.8057 + } 1.8058 + 1.8059 + // Uppercase the type 1.8060 + s.type = s.type.toUpperCase(); 1.8061 + 1.8062 + // Determine if request has content 1.8063 + s.hasContent = !rnoContent.test( s.type ); 1.8064 + 1.8065 + // Save the URL in case we're toying with the If-Modified-Since 1.8066 + // and/or If-None-Match header later on 1.8067 + cacheURL = s.url; 1.8068 + 1.8069 + // More options handling for requests with no content 1.8070 + if ( !s.hasContent ) { 1.8071 + 1.8072 + // If data is available, append data to url 1.8073 + if ( s.data ) { 1.8074 + cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); 1.8075 + // #9682: remove data so that it's not used in an eventual retry 1.8076 + delete s.data; 1.8077 + } 1.8078 + 1.8079 + // Add anti-cache in url if needed 1.8080 + if ( s.cache === false ) { 1.8081 + s.url = rts.test( cacheURL ) ? 1.8082 + 1.8083 + // If there is already a '_' parameter, set its value 1.8084 + cacheURL.replace( rts, "$1_=" + nonce++ ) : 1.8085 + 1.8086 + // Otherwise add one to the end 1.8087 + cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; 1.8088 + } 1.8089 + } 1.8090 + 1.8091 + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 1.8092 + if ( s.ifModified ) { 1.8093 + if ( jQuery.lastModified[ cacheURL ] ) { 1.8094 + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 1.8095 + } 1.8096 + if ( jQuery.etag[ cacheURL ] ) { 1.8097 + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 1.8098 + } 1.8099 + } 1.8100 + 1.8101 + // Set the correct header, if data is being sent 1.8102 + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 1.8103 + jqXHR.setRequestHeader( "Content-Type", s.contentType ); 1.8104 + } 1.8105 + 1.8106 + // Set the Accepts header for the server, depending on the dataType 1.8107 + jqXHR.setRequestHeader( 1.8108 + "Accept", 1.8109 + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? 1.8110 + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 1.8111 + s.accepts[ "*" ] 1.8112 + ); 1.8113 + 1.8114 + // Check for headers option 1.8115 + for ( i in s.headers ) { 1.8116 + jqXHR.setRequestHeader( i, s.headers[ i ] ); 1.8117 + } 1.8118 + 1.8119 + // Allow custom headers/mimetypes and early abort 1.8120 + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { 1.8121 + // Abort if not done already and return 1.8122 + return jqXHR.abort(); 1.8123 + } 1.8124 + 1.8125 + // aborting is no longer a cancellation 1.8126 + strAbort = "abort"; 1.8127 + 1.8128 + // Install callbacks on deferreds 1.8129 + for ( i in { success: 1, error: 1, complete: 1 } ) { 1.8130 + jqXHR[ i ]( s[ i ] ); 1.8131 + } 1.8132 + 1.8133 + // Get transport 1.8134 + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 1.8135 + 1.8136 + // If no transport, we auto-abort 1.8137 + if ( !transport ) { 1.8138 + done( -1, "No Transport" ); 1.8139 + } else { 1.8140 + jqXHR.readyState = 1; 1.8141 + 1.8142 + // Send global event 1.8143 + if ( fireGlobals ) { 1.8144 + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 1.8145 + } 1.8146 + // Timeout 1.8147 + if ( s.async && s.timeout > 0 ) { 1.8148 + timeoutTimer = setTimeout(function() { 1.8149 + jqXHR.abort("timeout"); 1.8150 + }, s.timeout ); 1.8151 + } 1.8152 + 1.8153 + try { 1.8154 + state = 1; 1.8155 + transport.send( requestHeaders, done ); 1.8156 + } catch ( e ) { 1.8157 + // Propagate exception as error if not done 1.8158 + if ( state < 2 ) { 1.8159 + done( -1, e ); 1.8160 + // Simply rethrow otherwise 1.8161 + } else { 1.8162 + throw e; 1.8163 + } 1.8164 + } 1.8165 + } 1.8166 + 1.8167 + // Callback for when everything is done 1.8168 + function done( status, nativeStatusText, responses, headers ) { 1.8169 + var isSuccess, success, error, response, modified, 1.8170 + statusText = nativeStatusText; 1.8171 + 1.8172 + // Called once 1.8173 + if ( state === 2 ) { 1.8174 + return; 1.8175 + } 1.8176 + 1.8177 + // State is "done" now 1.8178 + state = 2; 1.8179 + 1.8180 + // Clear timeout if it exists 1.8181 + if ( timeoutTimer ) { 1.8182 + clearTimeout( timeoutTimer ); 1.8183 + } 1.8184 + 1.8185 + // Dereference transport for early garbage collection 1.8186 + // (no matter how long the jqXHR object will be used) 1.8187 + transport = undefined; 1.8188 + 1.8189 + // Cache response headers 1.8190 + responseHeadersString = headers || ""; 1.8191 + 1.8192 + // Set readyState 1.8193 + jqXHR.readyState = status > 0 ? 4 : 0; 1.8194 + 1.8195 + // Determine if successful 1.8196 + isSuccess = status >= 200 && status < 300 || status === 304; 1.8197 + 1.8198 + // Get response data 1.8199 + if ( responses ) { 1.8200 + response = ajaxHandleResponses( s, jqXHR, responses ); 1.8201 + } 1.8202 + 1.8203 + // Convert no matter what (that way responseXXX fields are always set) 1.8204 + response = ajaxConvert( s, response, jqXHR, isSuccess ); 1.8205 + 1.8206 + // If successful, handle type chaining 1.8207 + if ( isSuccess ) { 1.8208 + 1.8209 + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 1.8210 + if ( s.ifModified ) { 1.8211 + modified = jqXHR.getResponseHeader("Last-Modified"); 1.8212 + if ( modified ) { 1.8213 + jQuery.lastModified[ cacheURL ] = modified; 1.8214 + } 1.8215 + modified = jqXHR.getResponseHeader("etag"); 1.8216 + if ( modified ) { 1.8217 + jQuery.etag[ cacheURL ] = modified; 1.8218 + } 1.8219 + } 1.8220 + 1.8221 + // if no content 1.8222 + if ( status === 204 || s.type === "HEAD" ) { 1.8223 + statusText = "nocontent"; 1.8224 + 1.8225 + // if not modified 1.8226 + } else if ( status === 304 ) { 1.8227 + statusText = "notmodified"; 1.8228 + 1.8229 + // If we have data, let's convert it 1.8230 + } else { 1.8231 + statusText = response.state; 1.8232 + success = response.data; 1.8233 + error = response.error; 1.8234 + isSuccess = !error; 1.8235 + } 1.8236 + } else { 1.8237 + // We extract error from statusText 1.8238 + // then normalize statusText and status for non-aborts 1.8239 + error = statusText; 1.8240 + if ( status || !statusText ) { 1.8241 + statusText = "error"; 1.8242 + if ( status < 0 ) { 1.8243 + status = 0; 1.8244 + } 1.8245 + } 1.8246 + } 1.8247 + 1.8248 + // Set data for the fake xhr object 1.8249 + jqXHR.status = status; 1.8250 + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 1.8251 + 1.8252 + // Success/Error 1.8253 + if ( isSuccess ) { 1.8254 + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 1.8255 + } else { 1.8256 + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 1.8257 + } 1.8258 + 1.8259 + // Status-dependent callbacks 1.8260 + jqXHR.statusCode( statusCode ); 1.8261 + statusCode = undefined; 1.8262 + 1.8263 + if ( fireGlobals ) { 1.8264 + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 1.8265 + [ jqXHR, s, isSuccess ? success : error ] ); 1.8266 + } 1.8267 + 1.8268 + // Complete 1.8269 + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 1.8270 + 1.8271 + if ( fireGlobals ) { 1.8272 + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 1.8273 + // Handle the global AJAX counter 1.8274 + if ( !( --jQuery.active ) ) { 1.8275 + jQuery.event.trigger("ajaxStop"); 1.8276 + } 1.8277 + } 1.8278 + } 1.8279 + 1.8280 + return jqXHR; 1.8281 + }, 1.8282 + 1.8283 + getJSON: function( url, data, callback ) { 1.8284 + return jQuery.get( url, data, callback, "json" ); 1.8285 + }, 1.8286 + 1.8287 + getScript: function( url, callback ) { 1.8288 + return jQuery.get( url, undefined, callback, "script" ); 1.8289 + } 1.8290 +}); 1.8291 + 1.8292 +jQuery.each( [ "get", "post" ], function( i, method ) { 1.8293 + jQuery[ method ] = function( url, data, callback, type ) { 1.8294 + // shift arguments if data argument was omitted 1.8295 + if ( jQuery.isFunction( data ) ) { 1.8296 + type = type || callback; 1.8297 + callback = data; 1.8298 + data = undefined; 1.8299 + } 1.8300 + 1.8301 + return jQuery.ajax({ 1.8302 + url: url, 1.8303 + type: method, 1.8304 + dataType: type, 1.8305 + data: data, 1.8306 + success: callback 1.8307 + }); 1.8308 + }; 1.8309 +}); 1.8310 + 1.8311 +// Attach a bunch of functions for handling common AJAX events 1.8312 +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { 1.8313 + jQuery.fn[ type ] = function( fn ) { 1.8314 + return this.on( type, fn ); 1.8315 + }; 1.8316 +}); 1.8317 + 1.8318 + 1.8319 +jQuery._evalUrl = function( url ) { 1.8320 + return jQuery.ajax({ 1.8321 + url: url, 1.8322 + type: "GET", 1.8323 + dataType: "script", 1.8324 + async: false, 1.8325 + global: false, 1.8326 + "throws": true 1.8327 + }); 1.8328 +}; 1.8329 + 1.8330 + 1.8331 +jQuery.fn.extend({ 1.8332 + wrapAll: function( html ) { 1.8333 + var wrap; 1.8334 + 1.8335 + if ( jQuery.isFunction( html ) ) { 1.8336 + return this.each(function( i ) { 1.8337 + jQuery( this ).wrapAll( html.call(this, i) ); 1.8338 + }); 1.8339 + } 1.8340 + 1.8341 + if ( this[ 0 ] ) { 1.8342 + 1.8343 + // The elements to wrap the target around 1.8344 + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 1.8345 + 1.8346 + if ( this[ 0 ].parentNode ) { 1.8347 + wrap.insertBefore( this[ 0 ] ); 1.8348 + } 1.8349 + 1.8350 + wrap.map(function() { 1.8351 + var elem = this; 1.8352 + 1.8353 + while ( elem.firstElementChild ) { 1.8354 + elem = elem.firstElementChild; 1.8355 + } 1.8356 + 1.8357 + return elem; 1.8358 + }).append( this ); 1.8359 + } 1.8360 + 1.8361 + return this; 1.8362 + }, 1.8363 + 1.8364 + wrapInner: function( html ) { 1.8365 + if ( jQuery.isFunction( html ) ) { 1.8366 + return this.each(function( i ) { 1.8367 + jQuery( this ).wrapInner( html.call(this, i) ); 1.8368 + }); 1.8369 + } 1.8370 + 1.8371 + return this.each(function() { 1.8372 + var self = jQuery( this ), 1.8373 + contents = self.contents(); 1.8374 + 1.8375 + if ( contents.length ) { 1.8376 + contents.wrapAll( html ); 1.8377 + 1.8378 + } else { 1.8379 + self.append( html ); 1.8380 + } 1.8381 + }); 1.8382 + }, 1.8383 + 1.8384 + wrap: function( html ) { 1.8385 + var isFunction = jQuery.isFunction( html ); 1.8386 + 1.8387 + return this.each(function( i ) { 1.8388 + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); 1.8389 + }); 1.8390 + }, 1.8391 + 1.8392 + unwrap: function() { 1.8393 + return this.parent().each(function() { 1.8394 + if ( !jQuery.nodeName( this, "body" ) ) { 1.8395 + jQuery( this ).replaceWith( this.childNodes ); 1.8396 + } 1.8397 + }).end(); 1.8398 + } 1.8399 +}); 1.8400 + 1.8401 + 1.8402 +jQuery.expr.filters.hidden = function( elem ) { 1.8403 + // Support: Opera <= 12.12 1.8404 + // Opera reports offsetWidths and offsetHeights less than zero on some elements 1.8405 + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0; 1.8406 +}; 1.8407 +jQuery.expr.filters.visible = function( elem ) { 1.8408 + return !jQuery.expr.filters.hidden( elem ); 1.8409 +}; 1.8410 + 1.8411 + 1.8412 + 1.8413 + 1.8414 +var r20 = /%20/g, 1.8415 + rbracket = /\[\]$/, 1.8416 + rCRLF = /\r?\n/g, 1.8417 + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 1.8418 + rsubmittable = /^(?:input|select|textarea|keygen)/i; 1.8419 + 1.8420 +function buildParams( prefix, obj, traditional, add ) { 1.8421 + var name; 1.8422 + 1.8423 + if ( jQuery.isArray( obj ) ) { 1.8424 + // Serialize array item. 1.8425 + jQuery.each( obj, function( i, v ) { 1.8426 + if ( traditional || rbracket.test( prefix ) ) { 1.8427 + // Treat each array item as a scalar. 1.8428 + add( prefix, v ); 1.8429 + 1.8430 + } else { 1.8431 + // Item is non-scalar (array or object), encode its numeric index. 1.8432 + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); 1.8433 + } 1.8434 + }); 1.8435 + 1.8436 + } else if ( !traditional && jQuery.type( obj ) === "object" ) { 1.8437 + // Serialize object item. 1.8438 + for ( name in obj ) { 1.8439 + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 1.8440 + } 1.8441 + 1.8442 + } else { 1.8443 + // Serialize scalar item. 1.8444 + add( prefix, obj ); 1.8445 + } 1.8446 +} 1.8447 + 1.8448 +// Serialize an array of form elements or a set of 1.8449 +// key/values into a query string 1.8450 +jQuery.param = function( a, traditional ) { 1.8451 + var prefix, 1.8452 + s = [], 1.8453 + add = function( key, value ) { 1.8454 + // If value is a function, invoke it and return its value 1.8455 + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); 1.8456 + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); 1.8457 + }; 1.8458 + 1.8459 + // Set traditional to true for jQuery <= 1.3.2 behavior. 1.8460 + if ( traditional === undefined ) { 1.8461 + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 1.8462 + } 1.8463 + 1.8464 + // If an array was passed in, assume that it is an array of form elements. 1.8465 + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 1.8466 + // Serialize the form elements 1.8467 + jQuery.each( a, function() { 1.8468 + add( this.name, this.value ); 1.8469 + }); 1.8470 + 1.8471 + } else { 1.8472 + // If traditional, encode the "old" way (the way 1.3.2 or older 1.8473 + // did it), otherwise encode params recursively. 1.8474 + for ( prefix in a ) { 1.8475 + buildParams( prefix, a[ prefix ], traditional, add ); 1.8476 + } 1.8477 + } 1.8478 + 1.8479 + // Return the resulting serialization 1.8480 + return s.join( "&" ).replace( r20, "+" ); 1.8481 +}; 1.8482 + 1.8483 +jQuery.fn.extend({ 1.8484 + serialize: function() { 1.8485 + return jQuery.param( this.serializeArray() ); 1.8486 + }, 1.8487 + serializeArray: function() { 1.8488 + return this.map(function() { 1.8489 + // Can add propHook for "elements" to filter or add form elements 1.8490 + var elements = jQuery.prop( this, "elements" ); 1.8491 + return elements ? jQuery.makeArray( elements ) : this; 1.8492 + }) 1.8493 + .filter(function() { 1.8494 + var type = this.type; 1.8495 + 1.8496 + // Use .is( ":disabled" ) so that fieldset[disabled] works 1.8497 + return this.name && !jQuery( this ).is( ":disabled" ) && 1.8498 + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 1.8499 + ( this.checked || !rcheckableType.test( type ) ); 1.8500 + }) 1.8501 + .map(function( i, elem ) { 1.8502 + var val = jQuery( this ).val(); 1.8503 + 1.8504 + return val == null ? 1.8505 + null : 1.8506 + jQuery.isArray( val ) ? 1.8507 + jQuery.map( val, function( val ) { 1.8508 + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 1.8509 + }) : 1.8510 + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 1.8511 + }).get(); 1.8512 + } 1.8513 +}); 1.8514 + 1.8515 + 1.8516 +jQuery.ajaxSettings.xhr = function() { 1.8517 + try { 1.8518 + return new XMLHttpRequest(); 1.8519 + } catch( e ) {} 1.8520 +}; 1.8521 + 1.8522 +var xhrId = 0, 1.8523 + xhrCallbacks = {}, 1.8524 + xhrSuccessStatus = { 1.8525 + // file protocol always yields status code 0, assume 200 1.8526 + 0: 200, 1.8527 + // Support: IE9 1.8528 + // #1450: sometimes IE returns 1223 when it should be 204 1.8529 + 1223: 204 1.8530 + }, 1.8531 + xhrSupported = jQuery.ajaxSettings.xhr(); 1.8532 + 1.8533 +// Support: IE9 1.8534 +// Open requests must be manually aborted on unload (#5280) 1.8535 +if ( window.ActiveXObject ) { 1.8536 + jQuery( window ).on( "unload", function() { 1.8537 + for ( var key in xhrCallbacks ) { 1.8538 + xhrCallbacks[ key ](); 1.8539 + } 1.8540 + }); 1.8541 +} 1.8542 + 1.8543 +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 1.8544 +support.ajax = xhrSupported = !!xhrSupported; 1.8545 + 1.8546 +jQuery.ajaxTransport(function( options ) { 1.8547 + var callback; 1.8548 + 1.8549 + // Cross domain only allowed if supported through XMLHttpRequest 1.8550 + if ( support.cors || xhrSupported && !options.crossDomain ) { 1.8551 + return { 1.8552 + send: function( headers, complete ) { 1.8553 + var i, 1.8554 + xhr = options.xhr(), 1.8555 + id = ++xhrId; 1.8556 + 1.8557 + xhr.open( options.type, options.url, options.async, options.username, options.password ); 1.8558 + 1.8559 + // Apply custom fields if provided 1.8560 + if ( options.xhrFields ) { 1.8561 + for ( i in options.xhrFields ) { 1.8562 + xhr[ i ] = options.xhrFields[ i ]; 1.8563 + } 1.8564 + } 1.8565 + 1.8566 + // Override mime type if needed 1.8567 + if ( options.mimeType && xhr.overrideMimeType ) { 1.8568 + xhr.overrideMimeType( options.mimeType ); 1.8569 + } 1.8570 + 1.8571 + // X-Requested-With header 1.8572 + // For cross-domain requests, seeing as conditions for a preflight are 1.8573 + // akin to a jigsaw puzzle, we simply never set it to be sure. 1.8574 + // (it can always be set on a per-request basis or even using ajaxSetup) 1.8575 + // For same-domain requests, won't change header if already provided. 1.8576 + if ( !options.crossDomain && !headers["X-Requested-With"] ) { 1.8577 + headers["X-Requested-With"] = "XMLHttpRequest"; 1.8578 + } 1.8579 + 1.8580 + // Set headers 1.8581 + for ( i in headers ) { 1.8582 + xhr.setRequestHeader( i, headers[ i ] ); 1.8583 + } 1.8584 + 1.8585 + // Callback 1.8586 + callback = function( type ) { 1.8587 + return function() { 1.8588 + if ( callback ) { 1.8589 + delete xhrCallbacks[ id ]; 1.8590 + callback = xhr.onload = xhr.onerror = null; 1.8591 + 1.8592 + if ( type === "abort" ) { 1.8593 + xhr.abort(); 1.8594 + } else if ( type === "error" ) { 1.8595 + complete( 1.8596 + // file: protocol always yields status 0; see #8605, #14207 1.8597 + xhr.status, 1.8598 + xhr.statusText 1.8599 + ); 1.8600 + } else { 1.8601 + complete( 1.8602 + xhrSuccessStatus[ xhr.status ] || xhr.status, 1.8603 + xhr.statusText, 1.8604 + // Support: IE9 1.8605 + // Accessing binary-data responseText throws an exception 1.8606 + // (#11426) 1.8607 + typeof xhr.responseText === "string" ? { 1.8608 + text: xhr.responseText 1.8609 + } : undefined, 1.8610 + xhr.getAllResponseHeaders() 1.8611 + ); 1.8612 + } 1.8613 + } 1.8614 + }; 1.8615 + }; 1.8616 + 1.8617 + // Listen to events 1.8618 + xhr.onload = callback(); 1.8619 + xhr.onerror = callback("error"); 1.8620 + 1.8621 + // Create the abort callback 1.8622 + callback = xhrCallbacks[ id ] = callback("abort"); 1.8623 + 1.8624 + try { 1.8625 + // Do send the request (this may raise an exception) 1.8626 + xhr.send( options.hasContent && options.data || null ); 1.8627 + } catch ( e ) { 1.8628 + // #14683: Only rethrow if this hasn't been notified as an error yet 1.8629 + if ( callback ) { 1.8630 + throw e; 1.8631 + } 1.8632 + } 1.8633 + }, 1.8634 + 1.8635 + abort: function() { 1.8636 + if ( callback ) { 1.8637 + callback(); 1.8638 + } 1.8639 + } 1.8640 + }; 1.8641 + } 1.8642 +}); 1.8643 + 1.8644 + 1.8645 + 1.8646 + 1.8647 +// Install script dataType 1.8648 +jQuery.ajaxSetup({ 1.8649 + accepts: { 1.8650 + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 1.8651 + }, 1.8652 + contents: { 1.8653 + script: /(?:java|ecma)script/ 1.8654 + }, 1.8655 + converters: { 1.8656 + "text script": function( text ) { 1.8657 + jQuery.globalEval( text ); 1.8658 + return text; 1.8659 + } 1.8660 + } 1.8661 +}); 1.8662 + 1.8663 +// Handle cache's special case and crossDomain 1.8664 +jQuery.ajaxPrefilter( "script", function( s ) { 1.8665 + if ( s.cache === undefined ) { 1.8666 + s.cache = false; 1.8667 + } 1.8668 + if ( s.crossDomain ) { 1.8669 + s.type = "GET"; 1.8670 + } 1.8671 +}); 1.8672 + 1.8673 +// Bind script tag hack transport 1.8674 +jQuery.ajaxTransport( "script", function( s ) { 1.8675 + // This transport only deals with cross domain requests 1.8676 + if ( s.crossDomain ) { 1.8677 + var script, callback; 1.8678 + return { 1.8679 + send: function( _, complete ) { 1.8680 + script = jQuery("<script>").prop({ 1.8681 + async: true, 1.8682 + charset: s.scriptCharset, 1.8683 + src: s.url 1.8684 + }).on( 1.8685 + "load error", 1.8686 + callback = function( evt ) { 1.8687 + script.remove(); 1.8688 + callback = null; 1.8689 + if ( evt ) { 1.8690 + complete( evt.type === "error" ? 404 : 200, evt.type ); 1.8691 + } 1.8692 + } 1.8693 + ); 1.8694 + document.head.appendChild( script[ 0 ] ); 1.8695 + }, 1.8696 + abort: function() { 1.8697 + if ( callback ) { 1.8698 + callback(); 1.8699 + } 1.8700 + } 1.8701 + }; 1.8702 + } 1.8703 +}); 1.8704 + 1.8705 + 1.8706 + 1.8707 + 1.8708 +var oldCallbacks = [], 1.8709 + rjsonp = /(=)\?(?=&|$)|\?\?/; 1.8710 + 1.8711 +// Default jsonp settings 1.8712 +jQuery.ajaxSetup({ 1.8713 + jsonp: "callback", 1.8714 + jsonpCallback: function() { 1.8715 + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 1.8716 + this[ callback ] = true; 1.8717 + return callback; 1.8718 + } 1.8719 +}); 1.8720 + 1.8721 +// Detect, normalize options and install callbacks for jsonp requests 1.8722 +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 1.8723 + 1.8724 + var callbackName, overwritten, responseContainer, 1.8725 + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 1.8726 + "url" : 1.8727 + typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" 1.8728 + ); 1.8729 + 1.8730 + // Handle iff the expected data type is "jsonp" or we have a parameter to set 1.8731 + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 1.8732 + 1.8733 + // Get callback name, remembering preexisting value associated with it 1.8734 + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 1.8735 + s.jsonpCallback() : 1.8736 + s.jsonpCallback; 1.8737 + 1.8738 + // Insert callback into url or form data 1.8739 + if ( jsonProp ) { 1.8740 + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 1.8741 + } else if ( s.jsonp !== false ) { 1.8742 + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 1.8743 + } 1.8744 + 1.8745 + // Use data converter to retrieve json after script execution 1.8746 + s.converters["script json"] = function() { 1.8747 + if ( !responseContainer ) { 1.8748 + jQuery.error( callbackName + " was not called" ); 1.8749 + } 1.8750 + return responseContainer[ 0 ]; 1.8751 + }; 1.8752 + 1.8753 + // force json dataType 1.8754 + s.dataTypes[ 0 ] = "json"; 1.8755 + 1.8756 + // Install callback 1.8757 + overwritten = window[ callbackName ]; 1.8758 + window[ callbackName ] = function() { 1.8759 + responseContainer = arguments; 1.8760 + }; 1.8761 + 1.8762 + // Clean-up function (fires after converters) 1.8763 + jqXHR.always(function() { 1.8764 + // Restore preexisting value 1.8765 + window[ callbackName ] = overwritten; 1.8766 + 1.8767 + // Save back as free 1.8768 + if ( s[ callbackName ] ) { 1.8769 + // make sure that re-using the options doesn't screw things around 1.8770 + s.jsonpCallback = originalSettings.jsonpCallback; 1.8771 + 1.8772 + // save the callback name for future use 1.8773 + oldCallbacks.push( callbackName ); 1.8774 + } 1.8775 + 1.8776 + // Call if it was a function and we have a response 1.8777 + if ( responseContainer && jQuery.isFunction( overwritten ) ) { 1.8778 + overwritten( responseContainer[ 0 ] ); 1.8779 + } 1.8780 + 1.8781 + responseContainer = overwritten = undefined; 1.8782 + }); 1.8783 + 1.8784 + // Delegate to script 1.8785 + return "script"; 1.8786 + } 1.8787 +}); 1.8788 + 1.8789 + 1.8790 + 1.8791 + 1.8792 +// data: string of html 1.8793 +// context (optional): If specified, the fragment will be created in this context, defaults to document 1.8794 +// keepScripts (optional): If true, will include scripts passed in the html string 1.8795 +jQuery.parseHTML = function( data, context, keepScripts ) { 1.8796 + if ( !data || typeof data !== "string" ) { 1.8797 + return null; 1.8798 + } 1.8799 + if ( typeof context === "boolean" ) { 1.8800 + keepScripts = context; 1.8801 + context = false; 1.8802 + } 1.8803 + context = context || document; 1.8804 + 1.8805 + var parsed = rsingleTag.exec( data ), 1.8806 + scripts = !keepScripts && []; 1.8807 + 1.8808 + // Single tag 1.8809 + if ( parsed ) { 1.8810 + return [ context.createElement( parsed[1] ) ]; 1.8811 + } 1.8812 + 1.8813 + parsed = jQuery.buildFragment( [ data ], context, scripts ); 1.8814 + 1.8815 + if ( scripts && scripts.length ) { 1.8816 + jQuery( scripts ).remove(); 1.8817 + } 1.8818 + 1.8819 + return jQuery.merge( [], parsed.childNodes ); 1.8820 +}; 1.8821 + 1.8822 + 1.8823 +// Keep a copy of the old load method 1.8824 +var _load = jQuery.fn.load; 1.8825 + 1.8826 +/** 1.8827 + * Load a url into a page 1.8828 + */ 1.8829 +jQuery.fn.load = function( url, params, callback ) { 1.8830 + if ( typeof url !== "string" && _load ) { 1.8831 + return _load.apply( this, arguments ); 1.8832 + } 1.8833 + 1.8834 + var selector, type, response, 1.8835 + self = this, 1.8836 + off = url.indexOf(" "); 1.8837 + 1.8838 + if ( off >= 0 ) { 1.8839 + selector = jQuery.trim( url.slice( off ) ); 1.8840 + url = url.slice( 0, off ); 1.8841 + } 1.8842 + 1.8843 + // If it's a function 1.8844 + if ( jQuery.isFunction( params ) ) { 1.8845 + 1.8846 + // We assume that it's the callback 1.8847 + callback = params; 1.8848 + params = undefined; 1.8849 + 1.8850 + // Otherwise, build a param string 1.8851 + } else if ( params && typeof params === "object" ) { 1.8852 + type = "POST"; 1.8853 + } 1.8854 + 1.8855 + // If we have elements to modify, make the request 1.8856 + if ( self.length > 0 ) { 1.8857 + jQuery.ajax({ 1.8858 + url: url, 1.8859 + 1.8860 + // if "type" variable is undefined, then "GET" method will be used 1.8861 + type: type, 1.8862 + dataType: "html", 1.8863 + data: params 1.8864 + }).done(function( responseText ) { 1.8865 + 1.8866 + // Save response for use in complete callback 1.8867 + response = arguments; 1.8868 + 1.8869 + self.html( selector ? 1.8870 + 1.8871 + // If a selector was specified, locate the right elements in a dummy div 1.8872 + // Exclude scripts to avoid IE 'Permission Denied' errors 1.8873 + jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : 1.8874 + 1.8875 + // Otherwise use the full result 1.8876 + responseText ); 1.8877 + 1.8878 + }).complete( callback && function( jqXHR, status ) { 1.8879 + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); 1.8880 + }); 1.8881 + } 1.8882 + 1.8883 + return this; 1.8884 +}; 1.8885 + 1.8886 + 1.8887 + 1.8888 + 1.8889 +jQuery.expr.filters.animated = function( elem ) { 1.8890 + return jQuery.grep(jQuery.timers, function( fn ) { 1.8891 + return elem === fn.elem; 1.8892 + }).length; 1.8893 +}; 1.8894 + 1.8895 + 1.8896 + 1.8897 + 1.8898 +var docElem = window.document.documentElement; 1.8899 + 1.8900 +/** 1.8901 + * Gets a window from an element 1.8902 + */ 1.8903 +function getWindow( elem ) { 1.8904 + return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView; 1.8905 +} 1.8906 + 1.8907 +jQuery.offset = { 1.8908 + setOffset: function( elem, options, i ) { 1.8909 + var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 1.8910 + position = jQuery.css( elem, "position" ), 1.8911 + curElem = jQuery( elem ), 1.8912 + props = {}; 1.8913 + 1.8914 + // Set position first, in-case top/left are set even on static elem 1.8915 + if ( position === "static" ) { 1.8916 + elem.style.position = "relative"; 1.8917 + } 1.8918 + 1.8919 + curOffset = curElem.offset(); 1.8920 + curCSSTop = jQuery.css( elem, "top" ); 1.8921 + curCSSLeft = jQuery.css( elem, "left" ); 1.8922 + calculatePosition = ( position === "absolute" || position === "fixed" ) && 1.8923 + ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; 1.8924 + 1.8925 + // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed 1.8926 + if ( calculatePosition ) { 1.8927 + curPosition = curElem.position(); 1.8928 + curTop = curPosition.top; 1.8929 + curLeft = curPosition.left; 1.8930 + 1.8931 + } else { 1.8932 + curTop = parseFloat( curCSSTop ) || 0; 1.8933 + curLeft = parseFloat( curCSSLeft ) || 0; 1.8934 + } 1.8935 + 1.8936 + if ( jQuery.isFunction( options ) ) { 1.8937 + options = options.call( elem, i, curOffset ); 1.8938 + } 1.8939 + 1.8940 + if ( options.top != null ) { 1.8941 + props.top = ( options.top - curOffset.top ) + curTop; 1.8942 + } 1.8943 + if ( options.left != null ) { 1.8944 + props.left = ( options.left - curOffset.left ) + curLeft; 1.8945 + } 1.8946 + 1.8947 + if ( "using" in options ) { 1.8948 + options.using.call( elem, props ); 1.8949 + 1.8950 + } else { 1.8951 + curElem.css( props ); 1.8952 + } 1.8953 + } 1.8954 +}; 1.8955 + 1.8956 +jQuery.fn.extend({ 1.8957 + offset: function( options ) { 1.8958 + if ( arguments.length ) { 1.8959 + return options === undefined ? 1.8960 + this : 1.8961 + this.each(function( i ) { 1.8962 + jQuery.offset.setOffset( this, options, i ); 1.8963 + }); 1.8964 + } 1.8965 + 1.8966 + var docElem, win, 1.8967 + elem = this[ 0 ], 1.8968 + box = { top: 0, left: 0 }, 1.8969 + doc = elem && elem.ownerDocument; 1.8970 + 1.8971 + if ( !doc ) { 1.8972 + return; 1.8973 + } 1.8974 + 1.8975 + docElem = doc.documentElement; 1.8976 + 1.8977 + // Make sure it's not a disconnected DOM node 1.8978 + if ( !jQuery.contains( docElem, elem ) ) { 1.8979 + return box; 1.8980 + } 1.8981 + 1.8982 + // If we don't have gBCR, just use 0,0 rather than error 1.8983 + // BlackBerry 5, iOS 3 (original iPhone) 1.8984 + if ( typeof elem.getBoundingClientRect !== strundefined ) { 1.8985 + box = elem.getBoundingClientRect(); 1.8986 + } 1.8987 + win = getWindow( doc ); 1.8988 + return { 1.8989 + top: box.top + win.pageYOffset - docElem.clientTop, 1.8990 + left: box.left + win.pageXOffset - docElem.clientLeft 1.8991 + }; 1.8992 + }, 1.8993 + 1.8994 + position: function() { 1.8995 + if ( !this[ 0 ] ) { 1.8996 + return; 1.8997 + } 1.8998 + 1.8999 + var offsetParent, offset, 1.9000 + elem = this[ 0 ], 1.9001 + parentOffset = { top: 0, left: 0 }; 1.9002 + 1.9003 + // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent 1.9004 + if ( jQuery.css( elem, "position" ) === "fixed" ) { 1.9005 + // We assume that getBoundingClientRect is available when computed position is fixed 1.9006 + offset = elem.getBoundingClientRect(); 1.9007 + 1.9008 + } else { 1.9009 + // Get *real* offsetParent 1.9010 + offsetParent = this.offsetParent(); 1.9011 + 1.9012 + // Get correct offsets 1.9013 + offset = this.offset(); 1.9014 + if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { 1.9015 + parentOffset = offsetParent.offset(); 1.9016 + } 1.9017 + 1.9018 + // Add offsetParent borders 1.9019 + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); 1.9020 + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); 1.9021 + } 1.9022 + 1.9023 + // Subtract parent offsets and element margins 1.9024 + return { 1.9025 + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 1.9026 + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 1.9027 + }; 1.9028 + }, 1.9029 + 1.9030 + offsetParent: function() { 1.9031 + return this.map(function() { 1.9032 + var offsetParent = this.offsetParent || docElem; 1.9033 + 1.9034 + while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) { 1.9035 + offsetParent = offsetParent.offsetParent; 1.9036 + } 1.9037 + 1.9038 + return offsetParent || docElem; 1.9039 + }); 1.9040 + } 1.9041 +}); 1.9042 + 1.9043 +// Create scrollLeft and scrollTop methods 1.9044 +jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 1.9045 + var top = "pageYOffset" === prop; 1.9046 + 1.9047 + jQuery.fn[ method ] = function( val ) { 1.9048 + return access( this, function( elem, method, val ) { 1.9049 + var win = getWindow( elem ); 1.9050 + 1.9051 + if ( val === undefined ) { 1.9052 + return win ? win[ prop ] : elem[ method ]; 1.9053 + } 1.9054 + 1.9055 + if ( win ) { 1.9056 + win.scrollTo( 1.9057 + !top ? val : window.pageXOffset, 1.9058 + top ? val : window.pageYOffset 1.9059 + ); 1.9060 + 1.9061 + } else { 1.9062 + elem[ method ] = val; 1.9063 + } 1.9064 + }, method, val, arguments.length, null ); 1.9065 + }; 1.9066 +}); 1.9067 + 1.9068 +// Add the top/left cssHooks using jQuery.fn.position 1.9069 +// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 1.9070 +// getComputedStyle returns percent when specified for top/left/bottom/right 1.9071 +// rather than make the css module depend on the offset module, we just check for it here 1.9072 +jQuery.each( [ "top", "left" ], function( i, prop ) { 1.9073 + jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 1.9074 + function( elem, computed ) { 1.9075 + if ( computed ) { 1.9076 + computed = curCSS( elem, prop ); 1.9077 + // if curCSS returns percentage, fallback to offset 1.9078 + return rnumnonpx.test( computed ) ? 1.9079 + jQuery( elem ).position()[ prop ] + "px" : 1.9080 + computed; 1.9081 + } 1.9082 + } 1.9083 + ); 1.9084 +}); 1.9085 + 1.9086 + 1.9087 +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 1.9088 +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 1.9089 + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { 1.9090 + // margin is only for outerHeight, outerWidth 1.9091 + jQuery.fn[ funcName ] = function( margin, value ) { 1.9092 + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 1.9093 + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 1.9094 + 1.9095 + return access( this, function( elem, type, value ) { 1.9096 + var doc; 1.9097 + 1.9098 + if ( jQuery.isWindow( elem ) ) { 1.9099 + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 1.9100 + // isn't a whole lot we can do. See pull request at this URL for discussion: 1.9101 + // https://github.com/jquery/jquery/pull/764 1.9102 + return elem.document.documentElement[ "client" + name ]; 1.9103 + } 1.9104 + 1.9105 + // Get document width or height 1.9106 + if ( elem.nodeType === 9 ) { 1.9107 + doc = elem.documentElement; 1.9108 + 1.9109 + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 1.9110 + // whichever is greatest 1.9111 + return Math.max( 1.9112 + elem.body[ "scroll" + name ], doc[ "scroll" + name ], 1.9113 + elem.body[ "offset" + name ], doc[ "offset" + name ], 1.9114 + doc[ "client" + name ] 1.9115 + ); 1.9116 + } 1.9117 + 1.9118 + return value === undefined ? 1.9119 + // Get width or height on the element, requesting but not forcing parseFloat 1.9120 + jQuery.css( elem, type, extra ) : 1.9121 + 1.9122 + // Set width or height on the element 1.9123 + jQuery.style( elem, type, value, extra ); 1.9124 + }, type, chainable ? margin : undefined, chainable, null ); 1.9125 + }; 1.9126 + }); 1.9127 +}); 1.9128 + 1.9129 + 1.9130 +// The number of elements contained in the matched element set 1.9131 +jQuery.fn.size = function() { 1.9132 + return this.length; 1.9133 +}; 1.9134 + 1.9135 +jQuery.fn.andSelf = jQuery.fn.addBack; 1.9136 + 1.9137 + 1.9138 + 1.9139 + 1.9140 +// Register as a named AMD module, since jQuery can be concatenated with other 1.9141 +// files that may use define, but not via a proper concatenation script that 1.9142 +// understands anonymous AMD modules. A named AMD is safest and most robust 1.9143 +// way to register. Lowercase jquery is used because AMD module names are 1.9144 +// derived from file names, and jQuery is normally delivered in a lowercase 1.9145 +// file name. Do this after creating the global so that if an AMD module wants 1.9146 +// to call noConflict to hide this version of jQuery, it will work. 1.9147 + 1.9148 +// Note that for maximum portability, libraries that are not jQuery should 1.9149 +// declare themselves as anonymous modules, and avoid setting a global if an 1.9150 +// AMD loader is present. jQuery is a special case. For more information, see 1.9151 +// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 1.9152 + 1.9153 +if ( typeof define === "function" && define.amd ) { 1.9154 + define( "jquery", [], function() { 1.9155 + return jQuery; 1.9156 + }); 1.9157 +} 1.9158 + 1.9159 + 1.9160 + 1.9161 + 1.9162 +var 1.9163 + // Map over jQuery in case of overwrite 1.9164 + _jQuery = window.jQuery, 1.9165 + 1.9166 + // Map over the $ in case of overwrite 1.9167 + _$ = window.$; 1.9168 + 1.9169 +jQuery.noConflict = function( deep ) { 1.9170 + if ( window.$ === jQuery ) { 1.9171 + window.$ = _$; 1.9172 + } 1.9173 + 1.9174 + if ( deep && window.jQuery === jQuery ) { 1.9175 + window.jQuery = _jQuery; 1.9176 + } 1.9177 + 1.9178 + return jQuery; 1.9179 +}; 1.9180 + 1.9181 +// Expose jQuery and $ identifiers, even in 1.9182 +// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 1.9183 +// and CommonJS for browser emulators (#13566) 1.9184 +if ( typeof noGlobal === strundefined ) { 1.9185 + window.jQuery = window.$ = jQuery; 1.9186 +} 1.9187 + 1.9188 + 1.9189 + 1.9190 + 1.9191 +return jQuery; 1.9192 + 1.9193 +})); 1.9194 \ No newline at end of file