selenium-webdriver 2.53.3 → 3.142.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGES +665 -8
- data/Gemfile +2 -0
- data/LICENSE +1 -1
- data/README.md +2 -3
- data/lib/selenium/server.rb +76 -73
- data/lib/selenium/webdriver/atoms/getAttribute.js +7 -0
- data/lib/selenium/webdriver/atoms/isDisplayed.js +102 -0
- data/lib/selenium/webdriver/{phantomjs.rb → atoms.rb} +10 -14
- data/lib/selenium/webdriver/chrome/bridge.rb +30 -101
- data/lib/selenium/webdriver/chrome/driver.rb +127 -0
- data/lib/selenium/webdriver/chrome/options.rb +190 -0
- data/lib/selenium/webdriver/chrome/profile.rb +21 -20
- data/lib/selenium/webdriver/chrome/service.rb +26 -93
- data/lib/selenium/webdriver/chrome.rb +15 -6
- data/lib/selenium/webdriver/common/action_builder.rb +52 -58
- data/lib/selenium/webdriver/common/alert.rb +7 -15
- data/lib/selenium/webdriver/common/bridge_helper.rb +18 -22
- data/lib/selenium/webdriver/common/driver.rb +72 -72
- data/lib/selenium/webdriver/common/driver_extensions/downloads_files.rb +45 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_addons.rb +50 -0
- data/lib/selenium/webdriver/common/driver_extensions/{has_input_devices.rb → has_debugger.rb} +11 -27
- data/lib/selenium/webdriver/common/driver_extensions/has_location.rb +6 -10
- data/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb +51 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +7 -8
- data/lib/selenium/webdriver/common/driver_extensions/has_permissions.rb +51 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb +2 -4
- data/lib/selenium/webdriver/common/driver_extensions/has_session_id.rb +2 -4
- data/lib/selenium/webdriver/common/driver_extensions/has_touch_screen.rb +3 -5
- data/lib/selenium/webdriver/common/driver_extensions/has_web_storage.rb +2 -5
- data/lib/selenium/webdriver/common/driver_extensions/rotatable.rb +6 -9
- data/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +9 -7
- data/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb +3 -8
- data/lib/selenium/webdriver/common/element.rb +59 -39
- data/lib/selenium/webdriver/common/error.rb +259 -104
- data/lib/selenium/webdriver/common/file_reaper.rb +6 -14
- data/lib/selenium/webdriver/common/html5/local_storage.rb +8 -10
- data/lib/selenium/webdriver/common/html5/session_storage.rb +8 -10
- data/lib/selenium/webdriver/common/html5/shared_web_storage.rb +8 -16
- data/lib/selenium/webdriver/common/interactions/input_device.rb +54 -0
- data/lib/selenium/webdriver/common/interactions/interaction.rb +53 -0
- data/lib/selenium/webdriver/{safari/browser.rb → common/interactions/interactions.rb} +17 -14
- data/lib/selenium/webdriver/common/interactions/key_actions.rb +145 -0
- data/lib/selenium/webdriver/common/interactions/key_input.rb +66 -0
- data/lib/selenium/webdriver/{android.rb → common/interactions/none_input.rb} +14 -6
- data/lib/selenium/webdriver/common/interactions/pointer_actions.rb +363 -0
- data/lib/selenium/webdriver/common/interactions/pointer_input.rb +139 -0
- data/lib/selenium/webdriver/common/keyboard.rb +10 -14
- data/lib/selenium/webdriver/common/keys.rb +102 -82
- data/lib/selenium/webdriver/common/log_entry.rb +7 -8
- data/lib/selenium/webdriver/common/logger.rb +115 -0
- data/lib/selenium/webdriver/common/logs.rb +4 -6
- data/lib/selenium/webdriver/common/manager.rb +177 -0
- data/lib/selenium/webdriver/common/mouse.rb +12 -14
- data/lib/selenium/webdriver/common/navigation.rb +4 -6
- data/lib/selenium/webdriver/common/options.rb +26 -127
- data/lib/selenium/webdriver/common/platform.rb +75 -101
- data/lib/selenium/webdriver/common/port_prober.rb +7 -19
- data/lib/selenium/webdriver/common/profile_helper.rb +8 -11
- data/lib/selenium/webdriver/common/proxy.rb +68 -74
- data/lib/selenium/webdriver/common/search_context.rb +28 -37
- data/lib/selenium/webdriver/common/service.rb +219 -0
- data/lib/selenium/webdriver/common/socket_lock.rb +15 -16
- data/lib/selenium/webdriver/common/socket_poller.rb +30 -28
- data/lib/selenium/webdriver/common/target_locator.rb +16 -18
- data/lib/selenium/webdriver/common/timeouts.rb +6 -8
- data/lib/selenium/webdriver/common/touch_action_builder.rb +5 -10
- data/lib/selenium/webdriver/common/touch_screen.rb +22 -23
- data/lib/selenium/webdriver/common/w3c_action_builder.rb +212 -0
- data/lib/selenium/webdriver/common/w3c_manager.rb +45 -0
- data/lib/selenium/webdriver/common/wait.rb +17 -16
- data/lib/selenium/webdriver/common/window.rb +50 -17
- data/lib/selenium/webdriver/common/zipper.rb +9 -13
- data/lib/selenium/webdriver/common.rb +21 -7
- data/lib/selenium/webdriver/edge/bridge.rb +34 -63
- data/lib/selenium/webdriver/edge/driver.rb +66 -0
- data/lib/selenium/webdriver/edge/options.rb +80 -0
- data/lib/selenium/webdriver/edge/service.rb +23 -95
- data/lib/selenium/webdriver/edge.rb +13 -13
- data/lib/selenium/webdriver/firefox/binary.rb +45 -60
- data/lib/selenium/webdriver/firefox/driver.rb +50 -0
- data/lib/selenium/webdriver/firefox/extension/prefs.json +3 -12
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/extension.rb +20 -10
- data/lib/selenium/webdriver/firefox/launcher.rb +16 -22
- data/lib/selenium/webdriver/firefox/legacy/driver.rb +83 -0
- data/lib/selenium/webdriver/firefox/marionette/bridge.rb +49 -0
- data/lib/selenium/webdriver/firefox/marionette/driver.rb +90 -0
- data/lib/selenium/webdriver/firefox/options.rb +162 -0
- data/lib/selenium/webdriver/firefox/profile.rb +47 -48
- data/lib/selenium/webdriver/firefox/profiles_ini.rb +11 -18
- data/lib/selenium/webdriver/firefox/service.rb +24 -95
- data/lib/selenium/webdriver/firefox/util.rb +2 -4
- data/lib/selenium/webdriver/firefox.rb +27 -12
- data/lib/selenium/webdriver/ie/driver.rb +85 -0
- data/lib/selenium/webdriver/ie/options.rb +138 -0
- data/lib/selenium/webdriver/ie/service.rb +54 -0
- data/lib/selenium/webdriver/ie.rb +12 -10
- data/lib/selenium/webdriver/remote/bridge.rb +100 -564
- data/lib/selenium/webdriver/remote/capabilities.rb +98 -100
- data/lib/selenium/webdriver/remote/driver.rb +51 -0
- data/lib/selenium/webdriver/remote/http/common.rb +34 -22
- data/lib/selenium/webdriver/remote/http/curb.rb +13 -14
- data/lib/selenium/webdriver/remote/http/default.rb +62 -43
- data/lib/selenium/webdriver/remote/http/persistent.rb +12 -9
- data/lib/selenium/webdriver/remote/oss/bridge.rb +594 -0
- data/lib/selenium/webdriver/remote/oss/commands.rb +223 -0
- data/lib/selenium/webdriver/remote/response.rb +48 -28
- data/lib/selenium/webdriver/remote/server_error.rb +3 -5
- data/lib/selenium/webdriver/remote/w3c/bridge.rb +605 -0
- data/lib/selenium/webdriver/remote/w3c/capabilities.rb +310 -0
- data/lib/selenium/webdriver/remote/w3c/commands.rb +157 -0
- data/lib/selenium/webdriver/remote.rb +10 -16
- data/lib/selenium/webdriver/safari/bridge.rb +17 -101
- data/lib/selenium/webdriver/{firefox/w3c_bridge.rb → safari/driver.rb} +27 -25
- data/lib/selenium/webdriver/safari/options.rb +29 -31
- data/lib/selenium/webdriver/safari/service.rb +38 -0
- data/lib/selenium/webdriver/safari.rb +27 -27
- data/lib/selenium/webdriver/support/abstract_event_listener.rb +19 -4
- data/lib/selenium/webdriver/support/block_event_listener.rb +3 -5
- data/lib/selenium/webdriver/support/color.rb +60 -43
- data/lib/selenium/webdriver/support/escaper.rb +43 -0
- data/lib/selenium/webdriver/support/event_firing_bridge.rb +39 -41
- data/lib/selenium/webdriver/support/select.rb +45 -97
- data/lib/selenium/webdriver/support.rb +3 -2
- data/lib/selenium/webdriver/{iphone.rb → version.rb} +3 -7
- data/lib/selenium/webdriver.rb +36 -23
- data/lib/selenium-webdriver.rb +2 -2
- data/selenium-webdriver.gemspec +42 -29
- metadata +331 -262
- data/lib/selenium/client/base.rb +0 -151
- data/lib/selenium/client/driver.rb +0 -29
- data/lib/selenium/client/errors.rb +0 -28
- data/lib/selenium/client/extensions.rb +0 -132
- data/lib/selenium/client/idiomatic.rb +0 -507
- data/lib/selenium/client/javascript_expression_builder.rb +0 -135
- data/lib/selenium/client/javascript_frameworks/jquery.rb +0 -32
- data/lib/selenium/client/javascript_frameworks/prototype.rb +0 -32
- data/lib/selenium/client/legacy_driver.rb +0 -1722
- data/lib/selenium/client/protocol.rb +0 -123
- data/lib/selenium/client/selenium_helper.rb +0 -49
- data/lib/selenium/client.rb +0 -57
- data/lib/selenium/rake/server_task.rb +0 -176
- data/lib/selenium/webdriver/android/bridge.rb +0 -68
- data/lib/selenium/webdriver/common/core_ext/base64.rb +0 -28
- data/lib/selenium/webdriver/common/core_ext/dir.rb +0 -61
- data/lib/selenium/webdriver/common/html5/location.rb +0 -19
- data/lib/selenium/webdriver/common/w3c_error.rb +0 -194
- data/lib/selenium/webdriver/edge/legacy_support.rb +0 -117
- data/lib/selenium/webdriver/firefox/bridge.rb +0 -89
- data/lib/selenium/webdriver/ie/bridge.rb +0 -88
- data/lib/selenium/webdriver/ie/server.rb +0 -133
- data/lib/selenium/webdriver/iphone/bridge.rb +0 -64
- data/lib/selenium/webdriver/phantomjs/bridge.rb +0 -78
- data/lib/selenium/webdriver/phantomjs/service.rb +0 -130
- data/lib/selenium/webdriver/remote/commands.rb +0 -211
- data/lib/selenium/webdriver/remote/w3c_bridge.rb +0 -668
- data/lib/selenium/webdriver/remote/w3c_capabilities.rb +0 -236
- data/lib/selenium/webdriver/remote/w3c_commands.rb +0 -132
- data/lib/selenium/webdriver/safari/resources/client.js +0 -7255
- data/lib/selenium/webdriver/safari/server.rb +0 -187
- data/lib/selenium-client.rb +0 -21
data/LICENSE
CHANGED
@@ -187,7 +187,7 @@
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
188
188
|
identification within third-party archives.
|
189
189
|
|
190
|
-
Copyright
|
190
|
+
Copyright 2019 Software Freedom Conservancy (SFC)
|
191
191
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
193
193
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# selenium-webdriver
|
2
2
|
|
3
3
|
This gem provides Ruby bindings for WebDriver
|
4
|
-
and has been tested to work on MRI (
|
5
|
-
JRuby and Rubinius.
|
4
|
+
and has been tested to work on MRI (2.0 through 2.2),
|
6
5
|
|
7
6
|
## Install
|
8
7
|
|
@@ -17,7 +16,7 @@ JRuby and Rubinius.
|
|
17
16
|
|
18
17
|
## License
|
19
18
|
|
20
|
-
Copyright 2009-
|
19
|
+
Copyright 2009-2018 Software Freedom Conservancy
|
21
20
|
|
22
21
|
Licensed to the Software Freedom Conservancy (SFC) under one
|
23
22
|
or more contributor license agreements. See the NOTICE file
|
data/lib/selenium/server.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
3
|
# Licensed to the Software Freedom Conservancy (SFC) under one
|
4
4
|
# or more contributor license agreements. See the NOTICE file
|
5
5
|
# distributed with this work for additional information
|
@@ -22,7 +22,6 @@ require 'selenium/webdriver/common/socket_poller'
|
|
22
22
|
require 'net/http'
|
23
23
|
|
24
24
|
module Selenium
|
25
|
-
|
26
25
|
#
|
27
26
|
# Wraps the remote server jar
|
28
27
|
#
|
@@ -66,59 +65,72 @@ module Selenium
|
|
66
65
|
# Download the given version of the selenium-server-standalone jar.
|
67
66
|
#
|
68
67
|
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
class << self
|
69
|
+
def download(required_version)
|
70
|
+
required_version = latest if required_version == :latest
|
71
|
+
download_file_name = "selenium-server-standalone-#{required_version}.jar"
|
72
72
|
|
73
|
-
|
74
|
-
return download_file_name
|
75
|
-
end
|
73
|
+
return download_file_name if File.exist? download_file_name
|
76
74
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
if segment_count % 15 == 0
|
90
|
-
percent = (progress.to_f / total.to_f) * 100
|
91
|
-
print "#{CL_RESET}Downloading #{download_file_name}: #{percent.to_i}% (#{progress} / #{total})"
|
92
|
-
segment_count = 0
|
93
|
-
end
|
75
|
+
begin
|
76
|
+
File.open(download_file_name, 'wb') do |destination|
|
77
|
+
net_http.start('selenium-release.storage.googleapis.com') do |http|
|
78
|
+
resp = http.request_get("/#{required_version[/(\d+\.\d+)\./, 1]}/#{download_file_name}") do |response|
|
79
|
+
total = response.content_length
|
80
|
+
progress = 0
|
81
|
+
segment_count = 0
|
82
|
+
|
83
|
+
response.read_body do |segment|
|
84
|
+
progress += segment.length
|
85
|
+
segment_count += 1
|
94
86
|
|
95
|
-
|
87
|
+
if (segment_count % 15).zero?
|
88
|
+
percent = (progress.to_f / total.to_f) * 100
|
89
|
+
print "#{CL_RESET}Downloading #{download_file_name}: #{percent.to_i}% (#{progress} / #{total})"
|
90
|
+
segment_count = 0
|
91
|
+
end
|
92
|
+
|
93
|
+
destination.write(segment)
|
94
|
+
end
|
96
95
|
end
|
97
|
-
end
|
98
96
|
|
99
|
-
|
100
|
-
raise Error, "#{resp.code} for #{download_file_name}"
|
97
|
+
raise Error, "#{resp.code} for #{download_file_name}" unless resp.is_a? Net::HTTPSuccess
|
101
98
|
end
|
102
99
|
end
|
100
|
+
rescue
|
101
|
+
FileUtils.rm download_file_name if File.exist? download_file_name
|
102
|
+
raise
|
103
103
|
end
|
104
|
-
|
105
|
-
|
106
|
-
raise
|
104
|
+
|
105
|
+
download_file_name
|
107
106
|
end
|
108
107
|
|
109
|
-
|
110
|
-
|
108
|
+
#
|
109
|
+
# Ask Google Code what the latest selenium-server-standalone version is.
|
110
|
+
#
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
112
|
+
def latest
|
113
|
+
require 'rexml/document'
|
114
|
+
net_http.start('selenium-release.storage.googleapis.com') do |http|
|
115
|
+
versions = REXML::Document.new(http.get('/').body).root.get_elements('//Contents/Key').map do |e|
|
116
|
+
e.text[/selenium-server-standalone-(\d+\.\d+\.\d+)\.jar/, 1]
|
117
|
+
end
|
118
|
+
|
119
|
+
versions.compact.map { |version| Gem::Version.new(version) }.max.version
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def net_http
|
124
|
+
http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
125
|
+
|
126
|
+
if http_proxy
|
127
|
+
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
|
128
|
+
uri = URI.parse(http_proxy)
|
115
129
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
e.text[/selenium-server-standalone-(\d+\.\d+\.\d+)\.jar/, 1]
|
121
|
-
}.compact.max
|
130
|
+
Net::HTTP::Proxy(uri.host, uri.port)
|
131
|
+
else
|
132
|
+
Net::HTTP
|
133
|
+
end
|
122
134
|
end
|
123
135
|
end
|
124
136
|
|
@@ -162,7 +174,7 @@ module Selenium
|
|
162
174
|
raise Errno::ENOENT, jar unless File.exist?(jar)
|
163
175
|
|
164
176
|
@jar = jar
|
165
|
-
@host =
|
177
|
+
@host = '127.0.0.1'
|
166
178
|
@port = opts.fetch(:port, 4444)
|
167
179
|
@timeout = opts.fetch(:timeout, 30)
|
168
180
|
@background = opts.fetch(:background, false)
|
@@ -180,14 +192,14 @@ module Selenium
|
|
180
192
|
|
181
193
|
def stop
|
182
194
|
begin
|
183
|
-
Net::HTTP.get(@host,
|
195
|
+
Net::HTTP.get(@host, '/selenium-server/driver/?cmd=shutDownSeleniumServer', @port)
|
184
196
|
rescue Errno::ECONNREFUSED
|
185
197
|
end
|
186
198
|
|
187
199
|
stop_process if @process
|
188
200
|
poll_for_shutdown
|
189
201
|
|
190
|
-
@log_file
|
202
|
+
@log_file&.close
|
191
203
|
end
|
192
204
|
|
193
205
|
def webdriver_url
|
@@ -195,7 +207,7 @@ module Selenium
|
|
195
207
|
end
|
196
208
|
|
197
209
|
def <<(arg)
|
198
|
-
if arg.
|
210
|
+
if arg.is_a?(Array)
|
199
211
|
@additional_args += arg
|
200
212
|
else
|
201
213
|
@additional_args << arg.to_s
|
@@ -204,19 +216,6 @@ module Selenium
|
|
204
216
|
|
205
217
|
private
|
206
218
|
|
207
|
-
def self.net_http
|
208
|
-
http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
209
|
-
|
210
|
-
if http_proxy
|
211
|
-
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?("http://")
|
212
|
-
uri = URI.parse(http_proxy)
|
213
|
-
|
214
|
-
Net::HTTP::Proxy(uri.host, uri.port)
|
215
|
-
else
|
216
|
-
Net::HTTP
|
217
|
-
end
|
218
|
-
end
|
219
|
-
|
220
219
|
def stop_process
|
221
220
|
return unless @process.alive?
|
222
221
|
|
@@ -232,12 +231,17 @@ module Selenium
|
|
232
231
|
end
|
233
232
|
|
234
233
|
def process
|
235
|
-
@process ||=
|
236
|
-
|
234
|
+
@process ||= begin
|
235
|
+
# extract any additional_args that start with -D as options
|
236
|
+
properties = @additional_args.dup - @additional_args.delete_if { |arg| arg[/^-D/] }
|
237
|
+
server_command = ['java'] + properties + ['-jar', @jar, '-port', @port.to_s] + @additional_args
|
238
|
+
cp = ChildProcess.build(*server_command)
|
239
|
+
WebDriver.logger.debug("Executing Process #{server_command}")
|
240
|
+
|
237
241
|
io = cp.io
|
238
242
|
|
239
|
-
if @log.
|
240
|
-
@log_file = File.open(@log,
|
243
|
+
if @log.is_a?(String)
|
244
|
+
@log_file = File.open(@log, 'w')
|
241
245
|
io.stdout = io.stderr = @log_file
|
242
246
|
elsif @log
|
243
247
|
io.inherit!
|
@@ -246,24 +250,23 @@ module Selenium
|
|
246
250
|
cp.detach = @background
|
247
251
|
|
248
252
|
cp
|
249
|
-
|
253
|
+
end
|
250
254
|
end
|
251
255
|
|
252
256
|
def poll_for_service
|
253
|
-
|
254
|
-
|
255
|
-
|
257
|
+
return if socket.connected?
|
258
|
+
|
259
|
+
raise Error, "remote server not launched in #{@timeout} seconds"
|
256
260
|
end
|
257
261
|
|
258
262
|
def poll_for_shutdown
|
259
|
-
|
260
|
-
|
261
|
-
|
263
|
+
return if socket.closed?
|
264
|
+
|
265
|
+
raise Error, "remote server not stopped in #{@timeout} seconds"
|
262
266
|
end
|
263
267
|
|
264
268
|
def socket
|
265
269
|
@socket ||= WebDriver::SocketPoller.new(@host, @port, @timeout)
|
266
270
|
end
|
267
|
-
|
268
271
|
end # Server
|
269
272
|
end # Selenium
|
@@ -0,0 +1,7 @@
|
|
1
|
+
function(){return function(){var d=this;function f(a){return"string"==typeof a}function h(a,b){function e(){}e.prototype=b.prototype;a.c=b.prototype;a.prototype=new e;a.prototype.constructor=a;a.b=function(a,e,m){for(var c=Array(arguments.length-2),g=2;g<arguments.length;g++)c[g-2]=arguments[g];return b.prototype[e].apply(a,c)}};function k(a,b){this.code=a;this.a=l[a]||n;this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}h(k,Error);var n="unknown error",l={15:"element not selectable",11:"element not visible"};l[31]=n;l[30]=n;l[24]="invalid cookie domain";l[29]="invalid element coordinates";l[12]="invalid element state";l[32]="invalid selector";
|
2
|
+
l[51]="invalid selector";l[52]="invalid selector";l[17]="javascript error";l[405]="unsupported operation";l[34]="move target out of bounds";l[27]="no such alert";l[7]="no such element";l[8]="no such frame";l[23]="no such window";l[28]="script timeout";l[33]="session not created";l[10]="stale element reference";l[21]="timeout";l[25]="unable to set cookie";l[26]="unexpected alert open";l[13]=n;l[9]="unknown command";k.prototype.toString=function(){return this.name+": "+this.message};var p;a:{var q=d.navigator;if(q){var r=q.userAgent;if(r){p=r;break a}}p=""}function t(a){return-1!=p.indexOf(a)};function aa(a,b){for(var e=a.length,c=f(a)?a.split(""):a,g=0;g<e;g++)g in c&&b.call(void 0,c[g],g,a)};function u(){return t("iPhone")&&!t("iPod")&&!t("iPad")};function v(){return(t("Chrome")||t("CriOS"))&&!t("Edge")};var w=t("Opera"),x=t("Trident")||t("MSIE"),z=t("Edge"),A=t("Gecko")&&!(-1!=p.toLowerCase().indexOf("webkit")&&!t("Edge"))&&!(t("Trident")||t("MSIE"))&&!t("Edge"),ba=-1!=p.toLowerCase().indexOf("webkit")&&!t("Edge");function B(){var a=d.document;return a?a.documentMode:void 0}var C;
|
3
|
+
a:{var D="",E=function(){var a=p;if(A)return/rv:([^\);]+)(\)|;)/.exec(a);if(z)return/Edge\/([\d\.]+)/.exec(a);if(x)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(ba)return/WebKit\/(\S+)/.exec(a);if(w)return/(?:Version)[ \/]?(\S+)/.exec(a)}();E&&(D=E?E[1]:"");if(x){var F=B();if(null!=F&&F>parseFloat(D)){C=String(F);break a}}C=D}var G;var H=d.document;G=H&&x?B()||("CSS1Compat"==H.compatMode?parseInt(C,10):5):void 0;var ca=t("Firefox"),da=u()||t("iPod"),ea=t("iPad"),I=t("Android")&&!(v()||t("Firefox")||t("Opera")||t("Silk")),fa=v(),J=t("Safari")&&!(v()||t("Coast")||t("Opera")||t("Edge")||t("Silk")||t("Android"))&&!(u()||t("iPad")||t("iPod"));function K(a){return(a=a.exec(p))?a[1]:""}(function(){if(ca)return K(/Firefox\/([0-9.]+)/);if(x||z||w)return C;if(fa)return u()||t("iPad")||t("iPod")?K(/CriOS\/([0-9.]+)/):K(/Chrome\/([0-9.]+)/);if(J&&!(u()||t("iPad")||t("iPod")))return K(/Version\/([0-9.]+)/);if(da||ea){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(p);if(a)return a[1]+"."+a[2]}else if(I)return(a=K(/Android\s+([0-9.]+)/))?a:K(/Version\/([0-9.]+)/);return""})();var L,M=function(){if(!A)return!1;var a=d.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(g){return!1}var b=a.classes;a=a.interfaces;var e=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).version;L=function(a){e.compare(c,""+a)};return!0}(),N=x&&!(8<=Number(G)),ha=x&&!(9<=Number(G));I&&M&&L(2.3);I&&M&&L(4);J&&M&&L(6);var ia={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},O={IMG:" ",BR:"\n"};function P(a,b,e){if(!(a.nodeName in ia))if(3==a.nodeType)e?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in O)b.push(O[a.nodeName]);else for(a=a.firstChild;a;)P(a,b,e),a=a.nextSibling};function Q(a,b){b=b.toLowerCase();return"style"==b?ja(a.style.cssText):N&&"value"==b&&R(a,"INPUT")?a.value:ha&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var ka=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
|
4
|
+
function ja(a){var b=[];aa(a.split(ka),function(a){var c=a.indexOf(":");0<c&&(a=[a.slice(0,c),a.slice(c+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function S(a,b){N&&"value"==b&&R(a,"OPTION")&&null===Q(a,"value")?(b=[],P(a,b,!1),a=b.join("")):a=a[b];return a}function R(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}
|
5
|
+
function T(a){return R(a,"OPTION")?!0:R(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1};var la={"class":"className",readonly:"readOnly"},U="allowfullscreen allowpaymentrequest allowusermedia async autofocus autoplay checked compact complete controls declare default defaultchecked defaultselected defer disabled ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref nomodule noresize noshade novalidate nowrap open paused playsinline pubdate readonly required reversed scoped seamless seeking selected truespeed typemustmatch willvalidate".split(" ");function V(a,b){var e=null,c=b.toLowerCase();if("style"==c)return(e=a.style)&&!f(e)&&(e=e.cssText),e;if(("selected"==c||"checked"==c)&&T(a)){if(!T(a))throw new k(15,"Element is not selectable");b="selected";e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)b="checked";return S(a,b)?"true":null}var g=R(a,"A");if(R(a,"IMG")&&"src"==c||g&&"href"==c)return(e=Q(a,c))&&(e=S(a,c)),e;if("spellcheck"==c){e=Q(a,c);if(null!==e){if("false"==e.toLowerCase())return"false";if("true"==e.toLowerCase())return"true"}return S(a,
|
6
|
+
c)+""}g=la[b]||b;a:if(f(U))c=f(c)&&1==c.length?U.indexOf(c,0):-1;else{for(var m=0;m<U.length;m++)if(m in U&&U[m]===c){c=m;break a}c=-1}if(0<=c)return(e=null!==Q(a,b)||S(a,g))?"true":null;try{var y=S(a,g)}catch(ma){}(c=null==y)||(c=typeof y,c="object"==c&&null!=y||"function"==c);c?e=Q(a,b):e=y;return null!=e?e.toString():null}var W=["_"],X=d;W[0]in X||!X.execScript||X.execScript("var "+W[0]);
|
7
|
+
for(var Y;W.length&&(Y=W.shift());){var Z;if(Z=!W.length)Z=void 0!==V;Z?X[Y]=V:X[Y]&&X[Y]!==Object.prototype[Y]?X=X[Y]:X=X[Y]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
function(){return function(){var k=this;function l(a){return void 0!==a}function m(a){return"string"==typeof a}function aa(a,b){a=a.split(".");var c=k;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&l(b)?c[d]=b:c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}}
|
2
|
+
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
3
|
+
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a,b,c){return a.call.apply(a.bind,arguments)}function da(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
|
4
|
+
function ea(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ea=ca:ea=da;return ea.apply(null,arguments)}function fa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}
|
5
|
+
function p(a,b){function c(){}c.prototype=b.prototype;a.L=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.K=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};function ha(a,b){this.code=a;this.a=q[a]||ia;this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}p(ha,Error);var ia="unknown error",q={15:"element not selectable",11:"element not visible"};q[31]=ia;q[30]=ia;q[24]="invalid cookie domain";q[29]="invalid element coordinates";q[12]="invalid element state";
|
6
|
+
q[32]="invalid selector";q[51]="invalid selector";q[52]="invalid selector";q[17]="javascript error";q[405]="unsupported operation";q[34]="move target out of bounds";q[27]="no such alert";q[7]="no such element";q[8]="no such frame";q[23]="no such window";q[28]="script timeout";q[33]="session not created";q[10]="stale element reference";q[21]="timeout";q[25]="unable to set cookie";q[26]="unexpected alert open";q[13]=ia;q[9]="unknown command";ha.prototype.toString=function(){return this.name+": "+this.message};var ja={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
|
7
|
+
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
|
8
|
+
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
|
9
|
+
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
|
10
|
+
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
|
11
|
+
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ka(a,b){this.width=a;this.height=b}ka.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};ka.prototype.aspectRatio=function(){return this.width/this.height};ka.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};ka.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
|
12
|
+
ka.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function la(a,b){var c=ma;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var na=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function oa(a,b){return a<b?-1:a>b?1:0}function pa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};/*
|
13
|
+
|
14
|
+
The MIT License
|
15
|
+
|
16
|
+
Copyright (c) 2007 Cybozu Labs, Inc.
|
17
|
+
Copyright (c) 2012 Google Inc.
|
18
|
+
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
20
|
+
of this software and associated documentation files (the "Software"), to
|
21
|
+
deal in the Software without restriction, including without limitation the
|
22
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
23
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
24
|
+
furnished to do so, subject to the following conditions:
|
25
|
+
|
26
|
+
The above copyright notice and this permission notice shall be included in
|
27
|
+
all copies or substantial portions of the Software.
|
28
|
+
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
32
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
33
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
34
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
35
|
+
IN THE SOFTWARE.
|
36
|
+
*/
|
37
|
+
function qa(a,b,c){this.a=a;this.b=b||1;this.f=c||1};function ra(a){this.b=a;this.a=0}function sa(a){a=a.match(ta);for(var b=0;b<a.length;b++)ua.test(a[b])&&a.splice(b,1);return new ra(a)}var ta=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,ua=/^\s/;function r(a,b){return a.b[a.a+(b||0)]}function u(a){return a.b[a.a++]}function va(a){return a.b.length<=a.a};var w;a:{var wa=k.navigator;if(wa){var xa=wa.userAgent;if(xa){w=xa;break a}}w=""}function x(a){return-1!=w.indexOf(a)};function y(a,b){this.h=a;this.c=l(b)?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function ya(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}y.prototype.a=function(a){return null===this.b||this.b==a.nodeType};y.prototype.f=function(){return this.h};
|
38
|
+
y.prototype.toString=function(){var a="Kind Test: "+this.h;null===this.c||(a+=z(this.c));return a};function A(a,b){this.j=a.toLowerCase();a="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():a}A.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=l(a.localName)?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};A.prototype.f=function(){return this.j};
|
39
|
+
A.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function za(a){switch(a.nodeType){case 1:return fa(Aa,a);case 9:return za(a.documentElement);case 11:case 10:case 6:case 12:return Ba;default:return a.parentNode?za(a.parentNode):Ba}}function Ba(){return null}function Aa(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Aa(a.parentNode,b):null};function Ca(a,b){if(m(a))return m(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function C(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function Da(a,b){for(var c=a.length,d=[],e=0,f=m(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d}function Ea(a,b,c){var d=c;C(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}
|
40
|
+
function Fa(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Ga(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}function Ha(a,b){a:{for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:m(a)?a.charAt(b):a[b]}function Ia(a){return Array.prototype.concat.apply([],arguments)}
|
41
|
+
function Ja(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function Ka(){return x("iPhone")&&!x("iPod")&&!x("iPad")};var La="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ma=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Na=/^#(?:[0-9a-f]{3}){1,2}$/i,Oa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Pa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Qa(){return(x("Chrome")||x("CriOS"))&&!x("Edge")};function Ra(a,b){this.x=l(a)?a:0;this.y=l(b)?b:0}Ra.prototype.toString=function(){return"("+this.x+", "+this.y+")"};Ra.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};Ra.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Ra.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};var Sa=x("Opera"),D=x("Trident")||x("MSIE"),Ta=x("Edge"),Ua=x("Gecko")&&!(-1!=w.toLowerCase().indexOf("webkit")&&!x("Edge"))&&!(x("Trident")||x("MSIE"))&&!x("Edge"),Va=-1!=w.toLowerCase().indexOf("webkit")&&!x("Edge");function Wa(){var a=k.document;return a?a.documentMode:void 0}var Xa;
|
42
|
+
a:{var Ya="",Za=function(){var a=w;if(Ua)return/rv:([^\);]+)(\)|;)/.exec(a);if(Ta)return/Edge\/([\d\.]+)/.exec(a);if(D)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Va)return/WebKit\/(\S+)/.exec(a);if(Sa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Za&&(Ya=Za?Za[1]:"");if(D){var $a=Wa();if(null!=$a&&$a>parseFloat(Ya)){Xa=String($a);break a}}Xa=Ya}var ma={};
|
43
|
+
function ab(a){return la(a,function(){for(var b=0,c=na(String(Xa)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",h=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;b=oa(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||oa(0==g[2].length,0==h[2].length)||oa(g[2],h[2]);g=g[3];h=h[3]}while(0==b)}return 0<=b})}var bb;var cb=k.document;
|
44
|
+
bb=cb&&D?Wa()||("CSS1Compat"==cb.compatMode?parseInt(Xa,10):5):void 0;function db(a,b,c,d){this.c=a;this.a=b;this.b=c;this.f=d}db.prototype.toString=function(){return"("+this.c+"t, "+this.a+"r, "+this.b+"b, "+this.f+"l)"};db.prototype.ceil=function(){this.c=Math.ceil(this.c);this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.f=Math.ceil(this.f);return this};db.prototype.floor=function(){this.c=Math.floor(this.c);this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.f=Math.floor(this.f);return this};
|
45
|
+
db.prototype.round=function(){this.c=Math.round(this.c);this.a=Math.round(this.a);this.b=Math.round(this.b);this.f=Math.round(this.f);return this};var eb=x("Firefox"),fb=Ka()||x("iPod"),gb=x("iPad"),hb=x("Android")&&!(Qa()||x("Firefox")||x("Opera")||x("Silk")),ib=Qa(),jb=x("Safari")&&!(Qa()||x("Coast")||x("Opera")||x("Edge")||x("Silk")||x("Android"))&&!(Ka()||x("iPad")||x("iPod"));var E=D&&!(9<=Number(bb)),kb=D&&!(8<=Number(bb));function F(a,b,c,d){this.a=a;this.b=b;this.width=c;this.height=d}F.prototype.toString=function(){return"("+this.a+", "+this.b+" - "+this.width+"w x "+this.height+"h)"};F.prototype.ceil=function(){this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};F.prototype.floor=function(){this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
|
46
|
+
F.prototype.round=function(){this.a=Math.round(this.a);this.b=Math.round(this.b);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function lb(a){return(a=a.exec(w))?a[1]:""}(function(){if(eb)return lb(/Firefox\/([0-9.]+)/);if(D||Ta||Sa)return Xa;if(ib)return Ka()||x("iPad")||x("iPod")?lb(/CriOS\/([0-9.]+)/):lb(/Chrome\/([0-9.]+)/);if(jb&&!(Ka()||x("iPad")||x("iPod")))return lb(/Version\/([0-9.]+)/);if(fb||gb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w);if(a)return a[1]+"."+a[2]}else if(hb)return(a=lb(/Android\s+([0-9.]+)/))?a:lb(/Version\/([0-9.]+)/);return""})();function mb(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function nb(a,b){var c=kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new mb(b,a,b.nodeName,c)};var ob,pb=function(){if(!Ua)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(e){return!1}var b=a.classes;a=a.interfaces;var c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),d=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).version;ob=function(a){c.compare(d,""+a)};return!0}(),qb=D&&!(9<=Number(bb));hb&&pb&&ob(2.3);hb&&pb&&ob(4);jb&&pb&&ob(6);function rb(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
|
47
|
+
function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(D&&!(9<=Number(bb))){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?tb(a,b):!c&&rb(e,b)?-1*ub(a,b):!d&&rb(f,a)?ub(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange();
|
48
|
+
c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,a)}function ub(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return tb(b,a)}function tb(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function vb(a,b){a&&(a=a.parentNode);for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}
|
49
|
+
function wb(a){this.a=a||k.document||document}wb.prototype.getElementsByTagName=function(a,b){return(b||this.a).getElementsByTagName(String(a))};function H(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(E&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;c=0;var d=[];for(b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),E&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return b}
|
50
|
+
function I(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}kb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function xb(a,b,c,d,e){return(E?yb:zb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)}
|
51
|
+
function yb(a,b,c,d,e){if(a instanceof A||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;a=Ab(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],h=0;b=f[h++];)I(b,c,d)&&g.push(b);f=g}for(h=0;b=f[h++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Bb(a,b,c,d,e);return e}
|
52
|
+
function zb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!D?(b=b.getElementsByName(d),C(b,function(b){a.a(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),C(b,function(b){b.className==d&&a.a(b)&&e.add(b)})):a instanceof y?Bb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),C(b,function(a){I(a,c,d)&&e.add(a)}));return e}
|
53
|
+
function Cb(a,b,c,d,e){var f;if((a instanceof A||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=Ab(a);if("*"!=g&&(f=Da(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=Da(f,function(a){return I(a,c,d)}));C(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return Db(a,b,c,d,e)}function Db(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.a(b)&&e.add(b);return e}
|
54
|
+
function Bb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.a(b)&&e.add(b),Bb(a,b,c,d,e)}function Ab(a){if(a instanceof y){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function K(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)};function J(){this.b=this.a=null;this.l=0}function Eb(a){this.f=a;this.a=this.b=null}function Fb(a,b){if(!a.a)return b;if(!b.a)return a;var c=a.a;b=b.a;for(var d=null,e,f=0;c&&b;){e=c.f;var g=b.f;e==g||e instanceof mb&&g instanceof mb&&e.a==g.a?(e=c,c=c.a,b=b.a):0<sb(c.f,b.f)?(e=b,b=b.a):(e=c,c=c.a);(e.b=d)?d.a=e:a.a=e;d=e;f++}for(e=c||b;e;)e.b=d,d=d.a=e,f++,e=e.a;a.b=d;a.l=f;return a}function Gb(a,b){b=new Eb(b);b.a=a.a;a.b?a.a.b=b:a.a=a.b=b;a.a=b;a.l++}
|
55
|
+
J.prototype.add=function(a){a=new Eb(a);a.b=this.b;this.a?this.b.a=a:this.a=this.b=a;this.b=a;this.l++};function Hb(a){return(a=a.a)?a.f:null}function Ib(a){return(a=Hb(a))?H(a):""}function M(a,b){return new Jb(a,!!b)}function Jb(a,b){this.f=a;this.b=(this.s=b)?a.b:a.a;this.a=null}function N(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.s?b.b:b.a;return c.f};function P(a){this.i=a;this.b=this.g=!1;this.f=null}function z(a){return"\n "+a.toString().split("\n").join("\n ")}function Kb(a,b){a.g=b}function Lb(a,b){a.b=b}function Q(a,b){a=a.a(b);return a instanceof J?+Ib(a):+a}function R(a,b){a=a.a(b);return a instanceof J?Ib(a):""+a}function Mb(a,b){a=a.a(b);return a instanceof J?!!a.l:!!a};function Nb(a,b,c){P.call(this,a.i);this.c=a;this.h=b;this.o=c;this.g=b.g||c.g;this.b=b.b||c.b;this.c==Ob&&(c.b||c.g||4==c.i||0==c.i||!b.f?b.b||b.g||4==b.i||0==b.i||!c.f||(this.f={name:c.f.name,u:b}):this.f={name:b.f.name,u:c})}p(Nb,P);
|
56
|
+
function Pb(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof J&&c instanceof J){b=M(b);for(d=N(b);d;d=N(b))for(e=M(c),f=N(e);f;f=N(e))if(a(H(d),H(f)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?(e=b,d=c):(e=c,d=b);f=M(e);for(var g=typeof d,h=N(f);h;h=N(f)){switch(g){case "number":h=+H(h);break;case "boolean":h=!!H(h);break;case "string":h=H(h);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(h,d)||e==c&&a(d,h))return!0}return!1}return e?"boolean"==
|
57
|
+
typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}Nb.prototype.a=function(a){return this.c.m(this.h,this.o,a)};Nb.prototype.toString=function(){var a="Binary Expression: "+this.c;a+=z(this.h);return a+=z(this.o)};function Qb(a,b,c,d){this.I=a;this.D=b;this.i=c;this.m=d}Qb.prototype.toString=function(){return this.I};var Rb={};
|
58
|
+
function S(a,b,c,d){if(Rb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Qb(a,b,c,d);return Rb[a.toString()]=a}S("div",6,1,function(a,b,c){return Q(a,c)/Q(b,c)});S("mod",6,1,function(a,b,c){return Q(a,c)%Q(b,c)});S("*",6,1,function(a,b,c){return Q(a,c)*Q(b,c)});S("+",5,1,function(a,b,c){return Q(a,c)+Q(b,c)});S("-",5,1,function(a,b,c){return Q(a,c)-Q(b,c)});S("<",4,2,function(a,b,c){return Pb(function(a,b){return a<b},a,b,c)});
|
59
|
+
S(">",4,2,function(a,b,c){return Pb(function(a,b){return a>b},a,b,c)});S("<=",4,2,function(a,b,c){return Pb(function(a,b){return a<=b},a,b,c)});S(">=",4,2,function(a,b,c){return Pb(function(a,b){return a>=b},a,b,c)});var Ob=S("=",3,2,function(a,b,c){return Pb(function(a,b){return a==b},a,b,c,!0)});S("!=",3,2,function(a,b,c){return Pb(function(a,b){return a!=b},a,b,c,!0)});S("and",2,2,function(a,b,c){return Mb(a,c)&&Mb(b,c)});S("or",1,2,function(a,b,c){return Mb(a,c)||Mb(b,c)});function Sb(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");P.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}p(Sb,P);Sb.prototype.a=function(a){a=this.c.a(a);return Tb(this.h,a)};Sb.prototype.toString=function(){var a="Filter:"+z(this.c);return a+=z(this.h)};function Ub(a,b){if(b.length<a.C)throw Error("Function "+a.j+" expects at least"+a.C+" arguments, "+b.length+" given");if(null!==a.A&&b.length>a.A)throw Error("Function "+a.j+" expects at most "+a.A+" arguments, "+b.length+" given");a.H&&C(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});P.call(this,a.i);this.v=a;this.c=b;Kb(this,a.g||Fa(b,function(a){return a.g}));Lb(this,a.G&&!b.length||a.F&&!!b.length||Fa(b,function(a){return a.b}))}
|
60
|
+
p(Ub,P);Ub.prototype.a=function(a){return this.v.m.apply(null,Ia(a,this.c))};Ub.prototype.toString=function(){var a="Function: "+this.v;if(this.c.length){var b=Ea(this.c,function(a,b){return a+z(b)},"Arguments:");a+=z(b)}return a};function Vb(a,b,c,d,e,f,g,h){this.j=a;this.i=b;this.g=c;this.G=d;this.F=!1;this.m=e;this.C=f;this.A=l(g)?g:f;this.H=!!h}Vb.prototype.toString=function(){return this.j};var Wb={};
|
61
|
+
function T(a,b,c,d,e,f,g,h){if(Wb.hasOwnProperty(a))throw Error("Function already created: "+a+".");Wb[a]=new Vb(a,b,c,d,e,f,g,h)}T("boolean",2,!1,!1,function(a,b){return Mb(b,a)},1);T("ceiling",1,!1,!1,function(a,b){return Math.ceil(Q(b,a))},1);T("concat",3,!1,!1,function(a,b){return Ea(Ja(arguments,1),function(b,d){return b+R(d,a)},"")},2,null);T("contains",2,!1,!1,function(a,b,c){b=R(b,a);a=R(c,a);return-1!=b.indexOf(a)},2);T("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0);
|
62
|
+
T("false",2,!1,!1,function(){return!1},0);T("floor",1,!1,!1,function(a,b){return Math.floor(Q(b,a))},1);T("id",4,!1,!1,function(a,b){function c(a){if(E){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return Ha(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument;a=R(b,a).split(/\s+/);var f=[];C(a,function(a){a=c(a);!a||0<=Ca(f,a)||f.push(a)});f.sort(sb);var g=new J;C(f,function(a){g.add(a)});return g},1);
|
63
|
+
T("lang",2,!1,!1,function(){return!1},1);T("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);T("local-name",3,!1,!0,function(a,b){return(a=b?Hb(b.a(a)):a.a)?a.localName||a.nodeName.toLowerCase():""},0,1,!0);T("name",3,!1,!0,function(a,b){return(a=b?Hb(b.a(a)):a.a)?a.nodeName.toLowerCase():""},0,1,!0);T("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
|
64
|
+
T("normalize-space",3,!1,!0,function(a,b){return(b?R(b,a):H(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);T("not",2,!1,!1,function(a,b){return!Mb(b,a)},1);T("number",1,!1,!0,function(a,b){return b?Q(b,a):+H(a.a)},0,1);T("position",1,!0,!1,function(a){return a.b},0);T("round",1,!1,!1,function(a,b){return Math.round(Q(b,a))},1);T("starts-with",2,!1,!1,function(a,b,c){b=R(b,a);a=R(c,a);return 0==b.lastIndexOf(a,0)},2);T("string",3,!1,!0,function(a,b){return b?R(b,a):H(a.a)},0,1);
|
65
|
+
T("string-length",1,!1,!0,function(a,b){return(b?R(b,a):H(a.a)).length},0,1);T("substring",3,!1,!1,function(a,b,c,d){c=Q(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?Q(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=R(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);T("substring-after",3,!1,!1,function(a,b,c){b=R(b,a);a=R(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
|
66
|
+
T("substring-before",3,!1,!1,function(a,b,c){b=R(b,a);a=R(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);T("sum",1,!1,!1,function(a,b){a=M(b.a(a));b=0;for(var c=N(a);c;c=N(a))b+=+H(c);return b},1,1,!0);T("translate",3,!1,!1,function(a,b,c,d){b=R(b,a);c=R(c,a);var e=R(d,a);a={};for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);T("true",2,!1,!1,function(){return!0},0);function Xb(a){P.call(this,3);this.c=a.substring(1,a.length-1)}p(Xb,P);Xb.prototype.a=function(){return this.c};Xb.prototype.toString=function(){return"Literal: "+this.c};function Yb(a){P.call(this,1);this.c=a}p(Yb,P);Yb.prototype.a=function(){return this.c};Yb.prototype.toString=function(){return"Number: "+this.c};function Zb(a,b){P.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;1==this.c.length&&(a=this.c[0],a.w||a.c!=$b||(a=a.o,"*"!=a.f()&&(this.f={name:a.f(),u:null})))}p(Zb,P);function ac(){P.call(this,4)}p(ac,P);ac.prototype.a=function(a){var b=new J;a=a.a;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};ac.prototype.toString=function(){return"Root Helper Expression"};function bc(){P.call(this,4)}p(bc,P);bc.prototype.a=function(a){var b=new J;b.add(a.a);return b};bc.prototype.toString=function(){return"Context Helper Expression"};
|
67
|
+
function cc(a){return"/"==a||"//"==a}Zb.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof J))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.l;c++){var e=a[c],f=M(b,e.c.s);if(e.g||e.c!=dc)if(e.g||e.c!=ec){var g=N(f);for(b=e.a(new qa(g));null!=(g=N(f));)g=e.a(new qa(g)),b=Fb(b,g)}else g=N(f),b=e.a(new qa(g));else{for(g=N(f);(b=N(f))&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new qa(g))}}return b};
|
68
|
+
Zb.prototype.toString=function(){var a="Path Expression:"+z(this.h);if(this.c.length){var b=Ea(this.c,function(a,b){return a+z(b)},"Steps:");a+=z(b)}return a};function fc(a,b){this.a=a;this.s=!!b}
|
69
|
+
function Tb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=M(b),f=b.l,g,h=0;g=N(e);h++){var t=a.s?f-h:h+1;g=d.a(new qa(g,t,f));if("number"==typeof g)t=t==g;else if("string"==typeof g||"boolean"==typeof g)t=!!g;else if(g instanceof J)t=0<g.l;else throw Error("Predicate.evaluate returned an unexpected type.");if(!t){t=e;g=t.f;var v=t.a;if(!v)throw Error("Next must be called at least once before remove.");var n=v.b;v=v.a;n?n.a=v:g.a=v;v?v.b=n:g.b=n;g.l--;t.a=null}}return b}
|
70
|
+
fc.prototype.toString=function(){return Ea(this.a,function(a,b){return a+z(b)},"Predicates:")};function gc(a){P.call(this,1);this.c=a;this.g=a.g;this.b=a.b}p(gc,P);gc.prototype.a=function(a){return-Q(this.c,a)};gc.prototype.toString=function(){return"Unary Expression: -"+z(this.c)};function hc(a){P.call(this,4);this.c=a;Kb(this,Fa(this.c,function(a){return a.g}));Lb(this,Fa(this.c,function(a){return a.b}))}p(hc,P);hc.prototype.a=function(a){var b=new J;C(this.c,function(c){c=c.a(a);if(!(c instanceof J))throw Error("Path expression must evaluate to NodeSet.");b=Fb(b,c)});return b};hc.prototype.toString=function(){return Ea(this.c,function(a,b){return a+z(b)},"Union Expression:")};function U(a,b,c,d){P.call(this,4);this.c=a;this.o=b;this.h=c||new fc([]);this.w=!!d;b=this.h;b=0<b.a.length?b.a[0].f:null;a.J&&b&&(a=b.name,a=E?a.toLowerCase():a,this.f={name:a,u:b.u});a:{a=this.h;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.g||1==c.i||0==c.i){a=!0;break a}a=!1}this.g=a}p(U,P);
|
71
|
+
U.prototype.a=function(a){var b=a.a,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.u?R(c.u,a):null,f=1);if(this.w)if(this.g||this.c!=ic)if(b=M((new U(jc,new y("node"))).a(a)),c=N(b))for(a=this.m(c,d,e,f);null!=(c=N(b));)a=Fb(a,this.m(c,d,e,f));else a=new J;else a=xb(this.o,b,d,e),a=Tb(this.h,a,f);else a=this.m(a.a,d,e,f);return a};U.prototype.m=function(a,b,c,d){a=this.c.v(this.o,a,b,c);return a=Tb(this.h,a,d)};
|
72
|
+
U.prototype.toString=function(){var a="Step:"+z("Operator: "+(this.w?"//":"/"));this.c.j&&(a+=z("Axis: "+this.c));a+=z(this.o);if(this.h.a.length){var b=Ea(this.h.a,function(a,b){return a+z(b)},"Predicates:");a+=z(b)}return a};function kc(a,b,c,d){this.j=a;this.v=b;this.s=c;this.J=d}kc.prototype.toString=function(){return this.j};var lc={};function V(a,b,c,d){if(lc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new kc(a,b,c,!!d);return lc[a]=b}
|
73
|
+
V("ancestor",function(a,b){for(var c=new J;b=b.parentNode;)a.a(b)&&Gb(c,b);return c},!0);V("ancestor-or-self",function(a,b){var c=new J;do a.a(b)&&Gb(c,b);while(b=b.parentNode);return c},!0);
|
74
|
+
var $b=V("attribute",function(a,b){var c=new J,d=a.f();if("style"==d&&E&&b.style)return c.add(new mb(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof y&&null===a.b||"*"==d)for(a=0;d=e[a];a++)E?d.nodeValue&&c.add(nb(b,d)):c.add(d);else(d=e.getNamedItem(d))&&(E?d.nodeValue&&c.add(nb(b,d)):c.add(d));return c},!1),ic=V("child",function(a,b,c,d,e){return(E?Cb:Db).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)},!1,!0);V("descendant",xb,!1,!0);
|
75
|
+
var jc=V("descendant-or-self",function(a,b,c,d){var e=new J;I(b,c,d)&&a.a(b)&&e.add(b);return xb(a,b,c,d,e)},!1,!0),dc=V("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)I(f,c,d)&&a.a(f)&&e.add(f),e=xb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);V("following-sibling",function(a,b){for(var c=new J;b=b.nextSibling;)a.a(b)&&c.add(b);return c},!1);V("namespace",function(){return new J},!1);
|
76
|
+
var mc=V("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;b=b.parentNode;a.a(b)&&c.add(b);return c},!1),ec=V("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,h=f.length;g<h;g++){var t=[];for(b=f[g];b=b.previousSibling;)t.unshift(b);for(var v=0,n=t.length;v<n;v++)b=t[v],I(b,c,d)&&a.a(b)&&e.add(b),e=xb(a,b,c,d,e)}return e},!0,!0);
|
77
|
+
V("preceding-sibling",function(a,b){for(var c=new J;b=b.previousSibling;)a.a(b)&&Gb(c,b);return c},!0);var nc=V("self",function(a,b){var c=new J;a.a(b)&&c.add(b);return c},!1);function oc(a,b){this.a=a;this.b=b}function pc(a){for(var b,c=[];;){W(a,"Missing right hand side of binary expression.");b=qc(a);var d=u(a.a);if(!d)break;var e=(d=Rb[d]||null)&&d.D;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].D;)b=new Nb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Nb(c.pop(),c.pop(),b);return b}function W(a,b){if(va(a.a))throw Error(b);}function rc(a,b){a=u(a.a);if(a!=b)throw Error("Bad token, expected: "+b+" got: "+a);}
|
78
|
+
function sc(a){a=u(a.a);if(")"!=a)throw Error("Bad token: "+a);}function tc(a){a=u(a.a);if(2>a.length)throw Error("Unclosed literal string");return new Xb(a)}
|
79
|
+
function uc(a){var b=[];if(cc(r(a.a))){var c=u(a.a);var d=r(a.a);if("/"==c&&(va(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new ac;d=new ac;W(a,"Missing next location step.");c=vc(a,c);b.push(c)}else{a:{c=r(a.a);d=c.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":u(a.a);c=pc(a);W(a,'unclosed "("');rc(a,")");break;case '"':case "'":c=tc(a);break;default:if(isNaN(+c))if(!ya(c)&&/(?![0-9])[\w]/.test(d)&&"("==r(a.a,1)){c=u(a.a);
|
80
|
+
c=Wb[c]||null;u(a.a);for(d=[];")"!=r(a.a);){W(a,"Missing function argument list.");d.push(pc(a));if(","!=r(a.a))break;u(a.a)}W(a,"Unclosed function argument list.");sc(a);c=new Ub(c,d)}else{c=null;break a}else c=new Yb(+u(a.a))}"["==r(a.a)&&(d=new fc(wc(a)),c=new Sb(c,d))}if(c)if(cc(r(a.a)))d=c;else return c;else c=vc(a,"/"),d=new bc,b.push(c)}for(;cc(r(a.a));)c=u(a.a),W(a,"Missing next location step."),c=vc(a,c),b.push(c);return new Zb(d,b)}
|
81
|
+
function vc(a,b){if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==r(a.a)){var c=new U(nc,new y("node"));u(a.a);return c}if(".."==r(a.a))return c=new U(mc,new y("node")),u(a.a),c;if("@"==r(a.a)){var d=$b;u(a.a);W(a,"Missing attribute name")}else if("::"==r(a.a,1)){if(!/(?![0-9])[\w]/.test(r(a.a).charAt(0)))throw Error("Bad token: "+u(a.a));var e=u(a.a);d=lc[e]||null;if(!d)throw Error("No axis with name: "+e);u(a.a);W(a,"Missing node name")}else d=ic;e=r(a.a);if(/(?![0-9])[\w\*]/.test(e.charAt(0)))if("("==
|
82
|
+
r(a.a,1)){if(!ya(e))throw Error("Invalid node type: "+e);e=u(a.a);if(!ya(e))throw Error("Invalid type name: "+e);rc(a,"(");W(a,"Bad nodetype");var f=r(a.a).charAt(0),g=null;if('"'==f||"'"==f)g=tc(a);W(a,"Bad nodetype");sc(a);e=new y(e,g)}else if(e=u(a.a),f=e.indexOf(":"),-1==f)e=new A(e);else{g=e.substring(0,f);if("*"==g)var h="*";else if(h=a.b(g),!h)throw Error("Namespace prefix not declared: "+g);e=e.substr(f+1);e=new A(e,h)}else throw Error("Bad token: "+u(a.a));a=new fc(wc(a),d.s);return c||new U(d,
|
83
|
+
e,a,"//"==b)}function wc(a){for(var b=[];"["==r(a.a);){u(a.a);W(a,"Missing predicate expression.");var c=pc(a);b.push(c);W(a,"Unclosed predicate expression.");rc(a,"]")}return b}function qc(a){if("-"==r(a.a))return u(a.a),new gc(qc(a));var b=uc(a);if("|"!=r(a.a))a=b;else{for(b=[b];"|"==u(a.a);)W(a,"Missing next union location path."),b.push(uc(a));a.a.a--;a=new hc(b)}return a};function xc(a,b){if(!a.length)throw Error("Empty XPath expression.");a=sa(a);if(va(a))throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=ea(b.lookupNamespaceURI,b)):b=function(){return null};var c=pc(new oc(a,b));if(!va(a))throw Error("Bad token: "+u(a));this.evaluate=function(a,b){a=c.a(new qa(a));return new X(a,b)}}
|
84
|
+
function X(a,b){if(0==b)if(a instanceof J)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof J))throw Error("value could not be converted to the specified type");this.resultType=b;switch(b){case 2:this.stringValue=a instanceof J?Ib(a):""+a;break;case 1:this.numberValue=a instanceof J?+Ib(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.l:!!a;break;case 4:case 5:case 6:case 7:var c=
|
85
|
+
M(a);var d=[];for(var e=N(c);e;e=N(c))d.push(e instanceof mb?e.a:e);this.snapshotLength=a.l;this.invalidIteratorState=!1;break;case 8:case 9:a=Hb(a);this.singleNodeValue=a instanceof mb?a.a:a;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=d.length?null:d[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=d.length||
|
86
|
+
0>a?null:d[a]}}X.ANY_TYPE=0;X.NUMBER_TYPE=1;X.STRING_TYPE=2;X.BOOLEAN_TYPE=3;X.UNORDERED_NODE_ITERATOR_TYPE=4;X.ORDERED_NODE_ITERATOR_TYPE=5;X.UNORDERED_NODE_SNAPSHOT_TYPE=6;X.ORDERED_NODE_SNAPSHOT_TYPE=7;X.ANY_UNORDERED_NODE_TYPE=8;X.FIRST_ORDERED_NODE_TYPE=9;function yc(a){this.lookupNamespaceURI=za(a)}
|
87
|
+
function zc(a,b){a=a||k;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=X,c.evaluate=function(a,b,c,g){return(new xc(a,c)).evaluate(b,g)},c.createExpression=function(a,b){return new xc(a,b)},c.createNSResolver=function(a){return new yc(a)}}aa("wgxpath.install",zc);var Ac=function(){var a={M:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();
|
88
|
+
function Bc(a,b){var c=G(a);if(!c.documentElement)return null;(D||hb)&&zc(c?c.parentWindow||c.defaultView:window);try{var d=c.createNSResolver?c.createNSResolver(c.documentElement):Ac;if(D&&!ab(7))return c.evaluate.call(c,b,a,d,9,null);if(!D||9<=Number(bb)){for(var e={},f=c.getElementsByTagName("*"),g=0;g<f.length;++g){var h=f[g],t=h.namespaceURI;if(t&&!e[t]){var v=h.lookupPrefix(t);if(!v){var n=t.match(".*/(\\w+)/?$");v=n?n[1]:"xhtml"}e[t]=v}}var B={},L;for(L in e)B[e[L]]=L;d=function(a){return B[a]||
|
89
|
+
null}}try{return c.evaluate(b,a,d,9,null)}catch(O){if("TypeError"===O.name)return d=c.createNSResolver?c.createNSResolver(c.documentElement):Ac,c.evaluate(b,a,d,9,null);throw O;}}catch(O){if(!Ua||"NS_ERROR_ILLEGAL_VALUE"!=O.name)throw new ha(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+O);}}
|
90
|
+
function Cc(a,b){var c=function(){var c=Bc(b,a);return c?c.singleNodeValue||null:b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();if(null!==c&&(!c||1!=c.nodeType))throw new ha(32,'The result of the xpath expression "'+a+'" is: '+c+". It should be an element.");return c};var Dc="function"===typeof ShadowRoot;function Ec(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return K(a)?a:null}
|
91
|
+
function Y(a,b){b=pa(b);if("float"==b||"cssFloat"==b||"styleFloat"==b)b=qb?"styleFloat":"cssFloat";a:{var c=b;var d=G(a);if(d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(a,null))){c=d[c]||d.getPropertyValue(c)||"";break a}c=""}a=c||Fc(a,b);if(null===a)a=null;else if(0<=Ca(La,b)){b:{var e=a.match(Oa);if(e&&(b=Number(e[1]),c=Number(e[2]),d=Number(e[3]),e=Number(e[4]),0<=b&&255>=b&&0<=c&&255>=c&&0<=d&&255>=d&&0<=e&&1>=e)){b=[b,c,d,e];break b}b=null}if(!b)b:{if(d=a.match(Pa))if(b=
|
92
|
+
Number(d[1]),c=Number(d[2]),d=Number(d[3]),0<=b&&255>=b&&0<=c&&255>=c&&0<=d&&255>=d){b=[b,c,d,1];break b}b=null}if(!b)b:{b=a.toLowerCase();c=ja[b.toLowerCase()];if(!c&&(c="#"==b.charAt(0)?b:"#"+b,4==c.length&&(c=c.replace(Ma,"#$1$1$2$2$3$3")),!Na.test(c))){b=null;break b}b=[parseInt(c.substr(1,2),16),parseInt(c.substr(3,2),16),parseInt(c.substr(5,2),16),1]}a=b?"rgba("+b.join(", ")+")":a}return a}
|
93
|
+
function Fc(a,b){var c=a.currentStyle||a.style,d=c[b];!l(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?l(d)?d:null:(a=Ec(a))?Fc(a,b):null}
|
94
|
+
function Gc(a,b,c){function d(a){var b=Hc(a);return 0<b.height&&0<b.width?!0:K(a,"PATH")&&(0<b.height||0<b.width)?(a=Y(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=Y(a,"overflow")&&Fa(a.childNodes,function(a){return 3==a.nodeType||K(a)&&d(a)})}function e(a){return Ic(a)==Z&&Ga(a.childNodes,function(a){return!K(a)||e(a)||!d(a)})}if(!K(a))throw Error("Argument to isShown must be of type Element");if(K(a,"BODY"))return!0;var f=Ec(a);if(f&&K(f,"DETAILS")&&!f.open&&!K(a,"SUMMARY"))return!1;if(K(a,
|
95
|
+
"OPTION")||K(a,"OPTGROUP"))return a=vb(a,function(a){return K(a,"SELECT")}),!!a&&Gc(a,!0,c);if(f=Jc(a))return!!f.B&&0<f.rect.width&&0<f.rect.height&&Gc(f.B,b,c);if(K(a,"INPUT")&&"hidden"==a.type.toLowerCase()||K(a,"NOSCRIPT"))return!1;f=Y(a,"visibility");return"collapse"!=f&&"hidden"!=f&&c(a)&&(b||0!=Kc(a))&&d(a)?!e(a):!1}var Z="hidden";
|
96
|
+
function Ic(a){function b(a){function b(a){if(a==g)return!0;var b=Y(a,"display");return 0==b.lastIndexOf("inline",0)||"contents"==b||"absolute"==c&&"static"==Y(a,"position")?!1:!0}var c=Y(a,"position");if("fixed"==c)return v=!0,a==g?null:g;for(a=Ec(a);a&&!b(a);)a=Ec(a);return a}function c(a){var b=a;if("visible"==t)if(a==g&&h)b=h;else if(a==h)return{x:"visible",y:"visible"};b={x:Y(b,"overflow-x"),y:Y(b,"overflow-y")};a==g&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function d(a){if(a==
|
97
|
+
g){var b=(new wb(f)).a;a=b.scrollingElement?b.scrollingElement:Va||"CSS1Compat"!=b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=D&&ab("10")&&b.pageYOffset!=a.scrollTop?new Ra(a.scrollLeft,a.scrollTop):new Ra(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Ra(a.scrollLeft,a.scrollTop);return a}var e=Lc(a),f=G(a),g=f.documentElement,h=f.body,t=Y(g,"overflow"),v;for(a=b(a);a;a=b(a)){var n=c(a);if("visible"!=n.x||"visible"!=n.y){var B=Hc(a);
|
98
|
+
if(0==B.width||0==B.height)return Z;var L=e.a<B.a,O=e.b<B.b;if(L&&"hidden"==n.x||O&&"hidden"==n.y)return Z;if(L&&"visible"!=n.x||O&&"visible"!=n.y){L=d(a);O=e.b<B.b-L.y;if(e.a<B.a-L.x&&"visible"!=n.x||O&&"visible"!=n.x)return Z;e=Ic(a);return e==Z?Z:"scroll"}L=e.f>=B.a+B.width;B=e.c>=B.b+B.height;if(L&&"hidden"==n.x||B&&"hidden"==n.y)return Z;if(L&&"visible"!=n.x||B&&"visible"!=n.y){if(v&&(n=d(a),e.f>=g.scrollWidth-n.x||e.a>=g.scrollHeight-n.y))return Z;e=Ic(a);return e==Z?Z:"scroll"}}}return"none"}
|
99
|
+
function Hc(a){var b=Jc(a);if(b)return b.rect;if(K(a,"HTML"))return a=G(a),a=((a?a.parentWindow||a.defaultView:window)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new ka(a.clientWidth,a.clientHeight),new F(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(d){return new F(0,0,0,0)}b=new F(c.left,c.top,c.right-c.left,c.bottom-c.top);D&&a.ownerDocument.body&&(a=G(a),b.a-=a.documentElement.clientLeft+a.body.clientLeft,b.b-=a.documentElement.clientTop+a.body.clientTop);
|
100
|
+
return b}function Jc(a){var b=K(a,"MAP");if(!b&&!K(a,"AREA"))return null;var c=b?a:K(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;c&&c.name&&(d=Cc('/descendant::*[@usemap = "#'+c.name+'"]',G(c)))&&(e=Hc(d),b||"default"==a.shape.toLowerCase()||(a=Mc(a),b=Math.min(Math.max(a.a,0),e.width),c=Math.min(Math.max(a.b,0),e.height),e=new F(b+e.a,c+e.b,Math.min(a.width,e.width-b),Math.min(a.height,e.height-c))));return{B:d,rect:e||new F(0,0,0,0)}}
|
101
|
+
function Mc(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){b=a[0];var c=a[1];return new F(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new F(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){b=a[0];c=a[1];for(var d=b,e=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new F(b,c,d-b,e-c)}return new F(0,0,0,0)}function Lc(a){a=Hc(a);return new db(a.b,a.a+a.width,a.b+a.height,a.a)}
|
102
|
+
function Kc(a){if(qb){if("relative"==Y(a,"position"))return 1;a=Y(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Nc(a)}function Nc(a){var b=1,c=Y(a,"opacity");c&&(b=Number(c));(a=Ec(a))&&(b*=Nc(a));return b};aa("_",function(a,b){function c(a){if(K(a)&&"none"==Y(a,"display"))return!1;var b;(b=a.parentNode)&&b.shadowRoot&&void 0!==a.assignedSlot?b=a.assignedSlot?a.assignedSlot.parentNode:null:a.getDestinationInsertionPoints&&(a=a.getDestinationInsertionPoints(),0<a.length&&(b=a[a.length-1]));if(Dc&&b instanceof ShadowRoot){if(b.host.shadowRoot!==b)return!1;b=b.host}return!b||9!=b.nodeType&&11!=b.nodeType?b&&c(b):!0}return Gc(a,!!b,c)});; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
3
|
# Licensed to the Software Freedom Conservancy (SFC) under one
|
4
4
|
# or more contributor license agreements. See the NOTICE file
|
5
5
|
# distributed with this work for additional information
|
@@ -17,25 +17,21 @@
|
|
17
17
|
# specific language governing permissions and limitations
|
18
18
|
# under the License.
|
19
19
|
|
20
|
-
require 'net/http'
|
21
|
-
|
22
|
-
require 'selenium/webdriver/phantomjs/service'
|
23
|
-
require 'selenium/webdriver/phantomjs/bridge'
|
24
|
-
|
25
20
|
module Selenium
|
26
21
|
module WebDriver
|
22
|
+
module Atoms
|
27
23
|
|
28
|
-
|
24
|
+
private
|
29
25
|
|
30
|
-
def
|
31
|
-
|
32
|
-
@path = path
|
26
|
+
def read_atom(function)
|
27
|
+
File.read(File.expand_path("../atoms/#{function}.js", __FILE__))
|
33
28
|
end
|
34
29
|
|
35
|
-
def
|
36
|
-
|
30
|
+
def execute_atom(function_name, *arguments)
|
31
|
+
script = format("return (%<atom>s).apply(null, arguments)", atom: read_atom(function_name))
|
32
|
+
execute_script(script, *arguments)
|
37
33
|
end
|
38
34
|
|
39
|
-
end #
|
35
|
+
end # Atoms
|
40
36
|
end # WebDriver
|
41
37
|
end # Selenium
|