jquery-rails 4.3.4 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/CHANGELOG.md +14 -0
- data/VERSIONS.md +3 -0
- data/lib/jquery/assert_select.rb +2 -0
- data/lib/jquery/rails/version.rb +2 -2
- data/test/assert_select_jquery_test.rb +6 -0
- data/vendor/assets/javascripts/jquery3.js +876 -583
- data/vendor/assets/javascripts/jquery3.min.js +2 -2
- data/vendor/assets/javascripts/jquery3.min.map +1 -1
- metadata +6 -6
@@ -1,15 +1,15 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v3.
|
2
|
+
* jQuery JavaScript Library v3.6.0
|
3
3
|
* https://jquery.com/
|
4
4
|
*
|
5
5
|
* Includes Sizzle.js
|
6
6
|
* https://sizzlejs.com/
|
7
7
|
*
|
8
|
-
* Copyright
|
8
|
+
* Copyright OpenJS Foundation and other contributors
|
9
9
|
* Released under the MIT license
|
10
10
|
* https://jquery.org/license
|
11
11
|
*
|
12
|
-
* Date:
|
12
|
+
* Date: 2021-03-02T17:08Z
|
13
13
|
*/
|
14
14
|
( function( global, factory ) {
|
15
15
|
|
@@ -47,13 +47,16 @@
|
|
47
47
|
|
48
48
|
var arr = [];
|
49
49
|
|
50
|
-
var document = window.document;
|
51
|
-
|
52
50
|
var getProto = Object.getPrototypeOf;
|
53
51
|
|
54
52
|
var slice = arr.slice;
|
55
53
|
|
56
|
-
var
|
54
|
+
var flat = arr.flat ? function( array ) {
|
55
|
+
return arr.flat.call( array );
|
56
|
+
} : function( array ) {
|
57
|
+
return arr.concat.apply( [], array );
|
58
|
+
};
|
59
|
+
|
57
60
|
|
58
61
|
var push = arr.push;
|
59
62
|
|
@@ -73,12 +76,16 @@ var support = {};
|
|
73
76
|
|
74
77
|
var isFunction = function isFunction( obj ) {
|
75
78
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
// Support: Chrome <=57, Firefox <=52
|
80
|
+
// In some browsers, typeof returns "function" for HTML <object> elements
|
81
|
+
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
82
|
+
// We don't want to classify *any* DOM node as a function.
|
83
|
+
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
|
84
|
+
// Plus for old WebKit, typeof returns "function" for HTML collections
|
85
|
+
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
|
86
|
+
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
87
|
+
typeof obj.item !== "function";
|
88
|
+
};
|
82
89
|
|
83
90
|
|
84
91
|
var isWindow = function isWindow( obj ) {
|
@@ -86,6 +93,8 @@ var isWindow = function isWindow( obj ) {
|
|
86
93
|
};
|
87
94
|
|
88
95
|
|
96
|
+
var document = window.document;
|
97
|
+
|
89
98
|
|
90
99
|
|
91
100
|
var preservedScriptAttributes = {
|
@@ -142,7 +151,7 @@ function toType( obj ) {
|
|
142
151
|
|
143
152
|
|
144
153
|
var
|
145
|
-
version = "3.
|
154
|
+
version = "3.6.0",
|
146
155
|
|
147
156
|
// Define a local copy of jQuery
|
148
157
|
jQuery = function( selector, context ) {
|
@@ -150,11 +159,7 @@ var
|
|
150
159
|
// The jQuery object is actually just the init constructor 'enhanced'
|
151
160
|
// Need init if jQuery is called (just allow error to be thrown if not included)
|
152
161
|
return new jQuery.fn.init( selector, context );
|
153
|
-
}
|
154
|
-
|
155
|
-
// Support: Android <=4.0 only
|
156
|
-
// Make sure we trim BOM and NBSP
|
157
|
-
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
162
|
+
};
|
158
163
|
|
159
164
|
jQuery.fn = jQuery.prototype = {
|
160
165
|
|
@@ -220,6 +225,18 @@ jQuery.fn = jQuery.prototype = {
|
|
220
225
|
return this.eq( -1 );
|
221
226
|
},
|
222
227
|
|
228
|
+
even: function() {
|
229
|
+
return this.pushStack( jQuery.grep( this, function( _elem, i ) {
|
230
|
+
return ( i + 1 ) % 2;
|
231
|
+
} ) );
|
232
|
+
},
|
233
|
+
|
234
|
+
odd: function() {
|
235
|
+
return this.pushStack( jQuery.grep( this, function( _elem, i ) {
|
236
|
+
return i % 2;
|
237
|
+
} ) );
|
238
|
+
},
|
239
|
+
|
223
240
|
eq: function( i ) {
|
224
241
|
var len = this.length,
|
225
242
|
j = +i + ( i < 0 ? len : 0 );
|
@@ -353,9 +370,10 @@ jQuery.extend( {
|
|
353
370
|
return true;
|
354
371
|
},
|
355
372
|
|
356
|
-
// Evaluates a script in a global
|
357
|
-
|
358
|
-
|
373
|
+
// Evaluates a script in a provided context; falls back to the global one
|
374
|
+
// if not specified.
|
375
|
+
globalEval: function( code, options, doc ) {
|
376
|
+
DOMEval( code, { nonce: options && options.nonce }, doc );
|
359
377
|
},
|
360
378
|
|
361
379
|
each: function( obj, callback ) {
|
@@ -379,13 +397,6 @@ jQuery.extend( {
|
|
379
397
|
return obj;
|
380
398
|
},
|
381
399
|
|
382
|
-
// Support: Android <=4.0 only
|
383
|
-
trim: function( text ) {
|
384
|
-
return text == null ?
|
385
|
-
"" :
|
386
|
-
( text + "" ).replace( rtrim, "" );
|
387
|
-
},
|
388
|
-
|
389
400
|
// results is for internal usage only
|
390
401
|
makeArray: function( arr, results ) {
|
391
402
|
var ret = results || [];
|
@@ -394,7 +405,7 @@ jQuery.extend( {
|
|
394
405
|
if ( isArrayLike( Object( arr ) ) ) {
|
395
406
|
jQuery.merge( ret,
|
396
407
|
typeof arr === "string" ?
|
397
|
-
|
408
|
+
[ arr ] : arr
|
398
409
|
);
|
399
410
|
} else {
|
400
411
|
push.call( ret, arr );
|
@@ -472,7 +483,7 @@ jQuery.extend( {
|
|
472
483
|
}
|
473
484
|
|
474
485
|
// Flatten any nested arrays
|
475
|
-
return
|
486
|
+
return flat( ret );
|
476
487
|
},
|
477
488
|
|
478
489
|
// A global GUID counter for objects
|
@@ -489,9 +500,9 @@ if ( typeof Symbol === "function" ) {
|
|
489
500
|
|
490
501
|
// Populate the class2type map
|
491
502
|
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
492
|
-
function(
|
493
|
-
|
494
|
-
} );
|
503
|
+
function( _i, name ) {
|
504
|
+
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
505
|
+
} );
|
495
506
|
|
496
507
|
function isArrayLike( obj ) {
|
497
508
|
|
@@ -511,17 +522,16 @@ function isArrayLike( obj ) {
|
|
511
522
|
}
|
512
523
|
var Sizzle =
|
513
524
|
/*!
|
514
|
-
* Sizzle CSS Selector Engine v2.3.
|
525
|
+
* Sizzle CSS Selector Engine v2.3.6
|
515
526
|
* https://sizzlejs.com/
|
516
527
|
*
|
517
528
|
* Copyright JS Foundation and other contributors
|
518
529
|
* Released under the MIT license
|
519
530
|
* https://js.foundation/
|
520
531
|
*
|
521
|
-
* Date:
|
532
|
+
* Date: 2021-02-16
|
522
533
|
*/
|
523
|
-
(function( window ) {
|
524
|
-
|
534
|
+
( function( window ) {
|
525
535
|
var i,
|
526
536
|
support,
|
527
537
|
Expr,
|
@@ -561,59 +571,70 @@ var i,
|
|
561
571
|
},
|
562
572
|
|
563
573
|
// Instance methods
|
564
|
-
hasOwn = ({}).hasOwnProperty,
|
574
|
+
hasOwn = ( {} ).hasOwnProperty,
|
565
575
|
arr = [],
|
566
576
|
pop = arr.pop,
|
567
|
-
|
577
|
+
pushNative = arr.push,
|
568
578
|
push = arr.push,
|
569
579
|
slice = arr.slice,
|
580
|
+
|
570
581
|
// Use a stripped-down indexOf as it's faster than native
|
571
582
|
// https://jsperf.com/thor-indexof-vs-for/5
|
572
583
|
indexOf = function( list, elem ) {
|
573
584
|
var i = 0,
|
574
585
|
len = list.length;
|
575
586
|
for ( ; i < len; i++ ) {
|
576
|
-
if ( list[i] === elem ) {
|
587
|
+
if ( list[ i ] === elem ) {
|
577
588
|
return i;
|
578
589
|
}
|
579
590
|
}
|
580
591
|
return -1;
|
581
592
|
},
|
582
593
|
|
583
|
-
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|
|
594
|
+
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
|
595
|
+
"ismap|loop|multiple|open|readonly|required|scoped",
|
584
596
|
|
585
597
|
// Regular expressions
|
586
598
|
|
587
599
|
// http://www.w3.org/TR/css3-selectors/#whitespace
|
588
600
|
whitespace = "[\\x20\\t\\r\\n\\f]",
|
589
601
|
|
590
|
-
//
|
591
|
-
identifier = "(
|
602
|
+
// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
|
603
|
+
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
|
604
|
+
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
|
592
605
|
|
593
606
|
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
594
607
|
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
608
|
+
|
595
609
|
// Operator (capture 2)
|
596
610
|
"*([*^$|!~]?=)" + whitespace +
|
597
|
-
|
598
|
-
"
|
599
|
-
|
611
|
+
|
612
|
+
// "Attribute values must be CSS identifiers [capture 5]
|
613
|
+
// or strings [capture 3 or capture 4]"
|
614
|
+
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
|
615
|
+
whitespace + "*\\]",
|
600
616
|
|
601
617
|
pseudos = ":(" + identifier + ")(?:\\((" +
|
618
|
+
|
602
619
|
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
603
620
|
// 1. quoted (capture 3; capture 4 or capture 5)
|
604
621
|
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
622
|
+
|
605
623
|
// 2. simple (capture 6)
|
606
624
|
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
625
|
+
|
607
626
|
// 3. anything else (capture 2)
|
608
627
|
".*" +
|
609
628
|
")\\)|)",
|
610
629
|
|
611
630
|
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
612
631
|
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
613
|
-
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
|
632
|
+
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
|
633
|
+
whitespace + "+$", "g" ),
|
614
634
|
|
615
635
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
616
|
-
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
636
|
+
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
637
|
+
"*" ),
|
617
638
|
rdescend = new RegExp( whitespace + "|>" ),
|
618
639
|
|
619
640
|
rpseudo = new RegExp( pseudos ),
|
@@ -625,14 +646,16 @@ var i,
|
|
625
646
|
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
626
647
|
"ATTR": new RegExp( "^" + attributes ),
|
627
648
|
"PSEUDO": new RegExp( "^" + pseudos ),
|
628
|
-
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
|
629
|
-
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
|
630
|
-
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
649
|
+
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
|
650
|
+
whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
|
651
|
+
whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
631
652
|
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
653
|
+
|
632
654
|
// For use in libraries implementing .is()
|
633
655
|
// We use this for POS matching in `select`
|
634
|
-
"needsContext": new RegExp( "^" + whitespace +
|
635
|
-
|
656
|
+
"needsContext": new RegExp( "^" + whitespace +
|
657
|
+
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
|
658
|
+
"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
636
659
|
},
|
637
660
|
|
638
661
|
rhtml = /HTML$/i,
|
@@ -648,18 +671,21 @@ var i,
|
|
648
671
|
|
649
672
|
// CSS escapes
|
650
673
|
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
651
|
-
runescape = new RegExp( "\\\\
|
652
|
-
funescape = function(
|
653
|
-
var high = "0x" +
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
674
|
+
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
|
675
|
+
funescape = function( escape, nonHex ) {
|
676
|
+
var high = "0x" + escape.slice( 1 ) - 0x10000;
|
677
|
+
|
678
|
+
return nonHex ?
|
679
|
+
|
680
|
+
// Strip the backslash prefix from a non-hex escape sequence
|
681
|
+
nonHex :
|
682
|
+
|
683
|
+
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
684
|
+
// Support: IE <=11+
|
685
|
+
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
686
|
+
// surrogate pair
|
659
687
|
high < 0 ?
|
660
|
-
// BMP codepoint
|
661
688
|
String.fromCharCode( high + 0x10000 ) :
|
662
|
-
// Supplemental Plane codepoint (surrogate pair)
|
663
689
|
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
664
690
|
},
|
665
691
|
|
@@ -675,7 +701,8 @@ var i,
|
|
675
701
|
}
|
676
702
|
|
677
703
|
// Control characters and (dependent upon position) numbers get escaped as code points
|
678
|
-
return ch.slice( 0, -1 ) + "\\" +
|
704
|
+
return ch.slice( 0, -1 ) + "\\" +
|
705
|
+
ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
679
706
|
}
|
680
707
|
|
681
708
|
// Other potentially-special ASCII characters get backslash-escaped
|
@@ -700,18 +727,20 @@ var i,
|
|
700
727
|
// Optimize for push.apply( _, NodeList )
|
701
728
|
try {
|
702
729
|
push.apply(
|
703
|
-
(arr = slice.call( preferredDoc.childNodes )),
|
730
|
+
( arr = slice.call( preferredDoc.childNodes ) ),
|
704
731
|
preferredDoc.childNodes
|
705
732
|
);
|
733
|
+
|
706
734
|
// Support: Android<4.0
|
707
735
|
// Detect silently failing push.apply
|
736
|
+
// eslint-disable-next-line no-unused-expressions
|
708
737
|
arr[ preferredDoc.childNodes.length ].nodeType;
|
709
738
|
} catch ( e ) {
|
710
739
|
push = { apply: arr.length ?
|
711
740
|
|
712
741
|
// Leverage slice if possible
|
713
742
|
function( target, els ) {
|
714
|
-
|
743
|
+
pushNative.apply( target, slice.call( els ) );
|
715
744
|
} :
|
716
745
|
|
717
746
|
// Support: IE<9
|
@@ -719,8 +748,9 @@ try {
|
|
719
748
|
function( target, els ) {
|
720
749
|
var j = target.length,
|
721
750
|
i = 0;
|
751
|
+
|
722
752
|
// Can't trust NodeList.length
|
723
|
-
while ( (target[j++] = els[i++]) ) {}
|
753
|
+
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
|
724
754
|
target.length = j - 1;
|
725
755
|
}
|
726
756
|
};
|
@@ -744,24 +774,21 @@ function Sizzle( selector, context, results, seed ) {
|
|
744
774
|
|
745
775
|
// Try to shortcut find operations (as opposed to filters) in HTML documents
|
746
776
|
if ( !seed ) {
|
747
|
-
|
748
|
-
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
749
|
-
setDocument( context );
|
750
|
-
}
|
777
|
+
setDocument( context );
|
751
778
|
context = context || document;
|
752
779
|
|
753
780
|
if ( documentIsHTML ) {
|
754
781
|
|
755
782
|
// If the selector is sufficiently simple, try using a "get*By*" DOM method
|
756
783
|
// (excepting DocumentFragment context, where the methods don't exist)
|
757
|
-
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
784
|
+
if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
|
758
785
|
|
759
786
|
// ID selector
|
760
|
-
if ( (m = match[1]) ) {
|
787
|
+
if ( ( m = match[ 1 ] ) ) {
|
761
788
|
|
762
789
|
// Document context
|
763
790
|
if ( nodeType === 9 ) {
|
764
|
-
if ( (elem = context.getElementById( m )) ) {
|
791
|
+
if ( ( elem = context.getElementById( m ) ) ) {
|
765
792
|
|
766
793
|
// Support: IE, Opera, Webkit
|
767
794
|
// TODO: identify versions
|
@@ -780,7 +807,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
780
807
|
// Support: IE, Opera, Webkit
|
781
808
|
// TODO: identify versions
|
782
809
|
// getElementById can match elements by name instead of ID
|
783
|
-
if ( newContext && (elem = newContext.getElementById( m )) &&
|
810
|
+
if ( newContext && ( elem = newContext.getElementById( m ) ) &&
|
784
811
|
contains( context, elem ) &&
|
785
812
|
elem.id === m ) {
|
786
813
|
|
@@ -790,12 +817,12 @@ function Sizzle( selector, context, results, seed ) {
|
|
790
817
|
}
|
791
818
|
|
792
819
|
// Type selector
|
793
|
-
} else if ( match[2] ) {
|
820
|
+
} else if ( match[ 2 ] ) {
|
794
821
|
push.apply( results, context.getElementsByTagName( selector ) );
|
795
822
|
return results;
|
796
823
|
|
797
824
|
// Class selector
|
798
|
-
} else if ( (m = match[3]) && support.getElementsByClassName &&
|
825
|
+
} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
|
799
826
|
context.getElementsByClassName ) {
|
800
827
|
|
801
828
|
push.apply( results, context.getElementsByClassName( m ) );
|
@@ -806,11 +833,11 @@ function Sizzle( selector, context, results, seed ) {
|
|
806
833
|
// Take advantage of querySelectorAll
|
807
834
|
if ( support.qsa &&
|
808
835
|
!nonnativeSelectorCache[ selector + " " ] &&
|
809
|
-
(!rbuggyQSA || !rbuggyQSA.test( selector )) &&
|
836
|
+
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
|
810
837
|
|
811
838
|
// Support: IE 8 only
|
812
839
|
// Exclude object elements
|
813
|
-
(nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) {
|
840
|
+
( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
|
814
841
|
|
815
842
|
newSelector = selector;
|
816
843
|
newContext = context;
|
@@ -819,27 +846,36 @@ function Sizzle( selector, context, results, seed ) {
|
|
819
846
|
// descendant combinators, which is not what we want.
|
820
847
|
// In such cases, we work around the behavior by prefixing every selector in the
|
821
848
|
// list with an ID selector referencing the scope context.
|
849
|
+
// The technique has to be used as well when a leading combinator is used
|
850
|
+
// as such selectors are not recognized by querySelectorAll.
|
822
851
|
// Thanks to Andrew Dupont for this technique.
|
823
|
-
if ( nodeType === 1 &&
|
852
|
+
if ( nodeType === 1 &&
|
853
|
+
( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
|
824
854
|
|
825
|
-
//
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
855
|
+
// Expand context for sibling selectors
|
856
|
+
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
857
|
+
context;
|
858
|
+
|
859
|
+
// We can use :scope instead of the ID hack if the browser
|
860
|
+
// supports it & if we're not changing the context.
|
861
|
+
if ( newContext !== context || !support.scope ) {
|
862
|
+
|
863
|
+
// Capture the context ID, setting it first if necessary
|
864
|
+
if ( ( nid = context.getAttribute( "id" ) ) ) {
|
865
|
+
nid = nid.replace( rcssescape, fcssescape );
|
866
|
+
} else {
|
867
|
+
context.setAttribute( "id", ( nid = expando ) );
|
868
|
+
}
|
830
869
|
}
|
831
870
|
|
832
871
|
// Prefix every selector in the list
|
833
872
|
groups = tokenize( selector );
|
834
873
|
i = groups.length;
|
835
874
|
while ( i-- ) {
|
836
|
-
groups[i] = "#" + nid
|
875
|
+
groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
|
876
|
+
toSelector( groups[ i ] );
|
837
877
|
}
|
838
878
|
newSelector = groups.join( "," );
|
839
|
-
|
840
|
-
// Expand context for sibling selectors
|
841
|
-
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
842
|
-
context;
|
843
879
|
}
|
844
880
|
|
845
881
|
try {
|
@@ -872,12 +908,14 @@ function createCache() {
|
|
872
908
|
var keys = [];
|
873
909
|
|
874
910
|
function cache( key, value ) {
|
911
|
+
|
875
912
|
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
|
876
913
|
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
914
|
+
|
877
915
|
// Only keep the most recent entries
|
878
916
|
delete cache[ keys.shift() ];
|
879
917
|
}
|
880
|
-
return (cache[ key + " " ] = value);
|
918
|
+
return ( cache[ key + " " ] = value );
|
881
919
|
}
|
882
920
|
return cache;
|
883
921
|
}
|
@@ -896,17 +934,19 @@ function markFunction( fn ) {
|
|
896
934
|
* @param {Function} fn Passed the created element and returns a boolean result
|
897
935
|
*/
|
898
936
|
function assert( fn ) {
|
899
|
-
var el = document.createElement("fieldset");
|
937
|
+
var el = document.createElement( "fieldset" );
|
900
938
|
|
901
939
|
try {
|
902
940
|
return !!fn( el );
|
903
|
-
} catch (e) {
|
941
|
+
} catch ( e ) {
|
904
942
|
return false;
|
905
943
|
} finally {
|
944
|
+
|
906
945
|
// Remove from its parent by default
|
907
946
|
if ( el.parentNode ) {
|
908
947
|
el.parentNode.removeChild( el );
|
909
948
|
}
|
949
|
+
|
910
950
|
// release memory in IE
|
911
951
|
el = null;
|
912
952
|
}
|
@@ -918,11 +958,11 @@ function assert( fn ) {
|
|
918
958
|
* @param {Function} handler The method that will be applied
|
919
959
|
*/
|
920
960
|
function addHandle( attrs, handler ) {
|
921
|
-
var arr = attrs.split("|"),
|
961
|
+
var arr = attrs.split( "|" ),
|
922
962
|
i = arr.length;
|
923
963
|
|
924
964
|
while ( i-- ) {
|
925
|
-
Expr.attrHandle[ arr[i] ] = handler;
|
965
|
+
Expr.attrHandle[ arr[ i ] ] = handler;
|
926
966
|
}
|
927
967
|
}
|
928
968
|
|
@@ -944,7 +984,7 @@ function siblingCheck( a, b ) {
|
|
944
984
|
|
945
985
|
// Check if b follows a
|
946
986
|
if ( cur ) {
|
947
|
-
while ( (cur = cur.nextSibling) ) {
|
987
|
+
while ( ( cur = cur.nextSibling ) ) {
|
948
988
|
if ( cur === b ) {
|
949
989
|
return -1;
|
950
990
|
}
|
@@ -972,7 +1012,7 @@ function createInputPseudo( type ) {
|
|
972
1012
|
function createButtonPseudo( type ) {
|
973
1013
|
return function( elem ) {
|
974
1014
|
var name = elem.nodeName.toLowerCase();
|
975
|
-
return (name === "input" || name === "button") && elem.type === type;
|
1015
|
+
return ( name === "input" || name === "button" ) && elem.type === type;
|
976
1016
|
};
|
977
1017
|
}
|
978
1018
|
|
@@ -1015,7 +1055,7 @@ function createDisabledPseudo( disabled ) {
|
|
1015
1055
|
// Where there is no isDisabled, check manually
|
1016
1056
|
/* jshint -W018 */
|
1017
1057
|
elem.isDisabled !== !disabled &&
|
1018
|
-
|
1058
|
+
inDisabledFieldset( elem ) === disabled;
|
1019
1059
|
}
|
1020
1060
|
|
1021
1061
|
return elem.disabled === disabled;
|
@@ -1037,21 +1077,21 @@ function createDisabledPseudo( disabled ) {
|
|
1037
1077
|
* @param {Function} fn
|
1038
1078
|
*/
|
1039
1079
|
function createPositionalPseudo( fn ) {
|
1040
|
-
return markFunction(function( argument ) {
|
1080
|
+
return markFunction( function( argument ) {
|
1041
1081
|
argument = +argument;
|
1042
|
-
return markFunction(function( seed, matches ) {
|
1082
|
+
return markFunction( function( seed, matches ) {
|
1043
1083
|
var j,
|
1044
1084
|
matchIndexes = fn( [], seed.length, argument ),
|
1045
1085
|
i = matchIndexes.length;
|
1046
1086
|
|
1047
1087
|
// Match elements found at the specified indexes
|
1048
1088
|
while ( i-- ) {
|
1049
|
-
if ( seed[ (j = matchIndexes[i]) ] ) {
|
1050
|
-
seed[j] = !(matches[j] = seed[j]);
|
1089
|
+
if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
|
1090
|
+
seed[ j ] = !( matches[ j ] = seed[ j ] );
|
1051
1091
|
}
|
1052
1092
|
}
|
1053
|
-
});
|
1054
|
-
});
|
1093
|
+
} );
|
1094
|
+
} );
|
1055
1095
|
}
|
1056
1096
|
|
1057
1097
|
/**
|
@@ -1072,8 +1112,8 @@ support = Sizzle.support = {};
|
|
1072
1112
|
* @returns {Boolean} True iff elem is a non-HTML XML node
|
1073
1113
|
*/
|
1074
1114
|
isXML = Sizzle.isXML = function( elem ) {
|
1075
|
-
var namespace = elem.namespaceURI,
|
1076
|
-
docElem = (elem.ownerDocument || elem).documentElement;
|
1115
|
+
var namespace = elem && elem.namespaceURI,
|
1116
|
+
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
1077
1117
|
|
1078
1118
|
// Support: IE <=8
|
1079
1119
|
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
@@ -1091,7 +1131,11 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1091
1131
|
doc = node ? node.ownerDocument || node : preferredDoc;
|
1092
1132
|
|
1093
1133
|
// Return early if doc is invalid or already selected
|
1094
|
-
|
1134
|
+
// Support: IE 11+, Edge 17 - 18+
|
1135
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1136
|
+
// two documents; shallow comparisons work.
|
1137
|
+
// eslint-disable-next-line eqeqeq
|
1138
|
+
if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
|
1095
1139
|
return document;
|
1096
1140
|
}
|
1097
1141
|
|
@@ -1100,10 +1144,14 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1100
1144
|
docElem = document.documentElement;
|
1101
1145
|
documentIsHTML = !isXML( document );
|
1102
1146
|
|
1103
|
-
// Support: IE 9-11
|
1147
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
1104
1148
|
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
|
1105
|
-
|
1106
|
-
|
1149
|
+
// Support: IE 11+, Edge 17 - 18+
|
1150
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1151
|
+
// two documents; shallow comparisons work.
|
1152
|
+
// eslint-disable-next-line eqeqeq
|
1153
|
+
if ( preferredDoc != document &&
|
1154
|
+
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
1107
1155
|
|
1108
1156
|
// Support: IE 11, Edge
|
1109
1157
|
if ( subWindow.addEventListener ) {
|
@@ -1115,25 +1163,36 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1115
1163
|
}
|
1116
1164
|
}
|
1117
1165
|
|
1166
|
+
// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
|
1167
|
+
// Safari 4 - 5 only, Opera <=11.6 - 12.x only
|
1168
|
+
// IE/Edge & older browsers don't support the :scope pseudo-class.
|
1169
|
+
// Support: Safari 6.0 only
|
1170
|
+
// Safari 6.0 supports :scope but it's an alias of :root there.
|
1171
|
+
support.scope = assert( function( el ) {
|
1172
|
+
docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
|
1173
|
+
return typeof el.querySelectorAll !== "undefined" &&
|
1174
|
+
!el.querySelectorAll( ":scope fieldset div" ).length;
|
1175
|
+
} );
|
1176
|
+
|
1118
1177
|
/* Attributes
|
1119
1178
|
---------------------------------------------------------------------- */
|
1120
1179
|
|
1121
1180
|
// Support: IE<8
|
1122
1181
|
// Verify that getAttribute really returns attributes and not properties
|
1123
1182
|
// (excepting IE8 booleans)
|
1124
|
-
support.attributes = assert(function( el ) {
|
1183
|
+
support.attributes = assert( function( el ) {
|
1125
1184
|
el.className = "i";
|
1126
|
-
return !el.getAttribute("className");
|
1127
|
-
});
|
1185
|
+
return !el.getAttribute( "className" );
|
1186
|
+
} );
|
1128
1187
|
|
1129
1188
|
/* getElement(s)By*
|
1130
1189
|
---------------------------------------------------------------------- */
|
1131
1190
|
|
1132
1191
|
// Check if getElementsByTagName("*") returns only elements
|
1133
|
-
support.getElementsByTagName = assert(function( el ) {
|
1134
|
-
el.appendChild( document.createComment("") );
|
1135
|
-
return !el.getElementsByTagName("*").length;
|
1136
|
-
});
|
1192
|
+
support.getElementsByTagName = assert( function( el ) {
|
1193
|
+
el.appendChild( document.createComment( "" ) );
|
1194
|
+
return !el.getElementsByTagName( "*" ).length;
|
1195
|
+
} );
|
1137
1196
|
|
1138
1197
|
// Support: IE<9
|
1139
1198
|
support.getElementsByClassName = rnative.test( document.getElementsByClassName );
|
@@ -1142,38 +1201,38 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1142
1201
|
// Check if getElementById returns elements by name
|
1143
1202
|
// The broken getElementById methods don't pick up programmatically-set names,
|
1144
1203
|
// so use a roundabout getElementsByName test
|
1145
|
-
support.getById = assert(function( el ) {
|
1204
|
+
support.getById = assert( function( el ) {
|
1146
1205
|
docElem.appendChild( el ).id = expando;
|
1147
1206
|
return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
1148
|
-
});
|
1207
|
+
} );
|
1149
1208
|
|
1150
1209
|
// ID filter and find
|
1151
1210
|
if ( support.getById ) {
|
1152
|
-
Expr.filter["ID"] = function( id ) {
|
1211
|
+
Expr.filter[ "ID" ] = function( id ) {
|
1153
1212
|
var attrId = id.replace( runescape, funescape );
|
1154
1213
|
return function( elem ) {
|
1155
|
-
return elem.getAttribute("id") === attrId;
|
1214
|
+
return elem.getAttribute( "id" ) === attrId;
|
1156
1215
|
};
|
1157
1216
|
};
|
1158
|
-
Expr.find["ID"] = function( id, context ) {
|
1217
|
+
Expr.find[ "ID" ] = function( id, context ) {
|
1159
1218
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1160
1219
|
var elem = context.getElementById( id );
|
1161
1220
|
return elem ? [ elem ] : [];
|
1162
1221
|
}
|
1163
1222
|
};
|
1164
1223
|
} else {
|
1165
|
-
Expr.filter["ID"] = function( id ) {
|
1224
|
+
Expr.filter[ "ID" ] = function( id ) {
|
1166
1225
|
var attrId = id.replace( runescape, funescape );
|
1167
1226
|
return function( elem ) {
|
1168
1227
|
var node = typeof elem.getAttributeNode !== "undefined" &&
|
1169
|
-
elem.getAttributeNode("id");
|
1228
|
+
elem.getAttributeNode( "id" );
|
1170
1229
|
return node && node.value === attrId;
|
1171
1230
|
};
|
1172
1231
|
};
|
1173
1232
|
|
1174
1233
|
// Support: IE 6 - 7 only
|
1175
1234
|
// getElementById is not reliable as a find shortcut
|
1176
|
-
Expr.find["ID"] = function( id, context ) {
|
1235
|
+
Expr.find[ "ID" ] = function( id, context ) {
|
1177
1236
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1178
1237
|
var node, i, elems,
|
1179
1238
|
elem = context.getElementById( id );
|
@@ -1181,7 +1240,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1181
1240
|
if ( elem ) {
|
1182
1241
|
|
1183
1242
|
// Verify the id attribute
|
1184
|
-
node = elem.getAttributeNode("id");
|
1243
|
+
node = elem.getAttributeNode( "id" );
|
1185
1244
|
if ( node && node.value === id ) {
|
1186
1245
|
return [ elem ];
|
1187
1246
|
}
|
@@ -1189,8 +1248,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1189
1248
|
// Fall back on getElementsByName
|
1190
1249
|
elems = context.getElementsByName( id );
|
1191
1250
|
i = 0;
|
1192
|
-
while ( (elem = elems[i++]) ) {
|
1193
|
-
node = elem.getAttributeNode("id");
|
1251
|
+
while ( ( elem = elems[ i++ ] ) ) {
|
1252
|
+
node = elem.getAttributeNode( "id" );
|
1194
1253
|
if ( node && node.value === id ) {
|
1195
1254
|
return [ elem ];
|
1196
1255
|
}
|
@@ -1203,7 +1262,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1203
1262
|
}
|
1204
1263
|
|
1205
1264
|
// Tag
|
1206
|
-
Expr.find["TAG"] = support.getElementsByTagName ?
|
1265
|
+
Expr.find[ "TAG" ] = support.getElementsByTagName ?
|
1207
1266
|
function( tag, context ) {
|
1208
1267
|
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
1209
1268
|
return context.getElementsByTagName( tag );
|
@@ -1218,12 +1277,13 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1218
1277
|
var elem,
|
1219
1278
|
tmp = [],
|
1220
1279
|
i = 0,
|
1280
|
+
|
1221
1281
|
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
1222
1282
|
results = context.getElementsByTagName( tag );
|
1223
1283
|
|
1224
1284
|
// Filter out possible comments
|
1225
1285
|
if ( tag === "*" ) {
|
1226
|
-
while ( (elem = results[i++]) ) {
|
1286
|
+
while ( ( elem = results[ i++ ] ) ) {
|
1227
1287
|
if ( elem.nodeType === 1 ) {
|
1228
1288
|
tmp.push( elem );
|
1229
1289
|
}
|
@@ -1235,7 +1295,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1235
1295
|
};
|
1236
1296
|
|
1237
1297
|
// Class
|
1238
|
-
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
1298
|
+
Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
|
1239
1299
|
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
1240
1300
|
return context.getElementsByClassName( className );
|
1241
1301
|
}
|
@@ -1256,10 +1316,14 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1256
1316
|
// See https://bugs.jquery.com/ticket/13378
|
1257
1317
|
rbuggyQSA = [];
|
1258
1318
|
|
1259
|
-
if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
|
1319
|
+
if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {
|
1320
|
+
|
1260
1321
|
// Build QSA regex
|
1261
1322
|
// Regex strategy adopted from Diego Perini
|
1262
|
-
assert(function( el ) {
|
1323
|
+
assert( function( el ) {
|
1324
|
+
|
1325
|
+
var input;
|
1326
|
+
|
1263
1327
|
// Select is set to empty string on purpose
|
1264
1328
|
// This is to test IE's treatment of not explicitly
|
1265
1329
|
// setting a boolean content attribute,
|
@@ -1273,78 +1337,98 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1273
1337
|
// Nothing should be selected when empty strings follow ^= or $= or *=
|
1274
1338
|
// The test attribute must be unknown in Opera but "safe" for WinRT
|
1275
1339
|
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
1276
|
-
if ( el.querySelectorAll("[msallowcapture^='']").length ) {
|
1340
|
+
if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
|
1277
1341
|
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
1278
1342
|
}
|
1279
1343
|
|
1280
1344
|
// Support: IE8
|
1281
1345
|
// Boolean attributes and "value" are not treated correctly
|
1282
|
-
if ( !el.querySelectorAll("[selected]").length ) {
|
1346
|
+
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
1283
1347
|
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
1284
1348
|
}
|
1285
1349
|
|
1286
1350
|
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
|
1287
1351
|
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
1288
|
-
rbuggyQSA.push("~=");
|
1352
|
+
rbuggyQSA.push( "~=" );
|
1353
|
+
}
|
1354
|
+
|
1355
|
+
// Support: IE 11+, Edge 15 - 18+
|
1356
|
+
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
1357
|
+
// Adding a temporary attribute to the document before the selection works
|
1358
|
+
// around the issue.
|
1359
|
+
// Interestingly, IE 10 & older don't seem to have the issue.
|
1360
|
+
input = document.createElement( "input" );
|
1361
|
+
input.setAttribute( "name", "" );
|
1362
|
+
el.appendChild( input );
|
1363
|
+
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
1364
|
+
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
1365
|
+
whitespace + "*(?:''|\"\")" );
|
1289
1366
|
}
|
1290
1367
|
|
1291
1368
|
// Webkit/Opera - :checked should return selected option elements
|
1292
1369
|
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
1293
1370
|
// IE8 throws error here and will not see later tests
|
1294
|
-
if ( !el.querySelectorAll(":checked").length ) {
|
1295
|
-
rbuggyQSA.push(":checked");
|
1371
|
+
if ( !el.querySelectorAll( ":checked" ).length ) {
|
1372
|
+
rbuggyQSA.push( ":checked" );
|
1296
1373
|
}
|
1297
1374
|
|
1298
1375
|
// Support: Safari 8+, iOS 8+
|
1299
1376
|
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
1300
1377
|
// In-page `selector#id sibling-combinator selector` fails
|
1301
1378
|
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
1302
|
-
rbuggyQSA.push(".#.+[+~]");
|
1379
|
+
rbuggyQSA.push( ".#.+[+~]" );
|
1303
1380
|
}
|
1304
|
-
});
|
1305
1381
|
|
1306
|
-
|
1382
|
+
// Support: Firefox <=3.6 - 5 only
|
1383
|
+
// Old Firefox doesn't throw on a badly-escaped identifier.
|
1384
|
+
el.querySelectorAll( "\\\f" );
|
1385
|
+
rbuggyQSA.push( "[\\r\\n\\f]" );
|
1386
|
+
} );
|
1387
|
+
|
1388
|
+
assert( function( el ) {
|
1307
1389
|
el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
1308
1390
|
"<select disabled='disabled'><option/></select>";
|
1309
1391
|
|
1310
1392
|
// Support: Windows 8 Native Apps
|
1311
1393
|
// The type and name attributes are restricted during .innerHTML assignment
|
1312
|
-
var input = document.createElement("input");
|
1394
|
+
var input = document.createElement( "input" );
|
1313
1395
|
input.setAttribute( "type", "hidden" );
|
1314
1396
|
el.appendChild( input ).setAttribute( "name", "D" );
|
1315
1397
|
|
1316
1398
|
// Support: IE8
|
1317
1399
|
// Enforce case-sensitivity of name attribute
|
1318
|
-
if ( el.querySelectorAll("[name=d]").length ) {
|
1400
|
+
if ( el.querySelectorAll( "[name=d]" ).length ) {
|
1319
1401
|
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
|
1320
1402
|
}
|
1321
1403
|
|
1322
1404
|
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
|
1323
1405
|
// IE8 throws error here and will not see later tests
|
1324
|
-
if ( el.querySelectorAll(":enabled").length !== 2 ) {
|
1406
|
+
if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
|
1325
1407
|
rbuggyQSA.push( ":enabled", ":disabled" );
|
1326
1408
|
}
|
1327
1409
|
|
1328
1410
|
// Support: IE9-11+
|
1329
1411
|
// IE's :disabled selector does not pick up the children of disabled fieldsets
|
1330
1412
|
docElem.appendChild( el ).disabled = true;
|
1331
|
-
if ( el.querySelectorAll(":disabled").length !== 2 ) {
|
1413
|
+
if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
|
1332
1414
|
rbuggyQSA.push( ":enabled", ":disabled" );
|
1333
1415
|
}
|
1334
1416
|
|
1417
|
+
// Support: Opera 10 - 11 only
|
1335
1418
|
// Opera 10-11 does not throw on post-comma invalid pseudos
|
1336
|
-
el.querySelectorAll("*,:x");
|
1337
|
-
rbuggyQSA.push(",.*:");
|
1338
|
-
});
|
1419
|
+
el.querySelectorAll( "*,:x" );
|
1420
|
+
rbuggyQSA.push( ",.*:" );
|
1421
|
+
} );
|
1339
1422
|
}
|
1340
1423
|
|
1341
|
-
if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
|
1424
|
+
if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
|
1342
1425
|
docElem.webkitMatchesSelector ||
|
1343
1426
|
docElem.mozMatchesSelector ||
|
1344
1427
|
docElem.oMatchesSelector ||
|
1345
|
-
docElem.msMatchesSelector) )) ) {
|
1428
|
+
docElem.msMatchesSelector ) ) ) ) {
|
1429
|
+
|
1430
|
+
assert( function( el ) {
|
1346
1431
|
|
1347
|
-
assert(function( el ) {
|
1348
1432
|
// Check to see if it's possible to do matchesSelector
|
1349
1433
|
// on a disconnected node (IE 9)
|
1350
1434
|
support.disconnectedMatch = matches.call( el, "*" );
|
@@ -1353,11 +1437,11 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1353
1437
|
// Gecko does not error, returns false instead
|
1354
1438
|
matches.call( el, "[s!='']:x" );
|
1355
1439
|
rbuggyMatches.push( "!=", pseudos );
|
1356
|
-
});
|
1440
|
+
} );
|
1357
1441
|
}
|
1358
1442
|
|
1359
|
-
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
|
1360
|
-
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
|
1443
|
+
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
|
1444
|
+
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
|
1361
1445
|
|
1362
1446
|
/* Contains
|
1363
1447
|
---------------------------------------------------------------------- */
|
@@ -1374,11 +1458,11 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1374
1458
|
adown.contains ?
|
1375
1459
|
adown.contains( bup ) :
|
1376
1460
|
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
1377
|
-
));
|
1461
|
+
) );
|
1378
1462
|
} :
|
1379
1463
|
function( a, b ) {
|
1380
1464
|
if ( b ) {
|
1381
|
-
while ( (b = b.parentNode) ) {
|
1465
|
+
while ( ( b = b.parentNode ) ) {
|
1382
1466
|
if ( b === a ) {
|
1383
1467
|
return true;
|
1384
1468
|
}
|
@@ -1407,7 +1491,11 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1407
1491
|
}
|
1408
1492
|
|
1409
1493
|
// Calculate position if both inputs belong to the same document
|
1410
|
-
|
1494
|
+
// Support: IE 11+, Edge 17 - 18+
|
1495
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1496
|
+
// two documents; shallow comparisons work.
|
1497
|
+
// eslint-disable-next-line eqeqeq
|
1498
|
+
compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
|
1411
1499
|
a.compareDocumentPosition( b ) :
|
1412
1500
|
|
1413
1501
|
// Otherwise we know they are disconnected
|
@@ -1415,13 +1503,24 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1415
1503
|
|
1416
1504
|
// Disconnected nodes
|
1417
1505
|
if ( compare & 1 ||
|
1418
|
-
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
1506
|
+
( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
|
1419
1507
|
|
1420
1508
|
// Choose the first element that is related to our preferred document
|
1421
|
-
|
1509
|
+
// Support: IE 11+, Edge 17 - 18+
|
1510
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1511
|
+
// two documents; shallow comparisons work.
|
1512
|
+
// eslint-disable-next-line eqeqeq
|
1513
|
+
if ( a == document || a.ownerDocument == preferredDoc &&
|
1514
|
+
contains( preferredDoc, a ) ) {
|
1422
1515
|
return -1;
|
1423
1516
|
}
|
1424
|
-
|
1517
|
+
|
1518
|
+
// Support: IE 11+, Edge 17 - 18+
|
1519
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1520
|
+
// two documents; shallow comparisons work.
|
1521
|
+
// eslint-disable-next-line eqeqeq
|
1522
|
+
if ( b == document || b.ownerDocument == preferredDoc &&
|
1523
|
+
contains( preferredDoc, b ) ) {
|
1425
1524
|
return 1;
|
1426
1525
|
}
|
1427
1526
|
|
@@ -1434,6 +1533,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1434
1533
|
return compare & 4 ? -1 : 1;
|
1435
1534
|
} :
|
1436
1535
|
function( a, b ) {
|
1536
|
+
|
1437
1537
|
// Exit early if the nodes are identical
|
1438
1538
|
if ( a === b ) {
|
1439
1539
|
hasDuplicate = true;
|
@@ -1449,8 +1549,14 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1449
1549
|
|
1450
1550
|
// Parentless nodes are either documents or disconnected
|
1451
1551
|
if ( !aup || !bup ) {
|
1452
|
-
|
1453
|
-
|
1552
|
+
|
1553
|
+
// Support: IE 11+, Edge 17 - 18+
|
1554
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1555
|
+
// two documents; shallow comparisons work.
|
1556
|
+
/* eslint-disable eqeqeq */
|
1557
|
+
return a == document ? -1 :
|
1558
|
+
b == document ? 1 :
|
1559
|
+
/* eslint-enable eqeqeq */
|
1454
1560
|
aup ? -1 :
|
1455
1561
|
bup ? 1 :
|
1456
1562
|
sortInput ?
|
@@ -1464,26 +1570,32 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1464
1570
|
|
1465
1571
|
// Otherwise we need full lists of their ancestors for comparison
|
1466
1572
|
cur = a;
|
1467
|
-
while ( (cur = cur.parentNode) ) {
|
1573
|
+
while ( ( cur = cur.parentNode ) ) {
|
1468
1574
|
ap.unshift( cur );
|
1469
1575
|
}
|
1470
1576
|
cur = b;
|
1471
|
-
while ( (cur = cur.parentNode) ) {
|
1577
|
+
while ( ( cur = cur.parentNode ) ) {
|
1472
1578
|
bp.unshift( cur );
|
1473
1579
|
}
|
1474
1580
|
|
1475
1581
|
// Walk down the tree looking for a discrepancy
|
1476
|
-
while ( ap[i] === bp[i] ) {
|
1582
|
+
while ( ap[ i ] === bp[ i ] ) {
|
1477
1583
|
i++;
|
1478
1584
|
}
|
1479
1585
|
|
1480
1586
|
return i ?
|
1587
|
+
|
1481
1588
|
// Do a sibling check if the nodes have a common ancestor
|
1482
|
-
siblingCheck( ap[i], bp[i] ) :
|
1589
|
+
siblingCheck( ap[ i ], bp[ i ] ) :
|
1483
1590
|
|
1484
1591
|
// Otherwise nodes in our document sort first
|
1485
|
-
|
1486
|
-
|
1592
|
+
// Support: IE 11+, Edge 17 - 18+
|
1593
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1594
|
+
// two documents; shallow comparisons work.
|
1595
|
+
/* eslint-disable eqeqeq */
|
1596
|
+
ap[ i ] == preferredDoc ? -1 :
|
1597
|
+
bp[ i ] == preferredDoc ? 1 :
|
1598
|
+
/* eslint-enable eqeqeq */
|
1487
1599
|
0;
|
1488
1600
|
};
|
1489
1601
|
|
@@ -1495,10 +1607,7 @@ Sizzle.matches = function( expr, elements ) {
|
|
1495
1607
|
};
|
1496
1608
|
|
1497
1609
|
Sizzle.matchesSelector = function( elem, expr ) {
|
1498
|
-
|
1499
|
-
if ( ( elem.ownerDocument || elem ) !== document ) {
|
1500
|
-
setDocument( elem );
|
1501
|
-
}
|
1610
|
+
setDocument( elem );
|
1502
1611
|
|
1503
1612
|
if ( support.matchesSelector && documentIsHTML &&
|
1504
1613
|
!nonnativeSelectorCache[ expr + " " ] &&
|
@@ -1510,12 +1619,13 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
1510
1619
|
|
1511
1620
|
// IE 9's matchesSelector returns false on disconnected nodes
|
1512
1621
|
if ( ret || support.disconnectedMatch ||
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1622
|
+
|
1623
|
+
// As well, disconnected nodes are said to be in a document
|
1624
|
+
// fragment in IE 9
|
1625
|
+
elem.document && elem.document.nodeType !== 11 ) {
|
1516
1626
|
return ret;
|
1517
1627
|
}
|
1518
|
-
} catch (e) {
|
1628
|
+
} catch ( e ) {
|
1519
1629
|
nonnativeSelectorCache( expr, true );
|
1520
1630
|
}
|
1521
1631
|
}
|
@@ -1524,20 +1634,31 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
1524
1634
|
};
|
1525
1635
|
|
1526
1636
|
Sizzle.contains = function( context, elem ) {
|
1637
|
+
|
1527
1638
|
// Set document vars if needed
|
1528
|
-
|
1639
|
+
// Support: IE 11+, Edge 17 - 18+
|
1640
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1641
|
+
// two documents; shallow comparisons work.
|
1642
|
+
// eslint-disable-next-line eqeqeq
|
1643
|
+
if ( ( context.ownerDocument || context ) != document ) {
|
1529
1644
|
setDocument( context );
|
1530
1645
|
}
|
1531
1646
|
return contains( context, elem );
|
1532
1647
|
};
|
1533
1648
|
|
1534
1649
|
Sizzle.attr = function( elem, name ) {
|
1650
|
+
|
1535
1651
|
// Set document vars if needed
|
1536
|
-
|
1652
|
+
// Support: IE 11+, Edge 17 - 18+
|
1653
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
1654
|
+
// two documents; shallow comparisons work.
|
1655
|
+
// eslint-disable-next-line eqeqeq
|
1656
|
+
if ( ( elem.ownerDocument || elem ) != document ) {
|
1537
1657
|
setDocument( elem );
|
1538
1658
|
}
|
1539
1659
|
|
1540
1660
|
var fn = Expr.attrHandle[ name.toLowerCase() ],
|
1661
|
+
|
1541
1662
|
// Don't get fooled by Object.prototype properties (jQuery #13807)
|
1542
1663
|
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
1543
1664
|
fn( elem, name, !documentIsHTML ) :
|
@@ -1547,13 +1668,13 @@ Sizzle.attr = function( elem, name ) {
|
|
1547
1668
|
val :
|
1548
1669
|
support.attributes || !documentIsHTML ?
|
1549
1670
|
elem.getAttribute( name ) :
|
1550
|
-
(val = elem.getAttributeNode(name)) && val.specified ?
|
1671
|
+
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
1551
1672
|
val.value :
|
1552
1673
|
null;
|
1553
1674
|
};
|
1554
1675
|
|
1555
1676
|
Sizzle.escape = function( sel ) {
|
1556
|
-
return (sel + "").replace( rcssescape, fcssescape );
|
1677
|
+
return ( sel + "" ).replace( rcssescape, fcssescape );
|
1557
1678
|
};
|
1558
1679
|
|
1559
1680
|
Sizzle.error = function( msg ) {
|
@@ -1576,7 +1697,7 @@ Sizzle.uniqueSort = function( results ) {
|
|
1576
1697
|
results.sort( sortOrder );
|
1577
1698
|
|
1578
1699
|
if ( hasDuplicate ) {
|
1579
|
-
while ( (elem = results[i++]) ) {
|
1700
|
+
while ( ( elem = results[ i++ ] ) ) {
|
1580
1701
|
if ( elem === results[ i ] ) {
|
1581
1702
|
j = duplicates.push( i );
|
1582
1703
|
}
|
@@ -1604,17 +1725,21 @@ getText = Sizzle.getText = function( elem ) {
|
|
1604
1725
|
nodeType = elem.nodeType;
|
1605
1726
|
|
1606
1727
|
if ( !nodeType ) {
|
1728
|
+
|
1607
1729
|
// If no nodeType, this is expected to be an array
|
1608
|
-
while ( (node = elem[i++]) ) {
|
1730
|
+
while ( ( node = elem[ i++ ] ) ) {
|
1731
|
+
|
1609
1732
|
// Do not traverse comment nodes
|
1610
1733
|
ret += getText( node );
|
1611
1734
|
}
|
1612
1735
|
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
1736
|
+
|
1613
1737
|
// Use textContent for elements
|
1614
1738
|
// innerText usage removed for consistency of new lines (jQuery #11153)
|
1615
1739
|
if ( typeof elem.textContent === "string" ) {
|
1616
1740
|
return elem.textContent;
|
1617
1741
|
} else {
|
1742
|
+
|
1618
1743
|
// Traverse its children
|
1619
1744
|
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
1620
1745
|
ret += getText( elem );
|
@@ -1623,6 +1748,7 @@ getText = Sizzle.getText = function( elem ) {
|
|
1623
1748
|
} else if ( nodeType === 3 || nodeType === 4 ) {
|
1624
1749
|
return elem.nodeValue;
|
1625
1750
|
}
|
1751
|
+
|
1626
1752
|
// Do not include comment or processing instruction nodes
|
1627
1753
|
|
1628
1754
|
return ret;
|
@@ -1650,19 +1776,21 @@ Expr = Sizzle.selectors = {
|
|
1650
1776
|
|
1651
1777
|
preFilter: {
|
1652
1778
|
"ATTR": function( match ) {
|
1653
|
-
match[1] = match[1].replace( runescape, funescape );
|
1779
|
+
match[ 1 ] = match[ 1 ].replace( runescape, funescape );
|
1654
1780
|
|
1655
1781
|
// Move the given value to match[3] whether quoted or unquoted
|
1656
|
-
match[3] = ( match[3] || match[4
|
1782
|
+
match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
|
1783
|
+
match[ 5 ] || "" ).replace( runescape, funescape );
|
1657
1784
|
|
1658
|
-
if ( match[2] === "~=" ) {
|
1659
|
-
match[3] = " " + match[3] + " ";
|
1785
|
+
if ( match[ 2 ] === "~=" ) {
|
1786
|
+
match[ 3 ] = " " + match[ 3 ] + " ";
|
1660
1787
|
}
|
1661
1788
|
|
1662
1789
|
return match.slice( 0, 4 );
|
1663
1790
|
},
|
1664
1791
|
|
1665
1792
|
"CHILD": function( match ) {
|
1793
|
+
|
1666
1794
|
/* matches from matchExpr["CHILD"]
|
1667
1795
|
1 type (only|nth|...)
|
1668
1796
|
2 what (child|of-type)
|
@@ -1673,22 +1801,25 @@ Expr = Sizzle.selectors = {
|
|
1673
1801
|
7 sign of y-component
|
1674
1802
|
8 y of y-component
|
1675
1803
|
*/
|
1676
|
-
match[1] = match[1].toLowerCase();
|
1804
|
+
match[ 1 ] = match[ 1 ].toLowerCase();
|
1805
|
+
|
1806
|
+
if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
|
1677
1807
|
|
1678
|
-
if ( match[1].slice( 0, 3 ) === "nth" ) {
|
1679
1808
|
// nth-* requires argument
|
1680
|
-
if ( !match[3] ) {
|
1681
|
-
Sizzle.error( match[0] );
|
1809
|
+
if ( !match[ 3 ] ) {
|
1810
|
+
Sizzle.error( match[ 0 ] );
|
1682
1811
|
}
|
1683
1812
|
|
1684
1813
|
// numeric x and y parameters for Expr.filter.CHILD
|
1685
1814
|
// remember that false/true cast respectively to 0/1
|
1686
|
-
match[4] = +( match[4] ?
|
1687
|
-
|
1815
|
+
match[ 4 ] = +( match[ 4 ] ?
|
1816
|
+
match[ 5 ] + ( match[ 6 ] || 1 ) :
|
1817
|
+
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
|
1818
|
+
match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
|
1688
1819
|
|
1689
|
-
|
1690
|
-
} else if ( match[3] ) {
|
1691
|
-
Sizzle.error( match[0] );
|
1820
|
+
// other types prohibit arguments
|
1821
|
+
} else if ( match[ 3 ] ) {
|
1822
|
+
Sizzle.error( match[ 0 ] );
|
1692
1823
|
}
|
1693
1824
|
|
1694
1825
|
return match;
|
@@ -1696,26 +1827,28 @@ Expr = Sizzle.selectors = {
|
|
1696
1827
|
|
1697
1828
|
"PSEUDO": function( match ) {
|
1698
1829
|
var excess,
|
1699
|
-
unquoted = !match[6] && match[2];
|
1830
|
+
unquoted = !match[ 6 ] && match[ 2 ];
|
1700
1831
|
|
1701
|
-
if ( matchExpr["CHILD"].test( match[0] ) ) {
|
1832
|
+
if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
|
1702
1833
|
return null;
|
1703
1834
|
}
|
1704
1835
|
|
1705
1836
|
// Accept quoted arguments as-is
|
1706
|
-
if ( match[3] ) {
|
1707
|
-
match[2] = match[4] || match[5] || "";
|
1837
|
+
if ( match[ 3 ] ) {
|
1838
|
+
match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
|
1708
1839
|
|
1709
1840
|
// Strip excess characters from unquoted arguments
|
1710
1841
|
} else if ( unquoted && rpseudo.test( unquoted ) &&
|
1842
|
+
|
1711
1843
|
// Get excess from tokenize (recursively)
|
1712
|
-
(excess = tokenize( unquoted, true )) &&
|
1844
|
+
( excess = tokenize( unquoted, true ) ) &&
|
1845
|
+
|
1713
1846
|
// advance to the next closing parenthesis
|
1714
|
-
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
1847
|
+
( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
|
1715
1848
|
|
1716
1849
|
// excess is a negative index
|
1717
|
-
match[0] = match[0].slice( 0, excess );
|
1718
|
-
match[2] = unquoted.slice( 0, excess );
|
1850
|
+
match[ 0 ] = match[ 0 ].slice( 0, excess );
|
1851
|
+
match[ 2 ] = unquoted.slice( 0, excess );
|
1719
1852
|
}
|
1720
1853
|
|
1721
1854
|
// Return only captures needed by the pseudo filter method (type and argument)
|
@@ -1728,7 +1861,9 @@ Expr = Sizzle.selectors = {
|
|
1728
1861
|
"TAG": function( nodeNameSelector ) {
|
1729
1862
|
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
1730
1863
|
return nodeNameSelector === "*" ?
|
1731
|
-
function() {
|
1864
|
+
function() {
|
1865
|
+
return true;
|
1866
|
+
} :
|
1732
1867
|
function( elem ) {
|
1733
1868
|
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
1734
1869
|
};
|
@@ -1738,10 +1873,16 @@ Expr = Sizzle.selectors = {
|
|
1738
1873
|
var pattern = classCache[ className + " " ];
|
1739
1874
|
|
1740
1875
|
return pattern ||
|
1741
|
-
(pattern = new RegExp( "(^|" + whitespace +
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1876
|
+
( pattern = new RegExp( "(^|" + whitespace +
|
1877
|
+
")" + className + "(" + whitespace + "|$)" ) ) && classCache(
|
1878
|
+
className, function( elem ) {
|
1879
|
+
return pattern.test(
|
1880
|
+
typeof elem.className === "string" && elem.className ||
|
1881
|
+
typeof elem.getAttribute !== "undefined" &&
|
1882
|
+
elem.getAttribute( "class" ) ||
|
1883
|
+
""
|
1884
|
+
);
|
1885
|
+
} );
|
1745
1886
|
},
|
1746
1887
|
|
1747
1888
|
"ATTR": function( name, operator, check ) {
|
@@ -1757,6 +1898,8 @@ Expr = Sizzle.selectors = {
|
|
1757
1898
|
|
1758
1899
|
result += "";
|
1759
1900
|
|
1901
|
+
/* eslint-disable max-len */
|
1902
|
+
|
1760
1903
|
return operator === "=" ? result === check :
|
1761
1904
|
operator === "!=" ? result !== check :
|
1762
1905
|
operator === "^=" ? check && result.indexOf( check ) === 0 :
|
@@ -1765,10 +1908,12 @@ Expr = Sizzle.selectors = {
|
|
1765
1908
|
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
1766
1909
|
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
1767
1910
|
false;
|
1911
|
+
/* eslint-enable max-len */
|
1912
|
+
|
1768
1913
|
};
|
1769
1914
|
},
|
1770
1915
|
|
1771
|
-
"CHILD": function( type, what,
|
1916
|
+
"CHILD": function( type, what, _argument, first, last ) {
|
1772
1917
|
var simple = type.slice( 0, 3 ) !== "nth",
|
1773
1918
|
forward = type.slice( -4 ) !== "last",
|
1774
1919
|
ofType = what === "of-type";
|
@@ -1780,7 +1925,7 @@ Expr = Sizzle.selectors = {
|
|
1780
1925
|
return !!elem.parentNode;
|
1781
1926
|
} :
|
1782
1927
|
|
1783
|
-
function( elem,
|
1928
|
+
function( elem, _context, xml ) {
|
1784
1929
|
var cache, uniqueCache, outerCache, node, nodeIndex, start,
|
1785
1930
|
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
1786
1931
|
parent = elem.parentNode,
|
@@ -1794,7 +1939,7 @@ Expr = Sizzle.selectors = {
|
|
1794
1939
|
if ( simple ) {
|
1795
1940
|
while ( dir ) {
|
1796
1941
|
node = elem;
|
1797
|
-
while ( (node = node[ dir ]) ) {
|
1942
|
+
while ( ( node = node[ dir ] ) ) {
|
1798
1943
|
if ( ofType ?
|
1799
1944
|
node.nodeName.toLowerCase() === name :
|
1800
1945
|
node.nodeType === 1 ) {
|
@@ -1802,6 +1947,7 @@ Expr = Sizzle.selectors = {
|
|
1802
1947
|
return false;
|
1803
1948
|
}
|
1804
1949
|
}
|
1950
|
+
|
1805
1951
|
// Reverse direction for :only-* (if we haven't yet done so)
|
1806
1952
|
start = dir = type === "only" && !start && "nextSibling";
|
1807
1953
|
}
|
@@ -1817,22 +1963,22 @@ Expr = Sizzle.selectors = {
|
|
1817
1963
|
|
1818
1964
|
// ...in a gzip-friendly way
|
1819
1965
|
node = parent;
|
1820
|
-
outerCache = node[ expando ] || (node[ expando ] = {});
|
1966
|
+
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
1821
1967
|
|
1822
1968
|
// Support: IE <9 only
|
1823
1969
|
// Defend against cloned attroperties (jQuery gh-1709)
|
1824
1970
|
uniqueCache = outerCache[ node.uniqueID ] ||
|
1825
|
-
(outerCache[ node.uniqueID ] = {});
|
1971
|
+
( outerCache[ node.uniqueID ] = {} );
|
1826
1972
|
|
1827
1973
|
cache = uniqueCache[ type ] || [];
|
1828
1974
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
1829
1975
|
diff = nodeIndex && cache[ 2 ];
|
1830
1976
|
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
1831
1977
|
|
1832
|
-
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
1978
|
+
while ( ( node = ++nodeIndex && node && node[ dir ] ||
|
1833
1979
|
|
1834
1980
|
// Fallback to seeking `elem` from the start
|
1835
|
-
(diff = nodeIndex = 0) || start.pop()) ) {
|
1981
|
+
( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
1836
1982
|
|
1837
1983
|
// When found, cache indexes on `parent` and break
|
1838
1984
|
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
@@ -1842,16 +1988,18 @@ Expr = Sizzle.selectors = {
|
|
1842
1988
|
}
|
1843
1989
|
|
1844
1990
|
} else {
|
1991
|
+
|
1845
1992
|
// Use previously-cached element index if available
|
1846
1993
|
if ( useCache ) {
|
1994
|
+
|
1847
1995
|
// ...in a gzip-friendly way
|
1848
1996
|
node = elem;
|
1849
|
-
outerCache = node[ expando ] || (node[ expando ] = {});
|
1997
|
+
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
1850
1998
|
|
1851
1999
|
// Support: IE <9 only
|
1852
2000
|
// Defend against cloned attroperties (jQuery gh-1709)
|
1853
2001
|
uniqueCache = outerCache[ node.uniqueID ] ||
|
1854
|
-
(outerCache[ node.uniqueID ] = {});
|
2002
|
+
( outerCache[ node.uniqueID ] = {} );
|
1855
2003
|
|
1856
2004
|
cache = uniqueCache[ type ] || [];
|
1857
2005
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
@@ -1861,9 +2009,10 @@ Expr = Sizzle.selectors = {
|
|
1861
2009
|
// xml :nth-child(...)
|
1862
2010
|
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
|
1863
2011
|
if ( diff === false ) {
|
2012
|
+
|
1864
2013
|
// Use the same loop as above to seek `elem` from the start
|
1865
|
-
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
1866
|
-
(diff = nodeIndex = 0) || start.pop()) ) {
|
2014
|
+
while ( ( node = ++nodeIndex && node && node[ dir ] ||
|
2015
|
+
( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
1867
2016
|
|
1868
2017
|
if ( ( ofType ?
|
1869
2018
|
node.nodeName.toLowerCase() === name :
|
@@ -1872,12 +2021,13 @@ Expr = Sizzle.selectors = {
|
|
1872
2021
|
|
1873
2022
|
// Cache the index of each encountered element
|
1874
2023
|
if ( useCache ) {
|
1875
|
-
outerCache = node[ expando ] ||
|
2024
|
+
outerCache = node[ expando ] ||
|
2025
|
+
( node[ expando ] = {} );
|
1876
2026
|
|
1877
2027
|
// Support: IE <9 only
|
1878
2028
|
// Defend against cloned attroperties (jQuery gh-1709)
|
1879
2029
|
uniqueCache = outerCache[ node.uniqueID ] ||
|
1880
|
-
(outerCache[ node.uniqueID ] = {});
|
2030
|
+
( outerCache[ node.uniqueID ] = {} );
|
1881
2031
|
|
1882
2032
|
uniqueCache[ type ] = [ dirruns, diff ];
|
1883
2033
|
}
|
@@ -1898,6 +2048,7 @@ Expr = Sizzle.selectors = {
|
|
1898
2048
|
},
|
1899
2049
|
|
1900
2050
|
"PSEUDO": function( pseudo, argument ) {
|
2051
|
+
|
1901
2052
|
// pseudo-class names are case-insensitive
|
1902
2053
|
// http://www.w3.org/TR/selectors/#pseudo-classes
|
1903
2054
|
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
@@ -1917,15 +2068,15 @@ Expr = Sizzle.selectors = {
|
|
1917
2068
|
if ( fn.length > 1 ) {
|
1918
2069
|
args = [ pseudo, pseudo, "", argument ];
|
1919
2070
|
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
1920
|
-
markFunction(function( seed, matches ) {
|
2071
|
+
markFunction( function( seed, matches ) {
|
1921
2072
|
var idx,
|
1922
2073
|
matched = fn( seed, argument ),
|
1923
2074
|
i = matched.length;
|
1924
2075
|
while ( i-- ) {
|
1925
|
-
idx = indexOf( seed, matched[i] );
|
1926
|
-
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
2076
|
+
idx = indexOf( seed, matched[ i ] );
|
2077
|
+
seed[ idx ] = !( matches[ idx ] = matched[ i ] );
|
1927
2078
|
}
|
1928
|
-
}) :
|
2079
|
+
} ) :
|
1929
2080
|
function( elem ) {
|
1930
2081
|
return fn( elem, 0, args );
|
1931
2082
|
};
|
@@ -1936,8 +2087,10 @@ Expr = Sizzle.selectors = {
|
|
1936
2087
|
},
|
1937
2088
|
|
1938
2089
|
pseudos: {
|
2090
|
+
|
1939
2091
|
// Potentially complex pseudos
|
1940
|
-
"not": markFunction(function( selector ) {
|
2092
|
+
"not": markFunction( function( selector ) {
|
2093
|
+
|
1941
2094
|
// Trim the selector passed to compile
|
1942
2095
|
// to avoid treating leading and trailing
|
1943
2096
|
// spaces as combinators
|
@@ -1946,39 +2099,40 @@ Expr = Sizzle.selectors = {
|
|
1946
2099
|
matcher = compile( selector.replace( rtrim, "$1" ) );
|
1947
2100
|
|
1948
2101
|
return matcher[ expando ] ?
|
1949
|
-
markFunction(function( seed, matches,
|
2102
|
+
markFunction( function( seed, matches, _context, xml ) {
|
1950
2103
|
var elem,
|
1951
2104
|
unmatched = matcher( seed, null, xml, [] ),
|
1952
2105
|
i = seed.length;
|
1953
2106
|
|
1954
2107
|
// Match elements unmatched by `matcher`
|
1955
2108
|
while ( i-- ) {
|
1956
|
-
if ( (elem = unmatched[i]) ) {
|
1957
|
-
seed[i] = !(matches[i] = elem);
|
2109
|
+
if ( ( elem = unmatched[ i ] ) ) {
|
2110
|
+
seed[ i ] = !( matches[ i ] = elem );
|
1958
2111
|
}
|
1959
2112
|
}
|
1960
|
-
}) :
|
1961
|
-
function( elem,
|
1962
|
-
input[0] = elem;
|
2113
|
+
} ) :
|
2114
|
+
function( elem, _context, xml ) {
|
2115
|
+
input[ 0 ] = elem;
|
1963
2116
|
matcher( input, null, xml, results );
|
2117
|
+
|
1964
2118
|
// Don't keep the element (issue #299)
|
1965
|
-
input[0] = null;
|
2119
|
+
input[ 0 ] = null;
|
1966
2120
|
return !results.pop();
|
1967
2121
|
};
|
1968
|
-
}),
|
2122
|
+
} ),
|
1969
2123
|
|
1970
|
-
"has": markFunction(function( selector ) {
|
2124
|
+
"has": markFunction( function( selector ) {
|
1971
2125
|
return function( elem ) {
|
1972
2126
|
return Sizzle( selector, elem ).length > 0;
|
1973
2127
|
};
|
1974
|
-
}),
|
2128
|
+
} ),
|
1975
2129
|
|
1976
|
-
"contains": markFunction(function( text ) {
|
2130
|
+
"contains": markFunction( function( text ) {
|
1977
2131
|
text = text.replace( runescape, funescape );
|
1978
2132
|
return function( elem ) {
|
1979
2133
|
return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
|
1980
2134
|
};
|
1981
|
-
}),
|
2135
|
+
} ),
|
1982
2136
|
|
1983
2137
|
// "Whether an element is represented by a :lang() selector
|
1984
2138
|
// is based solely on the element's language value
|
@@ -1988,25 +2142,26 @@ Expr = Sizzle.selectors = {
|
|
1988
2142
|
// The identifier C does not have to be a valid language name."
|
1989
2143
|
// http://www.w3.org/TR/selectors/#lang-pseudo
|
1990
2144
|
"lang": markFunction( function( lang ) {
|
2145
|
+
|
1991
2146
|
// lang value must be a valid identifier
|
1992
|
-
if ( !ridentifier.test(lang || "") ) {
|
2147
|
+
if ( !ridentifier.test( lang || "" ) ) {
|
1993
2148
|
Sizzle.error( "unsupported lang: " + lang );
|
1994
2149
|
}
|
1995
2150
|
lang = lang.replace( runescape, funescape ).toLowerCase();
|
1996
2151
|
return function( elem ) {
|
1997
2152
|
var elemLang;
|
1998
2153
|
do {
|
1999
|
-
if ( (elemLang = documentIsHTML ?
|
2154
|
+
if ( ( elemLang = documentIsHTML ?
|
2000
2155
|
elem.lang :
|
2001
|
-
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
|
2156
|
+
elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
|
2002
2157
|
|
2003
2158
|
elemLang = elemLang.toLowerCase();
|
2004
2159
|
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
|
2005
2160
|
}
|
2006
|
-
} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
|
2161
|
+
} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
|
2007
2162
|
return false;
|
2008
2163
|
};
|
2009
|
-
}),
|
2164
|
+
} ),
|
2010
2165
|
|
2011
2166
|
// Miscellaneous
|
2012
2167
|
"target": function( elem ) {
|
@@ -2019,7 +2174,9 @@ Expr = Sizzle.selectors = {
|
|
2019
2174
|
},
|
2020
2175
|
|
2021
2176
|
"focus": function( elem ) {
|
2022
|
-
return elem === document.activeElement &&
|
2177
|
+
return elem === document.activeElement &&
|
2178
|
+
( !document.hasFocus || document.hasFocus() ) &&
|
2179
|
+
!!( elem.type || elem.href || ~elem.tabIndex );
|
2023
2180
|
},
|
2024
2181
|
|
2025
2182
|
// Boolean properties
|
@@ -2027,16 +2184,20 @@ Expr = Sizzle.selectors = {
|
|
2027
2184
|
"disabled": createDisabledPseudo( true ),
|
2028
2185
|
|
2029
2186
|
"checked": function( elem ) {
|
2187
|
+
|
2030
2188
|
// In CSS3, :checked should return both checked and selected elements
|
2031
2189
|
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
2032
2190
|
var nodeName = elem.nodeName.toLowerCase();
|
2033
|
-
return (nodeName === "input" && !!elem.checked) ||
|
2191
|
+
return ( nodeName === "input" && !!elem.checked ) ||
|
2192
|
+
( nodeName === "option" && !!elem.selected );
|
2034
2193
|
},
|
2035
2194
|
|
2036
2195
|
"selected": function( elem ) {
|
2196
|
+
|
2037
2197
|
// Accessing this property makes selected-by-default
|
2038
2198
|
// options in Safari work properly
|
2039
2199
|
if ( elem.parentNode ) {
|
2200
|
+
// eslint-disable-next-line no-unused-expressions
|
2040
2201
|
elem.parentNode.selectedIndex;
|
2041
2202
|
}
|
2042
2203
|
|
@@ -2045,6 +2206,7 @@ Expr = Sizzle.selectors = {
|
|
2045
2206
|
|
2046
2207
|
// Contents
|
2047
2208
|
"empty": function( elem ) {
|
2209
|
+
|
2048
2210
|
// http://www.w3.org/TR/selectors/#empty-pseudo
|
2049
2211
|
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
|
2050
2212
|
// but not by others (comment: 8; processing instruction: 7; etc.)
|
@@ -2058,7 +2220,7 @@ Expr = Sizzle.selectors = {
|
|
2058
2220
|
},
|
2059
2221
|
|
2060
2222
|
"parent": function( elem ) {
|
2061
|
-
return !Expr.pseudos["empty"]( elem );
|
2223
|
+
return !Expr.pseudos[ "empty" ]( elem );
|
2062
2224
|
},
|
2063
2225
|
|
2064
2226
|
// Element/input types
|
@@ -2082,39 +2244,40 @@ Expr = Sizzle.selectors = {
|
|
2082
2244
|
|
2083
2245
|
// Support: IE<8
|
2084
2246
|
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
|
2085
|
-
( (attr = elem.getAttribute("type")) == null ||
|
2247
|
+
( ( attr = elem.getAttribute( "type" ) ) == null ||
|
2248
|
+
attr.toLowerCase() === "text" );
|
2086
2249
|
},
|
2087
2250
|
|
2088
2251
|
// Position-in-collection
|
2089
|
-
"first": createPositionalPseudo(function() {
|
2252
|
+
"first": createPositionalPseudo( function() {
|
2090
2253
|
return [ 0 ];
|
2091
|
-
}),
|
2254
|
+
} ),
|
2092
2255
|
|
2093
|
-
"last": createPositionalPseudo(function(
|
2256
|
+
"last": createPositionalPseudo( function( _matchIndexes, length ) {
|
2094
2257
|
return [ length - 1 ];
|
2095
|
-
}),
|
2258
|
+
} ),
|
2096
2259
|
|
2097
|
-
"eq": createPositionalPseudo(function(
|
2260
|
+
"eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
|
2098
2261
|
return [ argument < 0 ? argument + length : argument ];
|
2099
|
-
}),
|
2262
|
+
} ),
|
2100
2263
|
|
2101
|
-
"even": createPositionalPseudo(function( matchIndexes, length ) {
|
2264
|
+
"even": createPositionalPseudo( function( matchIndexes, length ) {
|
2102
2265
|
var i = 0;
|
2103
2266
|
for ( ; i < length; i += 2 ) {
|
2104
2267
|
matchIndexes.push( i );
|
2105
2268
|
}
|
2106
2269
|
return matchIndexes;
|
2107
|
-
}),
|
2270
|
+
} ),
|
2108
2271
|
|
2109
|
-
"odd": createPositionalPseudo(function( matchIndexes, length ) {
|
2272
|
+
"odd": createPositionalPseudo( function( matchIndexes, length ) {
|
2110
2273
|
var i = 1;
|
2111
2274
|
for ( ; i < length; i += 2 ) {
|
2112
2275
|
matchIndexes.push( i );
|
2113
2276
|
}
|
2114
2277
|
return matchIndexes;
|
2115
|
-
}),
|
2278
|
+
} ),
|
2116
2279
|
|
2117
|
-
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2280
|
+
"lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
|
2118
2281
|
var i = argument < 0 ?
|
2119
2282
|
argument + length :
|
2120
2283
|
argument > length ?
|
@@ -2124,19 +2287,19 @@ Expr = Sizzle.selectors = {
|
|
2124
2287
|
matchIndexes.push( i );
|
2125
2288
|
}
|
2126
2289
|
return matchIndexes;
|
2127
|
-
}),
|
2290
|
+
} ),
|
2128
2291
|
|
2129
|
-
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2292
|
+
"gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
|
2130
2293
|
var i = argument < 0 ? argument + length : argument;
|
2131
2294
|
for ( ; ++i < length; ) {
|
2132
2295
|
matchIndexes.push( i );
|
2133
2296
|
}
|
2134
2297
|
return matchIndexes;
|
2135
|
-
})
|
2298
|
+
} )
|
2136
2299
|
}
|
2137
2300
|
};
|
2138
2301
|
|
2139
|
-
Expr.pseudos["nth"] = Expr.pseudos["eq"];
|
2302
|
+
Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];
|
2140
2303
|
|
2141
2304
|
// Add button/input type pseudos
|
2142
2305
|
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
@@ -2167,37 +2330,39 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
2167
2330
|
while ( soFar ) {
|
2168
2331
|
|
2169
2332
|
// Comma and first run
|
2170
|
-
if ( !matched || (match = rcomma.exec( soFar )) ) {
|
2333
|
+
if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
|
2171
2334
|
if ( match ) {
|
2335
|
+
|
2172
2336
|
// Don't consume trailing commas as valid
|
2173
|
-
soFar = soFar.slice( match[0].length ) || soFar;
|
2337
|
+
soFar = soFar.slice( match[ 0 ].length ) || soFar;
|
2174
2338
|
}
|
2175
|
-
groups.push( (tokens = []) );
|
2339
|
+
groups.push( ( tokens = [] ) );
|
2176
2340
|
}
|
2177
2341
|
|
2178
2342
|
matched = false;
|
2179
2343
|
|
2180
2344
|
// Combinators
|
2181
|
-
if ( (match = rcombinators.exec( soFar )) ) {
|
2345
|
+
if ( ( match = rcombinators.exec( soFar ) ) ) {
|
2182
2346
|
matched = match.shift();
|
2183
|
-
tokens.push({
|
2347
|
+
tokens.push( {
|
2184
2348
|
value: matched,
|
2349
|
+
|
2185
2350
|
// Cast descendant combinators to space
|
2186
|
-
type: match[0].replace( rtrim, " " )
|
2187
|
-
});
|
2351
|
+
type: match[ 0 ].replace( rtrim, " " )
|
2352
|
+
} );
|
2188
2353
|
soFar = soFar.slice( matched.length );
|
2189
2354
|
}
|
2190
2355
|
|
2191
2356
|
// Filters
|
2192
2357
|
for ( type in Expr.filter ) {
|
2193
|
-
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
|
2194
|
-
(match = preFilters[ type ]( match ))) ) {
|
2358
|
+
if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
|
2359
|
+
( match = preFilters[ type ]( match ) ) ) ) {
|
2195
2360
|
matched = match.shift();
|
2196
|
-
tokens.push({
|
2361
|
+
tokens.push( {
|
2197
2362
|
value: matched,
|
2198
2363
|
type: type,
|
2199
2364
|
matches: match
|
2200
|
-
});
|
2365
|
+
} );
|
2201
2366
|
soFar = soFar.slice( matched.length );
|
2202
2367
|
}
|
2203
2368
|
}
|
@@ -2214,6 +2379,7 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
2214
2379
|
soFar.length :
|
2215
2380
|
soFar ?
|
2216
2381
|
Sizzle.error( selector ) :
|
2382
|
+
|
2217
2383
|
// Cache the tokens
|
2218
2384
|
tokenCache( selector, groups ).slice( 0 );
|
2219
2385
|
};
|
@@ -2223,7 +2389,7 @@ function toSelector( tokens ) {
|
|
2223
2389
|
len = tokens.length,
|
2224
2390
|
selector = "";
|
2225
2391
|
for ( ; i < len; i++ ) {
|
2226
|
-
selector += tokens[i].value;
|
2392
|
+
selector += tokens[ i ].value;
|
2227
2393
|
}
|
2228
2394
|
return selector;
|
2229
2395
|
}
|
@@ -2236,9 +2402,10 @@ function addCombinator( matcher, combinator, base ) {
|
|
2236
2402
|
doneName = done++;
|
2237
2403
|
|
2238
2404
|
return combinator.first ?
|
2405
|
+
|
2239
2406
|
// Check against closest ancestor/preceding element
|
2240
2407
|
function( elem, context, xml ) {
|
2241
|
-
while ( (elem = elem[ dir ]) ) {
|
2408
|
+
while ( ( elem = elem[ dir ] ) ) {
|
2242
2409
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
2243
2410
|
return matcher( elem, context, xml );
|
2244
2411
|
}
|
@@ -2253,7 +2420,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
2253
2420
|
|
2254
2421
|
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
|
2255
2422
|
if ( xml ) {
|
2256
|
-
while ( (elem = elem[ dir ]) ) {
|
2423
|
+
while ( ( elem = elem[ dir ] ) ) {
|
2257
2424
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
2258
2425
|
if ( matcher( elem, context, xml ) ) {
|
2259
2426
|
return true;
|
@@ -2261,27 +2428,29 @@ function addCombinator( matcher, combinator, base ) {
|
|
2261
2428
|
}
|
2262
2429
|
}
|
2263
2430
|
} else {
|
2264
|
-
while ( (elem = elem[ dir ]) ) {
|
2431
|
+
while ( ( elem = elem[ dir ] ) ) {
|
2265
2432
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
2266
|
-
outerCache = elem[ expando ] || (elem[ expando ] = {});
|
2433
|
+
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
2267
2434
|
|
2268
2435
|
// Support: IE <9 only
|
2269
2436
|
// Defend against cloned attroperties (jQuery gh-1709)
|
2270
|
-
uniqueCache = outerCache[ elem.uniqueID ] ||
|
2437
|
+
uniqueCache = outerCache[ elem.uniqueID ] ||
|
2438
|
+
( outerCache[ elem.uniqueID ] = {} );
|
2271
2439
|
|
2272
2440
|
if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
2273
2441
|
elem = elem[ dir ] || elem;
|
2274
|
-
} else if ( (oldCache = uniqueCache[ key ]) &&
|
2442
|
+
} else if ( ( oldCache = uniqueCache[ key ] ) &&
|
2275
2443
|
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
2276
2444
|
|
2277
2445
|
// Assign to newCache so results back-propagate to previous elements
|
2278
|
-
return (newCache[ 2 ] = oldCache[ 2 ]);
|
2446
|
+
return ( newCache[ 2 ] = oldCache[ 2 ] );
|
2279
2447
|
} else {
|
2448
|
+
|
2280
2449
|
// Reuse newcache so results back-propagate to previous elements
|
2281
2450
|
uniqueCache[ key ] = newCache;
|
2282
2451
|
|
2283
2452
|
// A match means we're done; a fail means we have to keep checking
|
2284
|
-
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
2453
|
+
if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
|
2285
2454
|
return true;
|
2286
2455
|
}
|
2287
2456
|
}
|
@@ -2297,20 +2466,20 @@ function elementMatcher( matchers ) {
|
|
2297
2466
|
function( elem, context, xml ) {
|
2298
2467
|
var i = matchers.length;
|
2299
2468
|
while ( i-- ) {
|
2300
|
-
if ( !matchers[i]( elem, context, xml ) ) {
|
2469
|
+
if ( !matchers[ i ]( elem, context, xml ) ) {
|
2301
2470
|
return false;
|
2302
2471
|
}
|
2303
2472
|
}
|
2304
2473
|
return true;
|
2305
2474
|
} :
|
2306
|
-
matchers[0];
|
2475
|
+
matchers[ 0 ];
|
2307
2476
|
}
|
2308
2477
|
|
2309
2478
|
function multipleContexts( selector, contexts, results ) {
|
2310
2479
|
var i = 0,
|
2311
2480
|
len = contexts.length;
|
2312
2481
|
for ( ; i < len; i++ ) {
|
2313
|
-
Sizzle( selector, contexts[i], results );
|
2482
|
+
Sizzle( selector, contexts[ i ], results );
|
2314
2483
|
}
|
2315
2484
|
return results;
|
2316
2485
|
}
|
@@ -2323,7 +2492,7 @@ function condense( unmatched, map, filter, context, xml ) {
|
|
2323
2492
|
mapped = map != null;
|
2324
2493
|
|
2325
2494
|
for ( ; i < len; i++ ) {
|
2326
|
-
if ( (elem = unmatched[i]) ) {
|
2495
|
+
if ( ( elem = unmatched[ i ] ) ) {
|
2327
2496
|
if ( !filter || filter( elem, context, xml ) ) {
|
2328
2497
|
newUnmatched.push( elem );
|
2329
2498
|
if ( mapped ) {
|
@@ -2343,14 +2512,18 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
2343
2512
|
if ( postFinder && !postFinder[ expando ] ) {
|
2344
2513
|
postFinder = setMatcher( postFinder, postSelector );
|
2345
2514
|
}
|
2346
|
-
return markFunction(function( seed, results, context, xml ) {
|
2515
|
+
return markFunction( function( seed, results, context, xml ) {
|
2347
2516
|
var temp, i, elem,
|
2348
2517
|
preMap = [],
|
2349
2518
|
postMap = [],
|
2350
2519
|
preexisting = results.length,
|
2351
2520
|
|
2352
2521
|
// Get initial elements from seed or context
|
2353
|
-
elems = seed || multipleContexts(
|
2522
|
+
elems = seed || multipleContexts(
|
2523
|
+
selector || "*",
|
2524
|
+
context.nodeType ? [ context ] : context,
|
2525
|
+
[]
|
2526
|
+
),
|
2354
2527
|
|
2355
2528
|
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
2356
2529
|
matcherIn = preFilter && ( seed || !selector ) ?
|
@@ -2358,6 +2531,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
2358
2531
|
elems,
|
2359
2532
|
|
2360
2533
|
matcherOut = matcher ?
|
2534
|
+
|
2361
2535
|
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
|
2362
2536
|
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
2363
2537
|
|
@@ -2381,8 +2555,8 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
2381
2555
|
// Un-match failing elements by moving them back to matcherIn
|
2382
2556
|
i = temp.length;
|
2383
2557
|
while ( i-- ) {
|
2384
|
-
if ( (elem = temp[i]) ) {
|
2385
|
-
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
|
2558
|
+
if ( ( elem = temp[ i ] ) ) {
|
2559
|
+
matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
|
2386
2560
|
}
|
2387
2561
|
}
|
2388
2562
|
}
|
@@ -2390,25 +2564,27 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
2390
2564
|
if ( seed ) {
|
2391
2565
|
if ( postFinder || preFilter ) {
|
2392
2566
|
if ( postFinder ) {
|
2567
|
+
|
2393
2568
|
// Get the final matcherOut by condensing this intermediate into postFinder contexts
|
2394
2569
|
temp = [];
|
2395
2570
|
i = matcherOut.length;
|
2396
2571
|
while ( i-- ) {
|
2397
|
-
if ( (elem = matcherOut[i]) ) {
|
2572
|
+
if ( ( elem = matcherOut[ i ] ) ) {
|
2573
|
+
|
2398
2574
|
// Restore matcherIn since elem is not yet a final match
|
2399
|
-
temp.push( (matcherIn[i] = elem) );
|
2575
|
+
temp.push( ( matcherIn[ i ] = elem ) );
|
2400
2576
|
}
|
2401
2577
|
}
|
2402
|
-
postFinder( null, (matcherOut = []), temp, xml );
|
2578
|
+
postFinder( null, ( matcherOut = [] ), temp, xml );
|
2403
2579
|
}
|
2404
2580
|
|
2405
2581
|
// Move matched elements from seed to results to keep them synchronized
|
2406
2582
|
i = matcherOut.length;
|
2407
2583
|
while ( i-- ) {
|
2408
|
-
if ( (elem = matcherOut[i]) &&
|
2409
|
-
(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
|
2584
|
+
if ( ( elem = matcherOut[ i ] ) &&
|
2585
|
+
( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
|
2410
2586
|
|
2411
|
-
seed[temp] = !(results[temp] = elem);
|
2587
|
+
seed[ temp ] = !( results[ temp ] = elem );
|
2412
2588
|
}
|
2413
2589
|
}
|
2414
2590
|
}
|
@@ -2426,14 +2602,14 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
2426
2602
|
push.apply( results, matcherOut );
|
2427
2603
|
}
|
2428
2604
|
}
|
2429
|
-
});
|
2605
|
+
} );
|
2430
2606
|
}
|
2431
2607
|
|
2432
2608
|
function matcherFromTokens( tokens ) {
|
2433
2609
|
var checkContext, matcher, j,
|
2434
2610
|
len = tokens.length,
|
2435
|
-
leadingRelative = Expr.relative[ tokens[0].type ],
|
2436
|
-
implicitRelative = leadingRelative || Expr.relative[" "],
|
2611
|
+
leadingRelative = Expr.relative[ tokens[ 0 ].type ],
|
2612
|
+
implicitRelative = leadingRelative || Expr.relative[ " " ],
|
2437
2613
|
i = leadingRelative ? 1 : 0,
|
2438
2614
|
|
2439
2615
|
// The foundational matcher ensures that elements are reachable from top-level context(s)
|
@@ -2445,38 +2621,43 @@ function matcherFromTokens( tokens ) {
|
|
2445
2621
|
}, implicitRelative, true ),
|
2446
2622
|
matchers = [ function( elem, context, xml ) {
|
2447
2623
|
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
2448
|
-
(checkContext = context).nodeType ?
|
2624
|
+
( checkContext = context ).nodeType ?
|
2449
2625
|
matchContext( elem, context, xml ) :
|
2450
2626
|
matchAnyContext( elem, context, xml ) );
|
2627
|
+
|
2451
2628
|
// Avoid hanging onto element (issue #299)
|
2452
2629
|
checkContext = null;
|
2453
2630
|
return ret;
|
2454
2631
|
} ];
|
2455
2632
|
|
2456
2633
|
for ( ; i < len; i++ ) {
|
2457
|
-
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
|
2458
|
-
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
|
2634
|
+
if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
|
2635
|
+
matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
|
2459
2636
|
} else {
|
2460
|
-
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
|
2637
|
+
matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
|
2461
2638
|
|
2462
2639
|
// Return special upon seeing a positional matcher
|
2463
2640
|
if ( matcher[ expando ] ) {
|
2641
|
+
|
2464
2642
|
// Find the next relative operator (if any) for proper handling
|
2465
2643
|
j = ++i;
|
2466
2644
|
for ( ; j < len; j++ ) {
|
2467
|
-
if ( Expr.relative[ tokens[j].type ] ) {
|
2645
|
+
if ( Expr.relative[ tokens[ j ].type ] ) {
|
2468
2646
|
break;
|
2469
2647
|
}
|
2470
2648
|
}
|
2471
2649
|
return setMatcher(
|
2472
2650
|
i > 1 && elementMatcher( matchers ),
|
2473
2651
|
i > 1 && toSelector(
|
2474
|
-
|
2475
|
-
|
2652
|
+
|
2653
|
+
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
2654
|
+
tokens
|
2655
|
+
.slice( 0, i - 1 )
|
2656
|
+
.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
|
2476
2657
|
).replace( rtrim, "$1" ),
|
2477
2658
|
matcher,
|
2478
2659
|
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
2479
|
-
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
2660
|
+
j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
|
2480
2661
|
j < len && toSelector( tokens )
|
2481
2662
|
);
|
2482
2663
|
}
|
@@ -2497,28 +2678,40 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
2497
2678
|
unmatched = seed && [],
|
2498
2679
|
setMatched = [],
|
2499
2680
|
contextBackup = outermostContext,
|
2681
|
+
|
2500
2682
|
// We must always have either seed elements or outermost context
|
2501
|
-
elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
|
2683
|
+
elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),
|
2684
|
+
|
2502
2685
|
// Use integer dirruns iff this is the outermost matcher
|
2503
|
-
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
|
2686
|
+
dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
|
2504
2687
|
len = elems.length;
|
2505
2688
|
|
2506
2689
|
if ( outermost ) {
|
2507
|
-
|
2690
|
+
|
2691
|
+
// Support: IE 11+, Edge 17 - 18+
|
2692
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
2693
|
+
// two documents; shallow comparisons work.
|
2694
|
+
// eslint-disable-next-line eqeqeq
|
2695
|
+
outermostContext = context == document || context || outermost;
|
2508
2696
|
}
|
2509
2697
|
|
2510
2698
|
// Add elements passing elementMatchers directly to results
|
2511
2699
|
// Support: IE<9, Safari
|
2512
2700
|
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
|
2513
|
-
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
|
2701
|
+
for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
|
2514
2702
|
if ( byElement && elem ) {
|
2515
2703
|
j = 0;
|
2516
|
-
|
2704
|
+
|
2705
|
+
// Support: IE 11+, Edge 17 - 18+
|
2706
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
2707
|
+
// two documents; shallow comparisons work.
|
2708
|
+
// eslint-disable-next-line eqeqeq
|
2709
|
+
if ( !context && elem.ownerDocument != document ) {
|
2517
2710
|
setDocument( elem );
|
2518
2711
|
xml = !documentIsHTML;
|
2519
2712
|
}
|
2520
|
-
while ( (matcher = elementMatchers[j++]) ) {
|
2521
|
-
if ( matcher( elem, context || document, xml) ) {
|
2713
|
+
while ( ( matcher = elementMatchers[ j++ ] ) ) {
|
2714
|
+
if ( matcher( elem, context || document, xml ) ) {
|
2522
2715
|
results.push( elem );
|
2523
2716
|
break;
|
2524
2717
|
}
|
@@ -2530,8 +2723,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
2530
2723
|
|
2531
2724
|
// Track unmatched elements for set filters
|
2532
2725
|
if ( bySet ) {
|
2726
|
+
|
2533
2727
|
// They will have gone through all possible matchers
|
2534
|
-
if ( (elem = !matcher && elem) ) {
|
2728
|
+
if ( ( elem = !matcher && elem ) ) {
|
2535
2729
|
matchedCount--;
|
2536
2730
|
}
|
2537
2731
|
|
@@ -2555,16 +2749,17 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
2555
2749
|
// numerically zero.
|
2556
2750
|
if ( bySet && i !== matchedCount ) {
|
2557
2751
|
j = 0;
|
2558
|
-
while ( (matcher = setMatchers[j++]) ) {
|
2752
|
+
while ( ( matcher = setMatchers[ j++ ] ) ) {
|
2559
2753
|
matcher( unmatched, setMatched, context, xml );
|
2560
2754
|
}
|
2561
2755
|
|
2562
2756
|
if ( seed ) {
|
2757
|
+
|
2563
2758
|
// Reintegrate element matches to eliminate the need for sorting
|
2564
2759
|
if ( matchedCount > 0 ) {
|
2565
2760
|
while ( i-- ) {
|
2566
|
-
if ( !(unmatched[i] || setMatched[i]) ) {
|
2567
|
-
setMatched[i] = pop.call( results );
|
2761
|
+
if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
|
2762
|
+
setMatched[ i ] = pop.call( results );
|
2568
2763
|
}
|
2569
2764
|
}
|
2570
2765
|
}
|
@@ -2605,13 +2800,14 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
|
2605
2800
|
cached = compilerCache[ selector + " " ];
|
2606
2801
|
|
2607
2802
|
if ( !cached ) {
|
2803
|
+
|
2608
2804
|
// Generate a function of recursive functions that can be used to check each element
|
2609
2805
|
if ( !match ) {
|
2610
2806
|
match = tokenize( selector );
|
2611
2807
|
}
|
2612
2808
|
i = match.length;
|
2613
2809
|
while ( i-- ) {
|
2614
|
-
cached = matcherFromTokens( match[i] );
|
2810
|
+
cached = matcherFromTokens( match[ i ] );
|
2615
2811
|
if ( cached[ expando ] ) {
|
2616
2812
|
setMatchers.push( cached );
|
2617
2813
|
} else {
|
@@ -2620,7 +2816,10 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
|
2620
2816
|
}
|
2621
2817
|
|
2622
2818
|
// Cache the compiled function
|
2623
|
-
cached = compilerCache(
|
2819
|
+
cached = compilerCache(
|
2820
|
+
selector,
|
2821
|
+
matcherFromGroupMatchers( elementMatchers, setMatchers )
|
2822
|
+
);
|
2624
2823
|
|
2625
2824
|
// Save selector and tokenization
|
2626
2825
|
cached.selector = selector;
|
@@ -2640,7 +2839,7 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
|
2640
2839
|
select = Sizzle.select = function( selector, context, results, seed ) {
|
2641
2840
|
var i, tokens, token, type, find,
|
2642
2841
|
compiled = typeof selector === "function" && selector,
|
2643
|
-
match = !seed && tokenize( (selector = compiled.selector || selector) );
|
2842
|
+
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
|
2644
2843
|
|
2645
2844
|
results = results || [];
|
2646
2845
|
|
@@ -2649,11 +2848,12 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
2649
2848
|
if ( match.length === 1 ) {
|
2650
2849
|
|
2651
2850
|
// Reduce context if the leading compound selector is an ID
|
2652
|
-
tokens = match[0] = match[0].slice( 0 );
|
2653
|
-
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
2654
|
-
|
2851
|
+
tokens = match[ 0 ] = match[ 0 ].slice( 0 );
|
2852
|
+
if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
|
2853
|
+
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
|
2655
2854
|
|
2656
|
-
context = ( Expr.find["ID"]( token.matches[0
|
2855
|
+
context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
|
2856
|
+
.replace( runescape, funescape ), context ) || [] )[ 0 ];
|
2657
2857
|
if ( !context ) {
|
2658
2858
|
return results;
|
2659
2859
|
|
@@ -2666,20 +2866,22 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
2666
2866
|
}
|
2667
2867
|
|
2668
2868
|
// Fetch a seed set for right-to-left matching
|
2669
|
-
i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
|
2869
|
+
i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
|
2670
2870
|
while ( i-- ) {
|
2671
|
-
token = tokens[i];
|
2871
|
+
token = tokens[ i ];
|
2672
2872
|
|
2673
2873
|
// Abort if we hit a combinator
|
2674
|
-
if ( Expr.relative[ (type = token.type) ] ) {
|
2874
|
+
if ( Expr.relative[ ( type = token.type ) ] ) {
|
2675
2875
|
break;
|
2676
2876
|
}
|
2677
|
-
if ( (find = Expr.find[ type ]) ) {
|
2877
|
+
if ( ( find = Expr.find[ type ] ) ) {
|
2878
|
+
|
2678
2879
|
// Search, expanding context for leading sibling combinators
|
2679
|
-
if ( (seed = find(
|
2680
|
-
token.matches[0].replace( runescape, funescape ),
|
2681
|
-
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) ||
|
2682
|
-
|
2880
|
+
if ( ( seed = find(
|
2881
|
+
token.matches[ 0 ].replace( runescape, funescape ),
|
2882
|
+
rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
|
2883
|
+
context
|
2884
|
+
) ) ) {
|
2683
2885
|
|
2684
2886
|
// If seed is empty or no tokens remain, we can return early
|
2685
2887
|
tokens.splice( i, 1 );
|
@@ -2710,7 +2912,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
2710
2912
|
// One-time assignments
|
2711
2913
|
|
2712
2914
|
// Sort stability
|
2713
|
-
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
|
2915
|
+
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
|
2714
2916
|
|
2715
2917
|
// Support: Chrome 14-35+
|
2716
2918
|
// Always assume duplicates if they aren't passed to the comparison function
|
@@ -2721,58 +2923,59 @@ setDocument();
|
|
2721
2923
|
|
2722
2924
|
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
|
2723
2925
|
// Detached nodes confoundingly follow *each other*
|
2724
|
-
support.sortDetached = assert(function( el ) {
|
2926
|
+
support.sortDetached = assert( function( el ) {
|
2927
|
+
|
2725
2928
|
// Should return 1, but returns 4 (following)
|
2726
|
-
return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
|
2727
|
-
});
|
2929
|
+
return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
|
2930
|
+
} );
|
2728
2931
|
|
2729
2932
|
// Support: IE<8
|
2730
2933
|
// Prevent attribute/property "interpolation"
|
2731
2934
|
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
2732
|
-
if ( !assert(function( el ) {
|
2935
|
+
if ( !assert( function( el ) {
|
2733
2936
|
el.innerHTML = "<a href='#'></a>";
|
2734
|
-
return el.firstChild.getAttribute("href") === "#"
|
2735
|
-
}) ) {
|
2937
|
+
return el.firstChild.getAttribute( "href" ) === "#";
|
2938
|
+
} ) ) {
|
2736
2939
|
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
2737
2940
|
if ( !isXML ) {
|
2738
2941
|
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
2739
2942
|
}
|
2740
|
-
});
|
2943
|
+
} );
|
2741
2944
|
}
|
2742
2945
|
|
2743
2946
|
// Support: IE<9
|
2744
2947
|
// Use defaultValue in place of getAttribute("value")
|
2745
|
-
if ( !support.attributes || !assert(function( el ) {
|
2948
|
+
if ( !support.attributes || !assert( function( el ) {
|
2746
2949
|
el.innerHTML = "<input/>";
|
2747
2950
|
el.firstChild.setAttribute( "value", "" );
|
2748
2951
|
return el.firstChild.getAttribute( "value" ) === "";
|
2749
|
-
}) ) {
|
2750
|
-
addHandle( "value", function( elem,
|
2952
|
+
} ) ) {
|
2953
|
+
addHandle( "value", function( elem, _name, isXML ) {
|
2751
2954
|
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
2752
2955
|
return elem.defaultValue;
|
2753
2956
|
}
|
2754
|
-
});
|
2957
|
+
} );
|
2755
2958
|
}
|
2756
2959
|
|
2757
2960
|
// Support: IE<9
|
2758
2961
|
// Use getAttributeNode to fetch booleans when getAttribute lies
|
2759
|
-
if ( !assert(function( el ) {
|
2760
|
-
return el.getAttribute("disabled") == null;
|
2761
|
-
}) ) {
|
2962
|
+
if ( !assert( function( el ) {
|
2963
|
+
return el.getAttribute( "disabled" ) == null;
|
2964
|
+
} ) ) {
|
2762
2965
|
addHandle( booleans, function( elem, name, isXML ) {
|
2763
2966
|
var val;
|
2764
2967
|
if ( !isXML ) {
|
2765
2968
|
return elem[ name ] === true ? name.toLowerCase() :
|
2766
|
-
|
2969
|
+
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
2767
2970
|
val.value :
|
2768
|
-
|
2971
|
+
null;
|
2769
2972
|
}
|
2770
|
-
});
|
2973
|
+
} );
|
2771
2974
|
}
|
2772
2975
|
|
2773
2976
|
return Sizzle;
|
2774
2977
|
|
2775
|
-
})( window );
|
2978
|
+
} )( window );
|
2776
2979
|
|
2777
2980
|
|
2778
2981
|
|
@@ -2825,9 +3028,9 @@ var rneedsContext = jQuery.expr.match.needsContext;
|
|
2825
3028
|
|
2826
3029
|
function nodeName( elem, name ) {
|
2827
3030
|
|
2828
|
-
|
3031
|
+
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
2829
3032
|
|
2830
|
-
}
|
3033
|
+
}
|
2831
3034
|
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
2832
3035
|
|
2833
3036
|
|
@@ -3141,7 +3344,7 @@ jQuery.each( {
|
|
3141
3344
|
parents: function( elem ) {
|
3142
3345
|
return dir( elem, "parentNode" );
|
3143
3346
|
},
|
3144
|
-
parentsUntil: function( elem,
|
3347
|
+
parentsUntil: function( elem, _i, until ) {
|
3145
3348
|
return dir( elem, "parentNode", until );
|
3146
3349
|
},
|
3147
3350
|
next: function( elem ) {
|
@@ -3156,10 +3359,10 @@ jQuery.each( {
|
|
3156
3359
|
prevAll: function( elem ) {
|
3157
3360
|
return dir( elem, "previousSibling" );
|
3158
3361
|
},
|
3159
|
-
nextUntil: function( elem,
|
3362
|
+
nextUntil: function( elem, _i, until ) {
|
3160
3363
|
return dir( elem, "nextSibling", until );
|
3161
3364
|
},
|
3162
|
-
prevUntil: function( elem,
|
3365
|
+
prevUntil: function( elem, _i, until ) {
|
3163
3366
|
return dir( elem, "previousSibling", until );
|
3164
3367
|
},
|
3165
3368
|
siblings: function( elem ) {
|
@@ -3169,7 +3372,13 @@ jQuery.each( {
|
|
3169
3372
|
return siblings( elem.firstChild );
|
3170
3373
|
},
|
3171
3374
|
contents: function( elem ) {
|
3172
|
-
if (
|
3375
|
+
if ( elem.contentDocument != null &&
|
3376
|
+
|
3377
|
+
// Support: IE 11+
|
3378
|
+
// <object> elements with no `data` attribute has an object
|
3379
|
+
// `contentDocument` with a `null` prototype.
|
3380
|
+
getProto( elem.contentDocument ) ) {
|
3381
|
+
|
3173
3382
|
return elem.contentDocument;
|
3174
3383
|
}
|
3175
3384
|
|
@@ -3512,7 +3721,7 @@ jQuery.extend( {
|
|
3512
3721
|
var fns = arguments;
|
3513
3722
|
|
3514
3723
|
return jQuery.Deferred( function( newDefer ) {
|
3515
|
-
jQuery.each( tuples, function(
|
3724
|
+
jQuery.each( tuples, function( _i, tuple ) {
|
3516
3725
|
|
3517
3726
|
// Map tuples (progress, done, fail) to arguments (done, fail, progress)
|
3518
3727
|
var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
|
@@ -3792,8 +4001,8 @@ jQuery.extend( {
|
|
3792
4001
|
resolveContexts = Array( i ),
|
3793
4002
|
resolveValues = slice.call( arguments ),
|
3794
4003
|
|
3795
|
-
// the
|
3796
|
-
|
4004
|
+
// the primary Deferred
|
4005
|
+
primary = jQuery.Deferred(),
|
3797
4006
|
|
3798
4007
|
// subordinate callback factory
|
3799
4008
|
updateFunc = function( i ) {
|
@@ -3801,30 +4010,30 @@ jQuery.extend( {
|
|
3801
4010
|
resolveContexts[ i ] = this;
|
3802
4011
|
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
3803
4012
|
if ( !( --remaining ) ) {
|
3804
|
-
|
4013
|
+
primary.resolveWith( resolveContexts, resolveValues );
|
3805
4014
|
}
|
3806
4015
|
};
|
3807
4016
|
};
|
3808
4017
|
|
3809
4018
|
// Single- and empty arguments are adopted like Promise.resolve
|
3810
4019
|
if ( remaining <= 1 ) {
|
3811
|
-
adoptValue( singleValue,
|
4020
|
+
adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
|
3812
4021
|
!remaining );
|
3813
4022
|
|
3814
4023
|
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
3815
|
-
if (
|
4024
|
+
if ( primary.state() === "pending" ||
|
3816
4025
|
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
3817
4026
|
|
3818
|
-
return
|
4027
|
+
return primary.then();
|
3819
4028
|
}
|
3820
4029
|
}
|
3821
4030
|
|
3822
4031
|
// Multiple arguments are aggregated like Promise.all array elements
|
3823
4032
|
while ( i-- ) {
|
3824
|
-
adoptValue( resolveValues[ i ], updateFunc( i ),
|
4033
|
+
adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
|
3825
4034
|
}
|
3826
4035
|
|
3827
|
-
return
|
4036
|
+
return primary.promise();
|
3828
4037
|
}
|
3829
4038
|
} );
|
3830
4039
|
|
@@ -3965,7 +4174,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
|
3965
4174
|
// ...except when executing function values
|
3966
4175
|
} else {
|
3967
4176
|
bulk = fn;
|
3968
|
-
fn = function( elem,
|
4177
|
+
fn = function( elem, _key, value ) {
|
3969
4178
|
return bulk.call( jQuery( elem ), value );
|
3970
4179
|
};
|
3971
4180
|
}
|
@@ -3975,8 +4184,8 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
|
3975
4184
|
for ( ; i < len; i++ ) {
|
3976
4185
|
fn(
|
3977
4186
|
elems[ i ], key, raw ?
|
3978
|
-
|
3979
|
-
|
4187
|
+
value :
|
4188
|
+
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
3980
4189
|
);
|
3981
4190
|
}
|
3982
4191
|
}
|
@@ -4000,7 +4209,7 @@ var rmsPrefix = /^-ms-/,
|
|
4000
4209
|
rdashAlpha = /-([a-z])/g;
|
4001
4210
|
|
4002
4211
|
// Used by camelCase as callback to replace()
|
4003
|
-
function fcamelCase(
|
4212
|
+
function fcamelCase( _all, letter ) {
|
4004
4213
|
return letter.toUpperCase();
|
4005
4214
|
}
|
4006
4215
|
|
@@ -4498,8 +4707,12 @@ var documentElement = document.documentElement;
|
|
4498
4707
|
},
|
4499
4708
|
composed = { composed: true };
|
4500
4709
|
|
4710
|
+
// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
|
4501
4711
|
// Check attachment across shadow DOM boundaries when possible (gh-3504)
|
4502
|
-
|
4712
|
+
// Support: iOS 10.0-10.2 only
|
4713
|
+
// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
|
4714
|
+
// leading to errors. We need to check for `getRootNode`.
|
4715
|
+
if ( documentElement.getRootNode ) {
|
4503
4716
|
isAttached = function( elem ) {
|
4504
4717
|
return jQuery.contains( elem.ownerDocument, elem ) ||
|
4505
4718
|
elem.getRootNode( composed ) === elem.ownerDocument;
|
@@ -4524,27 +4737,6 @@ var isHiddenWithinTree = function( elem, el ) {
|
|
4524
4737
|
jQuery.css( elem, "display" ) === "none";
|
4525
4738
|
};
|
4526
4739
|
|
4527
|
-
var swap = function( elem, options, callback, args ) {
|
4528
|
-
var ret, name,
|
4529
|
-
old = {};
|
4530
|
-
|
4531
|
-
// Remember the old values, and insert the new ones
|
4532
|
-
for ( name in options ) {
|
4533
|
-
old[ name ] = elem.style[ name ];
|
4534
|
-
elem.style[ name ] = options[ name ];
|
4535
|
-
}
|
4536
|
-
|
4537
|
-
ret = callback.apply( elem, args || [] );
|
4538
|
-
|
4539
|
-
// Revert the old values
|
4540
|
-
for ( name in options ) {
|
4541
|
-
elem.style[ name ] = old[ name ];
|
4542
|
-
}
|
4543
|
-
|
4544
|
-
return ret;
|
4545
|
-
};
|
4546
|
-
|
4547
|
-
|
4548
4740
|
|
4549
4741
|
|
4550
4742
|
function adjustCSS( elem, prop, valueParts, tween ) {
|
@@ -4715,11 +4907,40 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
|
4715
4907
|
|
4716
4908
|
|
4717
4909
|
|
4718
|
-
|
4719
|
-
var
|
4910
|
+
( function() {
|
4911
|
+
var fragment = document.createDocumentFragment(),
|
4912
|
+
div = fragment.appendChild( document.createElement( "div" ) ),
|
4913
|
+
input = document.createElement( "input" );
|
4914
|
+
|
4915
|
+
// Support: Android 4.0 - 4.3 only
|
4916
|
+
// Check state lost if the name is set (#11217)
|
4917
|
+
// Support: Windows Web Apps (WWA)
|
4918
|
+
// `name` and `type` must use .setAttribute for WWA (#14901)
|
4919
|
+
input.setAttribute( "type", "radio" );
|
4920
|
+
input.setAttribute( "checked", "checked" );
|
4921
|
+
input.setAttribute( "name", "t" );
|
4922
|
+
|
4923
|
+
div.appendChild( input );
|
4924
|
+
|
4925
|
+
// Support: Android <=4.1 only
|
4926
|
+
// Older WebKit doesn't clone checked state correctly in fragments
|
4927
|
+
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
4928
|
+
|
4929
|
+
// Support: IE <=11 only
|
4930
|
+
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
4931
|
+
div.innerHTML = "<textarea>x</textarea>";
|
4932
|
+
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4720
4933
|
|
4721
4934
|
// Support: IE <=9 only
|
4722
|
-
|
4935
|
+
// IE <=9 replaces <option> tags with their contents when inserted outside of
|
4936
|
+
// the select element.
|
4937
|
+
div.innerHTML = "<option></option>";
|
4938
|
+
support.option = !!div.lastChild;
|
4939
|
+
} )();
|
4940
|
+
|
4941
|
+
|
4942
|
+
// We have to close these tags to support XHTML (#13200)
|
4943
|
+
var wrapMap = {
|
4723
4944
|
|
4724
4945
|
// XHTML parsers do not magically insert elements in the
|
4725
4946
|
// same way that tag soup parsers do. So we cannot shorten
|
@@ -4732,12 +4953,14 @@ var wrapMap = {
|
|
4732
4953
|
_default: [ 0, "", "" ]
|
4733
4954
|
};
|
4734
4955
|
|
4735
|
-
// Support: IE <=9 only
|
4736
|
-
wrapMap.optgroup = wrapMap.option;
|
4737
|
-
|
4738
4956
|
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
4739
4957
|
wrapMap.th = wrapMap.td;
|
4740
4958
|
|
4959
|
+
// Support: IE <=9 only
|
4960
|
+
if ( !support.option ) {
|
4961
|
+
wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
|
4962
|
+
}
|
4963
|
+
|
4741
4964
|
|
4742
4965
|
function getAll( context, tag ) {
|
4743
4966
|
|
@@ -4870,36 +5093,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4870
5093
|
}
|
4871
5094
|
|
4872
5095
|
|
4873
|
-
|
4874
|
-
var fragment = document.createDocumentFragment(),
|
4875
|
-
div = fragment.appendChild( document.createElement( "div" ) ),
|
4876
|
-
input = document.createElement( "input" );
|
4877
|
-
|
4878
|
-
// Support: Android 4.0 - 4.3 only
|
4879
|
-
// Check state lost if the name is set (#11217)
|
4880
|
-
// Support: Windows Web Apps (WWA)
|
4881
|
-
// `name` and `type` must use .setAttribute for WWA (#14901)
|
4882
|
-
input.setAttribute( "type", "radio" );
|
4883
|
-
input.setAttribute( "checked", "checked" );
|
4884
|
-
input.setAttribute( "name", "t" );
|
4885
|
-
|
4886
|
-
div.appendChild( input );
|
4887
|
-
|
4888
|
-
// Support: Android <=4.1 only
|
4889
|
-
// Older WebKit doesn't clone checked state correctly in fragments
|
4890
|
-
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
4891
|
-
|
4892
|
-
// Support: IE <=11 only
|
4893
|
-
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
4894
|
-
div.innerHTML = "<textarea>x</textarea>";
|
4895
|
-
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4896
|
-
} )();
|
4897
|
-
|
4898
|
-
|
4899
|
-
var
|
4900
|
-
rkeyEvent = /^key/,
|
4901
|
-
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
4902
|
-
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
5096
|
+
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
4903
5097
|
|
4904
5098
|
function returnTrue() {
|
4905
5099
|
return true;
|
@@ -5004,8 +5198,8 @@ jQuery.event = {
|
|
5004
5198
|
special, handlers, type, namespaces, origType,
|
5005
5199
|
elemData = dataPriv.get( elem );
|
5006
5200
|
|
5007
|
-
//
|
5008
|
-
if ( !
|
5201
|
+
// Only attach events to objects that accept data
|
5202
|
+
if ( !acceptData( elem ) ) {
|
5009
5203
|
return;
|
5010
5204
|
}
|
5011
5205
|
|
@@ -5029,7 +5223,7 @@ jQuery.event = {
|
|
5029
5223
|
|
5030
5224
|
// Init the element's event structure and main handler, if this is the first
|
5031
5225
|
if ( !( events = elemData.events ) ) {
|
5032
|
-
events = elemData.events =
|
5226
|
+
events = elemData.events = Object.create( null );
|
5033
5227
|
}
|
5034
5228
|
if ( !( eventHandle = elemData.handle ) ) {
|
5035
5229
|
eventHandle = elemData.handle = function( e ) {
|
@@ -5187,12 +5381,15 @@ jQuery.event = {
|
|
5187
5381
|
|
5188
5382
|
dispatch: function( nativeEvent ) {
|
5189
5383
|
|
5190
|
-
// Make a writable jQuery.Event from the native event object
|
5191
|
-
var event = jQuery.event.fix( nativeEvent );
|
5192
|
-
|
5193
5384
|
var i, j, ret, matched, handleObj, handlerQueue,
|
5194
5385
|
args = new Array( arguments.length ),
|
5195
|
-
|
5386
|
+
|
5387
|
+
// Make a writable jQuery.Event from the native event object
|
5388
|
+
event = jQuery.event.fix( nativeEvent ),
|
5389
|
+
|
5390
|
+
handlers = (
|
5391
|
+
dataPriv.get( this, "events" ) || Object.create( null )
|
5392
|
+
)[ event.type ] || [],
|
5196
5393
|
special = jQuery.event.special[ event.type ] || {};
|
5197
5394
|
|
5198
5395
|
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
@@ -5316,12 +5513,12 @@ jQuery.event = {
|
|
5316
5513
|
get: isFunction( hook ) ?
|
5317
5514
|
function() {
|
5318
5515
|
if ( this.originalEvent ) {
|
5319
|
-
|
5516
|
+
return hook( this.originalEvent );
|
5320
5517
|
}
|
5321
5518
|
} :
|
5322
5519
|
function() {
|
5323
5520
|
if ( this.originalEvent ) {
|
5324
|
-
|
5521
|
+
return this.originalEvent[ name ];
|
5325
5522
|
}
|
5326
5523
|
},
|
5327
5524
|
|
@@ -5359,8 +5556,7 @@ jQuery.event = {
|
|
5359
5556
|
|
5360
5557
|
// Claim the first handler
|
5361
5558
|
if ( rcheckableType.test( el.type ) &&
|
5362
|
-
el.click && nodeName( el, "input" )
|
5363
|
-
dataPriv.get( el, "click" ) === undefined ) {
|
5559
|
+
el.click && nodeName( el, "input" ) ) {
|
5364
5560
|
|
5365
5561
|
// dataPriv.set( el, "click", ... )
|
5366
5562
|
leverageNative( el, "click", returnTrue );
|
@@ -5377,8 +5573,7 @@ jQuery.event = {
|
|
5377
5573
|
|
5378
5574
|
// Force setup before triggering a click
|
5379
5575
|
if ( rcheckableType.test( el.type ) &&
|
5380
|
-
el.click && nodeName( el, "input" )
|
5381
|
-
dataPriv.get( el, "click" ) === undefined ) {
|
5576
|
+
el.click && nodeName( el, "input" ) ) {
|
5382
5577
|
|
5383
5578
|
leverageNative( el, "click" );
|
5384
5579
|
}
|
@@ -5419,7 +5614,9 @@ function leverageNative( el, type, expectSync ) {
|
|
5419
5614
|
|
5420
5615
|
// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
|
5421
5616
|
if ( !expectSync ) {
|
5422
|
-
|
5617
|
+
if ( dataPriv.get( el, type ) === undefined ) {
|
5618
|
+
jQuery.event.add( el, type, returnTrue );
|
5619
|
+
}
|
5423
5620
|
return;
|
5424
5621
|
}
|
5425
5622
|
|
@@ -5434,9 +5631,13 @@ function leverageNative( el, type, expectSync ) {
|
|
5434
5631
|
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
|
5435
5632
|
|
5436
5633
|
// Interrupt processing of the outer synthetic .trigger()ed event
|
5437
|
-
|
5634
|
+
// Saved data should be false in such cases, but might be a leftover capture object
|
5635
|
+
// from an async native handler (gh-4350)
|
5636
|
+
if ( !saved.length ) {
|
5438
5637
|
|
5439
5638
|
// Store arguments for use when handling the inner native event
|
5639
|
+
// There will always be at least one argument (an event object), so this array
|
5640
|
+
// will not be confused with a leftover capture object.
|
5440
5641
|
saved = slice.call( arguments );
|
5441
5642
|
dataPriv.set( this, type, saved );
|
5442
5643
|
|
@@ -5449,14 +5650,20 @@ function leverageNative( el, type, expectSync ) {
|
|
5449
5650
|
if ( saved !== result || notAsync ) {
|
5450
5651
|
dataPriv.set( this, type, false );
|
5451
5652
|
} else {
|
5452
|
-
result =
|
5653
|
+
result = {};
|
5453
5654
|
}
|
5454
5655
|
if ( saved !== result ) {
|
5455
5656
|
|
5456
5657
|
// Cancel the outer synthetic event
|
5457
5658
|
event.stopImmediatePropagation();
|
5458
5659
|
event.preventDefault();
|
5459
|
-
|
5660
|
+
|
5661
|
+
// Support: Chrome 86+
|
5662
|
+
// In Chrome, if an element having a focusout handler is blurred by
|
5663
|
+
// clicking outside of it, it invokes the handler synchronously. If
|
5664
|
+
// that handler calls `.remove()` on the element, the data is cleared,
|
5665
|
+
// leaving `result` undefined. We need to guard against this.
|
5666
|
+
return result && result.value;
|
5460
5667
|
}
|
5461
5668
|
|
5462
5669
|
// If this is an inner synthetic event for an event with a bubbling surrogate
|
@@ -5471,17 +5678,19 @@ function leverageNative( el, type, expectSync ) {
|
|
5471
5678
|
|
5472
5679
|
// If this is a native event triggered above, everything is now in order
|
5473
5680
|
// Fire an inner synthetic event with the original arguments
|
5474
|
-
} else if ( saved ) {
|
5681
|
+
} else if ( saved.length ) {
|
5475
5682
|
|
5476
5683
|
// ...and capture the result
|
5477
|
-
dataPriv.set( this, type,
|
5478
|
-
|
5479
|
-
|
5480
|
-
|
5481
|
-
|
5482
|
-
|
5483
|
-
|
5484
|
-
|
5684
|
+
dataPriv.set( this, type, {
|
5685
|
+
value: jQuery.event.trigger(
|
5686
|
+
|
5687
|
+
// Support: IE <=9 - 11+
|
5688
|
+
// Extend with the prototype to reset the above stopImmediatePropagation()
|
5689
|
+
jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
|
5690
|
+
saved.slice( 1 ),
|
5691
|
+
this
|
5692
|
+
)
|
5693
|
+
} );
|
5485
5694
|
|
5486
5695
|
// Abort handling of the native event
|
5487
5696
|
event.stopImmediatePropagation();
|
@@ -5619,34 +5828,7 @@ jQuery.each( {
|
|
5619
5828
|
targetTouches: true,
|
5620
5829
|
toElement: true,
|
5621
5830
|
touches: true,
|
5622
|
-
|
5623
|
-
which: function( event ) {
|
5624
|
-
var button = event.button;
|
5625
|
-
|
5626
|
-
// Add which for key events
|
5627
|
-
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
5628
|
-
return event.charCode != null ? event.charCode : event.keyCode;
|
5629
|
-
}
|
5630
|
-
|
5631
|
-
// Add which for click: 1 === left; 2 === middle; 3 === right
|
5632
|
-
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
5633
|
-
if ( button & 1 ) {
|
5634
|
-
return 1;
|
5635
|
-
}
|
5636
|
-
|
5637
|
-
if ( button & 2 ) {
|
5638
|
-
return 3;
|
5639
|
-
}
|
5640
|
-
|
5641
|
-
if ( button & 4 ) {
|
5642
|
-
return 2;
|
5643
|
-
}
|
5644
|
-
|
5645
|
-
return 0;
|
5646
|
-
}
|
5647
|
-
|
5648
|
-
return event.which;
|
5649
|
-
}
|
5831
|
+
which: true
|
5650
5832
|
}, jQuery.event.addProp );
|
5651
5833
|
|
5652
5834
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
@@ -5672,6 +5854,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|
5672
5854
|
return true;
|
5673
5855
|
},
|
5674
5856
|
|
5857
|
+
// Suppress native focus or blur as it's already being fired
|
5858
|
+
// in leverageNative.
|
5859
|
+
_default: function() {
|
5860
|
+
return true;
|
5861
|
+
},
|
5862
|
+
|
5675
5863
|
delegateType: delegateType
|
5676
5864
|
};
|
5677
5865
|
} );
|
@@ -5761,13 +5949,6 @@ jQuery.fn.extend( {
|
|
5761
5949
|
|
5762
5950
|
var
|
5763
5951
|
|
5764
|
-
/* eslint-disable max-len */
|
5765
|
-
|
5766
|
-
// See https://github.com/eslint/eslint/issues/3229
|
5767
|
-
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
5768
|
-
|
5769
|
-
/* eslint-enable */
|
5770
|
-
|
5771
5952
|
// Support: IE <=10 - 11, Edge 12 - 13 only
|
5772
5953
|
// In IE/Edge using regex groups here causes severe slowdowns.
|
5773
5954
|
// See https://connect.microsoft.com/IE/feedback/details/1736512/
|
@@ -5804,7 +5985,7 @@ function restoreScript( elem ) {
|
|
5804
5985
|
}
|
5805
5986
|
|
5806
5987
|
function cloneCopyEvent( src, dest ) {
|
5807
|
-
var i, l, type, pdataOld,
|
5988
|
+
var i, l, type, pdataOld, udataOld, udataCur, events;
|
5808
5989
|
|
5809
5990
|
if ( dest.nodeType !== 1 ) {
|
5810
5991
|
return;
|
@@ -5812,13 +5993,11 @@ function cloneCopyEvent( src, dest ) {
|
|
5812
5993
|
|
5813
5994
|
// 1. Copy private data: events, handlers, etc.
|
5814
5995
|
if ( dataPriv.hasData( src ) ) {
|
5815
|
-
pdataOld = dataPriv.
|
5816
|
-
pdataCur = dataPriv.set( dest, pdataOld );
|
5996
|
+
pdataOld = dataPriv.get( src );
|
5817
5997
|
events = pdataOld.events;
|
5818
5998
|
|
5819
5999
|
if ( events ) {
|
5820
|
-
|
5821
|
-
pdataCur.events = {};
|
6000
|
+
dataPriv.remove( dest, "handle events" );
|
5822
6001
|
|
5823
6002
|
for ( type in events ) {
|
5824
6003
|
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
@@ -5854,7 +6033,7 @@ function fixInput( src, dest ) {
|
|
5854
6033
|
function domManip( collection, args, callback, ignored ) {
|
5855
6034
|
|
5856
6035
|
// Flatten any nested arrays
|
5857
|
-
args =
|
6036
|
+
args = flat( args );
|
5858
6037
|
|
5859
6038
|
var fragment, first, scripts, hasScripts, node, doc,
|
5860
6039
|
i = 0,
|
@@ -5929,7 +6108,7 @@ function domManip( collection, args, callback, ignored ) {
|
|
5929
6108
|
if ( jQuery._evalUrl && !node.noModule ) {
|
5930
6109
|
jQuery._evalUrl( node.src, {
|
5931
6110
|
nonce: node.nonce || node.getAttribute( "nonce" )
|
5932
|
-
} );
|
6111
|
+
}, doc );
|
5933
6112
|
}
|
5934
6113
|
} else {
|
5935
6114
|
DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
|
@@ -5966,7 +6145,7 @@ function remove( elem, selector, keepData ) {
|
|
5966
6145
|
|
5967
6146
|
jQuery.extend( {
|
5968
6147
|
htmlPrefilter: function( html ) {
|
5969
|
-
return html
|
6148
|
+
return html;
|
5970
6149
|
},
|
5971
6150
|
|
5972
6151
|
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
@@ -6228,6 +6407,27 @@ var getStyles = function( elem ) {
|
|
6228
6407
|
return view.getComputedStyle( elem );
|
6229
6408
|
};
|
6230
6409
|
|
6410
|
+
var swap = function( elem, options, callback ) {
|
6411
|
+
var ret, name,
|
6412
|
+
old = {};
|
6413
|
+
|
6414
|
+
// Remember the old values, and insert the new ones
|
6415
|
+
for ( name in options ) {
|
6416
|
+
old[ name ] = elem.style[ name ];
|
6417
|
+
elem.style[ name ] = options[ name ];
|
6418
|
+
}
|
6419
|
+
|
6420
|
+
ret = callback.call( elem );
|
6421
|
+
|
6422
|
+
// Revert the old values
|
6423
|
+
for ( name in options ) {
|
6424
|
+
elem.style[ name ] = old[ name ];
|
6425
|
+
}
|
6426
|
+
|
6427
|
+
return ret;
|
6428
|
+
};
|
6429
|
+
|
6430
|
+
|
6231
6431
|
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
6232
6432
|
|
6233
6433
|
|
@@ -6285,7 +6485,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
6285
6485
|
}
|
6286
6486
|
|
6287
6487
|
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
|
6288
|
-
reliableMarginLeftVal,
|
6488
|
+
reliableTrDimensionsVal, reliableMarginLeftVal,
|
6289
6489
|
container = document.createElement( "div" ),
|
6290
6490
|
div = document.createElement( "div" );
|
6291
6491
|
|
@@ -6320,6 +6520,54 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
6320
6520
|
scrollboxSize: function() {
|
6321
6521
|
computeStyleTests();
|
6322
6522
|
return scrollboxSizeVal;
|
6523
|
+
},
|
6524
|
+
|
6525
|
+
// Support: IE 9 - 11+, Edge 15 - 18+
|
6526
|
+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
|
6527
|
+
// set in CSS while `offset*` properties report correct values.
|
6528
|
+
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
6529
|
+
// some versions of this test; make sure not to make it pass there!
|
6530
|
+
//
|
6531
|
+
// Support: Firefox 70+
|
6532
|
+
// Only Firefox includes border widths
|
6533
|
+
// in computed dimensions. (gh-4529)
|
6534
|
+
reliableTrDimensions: function() {
|
6535
|
+
var table, tr, trChild, trStyle;
|
6536
|
+
if ( reliableTrDimensionsVal == null ) {
|
6537
|
+
table = document.createElement( "table" );
|
6538
|
+
tr = document.createElement( "tr" );
|
6539
|
+
trChild = document.createElement( "div" );
|
6540
|
+
|
6541
|
+
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
6542
|
+
tr.style.cssText = "border:1px solid";
|
6543
|
+
|
6544
|
+
// Support: Chrome 86+
|
6545
|
+
// Height set through cssText does not get applied.
|
6546
|
+
// Computed height then comes back as 0.
|
6547
|
+
tr.style.height = "1px";
|
6548
|
+
trChild.style.height = "9px";
|
6549
|
+
|
6550
|
+
// Support: Android 8 Chrome 86+
|
6551
|
+
// In our bodyBackground.html iframe,
|
6552
|
+
// display for all div elements is set to "inline",
|
6553
|
+
// which causes a problem only in Android 8 Chrome 86.
|
6554
|
+
// Ensuring the div is display: block
|
6555
|
+
// gets around this issue.
|
6556
|
+
trChild.style.display = "block";
|
6557
|
+
|
6558
|
+
documentElement
|
6559
|
+
.appendChild( table )
|
6560
|
+
.appendChild( tr )
|
6561
|
+
.appendChild( trChild );
|
6562
|
+
|
6563
|
+
trStyle = window.getComputedStyle( tr );
|
6564
|
+
reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
|
6565
|
+
parseInt( trStyle.borderTopWidth, 10 ) +
|
6566
|
+
parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
|
6567
|
+
|
6568
|
+
documentElement.removeChild( table );
|
6569
|
+
}
|
6570
|
+
return reliableTrDimensionsVal;
|
6323
6571
|
}
|
6324
6572
|
} );
|
6325
6573
|
} )();
|
@@ -6444,7 +6692,7 @@ var
|
|
6444
6692
|
fontWeight: "400"
|
6445
6693
|
};
|
6446
6694
|
|
6447
|
-
function setPositiveNumber(
|
6695
|
+
function setPositiveNumber( _elem, value, subtract ) {
|
6448
6696
|
|
6449
6697
|
// Any relative (+/-) values have already been
|
6450
6698
|
// normalized at this point
|
@@ -6549,17 +6797,26 @@ function getWidthOrHeight( elem, dimension, extra ) {
|
|
6549
6797
|
}
|
6550
6798
|
|
6551
6799
|
|
6552
|
-
//
|
6553
|
-
//
|
6554
|
-
//
|
6555
|
-
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
|
6556
|
-
// Support: IE 9-11 only
|
6557
|
-
// Also use offsetWidth/offsetHeight for when box sizing is unreliable
|
6558
|
-
// We use getClientRects() to check for hidden/disconnected.
|
6559
|
-
// In those cases, the computed value can be trusted to be border-box
|
6800
|
+
// Support: IE 9 - 11 only
|
6801
|
+
// Use offsetWidth/offsetHeight for when box sizing is unreliable.
|
6802
|
+
// In those cases, the computed value can be trusted to be border-box.
|
6560
6803
|
if ( ( !support.boxSizingReliable() && isBorderBox ||
|
6804
|
+
|
6805
|
+
// Support: IE 10 - 11+, Edge 15 - 18+
|
6806
|
+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
|
6807
|
+
// set in CSS while `offset*` properties report correct values.
|
6808
|
+
// Interestingly, in some cases IE 9 doesn't suffer from this issue.
|
6809
|
+
!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
|
6810
|
+
|
6811
|
+
// Fall back to offsetWidth/offsetHeight when value is "auto"
|
6812
|
+
// This happens for inline elements with no explicit setting (gh-3571)
|
6561
6813
|
val === "auto" ||
|
6814
|
+
|
6815
|
+
// Support: Android <=4.1 - 4.3 only
|
6816
|
+
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
|
6562
6817
|
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
|
6818
|
+
|
6819
|
+
// Make sure the element is visible & connected
|
6563
6820
|
elem.getClientRects().length ) {
|
6564
6821
|
|
6565
6822
|
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
@@ -6754,7 +7011,7 @@ jQuery.extend( {
|
|
6754
7011
|
}
|
6755
7012
|
} );
|
6756
7013
|
|
6757
|
-
jQuery.each( [ "height", "width" ], function(
|
7014
|
+
jQuery.each( [ "height", "width" ], function( _i, dimension ) {
|
6758
7015
|
jQuery.cssHooks[ dimension ] = {
|
6759
7016
|
get: function( elem, computed, extra ) {
|
6760
7017
|
if ( computed ) {
|
@@ -6770,10 +7027,10 @@ jQuery.each( [ "height", "width" ], function( i, dimension ) {
|
|
6770
7027
|
// Running getBoundingClientRect on a disconnected node
|
6771
7028
|
// in IE throws an error.
|
6772
7029
|
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
6773
|
-
|
6774
|
-
|
6775
|
-
|
6776
|
-
|
7030
|
+
swap( elem, cssShow, function() {
|
7031
|
+
return getWidthOrHeight( elem, dimension, extra );
|
7032
|
+
} ) :
|
7033
|
+
getWidthOrHeight( elem, dimension, extra );
|
6777
7034
|
}
|
6778
7035
|
},
|
6779
7036
|
|
@@ -6832,7 +7089,7 @@ jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
|
6832
7089
|
swap( elem, { marginLeft: 0 }, function() {
|
6833
7090
|
return elem.getBoundingClientRect().left;
|
6834
7091
|
} )
|
6835
|
-
|
7092
|
+
) + "px";
|
6836
7093
|
}
|
6837
7094
|
}
|
6838
7095
|
);
|
@@ -6971,7 +7228,7 @@ Tween.propHooks = {
|
|
6971
7228
|
if ( jQuery.fx.step[ tween.prop ] ) {
|
6972
7229
|
jQuery.fx.step[ tween.prop ]( tween );
|
6973
7230
|
} else if ( tween.elem.nodeType === 1 && (
|
6974
|
-
|
7231
|
+
jQuery.cssHooks[ tween.prop ] ||
|
6975
7232
|
tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
6976
7233
|
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
6977
7234
|
} else {
|
@@ -7216,7 +7473,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|
7216
7473
|
|
7217
7474
|
anim.done( function() {
|
7218
7475
|
|
7219
|
-
|
7476
|
+
/* eslint-enable no-loop-func */
|
7220
7477
|
|
7221
7478
|
// The final step of a "hide" animation is actually hiding the element
|
7222
7479
|
if ( !hidden ) {
|
@@ -7336,7 +7593,7 @@ function Animation( elem, properties, options ) {
|
|
7336
7593
|
tweens: [],
|
7337
7594
|
createTween: function( prop, end ) {
|
7338
7595
|
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
7339
|
-
|
7596
|
+
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
7340
7597
|
animation.tweens.push( tween );
|
7341
7598
|
return tween;
|
7342
7599
|
},
|
@@ -7509,7 +7766,8 @@ jQuery.fn.extend( {
|
|
7509
7766
|
anim.stop( true );
|
7510
7767
|
}
|
7511
7768
|
};
|
7512
|
-
|
7769
|
+
|
7770
|
+
doAnimation.finish = doAnimation;
|
7513
7771
|
|
7514
7772
|
return empty || optall.queue === false ?
|
7515
7773
|
this.each( doAnimation ) :
|
@@ -7527,7 +7785,7 @@ jQuery.fn.extend( {
|
|
7527
7785
|
clearQueue = type;
|
7528
7786
|
type = undefined;
|
7529
7787
|
}
|
7530
|
-
if ( clearQueue
|
7788
|
+
if ( clearQueue ) {
|
7531
7789
|
this.queue( type || "fx", [] );
|
7532
7790
|
}
|
7533
7791
|
|
@@ -7610,7 +7868,7 @@ jQuery.fn.extend( {
|
|
7610
7868
|
}
|
7611
7869
|
} );
|
7612
7870
|
|
7613
|
-
jQuery.each( [ "toggle", "show", "hide" ], function(
|
7871
|
+
jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
|
7614
7872
|
var cssFn = jQuery.fn[ name ];
|
7615
7873
|
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7616
7874
|
return speed == null || typeof speed === "boolean" ?
|
@@ -7831,7 +8089,7 @@ boolHook = {
|
|
7831
8089
|
}
|
7832
8090
|
};
|
7833
8091
|
|
7834
|
-
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function(
|
8092
|
+
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
|
7835
8093
|
var getter = attrHandle[ name ] || jQuery.find.attr;
|
7836
8094
|
|
7837
8095
|
attrHandle[ name ] = function( elem, name, isXML ) {
|
@@ -8149,8 +8407,8 @@ jQuery.fn.extend( {
|
|
8149
8407
|
if ( this.setAttribute ) {
|
8150
8408
|
this.setAttribute( "class",
|
8151
8409
|
className || value === false ?
|
8152
|
-
|
8153
|
-
|
8410
|
+
"" :
|
8411
|
+
dataPriv.get( this, "__className__" ) || ""
|
8154
8412
|
);
|
8155
8413
|
}
|
8156
8414
|
}
|
@@ -8165,7 +8423,7 @@ jQuery.fn.extend( {
|
|
8165
8423
|
while ( ( elem = this[ i++ ] ) ) {
|
8166
8424
|
if ( elem.nodeType === 1 &&
|
8167
8425
|
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
8168
|
-
|
8426
|
+
return true;
|
8169
8427
|
}
|
8170
8428
|
}
|
8171
8429
|
|
@@ -8455,7 +8713,7 @@ jQuery.extend( jQuery.event, {
|
|
8455
8713
|
special.bindType || type;
|
8456
8714
|
|
8457
8715
|
// jQuery handler
|
8458
|
-
handle = ( dataPriv.get( cur, "events" ) ||
|
8716
|
+
handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
|
8459
8717
|
dataPriv.get( cur, "handle" );
|
8460
8718
|
if ( handle ) {
|
8461
8719
|
handle.apply( cur, data );
|
@@ -8566,7 +8824,10 @@ if ( !support.focusin ) {
|
|
8566
8824
|
|
8567
8825
|
jQuery.event.special[ fix ] = {
|
8568
8826
|
setup: function() {
|
8569
|
-
|
8827
|
+
|
8828
|
+
// Handle: regular nodes (via `this.ownerDocument`), window
|
8829
|
+
// (via `this.document`) & document (via `this`).
|
8830
|
+
var doc = this.ownerDocument || this.document || this,
|
8570
8831
|
attaches = dataPriv.access( doc, fix );
|
8571
8832
|
|
8572
8833
|
if ( !attaches ) {
|
@@ -8575,7 +8836,7 @@ if ( !support.focusin ) {
|
|
8575
8836
|
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
8576
8837
|
},
|
8577
8838
|
teardown: function() {
|
8578
|
-
var doc = this.ownerDocument || this,
|
8839
|
+
var doc = this.ownerDocument || this.document || this,
|
8579
8840
|
attaches = dataPriv.access( doc, fix ) - 1;
|
8580
8841
|
|
8581
8842
|
if ( !attaches ) {
|
@@ -8591,7 +8852,7 @@ if ( !support.focusin ) {
|
|
8591
8852
|
}
|
8592
8853
|
var location = window.location;
|
8593
8854
|
|
8594
|
-
var nonce = Date.now();
|
8855
|
+
var nonce = { guid: Date.now() };
|
8595
8856
|
|
8596
8857
|
var rquery = ( /\?/ );
|
8597
8858
|
|
@@ -8599,7 +8860,7 @@ var rquery = ( /\?/ );
|
|
8599
8860
|
|
8600
8861
|
// Cross-browser xml parsing
|
8601
8862
|
jQuery.parseXML = function( data ) {
|
8602
|
-
var xml;
|
8863
|
+
var xml, parserErrorElem;
|
8603
8864
|
if ( !data || typeof data !== "string" ) {
|
8604
8865
|
return null;
|
8605
8866
|
}
|
@@ -8608,12 +8869,17 @@ jQuery.parseXML = function( data ) {
|
|
8608
8869
|
// IE throws on parseFromString with invalid input.
|
8609
8870
|
try {
|
8610
8871
|
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
8611
|
-
} catch ( e ) {
|
8612
|
-
xml = undefined;
|
8613
|
-
}
|
8872
|
+
} catch ( e ) {}
|
8614
8873
|
|
8615
|
-
|
8616
|
-
|
8874
|
+
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
8875
|
+
if ( !xml || parserErrorElem ) {
|
8876
|
+
jQuery.error( "Invalid XML: " + (
|
8877
|
+
parserErrorElem ?
|
8878
|
+
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
8879
|
+
return el.textContent;
|
8880
|
+
} ).join( "\n" ) :
|
8881
|
+
data
|
8882
|
+
) );
|
8617
8883
|
}
|
8618
8884
|
return xml;
|
8619
8885
|
};
|
@@ -8714,16 +8980,14 @@ jQuery.fn.extend( {
|
|
8714
8980
|
// Can add propHook for "elements" to filter or add form elements
|
8715
8981
|
var elements = jQuery.prop( this, "elements" );
|
8716
8982
|
return elements ? jQuery.makeArray( elements ) : this;
|
8717
|
-
} )
|
8718
|
-
.filter( function() {
|
8983
|
+
} ).filter( function() {
|
8719
8984
|
var type = this.type;
|
8720
8985
|
|
8721
8986
|
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
8722
8987
|
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
8723
8988
|
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
8724
8989
|
( this.checked || !rcheckableType.test( type ) );
|
8725
|
-
} )
|
8726
|
-
.map( function( i, elem ) {
|
8990
|
+
} ).map( function( _i, elem ) {
|
8727
8991
|
var val = jQuery( this ).val();
|
8728
8992
|
|
8729
8993
|
if ( val == null ) {
|
@@ -8776,7 +9040,8 @@ var
|
|
8776
9040
|
|
8777
9041
|
// Anchor tag for parsing the document origin
|
8778
9042
|
originAnchor = document.createElement( "a" );
|
8779
|
-
|
9043
|
+
|
9044
|
+
originAnchor.href = location.href;
|
8780
9045
|
|
8781
9046
|
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
8782
9047
|
function addToPrefiltersOrTransports( structure ) {
|
@@ -9157,8 +9422,8 @@ jQuery.extend( {
|
|
9157
9422
|
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
9158
9423
|
globalEventContext = s.context &&
|
9159
9424
|
( callbackContext.nodeType || callbackContext.jquery ) ?
|
9160
|
-
|
9161
|
-
|
9425
|
+
jQuery( callbackContext ) :
|
9426
|
+
jQuery.event,
|
9162
9427
|
|
9163
9428
|
// Deferreds
|
9164
9429
|
deferred = jQuery.Deferred(),
|
@@ -9336,7 +9601,8 @@ jQuery.extend( {
|
|
9336
9601
|
// Add or update anti-cache param if needed
|
9337
9602
|
if ( s.cache === false ) {
|
9338
9603
|
cacheURL = cacheURL.replace( rantiCache, "$1" );
|
9339
|
-
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) +
|
9604
|
+
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
|
9605
|
+
uncached;
|
9340
9606
|
}
|
9341
9607
|
|
9342
9608
|
// Put hash and anti-cache on the URL that will be requested (gh-1732)
|
@@ -9469,6 +9735,13 @@ jQuery.extend( {
|
|
9469
9735
|
response = ajaxHandleResponses( s, jqXHR, responses );
|
9470
9736
|
}
|
9471
9737
|
|
9738
|
+
// Use a noop converter for missing script but not if jsonp
|
9739
|
+
if ( !isSuccess &&
|
9740
|
+
jQuery.inArray( "script", s.dataTypes ) > -1 &&
|
9741
|
+
jQuery.inArray( "json", s.dataTypes ) < 0 ) {
|
9742
|
+
s.converters[ "text script" ] = function() {};
|
9743
|
+
}
|
9744
|
+
|
9472
9745
|
// Convert no matter what (that way responseXXX fields are always set)
|
9473
9746
|
response = ajaxConvert( s, response, jqXHR, isSuccess );
|
9474
9747
|
|
@@ -9559,7 +9832,7 @@ jQuery.extend( {
|
|
9559
9832
|
}
|
9560
9833
|
} );
|
9561
9834
|
|
9562
|
-
jQuery.each( [ "get", "post" ], function(
|
9835
|
+
jQuery.each( [ "get", "post" ], function( _i, method ) {
|
9563
9836
|
jQuery[ method ] = function( url, data, callback, type ) {
|
9564
9837
|
|
9565
9838
|
// Shift arguments if data argument was omitted
|
@@ -9580,8 +9853,17 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
|
|
9580
9853
|
};
|
9581
9854
|
} );
|
9582
9855
|
|
9856
|
+
jQuery.ajaxPrefilter( function( s ) {
|
9857
|
+
var i;
|
9858
|
+
for ( i in s.headers ) {
|
9859
|
+
if ( i.toLowerCase() === "content-type" ) {
|
9860
|
+
s.contentType = s.headers[ i ] || "";
|
9861
|
+
}
|
9862
|
+
}
|
9863
|
+
} );
|
9864
|
+
|
9583
9865
|
|
9584
|
-
jQuery._evalUrl = function( url, options ) {
|
9866
|
+
jQuery._evalUrl = function( url, options, doc ) {
|
9585
9867
|
return jQuery.ajax( {
|
9586
9868
|
url: url,
|
9587
9869
|
|
@@ -9599,7 +9881,7 @@ jQuery._evalUrl = function( url, options ) {
|
|
9599
9881
|
"text script": function() {}
|
9600
9882
|
},
|
9601
9883
|
dataFilter: function( response ) {
|
9602
|
-
jQuery.globalEval( response, options );
|
9884
|
+
jQuery.globalEval( response, options, doc );
|
9603
9885
|
}
|
9604
9886
|
} );
|
9605
9887
|
};
|
@@ -9921,7 +10203,7 @@ var oldCallbacks = [],
|
|
9921
10203
|
jQuery.ajaxSetup( {
|
9922
10204
|
jsonp: "callback",
|
9923
10205
|
jsonpCallback: function() {
|
9924
|
-
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
|
10206
|
+
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
|
9925
10207
|
this[ callback ] = true;
|
9926
10208
|
return callback;
|
9927
10209
|
}
|
@@ -10138,23 +10420,6 @@ jQuery.fn.load = function( url, params, callback ) {
|
|
10138
10420
|
|
10139
10421
|
|
10140
10422
|
|
10141
|
-
// Attach a bunch of functions for handling common AJAX events
|
10142
|
-
jQuery.each( [
|
10143
|
-
"ajaxStart",
|
10144
|
-
"ajaxStop",
|
10145
|
-
"ajaxComplete",
|
10146
|
-
"ajaxError",
|
10147
|
-
"ajaxSuccess",
|
10148
|
-
"ajaxSend"
|
10149
|
-
], function( i, type ) {
|
10150
|
-
jQuery.fn[ type ] = function( fn ) {
|
10151
|
-
return this.on( type, fn );
|
10152
|
-
};
|
10153
|
-
} );
|
10154
|
-
|
10155
|
-
|
10156
|
-
|
10157
|
-
|
10158
10423
|
jQuery.expr.pseudos.animated = function( elem ) {
|
10159
10424
|
return jQuery.grep( jQuery.timers, function( fn ) {
|
10160
10425
|
return elem === fn.elem;
|
@@ -10361,7 +10626,7 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
|
|
10361
10626
|
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
|
10362
10627
|
// getComputedStyle returns percent when specified for top/left/bottom/right;
|
10363
10628
|
// rather than make the css module depend on the offset module, just check for it here
|
10364
|
-
jQuery.each( [ "top", "left" ], function(
|
10629
|
+
jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
10365
10630
|
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
10366
10631
|
function( elem, computed ) {
|
10367
10632
|
if ( computed ) {
|
@@ -10379,8 +10644,11 @@ jQuery.each( [ "top", "left" ], function( i, prop ) {
|
|
10379
10644
|
|
10380
10645
|
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
10381
10646
|
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
10382
|
-
jQuery.each( {
|
10383
|
-
|
10647
|
+
jQuery.each( {
|
10648
|
+
padding: "inner" + name,
|
10649
|
+
content: type,
|
10650
|
+
"": "outer" + name
|
10651
|
+
}, function( defaultExtra, funcName ) {
|
10384
10652
|
|
10385
10653
|
// Margin is only for outerHeight, outerWidth
|
10386
10654
|
jQuery.fn[ funcName ] = function( margin, value ) {
|
@@ -10424,25 +10692,19 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|
10424
10692
|
} );
|
10425
10693
|
|
10426
10694
|
|
10427
|
-
jQuery.each(
|
10428
|
-
"
|
10429
|
-
"
|
10430
|
-
|
10431
|
-
|
10432
|
-
|
10433
|
-
|
10434
|
-
|
10435
|
-
|
10436
|
-
|
10695
|
+
jQuery.each( [
|
10696
|
+
"ajaxStart",
|
10697
|
+
"ajaxStop",
|
10698
|
+
"ajaxComplete",
|
10699
|
+
"ajaxError",
|
10700
|
+
"ajaxSuccess",
|
10701
|
+
"ajaxSend"
|
10702
|
+
], function( _i, type ) {
|
10703
|
+
jQuery.fn[ type ] = function( fn ) {
|
10704
|
+
return this.on( type, fn );
|
10437
10705
|
};
|
10438
10706
|
} );
|
10439
10707
|
|
10440
|
-
jQuery.fn.extend( {
|
10441
|
-
hover: function( fnOver, fnOut ) {
|
10442
|
-
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
10443
|
-
}
|
10444
|
-
} );
|
10445
|
-
|
10446
10708
|
|
10447
10709
|
|
10448
10710
|
|
@@ -10464,9 +10726,35 @@ jQuery.fn.extend( {
|
|
10464
10726
|
return arguments.length === 1 ?
|
10465
10727
|
this.off( selector, "**" ) :
|
10466
10728
|
this.off( types, selector || "**", fn );
|
10729
|
+
},
|
10730
|
+
|
10731
|
+
hover: function( fnOver, fnOut ) {
|
10732
|
+
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
10467
10733
|
}
|
10468
10734
|
} );
|
10469
10735
|
|
10736
|
+
jQuery.each(
|
10737
|
+
( "blur focus focusin focusout resize scroll click dblclick " +
|
10738
|
+
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
10739
|
+
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
10740
|
+
function( _i, name ) {
|
10741
|
+
|
10742
|
+
// Handle event binding
|
10743
|
+
jQuery.fn[ name ] = function( data, fn ) {
|
10744
|
+
return arguments.length > 0 ?
|
10745
|
+
this.on( name, null, data, fn ) :
|
10746
|
+
this.trigger( name );
|
10747
|
+
};
|
10748
|
+
}
|
10749
|
+
);
|
10750
|
+
|
10751
|
+
|
10752
|
+
|
10753
|
+
|
10754
|
+
// Support: Android <=4.0 only
|
10755
|
+
// Make sure we trim BOM and NBSP
|
10756
|
+
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
10757
|
+
|
10470
10758
|
// Bind a function to a context, optionally partially applying any
|
10471
10759
|
// arguments.
|
10472
10760
|
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
|
@@ -10529,6 +10817,11 @@ jQuery.isNumeric = function( obj ) {
|
|
10529
10817
|
!isNaN( obj - parseFloat( obj ) );
|
10530
10818
|
};
|
10531
10819
|
|
10820
|
+
jQuery.trim = function( text ) {
|
10821
|
+
return text == null ?
|
10822
|
+
"" :
|
10823
|
+
( text + "" ).replace( rtrim, "" );
|
10824
|
+
};
|
10532
10825
|
|
10533
10826
|
|
10534
10827
|
|
@@ -10577,7 +10870,7 @@ jQuery.noConflict = function( deep ) {
|
|
10577
10870
|
// Expose jQuery and $ identifiers, even in AMD
|
10578
10871
|
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
10579
10872
|
// and CommonJS for browser emulators (#13566)
|
10580
|
-
if (
|
10873
|
+
if ( typeof noGlobal === "undefined" ) {
|
10581
10874
|
window.jQuery = window.$ = jQuery;
|
10582
10875
|
}
|
10583
10876
|
|