selenium-webdriver 2.52.0 → 2.53.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.
Files changed (33) hide show
  1. data/CHANGES +14 -0
  2. data/Gemfile.lock +53 -0
  3. data/lib/selenium/webdriver.rb +1 -3
  4. data/lib/selenium/webdriver/chrome/profile.rb +2 -2
  5. data/lib/selenium/webdriver/chrome/service.rb +8 -5
  6. data/lib/selenium/webdriver/common.rb +0 -1
  7. data/lib/selenium/webdriver/common/alert.rb +7 -1
  8. data/lib/selenium/webdriver/common/element.rb +1 -1
  9. data/lib/selenium/webdriver/common/error.rb +1 -1
  10. data/lib/selenium/webdriver/common/platform.rb +8 -0
  11. data/lib/selenium/webdriver/common/profile_helper.rb +2 -2
  12. data/lib/selenium/webdriver/common/proxy.rb +1 -1
  13. data/lib/selenium/webdriver/edge/legacy_support.rb +5 -5
  14. data/lib/selenium/webdriver/edge/service.rb +8 -5
  15. data/lib/selenium/webdriver/firefox/binary.rb +4 -0
  16. data/lib/selenium/webdriver/firefox/extension.rb +13 -11
  17. data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
  18. data/lib/selenium/webdriver/firefox/profile.rb +3 -3
  19. data/lib/selenium/webdriver/firefox/service.rb +8 -5
  20. data/lib/selenium/webdriver/phantomjs/service.rb +8 -6
  21. data/lib/selenium/webdriver/remote/bridge.rb +4 -0
  22. data/lib/selenium/webdriver/remote/capabilities.rb +1 -1
  23. data/lib/selenium/webdriver/remote/commands.rb +2 -1
  24. data/lib/selenium/webdriver/remote/http/common.rb +2 -2
  25. data/lib/selenium/webdriver/remote/w3c_bridge.rb +8 -8
  26. data/lib/selenium/webdriver/remote/w3c_capabilities.rb +31 -14
  27. data/lib/selenium/webdriver/remote/w3c_commands.rb +1 -1
  28. data/lib/selenium/webdriver/safari/resources/client.js +266 -214
  29. data/lib/selenium/webdriver/safari/server.rb +6 -4
  30. data/lib/selenium/webdriver/support/select.rb +12 -2
  31. data/selenium-webdriver.gemspec +1 -2
  32. metadata +18 -29
  33. data/lib/selenium/webdriver/common/json_helper.rb +0 -53
@@ -253,7 +253,7 @@ module Selenium
253
253
 
254
254
  def maximizeWindow(handle = :current)
255
255
  unless handle == :current
256
- raise Error::WebDriverError, 'Switch to desired window before changing its size'
256
+ raise Error::UnsupportedOperationError, 'Switch to desired window before changing its size'
257
257
  end
258
258
  execute :maximizeWindow
259
259
  end
@@ -264,7 +264,7 @@ module Selenium
264
264
 
265
265
  def getWindowSize(handle = :current)
266
266
  unless handle == :current
267
- raise Error::WebDriverError, 'Switch to desired window before getting its size'
267
+ raise Error::UnsupportedOperationError, 'Switch to desired window before getting its size'
268
268
  end
269
269
  data = execute :getWindowSize
270
270
 
@@ -272,11 +272,11 @@ module Selenium
272
272
  end
273
273
 
274
274
  def setWindowPosition(_x, _y, _handle = nil)
275
- raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support setting the Window Position'
275
+ raise Error::UnsupportedOperationError, 'The W3C standard does not currently support setting the Window Position'
276
276
  end
277
277
 
278
278
  def getWindowPosition(_handle = nil)
279
- raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support getting the Window Position'
279
+ raise Error::UnsupportedOperationError, 'The W3C standard does not currently support getting the Window Position'
280
280
  end
281
281
 
282
282
  def getScreenshot
@@ -336,19 +336,19 @@ module Selenium
336
336
  end
337
337
 
338
338
  def getLocation
339
- raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support getting location'
339
+ raise Error::UnsupportedOperationError, 'The W3C standard does not currently support getting location'
340
340
  end
341
341
 
342
342
  def setLocation(_lat, _lon, _alt)
343
- raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support setting location'
343
+ raise Error::UnsupportedOperationError, 'The W3C standard does not currently support setting location'
344
344
  end
345
345
 
346
346
  def getNetworkConnection
347
- raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support getting network connection'
347
+ raise Error::UnsupportedOperationError, 'The W3C standard does not currently support getting network connection'
348
348
  end
349
349
 
350
350
  def setNetworkConnection(_type)
351
- raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support setting network connection'
351
+ raise Error::UnsupportedOperationError, 'The W3C standard does not currently support setting network connection'
352
352
  end
353
353
 
354
354
  #
@@ -38,7 +38,17 @@ module Selenium
38
38
  :proxy => nil
39
39
  }
40
40
 
41
- DEFAULTS.each_key do |key|
41
+ KNOWN = [
42
+ :remote_session_id,
43
+ :specification_level,
44
+ :xul_app_id,
45
+ :raise_accessibility_exceptions,
46
+ :rotatable,
47
+ :app_build_id,
48
+ :device
49
+ ]
50
+
51
+ (DEFAULTS.keys + KNOWN).each do |key|
42
52
  define_method key do
43
53
  @capabilities.fetch(key)
44
54
  end
@@ -48,8 +58,14 @@ module Selenium
48
58
  end
49
59
  end
50
60
 
61
+ #
62
+ # Backward compatibility
63
+ #
64
+
51
65
  alias_method :version, :browser_version
66
+ alias_method :version=, :browser_version=
52
67
  alias_method :platform, :platform_name
68
+ alias_method :platform=, :platform_name=
53
69
 
54
70
  #
55
71
  # Convenience methods for the common choices.
@@ -88,19 +104,20 @@ module Selenium
88
104
  data = data.dup
89
105
 
90
106
  # Convert due to Remote Driver implementation
91
- data["browserVersion"] = data.delete("version") if data["version"]
92
- data["platformName"] = data.delete("platform") if data["platform"]
107
+ data["browserVersion"] = data.delete("version") if data.key? "version"
108
+ data["platformName"] = data.delete("platform") if data.key? "platform"
93
109
 
94
110
  caps = new
95
- caps.browser_name = data.delete("browserName") if data["browserName"]
96
- caps.browser_version = data.delete("browserVersion") if data["browserVersion"]
97
- caps.platform_name = data.delete("platformName") if data["platformName"]
98
- caps.platform_version = data.delete("platformVersion") if data["platformVersion"]
99
- caps.accept_ssl_certs = data.delete("acceptSslCerts") if data["acceptSslCerts"]
100
- caps.takes_screenshot = data.delete("takesScreenshot") if data["takesScreenshot"]
101
- caps.takes_element_screenshot = data.delete("takesElementScreenshot") if data["takesElementScreenshot"]
102
- caps.page_load_strategy = data.delete("pageLoadStrategy") if data["pageloadStrategy"]
103
- caps.proxy = Proxy.json_create(data['proxy']) if data['proxy']
111
+ caps.browser_name = data.delete("browserName") if data.key? "browserName"
112
+ caps.browser_version = data.delete("browserVersion") if data.key? "browserVersion"
113
+ caps.platform_name = data.delete("platformName") if data.key? "platformName"
114
+ caps.platform_version = data.delete("platformVersion") if data.key? "platformVersion"
115
+ caps.accept_ssl_certs = data.delete("acceptSslCerts") if data.key? "acceptSslCerts"
116
+ caps.takes_screenshot = data.delete("takesScreenshot") if data.key? "takesScreenshot"
117
+ caps.takes_element_screenshot = data.delete("takesElementScreenshot") if data.key? "takesElementScreenshot"
118
+ caps.page_load_strategy = data.delete("pageLoadStrategy") if data.key? "pageloadStrategy"
119
+ proxy = data.delete('proxy')
120
+ caps.proxy = Proxy.json_create(proxy) unless proxy.nil? || proxy.empty?
104
121
 
105
122
  # Remote Server Specific
106
123
  caps[:remote_session_id] = data.delete('webdriver.remote.sessionid')
@@ -110,7 +127,7 @@ module Selenium
110
127
  data.delete('cssSelectorsEnabled')
111
128
 
112
129
  # Marionette Specific
113
- caps[:specification_level] = data.delete("specificaionLevel")
130
+ caps[:specification_level] = data.delete("specificationLevel")
114
131
  caps[:xul_app_id] = data.delete("XULappId")
115
132
  caps[:raise_accessibility_exceptions] = data.delete('raisesAccessibilityExceptions')
116
133
  caps[:rotatable] = data.delete('rotatable')
@@ -199,7 +216,7 @@ module Selenium
199
216
  end
200
217
 
201
218
  def to_json(*args)
202
- WebDriver.json_dump as_json
219
+ JSON.generate as_json
203
220
  end
204
221
 
205
222
  def ==(other)
@@ -65,7 +65,7 @@ class Selenium::WebDriver::Remote::W3CBridge
65
65
  command :findElements, :post, "session/:session_id/elements"
66
66
  command :findChildElement, :post, "session/:session_id/element/:id/element"
67
67
  command :findChildElements, :post, "session/:session_id/element/:id/elements"
68
- command :getActiveElement, :post, "session/:session_id/element/active"
68
+ command :getActiveElement, :get, "session/:session_id/element/active"
69
69
  command :isElementSelected, :get, "session/:session_id/element/:id/selected"
70
70
  command :getElementAttribute, :get, "session/:session_id/element/:id/attribute/:name"
71
71
  command :getElementProperty, :get, "session/:session_id/element/:id/property/:name"
@@ -107,8 +107,10 @@ goog.addDependency = function(a, b, c, d) {
107
107
  if (goog.DEPENDENCIES_ENABLED) {
108
108
  var e;
109
109
  a = a.replace(/\\/g, "/");
110
- for (var f = goog.dependencies_, g = 0;e = b[g];g++) {
111
- f.nameToPath[e] = a, f.pathIsModule[a] = !!d;
110
+ var f = goog.dependencies_;
111
+ d && "boolean" !== typeof d || (d = d ? {module:"goog"} : {});
112
+ for (var g = 0;e = b[g];g++) {
113
+ f.nameToPath[e] = a, f.pathIsModule[a] = "goog" == d.module;
112
114
  }
113
115
  for (d = 0;b = c[d];d++) {
114
116
  a in f.requires || (f.requires[a] = {}), f.requires[a][b] = !0;
@@ -395,7 +397,7 @@ goog.hasUid = function(a) {
395
397
  return !!a[goog.UID_PROPERTY_];
396
398
  };
397
399
  goog.removeUid = function(a) {
398
- "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
400
+ null !== a && "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
399
401
  try {
400
402
  delete a[goog.UID_PROPERTY_];
401
403
  } catch (b) {
@@ -467,7 +469,7 @@ goog.globalEval = function(a) {
467
469
  if (goog.global.eval("var _evalTest_ = 1;"), "undefined" != typeof goog.global._evalTest_) {
468
470
  try {
469
471
  delete goog.global._evalTest_;
470
- } catch (b) {
472
+ } catch (d) {
471
473
  }
472
474
  goog.evalWorksForGlobals_ = !0;
473
475
  } else {
@@ -477,12 +479,12 @@ goog.globalEval = function(a) {
477
479
  if (goog.evalWorksForGlobals_) {
478
480
  goog.global.eval(a);
479
481
  } else {
480
- var c = goog.global.document, d = c.createElement("SCRIPT");
481
- d.type = "text/javascript";
482
- d.defer = !1;
483
- d.appendChild(c.createTextNode(a));
484
- c.body.appendChild(d);
485
- c.body.removeChild(d);
482
+ var b = goog.global.document, c = b.createElement("SCRIPT");
483
+ c.type = "text/javascript";
484
+ c.defer = !1;
485
+ c.appendChild(b.createTextNode(a));
486
+ b.body.appendChild(c);
487
+ b.body.removeChild(c);
486
488
  }
487
489
  } else {
488
490
  throw Error("goog.globalEval not available");
@@ -1017,7 +1019,7 @@ goog.string.editDistance = function(a, b) {
1017
1019
  for (e = 0;e < a.length;e++) {
1018
1020
  d[0] = e + 1;
1019
1021
  for (var f = 0;f < b.length;f++) {
1020
- d[f + 1] = Math.min(d[f] + 1, c[f + 1] + 1, c[f] + (a[e] != b[f]));
1022
+ d[f + 1] = Math.min(d[f] + 1, c[f + 1] + 1, c[f] + Number(a[e] != b[f]));
1021
1023
  }
1022
1024
  for (f = 0;f < c.length;f++) {
1023
1025
  c[f] = d[f];
@@ -1106,10 +1108,9 @@ goog.array.peek = function(a) {
1106
1108
  return a[a.length - 1];
1107
1109
  };
1108
1110
  goog.array.last = goog.array.peek;
1109
- goog.array.ARRAY_PROTOTYPE_ = Array.prototype;
1110
- goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.indexOf) ? function(a, b, c) {
1111
+ goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ? function(a, b, c) {
1111
1112
  goog.asserts.assert(null != a.length);
1112
- return goog.array.ARRAY_PROTOTYPE_.indexOf.call(a, b, c);
1113
+ return Array.prototype.indexOf.call(a, b, c);
1113
1114
  } : function(a, b, c) {
1114
1115
  c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
1115
1116
  if (goog.isString(a)) {
@@ -1122,9 +1123,9 @@ goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_F
1122
1123
  }
1123
1124
  return -1;
1124
1125
  };
1125
- goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.lastIndexOf) ? function(a, b, c) {
1126
+ goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.lastIndexOf) ? function(a, b, c) {
1126
1127
  goog.asserts.assert(null != a.length);
1127
- return goog.array.ARRAY_PROTOTYPE_.lastIndexOf.call(a, b, null == c ? a.length - 1 : c);
1128
+ return Array.prototype.lastIndexOf.call(a, b, null == c ? a.length - 1 : c);
1128
1129
  } : function(a, b, c) {
1129
1130
  c = null == c ? a.length - 1 : c;
1130
1131
  0 > c && (c = Math.max(0, a.length + c));
@@ -1138,9 +1139,9 @@ goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATI
1138
1139
  }
1139
1140
  return -1;
1140
1141
  };
1141
- goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.forEach) ? function(a, b, c) {
1142
+ goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ? function(a, b, c) {
1142
1143
  goog.asserts.assert(null != a.length);
1143
- goog.array.ARRAY_PROTOTYPE_.forEach.call(a, b, c);
1144
+ Array.prototype.forEach.call(a, b, c);
1144
1145
  } : function(a, b, c) {
1145
1146
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
1146
1147
  f in e && b.call(c, e[f], f, a);
@@ -1151,9 +1152,9 @@ goog.array.forEachRight = function(a, b, c) {
1151
1152
  d in e && b.call(c, e[d], d, a);
1152
1153
  }
1153
1154
  };
1154
- goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.filter) ? function(a, b, c) {
1155
+ goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ? function(a, b, c) {
1155
1156
  goog.asserts.assert(null != a.length);
1156
- return goog.array.ARRAY_PROTOTYPE_.filter.call(a, b, c);
1157
+ return Array.prototype.filter.call(a, b, c);
1157
1158
  } : function(a, b, c) {
1158
1159
  for (var d = a.length, e = [], f = 0, g = goog.isString(a) ? a.split("") : a, h = 0;h < d;h++) {
1159
1160
  if (h in g) {
@@ -1163,19 +1164,19 @@ goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FU
1163
1164
  }
1164
1165
  return e;
1165
1166
  };
1166
- goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.map) ? function(a, b, c) {
1167
+ goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ? function(a, b, c) {
1167
1168
  goog.asserts.assert(null != a.length);
1168
- return goog.array.ARRAY_PROTOTYPE_.map.call(a, b, c);
1169
+ return Array.prototype.map.call(a, b, c);
1169
1170
  } : function(a, b, c) {
1170
1171
  for (var d = a.length, e = Array(d), f = goog.isString(a) ? a.split("") : a, g = 0;g < d;g++) {
1171
1172
  g in f && (e[g] = b.call(c, f[g], g, a));
1172
1173
  }
1173
1174
  return e;
1174
1175
  };
1175
- goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.reduce) ? function(a, b, c, d) {
1176
+ goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function(a, b, c, d) {
1176
1177
  goog.asserts.assert(null != a.length);
1177
1178
  d && (b = goog.bind(b, d));
1178
- return goog.array.ARRAY_PROTOTYPE_.reduce.call(a, b, c);
1179
+ return Array.prototype.reduce.call(a, b, c);
1179
1180
  } : function(a, b, c, d) {
1180
1181
  var e = c;
1181
1182
  goog.array.forEach(a, function(c, g) {
@@ -1183,10 +1184,11 @@ goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FU
1183
1184
  });
1184
1185
  return e;
1185
1186
  };
1186
- goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.reduceRight) ? function(a, b, c, d) {
1187
+ goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ? function(a, b, c, d) {
1187
1188
  goog.asserts.assert(null != a.length);
1189
+ goog.asserts.assert(null != b);
1188
1190
  d && (b = goog.bind(b, d));
1189
- return goog.array.ARRAY_PROTOTYPE_.reduceRight.call(a, b, c);
1191
+ return Array.prototype.reduceRight.call(a, b, c);
1190
1192
  } : function(a, b, c, d) {
1191
1193
  var e = c;
1192
1194
  goog.array.forEachRight(a, function(c, g) {
@@ -1194,9 +1196,9 @@ goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATI
1194
1196
  });
1195
1197
  return e;
1196
1198
  };
1197
- goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.some) ? function(a, b, c) {
1199
+ goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.some) ? function(a, b, c) {
1198
1200
  goog.asserts.assert(null != a.length);
1199
- return goog.array.ARRAY_PROTOTYPE_.some.call(a, b, c);
1201
+ return Array.prototype.some.call(a, b, c);
1200
1202
  } : function(a, b, c) {
1201
1203
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
1202
1204
  if (f in e && b.call(c, e[f], f, a)) {
@@ -1205,9 +1207,9 @@ goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNC
1205
1207
  }
1206
1208
  return !1;
1207
1209
  };
1208
- goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.every) ? function(a, b, c) {
1210
+ goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.every) ? function(a, b, c) {
1209
1211
  goog.asserts.assert(null != a.length);
1210
- return goog.array.ARRAY_PROTOTYPE_.every.call(a, b, c);
1212
+ return Array.prototype.every.call(a, b, c);
1211
1213
  } : function(a, b, c) {
1212
1214
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
1213
1215
  if (f in e && !b.call(c, e[f], f, a)) {
@@ -1281,7 +1283,7 @@ goog.array.remove = function(a, b) {
1281
1283
  };
1282
1284
  goog.array.removeAt = function(a, b) {
1283
1285
  goog.asserts.assert(null != a.length);
1284
- return 1 == goog.array.ARRAY_PROTOTYPE_.splice.call(a, b, 1).length;
1286
+ return 1 == Array.prototype.splice.call(a, b, 1).length;
1285
1287
  };
1286
1288
  goog.array.removeIf = function(a, b, c) {
1287
1289
  b = goog.array.findIndex(a, b, c);
@@ -1295,10 +1297,10 @@ goog.array.removeAllIf = function(a, b, c) {
1295
1297
  return d;
1296
1298
  };
1297
1299
  goog.array.concat = function(a) {
1298
- return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments);
1300
+ return Array.prototype.concat.apply(Array.prototype, arguments);
1299
1301
  };
1300
1302
  goog.array.join = function(a) {
1301
- return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments);
1303
+ return Array.prototype.concat.apply(Array.prototype, arguments);
1302
1304
  };
1303
1305
  goog.array.toArray = function(a) {
1304
1306
  var b = a.length;
@@ -1327,11 +1329,11 @@ goog.array.extend = function(a, b) {
1327
1329
  };
1328
1330
  goog.array.splice = function(a, b, c, d) {
1329
1331
  goog.asserts.assert(null != a.length);
1330
- return goog.array.ARRAY_PROTOTYPE_.splice.apply(a, goog.array.slice(arguments, 1));
1332
+ return Array.prototype.splice.apply(a, goog.array.slice(arguments, 1));
1331
1333
  };
1332
1334
  goog.array.slice = function(a, b, c) {
1333
1335
  goog.asserts.assert(null != a.length);
1334
- return 2 >= arguments.length ? goog.array.ARRAY_PROTOTYPE_.slice.call(a, b) : goog.array.ARRAY_PROTOTYPE_.slice.call(a, b, c);
1336
+ return 2 >= arguments.length ? Array.prototype.slice.call(a, b) : Array.prototype.slice.call(a, b, c);
1335
1337
  };
1336
1338
  goog.array.removeDuplicates = function(a, b, c) {
1337
1339
  b = b || a;
@@ -1490,14 +1492,14 @@ goog.array.flatten = function(a) {
1490
1492
  };
1491
1493
  goog.array.rotate = function(a, b) {
1492
1494
  goog.asserts.assert(null != a.length);
1493
- a.length && (b %= a.length, 0 < b ? goog.array.ARRAY_PROTOTYPE_.unshift.apply(a, a.splice(-b, b)) : 0 > b && goog.array.ARRAY_PROTOTYPE_.push.apply(a, a.splice(0, -b)));
1495
+ a.length && (b %= a.length, 0 < b ? Array.prototype.unshift.apply(a, a.splice(-b, b)) : 0 > b && Array.prototype.push.apply(a, a.splice(0, -b)));
1494
1496
  return a;
1495
1497
  };
1496
1498
  goog.array.moveItem = function(a, b, c) {
1497
1499
  goog.asserts.assert(0 <= b && b < a.length);
1498
1500
  goog.asserts.assert(0 <= c && c < a.length);
1499
- b = goog.array.ARRAY_PROTOTYPE_.splice.call(a, b, 1);
1500
- goog.array.ARRAY_PROTOTYPE_.splice.call(a, c, 0, b[0]);
1501
+ b = Array.prototype.splice.call(a, b, 1);
1502
+ Array.prototype.splice.call(a, c, 0, b[0]);
1501
1503
  };
1502
1504
  goog.array.zip = function(a) {
1503
1505
  if (!arguments.length) {
@@ -1904,6 +1906,14 @@ goog.functions.nth = function(a) {
1904
1906
  return arguments[a];
1905
1907
  };
1906
1908
  };
1909
+ goog.functions.partialRight = function(a, b) {
1910
+ var c = Array.prototype.slice.call(arguments, 1);
1911
+ return function() {
1912
+ var b = Array.prototype.slice.call(arguments);
1913
+ b.push.apply(b, c);
1914
+ return a.apply(this, b);
1915
+ };
1916
+ };
1907
1917
  goog.functions.withReturnValue = function(a, b) {
1908
1918
  return goog.functions.sequence(a, goog.functions.constant(b));
1909
1919
  };
@@ -2179,9 +2189,9 @@ goog.iter.forEach = function(a, b, c) {
2179
2189
  for (;;) {
2180
2190
  b.call(c, a.next(), void 0, a);
2181
2191
  }
2182
- } catch (e) {
2183
- if (e !== goog.iter.StopIteration) {
2184
- throw e;
2192
+ } catch (d) {
2193
+ if (d !== goog.iter.StopIteration) {
2194
+ throw d;
2185
2195
  }
2186
2196
  }
2187
2197
  }
@@ -3251,13 +3261,13 @@ goog.Uri.QueryData.prototype.add = function(a, b) {
3251
3261
  var c = this.keyMap_.get(a);
3252
3262
  c || this.keyMap_.set(a, c = []);
3253
3263
  c.push(b);
3254
- this.count_++;
3264
+ this.count_ = goog.asserts.assertNumber(this.count_) + 1;
3255
3265
  return this;
3256
3266
  };
3257
3267
  goog.Uri.QueryData.prototype.remove = function(a) {
3258
3268
  this.ensureKeyMapInitialized_();
3259
3269
  a = this.getKeyName_(a);
3260
- return this.keyMap_.containsKey(a) ? (this.invalidateCache_(), this.count_ -= this.keyMap_.get(a).length, this.keyMap_.remove(a)) : !1;
3270
+ return this.keyMap_.containsKey(a) ? (this.invalidateCache_(), this.count_ = goog.asserts.assertNumber(this.count_) - this.keyMap_.get(a).length, this.keyMap_.remove(a)) : !1;
3261
3271
  };
3262
3272
  goog.Uri.QueryData.prototype.clear = function() {
3263
3273
  this.invalidateCache_();
@@ -3303,9 +3313,9 @@ goog.Uri.QueryData.prototype.set = function(a, b) {
3303
3313
  this.ensureKeyMapInitialized_();
3304
3314
  this.invalidateCache_();
3305
3315
  a = this.getKeyName_(a);
3306
- this.containsKey(a) && (this.count_ -= this.keyMap_.get(a).length);
3316
+ this.containsKey(a) && (this.count_ = goog.asserts.assertNumber(this.count_) - this.keyMap_.get(a).length);
3307
3317
  this.keyMap_.set(a, [b]);
3308
- this.count_++;
3318
+ this.count_ = goog.asserts.assertNumber(this.count_) + 1;
3309
3319
  return this;
3310
3320
  };
3311
3321
  goog.Uri.QueryData.prototype.get = function(a, b) {
@@ -3314,7 +3324,7 @@ goog.Uri.QueryData.prototype.get = function(a, b) {
3314
3324
  };
3315
3325
  goog.Uri.QueryData.prototype.setValues = function(a, b) {
3316
3326
  this.remove(a);
3317
- 0 < b.length && (this.invalidateCache_(), this.keyMap_.set(this.getKeyName_(a), goog.array.clone(b)), this.count_ += b.length);
3327
+ 0 < b.length && (this.invalidateCache_(), this.keyMap_.set(this.getKeyName_(a), goog.array.clone(b)), this.count_ = goog.asserts.assertNumber(this.count_) + b.length);
3318
3328
  };
3319
3329
  goog.Uri.QueryData.prototype.toString = function() {
3320
3330
  if (this.encodedQuery_) {
@@ -3438,7 +3448,7 @@ goog.html.SafeStyle.unwrap = function(a) {
3438
3448
  if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3439
3449
  return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
3440
3450
  }
3441
- goog.asserts.fail("expected object of type SafeStyle, got '" + a + "'");
3451
+ goog.asserts.fail("expected object of type SafeStyle, got '" + a + "' of type " + goog.typeOf(a));
3442
3452
  return "type_error:SafeStyle";
3443
3453
  };
3444
3454
  goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(a) {
@@ -3457,8 +3467,8 @@ goog.html.SafeStyle.create = function(a) {
3457
3467
  throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
3458
3468
  }
3459
3469
  var d = a[c];
3460
- null != d && (d instanceof goog.string.Const ? (d = goog.string.Const.unwrap(d), goog.asserts.assert(!/[{;}]/.test(d), "Value does not allow [{;}].")) : goog.html.SafeStyle.VALUE_RE_.test(d) ? goog.html.SafeStyle.hasBalancedQuotes_(d) || (goog.asserts.fail("String value requires balanced quotes, got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING) : (goog.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING), b += c + ":" + d +
3461
- ";");
3470
+ null != d && (d instanceof goog.string.Const ? (d = goog.string.Const.unwrap(d), goog.asserts.assert(!/[{;}]/.test(d), "Value does not allow [{;}].")) : goog.html.SafeStyle.VALUE_RE_.test(d) ? goog.html.SafeStyle.hasBalancedQuotes_(d) || (goog.asserts.fail("String value requires balanced quotes, got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING) : (goog.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], rgb() and rgba(), got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING),
3471
+ b += c + ":" + d + ";");
3462
3472
  }
3463
3473
  if (!b) {
3464
3474
  return goog.html.SafeStyle.EMPTY;
@@ -3473,7 +3483,7 @@ goog.html.SafeStyle.hasBalancedQuotes_ = function(a) {
3473
3483
  }
3474
3484
  return b && c;
3475
3485
  };
3476
- goog.html.SafeStyle.VALUE_RE_ = /^[-,."'%_!# a-zA-Z0-9]+$/;
3486
+ goog.html.SafeStyle.VALUE_RE_ = /^([-,."'%_!# a-zA-Z0-9]+|(?:rgb|hsl)a?\([0-9.%, ]+\))$/;
3477
3487
  goog.html.SafeStyle.concat = function(a) {
3478
3488
  var b = "", c = function(a) {
3479
3489
  goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a);
@@ -3483,7 +3493,7 @@ goog.html.SafeStyle.concat = function(a) {
3483
3493
  };
3484
3494
  goog.html.SafeStyleSheet = function() {
3485
3495
  this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = "";
3486
- this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
3496
+ this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
3487
3497
  };
3488
3498
  goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString = !0;
3489
3499
  goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
@@ -3509,10 +3519,10 @@ goog.DEBUG && (goog.html.SafeStyleSheet.prototype.toString = function() {
3509
3519
  return "SafeStyleSheet{" + this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ + "}";
3510
3520
  });
3511
3521
  goog.html.SafeStyleSheet.unwrap = function(a) {
3512
- if (a instanceof goog.html.SafeStyleSheet && a.constructor === goog.html.SafeStyleSheet && a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3522
+ if (a instanceof goog.html.SafeStyleSheet && a.constructor === goog.html.SafeStyleSheet && a.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3513
3523
  return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
3514
3524
  }
3515
- goog.asserts.fail("expected object of type SafeStyleSheet, got '" + a + "'");
3525
+ goog.asserts.fail("expected object of type SafeStyleSheet, got '" + a + "' of type " + goog.typeOf(a));
3516
3526
  return "type_error:SafeStyleSheet";
3517
3527
  };
3518
3528
  goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse = function(a) {
@@ -3613,11 +3623,7 @@ goog.i18n.bidi.rtlLocalesRe_ = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](A
3613
3623
  goog.i18n.bidi.isRtlLanguage = function(a) {
3614
3624
  return goog.i18n.bidi.rtlLocalesRe_.test(a);
3615
3625
  };
3616
- goog.i18n.bidi.bracketGuardHtmlRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(&lt;.*?(&gt;)+)/g;
3617
3626
  goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
3618
- goog.i18n.bidi.guardBracketInHtml = function(a, b) {
3619
- return (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=rtl>$&</span>") : a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=ltr>$&</span>");
3620
- };
3621
3627
  goog.i18n.bidi.guardBracketInText = function(a, b) {
3622
3628
  var c = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
3623
3629
  return a.replace(goog.i18n.bidi.bracketGuardTextRe_, c + "$&" + c);
@@ -3696,7 +3702,7 @@ goog.html.SafeUrl.unwrap = function(a) {
3696
3702
  if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3697
3703
  return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
3698
3704
  }
3699
- goog.asserts.fail("expected object of type SafeUrl, got '" + a + "'");
3705
+ goog.asserts.fail("expected object of type SafeUrl, got '" + a + "' of type " + goog.typeOf(a));
3700
3706
  return "type_error:SafeUrl";
3701
3707
  };
3702
3708
  goog.html.SafeUrl.fromConstant = function(a) {
@@ -3727,6 +3733,7 @@ goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(a) {
3727
3733
  b.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
3728
3734
  return b;
3729
3735
  };
3736
+ goog.html.SafeUrl.ABOUT_BLANK = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");
3730
3737
  goog.html.TrustedResourceUrl = function() {
3731
3738
  this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = "";
3732
3739
  this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
@@ -3746,7 +3753,7 @@ goog.html.TrustedResourceUrl.unwrap = function(a) {
3746
3753
  if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3747
3754
  return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
3748
3755
  }
3749
- goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "'");
3756
+ goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "' of type " + goog.typeOf(a));
3750
3757
  return "type_error:TrustedResourceUrl";
3751
3758
  };
3752
3759
  goog.html.TrustedResourceUrl.fromConstant = function(a) {
@@ -3758,6 +3765,127 @@ goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessO
3758
3765
  b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a;
3759
3766
  return b;
3760
3767
  };
3768
+ goog.labs = {};
3769
+ goog.labs.userAgent = {};
3770
+ goog.labs.userAgent.util = {};
3771
+ goog.labs.userAgent.util.getNativeUserAgentString_ = function() {
3772
+ var a = goog.labs.userAgent.util.getNavigator_();
3773
+ return a && (a = a.userAgent) ? a : "";
3774
+ };
3775
+ goog.labs.userAgent.util.getNavigator_ = function() {
3776
+ return goog.global.navigator;
3777
+ };
3778
+ goog.labs.userAgent.util.userAgent_ = goog.labs.userAgent.util.getNativeUserAgentString_();
3779
+ goog.labs.userAgent.util.setUserAgent = function(a) {
3780
+ goog.labs.userAgent.util.userAgent_ = a || goog.labs.userAgent.util.getNativeUserAgentString_();
3781
+ };
3782
+ goog.labs.userAgent.util.getUserAgent = function() {
3783
+ return goog.labs.userAgent.util.userAgent_;
3784
+ };
3785
+ goog.labs.userAgent.util.matchUserAgent = function(a) {
3786
+ var b = goog.labs.userAgent.util.getUserAgent();
3787
+ return goog.string.contains(b, a);
3788
+ };
3789
+ goog.labs.userAgent.util.matchUserAgentIgnoreCase = function(a) {
3790
+ var b = goog.labs.userAgent.util.getUserAgent();
3791
+ return goog.string.caseInsensitiveContains(b, a);
3792
+ };
3793
+ goog.labs.userAgent.util.extractVersionTuples = function(a) {
3794
+ for (var b = /(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g, c = [], d;d = b.exec(a);) {
3795
+ c.push([d[1], d[2], d[3] || void 0]);
3796
+ }
3797
+ return c;
3798
+ };
3799
+ goog.labs.userAgent.browser = {};
3800
+ goog.labs.userAgent.browser.matchOpera_ = function() {
3801
+ return goog.labs.userAgent.util.matchUserAgent("Opera") || goog.labs.userAgent.util.matchUserAgent("OPR");
3802
+ };
3803
+ goog.labs.userAgent.browser.matchIE_ = function() {
3804
+ return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
3805
+ };
3806
+ goog.labs.userAgent.browser.matchEdge_ = function() {
3807
+ return goog.labs.userAgent.util.matchUserAgent("Edge");
3808
+ };
3809
+ goog.labs.userAgent.browser.matchFirefox_ = function() {
3810
+ return goog.labs.userAgent.util.matchUserAgent("Firefox");
3811
+ };
3812
+ goog.labs.userAgent.browser.matchSafari_ = function() {
3813
+ return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog.labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs.userAgent.browser.matchEdge_() || goog.labs.userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"));
3814
+ };
3815
+ goog.labs.userAgent.browser.matchCoast_ = function() {
3816
+ return goog.labs.userAgent.util.matchUserAgent("Coast");
3817
+ };
3818
+ goog.labs.userAgent.browser.matchIosWebview_ = function() {
3819
+ return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit");
3820
+ };
3821
+ goog.labs.userAgent.browser.matchChrome_ = function() {
3822
+ return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS")) && !goog.labs.userAgent.browser.matchOpera_() && !goog.labs.userAgent.browser.matchEdge_();
3823
+ };
3824
+ goog.labs.userAgent.browser.matchAndroidBrowser_ = function() {
3825
+ return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog.labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent.browser.isSilk());
3826
+ };
3827
+ goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
3828
+ goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
3829
+ goog.labs.userAgent.browser.isEdge = goog.labs.userAgent.browser.matchEdge_;
3830
+ goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
3831
+ goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
3832
+ goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
3833
+ goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
3834
+ goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
3835
+ goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
3836
+ goog.labs.userAgent.browser.isSilk = function() {
3837
+ return goog.labs.userAgent.util.matchUserAgent("Silk");
3838
+ };
3839
+ goog.labs.userAgent.browser.getVersion = function() {
3840
+ function a(a) {
3841
+ a = goog.array.find(a, d);
3842
+ return c[a] || "";
3843
+ }
3844
+ var b = goog.labs.userAgent.util.getUserAgent();
3845
+ if (goog.labs.userAgent.browser.isIE()) {
3846
+ return goog.labs.userAgent.browser.getIEVersion_(b);
3847
+ }
3848
+ var b = goog.labs.userAgent.util.extractVersionTuples(b), c = {};
3849
+ goog.array.forEach(b, function(a) {
3850
+ c[a[0]] = a[1];
3851
+ });
3852
+ var d = goog.partial(goog.object.containsKey, c);
3853
+ return goog.labs.userAgent.browser.isOpera() ? a(["Version", "Opera", "OPR"]) : goog.labs.userAgent.browser.isEdge() ? a(["Edge"]) : goog.labs.userAgent.browser.isChrome() ? a(["Chrome", "CriOS"]) : (b = b[2]) && b[1] || "";
3854
+ };
3855
+ goog.labs.userAgent.browser.isVersionOrHigher = function(a) {
3856
+ return 0 <= goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(), a);
3857
+ };
3858
+ goog.labs.userAgent.browser.getIEVersion_ = function(a) {
3859
+ var b = /rv: *([\d\.]*)/.exec(a);
3860
+ if (b && b[1]) {
3861
+ return b[1];
3862
+ }
3863
+ var b = "", c = /MSIE +([\d\.]+)/.exec(a);
3864
+ if (c && c[1]) {
3865
+ if (a = /Trident\/(\d.\d)/.exec(a), "7.0" == c[1]) {
3866
+ if (a && a[1]) {
3867
+ switch(a[1]) {
3868
+ case "4.0":
3869
+ b = "8.0";
3870
+ break;
3871
+ case "5.0":
3872
+ b = "9.0";
3873
+ break;
3874
+ case "6.0":
3875
+ b = "10.0";
3876
+ break;
3877
+ case "7.0":
3878
+ b = "11.0";
3879
+ }
3880
+ } else {
3881
+ b = "7.0";
3882
+ }
3883
+ } else {
3884
+ b = c[1];
3885
+ }
3886
+ }
3887
+ return b;
3888
+ };
3761
3889
  goog.html.SafeHtml = function() {
3762
3890
  this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
3763
3891
  this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
@@ -3778,7 +3906,7 @@ goog.html.SafeHtml.unwrap = function(a) {
3778
3906
  if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3779
3907
  return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
3780
3908
  }
3781
- goog.asserts.fail("expected object of type SafeHtml, got '" + a + "'");
3909
+ goog.asserts.fail("expected object of type SafeHtml, got '" + a + "' of type " + goog.typeOf(a));
3782
3910
  return "type_error:SafeHtml";
3783
3911
  };
3784
3912
  goog.html.SafeHtml.htmlEscape = function(a) {
@@ -3807,7 +3935,7 @@ goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function(a) {
3807
3935
  goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
3808
3936
  goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
3809
3937
  goog.html.SafeHtml.URL_ATTRIBUTES_ = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0};
3810
- goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet(goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.TEMPLATE);
3938
+ goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE);
3811
3939
  goog.html.SafeHtml.create = function(a, b, c) {
3812
3940
  if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) {
3813
3941
  throw Error("Invalid tag name <" + a + ">.");
@@ -3833,6 +3961,11 @@ goog.html.SafeHtml.createStyle = function(a, b) {
3833
3961
  d = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d, goog.i18n.bidi.Dir.NEUTRAL);
3834
3962
  return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", c, d);
3835
3963
  };
3964
+ goog.html.SafeHtml.createMetaRefresh = function(a, b) {
3965
+ var c = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a));
3966
+ (goog.labs.userAgent.browser.isIE() || goog.labs.userAgent.browser.isEdge()) && goog.string.contains(c, ";") && (c = "'" + c.replace(/'/g, "%27") + "'");
3967
+ return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {"http-equiv":"refresh", content:(b || 0) + "; url=" + c});
3968
+ };
3836
3969
  goog.html.SafeHtml.getAttrNameAndValue_ = function(a, b, c) {
3837
3970
  if (c instanceof goog.string.Const) {
3838
3971
  c = goog.string.Const.unwrap(c);
@@ -3933,6 +4066,7 @@ goog.html.SafeHtml.combineAttributes = function(a, b, c) {
3933
4066
  };
3934
4067
  goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>", goog.i18n.bidi.Dir.NEUTRAL);
3935
4068
  goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
4069
+ goog.html.SafeHtml.BR = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>", goog.i18n.bidi.Dir.NEUTRAL);
3936
4070
  goog.html.SafeScript = function() {
3937
4071
  this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
3938
4072
  this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
@@ -3953,7 +4087,7 @@ goog.html.SafeScript.unwrap = function(a) {
3953
4087
  if (a instanceof goog.html.SafeScript && a.constructor === goog.html.SafeScript && a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3954
4088
  return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;
3955
4089
  }
3956
- goog.asserts.fail("expected object of type SafeScript, got '" + a + "'");
4090
+ goog.asserts.fail("expected object of type SafeScript, got '" + a + "' of type " + goog.typeOf(a));
3957
4091
  return "type_error:SafeScript";
3958
4092
  };
3959
4093
  goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function(a) {
@@ -4074,127 +4208,6 @@ goog.structs.Set.prototype.isSubsetOf = function(a) {
4074
4208
  goog.structs.Set.prototype.__iterator__ = function(a) {
4075
4209
  return this.map_.__iterator__(!1);
4076
4210
  };
4077
- goog.labs = {};
4078
- goog.labs.userAgent = {};
4079
- goog.labs.userAgent.util = {};
4080
- goog.labs.userAgent.util.getNativeUserAgentString_ = function() {
4081
- var a = goog.labs.userAgent.util.getNavigator_();
4082
- return a && (a = a.userAgent) ? a : "";
4083
- };
4084
- goog.labs.userAgent.util.getNavigator_ = function() {
4085
- return goog.global.navigator;
4086
- };
4087
- goog.labs.userAgent.util.userAgent_ = goog.labs.userAgent.util.getNativeUserAgentString_();
4088
- goog.labs.userAgent.util.setUserAgent = function(a) {
4089
- goog.labs.userAgent.util.userAgent_ = a || goog.labs.userAgent.util.getNativeUserAgentString_();
4090
- };
4091
- goog.labs.userAgent.util.getUserAgent = function() {
4092
- return goog.labs.userAgent.util.userAgent_;
4093
- };
4094
- goog.labs.userAgent.util.matchUserAgent = function(a) {
4095
- var b = goog.labs.userAgent.util.getUserAgent();
4096
- return goog.string.contains(b, a);
4097
- };
4098
- goog.labs.userAgent.util.matchUserAgentIgnoreCase = function(a) {
4099
- var b = goog.labs.userAgent.util.getUserAgent();
4100
- return goog.string.caseInsensitiveContains(b, a);
4101
- };
4102
- goog.labs.userAgent.util.extractVersionTuples = function(a) {
4103
- for (var b = /(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g, c = [], d;d = b.exec(a);) {
4104
- c.push([d[1], d[2], d[3] || void 0]);
4105
- }
4106
- return c;
4107
- };
4108
- goog.labs.userAgent.browser = {};
4109
- goog.labs.userAgent.browser.matchOpera_ = function() {
4110
- return goog.labs.userAgent.util.matchUserAgent("Opera") || goog.labs.userAgent.util.matchUserAgent("OPR");
4111
- };
4112
- goog.labs.userAgent.browser.matchIE_ = function() {
4113
- return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
4114
- };
4115
- goog.labs.userAgent.browser.matchEdge_ = function() {
4116
- return goog.labs.userAgent.util.matchUserAgent("Edge");
4117
- };
4118
- goog.labs.userAgent.browser.matchFirefox_ = function() {
4119
- return goog.labs.userAgent.util.matchUserAgent("Firefox");
4120
- };
4121
- goog.labs.userAgent.browser.matchSafari_ = function() {
4122
- return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog.labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs.userAgent.browser.matchEdge_() || goog.labs.userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"));
4123
- };
4124
- goog.labs.userAgent.browser.matchCoast_ = function() {
4125
- return goog.labs.userAgent.util.matchUserAgent("Coast");
4126
- };
4127
- goog.labs.userAgent.browser.matchIosWebview_ = function() {
4128
- return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit");
4129
- };
4130
- goog.labs.userAgent.browser.matchChrome_ = function() {
4131
- return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS")) && !goog.labs.userAgent.browser.matchOpera_() && !goog.labs.userAgent.browser.matchEdge_();
4132
- };
4133
- goog.labs.userAgent.browser.matchAndroidBrowser_ = function() {
4134
- return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog.labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent.browser.isSilk());
4135
- };
4136
- goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
4137
- goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
4138
- goog.labs.userAgent.browser.isEdge = goog.labs.userAgent.browser.matchEdge_;
4139
- goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
4140
- goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
4141
- goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
4142
- goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
4143
- goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
4144
- goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
4145
- goog.labs.userAgent.browser.isSilk = function() {
4146
- return goog.labs.userAgent.util.matchUserAgent("Silk");
4147
- };
4148
- goog.labs.userAgent.browser.getVersion = function() {
4149
- function a(a) {
4150
- a = goog.array.find(a, d);
4151
- return c[a] || "";
4152
- }
4153
- var b = goog.labs.userAgent.util.getUserAgent();
4154
- if (goog.labs.userAgent.browser.isIE()) {
4155
- return goog.labs.userAgent.browser.getIEVersion_(b);
4156
- }
4157
- var b = goog.labs.userAgent.util.extractVersionTuples(b), c = {};
4158
- goog.array.forEach(b, function(a) {
4159
- c[a[0]] = a[1];
4160
- });
4161
- var d = goog.partial(goog.object.containsKey, c);
4162
- return goog.labs.userAgent.browser.isOpera() ? a(["Version", "Opera", "OPR"]) : goog.labs.userAgent.browser.isEdge() ? a(["Edge"]) : goog.labs.userAgent.browser.isChrome() ? a(["Chrome", "CriOS"]) : (b = b[2]) && b[1] || "";
4163
- };
4164
- goog.labs.userAgent.browser.isVersionOrHigher = function(a) {
4165
- return 0 <= goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(), a);
4166
- };
4167
- goog.labs.userAgent.browser.getIEVersion_ = function(a) {
4168
- var b = /rv: *([\d\.]*)/.exec(a);
4169
- if (b && b[1]) {
4170
- return b[1];
4171
- }
4172
- var b = "", c = /MSIE +([\d\.]+)/.exec(a);
4173
- if (c && c[1]) {
4174
- if (a = /Trident\/(\d.\d)/.exec(a), "7.0" == c[1]) {
4175
- if (a && a[1]) {
4176
- switch(a[1]) {
4177
- case "4.0":
4178
- b = "8.0";
4179
- break;
4180
- case "5.0":
4181
- b = "9.0";
4182
- break;
4183
- case "6.0":
4184
- b = "10.0";
4185
- break;
4186
- case "7.0":
4187
- b = "11.0";
4188
- }
4189
- } else {
4190
- b = "7.0";
4191
- }
4192
- } else {
4193
- b = c[1];
4194
- }
4195
- }
4196
- return b;
4197
- };
4198
4211
  goog.labs.userAgent.engine = {};
4199
4212
  goog.labs.userAgent.engine.isPresto = function() {
4200
4213
  return goog.labs.userAgent.util.matchUserAgent("Presto");
@@ -4349,7 +4362,7 @@ goog.userAgent.determineVersion_ = function() {
4349
4362
  }
4350
4363
  var a = "", b = goog.userAgent.getVersionRegexResult_();
4351
4364
  b && (a = b ? b[1] : "");
4352
- return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), b > parseFloat(a)) ? String(b) : a;
4365
+ return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), null != b && b > parseFloat(a)) ? String(b) : a;
4353
4366
  };
4354
4367
  goog.userAgent.getVersionRegexResult_ = function() {
4355
4368
  var a = goog.userAgent.getUserAgentString();
@@ -4380,7 +4393,7 @@ goog.userAgent.isVersionOrHigher = function(a) {
4380
4393
  };
4381
4394
  goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
4382
4395
  goog.userAgent.isDocumentModeOrHigher = function(a) {
4383
- return goog.userAgent.DOCUMENT_MODE >= a;
4396
+ return Number(goog.userAgent.DOCUMENT_MODE) >= a;
4384
4397
  };
4385
4398
  goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
4386
4399
  goog.userAgent.DOCUMENT_MODE = function() {
@@ -4388,6 +4401,7 @@ goog.userAgent.DOCUMENT_MODE = function() {
4388
4401
  return a && goog.userAgent.IE ? b || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5) : void 0;
4389
4402
  }();
4390
4403
  goog.debug.LOGGING_ENABLED = goog.DEBUG;
4404
+ goog.debug.FORCE_SLOPPY_STACKS = !1;
4391
4405
  goog.debug.catchErrors = function(a, b, c) {
4392
4406
  c = c || goog.global;
4393
4407
  var d = c.onerror, e = !!b;
@@ -4502,7 +4516,7 @@ goog.debug.normalizeErrorObject = function(a) {
4502
4516
  }
4503
4517
  try {
4504
4518
  d = a.fileName || a.filename || a.sourceURL || goog.global.$googDebugFname || b;
4505
- } catch (g) {
4519
+ } catch (f) {
4506
4520
  d = "Not available", e = !0;
4507
4521
  }
4508
4522
  return !e && a.lineNumber && a.fileName && a.stack && a.message && a.name ? a : {message:a.message || "Not available", name:a.name || "UnknownError", lineNumber:c, fileName:d, stack:a.stack || "Not available"};
@@ -4520,7 +4534,7 @@ goog.debug.enhanceError = function(a, b) {
4520
4534
  return c;
4521
4535
  };
4522
4536
  goog.debug.getStacktraceSimple = function(a) {
4523
- if (goog.STRICT_MODE_COMPATIBLE) {
4537
+ if (!goog.debug.FORCE_SLOPPY_STACKS) {
4524
4538
  var b = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);
4525
4539
  if (b) {
4526
4540
  return b;
@@ -4559,7 +4573,7 @@ goog.debug.getNativeStackTrace_ = function(a) {
4559
4573
  };
4560
4574
  goog.debug.getStacktrace = function(a) {
4561
4575
  var b;
4562
- goog.STRICT_MODE_COMPATIBLE && (b = goog.debug.getNativeStackTrace_(a || goog.debug.getStacktrace));
4576
+ goog.debug.FORCE_SLOPPY_STACKS || (b = goog.debug.getNativeStackTrace_(a || goog.debug.getStacktrace));
4563
4577
  b || (b = goog.debug.getStacktraceHelper_(a || arguments.callee.caller, []));
4564
4578
  return b;
4565
4579
  };
@@ -4999,10 +5013,10 @@ goog.debug.HtmlFormatter.prototype.formatRecordAsHtml = function(a) {
4999
5013
  this.showLoggerName && c.push("[", a.getLoggerName(), "] ");
5000
5014
  this.showSeverityLevel && c.push("[", a.getLevel().name, "] ");
5001
5015
  var c = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(c.join("")), d = goog.html.SafeHtml.EMPTY;
5002
- this.showExceptionText && a.getException() && (d = goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), goog.debug.exposeExceptionAsHtml(a.getException())));
5016
+ this.showExceptionText && a.getException() && (d = goog.html.SafeHtml.concat(goog.html.SafeHtml.BR, goog.debug.exposeExceptionAsHtml(a.getException())));
5003
5017
  a = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(a.getMessage());
5004
5018
  b = goog.html.SafeHtml.create("span", {"class":b}, goog.html.SafeHtml.concat(a, d));
5005
- return this.appendNewline ? goog.html.SafeHtml.concat(c, b, goog.html.SafeHtml.create("br")) : goog.html.SafeHtml.concat(c, b);
5019
+ return this.appendNewline ? goog.html.SafeHtml.concat(c, b, goog.html.SafeHtml.BR) : goog.html.SafeHtml.concat(c, b);
5006
5020
  };
5007
5021
  goog.debug.TextFormatter = function(a) {
5008
5022
  goog.debug.Formatter.call(this, a);
@@ -5042,6 +5056,11 @@ goog.dom.safe.setAnchorHref = function(a, b) {
5042
5056
  c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
5043
5057
  a.href = goog.html.SafeUrl.unwrap(c);
5044
5058
  };
5059
+ goog.dom.safe.setImageSrc = function(a, b) {
5060
+ var c;
5061
+ c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
5062
+ a.src = goog.html.SafeUrl.unwrap(c);
5063
+ };
5045
5064
  goog.dom.safe.setEmbedSrc = function(a, b) {
5046
5065
  a.src = goog.html.TrustedResourceUrl.unwrap(b);
5047
5066
  };
@@ -5121,7 +5140,7 @@ goog.math.Coordinate.prototype.round = function() {
5121
5140
  return this;
5122
5141
  };
5123
5142
  goog.math.Coordinate.prototype.translate = function(a, b) {
5124
- a instanceof goog.math.Coordinate ? (this.x += a.x, this.y += a.y) : (this.x += a, goog.isNumber(b) && (this.y += b));
5143
+ a instanceof goog.math.Coordinate ? (this.x += a.x, this.y += a.y) : (this.x += Number(a), goog.isNumber(b) && (this.y += b));
5125
5144
  return this;
5126
5145
  };
5127
5146
  goog.math.Coordinate.prototype.scale = function(a, b) {
@@ -5290,6 +5309,9 @@ goog.dom.getViewportSize_ = function(a) {
5290
5309
  goog.dom.getDocumentHeight = function() {
5291
5310
  return goog.dom.getDocumentHeight_(window);
5292
5311
  };
5312
+ goog.dom.getDocumentHeightForWindow = function(a) {
5313
+ return goog.dom.getDocumentHeight_(a);
5314
+ };
5293
5315
  goog.dom.getDocumentHeight_ = function(a) {
5294
5316
  var b = a.document, c = 0;
5295
5317
  if (b) {
@@ -5389,7 +5411,7 @@ goog.dom.safeHtmlToNode = function(a) {
5389
5411
  };
5390
5412
  goog.dom.safeHtmlToNode_ = function(a, b) {
5391
5413
  var c = a.createElement(goog.dom.TagName.DIV);
5392
- goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (goog.dom.safe.setInnerHtml(c, goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), b)), c.removeChild(c.firstChild)) : goog.dom.safe.setInnerHtml(c, b);
5414
+ goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (goog.dom.safe.setInnerHtml(c, goog.html.SafeHtml.concat(goog.html.SafeHtml.BR, b)), c.removeChild(c.firstChild)) : goog.dom.safe.setInnerHtml(c, b);
5393
5415
  return goog.dom.childrenToNode_(a, c);
5394
5416
  };
5395
5417
  goog.dom.htmlToDocumentFragment = function(a) {
@@ -5577,11 +5599,14 @@ goog.dom.getParentElement = function(a) {
5577
5599
  return goog.dom.isElement(b) ? b : null;
5578
5600
  };
5579
5601
  goog.dom.contains = function(a, b) {
5602
+ if (!a || !b) {
5603
+ return !1;
5604
+ }
5580
5605
  if (a.contains && b.nodeType == goog.dom.NodeType.ELEMENT) {
5581
5606
  return a == b || a.contains(b);
5582
5607
  }
5583
5608
  if ("undefined" != typeof a.compareDocumentPosition) {
5584
- return a == b || Boolean(a.compareDocumentPosition(b) & 16);
5609
+ return a == b || !!(a.compareDocumentPosition(b) & 16);
5585
5610
  }
5586
5611
  for (;b && a != b;) {
5587
5612
  b = b.parentNode;
@@ -5673,7 +5698,11 @@ goog.dom.getFrameContentDocument = function(a) {
5673
5698
  return a.contentDocument || a.contentWindow.document;
5674
5699
  };
5675
5700
  goog.dom.getFrameContentWindow = function(a) {
5676
- return a.contentWindow || goog.dom.getWindow(goog.dom.getFrameContentDocument(a));
5701
+ try {
5702
+ return a.contentWindow || (a.contentDocument ? goog.dom.getWindow(a.contentDocument) : null);
5703
+ } catch (b) {
5704
+ }
5705
+ return null;
5677
5706
  };
5678
5707
  goog.dom.setTextContent = function(a, b) {
5679
5708
  goog.asserts.assert(null != a, "goog.dom.setTextContent expects a non-null value for node");
@@ -5697,6 +5726,7 @@ goog.dom.setTextContent = function(a, b) {
5697
5726
  }
5698
5727
  };
5699
5728
  goog.dom.getOuterHtml = function(a) {
5729
+ goog.asserts.assert(null !== a, "goog.dom.getOuterHtml expects a non-null value for element");
5700
5730
  if ("outerHTML" in a) {
5701
5731
  return a.outerHTML;
5702
5732
  }
@@ -5748,11 +5778,11 @@ goog.dom.nativelySupportsFocus_ = function(a) {
5748
5778
  return a.tagName == goog.dom.TagName.A || a.tagName == goog.dom.TagName.INPUT || a.tagName == goog.dom.TagName.TEXTAREA || a.tagName == goog.dom.TagName.SELECT || a.tagName == goog.dom.TagName.BUTTON;
5749
5779
  };
5750
5780
  goog.dom.hasNonZeroBoundingRect_ = function(a) {
5751
- a = goog.isFunction(a.getBoundingClientRect) ? a.getBoundingClientRect() : {height:a.offsetHeight, width:a.offsetWidth};
5781
+ a = !goog.isFunction(a.getBoundingClientRect) || goog.userAgent.IE && null == a.parentElement ? {height:a.offsetHeight, width:a.offsetWidth} : a.getBoundingClientRect();
5752
5782
  return goog.isDefAndNotNull(a) && 0 < a.height && 0 < a.width;
5753
5783
  };
5754
5784
  goog.dom.getTextContent = function(a) {
5755
- if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && "innerText" in a) {
5785
+ if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && null !== a && "innerText" in a) {
5756
5786
  a = goog.string.canonicalizeNewlines(a.innerText);
5757
5787
  } else {
5758
5788
  var b = [];
@@ -5842,14 +5872,13 @@ goog.dom.getAncestorByClass = function(a, b, c) {
5842
5872
  };
5843
5873
  goog.dom.getAncestor = function(a, b, c, d) {
5844
5874
  c || (a = a.parentNode);
5845
- c = null == d;
5846
- for (var e = 0;a && (c || e <= d);) {
5875
+ for (c = 0;a && (null == d || c <= d);) {
5847
5876
  goog.asserts.assert("parentNode" != a.name);
5848
5877
  if (b(a)) {
5849
5878
  return a;
5850
5879
  }
5851
5880
  a = a.parentNode;
5852
- e++;
5881
+ c++;
5853
5882
  }
5854
5883
  return null;
5855
5884
  };
@@ -6025,7 +6054,7 @@ goog.math.Box.prototype.contains = function(a) {
6025
6054
  return goog.math.Box.contains(this, a);
6026
6055
  };
6027
6056
  goog.math.Box.prototype.expand = function(a, b, c, d) {
6028
- goog.isObject(a) ? (this.top -= a.top, this.right += a.right, this.bottom += a.bottom, this.left -= a.left) : (this.top -= a, this.right += b, this.bottom += c, this.left -= d);
6057
+ goog.isObject(a) ? (this.top -= a.top, this.right += a.right, this.bottom += a.bottom, this.left -= a.left) : (this.top -= a, this.right += Number(b), this.bottom += Number(c), this.left -= Number(d));
6029
6058
  return this;
6030
6059
  };
6031
6060
  goog.math.Box.prototype.expandToInclude = function(a) {
@@ -6084,7 +6113,7 @@ goog.math.Box.prototype.round = function() {
6084
6113
  return this;
6085
6114
  };
6086
6115
  goog.math.Box.prototype.translate = function(a, b) {
6087
- a instanceof goog.math.Coordinate ? (this.left += a.x, this.right += a.x, this.top += a.y, this.bottom += a.y) : (this.left += a, this.right += a, goog.isNumber(b) && (this.top += b, this.bottom += b));
6116
+ a instanceof goog.math.Coordinate ? (this.left += a.x, this.right += a.x, this.top += a.y, this.bottom += a.y) : (goog.asserts.assertNumber(a), this.left += a, this.right += a, goog.isNumber(b) && (this.top += b, this.bottom += b));
6088
6117
  return this;
6089
6118
  };
6090
6119
  goog.math.Box.prototype.scale = function(a, b) {
@@ -6221,7 +6250,7 @@ goog.math.Rect.prototype.round = function() {
6221
6250
  return this;
6222
6251
  };
6223
6252
  goog.math.Rect.prototype.translate = function(a, b) {
6224
- a instanceof goog.math.Coordinate ? (this.left += a.x, this.top += a.y) : (this.left += a, goog.isNumber(b) && (this.top += b));
6253
+ a instanceof goog.math.Coordinate ? (this.left += a.x, this.top += a.y) : (this.left += goog.asserts.assertNumber(a), goog.isNumber(b) && (this.top += b));
6225
6254
  return this;
6226
6255
  };
6227
6256
  goog.math.Rect.prototype.scale = function(a, b) {
@@ -6232,6 +6261,22 @@ goog.math.Rect.prototype.scale = function(a, b) {
6232
6261
  this.height *= c;
6233
6262
  return this;
6234
6263
  };
6264
+ goog.reflect = {};
6265
+ goog.reflect.object = function(a, b) {
6266
+ return b;
6267
+ };
6268
+ goog.reflect.sinkValue = function(a) {
6269
+ goog.reflect.sinkValue[" "](a);
6270
+ return a;
6271
+ };
6272
+ goog.reflect.sinkValue[" "] = goog.nullFunction;
6273
+ goog.reflect.canAccessProperty = function(a, b) {
6274
+ try {
6275
+ return goog.reflect.sinkValue(a[b]), !0;
6276
+ } catch (c) {
6277
+ }
6278
+ return !1;
6279
+ };
6235
6280
  goog.style = {};
6236
6281
  goog.style.setStyle = function(a, b, c) {
6237
6282
  if (goog.isString(b)) {
@@ -6331,7 +6376,7 @@ goog.style.getBoundingClientRect_ = function(a) {
6331
6376
  };
6332
6377
  goog.style.getOffsetParent = function(a) {
6333
6378
  if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(8)) {
6334
- return a.offsetParent;
6379
+ return goog.asserts.assert(a && "offsetParent" in a), a.offsetParent;
6335
6380
  }
6336
6381
  var b = goog.dom.getOwnerDocument(a), c = goog.style.getStyle_(a, "position"), d = "fixed" == c || "absolute" == c;
6337
6382
  for (a = a.parentNode;a && a != b;a = a.parentNode) {
@@ -6401,7 +6446,11 @@ goog.style.getPageOffsetTop = function(a) {
6401
6446
  return goog.style.getPageOffset(a).y;
6402
6447
  };
6403
6448
  goog.style.getFramedPageOffset = function(a, b) {
6404
- var c = new goog.math.Coordinate(0, 0), d = goog.dom.getWindow(goog.dom.getOwnerDocument(a)), e = a;
6449
+ var c = new goog.math.Coordinate(0, 0), d = goog.dom.getWindow(goog.dom.getOwnerDocument(a));
6450
+ if (!goog.reflect.canAccessProperty(d, "parent")) {
6451
+ return c;
6452
+ }
6453
+ var e = a;
6405
6454
  do {
6406
6455
  var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPositionForElement_(goog.asserts.assert(e));
6407
6456
  c.x += f.x;
@@ -6438,7 +6487,8 @@ goog.style.getClientPosition = function(a) {
6438
6487
  goog.style.setPageOffset = function(a, b, c) {
6439
6488
  var d = goog.style.getPageOffset(a);
6440
6489
  b instanceof goog.math.Coordinate && (c = b.y, b = b.x);
6441
- goog.style.setPosition(a, a.offsetLeft + (b - d.x), a.offsetTop + (c - d.y));
6490
+ b = goog.asserts.assertNumber(b) - d.x;
6491
+ goog.style.setPosition(a, a.offsetLeft + b, a.offsetTop + (Number(c) - d.y));
6442
6492
  };
6443
6493
  goog.style.setSize = function(a, b, c) {
6444
6494
  if (b instanceof goog.math.Size) {
@@ -6501,14 +6551,16 @@ goog.style.toSelectorCase = function(a) {
6501
6551
  return goog.string.toSelectorCase(a);
6502
6552
  };
6503
6553
  goog.style.getOpacity = function(a) {
6554
+ goog.asserts.assert(a);
6504
6555
  var b = a.style;
6505
6556
  a = "";
6506
6557
  "opacity" in b ? a = b.opacity : "MozOpacity" in b ? a = b.MozOpacity : "filter" in b && (b = b.filter.match(/alpha\(opacity=([\d.]+)\)/)) && (a = String(b[1] / 100));
6507
6558
  return "" == a ? a : Number(a);
6508
6559
  };
6509
6560
  goog.style.setOpacity = function(a, b) {
6561
+ goog.asserts.assert(a);
6510
6562
  var c = a.style;
6511
- "opacity" in c ? c.opacity = b : "MozOpacity" in c ? c.MozOpacity = b : "filter" in c && (c.filter = "" === b ? "" : "alpha(opacity=" + 100 * b + ")");
6563
+ "opacity" in c ? c.opacity = b : "MozOpacity" in c ? c.MozOpacity = b : "filter" in c && (c.filter = "" === b ? "" : "alpha(opacity=" + 100 * Number(b) + ")");
6512
6564
  };
6513
6565
  goog.style.setTransparentBackgroundImage = function(a, b) {
6514
6566
  var c = a.style;
@@ -6550,7 +6602,7 @@ goog.style.setInlineBlock = function(a) {
6550
6602
  goog.style.isRightToLeft = function(a) {
6551
6603
  return "rtl" == goog.style.getStyle_(a, "direction");
6552
6604
  };
6553
- goog.style.unselectableStyle_ = goog.userAgent.GECKO ? "MozUserSelect" : goog.userAgent.WEBKIT ? "WebkitUserSelect" : null;
6605
+ goog.style.unselectableStyle_ = goog.userAgent.GECKO ? "MozUserSelect" : goog.userAgent.WEBKIT || goog.userAgent.EDGE ? "WebkitUserSelect" : null;
6554
6606
  goog.style.isUnselectable = function(a) {
6555
6607
  return goog.style.unselectableStyle_ ? "none" == a.style[goog.style.unselectableStyle_].toLowerCase() : goog.userAgent.IE || goog.userAgent.OPERA ? "on" == a.getAttribute("unselectable") : !1;
6556
6608
  };
@@ -6702,10 +6754,10 @@ goog.style.getFontSize = function(a) {
6702
6754
  return parseInt(b, 10);
6703
6755
  }
6704
6756
  if (goog.userAgent.IE) {
6705
- if (c in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_) {
6757
+ if (String(c) in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_) {
6706
6758
  return goog.style.getIePixelValue_(a, b, "left", "pixelLeft");
6707
6759
  }
6708
- if (a.parentNode && a.parentNode.nodeType == goog.dom.NodeType.ELEMENT && c in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_) {
6760
+ if (a.parentNode && a.parentNode.nodeType == goog.dom.NodeType.ELEMENT && String(c) in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_) {
6709
6761
  return a = a.parentNode, c = goog.style.getStyle_(a, "fontSize"), goog.style.getIePixelValue_(a, b == c ? "1em" : b, "left", "pixelLeft");
6710
6762
  }
6711
6763
  }
@@ -6907,15 +6959,15 @@ bot.userAgent.FIREFOX_EXTENSION = function() {
6907
6959
  if (!a.classes) {
6908
6960
  return !1;
6909
6961
  }
6910
- } catch (b) {
6962
+ } catch (f) {
6911
6963
  return !1;
6912
6964
  }
6913
- var c = a.classes, a = a.interfaces, d = c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator), c = c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo), e = c.platformVersion, f = c.version;
6965
+ var b = a.classes, a = a.interfaces, c = b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator), b = b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo), d = b.platformVersion, e = b.version;
6914
6966
  bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_ = function(a) {
6915
- return 0 <= d.compare(e, "" + a);
6967
+ return 0 <= c.compare(d, "" + a);
6916
6968
  };
6917
6969
  bot.userAgent.FIREFOX_EXTENSION_IS_PRODUCT_VERSION_ = function(a) {
6918
- return 0 <= d.compare(f, "" + a);
6970
+ return 0 <= c.compare(e, "" + a);
6919
6971
  };
6920
6972
  return !0;
6921
6973
  }();
@@ -6940,7 +6992,7 @@ bot.userAgent.WINDOWS_PHONE = goog.userAgent.IE && -1 != goog.userAgent.getUserA
6940
6992
  goog.json = {};
6941
6993
  goog.json.USE_NATIVE_JSON = !1;
6942
6994
  goog.json.isValid = function(a) {
6943
- return /^\s*$/.test(a) ? !1 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""));
6995
+ return /^\s*$/.test(a) ? !1 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""));
6944
6996
  };
6945
6997
  goog.json.parse = goog.json.USE_NATIVE_JSON ? goog.global.JSON.parse : function(a) {
6946
6998
  a = String(a);