vendor: 9,143 bytes, lines 1-264
1/** vim: et:ts=4:sw=4:sts=4 2 * @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. 3 * Available via the MIT or new BSD license. 4 * see: http://github.com/jrburke/requirejs for details 5 */ 6//Not using strict: uneven strict support in browsers, #392, and causes 7//problems with requirejs.exec()/transpiler plugins that may not be strict. 8/*jslint regexp: true, nomen: true, sloppy: true */ 9/*global window, navigator, document, importScripts, setTimeout, opera */ 10 11var requirejs, require, define; 12(function (global) { 13 var req, s, head, baseElement, dataMain, src, 14 interactiveScript, currentlyAddingScript, mainScript, subPath, 15 version = '2.1.11', 16 commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, 17 cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, 18 jsSuffixRegExp = /\.js$/, 19 currDirRegExp = /^\.\//, 20 op = Object.prototype, 21 ostring = op.toString, 22 hasOwn = op.hasOwnProperty, 23 ap = Array.prototype, 24 apsp = ap.splice, 25 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), 26 isWebWorker = !isBrowser && typeof importScripts !== 'undefined', 27 //PS3 indicates loaded and complete, but need to wait for complete 28 //specifically. Sequence is 'loading', 'loaded', execution, 29 // then 'complete'. The UA check is unfortunate, but not sure how 30 //to feature test w/o causing perf issues. 31 readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? 32 /^complete$/ : /^(complete|loaded)$/, 33 defContextName = '_', 34 //Oh the tragedy, detecting opera. See the usage of isOpera for reason. 35 isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', 36 contexts = {}, 37 cfg = {}, 38 globalDefQueue = [], 39 useInteractive = false; 40 41 function isFunction(it) { 42 return ostring.call(it) === '[object Function]'; 43 } 44 45 function isArray(it) { 46 return ostring.call(it) === '[object Array]'; 47 } 48 49 /** 50 * Helper function for iterating over an array. If the func returns 51 * a true value, it will break out of the loop. 52 */ 53 function each(ary, func) { 54 if (ary) { 55 var i; 56 for (i = 0; i < ary.length; i += 1) { 57 if (ary[i] && func(ary[i], i, ary)) { 58 break; 59 } 60 } 61 } 62 } 63 64 /** 65 * Helper function for iterating over an array backwards. If the func 66 * returns a true value, it will break out of the loop. 67 */ 68 function eachReverse(ary, func) { 69 if (ary) { 70 var i; 71 for (i = ary.length - 1; i > -1; i -= 1) { 72 if (ary[i] && func(ary[i], i, ary)) { 73 break; 74 } 75 } 76 } 77 } 78 79 function hasProp(obj, prop) { 80 return hasOwn.call(obj, prop); 81 } 82 83 function getOwn(obj, prop) { 84 return hasProp(obj, prop) && obj[prop]; 85 } 86 87 /** 88 * Cycles over properties in an object and calls a function for each 89 * property value. If the function returns a truthy value, then the 90 * iteration is stopped. 91 */ 92 function eachProp(obj, func) { 93 var prop; 94 for (prop in obj) { 95 if (hasProp(obj, prop)) { 96 if (func(obj[prop], prop)) { 97 break; 98 } 99 } 100 } 101 } 102 103 /** 104 * Simple function to mix in properties from source into target, 105 * but only if target does not already have a property of the same name. 106 */ 107 function mixin(target, source, force, deepStringMixin) { 108 if (source) { 109 eachProp(source, function (value, prop) { 110 if (force || !hasProp(target, prop)) { 111 if (deepStringMixin && typeof value === 'object' && value && 112 !isArray(value) && !isFunction(value) && 113 !(value instanceof RegExp)) { 114 115 if (!target[prop]) { 116 target[prop] = {}; 117 } 118 mixin(target[prop], value, force, deepStringMixin); 119 } else { 120 target[prop] = value; 121 } 122 } 123 }); 124 } 125 return target; 126 } 127 128 //Similar to Function.prototype.bind, but the 'this' object is specified 129 //first, since it is easier to read/figure out what 'this' will be. 130 function bind(obj, fn) { 131 return function () { 132 return fn.apply(obj, arguments); 133 }; 134 } 135 136 function scripts() { 137 return document.getElementsByTagName('script'); 138 } 139 140 function defaultOnError(err) { 141 throw err; 142 } 143 144 //Allow getting a global that is expressed in 145 //dot notation, like 'a.b.c'. 146 function getGlobal(value) { 147 if (!value) { 148 return value; 149 } 150 var g = global; 151 each(value.split('.'), function (part) { 152 g = g[part]; 153 }); 154 return g; 155 } 156 157 /** 158 * Constructs an error with a pointer to an URL with more information. 159 * @param {String} id the error ID that maps to an ID on a web page. 160 * @param {String} message human readable error. 161 * @param {Error} [err] the original error, if there is one. 162 * 163 * @returns {Error} 164 */ 165 function makeError(id, msg, err, requireModules) { 166 var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); 167 e.requireType = id; 168 e.requireModules = requireModules; 169 if (err) { 170 e.originalError = err; 171 } 172 return e; 173 } 174 175 if (typeof define !== 'undefined') { 176 //If a define is already in play via another AMD loader, 177 //do not overwrite. 178 return; 179 } 180 181 if (typeof requirejs !== 'undefined') { 182 if (isFunction(requirejs)) { 183 //Do not overwrite and existing requirejs instance. 184 return; 185 } 186 cfg = requirejs; 187 requirejs = undefined; 188 } 189 190 //Allow for a require config object 191 if (typeof require !== 'undefined' && !isFunction(require)) { 192 //assume it is a config object. 193 cfg = require; 194 require = undefined; 195 } 196 197 function newContext(contextName) { 198 var inCheckLoaded, Module, context, handlers, 199 checkLoadedTimeoutId, 200 config = { 201 //Defaults. Do not set a default for map 202 //config to speed up normalize(), which 203 //will run faster if there is no default. 204 waitSeconds: 7, 205 baseUrl: './', 206 paths: {}, 207 bundles: {}, 208 pkgs: {}, 209 shim: {}, 210 config: {} 211 }, 212 registry = {}, 213 //registry of just enabled modules, to speed 214 //cycle breaking code when lots of modules 215 //are registered, but not activated. 216 enabledRegistry = {}, 217 undefEvents = {}, 218 defQueue = [], 219 defined = {}, 220 urlFetched = {}, 221 bundlesMap = {}, 222 requireCounter = 1, 223 unnormalizedCounter = 1; 224 225 /** 226 * Trims the . and .. from an array of path segments. 227 * It will keep a leading path segment if a .. will become 228 * the first path segment, to help with module name lookups, 229 * which act like paths, but can be remapped. But the end result, 230 * all paths that use this function should look normalized. 231 * NOTE: this method MODIFIES the input array. 232 * @param {Array} ary the array of path segments. 233 */ 234 function trimDots(ary) { 235 var i, part, length = ary.length; 236 for (i = 0; i < length; i++) { 237 part = ary[i]; 238 if (part === '.') { 239 ary.splice(i, 1); 240 i -= 1; 241 } else if (part === '..') { 242 if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { 243 //End of the line. Keep at least one non-dot 244 //path segment at the front so it can be mapped 245 //correctly to disk. Otherwise, there is likely 246 //no path mapping for a path starting with '..'. 247 //This can still fail, but catches the most reasonable 248 //uses of .. 249 break; 250 } else if (i > 0) { 251 ary.splice(i - 1, 2); 252 i -= 2; 253 } 254 } 255 } 256 } 257 258 /** 259 * Given a relative module name, like ./something, normalize it to 260 * a real name that can be mapped to a path. 261 * @param {String} name the relative name 262 * @param {String} baseName a real name that the name arg is relative 263 * to. 264 * @param {Boolean}
264 applyMap apply the map config to the value. Should 265 * only be done if this normalization is for a dependency ID. 266 * @returns {String} normalized name 267 */ 268 function normalize(name, baseName, applyMap) { 269 var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, 270 foundMap, foundI, foundStarMap, starI, 271 baseParts = baseName && baseName.split('/'), 272 normalizedBaseParts = baseParts, 273 map = config.map, 274 starMap = map && map['*']; 275 276 //Adjust any relative paths. 277 if (name && name.charAt(0) === '.') { 278 //If have a base name, try to normalize against it, 279 //otherwise, assume it is a top-level require that will 280 //be relative to baseUrl in the end. 281 if (baseName) { 282 //Convert baseName to array, and lop off the last part, 283 //so that . matches that 'directory' and not name of the baseName's 284 //module. For instance, baseName of 'one/two/three', maps to 285 //'one/two/three.js', but we want the directory, 'one/two' for 286 //this normalization. 287 normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); 288 name = name.split('/'); 289 lastIndex = name.length - 1; 290 291 // If wanting node ID compatibility, strip .js from end 292 // of IDs. Have to do this here, and not in nameToUrl 293 // because node allows either .js or non .js to map 294 // to same file. 295 if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { 296 name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); 297 } 298 299 name = normalizedBaseParts.concat(name); 300 trimDots(name); 301 name = name.join('/'); 302 } else if (name.indexOf('./') === 0) { 303 // No baseName, so this is ID is resolved relative 304 // to baseUrl, pull off the leading dot. 305 name = name.substring(2); 306 } 307 } 308 309 //Apply map config if available. 310 if (applyMap && map && (baseParts || starMap)) { 311 nameParts = name.split('/'); 312 313 outerLoop: for (i = nameParts.length; i > 0; i -= 1) { 314 nameSegment = nameParts.slice(0, i).join('/'); 315 316 if (baseParts) { 317 //Find the longest baseName segment match in the config. 318 //So, do joins on the biggest to smallest lengths of baseParts. 319 for (j = baseParts.length; j > 0; j -= 1) { 320 mapValue = getOwn(map, baseParts.slice(0, j).join('/')); 321 322 //baseName segment has config, find if it has one for 323 //this name. 324 if (mapValue) { 325 mapValue = getOwn(mapValue, nameSegment); 326 if (mapValue) {
vendor: 24,843 bytes, lines 327-958
327 //Match, update name to the new value. 328 foundMap = mapValue; 329 foundI = i; 330 break outerLoop; 331 } 332 } 333 } 334 } 335 336 //Check for a star map match, but just hold on to it, 337 //if there is a shorter segment match later in a matching 338 //config, then favor over this star map. 339 if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { 340 foundStarMap = getOwn(starMap, nameSegment); 341 starI = i; 342 } 343 } 344 345 if (!foundMap && foundStarMap) { 346 foundMap = foundStarMap; 347 foundI = starI; 348 } 349 350 if (foundMap) { 351 nameParts.splice(0, foundI, foundMap); 352 name = nameParts.join('/'); 353 } 354 } 355 356 // If the name points to a package's name, use 357 // the package main instead. 358 pkgMain = getOwn(config.pkgs, name); 359 360 return pkgMain ? pkgMain : name; 361 } 362 363 function removeScript(name) { 364 if (isBrowser) { 365 each(scripts(), function (scriptNode) { 366 if (scriptNode.getAttribute('data-requiremodule') === name && 367 scriptNode.getAttribute('data-requirecontext') === context.contextName) { 368 scriptNode.parentNode.removeChild(scriptNode); 369 return true; 370 } 371 }); 372 } 373 } 374 375 function hasPathFallback(id) { 376 var pathConfig = getOwn(config.paths, id); 377 if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { 378 //Pop off the first array value, since it failed, and 379 //retry 380 pathConfig.shift(); 381 context.require.undef(id); 382 context.require([id]); 383 return true; 384 } 385 } 386 387 //Turns a plugin!resource to [plugin, resource] 388 //with the plugin being undefined if the name 389 //did not have a plugin prefix. 390 function splitPrefix(name) { 391 var prefix, 392 index = name ? name.indexOf('!') : -1; 393 if (index > -1) { 394 prefix = name.substring(0, index); 395 name = name.substring(index + 1, name.length); 396 } 397 return [prefix, name]; 398 } 399 400 /** 401 * Creates a module mapping that includes plugin prefix, module 402 * name, and path. If parentModuleMap is provided it will 403 * also normalize the name via require.normalize() 404 * 405 * @param {String} name the module name 406 * @param {String} [parentModuleMap] parent module map 407 * for the module name, used to resolve relative names. 408 * @param {Boolean} isNormalized: is the ID already normalized. 409 * This is true if this call is done for a define() module ID. 410 * @param {Boolean} applyMap: apply the map config to the ID. 411 * Should only be true if this map is for a dependency. 412 * 413 * @returns {Object} 414 */ 415 function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { 416 var url, pluginModule, suffix, nameParts, 417 prefix = null, 418 parentName = parentModuleMap ? parentModuleMap.name : null, 419 originalName = name, 420 isDefine = true, 421 normalizedName = ''; 422 423 //If no name, then it means it is a require call, generate an 424 //internal name. 425 if (!name) { 426 isDefine = false; 427 name = '_@r' + (requireCounter += 1); 428 } 429 430 nameParts = splitPrefix(name); 431 prefix = nameParts[0]; 432 name = nameParts[1]; 433 434 if (prefix) { 435 prefix = normalize(prefix, parentName, applyMap); 436 pluginModule = getOwn(defined, prefix); 437 } 438 439 //Account for relative paths if there is a base name. 440 if (name) { 441 if (prefix) { 442 if (pluginModule && pluginModule.normalize) { 443 //Plugin is loaded, use its normalize method. 444 normalizedName = pluginModule.normalize(name, function (name) { 445 return normalize(name, parentName, applyMap); 446 }); 447 } else { 448 normalizedName = normalize(name, parentName, applyMap); 449 } 450 } else { 451 //A regular module. 452 normalizedName = normalize(name, parentName, applyMap); 453 454 //Normalized name may be a plugin ID due to map config 455 //application in normalize. The map config values must 456 //already be normalized, so do not need to redo that part. 457 nameParts = splitPrefix(normalizedName); 458 prefix = nameParts[0]; 459 normalizedName = nameParts[1]; 460 isNormalized = true; 461 462 url = context.nameToUrl(normalizedName); 463 } 464 } 465 466 //If the id is a plugin id that cannot be determined if it needs 467 //normalization, stamp it with a unique ID so two matching relative 468 //ids that may conflict can be separate. 469 suffix = prefix && !pluginModule && !isNormalized ? 470 '_unnormalized' + (unnormalizedCounter += 1) : 471 ''; 472 473 return { 474 prefix: prefix, 475 name: normalizedName, 476 parentMap: parentModuleMap, 477 unnormalized: !!suffix, 478 url: url, 479 originalName: originalName, 480 isDefine: isDefine, 481 id: (prefix ? 482 prefix + '!' + normalizedName : 483 normalizedName) + suffix 484 }; 485 } 486 487 function getModule(depMap) { 488 var id = depMap.id, 489 mod = getOwn(registry, id); 490 491 if (!mod) { 492 mod = registry[id] = new context.Module(depMap); 493 } 494 495 return mod; 496 } 497 498 function on(depMap, name, fn) { 499 var id = depMap.id, 500 mod = getOwn(registry, id); 501 502 if (hasProp(defined, id) && 503 (!mod || mod.defineEmitComplete)) { 504 if (name === 'defined') { 505 fn(defined[id]); 506 } 507 } else { 508 mod = getModule(depMap); 509 if (mod.error && name === 'error') { 510 fn(mod.error); 511 } else { 512 mod.on(name, fn); 513 } 514 } 515 } 516 517 function onError(err, errback) { 518 var ids = err.requireModules, 519 notified = false; 520 521 if (errback) { 522 errback(err); 523 } else { 524 each(ids, function (id) { 525 var mod = getOwn(registry, id); 526 if (mod) { 527 //Set error on module, so it skips timeout checks. 528 mod.error = err; 529 if (mod.events.error) { 530 notified = true; 531 mod.emit('error', err); 532 } 533 } 534 }); 535 536 if (!notified) { 537 req.onError(err); 538 } 539 } 540 } 541 542 /** 543 * Internal method to transfer globalQueue items to this context's 544 * defQueue. 545 */ 546 function takeGlobalQueue() { 547 //Push all the globalDefQueue items into the context's defQueue 548 if (globalDefQueue.length) { 549 //Array splice in the values since the context code has a 550 //local var ref to defQueue, so cannot just reassign the one 551 //on context. 552 apsp.apply(defQueue, 553 [defQueue.length, 0].concat(globalDefQueue)); 554 globalDefQueue = []; 555 } 556 } 557 558 handlers = { 559 'require': function (mod) { 560 if (mod.require) { 561 return mod.require; 562 } else { 563 return (mod.require = context.makeRequire(mod.map)); 564 } 565 }, 566 'exports': function (mod) { 567 mod.usingExports = true; 568 if (mod.map.isDefine) { 569 if (mod.exports) { 570 return (defined[mod.map.id] = mod.exports); 571 } else { 572 return (mod.exports = defined[mod.map.id] = {}); 573 } 574 } 575 }, 576 'module': function (mod) { 577 if (mod.module) { 578 return mod.module; 579 } else { 580 return (mod.module = { 581 id: mod.map.id, 582 uri: mod.map.url, 583 config: function () { 584 return getOwn(config.config, mod.map.id) || {}; 585 }, 586 exports: mod.exports || (mod.exports = {}) 587 }); 588 } 589 } 590 }; 591 592 function cleanRegistry(id) { 593 //Clean up machinery used for waiting modules. 594 delete registry[id]; 595 delete enabledRegistry[id]; 596 } 597 598 function breakCycle(mod, traced, processed) { 599 var id = mod.map.id; 600 601 if (mod.error) { 602 mod.emit('error', mod.error); 603 } else { 604 traced[id] = true; 605 each(mod.depMaps, function (depMap, i) { 606 var depId = depMap.id, 607 dep = getOwn(registry, depId); 608 609 //Only force things that have not completed 610 //being defined, so still in the registry, 611 //and only if it has not been matched up 612 //in the module already. 613 if (dep && !mod.depMatched[i] && !processed[depId]) { 614 if (getOwn(traced, depId)) { 615 mod.defineDep(i, defined[depId]); 616 mod.check(); //pass false? 617 } else { 618 breakCycle(dep, traced, processed); 619 } 620 } 621 }); 622 processed[id] = true; 623 } 624 } 625 626 function checkLoaded() { 627 var err, usingPathFallback, 628 waitInterval = config.waitSeconds * 1000, 629 //It is possible to disable the wait interval by using waitSeconds of 0. 630 expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), 631 noLoads = [], 632 reqCalls = [], 633 stillLoading = false, 634 needCycleCheck = true; 635 636 //Do not bother if this call was a result of a cycle break. 637 if (inCheckLoaded) { 638 return; 639 } 640 641 inCheckLoaded = true; 642 643 //Figure out the state of all the modules. 644 eachProp(enabledRegistry, function (mod) { 645 var map = mod.map, 646 modId = map.id; 647 648 //Skip things that are not enabled or in error state. 649 if (!mod.enabled) { 650 return; 651 } 652 653 if (!map.isDefine) { 654 reqCalls.push(mod); 655 } 656 657 if (!mod.error) { 658 //If the module should be executed, and it has not 659 //been inited and time is up, remember it. 660 if (!mod.inited && expired) { 661 if (hasPathFallback(modId)) { 662 usingPathFallback = true; 663 stillLoading = true; 664 } else { 665 noLoads.push(modId); 666 removeScript(modId); 667 } 668 } else if (!mod.inited && mod.fetched && map.isDefine) { 669 stillLoading = true; 670 if (!map.prefix) { 671 //No reason to keep looking for unfinished 672 //loading. If the only stillLoading is a 673 //plugin resource though, keep going, 674 //because it may be that a plugin resource 675 //is waiting on a non-plugin cycle. 676 return (needCycleCheck = false); 677 } 678 } 679 } 680 }); 681 682 if (expired && noLoads.length) { 683 //If wait time expired, throw error of unloaded modules. 684 err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); 685 err.contextName = context.contextName; 686 return onError(err); 687 } 688 689 //Not expired, check for a cycle. 690 if (needCycleCheck) { 691 each(reqCalls, function (mod) { 692 breakCycle(mod, {}, {}); 693 }); 694 } 695 696 //If still waiting on loads, and the waiting load is something 697 //other than a plugin resource, or there are still outstanding 698 //scripts, then just try back later. 699 if ((!expired || usingPathFallback) && stillLoading) { 700 //Something is still waiting to load. Wait for it, but only 701 //if a timeout is not already in effect. 702 if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { 703 checkLoadedTimeoutId = setTimeout(function () { 704 checkLoadedTimeoutId = 0; 705 checkLoaded(); 706 }, 50); 707 } 708 } 709 710 inCheckLoaded = false; 711 } 712 713 Module = function (map) { 714 this.events = getOwn(undefEvents, map.id) || {}; 715 this.map = map; 716 this.shim = getOwn(config.shim, map.id); 717 this.depExports = []; 718 this.depMaps = []; 719 this.depMatched = []; 720 this.pluginMaps = {}; 721 this.depCount = 0; 722 723 /* this.exports this.factory 724 this.depMaps = [], 725 this.enabled, this.fetched 726 */ 727 }; 728 729 Module.prototype = { 730 init: function (depMaps, factory, errback, options) { 731 options = options || {}; 732 733 //Do not do more inits if already done. Can happen if there 734 //are multiple define calls for the same module. That is not 735 //a normal, common case, but it is also not unexpected. 736 if (this.inited) { 737 return; 738 } 739 740 this.factory = factory; 741 742 if (errback) { 743 //Register for errors on this module. 744 this.on('error', errback); 745 } else if (this.events.error) { 746 //If no errback already, but there are error listeners 747 //on this module, set up an errback to pass to the deps. 748 errback = bind(this, function (err) { 749 this.emit('error', err); 750 }); 751 } 752 753 //Do a copy of the dependency array, so that 754 //source inputs are not modified. For example 755 //"shim" deps are passed in here directly, and 756 //doing a direct modification of the depMaps array 757 //would affect that config. 758 this.depMaps = depMaps && depMaps.slice(0); 759 760 this.errback = errback; 761 762 //Indicate this module has be initialized 763 this.inited = true; 764 765 this.ignore = options.ignore; 766 767 //Could have option to init this module in enabled mode, 768 //or could have been previously marked as enabled. However, 769 //the dependencies are not known until init is called. So 770 //if enabled previously, now trigger dependencies as enabled. 771 if (options.enabled || this.enabled) { 772 //Enable this module and dependencies. 773 //Will call this.check() 774 this.enable(); 775 } else { 776 this.check(); 777 } 778 }, 779 780 defineDep: function (i, depExports) { 781 //Because of cycles, defined callback for a given 782 //export can be called more than once. 783 if (!this.depMatched[i]) { 784 this.depMatched[i] = true; 785 this.depCount -= 1; 786 this.depExports[i] = depExports; 787 } 788 }, 789 790 fetch: function () { 791 if (this.fetched) { 792 return; 793 } 794 this.fetched = true; 795 796 context.startTime = (new Date()).getTime(); 797 798 var map = this.map; 799 800 //If the manager is for a plugin managed resource, 801 //ask the plugin to load it now. 802 if (this.shim) { 803 context.makeRequire(this.map, { 804 enableBuildCallback: true 805 })(this.shim.deps || [], bind(this, function () { 806 return map.prefix ? this.callPlugin() : this.load(); 807 })); 808 } else { 809 //Regular dependency. 810 return map.prefix ? this.callPlugin() : this.load(); 811 } 812 }, 813 814 load: function () { 815 var url = this.map.url; 816 817 //Regular dependency. 818 if (!urlFetched[url]) { 819 urlFetched[url] = true; 820 context.load(this.map.id, url); 821 } 822 }, 823 824 /** 825 * Checks if the module is ready to define itself, and if so, 826 * define it. 827 */ 828 check: function () { 829 if (!this.enabled || this.enabling) { 830 return; 831 } 832 833 var err, cjsModule, 834 id = this.map.id, 835 depExports = this.depExports, 836 exports = this.exports, 837 factory = this.factory; 838 839 if (!this.inited) { 840 this.fetch(); 841 } else if (this.error) { 842 this.emit('error', this.error); 843 } else if (!this.defining) { 844 //The factory could trigger another require call 845 //that would result in checking this module to 846 //define itself again. If already in the process 847 //of doing that, skip this work. 848 this.defining = true; 849 850 if (this.depCount < 1 && !this.defined) { 851 if (isFunction(factory)) { 852 //If there is an error listener, favor passing 853 //to that instead of throwing an error. However, 854 //only do it for define()'d modules. require 855 //errbacks should not be called for failures in 856 //their callbacks (#699). However if a global 857 //onError is set, use that. 858 if ((this.events.error && this.map.isDefine) || 859 req.onError !== defaultOnError) { 860 try { 861 exports = context.execCb(id, factory, depExports, exports); 862 } catch (e) { 863 err = e; 864 } 865 } else { 866 exports = context.execCb(id, factory, depExports, exports); 867 } 868 869 // Favor return value over exports. If node/cjs in play, 870 // then will not have a return value anyway. Favor 871 // module.exports assignment over exports object. 872 if (this.map.isDefine && exports === undefined) { 873 cjsModule = this.module; 874 if (cjsModule) { 875 exports = cjsModule.exports; 876 } else if (this.usingExports) { 877 //exports already set the defined value. 878 exports = this.exports; 879 } 880 } 881 882 if (err) { 883 err.requireMap = this.map; 884 err.requireModules = this.map.isDefine ? [this.map.id] : null; 885 err.requireType = this.map.isDefine ? 'define' : 'require'; 886 return onError((this.error = err)); 887 } 888 889 } else { 890 //Just a literal value 891 exports = factory; 892 } 893 894 this.exports = exports; 895 896 if (this.map.isDefine && !this.ignore) { 897 defined[id] = exports; 898 899 if (req.onResourceLoad) { 900 req.onResourceLoad(context, this.map, this.depMaps); 901 } 902 } 903 904 //Clean up 905 cleanRegistry(id); 906 907 this.defined = true; 908 } 909 910 //Finished the define stage. Allow calling check again 911 //to allow define notifications below in the case of a 912 //cycle. 913 this.defining = false; 914 915 if (this.defined && !this.defineEmitted) { 916 this.defineEmitted = true; 917 this.emit('defined', this.exports); 918 this.defineEmitComplete = true; 919 } 920 921 } 922 }, 923 924 callPlugin: function () { 925 var map = this.map, 926 id = map.id, 927 //Map already normalized the prefix. 928 pluginMap = makeModuleMap(map.prefix); 929 930 //Mark this as a dependency for this plugin, so it 931 //can be traced for cycles. 932 this.depMaps.push(pluginMap); 933 934 on(pluginMap, 'defined', bind(this, function (plugin) { 935 var load, normalizedMap, normalizedMod, 936 bundleId = getOwn(bundlesMap, this.map.id), 937 name = this.map.name, 938 parentName = this.map.parentMap ? this.map.parentMap.name : null, 939 localRequire = context.makeRequire(map.parentMap, { 940 enableBuildCallback: true 941 }); 942 943 //If current map is not normalized, wait for that 944 //normalized name to load instead of continuing. 945 if (this.map.unnormalized) { 946 //Normalize the ID if the plugin allows it. 947 if (plugin.normalize) { 948 name = plugin.normalize(name, function (name) { 949 return normalize(name, parentName, true); 950 }) || ''; 951 } 952 953 //prefix and name should already be normalized, no need 954 //for applying map config again either. 955 normalizedMap = makeModuleMap(map.prefix + '!' + name, 956 this.map.parentMap); 957 on(normalizedMap, 958 'defined', bind(this, function (value) {
vendor: 6,701 bytes, lines 958-1112
958 959 this.init([], function () { return value; }, null, { 960 enabled: true, 961 ignore: true 962 }); 963 })); 964 965 normalizedMod = getOwn(registry, normalizedMap.id); 966 if (normalizedMod) { 967 //Mark this as a dependency for this plugin, so it 968 //can be traced for cycles. 969 this.depMaps.push(normalizedMap); 970 971 if (this.events.error) { 972 normalizedMod.on('error', bind(this, function (err) { 973 this.emit('error', err); 974 })); 975 } 976 normalizedMod.enable(); 977 } 978 979 return; 980 } 981 982 //If a paths config, then just load that file instead to 983 //resolve the plugin, as it is built into that paths layer. 984 if (bundleId) { 985 this.map.url = context.nameToUrl(bundleId); 986 this.load(); 987 return; 988 } 989 990 load = bind(this, function (value) { 991 this.init([], function () { return value; }, null, { 992 enabled: true 993 }); 994 }); 995 996 load.error = bind(this, function (err) { 997 this.inited = true; 998 this.error = err; 999 err.requireModules = [id]; 1000 1001 //Remove temp unnormalized modules for this module, 1002 //since they will never be resolved otherwise now. 1003 eachProp(registry, function (mod) { 1004 if (mod.map.id.indexOf(id + '_unnormalized') === 0) { 1005 cleanRegistry(mod.map.id); 1006 } 1007 }); 1008 1009 onError(err); 1010 }); 1011 1012 //Allow plugins to load other code without having to know the 1013 //context or how to 'complete' the load. 1014 load.fromText = bind(this, function (text, textAlt) { 1015 /*jslint evil: true */ 1016 var moduleName = map.name, 1017 moduleMap = makeModuleMap(moduleName), 1018 hasInteractive = useInteractive; 1019 1020 //As of 2.1.0, support just passing the text, to reinforce 1021 //fromText only being called once per resource. Still 1022 //support old style of passing moduleName but discard 1023 //that moduleName in favor of the internal ref. 1024 if (textAlt) { 1025 text = textAlt; 1026 } 1027 1028 //Turn off interactive script matching for IE for any define 1029 //calls in the text, then turn it back on at the end. 1030 if (hasInteractive) { 1031 useInteractive = false; 1032 } 1033 1034 //Prime the system by creating a module instance for 1035 //it. 1036 getModule(moduleMap); 1037 1038 //Transfer any config to this other module. 1039 if (hasProp(config.config, id)) { 1040 config.config[moduleName] = config.config[id]; 1041 } 1042 1043 try { 1044 req.exec(text); 1045 } catch (e) { 1046 return onError(makeError('fromtexteval', 1047 'fromText eval for ' + id + 1048 ' failed: ' + e, 1049 e, 1050 [id])); 1051 } 1052 1053 if (hasInteractive) { 1054 useInteractive = true; 1055 } 1056 1057 //Mark this as a dependency for the plugin 1058 //resource 1059 this.depMaps.push(moduleMap); 1060 1061 //Support anonymous modules. 1062 context.completeLoad(moduleName); 1063 1064 //Bind the value of that module to the value for this 1065 //resource ID. 1066 localRequire([moduleName], load); 1067 }); 1068 1069 //Use parentName here since the plugin's name is not reliable, 1070 //could be some weird string with no path that actually wants to 1071 //reference the parentName's path. 1072 plugin.load(map.name, localRequire, load, config); 1073 })); 1074 1075 context.enable(pluginMap, this); 1076 this.pluginMaps[pluginMap.id] = pluginMap; 1077 }, 1078 1079 enable: function () { 1080 enabledRegistry[this.map.id] = this; 1081 this.enabled = true; 1082 1083 //Set flag mentioning that the module is enabling, 1084 //so that immediate calls to the defined callbacks 1085 //for dependencies do not trigger inadvertent load 1086 //with the depCount still being zero. 1087 this.enabling = true; 1088 1089 //Enable each dependency 1090 each(this.depMaps, bind(this, function (depMap, i) { 1091 var id, mod, handler; 1092 1093 if (typeof depMap === 'string') { 1094 //Dependency needs to be converted to a depMap 1095 //and wired up to this module. 1096 depMap = makeModuleMap(depMap, 1097 (this.map.isDefine ? this.map : this.map.parentMap), 1098 false, 1099 !this.skipMap); 1100 this.depMaps[i] = depMap; 1101 1102 handler = getOwn(handlers, depMap.id); 1103 1104 if (handler) { 1105 this.depExports[i] = handler(this); 1106 return; 1107 } 1108 1109 this.depCount += 1; 1110 1111 on(depMap, 'defined', bind(this, function (depExports) { 1112
1112this.defineDep(i, depExports); 1113 this.check(); 1114 })); 1115 1116 if (this.errback) { 1117 on(depMap, 'error', bind(this, this.errback)); 1118 } 1119 } 1120 1121 id = depMap.id; 1122 mod = registry[id]; 1123 1124 //Skip special modules like 'require', 'exports', 'module' 1125 //Also, don't call enable if it is already enabled, 1126 //important in circular dependency cases. 1127 if (!hasProp(handlers, id) && mod && !mod.enabled) { 1128 context.enable(depMap, this); 1129 } 1130 })); 1131 1132 //Enable each plugin that is used in
vendor: 35,491 bytes, lines 1133-2004
1133 //a dependency 1134 eachProp(this.pluginMaps, bind(this, function (pluginMap) { 1135 var mod = getOwn(registry, pluginMap.id); 1136 if (mod && !mod.enabled) { 1137 context.enable(pluginMap, this); 1138 } 1139 })); 1140 1141 this.enabling = false; 1142 1143 this.check(); 1144 }, 1145 1146 on: function (name, cb) { 1147 var cbs = this.events[name]; 1148 if (!cbs) { 1149 cbs = this.events[name] = []; 1150 } 1151 cbs.push(cb); 1152 }, 1153 1154 emit: function (name, evt) { 1155 each(this.events[name], function (cb) { 1156 cb(evt); 1157 }); 1158 if (name === 'error') { 1159 //Now that the error handler was triggered, remove 1160 //the listeners, since this broken Module instance 1161 //can stay around for a while in the registry. 1162 delete this.events[name]; 1163 } 1164 } 1165 }; 1166 1167 function callGetModule(args) { 1168 //Skip modules already defined. 1169 if (!hasProp(defined, args[0])) { 1170 getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); 1171 } 1172 } 1173 1174 function removeListener(node, func, name, ieName) { 1175 //Favor detachEvent because of IE9 1176 //issue, see attachEvent/addEventListener comment elsewhere 1177 //in this file. 1178 if (node.detachEvent && !isOpera) { 1179 //Probably IE. If not it will throw an error, which will be 1180 //useful to know. 1181 if (ieName) { 1182 node.detachEvent(ieName, func); 1183 } 1184 } else { 1185 node.removeEventListener(name, func, false); 1186 } 1187 } 1188 1189 /** 1190 * Given an event from a script node, get the requirejs info from it, 1191 * and then removes the event listeners on the node. 1192 * @param {Event} evt 1193 * @returns {Object} 1194 */ 1195 function getScriptData(evt) { 1196 //Using currentTarget instead of target for Firefox 2.0's sake. Not 1197 //all old browsers will be supported, but this one was easy enough 1198 //to support and still makes sense. 1199 var node = evt.currentTarget || evt.srcElement; 1200 1201 //Remove the listeners once here. 1202 removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); 1203 removeListener(node, context.onScriptError, 'error'); 1204 1205 return { 1206 node: node, 1207 id: node && node.getAttribute('data-requiremodule') 1208 }; 1209 } 1210 1211 function intakeDefines() { 1212 var args; 1213 1214 //Any defined modules in the global queue, intake them now. 1215 takeGlobalQueue(); 1216 1217 //Make sure any remaining defQueue items get properly processed. 1218 while (defQueue.length) { 1219 args = defQueue.shift(); 1220 if (args[0] === null) { 1221 return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); 1222 } else { 1223 //args are id, deps, factory. Should be normalized by the 1224 //define() function. 1225 callGetModule(args); 1226 } 1227 } 1228 } 1229 1230 context = { 1231 config: config, 1232 contextName: contextName, 1233 registry: registry, 1234 defined: defined, 1235 urlFetched: urlFetched, 1236 defQueue: defQueue, 1237 Module: Module, 1238 makeModuleMap: makeModuleMap, 1239 nextTick: req.nextTick, 1240 onError: onError, 1241 1242 /** 1243 * Set a configuration for the context. 1244 * @param {Object} cfg config object to integrate. 1245 */ 1246 configure: function (cfg) { 1247 //Make sure the baseUrl ends in a slash. 1248 if (cfg.baseUrl) { 1249 if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { 1250 cfg.baseUrl += '/'; 1251 } 1252 } 1253 1254 //Save off the paths since they require special processing, 1255 //they are additive. 1256 var shim = config.shim, 1257 objs = { 1258 paths: true, 1259 bundles: true, 1260 config: true, 1261 map: true 1262 }; 1263 1264 eachProp(cfg, function (value, prop) { 1265 if (objs[prop]) { 1266 if (!config[prop]) { 1267 config[prop] = {}; 1268 } 1269 mixin(config[prop], value, true, true); 1270 } else { 1271 config[prop] = value; 1272 } 1273 }); 1274 1275 //Reverse map the bundles 1276 if (cfg.bundles) { 1277 eachProp(cfg.bundles, function (value, prop) { 1278 each(value, function (v) { 1279 if (v !== prop) { 1280 bundlesMap[v] = prop; 1281 } 1282 }); 1283 }); 1284 } 1285 1286 //Merge shim 1287 if (cfg.shim) { 1288 eachProp(cfg.shim, function (value, id) { 1289 //Normalize the structure 1290 if (isArray(value)) { 1291 value = { 1292 deps: value 1293 }; 1294 } 1295 if ((value.exports || value.init) && !value.exportsFn) { 1296 value.exportsFn = context.makeShimExports(value); 1297 } 1298 shim[id] = value; 1299 }); 1300 config.shim = shim; 1301 } 1302 1303 //Adjust packages if necessary. 1304 if (cfg.packages) { 1305 each(cfg.packages, function (pkgObj) { 1306 var location, name; 1307 1308 pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; 1309 1310 name = pkgObj.name; 1311 location = pkgObj.location; 1312 if (location) { 1313 config.paths[name] = pkgObj.location; 1314 } 1315 1316 //Save pointer to main module ID for pkg name. 1317 //Remove leading dot in main, so main paths are normalized, 1318 //and remove any trailing .js, since different package 1319 //envs have different conventions: some use a module name, 1320 //some use a file name. 1321 config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') 1322 .replace(currDirRegExp, '') 1323 .replace(jsSuffixRegExp, ''); 1324 }); 1325 } 1326 1327 //If there are any "waiting to execute" modules in the registry, 1328 //update the maps for them, since their info, like URLs to load, 1329 //may have changed. 1330 eachProp(registry, function (mod, id) { 1331 //If module already has init called, since it is too 1332 //late to modify them, and ignore unnormalized ones 1333 //since they are transient. 1334 if (!mod.inited && !mod.map.unnormalized) { 1335 mod.map = makeModuleMap(id); 1336 } 1337 }); 1338 1339 //If a deps array or a config callback is specified, then call 1340 //require with those args. This is useful when require is defined as a 1341 //config object before require.js is loaded. 1342 if (cfg.deps || cfg.callback) { 1343 context.require(cfg.deps || [], cfg.callback); 1344 } 1345 }, 1346 1347 makeShimExports: function (value) { 1348 function fn() { 1349 var ret; 1350 if (value.init) { 1351 ret = value.init.apply(global, arguments); 1352 } 1353 return ret || (value.exports && getGlobal(value.exports)); 1354 } 1355 return fn; 1356 }, 1357 1358 makeRequire: function (relMap, options) { 1359 options = options || {}; 1360 1361 function localRequire(deps, callback, errback) { 1362 var id, map, requireMod; 1363 1364 if (options.enableBuildCallback && callback && isFunction(callback)) { 1365 callback.__requireJsBuild = true; 1366 } 1367 1368 if (typeof deps === 'string') { 1369 if (isFunction(callback)) { 1370 //Invalid call 1371 return onError(makeError('requireargs', 'Invalid require call'), errback); 1372 } 1373 1374 //If require|exports|module are requested, get the 1375 //value for them from the special handlers. Caveat: 1376 //this only works while module is being defined. 1377 if (relMap && hasProp(handlers, deps)) { 1378 return handlers[deps](registry[relMap.id]); 1379 } 1380 1381 //Synchronous access to one module. If require.get is 1382 //available (as in the Node adapter), prefer that. 1383 if (req.get) { 1384 return req.get(context, deps, relMap, localRequire); 1385 } 1386 1387 //Normalize module name, if it contains . or .. 1388 map = makeModuleMap(deps, relMap, false, true); 1389 id = map.id; 1390 1391 if (!hasProp(defined, id)) { 1392 return onError(makeError('notloaded', 'Module name "' + 1393 id + 1394 '" has not been loaded yet for context: ' + 1395 contextName + 1396 (relMap ? '' : '. Use require([])'))); 1397 } 1398 return defined[id]; 1399 } 1400 1401 //Grab defines waiting in the global queue. 1402 intakeDefines(); 1403 1404 //Mark all the dependencies as needing to be loaded. 1405 context.nextTick(function () { 1406 //Some defines could have been added since the 1407 //require call, collect them. 1408 intakeDefines(); 1409 1410 requireMod = getModule(makeModuleMap(null, relMap)); 1411 1412 //Store if map config should be applied to this require 1413 //call for dependencies. 1414 requireMod.skipMap = options.skipMap; 1415 1416 requireMod.init(deps, callback, errback, { 1417 enabled: true 1418 }); 1419 1420 checkLoaded(); 1421 }); 1422 1423 return localRequire; 1424 } 1425 1426 mixin(localRequire, { 1427 isBrowser: isBrowser, 1428 1429 /** 1430 * Converts a module name + .extension into an URL path. 1431 * *Requires* the use of a module name. It does not support using 1432 * plain URLs like nameToUrl. 1433 */ 1434 toUrl: function (moduleNamePlusExt) { 1435 var ext, 1436 index = moduleNamePlusExt.lastIndexOf('.'), 1437 segment = moduleNamePlusExt.split('/')[0], 1438 isRelative = segment === '.' || segment === '..'; 1439 1440 //Have a file extension alias, and it is not the 1441 //dots from a relative path. 1442 if (index !== -1 && (!isRelative || index > 1)) { 1443 ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); 1444 moduleNamePlusExt = moduleNamePlusExt.substring(0, index); 1445 } 1446 1447 return context.nameToUrl(normalize(moduleNamePlusExt, 1448 relMap && relMap.id, true), ext, true); 1449 }, 1450 1451 defined: function (id) { 1452 return hasProp(defined, makeModuleMap(id, relMap, false, true).id); 1453 }, 1454 1455 specified: function (id) { 1456 id = makeModuleMap(id, relMap, false, true).id; 1457 return hasProp(defined, id) || hasProp(registry, id); 1458 } 1459 }); 1460 1461 //Only allow undef on top level require calls 1462 if (!relMap) { 1463 localRequire.undef = function (id) { 1464 //Bind any waiting define() calls to this context, 1465 //fix for #408 1466 takeGlobalQueue(); 1467 1468 var map = makeModuleMap(id, relMap, true), 1469 mod = getOwn(registry, id); 1470 1471 removeScript(id); 1472 1473 delete defined[id]; 1474 delete urlFetched[map.url]; 1475 delete undefEvents[id]; 1476 1477 //Clean queued defines too. Go backwards 1478 //in array so that the splices do not 1479 //mess up the iteration. 1480 eachReverse(defQueue, function(args, i) { 1481 if(args[0] === id) { 1482 defQueue.splice(i, 1); 1483 } 1484 }); 1485 1486 if (mod) { 1487 //Hold on to listeners in case the 1488 //module will be attempted to be reloaded 1489 //using a different config. 1490 if (mod.events.defined) { 1491 undefEvents[id] = mod.events; 1492 } 1493 1494 cleanRegistry(id); 1495 } 1496 }; 1497 } 1498 1499 return localRequire; 1500 }, 1501 1502 /** 1503 * Called to enable a module if it is still in the registry 1504 * awaiting enablement. A second arg, parent, the parent module, 1505 * is passed in for context, when this method is overridden by 1506 * the optimizer. Not shown here to keep code compact. 1507 */ 1508 enable: function (depMap) { 1509 var mod = getOwn(registry, depMap.id); 1510 if (mod) { 1511 getModule(depMap).enable(); 1512 } 1513 }, 1514 1515 /** 1516 * Internal method used by environment adapters to complete a load event. 1517 * A load event could be a script load or just a load pass from a synchronous 1518 * load call. 1519 * @param {String} moduleName the name of the module to potentially complete. 1520 */ 1521 completeLoad: function (moduleName) { 1522 var found, args, mod, 1523 shim = getOwn(config.shim, moduleName) || {}, 1524 shExports = shim.exports; 1525 1526 takeGlobalQueue(); 1527 1528 while (defQueue.length) { 1529 args = defQueue.shift(); 1530 if (args[0] === null) { 1531 args[0] = moduleName; 1532 //If already found an anonymous module and bound it 1533 //to this name, then this is some other anon module 1534 //waiting for its completeLoad to fire. 1535 if (found) { 1536 break; 1537 } 1538 found = true; 1539 } else if (args[0] === moduleName) { 1540 //Found matching define call for this script! 1541 found = true; 1542 } 1543 1544 callGetModule(args); 1545 } 1546 1547 //Do this after the cycle of callGetModule in case the result 1548 //of those calls/init calls changes the registry. 1549 mod = getOwn(registry, moduleName); 1550 1551 if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { 1552 if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { 1553 if (hasPathFallback(moduleName)) { 1554 return; 1555 } else { 1556 return onError(makeError('nodefine', 1557 'No define call for ' + moduleName, 1558 null, 1559 [moduleName])); 1560 } 1561 } else { 1562 //A script that does not call define(), so just simulate 1563 //the call for it. 1564 callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); 1565 } 1566 } 1567 1568 checkLoaded(); 1569 }, 1570 1571 /** 1572 * Converts a module name to a file path. Supports cases where 1573 * moduleName may actually be just an URL. 1574 * Note that it **does not** call normalize on the moduleName, 1575 * it is assumed to have already been normalized. This is an 1576 * internal API, not a public one. Use toUrl for the public API. 1577 */ 1578 nameToUrl: function (moduleName, ext, skipExt) { 1579 var paths, syms, i, parentModule, url, 1580 parentPath, bundleId, 1581 pkgMain = getOwn(config.pkgs, moduleName); 1582 1583 if (pkgMain) { 1584 moduleName = pkgMain; 1585 } 1586 1587 bundleId = getOwn(bundlesMap, moduleName); 1588 1589 if (bundleId) { 1590 return context.nameToUrl(bundleId, ext, skipExt); 1591 } 1592 1593 //If a colon is in the URL, it indicates a protocol is used and it is just 1594 //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) 1595 //or ends with .js, then assume the user meant to use an url and not a module id. 1596 //The slash is important for protocol-less URLs as well as full paths. 1597 if (req.jsExtRegExp.test(moduleName)) { 1598 //Just a plain path, not module name lookup, so just return it. 1599 //Add extension if it is included. This is a bit wonky, only non-.js things pass 1600 //an extension, this method probably needs to be reworked. 1601 url = moduleName + (ext || ''); 1602 } else { 1603 //A module that needs to be converted to a path. 1604 paths = config.paths; 1605 1606 syms = moduleName.split('/'); 1607 //For each module name segment, see if there is a path 1608 //registered for it. Start with most specific name 1609 //and work up from it. 1610 for (i = syms.length; i > 0; i -= 1) { 1611 parentModule = syms.slice(0, i).join('/'); 1612 1613 parentPath = getOwn(paths, parentModule); 1614 if (parentPath) { 1615 //If an array, it means there are a few choices, 1616 //Choose the one that is desired 1617 if (isArray(parentPath)) { 1618 parentPath = parentPath[0]; 1619 } 1620 syms.splice(0, i, parentPath); 1621 break; 1622 } 1623 } 1624 1625 //Join the path parts together, then figure out if baseUrl is needed. 1626 url = syms.join('/'); 1627 url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); 1628 url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; 1629 } 1630 1631 return config.urlArgs ? url + 1632 ((url.indexOf('?') === -1 ? '?' : '&') + 1633 config.urlArgs) : url; 1634 }, 1635 1636 //Delegates to req.load. Broken out as a separate function to 1637 //allow overriding in the optimizer. 1638 load: function (id, url) { 1639 req.load(context, id, url); 1640 }, 1641 1642 /** 1643 * Executes a module callback function. Broken out as a separate function 1644 * solely to allow the build system to sequence the files in the built 1645 * layer in the right sequence. 1646 * 1647 * @private 1648 */ 1649 execCb: function (name, callback, args, exports) { 1650 return callback.apply(exports, args); 1651 }, 1652 1653 /** 1654 * callback for script loads, used to check status of loading. 1655 * 1656 * @param {Event} evt the event from the browser for the script 1657 * that was loaded. 1658 */ 1659 onScriptLoad: function (evt) { 1660 //Using currentTarget instead of target for Firefox 2.0's sake. Not 1661 //all old browsers will be supported, but this one was easy enough 1662 //to support and still makes sense. 1663 if (evt.type === 'load' || 1664 (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { 1665 //Reset interactive script so a script node is not held onto for 1666 //to long. 1667 interactiveScript = null; 1668 1669 //Pull out the name of the module and the context. 1670 var data = getScriptData(evt); 1671 context.completeLoad(data.id); 1672 } 1673 }, 1674 1675 /** 1676 * Callback for script errors. 1677 */ 1678 onScriptError: function (evt) { 1679 var data = getScriptData(evt); 1680 if (!hasPathFallback(data.id)) { 1681 return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); 1682 } 1683 } 1684 }; 1685 1686 context.require = context.makeRequire(); 1687 return context; 1688 } 1689 1690 /** 1691 * Main entry point. 1692 * 1693 * If the only argument to require is a string, then the module that 1694 * is represented by that string is fetched for the appropriate context. 1695 * 1696 * If the first argument is an array, then it will be treated as an array 1697 * of dependency string names to fetch. An optional function callback can 1698 * be specified to execute when all of those dependencies are available. 1699 * 1700 * Make a local req variable to help Caja compliance (it assumes things 1701 * on a require that are not standardized), and to give a short 1702 * name for minification/local scope use. 1703 */ 1704 req = requirejs = function (deps, callback, errback, optional) { 1705 1706 //Find the right context, use default 1707 var context, config, 1708 contextName = defContextName; 1709 1710 // Determine if have config object in the call. 1711 if (!isArray(deps) && typeof deps !== 'string') { 1712 // deps is a config object 1713 config = deps; 1714 if (isArray(callback)) { 1715 // Adjust args if there are dependencies 1716 deps = callback; 1717 callback = errback; 1718 errback = optional; 1719 } else { 1720 deps = []; 1721 } 1722 } 1723 1724 if (config && config.context) { 1725 contextName = config.context; 1726 } 1727 1728 context = getOwn(contexts, contextName); 1729 if (!context) { 1730 context = contexts[contextName] = req.s.newContext(contextName); 1731 } 1732 1733 if (config) { 1734 context.configure(config); 1735 } 1736 1737 return context.require(deps, callback, errback); 1738 }; 1739 1740 /** 1741 * Support require.config() to make it easier to cooperate with other 1742 * AMD loaders on globally agreed names. 1743 */ 1744 req.config = function (config) { 1745 return req(config); 1746 }; 1747 1748 /** 1749 * Execute something after the current tick 1750 * of the event loop. Override for other envs 1751 * that have a better solution than setTimeout. 1752 * @param {Function} fn function to execute later. 1753 */ 1754 req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { 1755 setTimeout(fn, 4); 1756 } : function (fn) { fn(); }; 1757 1758 /** 1759 * Export require as a global, but only if it does not already exist. 1760 */ 1761 if (!require) { 1762 require = req; 1763 } 1764 1765 req.version = version; 1766 1767 //Used to filter out dependencies that are already paths. 1768 req.jsExtRegExp = /^\/|:|\?|\.js$/; 1769 req.isBrowser = isBrowser; 1770 s = req.s = { 1771 contexts: contexts, 1772 newContext: newContext 1773 }; 1774 1775 //Create default context. 1776 req({}); 1777 1778 //Exports some context-sensitive methods on global require. 1779 each([ 1780 'toUrl', 1781 'undef', 1782 'defined', 1783 'specified' 1784 ], function (prop) { 1785 //Reference from contexts instead of early binding to default context, 1786 //so that during builds, the latest instance of the default context 1787 //with its config gets used. 1788 req[prop] = function () { 1789 var ctx = contexts[defContextName]; 1790 return ctx.require[prop].apply(ctx, arguments); 1791 }; 1792 }); 1793 1794 if (isBrowser) { 1795 head = s.head = document.getElementsByTagName('head')[0]; 1796 //If BASE tag is in play, using appendChild is a problem for IE6. 1797 //When that browser dies, this can be removed. Details in this jQuery bug: 1798 //http://dev.jquery.com/ticket/2709 1799 baseElement = document.getElementsByTagName('base')[0]; 1800 if (baseElement) { 1801 head = s.head = baseElement.parentNode; 1802 } 1803 } 1804 1805 /** 1806 * Any errors that require explicitly generates will be passed to this 1807 * function. Intercept/override it if you want custom error handling. 1808 * @param {Error} err the error object. 1809 */ 1810 req.onError = defaultOnError; 1811 1812 /** 1813 * Creates the node for the load command. Only used in browser envs. 1814 */ 1815 req.createNode = function (config, moduleName, url) { 1816 var node = config.xhtml ? 1817 document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : 1818 document.createElement('script'); 1819 node.type = config.scriptType || 'text/javascript'; 1820 node.charset = 'utf-8'; 1821 node.async = true; 1822 return node; 1823 }; 1824 1825 /** 1826 * Does the request to load a module for the browser case. 1827 * Make this a separate function to allow other environments 1828 * to override it. 1829 * 1830 * @param {Object} context the require context to find state. 1831 * @param {String} moduleName the name of the module. 1832 * @param {Object} url the URL to the module. 1833 */ 1834 req.load = function (context, moduleName, url) { 1835 var config = (context && context.config) || {}, 1836 node; 1837 if (isBrowser) { 1838 //In the browser so use a script tag 1839 node = req.createNode(config, moduleName, url); 1840 1841 node.setAttribute('data-requirecontext', context.contextName); 1842 node.setAttribute('data-requiremodule', moduleName); 1843 1844 //Set up load listener. Test attachEvent first because IE9 has 1845 //a subtle issue in its addEventListener and script onload firings 1846 //that do not match the behavior of all other browsers with 1847 //addEventListener support, which fire the onload event for a 1848 //script right after the script execution. See: 1849 //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution 1850 //UNFORTUNATELY Opera implements attachEvent but does not follow the script 1851 //script execution mode. 1852 if (node.attachEvent && 1853 //Check if node.attachEvent is artificially added by custom script or 1854 //natively supported by browser 1855 //read https://github.com/jrburke/requirejs/issues/187 1856 //if we can NOT find [native code] then it must NOT natively supported. 1857 //in IE8, node.attachEvent does not have toString() 1858 //Note the test for "[native code" with no closing brace, see: 1859 //https://github.com/jrburke/requirejs/issues/273 1860 !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && 1861 !isOpera) { 1862 //Probably IE. IE (at least 6-8) do not fire 1863 //script onload right after executing the script, so 1864 //we cannot tie the anonymous define call to a name. 1865 //However, IE reports the script as being in 'interactive' 1866 //readyState at the time of the define call. 1867 useInteractive = true; 1868 1869 node.attachEvent('onreadystatechange', context.onScriptLoad); 1870 //It would be great to add an error handler here to catch 1871 //404s in IE9+. However, onreadystatechange will fire before 1872 //the error handler, so that does not help. If addEventListener 1873 //is used, then IE will fire error before load, but we cannot 1874 //use that pathway given the connect.microsoft.com issue 1875 //mentioned above about not doing the 'script execute, 1876 //then fire the script load event listener before execute 1877 //next script' that other browsers do. 1878 //Best hope: IE10 fixes the issues, 1879 //and then destroys all installs of IE 6-9. 1880 //node.attachEvent('onerror', context.onScriptError); 1881 } else { 1882 node.addEventListener('load', context.onScriptLoad, false); 1883 node.addEventListener('error', context.onScriptError, false); 1884 } 1885 node.src = url; 1886 1887 //For some cache cases in IE 6-8, the script executes before the end 1888 //of the appendChild execution, so to tie an anonymous define 1889 //call to the module name (which is stored on the node), hold on 1890 //to a reference to this node, but clear after the DOM insertion. 1891 currentlyAddingScript = node; 1892 if (baseElement) { 1893 head.insertBefore(node, baseElement); 1894 } else { 1895 head.appendChild(node); 1896 } 1897 currentlyAddingScript = null; 1898 1899 return node; 1900 } else if (isWebWorker) { 1901 try { 1902 //In a web worker, use importScripts. This is not a very 1903 //efficient use of importScripts, importScripts will block until 1904 //its script is downloaded and evaluated. However, if web workers 1905 //are in play, the expectation that a build has been done so that 1906 //only one script needs to be loaded anyway. This may need to be 1907 //reevaluated if other use cases become common. 1908 importScripts(url); 1909 1910 //Account for anonymous modules 1911 context.completeLoad(moduleName); 1912 } catch (e) { 1913 context.onError(makeError('importscripts', 1914 'importScripts failed for ' + 1915 moduleName + ' at ' + url, 1916 e, 1917 [moduleName])); 1918 } 1919 } 1920 }; 1921 1922 function getInteractiveScript() { 1923 if (interactiveScript && interactiveScript.readyState === 'interactive') { 1924 return interactiveScript; 1925 } 1926 1927 eachReverse(scripts(), function (script) { 1928 if (script.readyState === 'interactive') { 1929 return (interactiveScript = script); 1930 } 1931 }); 1932 return interactiveScript; 1933 } 1934 1935 //Look for a data-main script attribute, which could also adjust the baseUrl. 1936 if (isBrowser && !cfg.skipDataMain) { 1937 //Figure out baseUrl. Get it from the script tag with require.js in it. 1938 eachReverse(scripts(), function (script) { 1939 //Set the 'head' where we can append children by 1940 //using the script's parent. 1941 if (!head) { 1942 head = script.parentNode; 1943 } 1944 1945 //Look for a data-main attribute to set main script for the page 1946 //to load. If it is there, the path to data main becomes the 1947 //baseUrl, if it is not already set. 1948 dataMain = script.getAttribute('data-main'); 1949 if (dataMain) { 1950 //Preserve dataMain in case it is a path (i.e. contains '?') 1951 mainScript = dataMain; 1952 1953 //Set final baseUrl if there is not already an explicit one. 1954 if (!cfg.baseUrl) { 1955 //Pull off the directory of data-main for use as the 1956 //baseUrl. 1957 src = mainScript.split('/'); 1958 mainScript = src.pop(); 1959 subPath = src.length ? src.join('/') + '/' : './'; 1960 1961 cfg.baseUrl = subPath; 1962 } 1963 1964 //Strip off any trailing .js since mainScript is now 1965 //like a module name. 1966 mainScript = mainScript.replace(jsSuffixRegExp, ''); 1967 1968 //If mainScript is still a path, fall back to dataMain 1969 if (req.jsExtRegExp.test(mainScript)) { 1970 mainScript = dataMain; 1971 } 1972 1973 //Put the data-main script in the files to load. 1974 cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; 1975 1976 return true; 1977 } 1978 }); 1979 } 1980 1981 /** 1982 * The function that handles definitions of modules. Differs from 1983 * require() in that a string for the module should be the first argument, 1984 * and the function to execute after dependencies are loaded should 1985 * return a value to define the module corresponding to the first argument's 1986 * name. 1987 */ 1988 define = function (name, deps, callback) { 1989 var node, context; 1990 1991 //Allow for anonymous modules 1992 if (typeof name !== 'string') { 1993 //Adjust args appropriately 1994 callback = deps; 1995 deps = name; 1996 name = null; 1997 } 1998 1999 //This module may not have dependencies 2000 if (!isArray(deps)) { 2001 callback = deps; 2002 deps = null; 2003 } 2004
2005 //If no name, and callback is a function, then figure out if it a 2006 //CommonJS thing with dependencies. 2007 if (!deps && isFunction(callback)) { 2008 deps = []; 2009 //Remove comments from the callback string, 2010 //look for require calls, and pull them into the dependencies, 2011 //but only if there are function args. 2012 if (callback.length) { 2013 callback 2014 .toString() 2015 .replace(commentRegExp, '') 2016 .replace(cjsRequireRegExp, function (match, dep) { 2017 deps.push(dep); 2018 }); 2019 2020 //May be a CommonJS thing even without require calls, but still 2021 //could use exports, and module. Avoid doing exports and module 2022 //work though if it just needs require. 2023 //REQUIRES the function to expect the CommonJS variables in the 2024 //order listed below. 2025 deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); 2026 } 2027 } 2028 2029 //If in IE 6-8 and hit an anonymous define() call, do the interactive 2030 //work. 2031 if (useInteractive) { 2032 node = currentlyAddingScript || getInteractiveScript(); 2033 if (node) { 2034 if (!name) { 2035 name = node.getAttribute('data-requiremodule'); 2036 } 2037 context = contexts[node.getAttribute('data-requirecontext')]; 2038 } 2039 } 2040 2041 //Always save off evaluating the def call until the script onload handler. 2042 //This allows multiple modules to be in a file without prematurely 2043 //tracing dependencies, and allows for anonymous module support, 2044 //where the module name is not known until the script onload event 2045 //occurs. If no context, use the global queue, and get it processed 2046 //in the onscript load callback. 2047 (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); 2048 }; 2049 2050 define.amd = { 2051 jQuery: true 2052 }; 2053 2054 2055 /** 2056 * Executes the text. Normally just uses eval, but can be modified 2057 * to use a better, environment-specific call. Only used for transpiling 2058 * loader plugins, not for plain JS modules. 2059 * @param {String} text the text to execute/evaluate. 2060 */ 2061 req.exec = function (text) { 2062 /*jslint evil: true */ 2063 return eval(text); 2064 }; 2065 2066 //Set up with config info. 2067 req(cfg); 2068}(this));;//disable mixins 2069window.amasty_checkout_disabled = true;;/** 2070 * Copyright © Magento, Inc. All rights reserved. 2071 * See COPYING.txt for license details. 2072 */ 2073define('mixins', [ 2074 'module' 2075], function (module) { 2076 'use strict'; 2077 2078 var contexts = require.s.contexts, 2079 defContextName = '_', 2080 defContext = contexts[defContextName], 2081 unbundledContext = require.s.newContext('$'), 2082 defaultConfig = defContext.config, 2083 unbundledConfig = { 2084 baseUrl: defaultConfig.baseUrl, 2085 paths: defaultConfig.paths, 2086 shim: defaultConfig.shim, 2087 config: defaultConfig.config, 2088 map: defaultConfig.map 2089 }, 2090 rjsMixins; 2091 2092 /** 2093 * Prepare a separate context where modules are not assigned to bundles 2094 * so we are able to get their true path and corresponding mixins. 2095 */ 2096 unbundledContext.configure(unbundledConfig); 2097 2098 /** 2099 * Checks if specified string contains 2100 * a plugin spacer '!' substring. 2101 * 2102 * @param {String} name - Name, path or alias of a module. 2103 * @returns {Boolean} 2104 */ 2105 function hasPlugin(name) { 2106 return !!~name.indexOf('!'); 2107 } 2108 2109 /** 2110 * Adds 'mixins!' prefix to the specified string. 2111 * 2112 * @param {String} name - Name, path or alias of a module. 2113 * @returns {String} Modified name. 2114 */ 2115 function addPlugin(name) { 2116 return 'mixins!' + name; 2117 } 2118 2119 /** 2120 * Removes base url from the provided string. 2121 * 2122 * @param {String} url - Url to be processed. 2123 * @param {Object} config - Contexts' configuration object. 2124 * @returns {String} String without base url. 2125 */ 2126 function removeBaseUrl(url, config) { 2127 var baseUrl = config.baseUrl || '', 2128 index = url.indexOf(baseUrl); 2129 2130 if (~index) { 2131 url = url.substring(baseUrl.length - index); 2132 } 2133 2134 return url; 2135 } 2136 2137 /** 2138 * Extracts url (without baseUrl prefix) 2139 * from a module name ignoring the fact that it may be bundled. 2140 * 2141 * @param {String} name - Name, path or alias of a module. 2142 * @param {Object} config - Context's configuration. 2143 * @returns {String} 2144 */ 2145 function getPath(name, config) { 2146 var url = unbundledContext.require.toUrl(name); 2147 2148 return removeBaseUrl(url, config); 2149 } 2150 2151 /** 2152 * Checks if specified string represents a relative path (../). 2153 * 2154 * @param {String} name - Name, path or alias of a module. 2155 * @returns {Boolean} 2156 */ 2157 function isRelative(name) { 2158 return !!~name.indexOf('./'); 2159 } 2160 2161 /** 2162 * Iteratively calls mixins passing to them 2163 * current value of a 'target' parameter. 2164 * 2165 * @param {*} target - Value to be modified. 2166 * @param {...Function} mixins - List of mixins to apply. 2167 * @returns {*} Modified 'target' value. 2168 */ 2169 function applyMixins(target) { 2170 var mixins = Array.prototype.slice.call(arguments, 1); 2171 2172 mixins.forEach(function (mixin) { 2173 target = mixin(target); 2174 }); 2175 2176 return target; 2177 } 2178 2179 rjsMixins = { 2180 2181 /** 2182 * Loads specified module along with its' mixins. 2183 * This method is called for each module defined with "mixins!" prefix 2184 * in its name that was added by processNames method. 2185 * 2186 * @param {String} name - Module to be loaded. 2187 * @param {Function} req - Local "require" function to use to load other modules. 2188 * @param {Function} onLoad - A function to call with the value for name. 2189 * @param {Object} config - RequireJS configuration object. 2190 */ 2191 load: function (name, req, onLoad, config) { 2192 var path = getPath(name, config), 2193 mixins = this.getMixins(path), 2194 deps = [name].concat(mixins); 2195 2196 req(deps, function () { 2197 onLoad(applyMixins.apply(null, arguments)); 2198 }); 2199 }, 2200 2201 /** 2202 * Retrieves list of mixins associated with a specified module. 2203 * 2204 * @param {String} path - Path to the module (without base URL). 2205 * @returns {Array} An array of paths to mixins. 2206 */ 2207 getMixins: function (path) { 2208 var config = module.config() || {}, 2209 mixins; 2210 2211 // Fix for when urlArgs is set. 2212 if (path.indexOf('?') !== -1) { 2213 path = path.substring(0, path.indexOf('?')); 2214 } 2215 mixins = config[path] || {}; 2216 2217 return Object.keys(mixins).filter(function (mixin) { 2218 return mixins[mixin] !== false; 2219 }); 2220 }, 2221 2222 /** 2223 * Checks if specified module has associated with it mixins. 2224 * 2225 * @param {String} path - Path to the module (without base URL). 2226 * @returns {Boolean} 2227 */ 2228 hasMixins: function (path) { 2229 return this.getMixins(path).length; 2230 }, 2231 2232 /** 2233 * Modifies provided names prepending to them 2234 * the 'mixins!' plugin prefix if it's necessary. 2235 * 2236 * @param {(Array|String)} names - Module names, paths or aliases. 2237 * @param {Object} context - Current RequireJS context. 2238 * @returns {Array|String} 2239 */ 2240 processNames: function (names, context) { 2241 var config = context.config; 2242 2243 /** 2244 * Prepends 'mixin' plugin to a single name. 2245 * 2246 * @param {String} name 2247 * @returns {String} 2248 */ 2249 function processName(name) { 2250 var path = getPath(name, config); 2251 2252 if (!hasPlugin(name) && (isRelative(name) || rjsMixins.hasMixins(path))
2252) { 2253 return addPlugin(name); 2254 } 2255 2256 return name; 2257 } 2258 2259 return typeof names !== 'string' ? 2260 names.map(processName) : 2261 processName(names); 2262 } 2263 }; 2264 2265 return rjsMixins; 2266}); 2267 2268require([ 2269 'mixins' 2270], function (mixins) { 2271 'use strict'; 2272 2273 var contexts = require.s.contexts, 2274 defContextName = '_', 2275 defContext = contexts[defContextName], 2276 originalContextRequire = defContext.require, 2277 processNames = mixins.processNames; 2278 2279 /** 2280 * Wrap default context's require function which gets called every time 2281 * module is requested using require call. The upside of this approach 2282 * is that deps parameter is already normalized and guaranteed to be an array. 2283 */ 2284 defContext.require = function (deps, callback, errback) { 2285 deps = processNames(deps, defContext); 2286 2287 return originalContextRequire(deps, callback, errback); 2288 }; 2289 2290 /** 2291 * Copy properties of original 'require' method. 2292 */ 2293 Object.keys(originalContextRequire).forEach(function (key) { 2294 defContext.require[key] = originalContextRequire[key]; 2295 }); 2296 2297 /** 2298 * Wrap shift method from context's definitions queue. 2299 * Items are added to the queue when a new module is defined and taken 2300 * from it every time require call happens. 2301 */ 2302 defContext.defQueue.shift = function () { 2303 var queueItem = Array.prototype.shift.call(this), 2304 lastDeps = queueItem && queueItem[1]; 2305 2306 if (Array.isArray(lastDeps)) { 2307 queueItem[1] = processNames(queueItem[1], defContext); 2308 } 2309 2310 return queueItem; 2311 }; 2312}); 2313;(function(require){ 2314(function() { 2315/** 2316 * Copyright © Magento, Inc. All rights reserved. 2317 * See COPYING.txt for license details. 2318 */ 2319 2320var config = { 2321 map: { 2322 '*': { 2323 'rowBuilder': 'Magento_Theme/js/row-builder', 2324 'toggleAdvanced': 'mage/toggle', 2325 'translateInline': 'mage/translate-inline', 2326 'sticky': 'mage/sticky', 2327 'tabs': 'mage/tabs', 2328 'zoom': 'mage/zoom', 2329 'collapsible': 'mage/collapsible', 2330 'dropdownDialog': 'mage/dropdown', 2331 'dropdown': 'mage/dropdowns', 2332 'accordion': 'mage/accordion', 2333 'loader': 'mage/loader', 2334 'tooltip': 'mage/tooltip', 2335 'deletableItem': 'mage/deletable-item', 2336 'itemTable': 'mage/item-table', 2337 'fieldsetControls': 'mage/fieldset-controls', 2338 'fieldsetResetControl': 'mage/fieldset-controls', 2339 'redirectUrl': 'mage/redirect-url', 2340 'loaderAjax': 'mage/loader', 2341 'menu': 'mage/menu', 2342 'popupWindow': 'mage/popup-window', 2343 'validation': 'mage/validation/validation', 2344 'breadcrumbs': 'Magento_Theme/js/view/breadcrumbs', 2345 'jquery/ui': 'jquery/compat', 2346 'cookieStatus': 'Magento_Theme/js/cookie-status' 2347 } 2348 }, 2349 deps: [ 2350 'jquery/jquery.mobile.custom', 2351 'mage/common', 2352 'mage/dataPost', 2353 'mage/bootstrap' 2354 ], 2355 config: { 2356 mixins: { 2357 'Magento_Theme/js/view/breadcrumbs': { 2358 'Magento_Theme/js/view/add-home-breadcrumb': true 2359 }, 2360 'jquery/ui-modules/dialog': { 2361 'jquery/patches/jquery-ui': true 2362 } 2363 } 2364 } 2365}; 2366 2367/* eslint-disable max-depth */ 2368/** 2369 * Adds polyfills only for browser contexts which prevents bundlers from including them. 2370 */ 2371if (typeof window !== 'undefined' && window.document) { 2372 /** 2373 * Polyfill localStorage and sessionStorage for browsers that do not support them. 2374 */ 2375 try { 2376 if (!window.localStorage || !window.sessionStorage) { 2377 throw new Error(); 2378 } 2379 2380 localStorage.setItem('storage_test', 1); 2381 localStorage.removeItem('storage_test'); 2382 } catch (e) {
2383 config.deps.push('mage/polyfill'); 2384 } 2385} 2386/* eslint-enable max-depth */ 2387 2388require.config(config); 2389})(); 2390(function() { 2391/** 2392 * Copyright © Magento, Inc. All rights reserved. 2393 * See COPYING.txt for license details. 2394 */ 2395 2396var config = { 2397 waitSeconds: 0, 2398 map: { 2399 '*': { 2400 'ko': 'knockoutjs/knockout', 2401 'knockout': 'knockoutjs/knockout', 2402 'mageUtils': 'mage/utils/main', 2403 'rjsResolver': 'mage/requirejs/resolver' 2404 } 2405 }, 2406 shim: { 2407 'jquery/jquery-migrate': ['jquery'], 2408 'jquery/jstree/jquery.hotkeys': ['jquery'], 2409 'jquery/hover-intent': ['jquery'], 2410 'mage/adminhtml/backup': ['prototype'], 2411 'mage/captcha': ['prototype'], 2412 'mage/new-gallery': ['jquery'], 2413 'mage/webapi': ['jquery'], 2414 'jquery/ui': ['jquery'], 2415 'MutationObserver': ['es6-collections'], 2416 'matchMedia': { 2417 'exports': 'mediaCheck' 2418 }, 2419 'magnifier/magnifier': ['jquery'] 2420 }, 2421 paths: { 2422 'jquery/validate': 'jquery/jquery.validate', 2423 'jquery/hover-intent': 'jquery/jquery.hoverIntent', 2424 'jquery/file-uploader': 'jquery/fileUploader/jquery.fileuploader', 2425 'prototype': 'legacy-build.min', 2426 'jquery/jquery-storageapi': 'jquery/jquery.storageapi.min', 2427 'text': 'mage/requirejs/text', 2428 'domReady': 'requirejs/domReady', 2429 'spectrum': 'jquery/spectrum/spectrum', 2430 'tinycolor': 'jquery/spectrum/tinycolor', 2431 'jquery-ui-modules': 'jquery/ui-modules' 2432 }, 2433 deps: [ 2434 'jquery/jquery-migrate' 2435 ], 2436 config: { 2437 mixins: { 2438 'jquery/jstree/jquery.jstree': { 2439 'mage/backend/jstree-mixin': true 2440 }, 2441 'jquery': { 2442 'jquery/patches/jquery': true 2443 } 2444 }, 2445 text: { 2446 'headers': { 2447 'X-Requested-With': 'XMLHttpRequest' 2448 } 2449 } 2450 } 2451}; 2452 2453require(['jquery'], function ($) { 2454 'use strict'; 2455 2456 $.noConflict(); 2457}); 2458 2459require.config(config); 2460})(); 2461(function() { 2462/** 2463 * Copyright © Magento, Inc. All rights reserved. 2464 * See COPYING.txt for license details. 2465 */ 2466 2467var config = { 2468 map: { 2469 '*': { 2470 quickSearch: 'Magento_Search/js/form-mini', 2471 'Magento_Search/form-mini': 'Magento_Search/js/form-mini' 2472 } 2473 } 2474}; 2475 2476require.config(config); 2477})(); 2478(function() { 2479/** 2480 * Copyright © Magento, Inc. All rights reserved. 2481 * See COPYING.txt for license details. 2482 */ 2483 2484var config = { 2485 map: { 2486 '*': { 2487 checkoutBalance: 'Magento_Customer/js/checkout-balance', 2488 address: 'Magento_Customer/js/address', 2489 changeEmailPassword: 'Magento_Customer/js/change-email-password', 2490 passwordStrengthIndicator: 'Magento_Customer/js/password-strength-indicator', 2491 zxcvbn: 'Magento_Customer/js/zxcvbn', 2492 addressValidation: 'Magento_Customer/js/addressValidation', 2493 showPassword: 'Magento_Customer/js/show-password', 2494 'Magento_Customer/address': 'Magento_Customer/js/address', 2495 'Magento_Customer/change-email-password': 'Magento_Customer/js/change-email-password' 2496 } 2497 } 2498}; 2499 2500require.config(config); 2501})(); 2502(function() { 2503/** 2504 * Copyright © Magento, Inc. All rights reserved. 2505 * See COPYING.txt for license details. 2506 */ 2507 2508var config = { 2509 map: { 2510 '*': { 2511 escaper: 'Magento_Security/js/escaper' 2512 } 2513 } 2514}; 2515 2516require.config(config); 2517})(); 2518(function() { 2519/** 2520 * Copyright © Magento, Inc. All rights reserved. 2521 * See COPYING.txt for license details. 2522 */ 2523 2524var config = { 2525 map: { 2526 '*': { 2527 compareList: 'Magento_Catalog/js/list', 2528 relatedProducts: 'Magento_Catalog/js/related-products', 2529 upsellProducts: 'Magento_Catalog/js/upsell-products', 2530 productListToolbarForm: 'Magento_Catalog/js/product/list/toolbar', 2531 catalogGallery: 'Magento_Catalog/js/gallery', 2532 catalogAddToCart: 'Magento_Catalog/js/catalog-add-to-cart' 2533 } 2534 }, 2535 config: { 2536 mixins: { 2537 'Magento_Theme/js/view/breadcrumbs': { 2538 'Magento_Catalog/js/product/breadcrumbs': true 2539 } 2540 } 2541 } 2542}; 2543 2544require.config(config); 2545})(); 2546(function() { 2547/** 2548 * Copyright © Magento, Inc. All rights reserved. 2549 * See COPYING.txt for license details. 2550 */ 2551 2552var config = { 2553 map: { 2554 '*': { 2555 priceBox: 'Magento_Catalog/js/price-box', 2556 priceOptionDate: 'Magento_Catalog/js/price-option-date', 2557 priceOptionFile: 'Magento_Catalog/js/price-option-file', 2558 priceOptions: 'Magento_Catalog/js/price-options', 2559 priceUtils: 'Magento_Catalog/js/price-utils' 2560 } 2561 } 2562}; 2563 2564require.config(config); 2565})(); 2566(function() { 2567/** 2568 * Copyright © Magento, Inc. All rights reserved. 2569 * See COPYING.txt for license details. 2570 */ 2571 2572var config = { 2573 map: { 2574 '*': { 2575 addToCart: 'Magento_Msrp/js/msrp' 2576 } 2577 } 2578}; 2579 2580require.config(config); 2581})(); 2582(function() { 2583/** 2584 * Copyright © Magento, Inc. All rights reserved. 2585 * See COPYING.txt for license details. 2586 */ 2587 2588var config = { 2589 map: { 2590 '*': { 2591 catalogSearch: 'Magento_CatalogSearch/form-mini' 2592 } 2593 } 2594}; 2595 2596require.config(config); 2597})(); 2598(function() { 2599/** 2600 * Copyright © Magento, Inc. All rights reserved. 2601 * See COPYING.txt for license details. 2602 */ 2603 2604var config = { 2605 map: { 2606 '*': { 2607 creditCardType: 'Magento_Payment/js/cc-type', 2608 'Magento_Payment/cc-type': 'Magento_Payment/js/cc-type' 2609 } 2610 } 2611}; 2612 2613require.config(config); 2614})(); 2615(function() { 2616/** 2617 * Copyright © Magento, Inc. All rights reserved. 2618 * See COPYING.txt for license details. 2619 */ 2620 2621var config = { 2622 map: { 2623 '*': { 2624 giftMessage: 'Magento_Sales/js/gift-message', 2625 ordersReturns: 'Magento_Sales/js/orders-returns', 2626 'Magento_Sales/gift-message': 'Magento_Sales/js/gift-message', 2627 'Magento_Sales/orders-returns': 'Magento_Sales/js/orders-returns' 2628 } 2629 } 2630}; 2631 2632require.config(config); 2633})(); 2634(function() { 2635/** 2636 * Copyright © Magento, Inc. All rights reserved. 2637 * See COPYING.txt for license details. 2638 */ 2639 2640var config = { 2641 map: { 2642 '*': { 2643 discountCode: 'Magento_Checkout/js/discount-codes', 2644 shoppingCart: 'Magento_Checkout/js/shopping-cart',
2645 regionUpdater: 'Magento_Checkout/js/region-updater', 2646 sidebar: 'Magento_Checkout/js/sidebar', 2647 checkoutLoader: 'Magento_Checkout/js/checkout-loader', 2648 checkoutData: 'Magento_Checkout/js/checkout-data', 2649 proceedToCheckout: 'Magento_Checkout/js/proceed-to-checkout', 2650 catalogAddToCart: 'Magento_Catalog/js/catalog-add-to-cart' 2651 } 2652 } 2653}; 2654 2655require.config(config); 2656})(); 2657(function() { 2658/** 2659 * Copyright © Magento, Inc. All rights reserved. 2660 * See COPYING.txt for license details. 2661 */ 2662 2663var config = { 2664 paths: { 2665 'jquery/jquery-storageapi': 'Magento_Cookie/js/jquery.storageapi.extended' 2666 } 2667}; 2668 2669require.config(config); 2670})(); 2671(function() { 2672/** 2673 * Copyright © Magento, Inc. All rights reserved. 2674 * See COPYING.txt for license details. 2675 */ 2676 2677var config = { 2678 map: { 2679 '*': { 2680 requireCookie: 'Magento_Cookie/js/require-cookie', 2681 cookieNotices: 'Magento_Cookie/js/notices' 2682 } 2683 } 2684}; 2685 2686require.config(config); 2687})(); 2688(function() { 2689/** 2690 * Copyright © Magento, Inc. All rights reserved. 2691 * See COPYING.txt for license details. 2692 */ 2693 2694var config = { 2695 map: { 2696 '*': { 2697 downloadable: 'Magento_Downloadable/js/downloadable', 2698 'Magento_Downloadable/downloadable': 'Magento_Downloadable/js/downloadable' 2699 } 2700 } 2701}; 2702 2703require.config(config); 2704})(); 2705(function() { 2706/** 2707 * Copyright © Magento, Inc. All rights reserved. 2708 * See COPYING.txt for license details. 2709 */ 2710 2711var config = { 2712 map: { 2713 '*': { 2714 bundleOption: 'Magento_Bundle/bundle', 2715 priceBundle: 'Magento_Bundle/js/price-bundle', 2716 slide: 'Magento_Bundle/js/slide', 2717 productSummary: 'Magento_Bundle/js/product-summary' 2718 } 2719 } 2720}; 2721 2722require.config(config); 2723})(); 2724(function() { 2725/** 2726 * Copyright © Magento, Inc. All rights reserved. 2727 * See COPYING.txt for license details. 2728 */ 2729 2730var config = { 2731 map: { 2732 '*': { 2733 giftOptions: 'Magento_GiftMessage/js/gift-options', 2734 extraOptions: 'Magento_GiftMessage/js/extra-options', 2735 'Magento_GiftMessage/gift-options': 'Magento_GiftMessage/js/gift-options', 2736 'Magento_GiftMessage/extra-options': 'Magento_GiftMessage/js/extra-options' 2737 } 2738 } 2739}; 2740 2741require.config(config); 2742})(); 2743(function() { 2744/** 2745 * Copyright © Magento, Inc. All rights reserved. 2746 * See COPYING.txt for license details. 2747 */ 2748 2749var config = { 2750 deps: [], 2751 shim: { 2752 'chartjs/Chart.min': ['moment'], 2753 'tiny_mce_4/tinymce.min': { 2754 exports: 'tinyMCE' 2755 } 2756 }, 2757 paths: { 2758 'ui/template': 'Magento_Ui/templates' 2759 }, 2760 map: { 2761 '*': { 2762 uiElement: 'Magento_Ui/js/lib/core/element/element', 2763 uiCollection: 'Magento_Ui/js/lib/core/collection', 2764 uiComponent: 'Magento_Ui/js/lib/core/collection', 2765 uiClass: 'Magento_Ui/js/lib/core/class', 2766 uiEvents: 'Magento_Ui/js/lib/core/events', 2767 uiRegistry: 'Magento_Ui/js/lib/registry/registry', 2768 consoleLogger: 'Magento_Ui/js/lib/logger/console-logger', 2769 uiLayout: 'Magento_Ui/js/core/renderer/layout', 2770 buttonAdapter: 'Magento_Ui/js/form/button-adapter', 2771 chartJs: 'chartjs/Chart.min', 2772 tinymce4: 'tiny_mce_4/tinymce.min', 2773 wysiwygAdapter: 'mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter' 2774 } 2775 } 2776}; 2777 2778/** 2779 * Adds polyfills only for browser contexts which prevents bundlers from including them. 2780 */ 2781if (typeof window !== 'undefined' && window.document) { 2782 /** 2783 * Polyfill Map and WeakMap for older browsers that do not support them. 2784 */ 2785 if (typeof Map === 'undefined' || typeof WeakMap === 'undefined') { 2786 config.deps.push('es6-collections'); 2787 } 2788 2789 /** 2790 * Polyfill MutationObserver only for the browsers that do not support it. 2791 */ 2792 if (typeof MutationObserver === 'undefined') { 2793 config.deps.push('MutationObserver'); 2794 } 2795 2796 /** 2797 * Polyfill FormData object for old browsers that don't have full support for it. 2798 */ 2799 if (typeof FormData === 'undefined' || typeof FormData.prototype.get === 'undefined') { 2800 config.deps.push('FormData'); 2801 } 2802} 2803 2804require.config(config); 2805})(); 2806(function() { 2807/** 2808 * Copyright © Magento, Inc. All rights reserved. 2809 * See COPYING.txt for license details. 2810 */ 2811 2812var config = { 2813 map: { 2814 '*': { 2815 pageCache: 'Magento_PageCache/js/page-cache' 2816 } 2817 }, 2818 deps: ['Magento_PageCache/js/form-key-provider'] 2819}; 2820 2821require.config(config); 2822})(); 2823(function() { 2824/** 2825 * Copyright © Magento, Inc. All rights reserved. 2826 * See COPYING.txt for license details. 2827 */ 2828 2829var config = { 2830 map: { 2831 '*': { 2832 captcha: 'Magento_Captcha/js/captcha', 2833 'Magento_Captcha/captcha': 'Magento_Captcha/js/captcha' 2834 } 2835 } 2836}; 2837 2838require.config(config); 2839})(); 2840(function() { 2841/** 2842 * Copyright © Magento, Inc. All rights reserved. 2843 * See COPYING.txt for license details. 2844 */ 2845 2846var config = { 2847 map: { 2848 '*': { 2849 configurable: 'Magento_ConfigurableProduct/js/configurable' 2850 } 2851 }, 2852 config: { 2853 mixins: { 2854 'Magento_Catalog/js/catalog-add-to-cart': { 2855 'Magento_ConfigurableProduct/js/catalog-add-to-cart-mixin': true 2856 } 2857 } 2858 } 2859}; 2860 2861require.config(config); 2862})(); 2863(function() { 2864/** 2865 * Copyright © Magento, Inc. All rights reserved. 2866 * See COPYING.txt for license details. 2867 */ 2868 2869var config = { 2870 map: { 2871 '*': { 2872 multiShipping: 'Magento_Multishipping/js/multi-shipping', 2873 orderOverview: 'Magento_Multishipping/js/overview', 2874 payment: 'Magento_Multishipping/js/payment', 2875 billingLoader: 'Magento_Checkout/js/checkout-loader', 2876 cartUpdate: 'Magento_Checkout/js/action/update-shopping-cart', 2877 multiShippingBalance: 'Magento_Multishipping/js/multi-shipping-balance' 2878 } 2879 } 2880}; 2881 2882require.config(config); 2883})(); 2884(function() { 2885/** 2886 * Copyright © Magento, Inc. All rights reserved. 2887 * See COPYING.txt for license details. 2888 */ 2889 2890var config = { 2891 map: { 2892 '*': { 2893 recentlyViewedProducts: 'Magento_Reports/js/recently-viewed' 2894 } 2895 } 2896}; 2897 2898require.config(config); 2899})(); 2900(function() { 2901/** 2902 * Copyright © Magento, Inc. All rights reserved. 2903 * See COPYING.txt for license details. 2904 */ 2905 2906var config = { 2907 map: { 2908 '*': { 2909 subscriptionStatusResolver: 'Magento_Newsletter/js/subscription-status-resolver', 2910 newsletterSignUp: 'Magento_Newsletter/js/newsletter-sign-up' 2911 } 2912 } 2913}; 2914 2915require.config(config); 2916})(); 2917(function() { 2918/** 2919 * Copyright © Magento, Inc. All rights reserved. 2920 * See COPYING.txt for license details. 2921 */ 2922 2923var config = { 2924 config: { 2925 mixins: { 2926 'Magento_Checkout/js/action/select-payment-method': { 2927 'Magento_SalesRule/js/action/select-payment-method-mixin': true 2928 }, 2929 'Magento_Checkout/js/model/shipping-save-processor': { 2930 'Magento_SalesRule/js/model/shipping-save-processor-mixin': true 2931 }, 2932 'Magento_Checkout/js/action/place-order': { 2933 'Magento_SalesRule/js/model/place-order-mixin': true 2934 } 2935 } 2936 } 2937}; 2938 2939require.config(config); 2940})(); 2941(function() { 2942/** 2943 * Copyright © Magento, Inc. All rights reserved. 2944 * See COPYING.txt for license details. 2945 */ 2946 2947var config = { 2948 map: { 2949 '*': { 2950 'slick': 'Magento_PageBuilder/js/resource/slick/slick', 2951 'jarallax': 'Magento_PageBuilder/js/resource/jarallax/jarallax', 2952 'jarallaxVideo': 'Magento_PageBuilder/js/resource/jarallax/jarallax-video', 2953 'vimeo': 'Magento_PageBuilder/js/resource/vimeo/player', 2954 'vimeoWrapper': 'Magento_PageBuilder/js/resource/vimeo/vimeo-wrapper' 2955 } 2956 }, 2957 shim: { 2958 'Magento_PageBuilder/js/resource/slick/slick': { 2959 deps: ['jquery'] 2960 }, 2961 'Magento_PageBuilder/js/resource/jarallax/jarallax-video': { 2962 deps: ['jarallax', 'vimeoWrapper'] 2963 }, 2964 'Magento_PageBuilder/js/resource/vimeo/player': { 2965 exports: ['Player'] 2966 } 2967 } 2968}; 2969 2970require.config(config); 2971})(); 2972(function() { 2973/** 2974 * Copyright © Magento, Inc. All rights reserved. 2975 * See COPYING.txt for license details. 2976 */ 2977 2978var config = { 2979 shim: { 2980 cardinaljs: { 2981 exports: 'Cardinal' 2982 }, 2983 cardinaljsSandbox: { 2984 exports: 'Cardinal' 2985 } 2986 }, 2987 paths: { 2988 cardinaljsSandbox: 'https://includestest.ccdc02.com/cardinalcruise/v1/songbird', 2989 cardinaljs: 'https://songbird.cardinalcommerce.com/edge/v1/songbird' 2990 } 2991}; 2992 2993 2994require.config(config); 2995})(); 2996(function() { 2997/** 2998 * Copyright © Magento, Inc. All rights reserved. 2999 * See COPYING.txt for license details. 3000 */ 3001 3002var config = { 3003 map: { 3004 '*': { 3005 orderReview: 'Magento_Paypal/js/order-review', 3006 'Magento_Paypal/order-review': 'Magento_Paypal/js/order-review', 3007 paypalCheckout: 'Magento_Paypal/js/paypal-checkout' 3008 } 3009 } 3010}; 3011 3012require.config(config); 3013})(); 3014(function() { 3015/** 3016 * Copyright © Magento, Inc. All rights reserved. 3017 * See COPYING.txt for license details. 3018 */ 3019 3020var config = { 3021 map: { 3022 '*': { 3023 transparent: 'Magento_Payment/js/transparent', 3024 'Magento_Payment/transparent': 'Magento_Payment/js/transparent' 3025 } 3026 } 3027}; 3028 3029require.config(config); 3030})(); 3031(function() { 3032/** 3033 * Copyright © Magento, Inc. All rights reserved. 3034 * See COPYING.txt for license details. 3035 */ 3036 3037var config = { 3038 config: { 3039 mixins: { 3040 'Magento_Customer/js/customer-data': { 3041 'Magento_Persistent/js/view/customer-data-mixin': true 3042 } 3043 } 3044 } 3045}; 3046 3047require.config(config); 3048})(); 3049(function() { 3050/** 3051 * Copyright © Magento, Inc. All rights reserved. 3052 * See COPYING.txt for license details. 3053 */ 3054 3055var config = { 3056 map: { 3057 '*': { 3058 loadPlayer: 'Magento_ProductVideo/js/load-player', 3059 fotoramaVideoEvents: 'Magento_ProductVideo/js/fotorama-add-video-events' 3060 } 3061 }, 3062 shim: { 3063 vimeoAPI: {} 3064 } 3065}; 3066 3067require.config(config); 3068})(); 3069(function() { 3070/** 3071 * Copyright © Magento, Inc. All rights reserved. 3072 * See COPYING.txt for license details. 3073 */ 3074 3075var config = { 3076 config: { 3077 mixins: { 3078 'Magento_Checkout/js/action/place-order': { 3079 'Magento_CheckoutAgreements/js/model/place-order-mixin': true 3080 }, 3081 'Magento_Checkout/js/action/set-payment-information': { 3082 'Magento_CheckoutAgreements/js/model/set-payment-information-mixin': true 3083 } 3084 } 3085 } 3086}; 3087 3088require.config(config); 3089})(); 3090(function() { 3091/** 3092 * Copyright © Magento, Inc. All rights reserved. 3093 * See COPYING.txt for license details. 3094 */ 3095 3096// eslint-disable-next-line no-unused-vars
3097var config = { 3098 config: { 3099 mixins: { 3100 'Magento_Checkout/js/model/place-order': { 3101 'Magento_ReCaptchaCheckout/js/model/place-order-mixin': true 3102 } 3103 } 3104 } 3105}; 3106 3107require.config(config); 3108})(); 3109(function() { 3110/** 3111 * Copyright © Magento, Inc. All rights reserved. 3112 * See COPYING.txt for license details. 3113 */ 3114 3115/*eslint strict: ["error", "global"]*/ 3116 3117'use strict'; 3118 3119var config = { 3120 config: { 3121 mixins: { 3122 'Magento_Ui/js/view/messages': { 3123 'Magento_ReCaptchaFrontendUi/js/ui-messages-mixin': true 3124 } 3125 } 3126 } 3127}; 3128 3129require.config(config); 3130})(); 3131(function() { 3132/** 3133 * Copyright © Magento, Inc. All rights reserved. 3134 * See COPYING.txt for license details. 3135 */ 3136 3137// eslint-disable-next-line no-unused-vars 3138var config = { 3139 config: { 3140 mixins: { 3141 'Magento_Paypal/js/view/payment/method-renderer/payflowpro-method': { 3142 'Magento_ReCaptchaPaypal/js/payflowpro-method-mixin': true 3143 } 3144 } 3145 } 3146}; 3147 3148require.config(config); 3149})(); 3150(function() { 3151/** 3152 * Copyright © Magento, Inc. All rights reserved. 3153 * See COPYING.txt for license details. 3154 */ 3155 3156// eslint-disable-next-line no-unused-vars 3157var config = { 3158 config: { 3159 mixins: { 3160 'jquery': { 3161 'Magento_ReCaptchaWebapiUi/js/jquery-mixin': true 3162 } 3163 } 3164 } 3165}; 3166 3167require.config(config); 3168})(); 3169(function() { 3170/** 3171 * Copyright © Magento, Inc. All rights reserved. 3172 * See COPYING.txt for license details. 3173 */ 3174 3175var config = { 3176 map: { 3177 '*': { 3178 editTrigger: 'mage/edit-trigger', 3179 addClass: 'Magento_Translation/js/add-class', 3180 'Magento_Translation/add-class': 'Magento_Translation/js/add-class' 3181 } 3182 } 3183}; 3184 3185require.config(config); 3186})(); 3187(function() { 3188/** 3189 * Copyright © Magento, Inc. All rights reserved. 3190 * See COPYING.txt for license details. 3191 */ 3192 3193var config = { 3194 map: { 3195 '*': { 3196 mageTranslationDictionary: 'Magento_Translation/js/mage-translation-dictionary' 3197 } 3198 }, 3199 deps: [ 3200 'mageTranslationDictionary' 3201 ] 3202}; 3203 3204require.config(config); 3205})(); 3206(function() { 3207/** 3208 * Copyright © Magento, Inc. All rights reserved. 3209 * See COPYING.txt for license details. 3210 */ 3211 3212var config = { 3213 config: { 3214 mixins: { 3215 'Magento_Checkout/js/view/payment/list': { 3216 'Magento_PaypalCaptcha/js/view/payment/list-mixin': true 3217 }, 3218 'Magento_Paypal/js/view/payment/method-renderer/payflowpro-method': { 3219 'Magento_PaypalCaptcha/js/view/payment/method-renderer/payflowpro-method-mixin': true 3220 }, 3221 'Magento_Captcha/js/view/checkout/defaultCaptcha': { 3222 'Magento_PaypalCaptcha/js/view/checkout/defaultCaptcha-mixin': true 3223 } 3224 } 3225 } 3226}; 3227 3228require.config(config); 3229})(); 3230(function() { 3231/** 3232 * Copyright © Magento, Inc. All rights reserved. 3233 * See COPYING.txt for license details. 3234 */ 3235 3236var config = { 3237 map: { 3238 '*': { 3239 'taxToggle': 'Magento_Weee/js/tax-toggle', 3240 'Magento_Weee/tax-toggle': 'Magento_Weee/js/tax-toggle' 3241 } 3242 } 3243}; 3244 3245require.config(config); 3246})(); 3247(function() { 3248/** 3249 * Copyright © Magento, Inc. All rights reserved. 3250 * See COPYING.txt for license details. 3251 */ 3252 3253var config = { 3254 map: { 3255 '*': { 3256 wishlist: 'Magento_Wishlist/js/wishlist', 3257 addToWishlist: 'Magento_Wishlist/js/add-to-wishlist', 3258 wishlistSearch: 'Magento_Wishlist/js/search' 3259 } 3260 } 3261}; 3262 3263require.config(config); 3264})(); 3265(function() { 3266var config = { 3267 config: { 3268 mixins: { 3269 'Amasty_Conf/js/swatch-renderer': { 3270 'Amasty_Cart/js/swatch-renderer': true 3271 }, 3272 'Magento_Swatches/js/swatch-renderer': { 3273 'Amasty_Cart/js/swatch-renderer': true 3274 } 3275 } 3276 }, 3277 map: { 3278 '*': { 3279 'showConfirmPopup': 'Amasty_Cart/js/show-confirm-popup' 3280 } 3281 } 3282}; 3283 3284require.config(config); 3285})(); 3286(function() { 3287var config = { 3288 config: { 3289 mixins: { 3290 'Magento_Checkout/js/model/step-navigator': { 3291 'PayPal_Braintree/js/model/step-navigator-mixin': true 3292 }, 3293 'PayPal_Braintree/js/view/payment/method-renderer/cc-form': { 3294 'PayPal_Braintree/js/reCaptcha/braintree-cc-method-mixin': true 3295 } 3296 } 3297 }, 3298 map: { 3299 '*': {
3300 braintreeCheckoutPayPalAdapter: 'PayPal_Braintree/js/view/payment/adapter' 3301 } 3302 }, 3303}; 3304 3305require.config(config); 3306})(); 3307(function() { 3308/** 3309 * Config to pull in all the relevant Braintree JS SDKs 3310 * @type {{paths: {braintreePayPalInContextCheckout: string, braintreePayPalCheckout: string, braintreeVenmo: string, braintreeHostedFields: string, braintreeDataCollector: string, braintreeThreeDSecure: string, braintreeGooglePay: string, braintreeApplePay: string, braintreeAch: string, braintreeLpm: string, googlePayLibrary: string}, map: {"*": {braintree: string}}}} 3311 */ 3312var config = { 3313 map: { 3314 '*': { 3315 braintree: 'https://js.braintreegateway.com/web/3.67.0/js/client.min.js', 3316 } 3317 }, 3318 3319 paths: { 3320 "braintreePayPalCheckout": "https://js.braintreegateway.com/web/3.67.0/js/paypal-checkout.min", 3321 "braintreeHostedFields": "https://js.braintreegateway.com/web/3.67.0/js/hosted-fields.min", 3322 "braintreeDataCollector": "https://js.braintreegateway.com/web/3.67.0/js/data-collector.min", 3323 "braintreeThreeDSecure": "https://js.braintreegateway.com/web/3.67.0/js/three-d-secure.min", 3324 "braintreeApplePay": 'https://js.braintreegateway.com/web/3.67.0/js/apple-pay.min', 3325 "braintreeGooglePay": 'https://js.braintreegateway.com/web/3.67.0/js/google-payment.min', 3326 "braintreeVenmo": 'https://js.braintreegateway.com/web/3.67.0/js/venmo.min', 3327 "braintreeAch": "https://js.braintreegateway.com/web/3.67.0/js/us-bank-account.min", 3328 "braintreeLpm": "https://js.braintreegateway.com/web/3.67.0/js/local-payment.min", 3329 "googlePayLibrary": "https://pay.google.com/gp/p/js/pay", 3330 "braintreePayPalInContextCheckout": "https://www.paypalobjects.com/api/checkout" 3331 } 3332}; 3333 3334require.config(config); 3335})(); 3336(function() { 3337var config = { 3338 config: { 3339 mixins: { 3340 'Magento_Checkout/js/action/set-shipping-information': { 3341 'Amasty_Orderattr/js/action/set-shipping-information-mixin': true 3342 }, 3343 'Magento_Checkout/js/action/place-order': { 3344 'Amasty_Orderattr/js/action/place-order-mixin': true 3345 }, 3346 'Amazon_Payment/js/action/place-order': { 3347 'Amasty_Orderattr/js/action/place-order-mixin': true 3348 }, 3349 'Magento_Paypal/js/action/set-payment-method': { 3350 'Amasty_Orderattr/js/action/set-payment-method-mixin': true 3351 }, 3352 'Magento_Checkout/js/action/set-payment-information': { 3353 'Amasty_Orderattr/js/action/set-payment-information-mixin': true 3354 } 3355 } 3356 } 3357}; 3358 3359require.config(config); 3360})(); 3361(function() { 3362/** 3363 * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3364 * 3365 * Licensed under the Apache License, Version 2.0 (the "License"). 3366 * You may not use this file except in compliance with the License. 3367 * A copy of the License is located at 3368 * 3369 * http://aws.amazon.com/apache2.0 3370 * 3371 * or in the "license" file accompanying this file. This file is distributed 3372 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 3373 * express or implied. See the License for the specific language governing 3374 * permissions and limitations under the License. 3375 */ 3376 3377var config = { 3378 map: { 3379 '*': { 3380 amazonLogout: 'Amazon_Login/js/amazon-logout', 3381 amazonOAuthRedirect: 'Amazon_Login/js/amazon-redirect', 3382 amazonCsrf: 'Amazon_Login/js/amazon-csrf' 3383 } 3384 } 3385}; 3386 3387require.config(config); 3388})(); 3389(function() { 3390/** 3391 * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3392 * 3393 * Licensed under the Apache License, Version 2.0 (the "License"). 3394 * You may not use this file except in compliance with the License. 3395 * A copy of the License is located at 3396 * 3397 * http://aws.amazon.com/apache2.0 3398 * 3399 * or in the "license" file accompanying this file. This file is distributed 3400 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 3401 * express or implied. See the License for the specific language governing 3402 * permissions and limitations under the License. 3403 */
3404var config = { 3405 map: { 3406 '*': { 3407 amazonCore: 'Amazon_Payment/js/amazon-core', 3408 amazonWidgetsLoader: 'Amazon_Payment/js/amazon-widgets-loader', 3409 amazonButton: 'Amazon_Payment/js/amazon-button', 3410 amazonProductAdd: 'Amazon_Payment/js/amazon-product-add', 3411 amazonPaymentConfig: 'Amazon_Payment/js/model/amazonPaymentConfig', 3412 sjcl: 'Amazon_Payment/js/lib/sjcl.min' 3413 } 3414 }, 3415 config: { 3416 mixins: { 3417 'Amazon_Payment/js/action/place-order': { 3418 'Amazon_Payment/js/model/place-order-mixin': true 3419 }, 3420 'Magento_Tax/js/view/checkout/summary/grand-total': { 3421 'Amazon_Payment/js/view/checkout/summary/grand-total-mixin': true 3422 } 3423 } 3424 } 3425}; 3426 3427require.config(config); 3428})(); 3429(function() { 3430/** 3431 * BSS Commerce Co. 3432 * 3433 * NOTICE OF LICENSE 3434 * 3435 * @category BSS 3436 * @package Bss_MultiWishlist 3437 * @author Extension Team 3438 * @copyright Copyright (c) 2018-2019 BSS Commerce Co. ( http://bsscommerce.com ) 3439 * @license http://bsscommerce.com/Bss-Commerce-License.txt 3440 */ 3441var config = { 3442 config: { 3443 mixins: { 3444 "Magento_Wishlist/js/add-to-wishlist" : { 3445 "Bss_MultiWishlist/js/add-to-wishlist": true 3446 } 3447 } 3448 }, 3449 map: { 3450 '*': { 3451 'wishlist':'Bss_MultiWishlist/js/overwirte_core_wishlist', 3452 'wishlisttable':'Bss_MultiWishlist/js/wishlisttable' 3453 } 3454 }, 3455 paths: { 3456 'bss_fancybox': 'Bss_MultiWishlist/js/jquery.bssfancybox' 3457 }, 3458 shim: { 3459 'bss_fancybox': { 3460 deps: ['jquery'] 3461 } 3462 } 3463}; 3464require.config(config); 3465 3466require.config(config); 3467})(); 3468(function() { 3469var config = { 3470 paths: { 3471 'intlTelInput': 'Dotdigitalgroup_Sms/js/intlTelInput', 3472 'intlTelInputUtils': 'Dotdigitalgroup_Sms/js/utils', 3473 'internationalTelephoneInput': 'Dotdigitalgroup_Sms/js/internationalTelephoneInput' 3474 }, 3475 3476 shim: { 3477 'intlTelInput': { 3478 'deps': ['jquery', 'knockout'] 3479 }, 3480 'internationalTelephoneInput': { 3481 'deps': ['jquery', 'intlTelInput'] 3482 } 3483 }, 3484 3485 config: { 3486 mixins: { 3487 'mage/validation': { 3488 'Dotdigitalgroup_Sms/js/telephoneValidatorAddress': true 3489 }, 3490 'Magento_Ui/js/form/element/abstract': { 3491 'Dotdigitalgroup_Sms/js/setAdditionalParams': true 3492 }, 3493 'Magento_Ui/js/lib/validation/validator': { 3494 'Dotdigitalgroup_Sms/js/telephoneValidatorCheckout': true 3495 } 3496 } 3497 } 3498}; 3499 3500require.config(config); 3501})(); 3502(function() { 3503/** 3504 * This file is part of the Klarna KP module 3505 * 3506 * (c) Klarna Bank AB (publ) 3507 * 3508 * For the full copyright and license information, please view the NOTICE 3509 * and LICENSE files that were distributed with this source code. 3510 */ 3511var config = { 3512 config: { 3513 mixins: { 3514 'Magento_Checkout/js/action/get-payment-information': { 3515 'Klarna_Kp/js/action/override': true 3516 } 3517 } 3518 }, 3519 map: { 3520 '*': { 3521 klarnapi: 'https://x.klarnacdn.net/kp/lib/v1/api.js' 3522 } 3523 } 3524}; 3525 3526require.config(config); 3527})(); 3528(function() { 3529/** 3530 * This file is part of the Klarna Onsitemessaging module 3531 * 3532 * (c) Klarna Bank AB (publ) 3533 * 3534 * For the full copyright and license information, please view the NOTICE 3535 * and LICENSE files that were distributed with this source code. 3536 */ 3537var config = { 3538 config: { 3539 mixins: { 3540 'Magento_Catalog/js/price-box': { 3541 'Klarna_Onsitemessaging/js/pricebox-widget-mixin': true 3542 } 3543 } 3544 } 3545}; 3546 3547require.config(config); 3548})(); 3549(function() { 3550/** 3551 * Mageplaza 3552 * 3553 * NOTICE OF LICENSE 3554 * 3555 * This source file is subject to the mageplaza.com license that is 3556 * available through the world-wide-web at this URL: 3557 * https://www.mageplaza.com/LICENSE.txt 3558 * 3559 * DISCLAIMER 3560 * 3561 * Do not edit or add to this file if you wish to upgrade this extension to newer 3562 * version in the future. 3563 * 3564 * @category Mageplaza 3565 * @package Mageplaza_Core 3566 * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) 3567 * @license https://www.mageplaza.com/LICENSE.txt 3568 */ 3569 3570var config = { 3571 paths: { 3572 'mageplaza/core/jquery/popup': 'Mageplaza_Core/js/jquery.magnific-popup.min', 3573 'mageplaza/core/owl.carousel': 'Mageplaza_Core/js/owl.carousel.min', 3574 'mageplaza/core/bootstrap': 'Mageplaza_Core/js/bootstrap.min', 3575 mpIonRangeSlider: 'Mageplaza_Core/js/ion.rangeSlider.min', 3576 touchPunch: 'Mageplaza_Core/js/jquery.ui.touch-punch.min', 3577 mpDevbridgeAutocomplete: 'Mageplaza_Core/js/jquery.autocomplete.min' 3578 }, 3579 shim: { 3580 "mageplaza/core/jquery/popup": ["jquery"], 3581 "mageplaza/core/owl.carousel": ["jquery"], 3582 "mageplaza/core/bootstrap": ["jquery"], 3583 mpIonRangeSlider: ["jquery"], 3584 mpDevbridgeAutocomplete: ["jquery"], 3585 touchPunch: ['jquery', 'jquery/ui'] 3586 } 3587}; 3588 3589require.config(config); 3590})(); 3591(function() { 3592/* jshint browser:true jquery:true */ 3593var amasty_mixin_enabled = !window.amasty_checkout_disabled, 3594 config; 3595 3596config = { 3597 'map': { '*': {} }, 3598 config: { 3599 mixins: { 3600 'Magento_Checkout/js/model/new-customer-address': { 3601 'Amasty_Checkout/js/model/new-customer-address-mixin': amasty_mixin_enabled 3602 }, 3603 'Magento_Checkout/js/view/payment/list': { 3604 'Amasty_Checkout/js/view/payment/list': amasty_mixin_enabled 3605 }, 3606 'Magento_Checkout/js/view/summary/abstract-total': { 3607 'Amasty_Checkout/js/view/summary/abstract-total': amasty_mixin_enabled 3608 }, 3609 'Magento_Checkout/js/model/step-navigator': { 3610 'Amasty_Checkout/js/model/step-navigator-mixin': amasty_mixin_enabled 3611 }, 3612 'Magento_Paypal/js/action/set-payment-method': { 3613 'Amasty_Checkout/js/action/set-payment-method-mixin': amasty_mixin_enabled 3614 }, 3615 'Magento_CheckoutAgreements/js/model/agreements-assigner': { 3616 'Amasty_Checkout/js/model/agreements-assigner-mixin': amasty_mixin_enabled 3617 }, 3618 'Magento_Checkout/js/view/summary': { 3619 'Amasty_Checkout/js/view/summary-mixin': amasty_mixin_enabled 3620 }, 3621 'Magento_Checkout/js/view/shipping': { 3622 'Amasty_Checkout/js/view/shipping-mixin': amasty_mixin_enabled 3623 }, 3624 'Magento_Checkout/js/view/summary/cart-items': { 3625 'Amasty_Checkout/js/view/summary/cart-items-mixin': amasty_mixin_enabled 3626 }, 3627 'Magento_Checkout/js/model/payment/additional-validators': { 3628 'Amasty_Checkout/js/model/payment-validators/additional-validators-mixin': amasty_mixin_enabled 3629 }, 3630 'Magento_Checkout/js/model/checkout-data-resolver': { 3631 'Amasty_Checkout/js/model/checkout-data-resolver-mixin': amasty_mixin_enabled 3632 }, 3633 'Magento_Checkout/js/model/shipping-rates-validator': { 3634 'Amasty_Checkout/js/model/shipping-rates-validator-mixin': amasty_mixin_enabled 3635 }, 3636 'Magento_Checkout/js/action/set-shipping-information': { 3637 'Amasty_Checkout/js/action/set-shipping-information-mixin': amasty_mixin_enabled 3638 }, 3639 'Magento_Checkout/js/model/full-screen-loader': { 3640 'Amasty_Checkout/js/model/full-screen-loader-mixin': amasty_mixin_enabled 3641 }, 3642 'Magento_Checkout/js/model/shipping-rate-processor/new-address': { 3643 'Amasty_Checkout/js/model/default-shipping-rate-processor-mixin': amasty_mixin_enabled 3644 }, 3645 'Magento_Checkout/js/view/payment': { 3646 'Amasty_Checkout/js/view/payment-mixin': amasty_mixin_enabled 3647 }, 3648 'Magento_Checkout/js/model/payment-service': { 3649 'Amasty_Checkout/js/model/payment-service-mixin': amasty_mixin_enabled 3650 }, 3651 'Magento_Checkout/js/model/address-converter': { 3652 'Amasty_Checkout/js/model/address-converter-mixin': amasty_mixin_enabled 3653 }, 3654 'Magento_Paypal/js/view/payment/method-renderer/in-context/checkout-express': { 3655 'Amasty_Checkout/js/view/payment/method-renderer/in-context/checkout-express-mixin': 3656 amasty_mixin_enabled 3657 }, 3658 3659 // in Magento 2.4 module Magento_Braintree renamed to Paypal_Braintree 3660 'Magento_Braintree/js/view/payment/method-renderer/paypal': { 3661 'Amasty_Checkout/js/view/payment/method-renderer/braintree/paypal-mixin': 3662 amasty_mixin_enabled 3663 }, 3664 'PayPal_Braintree/js/view/payment/method-renderer/paypal': { 3665 'Amasty_Checkout/js/view/payment/method-renderer/braintree/paypal-mixin': 3666 amasty_mixin_enabled 3667 }, 3668 'Magento_Braintree/js/view/payment/method-renderer/cc-form': { 3669 'Amasty_Checkout/js/view/payment/method-renderer/braintree/cc-form-mixin': amasty_mixin_enabled 3670 }, 3671 'PayPal_Braintree/js/view/payment/method-renderer/cc-form': { 3672 'Amasty_Checkout/js/view/payment/method-renderer/braintree/cc-form-mixin': amasty_mixin_enabled 3673 }, 3674 'Magento_Checkout/js/view/billing-address': { 3675 'Amasty_Checkout/js/view/billing-address-mixin': amasty_mixin_enabled 3676 }, 3677 'Magento_Checkout/js/view/payment/default': { 3678 'Amasty_Checkout/js/view/payment/method-renderer/default-mixin': amasty_mixin_enabled 3679 }, 3680 'Magento_Checkout/js/model/shipping-rate-registry': { 3681 'Amasty_Checkout/js/model/shipping-rate-registry-mixin': amasty_mixin_enabled 3682 }, 3683 'Magento_Checkout/js/view/shipping-address/address-renderer/default': { 3684 'Amasty_Checkout/js/view/shipping-address/address-renderer/default-mixin': amasty_mixin_enabled 3685 }, 3686 'Amasty_Gdpr/js/model/consents-assigner': { 3687 'Amasty_Checkout/js/model/consents-assigner-mixin': amasty_mixin_enabled 3688 } 3689 } 3690 } 3691}; 3692 3693if (amasty_mixin_enabled) { 3694 config.map['*'] = { 3695 checkoutCollapsibleSteps: 'Amasty_Checkout/js/view/checkout/design/collapsible-steps', 3696 summaryWidget: 'Amasty_Checkout/js/view/summary/summary-widget', 3697 stickyWidget: 'Amasty_Checkout/js/view/summary/sticky-widget', 3698 'Magento_Checkout/template/payment-methods/list.html': 'Amasty_Checkout/template/payment-methods/list.html', 3699 'Magento_Checkout/template/billing-address/details.html': 3700 'Amasty_Checkout/template/onepage/billing-address/details.html', 3701 'Magento_Checkout/js/action/get-totals': 'Amasty_Checkout/js/action/get-totals', 3702 'Magento_Checkout/js/model/shipping-rate-service': 'Amasty_Checkout/js/model/shipping-rate-service-override', 3703 'Magento_Checkout/js/action/recollect-shipping-rates': 'Amasty_Checkout/js/action/recollect-shipping-rates' 3704 }; 3705} 3706 3707require.config(config); 3708})(); 3709(function() { 3710var config = { 3711 map: { 3712 '*': { 3713 'Magento_Checkout/js/model/shipping-save-processor/default': 3714 'Televes_CheckoutBilling/js/model/shipping-save-processor/default', 3715 'Magento_Checkout/js/view/summary/item/details.js': 'Televes_CheckoutBilling/js/view/summary/item/details.js', 3716 }, 3717 }, 3718}; 3719 3720require.config(config); 3721})(); 3722(function() { 3723/** 3724 * Copyright © 2013-2017 Magento, Inc. All rights reserved. 3725 * See COPYING.txt for license details. 3726 */ 3727 3728var config = { 3729 map: { 3730 '*': { 3731 faqsCounters: 'Televes_DynamicCmsPages/counter-visits', 3732 listaInstaladores: 'Televes_DynamicCmsPages/instaladores', 3733 ajaxpaises: 'Televes_DynamicCmsPages/ajaspaises', 3734 validaCurso: 'Televes_DynamicCmsPages/validaCurso', 3735 timelineEventos: 'Televes_DynamicCmsPages/timelineEventos', 3736 }, 3737 }, 3738}; 3739 3740require.config(config); 3741})(); 3742(function() { 3743var config = { 3744 map: { 3745 '*': { 3746 'Magento_Tax/js/view/checkout/summary/shipping': 'Televes_Sales/js/view/checkout/summary/shipping', 3747 }, 3748 }, 3749 config: { 3750 mixins: { 3751 'mage/validation': {
3752 'Televes_Sales/js/lib/validation/validation-mixin': true, 3753 }, 3754 }, 3755 }, 3756}; 3757 3758require.config(config); 3759})(); 3760(function() { 3761/** 3762 * @copyright Vertex. All rights reserved. https://www.vertexinc.com/ 3763 * @author Mediotype https://www.mediotype.com/ 3764 */ 3765 3766var config = { 3767 map: { 3768 '*': { 3769 'set-checkout-messages': 'Vertex_Tax/js/model/set-checkout-messages' 3770 } 3771 } 3772}; 3773 3774require.config(config); 3775})(); 3776(function() { 3777/** 3778 * @copyright Vertex. All rights reserved. https://www.vertexinc.com/ 3779 * @author Mediotype https://www.mediotype.com/ 3780 */ 3781 3782var config = { 3783 config: { 3784 mixins: { 3785 'Magento_Checkout/js/view/billing-address': { 3786 'Vertex_AddressValidation/js/billing-validation-mixin': true 3787 }, 3788 'Magento_Checkout/js/view/shipping': { 3789 'Vertex_AddressValidation/js/shipping-validation-mixin': true 3790 }, 3791 'Magento_Checkout/js/checkout-data': { 3792 'Vertex_AddressValidation/js/shipping-invalidate-mixin': true 3793 }, 3794 'Magento_Customer/js/addressValidation': { 3795 'Vertex_AddressValidation/js/customer-validation-mixin': true 3796 } 3797 } 3798 } 3799}; 3800 3801require.config(config); 3802})(); 3803(function() { 3804/** 3805 * Copyright © Magento, Inc. All rights reserved. 3806 * See COPYING.txt for license details. 3807 */ 3808 3809var config = { 3810 deps: [ 3811 'Magento_Theme/js/theme' 3812 ] 3813}; 3814 3815require.config(config); 3816})(); 3817(function() { 3818var config = { 3819 shim: { 3820 jquery: { 3821 exports: '$' 3822 }, 3823 'Smartwave_Megamenu/js/sw_megamenu': 3824 { 3825 deps: ['jquery'] 3826 }, 3827 'owl.carousel/owl.carousel.min': 3828 { 3829 deps: ['jquery'] 3830 }, 3831 'js/jquery.stellar.min': 3832 { 3833 deps: ['jquery'] 3834 }, 3835 'js/jquery.parallax.min': 3836 { 3837 deps: ['jquery'] 3838 } 3839 } 3840}; 3841require.config(config); 3842})(); 3843 3844 3845 3846})(require);;/*! 3847 * jQuery JavaScript Library v1.12.4 3848 * http://jquery.com/ 3849 * 3850 * Includes Sizzle.js 3851 * http://sizzlejs.com/ 3852 * 3853 * Copyright jQuery Foundation and other contributors 3854 * Released under the MIT license 3855 * http://jquery.org/license 3856 * 3857 * Date: 2016-05-20T17:17Z 3858 */ 3859 3860/* 3861 * includes patch for CVE-2019-11358 3862 * prototype pollution vulnerability in jQuery before 3.4.0 3863 */ 3864 3865(function( global, factory ) { 3866 3867 if ( typeof module === "object" && typeof module.exports === "object" ) { 3868 // For CommonJS and CommonJS-like environments where a proper `window` 3869 // is present, execute the factory and get jQuery. 3870 // For environments that do not have a `window` with a `document` 3871 // (such as Node.js), expose a factory as module.exports. 3872 // This accentuates the need for the creation of a real `window`. 3873 // e.g. var jQuery = require("jquery")(window); 3874 // See ticket #14549 for more info. 3875 module.exports = global.document ? 3876 factory( global, true ) : 3877 function( w ) { 3878 if ( !w.document ) { 3879 throw new Error( "jQuery requires a window with a document" ); 3880 } 3881 return factory( w ); 3882 }; 3883 } else { 3884 factory( global ); 3885 } 3886 3887// Pass this if window is not defined yet 3888}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 3889 3890// Support: Firefox 18+ 3891// Can't be in strict mode, several libs including ASP.NET trace 3892// the stack via arguments.caller.callee and Firefox dies if 3893// you try to trace through "use strict" call chains. (#13335) 3894//"use strict"; 3895 var deletedIds = []; 3896 3897 var document = window.document; 3898 3899 var slice = deletedIds.slice; 3900 3901 var concat = deletedIds.concat; 3902 3903 var push = deletedIds.push; 3904 3905 var indexOf = deletedIds.indexOf; 3906 3907 var class2type = {}; 3908 3909 var toString = class2type.toString; 3910 3911 var hasOwn = class2type.hasOwnProperty; 3912 3913 var support = {}; 3914 3915 3916 3917 var 3918 version = "1.12.4", 3919 3920 // Define a local copy of jQuery 3921 jQuery = function( selector, context ) { 3922 3923 // The jQuery object is actually just the init constructor 'enhanced' 3924 // Need init if jQuery is called (just allow error to be thrown if not included) 3925 return new jQuery.fn.init( selector, context ); 3926 }, 3927
3928 // Support: Android<4.1, IE<9 3929 // Make sure we trim BOM and NBSP 3930 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 3931 3932 // Matches dashed string for camelizing 3933 rmsPrefix = /^-ms-/, 3934 rdashAlpha = /-([\da-z])/gi, 3935 3936 // Used by jQuery.camelCase as callback to replace() 3937 fcamelCase = function( all, letter ) { 3938 return letter.toUpperCase(); 3939 }; 3940 3941 jQuery.fn = jQuery.prototype = { 3942 3943 // The current version of jQuery being used 3944 jquery: version, 3945 3946 constructor: jQuery, 3947 3948 // Start with an empty selector 3949 selector: "", 3950 3951 // The default length of a jQuery object is 0 3952 length: 0, 3953 3954 toArray: function() { 3955 return slice.call( this ); 3956 }, 3957 3958 // Get the Nth element in the matched element set OR 3959 // Get the whole matched element set as a clean array 3960 get: function( num ) { 3961 return num != null ? 3962 3963 // Return just the one element from the set 3964 ( num < 0 ? this[ num + this.length ] : this[ num ] ) : 3965 3966 // Return all the elements in a clean array 3967 slice.call( this ); 3968 }, 3969 3970 // Take an array of elements and push it onto the stack 3971 // (returning the new matched element set) 3972 pushStack: function( elems ) { 3973 3974 // Build a new jQuery matched element set 3975 var ret = jQuery.merge( this.constructor(), elems ); 3976 3977 // Add the old object onto the stack (as a reference) 3978 ret.prevObject = this; 3979 ret.context = this.context; 3980 3981 // Return the newly-formed element set 3982 return ret; 3983 }, 3984 3985 // Execute a callback for every element in the matched set. 3986 each: function( callback ) { 3987 return jQuery.each( this, callback ); 3988 }, 3989 3990 map: function( callback ) { 3991 return this.pushStack( jQuery.map( this, function( elem, i ) { 3992 return callback.call( elem, i, elem ); 3993 } ) ); 3994 }, 3995 3996 slice: function() { 3997 return this.pushStack( slice.apply( this, arguments ) ); 3998 }, 3999 4000 first: function() { 4001 return this.eq( 0 ); 4002 }, 4003 4004 last: function() { 4005 return this.eq( -1 ); 4006 }, 4007 4008 eq: function( i ) { 4009 var len = this.length, 4010 j = +i + ( i < 0 ? len : 0 ); 4011 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 4012 }, 4013 4014 end: function() { 4015 return this.prevObject || this.constructor(); 4016 }, 4017 4018 // For internal use only. 4019 // Behaves like an Array's method, not like a jQuery method. 4020 push: push, 4021 sort: deletedIds.sort, 4022 splice: deletedIds.splice 4023 }; 4024 4025 jQuery.extend = jQuery.fn.extend = function() { 4026 var src, copyIsArray, copy, name, options, clone, 4027 target = arguments[ 0 ] || {}, 4028 i = 1, 4029 length = arguments.length, 4030 deep = false; 4031 4032 // Handle a deep copy situation 4033 if ( typeof target === "boolean" ) { 4034 deep = target; 4035 4036 // skip the boolean and the target 4037 target = arguments[ i ] || {}; 4038 i++; 4039 } 4040 4041 // Handle case when target is a string or something (possible in deep copy) 4042 if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { 4043 target = {}; 4044 } 4045 4046 // extend jQuery itself if only one argument is passed 4047 if ( i === length ) { 4048 target = this; 4049 i--; 4050 } 4051 4052 for ( ; i < length; i++ ) { 4053 4054 // Only deal with non-null/undefined values 4055 if ( ( options = arguments[ i ] ) != null ) { 4056 4057 // Extend the base object 4058 for ( name in options ) { 4059 src = target[ name ]; 4060 copy = options[ name ]; 4061 4062 // Prevent Object.prototype pollution 4063 // Prevent never-ending loop 4064 if ( name === "__proto__" || target === copy ) { 4065 continue; 4066 } 4067 4068 // Recurse if we're merging plain objects or arrays 4069 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 4070 ( copyIsArray = jQuery.isArray( copy ) ) ) ) { 4071 4072 if ( copyIsArray ) { 4073 copyIsArray = false; 4074 clone = src && jQuery.isArray( src ) ? src : []; 4075 4076 } else { 4077 clone = src && jQuery.isPlainObject( src ) ? src : {}; 4078 } 4079 4080 // Never move original objects, clone them 4081 target[ name ] = jQuery.extend( deep, clone, copy ); 4082 4083 // Don't bring in undefined values 4084 } else if ( copy !== undefined ) { 4085 target[ name ] = copy; 4086 } 4087 } 4088 } 4089 } 4090 4091 // Return the modified object 4092 return target; 4093 }; 4094 4095 jQuery.extend( { 4096 4097 // Unique for each copy of jQuery on the page 4098 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 4099 4100 // Assume jQuery is ready without the ready module 4101 isReady: true, 4102 4103 error: function( msg ) { 4104 throw new Error( msg ); 4105 }, 4106 4107 noop: function() {}, 4108 4109 // See test/unit/core.js for details concerning isFunction. 4110 // Since version 1.3, DOM methods and functions like alert 4111 // aren't supported. They return false on IE (#2968). 4112 isFunction: function( obj ) { 4113 return jQuery.type( obj ) === "function"; 4114 }, 4115 4116 isArray: Array.isArray || function( obj ) { 4117 return jQuery.type( obj ) === "array"; 4118 }, 4119 4120 isWindow: function( obj ) { 4121 /* jshint eqeqeq: false */ 4122 return obj != null && obj == obj.window; 4123 }, 4124 4125 isNumeric: function( obj ) { 4126 4127 // parseFloat NaNs numeric-cast false positives (null|true|false|"") 4128 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 4129 // subtraction forces infinities to NaN 4130 // adding 1 corrects loss of precision from parseFloat (#15100) 4131 var realStringObj = obj && obj.toString(); 4132 return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; 4133 }, 4134 4135 isEmptyObject: function( obj ) { 4136 var name; 4137 for ( name in obj ) { 4138 return false;
4139 } 4140 return true; 4141 }, 4142 4143 isPlainObject: function( obj ) { 4144 var key; 4145 4146 // Must be an Object. 4147 // Because of IE, we also have to check the presence of the constructor property. 4148 // Make sure that DOM nodes and window objects don't pass through, as well 4149 if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { 4150 return false; 4151 } 4152 4153 try { 4154 4155 // Not own constructor property must be Object 4156 if ( obj.constructor && 4157 !hasOwn.call( obj, "constructor" ) && 4158 !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { 4159 return false; 4160 } 4161 } catch ( e ) { 4162 4163 // IE8,9 Will throw exceptions on certain host objects #9897 4164 return false; 4165 } 4166 4167 // Support: IE<9 4168 // Handle iteration over inherited properties before own properties. 4169 if ( !support.ownFirst ) { 4170 for ( key in obj ) { 4171 return hasOwn.call( obj, key ); 4172 } 4173 } 4174 4175 // Own properties are enumerated firstly, so to speed up, 4176 // if last one is own, then all properties are own. 4177 for ( key in obj ) {} 4178 4179 return key === undefined || hasOwn.call( obj, key ); 4180 }, 4181 4182 type: function( obj ) { 4183 if ( obj == null ) { 4184 return obj + ""; 4185 } 4186 return typeof obj === "object" || typeof obj === "function" ? 4187 class2type[ toString.call( obj ) ] || "object" : 4188 typeof obj; 4189 }, 4190 4191 // Workarounds based on findings by Jim Driscoll 4192 // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context 4193 globalEval: function( data ) { 4194 if ( data && jQuery.trim( data ) ) { 4195 4196 // We use execScript on Internet Explorer 4197 // We use an anonymous function so that context is window 4198 // rather than jQuery in Firefox 4199 ( window.execScript || function( data ) { 4200 window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation 4201 } )( data ); 4202 } 4203 }, 4204 4205 // Convert dashed to camelCase; used by the css and data modules 4206 // Microsoft forgot to hump their vendor prefix (#9572) 4207 camelCase: function( string ) { 4208 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 4209 }, 4210 4211 nodeName: function( elem, name ) { 4212 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 4213 }, 4214 4215 each: function( obj, callback ) { 4216 var length, i = 0; 4217 4218 if ( isArrayLike( obj ) ) { 4219 length = obj.length; 4220 for ( ; i < length; i++ ) { 4221 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 4222 break; 4223 } 4224 } 4225 } else { 4226 for ( i in obj ) { 4227 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 4228 break; 4229 } 4230 } 4231 } 4232 4233 return obj; 4234 }, 4235 4236 // Support: Android<4.1, IE<9 4237 trim: function( text ) { 4238 return text == null ? 4239 "" : 4240 ( text + "" ).replace( rtrim, "" ); 4241 }, 4242 4243 // results is for internal usage only 4244 makeArray: function( arr, results ) { 4245 var ret = results || []; 4246 4247 if ( arr != null ) { 4248 if ( isArrayLike( Object( arr ) ) ) { 4249 jQuery.merge( ret, 4250 typeof arr === "string" ? 4251 [ arr ] : arr 4252 ); 4253 } else { 4254 push.call( ret, arr ); 4255 } 4256 } 4257 4258 return ret; 4259 }, 4260 4261 inArray: function( elem, arr, i ) { 4262 var len; 4263 4264 if ( arr ) { 4265 if ( indexOf ) { 4266 return indexOf.call( arr, elem, i ); 4267 } 4268 4269 len = arr.length; 4270 i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; 4271 4272 for ( ; i < len; i++ ) { 4273 4274 // Skip accessing in sparse arrays 4275 if ( i in arr && arr[ i ] === elem ) { 4276 return i; 4277 } 4278 } 4279 } 4280 4281 return -1; 4282 }, 4283 4284 merge: function( first, second ) { 4285 var len = +second.length, 4286 j = 0, 4287 i = first.length; 4288 4289 while ( j < len ) { 4290 first[ i++ ] = second[ j++ ]; 4291 } 4292 4293 // Support: IE<9 4294 // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) 4295 if ( len !== len ) { 4296 while ( second[ j ] !== undefined ) { 4297 first[ i++ ] = second[ j++ ]; 4298 } 4299 } 4300 4301 first.length = i; 4302 4303 return first; 4304 }, 4305 4306 grep: function( elems, callback, invert ) { 4307 var callbackInverse, 4308 matches = [], 4309 i = 0, 4310 length = elems.length, 4311 callbackExpect = !invert; 4312 4313 // Go through the array, only saving the items 4314 // that pass the validator function 4315 for ( ; i < length; i++ ) { 4316 callbackInverse = !callback( elems[ i ], i ); 4317 if ( callbackInverse !== callbackExpect ) { 4318 matches.push( elems[ i ] ); 4319 } 4320 } 4321 4322 return matches; 4323 }, 4324 4325 // arg is for internal usage only 4326 map: function( elems, callback, arg ) { 4327 var length, value, 4328 i = 0, 4329 ret = []; 4330 4331 // Go through the array, translating each of the items to their new values 4332 if ( isArrayLike( elems ) ) { 4333 length = elems.length; 4334 for ( ; i < length; i++ ) { 4335 value = callback( elems[ i ], i, arg ); 4336 4337 if ( value != null ) {
vendor: 71,213 bytes, lines 4338-6666
4338 ret.push( value ); 4339 } 4340 } 4341 4342 // Go through every key on the object, 4343 } else { 4344 for ( i in elems ) { 4345 value = callback( elems[ i ], i, arg ); 4346 4347 if ( value != null ) { 4348 ret.push( value ); 4349 } 4350 } 4351 } 4352 4353 // Flatten any nested arrays 4354 return concat.apply( [], ret ); 4355 }, 4356 4357 // A global GUID counter for objects 4358 guid: 1, 4359 4360 // Bind a function to a context, optionally partially applying any 4361 // arguments. 4362 proxy: function( fn, context ) { 4363 var args, proxy, tmp; 4364 4365 if ( typeof context === "string" ) { 4366 tmp = fn[ context ]; 4367 context = fn; 4368 fn = tmp; 4369 } 4370 4371 // Quick check to determine if target is callable, in the spec 4372 // this throws a TypeError, but we will just return undefined. 4373 if ( !jQuery.isFunction( fn ) ) { 4374 return undefined; 4375 } 4376 4377 // Simulated bind 4378 args = slice.call( arguments, 2 ); 4379 proxy = function() { 4380 return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 4381 }; 4382 4383 // Set the guid of unique handler to the same of original handler, so it can be removed 4384 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 4385 4386 return proxy; 4387 }, 4388 4389 now: function() { 4390 return +( new Date() ); 4391 }, 4392 4393 // jQuery.support is not used in Core but other projects attach their 4394 // properties to it so it needs to exist. 4395 support: support 4396 } ); 4397 4398// JSHint would error on this code due to the Symbol not being defined in ES5. 4399// Defining this global in .jshintrc would create a danger of using the global 4400// unguarded in another place, it seems safer to just disable JSHint for these 4401// three lines. 4402 /* jshint ignore: start */ 4403 if ( typeof Symbol === "function" ) { 4404 jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ]; 4405 } 4406 /* jshint ignore: end */ 4407 4408// Populate the class2type map 4409 jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 4410 function( i, name ) { 4411 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 4412 } ); 4413 4414 function isArrayLike( obj ) { 4415 4416 // Support: iOS 8.2 (not reproducible in simulator) 4417 // `in` check used to prevent JIT error (gh-2145) 4418 // hasOwn isn't used here due to false negatives 4419 // regarding Nodelist length in IE 4420 var length = !!obj && "length" in obj && obj.length, 4421 type = jQuery.type( obj ); 4422 4423 if ( type === "function" || jQuery.isWindow( obj ) ) { 4424 return false; 4425 } 4426 4427 return type === "array" || length === 0 || 4428 typeof length === "number" && length > 0 && ( length - 1 ) in obj; 4429 } 4430 var Sizzle = 4431 /*! 4432 * Sizzle CSS Selector Engine v2.2.1 4433 * http://sizzlejs.com/ 4434 * 4435 * Copyright jQuery Foundation and other contributors 4436 * Released under the MIT license 4437 * http://jquery.org/license 4438 * 4439 * Date: 2015-10-17 4440 */ 4441 (function( window ) { 4442 4443 var i, 4444 support, 4445 Expr, 4446 getText, 4447 isXML, 4448 tokenize, 4449 compile, 4450 select, 4451 outermostContext, 4452 sortInput, 4453 hasDuplicate, 4454 4455 // Local document vars 4456 setDocument, 4457 document, 4458 docElem, 4459 documentIsHTML, 4460 rbuggyQSA, 4461 rbuggyMatches, 4462 matches, 4463 contains, 4464 4465 // Instance-specific data 4466 expando = "sizzle" + 1 * new Date(), 4467 preferredDoc = window.document, 4468 dirruns = 0, 4469 done = 0, 4470 classCache = createCache(), 4471 tokenCache = createCache(), 4472 compilerCache = createCache(), 4473 sortOrder = function( a, b ) { 4474 if ( a === b ) { 4475 hasDuplicate = true; 4476 } 4477 return 0; 4478 }, 4479 4480 // General-purpose constants 4481 MAX_NEGATIVE = 1 << 31, 4482 4483 // Instance methods 4484 hasOwn = ({}).hasOwnProperty, 4485 arr = [], 4486 pop = arr.pop, 4487 push_native = arr.push, 4488 push = arr.push, 4489 slice = arr.slice, 4490 // Use a stripped-down indexOf as it's faster than native 4491 // http://jsperf.com/thor-indexof-vs-for/5 4492 indexOf = function( list, elem ) { 4493 var i = 0, 4494 len = list.length; 4495 for ( ; i < len; i++ ) { 4496 if ( list[i] === elem ) { 4497 return i; 4498 } 4499 } 4500 return -1; 4501 }, 4502 4503 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 4504 4505 // Regular expressions 4506 4507 // http://www.w3.org/TR/css3-selectors/#whitespace 4508 whitespace = "[\\x20\\t\\r\\n\\f]", 4509 4510 // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 4511 identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", 4512 4513 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 4514 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 4515 // Operator (capture 2) 4516 "*([*^$|!~]?=)" + whitespace + 4517 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 4518 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + 4519 "*\\]", 4520 4521 pseudos = ":(" + identifier + ")(?:\\((" + 4522 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 4523 // 1. quoted (capture 3; capture 4 or capture 5) 4524 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 4525 // 2. simple (capture 6) 4526 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 4527 // 3. anything else (capture 2) 4528 ".*" + 4529 ")\\)|)", 4530 4531 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 4532 rwhitespace = new RegExp( whitespace + "+", "g" ), 4533 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), 4534 4535 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 4536 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), 4537 4538 rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), 4539 4540 rpseudo = new RegExp( pseudos ), 4541 ridentifier = new RegExp( "^" + identifier + "$" ), 4542 4543 matchExpr = { 4544 "ID": new RegExp( "^#(" + identifier + ")" ), 4545 "CLASS": new RegExp( "^\\.(" + identifier + ")" ), 4546 "TAG": new RegExp( "^(" + identifier + "|[*])" ), 4547 "ATTR": new RegExp( "^" + attributes ), 4548 "PSEUDO": new RegExp( "^" + pseudos ), 4549 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + 4550 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + 4551 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 4552 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 4553 // For use in libraries implementing .is() 4554 // We use this for POS matching in `select` 4555 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + 4556 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 4557 }, 4558 4559 rinputs = /^(?:input|select|textarea|button)$/i, 4560 rheader = /^h\d$/i, 4561 4562 rnative = /^[^{]+\{\s*\[native \w/, 4563 4564 // Easily-parseable/retrievable ID or TAG or CLASS selectors 4565 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 4566 4567 rsibling = /[+~]/, 4568 rescape = /'|\\/g, 4569 4570 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 4571 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), 4572 funescape = function( _, escaped, escapedWhitespace ) { 4573 var high = "0x" + escaped - 0x10000; 4574 // NaN means non-codepoint 4575 // Support: Firefox<24 4576 // Workaround erroneous numeric interpretation of +"0x" 4577 return high !== high || escapedWhitespace ? 4578 escaped : 4579 high < 0 ? 4580 // BMP codepoint 4581 String.fromCharCode( high + 0x10000 ) : 4582 // Supplemental Plane codepoint (surrogate pair) 4583 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 4584 }, 4585 4586 // Used for iframes 4587 // See setDocument() 4588 // Removing the function wrapper causes a "Permission Denied" 4589 // error in IE 4590 unloadHandler = function() { 4591 setDocument(); 4592 }; 4593 4594// Optimize for push.apply( _, NodeList ) 4595 try { 4596 push.apply( 4597 (arr = slice.call( preferredDoc.childNodes )), 4598 preferredDoc.childNodes 4599 ); 4600 // Support: Android<4.0 4601 // Detect silently failing push.apply 4602 arr[ preferredDoc.childNodes.length ].nodeType; 4603 } catch ( e ) { 4604 push = { apply: arr.length ? 4605 4606 // Leverage slice if possible 4607 function( target, els ) { 4608 push_native.apply( target, slice.call(els) ); 4609 } : 4610 4611 // Support: IE<9 4612 // Otherwise append directly 4613 function( target, els ) { 4614 var j = target.length, 4615 i = 0; 4616 // Can't trust NodeList.length 4617 while ( (target[j++] = els[i++]) ) {} 4618 target.length = j - 1; 4619 } 4620 }; 4621 } 4622 4623 function Sizzle( selector, context, results, seed ) { 4624 var m, i, elem, nid, nidselect, match, groups, newSelector, 4625 newContext = context && context.ownerDocument, 4626 4627 // nodeType defaults to 9, since context defaults to document 4628 nodeType = context ? context.nodeType : 9; 4629 4630 results = results || []; 4631 4632 // Return early from calls with invalid selector or context 4633 if ( typeof selector !== "string" || !selector || 4634 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { 4635 4636 return results; 4637 } 4638 4639 // Try to shortcut find operations (as opposed to filters) in HTML documents 4640 if ( !seed ) { 4641 4642 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { 4643 setDocument( context ); 4644 } 4645 context = context || document; 4646 4647 if ( documentIsHTML ) { 4648 4649 // If the selector is sufficiently simple, try using a "get*By*" DOM method 4650 // (excepting DocumentFragment context, where the methods don't exist) 4651 if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { 4652 4653 // ID selector 4654 if ( (m = match[1]) ) { 4655 4656 // Document context 4657 if ( nodeType === 9 ) { 4658 if ( (elem = context.getElementById( m )) ) { 4659 4660 // Support: IE, Opera, Webkit 4661 // TODO: identify versions 4662 // getElementById can match elements by name instead of ID 4663 if ( elem.id === m ) { 4664 results.push( elem ); 4665 return results; 4666 } 4667 } else { 4668 return results; 4669 } 4670 4671 // Element context 4672 } else { 4673 4674 // Support: IE, Opera, Webkit 4675 // TODO: identify versions 4676 // getElementById can match elements by name instead of ID 4677 if ( newContext && (elem = newContext.getElementById( m )) && 4678 contains( context, elem ) && 4679 elem.id === m ) { 4680 4681 results.push( elem ); 4682 return results; 4683 } 4684 } 4685 4686 // Type selector 4687 } else if ( match[2] ) { 4688 push.apply( results, context.getElementsByTagName( selector ) ); 4689 return results; 4690 4691 // Class selector 4692 } else if ( (m = match[3]) && support.getElementsByClassName && 4693 context.getElementsByClassName ) { 4694 4695 push.apply( results, context.getElementsByClassName( m ) ); 4696 return results; 4697 } 4698 } 4699 4700 // Take advantage of querySelectorAll 4701 if ( support.qsa && 4702 !compilerCache[ selector + " " ] && 4703 (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { 4704 4705 if ( nodeType !== 1 ) { 4706 newContext = context; 4707 newSelector = selector; 4708 4709 // qSA looks outside Element context, which is not what we want 4710 // Thanks to Andrew Dupont for this workaround technique 4711 // Support: IE <=8 4712 // Exclude object elements 4713 } else if ( context.nodeName.toLowerCase() !== "object" ) { 4714 4715 // Capture the context ID, setting it first if necessary 4716 if ( (nid = context.getAttribute( "id" )) ) { 4717 nid = nid.replace( rescape, "\\$&" ); 4718 } else { 4719 context.setAttribute( "id", (nid = expando) ); 4720 } 4721 4722 // Prefix every selector in the list 4723 groups = tokenize( selector ); 4724 i = groups.length; 4725 nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; 4726 while ( i-- ) { 4727 groups[i] = nidselect + " " + toSelector( groups[i] ); 4728 } 4729 newSelector = groups.join( "," ); 4730 4731 // Expand context for sibling selectors 4732 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || 4733 context; 4734 } 4735 4736 if ( newSelector ) { 4737 try { 4738 push.apply( results, 4739 newContext.querySelectorAll( newSelector ) 4740 ); 4741 return results; 4742 } catch ( qsaError ) { 4743 } finally { 4744 if ( nid === expando ) { 4745 context.removeAttribute( "id" ); 4746 } 4747 } 4748 } 4749 } 4750 } 4751 } 4752 4753 // All others 4754 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 4755 } 4756 4757 /** 4758 * Create key-value caches of limited size 4759 * @returns {function(string, object)} Returns the Object data after storing it on itself with 4760 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 4761 * deleting the oldest entry 4762 */ 4763 function createCache() { 4764 var keys = []; 4765 4766 function cache( key, value ) { 4767 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 4768 if ( keys.push( key + " " ) > Expr.cacheLength ) { 4769 // Only keep the most recent entries 4770 delete cache[ keys.shift() ]; 4771 } 4772 return (cache[ key + " " ] = value); 4773 } 4774 return cache; 4775 } 4776 4777 /** 4778 * Mark a function for special use by Sizzle 4779 * @param {Function} fn The function to mark 4780 */ 4781 function markFunction( fn ) { 4782 fn[ expando ] = true; 4783 return fn; 4784 } 4785 4786 /** 4787 * Support testing using an element 4788 * @param {Function} fn Passed the created div and expects a boolean result 4789 */ 4790 function assert( fn ) { 4791 var div = document.createElement("div"); 4792 4793 try { 4794 return !!fn( div ); 4795 } catch (e) { 4796 return false; 4797 } finally { 4798 // Remove from its parent by default 4799 if ( div.parentNode ) { 4800 div.parentNode.removeChild( div ); 4801 } 4802 // release memory in IE 4803 div = null; 4804 } 4805 } 4806 4807 /** 4808 * Adds the same handler for all of the specified attrs 4809 * @param {String} attrs Pipe-separated list of attributes 4810 * @param {Function} handler The method that will be applied 4811 */ 4812 function addHandle( attrs, handler ) { 4813 var arr = attrs.split("|"), 4814 i = arr.length; 4815 4816 while ( i-- ) { 4817 Expr.attrHandle[ arr[i] ] = handler; 4818 } 4819 } 4820 4821 /** 4822 * Checks document order of two siblings 4823 * @param {Element} a 4824 * @param {Element} b 4825 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 4826 */ 4827 function siblingCheck( a, b ) { 4828 var cur = b && a, 4829 diff = cur && a.nodeType === 1 && b.nodeType === 1 && 4830 ( ~b.sourceIndex || MAX_NEGATIVE ) - 4831 ( ~a.sourceIndex || MAX_NEGATIVE ); 4832 4833 // Use IE sourceIndex if available on both nodes 4834 if ( diff ) { 4835 return diff; 4836 } 4837 4838 // Check if b follows a 4839 if ( cur ) { 4840 while ( (cur = cur.nextSibling) ) { 4841 if ( cur === b ) { 4842 return -1; 4843 } 4844 } 4845 } 4846 4847 return a ? 1 : -1; 4848 } 4849 4850 /** 4851 * Returns a function to use in pseudos for input types 4852 * @param {String} type 4853 */ 4854 function createInputPseudo( type ) { 4855 return function( elem ) { 4856 var name = elem.nodeName.toLowerCase(); 4857 return name === "input" && elem.type === type; 4858 }; 4859 } 4860 4861 /** 4862 * Returns a function to use in pseudos for buttons 4863 * @param {String} type 4864 */ 4865 function createButtonPseudo( type ) { 4866 return function( elem ) { 4867 var name = elem.nodeName.toLowerCase(); 4868 return (name === "input" || name === "button") && elem.type === type; 4869 }; 4870 } 4871 4872 /** 4873 * Returns a function to use in pseudos for positionals 4874 * @param {Function} fn 4875 */ 4876 function createPositionalPseudo( fn ) { 4877 return markFunction(function( argument ) { 4878 argument = +argument; 4879 return markFunction(function( seed, matches ) { 4880 var j, 4881 matchIndexes = fn( [], seed.length, argument ), 4882 i = matchIndexes.length; 4883 4884 // Match elements found at the specified indexes 4885 while ( i-- ) { 4886 if ( seed[ (j = matchIndexes[i]) ] ) { 4887 seed[j] = !(matches[j] = seed[j]); 4888 } 4889 } 4890 }); 4891 }); 4892 } 4893 4894 /** 4895 * Checks a node for validity as a Sizzle context 4896 * @param {Element|Object=} context 4897 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 4898 */ 4899 function testContext( context ) { 4900 return context && typeof context.getElementsByTagName !== "undefined" && context; 4901 } 4902 4903// Expose support vars for convenience 4904 support = Sizzle.support = {}; 4905 4906 /** 4907 * Detects XML nodes 4908 * @param {Element|Object} elem An element or a document 4909 * @returns {Boolean} True iff elem is a non-HTML XML node 4910 */ 4911 isXML = Sizzle.isXML = function( elem ) { 4912 // documentElement is verified for cases where it doesn't yet exist 4913 // (such as loading iframes in IE - #4833) 4914 var documentElement = elem && (elem.ownerDocument || elem).documentElement; 4915 return documentElement ? documentElement.nodeName !== "HTML" : false; 4916 }; 4917 4918 /** 4919 * Sets document-related variables once based on the current document 4920 * @param {Element|Object} [doc] An element or document object to use to set the document 4921 * @returns {Object} Returns the current document 4922 */ 4923 setDocument = Sizzle.setDocument = function( node ) { 4924 var hasCompare, parent, 4925 doc = node ? node.ownerDocument || node : preferredDoc; 4926 4927 // Return early if doc is invalid or already selected 4928 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { 4929 return document; 4930 } 4931 4932 // Update global variables 4933 document = doc; 4934 docElem = document.documentElement; 4935 documentIsHTML = !isXML( document ); 4936 4937 // Support: IE 9-11, Edge 4938 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 4939 if ( (parent = document.defaultView) && parent.top !== parent ) { 4940 // Support: IE 11 4941 if ( parent.addEventListener ) { 4942 parent.addEventListener( "unload", unloadHandler, false ); 4943 4944 // Support: IE 9 - 10 only 4945 } else if ( parent.attachEvent ) { 4946 parent.attachEvent( "onunload", unloadHandler ); 4947 } 4948 } 4949 4950 /* Attributes 4951 ---------------------------------------------------------------------- */ 4952 4953 // Support: IE<8 4954 // Verify that getAttribute really returns attributes and not properties 4955 // (excepting IE8 booleans) 4956 support.attributes = assert(function( div ) { 4957 div.className = "i"; 4958 return !div.getAttribute("className"); 4959 }); 4960 4961 /* getElement(s)By* 4962 ---------------------------------------------------------------------- */ 4963 4964 // Check if getElementsByTagName("*") returns only elements 4965 support.getElementsByTagName = assert(function( div ) { 4966 div.appendChild( document.createComment("") ); 4967 return !div.getElementsByTagName("*").length; 4968 }); 4969 4970 // Support: IE<9 4971 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); 4972 4973 // Support: IE<10 4974 // Check if getElementById returns elements by name 4975 // The broken getElementById methods don't pick up programatically-set names, 4976 // so use a roundabout getElementsByName test 4977 support.getById = assert(function( div ) { 4978 docElem.appendChild( div ).id = expando; 4979 return !document.getElementsByName || !document.getElementsByName( expando ).length; 4980 }); 4981 4982 // ID find and filter 4983 if ( support.getById ) { 4984 Expr.find["ID"] = function( id, context ) { 4985 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 4986 var m = context.getElementById( id ); 4987 return m ? [ m ] : []; 4988 } 4989 }; 4990 Expr.filter["ID"] = function( id ) { 4991 var attrId = id.replace( runescape, funescape ); 4992 return function( elem ) { 4993 return elem.getAttribute("id") === attrId; 4994 }; 4995 }; 4996 } else { 4997 // Support: IE6/7 4998 // getElementById is not reliable as a find shortcut 4999 delete Expr.find["ID"]; 5000 5001 Expr.filter["ID"] = function( id ) { 5002 var attrId = id.replace( runescape, funescape ); 5003 return function( elem ) { 5004 var node = typeof elem.getAttributeNode !== "undefined" && 5005 elem.getAttributeNode("id"); 5006 return node && node.value === attrId; 5007 }; 5008 }; 5009 } 5010 5011 // Tag 5012 Expr.find["TAG"] = support.getElementsByTagName ? 5013 function( tag, context ) { 5014 if ( typeof context.getElementsByTagName !== "undefined" ) { 5015 return context.getElementsByTagName( tag ); 5016 5017 // DocumentFragment nodes don't have gEBTN 5018 } else if ( support.qsa ) { 5019 return context.querySelectorAll( tag ); 5020 } 5021 } : 5022 5023 function( tag, context ) { 5024 var elem, 5025 tmp = [], 5026 i = 0, 5027 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 5028 results = context.getElementsByTagName( tag ); 5029 5030 // Filter out possible comments 5031 if ( tag === "*" ) { 5032 while ( (elem = results[i++]) ) { 5033 if ( elem.nodeType === 1 ) { 5034 tmp.push( elem ); 5035 } 5036 } 5037 5038 return tmp; 5039 } 5040 return results; 5041 }; 5042 5043 // Class 5044 Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { 5045 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { 5046 return context.getElementsByClassName( className ); 5047 } 5048 }; 5049 5050 /* QSA/matchesSelector 5051 ---------------------------------------------------------------------- */ 5052 5053 // QSA and matchesSelector support 5054 5055 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 5056 rbuggyMatches = []; 5057 5058 // qSa(:focus) reports false when true (Chrome 21) 5059 // We allow this because of a bug in IE8/9 that throws an error 5060 // whenever `document.activeElement` is accessed on an iframe 5061 // So, we allow :focus to pass through QSA all the time to avoid the IE error 5062 // See http://bugs.jquery.com/ticket/13378 5063 rbuggyQSA = []; 5064 5065 if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { 5066 // Build QSA regex 5067 // Regex strategy adopted from Diego Perini 5068 assert(function( div ) { 5069 // Select is set to empty string on purpose 5070 // This is to test IE's treatment of not explicitly 5071 // setting a boolean content attribute, 5072 // since its presence should be enough 5073 // http://bugs.jquery.com/ticket/12359 5074 docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + 5075 "<select id='" + expando + "-\r\\' msallowcapture=''>" + 5076 "<option selected=''></option></select>"; 5077 5078 // Support: IE8, Opera 11-12.16 5079 // Nothing should be selected when empty strings follow ^= or $= or *= 5080 // The test attribute must be unknown in Opera but "safe" for WinRT 5081 // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 5082 if ( div.querySelectorAll("[msallowcapture^='']").length ) { 5083 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 5084 } 5085 5086 // Support: IE8 5087 // Boolean attributes and "value" are not treated correctly 5088 if ( !div.querySelectorAll("[selected]").length ) { 5089 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 5090 } 5091 5092 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 5093 if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { 5094 rbuggyQSA.push("~="); 5095 } 5096 5097 // Webkit/Opera - :checked should return selected option elements 5098 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 5099 // IE8 throws error here and will not see later tests 5100 if ( !div.querySelectorAll(":checked").length ) { 5101 rbuggyQSA.push(":checked"); 5102 } 5103 5104 // Support: Safari 8+, iOS 8+ 5105 // https://bugs.webkit.org/show_bug.cgi?id=136851 5106 // In-page `selector#id sibing-combinator selector` fails 5107 if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { 5108 rbuggyQSA.push(".#.+[+~]"); 5109 } 5110 }); 5111 5112 assert(function( div ) { 5113 // Support: Windows 8 Native Apps 5114 // The type and name attributes are restricted during .innerHTML assignment 5115 var input = document.createElement("input"); 5116 input.setAttribute( "type", "hidden" ); 5117 div.appendChild( input ).setAttribute( "name", "D" ); 5118 5119 // Support: IE8 5120 // Enforce case-sensitivity of name attribute 5121 if ( div.querySelectorAll("[name=d]").length ) { 5122 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 5123 } 5124 5125 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 5126 // IE8 throws error here and will not see later tests 5127 if ( !div.querySelectorAll(":enabled").length ) { 5128 rbuggyQSA.push( ":enabled", ":disabled" ); 5129 } 5130 5131 // Opera 10-11 does not throw on post-comma invalid pseudos 5132 div.querySelectorAll("*,:x"); 5133 rbuggyQSA.push(",.*:"); 5134 }); 5135 } 5136 5137 if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || 5138 docElem.webkitMatchesSelector || 5139 docElem.mozMatchesSelector || 5140 docElem.oMatchesSelector || 5141 docElem.msMatchesSelector) )) ) { 5142 5143 assert(function( div ) { 5144 // Check to see if it's possible to do matchesSelector 5145 // on a disconnected node (IE 9) 5146 support.disconnectedMatch = matches.call( div, "div" ); 5147 5148 // This should fail with an exception 5149 // Gecko does not error, returns false instead 5150 matches.call( div, "[s!='']:x" ); 5151 rbuggyMatches.push( "!=", pseudos ); 5152 }); 5153 } 5154 5155 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); 5156 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); 5157 5158 /* Contains 5159 ---------------------------------------------------------------------- */ 5160 hasCompare = rnative.test( docElem.compareDocumentPosition ); 5161 5162 // Element contains another 5163 // Purposefully self-exclusive 5164 // As in, an element does not contain itself 5165 contains = hasCompare || rnative.test( docElem.contains ) ? 5166 function( a, b ) { 5167 var adown = a.nodeType === 9 ? a.documentElement : a, 5168 bup = b && b.parentNode; 5169 return a === bup || !!( bup && bup.nodeType === 1 && ( 5170 adown.contains ? 5171 adown.contains( bup ) : 5172 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 5173 )); 5174 } : 5175 function( a, b ) { 5176 if ( b ) { 5177 while ( (b = b.parentNode) ) { 5178 if ( b === a ) { 5179 return true; 5180 } 5181 } 5182 } 5183 return false; 5184 }; 5185 5186 /* Sorting 5187 ---------------------------------------------------------------------- */ 5188 5189 // Document order sorting 5190 sortOrder = hasCompare ? 5191 function( a, b ) { 5192 5193 // Flag for duplicate removal 5194 if ( a === b ) { 5195 hasDuplicate = true; 5196 return 0; 5197 } 5198 5199 // Sort on method existence if only one input has compareDocumentPosition 5200 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 5201 if ( compare ) { 5202 return compare; 5203 } 5204 5205 // Calculate position if both inputs belong to the same document 5206 compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? 5207 a.compareDocumentPosition( b ) : 5208 5209 // Otherwise we know they are disconnected 5210 1; 5211 5212 // Disconnected nodes 5213 if ( compare & 1 || 5214 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { 5215 5216 // Choose the first element that is related to our preferred document 5217 if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { 5218 return -1; 5219 } 5220 if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { 5221 return 1; 5222 } 5223 5224 // Maintain original order 5225 return sortInput ? 5226 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 5227 0; 5228 } 5229 5230 return compare & 4 ? -1 : 1; 5231 } : 5232 function( a, b ) { 5233 // Exit early if the nodes are identical 5234 if ( a === b ) { 5235 hasDuplicate = true; 5236 return 0; 5237 } 5238 5239 var cur, 5240 i = 0, 5241 aup = a.parentNode, 5242 bup = b.parentNode, 5243 ap = [ a ], 5244 bp = [ b ]; 5245 5246 // Parentless nodes are either documents or disconnected 5247 if ( !aup || !bup ) { 5248 return a === document ? -1 : 5249 b === document ? 1 : 5250 aup ? -1 : 5251 bup ? 1 : 5252 sortInput ? 5253 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 5254 0; 5255 5256 // If the nodes are siblings, we can do a quick check 5257 } else if ( aup === bup ) { 5258 return siblingCheck( a, b ); 5259 } 5260 5261 // Otherwise we need full lists of their ancestors for comparison 5262 cur = a; 5263 while ( (cur = cur.parentNode) ) { 5264 ap.unshift( cur ); 5265 } 5266 cur = b; 5267 while ( (cur = cur.parentNode) ) { 5268 bp.unshift( cur ); 5269 } 5270 5271 // Walk down the tree looking for a discrepancy 5272 while ( ap[i] === bp[i] ) { 5273 i++; 5274 } 5275 5276 return i ? 5277 // Do a sibling check if the nodes have a common ancestor 5278 siblingCheck( ap[i], bp[i] ) : 5279 5280 // Otherwise nodes in our document sort first 5281 ap[i] === preferredDoc ? -1 : 5282 bp[i] === preferredDoc ? 1 : 5283 0; 5284 }; 5285 5286 return document; 5287 }; 5288 5289 Sizzle.matches = function( expr, elements ) { 5290 return Sizzle( expr, null, null, elements ); 5291 }; 5292 5293 Sizzle.matchesSelector = function( elem, expr ) { 5294 // Set document vars if needed 5295 if ( ( elem.ownerDocument || elem ) !== document ) { 5296 setDocument( elem ); 5297 } 5298 5299 // Make sure that attribute selectors are quoted 5300 expr = expr.replace( rattributeQuotes, "='$1']" ); 5301 5302 if ( support.matchesSelector && documentIsHTML && 5303 !compilerCache[ expr + " " ] && 5304 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 5305 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 5306 5307 try { 5308 var ret = matches.call( elem, expr ); 5309 5310 // IE 9's matchesSelector returns false on disconnected nodes 5311 if ( ret || support.disconnectedMatch || 5312 // As well, disconnected nodes are said to be in a document 5313 // fragment in IE 9 5314 elem.document && elem.document.nodeType !== 11 ) { 5315 return ret; 5316 } 5317 } catch (e) {} 5318 } 5319 5320 return Sizzle( expr, document, null, [ elem ] ).length > 0; 5321 }; 5322 5323 Sizzle.contains = function( context, elem ) { 5324 // Set document vars if needed 5325 if ( ( context.ownerDocument || context ) !== document ) { 5326 setDocument( context ); 5327 } 5328 return contains( context, elem ); 5329 }; 5330 5331 Sizzle.attr = function( elem, name ) { 5332 // Set document vars if needed 5333 if ( ( elem.ownerDocument || elem ) !== document ) { 5334 setDocument( elem ); 5335 } 5336 5337 var fn = Expr.attrHandle[ name.toLowerCase() ], 5338 // Don't get fooled by Object.prototype properties (jQuery #13807) 5339 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 5340 fn( elem, name, !documentIsHTML ) : 5341 undefined; 5342 5343 return val !== undefined ? 5344 val : 5345 support.attributes || !documentIsHTML ? 5346 elem.getAttribute( name ) : 5347 (val = elem.getAttributeNode(name)) && val.specified ? 5348 val.value : 5349 null; 5350 }; 5351 5352 Sizzle.error = function( msg ) { 5353 throw new Error( "Syntax error, unrecognized expression: " + msg ); 5354 }; 5355 5356 /** 5357 * Document sorting and removing duplicates 5358 * @param {ArrayLike} results 5359 */ 5360 Sizzle.uniqueSort = function( results ) { 5361 var elem, 5362 duplicates = [], 5363 j = 0, 5364 i = 0; 5365 5366 // Unless we *know* we can detect duplicates, assume their presence 5367 hasDuplicate = !support.detectDuplicates; 5368 sortInput = !support.sortStable && results.slice( 0 ); 5369 results.sort( sortOrder ); 5370 5371 if ( hasDuplicate ) { 5372 while ( (elem = results[i++]) ) { 5373 if ( elem === results[ i ] ) { 5374 j = duplicates.push( i ); 5375 } 5376 } 5377 while ( j-- ) { 5378 results.splice( duplicates[ j ], 1 ); 5379 } 5380 } 5381 5382 // Clear input after sorting to release objects 5383 // See https://github.com/jquery/sizzle/pull/225 5384 sortInput = null; 5385 5386 return results; 5387 }; 5388 5389 /** 5390 * Utility function for retrieving the text value of an array of DOM nodes 5391 * @param {Array|Element} elem 5392 */ 5393 getText = Sizzle.getText = function( elem ) { 5394 var node, 5395 ret = "", 5396 i = 0, 5397 nodeType = elem.nodeType; 5398 5399 if ( !nodeType ) { 5400 // If no nodeType, this is expected to be an array 5401 while ( (node = elem[i++]) ) { 5402 // Do not traverse comment nodes 5403 ret += getText( node ); 5404 } 5405 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 5406 // Use textContent for elements 5407 // innerText usage removed for consistency of new lines (jQuery #11153) 5408 if ( typeof elem.textContent === "string" ) { 5409 return elem.textContent; 5410 } else { 5411 // Traverse its children 5412 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 5413 ret += getText( elem ); 5414 } 5415 } 5416 } else if ( nodeType === 3 || nodeType === 4 ) { 5417 return elem.nodeValue; 5418 } 5419 // Do not include comment or processing instruction nodes 5420 5421 return ret; 5422 }; 5423 5424 Expr = Sizzle.selectors = { 5425 5426 // Can be adjusted by the user 5427 cacheLength: 50, 5428 5429 createPseudo: markFunction, 5430 5431 match: matchExpr, 5432 5433 attrHandle: {}, 5434 5435 find: {}, 5436 5437 relative: { 5438 ">": { dir: "parentNode", first: true }, 5439 " ": { dir: "parentNode" }, 5440 "+": { dir: "previousSibling", first: true }, 5441 "~": { dir: "previousSibling" } 5442 }, 5443 5444 preFilter: { 5445 "ATTR": function( match ) { 5446 match[1] = match[1].replace( runescape, funescape ); 5447 5448 // Move the given value to match[3] whether quoted or unquoted 5449 match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); 5450 5451 if ( match[2] === "~=" ) { 5452 match[3] = " " + match[3] + " "; 5453 } 5454 5455 return match.slice( 0, 4 ); 5456 }, 5457 5458 "CHILD": function( match ) { 5459 /* matches from matchExpr["CHILD"] 5460 1 type (only|nth|...) 5461 2 what (child|of-type) 5462 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 5463 4 xn-component of xn+y argument ([+-]?\d*n|) 5464 5 sign of xn-component 5465 6 x of xn-component 5466 7 sign of y-component 5467 8 y of y-component 5468 */ 5469 match[1] = match[1].toLowerCase(); 5470 5471 if ( match[1].slice( 0, 3 ) === "nth" ) { 5472 // nth-* requires argument 5473 if ( !match[3] ) { 5474 Sizzle.error( match[0] ); 5475 } 5476 5477 // numeric x and y parameters for Expr.filter.CHILD 5478 // remember that false/true cast respectively to 0/1 5479 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); 5480 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); 5481 5482 // other types prohibit arguments 5483 } else if ( match[3] ) { 5484 Sizzle.error( match[0] ); 5485 } 5486 5487 return match; 5488 }, 5489 5490 "PSEUDO": function( match ) { 5491 var excess, 5492 unquoted = !match[6] && match[2]; 5493 5494 if ( matchExpr["CHILD"].test( match[0] ) ) { 5495 return null; 5496 } 5497 5498 // Accept quoted arguments as-is 5499 if ( match[3] ) { 5500 match[2] = match[4] || match[5] || ""; 5501 5502 // Strip excess characters from unquoted arguments 5503 } else if ( unquoted && rpseudo.test( unquoted ) && 5504 // Get excess from tokenize (recursively) 5505 (excess = tokenize( unquoted, true )) && 5506 // advance to the next closing parenthesis 5507 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { 5508 5509 // excess is a negative index 5510 match[0] = match[0].slice( 0, excess ); 5511 match[2] = unquoted.slice( 0, excess ); 5512 } 5513 5514 // Return only captures needed by the pseudo filter method (type and argument) 5515 return match.slice( 0, 3 ); 5516 } 5517 }, 5518 5519 filter: { 5520 5521 "TAG": function( nodeNameSelector ) { 5522 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 5523 return nodeNameSelector === "*" ? 5524 function() { return true; } : 5525 function( elem ) { 5526 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 5527 }; 5528 }, 5529 5530 "CLASS": function( className ) { 5531 var pattern = classCache[ className + " " ]; 5532 5533 return pattern || 5534 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && 5535 classCache( className, function( elem ) { 5536 return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); 5537 }); 5538 }, 5539 5540 "ATTR": function( name, operator, check ) { 5541 return function( elem ) { 5542 var result = Sizzle.attr( elem, name ); 5543 5544 if ( result == null ) { 5545 return operator === "!="; 5546 } 5547 if ( !operator ) { 5548 return true; 5549 } 5550 5551 result += ""; 5552 5553 return operator === "=" ? result === check : 5554 operator === "!=" ? result !== check : 5555 operator === "^=" ? check && result.indexOf( check ) === 0 : 5556 operator === "*=" ? check && result.indexOf( check ) > -1 : 5557 operator === "$=" ? check && result.slice( -check.length ) === check : 5558 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : 5559 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 5560 false; 5561 }; 5562 }, 5563 5564 "CHILD": function( type, what, argument, first, last ) { 5565 var simple = type.slice( 0, 3 ) !== "nth", 5566 forward = type.slice( -4 ) !== "last", 5567 ofType = what === "of-type"; 5568 5569 return first === 1 && last === 0 ? 5570 5571 // Shortcut for :nth-*(n) 5572 function( elem ) { 5573 return !!elem.parentNode; 5574 } : 5575 5576 function( elem, context, xml ) { 5577 var cache, uniqueCache, outerCache, node, nodeIndex, start, 5578 dir = simple !== forward ? "nextSibling" : "previousSibling", 5579 parent = elem.parentNode, 5580 name = ofType && elem.nodeName.toLowerCase(), 5581 useCache = !xml && !ofType, 5582 diff = false; 5583 5584 if ( parent ) { 5585 5586 // :(first|last|only)-(child|of-type) 5587 if ( simple ) { 5588 while ( dir ) { 5589 node = elem; 5590 while ( (node = node[ dir ]) ) { 5591 if ( ofType ? 5592 node.nodeName.toLowerCase() === name : 5593 node.nodeType === 1 ) { 5594 5595 return false; 5596 } 5597 } 5598 // Reverse direction for :only-* (if we haven't yet done so) 5599 start = dir = type === "only" && !start && "nextSibling"; 5600 } 5601 return true; 5602 } 5603 5604 start = [ forward ? parent.firstChild : parent.lastChild ]; 5605 5606 // non-xml :nth-child(...) stores cache data on `parent` 5607 if ( forward && useCache ) { 5608 5609 // Seek `elem` from a previously-cached index 5610 5611 // ...in a gzip-friendly way 5612 node = parent; 5613 outerCache = node[ expando ] || (node[ expando ] = {}); 5614 5615 // Support: IE <9 only 5616 // Defend against cloned attroperties (jQuery gh-1709) 5617 uniqueCache = outerCache[ node.uniqueID ] || 5618 (outerCache[ node.uniqueID ] = {}); 5619 5620 cache = uniqueCache[ type ] || []; 5621 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 5622 diff = nodeIndex && cache[ 2 ]; 5623 node = nodeIndex && parent.childNodes[ nodeIndex ]; 5624 5625 while ( (node = ++nodeIndex && node && node[ dir ] || 5626 5627 // Fallback to seeking `elem` from the start 5628 (diff = nodeIndex = 0) || start.pop()) ) { 5629 5630 // When found, cache indexes on `parent` and break 5631 if ( node.nodeType === 1 && ++diff && node === elem ) { 5632 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; 5633 break; 5634 } 5635 } 5636 5637 } else { 5638 // Use previously-cached element index if available 5639 if ( useCache ) { 5640 // ...in a gzip-friendly way 5641 node = elem; 5642 outerCache = node[ expando ] || (node[ expando ] = {}); 5643 5644 // Support: IE <9 only 5645 // Defend against cloned attroperties (jQuery gh-1709) 5646 uniqueCache = outerCache[ node.uniqueID ] || 5647 (outerCache[ node.uniqueID ] = {}); 5648 5649 cache = uniqueCache[ type ] || []; 5650 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 5651 diff = nodeIndex; 5652 } 5653 5654 // xml :nth-child(...) 5655 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 5656 if ( diff === false ) { 5657 // Use the same loop as above to seek `elem` from the start 5658 while ( (node = ++nodeIndex && node && node[ dir ] || 5659 (diff = nodeIndex = 0) || start.pop()) ) { 5660 5661 if ( ( ofType ? 5662 node.nodeName.toLowerCase() === name : 5663 node.nodeType === 1 ) && 5664 ++diff ) { 5665 5666 // Cache the index of each encountered element 5667 if ( useCache ) { 5668 outerCache = node[ expando ] || (node[ expando ] = {}); 5669 5670 // Support: IE <9 only 5671 // Defend against cloned attroperties (jQuery gh-1709) 5672 uniqueCache = outerCache[ node.uniqueID ] || 5673 (outerCache[ node.uniqueID ] = {}); 5674 5675 uniqueCache[ type ] = [ dirruns, diff ]; 5676 } 5677 5678 if ( node === elem ) { 5679 break; 5680 } 5681 } 5682 } 5683 } 5684 } 5685 5686 // Incorporate the offset, then check against cycle size 5687 diff -= last; 5688 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 5689 } 5690 }; 5691 }, 5692 5693 "PSEUDO": function( pseudo, argument ) { 5694 // pseudo-class names are case-insensitive 5695 // http://www.w3.org/TR/selectors/#pseudo-classes 5696 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 5697 // Remember that setFilters inherits from pseudos 5698 var args, 5699 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 5700 Sizzle.error( "unsupported pseudo: " + pseudo ); 5701 5702 // The user may use createPseudo to indicate that 5703 // arguments are needed to create the filter function 5704 // just as Sizzle does 5705 if ( fn[ expando ] ) { 5706 return fn( argument ); 5707 } 5708 5709 // But maintain support for old signatures 5710 if ( fn.length > 1 ) { 5711 args = [ pseudo, pseudo, "", argument ]; 5712 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 5713 markFunction(function( seed, matches ) { 5714 var idx, 5715 matched = fn( seed, argument ), 5716 i = matched.length; 5717 while ( i-- ) { 5718 idx = indexOf( seed, matched[i] ); 5719 seed[ idx ] = !( matches[ idx ] = matched[i] ); 5720 } 5721 }) : 5722 function( elem ) { 5723 return fn( elem, 0, args ); 5724 }; 5725 } 5726 5727 return fn; 5728 } 5729 }, 5730 5731 pseudos: { 5732 // Potentially complex pseudos 5733 "not": markFunction(function( selector ) { 5734 // Trim the selector passed to compile 5735 // to avoid treating leading and trailing 5736 // spaces as combinators 5737 var input = [], 5738 results = [], 5739 matcher = compile( selector.replace( rtrim, "$1" ) ); 5740 5741 return matcher[ expando ] ? 5742 markFunction(function( seed, matches, context, xml ) { 5743 var elem, 5744 unmatched = matcher( seed, null, xml, [] ), 5745 i = seed.length; 5746 5747 // Match elements unmatched by `matcher` 5748 while ( i-- ) { 5749 if ( (elem = unmatched[i]) ) { 5750 seed[i] = !(matches[i] = elem); 5751 } 5752 } 5753 }) : 5754 function( elem, context, xml ) { 5755 input[0] = elem; 5756 matcher( input, null, xml, results ); 5757 // Don't keep the element (issue #299) 5758 input[0] = null; 5759 return !results.pop(); 5760 }; 5761 }), 5762 5763 "has": markFunction(function( selector ) { 5764 return function( elem ) { 5765 return Sizzle( selector, elem ).length > 0; 5766 }; 5767 }), 5768 5769 "contains": markFunction(function( text ) { 5770 text = text.replace( runescape, funescape ); 5771 return function( elem ) { 5772 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; 5773 }; 5774 }), 5775 5776 // "Whether an element is represented by a :lang() selector 5777 // is based solely on the element's language value 5778 // being equal to the identifier C, 5779 // or beginning with the identifier C immediately followed by "-". 5780 // The matching of C against the element's language value is performed case-insensitively. 5781 // The identifier C does not have to be a valid language name." 5782 // http://www.w3.org/TR/selectors/#lang-pseudo 5783 "lang": markFunction( function( lang ) { 5784 // lang value must be a valid identifier 5785 if ( !ridentifier.test(lang || "") ) { 5786 Sizzle.error( "unsupported lang: " + lang ); 5787 } 5788 lang = lang.replace( runescape, funescape ).toLowerCase(); 5789 return function( elem ) { 5790 var elemLang; 5791 do { 5792 if ( (elemLang = documentIsHTML ? 5793 elem.lang : 5794 elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { 5795 5796 elemLang = elemLang.toLowerCase(); 5797 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 5798 } 5799 } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); 5800 return false; 5801 }; 5802 }), 5803 5804 // Miscellaneous 5805 "target": function( elem ) { 5806 var hash = window.location && window.location.hash; 5807 return hash && hash.slice( 1 ) === elem.id; 5808 }, 5809 5810 "root": function( elem ) { 5811 return elem === docElem; 5812 }, 5813 5814 "focus": function( elem ) { 5815 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 5816 }, 5817 5818 // Boolean properties 5819 "enabled": function( elem ) { 5820 return elem.disabled === false; 5821 }, 5822 5823 "disabled": function( elem ) { 5824 return elem.disabled === true; 5825 }, 5826 5827 "checked": function( elem ) { 5828 // In CSS3, :checked should return both checked and selected elements 5829 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 5830 var nodeName = elem.nodeName.toLowerCase(); 5831 return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); 5832 }, 5833 5834 "selected": function( elem ) { 5835 // Accessing this property makes selected-by-default 5836 // options in Safari work properly 5837 if ( elem.parentNode ) { 5838 elem.parentNode.selectedIndex; 5839 } 5840 5841 return elem.selected === true; 5842 }, 5843 5844 // Contents 5845 "empty": function( elem ) { 5846 // http://www.w3.org/TR/selectors/#empty-pseudo 5847 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 5848 // but not by others (comment: 8; processing instruction: 7; etc.) 5849 // nodeType < 6 works because attributes (2) do not appear as children 5850 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 5851 if ( elem.nodeType < 6 ) { 5852 return false; 5853 } 5854 } 5855 return true; 5856 }, 5857 5858 "parent": function( elem ) { 5859 return !Expr.pseudos["empty"]( elem ); 5860 }, 5861 5862 // Element/input types 5863 "header": function( elem ) { 5864 return rheader.test( elem.nodeName ); 5865 }, 5866 5867 "input": function( elem ) { 5868 return rinputs.test( elem.nodeName ); 5869 }, 5870 5871 "button": function( elem ) { 5872 var name = elem.nodeName.toLowerCase(); 5873 return name === "input" && elem.type === "button" || name === "button"; 5874 }, 5875 5876 "text": function( elem ) { 5877 var attr; 5878 return elem.nodeName.toLowerCase() === "input" && 5879 elem.type === "text" && 5880 5881 // Support: IE<8 5882 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 5883 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); 5884 }, 5885 5886 // Position-in-collection 5887 "first": createPositionalPseudo(function() { 5888 return [ 0 ]; 5889 }), 5890 5891 "last": createPositionalPseudo(function( matchIndexes, length ) { 5892 return [ length - 1 ]; 5893 }), 5894 5895 "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { 5896 return [ argument < 0 ? argument + length : argument ]; 5897 }), 5898 5899 "even": createPositionalPseudo(function( matchIndexes, length ) { 5900 var i = 0; 5901 for ( ; i < length; i += 2 ) { 5902 matchIndexes.push( i ); 5903 } 5904 return matchIndexes; 5905 }), 5906 5907 "odd": createPositionalPseudo(function( matchIndexes, length ) { 5908 var i = 1; 5909 for ( ; i < length; i += 2 ) { 5910 matchIndexes.push( i ); 5911 } 5912 return matchIndexes; 5913 }), 5914 5915 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { 5916 var i = argument < 0 ? argument + length : argument; 5917 for ( ; --i >= 0; ) { 5918 matchIndexes.push( i ); 5919 } 5920 return matchIndexes; 5921 }), 5922 5923 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { 5924 var i = argument < 0 ? argument + length : argument; 5925 for ( ; ++i < length; ) { 5926 matchIndexes.push( i ); 5927 } 5928 return matchIndexes; 5929 }) 5930 } 5931 }; 5932 5933 Expr.pseudos["nth"] = Expr.pseudos["eq"]; 5934 5935// Add button/input type pseudos 5936 for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 5937 Expr.pseudos[ i ] = createInputPseudo( i ); 5938 } 5939 for ( i in { submit: true, reset: true } ) { 5940 Expr.pseudos[ i ] = createButtonPseudo( i ); 5941 } 5942 5943// Easy API for creating new setFilters 5944 function setFilters() {} 5945 setFilters.prototype = Expr.filters = Expr.pseudos; 5946 Expr.setFilters = new setFilters(); 5947 5948 tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 5949 var matched, match, tokens, type, 5950 soFar, groups, preFilters, 5951 cached = tokenCache[ selector + " " ]; 5952 5953 if ( cached ) { 5954 return parseOnly ? 0 : cached.slice( 0 ); 5955 } 5956 5957 soFar = selector; 5958 groups = []; 5959 preFilters = Expr.preFilter; 5960 5961 while ( soFar ) { 5962 5963 // Comma and first run 5964 if ( !matched || (match = rcomma.exec( soFar )) ) { 5965 if ( match ) { 5966 // Don't consume trailing commas as valid 5967 soFar = soFar.slice( match[0].length ) || soFar; 5968 } 5969 groups.push( (tokens = []) ); 5970 } 5971 5972 matched = false; 5973 5974 // Combinators 5975 if ( (match = rcombinators.exec( soFar )) ) { 5976 matched = match.shift(); 5977 tokens.push({ 5978 value: matched, 5979 // Cast descendant combinators to space 5980 type: match[0].replace( rtrim, " " ) 5981 }); 5982 soFar = soFar.slice( matched.length ); 5983 } 5984 5985 // Filters 5986 for ( type in Expr.filter ) { 5987 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || 5988 (match = preFilters[ type ]( match ))) ) { 5989 matched = match.shift(); 5990 tokens.push({ 5991 value: matched, 5992 type: type, 5993 matches: match 5994 }); 5995 soFar = soFar.slice( matched.length ); 5996 } 5997 } 5998 5999 if ( !matched ) { 6000 break; 6001 } 6002 } 6003 6004 // Return the length of the invalid excess 6005 // if we're just parsing 6006 // Otherwise, throw an error or return tokens 6007 return parseOnly ? 6008 soFar.length : 6009 soFar ? 6010 Sizzle.error( selector ) : 6011 // Cache the tokens 6012 tokenCache( selector, groups ).slice( 0 ); 6013 }; 6014 6015 function toSelector( tokens ) { 6016 var i = 0, 6017 len = tokens.length, 6018 selector = ""; 6019 for ( ; i < len; i++ ) { 6020 selector += tokens[i].value; 6021 } 6022 return selector; 6023 } 6024 6025 function addCombinator( matcher, combinator, base ) { 6026 var dir = combinator.dir, 6027 checkNonElements = base && dir === "parentNode", 6028 doneName = done++; 6029 6030 return combinator.first ? 6031 // Check against closest ancestor/preceding element 6032 function( elem, context, xml ) { 6033 while ( (elem = elem[ dir ]) ) { 6034 if ( elem.nodeType === 1 || checkNonElements ) { 6035 return matcher( elem, context, xml ); 6036 } 6037 } 6038 } : 6039 6040 // Check against all ancestor/preceding elements 6041 function( elem, context, xml ) { 6042 var oldCache, uniqueCache, outerCache, 6043 newCache = [ dirruns, doneName ]; 6044 6045 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 6046 if ( xml ) { 6047 while ( (elem = elem[ dir ]) ) { 6048 if ( elem.nodeType === 1 || checkNonElements ) { 6049 if ( matcher( elem, context, xml ) ) { 6050 return true; 6051 } 6052 } 6053 } 6054 } else { 6055 while ( (elem = elem[ dir ]) ) { 6056 if ( elem.nodeType === 1 || checkNonElements ) { 6057 outerCache = elem[ expando ] || (elem[ expando ] = {}); 6058 6059 // Support: IE <9 only 6060 // Defend against cloned attroperties (jQuery gh-1709) 6061 uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); 6062 6063 if ( (oldCache = uniqueCache[ dir ]) && 6064 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 6065 6066 // Assign to newCache so results back-propagate to previous elements 6067 return (newCache[ 2 ] = oldCache[ 2 ]); 6068 } else { 6069 // Reuse newcache so results back-propagate to previous elements 6070 uniqueCache[ dir ] = newCache; 6071 6072 // A match means we're done; a fail means we have to keep checking 6073 if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { 6074 return true; 6075 } 6076 } 6077 } 6078 } 6079 } 6080 }; 6081 } 6082 6083 function elementMatcher( matchers ) { 6084 return matchers.length > 1 ? 6085 function( elem, context, xml ) { 6086 var i = matchers.length; 6087 while ( i-- ) { 6088 if ( !matchers[i]( elem, context, xml ) ) { 6089 return false; 6090 } 6091 } 6092 return true; 6093 } : 6094 matchers[0]; 6095 } 6096 6097 function multipleContexts( selector, contexts, results ) { 6098 var i = 0, 6099 len = contexts.length; 6100 for ( ; i < len; i++ ) { 6101 Sizzle( selector, contexts[i], results ); 6102 } 6103 return results; 6104 } 6105 6106 function condense( unmatched, map, filter, context, xml ) { 6107 var elem, 6108 newUnmatched = [], 6109 i = 0, 6110 len = unmatched.length, 6111 mapped = map != null; 6112 6113 for ( ; i < len; i++ ) { 6114 if ( (elem = unmatched[i]) ) { 6115 if ( !filter || filter( elem, context, xml ) ) { 6116 newUnmatched.push( elem ); 6117 if ( mapped ) { 6118 map.push( i ); 6119 } 6120 } 6121 } 6122 } 6123 6124 return newUnmatched; 6125 } 6126 6127 function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 6128 if ( postFilter && !postFilter[ expando ] ) { 6129 postFilter = setMatcher( postFilter ); 6130 } 6131 if ( postFinder && !postFinder[ expando ] ) { 6132 postFinder = setMatcher( postFinder, postSelector ); 6133 } 6134 return markFunction(function( seed, results, context, xml ) { 6135 var temp, i, elem, 6136 preMap = [], 6137 postMap = [], 6138 preexisting = results.length, 6139 6140 // Get initial elements from seed or context 6141 elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), 6142 6143 // Prefilter to get matcher input, preserving a map for seed-results synchronization 6144 matcherIn = preFilter && ( seed || !selector ) ? 6145 condense( elems, preMap, preFilter, context, xml ) : 6146 elems, 6147 6148 matcherOut = matcher ? 6149 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 6150 postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 6151 6152 // ...intermediate processing is necessary 6153 [] : 6154 6155 // ...otherwise use results directly 6156 results : 6157 matcherIn; 6158 6159 // Find primary matches 6160 if ( matcher ) { 6161 matcher( matcherIn, matcherOut, context, xml ); 6162 } 6163 6164 // Apply postFilter 6165 if ( postFilter ) { 6166 temp = condense( matcherOut, postMap ); 6167 postFilter( temp, [], context, xml ); 6168 6169 // Un-match failing elements by moving them back to matcherIn 6170 i = temp.length; 6171 while ( i-- ) { 6172 if ( (elem = temp[i]) ) { 6173 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); 6174 } 6175 } 6176 } 6177 6178 if ( seed ) { 6179 if ( postFinder || preFilter ) { 6180 if ( postFinder ) { 6181 // Get the final matcherOut by condensing this intermediate into postFinder contexts 6182 temp = []; 6183 i = matcherOut.length; 6184 while ( i-- ) { 6185 if ( (elem = matcherOut[i]) ) { 6186 // Restore matcherIn since elem is not yet a final match 6187 temp.push( (matcherIn[i] = elem) ); 6188 } 6189 } 6190 postFinder( null, (matcherOut = []), temp, xml ); 6191 } 6192 6193 // Move matched elements from seed to results to keep them synchronized 6194 i = matcherOut.length; 6195 while ( i-- ) { 6196 if ( (elem = matcherOut[i]) && 6197 (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { 6198 6199 seed[temp] = !(results[temp] = elem); 6200 } 6201 } 6202 } 6203 6204 // Add elements to results, through postFinder if defined 6205 } else { 6206 matcherOut = condense( 6207 matcherOut === results ? 6208 matcherOut.splice( preexisting, matcherOut.length ) : 6209 matcherOut 6210 ); 6211 if ( postFinder ) { 6212 postFinder( null, results, matcherOut, xml ); 6213 } else { 6214 push.apply( results, matcherOut ); 6215 } 6216 } 6217 }); 6218 } 6219 6220 function matcherFromTokens( tokens ) { 6221 var checkContext, matcher, j, 6222 len = tokens.length, 6223 leadingRelative = Expr.relative[ tokens[0].type ], 6224 implicitRelative = leadingRelative || Expr.relative[" "], 6225 i = leadingRelative ? 1 : 0, 6226 6227 // The foundational matcher ensures that elements are reachable from top-level context(s) 6228 matchContext = addCombinator( function( elem ) { 6229 return elem === checkContext; 6230 }, implicitRelative, true ), 6231 matchAnyContext = addCombinator( function( elem ) { 6232 return indexOf( checkContext, elem ) > -1; 6233 }, implicitRelative, true ), 6234 matchers = [ function( elem, context, xml ) { 6235 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 6236 (checkContext = context).nodeType ? 6237 matchContext( elem, context, xml ) : 6238 matchAnyContext( elem, context, xml ) ); 6239 // Avoid hanging onto element (issue #299) 6240 checkContext = null; 6241 return ret; 6242 } ]; 6243 6244 for ( ; i < len; i++ ) { 6245 if ( (matcher = Expr.relative[ tokens[i].type ]) ) { 6246 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; 6247 } else { 6248 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); 6249 6250 // Return special upon seeing a positional matcher 6251 if ( matcher[ expando ] ) { 6252 // Find the next relative operator (if any) for proper handling 6253 j = ++i; 6254 for ( ; j < len; j++ ) { 6255 if ( Expr.relative[ tokens[j].type ] ) { 6256 break; 6257 } 6258 } 6259 return setMatcher( 6260 i > 1 && elementMatcher( matchers ), 6261 i > 1 && toSelector( 6262 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 6263 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) 6264 ).replace( rtrim, "$1" ), 6265 matcher, 6266 i < j && matcherFromTokens( tokens.slice( i, j ) ), 6267 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), 6268 j < len && toSelector( tokens ) 6269 ); 6270 } 6271 matchers.push( matcher ); 6272 } 6273 } 6274 6275 return elementMatcher( matchers ); 6276 } 6277 6278 function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 6279 var bySet = setMatchers.length > 0, 6280 byElement = elementMatchers.length > 0, 6281 superMatcher = function( seed, context, xml, results, outermost ) { 6282 var elem, j, matcher, 6283 matchedCount = 0, 6284 i = "0", 6285 unmatched = seed && [], 6286 setMatched = [], 6287 contextBackup = outermostContext, 6288 // We must always have either seed elements or outermost context 6289 elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), 6290 // Use integer dirruns iff this is the outermost matcher 6291 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), 6292 len = elems.length; 6293 6294 if ( outermost ) { 6295 outermostContext = context === document || context || outermost; 6296 } 6297 6298 // Add elements passing elementMatchers directly to results 6299 // Support: IE<9, Safari 6300 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 6301 for ( ; i !== len && (elem = elems[i]) != null; i++ ) { 6302 if ( byElement && elem ) { 6303 j = 0; 6304 if ( !context && elem.ownerDocument !== document ) { 6305 setDocument( elem ); 6306 xml = !documentIsHTML; 6307 } 6308 while ( (matcher = elementMatchers[j++]) ) { 6309 if ( matcher( elem, context || document, xml) ) { 6310 results.push( elem ); 6311 break; 6312 } 6313 } 6314 if ( outermost ) { 6315 dirruns = dirrunsUnique; 6316 } 6317 } 6318 6319 // Track unmatched elements for set filters 6320 if ( bySet ) { 6321 // They will have gone through all possible matchers 6322 if ( (elem = !matcher && elem) ) { 6323 matchedCount--; 6324 } 6325 6326 // Lengthen the array for every element, matched or not 6327 if ( seed ) { 6328 unmatched.push( elem ); 6329 } 6330 } 6331 } 6332 6333 // `i` is now the count of elements visited above, and adding it to `matchedCount` 6334 // makes the latter nonnegative. 6335 matchedCount += i; 6336 6337 // Apply set filters to unmatched elements 6338 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 6339 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 6340 // no element matchers and no seed. 6341 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 6342 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 6343 // numerically zero. 6344 if ( bySet && i !== matchedCount ) { 6345 j = 0; 6346 while ( (matcher = setMatchers[j++]) ) { 6347 matcher( unmatched, setMatched, context, xml ); 6348 } 6349 6350 if ( seed ) { 6351 // Reintegrate element matches to eliminate the need for sorting 6352 if ( matchedCount > 0 ) { 6353 while ( i-- ) { 6354 if ( !(unmatched[i] || setMatched[i]) ) { 6355 setMatched[i] = pop.call( results ); 6356 } 6357 } 6358 } 6359 6360 // Discard index placeholder values to get only actual matches 6361 setMatched = condense( setMatched ); 6362 } 6363 6364 // Add matches to results 6365 push.apply( results, setMatched ); 6366 6367 // Seedless set matches succeeding multiple successful matchers stipulate sorting 6368 if ( outermost && !seed && setMatched.length > 0 && 6369 ( matchedCount + setMatchers.length ) > 1 ) { 6370 6371 Sizzle.uniqueSort( results ); 6372 } 6373 } 6374 6375 // Override manipulation of globals by nested matchers 6376 if ( outermost ) { 6377 dirruns = dirrunsUnique; 6378 outermostContext = contextBackup; 6379 } 6380 6381 return unmatched; 6382 }; 6383 6384 return bySet ? 6385 markFunction( superMatcher ) : 6386 superMatcher; 6387 } 6388 6389 compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 6390 var i, 6391 setMatchers = [], 6392 elementMatchers = [], 6393 cached = compilerCache[ selector + " " ]; 6394 6395 if ( !cached ) { 6396 // Generate a function of recursive functions that can be used to check each element 6397 if ( !match ) { 6398 match = tokenize( selector ); 6399 } 6400 i = match.length; 6401 while ( i-- ) { 6402 cached = matcherFromTokens( match[i] ); 6403 if ( cached[ expando ] ) { 6404 setMatchers.push( cached ); 6405 } else { 6406 elementMatchers.push( cached ); 6407 } 6408 } 6409 6410 // Cache the compiled function 6411 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); 6412 6413 // Save selector and tokenization 6414 cached.selector = selector; 6415 } 6416 return cached; 6417 }; 6418 6419 /** 6420 * A low-level selection function that works with Sizzle's compiled 6421 * selector functions 6422 * @param {String|Function} selector A selector or a pre-compiled 6423 * selector function built with Sizzle.compile 6424 * @param {Element} context 6425 * @param {Array} [results] 6426 * @param {Array} [seed] A set of elements to match against 6427 */ 6428 select = Sizzle.select = function( selector, context, results, seed ) { 6429 var i, tokens, token, type, find, 6430 compiled = typeof selector === "function" && selector, 6431 match = !seed && tokenize( (selector = compiled.selector || selector) ); 6432 6433 results = results || []; 6434 6435 // Try to minimize operations if there is only one selector in the list and no seed 6436 // (the latter of which guarantees us context) 6437 if ( match.length === 1 ) { 6438 6439 // Reduce context if the leading compound selector is an ID 6440 tokens = match[0] = match[0].slice( 0 ); 6441 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && 6442 support.getById && context.nodeType === 9 && documentIsHTML && 6443 Expr.relative[ tokens[1].type ] ) { 6444 6445 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; 6446 if ( !context ) { 6447 return results; 6448 6449 // Precompiled matchers will still verify ancestry, so step up a level 6450 } else if ( compiled ) { 6451 context = context.parentNode; 6452 } 6453 6454 selector = selector.slice( tokens.shift().value.length ); 6455 } 6456 6457 // Fetch a seed set for right-to-left matching 6458 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; 6459 while ( i-- ) { 6460 token = tokens[i]; 6461 6462 // Abort if we hit a combinator 6463 if ( Expr.relative[ (type = token.type) ] ) { 6464 break; 6465 } 6466 if ( (find = Expr.find[ type ]) ) { 6467 // Search, expanding context for leading sibling combinators 6468 if ( (seed = find( 6469 token.matches[0].replace( runescape, funescape ), 6470 rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context 6471 )) ) { 6472 6473 // If seed is empty or no tokens remain, we can return early 6474 tokens.splice( i, 1 ); 6475 selector = seed.length && toSelector( tokens ); 6476 if ( !selector ) { 6477 push.apply( results, seed ); 6478 return results; 6479 } 6480 6481 break; 6482 } 6483 } 6484 } 6485 } 6486 6487 // Compile and execute a filtering function if one is not provided 6488 // Provide `match` to avoid retokenization if we modified the selector above 6489 ( compiled || compile( selector, match ) )( 6490 seed, 6491 context, 6492 !documentIsHTML, 6493 results, 6494 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context 6495 ); 6496 return results; 6497 }; 6498 6499// One-time assignments 6500 6501// Sort stability 6502 support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; 6503 6504// Support: Chrome 14-35+ 6505// Always assume duplicates if they aren't passed to the comparison function 6506 support.detectDuplicates = !!hasDuplicate; 6507 6508// Initialize against the default document 6509 setDocument(); 6510 6511// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 6512// Detached nodes confoundingly follow *each other* 6513 support.sortDetached = assert(function( div1 ) { 6514 // Should return 1, but returns 4 (following) 6515 return div1.compareDocumentPosition( document.createElement("div") ) & 1; 6516 }); 6517 6518// Support: IE<8 6519// Prevent attribute/property "interpolation" 6520// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 6521 if ( !assert(function( div ) { 6522 div.innerHTML = "<a href='#'></a>"; 6523 return div.firstChild.getAttribute("href") === "#" ; 6524 }) ) { 6525 addHandle( "type|href|height|width", function( elem, name, isXML ) { 6526 if ( !isXML ) { 6527 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 6528 } 6529 }); 6530 } 6531 6532// Support: IE<9 6533// Use defaultValue in place of getAttribute("value") 6534 if ( !support.attributes || !assert(function( div ) { 6535 div.innerHTML = "<input/>"; 6536 div.firstChild.setAttribute( "value", "" ); 6537 return div.firstChild.getAttribute( "value" ) === ""; 6538 }) ) { 6539 addHandle( "value", function( elem, name, isXML ) { 6540 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 6541 return elem.defaultValue; 6542 } 6543 }); 6544 } 6545 6546// Support: IE<9 6547// Use getAttributeNode to fetch booleans when getAttribute lies 6548 if ( !assert(function( div ) { 6549 return div.getAttribute("disabled") == null; 6550 }) ) { 6551 addHandle( booleans, function( elem, name, isXML ) { 6552 var val; 6553 if ( !isXML ) { 6554 return elem[ name ] === true ? name.toLowerCase() : 6555 (val = elem.getAttributeNode( name )) && val.specified ? 6556 val.value : 6557 null; 6558 } 6559 }); 6560 } 6561 6562 return Sizzle; 6563 6564 })( window ); 6565 6566 6567 6568 jQuery.find = Sizzle; 6569 jQuery.expr = Sizzle.selectors; 6570 jQuery.expr[ ":" ] = jQuery.expr.pseudos; 6571 jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 6572 jQuery.text = Sizzle.getText; 6573 jQuery.isXMLDoc = Sizzle.isXML; 6574 jQuery.contains = Sizzle.contains; 6575 6576 6577 6578 var dir = function( elem, dir, until ) { 6579 var matched = [], 6580 truncate = until !== undefined; 6581 6582 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 6583 if ( elem.nodeType === 1 ) { 6584 if ( truncate && jQuery( elem ).is( until ) ) { 6585 break; 6586 } 6587 matched.push( elem ); 6588 } 6589 } 6590 return matched; 6591 }; 6592 6593 6594 var siblings = function( n, elem ) { 6595 var matched = []; 6596 6597 for ( ; n; n = n.nextSibling ) { 6598 if ( n.nodeType === 1 && n !== elem ) { 6599 matched.push( n ); 6600 } 6601 } 6602 6603 return matched; 6604 }; 6605 6606 6607 var rneedsContext = jQuery.expr.match.needsContext; 6608 6609 var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); 6610 6611 6612 6613 var risSimple = /^.[^:#\[\.,]*$/; 6614 6615// Implement the identical functionality for filter and not 6616 function winnow( elements, qualifier, not ) { 6617 if ( jQuery.isFunction( qualifier ) ) { 6618 return jQuery.grep( elements, function( elem, i ) { 6619 /* jshint -W018 */ 6620 return !!qualifier.call( elem, i, elem ) !== not; 6621 } ); 6622 6623 } 6624 6625 if ( qualifier.nodeType ) { 6626 return jQuery.grep( elements, function( elem ) { 6627 return ( elem === qualifier ) !== not; 6628 } ); 6629 6630 } 6631 6632 if ( typeof qualifier === "string" ) { 6633 if ( risSimple.test( qualifier ) ) { 6634 return jQuery.filter( qualifier, elements, not ); 6635 } 6636 6637 qualifier = jQuery.filter( qualifier, elements ); 6638 } 6639 6640 return jQuery.grep( elements, function( elem ) { 6641 return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not; 6642 } ); 6643 } 6644 6645 jQuery.filter = function( expr, elems, not ) { 6646 var elem = elems[ 0 ]; 6647 6648 if ( not ) { 6649 expr = ":not(" + expr + ")"; 6650 } 6651 6652 return elems.length === 1 && elem.nodeType === 1 ? 6653 jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : 6654 jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 6655 return elem.nodeType === 1; 6656 } ) ); 6657 }; 6658 6659 jQuery.fn.extend( { 6660 find: function( selector ) { 6661 var i, 6662 ret = [], 6663 self = this, 6664 len = self.length; 6665 6666 if ( typeof selector !== "string" ) {
6667 return this.pushStack( jQuery( selector ).filter( function() { 6668 for ( i = 0; i < len; i++ ) { 6669 if ( jQuery.contains( self[ i ], this ) ) { 6670 return true; 6671 } 6672 } 6673 } ) ); 6674 } 6675 6676 for ( i = 0; i < len; i++ ) { 6677 jQuery.find( selector, self[ i ], ret ); 6678 } 6679 6680 // Needed because $( selector, context ) becomes $( context ).find( selector ) 6681 ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); 6682 ret.selector = this.selector ? this.selector + " " + selector : selector; 6683 return ret; 6684 }, 6685 filter: function( selector ) { 6686 return this.pushStack( winnow( this, selector || [], false ) ); 6687 }, 6688 not: function( selector ) { 6689 return this.pushStack( winnow( this, selector || [], true ) ); 6690 }, 6691 is: function( selector ) { 6692 return !!winnow( 6693 this, 6694 6695 // If this is a positional/relative selector, check membership in the returned set 6696 // so $("p:first").is("p:last") won't return true for a doc with two "p". 6697 typeof selector === "string" && rneedsContext.test( selector ) ? 6698 jQuery( selector ) : 6699 selector || [], 6700 false 6701 ).length; 6702 } 6703 } ); 6704 6705 6706// Initialize a jQuery object 6707 6708 6709// A central reference to the root jQuery(document) 6710 var rootjQuery, 6711 6712 // A simple way to check for HTML strings 6713 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 6714 // Strict HTML recognition (#11290: must start with <) 6715 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, 6716 6717 init = jQuery.fn.init = function( selector, context, root ) { 6718 var match, elem; 6719 6720 // HANDLE: $(""), $(null), $(undefined), $(false) 6721 if ( !selector ) { 6722 return this; 6723 } 6724 6725 // init accepts an alternate rootjQuery 6726 // so migrate can support jQuery.sub (gh-2101) 6727 root = root || rootjQuery; 6728 6729 // Handle HTML strings 6730 if ( typeof selector === "string" ) { 6731 if ( selector.charAt( 0 ) === "<" && 6732 selector.charAt( selector.length - 1 ) === ">" && 6733 selector.length >= 3 ) { 6734 6735 // Assume that strings that start and end with <> are HTML and skip the regex check 6736 match = [ null, selector, null ]; 6737 6738 } else { 6739 match = rquickExpr.exec( selector ); 6740 } 6741 6742 // Match html or make sure no context is specified for #id 6743 if ( match && ( match[ 1 ] || !context ) ) { 6744 6745 // HANDLE: $(html) -> $(array) 6746 if ( match[ 1 ] ) { 6747 context = context instanceof jQuery ? context[ 0 ] : context; 6748 6749 // scripts is true for back-compat 6750 // Intentionally let the error be thrown if parseHTML is not present 6751 jQuery.merge( this, jQuery.parseHTML( 6752 match[ 1 ], 6753 context && context.nodeType ? context.ownerDocument || context : document, 6754 true 6755 ) ); 6756 6757 // HANDLE: $(html, props) 6758 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 6759 for ( match in context ) { 6760 6761 // Properties of context are called as methods if possible 6762 if ( jQuery.isFunction( this[ match ] ) ) { 6763 this[ match ]( context[ match ] ); 6764 6765 // ...and otherwise set as attributes 6766 } else { 6767 this.attr( match, context[ match ] ); 6768 } 6769 } 6770 } 6771 6772 return this; 6773 6774 // HANDLE: $(#id) 6775 } else { 6776 elem = document.getElementById( match[ 2 ] ); 6777 6778 // Check parentNode to catch when Blackberry 4.6 returns 6779 // nodes that are no longer in the document #6963 6780 if ( elem && elem.parentNode ) { 6781 6782 // Handle the case where IE and Opera return items 6783 // by name instead of ID 6784 if ( elem.id !== match[ 2 ] ) { 6785 return rootjQuery.find( selector ); 6786 } 6787 6788 // Otherwise, we inject the element directly into the jQuery object 6789 this.length = 1; 6790 this[ 0 ] = elem; 6791 } 6792 6793 this.context = document; 6794 this.selector = selector; 6795 return this; 6796 } 6797 6798 // HANDLE: $(expr, $(...)) 6799 } else if ( !context || context.jquery ) { 6800 return ( context || root ).find( selector ); 6801 6802 // HANDLE: $(expr, context) 6803 // (which is just equivalent to: $(context).find(expr) 6804 } else { 6805 return this.constructor( context ).find( selector ); 6806 } 6807 6808 // HANDLE: $(DOMElement) 6809 } else if ( selector.nodeType ) { 6810 this.context = this[ 0 ] = selector; 6811 this.length = 1; 6812 return this; 6813 6814 // HANDLE: $(function) 6815 // Shortcut for document ready 6816 } else if ( jQuery.isFunction( selector ) ) { 6817 return typeof root.ready !== "undefined" ? 6818 root.ready( selector ) : 6819 6820 // Execute immediately if ready is not present 6821 selector( jQuery ); 6822 } 6823 6824 if ( selector.selector !== undefined ) { 6825 this.selector = selector.selector; 6826 this.context = selector.context; 6827 } 6828 6829 return jQuery.makeArray( selector, this ); 6830 }; 6831 6832// Give the init function the jQuery prototype for later instantiation 6833 init.prototype = jQuery.fn; 6834 6835// Initialize central reference 6836 rootjQuery = jQuery( document ); 6837 6838 6839 var rparentsprev = /^(?:parents|prev(?:Until|All))/, 6840 6841 // methods guaranteed to produce a unique set when starting from a unique set 6842 guaranteedUnique = { 6843 children: true, 6844 contents: true, 6845 next: true, 6846 prev: true 6847 }; 6848
6849 jQuery.fn.extend( { 6850 has: function( target ) { 6851 var i, 6852 targets = jQuery( target, this ), 6853 len = targets.length; 6854 6855 return this.filter( function() { 6856 for ( i = 0; i < len; i++ ) { 6857 if ( jQuery.contains( this, targets[ i ] ) ) { 6858 return true; 6859 } 6860 } 6861 } ); 6862 }, 6863 6864 closest: function( selectors, context ) { 6865 var cur, 6866 i = 0, 6867 l = this.length, 6868 matched = [], 6869 pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? 6870 jQuery( selectors, context || this.context ) : 6871 0; 6872 6873 for ( ; i < l; i++ ) { 6874 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 6875 6876 // Always skip document fragments 6877 if ( cur.nodeType < 11 && ( pos ? 6878 pos.index( cur ) > -1 : 6879 6880 // Don't pass non-elements to Sizzle 6881 cur.nodeType === 1 && 6882 jQuery.find.matchesSelector( cur, selectors ) ) ) { 6883 6884 matched.push( cur ); 6885 break; 6886 } 6887 } 6888 } 6889 6890 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 6891 }, 6892 6893 // Determine the position of an element within 6894 // the matched set of elements 6895 index: function( elem ) { 6896 6897 // No argument, return index in parent 6898 if ( !elem ) { 6899 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 6900 } 6901 6902 // index in selector 6903 if ( typeof elem === "string" ) { 6904 return jQuery.inArray( this[ 0 ], jQuery( elem ) ); 6905 } 6906 6907 // Locate the position of the desired element 6908 return jQuery.inArray( 6909 6910 // If it receives a jQuery object, the first element is used 6911 elem.jquery ? elem[ 0 ] : elem, this ); 6912 }, 6913 6914 add: function( selector, context ) { 6915 return this.pushStack( 6916 jQuery.uniqueSort( 6917 jQuery.merge( this.get(), jQuery( selector, context ) ) 6918 ) 6919 ); 6920 }, 6921 6922 addBack: function( selector ) { 6923 return this.add( selector == null ? 6924 this.prevObject : this.prevObject.filter( selector ) 6925 ); 6926 } 6927 } ); 6928 6929 function sibling( cur, dir ) { 6930 do { 6931 cur = cur[ dir ]; 6932 } while ( cur && cur.nodeType !== 1 ); 6933 6934 return cur; 6935 } 6936 6937 jQuery.each( { 6938 parent: function( elem ) { 6939 var parent = elem.parentNode; 6940 return parent && parent.nodeType !== 11 ? parent : null; 6941 }, 6942 parents: function( elem ) { 6943 return dir( elem, "parentNode" ); 6944 }, 6945 parentsUntil: function( elem, i, until ) { 6946 return dir( elem, "parentNode", until ); 6947 }, 6948 next: function( elem ) { 6949 return sibling( elem, "nextSibling" ); 6950 }, 6951 prev: function( elem ) { 6952 return sibling( elem, "previousSibling" ); 6953 }, 6954 nextAll: function( elem ) { 6955 return dir( elem, "nextSibling" ); 6956 }, 6957 prevAll: function( elem ) { 6958 return dir( elem, "previousSibling" ); 6959 }, 6960 nextUntil: function( elem, i, until ) { 6961 return dir( elem, "nextSibling", until ); 6962 }, 6963 prevUntil: function( elem, i, until ) { 6964 return dir( elem, "previousSibling", until ); 6965 }, 6966 siblings: function( elem ) { 6967 return siblings( ( elem.parentNode || {} ).firstChild, elem ); 6968 }, 6969 children: function( elem ) { 6970 return siblings( elem.firstChild ); 6971 }, 6972 contents: function( elem ) { 6973 return jQuery.nodeName( elem, "iframe" ) ? 6974 elem.contentDocument || elem.contentWindow.document : 6975 jQuery.merge( [], elem.childNodes ); 6976 } 6977 }, function( name, fn ) { 6978 jQuery.fn[ name ] = function( until, selector ) { 6979 var ret = jQuery.map( this, fn, until ); 6980 6981 if ( name.slice( -5 ) !== "Until" ) { 6982 selector = until; 6983 } 6984 6985 if ( selector && typeof selector === "string" ) { 6986 ret = jQuery.filter( selector, ret ); 6987 } 6988 6989 if ( this.length > 1 ) { 6990 6991 // Remove duplicates 6992 if ( !guaranteedUnique[ name ] ) { 6993 ret = jQuery.uniqueSort( ret ); 6994 } 6995 6996 // Reverse order for parents* and prev-derivatives 6997 if ( rparentsprev.test( name ) ) { 6998 ret = ret.reverse(); 6999 } 7000 } 7001 7002 return this.pushStack( ret ); 7003 }; 7004 } ); 7005 var rnotwhite = ( /\S+/g ); 7006 7007 7008 7009// Convert String-formatted options into Object-formatted ones 7010 function createOptions( options ) { 7011 var object = {}; 7012 jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { 7013 object[ flag ] = true; 7014 } ); 7015 return object; 7016 } 7017 7018 /* 7019 * Create a callback list using the following parameters: 7020 * 7021 * options: an optional list of space-separated options that will change how 7022 * the callback list behaves or a more traditional option object 7023 * 7024 * By default a callback list will act like an event callback list and can be 7025 * "fired" multiple times. 7026 * 7027 * Possible options: 7028 * 7029 * once: will ensure the callback list can only be fired once (like a Deferred) 7030 * 7031 * memory: will keep track of previous values and will call any callback added 7032 * after the list has been fired right away with the latest "memorized" 7033 * values (like a Deferred) 7034 * 7035 * unique: will ensure a callback can only be added once (no duplicate in the list) 7036 * 7037 * stopOnFalse: interrupt callings when a callback returns false 7038 * 7039 */ 7040 jQuery.Callbacks = function( options ) { 7041 7042 // Convert options from String-formatted to Object-formatted if needed 7043 // (we check in cache first) 7044 options = typeof options === "string" ? 7045 createOptions( options ) : 7046 jQuery.extend( {}, options ); 7047 7048 var // Flag to know if list is currently firing 7049 firing, 7050 7051 // Last fire value for non-forgettable lists 7052 memory, 7053 7054 // Flag to know if list was already fired 7055 fired, 7056 7057 // Flag to prevent firing 7058 locked, 7059 7060 // Actual callback list 7061 list = [], 7062 7063 // Queue of execution data for repeatable lists 7064 queue = [], 7065 7066 // Index of currently firing callback (modified by add/remove as needed) 7067 firingIndex = -1, 7068 7069 // Fire callbacks 7070 fire = function() { 7071 7072 // Enforce single-firing 7073 locked = options.once; 7074 7075 // Execute callbacks for all pending executions, 7076 // respecting firingIndex overrides and runtime changes 7077 fired = firing = true; 7078 for ( ; queue.length; firingIndex = -1 ) { 7079 memory = queue.shift(); 7080 while ( ++firingIndex < list.length ) { 7081 7082 // Run callback and check for early termination 7083 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 7084 options.stopOnFalse ) { 7085 7086 // Jump to end and forget the data so .add doesn't re-fire 7087 firingIndex = list.length; 7088 memory = false;
7089 } 7090 } 7091 } 7092 7093 // Forget the data if we're done with it 7094 if ( !options.memory ) { 7095 memory = false; 7096 } 7097 7098 firing = false; 7099 7100 // Clean up if we're done firing for good 7101 if ( locked ) { 7102 7103 // Keep an empty list if we have data for future add calls 7104 if ( memory ) { 7105 list = []; 7106 7107 // Otherwise, this object is spent 7108 } else { 7109 list = ""; 7110 } 7111 } 7112 }, 7113 7114 // Actual Callbacks object 7115 self = { 7116 7117 // Add a callback or a collection of callbacks to the list 7118 add: function() { 7119 if ( list ) { 7120 7121 // If we have memory from a past run, we should fire after adding 7122 if ( memory && !firing ) { 7123 firingIndex = list.length - 1; 7124 queue.push( memory ); 7125 } 7126 7127 ( function add( args ) { 7128 jQuery.each( args, function( _, arg ) { 7129 if ( jQuery.isFunction( arg ) ) { 7130 if ( !options.unique || !self.has( arg ) ) { 7131 list.push( arg ); 7132 } 7133 } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { 7134 7135 // Inspect recursively 7136 add( arg ); 7137 } 7138 } ); 7139 } )( arguments ); 7140 7141 if ( memory && !firing ) { 7142 fire(); 7143 } 7144 } 7145 return this; 7146 }, 7147 7148 // Remove a callback from the list 7149 remove: function() { 7150 jQuery.each( arguments, function( _, arg ) { 7151 var index; 7152 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 7153 list.splice( index, 1 ); 7154 7155 // Handle firing indexes 7156 if ( index <= firingIndex ) { 7157 firingIndex--; 7158 } 7159 } 7160 } ); 7161 return this; 7162 }, 7163 7164 // Check if a given callback is in the list. 7165 // If no argument is given, return whether or not list has callbacks attached. 7166 has: function( fn ) { 7167 return fn ? 7168 jQuery.inArray( fn, list ) > -1 : 7169 list.length > 0; 7170 }, 7171 7172 // Remove all callbacks from the list 7173 empty: function() { 7174 if ( list ) { 7175 list = []; 7176 } 7177 return this; 7178 }, 7179 7180 // Disable .fire and .add 7181 // Abort any current/pending executions 7182 // Clear all callbacks and values 7183 disable: function() { 7184 locked = queue = []; 7185 list = memory = ""; 7186 return this; 7187 }, 7188 disabled: function() { 7189 return !list; 7190 }, 7191 7192 // Disable .fire 7193 // Also disable .add unless we have memory (since it would have no effect) 7194 // Abort any pending executions 7195 lock: function() { 7196 locked = true; 7197 if ( !memory ) { 7198 self.disable(); 7199 } 7200 return this; 7201 }, 7202 locked: function() { 7203 return !!locked; 7204 }, 7205 7206 // Call all callbacks with the given context and arguments 7207 fireWith: function( context, args ) { 7208 if ( !locked ) { 7209 args = args || []; 7210 args = [ context, args.slice ? args.slice() : args ]; 7211 queue.push( args ); 7212 if ( !firing ) { 7213 fire(); 7214 } 7215 } 7216 return this; 7217 }, 7218 7219 // Call all the callbacks with the given arguments 7220 fire: function() { 7221 self.fireWith( this, arguments ); 7222 return this; 7223 }, 7224 7225 // To know if the callbacks have already been called at least once 7226 fired: function() { 7227 return !!fired; 7228 } 7229 }; 7230 7231 return self; 7232 }; 7233 7234 7235 jQuery.extend( { 7236 7237 Deferred: function( func ) { 7238 var tuples = [ 7239 7240 // action, add listener, listener list, final state 7241 [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], 7242 [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], 7243 [ "notify", "progress", jQuery.Callbacks( "memory" ) ] 7244 ], 7245 state = "pending", 7246 promise = { 7247 state: function() { 7248 return state; 7249 }, 7250 always: function() { 7251 deferred.done( arguments ).fail( arguments ); 7252 return this; 7253 }, 7254 then: function( /* fnDone, fnFail, fnProgress */ ) { 7255 var fns = arguments; 7256 return jQuery.Deferred( function( newDefer ) { 7257 jQuery.each( tuples, function( i, tuple ) { 7258 var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; 7259 7260 // deferred[ done | fail | progress ] for forwarding actions to newDefer 7261 deferred[ tuple[ 1 ] ]( function() { 7262 var returned = fn && fn.apply( this, arguments ); 7263 if ( returned && jQuery.isFunction( returned.promise ) ) { 7264 returned.promise() 7265 .progress( newDefer.notify ) 7266 .done( newDefer.resolve ) 7267 .fail( newDefer.reject ); 7268 } else { 7269 newDefer[ tuple[ 0 ] + "With" ]( 7270 this === promise ? newDefer.promise() : this, 7271 fn ? [ returned ] : arguments 7272 ); 7273 } 7274 } ); 7275 } ); 7276 fns = null; 7277 } ).promise(); 7278 }, 7279 7280 // Get a promise for this deferred 7281 // If obj is provided, the promise aspect is added to the object 7282 promise: function( obj ) { 7283 return obj != null ? jQuery.extend( obj, promise ) : promise; 7284 } 7285 }, 7286 deferred = {}; 7287 7288 // Keep pipe for back-compat 7289 promise.pipe = promise.then; 7290 7291 // Add list-specific methods 7292 jQuery.each( tuples, function( i, tuple ) { 7293 var list = tuple[ 2 ], 7294 stateString = tuple[ 3 ]; 7295 7296 // promise[ done | fail | progress ] = list.add 7297 promise[ tuple[ 1 ] ] = list.add; 7298 7299 // Handle state 7300 if ( stateString ) { 7301 list.add( function() { 7302 7303 // state = [ resolved | rejected ] 7304 state = stateString; 7305 7306 // [ reject_list | resolve_list ].disable; progress_list.lock 7307 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); 7308 } 7309 7310 // deferred[ resolve | reject | notify ] 7311 deferred[ tuple[ 0 ] ] = function() { 7312 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); 7313 return this; 7314 }; 7315 deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 7316 } ); 7317 7318 // Make the deferred a promise 7319 promise.promise( deferred ); 7320 7321 // Call given func if any 7322 if ( func ) { 7323 func.call( deferred, deferred ); 7324 } 7325 7326 // All done! 7327 return deferred; 7328 }, 7329 7330 // Deferred helper 7331 when: function( subordinate /* , ..., subordinateN */ ) { 7332 var i = 0, 7333 resolveValues = slice.call( arguments ), 7334 length = resolveValues.length, 7335 7336 // the count of uncompleted subordinates 7337 remaining = length !== 1 || 7338 ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, 7339 7340 // the master Deferred. 7341 // If resolveValues consist of only a single Deferred, just use that. 7342 deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 7343 7344 // Update function for both resolve and progress values 7345 updateFunc = function( i, contexts, values ) { 7346 return function( value ) { 7347 contexts[ i ] = this; 7348 values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 7349 if ( values === progressValues ) { 7350 deferred.notifyWith( contexts, values ); 7351 7352 } else if ( !( --remaining ) ) { 7353 deferred.resolveWith( contexts, values ); 7354 } 7355 }; 7356 }, 7357 7358 progressValues, progressContexts, resolveContexts; 7359 7360 // add listeners to Deferred subordinates; treat others as resolved 7361 if ( length > 1 ) { 7362 progressValues = new Array( length ); 7363 progressContexts = new Array( length ); 7364 resolveContexts = new Array( length ); 7365 for ( ; i < length; i++ ) { 7366 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { 7367 resolveValues[ i ].promise() 7368 .progress( updateFunc( i, progressContexts, progressValues ) ) 7369 .done( updateFunc( i, resolveContexts, resolveValues ) ) 7370 .fail( deferred.reject ); 7371 } else { 7372 --remaining; 7373 } 7374 } 7375 } 7376 7377 // if we're not waiting on anything, resolve the master 7378 if ( !remaining ) {
7379 deferred.resolveWith( resolveContexts, resolveValues ); 7380 } 7381 7382 return deferred.promise(); 7383 } 7384 } ); 7385 7386 7387// The deferred used on DOM ready 7388 var readyList; 7389 7390 jQuery.fn.ready = function( fn ) { 7391 7392 // Add the callback 7393 jQuery.ready.promise().done( fn ); 7394 7395 return this; 7396 }; 7397 7398 jQuery.extend( { 7399 7400 // Is the DOM ready to be used? Set to true once it occurs. 7401 isReady: false, 7402 7403 // A counter to track how many items to wait for before 7404 // the ready event fires. See #6781 7405 readyWait: 1, 7406 7407 // Hold (or release) the ready event 7408 holdReady: function( hold ) { 7409 if ( hold ) { 7410 jQuery.readyWait++; 7411 } else { 7412 jQuery.ready( true ); 7413 } 7414 }, 7415 7416 // Handle when the DOM is ready 7417 ready: function( wait ) { 7418 7419 // Abort if there are pending holds or we're already ready 7420 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 7421 return; 7422 } 7423 7424 // Remember that the DOM is ready 7425 jQuery.isReady = true; 7426 7427 // If a normal DOM Ready event fired, decrement, and wait if need be 7428 if ( wait !== true && --jQuery.readyWait > 0 ) { 7429 return; 7430 } 7431 7432 // If there are functions bound, to execute 7433 readyList.resolveWith( document, [ jQuery ] ); 7434 7435 // Trigger any bound ready events 7436 if ( jQuery.fn.triggerHandler ) { 7437 jQuery( document ).triggerHandler( "ready" ); 7438 jQuery( document ).off( "ready" ); 7439 } 7440 } 7441 } ); 7442 7443 /** 7444 * Clean-up method for dom ready events 7445 */ 7446 function detach() { 7447 if ( document.addEventListener ) { 7448 document.removeEventListener( "DOMContentLoaded", completed ); 7449 window.removeEventListener( "load", completed ); 7450 7451 } else { 7452 document.detachEvent( "onreadystatechange", completed ); 7453 window.detachEvent( "onload", completed ); 7454 } 7455 } 7456 7457 /** 7458 * The ready event handler and self cleanup method 7459 */ 7460 function completed() { 7461 7462 // readyState === "complete" is good enough for us to call the dom ready in oldIE 7463 if ( document.addEventListener || 7464 window.event.type === "load" || 7465 document.readyState === "complete" ) { 7466 7467 detach(); 7468 jQuery.ready(); 7469 } 7470 } 7471 7472 jQuery.ready.promise = function( obj ) { 7473 if ( !readyList ) { 7474 7475 readyList = jQuery.Deferred(); 7476 7477 // Catch cases where $(document).ready() is called 7478 // after the browser event has already occurred. 7479 // Support: IE6-10 7480 // Older IE sometimes signals "interactive" too soon 7481 if ( document.readyState === "complete" || 7482 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 7483 7484 // Handle it asynchronously to allow scripts the opportunity to delay ready 7485 window.setTimeout( jQuery.ready ); 7486 7487 // Standards-based browsers support DOMContentLoaded 7488 } else if ( document.addEventListener ) { 7489 7490 // Use the handy event callback 7491 document.addEventListener( "DOMContentLoaded", completed ); 7492 7493 // A fallback to window.onload, that will always work 7494 window.addEventListener( "load", completed ); 7495 7496 // If IE event model is used 7497 } else { 7498 7499 // Ensure firing before onload, maybe late but safe also for iframes 7500 document.attachEvent( "onreadystatechange", completed ); 7501 7502 // A fallback to window.onload, that will always work 7503 window.attachEvent( "onload", completed ); 7504 7505 // If IE and not a frame 7506 // continually check to see if the document is ready 7507 var top = false; 7508 7509 try { 7510 top = window.frameElement == null && document.documentElement; 7511 } catch ( e ) {} 7512 7513 if ( top && top.doScroll ) { 7514 ( function doScrollCheck() { 7515 if ( !jQuery.isReady ) { 7516 7517 try { 7518 7519 // Use the trick by Diego Perini 7520 // http://javascript.nwbox.com/IEContentLoaded/ 7521 top.doScroll( "left" ); 7522 } catch ( e ) { 7523 return window.setTimeout( doScrollCheck, 50 ); 7524 } 7525 7526 // detach all dom ready events 7527 detach(); 7528 7529 // and execute any waiting functions 7530 jQuery.ready(); 7531 } 7532 } )(); 7533 } 7534 } 7535 } 7536 return readyList.promise( obj ); 7537 }; 7538 7539// Kick off the DOM ready check even if the user does not 7540 jQuery.ready.promise(); 7541 7542 7543 7544 7545// Support: IE<9 7546// Iteration over object's inherited properties before its own 7547 var i; 7548 for ( i in jQuery( support ) ) { 7549 break; 7550 } 7551 support.ownFirst = i === "0"; 7552 7553// Note: most support tests are defined in their respective modules. 7554// false until the test is run 7555 support.inlineBlockNeedsLayout = false;
7556 7557// Execute ASAP in case we need to set body.style.zoom 7558 jQuery( function() { 7559 7560 // Minified: var a,b,c,d 7561 var val, div, body, container; 7562 7563 body = document.getElementsByTagName( "body" )[ 0 ]; 7564 if ( !body || !body.style ) { 7565 7566 // Return for frameset docs that don't have a body 7567 return; 7568 } 7569 7570 // Setup 7571 div = document.createElement( "div" ); 7572 container = document.createElement( "div" ); 7573 container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; 7574 body.appendChild( container ).appendChild( div ); 7575 7576 if ( typeof div.style.zoom !== "undefined" ) { 7577 7578 // Support: IE<8 7579 // Check if natively block-level elements act like inline-block 7580 // elements when setting their display to 'inline' and giving 7581 // them layout 7582 div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; 7583 7584 support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; 7585 if ( val ) { 7586 7587 // Prevent IE 6 from affecting layout for positioned elements #11048 7588 // Prevent IE from shrinking the body in IE 7 mode #12869 7589 // Support: IE<8 7590 body.style.zoom = 1; 7591 } 7592 } 7593 7594 body.removeChild( container ); 7595 } ); 7596 7597 7598 ( function() { 7599 var div = document.createElement( "div" ); 7600 7601 // Support: IE<9 7602 support.deleteExpando = true; 7603 try { 7604 delete div.test; 7605 } catch ( e ) { 7606 support.deleteExpando = false; 7607 } 7608 7609 // Null elements to avoid leaks in IE. 7610 div = null; 7611 } )(); 7612 var acceptData = function( elem ) { 7613 var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ], 7614 nodeType = +elem.nodeType || 1; 7615 7616 // Do not set data on non-element DOM nodes because it will not be cleared (#8335). 7617 return nodeType !== 1 && nodeType !== 9 ? 7618 false : 7619 7620 // Nodes accept data unless otherwise specified; rejection can be conditional 7621 !noData || noData !== true && elem.getAttribute( "classid" ) === noData; 7622 }; 7623 7624 7625 7626 7627 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 7628 rmultiDash = /([A-Z])/g; 7629 7630 function dataAttr( elem, key, data ) { 7631 7632 // If nothing was found internally, try to fetch any 7633 // data from the HTML5 data-* attribute 7634 if ( data === undefined && elem.nodeType === 1 ) { 7635 7636 var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); 7637 7638 data = elem.getAttribute( name ); 7639 7640 if ( typeof data === "string" ) { 7641 try { 7642 data = data === "true" ? true : 7643 data === "false" ? false : 7644 data === "null" ? null : 7645 7646 // Only convert to a number if it doesn't change the string 7647 +data + "" === data ? +data : 7648 rbrace.test( data ) ? jQuery.parseJSON( data ) : 7649 data; 7650 } catch ( e ) {} 7651 7652 // Make sure we set the data so it isn't changed later 7653 jQuery.data( elem, key, data ); 7654 7655 } else { 7656 data = undefined; 7657 } 7658 } 7659 7660 return data; 7661 } 7662 7663// checks a cache object for emptiness 7664 function isEmptyDataObject( obj ) { 7665 var name; 7666 for ( name in obj ) { 7667 7668 // if the public data object is empty, the private is still empty 7669 if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) { 7670 continue; 7671 } 7672 if ( name !== "toJSON" ) { 7673 return false; 7674 } 7675 } 7676 7677 return true; 7678 } 7679 7680 function internalData( elem, name, data, pvt /* Internal Use Only */ ) { 7681 if ( !acceptData( elem ) ) { 7682 return; 7683 } 7684 7685 var ret, thisCache, 7686 internalKey = jQuery.expando, 7687 7688 // We have to handle DOM nodes and JS objects differently because IE6-7 7689 // can't GC object references properly across the DOM-JS boundary 7690 isNode = elem.nodeType, 7691 7692 // Only DOM nodes need the global jQuery cache; JS object data is 7693 // attached directly to the object so GC can occur automatically 7694 cache = isNode ? jQuery.cache : elem, 7695 7696 // Only defining an ID for JS objects if its cache already exists allows 7697 // the code to shortcut on the same path as a DOM node with no cache 7698 id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; 7699 7700 // Avoid doing any more work than we need to when trying to get data on an 7701 // object that has no data at all 7702 if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) && 7703 data === undefined && typeof name === "string" ) { 7704 return; 7705 } 7706 7707 if ( !id ) { 7708 7709 // Only DOM nodes need a new unique ID for each element since their data 7710 // ends up in the global cache 7711 if ( isNode ) { 7712 id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; 7713 } else { 7714 id = internalKey; 7715 } 7716 } 7717 7718 if ( !cache[ id ] ) { 7719 7720 // Avoid exposing jQuery metadata on plain JS objects when the object 7721 // is serialized using JSON.stringify 7722 cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; 7723 } 7724
7725 // An object can be passed to jQuery.data instead of a key/value pair; this gets 7726 // shallow copied over onto the existing cache 7727 if ( typeof name === "object" || typeof name === "function" ) { 7728 if ( pvt ) { 7729 cache[ id ] = jQuery.extend( cache[ id ], name ); 7730 } else { 7731 cache[ id ].data = jQuery.extend( cache[ id ].data, name ); 7732 } 7733 } 7734 7735 thisCache = cache[ id ]; 7736 7737 // jQuery data() is stored in a separate object inside the object's internal data 7738 // cache in order to avoid key collisions between internal data and user-defined 7739 // data. 7740 if ( !pvt ) { 7741 if ( !thisCache.data ) { 7742 thisCache.data = {}; 7743 } 7744 7745 thisCache = thisCache.data; 7746 } 7747 7748 if ( data !== undefined ) { 7749 thisCache[ jQuery.camelCase( name ) ] = data; 7750 } 7751 7752 // Check for both converted-to-camel and non-converted data property names 7753 // If a data property was specified 7754 if ( typeof name === "string" ) { 7755 7756 // First Try to find as-is property data 7757 ret = thisCache[ name ]; 7758 7759 // Test for null|undefined property data 7760 if ( ret == null ) { 7761 7762 // Try to find the camelCased property 7763 ret = thisCache[ jQuery.camelCase( name ) ]; 7764 } 7765 } else { 7766 ret = thisCache; 7767 } 7768 7769 return ret; 7770 } 7771 7772 function internalRemoveData( elem, name, pvt ) { 7773 if ( !acceptData( elem ) ) { 7774 return; 7775 } 7776 7777 var thisCache, i, 7778 isNode = elem.nodeType, 7779 7780 // See jQuery.data for more information 7781 cache = isNode ? jQuery.cache : elem, 7782 id = isNode ? elem[ jQuery.expando ] : jQuery.expando; 7783 7784 // If there is already no cache entry for this object, there is no 7785 // purpose in continuing 7786 if ( !cache[ id ] ) { 7787 return; 7788 } 7789 7790 if ( name ) { 7791 7792 thisCache = pvt ? cache[ id ] : cache[ id ].data; 7793 7794 if ( thisCache ) { 7795 7796 // Support array or space separated string names for data keys 7797 if ( !jQuery.isArray( name ) ) { 7798 7799 // try the string as a key before any manipulation 7800 if ( name in thisCache ) { 7801 name = [ name ]; 7802 } else { 7803 7804 // split the camel cased version by spaces unless a key with the spaces exists 7805 name = jQuery.camelCase( name ); 7806 if ( name in thisCache ) { 7807 name = [ name ]; 7808 } else { 7809 name = name.split( " " ); 7810 } 7811 } 7812 } else { 7813 7814 // If "name" is an array of keys... 7815 // When data is initially created, via ("key", "val") signature, 7816 // keys will be converted to camelCase. 7817 // Since there is no way to tell _how_ a key was added, remove 7818 // both plain key and camelCase key. #12786 7819 // This will only penalize the array argument path. 7820 name = name.concat( jQuery.map( name, jQuery.camelCase ) ); 7821 } 7822 7823 i = name.length; 7824 while ( i-- ) { 7825 delete thisCache[ name[ i ] ]; 7826 } 7827 7828 // If there is no data left in the cache, we want to continue 7829 // and let the cache object itself get destroyed 7830 if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) { 7831 return; 7832 } 7833 } 7834 } 7835 7836 // See jQuery.data for more information 7837 if ( !pvt ) { 7838 delete cache[ id ].data; 7839 7840 // Don't destroy the parent cache unless the internal data object 7841 // had been the only thing left in it 7842 if ( !isEmptyDataObject( cache[ id ] ) ) { 7843 return; 7844 } 7845 } 7846 7847 // Destroy the cache 7848 if ( isNode ) { 7849 jQuery.cleanData( [ elem ], true ); 7850 7851 // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) 7852 /* jshint eqeqeq: false */ 7853 } else if ( support.deleteExpando || cache != cache.window ) { 7854 /* jshint eqeqeq: true */ 7855 delete cache[ id ]; 7856 7857 // When all else fails, undefined 7858 } else { 7859 cache[ id ] = undefined; 7860 } 7861 } 7862 7863 jQuery.extend( { 7864 cache: {}, 7865 7866 // The following elements (space-suffixed to avoid Object.prototype collisions) 7867 // throw uncatchable exceptions if you attempt to set expando properties 7868 noData: { 7869 "applet ": true, 7870 "embed ": true, 7871 7872 // ...but Flash objects (which have this classid) *can* handle expandos 7873 "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 7874 }, 7875 7876 hasData: function( elem ) { 7877 elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ]; 7878 return !!elem && !isEmptyDataObject( elem ); 7879 }, 7880 7881 data: function( elem, name, data ) { 7882 return internalData( elem, name, data ); 7883 }, 7884 7885 removeData: function( elem, name ) { 7886 return internalRemoveData( elem, name ); 7887 }, 7888 7889 // For internal use only. 7890 _data: function( elem, name, data ) { 7891 return internalData( elem, name, data, true ); 7892 }, 7893 7894 _removeData: function( elem, name ) { 7895 return internalRemoveData( elem, name, true ); 7896 } 7897 } ); 7898 7899 jQuery.fn.extend( { 7900 data: function( key, value ) { 7901 var i, name, data, 7902 elem = this[ 0 ], 7903 attrs = elem && elem.attributes; 7904 7905 // Special expections of .data basically thwart jQuery.access, 7906 // so implement the relevant behavior ourselves 7907 7908 // Gets all values 7909 if ( key === undefined ) { 7910 if ( this.length ) { 7911 data = jQuery.data( elem ); 7912 7913 if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { 7914 i = attrs.length; 7915 while ( i-- ) { 7916
vendor: 4,306 bytes, lines 7917-8107
7917 // Support: IE11+ 7918 // The attrs elements can be null (#14894) 7919 if ( attrs[ i ] ) { 7920 name = attrs[ i ].name; 7921 if ( name.indexOf( "data-" ) === 0 ) { 7922 name = jQuery.camelCase( name.slice( 5 ) ); 7923 dataAttr( elem, name, data[ name ] ); 7924 } 7925 } 7926 } 7927 jQuery._data( elem, "parsedAttrs", true ); 7928 } 7929 } 7930 7931 return data; 7932 } 7933 7934 // Sets multiple values 7935 if ( typeof key === "object" ) { 7936 return this.each( function() { 7937 jQuery.data( this, key ); 7938 } ); 7939 } 7940 7941 return arguments.length > 1 ? 7942 7943 // Sets one value 7944 this.each( function() { 7945 jQuery.data( this, key, value ); 7946 } ) : 7947 7948 // Gets one value 7949 // Try to fetch any internally stored data first 7950 elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; 7951 }, 7952 7953 removeData: function( key ) { 7954 return this.each( function() { 7955 jQuery.removeData( this, key ); 7956 } ); 7957 } 7958 } ); 7959 7960 7961 jQuery.extend( { 7962 queue: function( elem, type, data ) { 7963 var queue; 7964 7965 if ( elem ) { 7966 type = ( type || "fx" ) + "queue"; 7967 queue = jQuery._data( elem, type ); 7968 7969 // Speed up dequeue by getting out quickly if this is just a lookup 7970 if ( data ) { 7971 if ( !queue || jQuery.isArray( data ) ) { 7972 queue = jQuery._data( elem, type, jQuery.makeArray( data ) ); 7973 } else { 7974 queue.push( data ); 7975 } 7976 } 7977 return queue || []; 7978 } 7979 }, 7980 7981 dequeue: function( elem, type ) { 7982 type = type || "fx"; 7983 7984 var queue = jQuery.queue( elem, type ), 7985 startLength = queue.length, 7986 fn = queue.shift(), 7987 hooks = jQuery._queueHooks( elem, type ), 7988 next = function() { 7989 jQuery.dequeue( elem, type ); 7990 }; 7991 7992 // If the fx queue is dequeued, always remove the progress sentinel 7993 if ( fn === "inprogress" ) { 7994 fn = queue.shift(); 7995 startLength--; 7996 } 7997 7998 if ( fn ) { 7999 8000 // Add a progress sentinel to prevent the fx queue from being 8001 // automatically dequeued 8002 if ( type === "fx" ) { 8003 queue.unshift( "inprogress" ); 8004 } 8005 8006 // clear up the last queue stop function 8007 delete hooks.stop; 8008 fn.call( elem, next, hooks ); 8009 } 8010 8011 if ( !startLength && hooks ) { 8012 hooks.empty.fire(); 8013 } 8014 }, 8015 8016 // not intended for public consumption - generates a queueHooks object, 8017 // or returns the current one 8018 _queueHooks: function( elem, type ) { 8019 var key = type + "queueHooks"; 8020 return jQuery._data( elem, key ) || jQuery._data( elem, key, { 8021 empty: jQuery.Callbacks( "once memory" ).add( function() { 8022 jQuery._removeData( elem, type + "queue" ); 8023 jQuery._removeData( elem, key ); 8024 } ) 8025 } ); 8026 } 8027 } ); 8028 8029 jQuery.fn.extend( { 8030 queue: function( type, data ) { 8031 var setter = 2; 8032 8033 if ( typeof type !== "string" ) { 8034 data = type; 8035 type = "fx"; 8036 setter--; 8037 } 8038 8039 if ( arguments.length < setter ) { 8040 return jQuery.queue( this[ 0 ], type ); 8041 } 8042 8043 return data === undefined ? 8044 this : 8045 this.each( function() { 8046 var queue = jQuery.queue( this, type, data ); 8047 8048 // ensure a hooks for this queue 8049 jQuery._queueHooks( this, type ); 8050 8051 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 8052 jQuery.dequeue( this, type ); 8053 } 8054 } ); 8055 }, 8056 dequeue: function( type ) { 8057 return this.each( function() { 8058 jQuery.dequeue( this, type ); 8059 } ); 8060 }, 8061 clearQueue: function( type ) { 8062 return this.queue( type || "fx", [] ); 8063 }, 8064 8065 // Get a promise resolved when queues of a certain type 8066 // are emptied (fx is the type by default) 8067 promise: function( type, obj ) { 8068 var tmp, 8069 count = 1, 8070 defer = jQuery.Deferred(), 8071 elements = this, 8072 i = this.length, 8073 resolve = function() { 8074 if ( !( --count ) ) { 8075 defer.resolveWith( elements, [ elements ] ); 8076 } 8077 }; 8078 8079 if ( typeof type !== "string" ) { 8080 obj = type; 8081 type = undefined; 8082 } 8083 type = type || "fx"; 8084 8085 while ( i-- ) { 8086 tmp = jQuery._data( elements[ i ], type + "queueHooks" ); 8087 if ( tmp && tmp.empty ) { 8088 count++; 8089 tmp.empty.add( resolve ); 8090 } 8091 } 8092 resolve(); 8093 return defer.promise( obj ); 8094 } 8095 } ); 8096 8097 8098 ( function() { 8099 var shrinkWrapBlocksVal; 8100 8101 support.shrinkWrapBlocks = function() { 8102 if ( shrinkWrapBlocksVal != null ) { 8103 return shrinkWrapBlocksVal; 8104 } 8105 8106 // Will be changed later if needed. 8107 shrinkWrapBlocksVal = false;
8108 8109 // Minified: var b,c,d 8110 var div, body, container; 8111 8112 body = document.getElementsByTagName( "body" )[ 0 ]; 8113 if ( !body || !body.style ) { 8114 8115 // Test fired too early or in an unsupported environment, exit. 8116 return; 8117 } 8118 8119 // Setup 8120 div = document.createElement( "div" ); 8121 container = document.createElement( "div" ); 8122 container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; 8123 body.appendChild( container ).appendChild( div ); 8124 8125 // Support: IE6 8126 // Check if elements with layout shrink-wrap their children 8127 if ( typeof div.style.zoom !== "undefined" ) { 8128 8129 // Reset CSS: box-sizing; display; margin; border 8130 div.style.cssText = 8131 8132 // Support: Firefox<29, Android 2.3 8133 // Vendor-prefix box-sizing 8134 "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + 8135 "box-sizing:content-box;display:block;margin:0;border:0;" + 8136 "padding:1px;width:1px;zoom:1"; 8137 div.appendChild( document.createElement( "div" ) ).style.width = "5px"; 8138 shrinkWrapBlocksVal = div.offsetWidth !== 3; 8139 } 8140 8141 body.removeChild( container ); 8142 8143 return shrinkWrapBlocksVal; 8144 }; 8145 8146 } )(); 8147 var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 8148 8149 var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 8150 8151 8152 var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 8153 8154 var isHidden = function( elem, el ) { 8155 8156 // isHidden might be called from jQuery#filter function; 8157 // in that case, element will be second argument 8158 elem = el || elem; 8159 return jQuery.css( elem, "display" ) === "none" || 8160 !jQuery.contains( elem.ownerDocument, elem ); 8161 }; 8162 8163 8164 8165 function adjustCSS( elem, prop, valueParts, tween ) { 8166 var adjusted, 8167 scale = 1, 8168 maxIterations = 20, 8169 currentValue = tween ? 8170 function() { return tween.cur(); } : 8171 function() { return jQuery.css( elem, prop, "" ); }, 8172 initial = currentValue(), 8173 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 8174 8175 // Starting value computation is required for potential unit mismatches 8176 initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 8177 rcssNum.exec( jQuery.css( elem, prop ) ); 8178 8179 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 8180 8181 // Trust units reported by jQuery.css 8182 unit = unit || initialInUnit[ 3 ]; 8183 8184 // Make sure we update the tween properties later on 8185 valueParts = valueParts || []; 8186 8187 // Iteratively approximate from a nonzero starting point 8188 initialInUnit = +initial || 1; 8189 8190 do { 8191 8192 // If previous iteration zeroed out, double until we get *something*. 8193 // Use string for doubling so we don't accidentally see scale as unchanged below 8194 scale = scale || ".5"; 8195 8196 // Adjust and apply 8197 initialInUnit = initialInUnit / scale; 8198 jQuery.style( elem, prop, initialInUnit + unit ); 8199 8200 // Update scale, tolerating zero or NaN from tween.cur() 8201 // Break the loop if scale is unchanged or perfect, or if we've just had enough. 8202 } while ( 8203 scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations 8204 ); 8205 } 8206 8207 if ( valueParts ) { 8208 initialInUnit = +initialInUnit || +initial || 0; 8209 8210 // Apply relative offset (+=/-=) if specified 8211 adjusted = valueParts[ 1 ] ? 8212 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 8213 +valueParts[ 2 ]; 8214 if ( tween ) { 8215 tween.unit = unit; 8216 tween.start = initialInUnit; 8217 tween.end = adjusted; 8218 } 8219 } 8220 return adjusted; 8221 } 8222 8223 8224// Multifunctional method to get and set values of a collection 8225// The value/s can optionally be executed if it's a function 8226 var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 8227 var i = 0, 8228 length = elems.length, 8229 bulk = key == null; 8230 8231 // Sets many values 8232 if ( jQuery.type( key ) === "object" ) { 8233 chainable = true; 8234 for ( i in key ) { 8235 access( elems, fn, i, key[ i ], true, emptyGet, raw ); 8236 } 8237 8238 // Sets one value 8239 } else if ( value !== undefined ) { 8240 chainable = true; 8241 8242 if ( !jQuery.isFunction( value ) ) { 8243 raw = true; 8244 } 8245 8246 if ( bulk ) { 8247 8248 // Bulk operations run against the entire set 8249 if ( raw ) { 8250 fn.call( elems, value ); 8251 fn = null; 8252 8253 // ...except when executing function values 8254 } else { 8255 bulk = fn; 8256 fn = function( elem, key, value ) {
8257 return bulk.call( jQuery( elem ), value ); 8258 }; 8259 } 8260 } 8261 8262 if ( fn ) { 8263 for ( ; i < length; i++ ) { 8264 fn( 8265 elems[ i ], 8266 key, 8267 raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) 8268 ); 8269 } 8270 } 8271 } 8272 8273 return chainable ? 8274 elems : 8275 8276 // Gets 8277 bulk ? 8278 fn.call( elems ) : 8279 length ? fn( elems[ 0 ], key ) : emptyGet; 8280 }; 8281 var rcheckableType = ( /^(?:checkbox|radio)$/i ); 8282 8283 var rtagName = ( /<([\w:-]+)/ ); 8284 8285 var rscriptType = ( /^$|\/(?:java|ecma)script/i ); 8286 8287 var rleadingWhitespace = ( /^\s+/ ); 8288 8289 var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + 8290 "details|dialog|figcaption|figure|footer|header|hgroup|main|" + 8291 "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; 8292 8293 8294 8295 function createSafeFragment( document ) { 8296 var list = nodeNames.split( "|" ), 8297 safeFrag = document.createDocumentFragment(); 8298 8299 if ( safeFrag.createElement ) { 8300 while ( list.length ) { 8301 safeFrag.createElement( 8302 list.pop() 8303 ); 8304 } 8305 } 8306 return safeFrag; 8307 } 8308 8309 8310 ( function() { 8311 var div = document.createElement( "div" ), 8312 fragment = document.createDocumentFragment(), 8313 input = document.createElement( "input" ); 8314 8315 // Setup 8316 div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; 8317 8318 // IE strips leading whitespace when .innerHTML is used 8319 support.leadingWhitespace = div.firstChild.nodeType === 3; 8320 8321 // Make sure that tbody elements aren't automatically inserted 8322 // IE will insert them into empty tables 8323 support.tbody = !div.getElementsByTagName( "tbody" ).length; 8324 8325 // Make sure that link elements get serialized correctly by innerHTML 8326 // This requires a wrapper element in IE 8327 support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; 8328 8329 // Makes sure cloning an html5 element does not cause problems 8330 // Where outerHTML is undefined, this still works 8331 support.html5Clone = 8332 document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>"; 8333 8334 // Check if a disconnected checkbox will retain its checked 8335 // value of true after appended to the DOM (IE6/7) 8336 input.type = "checkbox"; 8337 input.checked = true; 8338 fragment.appendChild( input ); 8339 support.appendChecked = input.checked; 8340 8341 // Make sure textarea (and checkbox) defaultValue is properly cloned 8342 // Support: IE6-IE11+ 8343 div.innerHTML = "<textarea>x</textarea>"; 8344 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 8345 8346 // #11217 - WebKit loses check when the name is after the checked attribute 8347 fragment.appendChild( div ); 8348 8349 // Support: Windows Web Apps (WWA) 8350 // `name` and `type` must use .setAttribute for WWA (#14901) 8351 input = document.createElement( "input" ); 8352 input.setAttribute( "type", "radio" ); 8353 input.setAttribute( "checked", "checked" ); 8354 input.setAttribute( "name", "t" ); 8355 8356 div.appendChild( input ); 8357 8358 // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 8359 // old WebKit doesn't clone checked state correctly in fragments 8360 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 8361 8362 // Support: IE<9 8363 // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ 8364 support.noCloneEvent = !!div.addEventListener; 8365 8366 // Support: IE<9 8367 // Since attributes and properties are the same in IE, 8368 // cleanData must set properties to undefined rather than use removeAttribute 8369 div[ jQuery.expando ] = 1; 8370 support.attributes = !div.getAttribute( jQuery.expando ); 8371 } )(); 8372 8373 8374// We have to close these tags to support XHTML (#13200) 8375 var wrapMap = { 8376 option: [ 1, "<select multiple='multiple'>", "</select>" ], 8377 legend: [ 1, "<fieldset>", "</fieldset>" ], 8378 area: [ 1, "<map>", "</map>" ], 8379 8380 // Support: IE8 8381 param: [ 1, "<object>", "</object>" ], 8382 thead: [ 1, "<table>", "</table>" ], 8383 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 8384 col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], 8385 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 8386 8387 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, 8388 // unless wrapped in a div with non-breaking characters in front of it. 8389 _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] 8390 }; 8391 8392// Support: IE8-IE9 8393 wrapMap.optgroup = wrapMap.option; 8394 8395 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 8396 wrapMap.th = wrapMap.td; 8397 8398 8399 function getAll( context, tag ) { 8400 var elems, elem, 8401 i = 0, 8402 found = typeof context.getElementsByTagName !== "undefined" ? 8403 context.getElementsByTagName( tag || "*" ) : 8404 typeof context.querySelectorAll !== "undefined" ? 8405 context.querySelectorAll( tag || "*" ) : 8406 undefined; 8407 8408 if ( !found ) { 8409 for ( found = [], elems = context.childNodes || context; 8410 ( elem = elems[ i ] ) != null; 8411 i++ 8412 ) { 8413 if ( !tag || jQuery.nodeName( elem, tag ) ) { 8414 found.push( elem ); 8415 } else { 8416 jQuery.merge( found, getAll( elem, tag ) ); 8417 } 8418 } 8419 } 8420 8421 return tag === undefined || tag && jQuery.nodeName( context, tag ) ? 8422 jQuery.merge( [ context ], found ) : 8423 found; 8424 } 8425 8426 8427// Mark scripts as having already been evaluated 8428 function setGlobalEval( elems, refElements ) { 8429 var elem, 8430 i = 0; 8431 for ( ; ( elem = elems[ i ] ) != null; i++ ) { 8432 jQuery._data( 8433 elem, 8434 "globalEval", 8435 !refElements || jQuery._data( refElements[ i ], "globalEval" ) 8436 ); 8437 } 8438 } 8439 8440
8441 var rhtml = /<|&#?\w+;/, 8442 rtbody = /<tbody/i; 8443 8444 function fixDefaultChecked( elem ) { 8445 if ( rcheckableType.test( elem.type ) ) { 8446 elem.defaultChecked = elem.checked; 8447 } 8448 } 8449 8450 function buildFragment( elems, context, scripts, selection, ignored ) { 8451 var j, elem, contains, 8452 tmp, tag, tbody, wrap, 8453 l = elems.length, 8454 8455 // Ensure a safe fragment 8456 safe = createSafeFragment( context ), 8457 8458 nodes = [], 8459 i = 0; 8460 8461 for ( ; i < l; i++ ) { 8462 elem = elems[ i ]; 8463 8464 if ( elem || elem === 0 ) { 8465 8466 // Add nodes directly 8467 if ( jQuery.type( elem ) === "object" ) { 8468 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 8469 8470 // Convert non-html into a text node 8471 } else if ( !rhtml.test( elem ) ) { 8472 nodes.push( context.createTextNode( elem ) ); 8473 8474 // Convert html into DOM nodes 8475 } else { 8476 tmp = tmp || safe.appendChild( context.createElement( "div" ) ); 8477 8478 // Deserialize a standard representation 8479 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 8480 wrap = wrapMap[ tag ] || wrapMap._default; 8481 8482 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 8483 8484 // Descend through wrappers to the right content 8485 j = wrap[ 0 ]; 8486 while ( j-- ) { 8487 tmp = tmp.lastChild; 8488 } 8489 8490 // Manually add leading whitespace removed by IE 8491 if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { 8492 nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) ); 8493 } 8494 8495 // Remove IE's autoinserted <tbody> from table fragments 8496 if ( !support.tbody ) { 8497 8498 // String was a <table>, *may* have spurious <tbody> 8499 elem = tag === "table" && !rtbody.test( elem ) ? 8500 tmp.firstChild : 8501 8502 // String was a bare <thead> or <tfoot> 8503 wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ? 8504 tmp : 8505 0; 8506 8507 j = elem && elem.childNodes.length; 8508 while ( j-- ) { 8509 if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) && 8510 !tbody.childNodes.length ) { 8511 8512 elem.removeChild( tbody ); 8513 } 8514 } 8515 } 8516 8517 jQuery.merge( nodes, tmp.childNodes ); 8518 8519 // Fix #12392 for WebKit and IE > 9 8520 tmp.textContent = ""; 8521 8522 // Fix #12392 for oldIE 8523 while ( tmp.firstChild ) { 8524 tmp.removeChild( tmp.firstChild ); 8525 } 8526 8527 // Remember the top-level container for proper cleanup 8528 tmp = safe.lastChild; 8529 } 8530 } 8531 } 8532 8533 // Fix #11356: Clear elements from fragment 8534 if ( tmp ) { 8535 safe.removeChild( tmp ); 8536 } 8537 8538 // Reset defaultChecked for any radios and checkboxes 8539 // about to be appended to the DOM in IE 6/7 (#8060) 8540 if ( !support.appendChecked ) { 8541 jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); 8542 } 8543 8544 i = 0; 8545 while ( ( elem = nodes[ i++ ] ) ) { 8546 8547 // Skip elements already in the context collection (trac-4087) 8548 if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 8549 if ( ignored ) { 8550 ignored.push( elem ); 8551 } 8552 8553 continue; 8554 } 8555 8556 contains = jQuery.contains( elem.ownerDocument, elem ); 8557 8558 // Append to fragment 8559 tmp = getAll( safe.appendChild( elem ), "script" ); 8560 8561 // Preserve script evaluation history 8562 if ( contains ) { 8563 setGlobalEval( tmp ); 8564 } 8565 8566 // Capture executables 8567 if ( scripts ) { 8568 j = 0; 8569 while ( ( elem = tmp[ j++ ] ) ) { 8570 if ( rscriptType.test( elem.type || "" ) ) { 8571 scripts.push( elem ); 8572 } 8573 } 8574 } 8575 } 8576 8577 tmp = null; 8578 8579 return safe; 8580 } 8581 8582 8583 ( function() { 8584 var i, eventName, 8585 div = document.createElement( "div" ); 8586 8587 // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) 8588 for ( i in { submit: true, change: true, focusin: true } ) { 8589 eventName = "on" + i; 8590
vendor: 14,215 bytes, lines 8591-9070
8591 if ( !( support[ i ] = eventName in window ) ) { 8592 8593 // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) 8594 div.setAttribute( eventName, "t" ); 8595 support[ i ] = div.attributes[ eventName ].expando === false; 8596 } 8597 } 8598 8599 // Null elements to avoid leaks in IE. 8600 div = null; 8601 } )(); 8602 8603 8604 var rformElems = /^(?:input|select|textarea)$/i, 8605 rkeyEvent = /^key/, 8606 rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, 8607 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 8608 rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 8609 8610 function returnTrue() { 8611 return true; 8612 } 8613 8614 function returnFalse() { 8615 return false; 8616 } 8617 8618// Support: IE9 8619// See #13393 for more info 8620 function safeActiveElement() { 8621 try { 8622 return document.activeElement; 8623 } catch ( err ) { } 8624 } 8625 8626 function on( elem, types, selector, data, fn, one ) { 8627 var origFn, type; 8628 8629 // Types can be a map of types/handlers 8630 if ( typeof types === "object" ) { 8631 8632 // ( types-Object, selector, data ) 8633 if ( typeof selector !== "string" ) { 8634 8635 // ( types-Object, data ) 8636 data = data || selector; 8637 selector = undefined; 8638 } 8639 for ( type in types ) { 8640 on( elem, type, selector, data, types[ type ], one ); 8641 } 8642 return elem; 8643 } 8644 8645 if ( data == null && fn == null ) { 8646 8647 // ( types, fn ) 8648 fn = selector; 8649 data = selector = undefined; 8650 } else if ( fn == null ) { 8651 if ( typeof selector === "string" ) { 8652 8653 // ( types, selector, fn ) 8654 fn = data; 8655 data = undefined; 8656 } else { 8657 8658 // ( types, data, fn ) 8659 fn = data; 8660 data = selector; 8661 selector = undefined; 8662 } 8663 } 8664 if ( fn === false ) { 8665 fn = returnFalse; 8666 } else if ( !fn ) { 8667 return elem; 8668 } 8669 8670 if ( one === 1 ) { 8671 origFn = fn; 8672 fn = function( event ) { 8673 8674 // Can use an empty set, since event contains the info 8675 jQuery().off( event ); 8676 return origFn.apply( this, arguments ); 8677 }; 8678 8679 // Use same guid so caller can remove using origFn 8680 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 8681 } 8682 return elem.each( function() { 8683 jQuery.event.add( this, types, fn, data, selector ); 8684 } ); 8685 } 8686 8687 /* 8688 * Helper functions for managing events -- not part of the public interface. 8689 * Props to Dean Edwards' addEvent library for many of the ideas. 8690 */ 8691 jQuery.event = { 8692 8693 global: {}, 8694 8695 add: function( elem, types, handler, data, selector ) { 8696 var tmp, events, t, handleObjIn, 8697 special, eventHandle, handleObj, 8698 handlers, type, namespaces, origType, 8699 elemData = jQuery._data( elem ); 8700 8701 // Don't attach events to noData or text/comment nodes (but allow plain objects) 8702 if ( !elemData ) { 8703 return; 8704 } 8705 8706 // Caller can pass in an object of custom data in lieu of the handler 8707 if ( handler.handler ) { 8708 handleObjIn = handler; 8709 handler = handleObjIn.handler; 8710 selector = handleObjIn.selector; 8711 } 8712 8713 // Make sure that the handler has a unique ID, used to find/remove it later 8714 if ( !handler.guid ) { 8715 handler.guid = jQuery.guid++; 8716 } 8717 8718 // Init the element's event structure and main handler, if this is the first 8719 if ( !( events = elemData.events ) ) { 8720 events = elemData.events = {}; 8721 } 8722 if ( !( eventHandle = elemData.handle ) ) { 8723 eventHandle = elemData.handle = function( e ) { 8724 8725 // Discard the second event of a jQuery.event.trigger() and 8726 // when an event is called after a page has unloaded 8727 return typeof jQuery !== "undefined" && 8728 ( !e || jQuery.event.triggered !== e.type ) ? 8729 jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : 8730 undefined; 8731 }; 8732 8733 // Add elem as a property of the handle fn to prevent a memory leak 8734 // with IE non-native events 8735 eventHandle.elem = elem; 8736 } 8737 8738 // Handle multiple events separated by a space 8739 types = ( types || "" ).match( rnotwhite ) || [ "" ]; 8740 t = types.length; 8741 while ( t-- ) { 8742 tmp = rtypenamespace.exec( types[ t ] ) || []; 8743 type = origType = tmp[ 1 ]; 8744 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 8745 8746 // There *must* be a type, no attaching namespace-only handlers 8747 if ( !type ) { 8748 continue; 8749 } 8750 8751 // If event changes its type, use the special event handlers for the changed type 8752 special = jQuery.event.special[ type ] || {}; 8753 8754 // If selector defined, determine special event api type, otherwise given type 8755 type = ( selector ? special.delegateType : special.bindType ) || type; 8756 8757 // Update special based on newly reset type 8758 special = jQuery.event.special[ type ] || {}; 8759 8760 // handleObj is passed to all event handlers 8761 handleObj = jQuery.extend( { 8762 type: type, 8763 origType: origType, 8764 data: data, 8765 handler: handler, 8766 guid: handler.guid, 8767 selector: selector, 8768 needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 8769 namespace: namespaces.join( "." ) 8770 }, handleObjIn ); 8771 8772 // Init the event handler queue if we're the first 8773 if ( !( handlers = events[ type ] ) ) { 8774 handlers = events[ type ] = []; 8775 handlers.delegateCount = 0; 8776 8777 // Only use addEventListener/attachEvent if the special events handler returns false 8778 if ( !special.setup || 8779 special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 8780 8781 // Bind the global event handler to the element 8782 if ( elem.addEventListener ) { 8783 elem.addEventListener( type, eventHandle, false ); 8784 8785 } else if ( elem.attachEvent ) { 8786 elem.attachEvent( "on" + type, eventHandle ); 8787 } 8788 } 8789 } 8790 8791 if ( special.add ) { 8792 special.add.call( elem, handleObj ); 8793 8794 if ( !handleObj.handler.guid ) { 8795 handleObj.handler.guid = handler.guid; 8796 } 8797 } 8798 8799 // Add to the element's handler list, delegates in front 8800 if ( selector ) { 8801 handlers.splice( handlers.delegateCount++, 0, handleObj ); 8802 } else { 8803 handlers.push( handleObj ); 8804 } 8805 8806 // Keep track of which events have ever been used, for event optimization 8807 jQuery.event.global[ type ] = true; 8808 } 8809 8810 // Nullify elem to prevent memory leaks in IE 8811 elem = null; 8812 }, 8813 8814 // Detach an event or set of events from an element 8815 remove: function( elem, types, handler, selector, mappedTypes ) { 8816 var j, handleObj, tmp, 8817 origCount, t, events, 8818 special, handlers, type, 8819 namespaces, origType, 8820 elemData = jQuery.hasData( elem ) && jQuery._data( elem ); 8821 8822 if ( !elemData || !( events = elemData.events ) ) { 8823 return; 8824 } 8825 8826 // Once for each type.namespace in types; type may be omitted 8827 types = ( types || "" ).match( rnotwhite ) || [ "" ]; 8828 t = types.length; 8829 while ( t-- ) { 8830 tmp = rtypenamespace.exec( types[ t ] ) || []; 8831 type = origType = tmp[ 1 ]; 8832 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 8833 8834 // Unbind all events (on this namespace, if provided) for the element 8835 if ( !type ) { 8836 for ( type in events ) { 8837 jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 8838 } 8839 continue; 8840 } 8841 8842 special = jQuery.event.special[ type ] || {}; 8843 type = ( selector ? special.delegateType : special.bindType ) || type; 8844 handlers = events[ type ] || []; 8845 tmp = tmp[ 2 ] && 8846 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); 8847 8848 // Remove matching events 8849 origCount = j = handlers.length; 8850 while ( j-- ) { 8851 handleObj = handlers[ j ]; 8852 8853 if ( ( mappedTypes || origType === handleObj.origType ) && 8854 ( !handler || handler.guid === handleObj.guid ) && 8855 ( !tmp || tmp.test( handleObj.namespace ) ) && 8856 ( !selector || selector === handleObj.selector || 8857 selector === "**" && handleObj.selector ) ) { 8858 handlers.splice( j, 1 ); 8859 8860 if ( handleObj.selector ) { 8861 handlers.delegateCount--; 8862 } 8863 if ( special.remove ) { 8864 special.remove.call( elem, handleObj ); 8865 } 8866 } 8867 } 8868 8869 // Remove generic event handler if we removed something and no more handlers exist 8870 // (avoids potential for endless recursion during removal of special event handlers) 8871 if ( origCount && !handlers.length ) { 8872 if ( !special.teardown || 8873 special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 8874 8875 jQuery.removeEvent( elem, type, elemData.handle ); 8876 } 8877 8878 delete events[ type ]; 8879 } 8880 } 8881 8882 // Remove the expando if it's no longer used 8883 if ( jQuery.isEmptyObject( events ) ) { 8884 delete elemData.handle; 8885 8886 // removeData also checks for emptiness and clears the expando if empty 8887 // so use it instead of delete 8888 jQuery._removeData( elem, "events" ); 8889 } 8890 }, 8891 8892 trigger: function( event, data, elem, onlyHandlers ) { 8893 var handle, ontype, cur, 8894 bubbleType, special, tmp, i, 8895 eventPath = [ elem || document ], 8896 type = hasOwn.call( event, "type" ) ? event.type : event, 8897 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 8898 8899 cur = tmp = elem = elem || document; 8900 8901 // Don't do events on text and comment nodes 8902 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 8903 return; 8904 } 8905 8906 // focus/blur morphs to focusin/out; ensure we're not firing them right now 8907 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 8908 return; 8909 } 8910 8911 if ( type.indexOf( "." ) > -1 ) { 8912 8913 // Namespaced trigger; create a regexp to match event type in handle() 8914 namespaces = type.split( "." ); 8915 type = namespaces.shift(); 8916 namespaces.sort(); 8917 } 8918 ontype = type.indexOf( ":" ) < 0 && "on" + type; 8919 8920 // Caller can pass in a jQuery.Event object, Object, or just an event type string 8921 event = event[ jQuery.expando ] ? 8922 event : 8923 new jQuery.Event( type, typeof event === "object" && event ); 8924 8925 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 8926 event.isTrigger = onlyHandlers ? 2 : 3; 8927 event.namespace = namespaces.join( "." ); 8928 event.rnamespace = event.namespace ? 8929 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 8930 null; 8931 8932 // Clean up the event in case it is being reused 8933 event.result = undefined; 8934 if ( !event.target ) { 8935 event.target = elem; 8936 } 8937 8938 // Clone any incoming data and prepend the event, creating the handler arg list 8939 data = data == null ? 8940 [ event ] : 8941 jQuery.makeArray( data, [ event ] ); 8942 8943 // Allow special events to draw outside the lines 8944 special = jQuery.event.special[ type ] || {}; 8945 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 8946 return; 8947 } 8948 8949 // Determine event propagation path in advance, per W3C events spec (#9951) 8950 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 8951 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { 8952 8953 bubbleType = special.delegateType || type; 8954 if ( !rfocusMorph.test( bubbleType + type ) ) { 8955 cur = cur.parentNode; 8956 } 8957 for ( ; cur; cur = cur.parentNode ) { 8958 eventPath.push( cur ); 8959 tmp = cur; 8960 } 8961 8962 // Only add window if we got to document (e.g., not plain obj or detached DOM) 8963 if ( tmp === ( elem.ownerDocument || document ) ) { 8964 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 8965 } 8966 } 8967 8968 // Fire handlers on the event path 8969 i = 0; 8970 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 8971 8972 event.type = i > 1 ? 8973 bubbleType : 8974 special.bindType || type; 8975 8976 // jQuery handler 8977 handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && 8978 jQuery._data( cur, "handle" ); 8979 8980 if ( handle ) { 8981 handle.apply( cur, data ); 8982 } 8983 8984 // Native handler 8985 handle = ontype && cur[ ontype ]; 8986 if ( handle && handle.apply && acceptData( cur ) ) { 8987 event.result = handle.apply( cur, data ); 8988 if ( event.result === false ) { 8989 event.preventDefault(); 8990 } 8991 } 8992 } 8993 event.type = type; 8994 8995 // If nobody prevented the default action, do it now 8996 if ( !onlyHandlers && !event.isDefaultPrevented() ) { 8997 8998 if ( 8999 ( !special._default || 9000 special._default.apply( eventPath.pop(), data ) === false 9001 ) && acceptData( elem ) 9002 ) { 9003 9004 // Call a native DOM method on the target with the same name name as the event. 9005 // Can't use an .isFunction() check here because IE6/7 fails that test. 9006 // Don't do default actions on window, that's where global variables be (#6170) 9007 if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { 9008 9009 // Don't re-trigger an onFOO event when we call its FOO() method 9010 tmp = elem[ ontype ]; 9011 9012 if ( tmp ) { 9013 elem[ ontype ] = null; 9014 } 9015 9016 // Prevent re-triggering of the same event, since we already bubbled it above 9017 jQuery.event.triggered = type; 9018 try { 9019 elem[ type ](); 9020 } catch ( e ) { 9021 9022 // IE<9 dies on focus/blur to hidden element (#1486,#12518) 9023 // only reproducible on winXP IE8 native, not IE9 in IE8 mode 9024 } 9025 jQuery.event.triggered = undefined; 9026 9027 if ( tmp ) { 9028 elem[ ontype ] = tmp; 9029 } 9030 } 9031 } 9032 } 9033 9034 return event.result; 9035 }, 9036 9037 dispatch: function( event ) { 9038 9039 // Make a writable jQuery.Event from the native event object 9040 event = jQuery.event.fix( event ); 9041 9042 var i, j, ret, matched, handleObj, 9043 handlerQueue = [], 9044 args = slice.call( arguments ), 9045 handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], 9046 special = jQuery.event.special[ event.type ] || {}; 9047 9048 // Use the fix-ed jQuery.Event rather than the (read-only) native event 9049 args[ 0 ] = event; 9050 event.delegateTarget = this; 9051 9052 // Call the preDispatch hook for the mapped type, and let it bail if desired 9053 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 9054 return; 9055 } 9056 9057 // Determine handlers 9058 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 9059 9060 // Run delegates first; they may want to stop propagation beneath us 9061 i = 0; 9062 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { 9063 event.currentTarget = matched.elem; 9064 9065 j = 0; 9066 while ( ( handleObj = matched.handlers[ j++ ] ) && 9067 !event.isImmediatePropagationStopped() ) { 9068 9069 // Triggered event must either 1) have no namespace, or 2) have namespace(s) 9070 // a subset or equal to those in the bound event (both can have no namespace).
9071 if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { 9072 9073 event.handleObj = handleObj; 9074 event.data = handleObj.data; 9075 9076 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || 9077 handleObj.handler ).apply( matched.elem, args ); 9078 9079 if ( ret !== undefined ) { 9080 if ( ( event.result = ret ) === false ) { 9081 event.preventDefault(); 9082 event.stopPropagation(); 9083 } 9084 } 9085 } 9086 } 9087 } 9088 9089 // Call the postDispatch hook for the mapped type 9090 if ( special.postDispatch ) { 9091 special.postDispatch.call( this, event ); 9092 } 9093 9094 return event.result; 9095 }, 9096 9097 handlers: function( event, handlers ) { 9098 var i, matches, sel, handleObj, 9099 handlerQueue = [], 9100 delegateCount = handlers.delegateCount, 9101 cur = event.target; 9102 9103 // Support (at least): Chrome, IE9 9104 // Find delegate handlers 9105 // Black-hole SVG <use> instance trees (#13180) 9106 // 9107 // Support: Firefox<=42+ 9108 // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) 9109 if ( delegateCount && cur.nodeType && 9110 ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { 9111 9112 /* jshint eqeqeq: false */ 9113 for ( ; cur != this; cur = cur.parentNode || this ) { 9114 /* jshint eqeqeq: true */ 9115 9116 // Don't check non-elements (#13208) 9117 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 9118 if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { 9119 matches = []; 9120 for ( i = 0; i < delegateCount; i++ ) { 9121 handleObj = handlers[ i ]; 9122 9123 // Don't conflict with Object.prototype properties (#13203) 9124 sel = handleObj.selector + " "; 9125 9126 if ( matches[ sel ] === undefined ) { 9127 matches[ sel ] = handleObj.needsContext ? 9128 jQuery( sel, this ).index( cur ) > -1 : 9129 jQuery.find( sel, this, null, [ cur ] ).length; 9130 } 9131 if ( matches[ sel ] ) { 9132 matches.push( handleObj ); 9133 } 9134 } 9135 if ( matches.length ) { 9136 handlerQueue.push( { elem: cur, handlers: matches } ); 9137 } 9138 } 9139 } 9140 } 9141 9142 // Add the remaining (directly-bound) handlers 9143 if ( delegateCount < handlers.length ) { 9144 handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); 9145 } 9146 9147 return handlerQueue; 9148 }, 9149 9150 fix: function( event ) { 9151 if ( event[ jQuery.expando ] ) { 9152 return event; 9153 } 9154 9155 // Create a writable copy of the event object and normalize some properties 9156 var i, prop, copy, 9157 type = event.type, 9158 originalEvent = event, 9159 fixHook = this.fixHooks[ type ]; 9160 9161 if ( !fixHook ) { 9162 this.fixHooks[ type ] = fixHook = 9163 rmouseEvent.test( type ) ? this.mouseHooks : 9164 rkeyEvent.test( type ) ? this.keyHooks : 9165 {}; 9166 } 9167 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; 9168 9169 event = new jQuery.Event( originalEvent ); 9170 9171 i = copy.length; 9172 while ( i-- ) { 9173 prop = copy[ i ]; 9174 event[ prop ] = originalEvent[ prop ]; 9175 } 9176 9177 // Support: IE<9 9178 // Fix target property (#1925) 9179 if ( !event.target ) { 9180 event.target = originalEvent.srcElement || document; 9181 } 9182 9183 // Support: Safari 6-8+ 9184 // Target should not be a text node (#504, #13143) 9185 if ( event.target.nodeType === 3 ) { 9186 event.target = event.target.parentNode; 9187 } 9188 9189 // Support: IE<9 9190 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) 9191 event.metaKey = !!event.metaKey; 9192 9193 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; 9194 }, 9195 9196 // Includes some event props shared by KeyEvent and MouseEvent 9197 props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + 9198 "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), 9199 9200 fixHooks: {}, 9201 9202 keyHooks: { 9203 props: "char charCode key keyCode".split( " " ), 9204 filter: function( event, original ) { 9205 9206 // Add which for key events 9207 if ( event.which == null ) { 9208 event.which = original.charCode != null ? original.charCode : original.keyCode; 9209 } 9210 9211 return event; 9212 } 9213 }, 9214 9215 mouseHooks: { 9216 props: ( "button buttons clientX clientY fromElement offsetX offsetY " + 9217 "pageX pageY screenX screenY toElement" ).split( " " ), 9218 filter: function( event, original ) { 9219 var body, eventDoc, doc, 9220 button = original.button, 9221 fromElement = original.fromElement; 9222 9223 // Calculate pageX/Y if missing and clientX/Y available 9224 if ( event.pageX == null && original.clientX != null ) { 9225 eventDoc = event.target.ownerDocument || document; 9226 doc = eventDoc.documentElement; 9227 body = eventDoc.body; 9228 9229 event.pageX = original.clientX + 9230 ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - 9231 ( doc && doc.clientLeft || body && body.clientLeft || 0 ); 9232 event.pageY = original.clientY + 9233 ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - 9234 ( doc && doc.clientTop || body && body.clientTop || 0 ); 9235 } 9236 9237 // Add relatedTarget, if necessary 9238 if ( !event.relatedTarget && fromElement ) { 9239 event.relatedTarget = fromElement === event.target ? 9240 original.toElement : 9241 fromElement; 9242 } 9243 9244 // Add which for click: 1 === left; 2 === middle; 3 === right 9245 // Note: button is not normalized, so don't use it 9246 if ( !event.which && button !== undefined ) { 9247 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); 9248 } 9249 9250 return event; 9251 } 9252 }, 9253 9254 special: { 9255 load: { 9256 9257 // Prevent triggered image.load events from bubbling to window.load 9258 noBubble: true 9259 }, 9260 focus: { 9261 9262 // Fire native event if possible so blur/focus sequence is correct 9263 trigger: function() { 9264 if ( this !== safeActiveElement() && this.focus ) { 9265 try { 9266 this.focus(); 9267 return false;
9268 } catch ( e ) { 9269 9270 // Support: IE<9 9271 // If we error on focus to hidden element (#1486, #12518), 9272 // let .trigger() run the handlers 9273 } 9274 } 9275 }, 9276 delegateType: "focusin" 9277 }, 9278 blur: { 9279 trigger: function() { 9280 if ( this === safeActiveElement() && this.blur ) { 9281 this.blur(); 9282 return false; 9283 } 9284 }, 9285 delegateType: "focusout" 9286 }, 9287 click: { 9288 9289 // For checkbox, fire native event so checked state will be right 9290 trigger: function() { 9291 if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { 9292 this.click(); 9293 return false; 9294 } 9295 }, 9296 9297 // For cross-browser consistency, don't fire native .click() on links 9298 _default: function( event ) { 9299 return jQuery.nodeName( event.target, "a" ); 9300 } 9301 }, 9302 9303 beforeunload: { 9304 postDispatch: function( event ) { 9305 9306 // Support: Firefox 20+ 9307 // Firefox doesn't alert if the returnValue field is not set. 9308 if ( event.result !== undefined && event.originalEvent ) { 9309 event.originalEvent.returnValue = event.result; 9310 } 9311 } 9312 } 9313 }, 9314 9315 // Piggyback on a donor event to simulate a different one 9316 simulate: function( type, elem, event ) { 9317 var e = jQuery.extend( 9318 new jQuery.Event(), 9319 event, 9320 { 9321 type: type, 9322 isSimulated: true 9323 9324 // Previously, `originalEvent: {}` was set here, so stopPropagation call 9325 // would not be triggered on donor event, since in our own 9326 // jQuery.event.stopPropagation function we had a check for existence of 9327 // originalEvent.stopPropagation method, so, consequently it would be a noop. 9328 // 9329 // Guard for simulated events was moved to jQuery.event.stopPropagation function 9330 // since `originalEvent` should point to the original event for the 9331 // constancy with other events and for more focused logic 9332 } 9333 ); 9334 9335 jQuery.event.trigger( e, null, elem ); 9336 9337 if ( e.isDefaultPrevented() ) { 9338 event.preventDefault(); 9339 } 9340 } 9341 }; 9342 9343 jQuery.removeEvent = document.removeEventListener ? 9344 function( elem, type, handle ) { 9345 9346 // This "if" is needed for plain objects 9347 if ( elem.removeEventListener ) { 9348 elem.removeEventListener( type, handle ); 9349 } 9350 } : 9351 function( elem, type, handle ) { 9352 var name = "on" + type; 9353 9354 if ( elem.detachEvent ) { 9355 9356 // #8545, #7054, preventing memory leaks for custom events in IE6-8 9357 // detachEvent needed property on element, by name of that event, 9358 // to properly expose it to GC 9359 if ( typeof elem[ name ] === "undefined" ) { 9360 elem[ name ] = null; 9361 } 9362 9363 elem.detachEvent( name, handle ); 9364 } 9365 }; 9366 9367 jQuery.Event = function( src, props ) { 9368 9369 // Allow instantiation without the 'new' keyword 9370 if ( !( this instanceof jQuery.Event ) ) { 9371 return new jQuery.Event( src, props ); 9372 } 9373 9374 // Event object 9375 if ( src && src.type ) { 9376 this.originalEvent = src; 9377 this.type = src.type; 9378 9379 // Events bubbling up the document may have been marked as prevented 9380 // by a handler lower down the tree; reflect the correct value. 9381 this.isDefaultPrevented = src.defaultPrevented || 9382 src.defaultPrevented === undefined && 9383 9384 // Support: IE < 9, Android < 4.0 9385 src.returnValue === false ? 9386 returnTrue : 9387 returnFalse; 9388 9389 // Event type 9390 } else { 9391 this.type = src; 9392 } 9393 9394 // Put explicitly provided properties onto the event object 9395 if ( props ) { 9396 jQuery.extend( this, props ); 9397 } 9398 9399 // Create a timestamp if incoming event doesn't have one 9400 this.timeStamp = src && src.timeStamp || jQuery.now(); 9401 9402 // Mark it as fixed 9403 this[ jQuery.expando ] = true; 9404 }; 9405 9406// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 9407// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 9408 jQuery.Event.prototype = { 9409 constructor: jQuery.Event, 9410 isDefaultPrevented: returnFalse, 9411 isPropagationStopped: returnFalse, 9412 isImmediatePropagationStopped: returnFalse, 9413 9414 preventDefault: function() { 9415 var e = this.originalEvent; 9416 9417 this.isDefaultPrevented = returnTrue; 9418 if ( !e ) { 9419 return; 9420 } 9421 9422 // If preventDefault exists, run it on the original event 9423 if ( e.preventDefault ) { 9424 e.preventDefault(); 9425
9426 // Support: IE 9427 // Otherwise set the returnValue property of the original event to false 9428 } else { 9429 e.returnValue = false; 9430 } 9431 }, 9432 stopPropagation: function() { 9433 var e = this.originalEvent; 9434 9435 this.isPropagationStopped = returnTrue; 9436 9437 if ( !e || this.isSimulated ) { 9438 return; 9439 } 9440 9441 // If stopPropagation exists, run it on the original event 9442 if ( e.stopPropagation ) { 9443 e.stopPropagation(); 9444 } 9445 9446 // Support: IE 9447 // Set the cancelBubble property of the original event to true 9448 e.cancelBubble = true; 9449 }, 9450 stopImmediatePropagation: function() { 9451 var e = this.originalEvent; 9452 9453 this.isImmediatePropagationStopped = returnTrue; 9454 9455 if ( e && e.stopImmediatePropagation ) { 9456 e.stopImmediatePropagation(); 9457 } 9458 9459 this.stopPropagation(); 9460 } 9461 }; 9462 9463// Create mouseenter/leave events using mouseover/out and event-time checks 9464// so that event delegation works in jQuery. 9465// Do the same for pointerenter/pointerleave and pointerover/pointerout 9466// 9467// Support: Safari 7 only 9468// Safari sends mouseenter too often; see: 9469// https://code.google.com/p/chromium/issues/detail?id=470258 9470// for the description of the bug (it existed in older Chrome versions as well). 9471 jQuery.each( { 9472 mouseenter: "mouseover", 9473 mouseleave: "mouseout", 9474 pointerenter: "pointerover", 9475 pointerleave: "pointerout" 9476 }, function( orig, fix ) { 9477 jQuery.event.special[ orig ] = { 9478 delegateType: fix, 9479 bindType: fix, 9480 9481 handle: function( event ) { 9482 var ret, 9483 target = this, 9484 related = event.relatedTarget, 9485 handleObj = event.handleObj; 9486 9487 // For mouseenter/leave call the handler if related is outside the target. 9488 // NB: No relatedTarget if the mouse left/entered the browser window 9489 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { 9490 event.type = handleObj.origType; 9491 ret = handleObj.handler.apply( this, arguments ); 9492 event.type = fix; 9493 } 9494 return ret; 9495 } 9496 }; 9497 } ); 9498 9499// IE submit delegation 9500 if ( !support.submit ) { 9501 9502 jQuery.event.special.submit = { 9503 setup: function() { 9504 9505 // Only need this for delegated form submit events 9506 if ( jQuery.nodeName( this, "form" ) ) { 9507 return false; 9508 } 9509 9510 // Lazy-add a submit handler when a descendant form may potentially be submitted 9511 jQuery.event.add( this, "click._submit keypress._submit", function( e ) { 9512 9513 // Node name check avoids a VML-related crash in IE (#9807) 9514 var elem = e.target, 9515 form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? 9516 9517 // Support: IE <=8 9518 // We use jQuery.prop instead of elem.form 9519 // to allow fixing the IE8 delegated submit issue (gh-2332) 9520 // by 3rd party polyfills/workarounds. 9521 jQuery.prop( elem, "form" ) : 9522 undefined; 9523 9524 if ( form && !jQuery._data( form, "submit" ) ) { 9525 jQuery.event.add( form, "submit._submit", function( event ) { 9526 event._submitBubble = true; 9527 } ); 9528 jQuery._data( form, "submit", true ); 9529 } 9530 } ); 9531 9532 // return undefined since we don't need an event listener 9533 }, 9534 9535 postDispatch: function( event ) { 9536 9537 // If form was submitted by the user, bubble the event up the tree 9538 if ( event._submitBubble ) { 9539 delete event._submitBubble; 9540 if ( this.parentNode && !event.isTrigger ) { 9541 jQuery.event.simulate( "submit", this.parentNode, event ); 9542 } 9543 } 9544 }, 9545 9546 teardown: function() { 9547 9548 // Only need this for delegated form submit events 9549 if ( jQuery.nodeName( this, "form" ) ) { 9550 return false; 9551 } 9552 9553 // Remove delegated handlers; cleanData eventually reaps submit handlers attached above 9554 jQuery.event.remove( this, "._submit" ); 9555 } 9556 }; 9557 } 9558 9559// IE change delegation and checkbox/radio fix 9560 if ( !support.change ) { 9561 9562 jQuery.event.special.change = { 9563 9564 setup: function() { 9565 9566 if ( rformElems.test( this.nodeName ) ) { 9567 9568 // IE doesn't fire change on a check/radio until blur; trigger it on click 9569 // after a propertychange. Eat the blur-change in special.change.handle. 9570 // This still fires onchange a second time for check/radio after blur. 9571 if ( this.type === "checkbox" || this.type === "radio" ) { 9572 jQuery.event.add( this, "propertychange._change", function( event ) { 9573 if ( event.originalEvent.propertyName === "checked" ) { 9574 this._justChanged = true; 9575 } 9576 } ); 9577 jQuery.event.add( this, "click._change", function( event ) { 9578 if ( this._justChanged && !event.isTrigger ) { 9579 this._justChanged = false;
9580 } 9581 9582 // Allow triggered, simulated change events (#11500) 9583 jQuery.event.simulate( "change", this, event ); 9584 } ); 9585 } 9586 return false; 9587 } 9588 9589 // Delegated event; lazy-add a change handler on descendant inputs 9590 jQuery.event.add( this, "beforeactivate._change", function( e ) { 9591 var elem = e.target; 9592 9593 if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) { 9594 jQuery.event.add( elem, "change._change", function( event ) { 9595 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { 9596 jQuery.event.simulate( "change", this.parentNode, event ); 9597 } 9598 } ); 9599 jQuery._data( elem, "change", true ); 9600 } 9601 } ); 9602 }, 9603 9604 handle: function( event ) { 9605 var elem = event.target; 9606 9607 // Swallow native change events from checkbox/radio, we already triggered them above 9608 if ( this !== elem || event.isSimulated || event.isTrigger || 9609 ( elem.type !== "radio" && elem.type !== "checkbox" ) ) { 9610 9611 return event.handleObj.handler.apply( this, arguments ); 9612 } 9613 }, 9614 9615 teardown: function() { 9616 jQuery.event.remove( this, "._change" ); 9617 9618 return !rformElems.test( this.nodeName ); 9619 } 9620 }; 9621 } 9622 9623// Support: Firefox 9624// Firefox doesn't have focus(in | out) events 9625// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 9626// 9627// Support: Chrome, Safari 9628// focus(in | out) events fire after focus & blur events, 9629// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 9630// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 9631 if ( !support.focusin ) { 9632 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 9633 9634 // Attach a single capturing handler on the document while someone wants focusin/focusout 9635 var handler = function( event ) { 9636 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 9637 }; 9638 9639 jQuery.event.special[ fix ] = { 9640 setup: function() { 9641 var doc = this.ownerDocument || this, 9642 attaches = jQuery._data( doc, fix ); 9643 9644 if ( !attaches ) { 9645 doc.addEventListener( orig, handler, true ); 9646 } 9647 jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); 9648 }, 9649 teardown: function() { 9650 var doc = this.ownerDocument || this, 9651 attaches = jQuery._data( doc, fix ) - 1; 9652 9653 if ( !attaches ) { 9654 doc.removeEventListener( orig, handler, true ); 9655 jQuery._removeData( doc, fix ); 9656 } else { 9657 jQuery._data( doc, fix, attaches ); 9658 } 9659 } 9660 }; 9661 } ); 9662 } 9663 9664 jQuery.fn.extend( { 9665 9666 on: function( types, selector, data, fn ) { 9667 return on( this, types, selector, data, fn ); 9668 }, 9669 one: function( types, selector, data, fn ) { 9670 return on( this, types, selector, data, fn, 1 ); 9671 }, 9672 off: function( types, selector, fn ) { 9673 var handleObj, type; 9674 if ( types && types.preventDefault && types.handleObj ) { 9675 9676 // ( event ) dispatched jQuery.Event 9677 handleObj = types.handleObj; 9678 jQuery( types.delegateTarget ).off( 9679 handleObj.namespace ? 9680 handleObj.origType + "." + handleObj.namespace : 9681 handleObj.origType, 9682 handleObj.selector, 9683 handleObj.handler 9684 ); 9685 return this; 9686 } 9687 if ( typeof types === "object" ) { 9688 9689 // ( types-object [, selector] ) 9690 for ( type in types ) { 9691 this.off( type, selector, types[ type ] ); 9692 } 9693 return this; 9694 } 9695 if ( selector === false || typeof selector === "function" ) { 9696 9697 // ( types [, fn] ) 9698 fn = selector; 9699 selector = undefined; 9700 } 9701 if ( fn === false ) { 9702 fn = returnFalse; 9703 } 9704 return this.each( function() { 9705 jQuery.event.remove( this, types, fn, selector ); 9706 } ); 9707 }, 9708 9709 trigger: function( type, data ) { 9710 return this.each( function() { 9711 jQuery.event.trigger( type, data, this ); 9712 } ); 9713 }, 9714 triggerHandler: function( type, data ) { 9715 var elem = this[ 0 ]; 9716 if ( elem ) { 9717 return jQuery.event.trigger( type, data, elem, true ); 9718 } 9719 } 9720 } ); 9721 9722 9723 var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, 9724 rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ), 9725 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, 9726
9727 // Support: IE 10-11, Edge 10240+ 9728 // In IE/Edge using regex groups here causes severe slowdowns. 9729 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 9730 rnoInnerhtml = /<script|<style|<link/i, 9731 9732 // checked="checked" or checked 9733 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 9734 rscriptTypeMasked = /^true\/(.*)/, 9735 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, 9736 safeFragment = createSafeFragment( document ), 9737 fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) ); 9738 9739// Support: IE<8 9740// Manipulating tables requires a tbody 9741 function manipulationTarget( elem, content ) { 9742 return jQuery.nodeName( elem, "table" ) && 9743 jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? 9744 9745 elem.getElementsByTagName( "tbody" )[ 0 ] || 9746 elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : 9747 elem; 9748 } 9749 9750// Replace/restore the type attribute of script elements for safe DOM manipulation 9751 function disableScript( elem ) { 9752 elem.type = ( jQuery.find.attr( elem, "type" ) !== null ) + "/" + elem.type; 9753 return elem; 9754 } 9755 function restoreScript( elem ) { 9756 var match = rscriptTypeMasked.exec( elem.type ); 9757 if ( match ) { 9758 elem.type = match[ 1 ]; 9759 } else { 9760 elem.removeAttribute( "type" ); 9761 } 9762 return elem; 9763 } 9764 9765 function cloneCopyEvent( src, dest ) { 9766 if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { 9767 return; 9768 } 9769 9770 var type, i, l, 9771 oldData = jQuery._data( src ), 9772 curData = jQuery._data( dest, oldData ), 9773 events = oldData.events; 9774 9775 if ( events ) { 9776 delete curData.handle; 9777 curData.events = {}; 9778 9779 for ( type in events ) { 9780 for ( i = 0, l = events[ type ].length; i < l; i++ ) { 9781 jQuery.event.add( dest, type, events[ type ][ i ] ); 9782 } 9783 } 9784 } 9785 9786 // make the cloned public data object a copy from the original 9787 if ( curData.data ) { 9788 curData.data = jQuery.extend( {}, curData.data ); 9789 } 9790 } 9791 9792 function fixCloneNodeIssues( src, dest ) { 9793 var nodeName, e, data; 9794 9795 // We do not need to do anything for non-Elements 9796 if ( dest.nodeType !== 1 ) { 9797 return; 9798 } 9799 9800 nodeName = dest.nodeName.toLowerCase(); 9801 9802 // IE6-8 copies events bound via attachEvent when using cloneNode. 9803 if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { 9804 data = jQuery._data( dest ); 9805 9806 for ( e in data.events ) { 9807 jQuery.removeEvent( dest, e, data.handle ); 9808 } 9809 9810 // Event data gets referenced instead of copied if the expando gets copied too 9811 dest.removeAttribute( jQuery.expando ); 9812 } 9813 9814 // IE blanks contents when cloning scripts, and tries to evaluate newly-set text 9815 if ( nodeName === "script" && dest.text !== src.text ) { 9816 disableScript( dest ).text = src.text; 9817 restoreScript( dest ); 9818 9819 // IE6-10 improperly clones children of object elements using classid. 9820 // IE10 throws NoModificationAllowedError if parent is null, #12132. 9821 } else if ( nodeName === "object" ) { 9822 if ( dest.parentNode ) { 9823 dest.outerHTML = src.outerHTML; 9824 } 9825 9826 // This path appears unavoidable for IE9. When cloning an object 9827 // element in IE9, the outerHTML strategy above is not sufficient. 9828 // If the src has innerHTML and the destination does not, 9829 // copy the src.innerHTML into the dest.innerHTML. #10324 9830 if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) { 9831 dest.innerHTML = src.innerHTML; 9832 } 9833 9834 } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 9835 9836 // IE6-8 fails to persist the checked state of a cloned checkbox 9837 // or radio button. Worse, IE6-7 fail to give the cloned element 9838 // a checked appearance if the defaultChecked value isn't also set 9839 9840 dest.defaultChecked = dest.checked = src.checked; 9841 9842 // IE6-7 get confused and end up setting the value of a cloned 9843 // checkbox/radio button to an empty string instead of "on" 9844 if ( dest.value !== src.value ) { 9845 dest.value = src.value; 9846 } 9847 9848 // IE6-8 fails to return the selected option to the default selected 9849 // state when cloning options 9850 } else if ( nodeName === "option" ) { 9851 dest.defaultSelected = dest.selected = src.defaultSelected; 9852 9853 // IE6-8 fails to set the defaultValue to the correct value when 9854 // cloning other types of input fields 9855 } else if ( nodeName === "input" || nodeName === "textarea" ) { 9856 dest.defaultValue = src.defaultValue; 9857 } 9858 } 9859 9860 function domManip( collection, args, callback, ignored ) { 9861 9862 // Flatten any nested arrays 9863 args = concat.apply( [], args ); 9864 9865 var first, node, hasScripts, 9866 scripts, doc, fragment, 9867 i = 0, 9868 l = collection.length, 9869 iNoClone = l - 1, 9870 value = args[ 0 ], 9871 isFunction = jQuery.isFunction( value ); 9872 9873 // We can't cloneNode fragments that contain checked, in WebKit 9874 if ( isFunction || 9875 ( l > 1 && typeof value === "string" && 9876 !support.checkClone && rchecked.test( value ) ) ) { 9877 return collection.each( function( index ) { 9878 var self = collection.eq( index ); 9879 if ( isFunction ) { 9880 args[ 0 ] = value.call( this, index, self.html() ); 9881 } 9882 domManip( self, args, callback, ignored ); 9883 } ); 9884 } 9885 9886 if ( l ) { 9887 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); 9888 first = fragment.firstChild; 9889 9890 if ( fragment.childNodes.length === 1 ) { 9891 fragment = first; 9892 } 9893 9894 // Require either new content or an interest in ignored elements to invoke the callback 9895 if ( first || ignored ) { 9896 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 9897 hasScripts = scripts.length; 9898 9899 // Use the original fragment for the last item 9900 // instead of the first because it can end up 9901 // being emptied incorrectly in certain situations (#8070). 9902 for ( ; i < l; i++ ) { 9903 node = fragment; 9904 9905 if ( i !== iNoClone ) { 9906 node = jQuery.clone( node, true, true ); 9907 9908 // Keep references to cloned scripts for later restoration 9909 if ( hasScripts ) { 9910
9911 // Support: Android<4.1, PhantomJS<2 9912 // push.apply(_, arraylike) throws on ancient WebKit 9913 jQuery.merge( scripts, getAll( node, "script" ) ); 9914 } 9915 } 9916 9917 callback.call( collection[ i ], node, i ); 9918 } 9919 9920 if ( hasScripts ) { 9921 doc = scripts[ scripts.length - 1 ].ownerDocument; 9922 9923 // Reenable scripts 9924 jQuery.map( scripts, restoreScript ); 9925 9926 // Evaluate executable scripts on first document insertion 9927 for ( i = 0; i < hasScripts; i++ ) { 9928 node = scripts[ i ]; 9929 if ( rscriptType.test( node.type || "" ) && 9930 !jQuery._data( node, "globalEval" ) && 9931 jQuery.contains( doc, node ) ) { 9932 9933 if ( node.src ) { 9934 9935 // Optional AJAX dependency, but won't run scripts if not present 9936 if ( jQuery._evalUrl ) { 9937 jQuery._evalUrl( node.src ); 9938 } 9939 } else { 9940 jQuery.globalEval( 9941 ( node.text || node.textContent || node.innerHTML || "" ) 9942 .replace( rcleanScript, "" ) 9943 ); 9944 } 9945 } 9946 } 9947 } 9948 9949 // Fix #11809: Avoid leaking memory 9950 fragment = first = null; 9951 } 9952 } 9953 9954 return collection; 9955 } 9956 9957 function remove( elem, selector, keepData ) { 9958 var node, 9959 elems = selector ? jQuery.filter( selector, elem ) : elem, 9960 i = 0; 9961 9962 for ( ; ( node = elems[ i ] ) != null; i++ ) { 9963 9964 if ( !keepData && node.nodeType === 1 ) { 9965 jQuery.cleanData( getAll( node ) ); 9966 } 9967 9968 if ( node.parentNode ) { 9969 if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { 9970 setGlobalEval( getAll( node, "script" ) ); 9971 } 9972 node.parentNode.removeChild( node ); 9973 } 9974 } 9975 9976 return elem; 9977 } 9978 9979 jQuery.extend( { 9980 htmlPrefilter: function( html ) { 9981 return html.replace( rxhtmlTag, "<$1></$2>" ); 9982 }, 9983 9984 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 9985 var destElements, node, clone, i, srcElements, 9986 inPage = jQuery.contains( elem.ownerDocument, elem ); 9987 9988 if ( support.html5Clone || jQuery.isXMLDoc( elem ) || 9989 !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { 9990 9991 clone = elem.cloneNode( true ); 9992 9993 // IE<=8 does not properly clone detached, unknown element nodes 9994 } else { 9995 fragmentDiv.innerHTML = elem.outerHTML; 9996 fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); 9997 } 9998 9999 if ( ( !support.noCloneEvent || !support.noCloneChecked ) && 10000 ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { 10001 10002 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 10003 destElements = getAll( clone ); 10004 srcElements = getAll( elem ); 10005 10006 // Fix all IE cloning issues 10007 for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) { 10008 10009 // Ensure that the destination node is not null; Fixes #9587 10010 if ( destElements[ i ] ) { 10011 fixCloneNodeIssues( node, destElements[ i ] ); 10012 } 10013 } 10014 } 10015 10016 // Copy the events from the original to the clone 10017 if ( dataAndEvents ) { 10018 if ( deepDataAndEvents ) { 10019 srcElements = srcElements || getAll( elem ); 10020 destElements = destElements || getAll( clone ); 10021 10022 for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) { 10023 cloneCopyEvent( node, destElements[ i ] ); 10024 } 10025 } else { 10026 cloneCopyEvent( elem, clone ); 10027 } 10028 } 10029 10030 // Preserve script evaluation history 10031 destElements = getAll( clone, "script" ); 10032 if ( destElements.length > 0 ) { 10033 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 10034 } 10035 10036 destElements = srcElements = node = null; 10037 10038 // Return the cloned set 10039 return clone; 10040 }, 10041 10042 cleanData: function( elems, /* internal */ forceAcceptData ) { 10043 var elem, type, id, data, 10044 i = 0, 10045 internalKey = jQuery.expando, 10046 cache = jQuery.cache, 10047 attributes = support.attributes, 10048 special = jQuery.event.special; 10049 10050 for ( ; ( elem = elems[ i ] ) != null; i++ ) { 10051 if ( forceAcceptData || acceptData( elem ) ) { 10052 10053 id = elem[ internalKey ]; 10054 data = id && cache[ id ]; 10055 10056 if ( data ) { 10057 if ( data.events ) { 10058 for ( type in data.events ) { 10059 if ( special[ type ] ) { 10060 jQuery.event.remove( elem, type ); 10061 10062 // This is a shortcut to avoid jQuery.event.remove's overhead 10063 } else { 10064 jQuery.removeEvent( elem, type, data.handle ); 10065 } 10066 } 10067 } 10068 10069 // Remove cache only if it was not already removed by jQuery.event.remove 10070 if ( cache[ id ] ) { 10071 10072 delete cache[ id ]; 10073
10074 // Support: IE<9 10075 // IE does not allow us to delete expando properties from nodes 10076 // IE creates expando attributes along with the property 10077 // IE does not have a removeAttribute function on Document nodes 10078 if ( !attributes && typeof elem.removeAttribute !== "undefined" ) { 10079 elem.removeAttribute( internalKey ); 10080 10081 // Webkit & Blink performance suffers when deleting properties 10082 // from DOM nodes, so set to undefined instead 10083 // https://code.google.com/p/chromium/issues/detail?id=378607 10084 } else { 10085 elem[ internalKey ] = undefined; 10086 } 10087 10088 deletedIds.push( id ); 10089 } 10090 } 10091 } 10092 } 10093 } 10094 } ); 10095 10096 jQuery.fn.extend( { 10097 10098 // Keep domManip exposed until 3.0 (gh-2225) 10099 domManip: domManip, 10100 10101 detach: function( selector ) { 10102 return remove( this, selector, true ); 10103 }, 10104 10105 remove: function( selector ) { 10106 return remove( this, selector ); 10107 }, 10108 10109 text: function( value ) { 10110 return access( this, function( value ) { 10111 return value === undefined ? 10112 jQuery.text( this ) : 10113 this.empty().append( 10114 ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) 10115 ); 10116 }, null, value, arguments.length ); 10117 }, 10118 10119 append: function() { 10120 return domManip( this, arguments, function( elem ) { 10121 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 10122 var target = manipulationTarget( this, elem ); 10123 target.appendChild( elem ); 10124 } 10125 } ); 10126 }, 10127 10128 prepend: function() { 10129 return domManip( this, arguments, function( elem ) { 10130 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 10131 var target = manipulationTarget( this, elem ); 10132 target.insertBefore( elem, target.firstChild ); 10133 } 10134 } ); 10135 }, 10136 10137 before: function() { 10138 return domManip( this, arguments, function( elem ) { 10139 if ( this.parentNode ) { 10140 this.parentNode.insertBefore( elem, this ); 10141 } 10142 } ); 10143 }, 10144 10145 after: function() { 10146 return domManip( this, arguments, function( elem ) { 10147 if ( this.parentNode ) { 10148 this.parentNode.insertBefore( elem, this.nextSibling ); 10149 } 10150 } ); 10151 }, 10152 10153 empty: function() { 10154 var elem, 10155 i = 0; 10156 10157 for ( ; ( elem = this[ i ] ) != null; i++ ) { 10158 10159 // Remove element nodes and prevent memory leaks 10160 if ( elem.nodeType === 1 ) { 10161 jQuery.cleanData( getAll( elem, false ) ); 10162 } 10163 10164 // Remove any remaining nodes 10165 while ( elem.firstChild ) { 10166 elem.removeChild( elem.firstChild ); 10167 } 10168 10169 // If this is a select, ensure that it displays empty (#12336) 10170 // Support: IE<9 10171 if ( elem.options && jQuery.nodeName( elem, "select" ) ) { 10172 elem.options.length = 0; 10173 } 10174 } 10175 10176 return this; 10177 }, 10178 10179 clone: function( dataAndEvents, deepDataAndEvents ) { 10180 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 10181 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 10182 10183 return this.map( function() { 10184 return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 10185 } ); 10186 }, 10187 10188 html: function( value ) { 10189 return access( this, function( value ) { 10190 var elem = this[ 0 ] || {}, 10191 i = 0, 10192 l = this.length; 10193 10194 if ( value === undefined ) { 10195 return elem.nodeType === 1 ? 10196 elem.innerHTML.replace( rinlinejQuery, "" ) : 10197 undefined; 10198 } 10199 10200 // See if we can take a shortcut and just use innerHTML 10201 if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 10202 ( support.htmlSerialize || !rnoshimcache.test( value ) ) && 10203 ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && 10204 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 10205 10206 value = jQuery.htmlPrefilter( value ); 10207 10208 try { 10209 for ( ; i < l; i++ ) { 10210 10211 // Remove element nodes and prevent memory leaks 10212 elem = this[ i ] || {}; 10213 if ( elem.nodeType === 1 ) { 10214 jQuery.cleanData( getAll( elem, false ) ); 10215 elem.innerHTML = value; 10216 } 10217 } 10218 10219 elem = 0; 10220 10221 // If using innerHTML throws an exception, use the fallback method 10222 } catch ( e ) {} 10223 } 10224 10225 if ( elem ) { 10226 this.empty().append( value ); 10227 } 10228 }, null, value, arguments.length ); 10229 }, 10230 10231 replaceWith: function() { 10232 var ignored = []; 10233 10234 // Make the changes, replacing each non-ignored context element with the new content 10235 return domManip( this, arguments, function( elem ) { 10236 var parent = this.parentNode; 10237 10238 if ( jQuery.inArray( this, ignored ) < 0 ) { 10239 jQuery.cleanData( getAll( this ) ); 10240 if ( parent ) { 10241 parent.replaceChild( elem, this ); 10242 } 10243 } 10244 10245 // Force callback invocation 10246 }, ignored ); 10247 } 10248 } ); 10249 10250 jQuery.each( { 10251 appendTo: "append",
10252 prependTo: "prepend", 10253 insertBefore: "before", 10254 insertAfter: "after", 10255 replaceAll: "replaceWith" 10256 }, function( name, original ) { 10257 jQuery.fn[ name ] = function( selector ) { 10258 var elems, 10259 i = 0, 10260 ret = [], 10261 insert = jQuery( selector ), 10262 last = insert.length - 1; 10263 10264 for ( ; i <= last; i++ ) { 10265 elems = i === last ? this : this.clone( true ); 10266 jQuery( insert[ i ] )[ original ]( elems ); 10267 10268 // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() 10269 push.apply( ret, elems.get() ); 10270 } 10271 10272 return this.pushStack( ret ); 10273 }; 10274 } ); 10275 10276 10277 var iframe, 10278 elemdisplay = { 10279 10280 // Support: Firefox 10281 // We have to pre-define these values for FF (#10227) 10282 HTML: "block", 10283 BODY: "block" 10284 }; 10285 10286 /** 10287 * Retrieve the actual display of a element 10288 * @param {String} name nodeName of the element 10289 * @param {Object} doc Document object 10290 */ 10291 10292// Called only from within defaultDisplay 10293 function actualDisplay( name, doc ) { 10294 var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), 10295 10296 display = jQuery.css( elem[ 0 ], "display" ); 10297 10298 // We don't have any data stored on the element, 10299 // so use "detach" method as fast way to get rid of the element 10300 elem.detach(); 10301
10302 return display; 10303 } 10304 10305 /** 10306 * Try to determine the default display value of an element 10307 * @param {String} nodeName 10308 */ 10309 function defaultDisplay( nodeName ) { 10310 var doc = document, 10311 display = elemdisplay[ nodeName ]; 10312 10313 if ( !display ) { 10314 display = actualDisplay( nodeName, doc ); 10315 10316 // If the simple way fails, read from inside an iframe 10317 if ( display === "none" || !display ) { 10318 10319 // Use the already-created iframe if possible 10320 iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) ) 10321 .appendTo( doc.documentElement ); 10322 10323 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse 10324 doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document; 10325 10326 // Support: IE 10327 doc.write(); 10328 doc.close(); 10329 10330 display = actualDisplay( nodeName, doc ); 10331 iframe.detach(); 10332 } 10333 10334 // Store the correct default display 10335 elemdisplay[ nodeName ] = display; 10336 } 10337 10338 return display; 10339 } 10340 var rmargin = ( /^margin/ ); 10341 10342 var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 10343 10344 var swap = function( elem, options, callback, args ) { 10345 var ret, name, 10346 old = {}; 10347 10348 // Remember the old values, and insert the new ones 10349 for ( name in options ) { 10350 old[ name ] = elem.style[ name ]; 10351 elem.style[ name ] = options[ name ]; 10352 } 10353 10354 ret = callback.apply( elem, args || [] ); 10355 10356 // Revert the old values 10357 for ( name in options ) { 10358 elem.style[ name ] = old[ name ]; 10359 } 10360 10361 return ret; 10362 }; 10363 10364 10365 var documentElement = document.documentElement; 10366 10367 10368 10369 ( function() { 10370 var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal, 10371 reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal, 10372 container = document.createElement( "div" ), 10373 div = document.createElement( "div" ); 10374 10375 // Finish early in limited (non-browser) environments 10376 if ( !div.style ) { 10377 return; 10378 } 10379 10380 div.style.cssText = "float:left;opacity:.5"; 10381 10382 // Support: IE<9 10383 // Make sure that element opacity exists (as opposed to filter) 10384 support.opacity = div.style.opacity === "0.5"; 10385 10386 // Verify style float existence 10387 // (IE uses styleFloat instead of cssFloat) 10388 support.cssFloat = !!div.style.cssFloat; 10389 10390 div.style.backgroundClip = "content-box"; 10391 div.cloneNode( true ).style.backgroundClip = ""; 10392 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 10393 10394 container = document.createElement( "div" ); 10395 container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + 10396 "padding:0;margin-top:1px;position:absolute"; 10397 div.innerHTML = ""; 10398 container.appendChild( div ); 10399 10400 // Support: Firefox<29, Android 2.3 10401 // Vendor-prefix box-sizing 10402 support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" || 10403 div.style.WebkitBoxSizing === ""; 10404 10405 jQuery.extend( support, { 10406 reliableHiddenOffsets: function() { 10407 if ( pixelPositionVal == null ) { 10408 computeStyleTests(); 10409 } 10410 return reliableHiddenOffsetsVal; 10411 }, 10412 10413 boxSizingReliable: function() { 10414 10415 // We're checking for pixelPositionVal here instead of boxSizingReliableVal 10416 // since that compresses better and they're computed together anyway. 10417 if ( pixelPositionVal == null ) { 10418 computeStyleTests(); 10419 } 10420 return boxSizingReliableVal; 10421 }, 10422 10423 pixelMarginRight: function() { 10424 10425 // Support: Android 4.0-4.3 10426 if ( pixelPositionVal == null ) { 10427 computeStyleTests(); 10428 } 10429 return pixelMarginRightVal; 10430 }, 10431 10432 pixelPosition: function() { 10433 if ( pixelPositionVal == null ) { 10434 computeStyleTests(); 10435 } 10436 return pixelPositionVal; 10437 }, 10438 10439 reliableMarginRight: function() { 10440 10441 // Support: Android 2.3 10442 if ( pixelPositionVal == null ) { 10443 computeStyleTests(); 10444 } 10445 return reliableMarginRightVal; 10446 }, 10447 10448 reliableMarginLeft: function() { 10449 10450 // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37 10451 if ( pixelPositionVal == null ) { 10452 computeStyleTests(); 10453 } 10454 return reliableMarginLeftVal; 10455 } 10456 } ); 10457 10458 function computeStyleTests() { 10459 var contents, divStyle, 10460 documentElement = document.documentElement; 10461 10462 // Setup 10463 documentElement.appendChild( container ); 10464 10465 div.style.cssText = 10466
10467 // Support: Android 2.3 10468 // Vendor-prefix box-sizing 10469 "-webkit-box-sizing:border-box;box-sizing:border-box;" + 10470 "position:relative;display:block;" + 10471 "margin:auto;border:1px;padding:1px;" + 10472 "top:1%;width:50%"; 10473 10474 // Support: IE<9 10475 // Assume reasonable values in the absence of getComputedStyle 10476 pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false; 10477 pixelMarginRightVal = reliableMarginRightVal = true; 10478 10479 // Check for getComputedStyle so that this code is not run in IE<9. 10480 if ( window.getComputedStyle ) { 10481 divStyle = window.getComputedStyle( div ); 10482 pixelPositionVal = ( divStyle || {} ).top !== "1%"; 10483 reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px"; 10484 boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px"; 10485 10486 // Support: Android 4.0 - 4.3 only 10487 // Some styles come back with percentage values, even though they shouldn't 10488 div.style.marginRight = "50%"; 10489 pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px"; 10490 10491 // Support: Android 2.3 only 10492 // Div with explicit width and no margin-right incorrectly 10493 // gets computed margin-right based on width of container (#3333) 10494 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 10495 contents = div.appendChild( document.createElement( "div" ) ); 10496 10497 // Reset CSS: box-sizing; display; margin; border; padding 10498 contents.style.cssText = div.style.cssText = 10499 10500 // Support: Android 2.3 10501 // Vendor-prefix box-sizing 10502 "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + 10503 "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; 10504 contents.style.marginRight = contents.style.width = "0"; 10505 div.style.width = "1px"; 10506 10507 reliableMarginRightVal = 10508 !parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight ); 10509 10510 div.removeChild( contents ); 10511 } 10512 10513 // Support: IE6-8 10514 // First check that getClientRects works as expected 10515 // Check if table cells still have offsetWidth/Height when they are set 10516 // to display:none and there are still other visible table cells in a 10517 // table row; if so, offsetWidth/Height are not reliable for use when 10518 // determining if an element has been hidden directly using 10519 // display:none (it is still safe to use offsets if a parent element is 10520 // hidden; don safety goggles and see bug #4512 for more information). 10521 div.style.display = "none"; 10522 reliableHiddenOffsetsVal = div.getClientRects().length === 0; 10523 if ( reliableHiddenOffsetsVal ) { 10524 div.style.display = ""; 10525 div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; 10526 div.childNodes[ 0 ].style.borderCollapse = "separate"; 10527 contents = div.getElementsByTagName( "td" ); 10528 contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none"; 10529 reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; 10530 if ( reliableHiddenOffsetsVal ) { 10531 contents[ 0 ].style.display = ""; 10532 contents[ 1 ].style.display = "none"; 10533 reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; 10534 } 10535 } 10536 10537 // Teardown 10538 documentElement.removeChild( container ); 10539 } 10540 10541 } )(); 10542 10543 10544 var getStyles, curCSS, 10545 rposition = /^(top|right|bottom|left)$/; 10546 10547 if ( window.getComputedStyle ) { 10548 getStyles = function( elem ) { 10549 10550 // Support: IE<=11+, Firefox<=30+ (#15098, #14150) 10551 // IE throws on elements created in popups 10552 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 10553 var view = elem.ownerDocument.defaultView; 10554 10555 if ( !view || !view.opener ) { 10556 view = window; 10557 } 10558 10559 return view.getComputedStyle( elem ); 10560 }; 10561 10562 curCSS = function( elem, name, computed ) { 10563 var width, minWidth, maxWidth, ret, 10564 style = elem.style; 10565 10566 computed = computed || getStyles( elem ); 10567 10568 // getPropertyValue is only needed for .css('filter') in IE9, see #12537 10569 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; 10570 10571 // Support: Opera 12.1x only 10572 // Fall back to style even without computed 10573 // computed is undefined for elems on document fragments 10574 if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) { 10575 ret = jQuery.style( elem, name ); 10576 } 10577 10578 if ( computed ) { 10579 10580 // A tribute to the "awesome hack by Dean Edwards" 10581 // Chrome < 17 and Safari 5.0 uses "computed value" 10582 // instead of "used value" for margin-right 10583 // Safari 5.1.7 (at least) returns percentage for a larger set of values, 10584 // but width seems to be reliably pixels 10585 // this is against the CSSOM draft spec: 10586 // http://dev.w3.org/csswg/cssom/#resolved-values 10587 if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { 10588 10589 // Remember the original values 10590 width = style.width; 10591 minWidth = style.minWidth; 10592 maxWidth = style.maxWidth; 10593 10594 // Put in the new values to get a computed value out 10595 style.minWidth = style.maxWidth = style.width = ret; 10596 ret = computed.width; 10597 10598 // Revert the changed values 10599 style.width = width; 10600 style.minWidth = minWidth; 10601 style.maxWidth = maxWidth; 10602 } 10603 } 10604
10605 // Support: IE 10606 // IE returns zIndex value as an integer. 10607 return ret === undefined ? 10608 ret : 10609 ret + ""; 10610 }; 10611 } else if ( documentElement.currentStyle ) { 10612 getStyles = function( elem ) { 10613 return elem.currentStyle; 10614 }; 10615 10616 curCSS = function( elem, name, computed ) { 10617 var left, rs, rsLeft, ret, 10618 style = elem.style; 10619 10620 computed = computed || getStyles( elem ); 10621 ret = computed ? computed[ name ] : undefined; 10622 10623 // Avoid setting ret to empty string here 10624 // so we don't default to auto 10625 if ( ret == null && style && style[ name ] ) { 10626 ret = style[ name ]; 10627 } 10628 10629 // From the awesome hack by Dean Edwards 10630 // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 10631 10632 // If we're not dealing with a regular pixel number 10633 // but a number that has a weird ending, we need to convert it to pixels 10634 // but not position css attributes, as those are 10635 // proportional to the parent element instead 10636 // and we can't measure the parent instead because it 10637 // might trigger a "stacking dolls" problem 10638 if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { 10639 10640 // Remember the original values 10641 left = style.left; 10642 rs = elem.runtimeStyle; 10643 rsLeft = rs && rs.left; 10644 10645 // Put in the new values to get a computed value out 10646 if ( rsLeft ) { 10647 rs.left = elem.currentStyle.left; 10648 } 10649 style.left = name === "fontSize" ? "1em" : ret; 10650 ret = style.pixelLeft + "px"; 10651 10652 // Revert the changed values 10653 style.left = left; 10654 if ( rsLeft ) { 10655 rs.left = rsLeft; 10656 } 10657 } 10658 10659 // Support: IE 10660 // IE returns zIndex value as an integer. 10661 return ret === undefined ? 10662 ret : 10663 ret + "" || "auto"; 10664 }; 10665 } 10666 10667 10668 10669 10670 function addGetHookIf( conditionFn, hookFn ) { 10671 10672 // Define the hook, we'll check on the first run if it's really needed. 10673 return { 10674 get: function() { 10675 if ( conditionFn() ) { 10676 10677 // Hook not needed (or it's not possible to use it due 10678 // to missing dependency), remove it. 10679 delete this.get; 10680 return; 10681 } 10682 10683 // Hook needed; redefine it so that the support test is not executed again. 10684 return ( this.get = hookFn ).apply( this, arguments ); 10685 } 10686 }; 10687 } 10688 10689 10690 var 10691 10692 ralpha = /alpha\([^)]*\)/i, 10693 ropacity = /opacity\s*=\s*([^)]*)/i, 10694 10695 // swappable if display is none or starts with table except 10696 // "table", "table-cell", or "table-caption" 10697 // see here for display values: 10698 // https://developer.mozilla.org/en-US/docs/CSS/display 10699 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 10700 rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), 10701 10702 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 10703 cssNormalTransform = { 10704 letterSpacing: "0", 10705 fontWeight: "400" 10706 }, 10707 10708 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], 10709 emptyStyle = document.createElement( "div" ).style; 10710 10711 10712// return a css property mapped to a potentially vendor prefixed property 10713 function vendorPropName( name ) { 10714 10715 // shortcut for names that are not vendor prefixed 10716 if ( name in emptyStyle ) { 10717 return name; 10718 } 10719 10720 // check for vendor prefixed names 10721 var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ), 10722 i = cssPrefixes.length; 10723 10724 while ( i-- ) { 10725 name = cssPrefixes[ i ] + capName; 10726 if ( name in emptyStyle ) { 10727 return name; 10728 } 10729 } 10730 } 10731 10732 function showHide( elements, show ) { 10733 var display, elem, hidden, 10734 values = [], 10735 index = 0, 10736 length = elements.length; 10737 10738 for ( ; index < length; index++ ) { 10739 elem = elements[ index ]; 10740 if ( !elem.style ) { 10741 continue; 10742 } 10743 10744 values[ index ] = jQuery._data( elem, "olddisplay" ); 10745 display = elem.style.display; 10746 if ( show ) { 10747 10748 // Reset the inline display of this element to learn if it is 10749 // being hidden by cascaded rules or not 10750 if ( !values[ index ] && display === "none" ) { 10751 elem.style.display = ""; 10752 } 10753 10754 // Set elements which have been overridden with display: none 10755 // in a stylesheet to whatever the default browser style is 10756 // for such an element 10757 if ( elem.style.display === "" && isHidden( elem ) ) { 10758 values[ index ] = 10759 jQuery._data( elem, "olddisplay", defaultDisplay( elem.nodeName ) ); 10760 } 10761 } else { 10762 hidden = isHidden( elem ); 10763 10764 if ( display && display !== "none" || !hidden ) { 10765 jQuery._data( 10766 elem, 10767 "olddisplay",
vendor: 6,224 bytes, lines 10768-10979
10768 hidden ? display : jQuery.css( elem, "display" ) 10769 ); 10770 } 10771 } 10772 } 10773 10774 // Set the display of most of the elements in a second loop 10775 // to avoid the constant reflow 10776 for ( index = 0; index < length; index++ ) { 10777 elem = elements[ index ]; 10778 if ( !elem.style ) { 10779 continue; 10780 } 10781 if ( !show || elem.style.display === "none" || elem.style.display === "" ) { 10782 elem.style.display = show ? values[ index ] || "" : "none"; 10783 } 10784 } 10785 10786 return elements; 10787 } 10788 10789 function setPositiveNumber( elem, value, subtract ) { 10790 var matches = rnumsplit.exec( value ); 10791 return matches ? 10792 10793 // Guard against undefined "subtract", e.g., when used as in cssHooks 10794 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : 10795 value; 10796 } 10797 10798 function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { 10799 var i = extra === ( isBorderBox ? "border" : "content" ) ? 10800 10801 // If we already have the right measurement, avoid augmentation 10802 4 : 10803 10804 // Otherwise initialize for horizontal or vertical properties 10805 name === "width" ? 1 : 0, 10806 10807 val = 0; 10808 10809 for ( ; i < 4; i += 2 ) { 10810 10811 // both box models exclude margin, so add it if we want it 10812 if ( extra === "margin" ) { 10813 val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); 10814 } 10815 10816 if ( isBorderBox ) { 10817 10818 // border-box includes padding, so remove it if we want content 10819 if ( extra === "content" ) { 10820 val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 10821 } 10822 10823 // at this point, extra isn't border nor margin, so remove border 10824 if ( extra !== "margin" ) { 10825 val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 10826 } 10827 } else { 10828 10829 // at this point, extra isn't content, so add padding 10830 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 10831 10832 // at this point, extra isn't content nor padding, so add border 10833 if ( extra !== "padding" ) { 10834 val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 10835 } 10836 } 10837 } 10838 10839 return val; 10840 } 10841 10842 function getWidthOrHeight( elem, name, extra ) { 10843 10844 // Start with offset property, which is equivalent to the border-box value 10845 var valueIsBorderBox = true, 10846 val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 10847 styles = getStyles( elem ), 10848 isBorderBox = support.boxSizing && 10849 jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 10850 10851 // some non-html elements return undefined for offsetWidth, so check for null/undefined 10852 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 10853 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 10854 if ( val <= 0 || val == null ) { 10855 10856 // Fall back to computed then uncomputed css if necessary 10857 val = curCSS( elem, name, styles ); 10858 if ( val < 0 || val == null ) { 10859 val = elem.style[ name ]; 10860 } 10861 10862 // Computed unit is not pixels. Stop here and return. 10863 if ( rnumnonpx.test( val ) ) { 10864 return val; 10865 } 10866 10867 // we need the check for style in case a browser which returns unreliable values 10868 // for getComputedStyle silently falls back to the reliable elem.style 10869 valueIsBorderBox = isBorderBox && 10870 ( support.boxSizingReliable() || val === elem.style[ name ] ); 10871 10872 // Normalize "", auto, and prepare for extra 10873 val = parseFloat( val ) || 0; 10874 } 10875 10876 // use the active box-sizing model to add/subtract irrelevant styles 10877 return ( val + 10878 augmentWidthOrHeight( 10879 elem, 10880 name, 10881 extra || ( isBorderBox ? "border" : "content" ), 10882 valueIsBorderBox, 10883 styles 10884 ) 10885 ) + "px"; 10886 } 10887 10888 jQuery.extend( { 10889 10890 // Add in style property hooks for overriding the default 10891 // behavior of getting and setting a style property 10892 cssHooks: { 10893 opacity: { 10894 get: function( elem, computed ) { 10895 if ( computed ) { 10896 10897 // We should always get a number back from opacity 10898 var ret = curCSS( elem, "opacity" ); 10899 return ret === "" ? "1" : ret; 10900 } 10901 } 10902 } 10903 }, 10904 10905 // Don't automatically add "px" to these possibly-unitless properties 10906 cssNumber: { 10907 "animationIterationCount": true, 10908 "columnCount": true, 10909 "fillOpacity": true, 10910 "flexGrow": true, 10911 "flexShrink": true, 10912 "fontWeight": true, 10913 "lineHeight": true, 10914 "opacity": true, 10915 "order": true, 10916 "orphans": true, 10917 "widows": true, 10918 "zIndex": true, 10919 "zoom": true 10920 }, 10921 10922 // Add in properties whose names you wish to fix before 10923 // setting or getting the value 10924 cssProps: { 10925 10926 // normalize float css property 10927 "float": support.cssFloat ? "cssFloat" : "styleFloat" 10928 }, 10929 10930 // Get and set the style property on a DOM Node 10931 style: function( elem, name, value, extra ) { 10932 10933 // Don't set styles on text and comment nodes 10934 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 10935 return; 10936 } 10937 10938 // Make sure that we're working with the right name 10939 var ret, type, hooks, 10940 origName = jQuery.camelCase( name ), 10941 style = elem.style; 10942 10943 name = jQuery.cssProps[ origName ] || 10944 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 10945 10946 // gets hook for the prefixed version 10947 // followed by the unprefixed version 10948 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 10949 10950 // Check if we're setting a value 10951 if ( value !== undefined ) { 10952 type = typeof value; 10953 10954 // Convert "+=" or "-=" to relative numbers (#7345) 10955 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 10956 value = adjustCSS( elem, name, ret ); 10957 10958 // Fixes bug #9237 10959 type = "number"; 10960 } 10961 10962 // Make sure that null and NaN values aren't set. See: #7116 10963 if ( value == null || value !== value ) { 10964 return; 10965 } 10966 10967 // If a number was passed in, add the unit (except for certain CSS properties) 10968 if ( type === "number" ) { 10969 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 10970 } 10971 10972 // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, 10973 // but it would mean to define eight 10974 // (for every problematic property) identical functions 10975 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 10976 style[ name ] = "inherit"; 10977 } 10978 10979 // If a hook was provided, use that value, otherwise just set the specified value
10980 if ( !hooks || !( "set" in hooks ) || 10981 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 10982 10983 // Support: IE 10984 // Swallow errors from 'invalid' CSS values (#5509) 10985 try { 10986 style[ name ] = value; 10987 } catch ( e ) {} 10988 } 10989 10990 } else { 10991 10992 // If a hook was provided get the non-computed value from there 10993 if ( hooks && "get" in hooks && 10994 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 10995 10996 return ret; 10997 } 10998 10999 // Otherwise just get the value from the style object 11000 return style[ name ]; 11001 } 11002 }, 11003 11004 css: function( elem, name, extra, styles ) { 11005 var num, val, hooks, 11006 origName = jQuery.camelCase( name ); 11007 11008 // Make sure that we're working with the right name 11009 name = jQuery.cssProps[ origName ] || 11010 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 11011 11012 // gets hook for the prefixed version 11013 // followed by the unprefixed version 11014 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 11015 11016 // If a hook was provided get the computed value from there 11017 if ( hooks && "get" in hooks ) { 11018 val = hooks.get( elem, true, extra ); 11019 } 11020 11021 // Otherwise, if a way to get the computed value exists, use that 11022 if ( val === undefined ) { 11023 val = curCSS( elem, name, styles ); 11024 } 11025 11026 //convert "normal" to computed value 11027 if ( val === "normal" && name in cssNormalTransform ) { 11028 val = cssNormalTransform[ name ]; 11029 } 11030 11031 // Return, converting to number if forced or a qualifier was provided and val looks numeric 11032 if ( extra === "" || extra ) { 11033 num = parseFloat( val ); 11034 return extra === true || isFinite( num ) ? num || 0 : val; 11035 } 11036 return val; 11037 } 11038 } ); 11039 11040 jQuery.each( [ "height", "width" ], function( i, name ) { 11041 jQuery.cssHooks[ name ] = { 11042 get: function( elem, computed, extra ) { 11043 if ( computed ) { 11044 11045 // certain elements can have dimension info if we invisibly show them 11046 // however, it must have a current display style that would benefit from this 11047 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 11048 elem.offsetWidth === 0 ? 11049 swap( elem, cssShow, function() { 11050 return getWidthOrHeight( elem, name, extra ); 11051 } ) : 11052 getWidthOrHeight( elem, name, extra ); 11053 } 11054 }, 11055 11056 set: function( elem, value, extra ) { 11057 var styles = extra && getStyles( elem ); 11058 return setPositiveNumber( elem, value, extra ? 11059 augmentWidthOrHeight( 11060 elem, 11061 name, 11062 extra, 11063 support.boxSizing && 11064 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 11065 styles 11066 ) : 0 11067 ); 11068 } 11069 }; 11070 } ); 11071 11072 if ( !support.opacity ) { 11073 jQuery.cssHooks.opacity = { 11074 get: function( elem, computed ) { 11075 11076 // IE uses filters for opacity 11077 return ropacity.test( ( computed && elem.currentStyle ? 11078 elem.currentStyle.filter : 11079 elem.style.filter ) || "" ) ? 11080 ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : 11081 computed ? "1" : ""; 11082 }, 11083 11084 set: function( elem, value ) { 11085 var style = elem.style, 11086 currentStyle = elem.currentStyle, 11087 opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", 11088 filter = currentStyle && currentStyle.filter || style.filter || ""; 11089 11090 // IE has trouble with opacity if it does not have layout 11091 // Force it by setting the zoom level 11092 style.zoom = 1; 11093 11094 // if setting opacity to 1, and no other filters exist - 11095 // attempt to remove filter attribute #6652 11096 // if value === "", then remove inline opacity #12685 11097 if ( ( value >= 1 || value === "" ) && 11098 jQuery.trim( filter.replace( ralpha, "" ) ) === "" && 11099 style.removeAttribute ) { 11100 11101 // Setting style.filter to null, "" & " " still leave "filter:" in the cssText 11102 // if "filter:" is present at all, clearType is disabled, we want to avoid this 11103 // style.removeAttribute is IE Only, but so apparently is this code path... 11104 style.removeAttribute( "filter" ); 11105 11106 // if there is no filter style applied in a css rule 11107 // or unset inline opacity, we are done 11108 if ( value === "" || currentStyle && !currentStyle.filter ) { 11109 return; 11110 } 11111 } 11112 11113 // otherwise, set new filter values 11114 style.filter = ralpha.test( filter ) ? 11115 filter.replace( ralpha, opacity ) : 11116 filter + " " + opacity; 11117 } 11118 }; 11119 } 11120 11121 jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, 11122 function( elem, computed ) { 11123 if ( computed ) { 11124 return swap( elem, { "display": "inline-block" }, 11125 curCSS, [ elem, "marginRight" ] ); 11126 } 11127 } 11128 ); 11129 11130 jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 11131 function( elem, computed ) { 11132 if ( computed ) { 11133 return ( 11134 parseFloat( curCSS( elem, "marginLeft" ) ) || 11135
vendor: 4,211 bytes, lines 11136-11296
11136 // Support: IE<=11+ 11137 // Running getBoundingClientRect on a disconnected node in IE throws an error 11138 // Support: IE8 only 11139 // getClientRects() errors on disconnected elems 11140 ( jQuery.contains( elem.ownerDocument, elem ) ? 11141 elem.getBoundingClientRect().left - 11142 swap( elem, { marginLeft: 0 }, function() { 11143 return elem.getBoundingClientRect().left; 11144 } ) : 11145 0 11146 ) 11147 ) + "px"; 11148 } 11149 } 11150 ); 11151 11152// These hooks are used by animate to expand properties 11153 jQuery.each( { 11154 margin: "", 11155 padding: "", 11156 border: "Width" 11157 }, function( prefix, suffix ) { 11158 jQuery.cssHooks[ prefix + suffix ] = { 11159 expand: function( value ) { 11160 var i = 0, 11161 expanded = {}, 11162 11163 // assumes a single number if not a string 11164 parts = typeof value === "string" ? value.split( " " ) : [ value ]; 11165 11166 for ( ; i < 4; i++ ) { 11167 expanded[ prefix + cssExpand[ i ] + suffix ] = 11168 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 11169 } 11170 11171 return expanded; 11172 } 11173 }; 11174 11175 if ( !rmargin.test( prefix ) ) { 11176 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 11177 } 11178 } ); 11179 11180 jQuery.fn.extend( { 11181 css: function( name, value ) { 11182 return access( this, function( elem, name, value ) { 11183 var styles, len, 11184 map = {}, 11185 i = 0; 11186 11187 if ( jQuery.isArray( name ) ) { 11188 styles = getStyles( elem ); 11189 len = name.length; 11190 11191 for ( ; i < len; i++ ) { 11192 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 11193 } 11194 11195 return map; 11196 } 11197 11198 return value !== undefined ? 11199 jQuery.style( elem, name, value ) : 11200 jQuery.css( elem, name ); 11201 }, name, value, arguments.length > 1 ); 11202 }, 11203 show: function() { 11204 return showHide( this, true ); 11205 }, 11206 hide: function() { 11207 return showHide( this ); 11208 }, 11209 toggle: function( state ) { 11210 if ( typeof state === "boolean" ) { 11211 return state ? this.show() : this.hide(); 11212 } 11213 11214 return this.each( function() { 11215 if ( isHidden( this ) ) { 11216 jQuery( this ).show(); 11217 } else { 11218 jQuery( this ).hide(); 11219 } 11220 } ); 11221 } 11222 } ); 11223 11224 11225 function Tween( elem, options, prop, end, easing ) { 11226 return new Tween.prototype.init( elem, options, prop, end, easing ); 11227 } 11228 jQuery.Tween = Tween; 11229 11230 Tween.prototype = { 11231 constructor: Tween, 11232 init: function( elem, options, prop, end, easing, unit ) { 11233 this.elem = elem; 11234 this.prop = prop; 11235 this.easing = easing || jQuery.easing._default; 11236 this.options = options; 11237 this.start = this.now = this.cur(); 11238 this.end = end; 11239 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 11240 }, 11241 cur: function() { 11242 var hooks = Tween.propHooks[ this.prop ]; 11243 11244 return hooks && hooks.get ? 11245 hooks.get( this ) : 11246 Tween.propHooks._default.get( this ); 11247 }, 11248 run: function( percent ) { 11249 var eased, 11250 hooks = Tween.propHooks[ this.prop ]; 11251 11252 if ( this.options.duration ) { 11253 this.pos = eased = jQuery.easing[ this.easing ]( 11254 percent, this.options.duration * percent, 0, 1, this.options.duration 11255 ); 11256 } else { 11257 this.pos = eased = percent; 11258 } 11259 this.now = ( this.end - this.start ) * eased + this.start; 11260 11261 if ( this.options.step ) { 11262 this.options.step.call( this.elem, this.now, this ); 11263 } 11264 11265 if ( hooks && hooks.set ) { 11266 hooks.set( this ); 11267 } else { 11268 Tween.propHooks._default.set( this ); 11269 } 11270 return this; 11271 } 11272 }; 11273 11274 Tween.prototype.init.prototype = Tween.prototype; 11275 11276 Tween.propHooks = { 11277 _default: { 11278 get: function( tween ) { 11279 var result; 11280 11281 // Use a property on the element directly when it is not a DOM element, 11282 // or when there is no matching style property that exists. 11283 if ( tween.elem.nodeType !== 1 || 11284 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 11285 return tween.elem[ tween.prop ]; 11286 } 11287 11288 // passing an empty string as a 3rd parameter to .css will automatically 11289 // attempt a parseFloat and fallback to a string if the parse fails 11290 // so, simple values such as "10px" are parsed to Float. 11291 // complex values such as "rotate(1rad)" are returned as is. 11292 result = jQuery.css( tween.elem, tween.prop, "" ); 11293 11294 // Empty strings, null, undefined and "auto" are converted to 0. 11295 return !result || result === "auto" ? 0 : result; 11296 },
11297 set: function( tween ) { 11298 11299 // use step hook for back compat - use cssHook if its there - use .style if its 11300 // available and use plain properties where available 11301 if ( jQuery.fx.step[ tween.prop ] ) { 11302 jQuery.fx.step[ tween.prop ]( tween ); 11303 } else if ( tween.elem.nodeType === 1 && 11304 ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || 11305 jQuery.cssHooks[ tween.prop ] ) ) { 11306 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 11307 } else { 11308 tween.elem[ tween.prop ] = tween.now; 11309 } 11310 } 11311 } 11312 }; 11313 11314// Support: IE <=9 11315// Panic based approach to setting things on disconnected nodes 11316 11317 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 11318 set: function( tween ) { 11319 if ( tween.elem.nodeType && tween.elem.parentNode ) { 11320 tween.elem[ tween.prop ] = tween.now; 11321 } 11322 } 11323 }; 11324 11325 jQuery.easing = { 11326 linear: function( p ) { 11327 return p; 11328 }, 11329 swing: function( p ) { 11330 return 0.5 - Math.cos( p * Math.PI ) / 2; 11331 }, 11332 _default: "swing" 11333 }; 11334 11335 jQuery.fx = Tween.prototype.init; 11336 11337// Back Compat <1.8 extension point 11338 jQuery.fx.step = {}; 11339 11340 11341 11342 11343 var 11344 fxNow, timerId, 11345 rfxtypes = /^(?:toggle|show|hide)$/, 11346 rrun = /queueHooks$/; 11347 11348// Animations created synchronously will run synchronously 11349 function createFxNow() { 11350 window.setTimeout( function() { 11351 fxNow = undefined; 11352 } ); 11353 return ( fxNow = jQuery.now() ); 11354 } 11355 11356// Generate parameters to create a standard animation 11357 function genFx( type, includeWidth ) { 11358 var which, 11359 attrs = { height: type }, 11360 i = 0; 11361 11362 // if we include width, step value is 1 to do all cssExpand values, 11363 // if we don't include width, step value is 2 to skip over Left and Right 11364 includeWidth = includeWidth ? 1 : 0; 11365 for ( ; i < 4 ; i += 2 - includeWidth ) { 11366 which = cssExpand[ i ]; 11367 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 11368 } 11369 11370 if ( includeWidth ) { 11371 attrs.opacity = attrs.width = type; 11372 } 11373 11374 return attrs; 11375 } 11376 11377 function createTween( value, prop, animation ) { 11378 var tween, 11379 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), 11380 index = 0, 11381 length = collection.length; 11382 for ( ; index < length; index++ ) { 11383 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { 11384 11385 // we're done with this property 11386 return tween; 11387 } 11388 } 11389 } 11390 11391 function defaultPrefilter( elem, props, opts ) { 11392 /* jshint validthis: true */ 11393 var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, 11394 anim = this, 11395 orig = {}, 11396 style = elem.style, 11397 hidden = elem.nodeType && isHidden( elem ), 11398 dataShow = jQuery._data( elem, "fxshow" ); 11399 11400 // handle queue: false promises 11401 if ( !opts.queue ) { 11402 hooks = jQuery._queueHooks( elem, "fx" ); 11403 if ( hooks.unqueued == null ) { 11404 hooks.unqueued = 0; 11405 oldfire = hooks.empty.fire; 11406 hooks.empty.fire = function() { 11407 if ( !hooks.unqueued ) { 11408 oldfire(); 11409 } 11410 }; 11411 } 11412 hooks.unqueued++; 11413 11414 anim.always( function() { 11415 11416 // doing this makes sure that the complete handler will be called 11417 // before this completes 11418 anim.always( function() { 11419 hooks.unqueued--; 11420 if ( !jQuery.queue( elem, "fx" ).length ) { 11421 hooks.empty.fire(); 11422 } 11423 } ); 11424 } ); 11425 } 11426 11427 // height/width overflow pass 11428 if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { 11429 11430 // Make sure that nothing sneaks out 11431 // Record all 3 overflow attributes because IE does not 11432 // change the overflow attribute when overflowX and 11433 // overflowY are set to the same value 11434 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 11435 11436 // Set display property to inline-block for height/width 11437 // animations on inline elements that are having width/height animated 11438 display = jQuery.css( elem, "display" ); 11439 11440 // Test default display if display is currently "none" 11441 checkDisplay = display === "none" ? 11442 jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; 11443 11444 if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { 11445 11446 // inline-level elements accept inline-block; 11447 // block-level elements need to be inline with layout 11448 if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) { 11449 style.display = "inline-block"; 11450 } else { 11451 style.zoom = 1; 11452 } 11453 } 11454 } 11455 11456 if ( opts.overflow ) { 11457 style.overflow = "hidden"; 11458 if ( !support.shrinkWrapBlocks() ) { 11459 anim.always( function() { 11460 style.overflow = opts.overflow[ 0 ]; 11461 style.overflowX = opts.overflow[ 1 ]; 11462 style.overflowY = opts.overflow[ 2 ]; 11463 } ); 11464 } 11465 } 11466 11467 // show/hide pass 11468 for ( prop in props ) { 11469 value = props[ prop ]; 11470 if ( rfxtypes.exec( value ) ) { 11471 delete props[ prop ]; 11472 toggle = toggle || value === "toggle"; 11473 if ( value === ( hidden ? "hide" : "show" ) ) { 11474 11475 // If there is dataShow left over from a stopped hide or show 11476 // and we are going to proceed with show, we should pretend to be hidden 11477 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 11478 hidden = true; 11479 } else { 11480 continue; 11481 } 11482 } 11483 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 11484 11485 // Any non-fx value stops us from restoring the original display value 11486 } else { 11487 display = undefined; 11488 } 11489 } 11490 11491 if ( !jQuery.isEmptyObject( orig ) ) { 11492 if ( dataShow ) { 11493 if ( "hidden" in dataShow ) { 11494 hidden = dataShow.hidden; 11495 } 11496 } else { 11497 dataShow = jQuery._data( elem, "fxshow", {} ); 11498 } 11499 11500 // store state if its toggle - enables .stop().toggle() to "reverse" 11501 if ( toggle ) { 11502 dataShow.hidden = !hidden; 11503 } 11504 if ( hidden ) { 11505 jQuery( elem ).show(); 11506 } else { 11507 anim.done( function() { 11508 jQuery( elem ).hide(); 11509 } ); 11510 } 11511 anim.done( function() { 11512 var prop; 11513 jQuery._removeData( elem, "fxshow" ); 11514 for ( prop in orig ) { 11515 jQuery.style( elem, prop, orig[ prop ] ); 11516 } 11517 } ); 11518 for ( prop in orig ) { 11519 tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 11520 11521 if ( !( prop in dataShow ) ) { 11522 dataShow[ prop ] = tween.start; 11523 if ( hidden ) { 11524 tween.end = tween.start; 11525 tween.start = prop === "width" || prop === "height" ? 1 : 0; 11526 } 11527 } 11528 } 11529 11530 // If this is a noop like .hide().hide(), restore an overwritten display value 11531 } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : dis
vendor: 8,000 bytes, lines 11531-11829
11531play ) === "inline" ) { 11532 style.display = display; 11533 } 11534 } 11535 11536 function propFilter( props, specialEasing ) { 11537 var index, name, easing, value, hooks; 11538 11539 // camelCase, specialEasing and expand cssHook pass 11540 for ( index in props ) { 11541 name = jQuery.camelCase( index ); 11542 easing = specialEasing[ name ]; 11543 value = props[ index ]; 11544 if ( jQuery.isArray( value ) ) { 11545 easing = value[ 1 ]; 11546 value = props[ index ] = value[ 0 ]; 11547 } 11548 11549 if ( index !== name ) { 11550 props[ name ] = value; 11551 delete props[ index ]; 11552 } 11553 11554 hooks = jQuery.cssHooks[ name ]; 11555 if ( hooks && "expand" in hooks ) { 11556 value = hooks.expand( value ); 11557 delete props[ name ]; 11558 11559 // not quite $.extend, this won't overwrite keys already present. 11560 // also - reusing 'index' from above because we have the correct "name" 11561 for ( index in value ) { 11562 if ( !( index in props ) ) { 11563 props[ index ] = value[ index ]; 11564 specialEasing[ index ] = easing; 11565 } 11566 } 11567 } else { 11568 specialEasing[ name ] = easing; 11569 } 11570 } 11571 } 11572 11573 function Animation( elem, properties, options ) { 11574 var result, 11575 stopped, 11576 index = 0, 11577 length = Animation.prefilters.length, 11578 deferred = jQuery.Deferred().always( function() { 11579 11580 // don't match elem in the :animated selector 11581 delete tick.elem; 11582 } ), 11583 tick = function() { 11584 if ( stopped ) { 11585 return false; 11586 } 11587 var currentTime = fxNow || createFxNow(), 11588 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 11589 11590 // Support: Android 2.3 11591 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 11592 temp = remaining / animation.duration || 0, 11593 percent = 1 - temp, 11594 index = 0, 11595 length = animation.tweens.length; 11596 11597 for ( ; index < length ; index++ ) { 11598 animation.tweens[ index ].run( percent ); 11599 } 11600 11601 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 11602 11603 if ( percent < 1 && length ) { 11604 return remaining; 11605 } else { 11606 deferred.resolveWith( elem, [ animation ] ); 11607 return false; 11608 } 11609 }, 11610 animation = deferred.promise( { 11611 elem: elem, 11612 props: jQuery.extend( {}, properties ), 11613 opts: jQuery.extend( true, { 11614 specialEasing: {}, 11615 easing: jQuery.easing._default 11616 }, options ), 11617 originalProperties: properties, 11618 originalOptions: options, 11619 startTime: fxNow || createFxNow(), 11620 duration: options.duration, 11621 tweens: [], 11622 createTween: function( prop, end ) { 11623 var tween = jQuery.Tween( elem, animation.opts, prop, end, 11624 animation.opts.specialEasing[ prop ] || animation.opts.easing ); 11625 animation.tweens.push( tween ); 11626 return tween; 11627 }, 11628 stop: function( gotoEnd ) { 11629 var index = 0, 11630 11631 // if we are going to the end, we want to run all the tweens 11632 // otherwise we skip this part 11633 length = gotoEnd ? animation.tweens.length : 0; 11634 if ( stopped ) { 11635 return this; 11636 } 11637 stopped = true; 11638 for ( ; index < length ; index++ ) { 11639 animation.tweens[ index ].run( 1 ); 11640 } 11641 11642 // resolve when we played the last frame 11643 // otherwise, reject 11644 if ( gotoEnd ) { 11645 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 11646 deferred.resolveWith( elem, [ animation, gotoEnd ] ); 11647 } else { 11648 deferred.rejectWith( elem, [ animation, gotoEnd ] ); 11649 } 11650 return this; 11651 } 11652 } ), 11653 props = animation.props; 11654 11655 propFilter( props, animation.opts.specialEasing ); 11656 11657 for ( ; index < length ; index++ ) { 11658 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); 11659 if ( result ) { 11660 if ( jQuery.isFunction( result.stop ) ) { 11661 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = 11662 jQuery.proxy( result.stop, result ); 11663 } 11664 return result; 11665 } 11666 } 11667 11668 jQuery.map( props, createTween, animation ); 11669 11670 if ( jQuery.isFunction( animation.opts.start ) ) { 11671 animation.opts.start.call( elem, animation ); 11672 } 11673 11674 jQuery.fx.timer( 11675 jQuery.extend( tick, { 11676 elem: elem, 11677 anim: animation, 11678 queue: animation.opts.queue 11679 } ) 11680 ); 11681 11682 // attach callbacks from options 11683 return animation.progress( animation.opts.progress ) 11684 .done( animation.opts.done, animation.opts.complete ) 11685 .fail( animation.opts.fail ) 11686 .always( animation.opts.always ); 11687 } 11688 11689 jQuery.Animation = jQuery.extend( Animation, { 11690 11691 tweeners: { 11692 "*": [ function( prop, value ) { 11693 var tween = this.createTween( prop, value ); 11694 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); 11695 return tween; 11696 } ] 11697 }, 11698 11699 tweener: function( props, callback ) { 11700 if ( jQuery.isFunction( props ) ) { 11701 callback = props; 11702 props = [ "*" ]; 11703 } else { 11704 props = props.match( rnotwhite ); 11705 } 11706 11707 var prop, 11708 index = 0, 11709 length = props.length; 11710 11711 for ( ; index < length ; index++ ) { 11712 prop = props[ index ]; 11713 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; 11714 Animation.tweeners[ prop ].unshift( callback ); 11715 } 11716 }, 11717 11718 prefilters: [ defaultPrefilter ], 11719 11720 prefilter: function( callback, prepend ) { 11721 if ( prepend ) { 11722 Animation.prefilters.unshift( callback ); 11723 } else { 11724 Animation.prefilters.push( callback ); 11725 } 11726 } 11727 } ); 11728 11729 jQuery.speed = function( speed, easing, fn ) { 11730 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 11731 complete: fn || !fn && easing || 11732 jQuery.isFunction( speed ) && speed, 11733 duration: speed, 11734 easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing 11735 }; 11736 11737 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : 11738 opt.duration in jQuery.fx.speeds ? 11739 jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; 11740 11741 // normalize opt.queue - true/undefined/null -> "fx" 11742 if ( opt.queue == null || opt.queue === true ) { 11743 opt.queue = "fx"; 11744 } 11745 11746 // Queueing 11747 opt.old = opt.complete; 11748 11749 opt.complete = function() { 11750 if ( jQuery.isFunction( opt.old ) ) { 11751 opt.old.call( this ); 11752 } 11753 11754 if ( opt.queue ) { 11755 jQuery.dequeue( this, opt.queue ); 11756 } 11757 }; 11758 11759 return opt; 11760 }; 11761 11762 jQuery.fn.extend( { 11763 fadeTo: function( speed, to, easing, callback ) { 11764 11765 // show any hidden elements after setting opacity to 0 11766 return this.filter( isHidden ).css( "opacity", 0 ).show() 11767 11768 // animate to the value specified 11769 .end().animate( { opacity: to }, speed, easing, callback ); 11770 }, 11771 animate: function( prop, speed, easing, callback ) { 11772 var empty = jQuery.isEmptyObject( prop ), 11773 optall = jQuery.speed( speed, easing, callback ), 11774 doAnimation = function() { 11775 11776 // Operate on a copy of prop so per-property easing won't be lost 11777 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 11778 11779 // Empty animations, or finishing resolves immediately 11780 if ( empty || jQuery._data( this, "finish" ) ) { 11781 anim.stop( true ); 11782 } 11783 }; 11784 doAnimation.finish = doAnimation; 11785 11786 return empty || optall.queue === false ? 11787 this.each( doAnimation ) : 11788 this.queue( optall.queue, doAnimation ); 11789 }, 11790 stop: function( type, clearQueue, gotoEnd ) { 11791 var stopQueue = function( hooks ) { 11792 var stop = hooks.stop; 11793 delete hooks.stop; 11794 stop( gotoEnd ); 11795 }; 11796 11797 if ( typeof type !== "string" ) { 11798 gotoEnd = clearQueue; 11799 clearQueue = type; 11800 type = undefined; 11801 } 11802 if ( clearQueue && type !== false ) { 11803 this.queue( type || "fx", [] ); 11804 } 11805 11806 return this.each( function() { 11807 var dequeue = true, 11808 index = type != null && type + "queueHooks", 11809 timers = jQuery.timers, 11810 data = jQuery._data( this ); 11811 11812 if ( index ) { 11813 if ( data[ index ] && data[ index ].stop ) { 11814 stopQueue( data[ index ] ); 11815 } 11816 } else { 11817 for ( index in data ) { 11818 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 11819 stopQueue( data[ index ] ); 11820 } 11821 } 11822 } 11823 11824 for ( index = timers.length; index--; ) { 11825 if ( timers[ index ].elem === this && 11826 ( type == null || timers[ index ].queue === type ) ) { 11827 11828 timers[ index ].anim.stop( gotoEnd ); 11829 dequeue = false;
11830 timers.splice( index, 1 ); 11831 } 11832 } 11833 11834 // start the next in the queue if the last step wasn't forced 11835 // timers currently will call their complete callbacks, which will dequeue 11836 // but only if they were gotoEnd 11837 if ( dequeue || !gotoEnd ) { 11838 jQuery.dequeue( this, type ); 11839 } 11840 } ); 11841 }, 11842 finish: function( type ) { 11843 if ( type !== false ) { 11844 type = type || "fx"; 11845 } 11846 return this.each( function() { 11847 var index, 11848 data = jQuery._data( this ), 11849 queue = data[ type + "queue" ], 11850 hooks = data[ type + "queueHooks" ], 11851 timers = jQuery.timers, 11852 length = queue ? queue.length : 0; 11853 11854 // enable finishing flag on private data 11855 data.finish = true; 11856 11857 // empty the queue first 11858 jQuery.queue( this, type, [] ); 11859 11860 if ( hooks && hooks.stop ) { 11861 hooks.stop.call( this, true ); 11862 } 11863 11864 // look for any active animations, and finish them 11865 for ( index = timers.length; index--; ) { 11866 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 11867 timers[ index ].anim.stop( true ); 11868 timers.splice( index, 1 ); 11869 } 11870 } 11871 11872 // look for any animations in the old queue and finish them 11873 for ( index = 0; index < length; index++ ) { 11874 if ( queue[ index ] && queue[ index ].finish ) { 11875 queue[ index ].finish.call( this ); 11876 } 11877 } 11878 11879 // turn off finishing flag 11880 delete data.finish; 11881 } ); 11882 } 11883 } ); 11884 11885 jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { 11886 var cssFn = jQuery.fn[ name ]; 11887 jQuery.fn[ name ] = function( speed, easing, callback ) { 11888 return speed == null || typeof speed === "boolean" ? 11889 cssFn.apply( this, arguments ) : 11890 this.animate( genFx( name, true ), speed, easing, callback ); 11891 }; 11892 } ); 11893 11894// Generate shortcuts for custom animations 11895 jQuery.each( { 11896 slideDown: genFx( "show" ), 11897 slideUp: genFx( "hide" ), 11898 slideToggle: genFx( "toggle" ), 11899 fadeIn: { opacity: "show" }, 11900 fadeOut: { opacity: "hide" }, 11901 fadeToggle: { opacity: "toggle" } 11902 }, function( name, props ) { 11903 jQuery.fn[ name ] = function( speed, easing, callback ) { 11904 return this.animate( props, speed, easing, callback ); 11905 }; 11906 } ); 11907 11908 jQuery.timers = []; 11909 jQuery.fx.tick = function() { 11910 var timer, 11911 timers = jQuery.timers, 11912 i = 0; 11913 11914 fxNow = jQuery.now(); 11915 11916 for ( ; i < timers.length; i++ ) { 11917 timer = timers[ i ]; 11918 11919 // Checks the timer has not already been removed 11920 if ( !timer() && timers[ i ] === timer ) { 11921 timers.splice( i--, 1 ); 11922 } 11923 } 11924 11925 if ( !timers.length ) { 11926 jQuery.fx.stop(); 11927 } 11928 fxNow = undefined; 11929 }; 11930 11931 jQuery.fx.timer = function( timer ) { 11932 jQuery.timers.push( timer ); 11933 if ( timer() ) { 11934 jQuery.fx.start(); 11935 } else { 11936 jQuery.timers.pop(); 11937 } 11938 }; 11939 11940 jQuery.fx.interval = 13; 11941 11942 jQuery.fx.start = function() { 11943 if ( !timerId ) { 11944 timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval ); 11945 } 11946 }; 11947 11948 jQuery.fx.stop = function() { 11949 window.clearInterval( timerId ); 11950 timerId = null; 11951 }; 11952 11953 jQuery.fx.speeds = { 11954 slow: 600, 11955 fast: 200, 11956 11957 // Default speed 11958 _default: 400 11959 }; 11960 11961 11962// Based off of the plugin by Clint Helfers, with permission. 11963// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
11964 jQuery.fn.delay = function( time, type ) { 11965 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 11966 type = type || "fx"; 11967 11968 return this.queue( type, function( next, hooks ) { 11969 var timeout = window.setTimeout( next, time ); 11970 hooks.stop = function() { 11971 window.clearTimeout( timeout ); 11972 }; 11973 } ); 11974 }; 11975 11976 11977 ( function() { 11978 var a, 11979 input = document.createElement( "input" ), 11980 div = document.createElement( "div" ), 11981 select = document.createElement( "select" ), 11982 opt = select.appendChild( document.createElement( "option" ) ); 11983 11984 // Setup 11985 div = document.createElement( "div" ); 11986 div.setAttribute( "className", "t" ); 11987 div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; 11988 a = div.getElementsByTagName( "a" )[ 0 ]; 11989 11990 // Support: Windows Web Apps (WWA) 11991 // `type` must use .setAttribute for WWA (#14901) 11992 input.setAttribute( "type", "checkbox" ); 11993 div.appendChild( input ); 11994 11995 a = div.getElementsByTagName( "a" )[ 0 ]; 11996 11997 // First batch of tests. 11998 a.style.cssText = "top:1px"; 11999 12000 // Test setAttribute on camelCase class. 12001 // If it works, we need attrFixes when doing get/setAttribute (ie6/7) 12002 support.getSetAttribute = div.className !== "t"; 12003 12004 // Get the style information from getAttribute 12005 // (IE uses .cssText instead) 12006 support.style = /top/.test( a.getAttribute( "style" ) ); 12007 12008 // Make sure that URLs aren't manipulated 12009 // (IE normalizes it by default) 12010 support.hrefNormalized = a.getAttribute( "href" ) === "/a"; 12011 12012 // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) 12013 support.checkOn = !!input.value; 12014 12015 // Make sure that a selected-by-default option has a working selected property. 12016 // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) 12017 support.optSelected = opt.selected; 12018 12019 // Tests for enctype support on a form (#6743) 12020 support.enctype = !!document.createElement( "form" ).enctype; 12021 12022 // Make sure that the options inside disabled selects aren't marked as disabled 12023 // (WebKit marks them as disabled) 12024 select.disabled = true; 12025 support.optDisabled = !opt.disabled; 12026 12027 // Support: IE8 only 12028 // Check if we can trust getAttribute("value") 12029 input = document.createElement( "input" ); 12030 input.setAttribute( "value", "" ); 12031 support.input = input.getAttribute( "value" ) === ""; 12032 12033 // Check if an input maintains its value after becoming a radio 12034 input.value = "t"; 12035 input.setAttribute( "type", "radio" ); 12036 support.radioValue = input.value === "t"; 12037 } )(); 12038 12039 12040 var rreturn = /\r/g, 12041 rspaces = /[\x20\t\r\n\f]+/g; 12042 12043 jQuery.fn.extend( { 12044 val: function( value ) { 12045 var hooks, ret, isFunction, 12046 elem = this[ 0 ]; 12047 12048 if ( !arguments.length ) { 12049 if ( elem ) { 12050 hooks = jQuery.valHooks[ elem.type ] || 12051 jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 12052 12053 if ( 12054 hooks && 12055 "get" in hooks && 12056 ( ret = hooks.get( elem, "value" ) ) !== undefined 12057 ) { 12058 return ret; 12059 } 12060 12061 ret = elem.value; 12062 12063 return typeof ret === "string" ? 12064 12065 // handle most common string cases 12066 ret.replace( rreturn, "" ) : 12067 12068 // handle cases where value is null/undef or number 12069 ret == null ? "" : ret; 12070 } 12071 12072 return; 12073 } 12074 12075 isFunction = jQuery.isFunction( value ); 12076 12077 return this.each( function( i ) { 12078 var val; 12079 12080 if ( this.nodeType !== 1 ) { 12081 return; 12082 } 12083 12084 if ( isFunction ) { 12085 val = value.call( this, i, jQuery( this ).val() ); 12086 } else { 12087 val = value; 12088 } 12089 12090 // Treat null/undefined as ""; convert numbers to string 12091 if ( val == null ) { 12092 val = ""; 12093 } else if ( typeof val === "number" ) { 12094 val += ""; 12095 } else if ( jQuery.isArray( val ) ) { 12096 val = jQuery.map( val, function( value ) { 12097 return value == null ? "" : value + ""; 12098 } ); 12099 } 12100 12101 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 12102 12103 // If set returns undefined, fall back to normal setting
12104 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 12105 this.value = val; 12106 } 12107 } ); 12108 } 12109 } ); 12110 12111 jQuery.extend( { 12112 valHooks: { 12113 option: { 12114 get: function( elem ) { 12115 var val = jQuery.find.attr( elem, "value" ); 12116 return val != null ? 12117 val : 12118 12119 // Support: IE10-11+ 12120 // option.text throws exceptions (#14686, #14858) 12121 // Strip and collapse whitespace 12122 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 12123 jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " ); 12124 } 12125 }, 12126 select: { 12127 get: function( elem ) { 12128 var value, option, 12129 options = elem.options, 12130 index = elem.selectedIndex, 12131 one = elem.type === "select-one" || index < 0, 12132 values = one ? null : [], 12133 max = one ? index + 1 : options.length, 12134 i = index < 0 ? 12135 max : 12136 one ? index : 0; 12137 12138 // Loop through all the selected options 12139 for ( ; i < max; i++ ) { 12140 option = options[ i ]; 12141 12142 // oldIE doesn't update selected after form reset (#2551) 12143 if ( ( option.selected || i === index ) && 12144 12145 // Don't return options that are disabled or in a disabled optgroup 12146 ( support.optDisabled ? 12147 !option.disabled : 12148 option.getAttribute( "disabled" ) === null ) && 12149 ( !option.parentNode.disabled || 12150 !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { 12151 12152 // Get the specific value for the option 12153 value = jQuery( option ).val(); 12154 12155 // We don't need an array for one selects 12156 if ( one ) { 12157 return value; 12158 } 12159 12160 // Multi-Selects return an array 12161 values.push( value ); 12162 } 12163 } 12164 12165 return values; 12166 }, 12167 12168 set: function( elem, value ) { 12169 var optionSet, option, 12170 options = elem.options, 12171 values = jQuery.makeArray( value ), 12172 i = options.length; 12173 12174 while ( i-- ) { 12175 option = options[ i ]; 12176 12177 if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { 12178 12179 // Support: IE6 12180 // When new option element is added to select box we need to 12181 // force reflow of newly added node in order to workaround delay 12182 // of initialization properties 12183 try { 12184 option.selected = optionSet = true; 12185 12186 } catch ( _ ) { 12187 12188 // Will be executed only in IE6 12189 option.scrollHeight; 12190 } 12191 12192 } else { 12193 option.selected = false; 12194 } 12195 } 12196 12197 // Force browsers to behave consistently when non-matching value is set 12198 if ( !optionSet ) { 12199 elem.selectedIndex = -1; 12200 } 12201 12202 return options; 12203 } 12204 } 12205 } 12206 } ); 12207 12208// Radios and checkboxes getter/setter 12209 jQuery.each( [ "radio", "checkbox" ], function() { 12210 jQuery.valHooks[ this ] = { 12211 set: function( elem, value ) { 12212 if ( jQuery.isArray( value ) ) { 12213 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 12214 } 12215 } 12216 }; 12217 if ( !support.checkOn ) { 12218 jQuery.valHooks[ this ].get = function( elem ) { 12219 return elem.getAttribute( "value" ) === null ? "on" : elem.value; 12220 }; 12221 } 12222 } ); 12223 12224 12225 12226 12227 var nodeHook, boolHook, 12228 attrHandle = jQuery.expr.attrHandle, 12229 ruseDefault = /^(?:checked|selected)$/i, 12230 getSetAttribute = support.getSetAttribute, 12231 getSetInput = support.input; 12232 12233 jQuery.fn.extend( { 12234 attr: function( name, value ) { 12235 return access( this, jQuery.attr, name, value, arguments.length > 1 ); 12236 }, 12237 12238 removeAttr: function( name ) { 12239 return this.each( function() { 12240 jQuery.removeAttr( this, name ); 12241 } ); 12242 } 12243 } ); 12244 12245 jQuery.extend( { 12246 attr: function( elem, name, value ) { 12247 var ret, hooks, 12248 nType = elem.nodeType; 12249 12250 // Don't get/set attributes on text, comment and attribute nodes 12251 if ( nType === 3 || nType === 8 || nType === 2 ) { 12252 return; 12253 } 12254 12255 // Fallback to prop when attributes are not supported 12256 if ( typeof elem.getAttribute === "undefined" ) { 12257 return jQuery.prop( elem, name, value ); 12258 } 12259 12260 // All attributes are lowercase 12261 // Grab necessary hook if one is defined 12262 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 12263 name = name.toLowerCase(); 12264 hooks = jQuery.attrHooks[ name ] || 12265 ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); 12266 } 12267 12268 if ( value !== undefined ) { 12269 if ( value === null ) { 12270 jQuery.removeAttr( elem, name ); 12271 return; 12272 } 12273 12274 if ( hooks && "set" in hooks && 12275 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 12276 return ret; 12277 } 12278 12279 elem.setAttribute( name, value + "" ); 12280 return value; 12281 } 12282 12283 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 12284 return ret; 12285 } 12286 12287 ret = jQuery.find.attr( elem, name ); 12288 12289 // Non-existent attributes return null, we normalize to undefined 12290 return ret == null ? undefined : ret; 12291 }, 12292 12293 attrHooks: { 12294 type: { 12295 set: function( elem, value ) { 12296 if ( !support.radioValue && value === "radio" && 12297 jQuery.nodeName( elem, "input" ) ) { 12298 12299 // Setting the type on a radio button after the value resets the value in IE8-9 12300 // Reset value to default in case type is set after value during creation 12301 var val = elem.value; 12302 elem.setAttribute( "type", value ); 12303 if ( val ) { 12304 elem.value = val; 12305 } 12306 return value; 12307 } 12308 } 12309 } 12310 }, 12311 12312 removeAttr: function( elem, value ) { 12313 var name, propName, 12314 i = 0, 12315 attrNames = value && value.match( rnotwhite ); 12316 12317 if ( attrNames && elem.nodeType === 1 ) { 12318 while ( ( name = attrNames[ i++ ] ) ) { 12319 propName = jQuery.propFix[ name ] || name; 12320 12321 // Boolean attributes get special treatment (#10870) 12322 if ( jQuery.expr.match.bool.test( name ) ) { 12323 12324 // Set corresponding property to false 12325 if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { 12326 elem[ propName ] = false;
12327 12328 // Support: IE<9 12329 // Also clear defaultChecked/defaultSelected (if appropriate) 12330 } else { 12331 elem[ jQuery.camelCase( "default-" + name ) ] = 12332 elem[ propName ] = false; 12333 } 12334 12335 // See #9699 for explanation of this approach (setting first, then removal) 12336 } else { 12337 jQuery.attr( elem, name, "" ); 12338 } 12339 12340 elem.removeAttribute( getSetAttribute ? name : propName ); 12341 } 12342 } 12343 } 12344 } ); 12345 12346// Hooks for boolean attributes 12347 boolHook = { 12348 set: function( elem, value, name ) { 12349 if ( value === false ) { 12350 12351 // Remove boolean attributes when set to false 12352 jQuery.removeAttr( elem, name ); 12353 } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { 12354 12355 // IE<8 needs the *property* name 12356 elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); 12357 12358 } else { 12359 12360 // Support: IE<9 12361 // Use defaultChecked and defaultSelected for oldIE 12362 elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; 12363 } 12364 return name; 12365 } 12366 }; 12367 12368 jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { 12369 var getter = attrHandle[ name ] || jQuery.find.attr; 12370 12371 if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { 12372 attrHandle[ name ] = function( elem, name, isXML ) { 12373 var ret, handle; 12374 if ( !isXML ) { 12375 12376 // Avoid an infinite loop by temporarily removing this function from the getter 12377 handle = attrHandle[ name ]; 12378 attrHandle[ name ] = ret; 12379 ret = getter( elem, name, isXML ) != null ? 12380 name.toLowerCase() : 12381 null; 12382 attrHandle[ name ] = handle; 12383 } 12384 return ret; 12385 }; 12386 } else { 12387 attrHandle[ name ] = function( elem, name, isXML ) { 12388 if ( !isXML ) { 12389 return elem[ jQuery.camelCase( "default-" + name ) ] ? 12390 name.toLowerCase() : 12391 null; 12392 } 12393 }; 12394 } 12395 } ); 12396 12397// fix oldIE attroperties 12398 if ( !getSetInput || !getSetAttribute ) { 12399 jQuery.attrHooks.value = { 12400 set: function( elem, value, name ) { 12401 if ( jQuery.nodeName( elem, "input" ) ) { 12402 12403 // Does not return so that setAttribute is also used 12404 elem.defaultValue = value; 12405 } else { 12406 12407 // Use nodeHook if defined (#1954); otherwise setAttribute is fine 12408 return nodeHook && nodeHook.set( elem, value, name ); 12409 } 12410 } 12411 }; 12412 } 12413 12414// IE6/7 do not support getting/setting some attributes with get/setAttribute 12415 if ( !getSetAttribute ) { 12416 12417 // Use this for any attribute in IE6/7 12418 // This fixes almost every IE6/7 issue 12419 nodeHook = { 12420 set: function( elem, value, name ) { 12421 12422 // Set the existing or create a new attribute node 12423 var ret = elem.getAttributeNode( name ); 12424 if ( !ret ) { 12425 elem.setAttributeNode( 12426 ( ret = elem.ownerDocument.createAttribute( name ) ) 12427 ); 12428 } 12429 12430 ret.value = value += ""; 12431 12432 // Break association with cloned elements by also using setAttribute (#9646) 12433 if ( name === "value" || value === elem.getAttribute( name ) ) { 12434 return value; 12435 } 12436 } 12437 }; 12438 12439 // Some attributes are constructed with empty-string values when not defined 12440 attrHandle.id = attrHandle.name = attrHandle.coords = 12441 function( elem, name, isXML ) { 12442 var ret; 12443 if ( !isXML ) { 12444 return ( ret = elem.getAttributeNode( name ) ) && ret.value !== "" ? 12445 ret.value : 12446 null; 12447 } 12448 }; 12449 12450 // Fixing value retrieval on a button requires this module 12451 jQuery.valHooks.button = { 12452 get: function( elem, name ) { 12453 var ret = elem.getAttributeNode( name ); 12454 if ( ret && ret.specified ) { 12455 return ret.value; 12456 } 12457 }, 12458 set: nodeHook.set 12459 }; 12460 12461 // Set contenteditable to false on removals(#10429) 12462 // Setting to empty string throws an error as an invalid value 12463 jQuery.attrHooks.contenteditable = { 12464 set: function( elem, value, name ) { 12465 nodeHook.set( elem, value === "" ? false : value, name ); 12466 } 12467 }; 12468 12469 // Set width and height to auto instead of 0 on empty string( Bug #8150 ) 12470 // This is for removals 12471 jQuery.each( [ "width", "height" ], function( i, name ) { 12472 jQuery.attrHooks[ name ] = { 12473 set: function( elem, value ) { 12474 if ( value === "" ) { 12475 elem.setAttribute( name, "auto" ); 12476 return value; 12477 } 12478 } 12479 }; 12480 } ); 12481 } 12482 12483 if ( !support.style ) { 12484 jQuery.attrHooks.style = { 12485 get: function( elem ) { 12486 12487 // Return undefined in the case of empty string 12488 // Note: IE uppercases css property names, but if we were to .toLowerCase() 12489 // .cssText, that would destroy case sensitivity in URL's, like in "background" 12490 return elem.style.cssText || undefined; 12491 },
12492 set: function( elem, value ) { 12493 return ( elem.style.cssText = value + "" ); 12494 } 12495 }; 12496 } 12497 12498 12499 12500 12501 var rfocusable = /^(?:input|select|textarea|button|object)$/i, 12502 rclickable = /^(?:a|area)$/i; 12503 12504 jQuery.fn.extend( { 12505 prop: function( name, value ) { 12506 return access( this, jQuery.prop, name, value, arguments.length > 1 ); 12507 }, 12508 12509 removeProp: function( name ) { 12510 name = jQuery.propFix[ name ] || name; 12511 return this.each( function() { 12512 12513 // try/catch handles cases where IE balks (such as removing a property on window) 12514 try { 12515 this[ name ] = undefined; 12516 delete this[ name ]; 12517 } catch ( e ) {} 12518 } ); 12519 } 12520 } ); 12521 12522 jQuery.extend( { 12523 prop: function( elem, name, value ) { 12524 var ret, hooks, 12525 nType = elem.nodeType; 12526 12527 // Don't get/set properties on text, comment and attribute nodes 12528 if ( nType === 3 || nType === 8 || nType === 2 ) { 12529 return; 12530 } 12531 12532 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 12533 12534 // Fix name and attach hooks 12535 name = jQuery.propFix[ name ] || name; 12536 hooks = jQuery.propHooks[ name ]; 12537 } 12538 12539 if ( value !== undefined ) { 12540 if ( hooks && "set" in hooks && 12541 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 12542 return ret; 12543 } 12544 12545 return ( elem[ name ] = value ); 12546 } 12547 12548 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 12549 return ret; 12550 } 12551 12552 return elem[ name ]; 12553 }, 12554 12555 propHooks: { 12556 tabIndex: { 12557 get: function( elem ) { 12558 12559 // elem.tabIndex doesn't always return the 12560 // correct value when it hasn't been explicitly set 12561 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 12562 // Use proper attribute retrieval(#12072) 12563 var tabindex = jQuery.find.attr( elem, "tabindex" ); 12564 12565 return tabindex ? 12566 parseInt( tabindex, 10 ) : 12567 rfocusable.test( elem.nodeName ) || 12568 rclickable.test( elem.nodeName ) && elem.href ? 12569 0 : 12570 -1; 12571 } 12572 } 12573 }, 12574 12575 propFix: { 12576 "for": "htmlFor", 12577 "class": "className" 12578 } 12579 } ); 12580 12581// Some attributes require a special call on IE 12582// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 12583 if ( !support.hrefNormalized ) { 12584 12585 // href/src property should get the full normalized URL (#10299/#12915) 12586 jQuery.each( [ "href", "src" ], function( i, name ) { 12587 jQuery.propHooks[ name ] = { 12588 get: function( elem ) { 12589 return elem.getAttribute( name, 4 ); 12590 } 12591 }; 12592 } ); 12593 } 12594 12595// Support: Safari, IE9+ 12596// Accessing the selectedIndex property 12597// forces the browser to respect setting selected 12598// on the option 12599// The getter ensures a default option is selected 12600// when in an optgroup 12601 if ( !support.optSelected ) { 12602 jQuery.propHooks.selected = { 12603 get: function( elem ) { 12604 var parent = elem.parentNode; 12605 12606 if ( parent ) { 12607 parent.selectedIndex; 12608 12609 // Make sure that it also works with optgroups, see #5701 12610 if ( parent.parentNode ) { 12611 parent.parentNode.selectedIndex; 12612 } 12613 } 12614 return null; 12615 }, 12616 set: function( elem ) { 12617 var parent = elem.parentNode; 12618 if ( parent ) { 12619 parent.selectedIndex; 12620 12621 if ( parent.parentNode ) { 12622 parent.parentNode.selectedIndex; 12623 } 12624 } 12625 } 12626 }; 12627 } 12628 12629 jQuery.each( [ 12630 "tabIndex", 12631 "readOnly", 12632 "maxLength", 12633 "cellSpacing", 12634 "cellPadding", 12635 "rowSpan", 12636 "colSpan", 12637 "useMap", 12638 "frameBorder", 12639 "contentEditable" 12640 ], function() { 12641 jQuery.propFix[ this.toLowerCase() ] = this; 12642 } ); 12643 12644// IE6/7 call enctype encoding 12645 if ( !support.enctype ) { 12646 jQuery.propFix.enctype = "encoding"; 12647 } 12648 12649 12650 12651 12652 var rclass = /[\t\r\n\f]/g; 12653 12654 function getClass( elem ) { 12655 return jQuery.attr( elem, "class" ) || ""; 12656 } 12657 12658 jQuery.fn.extend( { 12659 addClass: function( value ) { 12660 var classes, elem, cur, curValue, clazz, j, finalValue, 12661 i = 0; 12662 12663 if ( jQuery.isFunction( value ) ) { 12664 return this.each( function( j ) { 12665 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 12666 } ); 12667 } 12668 12669 if ( typeof value === "string" && value ) { 12670 classes = value.match( rnotwhite ) || []; 12671 12672 while ( ( elem = this[ i++ ] ) ) { 12673 curValue = getClass( elem ); 12674 cur = elem.nodeType === 1 && 12675 ( " " + curValue + " " ).replace( rclass, " " ); 12676 12677 if ( cur ) { 12678 j = 0; 12679 while ( ( clazz = classes[ j++ ] ) ) { 12680 if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 12681 cur += clazz + " "; 12682 } 12683 } 12684 12685 // only assign if different to avoid unneeded rendering. 12686 finalValue = jQuery.trim( cur ); 12687 if ( curValue !== finalValue ) { 12688 jQuery.attr( elem, "class", finalValue ); 12689 } 12690 } 12691 } 12692 } 12693 12694 return this; 12695 }, 12696 12697 removeClass: function( value ) { 12698 var classes, elem, cur, curValue, clazz, j, finalValue, 12699 i = 0; 12700 12701 if ( jQuery.isFunction( value ) ) { 12702 return this.each( function( j ) { 12703 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 12704 } ); 12705 } 12706 12707 if ( !arguments.length ) { 12708 return this.attr( "class", "" ); 12709 } 12710 12711 if ( typeof value === "string" && value ) { 12712 classes = value.match( rnotwhite ) || []; 12713 12714 while ( ( elem = this[ i++ ] ) ) { 12715 curValue = getClass( elem ); 12716 12717 // This expression is here for better compressibility (see addClass) 12718 cur = elem.nodeType === 1 && 12719 ( " " + curValue + " " ).replace( rclass, " " ); 12720 12721 if ( cur ) { 12722 j = 0; 12723 while ( ( clazz = classes[ j++ ] ) ) { 12724
12725 // Remove *all* instances 12726 while ( cur.indexOf( " " + clazz + " " ) > -1 ) { 12727 cur = cur.replace( " " + clazz + " ", " " ); 12728 } 12729 } 12730 12731 // Only assign if different to avoid unneeded rendering. 12732 finalValue = jQuery.trim( cur ); 12733 if ( curValue !== finalValue ) { 12734 jQuery.attr( elem, "class", finalValue ); 12735 } 12736 } 12737 } 12738 } 12739 12740 return this; 12741 }, 12742 12743 toggleClass: function( value, stateVal ) { 12744 var type = typeof value; 12745 12746 if ( typeof stateVal === "boolean" && type === "string" ) { 12747 return stateVal ? this.addClass( value ) : this.removeClass( value ); 12748 } 12749 12750 if ( jQuery.isFunction( value ) ) { 12751 return this.each( function( i ) { 12752 jQuery( this ).toggleClass( 12753 value.call( this, i, getClass( this ), stateVal ), 12754 stateVal 12755 ); 12756 } ); 12757 } 12758 12759 return this.each( function() { 12760 var className, i, self, classNames; 12761 12762 if ( type === "string" ) { 12763 12764 // Toggle individual class names 12765 i = 0; 12766 self = jQuery( this ); 12767 classNames = value.match( rnotwhite ) || []; 12768 12769 while ( ( className = classNames[ i++ ] ) ) { 12770 12771 // Check each className given, space separated list 12772 if ( self.hasClass( className ) ) { 12773 self.removeClass( className ); 12774 } else { 12775 self.addClass( className ); 12776 } 12777 } 12778 12779 // Toggle whole class name 12780 } else if ( value === undefined || type === "boolean" ) { 12781 className = getClass( this ); 12782 if ( className ) { 12783 12784 // store className if set 12785 jQuery._data( this, "__className__", className ); 12786 } 12787 12788 // If the element has a class name or if we're passed "false", 12789 // then remove the whole classname (if there was one, the above saved it). 12790 // Otherwise bring back whatever was previously saved (if anything), 12791 // falling back to the empty string if nothing was stored. 12792 jQuery.attr( this, "class", 12793 className || value === false ? 12794 "" : 12795 jQuery._data( this, "__className__" ) || "" 12796 ); 12797 } 12798 } ); 12799 }, 12800 12801 hasClass: function( selector ) { 12802 var className, elem, 12803 i = 0; 12804 12805 className = " " + selector + " "; 12806 while ( ( elem = this[ i++ ] ) ) { 12807 if ( elem.nodeType === 1 && 12808 ( " " + getClass( elem ) + " " ).replace( rclass, " " ) 12809 .indexOf( className ) > -1 12810 ) { 12811 return true; 12812 } 12813 } 12814 12815 return false; 12816 } 12817 } ); 12818 12819 12820 12821 12822// Return jQuery for attributes-only inclusion 12823 12824 12825 jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " + 12826 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 12827 "change select submit keydown keypress keyup error contextmenu" ).split( " " ), 12828 function( i, name ) { 12829 12830 // Handle event binding 12831 jQuery.fn[ name ] = function( data, fn ) { 12832 return arguments.length > 0 ? 12833 this.on( name, null, data, fn ) : 12834 this.trigger( name ); 12835 }; 12836 } ); 12837 12838 jQuery.fn.extend( { 12839 hover: function( fnOver, fnOut ) { 12840 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 12841 } 12842 } ); 12843 12844 12845 var location = window.location; 12846 12847 var nonce = jQuery.now(); 12848 12849 var rquery = ( /\?/ ); 12850 12851 12852 12853 var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g; 12854 12855 jQuery.parseJSON = function( data ) { 12856 12857 // Attempt to parse using the native JSON parser first 12858 if ( window.JSON && window.JSON.parse ) { 12859 12860 // Support: Android 2.3 12861 // Workaround failure to string-cast null input 12862 return window.JSON.parse( data + "" ); 12863 } 12864 12865 var requireNonComma, 12866 depth = null, 12867 str = jQuery.trim( data + "" ); 12868 12869 // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains 12870 // after removing valid tokens 12871 return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) { 12872 12873 // Force termination if we see a misplaced comma 12874 if ( requireNonComma && comma ) { 12875 depth = 0; 12876 } 12877 12878 // Perform no more replacements after returning to outermost depth 12879 if ( depth === 0 ) { 12880 return token; 12881 } 12882 12883 // Commas must not follow "[", "{", or "," 12884 requireNonComma = open || comma; 12885 12886 // Determine new depth 12887 // array/object open ("[" or "{"): depth += true - false (increment) 12888 // array/object close ("]" or "}"): depth += false - true (decrement) 12889 // other cases ("," or primitive): depth += true - true (numeric cast) 12890 depth += !close - !open; 12891 12892 // Remove this token 12893 return ""; 12894 } ) ) ? 12895 ( Function( "return " + str ) )() : 12896 jQuery.error( "Invalid JSON: " + data ); 12897 }; 12898 12899 12900// Cross-browser xml parsing 12901 jQuery.parseXML = function( data ) { 12902 var xml, tmp; 12903 if ( !data || typeof data !== "string" ) { 12904 return null; 12905 } 12906 try { 12907 if ( window.DOMParser ) { // Standard 12908 tmp = new window.DOMParser(); 12909 xml = tmp.parseFromString( data, "text/xml" ); 12910 } else { // IE 12911 xml = new window.ActiveXObject( "Microsoft.XMLDOM" ); 12912 xml.async = "false"; 12913 xml.loadXML( data ); 12914 } 12915 } catch ( e ) { 12916 xml = undefined; 12917 } 12918 if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { 12919 jQuery.error( "Invalid XML: " + data ); 12920 } 12921 return xml; 12922 }; 12923 12924 12925 var 12926 rhash = /#.*$/, 12927 rts = /([?&])_=[^&]*/, 12928 12929 // IE leaves an \r character at EOL 12930 rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, 12931
vendor: 4,409 bytes, lines 12932-13076
12932 // #7653, #8125, #8152: local protocol detection 12933 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 12934 rnoContent = /^(?:GET|HEAD)$/, 12935 rprotocol = /^\/\//, 12936 rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, 12937 12938 /* Prefilters 12939 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 12940 * 2) These are called: 12941 * - BEFORE asking for a transport 12942 * - AFTER param serialization (s.data is a string if s.processData is true) 12943 * 3) key is the dataType 12944 * 4) the catchall symbol "*" can be used 12945 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 12946 */ 12947 prefilters = {}, 12948 12949 /* Transports bindings 12950 * 1) key is the dataType 12951 * 2) the catchall symbol "*" can be used 12952 * 3) selection will start with transport dataType and THEN go to "*" if needed 12953 */ 12954 transports = {}, 12955 12956 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 12957 allTypes = "*/".concat( "*" ), 12958 12959 // Document location 12960 ajaxLocation = location.href, 12961 12962 // Segment location into parts 12963 ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; 12964 12965// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 12966 function addToPrefiltersOrTransports( structure ) { 12967 12968 // dataTypeExpression is optional and defaults to "*" 12969 return function( dataTypeExpression, func ) { 12970 12971 if ( typeof dataTypeExpression !== "string" ) { 12972 func = dataTypeExpression; 12973 dataTypeExpression = "*"; 12974 } 12975 12976 var dataType, 12977 i = 0, 12978 dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; 12979 12980 if ( jQuery.isFunction( func ) ) { 12981 12982 // For each dataType in the dataTypeExpression 12983 while ( ( dataType = dataTypes[ i++ ] ) ) { 12984 12985 // Prepend if requested 12986 if ( dataType.charAt( 0 ) === "+" ) { 12987 dataType = dataType.slice( 1 ) || "*"; 12988 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); 12989 12990 // Otherwise append 12991 } else { 12992 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); 12993 } 12994 } 12995 } 12996 }; 12997 } 12998 12999// Base inspection function for prefilters and transports 13000 function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 13001 13002 var inspected = {}, 13003 seekingTransport = ( structure === transports ); 13004 13005 function inspect( dataType ) { 13006 var selected; 13007 inspected[ dataType ] = true; 13008 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 13009 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 13010 if ( typeof dataTypeOrTransport === "string" && 13011 !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 13012 13013 options.dataTypes.unshift( dataTypeOrTransport ); 13014 inspect( dataTypeOrTransport ); 13015 return false; 13016 } else if ( seekingTransport ) { 13017 return !( selected = dataTypeOrTransport ); 13018 } 13019 } ); 13020 return selected; 13021 } 13022 13023 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 13024 } 13025 13026// A special extend for ajax options 13027// that takes "flat" options (not to be deep extended) 13028// Fixes #9887 13029 function ajaxExtend( target, src ) { 13030 var deep, key, 13031 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 13032 13033 for ( key in src ) { 13034 if ( src[ key ] !== undefined ) { 13035 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 13036 } 13037 } 13038 if ( deep ) { 13039 jQuery.extend( true, target, deep ); 13040 } 13041 13042 return target; 13043 } 13044 13045 /* Handles responses to an ajax request: 13046 * - finds the right dataType (mediates between content-type and expected dataType) 13047 * - returns the corresponding response 13048 */ 13049 function ajaxHandleResponses( s, jqXHR, responses ) { 13050 var firstDataType, ct, finalDataType, type, 13051 contents = s.contents, 13052 dataTypes = s.dataTypes; 13053 13054 // Remove auto dataType and get content-type in the process 13055 while ( dataTypes[ 0 ] === "*" ) { 13056 dataTypes.shift(); 13057 if ( ct === undefined ) { 13058 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); 13059 } 13060 } 13061 13062 // Check if we're dealing with a known content-type 13063 if ( ct ) { 13064 for ( type in contents ) { 13065 if ( contents[ type ] && contents[ type ].test( ct ) ) { 13066 dataTypes.unshift( type ); 13067 break; 13068 } 13069 } 13070 } 13071 13072 // Check to see if we have a response for the expected dataType 13073 if ( dataTypes[ 0 ] in responses ) { 13074 finalDataType = dataTypes[ 0 ]; 13075 } else { 13076
vendor: 5,223 bytes, lines 13077-13290
13077 // Try convertible dataTypes 13078 for ( type in responses ) { 13079 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { 13080 finalDataType = type; 13081 break; 13082 } 13083 if ( !firstDataType ) { 13084 firstDataType = type; 13085 } 13086 } 13087 13088 // Or just use first one 13089 finalDataType = finalDataType || firstDataType; 13090 } 13091 13092 // If we found a dataType 13093 // We add the dataType to the list if needed 13094 // and return the corresponding response 13095 if ( finalDataType ) { 13096 if ( finalDataType !== dataTypes[ 0 ] ) { 13097 dataTypes.unshift( finalDataType ); 13098 } 13099 return responses[ finalDataType ]; 13100 } 13101 } 13102 13103 /* Chain conversions given the request and the original response 13104 * Also sets the responseXXX fields on the jqXHR instance 13105 */ 13106 function ajaxConvert( s, response, jqXHR, isSuccess ) { 13107 var conv2, current, conv, tmp, prev, 13108 converters = {}, 13109 13110 // Work with a copy of dataTypes in case we need to modify it for conversion 13111 dataTypes = s.dataTypes.slice(); 13112 13113 // Create converters map with lowercased keys 13114 if ( dataTypes[ 1 ] ) { 13115 for ( conv in s.converters ) { 13116 converters[ conv.toLowerCase() ] = s.converters[ conv ]; 13117 } 13118 } 13119 13120 current = dataTypes.shift(); 13121 13122 // Convert to each sequential dataType 13123 while ( current ) { 13124 13125 if ( s.responseFields[ current ] ) { 13126 jqXHR[ s.responseFields[ current ] ] = response; 13127 } 13128 13129 // Apply the dataFilter if provided 13130 if ( !prev && isSuccess && s.dataFilter ) { 13131 response = s.dataFilter( response, s.dataType ); 13132 } 13133 13134 prev = current; 13135 current = dataTypes.shift(); 13136 13137 if ( current ) { 13138 13139 // There's only work to do if current dataType is non-auto 13140 if ( current === "*" ) { 13141 13142 current = prev; 13143 13144 // Convert response if prev dataType is non-auto and differs from current 13145 } else if ( prev !== "*" && prev !== current ) { 13146 13147 // Seek a direct converter 13148 conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 13149 13150 // If none found, seek a pair 13151 if ( !conv ) { 13152 for ( conv2 in converters ) { 13153 13154 // If conv2 outputs current 13155 tmp = conv2.split( " " ); 13156 if ( tmp[ 1 ] === current ) { 13157 13158 // If prev can be converted to accepted input 13159 conv = converters[ prev + " " + tmp[ 0 ] ] || 13160 converters[ "* " + tmp[ 0 ] ]; 13161 if ( conv ) { 13162 13163 // Condense equivalence converters 13164 if ( conv === true ) { 13165 conv = converters[ conv2 ]; 13166 13167 // Otherwise, insert the intermediate dataType 13168 } else if ( converters[ conv2 ] !== true ) { 13169 current = tmp[ 0 ]; 13170 dataTypes.unshift( tmp[ 1 ] ); 13171 } 13172 break; 13173 } 13174 } 13175 } 13176 } 13177 13178 // Apply converter (if not an equivalence) 13179 if ( conv !== true ) { 13180 13181 // Unless errors are allowed to bubble, catch and return them 13182 if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation 13183 response = conv( response ); 13184 } else { 13185 try { 13186 response = conv( response ); 13187 } catch ( e ) { 13188 return { 13189 state: "parsererror", 13190 error: conv ? e : "No conversion from " + prev + " to " + current 13191 }; 13192 } 13193 } 13194 } 13195 } 13196 } 13197 } 13198 13199 return { state: "success", data: response }; 13200 } 13201 13202 jQuery.extend( { 13203 13204 // Counter for holding the number of active queries 13205 active: 0, 13206 13207 // Last-Modified header cache for next request 13208 lastModified: {}, 13209 etag: {}, 13210 13211 ajaxSettings: { 13212 url: ajaxLocation, 13213 type: "GET", 13214 isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), 13215 global: true, 13216 processData: true, 13217 async: true, 13218 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 13219 /* 13220 timeout: 0, 13221 data: null, 13222 dataType: null, 13223 username: null, 13224 password: null, 13225 cache: null, 13226 throws: false, 13227 traditional: false, 13228 headers: {}, 13229 */ 13230 13231 accepts: { 13232 "*": allTypes, 13233 text: "text/plain", 13234 html: "text/html", 13235 xml: "application/xml, text/xml", 13236 json: "application/json, text/javascript" 13237 }, 13238 13239 contents: { 13240 xml: /\bxml\b/, 13241 html: /\bhtml/, 13242 json: /\bjson\b/ 13243 }, 13244 13245 responseFields: { 13246 xml: "responseXML", 13247 text: "responseText", 13248 json: "responseJSON" 13249 }, 13250 13251 // Data converters 13252 // Keys separate source (or catchall "*") and destination types with a single space 13253 converters: { 13254 13255 // Convert anything to text 13256 "* text": String, 13257 13258 // Text to html (true = no transformation) 13259 "text html": true, 13260 13261 // Evaluate text as a json expression 13262 "text json": jQuery.parseJSON, 13263 13264 // Parse text as xml 13265 "text xml": jQuery.parseXML 13266 }, 13267 13268 // For options that shouldn't be deep extended: 13269 // you can add your own custom options here if 13270 // and when you create one that shouldn't be 13271 // deep extended (see ajaxExtend) 13272 flatOptions: { 13273 url: true, 13274 context: true 13275 } 13276 }, 13277 13278 // Creates a full fledged settings object into target 13279 // with both ajaxSettings and settings fields. 13280 // If target is omitted, writes into ajaxSettings. 13281 ajaxSetup: function( target, settings ) { 13282 return settings ? 13283 13284 // Building a settings object 13285 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 13286 13287 // Extending ajaxSettings 13288 ajaxExtend( jQuery.ajaxSettings, target ); 13289 }, 13290
13291 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 13292 ajaxTransport: addToPrefiltersOrTransports( transports ), 13293 13294 // Main method 13295 ajax: function( url, options ) { 13296 13297 // If url is an object, simulate pre-1.5 signature 13298 if ( typeof url === "object" ) { 13299 options = url; 13300 url = undefined; 13301 } 13302 13303 // Force options to be an object 13304 options = options || {}; 13305 13306 var 13307 13308 // Cross-domain detection vars 13309 parts, 13310 13311 // Loop variable 13312 i, 13313 13314 // URL without anti-cache param 13315 cacheURL, 13316 13317 // Response headers as string 13318 responseHeadersString, 13319 13320 // timeout handle 13321 timeoutTimer, 13322 13323 // To know if global events are to be dispatched 13324 fireGlobals, 13325 13326 transport, 13327 13328 // Response headers 13329 responseHeaders, 13330 13331 // Create the final options object 13332 s = jQuery.ajaxSetup( {}, options ), 13333 13334 // Callbacks context 13335 callbackContext = s.context || s, 13336 13337 // Context for global events is callbackContext if it is a DOM node or jQuery collection 13338 globalEventContext = s.context && 13339 ( callbackContext.nodeType || callbackContext.jquery ) ? 13340 jQuery( callbackContext ) : 13341 jQuery.event, 13342 13343 // Deferreds 13344 deferred = jQuery.Deferred(), 13345 completeDeferred = jQuery.Callbacks( "once memory" ), 13346 13347 // Status-dependent callbacks 13348 statusCode = s.statusCode || {}, 13349 13350 // Headers (they are sent all at once) 13351 requestHeaders = {}, 13352 requestHeadersNames = {}, 13353 13354 // The jqXHR state 13355 state = 0, 13356 13357 // Default abort message 13358 strAbort = "canceled", 13359 13360 // Fake xhr 13361 jqXHR = { 13362 readyState: 0, 13363 13364 // Builds headers hashtable if needed 13365 getResponseHeader: function( key ) { 13366 var match; 13367 if ( state === 2 ) { 13368 if ( !responseHeaders ) { 13369 responseHeaders = {}; 13370 while ( ( match = rheaders.exec( responseHeadersString ) ) ) { 13371 responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; 13372 } 13373 } 13374 match = responseHeaders[ key.toLowerCase() ]; 13375 } 13376 return match == null ? null : match; 13377 }, 13378 13379 // Raw string 13380 getAllResponseHeaders: function() { 13381 return state === 2 ? responseHeadersString : null; 13382 }, 13383 13384 // Caches the header 13385 setRequestHeader: function( name, value ) { 13386 var lname = name.toLowerCase(); 13387 if ( !state ) { 13388 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; 13389 requestHeaders[ name ] = value; 13390 } 13391 return this; 13392 }, 13393 13394 // Overrides response content-type header 13395 overrideMimeType: function( type ) { 13396 if ( !state ) { 13397 s.mimeType = type; 13398 } 13399 return this; 13400 }, 13401 13402 // Status-dependent callbacks 13403 statusCode: function( map ) { 13404 var code; 13405 if ( map ) { 13406 if ( state < 2 ) { 13407 for ( code in map ) { 13408 13409 // Lazy-add the new callback in a way that preserves old ones 13410 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 13411 } 13412 } else { 13413 13414 // Execute the appropriate callbacks 13415 jqXHR.always( map[ jqXHR.status ] ); 13416 } 13417 } 13418 return this; 13419 }, 13420 13421 // Cancel the request 13422 abort: function( statusText ) { 13423 var finalText = statusText || strAbort; 13424 if ( transport ) { 13425 transport.abort( finalText ); 13426 } 13427 done( 0, finalText ); 13428 return this; 13429 } 13430 }; 13431 13432 // Attach deferreds 13433 deferred.promise( jqXHR ).complete = completeDeferred.add; 13434 jqXHR.success = jqXHR.done; 13435 jqXHR.error = jqXHR.fail; 13436 13437 // Remove hash character (#7531: and string promotion) 13438 // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) 13439 // Handle falsy url in the settings object (#10093: consistency with old signature) 13440 // We also use the url parameter if available 13441 s.url = ( ( url || s.url || ajaxLocation ) + "" ) 13442 .replace( rhash, "" ) 13443 .replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); 13444 13445 // Alias method option to type as per ticket #12004 13446 s.type = options.method || options.type || s.method || s.type; 13447 13448 // Extract dataTypes list 13449 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; 13450 13451 // A cross-domain request is in order when we have a protocol:host:port mismatch 13452 if ( s.crossDomain == null ) { 13453 parts = rurl.exec( s.url.toLowerCase() ); 13454 s.crossDomain = !!( parts && 13455 ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || 13456 ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== 13457 ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) 13458 ); 13459 } 13460 13461 // Convert data if not already a string 13462 if ( s.data && s.processData && typeof s.data !== "string" ) { 13463 s.data = jQuery.param( s.data, s.traditional ); 13464 } 13465 13466 // Apply prefilters 13467 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 13468 13469 // If request was aborted inside a prefilter, stop there 13470 if ( state === 2 ) { 13471 return jqXHR; 13472 } 13473 13474 // We can fire global events as of now if asked to 13475 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 13476 fireGlobals = jQuery.event && s.global; 13477 13478 // Watch for a new set of requests 13479 if ( fireGlobals && jQuery.active++ === 0 ) { 13480 jQuery.event.trigger( "ajaxStart" ); 13481 } 13482 13483 // Uppercase the type 13484 s.type = s.type.toUpperCase(); 13485 13486 // Determine if request has content 13487 s.hasContent = !rnoContent.test( s.type ); 13488 13489 // Save the URL in case we're toying with the If-Modified-Since 13490 // and/or If-None-Match header later on 13491 cacheURL = s.url; 13492 13493 // More options handling for requests with no content 13494 if ( !s.hasContent ) { 13495 13496 // If data is available, append data to url 13497 if ( s.data ) {
13498 cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); 13499 13500 // #9682: remove data so that it's not used in an eventual retry 13501 delete s.data; 13502 } 13503 13504 // Add anti-cache in url if needed 13505 if ( s.cache === false ) { 13506 s.url = rts.test( cacheURL ) ? 13507 13508 // If there is already a '_' parameter, set its value 13509 cacheURL.replace( rts, "$1_=" + nonce++ ) : 13510 13511 // Otherwise add one to the end 13512 cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; 13513 } 13514 } 13515 13516 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 13517 if ( s.ifModified ) { 13518 if ( jQuery.lastModified[ cacheURL ] ) { 13519 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 13520 } 13521 if ( jQuery.etag[ cacheURL ] ) { 13522 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 13523 } 13524 } 13525 13526 // Set the correct header, if data is being sent 13527 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 13528 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 13529 } 13530 13531 // Set the Accepts header for the server, depending on the dataType 13532 jqXHR.setRequestHeader( 13533 "Accept", 13534 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? 13535 s.accepts[ s.dataTypes[ 0 ] ] + 13536 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 13537 s.accepts[ "*" ] 13538 ); 13539 13540 // Check for headers option 13541 for ( i in s.headers ) { 13542 jqXHR.setRequestHeader( i, s.headers[ i ] ); 13543 } 13544 13545 // Allow custom headers/mimetypes and early abort 13546 if ( s.beforeSend && 13547 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { 13548 13549 // Abort if not done already and return 13550 return jqXHR.abort(); 13551 } 13552 13553 // aborting is no longer a cancellation 13554 strAbort = "abort"; 13555 13556 // Install callbacks on deferreds 13557 for ( i in { success: 1, error: 1, complete: 1 } ) { 13558 jqXHR[ i ]( s[ i ] ); 13559 } 13560 13561 // Get transport 13562 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 13563 13564 // If no transport, we auto-abort 13565 if ( !transport ) { 13566 done( -1, "No Transport" ); 13567 } else { 13568 jqXHR.readyState = 1; 13569 13570 // Send global event 13571 if ( fireGlobals ) { 13572 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 13573 } 13574 13575 // If request was aborted inside ajaxSend, stop there 13576 if ( state === 2 ) { 13577 return jqXHR; 13578 } 13579 13580 // Timeout 13581 if ( s.async && s.timeout > 0 ) { 13582 timeoutTimer = window.setTimeout( function() { 13583 jqXHR.abort( "timeout" ); 13584 }, s.timeout ); 13585 } 13586 13587 try { 13588 state = 1; 13589 transport.send( requestHeaders, done ); 13590 } catch ( e ) { 13591 13592 // Propagate exception as error if not done 13593 if ( state < 2 ) { 13594 done( -1, e ); 13595 13596 // Simply rethrow otherwise 13597 } else { 13598 throw e; 13599 } 13600 } 13601 } 13602 13603 // Callback for when everything is done 13604 function done( status, nativeStatusText, responses, headers ) { 13605 var isSuccess, success, error, response, modified, 13606 statusText = nativeStatusText; 13607 13608 // Called once 13609 if ( state === 2 ) { 13610 return; 13611 } 13612 13613 // State is "done" now 13614 state = 2; 13615 13616 // Clear timeout if it exists 13617 if ( timeoutTimer ) { 13618 window.clearTimeout( timeoutTimer ); 13619 } 13620 13621 // Dereference transport for early garbage collection 13622 // (no matter how long the jqXHR object will be used) 13623 transport = undefined; 13624 13625 // Cache response headers 13626 responseHeadersString = headers || ""; 13627 13628 // Set readyState 13629 jqXHR.readyState = status > 0 ? 4 : 0; 13630 13631 // Determine if successful 13632 isSuccess = status >= 200 && status < 300 || status === 304; 13633 13634 // Get response data 13635 if ( responses ) { 13636 response = ajaxHandleResponses( s, jqXHR, responses ); 13637 } 13638 13639 // Convert no matter what (that way responseXXX fields are always set) 13640 response = ajaxConvert( s, response, jqXHR, isSuccess ); 13641 13642 // If successful, handle type chaining 13643 if ( isSuccess ) { 13644 13645 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 13646 if ( s.ifModified ) { 13647 modified = jqXHR.getResponseHeader( "Last-Modified" ); 13648 if ( modified ) { 13649 jQuery.lastModified[ cacheURL ] = modified; 13650 } 13651 modified = jqXHR.getResponseHeader( "etag" ); 13652 if ( modified ) { 13653 jQuery.etag[ cacheURL ] = modified; 13654 } 13655 } 13656 13657 // if no content 13658 if ( status === 204 || s.type === "HEAD" ) { 13659 statusText = "nocontent"; 13660 13661 // if not modified 13662 } else if ( status === 304 ) { 13663 statusText = "notmodified"; 13664 13665 // If we have data, let's convert it 13666 } else { 13667 statusText = response.state; 13668 success = response.data; 13669 error = response.error; 13670 isSuccess = !error; 13671 } 13672 } else { 13673 13674 // We extract error from statusText 13675 // then normalize statusText and status for non-aborts 13676 error = statusText; 13677 if ( status || !statusText ) { 13678 statusText = "error"; 13679 if ( status < 0 ) { 13680 status = 0; 13681 } 13682 } 13683 } 13684 13685 // Set data for the fake xhr object 13686 jqXHR.status = status; 13687 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 13688 13689 // Success/Error 13690 if ( isSuccess ) { 13691 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 13692 } else { 13693 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 13694 } 13695 13696 // Status-dependent callbacks 13697 jqXHR.statusCode( statusCode ); 13698 statusCode = undefined; 13699 13700 if ( fireGlobals ) { 13701 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 13702 [ jqXHR, s, isSuccess ? success : error ] ); 13703 } 13704 13705 // Complete 13706 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 13707 13708 if ( fireGlobals ) { 13709 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 13710 13711 // Handle the global AJAX counter 13712 if ( !( --jQuery.active ) ) { 13713 jQuery.event.trigger( "ajaxStop" ); 13714 } 13715 } 13716 } 13717 13718 return jqXHR; 13719 }, 13720 13721 getJSON: function( url, data, callback ) { 13722 return jQuery.get( url, data, callback, "json" ); 13723 }, 13724 13725 getScript: function( url, callback ) { 13726 return jQuery.get( url, undefined, callback, "script" ); 13727 } 13728 } ); 13729 13730 jQuery.each( [ "get", "post" ], function( i, method ) { 13731 jQuery[ method ] = function( url, data, callback, type ) { 13732 13733 // shift arguments if data argument was omitted 13734 if ( jQuery.isFunction( data ) ) { 13735 type = type || callback; 13736 callback = data; 13737 data = undefined; 13738 } 13739 13740 // The url can be an options object (which then must have .url) 13741 return jQuery.ajax( jQuery.extend( { 13742 url: url, 13743 type: method, 13744 dataType: type, 13745 data: data, 13746 success: callback 13747 }, jQuery.isPlainObject( url ) && url ) ); 13748 }; 13749 } ); 13750 13751 13752 jQuery._evalUrl = function( url ) { 13753 return jQuery.ajax( { 13754 url: url, 13755 13756 // Make this explicit, since user can override this through ajaxSetup (#11264) 13757 type: "GET", 13758 dataType: "script", 13759 cache: true, 13760 async: false, 13761 global: false, 13762 "throws": true 13763 } ); 13764 }; 13765 13766 13767 jQuery.fn.extend( { 13768 wrapAll: function( html ) { 13769 if ( jQuery.isFunction( html ) ) { 13770 return this.each( function( i ) { 13771 jQuery( this ).wrapAll( html.call( this, i ) ); 13772 } ); 13773 } 13774 13775 if ( this[ 0 ] ) { 13776 13777 // The elements to wrap the target around 13778 var wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 13779 13780 if ( this[ 0 ].parentNode ) { 13781 wrap.insertBefore( this[ 0 ] ); 13782 } 13783 13784 wrap.map( function() { 13785 var elem = this; 13786 13787 while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { 13788 elem = elem.firstChild; 13789 } 13790 13791 return elem; 13792 } ).append( this ); 13793 } 13794 13795 return this; 13796 }, 13797 13798 wrapInner: function( html ) { 13799 if ( jQuery.isFunction( html ) ) { 13800 return this.each( function( i ) { 13801 jQuery( this ).wrapInner( html.call( this, i ) ); 13802 } ); 13803 } 13804 13805 return this.each( function() { 13806 var self = jQuery( this ), 13807 contents = self.contents(); 13808 13809 if ( contents.length ) { 13810 contents.wrapAll( html ); 13811 13812 } else { 13813 self.append( html ); 13814 } 13815 } ); 13816 }, 13817 13818 wrap: function( html ) { 13819 var isFunction = jQuery.isFunction( html ); 13820 13821 return this.each( function( i ) { 13822 jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); 13823 } ); 13824 }, 13825 13826 unwrap: function() { 13827 return this.parent().each( function() { 13828 if ( !jQuery.nodeName( this, "body" ) ) { 13829 jQuery( this ).replaceWith( this.childNodes ); 13830 } 13831 } ).end(); 13832 } 13833 } ); 13834 13835 13836 function getDisplay( elem ) { 13837 return elem.style && elem.style.display || jQuery.css( elem, "dis
13837play" ); 13838 } 13839 13840 function filterHidden( elem ) { 13841 13842 // Disconnected elements are considered hidden 13843 if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) { 13844 return true; 13845 } 13846 while ( elem && elem.nodeType === 1 ) { 13847 if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) { 13848 return true; 13849 } 13850 elem = elem.parentNode; 13851 } 13852 return false; 13853 } 13854 13855 jQuery.expr.filters.hidden = function( elem ) { 13856 13857 // Support: Opera <= 12.12 13858 // Opera reports offsetWidths and offsetHeights less than zero on some elements 13859 return support.reliableHiddenOffsets() ? 13860 ( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 && 13861 !elem.getClientRects().length ) : 13862 filterHidden( elem ); 13863 }; 13864 13865 jQuery.expr.filters.visible = function( elem ) { 13866 return !jQuery.expr.filters.hidden( elem ); 13867 }; 13868 13869 13870 13871 13872 var r20 = /%20/g, 13873 rbracket = /\[\]$/, 13874 rCRLF = /\r?\n/g, 13875 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 13876 rsubmittable = /^(?:input|select|textarea|keygen)/i; 13877 13878 function buildParams( prefix, obj, traditional, add ) { 13879 var name; 13880 13881 if ( jQuery.isArray( obj ) ) { 13882 13883 // Serialize array item. 13884 jQuery.each( obj, function( i, v ) { 13885 if ( traditional || rbracket.test( prefix ) ) { 13886 13887 // Treat each array item as a scalar. 13888 add( prefix, v ); 13889 13890 } else { 13891 13892 // Item is non-scalar (array or object), encode its numeric index. 13893 buildParams( 13894 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 13895 v, 13896 traditional, 13897 add 13898 ); 13899 } 13900 } ); 13901 13902 } else if ( !traditional && jQuery.type( obj ) === "object" ) { 13903 13904 // Serialize object item. 13905 for ( name in obj ) { 13906 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 13907 } 13908 13909 } else { 13910 13911 // Serialize scalar item. 13912 add( prefix, obj ); 13913 } 13914 } 13915 13916// Serialize an array of form elements or a set of 13917// key/values into a query string 13918 jQuery.param = function( a, traditional ) { 13919 var prefix, 13920 s = [], 13921 add = function( key, value ) { 13922 13923 // If value is a function, invoke it and return its value 13924 value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); 13925 s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); 13926 }; 13927 13928 // Set traditional to true for jQuery <= 1.3.2 behavior. 13929 if ( traditional === undefined ) { 13930 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 13931 } 13932 13933 // If an array was passed in, assume that it is an array of form elements. 13934 if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 13935 13936 // Serialize the form elements 13937 jQuery.each( a, function() { 13938 add( this.name, this.value ); 13939 } ); 13940 13941 } else { 13942 13943 // If traditional, encode the "old" way (the way 1.3.2 or older 13944 // did it), otherwise encode params recursively. 13945 for ( prefix in a ) { 13946 buildParams( prefix, a[ prefix ], traditional, add ); 13947 } 13948 } 13949 13950 // Return the resulting serialization 13951 return s.join( "&" ).replace( r20, "+" ); 13952 }; 13953 13954 jQuery.fn.extend( { 13955 serialize: function() { 13956 return jQuery.param( this.serializeArray() ); 13957 }, 13958 serializeArray: function() { 13959 return this.map( function() { 13960 13961 // Can add propHook for "elements" to filter or add form elements 13962 var elements = jQuery.prop( this, "elements" ); 13963 return elements ? jQuery.makeArray( elements ) : this; 13964 } ) 13965 .filter( function() { 13966 var type = this.type; 13967 13968 // Use .is(":disabled") so that fieldset[disabled] works 13969 return this.name && !jQuery( this ).is( ":disabled" ) && 13970 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 13971 ( this.checked || !rcheckableType.test( type ) ); 13972 } ) 13973 .map( function( i, elem ) { 13974 var val = jQuery( this ).val(); 13975 13976 return val == null ? 13977 null : 13978 jQuery.isArray( val ) ? 13979 jQuery.map( val, function( val ) { 13980 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 13981 } ) : 13982 { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 13983 } ).get(); 13984 } 13985 } ); 13986 13987 13988// Create the request object 13989// (This is still attached to ajaxSettings for backward compatibility) 13990 jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ? 13991
13992 // Support: IE6-IE8 13993 function() { 13994 13995 // XHR cannot access local files, always use ActiveX for that case 13996 if ( this.isLocal ) { 13997 return createActiveXHR(); 13998 } 13999 14000 // Support: IE 9-11 14001 // IE seems to error on cross-domain PATCH requests when ActiveX XHR 14002 // is used. In IE 9+ always use the native XHR. 14003 // Note: this condition won't catch Edge as it doesn't define 14004 // document.documentMode but it also doesn't support ActiveX so it won't 14005 // reach this code. 14006 if ( document.documentMode > 8 ) { 14007 return createStandardXHR(); 14008 } 14009 14010 // Support: IE<9 14011 // oldIE XHR does not support non-RFC2616 methods (#13240) 14012 // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx 14013 // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9 14014 // Although this check for six methods instead of eight 14015 // since IE also does not support "trace" and "connect" 14016 return /^(get|post|head|put|delete|options)$/i.test( this.type ) && 14017 createStandardXHR() || createActiveXHR(); 14018 } : 14019 14020 // For all other browsers, use the standard XMLHttpRequest object 14021 createStandardXHR; 14022 14023 var xhrId = 0, 14024 xhrCallbacks = {}, 14025 xhrSupported = jQuery.ajaxSettings.xhr(); 14026 14027// Support: IE<10 14028// Open requests must be manually aborted on unload (#5280) 14029// See https://support.microsoft.com/kb/2856746 for more info 14030 if ( window.attachEvent ) { 14031 window.attachEvent( "onunload", function() { 14032 for ( var key in xhrCallbacks ) { 14033 xhrCallbacks[ key ]( undefined, true ); 14034 } 14035 } ); 14036 } 14037 14038// Determine support properties 14039 support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 14040 xhrSupported = support.ajax = !!xhrSupported; 14041 14042// Create transport if the browser can provide an xhr 14043 if ( xhrSupported ) { 14044 14045 jQuery.ajaxTransport( function( options ) { 14046 14047 // Cross domain only allowed if supported through XMLHttpRequest 14048 if ( !options.crossDomain || support.cors ) { 14049 14050 var callback; 14051 14052 return { 14053 send: function( headers, complete ) { 14054 var i, 14055 xhr = options.xhr(), 14056 id = ++xhrId; 14057 14058 // Open the socket 14059 xhr.open( 14060 options.type, 14061 options.url, 14062 options.async, 14063 options.username, 14064 options.password 14065 ); 14066 14067 // Apply custom fields if provided 14068 if ( options.xhrFields ) { 14069 for ( i in options.xhrFields ) { 14070 xhr[ i ] = options.xhrFields[ i ]; 14071 } 14072 } 14073 14074 // Override mime type if needed 14075 if ( options.mimeType && xhr.overrideMimeType ) { 14076 xhr.overrideMimeType( options.mimeType ); 14077 } 14078 14079 // X-Requested-With header 14080 // For cross-domain requests, seeing as conditions for a preflight are 14081 // akin to a jigsaw puzzle, we simply never set it to be sure. 14082 // (it can always be set on a per-request basis or even using ajaxSetup)
14083 // For same-domain requests, won't change header if already provided. 14084 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 14085 headers[ "X-Requested-With" ] = "XMLHttpRequest"; 14086 } 14087 14088 // Set headers 14089 for ( i in headers ) { 14090 14091 // Support: IE<9 14092 // IE's ActiveXObject throws a 'Type Mismatch' exception when setting 14093 // request header to a null-value. 14094 // 14095 // To keep consistent with other XHR implementations, cast the value 14096 // to string and ignore `undefined`. 14097 if ( headers[ i ] !== undefined ) { 14098 xhr.setRequestHeader( i, headers[ i ] + "" ); 14099 } 14100 } 14101 14102 // Do send the request 14103 // This may raise an exception which is actually 14104 // handled in jQuery.ajax (so no try/catch here) 14105 xhr.send( ( options.hasContent && options.data ) || null ); 14106 14107 // Listener 14108 callback = function( _, isAbort ) { 14109 var status, statusText, responses; 14110 14111 // Was never called and is aborted or complete 14112 if ( callback && ( isAbort || xhr.readyState === 4 ) ) { 14113 14114 // Clean up 14115 delete xhrCallbacks[ id ]; 14116 callback = undefined; 14117 xhr.onreadystatechange = jQuery.noop; 14118 14119 // Abort manually if needed 14120 if ( isAbort ) { 14121 if ( xhr.readyState !== 4 ) { 14122 xhr.abort(); 14123 } 14124 } else { 14125 responses = {}; 14126 status = xhr.status; 14127 14128 // Support: IE<10 14129 // Accessing binary-data responseText throws an exception 14130 // (#11426) 14131 if ( typeof xhr.responseText === "string" ) { 14132 responses.text = xhr.responseText; 14133 } 14134 14135 // Firefox throws an exception when accessing 14136 // statusText for faulty cross-domain requests 14137 try { 14138 statusText = xhr.statusText; 14139 } catch ( e ) { 14140 14141 // We normalize with Webkit giving an empty statusText 14142 statusText = ""; 14143 } 14144 14145 // Filter status for non standard behaviors 14146 14147 // If the request is local and we have data: assume a success 14148 // (success with no data won't get notified, that's the best we 14149 // can do given current implementations) 14150 if ( !status && options.isLocal && !options.crossDomain ) { 14151 status = responses.text ? 200 : 404; 14152 14153 // IE - #1450: sometimes returns 1223 when it should be 204 14154 } else if ( status === 1223 ) { 14155 status = 204; 14156 } 14157 } 14158 } 14159 14160 // Call complete if needed 14161 if ( responses ) { 14162 complete( status, statusText, responses, xhr.getAllResponseHeaders() ); 14163 } 14164 }; 14165 14166 // Do send the request 14167 // `xhr.send` may raise an exception, but it will be 14168 // handled in jQuery.ajax (so no try/catch here) 14169 if ( !options.async ) { 14170 14171 // If we're in sync mode we fire the callback 14172 callback(); 14173 } else if ( xhr.readyState === 4 ) { 14174 14175 // (IE6 & IE7) if it's in cache and has been 14176 // retrieved directly we need to fire the callback 14177 window.setTimeout( callback ); 14178 } else { 14179 14180 // Register the callback, but delay it in case `xhr.send` throws 14181 // Add to the list of active xhr callbacks 14182 xhr.onreadystatechange = xhrCallbacks[ id ] = callback; 14183 } 14184 }, 14185 14186 abort: function() { 14187 if ( callback ) { 14188 callback( undefined, true ); 14189 } 14190 } 14191 }; 14192 } 14193 } ); 14194 } 14195 14196// Functions to create xhrs 14197 function createStandardXHR() { 14198 try { 14199 return new window.XMLHttpRequest(); 14200 } catch ( e ) {} 14201 } 14202 14203 function createActiveXHR() { 14204 try { 14205 return new window.ActiveXObject( "Microsoft.XMLHTTP" ); 14206 } catch ( e ) {} 14207 } 14208 14209 14210 14211 14212// Install script dataType 14213 jQuery.ajaxSetup( { 14214 accepts: { 14215 script: "text/javascript, application/javascript, " + 14216 "application/ecmascript, application/x-ecmascript" 14217 }, 14218 contents: { 14219 script: /\b(?:java|ecma)script\b/ 14220 }, 14221 converters: { 14222 "text script": function( text ) { 14223 jQuery.globalEval( text ); 14224 return text; 14225 } 14226 } 14227 } ); 14228 14229// Handle cache's special case and global 14230 jQuery.ajaxPrefilter( "script", function( s ) { 14231 if ( s.cache === undefined ) { 14232 s.cache = false;
14233 } 14234 if ( s.crossDomain ) { 14235 s.type = "GET"; 14236 s.global = false; 14237 } 14238 } ); 14239 14240// Bind script tag hack transport 14241 jQuery.ajaxTransport( "script", function( s ) { 14242 14243 // This transport only deals with cross domain requests 14244 if ( s.crossDomain ) { 14245 14246 var script, 14247 head = document.head || jQuery( "head" )[ 0 ] || document.documentElement; 14248 14249 return { 14250 14251 send: function( _, callback ) { 14252 14253 script = document.createElement( "script" ); 14254 14255 script.async = true; 14256 14257 if ( s.scriptCharset ) { 14258 script.charset = s.scriptCharset; 14259 } 14260 14261 script.src = s.url; 14262 14263 // Attach handlers for all browsers 14264 script.onload = script.onreadystatechange = function( _, isAbort ) { 14265 14266 if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { 14267 14268 // Handle memory leak in IE 14269 script.onload = script.onreadystatechange = null; 14270 14271 // Remove the script 14272 if ( script.parentNode ) { 14273 script.parentNode.removeChild( script ); 14274 } 14275 14276 // Dereference the script 14277 script = null; 14278 14279 // Callback if not abort 14280 if ( !isAbort ) { 14281 callback( 200, "success" ); 14282 } 14283 } 14284 }; 14285 14286 // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending 14287 // Use native DOM manipulation to avoid our domManip AJAX trickery 14288 head.insertBefore( script, head.firstChild ); 14289 }, 14290 14291 abort: function() { 14292 if ( script ) { 14293 script.onload( undefined, true ); 14294 } 14295 } 14296 }; 14297 } 14298 } ); 14299 14300 14301 14302 14303 var oldCallbacks = [], 14304 rjsonp = /(=)\?(?=&|$)|\?\?/; 14305 14306// Default jsonp settings 14307 jQuery.ajaxSetup( { 14308 jsonp: "callback", 14309 jsonpCallback: function() { 14310 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 14311 this[ callback ] = true; 14312 return callback; 14313 } 14314 } ); 14315 14316// Detect, normalize options and install callbacks for jsonp requests 14317 jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 14318 14319 var callbackName, overwritten, responseContainer, 14320 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 14321 "url" : 14322 typeof s.data === "string" && 14323 ( s.contentType || "" ) 14324 .indexOf( "application/x-www-form-urlencoded" ) === 0 && 14325 rjsonp.test( s.data ) && "data" 14326 ); 14327 14328 // Handle iff the expected data type is "jsonp" or we have a parameter to set 14329 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 14330 14331 // Get callback name, remembering preexisting value associated with it 14332 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 14333 s.jsonpCallback() : 14334 s.jsonpCallback; 14335 14336 // Insert callback into url or form data 14337 if ( jsonProp ) { 14338 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 14339 } else if ( s.jsonp !== false ) { 14340 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 14341 } 14342 14343 // Use data converter to retrieve json after script execution 14344 s.converters[ "script json" ] = function() { 14345 if ( !responseContainer ) { 14346 jQuery.error( callbackName + " was not called" ); 14347 } 14348 return responseContainer[ 0 ]; 14349 }; 14350 14351 // force json dataType 14352 s.dataTypes[ 0 ] = "json"; 14353 14354 // Install callback 14355 overwritten = window[ callbackName ]; 14356 window[ callbackName ] = function() { 14357 responseContainer = arguments; 14358 }; 14359 14360 // Clean-up function (fires after converters) 14361 jqXHR.always( function() { 14362 14363 // If previous value didn't exist - remove it 14364 if ( overwritten === undefined ) { 14365 jQuery( window ).removeProp( callbackName ); 14366 14367 // Otherwise restore preexisting value 14368 } else { 14369 window[ callbackName ] = overwritten; 14370 } 14371 14372 // Save back as free 14373 if ( s[ callbackName ] ) { 14374 14375 // make sure that re-using the options doesn't screw things around 14376 s.jsonpCallback = originalSettings.jsonpCallback; 14377 14378 // save the callback name for future use 14379 oldCallbacks.push( callbackName ); 14380 } 14381 14382 // Call if it was a function and we have a response 14383 if ( responseContainer && jQuery.isFunction( overwritten ) ) { 14384 overwritten( responseContainer[ 0 ] ); 14385 } 14386 14387 responseContainer = overwritten = undefined; 14388 } ); 14389 14390 // Delegate to script 14391 return "script"; 14392 } 14393 } ); 14394 14395 14396 14397 14398// data: string of html 14399// context (optional): If specified, the fragment will be created in this context, 14400// defaults to document 14401// keepScripts (optional): If true, will include scripts passed in the html string 14402 jQuery.parseHTML = function( data, context, keepScripts ) { 14403 if ( !data || typeof data !== "string" ) { 14404 return null; 14405 } 14406 if ( typeof context === "boolean" ) { 14407 keepScripts = context; 14408 context = false;
14409 } 14410 context = context || document; 14411 14412 var parsed = rsingleTag.exec( data ), 14413 scripts = !keepScripts && []; 14414 14415 // Single tag 14416 if ( parsed ) { 14417 return [ context.createElement( parsed[ 1 ] ) ]; 14418 } 14419 14420 parsed = buildFragment( [ data ], context, scripts ); 14421 14422 if ( scripts && scripts.length ) { 14423 jQuery( scripts ).remove(); 14424 } 14425 14426 return jQuery.merge( [], parsed.childNodes ); 14427 }; 14428 14429 14430// Keep a copy of the old load method 14431 var _load = jQuery.fn.load; 14432 14433 /** 14434 * Load a url into a page 14435 */ 14436 jQuery.fn.load = function( url, params, callback ) { 14437 if ( typeof url !== "string" && _load ) { 14438 return _load.apply( this, arguments ); 14439 } 14440 14441 var selector, type, response, 14442 self = this, 14443 off = url.indexOf( " " ); 14444 14445 if ( off > -1 ) { 14446 selector = jQuery.trim( url.slice( off, url.length ) ); 14447 url = url.slice( 0, off ); 14448 } 14449 14450 // If it's a function 14451 if ( jQuery.isFunction( params ) ) { 14452 14453 // We assume that it's the callback 14454 callback = params; 14455 params = undefined; 14456 14457 // Otherwise, build a param string 14458 } else if ( params && typeof params === "object" ) { 14459 type = "POST"; 14460 } 14461 14462 // If we have elements to modify, make the request 14463 if ( self.length > 0 ) { 14464 jQuery.ajax( { 14465 url: url, 14466 14467 // If "type" variable is undefined, then "GET" method will be used. 14468 // Make value of this field explicit since 14469 // user can override it through ajaxSetup method 14470 type: type || "GET", 14471 dataType: "html", 14472 data: params 14473 } ).done( function( responseText ) { 14474 14475 // Save response for use in complete callback 14476 response = arguments; 14477 14478 self.html( selector ? 14479 14480 // If a selector was specified, locate the right elements in a dummy div 14481 // Exclude scripts to avoid IE 'Permission Denied' errors 14482 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 14483 14484 // Otherwise use the full result 14485 responseText ); 14486 14487 // If the request succeeds, this function gets "data", "status", "jqXHR" 14488 // but they are ignored because response was set above. 14489 // If it fails, this function gets "jqXHR", "status", "error" 14490 } ).always( callback && function( jqXHR, status ) { 14491 self.each( function() { 14492 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 14493 } ); 14494 } ); 14495 } 14496 14497 return this; 14498 }; 14499 14500 14501 14502 14503// Attach a bunch of functions for handling common AJAX events 14504 jQuery.each( [ 14505 "ajaxStart", 14506 "ajaxStop", 14507 "ajaxComplete", 14508 "ajaxError", 14509 "ajaxSuccess", 14510 "ajaxSend" 14511 ], function( i, type ) { 14512 jQuery.fn[ type ] = function( fn ) { 14513 return this.on( type, fn ); 14514 }; 14515 } ); 14516 14517 14518 14519 14520 jQuery.expr.filters.animated = function( elem ) { 14521 return jQuery.grep( jQuery.timers, function( fn ) { 14522 return elem === fn.elem; 14523 } ).length; 14524 }; 14525 14526 14527 14528 14529 14530 /** 14531 * Gets a window from an element 14532 */ 14533 function getWindow( elem ) { 14534 return jQuery.isWindow( elem ) ? 14535 elem : 14536 elem.nodeType === 9 ? 14537 elem.defaultView || elem.parentWindow : 14538 false; 14539 } 14540 14541 jQuery.offset = { 14542 setOffset: function( elem, options, i ) { 14543 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 14544 position = jQuery.css( elem, "position" ), 14545 curElem = jQuery( elem ), 14546 props = {}; 14547 14548 // set position first, in-case top/left are set even on static elem 14549 if ( position === "static" ) { 14550 elem.style.position = "relative"; 14551 } 14552 14553 curOffset = curElem.offset(); 14554 curCSSTop = jQuery.css( elem, "top" ); 14555 curCSSLeft = jQuery.css( elem, "left" ); 14556 calculatePosition = ( position === "absolute" || position === "fixed" ) && 14557 jQuery.inArray( "auto", [ curCSSTop, curCSSLeft ] ) > -1; 14558 14559 // need to be able to calculate position if either top or left 14560 // is auto and position is either absolute or fixed 14561 if ( calculatePosition ) { 14562 curPosition = curElem.position(); 14563 curTop = curPosition.top; 14564 curLeft = curPosition.left; 14565 } else { 14566 curTop = parseFloat( curCSSTop ) || 0; 14567 curLeft = parseFloat( curCSSLeft ) || 0; 14568 } 14569 14570 if ( jQuery.isFunction( options ) ) { 14571 14572 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 14573 options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 14574 } 14575 14576 if ( options.top != null ) { 14577 props.top = ( options.top - curOffset.top ) + curTop; 14578 } 14579 if ( options.left != null ) { 14580 props.left = ( options.left - curOffset.left ) + curLeft; 14581 } 14582 14583 if ( "using" in options ) { 14584 options.using.call( elem, props ); 14585 } else { 14586 curElem.css( props ); 14587 } 14588 } 14589 }; 14590 14591 jQuery.fn.extend( { 14592 offset: function( options ) { 14593 if ( arguments.length ) { 14594 return options === undefined ? 14595 this : 14596 this.each( function( i ) { 14597 jQuery.offset.setOffset( this, options, i ); 14598 } ); 14599 } 14600 14601 var docElem, win, 14602 box = { top: 0, left: 0 }, 14603 elem = this[ 0 ], 14604 doc = elem && elem.ownerDocument; 14605 14606 if ( !doc ) { 14607 return; 14608 } 14609 14610 docElem = doc.documentElement; 14611 14612 // Make sure it's not a disconnected DOM node 14613 if ( !jQuery.contains( docElem, elem ) ) { 14614 return box; 14615 } 14616 14617 // If we don't have gBCR, just use 0,0 rather than error 14618 // BlackBerry 5, iOS 3 (original iPhone) 14619 if ( typeof elem.getBoundingClientRect !== "undefined" ) { 14620 box = elem.getBoundingClientRect(); 14621 } 14622 win = getWindow( doc ); 14623 return { 14624 top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), 14625 left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) 14626 }; 14627 }, 14628 14629 position: function() { 14630 if ( !this[ 0 ] ) { 14631 return; 14632 } 14633 14634 var offsetParent, offset, 14635 parentOffset = { top: 0, left: 0 }, 14636 elem = this[ 0 ]; 14637 14638 // Fixed elements are offset from window (parentOffset = {top:0, left
14638: 0}, 14639 // because it is its only offset parent 14640 if ( jQuery.css( elem, "position" ) === "fixed" ) { 14641 14642 // we assume that getBoundingClientRect is available when computed position is fixed 14643 offset = elem.getBoundingClientRect(); 14644 } else { 14645 14646 // Get *real* offsetParent 14647 offsetParent = this.offsetParent(); 14648 14649 // Get correct offsets 14650 offset = this.offset(); 14651 if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { 14652 parentOffset = offsetParent.offset(); 14653 } 14654 14655 // Add offsetParent borders 14656 parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); 14657 parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); 14658 } 14659 14660 // Subtract parent offsets and element margins 14661 // note: when an element has margin: auto the offsetLeft and marginLeft 14662 // are the same in Safari causing offset.left to incorrectly be 0 14663 return { 14664 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 14665 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 14666 }; 14667 }, 14668 14669 offsetParent: function() { 14670 return this.map( function() { 14671 var offsetParent = this.offsetParent; 14672 14673 while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && 14674 jQuery.css( offsetParent, "position" ) === "static" ) ) { 14675 offsetParent = offsetParent.offsetParent; 14676 } 14677 return offsetParent || documentElement; 14678 } ); 14679 } 14680 } ); 14681 14682// Create scrollLeft and scrollTop methods 14683 jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 14684 var top = /Y/.test( prop ); 14685 14686 jQuery.fn[ method ] = function( val ) { 14687 return access( this, function( elem, method, val ) { 14688 var win = getWindow( elem ); 14689 14690 if ( val === undefined ) { 14691 return win ? ( prop in win ) ? win[ prop ] : 14692 win.document.documentElement[ method ] : 14693 elem[ method ]; 14694 } 14695 14696 if ( win ) { 14697 win.scrollTo( 14698 !top ? val : jQuery( win ).scrollLeft(), 14699 top ? val : jQuery( win ).scrollTop() 14700 ); 14701 14702 } else { 14703 elem[ method ] = val; 14704 } 14705 }, method, val, arguments.length, null ); 14706 }; 14707 } ); 14708 14709// Support: Safari<7-8+, Chrome<37-44+ 14710// Add the top/left cssHooks using jQuery.fn.position 14711// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 14712// getComputedStyle returns percent when specified for top/left/bottom/right 14713// rather than make the css module depend on the offset module, we just check for it here 14714 jQuery.each( [ "top", "left" ], function( i, prop ) { 14715 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 14716 function( elem, computed ) { 14717 if ( computed ) { 14718 computed = curCSS( elem, prop ); 14719 14720 // if curCSS returns percentage, fallback to offset 14721 return rnumnonpx.test( computed ) ? 14722 jQuery( elem ).position()[ prop ] + "px" : 14723 computed; 14724 } 14725 } 14726 ); 14727 } ); 14728 14729 14730// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 14731 jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 14732 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, 14733 function( defaultExtra, funcName ) { 14734 14735 // margin is only for outerHeight, outerWidth 14736 jQuery.fn[ funcName ] = function( margin, value ) { 14737 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 14738 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 14739 14740 return access( this, function( elem, type, value ) { 14741 var doc; 14742 14743 if ( jQuery.isWindow( elem ) ) { 14744 14745 // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 14746 // isn't a whole lot we can do. See pull request at this URL for discussion: 14747 // https://github.com/jquery/jquery/pull/764 14748 return elem.document.documentElement[ "client" + name ]; 14749 } 14750 14751 // Get document width or height 14752 if ( elem.nodeType === 9 ) { 14753 doc = elem.documentElement; 14754 14755 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 14756 // whichever is greatest 14757 // unfortunately, this causes bug #3838 in IE6/8 only, 14758 // but there is currently no good, small way to fix it. 14759 return Math.max( 14760 elem.body[ "scroll" + name ], doc[ "scroll" + name ], 14761 elem.body[ "offset" + name ], doc[ "offset" + name ], 14762 doc[ "client" + name ] 14763 ); 14764 } 14765 14766 return value === undefined ? 14767 14768 // Get width or height on the element, requesting but not forcing parseFloat 14769 jQuery.css( elem, type, extra ) : 14770 14771 // Set width or height on the element 14772 jQuery.style( elem, type, value, extra ); 14773 }, type, chainable ? margin : undefined, chainable, null ); 14774 }; 14775 } ); 14776 } ); 14777 14778 14779 jQuery.fn.extend( { 14780 14781 bind: function( types, data, fn ) { 14782 return this.on( types, null, data, fn ); 14783 }, 14784 unbind: function( types, fn ) { 14785 return this.off( types, null, fn ); 14786 }, 14787 14788 delegate: function( selector, types, data, fn ) { 14789 return this.on( types, selector, data, fn ); 14790 }, 14791 undelegate: function( selector, types, fn ) { 14792 14793 // ( namespace ) or ( selector, types [, fn] ) 14794 return arguments.length === 1 ? 14795 this.off( selector, "**" ) : 14796 this.off( types, selector || "**", fn ); 14797 } 14798 } ); 14799 14800// The number of elements contained in the matched element set 14801 jQuery.fn.size = function() { 14802 return this.length; 14803 }; 14804 14805 jQuery.fn.andSelf = jQuery.fn.addBack; 14806 14807 14808 14809 14810// Register as a named AMD module, since jQuery can be concatenated with other 14811// files that may use define, but not via a proper concatenation script that 14812// understands anonymous AMD modules. A named AMD is safest and most robust 14813// way to register. Lowercase jquery is used because AMD module names are 14814// derived from file names, and jQuery is normally delivered in a lowercase 14815// file name. Do this after creating the global so that if an AMD module wants 14816// to call noConflict to hide this version of jQuery, it will work. 14817 14818// Note that for maximum portability, libraries that are not jQuery should 14819// declare themselves as anonymous modules, and avoid setting a global if an 14820// AMD loader is present. jQuery is a special case. For more information, see
14821// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 14822 14823 if ( typeof define === "function" && define.amd ) { 14824 define( "jquery", [], function() { 14825 return jQuery; 14826 } ); 14827 } 14828 14829 14830 14831 var 14832 14833 // Map over jQuery in case of overwrite 14834 _jQuery = window.jQuery, 14835 14836 // Map over the $ in case of overwrite 14837 _$ = window.$; 14838 14839 jQuery.noConflict = function( deep ) { 14840 if ( window.$ === jQuery ) { 14841 window.$ = _$; 14842 } 14843 14844 if ( deep && window.jQuery === jQuery ) { 14845 window.jQuery = _jQuery; 14846 } 14847 14848 return jQuery; 14849 }; 14850 14851// Expose jQuery and $ identifiers, even in 14852// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 14853// and CommonJS for browser emulators (#13566) 14854 if ( !noGlobal ) { 14855 window.jQuery = window.$ = jQuery; 14856 } 14857 14858 return jQuery; 14859}));;
vendor: 36,816 bytes, lines 14859-14865
14859/*! 14860 * Bootstrap v3.3.5 (http://getbootstrap.com) 14861 * Copyright 2011-2015 Twitter, Inc. 14862 * Licensed under the MIT license 14863 */ 14864if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")), 14865d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
vendor: 19,576 bytes, lines 14865-14903
14865;/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 14866(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20, 14867width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"}, 14868keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+ 14869(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 14870openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, 14871isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, 14872c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& 14873k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| 14874b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= 14875setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current; 14876d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= 14877a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), 14878b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><i class="ajax-loader large animate-spin"></i></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), 14879y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; 14880if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&& 14881(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 14882{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, 14883mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= 14884!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); 14885"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= 14886this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); 14887f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, 14888e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, 14889outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", 14890g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": 14891"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? 14892h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| 14893h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&& 14894"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width(); 14895y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&& 14896!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(), 14897b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a= 14898a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())): 14899(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"=== 14900f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c, 14901{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a= 14902b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay= 14903f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());
14903a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? 14904b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), 14905p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"=== 14906f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= 14907b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, 14908e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.o
14908pen(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ 14909":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20=== 14910d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
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.