vendor: 4,639 bytes, lines 1-143
1import { t as __commonJSMin } from "./chunk-CPYxVWes.js"; 2//#region node_modules/jquery/dist/jquery.js 3var require_jquery = /* @__PURE__ */ __commonJSMin(((exports, module) => { 4 /*! 5 * jQuery JavaScript Library v3.7.1 6 * https://jquery.com/ 7 * 8 * Copyright OpenJS Foundation and other contributors 9 * Released under the MIT license 10 * https://jquery.org/license 11 * 12 * Date: 2023-08-28T13:37Z 13 */ 14 (function(global, factory) { 15 "use strict"; 16 if (typeof module === "object" && typeof module.exports === "object") module.exports = global.document ? factory(global, true) : function(w) { 17 if (!w.document) throw new Error("jQuery requires a window with a document"); 18 return factory(w); 19 }; 20 else factory(global); 21 })(typeof window !== "undefined" ? window : exports, function(window, noGlobal) { 22 "use strict"; 23 var arr = []; 24 var getProto = Object.getPrototypeOf; 25 var slice = arr.slice; 26 var flat = arr.flat ? function(array) { 27 return arr.flat.call(array); 28 } : function(array) { 29 return arr.concat.apply([], array); 30 }; 31 var push = arr.push; 32 var indexOf = arr.indexOf; 33 var class2type = {}; 34 var toString = class2type.toString; 35 var hasOwn = class2type.hasOwnProperty; 36 var fnToString = hasOwn.toString; 37 var ObjectFunctionString = fnToString.call(Object); 38 var support = {}; 39 var isFunction = function isFunction(obj) { 40 return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function"; 41 }; 42 var isWindow = function isWindow(obj) { 43 return obj != null && obj === obj.window; 44 }; 45 var document = window.document; 46 var preservedScriptAttributes = { 47 type: true, 48 src: true, 49 nonce: true, 50 noModule: true 51 }; 52 function DOMEval(code, node, doc) { 53 doc = doc || document; 54 var i, val, script = doc.createElement("script"); 55 script.text = code; 56 if (node) for (i in preservedScriptAttributes) { 57 val = node[i] || node.getAttribute && node.getAttribute(i); 58 if (val) script.setAttribute(i, val); 59 } 60 doc.head.appendChild(script).parentNode.removeChild(script); 61 } 62 function toType(obj) { 63 if (obj == null) return obj + ""; 64 return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj; 65 } 66 var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) { 67 return new jQuery.fn.init(selector, context); 68 }; 69 jQuery.fn = jQuery.prototype = { 70 jquery: version, 71 constructor: jQuery, 72 length: 0, 73 toArray: function() { 74 return slice.call(this); 75 }, 76 get: function(num) { 77 if (num == null) return slice.call(this); 78 return num < 0 ? this[num + this.length] : this[num]; 79 }, 80 pushStack: function(elems) { 81 var ret = jQuery.merge(this.constructor(), elems); 82 ret.prevObject = this; 83 return ret; 84 }, 85 each: function(callback) { 86 return jQuery.each(this, callback); 87 }, 88 map: function(callback) { 89 return this.pushStack(jQuery.map(this, function(elem, i) { 90 return callback.call(elem, i, elem); 91 })); 92 }, 93 slice: function() { 94 return this.pushStack(slice.apply(this, arguments)); 95 }, 96 first: function() { 97 return this.eq(0); 98 }, 99 last: function() { 100 return this.eq(-1); 101 }, 102 even: function() { 103 return this.pushStack(jQuery.grep(this, function(_elem, i) { 104 return (i + 1) % 2; 105 })); 106 }, 107 odd: function() { 108 return this.pushStack(jQuery.grep(this, function(_elem, i) { 109 return i % 2; 110 })); 111 }, 112 eq: function(i) { 113 var len = this.length, j = +i + (i < 0 ? len : 0); 114 return this.pushStack(j >= 0 && j < len ? [this[j]] : []); 115 }, 116 end: function() { 117 return this.prevObject || this.constructor(); 118 }, 119 push, 120 sort: arr.sort, 121 splice: arr.splice 122 }; 123 jQuery.extend = jQuery.fn.extend = function() { 124 var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; 125 if (typeof target === "boolean") { 126 deep = target; 127 target = arguments[i] || {}; 128 i++; 129 } 130 if (typeof target !== "object" && !isFunction(target)) target = {}; 131 if (i === length) { 132 target = this; 133 i--; 134 } 135 for (; i < length; i++) if ((options = arguments[i]) != null) for (name in options) { 136 copy = options[name]; 137 if (name === "__proto__" || target === copy) continue; 138 if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { 139 src = target[name]; 140 if (copyIsArray && !Array.isArray(src)) clone = []; 141 else if (!copyIsArray && !jQuery.isPlainObject(src)) clone = {}; 142 else clone = src; 143 copyIsArray = false;
144 target[name] = jQuery.extend(deep, clone, copy); 145 } else if (copy !== void 0) target[name] = copy; 146 } 147 return target; 148 }; 149 jQuery.extend({ 150 expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), 151 isReady: true, 152 error: function(msg) { 153 throw new Error(msg); 154 }, 155 noop: function() {}, 156 isPlainObject: function(obj) { 157 var proto, Ctor; 158 if (!obj || toString.call(obj) !== "[object Object]") return false; 159 proto = getProto(obj); 160 if (!proto) return true; 161 Ctor = hasOwn.call(proto, "constructor") && proto.constructor; 162 return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString; 163 }, 164 isEmptyObject: function(obj) { 165 var name; 166 for (name in obj) return false; 167 return true; 168 }, 169 globalEval: function(code, options, doc) { 170 DOMEval(code, { nonce: options && options.nonce }, doc); 171 }, 172 each: function(obj, callback) { 173 var length, i = 0; 174 if (isArrayLike(obj)) { 175 length = obj.length; 176 for (; i < length; i++) if (callback.call(obj[i], i, obj[i]) === false) break; 177 } else for (i in obj) if (callback.call(obj[i], i, obj[i]) === false) break; 178 return obj; 179 }, 180 text: function(elem) { 181 var node, ret = "", i = 0, nodeType = elem.nodeType; 182 if (!nodeType) while (node = elem[i++]) ret += jQuery.text(node); 183 if (nodeType === 1 || nodeType === 11) return elem.textContent; 184 if (nodeType === 9) return elem.documentElement.textContent; 185 if (nodeType === 3 || nodeType === 4) return elem.nodeValue; 186 return ret; 187 }, 188 makeArray: function(arr, results) { 189 var ret = results || []; 190 if (arr != null) if (isArrayLike(Object(arr))) jQuery.merge(ret, typeof arr === "string" ? [arr] : arr); 191 else push.call(ret, arr); 192 return ret; 193 }, 194 inArray: function(elem, arr, i) { 195 return arr == null ? -1 : indexOf.call(arr, elem, i); 196 }, 197 isXMLDoc: function(elem) { 198 var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement; 199 return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML"); 200 }, 201 merge: function(first, second) { 202 var len = +second.length, j = 0, i = first.length; 203 for (; j < len; j++) first[i++] = second[j]; 204 first.length = i; 205 return first; 206 }, 207 grep: function(elems, callback, invert) { 208 var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; 209 for (; i < length; i++) { 210 callbackInverse = !callback(elems[i], i); 211 if (callbackInverse !== callbackExpect) matches.push(elems[i]); 212 } 213 return matches; 214 }, 215 map: function(elems, callback, arg) { 216 var length, value, i = 0, ret = []; 217 if (isArrayLike(elems)) { 218 length = elems.length; 219 for (; i < length; i++) { 220 value = callback(elems[i], i, arg); 221 if (value != null) ret.push(value); 222 } 223 } else for (i in elems) { 224 value = callback(elems[i], i, arg); 225 if (value != null) ret.push(value); 226 } 227 return flat(ret); 228 }, 229 guid: 1, 230 support 231 }); 232 if (typeof Symbol === "function") jQuery.fn[Symbol.iterator] = arr[Symbol.iterator]; 233 jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(_i, name) { 234 class2type["[object " + name + "]"] = name.toLowerCase(); 235 }); 236 function isArrayLike(obj) { 237 var length = !!obj && "length" in obj && obj.length, type = toType(obj); 238 if (isFunction(obj) || isWindow(obj)) return false; 239 return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj; 240 } 241 function nodeName(elem, name) { 242 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 243 } 244 var pop = arr.pop; 245 var sort = arr.sort; 246 var splice = arr.splice; 247 var whitespace = "[\\x20\\t\\r\\n\\f]"; 248 var rtrimCSS = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"); 249 jQuery.contains = function(a, b) { 250 var bup = b && b.parentNode; 251 return a === bup || !!(bup && bup.nodeType === 1 && (a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16)); 252 }; 253 var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; 254 function fcssescape(ch, asCodePoint) { 255 if (asCodePoint) { 256 if (ch === "\0") return "�";
vendor: 4,975 bytes, lines 257-339
257 return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " "; 258 } 259 return "\\" + ch; 260 } 261 jQuery.escapeSelector = function(sel) { 262 return (sel + "").replace(rcssescape, fcssescape); 263 }; 264 var preferredDoc = document, pushNative = push; 265 (function() { 266 var i, Expr, outermostContext, sortInput, hasDuplicate, push = pushNative, document, documentElement, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) { 267 if (a === b) hasDuplicate = true; 268 return 0; 269 }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + "*([*^$|!~]?=)" + whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = { 270 ID: new RegExp("^#(" + identifier + ")"), 271 CLASS: new RegExp("^\\.(" + identifier + ")"), 272 TAG: new RegExp("^(" + identifier + "|[*])"), 273 ATTR: new RegExp("^" + attributes), 274 PSEUDO: new RegExp("^" + pseudos), 275 CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"), 276 bool: new RegExp("^(?:" + booleans + ")$", "i"), 277 needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") 278 }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) { 279 var high = "0x" + escape.slice(1) - 65536; 280 if (nonHex) return nonHex; 281 return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); 282 }, unloadHandler = function() { 283 setDocument(); 284 }, inDisabledFieldset = addCombinator(function(elem) { 285 return elem.disabled === true && nodeName(elem, "fieldset"); 286 }, { 287 dir: "parentNode", 288 next: "legend" 289 }); 290 function safeActiveElement() { 291 try { 292 return document.activeElement; 293 } catch (err) {} 294 } 295 try { 296 push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes); 297 arr[preferredDoc.childNodes.length].nodeType; 298 } catch (e) { 299 push = { 300 apply: function(target, els) { 301 pushNative.apply(target, slice.call(els)); 302 }, 303 call: function(target) { 304 pushNative.apply(target, slice.call(arguments, 1)); 305 } 306 }; 307 } 308 function find(selector, context, results, seed) { 309 var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9; 310 results = results || []; 311 if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) return results; 312 if (!seed) { 313 setDocument(context); 314 context = context || document; 315 if (documentIsHTML) { 316 if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { 317 if (m = match[1]) { 318 if (nodeType === 9) if (elem = context.getElementById(m)) { 319 if (elem.id === m) { 320 push.call(results, elem); 321 return results; 322 } 323 } else return results; 324 else if (newContext && (elem = newContext.getElementById(m)) && find.contains(context, elem) && elem.id === m) { 325 push.call(results, elem); 326 return results; 327 } 328 } else if (match[2]) { 329 push.apply(results, context.getElementsByTagName(selector)); 330 return results; 331 } else if ((m = match[3]) && context.getElementsByClassName) { 332 push.apply(results, context.getElementsByClassName(m)); 333 return results; 334 } 335 } 336 if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) { 337 newSelector = selector; 338 newContext = context; 339 if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
340 newContext = rsibling.test(selector) && testContext(context.parentNode) || context; 341 if (newContext != context || !support.scope) if (nid = context.getAttribute("id")) nid = jQuery.escapeSelector(nid); 342 else context.setAttribute("id", nid = expando); 343 groups = tokenize(selector); 344 i = groups.length; 345 while (i--) groups[i] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i]); 346 newSelector = groups.join(","); 347 } 348 try { 349 push.apply(results, newContext.querySelectorAll(newSelector)); 350 return results; 351 } catch (qsaError) { 352 nonnativeSelectorCache(selector, true); 353 } finally { 354 if (nid === expando) context.removeAttribute("id"); 355 } 356 } 357 } 358 } 359 return select(selector.replace(rtrimCSS, "$1"), context, results, seed); 360 } 361 /** 362 * Create key-value caches of limited size 363 * @returns {function(string, object)} Returns the Object data after storing it on itself with 364 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 365 * deleting the oldest entry 366 */ 367 function createCache() { 368 var keys = []; 369 function cache(key, value) { 370 if (keys.push(key + " ") > Expr.cacheLength) delete cache[keys.shift()]; 371 return cache[key + " "] = value; 372 } 373 return cache; 374 } 375 /** 376 * Mark a function for special use by jQuery selector module 377 * @param {Function} fn The function to mark 378 */ 379 function markFunction(fn) { 380 fn[expando] = true; 381 return fn; 382 } 383 /** 384 * Support testing using an element 385 * @param {Function} fn Passed the created element and returns a boolean result 386 */ 387 function assert(fn) { 388 var el = document.createElement("fieldset"); 389 try { 390 return !!fn(el); 391 } catch (e) { 392 return false; 393 } finally { 394 if (el.parentNode) el.parentNode.removeChild(el); 395 el = null; 396 } 397 } 398 /** 399 * Returns a function to use in pseudos for input types 400 * @param {String} type 401 */ 402 function createInputPseudo(type) { 403 return function(elem) { 404 return nodeName(elem, "input") && elem.type === type; 405 }; 406 } 407 /** 408 * Returns a function to use in pseudos for buttons 409 * @param {String} type 410 */ 411 function createButtonPseudo(type) { 412 return function(elem) { 413 return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type; 414 }; 415 } 416 /** 417 * Returns a function to use in pseudos for :enabled/:disabled 418 * @param {Boolean} disabled true for :disabled; false for :enabled 419 */ 420 function createDisabledPseudo(disabled) { 421 return function(elem) { 422 if ("form" in elem) { 423 if (elem.parentNode && elem.disabled === false) { 424 if ("label" in elem) if ("label" in elem.parentNode) return elem.parentNode.disabled === disabled; 425 else return elem.disabled === disabled; 426 return elem.isDisabled === disabled || elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled; 427 } 428 return elem.disabled === disabled; 429 } else if ("label" in elem) return elem.disabled === disabled; 430 return false; 431 }; 432 } 433 /** 434 * Returns a function to use in pseudos for positionals 435 * @param {Function} fn 436 */ 437 function createPositionalPseudo(fn) { 438 return markFunction(function(argument) { 439 argument = +argument; 440 return markFunction(function(seed, matches) { 441 var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length; 442 while (i--) if (seed[j = matchIndexes[i]]) seed[j] = !(matches[j] = seed[j]); 443 }); 444 }); 445 } 446 /** 447 * Checks a node for validity as a jQuery selector context 448 * @param {Element|Object=} context 449 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 450 */ 451 function testContext(context) { 452 return context && typeof context.getElementsByTagName !== "undefined" && context; 453 } 454 /** 455 * Sets document-related variables once based on the current document 456 * @param {Element|Object} [node] An element or document object to use to set the document 457 * @returns {Object} Returns the current document 458 */ 459 function setDocument(node) { 460 var subWindow, doc = node ? node.ownerDocument || node : preferredDoc; 461 if (doc == document || doc.nodeType !== 9 || !doc.documentElement) return document; 462 document = doc; 463 documentElement = document.documentElement; 464 documentIsHTML = !jQuery.isXMLDoc(document); 465 matches = documentElement.matches || documentElement.webkitMatchesSelector || documentElement.msMat
465chesSelector; 466 if (documentElement.msMatchesSelector && preferredDoc != document && (subWindow = document.defaultView) && subWindow.top !== subWindow) subWindow.addEventListener("unload", unloadHandler); 467 support.getById = assert(function(el) { 468 documentElement.appendChild(el).id = jQuery.expando; 469 return !document.getElementsByName || !document.getElementsByName(jQuery.expando).length; 470 }); 471 support.disconnectedMatch = assert(function(el) { 472 return matches.call(el, "*"); 473 }); 474 support.scope = assert(function() { 475 return document.querySelectorAll(":scope"); 476 }); 477 support.cssHas = assert(function() { 478 try { 479 document.querySelector(":has(*,:jqfake)"); 480 return false; 481 } catch (e) { 482 return true; 483 } 484 }); 485 if (support.getById) { 486 Expr.filter.ID = function(id) { 487 var attrId = id.replace(runescape, funescape); 488 return function(elem) { 489 return elem.getAttribute("id") === attrId; 490 }; 491 }; 492 Expr.find.ID = function(id, context) { 493 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 494 var elem = context.getElementById(id); 495 return elem ? [elem] : []; 496 } 497 }; 498 } else { 499 Expr.filter.ID = function(id) { 500 var attrId = id.replace(runescape, funescape); 501 return function(elem) { 502 var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); 503 return node && node.value === attrId; 504 }; 505 }; 506 Expr.find.ID = function(id, context) { 507 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 508 var node, i, elems, elem = context.getElementById(id); 509 if (elem) { 510 node = elem.getAttributeNode("id"); 511 if (node && node.value === id) return [elem]; 512 elems = context.getElementsByName(id); 513 i = 0; 514 while (elem = elems[i++]) { 515 node = elem.getAttributeNode("id"); 516 if (node && node.value === id) return [elem]; 517 } 518 } 519 return []; 520 } 521 }; 522 } 523 Expr.find.TAG = function(tag, context) { 524 if (typeof context.getElementsByTagName !== "undefined") return context.getElementsByTagName(tag); 525 else return context.querySelectorAll(tag); 526 }; 527 Expr.find.CLASS = function(className, context) { 528 if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) return context.getElementsByClassName(className); 529 }; 530 rbuggyQSA = []; 531 assert(function(el) { 532 var input; 533 documentElement.appendChild(el).innerHTML = "<a id='" + expando + "' href='' disabled='disabled'></a><select id='" + expando + "-\r\\' disabled='disabled'><option selected=''></option></select>"; 534 if (!el.querySelectorAll("[selected]").length) rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); 535 if (!el.querySelectorAll("[id~=" + expando + "-]").length) rbuggyQSA.push("~="); 536 if (!el.querySelectorAll("a#" + expando + "+*").length) rbuggyQSA.push(".#.+[+~]"); 537 if (!el.querySelectorAll(":checked").length) rbuggyQSA.push(":checked"); 538 input = document.createElement("input"); 539 input.setAttribute("type", "hidden"); 540 el.appendChild(input).setAttribute("name", "D"); 541 documentElement.appendChild(el).disabled = true; 542 if (el.querySelectorAll(":disabled").length !== 2) rbuggyQSA.push(":enabled", ":disabled"); 543 input = document.createElement("input"); 544 input.setAttribute("name", ""); 545 el.appendChild(input); 546 if (!el.querySelectorAll("[name='']").length) rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + "*(?:''|\"\")"); 547 }); 548 if (!support.cssHas) rbuggyQSA.push(":has"); 549 rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); 550 sortOrder = function(a, b) { 551 if (a === b) { 552 hasDuplicate = true; 553 return 0; 554 } 555 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 556 if (compare) return compare; 557 compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1; 558 if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) { 559 if (a === document || a.ownerDocument == preferredDoc && find.contains(preferredDoc, a)) return -1; 560 if (b === document || b.ownerDocument == preferredDoc && find.contains(preferredDoc, b)) return 1; 561 return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0; 562 } 563 return compare & 4 ? -1 : 1; 564 }; 565 return document; 566 } 567 find.matches = function(expr, elements) { 568 return find(expr, null, null, elements); 569 }; 570 find.matchesSelector = function(elem, expr) { 571 setDocument(elem); 572 if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) try { 573 var ret = matches.call(elem, expr); 574 if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) return ret; 575 } catch (e) { 576 nonnativeSelectorCache(expr, true); 577 } 578 return find(expr, document, null, [elem]).length > 0; 579 }; 580 find.contains = function(context, elem) { 581 if ((context.ownerDocument || context) != document) setDocument(context); 582 return jQuery.contains(context, elem); 583 }; 584 find.attr = function(elem, name) { 585 if ((elem.ownerDocument || elem) != document) setDocument(elem); 586 var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0; 587 if (val !== void 0) return val; 588 return elem.getAttribute(name); 589 }; 590 find.error = function(msg) { 591 throw new Error("Syntax error, unrecognized expression: " + msg); 592 }; 593 /** 594 * Document sorting and removing duplicates 595 * @param {ArrayLike} results 596 */ 597 jQuery.uniqueSort = function(results) { 598 var elem, duplicates = [], j = 0, i = 0; 599 hasDuplicate = !support.sortStable; 600 sortInput = !support.sortStable && slice.call(results, 0); 601 sort.call(results, sortOrder);
602 if (hasDuplicate) { 603 while (elem = results[i++]) if (elem === results[i]) j = duplicates.push(i); 604 while (j--) splice.call(results, duplicates[j], 1); 605 } 606 sortInput = null; 607 return results; 608 }; 609 jQuery.fn.uniqueSort = function() { 610 return this.pushStack(jQuery.uniqueSort(slice.apply(this))); 611 }; 612 Expr = jQuery.expr = { 613 cacheLength: 50, 614 createPseudo: markFunction, 615 match: matchExpr, 616 attrHandle: {}, 617 find: {}, 618 relative: { 619 ">": { 620 dir: "parentNode", 621 first: true 622 }, 623 " ": { dir: "parentNode" }, 624 "+": { 625 dir: "previousSibling", 626 first: true 627 }, 628 "~": { dir: "previousSibling" } 629 }, 630 preFilter: { 631 ATTR: function(match) { 632 match[1] = match[1].replace(runescape, funescape); 633 match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); 634 if (match[2] === "~=") match[3] = " " + match[3] + " "; 635 return match.slice(0, 4); 636 }, 637 CHILD: function(match) { 638 match[1] = match[1].toLowerCase(); 639 if (match[1].slice(0, 3) === "nth") { 640 if (!match[3]) find.error(match[0]); 641 match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); 642 match[5] = +(match[7] + match[8] || match[3] === "odd"); 643 } else if (match[3]) find.error(match[0]); 644 return match; 645 }, 646 PSEUDO: function(match) { 647 var excess, unquoted = !match[6] && match[2]; 648 if (matchExpr.CHILD.test(match[0])) return null; 649 if (match[3]) match[2] = match[4] || match[5] || ""; 650 else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { 651 match[0] = match[0].slice(0, excess); 652 match[2] = unquoted.slice(0, excess); 653 } 654 return match.slice(0, 3); 655 } 656 }, 657 filter: { 658 TAG: function(nodeNameSelector) { 659 var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); 660 return nodeNameSelector === "*" ? function() { 661 return true; 662 } : function(elem) { 663 return nodeName(elem, expectedNodeName); 664 }; 665 }, 666 CLASS: function(className) { 667 var pattern = classCache[className + " "]; 668 return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) { 669 return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""); 670 }); 671 }, 672 ATTR: function(name, operator, check) { 673 return function(elem) { 674 var result = find.attr(elem, name); 675 if (result == null) return operator === "!="; 676 if (!operator) return true; 677 result += ""; 678 if (operator === "=") return result === check; 679 if (operator === "!=") return result !== check; 680 if (operator === "^=") return check && result.indexOf(check) === 0; 681 if (operator === "*=") return check && result.indexOf(check) > -1; 682 if (operator === "$=") return check && result.slice(-check.length) === check; 683 if (operator === "~=") return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1; 684 if (operator === "|=") return result === check || result.slice(0, check.length + 1) === check + "-"; 685 return false; 686 }; 687 }, 688 CHILD: function(type, what, _argument, first, last) { 689 var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type"; 690 return first === 1 && last === 0 ? function(elem) { 691 return !!elem.parentNode; 692 } : function(elem, _context, xml) { 693 var cache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
vendor: 4,452 bytes, lines 694-812
694 if (parent) { 695 if (simple) { 696 while (dir) { 697 node = elem; 698 while (node = node[dir]) if (ofType ? nodeName(node, name) : node.nodeType === 1) return false; 699 start = dir = type === "only" && !start && "nextSibling"; 700 } 701 return true; 702 } 703 start = [forward ? parent.firstChild : parent.lastChild]; 704 if (forward && useCache) { 705 outerCache = parent[expando] || (parent[expando] = {}); 706 cache = outerCache[type] || []; 707 nodeIndex = cache[0] === dirruns && cache[1]; 708 diff = nodeIndex && cache[2]; 709 node = nodeIndex && parent.childNodes[nodeIndex]; 710 while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) if (node.nodeType === 1 && ++diff && node === elem) { 711 outerCache[type] = [ 712 dirruns, 713 nodeIndex, 714 diff 715 ]; 716 break; 717 } 718 } else { 719 if (useCache) { 720 outerCache = elem[expando] || (elem[expando] = {}); 721 cache = outerCache[type] || []; 722 nodeIndex = cache[0] === dirruns && cache[1]; 723 diff = nodeIndex; 724 } 725 if (diff === false) { 726 while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) { 727 if (useCache) { 728 outerCache = node[expando] || (node[expando] = {}); 729 outerCache[type] = [dirruns, diff]; 730 } 731 if (node === elem) break; 732 } 733 } 734 } 735 diff -= last; 736 return diff === first || diff % first === 0 && diff / first >= 0; 737 } 738 }; 739 }, 740 PSEUDO: function(pseudo, argument) { 741 var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo); 742 if (fn[expando]) return fn(argument); 743 if (fn.length > 1) { 744 args = [ 745 pseudo, 746 pseudo, 747 "", 748 argument 749 ]; 750 return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches) { 751 var idx, matched = fn(seed, argument), i = matched.length; 752 while (i--) { 753 idx = indexOf.call(seed, matched[i]); 754 seed[idx] = !(matches[idx] = matched[i]); 755 } 756 }) : function(elem) { 757 return fn(elem, 0, args); 758 }; 759 } 760 return fn; 761 } 762 }, 763 pseudos: { 764 not: markFunction(function(selector) { 765 var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1")); 766 return matcher[expando] ? markFunction(function(seed, matches, _context, xml) { 767 var elem, unmatched = matcher(seed, null, xml, []), i = seed.length; 768 while (i--) if (elem = unmatched[i]) seed[i] = !(matches[i] = elem); 769 }) : function(elem, _context, xml) { 770 input[0] = elem; 771 matcher(input, null, xml, results); 772 input[0] = null; 773 return !results.pop(); 774 }; 775 }), 776 has: markFunction(function(selector) { 777 return function(elem) { 778 return find(selector, elem).length > 0; 779 }; 780 }), 781 contains: markFunction(function(text) { 782 text = text.replace(runescape, funescape); 783 return function(elem) { 784 return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1; 785 }; 786 }), 787 lang: markFunction(function(lang) { 788 if (!ridentifier.test(lang || "")) find.error("unsupported lang: " + lang); 789 lang = lang.replace(runescape, funescape).toLowerCase(); 790 return function(elem) { 791 var elemLang; 792 do 793 if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) { 794 elemLang = elemLang.toLowerCase(); 795 return elemLang === lang || elemLang.indexOf(lang + "-") === 0; 796 } 797 while ((elem = elem.parentNode) && elem.nodeType === 1); 798 return false; 799 }; 800 }), 801 target: function(elem) { 802 var hash = window.location && window.location.hash; 803 return hash && hash.slice(1) === elem.id; 804 }, 805 root: function(elem) { 806 return elem === documentElement; 807 }, 808 focus: function(elem) { 809 return elem === safeActiveElement() && document.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex); 810 }, 811 enabled: createDisabledPseudo(false), 812 disabled: createDisabledPseudo(true),
813 checked: function(elem) { 814 return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected; 815 }, 816 selected: function(elem) { 817 if (elem.parentNode) elem.parentNode.selectedIndex; 818 return elem.selected === true; 819 }, 820 empty: function(elem) { 821 for (elem = elem.firstChild; elem; elem = elem.nextSibling) if (elem.nodeType < 6) return false; 822 return true; 823 }, 824 parent: function(elem) { 825 return !Expr.pseudos.empty(elem); 826 }, 827 header: function(elem) { 828 return rheader.test(elem.nodeName); 829 }, 830 input: function(elem) { 831 return rinputs.test(elem.nodeName); 832 }, 833 button: function(elem) { 834 return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button"); 835 }, 836 text: function(elem) { 837 var attr; 838 return nodeName(elem, "input") && elem.type === "text" && ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); 839 }, 840 first: createPositionalPseudo(function() { 841 return [0]; 842 }), 843 last: createPositionalPseudo(function(_matchIndexes, length) { 844 return [length - 1]; 845 }), 846 eq: createPositionalPseudo(function(_matchIndexes, length, argument) { 847 return [argument < 0 ? argument + length : argument]; 848 }), 849 even: createPositionalPseudo(function(matchIndexes, length) { 850 var i = 0; 851 for (; i < length; i += 2) matchIndexes.push(i); 852 return matchIndexes; 853 }), 854 odd: createPositionalPseudo(function(matchIndexes, length) { 855 var i = 1; 856 for (; i < length; i += 2) matchIndexes.push(i); 857 return matchIndexes; 858 }), 859 lt: createPositionalPseudo(function(matchIndexes, length, argument) { 860 var i; 861 if (argument < 0) i = argument + length; 862 else if (argument > length) i = length; 863 else i = argument; 864 for (; --i >= 0;) matchIndexes.push(i); 865 return matchIndexes; 866 }), 867 gt: createPositionalPseudo(function(matchIndexes, length, argument) { 868 var i = argument < 0 ? argument + length : argument; 869 for (; ++i < length;) matchIndexes.push(i); 870 return matchIndexes; 871 }) 872 } 873 }; 874 Expr.pseudos.nth = Expr.pseudos.eq; 875 for (i in { 876 radio: true, 877 checkbox: true, 878 file: true, 879 password: true, 880 image: true 881 }) Expr.pseudos[i] = createInputPseudo(i); 882 for (i in { 883 submit: true, 884 reset: true 885 }) Expr.pseudos[i] = createButtonPseudo(i); 886 function setFilters() {} 887 setFilters.prototype = Expr.filters = Expr.pseudos; 888 Expr.setFilters = new setFilters(); 889 function tokenize(selector, parseOnly) { 890 var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "]; 891 if (cached) return parseOnly ? 0 : cached.slice(0); 892 soFar = selector; 893 groups = []; 894 preFilters = Expr.preFilter; 895 while (soFar) { 896 if (!matched || (match = rcomma.exec(soFar))) { 897 if (match) soFar = soFar.slice(match[0].length) || soFar; 898 groups.push(tokens = []); 899 } 900 matched = false; 901 if (match = rleadingCombinator.exec(soFar)) { 902 matched = match.shift(); 903 tokens.push({ 904 value: matched, 905 type: match[0].replace(rtrimCSS, " ") 906 }); 907 soFar = soFar.slice(matched.length); 908 } 909 for (type in Expr.filter) if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { 910 matched = match.shift(); 911 tokens.push({ 912 value: matched, 913 type, 914 matches: match 915 }); 916 soFar = soFar.slice(matched.length); 917 } 918 if (!matched) break; 919 } 920 if (parseOnly) return soFar.length; 921 return soFar ? find.error(selector) : tokenCache(selector, groups).slice(0); 922 } 923 function toSelector(tokens) { 924 var i = 0, len = tokens.length, selector = ""; 925 for (; i < len; i++) selector += tokens[i].value; 926 return selector; 927 } 928 function addCombinator(matcher, combinator, base) { 929 var dir = combinator.dir, skip = combinator.next, key = skip || dir, checkNonElements = base && key === "parentNode", doneName = done++; 930 return combinator.first ? function(elem, context, xml) { 931 while (elem = elem[dir]) if (elem.nodeType === 1 || checkNonElements) return matcher(elem, context, xml); 932 return false;
933 } : function(elem, context, xml) { 934 var oldCache, outerCache, newCache = [dirruns, doneName]; 935 if (xml) { 936 while (elem = elem[dir]) if (elem.nodeType === 1 || checkNonElements) { 937 if (matcher(elem, context, xml)) return true; 938 } 939 } else while (elem = elem[dir]) if (elem.nodeType === 1 || checkNonElements) { 940 outerCache = elem[expando] || (elem[expando] = {}); 941 if (skip && nodeName(elem, skip)) elem = elem[dir] || elem; 942 else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) return newCache[2] = oldCache[2]; 943 else { 944 outerCache[key] = newCache; 945 if (newCache[2] = matcher(elem, context, xml)) return true; 946 } 947 } 948 return false; 949 }; 950 } 951 function elementMatcher(matchers) { 952 return matchers.length > 1 ? function(elem, context, xml) { 953 var i = matchers.length; 954 while (i--) if (!matchers[i](elem, context, xml)) return false; 955 return true; 956 } : matchers[0]; 957 } 958 function multipleContexts(selector, contexts, results) { 959 var i = 0, len = contexts.length; 960 for (; i < len; i++) find(selector, contexts[i], results); 961 return results; 962 } 963 function condense(unmatched, map, filter, context, xml) { 964 var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; 965 for (; i < len; i++) if (elem = unmatched[i]) { 966 if (!filter || filter(elem, context, xml)) { 967 newUnmatched.push(elem); 968 if (mapped) map.push(i); 969 } 970 } 971 return newUnmatched; 972 } 973 function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { 974 if (postFilter && !postFilter[expando]) postFilter = setMatcher(postFilter); 975 if (postFinder && !postFinder[expando]) postFinder = setMatcher(postFinder, postSelector); 976 return markFunction(function(seed, results, context, xml) { 977 var temp, i, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems; 978 if (matcher) { 979 matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results; 980 matcher(matcherIn, matcherOut, context, xml); 981 } else matcherOut = matcherIn; 982 if (postFilter) { 983 temp = condense(matcherOut, postMap); 984 postFilter(temp, [], context, xml); 985 i = temp.length; 986 while (i--) if (elem = temp[i]) matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); 987 } 988 if (seed) { 989 if (postFinder || preFilter) { 990 if (postFinder) { 991 temp = []; 992 i = matcherOut.length; 993 while (i--) if (elem = matcherOut[i]) temp.push(matcherIn[i] = elem); 994 postFinder(null, matcherOut = [], temp, xml); 995 } 996 i = matcherOut.length; 997 while (i--) if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) seed[temp] = !(results[temp] = elem); 998 } 999 } else { 1000 matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut); 1001 if (postFinder) postFinder(null, results, matcherOut, xml); 1002 else push.apply(results, matcherOut); 1003 } 1004 }); 1005 } 1006 function matcherFromTokens(tokens) { 1007 var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) { 1008 return elem === checkContext; 1009 }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) { 1010 return indexOf.call(checkContext, elem) > -1; 1011 }, implicitRelative, true), matchers = [function(elem, context, xml) { 1012 var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); 1013 checkContext = null; 1014 return ret; 1015 }]; 1016 for (; i < len; i++) if (matcher = Expr.relative[tokens[i].type]) matchers = [addCombinator(elementMatcher(matchers), matcher)]; 1017 else { 1018 matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); 1019 if (matcher[expando]) { 1020 j = ++i; 1021 for (; j < len; j++) if (Expr.relative[tokens[j].type]) break; 1022 return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === " " ? "*" : "" })).replace(rtrimCSS, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens)); 1023 } 1024 matchers.push(matcher); 1025 } 1026 return elementMatcher(matchers); 1027 } 1028 function matcherFromGroupMatchers(elementMatchers, setMatchers) { 1029 var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) { 1030 var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || .1, len = elems.length; 1031 if (outermost) outermostContext = context == document || context || outermost; 1032 for (; i !== len && (elem = elems[i]) != null; i++) { 1033 if (byElement && elem) { 1034 j = 0; 1035 if (!context && elem.ownerDocument != document) { 1036 setDocument(elem); 1037 xml = !documentIsHTML; 1038 } 1039 while (matcher = elementMatchers[j++]) if (matcher(elem, context || document, xml)) { 1040 push.call(results, elem); 1041 break; 1042 } 1043 if (outermost) dirruns = dirrunsUnique; 1044 } 1045 if (bySet) { 1046 if (elem = !matcher && elem) matchedCount--; 1047 if (seed) unmatched.push(elem); 1048 } 1049 } 1050 matchedCount += i; 1051 if (bySet && i !== matchedCount) { 1052 j = 0; 1053 while (matcher = setMatchers[j++]) matcher(unmatched, setMatched, context, xml); 1054 if (seed) { 1055 if (matchedCount > 0) {
1056 while (i--) if (!(unmatched[i] || setMatched[i])) setMatched[i] = pop.call(results); 1057 } 1058 setMatched = condense(setMatched); 1059 } 1060 push.apply(results, setMatched); 1061 if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) jQuery.uniqueSort(results); 1062 } 1063 if (outermost) { 1064 dirruns = dirrunsUnique; 1065 outermostContext = contextBackup; 1066 } 1067 return unmatched; 1068 }; 1069 return bySet ? markFunction(superMatcher) : superMatcher; 1070 } 1071 function compile(selector, match) { 1072 var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "]; 1073 if (!cached) { 1074 if (!match) match = tokenize(selector); 1075 i = match.length; 1076 while (i--) { 1077 cached = matcherFromTokens(match[i]); 1078 if (cached[expando]) setMatchers.push(cached); 1079 else elementMatchers.push(cached); 1080 } 1081 cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); 1082 cached.selector = selector; 1083 } 1084 return cached; 1085 } 1086 /** 1087 * A low-level selection function that works with jQuery's compiled 1088 * selector functions 1089 * @param {String|Function} selector A selector or a pre-compiled 1090 * selector function built with jQuery selector compile 1091 * @param {Element} context 1092 * @param {Array} [results] 1093 * @param {Array} [seed] A set of elements to match against 1094 */ 1095 function select(selector, context, results, seed) { 1096 var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector); 1097 results = results || []; 1098 if (match.length === 1) { 1099 tokens = match[0] = match[0].slice(0); 1100 if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { 1101 context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0]; 1102 if (!context) return results; 1103 else if (compiled) context = context.parentNode; 1104 selector = selector.slice(tokens.shift().value.length); 1105 } 1106 i = matchExpr.needsContext.test(selector) ? 0 : tokens.length; 1107 while (i--) { 1108 token = tokens[i]; 1109 if (Expr.relative[type = token.type]) break; 1110 if (find = Expr.find[type]) { 1111 if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) { 1112 tokens.splice(i, 1); 1113 selector = seed.length && toSelector(tokens); 1114 if (!selector) { 1115 push.apply(results, seed); 1116 return results; 1117 } 1118 break; 1119 } 1120 } 1121 } 1122 } 1123 (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context); 1124 return results; 1125 } 1126 support.sortStable = expando.split("").sort(sortOrder).join("") === expando; 1127 setDocument(); 1128 support.sortDetached = assert(function(el) { 1129 return el.compareDocumentPosition(document.createElement("fieldset")) & 1; 1130 }); 1131 jQuery.find = find; 1132 jQuery.expr[":"] = jQuery.expr.pseudos; 1133 jQuery.unique = jQuery.uniqueSort; 1134 find.compile = compile; 1135 find.select = select; 1136 find.setDocument = setDocument; 1137 find.tokenize = tokenize; 1138 find.escape = jQuery.escapeSelector; 1139 find.getText = jQuery.text; 1140 find.isXML = jQuery.isXMLDoc; 1141 find.selectors = jQuery.expr; 1142 find.support = jQuery.support; 1143 find.uniqueSort = jQuery.uniqueSort; 1144 })(); 1145 var dir = function(elem, dir, until) { 1146 var matched = [], truncate = until !== void 0; 1147 while ((elem = elem[dir]) && elem.nodeType !== 9) if (elem.nodeType === 1) { 1148 if (truncate && jQuery(elem).is(until)) break; 1149 matched.push(elem); 1150 } 1151 return matched; 1152 }; 1153 var siblings = function(n, elem) { 1154 var matched = []; 1155 for (; n; n = n.nextSibling) if (n.nodeType === 1 && n !== elem) matched.push(n); 1156 return matched; 1157 }; 1158 var rneedsContext = jQuery.expr.match.needsContext; 1159 var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; 1160 function winnow(elements, qualifier, not) { 1161 if (isFunction(qualifier)) return jQuery.grep(elements, function(elem, i) { 1162 return !!qualifier.call(elem, i, elem) !== not; 1163 }); 1164 if (qualifier.nodeType) return jQuery.grep(elements, function(elem) { 1165 return elem === qualifier !== not; 1166 }); 1167 if (typeof qualifier !== "string") return jQuery.grep(elements, function(elem) { 1168 return indexOf.call(qualifier, elem) > -1 !== not; 1169 }); 1170 return jQuery.filter(qualifier, elements, not); 1171 } 1172 jQuery.filter = function(expr, elems, not) { 1173 var elem = elems[0]; 1174 if (not) expr = ":not(" + expr + ")"; 1175 if (elems.length === 1 && elem.nodeType === 1) return jQuery.find.matchesSelector(elem, expr) ? [elem] : []; 1176 return jQuery.find.matches(expr, jQuery.grep(elems, function(elem) { 1177 return elem.nodeType === 1; 1178 })); 1179 }; 1180 jQuery.fn.extend({ 1181 find: function(selector) { 1182 var i, ret, len = this.length, self = this; 1183 if (typeof selector !== "string") return this.pushStack(jQuery(selector).filter(function() { 1184 for (i = 0; i < len;
1184 i++) if (jQuery.contains(self[i], this)) return true; 1185 })); 1186 ret = this.pushStack([]); 1187 for (i = 0; i < len; i++) jQuery.find(selector, self[i], ret); 1188 return len > 1 ? jQuery.uniqueSort(ret) : ret; 1189 }, 1190 filter: function(selector) { 1191 return this.pushStack(winnow(this, selector || [], false)); 1192 }, 1193 not: function(selector) { 1194 return this.pushStack(winnow(this, selector || [], true)); 1195 }, 1196 is: function(selector) { 1197 return !!winnow(this, typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length; 1198 } 1199 }); 1200 var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function(selector, context, root) { 1201 var match, elem; 1202 if (!selector) return this; 1203 root = root || rootjQuery; 1204 if (typeof selector === "string") { 1205 if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) match = [ 1206 null, 1207 selector, 1208 null 1209 ]; 1210 else match = rquickExpr.exec(selector); 1211 if (match && (match[1] || !context)) if (match[1]) { 1212 context = context instanceof jQuery ? context[0] : context; 1213 jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); 1214 if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) for (match in context) if (isFunction(this[match])) this[match](context[match]); 1215 else this.attr(match, context[match]); 1216 return this; 1217 } else { 1218 elem = document.getElementById(match[2]); 1219 if (elem) { 1220 this[0] = elem; 1221 this.length = 1; 1222 } 1223 return this; 1224 } 1225 else if (!context || context.jquery) return (context || root).find(selector); 1226 else return this.constructor(context).find(selector); 1227 } else if (selector.nodeType) { 1228 this[0] = selector; 1229 this.length = 1; 1230 return this; 1231 } else if (isFunction(selector)) return root.ready !== void 0 ? root.ready(selector) : selector(jQuery); 1232 return jQuery.makeArray(selector, this); 1233 }; 1234 init.prototype = jQuery.fn; 1235 rootjQuery = jQuery(document); 1236 var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = { 1237 children: true, 1238 contents: true, 1239 next: true, 1240 prev: true 1241 }; 1242 jQuery.fn.extend({ 1243 has: function(target) { 1244 var targets = jQuery(target, this), l = targets.length; 1245 return this.filter(function() { 1246 var i = 0; 1247 for (; i < l; i++) if (jQuery.contains(this, targets[i])) return true; 1248 }); 1249 }, 1250 closest: function(selectors, context) { 1251 var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors); 1252 if (!rneedsContext.test(selectors)) { 1253 for (; i < l; i++) for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) { 1254 matched.push(cur); 1255 break; 1256 } 1257 } 1258 return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched); 1259 }, 1260 index: function(elem) { 1261 if (!elem) return this[0] && this[0].parentNode ? this.first().prevAll().length : -1; 1262 if (typeof elem === "string") return indexOf.call(jQuery(elem), this[0]); 1263 return indexOf.call(this, elem.jquery ? elem[0] : elem); 1264 }, 1265 add: function(selector, context) { 1266 return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context)))); 1267 }, 1268 addBack: function(selector) { 1269 return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector)); 1270 } 1271 }); 1272 function sibling(cur, dir) { 1273 while ((cur = cur[dir]) && cur.nodeType !== 1); 1274 return cur; 1275 } 1276 jQuery.each({ 1277 parent: function(elem) { 1278 var parent = elem.parentNode; 1279 return parent && parent.nodeType !== 11 ? parent : null; 1280 }, 1281 parents: function(elem) { 1282 return dir(elem, "parentNode"); 1283 }, 1284 parentsUntil: function(elem, _i, until) { 1285 return dir(elem, "parentNode", until); 1286 }, 1287 next: function(elem) { 1288 return sibling(elem, "nextSibling"); 1289 }, 1290 prev: function(elem) { 1291 return sibling(elem, "previousSibling"); 1292 }, 1293 nextAll: function(elem) { 1294 return dir(elem, "nextSibling"); 1295 }, 1296 prevAll: function(elem) { 1297 return dir(elem, "previousSibling"); 1298 }, 1299 nextUntil: function(elem, _i, until) { 1300 return dir(elem, "nextSibling", until); 1301 }, 1302 prevUntil: function(elem, _i, until) { 1303 return dir(elem, "previousSibling", until); 1304 }, 1305 siblings: function(elem) { 1306 return siblings((elem.parentNode || {}).firstChild, elem); 1307 }, 1308 children: function(elem) { 1309 return siblings(elem.firstChild); 1310 },
vendor: 5,564 bytes, lines 1311-1497
1311 contents: function(elem) { 1312 if (elem.contentDocument != null && getProto(elem.contentDocument)) return elem.contentDocument; 1313 if (nodeName(elem, "template")) elem = elem.content || elem; 1314 return jQuery.merge([], elem.childNodes); 1315 } 1316 }, function(name, fn) { 1317 jQuery.fn[name] = function(until, selector) { 1318 var matched = jQuery.map(this, fn, until); 1319 if (name.slice(-5) !== "Until") selector = until; 1320 if (selector && typeof selector === "string") matched = jQuery.filter(selector, matched); 1321 if (this.length > 1) { 1322 if (!guaranteedUnique[name]) jQuery.uniqueSort(matched); 1323 if (rparentsprev.test(name)) matched.reverse(); 1324 } 1325 return this.pushStack(matched); 1326 }; 1327 }); 1328 var rnothtmlwhite = /[^\x20\t\r\n\f]+/g; 1329 function createOptions(options) { 1330 var object = {}; 1331 jQuery.each(options.match(rnothtmlwhite) || [], function(_, flag) { 1332 object[flag] = true; 1333 }); 1334 return object; 1335 } 1336 jQuery.Callbacks = function(options) { 1337 options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options); 1338 var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() { 1339 locked = locked || options.once; 1340 fired = firing = true; 1341 for (; queue.length; firingIndex = -1) { 1342 memory = queue.shift(); 1343 while (++firingIndex < list.length) if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) { 1344 firingIndex = list.length; 1345 memory = false; 1346 } 1347 } 1348 if (!options.memory) memory = false; 1349 firing = false; 1350 if (locked) if (memory) list = []; 1351 else list = ""; 1352 }, self = { 1353 add: function() { 1354 if (list) { 1355 if (memory && !firing) { 1356 firingIndex = list.length - 1; 1357 queue.push(memory); 1358 } 1359 (function add(args) { 1360 jQuery.each(args, function(_, arg) { 1361 if (isFunction(arg)) { 1362 if (!options.unique || !self.has(arg)) list.push(arg); 1363 } else if (arg && arg.length && toType(arg) !== "string") add(arg); 1364 }); 1365 })(arguments); 1366 if (memory && !firing) fire(); 1367 } 1368 return this; 1369 }, 1370 remove: function() { 1371 jQuery.each(arguments, function(_, arg) { 1372 var index; 1373 while ((index = jQuery.inArray(arg, list, index)) > -1) { 1374 list.splice(index, 1); 1375 if (index <= firingIndex) firingIndex--; 1376 } 1377 }); 1378 return this; 1379 }, 1380 has: function(fn) { 1381 return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0; 1382 }, 1383 empty: function() { 1384 if (list) list = []; 1385 return this; 1386 }, 1387 disable: function() { 1388 locked = queue = []; 1389 list = memory = ""; 1390 return this; 1391 }, 1392 disabled: function() { 1393 return !list; 1394 }, 1395 lock: function() { 1396 locked = queue = []; 1397 if (!memory && !firing) list = memory = ""; 1398 return this; 1399 }, 1400 locked: function() { 1401 return !!locked; 1402 }, 1403 fireWith: function(context, args) { 1404 if (!locked) { 1405 args = args || []; 1406 args = [context, args.slice ? args.slice() : args]; 1407 queue.push(args); 1408 if (!firing) fire(); 1409 } 1410 return this; 1411 }, 1412 fire: function() { 1413 self.fireWith(this, arguments); 1414 return this; 1415 }, 1416 fired: function() { 1417 return !!fired; 1418 } 1419 }; 1420 return self; 1421 }; 1422 function Identity(v) { 1423 return v; 1424 } 1425 function Thrower(ex) { 1426 throw ex; 1427 } 1428 function adoptValue(value, resolve, reject, noValue) { 1429 var method; 1430 try { 1431 if (value && isFunction(method = value.promise)) method.call(value).done(resolve).fail(reject); 1432 else if (value && isFunction(method = value.then)) method.call(value, resolve, reject); 1433 else resolve.apply(void 0, [value].slice(noValue)); 1434 } catch (value) { 1435 reject.apply(void 0, [value]); 1436 } 1437 } 1438 jQuery.extend({ 1439 Deferred: function(func) { 1440 var tuples = [ 1441 [ 1442 "notify", 1443 "progress", 1444 jQuery.Callbacks("memory"), 1445 jQuery.Callbacks("memory"), 1446 2 1447 ], 1448 [ 1449 "resolve", 1450 "done", 1451 jQuery.Callbacks("once memory"), 1452 jQuery.Callbacks("once memory"), 1453 0, 1454 "resolved" 1455 ], 1456 [ 1457 "reject", 1458 "fail", 1459 jQuery.Callbacks("once memory"), 1460 jQuery.Callbacks("once memory"), 1461 1, 1462 "rejected" 1463 ] 1464 ], state = "pending", promise = { 1465 state: function() { 1466 return state; 1467 }, 1468 always: function() { 1469 deferred.done(arguments).fail(arguments); 1470 return this; 1471 }, 1472 "catch": function(fn) { 1473 return promise.then(null, fn); 1474 }, 1475 pipe: function() { 1476 var fns = arguments; 1477 return jQuery.Deferred(function(newDefer) { 1478 jQuery.each(tuples, function(_i, tuple) { 1479 var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]]; 1480 deferred[tuple[1]](function() { 1481 var returned = fn && fn.apply(this, arguments); 1482 if (returned && isFunction(returned.promise)) returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject); 1483 else newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments); 1484 }); 1485 }); 1486 fns = null; 1487 }).promise(); 1488 }, 1489 then: function(onFulfilled, onRejected, onProgress) { 1490 var maxDepth = 0; 1491 function resolve(depth, deferred, handler, special) { 1492 return function() { 1493 var that = this, args = arguments, mightThrow = function() { 1494 var returned, then; 1495 if (depth < maxDepth) return; 1496 returned = handler.apply(that, args); 1497 if (returned === deferred.promise()) throw new TypeError("Thenable self
1497-resolution"); 1498 then = returned && (typeof returned === "object" || typeof returned === "function") && returned.then; 1499 if (isFunction(then)) if (special) then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special)); 1500 else { 1501 maxDepth++; 1502 then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special), resolve(maxDepth, deferred, Identity, deferred.notifyWith)); 1503 } 1504 else { 1505 if (handler !== Identity) { 1506 that = void 0; 1507 args = [returned]; 1508 } 1509 (special || deferred.resolveWith)(that, args); 1510 } 1511 }, process = special ? mightThrow : function() { 1512 try { 1513 mightThrow(); 1514 } catch (e) { 1515 if (jQuery.Deferred.exceptionHook) jQuery.Deferred.exceptionHook(e, process.error); 1516 if (depth + 1 >= maxDepth) { 1517 if (handler !== Thrower) { 1518 that = void 0; 1519 args = [e]; 1520 } 1521 deferred.rejectWith(that, args); 1522 } 1523 } 1524 }; 1525 if (depth) process(); 1526 else { 1527 if (jQuery.Deferred.getErrorHook) process.error = jQuery.Deferred.getErrorHook(); 1528 else if (jQuery.Deferred.getStackHook) process.error = jQuery.Deferred.getStackHook(); 1529 window.setTimeout(process); 1530 } 1531 }; 1532 } 1533 return jQuery.Deferred(function(newDefer) { 1534 tuples[0][3].add(resolve(0, newDefer, isFunction(onProgress) ? onProgress : Identity, newDefer.notifyWith)); 1535 tuples[1][3].add(resolve(0, newDefer, isFunction(onFulfilled) ? onFulfilled : Identity)); 1536 tuples[2][3].add(resolve(0, newDefer, isFunction(onRejected) ? onRejected : Thrower)); 1537 }).promise(); 1538 }, 1539 promise: function(obj) { 1540 return obj != null ? jQuery.extend(obj, promise) : promise; 1541 } 1542 }, deferred = {}; 1543 jQuery.each(tuples, function(i, tuple) { 1544 var list = tuple[2], stateString = tuple[5]; 1545 promise[tuple[1]] = list.add; 1546 if (stateString) list.add(function() { 1547 state = stateString; 1548 }, tuples[3 - i][2].disable, tuples[3 - i][3].disable, tuples[0][2].lock, tuples[0][3].lock); 1549 list.add(tuple[3].fire); 1550 deferred[tuple[0]] = function() { 1551 deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments); 1552 return this; 1553 }; 1554 deferred[tuple[0] + "With"] = list.fireWith; 1555 }); 1556 promise.promise(deferred); 1557 if (func) func.call(deferred, deferred); 1558 return deferred; 1559 }, 1560 when: function(singleValue) { 1561 var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery.Deferred(), updateFunc = function(i) { 1562 return function(value) { 1563 resolveContexts[i] = this; 1564 resolveValues[i] = arguments.length > 1 ? slice.call(arguments) : value; 1565 if (!--remaining) primary.resolveWith(resolveContexts, resolveValues); 1566 }; 1567 }; 1568 if (remaining <= 1) { 1569 adoptValue(singleValue, primary.done(updateFunc(i)).resolve, primary.reject, !remaining); 1570 if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) return primary.then(); 1571 } 1572 while (i--) adoptValue(resolveValues[i], updateFunc(i), primary.reject); 1573 return primary.promise(); 1574 } 1575 }); 1576 var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 1577 jQuery.Deferred.exceptionHook = function(error, asyncError) { 1578 if (window.console && window.console.warn && error && rerrorNames.test(error.name)) window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, asyncError); 1579 }; 1580 jQuery.readyException = function(error) { 1581 window.setTimeout(function() { 1582 throw error; 1583 }); 1584 }; 1585 var readyList = jQuery.Deferred(); 1586 jQuery.fn.ready = function(fn) { 1587 readyList.then(fn).catch(function(error) { 1588 jQuery.readyException(error); 1589 }); 1590 return this; 1591 }; 1592 jQuery.extend({ 1593 isReady: false, 1594 readyWait: 1, 1595 ready: function(wait) { 1596 if (wait === true ? --jQuery.readyWait : jQuery.isReady) return; 1597 jQuery.isReady = true; 1598 if (wait !== true && --jQuery.readyWait > 0) return; 1599 readyList.resolveWith(document, [jQuery]); 1600 } 1601 }); 1602 jQuery.ready.then = readyList.then; 1603 function completed() { 1604 document.removeEventListener("DOMContentLoaded", completed); 1605 window.removeEventListener("load", completed); 1606 jQuery.ready(); 1607 } 1608 if (document.readyState === "complete" || document.readyState !== "loading" && !document.documentElement.doScroll) window.setTimeout(jQuery.ready); 1609 else { 1610 document.addEventListener("DOMContentLoaded", completed); 1611 window.addEventListener("load", completed); 1612 } 1613 var access = function(elems, fn, key, value, chainable, emptyGet, raw) { 1614 var i = 0, len = elems.length, bulk = key == null; 1615 if (toType(key) === "object") { 1616 chainable = true; 1617 for (i in key) access(elems, fn, i, key[i], true, emptyGet, raw); 1618 } else if (value !== void 0) { 1619 chainable = true; 1620 if (!isFunction(value)) raw = true; 1621 if (bulk) if (raw) { 1622 fn.call(elems, value); 1623 fn = null; 1624 } else { 1625 bulk = fn; 1626 fn = function(elem, _key, value) {
1627 return bulk.call(jQuery(elem), value); 1628 }; 1629 } 1630 if (fn) for (; i < len; i++) fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key))); 1631 } 1632 if (chainable) return elems; 1633 if (bulk) return fn.call(elems); 1634 return len ? fn(elems[0], key) : emptyGet; 1635 }; 1636 var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; 1637 function fcamelCase(_all, letter) { 1638 return letter.toUpperCase(); 1639 } 1640 function camelCase(string) { 1641 return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); 1642 } 1643 var acceptData = function(owner) { 1644 return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType; 1645 }; 1646 function Data() { 1647 this.expando = jQuery.expando + Data.uid++; 1648 } 1649 Data.uid = 1; 1650 Data.prototype = { 1651 cache: function(owner) { 1652 var value = owner[this.expando]; 1653 if (!value) { 1654 value = {}; 1655 if (acceptData(owner)) if (owner.nodeType) owner[this.expando] = value; 1656 else Object.defineProperty(owner, this.expando, { 1657 value, 1658 configurable: true 1659 }); 1660 } 1661 return value; 1662 }, 1663 set: function(owner, data, value) { 1664 var prop, cache = this.cache(owner); 1665 if (typeof data === "string") cache[camelCase(data)] = value; 1666 else for (prop in data) cache[camelCase(prop)] = data[prop]; 1667 return cache; 1668 }, 1669 get: function(owner, key) { 1670 return key === void 0 ? this.cache(owner) : owner[this.expando] && owner[this.expando][camelCase(key)]; 1671 }, 1672 access: function(owner, key, value) { 1673 if (key === void 0 || key && typeof key === "string" && value === void 0) return this.get(owner, key); 1674 this.set(owner, key, value); 1675 return value !== void 0 ? value : key; 1676 }, 1677 remove: function(owner, key) { 1678 var i, cache = owner[this.expando]; 1679 if (cache === void 0) return; 1680 if (key !== void 0) { 1681 if (Array.isArray(key)) key = key.map(camelCase); 1682 else { 1683 key = camelCase(key); 1684 key = key in cache ? [key] : key.match(rnothtmlwhite) || []; 1685 } 1686 i = key.length; 1687 while (i--) delete cache[key[i]]; 1688 } 1689 if (key === void 0 || jQuery.isEmptyObject(cache)) if (owner.nodeType) owner[this.expando] = void 0; 1690 else delete owner[this.expando]; 1691 }, 1692 hasData: function(owner) { 1693 var cache = owner[this.expando]; 1694 return cache !== void 0 && !jQuery.isEmptyObject(cache); 1695 } 1696 }; 1697 var dataPriv = new Data(); 1698 var dataUser = new Data(); 1699 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; 1700 function getData(data) { 1701 if (data === "true") return true; 1702 if (data === "false") return false; 1703 if (data === "null") return null; 1704 if (data === +data + "") return +data; 1705 if (rbrace.test(data)) return JSON.parse(data); 1706 return data; 1707 } 1708 function dataAttr(elem, key, data) { 1709 var name; 1710 if (data === void 0 && elem.nodeType === 1) { 1711 name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase(); 1712 data = elem.getAttribute(name); 1713 if (typeof data === "string") { 1714 try { 1715 data = getData(data); 1716 } catch (e) {} 1717 dataUser.set(elem, key, data); 1718 } else data = void 0; 1719 } 1720 return data; 1721 } 1722 jQuery.extend({ 1723 hasData: function(elem) { 1724 return dataUser.hasData(elem) || dataPriv.hasData(elem); 1725 }, 1726 data: function(elem, name, data) { 1727 return dataUser.access(elem, name, data); 1728 }, 1729 removeData: function(elem, name) { 1730 dataUser.remove(elem, name); 1731 }, 1732 _data: function(elem, name, data) { 1733 return dataPriv.access(elem, name, data); 1734 }, 1735 _removeData: function(elem, name) { 1736 dataPriv.remove(elem, name); 1737 } 1738 }); 1739 jQuery.fn.extend({ 1740 data: function(key, value) { 1741 var i, name, data, elem = this[0], attrs = elem && elem.attributes; 1742 if (key === void 0) { 1743 if (this.length) { 1744 data = dataUser.get(elem); 1745 if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) { 1746 i = attrs.length; 1747 while (i--) if (attrs[i]) { 1748 name = attrs[i].name; 1749 if (name.indexOf("data-") === 0) { 1750 name = camelCase(name.slice(5)); 1751 dataAttr(elem, name, data[name]); 1752 } 1753 } 1754 dataPriv.set(elem, "hasDataAttrs", true); 1755 } 1756 } 1757 return data; 1758 } 1759 if (typeof key === "object") return this.each(function() { 1760 dataUser.set(this, key); 1761 }); 1762 return access(this, function(value) { 1763 var data; 1764 if (elem && value === void 0) { 1765 data = dataUser.get(elem, key); 1766 if (data !== void 0) return data; 1767 data = dataAttr(elem, key); 1768 if (data !== void 0) return data; 1769 return; 1770 } 1771 this.each(function() { 1772 dataUser.set(this, key, value); 1773 }); 1774 }, null, value, arguments.length > 1, null, true); 1775 }, 1776 removeData: function(key) { 1777 return this.each(function() { 1778 dataUser.remove(this, key); 1779 }); 1780 } 1781 }); 1782 jQuery.extend({ 1783 queue: function(elem, type, data) { 1784 var queue; 1785 if (elem) { 1786 type = (type || "fx") + "queue"; 1787 queue = dataPriv.get(elem, type); 1788 if (data) if (!queue || Array.isArray(data)) queue = dataPriv.access(elem, type, jQuery.makeArray(data)); 1789 else queue.push(data); 1790 return queue || []; 1791 } 1792 }, 1793 dequeue: function(elem, type) { 1794 type = type || "fx"; 1795 var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() { 1796 jQuery.dequeue(elem, type); 1797 }; 1798 if (fn === "inprogress") { 1799 fn = queue.shift(); 1800 startLength--; 1801 } 1802 if (fn) { 1803 if (type === "fx") queue.unshift("inprogress"); 1804 delete hooks.stop; 1805 fn.call(elem, next, hooks); 1806 } 1807 if (!startLength && hooks) hooks.empty.fire(); 1808 }, 1809 _queueHooks: function(elem, type) { 1810 var key = type + "queueHooks"; 1811 return dataPriv.get(elem, key) || dataPriv.access(elem, key, { empty: jQuery.Callbacks("once memory").add(function() { 1812 dataPriv.remove(elem, [type + "queue", key]); 1813 }) }); 1814 } 1815 }); 1816 jQuery.fn.extend({ 1817 queue: function(type, data) { 1818 var setter = 2; 1819 if (typeof type !== "string") { 1820 data = type; 1821 type = "fx"; 1822 setter--; 1823 } 1824 if (arguments.length < setter) return jQuery.queue(this[0], type);
vendor: 5,423 bytes, lines 1825-1974
1825 return data === void 0 ? this : this.each(function() { 1826 var queue = jQuery.queue(this, type, data); 1827 jQuery._queueHooks(this, type); 1828 if (type === "fx" && queue[0] !== "inprogress") jQuery.dequeue(this, type); 1829 }); 1830 }, 1831 dequeue: function(type) { 1832 return this.each(function() { 1833 jQuery.dequeue(this, type); 1834 }); 1835 }, 1836 clearQueue: function(type) { 1837 return this.queue(type || "fx", []); 1838 }, 1839 promise: function(type, obj) { 1840 var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { 1841 if (!--count) defer.resolveWith(elements, [elements]); 1842 }; 1843 if (typeof type !== "string") { 1844 obj = type; 1845 type = void 0; 1846 } 1847 type = type || "fx"; 1848 while (i--) { 1849 tmp = dataPriv.get(elements[i], type + "queueHooks"); 1850 if (tmp && tmp.empty) { 1851 count++; 1852 tmp.empty.add(resolve); 1853 } 1854 } 1855 resolve(); 1856 return defer.promise(obj); 1857 } 1858 }); 1859 var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; 1860 var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); 1861 var cssExpand = [ 1862 "Top", 1863 "Right", 1864 "Bottom", 1865 "Left" 1866 ]; 1867 var documentElement = document.documentElement; 1868 var isAttached = function(elem) { 1869 return jQuery.contains(elem.ownerDocument, elem); 1870 }, composed = { composed: true }; 1871 if (documentElement.getRootNode) isAttached = function(elem) { 1872 return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument; 1873 }; 1874 var isHiddenWithinTree = function(elem, el) { 1875 elem = el || elem; 1876 return elem.style.display === "none" || elem.style.display === "" && isAttached(elem) && jQuery.css(elem, "display") === "none"; 1877 }; 1878 function adjustCSS(elem, prop, valueParts, tween) { 1879 var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { 1880 return tween.cur(); 1881 } : function() { 1882 return jQuery.css(elem, prop, ""); 1883 }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop)); 1884 if (initialInUnit && initialInUnit[3] !== unit) { 1885 initial = initial / 2; 1886 unit = unit || initialInUnit[3]; 1887 initialInUnit = +initial || 1; 1888 while (maxIterations--) { 1889 jQuery.style(elem, prop, initialInUnit + unit); 1890 if ((1 - scale) * (1 - (scale = currentValue() / initial || .5)) <= 0) maxIterations = 0; 1891 initialInUnit = initialInUnit / scale; 1892 } 1893 initialInUnit = initialInUnit * 2; 1894 jQuery.style(elem, prop, initialInUnit + unit); 1895 valueParts = valueParts || []; 1896 } 1897 if (valueParts) { 1898 initialInUnit = +initialInUnit || +initial || 0; 1899 adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2]; 1900 if (tween) { 1901 tween.unit = unit; 1902 tween.start = initialInUnit; 1903 tween.end = adjusted; 1904 } 1905 } 1906 return adjusted; 1907 } 1908 var defaultDisplayMap = {}; 1909 function getDefaultDisplay(elem) { 1910 var temp, doc = elem.ownerDocument, nodeName = elem.nodeName, display = defaultDisplayMap[nodeName]; 1911 if (display) return display; 1912 temp = doc.body.appendChild(doc.createElement(nodeName)); 1913 display = jQuery.css(temp, "display"); 1914 temp.parentNode.removeChild(temp); 1915 if (display === "none") display = "block"; 1916 defaultDisplayMap[nodeName] = display; 1917 return display; 1918 } 1919 function showHide(elements, show) { 1920 var display, elem, values = [], index = 0, length = elements.length; 1921 for (; index < length; index++) { 1922 elem = elements[index]; 1923 if (!elem.style) continue; 1924 display = elem.style.display; 1925 if (show) { 1926 if (display === "none") { 1927 values[index] = dataPriv.get(elem, "display") || null; 1928 if (!values[index]) elem.style.display = ""; 1929 } 1930 if (elem.style.display === "" && isHiddenWithinTree(elem)) values[index] = getDefaultDisplay(elem); 1931 } else if (display !== "none") { 1932 values[index] = "none"; 1933 dataPriv.set(elem, "display", display); 1934 } 1935 } 1936 for (index = 0; index < length; index++) if (values[index] != null) elements[index].style.display = values[index]; 1937 return elements; 1938 } 1939 jQuery.fn.extend({ 1940 show: function() { 1941 return showHide(this, true); 1942 }, 1943 hide: function() { 1944 return showHide(this); 1945 }, 1946 toggle: function(state) { 1947 if (typeof state === "boolean") return state ? this.show() : this.hide(); 1948 return this.each(function() { 1949 if (isHiddenWithinTree(this)) jQuery(this).show(); 1950 else jQuery(this).hide(); 1951 }); 1952 } 1953 }); 1954 var rcheckableType = /^(?:checkbox|radio)$/i; 1955 var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i; 1956 var rscriptType = /^$|^module$|\/(?:java|ecma)script/i; 1957 (function() { 1958 var div = document.createDocumentFragment().appendChild(document.createElement("div")), input = document.createElement("input"); 1959 input.setAttribute("type", "radio"); 1960 input.setAttribute("checked", "checked"); 1961 input.setAttribute("name", "t"); 1962 div.appendChild(input); 1963 support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; 1964 div.innerHTML = "<textarea>x</textarea>"; 1965 support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; 1966 div.innerHTML = "<option></option>"; 1967 support.option = !!div.lastChild; 1968 })(); 1969 var wrapMap = { 1970 thead: [ 1971 1, 1972 "<table>", 1973 "</table>" 1974 ],
1975 col: [ 1976 2, 1977 "<table><colgroup>", 1978 "</colgroup></table>" 1979 ], 1980 tr: [ 1981 2, 1982 "<table><tbody>", 1983 "</tbody></table>" 1984 ], 1985 td: [ 1986 3, 1987 "<table><tbody><tr>", 1988 "</tr></tbody></table>" 1989 ], 1990 _default: [ 1991 0, 1992 "", 1993 "" 1994 ] 1995 }; 1996 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 1997 wrapMap.th = wrapMap.td; 1998 if (!support.option) wrapMap.optgroup = wrapMap.option = [ 1999 1, 2000 "<select multiple='multiple'>", 2001 "</select>" 2002 ]; 2003 function getAll(context, tag) { 2004 var ret; 2005 if (typeof context.getElementsByTagName !== "undefined") ret = context.getElementsByTagName(tag || "*"); 2006 else if (typeof context.querySelectorAll !== "undefined") ret = context.querySelectorAll(tag || "*"); 2007 else ret = []; 2008 if (tag === void 0 || tag && nodeName(context, tag)) return jQuery.merge([context], ret); 2009 return ret; 2010 } 2011 function setGlobalEval(elems, refElements) { 2012 var i = 0, l = elems.length; 2013 for (; i < l; i++) dataPriv.set(elems[i], "globalEval", !refElements || dataPriv.get(refElements[i], "globalEval")); 2014 } 2015 var rhtml = /<|&#?\w+;/; 2016 function buildFragment(elems, context, scripts, selection, ignored) { 2017 var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; 2018 for (; i < l; i++) { 2019 elem = elems[i]; 2020 if (elem || elem === 0) if (toType(elem) === "object") jQuery.merge(nodes, elem.nodeType ? [elem] : elem); 2021 else if (!rhtml.test(elem)) nodes.push(context.createTextNode(elem)); 2022 else { 2023 tmp = tmp || fragment.appendChild(context.createElement("div")); 2024 tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); 2025 wrap = wrapMap[tag] || wrapMap._default; 2026 tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2]; 2027 j = wrap[0]; 2028 while (j--) tmp = tmp.lastChild; 2029 jQuery.merge(nodes, tmp.childNodes); 2030 tmp = fragment.firstChild; 2031 tmp.textContent = ""; 2032 } 2033 } 2034 fragment.textContent = ""; 2035 i = 0; 2036 while (elem = nodes[i++]) { 2037 if (selection && jQuery.inArray(elem, selection) > -1) { 2038 if (ignored) ignored.push(elem); 2039 continue; 2040 } 2041 attached = isAttached(elem); 2042 tmp = getAll(fragment.appendChild(elem), "script"); 2043 if (attached) setGlobalEval(tmp); 2044 if (scripts) { 2045 j = 0; 2046 while (elem = tmp[j++]) if (rscriptType.test(elem.type || "")) scripts.push(elem); 2047 } 2048 } 2049 return fragment; 2050 } 2051 var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 2052 function returnTrue() { 2053 return true; 2054 } 2055 function returnFalse() { 2056 return false; 2057 } 2058 function on(elem, types, selector, data, fn, one) { 2059 var origFn, type; 2060 if (typeof types === "object") { 2061 if (typeof selector !== "string") { 2062 data = data || selector; 2063 selector = void 0; 2064 } 2065 for (type in types) on(elem, type, selector, data, types[type], one); 2066 return elem; 2067 } 2068 if (data == null && fn == null) { 2069 fn = selector; 2070 data = selector = void 0; 2071 } else if (fn == null) if (typeof selector === "string") { 2072 fn = data; 2073 data = void 0; 2074 } else { 2075 fn = data; 2076 data = selector; 2077 selector = void 0; 2078 } 2079 if (fn === false) fn = returnFalse; 2080 else if (!fn) return elem; 2081 if (one === 1) { 2082 origFn = fn; 2083 fn = function(event) { 2084 jQuery().off(event); 2085 return origFn.apply(this, arguments); 2086 }; 2087 fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); 2088 } 2089 return elem.each(function() { 2090 jQuery.event.add(this, types, fn, data, selector); 2091 }); 2092 } 2093 jQuery.event = { 2094 global: {}, 2095 add: function(elem, types, handler, data, selector) { 2096 var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem); 2097 if (!acceptData(elem)) return; 2098 if (handler.handler) { 2099 handleObjIn = handler; 2100 handler = handleObjIn.handler; 2101 selector = handleObjIn.selector; 2102 } 2103 if (selector) jQuery.find.matchesSelector(documentElement, selector); 2104 if (!handler.guid) handler.guid = jQuery.guid++; 2105 if (!(events = elemData.events)) events = elemData.events = Object.create(null); 2106 if (!(eventHandle = elemData.handle)) eventHandle = elemData.handle = function(e) { 2107 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0; 2108 }; 2109 types = (types || "").match(rnothtmlwhite) || [""]; 2110 t = types.length; 2111 while (t--) { 2112 tmp = rtypenamespace.exec(types[t]) || []; 2113 type = origType = tmp[1]; 2114 namespaces = (tmp[2] || "").split(".").sort(); 2115 if (!type) continue; 2116 special = jQuery.event.special[type] || {}; 2117 type = (selector ? special.delegateType : special.bindType) || type; 2118 special = jQuery.event.special[type] || {}; 2119 handleObj = jQuery.extend({ 2120 type, 2121 origType, 2122 data, 2123 handler, 2124 guid: handler.guid, 2125 selector, 2126 needsContext: selector && jQuery.expr.match.needsContext.test(selector), 2127 namespace: namespaces.join(".") 2128 }, handleObjIn); 2129 if (!(handlers = events[type])) { 2130 handlers = events[type] = []; 2131 handlers.delegateCount = 0; 2132 if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { 2133 if (elem.addEventListener) elem.addEventListener(type, eventHandle); 2134 } 2135 } 2136 if (special.add) { 2137 special.add.call(elem, handleObj); 2138 if (!handleObj.handler.guid) handleObj.handler.guid = handler.guid; 2139 } 2140 if (selector) handlers.splice(handlers.delegateCount++, 0, handleObj); 2141 else handlers.push(handleObj); 2142 jQuery.event.global[type] = true; 2143 } 2144 }, 2145 remove: function(elem, types, handler, selector, mappedTypes) { 2146 var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem); 2147 if (!elemData || !(events = elemData.events)) return; 2148 types = (types || "").match(rnothtmlwhite) || [""]; 2149 t = types.length; 2150 while (t--) { 2151 tmp = rtypenamespace.exec(types[t]) || []; 2152 type = origType = tmp[1]; 2153 namespaces = (tmp[2] || "").split(".").sort(); 2154 if (!type) { 2155 for (type in events) jQuery.event.remove(elem, type + types[t], handler, selector, true); 2156 continue; 2157 } 2158 special = jQuery.event.special[type] || {}; 2159 type = (selector ? special.delegateType : special.bindType) || type; 2160 handlers = events[type] || []; 2161 tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); 2162 origCount = j = handlers.length; 2163 while (j--) { 2164 handleObj = handlers[j]; 2165 if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { 2166 handlers.splice(j, 1); 2167 if (handleObj.selector) handlers.delegateCount--; 2168 if (special.remove) special.remove.call(elem, handleObj); 2169 } 2170 } 2171 if (origCount && !handlers.length) { 2172 if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) jQuery.removeEvent(elem, type, elemData.handle); 2173 delete events[type]; 2174 } 2175 } 2176 if (jQuery.isEmptyObject(events)) dataPriv.remove(elem, "handle events"); 2177 }, 2178 dispatch: function(nativeEvent) { 2179 var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery.event.fix(nativeEvent), handlers = (d
2179ataPriv.get(this, "events") || Object.create(null))[event.type] || [], special = jQuery.event.special[event.type] || {}; 2180 args[0] = event; 2181 for (i = 1; i < arguments.length; i++) args[i] = arguments[i]; 2182 event.delegateTarget = this; 2183 if (special.preDispatch && special.preDispatch.call(this, event) === false) return; 2184 handlerQueue = jQuery.event.handlers.call(this, event, handlers); 2185 i = 0; 2186 while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { 2187 event.currentTarget = matched.elem; 2188 j = 0; 2189 while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) { 2190 event.handleObj = handleObj; 2191 event.data = handleObj.data; 2192 ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); 2193 if (ret !== void 0) { 2194 if ((event.result = ret) === false) { 2195 event.preventDefault(); 2196 event.stopPropagation(); 2197 } 2198 } 2199 } 2200 } 2201 if (special.postDispatch) special.postDispatch.call(this, event); 2202 return event.result; 2203 }, 2204 handlers: function(event, handlers) { 2205 var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; 2206 if (delegateCount && cur.nodeType && !(event.type === "click" && event.button >= 1)) { 2207 for (; cur !== this; cur = cur.parentNode || this) if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) { 2208 matchedHandlers = []; 2209 matchedSelectors = {}; 2210 for (i = 0; i < delegateCount; i++) { 2211 handleObj = handlers[i]; 2212 sel = handleObj.selector + " "; 2213 if (matchedSelectors[sel] === void 0) matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length; 2214 if (matchedSelectors[sel]) matchedHandlers.push(handleObj); 2215 } 2216 if (matchedHandlers.length) handlerQueue.push({ 2217 elem: cur, 2218 handlers: matchedHandlers 2219 }); 2220 } 2221 } 2222 cur = this; 2223 if (delegateCount < handlers.length) handlerQueue.push({ 2224 elem: cur, 2225 handlers: handlers.slice(delegateCount) 2226 }); 2227 return handlerQueue; 2228 }, 2229 addProp: function(name, hook) { 2230 Object.defineProperty(jQuery.Event.prototype, name, { 2231 enumerable: true, 2232 configurable: true, 2233 get: isFunction(hook) ? function() { 2234 if (this.originalEvent) return hook(this.originalEvent); 2235 } : function() { 2236 if (this.originalEvent) return this.originalEvent[name]; 2237 }, 2238 set: function(value) { 2239 Object.defineProperty(this, name, { 2240 enumerable: true, 2241 configurable: true, 2242 writable: true, 2243 value 2244 }); 2245 } 2246 }); 2247 }, 2248 fix: function(originalEvent) { 2249 return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent); 2250 }, 2251 special: { 2252 load: { noBubble: true }, 2253 click: { 2254 setup: function(data) { 2255 var el = this || data; 2256 if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) leverageNative(el, "click", true); 2257 return false; 2258 }, 2259 trigger: function(data) { 2260 var el = this || data; 2261 if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) leverageNative(el, "click"); 2262 return true; 2263 }, 2264 _default: function(event) { 2265 var target = event.target; 2266 return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a"); 2267 } 2268 }, 2269 beforeunload: { postDispatch: function(event) { 2270 if (event.result !== void 0 && event.originalEvent) event.originalEvent.returnValue = event.result; 2271 } } 2272 } 2273 }; 2274 function leverageNative(el, type, isSetup) { 2275 if (!isSetup) { 2276 if (dataPriv.get(el, type) === void 0) jQuery.event.add(el, type, returnTrue); 2277 return; 2278 } 2279 dataPriv.set(el, type, false); 2280 jQuery.event.add(el, type, { 2281 namespace: false, 2282 handler: function(event) { 2283 var result, saved = dataPriv.get(this, type); 2284 if (event.isTrigger & 1 && this[type]) { 2285 if (!saved) { 2286 saved = slice.call(arguments); 2287 dataPriv.set(this, type, saved); 2288 this[type](); 2289 result = dataPriv.get(this, type); 2290 dataPriv.set(this, type, false); 2291 if (saved !== result) { 2292 event.stopImmediatePropagation(); 2293 event.preventDefault(); 2294 return result; 2295 } 2296 } else if ((jQuery.event.special[type] || {}).delegateType) event.stopPropagation(); 2297 } else if (saved) { 2298 dataPriv.set(this, type, jQuery.event.trigger(saved[0], saved.slice(1), this)); 2299 event.stopPropagation(); 2300 event.isImmediatePropagationStopped = returnTrue; 2301 } 2302 } 2303 }); 2304 } 2305 jQuery.removeEvent = function(elem, type, handle) { 2306 if (elem.removeEventListener) elem.removeEventListener(type, handle); 2307 }; 2308 jQuery.Event = function(src, props) { 2309 if (!(this instanceof jQuery.Event)) return new jQuery.Event(src, props); 2310 if (src && src.type) { 2311 this.originalEvent = src; 2312 this.type = src.type; 2313 this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && src.returnValue === false ? returnTrue : returnFalse; 2314 this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target; 2315 this.currentTarget = src.currentTarget; 2316 this.relatedTarget = src.relatedTarget; 2317 } else this.type = src; 2318 if (props) jQuery.extend(this, props); 2319 this.timeStamp = src && src.timeStamp || Date.now(); 2320 this[jQuery.expando] = true; 2321 }; 2322 jQuery.Event.prototype = { 2323 constructor: jQuery.Event, 2324 isDefaultPrevented: returnFalse, 2325 isPropagationStopped: returnFalse, 2326 isImmediatePropagationStopped: returnFalse, 2327 isSimulated: false, 2328 preventDefault: function() { 2329 var e = this.originalEvent; 2330 this.isDefaultPrevented = returnTrue; 2331 if (e && !this.isSimulated) e.preventDefault(); 2332 }, 2333 stopPropagation: function() { 2334 var e = this.originalEvent; 2335 this.isPropagationStopped = returnTrue; 2336 if (e && !this.isSimulated) e.stopPropagation(); 2337 }, 2338 stopImmediatePropagation: function() { 2339 var e = this.originalEvent; 2340 this.isImmediatePropagationStopped = returnTrue; 2341 if (e && !this.isSimulated) e.stopImmediatePropagation(); 2342 this.stopPropagation(); 2343 } 2344 }; 2345 jQuery.each({ 2346 altKey: true, 2347 bubbles: true, 2348 cancelable: true, 2349 changedTouches: true, 2350 ctrlKey: true, 2351 detail: true, 2352 eventPhase: true, 2353 metaKey: true, 2354 pageX: true, 2355 pageY: true, 2356 shiftKey: true, 2357 view: true, 2358 "char": true, 2359 code: true,
2360 charCode: true, 2361 key: true, 2362 keyCode: true, 2363 button: true, 2364 buttons: true, 2365 clientX: true, 2366 clientY: true, 2367 offsetX: true, 2368 offsetY: true, 2369 pointerId: true, 2370 pointerType: true, 2371 screenX: true, 2372 screenY: true, 2373 targetTouches: true, 2374 toElement: true, 2375 touches: true, 2376 which: true 2377 }, jQuery.event.addProp); 2378 jQuery.each({ 2379 focus: "focusin", 2380 blur: "focusout" 2381 }, function(type, delegateType) { 2382 function focusMappedHandler(nativeEvent) { 2383 if (document.documentMode) { 2384 var handle = dataPriv.get(this, "handle"), event = jQuery.event.fix(nativeEvent); 2385 event.type = nativeEvent.type === "focusin" ? "focus" : "blur"; 2386 event.isSimulated = true; 2387 handle(nativeEvent); 2388 if (event.target === event.currentTarget) handle(event); 2389 } else jQuery.event.simulate(delegateType, nativeEvent.target, jQuery.event.fix(nativeEvent)); 2390 } 2391 jQuery.event.special[type] = { 2392 setup: function() { 2393 var attaches; 2394 leverageNative(this, type, true); 2395 if (document.documentMode) { 2396 attaches = dataPriv.get(this, delegateType); 2397 if (!attaches) this.addEventListener(delegateType, focusMappedHandler); 2398 dataPriv.set(this, delegateType, (attaches || 0) + 1); 2399 } else return false; 2400 }, 2401 trigger: function() { 2402 leverageNative(this, type); 2403 return true; 2404 }, 2405 teardown: function() { 2406 var attaches; 2407 if (document.documentMode) { 2408 attaches = dataPriv.get(this, delegateType) - 1; 2409 if (!attaches) { 2410 this.removeEventListener(delegateType, focusMappedHandler); 2411 dataPriv.remove(this, delegateType); 2412 } else dataPriv.set(this, delegateType, attaches); 2413 } else return false; 2414 }, 2415 _default: function(event) { 2416 return dataPriv.get(event.target, type); 2417 }, 2418 delegateType 2419 }; 2420 jQuery.event.special[delegateType] = { 2421 setup: function() { 2422 var doc = this.ownerDocument || this.document || this, dataHolder = document.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType); 2423 if (!attaches) if (document.documentMode) this.addEventListener(delegateType, focusMappedHandler); 2424 else doc.addEventListener(type, focusMappedHandler, true); 2425 dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1); 2426 }, 2427 teardown: function() { 2428 var doc = this.ownerDocument || this.document || this, dataHolder = document.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType) - 1; 2429 if (!attaches) { 2430 if (document.documentMode) this.removeEventListener(delegateType, focusMappedHandler); 2431 else doc.removeEventListener(type, focusMappedHandler, true); 2432 dataPriv.remove(dataHolder, delegateType); 2433 } else dataPriv.set(dataHolder, delegateType, attaches); 2434 } 2435 }; 2436 }); 2437 jQuery.each({ 2438 mouseenter: "mouseover", 2439 mouseleave: "mouseout", 2440 pointerenter: "pointerover", 2441 pointerleave: "pointerout" 2442 }, function(orig, fix) { 2443 jQuery.event.special[orig] = { 2444 delegateType: fix, 2445 bindType: fix, 2446 handle: function(event) { 2447 var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; 2448 if (!related || related !== target && !jQuery.contains(target, related)) { 2449 event.type = handleObj.origType; 2450 ret = handleObj.handler.apply(this, arguments); 2451 event.type = fix; 2452 } 2453 return ret; 2454 } 2455 }; 2456 }); 2457 jQuery.fn.extend({ 2458 on: function(types, selector, data, fn) { 2459 return on(this, types, selector, data, fn); 2460 }, 2461 one: function(types, selector, data, fn) { 2462 return on(this, types, selector, data, fn, 1); 2463 }, 2464 off: function(types, selector, fn) { 2465 var handleObj, type; 2466 if (types && types.preventDefault && types.handleObj) { 2467 handleObj = types.handleObj; 2468 jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler); 2469 return this; 2470 } 2471 if (typeof types === "object") { 2472 for (type in types) this.off(type, selector, types[type]); 2473 return this; 2474 } 2475 if (selector === false || typeof selector === "function") { 2476 fn = selector; 2477 selector = void 0; 2478 } 2479 if (fn === false) fn = returnFalse; 2480 return this.each(function() { 2481 jQuery.event.remove(this, types, fn, selector); 2482 }); 2483 } 2484 }); 2485 var rnoInnerhtml = /<script|<style|<link/i, rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g; 2486 function manipulationTarget(elem, content) { 2487 if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) return jQuery(elem).children("tbody")[0] || elem; 2488 return elem; 2489 } 2490 function disableScript(elem) { 2491 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; 2492 return elem; 2493 } 2494 function restoreScript(elem) { 2495 if ((elem.type || "").slice(0, 5) === "true/") elem.type = elem.type.slice(5); 2496 else elem.removeAttribute("type"); 2497 return elem; 2498 } 2499 function cloneCopyEvent(src, dest) { 2500 var i, l, type, pdataOld, udataOld, udataCur, events; 2501 if (dest.nodeType !== 1) return; 2502 if (dataPriv.hasData(src)) { 2503 pdataOld = dataPriv.get(src); 2504 events = pdataOld.events; 2505 if (events) { 2506 dataPriv.remove(dest, "handle events"); 2507 for (type in events) for (i = 0, l = events[type].length; i < l; i++) jQuery.event.add(dest, type, events[type][i]); 2508 } 2509 } 2510 if (dataUser.hasData(src)) { 2511 udataOld = dataUser.access(src); 2512 udataCur = jQuery.extend({}, udataOld); 2513 dataUser.set(dest, udataCur); 2514 } 2515 }
2516 function fixInput(src, dest) { 2517 var nodeName = dest.nodeName.toLowerCase(); 2518 if (nodeName === "input" && rcheckableType.test(src.type)) dest.checked = src.checked; 2519 else if (nodeName === "input" || nodeName === "textarea") dest.defaultValue = src.defaultValue; 2520 } 2521 function domManip(collection, args, callback, ignored) { 2522 args = flat(args); 2523 var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], valueIsFunction = isFunction(value); 2524 if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) return collection.each(function(index) { 2525 var self = collection.eq(index); 2526 if (valueIsFunction) args[0] = value.call(this, index, self.html()); 2527 domManip(self, args, callback, ignored); 2528 }); 2529 if (l) { 2530 fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); 2531 first = fragment.firstChild; 2532 if (fragment.childNodes.length === 1) fragment = first; 2533 if (first || ignored) { 2534 scripts = jQuery.map(getAll(fragment, "script"), disableScript); 2535 hasScripts = scripts.length; 2536 for (; i < l; i++) { 2537 node = fragment; 2538 if (i !== iNoClone) { 2539 node = jQuery.clone(node, true, true); 2540 if (hasScripts) jQuery.merge(scripts, getAll(node, "script")); 2541 } 2542 callback.call(collection[i], node, i); 2543 } 2544 if (hasScripts) { 2545 doc = scripts[scripts.length - 1].ownerDocument; 2546 jQuery.map(scripts, restoreScript); 2547 for (i = 0; i < hasScripts; i++) { 2548 node = scripts[i]; 2549 if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) if (node.src && (node.type || "").toLowerCase() !== "module") { 2550 if (jQuery._evalUrl && !node.noModule) jQuery._evalUrl(node.src, { nonce: node.nonce || node.getAttribute("nonce") }, doc); 2551 } else DOMEval(node.textContent.replace(rcleanScript, ""), node, doc); 2552 } 2553 } 2554 } 2555 } 2556 return collection; 2557 } 2558 function remove(elem, selector, keepData) { 2559 var node, nodes = selector ? jQuery.filter(selector, elem) : elem, i = 0; 2560 for (; (node = nodes[i]) != null; i++) { 2561 if (!keepData && node.nodeType === 1) jQuery.cleanData(getAll(node)); 2562 if (node.parentNode) { 2563 if (keepData && isAttached(node)) setGlobalEval(getAll(node, "script")); 2564 node.parentNode.removeChild(node); 2565 } 2566 } 2567 return elem; 2568 } 2569 jQuery.extend({ 2570 htmlPrefilter: function(html) { 2571 return html; 2572 }, 2573 clone: function(elem, dataAndEvents, deepDataAndEvents) { 2574 var i, l, srcElements, destElements, clone = elem.cloneNode(true), inPage = isAttached(elem); 2575 if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) { 2576 destElements = getAll(clone); 2577 srcElements = getAll(elem); 2578 for (i = 0, l = srcElements.length; i < l; i++) fixInput(srcElements[i], destElements[i]); 2579 } 2580 if (dataAndEvents) if (deepDataAndEvents) { 2581 srcElements = srcElements || getAll(elem); 2582 destElements = destElements || getAll(clone); 2583 for (i = 0, l = srcElements.length; i < l; i++) cloneCopyEvent(srcElements[i], destElements[i]); 2584 } else cloneCopyEvent(elem, clone); 2585 destElements = getAll(clone, "script"); 2586 if (destElements.length > 0) setGlobalEval(destElements, !inPage && getAll(elem, "script")); 2587 return clone; 2588 }, 2589 cleanData: function(elems) { 2590 var data, elem, type, special = jQuery.event.special, i = 0; 2591 for (; (elem = elems[i]) !== void 0; i++) if (acceptData(elem)) { 2592 if (data = elem[dataPriv.expando]) { 2593 if (data.events) for (type in data.events) if (special[type]) jQuery.event.remove(elem, type); 2594 else jQuery.removeEvent(elem, type, data.handle); 2595 elem[dataPriv.expando] = void 0; 2596 } 2597 if (elem[dataUser.expando]) elem[dataUser.expando] = void 0; 2598 } 2599 } 2600 }); 2601 jQuery.fn.extend({ 2602 detach: function(selector) { 2603 return remove(this, selector, true); 2604 }, 2605 remove: function(selector) { 2606 return remove(this, selector); 2607 }, 2608 text: function(value) { 2609 return access(this, function(value) { 2610 return value === void 0 ? jQuery.text(this) : this.empty().each(function() { 2611 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) this.textContent = value; 2612 }); 2613 }, null, value, arguments.length); 2614 }, 2615 append: function() { 2616 return domManip(this, arguments, function(elem) { 2617 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) manipulationTarget(this, elem).appendChild(elem); 2618 }); 2619 }, 2620 prepend: function() { 2621 return domManip(this, arguments, function(elem) { 2622 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 2623 var target = manipulationTarget(this, elem); 2624 target.insertBefore(elem, target.firstChild); 2625 } 2626 }); 2627 }, 2628 before: function() { 2629 return domManip(this, arguments, function(elem) { 2630 if (this.parentNode) this.parentNode.insertBefore(elem, this); 2631 }); 2632 }, 2633 after: function() { 2634 return domManip(this, arguments, function(elem) { 2635 if (this.parentNode) this.parentNode.insertBefore(elem, this.nextSibling); 2636 }); 2637 }, 2638 empty: function() { 2639 var elem, i = 0; 2640 for (; (elem = this[i]) != null; i++) if (elem.nodeType === 1) { 2641 jQuery.cleanData(getAll(elem, false)); 2642 elem.textContent = ""; 2643 } 2644 return this; 2645 }, 2646 clone: function(dataAndEvents, deepDataAndEvents) { 2647 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 2648 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 2649 return this.map(function() { 2650 return jQuery.clone(this, dataAndEvents, deepDataAndEvents); 2651 }); 2652 }, 2653 html: function(value) { 2654 return access(this, function(value) { 2655 var elem = this[0] || {}, i = 0, l = this.length; 2656 if (value === void 0 && elem.nodeType === 1) return elem.innerHTML; 2657 if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[
vendor: 4,741 bytes, lines 2657-2785
2657(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { 2658 value = jQuery.htmlPrefilter(value); 2659 try { 2660 for (; i < l; i++) { 2661 elem = this[i] || {}; 2662 if (elem.nodeType === 1) { 2663 jQuery.cleanData(getAll(elem, false)); 2664 elem.innerHTML = value; 2665 } 2666 } 2667 elem = 0; 2668 } catch (e) {} 2669 } 2670 if (elem) this.empty().append(value); 2671 }, null, value, arguments.length); 2672 }, 2673 replaceWith: function() { 2674 var ignored = []; 2675 return domManip(this, arguments, function(elem) { 2676 var parent = this.parentNode; 2677 if (jQuery.inArray(this, ignored) < 0) { 2678 jQuery.cleanData(getAll(this)); 2679 if (parent) parent.replaceChild(elem, this); 2680 } 2681 }, ignored); 2682 } 2683 }); 2684 jQuery.each({ 2685 appendTo: "append", 2686 prependTo: "prepend", 2687 insertBefore: "before", 2688 insertAfter: "after", 2689 replaceAll: "replaceWith" 2690 }, function(name, original) { 2691 jQuery.fn[name] = function(selector) { 2692 var elems, ret = [], insert = jQuery(selector), last = insert.length - 1, i = 0; 2693 for (; i <= last; i++) { 2694 elems = i === last ? this : this.clone(true); 2695 jQuery(insert[i])[original](elems); 2696 push.apply(ret, elems.get()); 2697 } 2698 return this.pushStack(ret); 2699 }; 2700 }); 2701 var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i"); 2702 var rcustomProp = /^--/; 2703 var getStyles = function(elem) { 2704 var view = elem.ownerDocument.defaultView; 2705 if (!view || !view.opener) view = window; 2706 return view.getComputedStyle(elem); 2707 }; 2708 var swap = function(elem, options, callback) { 2709 var ret, name, old = {}; 2710 for (name in options) { 2711 old[name] = elem.style[name]; 2712 elem.style[name] = options[name]; 2713 } 2714 ret = callback.call(elem); 2715 for (name in options) elem.style[name] = old[name]; 2716 return ret; 2717 }; 2718 var rboxStyle = new RegExp(cssExpand.join("|"), "i"); 2719 (function() { 2720 function computeStyleTests() { 2721 if (!div) return; 2722 container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"; 2723 div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"; 2724 documentElement.appendChild(container).appendChild(div); 2725 var divStyle = window.getComputedStyle(div); 2726 pixelPositionVal = divStyle.top !== "1%"; 2727 reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; 2728 div.style.right = "60%"; 2729 pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; 2730 boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; 2731 div.style.position = "absolute"; 2732 scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12; 2733 documentElement.removeChild(container); 2734 div = null; 2735 } 2736 function roundPixelMeasures(measure) { 2737 return Math.round(parseFloat(measure)); 2738 } 2739 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document.createElement("div"), div = document.createElement("div"); 2740 if (!div.style) return; 2741 div.style.backgroundClip = "content-box"; 2742 div.cloneNode(true).style.backgroundClip = ""; 2743 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 2744 jQuery.extend(support, { 2745 boxSizingReliable: function() { 2746 computeStyleTests(); 2747 return boxSizingReliableVal; 2748 }, 2749 pixelBoxStyles: function() { 2750 computeStyleTests(); 2751 return pixelBoxStylesVal; 2752 }, 2753 pixelPosition: function() { 2754 computeStyleTests(); 2755 return pixelPositionVal; 2756 }, 2757 reliableMarginLeft: function() { 2758 computeStyleTests(); 2759 return reliableMarginLeftVal; 2760 }, 2761 scrollboxSize: function() { 2762 computeStyleTests(); 2763 return scrollboxSizeVal; 2764 }, 2765 reliableTrDimensions: function() { 2766 var table, tr, trChild, trStyle; 2767 if (reliableTrDimensionsVal == null) { 2768 table = document.createElement("table"); 2769 tr = document.createElement("tr"); 2770 trChild = document.createElement("div"); 2771 table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; 2772 tr.style.cssText = "box-sizing:content-box;border:1px solid"; 2773 tr.style.height = "1px"; 2774 trChild.style.height = "9px"; 2775 trChild.style.display = "block"; 2776 documentElement.appendChild(table).appendChild(tr).appendChild(trChild); 2777 trStyle = window.getComputedStyle(tr); 2778 reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight; 2779 documentElement.removeChild(table); 2780 } 2781 return reliableTrDimensionsVal; 2782 } 2783 }); 2784 })(); 2785 function curCSS(elem, name, computed) {
2786 var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name), style = elem.style; 2787 computed = computed || getStyles(elem); 2788 if (computed) { 2789 ret = computed.getPropertyValue(name) || computed[name]; 2790 if (isCustomProp && ret) ret = ret.replace(rtrimCSS, "$1") || void 0; 2791 if (ret === "" && !isAttached(elem)) ret = jQuery.style(elem, name); 2792 if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) { 2793 width = style.width; 2794 minWidth = style.minWidth; 2795 maxWidth = style.maxWidth; 2796 style.minWidth = style.maxWidth = style.width = ret; 2797 ret = computed.width; 2798 style.width = width; 2799 style.minWidth = minWidth; 2800 style.maxWidth = maxWidth; 2801 } 2802 } 2803 return ret !== void 0 ? ret + "" : ret; 2804 } 2805 function addGetHookIf(conditionFn, hookFn) { 2806 return { get: function() { 2807 if (conditionFn()) { 2808 delete this.get; 2809 return; 2810 } 2811 return (this.get = hookFn).apply(this, arguments); 2812 } }; 2813 } 2814 var cssPrefixes = [ 2815 "Webkit", 2816 "Moz", 2817 "ms" 2818 ], emptyStyle = document.createElement("div").style, vendorProps = {}; 2819 function vendorPropName(name) { 2820 var capName = name[0].toUpperCase() + name.slice(1), i = cssPrefixes.length; 2821 while (i--) { 2822 name = cssPrefixes[i] + capName; 2823 if (name in emptyStyle) return name; 2824 } 2825 } 2826 function finalPropName(name) { 2827 var final = jQuery.cssProps[name] || vendorProps[name]; 2828 if (final) return final; 2829 if (name in emptyStyle) return name; 2830 return vendorProps[name] = vendorPropName(name) || name; 2831 } 2832 var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { 2833 position: "absolute", 2834 visibility: "hidden", 2835 display: "block" 2836 }, cssNormalTransform = { 2837 letterSpacing: "0", 2838 fontWeight: "400" 2839 }; 2840 function setPositiveNumber(_elem, value, subtract) { 2841 var matches = rcssNum.exec(value); 2842 return matches ? Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : value; 2843 } 2844 function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) { 2845 var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0; 2846 if (box === (isBorderBox ? "border" : "content")) return 0; 2847 for (; i < 4; i += 2) { 2848 if (box === "margin") marginDelta += jQuery.css(elem, box + cssExpand[i], true, styles); 2849 if (!isBorderBox) { 2850 delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles); 2851 if (box !== "padding") delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 2852 else extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 2853 } else { 2854 if (box === "content") delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles); 2855 if (box !== "margin") delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 2856 } 2857 } 2858 if (!isBorderBox && computedVal >= 0) delta += Math.max(0, Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - .5)) || 0; 2859 return delta + marginDelta; 2860 } 2861 function getWidthOrHeight(elem, dimension, extra) { 2862 var styles = getStyles(elem), isBorderBox = (!support.boxSizingReliable() || extra) && jQuery.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); 2863 if (rnumnonpx.test(val)) { 2864 if (!extra) return val; 2865 val = "auto"; 2866 } 2867 if ((!support.boxSizingReliable() && isBorderBox || !support.reliableTrDimensions() && nodeName(elem, "tr") || val === "auto" || !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && elem.getClientRects().length) { 2868 isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; 2869 valueIsBorderBox = offsetProp in elem; 2870 if (valueIsBorderBox) val = elem[offsetProp]; 2871 } 2872 val = parseFloat(val) || 0; 2873 return val + boxModelAdjustment(elem, dimension, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles, val) + "px"; 2874 } 2875 jQuery.extend({ 2876 cssHooks: { opacity: { get: function(elem, computed) { 2877 if (computed) { 2878 var ret = curCSS(elem, "opacity"); 2879 return ret === "" ? "1" : ret; 2880 } 2881 } } }, 2882 cssNumber: { 2883 animationIterationCount: true, 2884 aspectRatio: true, 2885 borderImageSlice: true, 2886 columnCount: true, 2887 flexGrow: true, 2888 flexShrink: true, 2889 fontWeight: true, 2890 gridArea: true, 2891 gridColumn: true, 2892 gridColumnEnd: true, 2893 gridColumnStart: true, 2894 gridRow: true, 2895 gridRowEnd: true, 2896 gridRowStart: true, 2897 lineHeight: true, 2898 opacity: true, 2899 order: true, 2900 orphans: true, 2901 scale: true, 2902 widows: true, 2903 zIndex: true, 2904 zoom: true, 2905 fillOpacity: true, 2906 floodOpacity: true, 2907 stopOpacity: true, 2908 strokeMiterlimit: true, 2909 strokeOpacity: true 2910 }, 2911 cssProps: {}, 2912 style: function(elem, name, value, extra) { 2913 if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) return; 2914 var ret, type, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name), style = elem.style; 2915 if (!isCustomProp) name = finalPropName(origName); 2916 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 2917 if (value !== void 0) { 2918 type = typeof value; 2919 if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) { 2920 value = adjustCSS(elem, name, ret); 2921 type = "number"; 2922 } 2923 if (value == null || value !== value) return; 2924 if (type === "number" && !isCustomProp) value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px"); 2925 if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) style[name] = "inherit"; 2926 if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) if (isCustomProp) style.setProperty(name, value); 2927 else style[name] = value; 2928 } else { 2929 if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) return ret; 2930 return style[name]; 2931 } 2932 }, 2933 css: function(elem, name, extra, styles) { 2934 var val, num, hooks, origName = camelCase(name); 2935 if (!rcustomProp.test(name)) name = finalPropName(origName); 2936 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 2937 if (hooks && "get" in hooks) val = hooks.get(elem, true, extra); 2938 if (val === void 0) val = curCSS(elem, name, styles); 2939 if (val === "normal" && name in cssNormalTransform) val = cssNormalTransform[name]; 2940 if (extra === "" || extra) { 2941 num = parseFloat(val); 2942 return extra === true || isFinite(num) ? num || 0 : val; 2943 } 2944 return val; 2945 } 2946 }); 2947 jQuery.each(["height", "width"], function(_i, dimension) { 2948 jQuery.cssHooks[dimension] = { 2949 get: function(elem, computed, extra) { 2950 if (computed) return rdisplayswap.test(jQuery.css(elem, "dis
vendor: 7,225 bytes, lines 2950-3118
2950play")) && (!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() { 2951 return getWidthOrHeight(elem, dimension, extra); 2952 }) : getWidthOrHeight(elem, dimension, extra); 2953 }, 2954 set: function(elem, value, extra) { 2955 var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", isBorderBox = (scrollboxSizeBuggy || extra) && jQuery.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment(elem, dimension, extra, isBorderBox, styles) : 0; 2956 if (isBorderBox && scrollboxSizeBuggy) subtract -= Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - .5); 2957 if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") { 2958 elem.style[dimension] = value; 2959 value = jQuery.css(elem, dimension); 2960 } 2961 return setPositiveNumber(elem, value, subtract); 2962 } 2963 }; 2964 }); 2965 jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function(elem, computed) { 2966 if (computed) return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() { 2967 return elem.getBoundingClientRect().left; 2968 })) + "px"; 2969 }); 2970 jQuery.each({ 2971 margin: "", 2972 padding: "", 2973 border: "Width" 2974 }, function(prefix, suffix) { 2975 jQuery.cssHooks[prefix + suffix] = { expand: function(value) { 2976 var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value]; 2977 for (; i < 4; i++) expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]; 2978 return expanded; 2979 } }; 2980 if (prefix !== "margin") jQuery.cssHooks[prefix + suffix].set = setPositiveNumber; 2981 }); 2982 jQuery.fn.extend({ css: function(name, value) { 2983 return access(this, function(elem, name, value) { 2984 var styles, len, map = {}, i = 0; 2985 if (Array.isArray(name)) { 2986 styles = getStyles(elem); 2987 len = name.length; 2988 for (; i < len; i++) map[name[i]] = jQuery.css(elem, name[i], false, styles); 2989 return map; 2990 } 2991 return value !== void 0 ? jQuery.style(elem, name, value) : jQuery.css(elem, name); 2992 }, name, value, arguments.length > 1); 2993 } }); 2994 function Tween(elem, options, prop, end, easing) { 2995 return new Tween.prototype.init(elem, options, prop, end, easing); 2996 } 2997 jQuery.Tween = Tween; 2998 Tween.prototype = { 2999 constructor: Tween, 3000 init: function(elem, options, prop, end, easing, unit) { 3001 this.elem = elem; 3002 this.prop = prop; 3003 this.easing = easing || jQuery.easing._default; 3004 this.options = options; 3005 this.start = this.now = this.cur(); 3006 this.end = end; 3007 this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px"); 3008 }, 3009 cur: function() { 3010 var hooks = Tween.propHooks[this.prop]; 3011 return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this); 3012 }, 3013 run: function(percent) { 3014 var eased, hooks = Tween.propHooks[this.prop]; 3015 if (this.options.duration) this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration); 3016 else this.pos = eased = percent; 3017 this.now = (this.end - this.start) * eased + this.start; 3018 if (this.options.step) this.options.step.call(this.elem, this.now, this); 3019 if (hooks && hooks.set) hooks.set(this); 3020 else Tween.propHooks._default.set(this); 3021 return this; 3022 } 3023 }; 3024 Tween.prototype.init.prototype = Tween.prototype; 3025 Tween.propHooks = { _default: { 3026 get: function(tween) { 3027 var result; 3028 if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) return tween.elem[tween.prop]; 3029 result = jQuery.css(tween.elem, tween.prop, ""); 3030 return !result || result === "auto" ? 0 : result; 3031 }, 3032 set: function(tween) { 3033 if (jQuery.fx.step[tween.prop]) jQuery.fx.step[tween.prop](tween); 3034 else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) jQuery.style(tween.elem, tween.prop, tween.now + tween.unit); 3035 else tween.elem[tween.prop] = tween.now; 3036 } 3037 } }; 3038 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function(tween) { 3039 if (tween.elem.nodeType && tween.elem.parentNode) tween.elem[tween.prop] = tween.now; 3040 } }; 3041 jQuery.easing = { 3042 linear: function(p) { 3043 return p; 3044 }, 3045 swing: function(p) { 3046 return .5 - Math.cos(p * Math.PI) / 2; 3047 }, 3048 _default: "swing" 3049 }; 3050 jQuery.fx = Tween.prototype.init; 3051 jQuery.fx.step = {}; 3052 var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; 3053 function schedule() { 3054 if (inProgress) { 3055 if (document.hidden === false && window.requestAnimationFrame) window.requestAnimationFrame(schedule); 3056 else window.setTimeout(schedule, jQuery.fx.interval); 3057 jQuery.fx.tick(); 3058 } 3059 } 3060 function createFxNow() { 3061 window.setTimeout(function() { 3062 fxNow = void 0; 3063 }); 3064 return fxNow = Date.now(); 3065 } 3066 function genFx(type, includeWidth) { 3067 var which, i = 0, attrs = { height: type }; 3068 includeWidth = includeWidth ? 1 : 0; 3069 for (; i < 4; i += 2 - includeWidth) { 3070 which = cssExpand[i]; 3071 attrs["margin" + which] = attrs["padding" + which] = type; 3072 } 3073 if (includeWidth) attrs.opacity = attrs.width = type; 3074 return attrs; 3075 } 3076 function createTween(value, prop, animation) { 3077 var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index = 0, length = collection.length; 3078 for (; index < length; index++) if (tween = collection[index].call(animation, prop, value)) return tween; 3079 } 3080 function defaultPrefilter(elem, props, opts) { 3081 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow"); 3082 if (!opts.queue) { 3083 hooks = jQuery._queueHooks(elem, "fx"); 3084 if (hooks.unqueued == null) { 3085 hooks.unqueued = 0; 3086 oldfire = hooks.empty.fire; 3087 hooks.empty.fire = function() { 3088 if (!hooks.unqueued) oldfire(); 3089 }; 3090 } 3091 hooks.unqueued++; 3092 anim.always(function() { 3093 anim.always(function() { 3094 hooks.unqueued--; 3095 if (!jQuery.queue(elem, "fx").length) hooks.empty.fire(); 3096 }); 3097 }); 3098 } 3099 for (prop in props) { 3100 value = props[prop]; 3101 if (rfxtypes.test(value)) { 3102 delete props[prop]; 3103 toggle = toggle || value === "toggle"; 3104 if (value === (hidden ? "hide" : "show")) if (value === "show" && dataShow && dataShow[prop] !== void 0) hidden = true; 3105 else continue; 3106 orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop); 3107 } 3108 } 3109 propTween = !jQuery.isEmptyObject(props); 3110 if (!propTween && jQuery.isEmptyObject(orig)) return; 3111 if (isBox && elem.nodeType === 1) { 3112 opts.overflow = [ 3113 style.overflow, 3114 style.overflowX, 3115 style.overflowY 3116 ]; 3117 restoreDisplay = dataShow && dataShow.display; 3118 if (restoreDisplay == null) restoreDisplay = dataPriv.get(elem, "dis
3118play"); 3119 display = jQuery.css(elem, "display"); 3120 if (display === "none") if (restoreDisplay) display = restoreDisplay; 3121 else { 3122 showHide([elem], true); 3123 restoreDisplay = elem.style.display || restoreDisplay; 3124 display = jQuery.css(elem, "display"); 3125 showHide([elem]); 3126 } 3127 if (display === "inline" || display === "inline-block" && restoreDisplay != null) { 3128 if (jQuery.css(elem, "float") === "none") { 3129 if (!propTween) { 3130 anim.done(function() { 3131 style.display = restoreDisplay; 3132 }); 3133 if (restoreDisplay == null) { 3134 display = style.display; 3135 restoreDisplay = display === "none" ? "" : display; 3136 } 3137 } 3138 style.display = "inline-block"; 3139 } 3140 } 3141 } 3142 if (opts.overflow) { 3143 style.overflow = "hidden"; 3144 anim.always(function() { 3145 style.overflow = opts.overflow[0]; 3146 style.overflowX = opts.overflow[1]; 3147 style.overflowY = opts.overflow[2]; 3148 }); 3149 } 3150 propTween = false; 3151 for (prop in orig) { 3152 if (!propTween) { 3153 if (dataShow) { 3154 if ("hidden" in dataShow) hidden = dataShow.hidden; 3155 } else dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay }); 3156 if (toggle) dataShow.hidden = !hidden; 3157 if (hidden) showHide([elem], true); 3158 anim.done(function() { 3159 if (!hidden) showHide([elem]); 3160 dataPriv.remove(elem, "fxshow"); 3161 for (prop in orig) jQuery.style(elem, prop, orig[prop]); 3162 }); 3163 } 3164 propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim); 3165 if (!(prop in dataShow)) { 3166 dataShow[prop] = propTween.start; 3167 if (hidden) { 3168 propTween.end = propTween.start; 3169 propTween.start = 0; 3170 } 3171 } 3172 } 3173 } 3174 function propFilter(props, specialEasing) { 3175 var index, name, easing, value, hooks; 3176 for (index in props) { 3177 name = camelCase(index);
3178 easing = specialEasing[name]; 3179 value = props[index]; 3180 if (Array.isArray(value)) { 3181 easing = value[1]; 3182 value = props[index] = value[0]; 3183 } 3184 if (index !== name) { 3185 props[name] = value; 3186 delete props[index]; 3187 } 3188 hooks = jQuery.cssHooks[name]; 3189 if (hooks && "expand" in hooks) { 3190 value = hooks.expand(value); 3191 delete props[name]; 3192 for (index in value) if (!(index in props)) { 3193 props[index] = value[index]; 3194 specialEasing[index] = easing; 3195 } 3196 } else specialEasing[name] = easing; 3197 } 3198 } 3199 function Animation(elem, properties, options) { 3200 var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always(function() { 3201 delete tick.elem; 3202 }), tick = function() { 3203 if (stopped) return false; 3204 var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), percent = 1 - (remaining / animation.duration || 0), index = 0, length = animation.tweens.length; 3205 for (; index < length; index++) animation.tweens[index].run(percent); 3206 deferred.notifyWith(elem, [ 3207 animation, 3208 percent, 3209 remaining 3210 ]); 3211 if (percent < 1 && length) return remaining; 3212 if (!length) deferred.notifyWith(elem, [ 3213 animation, 3214 1, 3215 0 3216 ]); 3217 deferred.resolveWith(elem, [animation]); 3218 return false; 3219 }, animation = deferred.promise({ 3220 elem, 3221 props: jQuery.extend({}, properties), 3222 opts: jQuery.extend(true, { 3223 specialEasing: {}, 3224 easing: jQuery.easing._default 3225 }, options), 3226 originalProperties: properties, 3227 originalOptions: options, 3228 startTime: fxNow || createFxNow(), 3229 duration: options.duration, 3230 tweens: [], 3231 createTween: function(prop, end) { 3232 var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing); 3233 animation.tweens.push(tween); 3234 return tween; 3235 }, 3236 stop: function(gotoEnd) { 3237 var index = 0, length = gotoEnd ? animation.tweens.length : 0; 3238 if (stopped) return this; 3239 stopped = true; 3240 for (; index < length; index++) animation.tweens[index].run(1); 3241 if (gotoEnd) { 3242 deferred.notifyWith(elem, [ 3243 animation, 3244 1, 3245 0 3246 ]); 3247 deferred.resolveWith(elem, [animation, gotoEnd]); 3248 } else deferred.rejectWith(elem, [animation, gotoEnd]); 3249 return this; 3250 } 3251 }), props = animation.props; 3252 propFilter(props, animation.opts.specialEasing); 3253 for (; index < length; index++) { 3254 result = Animation.prefilters[index].call(animation, elem, props, animation.opts); 3255 if (result) { 3256 if (isFunction(result.stop)) jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result); 3257 return result; 3258 } 3259 } 3260 jQuery.map(props, createTween, animation); 3261 if (isFunction(animation.opts.start)) animation.opts.start.call(elem, animation); 3262 animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always); 3263 jQuery.fx.timer(jQuery.extend(tick, { 3264 elem, 3265 anim: animation, 3266 queue: animation.opts.queue 3267 })); 3268 return animation; 3269 } 3270 jQuery.Animation = jQuery.extend(Animation, { 3271 tweeners: { "*": [function(prop, value) { 3272 var tween = this.createTween(prop, value); 3273 adjustCSS(tween.elem, prop, rcssNum.exec(value), tween); 3274 return tween; 3275 }] }, 3276 tweener: function(props, callback) { 3277 if (isFunction(props)) { 3278 callback = props; 3279 props = ["*"]; 3280 } else props = props.match(rnothtmlwhite); 3281 var prop, index = 0, length = props.length; 3282 for (; index < length; index++) { 3283 prop = props[index]; 3284 Animation.tweeners[prop] = Animation.tweeners[prop] || []; 3285 Animation.tweeners[prop].unshift(callback); 3286 } 3287 }, 3288 prefilters: [defaultPrefilter], 3289 prefilter: function(callback, prepend) { 3290 if (prepend) Animation.prefilters.unshift(callback); 3291 else Animation.prefilters.push(callback); 3292 } 3293 }); 3294 jQuery.speed = function(speed, easing, fn) { 3295 var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : { 3296 complete: fn || !fn && easing || isFunction(speed) && speed, 3297 duration: speed, 3298 easing: fn && easing || easing && !isFunction(easing) && easing 3299 }; 3300 if (jQuery.fx.off) opt.duration = 0; 3301 else if (typeof opt.duration !== "number") if (opt.duration in jQuery.fx.speeds) opt.duration = jQuery.fx.speeds[opt.duration]; 3302 else opt.duration = jQuery.fx.speeds._default;
3303 if (opt.queue == null || opt.queue === true) opt.queue = "fx"; 3304 opt.old = opt.complete; 3305 opt.complete = function() { 3306 if (isFunction(opt.old)) opt.old.call(this); 3307 if (opt.queue) jQuery.dequeue(this, opt.queue); 3308 }; 3309 return opt; 3310 }; 3311 jQuery.fn.extend({ 3312 fadeTo: function(speed, to, easing, callback) { 3313 return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback); 3314 }, 3315 animate: function(prop, speed, easing, callback) { 3316 var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function() { 3317 var anim = Animation(this, jQuery.extend({}, prop), optall); 3318 if (empty || dataPriv.get(this, "finish")) anim.stop(true); 3319 }; 3320 doAnimation.finish = doAnimation; 3321 return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation); 3322 }, 3323 stop: function(type, clearQueue, gotoEnd) { 3324 var stopQueue = function(hooks) { 3325 var stop = hooks.stop; 3326 delete hooks.stop; 3327 stop(gotoEnd); 3328 }; 3329 if (typeof type !== "string") { 3330 gotoEnd = clearQueue; 3331 clearQueue = type; 3332 type = void 0; 3333 } 3334 if (clearQueue) this.queue(type || "fx", []); 3335 return this.each(function() { 3336 var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get(this); 3337 if (index) { 3338 if (data[index] && data[index].stop) stopQueue(data[index]); 3339 } else for (index in data) if (data[index] && data[index].stop && rrun.test(index)) stopQueue(data[index]); 3340 for (index = timers.length; index--;) if (timers[index].elem === this && (type == null || timers[index].queue === type)) { 3341 timers[index].anim.stop(gotoEnd); 3342 dequeue = false; 3343 timers.splice(index, 1); 3344 } 3345 if (dequeue || !gotoEnd) jQuery.dequeue(this, type); 3346 }); 3347 }, 3348 finish: function(type) { 3349 if (type !== false) type = type || "fx"; 3350 return this.each(function() { 3351 var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery.timers, length = queue ? queue.length : 0; 3352 data.finish = true; 3353 jQuery.queue(this, type, []); 3354 if (hooks && hooks.stop) hooks.stop.call(this, true); 3355 for (index = timers.length; index--;) if (timers[index].elem === this && timers[index].queue === type) { 3356 timers[index].anim.stop(true); 3357 timers.splice(index, 1); 3358 } 3359 for (index = 0; index < length; index++) if (queue[index] && queue[index].finish) queue[index].finish.call(this); 3360 delete data.finish; 3361 }); 3362 } 3363 }); 3364 jQuery.each([ 3365 "toggle", 3366 "show", 3367 "hide" 3368 ], function(_i, name) { 3369 var cssFn = jQuery.fn[name]; 3370 jQuery.fn[name] = function(speed, easing, callback) { 3371 return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback); 3372 }; 3373 }); 3374 jQuery.each({ 3375 slideDown: genFx("show"), 3376 slideUp: genFx("hide"), 3377 slideToggle: genFx("toggle"), 3378 fadeIn: { opacity: "show" }, 3379 fadeOut: { opacity: "hide" }, 3380 fadeToggle: { opacity: "toggle" } 3381 }, function(name, props) { 3382 jQuery.fn[name] = function(speed, easing, callback) { 3383 return this.animate(props, speed, easing, callback); 3384 }; 3385 }); 3386 jQuery.timers = []; 3387 jQuery.fx.tick = function() { 3388 var timer, i = 0, timers = jQuery.timers; 3389 fxNow = Date.now(); 3390 for (; i < timers.length; i++) { 3391 timer = timers[i]; 3392 if (!timer() && timers[i] === timer) timers.splice(i--, 1); 3393 } 3394 if (!timers.length) jQuery.fx.stop(); 3395 fxNow = void 0; 3396 }; 3397 jQuery.fx.timer = function(timer) { 3398 jQuery.timers.push(timer); 3399 jQuery.fx.start(); 3400 }; 3401 jQuery.fx.interval = 13; 3402 jQuery.fx.start = function() { 3403 if (inProgress) return; 3404 inProgress = true; 3405 schedule(); 3406 }; 3407 jQuery.fx.stop = function() { 3408 inProgress = null; 3409 }; 3410 jQuery.fx.speeds = { 3411 slow: 600, 3412 fast: 200, 3413 _default: 400 3414 };
3415 jQuery.fn.delay = function(time, type) { 3416 time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; 3417 type = type || "fx"; 3418 return this.queue(type, function(next, hooks) { 3419 var timeout = window.setTimeout(next, time); 3420 hooks.stop = function() { 3421 window.clearTimeout(timeout); 3422 }; 3423 }); 3424 }; 3425 (function() { 3426 var input = document.createElement("input"), opt = document.createElement("select").appendChild(document.createElement("option")); 3427 input.type = "checkbox"; 3428 support.checkOn = input.value !== ""; 3429 support.optSelected = opt.selected; 3430 input = document.createElement("input"); 3431 input.value = "t"; 3432 input.type = "radio"; 3433 support.radioValue = input.value === "t"; 3434 })(); 3435 var boolHook, attrHandle = jQuery.expr.attrHandle; 3436 jQuery.fn.extend({ 3437 attr: function(name, value) { 3438 return access(this, jQuery.attr, name, value, arguments.length > 1); 3439 }, 3440 removeAttr: function(name) { 3441 return this.each(function() { 3442 jQuery.removeAttr(this, name); 3443 }); 3444 } 3445 }); 3446 jQuery.extend({ 3447 attr: function(elem, name, value) { 3448 var ret, hooks, nType = elem.nodeType; 3449 if (nType === 3 || nType === 8 || nType === 2) return; 3450 if (typeof elem.getAttribute === "undefined") return jQuery.prop(elem, name, value); 3451 if (nType !== 1 || !jQuery.isXMLDoc(elem)) hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0); 3452 if (value !== void 0) { 3453 if (value === null) { 3454 jQuery.removeAttr(elem, name); 3455 return; 3456 } 3457 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) return ret; 3458 elem.setAttribute(name, value + ""); 3459 return value; 3460 } 3461 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) return ret; 3462 ret = jQuery.find.attr(elem, name); 3463 return ret == null ? void 0 : ret; 3464 }, 3465 attrHooks: { type: { set: function(elem, value) { 3466 if (!support.radioValue && value === "radio" && nodeName(elem, "input")) { 3467 var val = elem.value; 3468 elem.setAttribute("type", value); 3469 if (val) elem.value = val; 3470 return value; 3471 } 3472 } } }, 3473 removeAttr: function(elem, value) { 3474 var name, i = 0, attrNames = value && value.match(rnothtmlwhite); 3475 if (attrNames && elem.nodeType === 1) while (name = attrNames[i++]) elem.removeAttribute(name); 3476 } 3477 }); 3478 boolHook = { set: function(elem, value, name) { 3479 if (value === false) jQuery.removeAttr(elem, name); 3480 else elem.setAttribute(name, name); 3481 return name; 3482 } }; 3483 jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(_i, name) { 3484 var getter = attrHandle[name] || jQuery.find.attr; 3485 attrHandle[name] = function(elem, name, isXML) { 3486 var ret, handle, lowercaseName = name.toLowerCase(); 3487 if (!isXML) { 3488 handle = attrHandle[lowercaseName]; 3489 attrHandle[lowercaseName] = ret; 3490 ret = getter(elem, name, isXML) != null ? lowercaseName : null; 3491 attrHandle[lowercaseName] = handle; 3492 } 3493 return ret; 3494 }; 3495 }); 3496 var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; 3497 jQuery.fn.extend({ 3498 prop: function(name, value) { 3499 return access(this, jQuery.prop, name, value, arguments.length > 1); 3500 }, 3501 removeProp: function(name) { 3502 return this.each(function() { 3503 delete this[jQuery.propFix[name] || name]; 3504 }); 3505 } 3506 }); 3507 jQuery.extend({ 3508 prop: function(elem, name, value) { 3509 var ret, hooks, nType = elem.nodeType; 3510 if (nType === 3 || nType === 8 || nType === 2) return; 3511 if (nType !== 1 || !jQuery.isXMLDoc(elem)) { 3512 name = jQuery.propFix[name] || name; 3513 hooks = jQuery.propHooks[name]; 3514 } 3515 if (value !== void 0) { 3516 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) return ret; 3517 return elem[name] = value; 3518 } 3519 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) return ret; 3520 return elem[name]; 3521 }, 3522 propHooks: { tabIndex: { get: function(elem) { 3523 var tabindex = jQuery.find.attr(elem, "tabindex"); 3524 if (tabindex) return parseInt(tabindex, 10); 3525 if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) return 0; 3526 return -1; 3527 } } }, 3528 propFix: { 3529 "for": "htmlFor", 3530 "class": "className" 3531 } 3532 }); 3533 if (!support.optSelected) jQuery.propHooks.selected = { 3534 get: function(elem) { 3535 var parent = elem.parentNode; 3536 if (parent && parent.parentNode) parent.parentNode.selectedIndex; 3537 return null; 3538 },
3539 set: function(elem) { 3540 var parent = elem.parentNode; 3541 if (parent) { 3542 parent.selectedIndex; 3543 if (parent.parentNode) parent.parentNode.selectedIndex; 3544 } 3545 } 3546 }; 3547 jQuery.each([ 3548 "tabIndex", 3549 "readOnly", 3550 "maxLength", 3551 "cellSpacing", 3552 "cellPadding", 3553 "rowSpan", 3554 "colSpan", 3555 "useMap", 3556 "frameBorder", 3557 "contentEditable" 3558 ], function() { 3559 jQuery.propFix[this.toLowerCase()] = this; 3560 }); 3561 function stripAndCollapse(value) { 3562 return (value.match(rnothtmlwhite) || []).join(" "); 3563 } 3564 function getClass(elem) { 3565 return elem.getAttribute && elem.getAttribute("class") || ""; 3566 } 3567 function classesToArray(value) { 3568 if (Array.isArray(value)) return value; 3569 if (typeof value === "string") return value.match(rnothtmlwhite) || []; 3570 return []; 3571 } 3572 jQuery.fn.extend({ 3573 addClass: function(value) { 3574 var classNames, cur, curValue, className, i, finalValue; 3575 if (isFunction(value)) return this.each(function(j) { 3576 jQuery(this).addClass(value.call(this, j, getClass(this))); 3577 }); 3578 classNames = classesToArray(value); 3579 if (classNames.length) return this.each(function() { 3580 curValue = getClass(this); 3581 cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; 3582 if (cur) { 3583 for (i = 0; i < classNames.length; i++) { 3584 className = classNames[i]; 3585 if (cur.indexOf(" " + className + " ") < 0) cur += className + " "; 3586 } 3587 finalValue = stripAndCollapse(cur); 3588 if (curValue !== finalValue) this.setAttribute("class", finalValue); 3589 } 3590 }); 3591 return this; 3592 }, 3593 removeClass: function(value) { 3594 var classNames, cur, curValue, className, i, finalValue; 3595 if (isFunction(value)) return this.each(function(j) { 3596 jQuery(this).removeClass(value.call(this, j, getClass(this))); 3597 }); 3598 if (!arguments.length) return this.attr("class", ""); 3599 classNames = classesToArray(value); 3600 if (classNames.length) return this.each(function() { 3601 curValue = getClass(this); 3602 cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; 3603 if (cur) { 3604 for (i = 0; i < classNames.length; i++) { 3605 className = classNames[i]; 3606 while (cur.indexOf(" " + className + " ") > -1) cur = cur.replace(" " + className + " ", " "); 3607 } 3608 finalValue = stripAndCollapse(cur); 3609 if (curValue !== finalValue) this.setAttribute("class", finalValue); 3610 } 3611 }); 3612 return this; 3613 }, 3614 toggleClass: function(value, stateVal) { 3615 var classNames, className, i, self, type = typeof value, isValidValue = type === "string" || Array.isArray(value); 3616 if (isFunction(value)) return this.each(function(i) { 3617 jQuery(this).toggleClass(value.call(this, i, getClass(this), stateVal), stateVal); 3618 }); 3619 if (typeof stateVal === "boolean" && isValidValue) return stateVal ? this.addClass(value) : this.removeClass(value); 3620 classNames = classesToArray(value); 3621 return this.each(function() { 3622 if (isValidValue) { 3623 self = jQuery(this); 3624 for (i = 0; i < classNames.length; i++) { 3625 className = classNames[i]; 3626 if (self.hasClass(className)) self.removeClass(className); 3627 else self.addClass(className); 3628 } 3629 } else if (value === void 0 || type === "boolean") { 3630 className = getClass(this); 3631 if (className) dataPriv.set(this, "__className__", className); 3632 if (this.setAttribute) this.setAttribute("class", className || value === false ? "" : dataPriv.get(this, "__className__") || ""); 3633 } 3634 }); 3635 }, 3636 hasClass: function(selector) { 3637 var className, elem, i = 0; 3638 className = " " + selector + " "; 3639 while (elem = this[i++]) if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) return true; 3640 return false; 3641 } 3642 }); 3643 var rreturn = /\r/g; 3644 jQuery.fn.extend({ val: function(value) { 3645 var hooks, ret, valueIsFunction, elem = this[0]; 3646 if (!arguments.length) { 3647 if (elem) { 3648 hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()]; 3649 if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) return ret; 3650 ret = elem.value; 3651 if (typeof ret === "string") return ret.replace(rreturn, ""); 3652 return ret == null ? "" : ret; 3653 } 3654 return; 3655 } 3656 valueIsFunction = isFunction(value); 3657 return this.each(function(i) { 3658 var val; 3659 if (this.nodeType !== 1) return; 3660 if (valueIsFunction) val = value.call(this, i, jQuery(this).val()); 3661 else val = value; 3662 if (val == null) val = ""; 3663 else if (typeof val === "number") val += ""; 3664 else if (Array.isArray(val)) val = jQuery.map(val, function(value) { 3665 return value == null ? "" : value + ""; 3666 }); 3667 hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; 3668 if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) this.value = val; 3669 }); 3670 } }); 3671 jQuery.extend({ valHooks: { 3672 option: { get: function(elem) { 3673 var val = jQuery.find.attr(elem, "value"); 3674 return val != null ? val : stripAndCollapse(jQuery.text(elem)); 3675 } }, 3676 select: { 3677 get: function(elem) { 3678 var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; 3679 if (index < 0) i = max; 3680 else i = one ? index : 0; 3681 for (; i < max; i++) { 3682 option = options[i]; 3683 if ((option.selected || i === index) && !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) { 3684 value = jQuery(option).val(); 3685 if (one) return value; 3686 values.push(value); 3687 } 3688 } 3689 return values; 3690 }, 3691 set: function(elem, value) { 3692 var optionSet, option, options = elem.options, values = jQuery.makeArray(value), i = options.length; 3693 while (i--) { 3694 option = options[i]; 3695 if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) optionSet = true; 3696 } 3697 if (!optionSet) elem.selectedIndex = -1; 3698 return values; 3699 } 3700 } 3701 } }); 3702 jQuery.each(["radio", "checkbox"], function() { 3703 jQuery.valHooks[this] = { set: function(elem, value) { 3704 if (Array.isArray(value)) return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1; 3705 } }; 3706 if (!support.checkOn) jQuery.valHooks[this].get = function(elem) { 3707 return elem.getAttribute("value") === null ? "on" : elem.value; 3708 }; 3709 }); 3710 var location = window.location; 3711 var nonce = { guid: Date.now() }; 3712 var rquery = /\?/; 3713 jQuery.parseXML = function(data) { 3714 var xml, parserErrorElem; 3715 if (!data || typeof data !== "string") return null; 3716 try { 3717 xml = new window.DOMParser().parseFromString(data, "text/xml"); 3718 } catch (e) {} 3719 parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0]; 3720 if (!xml || parserErrorElem) jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function(el) { 3721 return el.textContent; 3722 }).join("\n") : data)); 3723 return xml; 3724 }; 3725 var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) { 3726 e.stopPropagation(); 3727 }; 3728 jQuery.extend(jQuery.event, { 3729 trigger: function(event, data, elem, onlyHandlers) { 3730 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; 3731 cur = lastElement = tmp = elem = elem || document; 3732 if (elem.nodeType === 3 || elem.nodeType === 8) return; 3733 if (rfocusMorph.test(type + jQuery.event.triggered)) return; 3734 if (type.indexOf(".") > -1) { 3735 namespaces = type.split("."); 3736 type = namespaces.shift(); 3737 namespaces.sort(); 3738 }
3739 ontype = type.indexOf(":") < 0 && "on" + type; 3740 event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event); 3741 event.isTrigger = onlyHandlers ? 2 : 3; 3742 event.namespace = namespaces.join("."); 3743 event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 3744 event.result = void 0; 3745 if (!event.target) event.target = elem; 3746 data = data == null ? [event] : jQuery.makeArray(data, [event]); 3747 special = jQuery.event.special[type] || {}; 3748 if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) return; 3749 if (!onlyHandlers && !special.noBubble && !isWindow(elem)) { 3750 bubbleType = special.delegateType || type; 3751 if (!rfocusMorph.test(bubbleType + type)) cur = cur.parentNode; 3752 for (; cur; cur = cur.parentNode) { 3753 eventPath.push(cur); 3754 tmp = cur; 3755 } 3756 if (tmp === (elem.ownerDocument || document)) eventPath.push(tmp.defaultView || tmp.parentWindow || window); 3757 } 3758 i = 0; 3759 while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { 3760 lastElement = cur; 3761 event.type = i > 1 ? bubbleType : special.bindType || type; 3762 handle = (dataPriv.get(cur, "events") || Object.create(null))[event.type] && dataPriv.get(cur, "handle"); 3763 if (handle) handle.apply(cur, data); 3764 handle = ontype && cur[ontype]; 3765 if (handle && handle.apply && acceptData(cur)) { 3766 event.result = handle.apply(cur, data); 3767 if (event.result === false) event.preventDefault(); 3768 } 3769 } 3770 event.type = type; 3771 if (!onlyHandlers && !event.isDefaultPrevented()) { 3772 if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) { 3773 if (ontype && isFunction(elem[type]) && !isWindow(elem)) { 3774 tmp = elem[ontype]; 3775 if (tmp) elem[ontype] = null; 3776 jQuery.event.triggered = type; 3777 if (event.isPropagationStopped()) lastElement.addEventListener(type, stopPropagationCallback); 3778 elem[type](); 3779 if (event.isPropagationStopped()) lastElement.removeEventListener(type, stopPropagationCallback); 3780 jQuery.event.triggered = void 0; 3781 if (tmp) elem[ontype] = tmp; 3782 } 3783 } 3784 } 3785 return event.result; 3786 }, 3787 simulate: function(type, elem, event) { 3788 var e = jQuery.extend(new jQuery.Event(), event, { 3789 type, 3790 isSimulated: true 3791 }); 3792 jQuery.event.trigger(e, null, elem); 3793 } 3794 }); 3795 jQuery.fn.extend({ 3796 trigger: function(type, data) { 3797 return this.each(function() { 3798 jQuery.event.trigger(type, data, this); 3799 }); 3800 }, 3801 triggerHandler: function(type, data) { 3802 var elem = this[0]; 3803 if (elem) return jQuery.event.trigger(type, data, elem, true); 3804 } 3805 }); 3806 var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; 3807 function buildParams(prefix, obj, traditional, add) { 3808 var name; 3809 if (Array.isArray(obj)) jQuery.each(obj, function(i, v) { 3810 if (traditional || rbracket.test(prefix)) add(prefix, v); 3811 else buildParams(prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]", v, traditional, add); 3812 }); 3813 else if (!traditional && toType(obj) === "object") for (name in obj) buildParams(prefix + "[" + name + "]", obj[name], traditional, add); 3814 else add(prefix, obj); 3815 } 3816 jQuery.param = function(a, traditional) { 3817 var prefix, s = [], add = function(key, valueOrFunction) { 3818 var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction; 3819 s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value); 3820 }; 3821 if (a == null) return ""; 3822 if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) jQuery.each(a, function() { 3823 add(this.name, this.value); 3824 }); 3825 else for (prefix in a) buildParams(prefix, a[prefix], traditional, add); 3826 return s.join("&"); 3827 }; 3828 jQuery.fn.extend({ 3829 serialize: function() { 3830 return jQuery.param(this.serializeArray()); 3831 }, 3832 serializeArray: function() { 3833 return this.map(function() { 3834 var elements = jQuery.prop(this, "elements"); 3835 return elements ? jQuery.makeArray(elements) : this; 3836 }).filter(function() { 3837 var type = this.type; 3838 return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); 3839 }).map(function(_i, elem) { 3840 var val = jQuery(this).val(); 3841 if (val == null) return null; 3842 if (Array.isArray(val)) return jQuery.map(val, function(val) { 3843 return { 3844 name: elem.name, 3845 value: val.replace(rCRLF, "\r\n") 3846 }; 3847 }); 3848 return { 3849 name: elem.name, 3850 value: val.replace(rCRLF, "\r\n") 3851 }; 3852 }).get(); 3853 } 3854 }); 3855 var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/gm, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document.createElement("a"); 3856 originAnchor.href = location.href;
3857 function addToPrefiltersOrTransports(structure) { 3858 return function(dataTypeExpression, func) { 3859 if (typeof dataTypeExpression !== "string") { 3860 func = dataTypeExpression; 3861 dataTypeExpression = "*"; 3862 } 3863 var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || []; 3864 if (isFunction(func)) while (dataType = dataTypes[i++]) if (dataType[0] === "+") { 3865 dataType = dataType.slice(1) || "*"; 3866 (structure[dataType] = structure[dataType] || []).unshift(func); 3867 } else (structure[dataType] = structure[dataType] || []).push(func); 3868 }; 3869 } 3870 function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { 3871 var inspected = {}, seekingTransport = structure === transports; 3872 function inspect(dataType) { 3873 var selected; 3874 inspected[dataType] = true; 3875 jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) { 3876 var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); 3877 if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { 3878 options.dataTypes.unshift(dataTypeOrTransport); 3879 inspect(dataTypeOrTransport); 3880 return false; 3881 } else if (seekingTransport) return !(selected = dataTypeOrTransport); 3882 }); 3883 return selected; 3884 } 3885 return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); 3886 } 3887 function ajaxExtend(target, src) { 3888 var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; 3889 for (key in src) if (src[key] !== void 0) (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]; 3890 if (deep) jQuery.extend(true, target, deep); 3891 return target; 3892 } 3893 function ajaxHandleResponses(s, jqXHR, responses) { 3894 var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; 3895 while (dataTypes[0] === "*") { 3896 dataTypes.shift(); 3897 if (ct === void 0) ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 3898 } 3899 if (ct) { 3900 for (type in contents) if (contents[type] && contents[type].test(ct)) { 3901 dataTypes.unshift(type); 3902 break; 3903 } 3904 } 3905 if (dataTypes[0] in responses) finalDataType = dataTypes[0]; 3906 else { 3907 for (type in responses) { 3908 if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { 3909 finalDataType = type; 3910 break; 3911 } 3912 if (!firstDataType) firstDataType = type; 3913 } 3914 finalDataType = finalDataType || firstDataType; 3915 } 3916 if (finalDataType) { 3917 if (finalDataType !== dataTypes[0]) dataTypes.unshift(finalDataType); 3918 return responses[finalDataType]; 3919 } 3920 } 3921 function ajaxConvert(s, response, jqXHR, isSuccess) { 3922 var conv2, current, conv, tmp, prev, converters = {}, dataTypes = s.dataTypes.slice(); 3923 if (dataTypes[1]) for (conv in s.converters) converters[conv.toLowerCase()] = s.converters[conv]; 3924 current = dataTypes.shift(); 3925 while (current) { 3926 if (s.responseFields[current]) jqXHR[s.responseFields[current]] = response; 3927 if (!prev && isSuccess && s.dataFilter) response = s.dataFilter(response, s.dataType); 3928 prev = current; 3929 current = dataTypes.shift(); 3930 if (current) { 3931 if (current === "*") current = prev; 3932 else if (prev !== "*" && prev !== current) { 3933 conv = converters[prev + " " + current] || converters["* " + current]; 3934 if (!conv) for (conv2 in converters) { 3935 tmp = conv2.split(" "); 3936 if (tmp[1] === current) { 3937 conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]]; 3938 if (conv) { 3939 if (conv === true) conv = converters[conv2]; 3940 else if (converters[conv2] !== true) { 3941 current = tmp[0]; 3942 dataTypes.unshift(tmp[1]); 3943 } 3944 break; 3945 } 3946 } 3947 } 3948 if (conv !== true) if (conv && s.throws) response = conv(response); 3949 else try { 3950 response = conv(response); 3951 } catch (e) { 3952 return { 3953 state: "parsererror", 3954 error: conv ? e : "No conversion from " + prev + " to " + current 3955 }; 3956 } 3957 } 3958 } 3959 } 3960 return { 3961 state: "success", 3962 data: response 3963 }; 3964 } 3965 jQuery.extend({ 3966 active: 0, 3967 lastModified: {}, 3968 etag: {}, 3969 ajaxSettings: { 3970 url: location.href, 3971 type: "GET", 3972 isLocal: rlocalProtocol.test(location.protocol), 3973 global: true, 3974 processData: true, 3975 async: true, 3976 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 3977 accepts: { 3978 "*": allTypes, 3979 text: "text/plain", 3980 html: "text/html", 3981 xml: "application/xml, text/xml", 3982 json: "application/json, text/javascript" 3983 }, 3984 contents: { 3985 xml: /\bxml\b/, 3986 html: /\bhtml/, 3987 json: /\bjson\b/ 3988 }, 3989 responseFields: { 3990 xml: "responseXML", 3991 text: "responseText", 3992 json: "responseJSON" 3993 }, 3994 converters: { 3995 "* text": String, 3996 "text html": true, 3997 "text json": JSON.parse, 3998 "text xml": jQuery.parseXML 3999 }, 4000 flatOptions: { 4001 url: true, 4002 context: true 4003 } 4004 }, 4005 ajaxSetup: function(target, settings) { 4006 return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target); 4007 }, 4008 ajaxPrefilter: addToPrefiltersOrTransports(prefilters), 4009 ajaxTransport: addToPrefiltersOrTransports(transports), 4010 ajax: function(url, options) { 4011 if (typeof url === "object") { 4012 options = url; 4013 url = void 0; 4014 } 4015 options = options || {}; 4016 var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed, fireGlobals, i, uncached, s = jQuery.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = { 4017 readyState: 0, 4018 getResponseHeader: function(key) { 4019 var match; 4020 if (completed) { 4021 if (!responseHeaders) { 4022 responseHeaders = {}; 4023 while (match = rheaders.exec(responseHeadersString)) responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]); 4024 } 4025 match = responseHeaders[key.toLowerCase() + " "]; 4026 } 4027 return match == null ? null : match.join(", "); 4028 }, 4029 getAllResponseHeaders: function() { 4030 return completed ? responseHeadersString : null; 4031 }, 4032 setRequestHeader: function(name, value) { 4033 if (completed == null) { 4034 name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name; 4035 requestHeaders[name] = value; 4036 } 4037 return this; 4038 }, 4039 overrideMimeType: function(type) { 4040 if (completed == null) s.mimeType = type; 4041 return this; 4042 }, 4043 statusCode: function(map) { 4044 var code; 4045 if (map) if (completed) jqXHR.always(map[jqXHR.status]); 4046 else for (code in map) statusCode[code] = [statusCode[code], map[code]]; 4047 return this; 4048 }, 4049 abort: function(statusText) { 4050 var finalText = statusText || strAbort; 4051 if (transport) transport.abort(finalText); 4052 done(0, finalText); 4053 return this; 4054 } 4055 }; 4056 deferred.promise(jqXHR); 4057 s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//"); 4058 s.type = options.method || options.type || s.method || s.type; 4059 s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""]; 4060 if (s.crossDomain == null) { 4061 urlAnchor = document.createElement("a"); 4062 try { 4063 urlAnchor.href = s.url; 4064 urlAnchor.href = urlAnchor.href; 4065 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; 4066 } catch (e) { 4067 s.crossDomain = true; 4068 } 4069 } 4070 if (s.data && s.processData && typeof s.data !== "string") s.data = jQuery.param(s.data, s.traditional); 4071 inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); 4072 if (completed) return jqXHR; 4073 fireGlobals = jQuery.event && s.global; 4074 if (fireGlobals && jQuery.active++ === 0) jQuery.event.trigger("ajaxStart"); 4075 s.type = s.type.toUpperCase(); 4076 s.hasContent = !rnoContent.test(s.type); 4077 cacheURL = s.url.replace(rhash, ""); 4078 if (!s.hasContent) { 4079 uncached = s.url.slice(cacheURL.length); 4080 if (s.data && (s.processData || typeof s.data === "string")) { 4081 cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data; 4082 delete s.data; 4083 } 4084 if (s.cache === false) { 4085 cacheURL = cacheURL.replace(rantiCache, "$1"); 4086 uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached; 4087 } 4088 s.url = cacheURL + uncached; 4089 } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) s.data = s.data.replace(r20, "+"); 4090 if (s.ifModified) { 4091 if (jQuery.lastModified[cacheURL]) jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]); 4092 if (jQuery.etag[cacheURL]) jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]); 4093 } 4094 if (s.data && s.hasContent && s.contentType !== false || options.contentType) jqXHR.setRequestHeader("Content-Type", s.c
4094ontentType); 4095 jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]); 4096 for (i in s.headers) jqXHR.setRequestHeader(i, s.headers[i]); 4097 if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) return jqXHR.abort(); 4098 strAbort = "abort"; 4099 completeDeferred.add(s.complete); 4100 jqXHR.done(s.success); 4101 jqXHR.fail(s.error); 4102 transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); 4103 if (!transport) done(-1, "No Transport"); 4104 else { 4105 jqXHR.readyState = 1; 4106 if (fireGlobals) globalEventContext.trigger("ajaxSend", [jqXHR, s]); 4107 if (completed) return jqXHR; 4108 if (s.async && s.timeout > 0) timeoutTimer = window.setTimeout(function() { 4109 jqXHR.abort("timeout"); 4110 }, s.timeout); 4111 try { 4112 completed = false; 4113 transport.send(requestHeaders, done); 4114 } catch (e) { 4115 if (completed) throw e; 4116 done(-1, e); 4117 } 4118 } 4119 function done(status, nativeStatusText, responses, headers) { 4120 var isSuccess, success, error, response, modified, statusText = nativeStatusText; 4121 if (completed) return; 4122 completed = true; 4123 if (timeoutTimer) window.clearTimeout(timeoutTimer); 4124 transport = void 0; 4125 responseHeadersString = headers || ""; 4126 jqXHR.readyState = status > 0 ? 4 : 0; 4127 isSuccess = status >= 200 && status < 300 || status === 304; 4128 if (responses) response = ajaxHandleResponses(s, jqXHR, responses); 4129 if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1 && jQuery.inArray("json", s.dataTypes) < 0) s.converters["text script"] = function() {}; 4130 response = ajaxConvert(s, response, jqXHR, isSuccess); 4131 if (isSuccess) { 4132 if (s.ifModified) { 4133 modified = jqXHR.getResponseHeader("Last-Modified"); 4134 if (modified) jQuery.lastModified[cacheURL] = modified; 4135 modified = jqXHR.getResponseHeader("etag"); 4136 if (modified) jQuery.etag[cacheURL] = modified; 4137 } 4138 if (status === 204 || s.type === "HEAD") statusText = "nocontent"; 4139 else if (status === 304) statusText = "notmodified"; 4140 else { 4141 statusText = response.state; 4142 success = response.data; 4143 error = response.error; 4144 isSuccess = !error; 4145 } 4146 } else { 4147 error = statusText; 4148 if (status || !statusText) { 4149 statusText = "error"; 4150 if (status < 0) status = 0; 4151 } 4152 } 4153 jqXHR.status = status; 4154 jqXHR.statusText = (nativeStatusText || statusText) + ""; 4155 if (isSuccess) deferred.resolveWith(callbackContext, [ 4156 success, 4157 statusText, 4158 jqXHR 4159 ]); 4160 else deferred.rejectWith(callbackContext, [ 4161 jqXHR, 4162 statusText, 4163 error 4164 ]); 4165 jqXHR.statusCode(statusCode); 4166 statusCode = void 0; 4167 if (fireGlobals) globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [ 4168 jqXHR, 4169 s, 4170 isSuccess ? success : error 4171 ]); 4172 completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); 4173 if (fireGlobals) { 4174 globalEventContext.trigger("ajaxComplete", [jqXHR, s]); 4175 if (!--jQuery.active) jQuery.event.trigger("ajaxStop"); 4176 } 4177 } 4178 return jqXHR; 4179 }, 4180 getJSON: function(url, data, callback) { 4181 return jQuery.get(url, data, callback, "json"); 4182 }, 4183 getScript: function(url, callback) { 4184 return jQuery.get(url, void 0, callback, "script"); 4185 } 4186 }); 4187 jQuery.each(["get", "post"], function(_i, method) { 4188 jQuery[method] = function(url, data, callback, type) { 4189 if (isFunction(data)) { 4190 type = type || callback; 4191 callback = data; 4192 data = void 0; 4193 } 4194 return jQuery.ajax(jQuery.extend({ 4195 url, 4196 type: method, 4197 dataType: type, 4198 data, 4199 success: callback 4200 }, jQuery.isPlainObject(url) && url)); 4201 }; 4202 }); 4203 jQuery.ajaxPrefilter(function(s) { 4204 var i; 4205 for (i in s.headers) if (i.toLowerCase() === "content-type") s.contentType = s.headers[i] || ""; 4206 }); 4207 jQuery._evalUrl = function(url, options, doc) { 4208 return jQuery.ajax({ 4209 url, 4210 type: "GET", 4211 dataType: "script", 4212 cache: true, 4213 async: false, 4214 global: false, 4215 converters: { "text script": function() {} }, 4216 dataFilter: function(response) { 4217 jQuery.globalEval(response, options, doc); 4218 } 4219 }); 4220 }; 4221 jQuery.fn.extend({ 4222 wrapAll: function(html) { 4223 var wrap; 4224 if (this[0]) { 4225 if (isFunction(html)) html = html.call(this[0]); 4226 wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); 4227 if (this[0].parentNode) wrap.insertBefore(this[0]); 4228 wrap.map(function() { 4229 var elem = this; 4230 while (elem.firstElementChild) elem = elem.firstElementChild; 4231 return elem; 4232 }).append(this); 4233 } 4234 return this; 4235 }, 4236 wrapInner: function(html) { 4237 if (isFunction(html)) return this.each(function(i) { 4238 jQuery(this).wrapInner(html.call(this, i)); 4239 }); 4240 return this.each(function() { 4241 var self = jQuery(this), contents = self.contents(); 4242 if (contents.length) contents.wrapAll(html); 4243 else self.append(html); 4244 }); 4245 }, 4246 wrap: function(html) { 4247 var htmlIsFunction = isFunction(html); 4248 return this.each(function(i) { 4249 jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html); 4250 }); 4251 }, 4252 unwrap: function(selector) { 4253 this.parent(selector).not("body").each(function() { 4254 jQuery(this).replaceWith(this.childNodes); 4255 }); 4256 return this; 4257 } 4258 }); 4259 jQuery.expr.pseudos.hidden = function(elem) { 4260 return !jQuery.expr.pseudos.visible(elem); 4261 }; 4262 jQuery.expr.pseudos.visible = function(elem) { 4263 return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); 4264 }; 4265 jQuery.ajaxSettings.xhr = function() { 4266 try { 4267 return new window.XMLHttpRequest(); 4268 } catch (e) {} 4269 }; 4270 var xhrSuccessStatus = { 4271 0: 200, 4272 1223: 204 4273 }, xhrSupported = jQuery.ajaxSettings.xhr(); 4274 support.cors = !!xhrSupported && "withCredentials" in xhrSupported; 4275 support.ajax = xhrSupported = !!xhrSupported; 4276 jQuery.ajaxTransport(function(options) { 4277 var callback, errorCallback; 4278 if (support.cors || xhrSupported && !options.crossDomain) return { 4279 send: function(headers, complete) { 4280 var i, xhr = options.xhr(); 4281 xhr.open(options.type, options.url, options.async, options.username, options.password); 4282 if (options.xhrFields) for (i in options.xhrFields) xhr[i] = options.xhrFields[i]; 4283 if (options.mimeType && xhr.overrideMimeType) xhr.overrideMimeType(options.mimeType); 4284 if (!options.crossDomain && !headers["X-Requested-With"]) headers["X-Requested-With"] = "XMLHttpRequest";
4285 for (i in headers) xhr.setRequestHeader(i, headers[i]); 4286 callback = function(type) { 4287 return function() { 4288 if (callback) { 4289 callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; 4290 if (type === "abort") xhr.abort(); 4291 else if (type === "error") if (typeof xhr.status !== "number") complete(0, "error"); 4292 else complete(xhr.status, xhr.statusText); 4293 else complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, xhr.getAllResponseHeaders()); 4294 } 4295 }; 4296 }; 4297 xhr.onload = callback(); 4298 errorCallback = xhr.onerror = xhr.ontimeout = callback("error"); 4299 if (xhr.onabort !== void 0) xhr.onabort = errorCallback; 4300 else xhr.onreadystatechange = function() { 4301 if (xhr.readyState === 4) window.setTimeout(function() { 4302 if (callback) errorCallback(); 4303 }); 4304 }; 4305 callback = callback("abort"); 4306 try { 4307 xhr.send(options.hasContent && options.data || null); 4308 } catch (e) { 4309 if (callback) throw e; 4310 } 4311 }, 4312 abort: function() { 4313 if (callback) callback(); 4314 } 4315 }; 4316 }); 4317 jQuery.ajaxPrefilter(function(s) { 4318 if (s.crossDomain) s.contents.script = false; 4319 }); 4320 jQuery.ajaxSetup({ 4321 accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, 4322 contents: { script: /\b(?:java|ecma)script\b/ }, 4323 converters: { "text script": function(text) { 4324 jQuery.globalEval(text); 4325 return text; 4326 } } 4327 }); 4328 jQuery.ajaxPrefilter("script", function(s) { 4329 if (s.cache === void 0) s.cache = false; 4330 if (s.crossDomain) s.type = "GET"; 4331 }); 4332 jQuery.ajaxTransport("script", function(s) { 4333 if (s.crossDomain || s.scriptAttrs) { 4334 var script, callback; 4335 return { 4336 send: function(_, complete) { 4337 script = jQuery("<script>").attr(s.scriptAttrs || {}).prop({ 4338 charset: s.scriptCharset, 4339 src: s.url 4340 }).on("load error", callback = function(evt) { 4341 script.remove(); 4342 callback = null; 4343 if (evt) complete(evt.type === "error" ? 404 : 200, evt.type); 4344 }); 4345 document.head.appendChild(script[0]); 4346 }, 4347 abort: function() { 4348 if (callback) callback(); 4349 } 4350 }; 4351 } 4352 }); 4353 var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; 4354 jQuery.ajaxSetup({ 4355 jsonp: "callback", 4356 jsonpCallback: function() { 4357 var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce.guid++; 4358 this[callback] = true; 4359 return callback; 4360 } 4361 }); 4362 jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) { 4363 var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s.data) && "data"); 4364 if (jsonProp || s.dataTypes[0] === "jsonp") { 4365 callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback; 4366 if (jsonProp) s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName); 4367 else if (s.jsonp !== false) s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName; 4368 s.converters["script json"] = function() { 4369 if (!responseContainer) jQuery.error(callbackName + " was not called"); 4370 return responseContainer[0]; 4371 }; 4372 s.dataTypes[0] = "json"; 4373 overwritten = window[callbackName]; 4374 window[callbackName] = function() { 4375 responseContainer = arguments; 4376 }; 4377 jqXHR.always(function() { 4378 if (overwritten === void 0) jQuery(window).removeProp(callbackName); 4379 else window[callbackName] = overwritten; 4380 if (s[callbackName]) { 4381 s.jsonpCallback = originalSettings.jsonpCallback; 4382 oldCallbacks.push(callbackName); 4383 } 4384 if (responseContainer && isFunction(overwritten)) overwritten(responseContainer[0]); 4385 responseContainer = overwritten = void 0; 4386 }); 4387 return "script"; 4388 } 4389 }); 4390 support.createHTMLDocument = (function() { 4391 var body = document.implementation.createHTMLDocument("").body; 4392 body.innerHTML = "<form></form><form></form>"; 4393 return body.childNodes.length === 2; 4394 })(); 4395 jQuery.parseHTML = function(data, context, keepScripts) { 4396 if (typeof data !== "string") return []; 4397 if (typeof context === "boolean") { 4398 keepScripts = context; 4399 context = false;
4400 } 4401 var base, parsed, scripts; 4402 if (!context) if (support.createHTMLDocument) { 4403 context = document.implementation.createHTMLDocument(""); 4404 base = context.createElement("base"); 4405 base.href = document.location.href; 4406 context.head.appendChild(base); 4407 } else context = document; 4408 parsed = rsingleTag.exec(data); 4409 scripts = !keepScripts && []; 4410 if (parsed) return [context.createElement(parsed[1])]; 4411 parsed = buildFragment([data], context, scripts); 4412 if (scripts && scripts.length) jQuery(scripts).remove(); 4413 return jQuery.merge([], parsed.childNodes); 4414 }; 4415 /** 4416 * Load a url into a page 4417 */ 4418 jQuery.fn.load = function(url, params, callback) { 4419 var selector, type, response, self = this, off = url.indexOf(" "); 4420 if (off > -1) { 4421 selector = stripAndCollapse(url.slice(off)); 4422 url = url.slice(0, off); 4423 } 4424 if (isFunction(params)) { 4425 callback = params; 4426 params = void 0; 4427 } else if (params && typeof params === "object") type = "POST"; 4428 if (self.length > 0) jQuery.ajax({ 4429 url, 4430 type: type || "GET", 4431 dataType: "html", 4432 data: params 4433 }).done(function(responseText) { 4434 response = arguments; 4435 self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText); 4436 }).always(callback && function(jqXHR, status) { 4437 self.each(function() { 4438 callback.apply(this, response || [ 4439 jqXHR.responseText, 4440 status, 4441 jqXHR 4442 ]); 4443 }); 4444 }); 4445 return this; 4446 }; 4447 jQuery.expr.pseudos.animated = function(elem) { 4448 return jQuery.grep(jQuery.timers, function(fn) { 4449 return elem === fn.elem; 4450 }).length; 4451 }; 4452 jQuery.offset = { setOffset: function(elem, options, i) { 4453 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css(elem, "position"), curElem = jQuery(elem), props = {}; 4454 if (position === "static") elem.style.position = "relative"; 4455 curOffset = curElem.offset(); 4456 curCSSTop = jQuery.css(elem, "top"); 4457 curCSSLeft = jQuery.css(elem, "left"); 4458 calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1; 4459 if (calculatePosition) { 4460 curPosition = curElem.position(); 4461 curTop = curPosition.top; 4462 curLeft = curPosition.left; 4463 } else { 4464 curTop = parseFloat(curCSSTop) || 0; 4465 curLeft = parseFloat(curCSSLeft) || 0; 4466 } 4467 if (isFunction(options)) options = options.call(elem, i, jQuery.extend({}, curOffset)); 4468 if (options.top != null) props.top = options.top - curOffset.top + curTop; 4469 if (options.left != null) props.left = options.left - curOffset.left + curLeft; 4470 if ("using" in options) options.using.call(elem, props); 4471 else curElem.css(props); 4472 } }; 4473 jQuery.fn.extend({ 4474 offset: function(options) { 4475 if (arguments.length) return options === void 0 ? this : this.each(function(i) { 4476 jQuery.offset.setOffset(this, options, i); 4477 }); 4478 var rect, win, elem = this[0]; 4479 if (!elem) return; 4480 if (!elem.getClientRects().length) return { 4481 top: 0, 4482 left: 0 4483 }; 4484 rect = elem.getBoundingClientRect(); 4485 win = elem.ownerDocument.defaultView; 4486 return { 4487 top: rect.top + win.pageYOffset, 4488 left: rect.left + win.pageXOffset 4489 }; 4490 }, 4491 position: function() { 4492 if (!this[0]) return; 4493 var offsetParent, offset, doc, elem = this[0], parentOffset = { 4494 top: 0, 4495 left: 0 4496 }; 4497 if (jQuery.css(elem, "position") === "fixed") offset = elem.getBoundingClientRect(); 4498 else { 4499 offset = this.offset(); 4500 doc = elem.ownerDocument; 4501 offsetParent = elem.offsetParent || doc.documentElement; 4502 while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") offsetParent = offsetParent.parentNode; 4503 if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) { 4504 parentOffset = jQuery(offsetParent).offset(); 4505 parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true); 4506 parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true); 4507 } 4508 } 4509 return { 4510 top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true), 4511 left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true) 4512 }; 4513 }, 4514 offsetParent: function() { 4515 return this.map(function() { 4516 var offsetParent = this.offsetParent; 4517 while (offsetParent && jQuery.css(offsetParent, "position") === "static") offsetParent = offsetParent.offsetParent; 4518 return offsetParent || documentElement; 4519 }); 4520 } 4521 }); 4522 jQuery.each({ 4523 scrollLeft: "pageXOffset", 4524 scrollTop: "pageYOffset" 4525 }, function(method, prop) { 4526 var top = "pageYOffset" === prop; 4527 jQuery.fn[method] = function(val) { 4528 return access(this, function(elem, method, val) { 4529 var win; 4530 if (isWindow(elem)) win = elem; 4531 else if (elem.nodeType === 9) win = elem.defaultView; 4532 if (val === void 0) return win ? win[prop] : elem[method]; 4533 if (win) win.scrollTo(!top ? val : win.pageXOffset, top ? val : win.pageYOffset); 4534 else elem[method] = val; 4535 }, method, val, arguments.length); 4536 }; 4537 }); 4538 jQuery.each(["top", "left"], function(_i, prop) { 4539 jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function(elem, computed) { 4540 if (computed) { 4541 computed = curCSS(elem, prop); 4542 return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed; 4543 } 4544 }); 4545 }); 4546 jQuery.each({ 4547 Height: "height", 4548 Width: "width" 4549 }, function(name, type) { 4550 jQuery.each({
vendor: 3,656 bytes, lines 4551-4652
4551 padding: "inner" + name, 4552 content: type, 4553 "": "outer" + name 4554 }, function(defaultExtra, funcName) { 4555 jQuery.fn[funcName] = function(margin, value) { 4556 var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin" : "border"); 4557 return access(this, function(elem, type, value) { 4558 var doc; 4559 if (isWindow(elem)) return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name]; 4560 if (elem.nodeType === 9) { 4561 doc = elem.documentElement; 4562 return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]); 4563 } 4564 return value === void 0 ? jQuery.css(elem, type, extra) : jQuery.style(elem, type, value, extra); 4565 }, type, chainable ? margin : void 0, chainable); 4566 }; 4567 }); 4568 }); 4569 jQuery.each([ 4570 "ajaxStart", 4571 "ajaxStop", 4572 "ajaxComplete", 4573 "ajaxError", 4574 "ajaxSuccess", 4575 "ajaxSend" 4576 ], function(_i, type) { 4577 jQuery.fn[type] = function(fn) { 4578 return this.on(type, fn); 4579 }; 4580 }); 4581 jQuery.fn.extend({ 4582 bind: function(types, data, fn) { 4583 return this.on(types, null, data, fn); 4584 }, 4585 unbind: function(types, fn) { 4586 return this.off(types, null, fn); 4587 }, 4588 delegate: function(selector, types, data, fn) { 4589 return this.on(types, selector, data, fn); 4590 }, 4591 undelegate: function(selector, types, fn) { 4592 return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn); 4593 }, 4594 hover: function(fnOver, fnOut) { 4595 return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver); 4596 } 4597 }); 4598 jQuery.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(_i, name) { 4599 jQuery.fn[name] = function(data, fn) { 4600 return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); 4601 }; 4602 }); 4603 var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; 4604 jQuery.proxy = function(fn, context) { 4605 var tmp, args, proxy; 4606 if (typeof context === "string") { 4607 tmp = fn[context]; 4608 context = fn; 4609 fn = tmp; 4610 } 4611 if (!isFunction(fn)) return; 4612 args = slice.call(arguments, 2); 4613 proxy = function() { 4614 return fn.apply(context || this, args.concat(slice.call(arguments))); 4615 }; 4616 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 4617 return proxy; 4618 }; 4619 jQuery.holdReady = function(hold) { 4620 if (hold) jQuery.readyWait++; 4621 else jQuery.ready(true); 4622 }; 4623 jQuery.isArray = Array.isArray; 4624 jQuery.parseJSON = JSON.parse; 4625 jQuery.nodeName = nodeName; 4626 jQuery.isFunction = isFunction; 4627 jQuery.isWindow = isWindow; 4628 jQuery.camelCase = camelCase; 4629 jQuery.type = toType; 4630 jQuery.now = Date.now; 4631 jQuery.isNumeric = function(obj) { 4632 var type = jQuery.type(obj); 4633 return (type === "number" || type === "string") && !isNaN(obj - parseFloat(obj)); 4634 }; 4635 jQuery.trim = function(text) { 4636 return text == null ? "" : (text + "").replace(rtrim, "$1"); 4637 }; 4638 if (typeof define === "function" && define.amd) define("jquery", [], function() { 4639 return jQuery; 4640 }); 4641 var _jQuery = window.jQuery, _$ = window.$; 4642 jQuery.noConflict = function(deep) { 4643 if (window.$ === jQuery) window.$ = _$; 4644 if (deep && window.jQuery === jQuery) window.jQuery = _jQuery; 4645 return jQuery; 4646 }; 4647 if (typeof noGlobal === "undefined") window.jQuery = window.$ = jQuery; 4648 return jQuery; 4649 }); 4650})); 4651//#endregion 4652export { require_jquery as t };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.