jquery-rails 4.2.1 → 4.3.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.

Potentially problematic release.


This version of jquery-rails might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 465698ea71d2cfda07c7bc5dab8cb50fb34ab56f
4
- data.tar.gz: c937ef622e018d620633e6fd613c67b7198c23f7
3
+ metadata.gz: 18e87e67370461ba4631fce650f1df3d964444e5
4
+ data.tar.gz: 90e06a9d9e5aa5215394e697e989480b90bb6b11
5
5
  SHA512:
6
- metadata.gz: bb9015f2ba8cfa59a8d1a5e820ff3f70c74e3fef6116253849e1a92e5aab0fc2deb8596974d9b149f3f5a57c892124c52d9b135a44bd75fd8188f143439225c3
7
- data.tar.gz: 56932e346d376defd1cb9189b70d3e31c116abe6e0fbb6e17f5ab3252b65e6d788999bf1ce3f49cca5f89819c755afbd478e27fde899e42d1b47e0bbc5dfb9b6
6
+ metadata.gz: 49e157e947517316995db3458cd217f35cfae67e40538de6bb7144df6684a33eecbad23258ab830af61974aa2d9ad219afa27a57def6a71826ed80f79458cf98
7
+ data.tar.gz: b260b2d9136847c48aa95a684649d354644052742540d3505982fcf8ba6f6eb5fb356cf557dec7d955ae560811fdaaa42b847f020156b18adb3e128fdc5a5c44
data/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
- ## 4.2.0
1
+ ## 4.3.0
2
+
3
+ - update jquery to 3.2.0
4
+ - Add possibility to test HTML attribute selectors
5
+
6
+ ## 4.2.2
7
+
8
+ - update jquery to 3.1.1
9
+
10
+ ## 4.2.1
2
11
 
3
- - Update jQuery to 3.1.0
12
+ - update jquery to 3.1.0
4
13
 
5
14
  ## 4.2.0
6
15
 
data/Gemfile CHANGED
@@ -1,6 +1,22 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', group: :test
3
+ gem "mime-types", "< 3", group: :test
4
+
5
+ if RUBY_VERSION >= '2.2.2'
6
+ gem 'rails'
7
+ gem 'rack'
8
+ gem 'json', '>= 2'
9
+ else
10
+ gem 'rails', '~> 4.2.0'
11
+ gem 'rack', '~>1.6'
12
+ gem 'json', '~> 1.8.0'
13
+ end
14
+
15
+ if RUBY_VERSION >= '2.1'
16
+ gem 'nokogiri'
17
+ else
18
+ gem 'nokogiri', '~> 1.6.0'
19
+ end
4
20
 
5
21
  # Specify your gem's dependencies in jquery-rails.gemspec
6
22
  gemspec
data/VERSIONS.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  | Gem | jQuery | jQuery UJS | jQuery UI |
4
4
  |--------|--------|------------| ----------|
5
+ | 4.3.0 | 1.12.4 & 2.2.4 & 3.2.0 | 1.2.2 | - |
6
+ | 4.2.2 | 1.12.4 & 2.2.4 & 3.1.1 | 1.2.2 | - |
5
7
  | 4.2.1 | 1.12.4 & 2.2.4 & 3.1.0 | 1.2.2 | - |
6
8
  | 4.2.0 | 1.12.4 & 2.2.4 & 3.0.0 | 1.2.2 | - |
7
9
  | 4.1.1 | 1.12.1 & 2.2.1 | 1.2.1 | - |
@@ -54,7 +54,7 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions
54
54
  def assert_select_jquery(*args, &block)
55
55
  jquery_method = args.first.is_a?(Symbol) ? args.shift : nil
56
56
  jquery_opt = args.first.is_a?(Symbol) ? args.shift : nil
57
- id = args.first.is_a?(String) ? args.shift : nil
57
+ id = args.first.is_a?(String) ? escape_id(args.shift) : nil
58
58
 
59
59
  target_pattern = "['\"]#{id || '.*'}['\"]"
60
60
  method_pattern = "#{jquery_method || '\\w+'}"
@@ -128,4 +128,13 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions
128
128
  unescaped.gsub!(PATTERN_UNICODE_ESCAPED_CHAR) {|u| [$1.hex].pack('U*')}
129
129
  unescaped
130
130
  end
131
+
132
+ def escape_id(selector)
133
+ return unless selector
134
+
135
+ id = selector.gsub('[', '\[')
136
+ id.gsub!(']', '\]')
137
+
138
+ id
139
+ end
131
140
  end
@@ -1,9 +1,9 @@
1
1
  module Jquery
2
2
  module Rails
3
- VERSION = "4.2.1"
3
+ VERSION = "4.3.0"
4
4
  JQUERY_VERSION = "1.12.4"
5
5
  JQUERY_2_VERSION = "2.2.4"
6
- JQUERY_3_VERSION = "3.1.0"
6
+ JQUERY_3_VERSION = "3.2.0"
7
7
  JQUERY_UJS_VERSION = "1.2.2"
8
8
  end
9
9
  end
@@ -13,6 +13,7 @@ class AssertSelectJQueryTest < ActiveSupport::TestCase
13
13
  jQuery("<div><p>something</p></div>").prependTo("#id");
14
14
  $('#id').remove();
15
15
  jQuery("#id").hide();
16
+ $("[data-placeholder~=name]").remove();
16
17
  JS
17
18
 
18
19
  setup do
@@ -28,6 +29,7 @@ class AssertSelectJQueryTest < ActiveSupport::TestCase
28
29
  assert_select_jquery :replaceWith, '#id' do
29
30
  assert_select 'p', 'something'
30
31
  end
32
+ assert_select_jquery :remove, "[data-placeholder~=name]"
31
33
  end
32
34
 
33
35
  assert_raise Minitest::Assertion, "No JQuery call matches [:show, :some_wrong]" do
@@ -1,16 +1,15 @@
1
- /*eslint-disable no-unused-vars*/
2
1
  /*!
3
- * jQuery JavaScript Library v3.1.0
2
+ * jQuery JavaScript Library v3.2.0
4
3
  * https://jquery.com/
5
4
  *
6
5
  * Includes Sizzle.js
7
6
  * https://sizzlejs.com/
8
7
  *
9
- * Copyright jQuery Foundation and other contributors
8
+ * Copyright JS Foundation and other contributors
10
9
  * Released under the MIT license
11
10
  * https://jquery.org/license
12
11
  *
13
- * Date: 2016-07-07T21:44Z
12
+ * Date: 2017-03-16T21:26Z
14
13
  */
15
14
  ( function( global, factory ) {
16
15
 
@@ -83,13 +82,13 @@ var support = {};
83
82
  doc.head.appendChild( script ).parentNode.removeChild( script );
84
83
  }
85
84
  /* global Symbol */
86
- // Defining this global in .eslintrc would create a danger of using the global
85
+ // Defining this global in .eslintrc.json would create a danger of using the global
87
86
  // unguarded in another place, it seems safer to define global only for this module
88
87
 
89
88
 
90
89
 
91
90
  var
92
- version = "3.1.0",
91
+ version = "3.2.0",
93
92
 
94
93
  // Define a local copy of jQuery
95
94
  jQuery = function( selector, context ) {
@@ -129,13 +128,14 @@ jQuery.fn = jQuery.prototype = {
129
128
  // Get the Nth element in the matched element set OR
130
129
  // Get the whole matched element set as a clean array
131
130
  get: function( num ) {
132
- return num != null ?
133
131
 
134
- // Return just the one element from the set
135
- ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
132
+ // Return all the elements in a clean array
133
+ if ( num == null ) {
134
+ return slice.call( this );
135
+ }
136
136
 
137
- // Return all the elements in a clean array
138
- slice.call( this );
137
+ // Return just the one element from the set
138
+ return num < 0 ? this[ num + this.length ] : this[ num ];
139
139
  },
140
140
 
141
141
  // Take an array of elements and push it onto the stack
@@ -236,11 +236,11 @@ jQuery.extend = jQuery.fn.extend = function() {
236
236
 
237
237
  // Recurse if we're merging plain objects or arrays
238
238
  if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
239
- ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
239
+ ( copyIsArray = Array.isArray( copy ) ) ) ) {
240
240
 
241
241
  if ( copyIsArray ) {
242
242
  copyIsArray = false;
243
- clone = src && jQuery.isArray( src ) ? src : [];
243
+ clone = src && Array.isArray( src ) ? src : [];
244
244
 
245
245
  } else {
246
246
  clone = src && jQuery.isPlainObject( src ) ? src : {};
@@ -279,8 +279,6 @@ jQuery.extend( {
279
279
  return jQuery.type( obj ) === "function";
280
280
  },
281
281
 
282
- isArray: Array.isArray,
283
-
284
282
  isWindow: function( obj ) {
285
283
  return obj != null && obj === obj.window;
286
284
  },
@@ -355,10 +353,6 @@ jQuery.extend( {
355
353
  return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
356
354
  },
357
355
 
358
- nodeName: function( elem, name ) {
359
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
360
- },
361
-
362
356
  each: function( obj, callback ) {
363
357
  var length, i = 0;
364
358
 
@@ -543,14 +537,14 @@ function isArrayLike( obj ) {
543
537
  }
544
538
  var Sizzle =
545
539
  /*!
546
- * Sizzle CSS Selector Engine v2.3.0
540
+ * Sizzle CSS Selector Engine v2.3.3
547
541
  * https://sizzlejs.com/
548
542
  *
549
543
  * Copyright jQuery Foundation and other contributors
550
544
  * Released under the MIT license
551
545
  * http://jquery.org/license
552
546
  *
553
- * Date: 2016-01-04
547
+ * Date: 2016-08-08
554
548
  */
555
549
  (function( window ) {
556
550
 
@@ -696,7 +690,7 @@ var i,
696
690
 
697
691
  // CSS string/identifier serialization
698
692
  // https://drafts.csswg.org/cssom/#common-serializing-idioms
699
- rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
693
+ rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
700
694
  fcssescape = function( ch, asCodePoint ) {
701
695
  if ( asCodePoint ) {
702
696
 
@@ -723,7 +717,7 @@ var i,
723
717
 
724
718
  disabledAncestor = addCombinator(
725
719
  function( elem ) {
726
- return elem.disabled === true;
720
+ return elem.disabled === true && ("form" in elem || "label" in elem);
727
721
  },
728
722
  { dir: "parentNode", next: "legend" }
729
723
  );
@@ -1009,26 +1003,54 @@ function createButtonPseudo( type ) {
1009
1003
  * @param {Boolean} disabled true for :disabled; false for :enabled
1010
1004
  */
1011
1005
  function createDisabledPseudo( disabled ) {
1012
- // Known :disabled false positives:
1013
- // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
1014
- // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1006
+
1007
+ // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1015
1008
  return function( elem ) {
1016
1009
 
1017
- // Check form elements and option elements for explicit disabling
1018
- return "label" in elem && elem.disabled === disabled ||
1019
- "form" in elem && elem.disabled === disabled ||
1010
+ // Only certain elements can match :enabled or :disabled
1011
+ // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1012
+ // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1013
+ if ( "form" in elem ) {
1014
+
1015
+ // Check for inherited disabledness on relevant non-disabled elements:
1016
+ // * listed form-associated elements in a disabled fieldset
1017
+ // https://html.spec.whatwg.org/multipage/forms.html#category-listed
1018
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1019
+ // * option elements in a disabled optgroup
1020
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1021
+ // All such elements have a "form" property.
1022
+ if ( elem.parentNode && elem.disabled === false ) {
1023
+
1024
+ // Option elements defer to a parent optgroup if present
1025
+ if ( "label" in elem ) {
1026
+ if ( "label" in elem.parentNode ) {
1027
+ return elem.parentNode.disabled === disabled;
1028
+ } else {
1029
+ return elem.disabled === disabled;
1030
+ }
1031
+ }
1020
1032
 
1021
- // Check non-disabled form elements for fieldset[disabled] ancestors
1022
- "form" in elem && elem.disabled === false && (
1023
- // Support: IE6-11+
1024
- // Ancestry is covered for us
1025
- elem.isDisabled === disabled ||
1033
+ // Support: IE 6 - 11
1034
+ // Use the isDisabled shortcut property to check for disabled fieldset ancestors
1035
+ return elem.isDisabled === disabled ||
1026
1036
 
1027
- // Otherwise, assume any non-<option> under fieldset[disabled] is disabled
1028
- /* jshint -W018 */
1029
- elem.isDisabled !== !disabled &&
1030
- ("label" in elem || !disabledAncestor( elem )) !== disabled
1031
- );
1037
+ // Where there is no isDisabled, check manually
1038
+ /* jshint -W018 */
1039
+ elem.isDisabled !== !disabled &&
1040
+ disabledAncestor( elem ) === disabled;
1041
+ }
1042
+
1043
+ return elem.disabled === disabled;
1044
+
1045
+ // Try to winnow out elements that can't be disabled before trusting the disabled property.
1046
+ // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1047
+ // even exist on them, let alone have a boolean value.
1048
+ } else if ( "label" in elem ) {
1049
+ return elem.disabled === disabled;
1050
+ }
1051
+
1052
+ // Remaining elements are neither :enabled nor :disabled
1053
+ return false;
1032
1054
  };
1033
1055
  }
1034
1056
 
@@ -1144,25 +1166,21 @@ setDocument = Sizzle.setDocument = function( node ) {
1144
1166
  return !document.getElementsByName || !document.getElementsByName( expando ).length;
1145
1167
  });
1146
1168
 
1147
- // ID find and filter
1169
+ // ID filter and find
1148
1170
  if ( support.getById ) {
1149
- Expr.find["ID"] = function( id, context ) {
1150
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1151
- var m = context.getElementById( id );
1152
- return m ? [ m ] : [];
1153
- }
1154
- };
1155
1171
  Expr.filter["ID"] = function( id ) {
1156
1172
  var attrId = id.replace( runescape, funescape );
1157
1173
  return function( elem ) {
1158
1174
  return elem.getAttribute("id") === attrId;
1159
1175
  };
1160
1176
  };
1177
+ Expr.find["ID"] = function( id, context ) {
1178
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1179
+ var elem = context.getElementById( id );
1180
+ return elem ? [ elem ] : [];
1181
+ }
1182
+ };
1161
1183
  } else {
1162
- // Support: IE6/7
1163
- // getElementById is not reliable as a find shortcut
1164
- delete Expr.find["ID"];
1165
-
1166
1184
  Expr.filter["ID"] = function( id ) {
1167
1185
  var attrId = id.replace( runescape, funescape );
1168
1186
  return function( elem ) {
@@ -1171,6 +1189,36 @@ setDocument = Sizzle.setDocument = function( node ) {
1171
1189
  return node && node.value === attrId;
1172
1190
  };
1173
1191
  };
1192
+
1193
+ // Support: IE 6 - 7 only
1194
+ // getElementById is not reliable as a find shortcut
1195
+ Expr.find["ID"] = function( id, context ) {
1196
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1197
+ var node, i, elems,
1198
+ elem = context.getElementById( id );
1199
+
1200
+ if ( elem ) {
1201
+
1202
+ // Verify the id attribute
1203
+ node = elem.getAttributeNode("id");
1204
+ if ( node && node.value === id ) {
1205
+ return [ elem ];
1206
+ }
1207
+
1208
+ // Fall back on getElementsByName
1209
+ elems = context.getElementsByName( id );
1210
+ i = 0;
1211
+ while ( (elem = elems[i++]) ) {
1212
+ node = elem.getAttributeNode("id");
1213
+ if ( node && node.value === id ) {
1214
+ return [ elem ];
1215
+ }
1216
+ }
1217
+ }
1218
+
1219
+ return [];
1220
+ }
1221
+ };
1174
1222
  }
1175
1223
 
1176
1224
  // Tag
@@ -2211,6 +2259,7 @@ function addCombinator( matcher, combinator, base ) {
2211
2259
  return matcher( elem, context, xml );
2212
2260
  }
2213
2261
  }
2262
+ return false;
2214
2263
  } :
2215
2264
 
2216
2265
  // Check against all ancestor/preceding elements
@@ -2255,6 +2304,7 @@ function addCombinator( matcher, combinator, base ) {
2255
2304
  }
2256
2305
  }
2257
2306
  }
2307
+ return false;
2258
2308
  };
2259
2309
  }
2260
2310
 
@@ -2617,8 +2667,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
2617
2667
  // Reduce context if the leading compound selector is an ID
2618
2668
  tokens = match[0] = match[0].slice( 0 );
2619
2669
  if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2620
- support.getById && context.nodeType === 9 && documentIsHTML &&
2621
- Expr.relative[ tokens[1].type ] ) {
2670
+ context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
2622
2671
 
2623
2672
  context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2624
2673
  if ( !context ) {
@@ -2788,6 +2837,13 @@ var siblings = function( n, elem ) {
2788
2837
 
2789
2838
  var rneedsContext = jQuery.expr.match.needsContext;
2790
2839
 
2840
+
2841
+
2842
+ function nodeName( elem, name ) {
2843
+
2844
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
2845
+
2846
+ };
2791
2847
  var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
2792
2848
 
2793
2849
 
@@ -2800,24 +2856,29 @@ function winnow( elements, qualifier, not ) {
2800
2856
  return jQuery.grep( elements, function( elem, i ) {
2801
2857
  return !!qualifier.call( elem, i, elem ) !== not;
2802
2858
  } );
2803
-
2804
2859
  }
2805
2860
 
2861
+ // Single element
2806
2862
  if ( qualifier.nodeType ) {
2807
2863
  return jQuery.grep( elements, function( elem ) {
2808
2864
  return ( elem === qualifier ) !== not;
2809
2865
  } );
2810
-
2811
2866
  }
2812
2867
 
2813
- if ( typeof qualifier === "string" ) {
2814
- if ( risSimple.test( qualifier ) ) {
2815
- return jQuery.filter( qualifier, elements, not );
2816
- }
2868
+ // Arraylike of elements (jQuery, arguments, Array)
2869
+ if ( typeof qualifier !== "string" ) {
2870
+ return jQuery.grep( elements, function( elem ) {
2871
+ return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
2872
+ } );
2873
+ }
2817
2874
 
2818
- qualifier = jQuery.filter( qualifier, elements );
2875
+ // Simple selector that can be filtered directly, removing non-Elements
2876
+ if ( risSimple.test( qualifier ) ) {
2877
+ return jQuery.filter( qualifier, elements, not );
2819
2878
  }
2820
2879
 
2880
+ // Complex selector, compare the two sets, removing non-Elements
2881
+ qualifier = jQuery.filter( qualifier, elements );
2821
2882
  return jQuery.grep( elements, function( elem ) {
2822
2883
  return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
2823
2884
  } );
@@ -2830,11 +2891,13 @@ jQuery.filter = function( expr, elems, not ) {
2830
2891
  expr = ":not(" + expr + ")";
2831
2892
  }
2832
2893
 
2833
- return elems.length === 1 && elem.nodeType === 1 ?
2834
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
2835
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
2836
- return elem.nodeType === 1;
2837
- } ) );
2894
+ if ( elems.length === 1 && elem.nodeType === 1 ) {
2895
+ return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
2896
+ }
2897
+
2898
+ return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
2899
+ return elem.nodeType === 1;
2900
+ } ) );
2838
2901
  };
2839
2902
 
2840
2903
  jQuery.fn.extend( {
@@ -3132,7 +3195,18 @@ jQuery.each( {
3132
3195
  return siblings( elem.firstChild );
3133
3196
  },
3134
3197
  contents: function( elem ) {
3135
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
3198
+ if ( nodeName( elem, "iframe" ) ) {
3199
+ return elem.contentDocument;
3200
+ }
3201
+
3202
+ // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3203
+ // Treat the template element as a regular one in browsers that
3204
+ // don't support it.
3205
+ if ( nodeName( elem, "template" ) ) {
3206
+ elem = elem.content || elem;
3207
+ }
3208
+
3209
+ return jQuery.merge( [], elem.childNodes );
3136
3210
  }
3137
3211
  }, function( name, fn ) {
3138
3212
  jQuery.fn[ name ] = function( until, selector ) {
@@ -3162,14 +3236,14 @@ jQuery.each( {
3162
3236
  return this.pushStack( matched );
3163
3237
  };
3164
3238
  } );
3165
- var rnotwhite = ( /\S+/g );
3239
+ var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
3166
3240
 
3167
3241
 
3168
3242
 
3169
3243
  // Convert String-formatted options into Object-formatted ones
3170
3244
  function createOptions( options ) {
3171
3245
  var object = {};
3172
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
3246
+ jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
3173
3247
  object[ flag ] = true;
3174
3248
  } );
3175
3249
  return object;
@@ -3230,7 +3304,7 @@ jQuery.Callbacks = function( options ) {
3230
3304
  fire = function() {
3231
3305
 
3232
3306
  // Enforce single-firing
3233
- locked = options.once;
3307
+ locked = locked || options.once;
3234
3308
 
3235
3309
  // Execute callbacks for all pending executions,
3236
3310
  // respecting firingIndex overrides and runtime changes
@@ -3399,7 +3473,7 @@ function Thrower( ex ) {
3399
3473
  throw ex;
3400
3474
  }
3401
3475
 
3402
- function adoptValue( value, resolve, reject ) {
3476
+ function adoptValue( value, resolve, reject, noValue ) {
3403
3477
  var method;
3404
3478
 
3405
3479
  try {
@@ -3415,9 +3489,10 @@ function adoptValue( value, resolve, reject ) {
3415
3489
  // Other non-thenables
3416
3490
  } else {
3417
3491
 
3418
- // Support: Android 4.0 only
3419
- // Strict mode functions invoked without .call/.apply get global-object context
3420
- resolve.call( undefined, value );
3492
+ // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3493
+ // * false: [ value ].slice( 0 ) => resolve( value )
3494
+ // * true: [ value ].slice( 1 ) => resolve()
3495
+ resolve.apply( undefined, [ value ].slice( noValue ) );
3421
3496
  }
3422
3497
 
3423
3498
  // For Promises/A+, convert exceptions into rejections
@@ -3427,7 +3502,7 @@ function adoptValue( value, resolve, reject ) {
3427
3502
 
3428
3503
  // Support: Android 4.0 only
3429
3504
  // Strict mode functions invoked without .call/.apply get global-object context
3430
- reject.call( undefined, value );
3505
+ reject.apply( undefined, [ value ] );
3431
3506
  }
3432
3507
  }
3433
3508
 
@@ -3752,7 +3827,8 @@ jQuery.extend( {
3752
3827
 
3753
3828
  // Single- and empty arguments are adopted like Promise.resolve
3754
3829
  if ( remaining <= 1 ) {
3755
- adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
3830
+ adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
3831
+ !remaining );
3756
3832
 
3757
3833
  // Use .then() to unwrap secondary thenables (cf. gh-3000)
3758
3834
  if ( master.state() === "pending" ||
@@ -3824,15 +3900,6 @@ jQuery.extend( {
3824
3900
  // the ready event fires. See #6781
3825
3901
  readyWait: 1,
3826
3902
 
3827
- // Hold (or release) the ready event
3828
- holdReady: function( hold ) {
3829
- if ( hold ) {
3830
- jQuery.readyWait++;
3831
- } else {
3832
- jQuery.ready( true );
3833
- }
3834
- },
3835
-
3836
3903
  // Handle when the DOM is ready
3837
3904
  ready: function( wait ) {
3838
3905
 
@@ -3934,13 +4001,16 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
3934
4001
  }
3935
4002
  }
3936
4003
 
3937
- return chainable ?
3938
- elems :
4004
+ if ( chainable ) {
4005
+ return elems;
4006
+ }
4007
+
4008
+ // Gets
4009
+ if ( bulk ) {
4010
+ return fn.call( elems );
4011
+ }
3939
4012
 
3940
- // Gets
3941
- bulk ?
3942
- fn.call( elems ) :
3943
- len ? fn( elems[ 0 ], key ) : emptyGet;
4013
+ return len ? fn( elems[ 0 ], key ) : emptyGet;
3944
4014
  };
3945
4015
  var acceptData = function( owner ) {
3946
4016
 
@@ -4065,7 +4135,7 @@ Data.prototype = {
4065
4135
  if ( key !== undefined ) {
4066
4136
 
4067
4137
  // Support array or space separated string of keys
4068
- if ( jQuery.isArray( key ) ) {
4138
+ if ( Array.isArray( key ) ) {
4069
4139
 
4070
4140
  // If key is an array of keys...
4071
4141
  // We always set camelCase keys, so remove that.
@@ -4077,7 +4147,7 @@ Data.prototype = {
4077
4147
  // Otherwise, create an array by matching non-whitespace
4078
4148
  key = key in cache ?
4079
4149
  [ key ] :
4080
- ( key.match( rnotwhite ) || [] );
4150
+ ( key.match( rnothtmlwhite ) || [] );
4081
4151
  }
4082
4152
 
4083
4153
  i = key.length;
@@ -4125,6 +4195,31 @@ var dataUser = new Data();
4125
4195
  var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4126
4196
  rmultiDash = /[A-Z]/g;
4127
4197
 
4198
+ function getData( data ) {
4199
+ if ( data === "true" ) {
4200
+ return true;
4201
+ }
4202
+
4203
+ if ( data === "false" ) {
4204
+ return false;
4205
+ }
4206
+
4207
+ if ( data === "null" ) {
4208
+ return null;
4209
+ }
4210
+
4211
+ // Only convert to a number if it doesn't change the string
4212
+ if ( data === +data + "" ) {
4213
+ return +data;
4214
+ }
4215
+
4216
+ if ( rbrace.test( data ) ) {
4217
+ return JSON.parse( data );
4218
+ }
4219
+
4220
+ return data;
4221
+ }
4222
+
4128
4223
  function dataAttr( elem, key, data ) {
4129
4224
  var name;
4130
4225
 
@@ -4136,14 +4231,7 @@ function dataAttr( elem, key, data ) {
4136
4231
 
4137
4232
  if ( typeof data === "string" ) {
4138
4233
  try {
4139
- data = data === "true" ? true :
4140
- data === "false" ? false :
4141
- data === "null" ? null :
4142
-
4143
- // Only convert to a number if it doesn't change the string
4144
- +data + "" === data ? +data :
4145
- rbrace.test( data ) ? JSON.parse( data ) :
4146
- data;
4234
+ data = getData( data );
4147
4235
  } catch ( e ) {}
4148
4236
 
4149
4237
  // Make sure we set the data so it isn't changed later
@@ -4273,7 +4361,7 @@ jQuery.extend( {
4273
4361
 
4274
4362
  // Speed up dequeue by getting out quickly if this is just a lookup
4275
4363
  if ( data ) {
4276
- if ( !queue || jQuery.isArray( data ) ) {
4364
+ if ( !queue || Array.isArray( data ) ) {
4277
4365
  queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
4278
4366
  } else {
4279
4367
  queue.push( data );
@@ -4520,7 +4608,7 @@ function getDefaultDisplay( elem ) {
4520
4608
  return display;
4521
4609
  }
4522
4610
 
4523
- temp = doc.body.appendChild( doc.createElement( nodeName ) ),
4611
+ temp = doc.body.appendChild( doc.createElement( nodeName ) );
4524
4612
  display = jQuery.css( temp, "display" );
4525
4613
 
4526
4614
  temp.parentNode.removeChild( temp );
@@ -4638,15 +4726,23 @@ function getAll( context, tag ) {
4638
4726
 
4639
4727
  // Support: IE <=9 - 11 only
4640
4728
  // Use typeof to avoid zero-argument method invocation on host objects (#15151)
4641
- var ret = typeof context.getElementsByTagName !== "undefined" ?
4642
- context.getElementsByTagName( tag || "*" ) :
4643
- typeof context.querySelectorAll !== "undefined" ?
4644
- context.querySelectorAll( tag || "*" ) :
4645
- [];
4646
-
4647
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
4648
- jQuery.merge( [ context ], ret ) :
4649
- ret;
4729
+ var ret;
4730
+
4731
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
4732
+ ret = context.getElementsByTagName( tag || "*" );
4733
+
4734
+ } else if ( typeof context.querySelectorAll !== "undefined" ) {
4735
+ ret = context.querySelectorAll( tag || "*" );
4736
+
4737
+ } else {
4738
+ ret = [];
4739
+ }
4740
+
4741
+ if ( tag === undefined || tag && nodeName( context, tag ) ) {
4742
+ return jQuery.merge( [ context ], ret );
4743
+ }
4744
+
4745
+ return ret;
4650
4746
  }
4651
4747
 
4652
4748
 
@@ -4920,7 +5016,7 @@ jQuery.event = {
4920
5016
  }
4921
5017
 
4922
5018
  // Handle multiple events separated by a space
4923
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
5019
+ types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
4924
5020
  t = types.length;
4925
5021
  while ( t-- ) {
4926
5022
  tmp = rtypenamespace.exec( types[ t ] ) || [];
@@ -5002,7 +5098,7 @@ jQuery.event = {
5002
5098
  }
5003
5099
 
5004
5100
  // Once for each type.namespace in types; type may be omitted
5005
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
5101
+ types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5006
5102
  t = types.length;
5007
5103
  while ( t-- ) {
5008
5104
  tmp = rtypenamespace.exec( types[ t ] ) || [];
@@ -5128,51 +5224,58 @@ jQuery.event = {
5128
5224
  },
5129
5225
 
5130
5226
  handlers: function( event, handlers ) {
5131
- var i, matches, sel, handleObj,
5227
+ var i, handleObj, sel, matchedHandlers, matchedSelectors,
5132
5228
  handlerQueue = [],
5133
5229
  delegateCount = handlers.delegateCount,
5134
5230
  cur = event.target;
5135
5231
 
5136
- // Support: IE <=9
5137
5232
  // Find delegate handlers
5138
- // Black-hole SVG <use> instance trees (#13180)
5139
- //
5140
- // Support: Firefox <=42
5141
- // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
5142
- if ( delegateCount && cur.nodeType &&
5143
- ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
5233
+ if ( delegateCount &&
5234
+
5235
+ // Support: IE <=9
5236
+ // Black-hole SVG <use> instance trees (trac-13180)
5237
+ cur.nodeType &&
5238
+
5239
+ // Support: Firefox <=42
5240
+ // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5241
+ // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5242
+ // Support: IE 11 only
5243
+ // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5244
+ !( event.type === "click" && event.button >= 1 ) ) {
5144
5245
 
5145
5246
  for ( ; cur !== this; cur = cur.parentNode || this ) {
5146
5247
 
5147
5248
  // Don't check non-elements (#13208)
5148
5249
  // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5149
- if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
5150
- matches = [];
5250
+ if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
5251
+ matchedHandlers = [];
5252
+ matchedSelectors = {};
5151
5253
  for ( i = 0; i < delegateCount; i++ ) {
5152
5254
  handleObj = handlers[ i ];
5153
5255
 
5154
5256
  // Don't conflict with Object.prototype properties (#13203)
5155
5257
  sel = handleObj.selector + " ";
5156
5258
 
5157
- if ( matches[ sel ] === undefined ) {
5158
- matches[ sel ] = handleObj.needsContext ?
5259
+ if ( matchedSelectors[ sel ] === undefined ) {
5260
+ matchedSelectors[ sel ] = handleObj.needsContext ?
5159
5261
  jQuery( sel, this ).index( cur ) > -1 :
5160
5262
  jQuery.find( sel, this, null, [ cur ] ).length;
5161
5263
  }
5162
- if ( matches[ sel ] ) {
5163
- matches.push( handleObj );
5264
+ if ( matchedSelectors[ sel ] ) {
5265
+ matchedHandlers.push( handleObj );
5164
5266
  }
5165
5267
  }
5166
- if ( matches.length ) {
5167
- handlerQueue.push( { elem: cur, handlers: matches } );
5268
+ if ( matchedHandlers.length ) {
5269
+ handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
5168
5270
  }
5169
5271
  }
5170
5272
  }
5171
5273
  }
5172
5274
 
5173
5275
  // Add the remaining (directly-bound) handlers
5276
+ cur = this;
5174
5277
  if ( delegateCount < handlers.length ) {
5175
- handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
5278
+ handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
5176
5279
  }
5177
5280
 
5178
5281
  return handlerQueue;
@@ -5240,9 +5343,11 @@ jQuery.event = {
5240
5343
  },
5241
5344
  click: {
5242
5345
 
5243
- // For checkbox, fire native event so checked state will be right
5346
+ // For checkable types, fire native event so checked state will be right
5244
5347
  trigger: function() {
5245
- if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
5348
+ if ( rcheckableType.test( this.type ) &&
5349
+ this.click && nodeName( this, "input" ) ) {
5350
+
5246
5351
  this.click();
5247
5352
  return false;
5248
5353
  }
@@ -5250,7 +5355,7 @@ jQuery.event = {
5250
5355
 
5251
5356
  // For cross-browser consistency, don't fire native .click() on links
5252
5357
  _default: function( event ) {
5253
- return jQuery.nodeName( event.target, "a" );
5358
+ return nodeName( event.target, "a" );
5254
5359
  }
5255
5360
  },
5256
5361
 
@@ -5406,7 +5511,19 @@ jQuery.each( {
5406
5511
 
5407
5512
  // Add which for click: 1 === left; 2 === middle; 3 === right
5408
5513
  if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
5409
- return ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
5514
+ if ( button & 1 ) {
5515
+ return 1;
5516
+ }
5517
+
5518
+ if ( button & 2 ) {
5519
+ return 3;
5520
+ }
5521
+
5522
+ if ( button & 4 ) {
5523
+ return 2;
5524
+ }
5525
+
5526
+ return 0;
5410
5527
  }
5411
5528
 
5412
5529
  return event.which;
@@ -5515,11 +5632,12 @@ var
5515
5632
  rscriptTypeMasked = /^true\/(.*)/,
5516
5633
  rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
5517
5634
 
5635
+ // Prefer a tbody over its parent table for containing new rows
5518
5636
  function manipulationTarget( elem, content ) {
5519
- if ( jQuery.nodeName( elem, "table" ) &&
5520
- jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
5637
+ if ( nodeName( elem, "table" ) &&
5638
+ nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
5521
5639
 
5522
- return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
5640
+ return jQuery( ">tbody", elem )[ 0 ] || elem;
5523
5641
  }
5524
5642
 
5525
5643
  return elem;
@@ -6053,8 +6171,9 @@ function curCSS( elem, name, computed ) {
6053
6171
 
6054
6172
  computed = computed || getStyles( elem );
6055
6173
 
6056
- // Support: IE <=9 only
6057
- // getPropertyValue is only needed for .css('filter') (#12537)
6174
+ // getPropertyValue is needed for:
6175
+ // .css('filter') (IE 9 only, #12537)
6176
+ // .css('--customProperty) (#3144)
6058
6177
  if ( computed ) {
6059
6178
  ret = computed.getPropertyValue( name ) || computed[ name ];
6060
6179
 
@@ -6120,6 +6239,7 @@ var
6120
6239
  // except "table", "table-cell", or "table-caption"
6121
6240
  // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6122
6241
  rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6242
+ rcustomProp = /^--/,
6123
6243
  cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6124
6244
  cssNormalTransform = {
6125
6245
  letterSpacing: "0",
@@ -6149,6 +6269,16 @@ function vendorPropName( name ) {
6149
6269
  }
6150
6270
  }
6151
6271
 
6272
+ // Return a property mapped along what jQuery.cssProps suggests or to
6273
+ // a vendor prefixed property.
6274
+ function finalPropName( name ) {
6275
+ var ret = jQuery.cssProps[ name ];
6276
+ if ( !ret ) {
6277
+ ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
6278
+ }
6279
+ return ret;
6280
+ }
6281
+
6152
6282
  function setPositiveNumber( elem, value, subtract ) {
6153
6283
 
6154
6284
  // Any relative (+/-) values have already been
@@ -6162,15 +6292,17 @@ function setPositiveNumber( elem, value, subtract ) {
6162
6292
  }
6163
6293
 
6164
6294
  function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
6165
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
6166
-
6167
- // If we already have the right measurement, avoid augmentation
6168
- 4 :
6295
+ var i,
6296
+ val = 0;
6169
6297
 
6170
- // Otherwise initialize for horizontal or vertical properties
6171
- name === "width" ? 1 : 0,
6298
+ // If we already have the right measurement, avoid augmentation
6299
+ if ( extra === ( isBorderBox ? "border" : "content" ) ) {
6300
+ i = 4;
6172
6301
 
6173
- val = 0;
6302
+ // Otherwise initialize for horizontal or vertical properties
6303
+ } else {
6304
+ i = name === "width" ? 1 : 0;
6305
+ }
6174
6306
 
6175
6307
  for ( ; i < 4; i += 2 ) {
6176
6308
 
@@ -6207,43 +6339,24 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
6207
6339
 
6208
6340
  function getWidthOrHeight( elem, name, extra ) {
6209
6341
 
6210
- // Start with offset property, which is equivalent to the border-box value
6211
- var val,
6212
- valueIsBorderBox = true,
6342
+ // Start with computed style
6343
+ var valueIsBorderBox,
6213
6344
  styles = getStyles( elem ),
6345
+ val = curCSS( elem, name, styles ),
6214
6346
  isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
6215
6347
 
6216
- // Support: IE <=11 only
6217
- // Running getBoundingClientRect on a disconnected node
6218
- // in IE throws an error.
6219
- if ( elem.getClientRects().length ) {
6220
- val = elem.getBoundingClientRect()[ name ];
6348
+ // Computed unit is not pixels. Stop here and return.
6349
+ if ( rnumnonpx.test( val ) ) {
6350
+ return val;
6221
6351
  }
6222
6352
 
6223
- // Some non-html elements return undefined for offsetWidth, so check for null/undefined
6224
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
6225
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
6226
- if ( val <= 0 || val == null ) {
6227
-
6228
- // Fall back to computed then uncomputed css if necessary
6229
- val = curCSS( elem, name, styles );
6230
- if ( val < 0 || val == null ) {
6231
- val = elem.style[ name ];
6232
- }
6233
-
6234
- // Computed unit is not pixels. Stop here and return.
6235
- if ( rnumnonpx.test( val ) ) {
6236
- return val;
6237
- }
6353
+ // Check for style in case a browser which returns unreliable values
6354
+ // for getComputedStyle silently falls back to the reliable elem.style
6355
+ valueIsBorderBox = isBorderBox &&
6356
+ ( support.boxSizingReliable() || val === elem.style[ name ] );
6238
6357
 
6239
- // Check for style in case a browser which returns unreliable values
6240
- // for getComputedStyle silently falls back to the reliable elem.style
6241
- valueIsBorderBox = isBorderBox &&
6242
- ( support.boxSizingReliable() || val === elem.style[ name ] );
6243
-
6244
- // Normalize "", auto, and prepare for extra
6245
- val = parseFloat( val ) || 0;
6246
- }
6358
+ // Normalize "", auto, and prepare for extra
6359
+ val = parseFloat( val ) || 0;
6247
6360
 
6248
6361
  // Use the active box-sizing model to add/subtract irrelevant styles
6249
6362
  return ( val +
@@ -6308,10 +6421,15 @@ jQuery.extend( {
6308
6421
  // Make sure that we're working with the right name
6309
6422
  var ret, type, hooks,
6310
6423
  origName = jQuery.camelCase( name ),
6424
+ isCustomProp = rcustomProp.test( name ),
6311
6425
  style = elem.style;
6312
6426
 
6313
- name = jQuery.cssProps[ origName ] ||
6314
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
6427
+ // Make sure that we're working with the right name. We don't
6428
+ // want to query the value if it is a CSS custom property
6429
+ // since they are user-defined.
6430
+ if ( !isCustomProp ) {
6431
+ name = finalPropName( origName );
6432
+ }
6315
6433
 
6316
6434
  // Gets hook for the prefixed version, then unprefixed version
6317
6435
  hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
@@ -6347,7 +6465,11 @@ jQuery.extend( {
6347
6465
  if ( !hooks || !( "set" in hooks ) ||
6348
6466
  ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
6349
6467
 
6350
- style[ name ] = value;
6468
+ if ( isCustomProp ) {
6469
+ style.setProperty( name, value );
6470
+ } else {
6471
+ style[ name ] = value;
6472
+ }
6351
6473
  }
6352
6474
 
6353
6475
  } else {
@@ -6366,11 +6488,15 @@ jQuery.extend( {
6366
6488
 
6367
6489
  css: function( elem, name, extra, styles ) {
6368
6490
  var val, num, hooks,
6369
- origName = jQuery.camelCase( name );
6491
+ origName = jQuery.camelCase( name ),
6492
+ isCustomProp = rcustomProp.test( name );
6370
6493
 
6371
- // Make sure that we're working with the right name
6372
- name = jQuery.cssProps[ origName ] ||
6373
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
6494
+ // Make sure that we're working with the right name. We don't
6495
+ // want to modify the value if it is a CSS custom property
6496
+ // since they are user-defined.
6497
+ if ( !isCustomProp ) {
6498
+ name = finalPropName( origName );
6499
+ }
6374
6500
 
6375
6501
  // Try prefixed name followed by the unprefixed name
6376
6502
  hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
@@ -6395,6 +6521,7 @@ jQuery.extend( {
6395
6521
  num = parseFloat( val );
6396
6522
  return extra === true || isFinite( num ) ? num || 0 : val;
6397
6523
  }
6524
+
6398
6525
  return val;
6399
6526
  }
6400
6527
  } );
@@ -6494,7 +6621,7 @@ jQuery.fn.extend( {
6494
6621
  map = {},
6495
6622
  i = 0;
6496
6623
 
6497
- if ( jQuery.isArray( name ) ) {
6624
+ if ( Array.isArray( name ) ) {
6498
6625
  styles = getStyles( elem );
6499
6626
  len = name.length;
6500
6627
 
@@ -6632,13 +6759,18 @@ jQuery.fx.step = {};
6632
6759
 
6633
6760
 
6634
6761
  var
6635
- fxNow, timerId,
6762
+ fxNow, inProgress,
6636
6763
  rfxtypes = /^(?:toggle|show|hide)$/,
6637
6764
  rrun = /queueHooks$/;
6638
6765
 
6639
- function raf() {
6640
- if ( timerId ) {
6641
- window.requestAnimationFrame( raf );
6766
+ function schedule() {
6767
+ if ( inProgress ) {
6768
+ if ( document.hidden === false && window.requestAnimationFrame ) {
6769
+ window.requestAnimationFrame( schedule );
6770
+ } else {
6771
+ window.setTimeout( schedule, jQuery.fx.interval );
6772
+ }
6773
+
6642
6774
  jQuery.fx.tick();
6643
6775
  }
6644
6776
  }
@@ -6865,7 +6997,7 @@ function propFilter( props, specialEasing ) {
6865
6997
  name = jQuery.camelCase( index );
6866
6998
  easing = specialEasing[ name ];
6867
6999
  value = props[ index ];
6868
- if ( jQuery.isArray( value ) ) {
7000
+ if ( Array.isArray( value ) ) {
6869
7001
  easing = value[ 1 ];
6870
7002
  value = props[ index ] = value[ 0 ];
6871
7003
  }
@@ -6924,12 +7056,19 @@ function Animation( elem, properties, options ) {
6924
7056
 
6925
7057
  deferred.notifyWith( elem, [ animation, percent, remaining ] );
6926
7058
 
7059
+ // If there's more to do, yield
6927
7060
  if ( percent < 1 && length ) {
6928
7061
  return remaining;
6929
- } else {
6930
- deferred.resolveWith( elem, [ animation ] );
6931
- return false;
6932
7062
  }
7063
+
7064
+ // If this was an empty animation, synthesize a final progress notification
7065
+ if ( !length ) {
7066
+ deferred.notifyWith( elem, [ animation, 1, 0 ] );
7067
+ }
7068
+
7069
+ // Resolve the animation and report its conclusion
7070
+ deferred.resolveWith( elem, [ animation ] );
7071
+ return false;
6933
7072
  },
6934
7073
  animation = deferred.promise( {
6935
7074
  elem: elem,
@@ -6994,6 +7133,13 @@ function Animation( elem, properties, options ) {
6994
7133
  animation.opts.start.call( elem, animation );
6995
7134
  }
6996
7135
 
7136
+ // Attach callbacks from options
7137
+ animation
7138
+ .progress( animation.opts.progress )
7139
+ .done( animation.opts.done, animation.opts.complete )
7140
+ .fail( animation.opts.fail )
7141
+ .always( animation.opts.always );
7142
+
6997
7143
  jQuery.fx.timer(
6998
7144
  jQuery.extend( tick, {
6999
7145
  elem: elem,
@@ -7002,11 +7148,7 @@ function Animation( elem, properties, options ) {
7002
7148
  } )
7003
7149
  );
7004
7150
 
7005
- // attach callbacks from options
7006
- return animation.progress( animation.opts.progress )
7007
- .done( animation.opts.done, animation.opts.complete )
7008
- .fail( animation.opts.fail )
7009
- .always( animation.opts.always );
7151
+ return animation;
7010
7152
  }
7011
7153
 
7012
7154
  jQuery.Animation = jQuery.extend( Animation, {
@@ -7024,7 +7166,7 @@ jQuery.Animation = jQuery.extend( Animation, {
7024
7166
  callback = props;
7025
7167
  props = [ "*" ];
7026
7168
  } else {
7027
- props = props.match( rnotwhite );
7169
+ props = props.match( rnothtmlwhite );
7028
7170
  }
7029
7171
 
7030
7172
  var prop,
@@ -7057,14 +7199,19 @@ jQuery.speed = function( speed, easing, fn ) {
7057
7199
  easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
7058
7200
  };
7059
7201
 
7060
- // Go to the end state if fx are off or if document is hidden
7061
- if ( jQuery.fx.off || document.hidden ) {
7202
+ // Go to the end state if fx are off
7203
+ if ( jQuery.fx.off ) {
7062
7204
  opt.duration = 0;
7063
7205
 
7064
7206
  } else {
7065
- opt.duration = typeof opt.duration === "number" ?
7066
- opt.duration : opt.duration in jQuery.fx.speeds ?
7067
- jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
7207
+ if ( typeof opt.duration !== "number" ) {
7208
+ if ( opt.duration in jQuery.fx.speeds ) {
7209
+ opt.duration = jQuery.fx.speeds[ opt.duration ];
7210
+
7211
+ } else {
7212
+ opt.duration = jQuery.fx.speeds._default;
7213
+ }
7214
+ }
7068
7215
  }
7069
7216
 
7070
7217
  // Normalize opt.queue - true/undefined/null -> "fx"
@@ -7245,7 +7392,7 @@ jQuery.fx.tick = function() {
7245
7392
  for ( ; i < timers.length; i++ ) {
7246
7393
  timer = timers[ i ];
7247
7394
 
7248
- // Checks the timer has not already been removed
7395
+ // Run the timer and safely remove it when done (allowing for external removal)
7249
7396
  if ( !timer() && timers[ i ] === timer ) {
7250
7397
  timers.splice( i--, 1 );
7251
7398
  }
@@ -7259,30 +7406,21 @@ jQuery.fx.tick = function() {
7259
7406
 
7260
7407
  jQuery.fx.timer = function( timer ) {
7261
7408
  jQuery.timers.push( timer );
7262
- if ( timer() ) {
7263
- jQuery.fx.start();
7264
- } else {
7265
- jQuery.timers.pop();
7266
- }
7409
+ jQuery.fx.start();
7267
7410
  };
7268
7411
 
7269
7412
  jQuery.fx.interval = 13;
7270
7413
  jQuery.fx.start = function() {
7271
- if ( !timerId ) {
7272
- timerId = window.requestAnimationFrame ?
7273
- window.requestAnimationFrame( raf ) :
7274
- window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
7414
+ if ( inProgress ) {
7415
+ return;
7275
7416
  }
7417
+
7418
+ inProgress = true;
7419
+ schedule();
7276
7420
  };
7277
7421
 
7278
7422
  jQuery.fx.stop = function() {
7279
- if ( window.cancelAnimationFrame ) {
7280
- window.cancelAnimationFrame( timerId );
7281
- } else {
7282
- window.clearInterval( timerId );
7283
- }
7284
-
7285
- timerId = null;
7423
+ inProgress = null;
7286
7424
  };
7287
7425
 
7288
7426
  jQuery.fx.speeds = {
@@ -7399,7 +7537,7 @@ jQuery.extend( {
7399
7537
  type: {
7400
7538
  set: function( elem, value ) {
7401
7539
  if ( !support.radioValue && value === "radio" &&
7402
- jQuery.nodeName( elem, "input" ) ) {
7540
+ nodeName( elem, "input" ) ) {
7403
7541
  var val = elem.value;
7404
7542
  elem.setAttribute( "type", value );
7405
7543
  if ( val ) {
@@ -7414,7 +7552,10 @@ jQuery.extend( {
7414
7552
  removeAttr: function( elem, value ) {
7415
7553
  var name,
7416
7554
  i = 0,
7417
- attrNames = value && value.match( rnotwhite );
7555
+
7556
+ // Attribute names can contain non-HTML whitespace characters
7557
+ // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
7558
+ attrNames = value && value.match( rnothtmlwhite );
7418
7559
 
7419
7560
  if ( attrNames && elem.nodeType === 1 ) {
7420
7561
  while ( ( name = attrNames[ i++ ] ) ) {
@@ -7521,12 +7662,19 @@ jQuery.extend( {
7521
7662
  // Use proper attribute retrieval(#12072)
7522
7663
  var tabindex = jQuery.find.attr( elem, "tabindex" );
7523
7664
 
7524
- return tabindex ?
7525
- parseInt( tabindex, 10 ) :
7665
+ if ( tabindex ) {
7666
+ return parseInt( tabindex, 10 );
7667
+ }
7668
+
7669
+ if (
7526
7670
  rfocusable.test( elem.nodeName ) ||
7527
- rclickable.test( elem.nodeName ) && elem.href ?
7528
- 0 :
7529
- -1;
7671
+ rclickable.test( elem.nodeName ) &&
7672
+ elem.href
7673
+ ) {
7674
+ return 0;
7675
+ }
7676
+
7677
+ return -1;
7530
7678
  }
7531
7679
  }
7532
7680
  },
@@ -7543,9 +7691,14 @@ jQuery.extend( {
7543
7691
  // on the option
7544
7692
  // The getter ensures a default option is selected
7545
7693
  // when in an optgroup
7694
+ // eslint rule "no-unused-expressions" is disabled for this code
7695
+ // since it considers such accessions noop
7546
7696
  if ( !support.optSelected ) {
7547
7697
  jQuery.propHooks.selected = {
7548
7698
  get: function( elem ) {
7699
+
7700
+ /* eslint no-unused-expressions: "off" */
7701
+
7549
7702
  var parent = elem.parentNode;
7550
7703
  if ( parent && parent.parentNode ) {
7551
7704
  parent.parentNode.selectedIndex;
@@ -7553,6 +7706,9 @@ if ( !support.optSelected ) {
7553
7706
  return null;
7554
7707
  },
7555
7708
  set: function( elem ) {
7709
+
7710
+ /* eslint no-unused-expressions: "off" */
7711
+
7556
7712
  var parent = elem.parentNode;
7557
7713
  if ( parent ) {
7558
7714
  parent.selectedIndex;
@@ -7583,7 +7739,13 @@ jQuery.each( [
7583
7739
 
7584
7740
 
7585
7741
 
7586
- var rclass = /[\t\r\n\f]/g;
7742
+ // Strip and collapse whitespace according to HTML spec
7743
+ // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace
7744
+ function stripAndCollapse( value ) {
7745
+ var tokens = value.match( rnothtmlwhite ) || [];
7746
+ return tokens.join( " " );
7747
+ }
7748
+
7587
7749
 
7588
7750
  function getClass( elem ) {
7589
7751
  return elem.getAttribute && elem.getAttribute( "class" ) || "";
@@ -7601,12 +7763,11 @@ jQuery.fn.extend( {
7601
7763
  }
7602
7764
 
7603
7765
  if ( typeof value === "string" && value ) {
7604
- classes = value.match( rnotwhite ) || [];
7766
+ classes = value.match( rnothtmlwhite ) || [];
7605
7767
 
7606
7768
  while ( ( elem = this[ i++ ] ) ) {
7607
7769
  curValue = getClass( elem );
7608
- cur = elem.nodeType === 1 &&
7609
- ( " " + curValue + " " ).replace( rclass, " " );
7770
+ cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
7610
7771
 
7611
7772
  if ( cur ) {
7612
7773
  j = 0;
@@ -7617,7 +7778,7 @@ jQuery.fn.extend( {
7617
7778
  }
7618
7779
 
7619
7780
  // Only assign if different to avoid unneeded rendering.
7620
- finalValue = jQuery.trim( cur );
7781
+ finalValue = stripAndCollapse( cur );
7621
7782
  if ( curValue !== finalValue ) {
7622
7783
  elem.setAttribute( "class", finalValue );
7623
7784
  }
@@ -7643,14 +7804,13 @@ jQuery.fn.extend( {
7643
7804
  }
7644
7805
 
7645
7806
  if ( typeof value === "string" && value ) {
7646
- classes = value.match( rnotwhite ) || [];
7807
+ classes = value.match( rnothtmlwhite ) || [];
7647
7808
 
7648
7809
  while ( ( elem = this[ i++ ] ) ) {
7649
7810
  curValue = getClass( elem );
7650
7811
 
7651
7812
  // This expression is here for better compressibility (see addClass)
7652
- cur = elem.nodeType === 1 &&
7653
- ( " " + curValue + " " ).replace( rclass, " " );
7813
+ cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
7654
7814
 
7655
7815
  if ( cur ) {
7656
7816
  j = 0;
@@ -7663,7 +7823,7 @@ jQuery.fn.extend( {
7663
7823
  }
7664
7824
 
7665
7825
  // Only assign if different to avoid unneeded rendering.
7666
- finalValue = jQuery.trim( cur );
7826
+ finalValue = stripAndCollapse( cur );
7667
7827
  if ( curValue !== finalValue ) {
7668
7828
  elem.setAttribute( "class", finalValue );
7669
7829
  }
@@ -7698,7 +7858,7 @@ jQuery.fn.extend( {
7698
7858
  // Toggle individual class names
7699
7859
  i = 0;
7700
7860
  self = jQuery( this );
7701
- classNames = value.match( rnotwhite ) || [];
7861
+ classNames = value.match( rnothtmlwhite ) || [];
7702
7862
 
7703
7863
  while ( ( className = classNames[ i++ ] ) ) {
7704
7864
 
@@ -7741,10 +7901,8 @@ jQuery.fn.extend( {
7741
7901
  className = " " + selector + " ";
7742
7902
  while ( ( elem = this[ i++ ] ) ) {
7743
7903
  if ( elem.nodeType === 1 &&
7744
- ( " " + getClass( elem ) + " " ).replace( rclass, " " )
7745
- .indexOf( className ) > -1
7746
- ) {
7747
- return true;
7904
+ ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
7905
+ return true;
7748
7906
  }
7749
7907
  }
7750
7908
 
@@ -7755,8 +7913,7 @@ jQuery.fn.extend( {
7755
7913
 
7756
7914
 
7757
7915
 
7758
- var rreturn = /\r/g,
7759
- rspaces = /[\x20\t\r\n\f]+/g;
7916
+ var rreturn = /\r/g;
7760
7917
 
7761
7918
  jQuery.fn.extend( {
7762
7919
  val: function( value ) {
@@ -7777,13 +7934,13 @@ jQuery.fn.extend( {
7777
7934
 
7778
7935
  ret = elem.value;
7779
7936
 
7780
- return typeof ret === "string" ?
7781
-
7782
- // Handle most common string cases
7783
- ret.replace( rreturn, "" ) :
7937
+ // Handle most common string cases
7938
+ if ( typeof ret === "string" ) {
7939
+ return ret.replace( rreturn, "" );
7940
+ }
7784
7941
 
7785
- // Handle cases where value is null/undef or number
7786
- ret == null ? "" : ret;
7942
+ // Handle cases where value is null/undef or number
7943
+ return ret == null ? "" : ret;
7787
7944
  }
7788
7945
 
7789
7946
  return;
@@ -7811,7 +7968,7 @@ jQuery.fn.extend( {
7811
7968
  } else if ( typeof val === "number" ) {
7812
7969
  val += "";
7813
7970
 
7814
- } else if ( jQuery.isArray( val ) ) {
7971
+ } else if ( Array.isArray( val ) ) {
7815
7972
  val = jQuery.map( val, function( value ) {
7816
7973
  return value == null ? "" : value + "";
7817
7974
  } );
@@ -7840,20 +7997,24 @@ jQuery.extend( {
7840
7997
  // option.text throws exceptions (#14686, #14858)
7841
7998
  // Strip and collapse whitespace
7842
7999
  // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
7843
- jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
8000
+ stripAndCollapse( jQuery.text( elem ) );
7844
8001
  }
7845
8002
  },
7846
8003
  select: {
7847
8004
  get: function( elem ) {
7848
- var value, option,
8005
+ var value, option, i,
7849
8006
  options = elem.options,
7850
8007
  index = elem.selectedIndex,
7851
8008
  one = elem.type === "select-one",
7852
8009
  values = one ? null : [],
7853
- max = one ? index + 1 : options.length,
7854
- i = index < 0 ?
7855
- max :
7856
- one ? index : 0;
8010
+ max = one ? index + 1 : options.length;
8011
+
8012
+ if ( index < 0 ) {
8013
+ i = max;
8014
+
8015
+ } else {
8016
+ i = one ? index : 0;
8017
+ }
7857
8018
 
7858
8019
  // Loop through all the selected options
7859
8020
  for ( ; i < max; i++ ) {
@@ -7866,7 +8027,7 @@ jQuery.extend( {
7866
8027
  // Don't return options that are disabled or in a disabled optgroup
7867
8028
  !option.disabled &&
7868
8029
  ( !option.parentNode.disabled ||
7869
- !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
8030
+ !nodeName( option.parentNode, "optgroup" ) ) ) {
7870
8031
 
7871
8032
  // Get the specific value for the option
7872
8033
  value = jQuery( option ).val();
@@ -7918,7 +8079,7 @@ jQuery.extend( {
7918
8079
  jQuery.each( [ "radio", "checkbox" ], function() {
7919
8080
  jQuery.valHooks[ this ] = {
7920
8081
  set: function( elem, value ) {
7921
- if ( jQuery.isArray( value ) ) {
8082
+ if ( Array.isArray( value ) ) {
7922
8083
  return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
7923
8084
  }
7924
8085
  }
@@ -8213,7 +8374,7 @@ var
8213
8374
  function buildParams( prefix, obj, traditional, add ) {
8214
8375
  var name;
8215
8376
 
8216
- if ( jQuery.isArray( obj ) ) {
8377
+ if ( Array.isArray( obj ) ) {
8217
8378
 
8218
8379
  // Serialize array item.
8219
8380
  jQuery.each( obj, function( i, v ) {
@@ -8265,7 +8426,7 @@ jQuery.param = function( a, traditional ) {
8265
8426
  };
8266
8427
 
8267
8428
  // If an array was passed in, assume that it is an array of form elements.
8268
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
8429
+ if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
8269
8430
 
8270
8431
  // Serialize the form elements
8271
8432
  jQuery.each( a, function() {
@@ -8307,13 +8468,17 @@ jQuery.fn.extend( {
8307
8468
  .map( function( i, elem ) {
8308
8469
  var val = jQuery( this ).val();
8309
8470
 
8310
- return val == null ?
8311
- null :
8312
- jQuery.isArray( val ) ?
8313
- jQuery.map( val, function( val ) {
8314
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8315
- } ) :
8316
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8471
+ if ( val == null ) {
8472
+ return null;
8473
+ }
8474
+
8475
+ if ( Array.isArray( val ) ) {
8476
+ return jQuery.map( val, function( val ) {
8477
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8478
+ } );
8479
+ }
8480
+
8481
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8317
8482
  } ).get();
8318
8483
  }
8319
8484
  } );
@@ -8322,7 +8487,7 @@ jQuery.fn.extend( {
8322
8487
  var
8323
8488
  r20 = /%20/g,
8324
8489
  rhash = /#.*$/,
8325
- rts = /([?&])_=[^&]*/,
8490
+ rantiCache = /([?&])_=[^&]*/,
8326
8491
  rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
8327
8492
 
8328
8493
  // #7653, #8125, #8152: local protocol detection
@@ -8368,7 +8533,7 @@ function addToPrefiltersOrTransports( structure ) {
8368
8533
 
8369
8534
  var dataType,
8370
8535
  i = 0,
8371
- dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
8536
+ dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
8372
8537
 
8373
8538
  if ( jQuery.isFunction( func ) ) {
8374
8539
 
@@ -8836,7 +9001,7 @@ jQuery.extend( {
8836
9001
  s.type = options.method || options.type || s.method || s.type;
8837
9002
 
8838
9003
  // Extract dataTypes list
8839
- s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
9004
+ s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
8840
9005
 
8841
9006
  // A cross-domain request is in order when the origin doesn't match the current origin.
8842
9007
  if ( s.crossDomain == null ) {
@@ -8908,9 +9073,9 @@ jQuery.extend( {
8908
9073
  delete s.data;
8909
9074
  }
8910
9075
 
8911
- // Add anti-cache in uncached url if needed
9076
+ // Add or update anti-cache param if needed
8912
9077
  if ( s.cache === false ) {
8913
- cacheURL = cacheURL.replace( rts, "" );
9078
+ cacheURL = cacheURL.replace( rantiCache, "$1" );
8914
9079
  uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
8915
9080
  }
8916
9081
 
@@ -9649,7 +9814,7 @@ jQuery.fn.load = function( url, params, callback ) {
9649
9814
  off = url.indexOf( " " );
9650
9815
 
9651
9816
  if ( off > -1 ) {
9652
- selector = jQuery.trim( url.slice( off ) );
9817
+ selector = stripAndCollapse( url.slice( off ) );
9653
9818
  url = url.slice( 0, off );
9654
9819
  }
9655
9820
 
@@ -9732,13 +9897,6 @@ jQuery.expr.pseudos.animated = function( elem ) {
9732
9897
 
9733
9898
 
9734
9899
 
9735
- /**
9736
- * Gets a window from an element
9737
- */
9738
- function getWindow( elem ) {
9739
- return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
9740
- }
9741
-
9742
9900
  jQuery.offset = {
9743
9901
  setOffset: function( elem, options, i ) {
9744
9902
  var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
@@ -9803,13 +9961,14 @@ jQuery.fn.extend( {
9803
9961
  } );
9804
9962
  }
9805
9963
 
9806
- var docElem, win, rect, doc,
9964
+ var doc, docElem, rect, win,
9807
9965
  elem = this[ 0 ];
9808
9966
 
9809
9967
  if ( !elem ) {
9810
9968
  return;
9811
9969
  }
9812
9970
 
9971
+ // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
9813
9972
  // Support: IE <=11 only
9814
9973
  // Running getBoundingClientRect on a
9815
9974
  // disconnected node in IE throws an error
@@ -9819,20 +9978,14 @@ jQuery.fn.extend( {
9819
9978
 
9820
9979
  rect = elem.getBoundingClientRect();
9821
9980
 
9822
- // Make sure element is not hidden (display: none)
9823
- if ( rect.width || rect.height ) {
9824
- doc = elem.ownerDocument;
9825
- win = getWindow( doc );
9826
- docElem = doc.documentElement;
9827
-
9828
- return {
9829
- top: rect.top + win.pageYOffset - docElem.clientTop,
9830
- left: rect.left + win.pageXOffset - docElem.clientLeft
9831
- };
9832
- }
9981
+ doc = elem.ownerDocument;
9982
+ docElem = doc.documentElement;
9983
+ win = doc.defaultView;
9833
9984
 
9834
- // Return zeros for disconnected and hidden elements (gh-2310)
9835
- return rect;
9985
+ return {
9986
+ top: rect.top + win.pageYOffset - docElem.clientTop,
9987
+ left: rect.left + win.pageXOffset - docElem.clientLeft
9988
+ };
9836
9989
  },
9837
9990
 
9838
9991
  position: function() {
@@ -9858,7 +10011,7 @@ jQuery.fn.extend( {
9858
10011
 
9859
10012
  // Get correct offsets
9860
10013
  offset = this.offset();
9861
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
10014
+ if ( !nodeName( offsetParent[ 0 ], "html" ) ) {
9862
10015
  parentOffset = offsetParent.offset();
9863
10016
  }
9864
10017
 
@@ -9905,7 +10058,14 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
9905
10058
 
9906
10059
  jQuery.fn[ method ] = function( val ) {
9907
10060
  return access( this, function( elem, method, val ) {
9908
- var win = getWindow( elem );
10061
+
10062
+ // Coalesce documents and windows
10063
+ var win;
10064
+ if ( jQuery.isWindow( elem ) ) {
10065
+ win = elem;
10066
+ } else if ( elem.nodeType === 9 ) {
10067
+ win = elem.defaultView;
10068
+ }
9909
10069
 
9910
10070
  if ( val === undefined ) {
9911
10071
  return win ? win[ prop ] : elem[ method ];
@@ -10011,10 +10171,19 @@ jQuery.fn.extend( {
10011
10171
  return arguments.length === 1 ?
10012
10172
  this.off( selector, "**" ) :
10013
10173
  this.off( types, selector || "**", fn );
10174
+ },
10175
+ holdReady: function( hold ) {
10176
+ if ( hold ) {
10177
+ jQuery.readyWait++;
10178
+ } else {
10179
+ jQuery.ready( true );
10180
+ }
10014
10181
  }
10015
10182
  } );
10016
10183
 
10184
+ jQuery.isArray = Array.isArray;
10017
10185
  jQuery.parseJSON = JSON.parse;
10186
+ jQuery.nodeName = nodeName;
10018
10187
 
10019
10188
 
10020
10189
 
@@ -10041,7 +10210,6 @@ if ( typeof define === "function" && define.amd ) {
10041
10210
 
10042
10211
 
10043
10212
 
10044
-
10045
10213
  var
10046
10214
 
10047
10215
  // Map over jQuery in case of overwrite
@@ -10070,5 +10238,7 @@ if ( !noGlobal ) {
10070
10238
  }
10071
10239
 
10072
10240
 
10241
+
10242
+
10073
10243
  return jQuery;
10074
10244
  } );