diff --git a/src/ghostdriver/config.js b/src/ghostdriver/config.js index 6aacf697d..246cd64d0 100644 --- a/src/ghostdriver/config.js +++ b/src/ghostdriver/config.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -92,7 +92,7 @@ exports.init = function(cliArgs) { // Apply/Normalize the Configuration before returning apply(); - _log.debug("init", "Configuration => " + JSON.stringify(config)); + _log.debug("config.init", JSON.stringify(config)); }; exports.get = function() { diff --git a/src/ghostdriver/errors.js b/src/ghostdriver/errors.js index 97094e70c..9e31b9c77 100644 --- a/src/ghostdriver/errors.js +++ b/src/ghostdriver/errors.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -61,7 +61,7 @@ exports.createInvalidReqEH = function(errorName, req) { var e = new Error(); e.name = errorName; - e.message = "Request => " + JSON.stringify(req); + e.message = JSON.stringify(req); e.handle = _invalidReqHandle; return e; @@ -216,7 +216,7 @@ exports.createFailedCommandEH = function(errorName, errorMsg, req, session, clas var e = new Error(); e.name = errorName; - e.message = "Error Message => '" + errorMsg + "'\n" + " caused by Request => " + JSON.stringify(req); + e.message = JSON.stringify({ "errorMessage" : errorMsg, "request" : req }); e.errorStatusCode = exports.FAILED_CMD_STATUS_CODES[errorName] || 13; //< '13' Unkown Error e.errorSessionId = session.getId() || null; e.errorClassName = className || "unknown"; diff --git a/src/ghostdriver/ghostdriver.qrc b/src/ghostdriver/ghostdriver.qrc index 261865325..b20c5c2c7 100644 --- a/src/ghostdriver/ghostdriver.qrc +++ b/src/ghostdriver/ghostdriver.qrc @@ -15,6 +15,7 @@ request_handlers/webelement_request_handler.js session.js third_party/console++.js + third_party/har.js third_party/parseuri.js third_party/uuid.js third_party/webdriver-atoms/active_element.js @@ -22,8 +23,6 @@ third_party/webdriver-atoms/clear_local_storage.js third_party/webdriver-atoms/clear_session_storage.js third_party/webdriver-atoms/click.js - third_party/webdriver-atoms/default_content.js - third_party/webdriver-atoms/deps.js third_party/webdriver-atoms/double_click.js third_party/webdriver-atoms/drag.js third_party/webdriver-atoms/execute_async_script.js @@ -32,15 +31,10 @@ third_party/webdriver-atoms/find_element.js third_party/webdriver-atoms/find_elements.js third_party/webdriver-atoms/focus_on_element.js - third_party/webdriver-atoms/frame_by_id_or_name.js - third_party/webdriver-atoms/frame_by_index.js third_party/webdriver-atoms/get_appcache_status.js third_party/webdriver-atoms/get_attribute.js third_party/webdriver-atoms/get_attribute_value.js third_party/webdriver-atoms/get_current_position.js - third_party/webdriver-atoms/get_element_from_cache.js - third_party/webdriver-atoms/get_frame_window.js - third_party/webdriver-atoms/get_in_view_location.js third_party/webdriver-atoms/get_local_storage_item.js third_party/webdriver-atoms/get_local_storage_keys.js third_party/webdriver-atoms/get_local_storage_size.js @@ -51,10 +45,7 @@ third_party/webdriver-atoms/get_session_storage_size.js third_party/webdriver-atoms/get_size.js third_party/webdriver-atoms/get_text.js - third_party/webdriver-atoms/get_top_left_coordinates.js third_party/webdriver-atoms/get_value_of_css_property.js - third_party/webdriver-atoms/get_window_position.js - third_party/webdriver-atoms/get_window_size.js third_party/webdriver-atoms/is_displayed.js third_party/webdriver-atoms/is_enabled.js third_party/webdriver-atoms/is_online.js @@ -70,8 +61,6 @@ third_party/webdriver-atoms/scroll_mouse.js third_party/webdriver-atoms/set_local_storage_item.js third_party/webdriver-atoms/set_session_storage_item.js - third_party/webdriver-atoms/set_window_position.js - third_party/webdriver-atoms/set_window_size.js third_party/webdriver-atoms/submit.js third_party/webdriver-atoms/swipe.js third_party/webdriver-atoms/tap.js diff --git a/src/ghostdriver/hub_register.js b/src/ghostdriver/hub_register.js index 248ddae6a..b5c6d8dd1 100644 --- a/src/ghostdriver/hub_register.js +++ b/src/ghostdriver/hub_register.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/inputs.js b/src/ghostdriver/inputs.js index bdc296149..45104e0b5 100644 --- a/src/ghostdriver/inputs.js +++ b/src/ghostdriver/inputs.js @@ -1,7 +1,8 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2010, Jim Evans - Salesforce.com +Copyright (c) 2014, Jim Evans - Salesforce.com +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/lastupdate b/src/ghostdriver/lastupdate index 61499f531..cfa199773 100644 --- a/src/ghostdriver/lastupdate +++ b/src/ghostdriver/lastupdate @@ -1,7 +1,7 @@ -2013-07-25 23:22:39 +2014-01-04 16:44:10 -commit e3c255e66f99fd34fbf03269b8dc44bafdda940a (HEAD, refs/remotes/origin/master, refs/remotes/origin/HEAD, refs/heads/master) +commit 491a60b0adf78e6d7a4eff980de81bb3eb8c764d (HEAD, refs/remotes/origin/master, refs/remotes/origin/HEAD, refs/heads/master) Author: Ivan De Marino -Date: Thu Jul 25 00:21:44 2013 +0100 +Date: Thu Jan 2 23:02:21 2014 +0000 - Log "page.onError". + Updated CHANGELOG to mention upgraded Atoms in 1.1.0 diff --git a/src/ghostdriver/logger.js b/src/ghostdriver/logger.js index 3c77b15c1..9065c19dd 100644 --- a/src/ghostdriver/logger.js +++ b/src/ghostdriver/logger.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/main.js b/src/ghostdriver/main.js index e55cd5f19..8bc20b407 100644 --- a/src/ghostdriver/main.js +++ b/src/ghostdriver/main.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -35,7 +35,7 @@ ghostdriver = { hub : require("./hub_register.js"), logger : require("./logger.js"), config : null, //< this will be set below - version : "1.0.4" + version : "1.1.0" }; // create logger @@ -66,7 +66,7 @@ try { router = new ghostdriver.RouterReqHand(); // Start the server - if (server.listen(ghostdriver.config.port, router.handle)) { + if (server.listen(ghostdriver.config.port, { "keepAlive" : true }, router.handle)) { _log.info("Main", "running on port " + server.port); // If a Selenium Grid HUB was provided, register to it! @@ -83,6 +83,6 @@ try { phantom.exit(1); } } catch (e) { - _log.error("Main", e.message + " => "+ JSON.stringify(e, null, " ")); + _log.error("main.fail", JSON.stringify(e)); phantom.exit(1); } diff --git a/src/ghostdriver/request_handlers/request_handler.js b/src/ghostdriver/request_handlers/request_handler.js index d396b69ec..d3d2c8a86 100644 --- a/src/ghostdriver/request_handlers/request_handler.js +++ b/src/ghostdriver/request_handlers/request_handler.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -96,8 +96,6 @@ ghostdriver.RequestHandler = function() { }, _respondBasedOnResultDecorator = function(session, req, result) { - //console.log("respondBasedOnResult => "+JSON.stringify(result)); - // Convert string to JSON if (typeof(result) === "string") { try { diff --git a/src/ghostdriver/request_handlers/router_request_handler.js b/src/ghostdriver/request_handlers/router_request_handler.js index 1115a770a..c72bc595a 100644 --- a/src/ghostdriver/request_handlers/router_request_handler.js +++ b/src/ghostdriver/request_handlers/router_request_handler.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -56,7 +56,7 @@ ghostdriver.RouterReqHand = function() { // Invoke parent implementation _protoParent.handle.call(this, req, res); - _log.debug("_handle", "Request => " + JSON.stringify(req, null, " ")); + _log.debug("_handle", JSON.stringify(req)); try { if (req.urlParsed.chunks.length === 1 && req.urlParsed.file === _const.STATUS) { // GET '/status' @@ -83,7 +83,7 @@ ghostdriver.RouterReqHand = function() { throw _errors.createInvalidReqUnknownCommandEH(req); } } catch (e) { - _log.error("_handle", "Thrown => " + JSON.stringify(e, null, " ")); + _log.error("_handle.error", JSON.stringify(e)); if (typeof(e.handle) === "function") { e.handle(res); diff --git a/src/ghostdriver/request_handlers/session_manager_request_handler.js b/src/ghostdriver/request_handlers/session_manager_request_handler.js index 3b7aaf680..6e61496ae 100644 --- a/src/ghostdriver/request_handlers/session_manager_request_handler.js +++ b/src/ghostdriver/request_handlers/session_manager_request_handler.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/request_handlers/session_request_handler.js b/src/ghostdriver/request_handlers/session_request_handler.js index e14268290..6271f2cc6 100644 --- a/src/ghostdriver/request_handlers/session_request_handler.js +++ b/src/ghostdriver/request_handlers/session_request_handler.js @@ -1,8 +1,8 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino -Copyright (c) 2012, Alex Anderson <@alxndrsn> +Copyright (c) 2014, Ivan De Marino +Copyright (c) 2014, Alex Anderson <@alxndrsn> All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -63,7 +63,11 @@ ghostdriver.SessionReqHand = function(session) { CLICK : "click", BUTTON_DOWN : "buttondown", BUTTON_UP : "buttonup", - DOUBLE_CLICK : "doubleclick" + DOUBLE_CLICK : "doubleclick", + PHANTOM_DIR : "/phantom/", + PHANTOM_EXEC : "execute", + LOG : "log", + TYPES : "types" }; var @@ -133,7 +137,7 @@ ghostdriver.SessionReqHand = function(session) { } else if (req.urlParsed.file === _const.REFRESH && req.method === "POST") { _refreshCommand(req, res); return; - } else if (req.urlParsed.file === _const.EXECUTE && req.method === "POST") { + } else if (req.urlParsed.file === _const.EXECUTE && req.urlParsed.directory === "/" && req.method == "POST") { _executeCommand(req, res); return; } else if (req.urlParsed.file === _const.EXECUTE_ASYNC && req.method === "POST") { @@ -157,6 +161,9 @@ ghostdriver.SessionReqHand = function(session) { } else if (req.urlParsed.file === _const.MOVE_TO && req.method === "POST") { _postMouseMoveToCommand(req, res); return; + } else if (req.urlParsed.file === _const.PHANTOM_EXEC && req.urlParsed.directory === _const.PHANTOM_DIR && req.method === "POST") { + _executePhantomJS(req, res); + return; } else if (req.urlParsed.file === _const.CLICK && req.method === "POST") { _postMouseClickCommand(req, res, "click"); return; @@ -178,6 +185,15 @@ ghostdriver.SessionReqHand = function(session) { _deleteCookieCommand(req, res); } return; + } else if (req.urlParsed.chunks[0] === _const.LOG && req.method === "POST") { //< ".../log" + _postLog(req, res); + return; + } else if (req.urlParsed.chunks[0] === _const.LOG && req.urlParsed.chunks[1] === _const.TYPES && req.method === "GET") { //< ".../log/types" + _getLogTypes(req, res); + return; + } else if (req.urlParsed.chunks[0] === _const.LOG && _session.getLogTypes().indexOf(req.urlParsed.chunks[1]) >= 0 && req.method === "GET") { //< ".../log/LOG_TYPE" + _getLog(req, res, req.urlParsed.chunks[1]); + return; } throw _errors.createInvalidReqInvalidCommandMethodEH(req); @@ -195,7 +211,7 @@ ghostdriver.SessionReqHand = function(session) { command, targetWindow; - _log.debug("_doWindowHandleCommands", "req => " + JSON.stringify(req)); + _log.debug("_doWindowHandleCommands", JSON.stringify(req)); // Ensure all the parameters are provided if (req.urlParsed.chunks.length === 3) { @@ -253,8 +269,8 @@ ghostdriver.SessionReqHand = function(session) { } targetWindow.viewportSize = { - width : newWidth, - height : newHeight + width : newWidth, + height : newHeight }; res.success(_session.getId()); }, @@ -292,7 +308,16 @@ ghostdriver.SessionReqHand = function(session) { }, _postWindowMaximizeCommand = function(req, res, targetWindow) { - // NOTE: Nothing to do! PhantomJS is headless. :) + // NOTE: PhantomJS is headless, so there is no "screen" to maximize to + // or "window" resize to that. + // + // NOTE: The most common screen resolution used online is currently: 1366x768 + // See http://gs.statcounter.com/#resolution-ww-monthly-201307-201312. + targetWindow.viewportSize = { + width : 1366, + height : 768 + }; + res.success(_session.getId()); }, @@ -385,11 +410,11 @@ ghostdriver.SessionReqHand = function(session) { _executeAsyncCommand = function(req, res) { var postObj = JSON.parse(req.post); - _log.debug("_executeCommand", "postObj => " + JSON.stringify(postObj)); + _log.debug("_executeAsyncCommand", JSON.stringify(postObj)); if (typeof(postObj) === "object" && postObj.script && postObj.args) { _protoParent.getSessionCurrWindow.call(this, _session, req).setOneShotCallback("onCallback", function() { - _log.debug("_executeCommand", "onCallback - arguments => " + JSON.stringify(arguments)); + _log.debug("_executeAsyncCommand.callbackArguments", JSON.stringify(arguments)); res.respondBasedOnResult(_session, req, arguments[0]); }); @@ -401,7 +426,7 @@ ghostdriver.SessionReqHand = function(session) { "}", postObj.script, postObj.args, - _session.getAsyncScriptTimeout()); + _session.getScriptTimeout()); } else { throw _errors.createInvalidReqMissingCommandParameterEH(req); } @@ -486,10 +511,10 @@ ghostdriver.SessionReqHand = function(session) { if (req.urlParsed.file === _const.IMPLICIT_WAIT) { postObj["type"] = _session.timeoutNames.IMPLICIT; } else if (req.urlParsed.file === _const.ASYNC_SCRIPT) { - postObj["type"] = _session.timeoutNames.ASYNC_SCRIPT; + postObj["type"] = _session.timeoutNames.SCRIPT; } - if (typeof(postObj["type"]) !== "undefined" && typeof(postObj["ms"]) !== "undefined") { + if (typeof(postObj["type"]) === "string" && typeof(postObj["ms"]) === "number") { _log.debug("_postTimeout", JSON.stringify(postObj)); @@ -498,15 +523,14 @@ ghostdriver.SessionReqHand = function(session) { case _session.timeoutNames.SCRIPT: _session.setScriptTimeout(postObj["ms"]); break; - case _session.timeoutNames.ASYNC_SCRIPT: - _session.setAsyncScriptTimeout(postObj["ms"]); - break; case _session.timeoutNames.IMPLICIT: _session.setImplicitTimeout(postObj["ms"]); break; case _session.timeoutNames.PAGE_LOAD: _session.setPageLoadTimeout(postObj["ms"]); break; + default: + throw _errors.createInvalidReqMissingCommandParameterEH(req); } res.success(_session.getId()); @@ -585,7 +609,7 @@ ghostdriver.SessionReqHand = function(session) { } } } else if (typeof(postObj.id) === "object" && typeof(postObj.id["ELEMENT"]) === "string") { - _log.debug("_postFrameCommand", "Switching to frame ELEMENT: " + JSON.stringify(postObj.id)); + _log.debug("_postFrameCommand.element", JSON.stringify(postObj.id)); // Will use the Element JSON to find the frame name frameName = currWindow.evaluate( @@ -597,7 +621,7 @@ ghostdriver.SessionReqHand = function(session) { "return arguments[0].name || arguments[0].id;", [postObj.id]); - _log.debug("_postFrameCommand", "Will try to switch to Frame using: "+frameName.value); + _log.debug("_postFrameCommand.frameName", frameName.value); // If a frame name (or id) is found for the given ELEMENT, we // "re-call" this very function, changing the `post` property @@ -693,8 +717,8 @@ ghostdriver.SessionReqHand = function(session) { // normalize click clickType = clickType || "click"; - // The protocol allows language bindings to send an empty string - if (req.post.length > 0) { + // The protocol allows language bindings to send an empty string (or no data at all) + if (req.post && req.post.length > 0) { postObj = JSON.parse(req.post); } @@ -835,6 +859,31 @@ ghostdriver.SessionReqHand = function(session) { _getTitleCommand = function(req, res) { res.success(_session.getId(), _protoParent.getSessionCurrWindow.call(this, _session, req).title); + }, + + _executePhantomJS = function(req, res) { + var params = JSON.parse(req.post); + if (typeof(params) === "object" && params.script && params.args) { + res.success(_session.getId(), _session.executePhantomJS(_protoParent.getSessionCurrWindow.call(this, _session, req), params.script, params.args)); + } else { + throw _errors.createInvalidReqMissingCommandParameterEH(req); + } + }, + + _postLog = function (req, res) { + var params = JSON.parse(req.post); + if (!params.type || _session.getLogTypes().indexOf(params.type) < 0) { + throw _errors.createInvalidReqMissingCommandParameterEH(req); + } + _getLog(req, res, params.type); + }, + + _getLogTypes = function (req, res) { + res.success(_session.getId(), _session.getLogTypes()); + }, + + _getLog = function (req, res, logType) { + res.success(_session.getId(), _session.getLog(logType)); }; // public: diff --git a/src/ghostdriver/request_handlers/shutdown_request_handler.js b/src/ghostdriver/request_handlers/shutdown_request_handler.js index 6013cbce0..8a5ed999b 100644 --- a/src/ghostdriver/request_handlers/shutdown_request_handler.js +++ b/src/ghostdriver/request_handlers/shutdown_request_handler.js @@ -1,8 +1,8 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino -Copyright (c) 2010, Jim Evans - Salesforce.com +Copyright (c) 2014, Ivan De Marino +Copyright (c) 2014, Jim Evans - Salesforce.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/request_handlers/status_request_handler.js b/src/ghostdriver/request_handlers/status_request_handler.js index 289b2c277..72cac5ccc 100644 --- a/src/ghostdriver/request_handlers/status_request_handler.js +++ b/src/ghostdriver/request_handlers/status_request_handler.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/request_handlers/webelement_request_handler.js b/src/ghostdriver/request_handlers/webelement_request_handler.js index 1293029b4..400a5eab0 100644 --- a/src/ghostdriver/request_handlers/webelement_request_handler.js +++ b/src/ghostdriver/request_handlers/webelement_request_handler.js @@ -1,8 +1,8 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino -Copyright (c) 2012, Alex Anderson <@alxndrsn> +Copyright (c) 2014, Ivan De Marino +Copyright (c) 2014, Alex Anderson <@alxndrsn> All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -293,8 +293,10 @@ ghostdriver.WebElementReqHand = function(idOrElement, session) { _session.inputs.clearModifierKeys(_session); } - // Return the result of this typing - res.respondBasedOnResult(_session, req, typeRes); + currWindow.waitIfLoading(function() { + // Return the result of this typing + res.respondBasedOnResult(_session, req, typeRes); + }); } return; } diff --git a/src/ghostdriver/session.js b/src/ghostdriver/session.js index db4e79e7c..dbf148d26 100644 --- a/src/ghostdriver/session.js +++ b/src/ghostdriver/session.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -31,13 +31,16 @@ ghostdriver.Session = function(desiredCapabilities) { // private: const _const = { - TIMEOUT_NAMES : { - SCRIPT : "script", - ASYNC_SCRIPT : "async script", - IMPLICIT : "implicit", - PAGE_LOAD : "page load" + TIMEOUT_NAMES : { + SCRIPT : "script", + IMPLICIT : "implicit", + PAGE_LOAD : "page load" }, - ONE_SHOT_POSTFIX : "OneShot" + ONE_SHOT_POSTFIX : "OneShot", + LOG_TYPES : { + HAR : "har", + BROWSER : "browser" + } }; var @@ -69,9 +72,7 @@ ghostdriver.Session = function(desiredCapabilities) { "driverName" : _defaultCapabilities.driverName, "driverVersion" : _defaultCapabilities.driverVersion, "platform" : _defaultCapabilities.platform, - "javascriptEnabled" : typeof(desiredCapabilities.javascriptEnabled) === "undefined" ? - _defaultCapabilities.javascriptEnabled : - desiredCapabilities.javascriptEnabled, + "javascriptEnabled" : _defaultCapabilities.javascriptEnabled, "takesScreenshot" : typeof(desiredCapabilities.takesScreenshot) === "undefined" ? _defaultCapabilities.takesScreenshot : desiredCapabilities.takesScreenshot, @@ -95,8 +96,7 @@ ghostdriver.Session = function(desiredCapabilities) { _max32bitInt = Math.pow(2, 31) -1, //< Max 32bit Int _timeouts = { "script" : _max32bitInt, - "async script" : _max32bitInt, - "implicit" : 50, //< 50ms + "implicit" : 200, //< 200ms "page load" : _max32bitInt, }, _windows = {}, //< NOTE: windows are "webpage" in Phantom-dialect @@ -178,27 +178,13 @@ ghostdriver.Session = function(desiredCapabilities) { // Wait 10ms before proceeding any further: in this window of time // the page can react and start loading (if it has to). setTimeout(function() { - var loadingStartedTs, + var loadingStartedTs = new Date().getTime(), checkLoadingFinished; - loadingStartedTs = new Date().getTime(); - checkLoadingFinished = function() { if (!_isLoading()) { //< page finished loading _log.debug("_execFuncAndWaitForLoadDecorator", "Page Loading in Session: false"); - try { - // In case this command closed the window, "thisPage" - // might now be invalid/deleted and calls to methods - // attached to it will throw exceptions. - // So, we just need to wrap it and move on. - thisPage.resetOneShotCallbacks(); - } catch (e) { - // swallow the exception: once this call is done - // the window would have become invalid and any attempt - // to access it will correctly throw a "NoWindow" Exception. - } - if (onLoadFinishedArgs !== null) { // Report the result of the "Load Finished" event onLoadFunc.apply(thisPage, onLoadFinishedArgs); @@ -213,11 +199,8 @@ ghostdriver.Session = function(desiredCapabilities) { // Timeout error? if (new Date().getTime() - loadingStartedTs > _getPageLoadTimeout()) { - thisPage.resetOneShotCallbacks(); - // Report the "Timeout" event onErrorFunc.call(thisPage, "timeout"); - return; } @@ -228,30 +211,73 @@ ghostdriver.Session = function(desiredCapabilities) { }, 10); //< 10ms }, + /** + * Wait for Page to be done Loading before executing of callback. + * Also, it considers "Page Timeout" to avoid waiting indefinitely. + * NOTE: This is useful for cases where it's not certain a certain action + * just executed MIGHT cause a page to start loading. + * It's a "best effort" approach and the user is given the use of + * "Page Timeout" to tune to their needs. + * + * @param callback Function to execute when done or timed out + */ + _waitIfLoadingDecorator = function(callback) { + var thisPage = this, + waitStartedTs = new Date().getTime(), + checkDoneLoading; + + checkDoneLoading = function() { + if (!_isLoading() //< Session is not loading (any more?) + || (new Date().getTime() - waitStartedTs > _getPageLoadTimeout())) { //< OR Page Timeout expired + callback.call(thisPage); + return; + } + + _log.debug("_waitIfLoading", "Still loading (wait using Implicit Timeout)"); + + // Retry in 10ms + setTimeout(checkDoneLoading, 10); + }; + checkDoneLoading(); + }, + _oneShotCallbackFactory = function(page, callbackName) { return function() { - var retVal; - - if (typeof(page[callbackName + _const.ONE_SHOT_POSTFIX]) === "function") { - _log.debug("_oneShotCallback", callbackName); + var oneShotCallbackName = callbackName + _const.ONE_SHOT_POSTFIX, + i, retVal; + + try { + // If there are callback functions registered + if (page[oneShotCallbackName] instanceof Array + && page[oneShotCallbackName].length > 0) { + _log.debug("_oneShotCallback", callbackName); + + // Invoke all the callback functions (once) + for (i = page[oneShotCallbackName].length -1; i >= 0; --i) { + retVal = page[oneShotCallbackName][i].apply(page, arguments); + } - retVal = page[callbackName + _const.ONE_SHOT_POSTFIX].apply(page, arguments); - page[callbackName + _const.ONE_SHOT_POSTFIX] = null; + // Remove all the callback functions now + page[oneShotCallbackName] = []; + } + } catch (e) { + // In case the "page" object has been closed, + // the code above will fail: that's OK. } + + // Return (latest) value return retVal; }; }, _setOneShotCallbackDecorator = function(callbackName, handlerFunc) { - this[callbackName + _const.ONE_SHOT_POSTFIX] = handlerFunc; - }, - - _resetOneShotCallbacksDecorator = function() { - _log.debug("_resetOneShotCallbacksDecorator"); + var oneShotCallbackName = callbackName + _const.ONE_SHOT_POSTFIX; - this["onLoadStarted" + _const.ONE_SHOT_POSTFIX] = null; - this["onLoadFinished" + _const.ONE_SHOT_POSTFIX] = null; - this["onUrlChanged" + _const.ONE_SHOT_POSTFIX] = null; + // Initialize array of One Shot Callbacks + if (!(this[oneShotCallbackName] instanceof Array)) { + this[oneShotCallbackName] = []; + } + this[oneShotCallbackName].push(handlerFunc); }, // Add any new page to the "_windows" container of this session @@ -278,22 +304,28 @@ ghostdriver.Session = function(desiredCapabilities) { // Decorating: // 0. Pages lifetime will be managed by Driver, not the pages page.ownsPages = false; + // 1. Random Window Handle page.windowHandle = require("./third_party/uuid.js").v1(); + // 2. Initialize the One-Shot Callbacks page["onLoadStarted"] = _oneShotCallbackFactory(page, "onLoadStarted"); page["onLoadFinished"] = _oneShotCallbackFactory(page, "onLoadFinished"); page["onUrlChanged"] = _oneShotCallbackFactory(page, "onUrlChanged"); page["onFilePicker"] = _oneShotCallbackFactory(page, "onFilePicker"); page["onCallback"] = _oneShotCallbackFactory(page, "onCallback"); + // 3. Utility methods page.execFuncAndWaitForLoad = _execFuncAndWaitForLoadDecorator; page.setOneShotCallback = _setOneShotCallbackDecorator; - page.resetOneShotCallbacks = _resetOneShotCallbacksDecorator; + page.waitIfLoading = _waitIfLoadingDecorator; + // 4. Store every newly created page page.onPageCreated = _addNewPage; + // 5. Remove every closing page page.onClosing = _deleteClosingPage; + // 6. Applying Page settings received via capabilities for (k in _pageSettings) { // Apply setting only if really supported by PhantomJS @@ -301,22 +333,107 @@ ghostdriver.Session = function(desiredCapabilities) { page.settings[k] = _pageSettings[k]; } } + // 7. Applying Page custom headers received via capabilities page.customHeaders = _pageCustomHeaders; + // 8. Log Page internal errors - page["onError"] = function(errorMsg, errorStack) { - _log.error("Page at '"+page.url+"'", "Console Error (msg): " + errorMsg); - _log.error("Page at '"+page.url+"'", "Console Error (stack): " + JSON.stringify(errorStack, null, " ")); + page.onError = function(errorMsg, errorStack) { + var stack = ''; + + // Prep the "stack" part of the message + errorStack.forEach(function (stackEntry, idx, arr) { + stack += " " //< a bit of indentation + + (stackEntry.function || "(anonymous function)") + + " (" + stackEntry.file + ":" + stackEntry.line + ")"; + stack += idx < arr.length - 1 ? "\n" : ""; + }); + + // Log as error + _log.error("page.onError", "msg: " + errorMsg); + _log.error("page.onError", "stack:\n" + stack); + + // Register as part of the "browser" log + page.browserLog.push(_createLogEntry("WARNING", errorMsg + "\n" + stack)); + }; + + // 9. Log Page console messages + page.browserLog = []; + page.onConsoleMessage = function(msg, lineNum, sourceId) { + // Log as debug + _log.debug("page.onConsoleMessage", msg); + + // Register as part of the "browser" log + page.browserLog.push(_createLogEntry("INFO", msg + " (" + sourceId + ":" + lineNum + ")")); + }; + + // 10. Log Page network activity + page.resources = []; + page.startTime = null; + page.endTime = null; + page.setOneShotCallback("onLoadStarted", function() { + page.startTime = new Date(); + }); + page.setOneShotCallback("onLoadFinished", function() { + page.endTime = new Date(); + }); + page.onResourceRequested = function (req) { + _log.debug("page.onResourceRequested", JSON.stringify(req)); + + // Register HTTP Request + page.resources[req.id] = { + request: req, + startReply: null, + endReply: null, + error: null + }; + }; + page.onResourceReceived = function (res) { + _log.debug("page.onResourceReceived", JSON.stringify(res)); + + // Register HTTP Response + page.resources[res.id] || (page.resources[res.id] = {}); + if (res.stage === 'start') { + page.resources[res.id].startReply = res; + } else if (res.stage === 'end') { + page.resources[res.id].endReply = res; + } }; + page.onResourceError = function(resError) { + _log.debug("page.onResourceError", JSON.stringify(resError)); - page.onConsoleMessage = function(msg) { _log.debug("page.onConsoleMessage", msg); }; + // Register HTTP Error + page.resources[resError.id] || (page.resources[resError.id] = {}); + page.resources[resError.id].error = resError; + }; + page.onResourceTimeout = function(req) { + _log.debug("page.onResourceTimeout", JSON.stringify(req)); + + // Register HTTP Timeout + page.resources[req.id] || (page.resources[req.id] = {}); + page.resources[req.id].error = req; + }; + page.onNavigationRequested = function(url, type, willNavigate, main) { + // Clear page log before page loading + if (main && willNavigate) { + _clearPageLog(page); + } + }; - _log.info("_decorateNewWindow", "page.settings: " + JSON.stringify(page.settings)); + _log.info("page.settings", JSON.stringify(page.settings)); _log.info("page.customHeaders: ", JSON.stringify(page.customHeaders)); return page; }, + _createLogEntry = function(level, message) { + return { + "level" : level, + "message" : message, + "timestamp" : (new Date()).getTime() + }; + }, + /** * Is any window in this Session Loading? * @returns "true" if at least 1 window is loading. @@ -334,6 +451,17 @@ ghostdriver.Session = function(desiredCapabilities) { return false; }, + /** + * According to log method specification we have to clear log after each page refresh. + * https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/log + * @param {Object} page + * @private + */ + _clearPageLog = function (page) { + page.resources = []; + page.browserLog = []; + }, + _getWindow = function(handleOrName) { var page = null, k; @@ -449,10 +577,6 @@ ghostdriver.Session = function(desiredCapabilities) { return _getTimeout(_const.TIMEOUT_NAMES.SCRIPT); }, - _getAsyncScriptTimeout = function() { - return _getTimeout(_const.TIMEOUT_NAMES.ASYNC_SCRIPT); - }, - _getImplicitTimeout = function() { return _getTimeout(_const.TIMEOUT_NAMES.IMPLICIT); }, @@ -465,10 +589,6 @@ ghostdriver.Session = function(desiredCapabilities) { _setTimeout(_const.TIMEOUT_NAMES.SCRIPT, ms); }, - _setAsyncScriptTimeout = function(ms) { - _setTimeout(_const.TIMEOUT_NAMES.ASYNC_SCRIPT, ms); - }, - _setImplicitTimeout = function(ms) { _setTimeout(_const.TIMEOUT_NAMES.IMPLICIT, ms); }, @@ -477,6 +597,15 @@ ghostdriver.Session = function(desiredCapabilities) { _setTimeout(_const.TIMEOUT_NAMES.PAGE_LOAD, ms); }, + _executePhantomJS = function(page, script, args) { + try { + var code = new Function(script); + return code.apply(page, args); + } catch (e) { + return e; + } + }, + _aboutToDelete = function() { var k; @@ -487,14 +616,47 @@ ghostdriver.Session = function(desiredCapabilities) { for (k in _windows) { _closeWindow(k); } + }, + + _getLog = function (type) { + var har = require('./third_party/har.js'), + page, tmp; + + // Return "HAR" as Log Type "har" + if (type === _const.LOG_TYPES.HAR) { + page = _getCurrentWindow(); + tmp = []; + tmp.push(_createLogEntry( + "INFO", + JSON.stringify(har.createHar(page, page.resources)))); + return tmp; + } + + // Return Browser Console Log + if (type === _const.LOG_TYPES.BROWSER) { + return _getCurrentWindow().browserLog; + } + + // Return empty Log + return []; + }, + + _getLogTypes = function () { + var logTypes = [], k; + + for (k in _const.LOG_TYPES) { + logTypes.push(_const.LOG_TYPES[k]); + } + + return logTypes; }; // Initialize the Session. // Particularly, create the first empty page/window. _init(); - _log.info("CONSTRUCTOR", "Desired Capabilities: " + JSON.stringify(desiredCapabilities)); - _log.info("CONSTRUCTOR", "Negotiated Capabilities: " + JSON.stringify(_negotiatedCapabilities)); + _log.debug("Session.desiredCapabilities", JSON.stringify(desiredCapabilities)); + _log.info("Session.negotiatedCapabilities", JSON.stringify(_negotiatedCapabilities)); // public: return { @@ -512,15 +674,16 @@ ghostdriver.Session = function(desiredCapabilities) { aboutToDelete : _aboutToDelete, inputs : _inputs, setScriptTimeout : _setScriptTimeout, - setAsyncScriptTimeout : _setAsyncScriptTimeout, setImplicitTimeout : _setImplicitTimeout, setPageLoadTimeout : _setPageLoadTimeout, getScriptTimeout : _getScriptTimeout, - getAsyncScriptTimeout : _getAsyncScriptTimeout, getImplicitTimeout : _getImplicitTimeout, getPageLoadTimeout : _getPageLoadTimeout, + executePhantomJS : _executePhantomJS, timeoutNames : _const.TIMEOUT_NAMES, - isLoading : _isLoading + isLoading : _isLoading, + getLog: _getLog, + getLogTypes: _getLogTypes }; }; diff --git a/src/ghostdriver/third_party/console++.js b/src/ghostdriver/third_party/console++.js index 2b70266b2..2ae6273fb 100755 --- a/src/ghostdriver/third_party/console++.js +++ b/src/ghostdriver/third_party/console++.js @@ -1,7 +1,7 @@ /* This file is part of the Console++ by Ivan De Marino . -Copyright (c) 2012, Ivan De Marino +Copyright (c) 2014, Ivan De Marino All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/third_party/har.js b/src/ghostdriver/third_party/har.js new file mode 100644 index 000000000..232c8b825 --- /dev/null +++ b/src/ghostdriver/third_party/har.js @@ -0,0 +1,173 @@ +/** + * Page object + * @typedef {Object} PageObject + * @property {String} title - contents of tag + * @property {String} url - page URL + * @property {Date} startTime - time when page starts loading + * @property {Date} endTime - time when onLoad event fires + */ + +/** + * Resource object + * @typedef {Object} ResourceObject + * @property {Object} request - PhantomJS request object + * @property {Object} startReply - PhantomJS response object + * @property {Object} endReply - PhantomJS response object + */ + +/** + * This function is based on PhantomJS network logging example: + * https://github.com/ariya/phantomjs/blob/master/examples/netsniff.js + * + * @param {PageObject} page + * @param {ResourceObject} resources + * @returns {{log: {version: string, creator: {name: string, version: string}, pages: Array, entries: Array}}} + */ +exports.createHar = function (page, resources) { + var entries = []; + + resources.forEach(function (resource) { + var request = resource.request, + startReply = resource.startReply, + endReply = resource.endReply, + error = resource.error; + + if (!request) { + return; + } + + // Exclude Data URI from HAR file because + // they aren't included in specification + if (request.url.match(/(^data:image\/.*)/i)) { + return; + } + + if (error) { + // according to http://qt-project.org/doc/qt-4.8/qnetworkreply.html + switch (error.errorCode) { + case 1: + error.errorString = '(refused)'; + break; + case 2: + error.errorString = '(closed)'; + break; + case 3: + error.errorString = '(host not found)'; + break; + case 4: + error.errorString = '(timeout)'; + break; + case 5: + error.errorString = '(canceled)'; + break; + case 6: + error.errorString = '(ssl failure)'; + break; + case 7: + error.errorString = '(net failure)'; + break; + } + } + + if (startReply && endReply) { + entries.push({ + startedDateTime: request.time.toISOString(), + time: endReply.time - request.time, + request: { + method: request.method, + url: request.url, + httpVersion: "HTTP/1.1", + cookies: [], + headers: request.headers, + queryString: [], + headersSize: -1, + bodySize: -1 + }, + response: { + status: error ? null : endReply.status, + statusText: error ? error.errorString : endReply.statusText, + httpVersion: "HTTP/1.1", + cookies: [], + headers: endReply.headers, + redirectURL: "", + headersSize: -1, + bodySize: startReply.bodySize, + content: { + size: startReply.bodySize, + mimeType: endReply.contentType + } + }, + cache: {}, + timings: { + blocked: 0, + dns: -1, + connect: -1, + send: 0, + wait: startReply.time - request.time, + receive: endReply.time - startReply.time, + ssl: -1 + }, + pageref: page.url + }); + } else if (error) { + entries.push({ + startedDateTime: request.time.toISOString(), + time: 0, + request: { + method: request.method, + url: request.url, + httpVersion: "HTTP/1.1", + cookies: [], + headers: request.headers, + queryString: [], + headersSize: -1, + bodySize: -1 + }, + response: { + status: null, + statusText: error.errorString, + httpVersion: "HTTP/1.1", + cookies: [], + headers: [], + redirectURL: "", + headersSize: -1, + bodySize: 0, + content: {} + }, + cache: {}, + timings: { + blocked: 0, + dns: -1, + connect: -1, + send: 0, + wait: 0, + receive: 0, + ssl: -1 + }, + pageref: page.url + }); + } + }); + + return { + log: { + version: '1.2', + creator: { + name: "PhantomJS", + version: phantom.version.major + '.' + phantom.version.minor + + '.' + phantom.version.patch + }, + pages: [{ + startedDateTime: (page.startTime instanceof Date) + ? page.startTime.toISOString() : null, + id: page.url, + title: page.title, + pageTimings: { + onLoad: (page.startTime instanceof Date && page.endTime instanceof Date) + ? page.endTime.getTime() - page.startTime.getTime() : null + } + }], + entries: entries + } + }; +}; diff --git a/src/ghostdriver/third_party/parseuri.js b/src/ghostdriver/third_party/parseuri.js index 2d433361e..10b5dd9eb 100644 --- a/src/ghostdriver/third_party/parseuri.js +++ b/src/ghostdriver/third_party/parseuri.js @@ -1,8 +1,8 @@ /* This file is part of the GhostDriver by Ivan De Marino <http://ivandemarino.me>. -Copyright (c) 2012, Ivan De Marino <http://ivandemarino.me> -Copyright (c) 2011, Steven Levithan <stevenlevithan.com> +Copyright (c) 2014, Ivan De Marino <http://ivandemarino.me> +Copyright (c) 2014, Steven Levithan <stevenlevithan.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/third_party/webdriver-atoms/active_element.js b/src/ghostdriver/third_party/webdriver-atoms/active_element.js index 3cc513f2e..f6427a2d6 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/active_element.js +++ b/src/ghostdriver/third_party/webdriver-atoms/active_element.js @@ -1,35 +1,35 @@ -function(){return function(){var g=void 0,k=!0,l=null,m=!1;function n(a){return function(){return a}}var p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ca=Date.now||function(){return+new Date};var da=window;function s(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var t=d[h]||"",F=e[h]||"",N=RegExp("(\\d*)(\\D*)","g"),ea=RegExp("(\\d*)(\\D*)","g");do{var z=N.exec(t)||["","",""],A=ea.exec(F)||["","",""];if(0==z[0].length&&0==A[0].length)break;c=((0==z[1].length?0:parseInt(z[1],10))<(0==A[1].length?0:parseInt(A[1],10))?-1:(0==z[1].length?0:parseInt(z[1],10))>(0==A[1].length? -0:parseInt(A[1],10))?1:0)||((0==z[2].length)<(0==A[2].length)?-1:(0==z[2].length)>(0==A[2].length)?1:0)||(z[2]<A[2]?-1:z[2]>A[2]?1:0)}while(0==c)}return c};var fa=Array.prototype;function u(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function ga(a,b){for(var c=a.length,d=[],e=0,f=r(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var t=f[h];b.call(g,t,h,a)&&(d[e++]=t)}return d}function ha(a,b){for(var c=a.length,d=Array(c),e=r(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";u(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function ja(a,b){var c;a:{c=a.length;for(var d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:r(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?fa.slice.call(a,b):fa.slice.call(a,b,c)};var v,la,w,ma;function x(){return p.navigator?p.navigator.userAgent:l}ma=w=la=v=m;var y;if(y=x()){var na=p.navigator;v=0==y.indexOf("Opera");la=!v&&-1!=y.indexOf("MSIE");w=!v&&-1!=y.indexOf("WebKit");ma=!v&&!w&&"Gecko"==na.product}var B=v,C=la,D=ma,oa=w;function pa(){var a=p.document;return a?a.documentMode:g}var E; -a:{var qa="",G;if(B&&p.opera)var ra=p.opera.version,qa="function"==typeof ra?ra():ra;else if(D?G=/rv\:([^\);]+)(\)|;)/:C?G=/MSIE\s+([^\);]+)(\)|;)/:oa&&(G=/WebKit\/(\S+)/),G)var sa=G.exec(x()),qa=sa?sa[1]:"";if(C){var ta=pa();if(ta>parseFloat(qa)){E=String(ta);break a}}E=qa}var ua={};function va(a){return ua[a]||(ua[a]=0<=s(E,a))}var wa=p.document,H=!wa||!C?g:pa()||("CSS1Compat"==wa.compatMode?parseInt(E,10):5);!D&&!C||C&&C&&9<=H||D&&va("1.9.1");C&&va("9");function xa(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function za(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function Aa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Ba(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(C&&!(C&&9<=H)){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?Ca(a,b):!c&&Aa(e,b)?-1*Da(a,b):!d&&Aa(f,a)?Da(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(k);d=d.createRange();d.selectNode(b);d.collapse(k);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function Da(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ca(d,a)}function Ca(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Ea,Fa,Ga,Ha,Ia,Ja,Ka;Ka=Ja=Ia=Ha=Ga=Fa=Ea=m;var I=x();I&&(-1!=I.indexOf("Firefox")?Ea=k:-1!=I.indexOf("Camino")?Fa=k:-1!=I.indexOf("iPhone")||-1!=I.indexOf("iPod")?Ga=k:-1!=I.indexOf("iPad")?Ha=k:-1!=I.indexOf("Android")?Ia=k:-1!=I.indexOf("Chrome")?Ja=k:-1!=I.indexOf("Safari")&&(Ka=k));var La=Ea,Ma=Fa,Na=Ga,Oa=Ha,Pa=Ia,Qa=Ja,Ra=Ka;function J(a){return(a=a.exec(x()))?a[1]:""}var Sa=function(){if(La)return J(/Firefox\/([0-9.]+)/);if(C||B)return E;if(Qa)return J(/Chrome\/([0-9.]+)/);if(Ra)return J(/Version\/([0-9.]+)/);if(Na||Oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(Pa)return(a=J(/Android\s+([0-9.]+)/))?a:J(/Version\/([0-9.]+)/);if(Ma)return J(/Camino\/([0-9.]+)/)}return""}();var Ta,Ua;function Va(a){return Wa?Ta(a):C?0<=s(H,a):va(a)}var Wa=function(){if(!D)return m;var a=p.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;Ta=function(a){return 0<=d.m(e,""+a)};Ua=function(a){d.m(f,""+a)};return k}(),Xa; -if(Pa){var Ya=/Android\s+([0-9\.]+)/.exec(x());Xa=Ya?Ya[1]:"0"}else Xa="0";var Za=Xa;Pa&&(Wa?Ua(2.3):Pa?s(Za,2.3):s(Sa,2.3));function K(a,b){this.code=a;this.state=$a[a]||ab;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;K.F=a.prototype;K.prototype=new b})(); -var ab="unknown error",$a={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};$a[13]=ab;$a[9]="unknown command";K.prototype.toString=function(){return this.name+": "+this.message};var L=C&&!(C&&9<=H),bb=C&&!(C&&8<=H);function cb(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.B=e;this.parentNode=b}function db(a,b,c){var d=bb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new cb(b,a,b.nodeName,d,c)};function M(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(L&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),L&&"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} -function O(a,b,c){if(b===l)return k;try{if(!a.getAttribute)return m}catch(d){return m}bb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function eb(a,b,c,d,e){return(L?fb:gb).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new P)} -function fb(a,b,c,d,e){if(m||8==a.d||c&&a.d===l){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],t=0;b=f[t++];)O(b,c,d)&&h.push(b);f=h}for(t=0;b=f[t++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ib(a,b,c,d,e);return e} -function gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!C?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),u(b,function(a){O(a,c,d)&&e.add(a)}));return e} -function jb(a,b,c,d,e){var f;if((m||8==a.d||c&&a.d===l)&&(f=b.childNodes)){var h=hb(a);if("*"!=h&&(f=ga(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ga(f,function(a){return O(a,c,d)}));u(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return kb(a,b,c,d,e)}function kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b);return e} -function ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b),ib(a,b,c,d,e)}function hb(a){if(m){if(8==a.d)return"!";if(a.d===l)return"*"}return a.getName()};function P(){this.b=this.a=l;this.e=0}function lb(a){this.k=a;this.next=this.i=l}P.prototype.unshift=function(a){a=new lb(a);a.next=this.a;this.b?this.a.i=a:this.a=this.b=a;this.a=a;this.e++};P.prototype.add=function(a){a=new lb(a);a.i=this.b;this.a?this.b.next=a:this.a=this.b=a;this.b=a;this.e++};function mb(a){return(a=a.a)?a.k:l}function nb(a){return(a=mb(a))?M(a):""}function Q(a,b){this.z=a;this.j=(this.l=b)?a.b:a.a;this.p=l} -Q.prototype.next=function(){var a=this.j;if(a==l)return l;var b=this.p=a;this.j=this.l?a.i:a.next;return b.k};function R(a,b){var c=a.evaluate(b);return c instanceof P?+nb(c):+c}function S(a,b){var c=a.evaluate(b);return c instanceof P?nb(c):""+c}function T(a,b){var c=a.evaluate(b);return c instanceof P?!!c.e:!!c};function U(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof P&&c instanceof P){e=new Q(b,m);for(d=e.next();d;d=e.next()){b=new Q(c,m);for(f=b.next();f;f=b.next())if(a(M(d),M(f)))return k}return m}if(b instanceof P||c instanceof P){b instanceof P?e=b:(e=c,c=b);e=new Q(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+M(d);break;case "boolean":d=!!M(d);break;case "string":d=M(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return k}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function ob(a,b,c,d){this.q=a;this.D=b;this.n=c;this.o=d}ob.prototype.toString=function(){return this.q};var pb={};function V(a,b,c,d){if(a in pb)throw Error("Binary operator already created: "+a);a=new ob(a,b,c,d);pb[a.toString()]=a}V("div",6,1,function(a,b,c){return R(a,c)/R(b,c)});V("mod",6,1,function(a,b,c){return R(a,c)%R(b,c)});V("*",6,1,function(a,b,c){return R(a,c)*R(b,c)}); -V("+",5,1,function(a,b,c){return R(a,c)+R(b,c)});V("-",5,1,function(a,b,c){return R(a,c)-R(b,c)});V("<",4,2,function(a,b,c){return U(function(a,b){return a<b},a,b,c)});V(">",4,2,function(a,b,c){return U(function(a,b){return a>b},a,b,c)});V("<=",4,2,function(a,b,c){return U(function(a,b){return a<=b},a,b,c)});V(">=",4,2,function(a,b,c){return U(function(a,b){return a>=b},a,b,c)});V("=",3,2,function(a,b,c){return U(function(a,b){return a==b},a,b,c,k)}); -V("!=",3,2,function(a,b,c){return U(function(a,b){return a!=b},a,b,c,k)});V("and",2,2,function(a,b,c){return T(a,c)&&T(b,c)});V("or",1,2,function(a,b,c){return T(a,c)||T(b,c)});function qb(a,b,c,d,e,f,h,t,F){this.g=a;this.n=b;this.w=c;this.v=d;this.u=e;this.o=f;this.t=h;this.s=t!==g?t:h;this.A=!!F}qb.prototype.toString=function(){return this.g};var rb={};function W(a,b,c,d,e,f,h,t){if(a in rb)throw Error("Function already created: "+a+".");rb[a]=new qb(a,b,c,d,m,e,f,h,t)}W("boolean",2,m,m,function(a,b){return T(b,a)},1);W("ceiling",1,m,m,function(a,b){return Math.ceil(R(b,a))},1); -W("concat",3,m,m,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+S(c,a)})},2,l);W("contains",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return-1!=b.indexOf(a)},2);W("count",1,m,m,function(a,b){return b.evaluate(a).e},1,1,k);W("false",2,m,m,n(m),0);W("floor",1,m,m,function(a,b){return Math.floor(R(b,a))},1); -W("id",4,m,m,function(a,b){function c(a){if(L){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=S(b,a).split(/\s+/),f=[];u(d,function(a){a=c(a);var b;if(b=a){a:if(r(f))b=!r(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Ba);var h=new P;u(f,function(a){h.add(a)});return h},1); -W("lang",2,m,m,n(m),1);W("last",1,k,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.b},0);W("local-name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("namespace-uri",3,k,m,n(""),0,1,k);W("normalize-space",3,m,k,function(a,b){return(b?S(b,a):M(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -W("not",2,m,m,function(a,b){return!T(b,a)},1);W("number",1,m,k,function(a,b){return b?R(b,a):+M(a.c)},0,1);W("position",1,k,m,function(a){return a.C},0);W("round",1,m,m,function(a,b){return Math.round(R(b,a))},1);W("starts-with",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return 0==b.lastIndexOf(a,0)},2);W("string",3,m,k,function(a,b){return b?S(b,a):M(a.c)},0,1);W("string-length",1,m,k,function(a,b){return(b?S(b,a):M(a.c)).length},0,1); -W("substring",3,m,m,function(a,b,c,d){c=R(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?R(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=S(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);W("substring-after",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -W("substring-before",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);W("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new Q(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+M(e);return d},1,1,k);W("translate",3,m,m,function(a,b,c,d){b=S(b,a);c=S(c,a);var e=S(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);W("true",2,m,m,n(k),0);function sb(a,b,c,d){this.g=a;this.r=b;this.l=c;this.G=d}sb.prototype.toString=function(){return this.g};var tb={};function X(a,b,c,d){if(a in tb)throw Error("Axis already created: "+a);tb[a]=new sb(a,b,c,!!d)}X("ancestor",function(a,b){for(var c=new P,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},k);X("ancestor-or-self",function(a,b){var c=new P,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},k); -X("attribute",function(a,b){var c=new P,d=a.getName();if("style"==d&&b.style&&L)return c.add(new cb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.d===l||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)L?h.nodeValue&&c.add(db(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(L?h.nodeValue&&c.add(db(b,h,b.sourceIndex)):c.add(h));return c},m);X("child",function(a,b,c,d,e){return(L?jb:kb).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new P)},m,k);X("descendant",eb,m,k); -X("descendant-or-self",function(a,b,c,d){var e=new P;O(b,c,d)&&a.matches(b)&&e.add(b);return eb(a,b,c,d,e)},m,k);X("following",function(a,b,c,d){var e=new P;do for(var f=b;f=f.nextSibling;)O(f,c,d)&&a.matches(f)&&e.add(f),e=eb(a,f,c,d,e);while(b=b.parentNode);return e},m,k);X("following-sibling",function(a,b){for(var c=new P,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);X("namespace",function(){return new P},m); -X("parent",function(a,b){var c=new P;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);X("preceding",function(a,b,c,d){var e=new P,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,t=f.length;h<t;h++){var F=[];for(b=f[h];b=b.previousSibling;)F.unshift(b);for(var N=0,ea=F.length;N<ea;N++)b=F[N],O(b,c,d)&&a.matches(b)&&e.add(b),e=eb(a,b,c,d,e)}return e},k,k); -X("preceding-sibling",function(a,b){for(var c=new P,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},k);X("self",function(a,b){var c=new P;a.matches(b)&&c.add(b);return c},m);!B&&(!oa||Va("533"));function ub(){return document.activeElement||document.body};function vb(){this.f=g} -function wb(a,b,c){switch(typeof b){case "string":xb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],wb(a,a.f?a.f.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),xb(f, -c),c.push(":"),wb(a,a.f?a.f.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var yb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},zb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function xb(a,b){b.push('"',a.replace(zb,function(a){if(a in yb)return yb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return yb[a]=e+b.toString(16)}),'"')};oa||B||D&&Va(3.5)||C&&Va(8);function Ab(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,Ab);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Bb(a);return b}if("document"in a)return b={},b.WINDOW=Bb(a),b;if(aa(a))return ha(a,Ab);a=xa(a,function(a,b){return"number"==typeof b||r(b)});return ya(a,Ab);default:return l}} -function Cb(a,b){return"array"==q(a)?ha(a,function(a){return Cb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Db(a.ELEMENT,b):"WINDOW"in a?Db(a.WINDOW,b):ya(a,function(a){return Cb(a,b)}):a}function Eb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.h=ca());b.h||(b.h=ca());return b}function Bb(a){var b=Eb(a.ownerDocument),c=za(b,function(b){return b==a});c||(c=":wdc:"+b.h++,b[c]=a);return c} -function Db(a,b){a=decodeURIComponent(a);var c=b||document,d=Eb(c);if(!(a in d))throw new K(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new K(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new K(10,"Element is no longer attached to the DOM");};function Fb(){var a=ub,b=[],c=window||da,d;try{var a=r(a)?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Cb(b,c.document),f=a.apply(l,e);d={status:0,value:Ab(f)}}catch(h){d={status:"code"in h?h.code:13,value:{message:h.message}}}a=[];wb(new vb,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Fb!==g?Z[$]=Fb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){function h(a){return function(){return a}}var k=this; +function l(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var da=Date.now||function(){return+new Date};var ea=window;function n(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",B=e[g]||"",L=RegExp("(\\d*)(\\D*)","g"),aa=RegExp("(\\d*)(\\D*)","g");do{var v=L.exec(p)||["","",""],w=aa.exec(B)||["","",""];if(0==v[0].length&&0==w[0].length)break;c=((0==v[1].length?0:parseInt(v[1],10))<(0==w[1].length?0:parseInt(w[1],10))?-1:(0==v[1].length?0:parseInt(v[1],10))>(0==w[1].length? +0:parseInt(w[1],10))?1:0)||((0==v[2].length)<(0==w[2].length)?-1:(0==v[2].length)>(0==w[2].length)?1:0)||(v[2]<w[2]?-1:v[2]>w[2]?1:0)}while(0==c)}return c};var fa=Array.prototype;function q(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 ga(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 p=f[g];b.call(void 0,p,g,a)&&(d[e++]=p)}return d}function ha(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function ja(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?fa.slice.call(a,b):fa.slice.call(a,b,c)};var r,la,s,ma;function t(){return k.navigator?k.navigator.userAgent:null}ma=s=la=r=!1;var u;if(u=t()){var na=k.navigator;r=0==u.indexOf("Opera");la=!r&&-1!=u.indexOf("MSIE");s=!r&&-1!=u.indexOf("WebKit");ma=!r&&!s&&"Gecko"==na.product}var oa=r,x=la,y=ma,pa=s;function qa(){var a=k.document;return a?a.documentMode:void 0}var z; +a:{var A="",C;if(oa&&k.opera)var ra=k.opera.version,A="function"==typeof ra?ra():ra;else if(y?C=/rv\:([^\);]+)(\)|;)/:x?C=/MSIE\s+([^\);]+)(\)|;)/:pa&&(C=/WebKit\/(\S+)/),C)var sa=C.exec(t()),A=sa?sa[1]:"";if(x){var ta=qa();if(ta>parseFloat(A)){z=String(ta);break a}}z=A}var ua={};function D(a){return ua[a]||(ua[a]=0<=n(z,a))}var va=k.document,E=va&&x?qa()||("CSS1Compat"==va.compatMode?parseInt(z,10):5):void 0;!y&&!x||x&&x&&9<=E||y&&D("1.9.1");x&&D("9");function wa(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function xa(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function ya(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function za(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Aa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!(x&&9<=E)){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?Ba(a,b):!c&&za(e,b)?-1*Ca(a,b):!d&&za(f,a)?Ca(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| +a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Ca(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ba(d,a)}function Ba(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Da,Ea,Fa,Ga,Ha,Ia,Ja;Ja=Ia=Ha=Ga=Fa=Ea=Da=!1;var F=t();F&&(-1!=F.indexOf("Firefox")?Da=!0:-1!=F.indexOf("Camino")?Ea=!0:-1!=F.indexOf("iPhone")||-1!=F.indexOf("iPod")?Fa=!0:-1!=F.indexOf("iPad")?Ga=!0:-1!=F.indexOf("Android")?Ha=!0:-1!=F.indexOf("Chrome")?Ia=!0:-1!=F.indexOf("Safari")&&(Ja=!0));var Ka=Da,La=Ea,Ma=Fa,Na=Ga,G=Ha,Oa=Ia,Pa=Ja;function H(a){return(a=a.exec(t()))?a[1]:""}var Qa=function(){if(Ka)return H(/Firefox\/([0-9.]+)/);if(x||oa)return z;if(Oa)return H(/Chrome\/([0-9.]+)/);if(Pa)return H(/Version\/([0-9.]+)/);if(Ma||Na){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(G)return(a=H(/Android\s+([0-9.]+)/))?a:H(/Version\/([0-9.]+)/);if(La)return H(/Camino\/([0-9.]+)/)}return""}();var Ra,Sa;function Ta(a){Ua?Sa(a):G?n(Va,a):n(Qa,a)}var Ua=function(){if(!y)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Ra=function(a){return 0<=d.m(e,""+a)};Sa=function(a){d.m(f,""+a)};return!0}(),Wa; +if(G){var Xa=/Android\s+([0-9\.]+)/.exec(t());Wa=Xa?Xa[1]:"0"}else Wa="0";var Va=Wa;G&&Ta(2.3);G&&Ta(4);Pa&&Ta(6);function I(a,b){this.code=a;this.state=Ya[a]||Za;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;I.G=a.prototype;I.prototype=new b})(); +var Za="unknown error",Ya={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ya[13]=Za;Ya[9]="unknown command";I.prototype.toString=function(){return this.name+": "+this.message};var J=x&&!(x&&9<=E),$a=x&&!(x&&8<=E);function ab(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.C=e;this.parentNode=b}function bb(a,b,c){var d=$a&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new ab(b,a,b.nodeName,d,c)};function K(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(J&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),J&&"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} +function M(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}$a&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function N(a,b,c,d,e){return(J?cb:db).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new O)} +function cb(a,b,c,d,e){if(8==a.d||c&&null===a.d){var f=b.all;if(!f)return e;a=eb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)M(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)"*"==a&&"!"==b.tagName||e.add(b);return e}fb(a,b,c,d,e);return e} +function db(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){M(a,c,d)&&e.add(a)}));return e} +function gb(a,b,c,d,e){var f;if((8==a.d||c&&null===a.d)&&(f=b.childNodes)){var g=eb(a);if("*"!=g&&(f=ga(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ga(f,function(a){return M(a,c,d)}));q(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return hb(a,b,c,d,e)}function hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)M(b,c,d)&&a.matches(b)&&e.add(b);return e} +function fb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)M(b,c,d)&&a.matches(b)&&e.add(b),fb(a,b,c,d,e)}function eb(a){return a.getName()};function O(){this.b=this.a=null;this.e=0}function ib(a){this.k=a;this.next=this.i=null}O.prototype.unshift=function(a){a=new ib(a);a.next=this.a;this.b?this.a.i=a:this.a=this.b=a;this.a=a;this.e++};O.prototype.add=function(a){a=new ib(a);a.i=this.b;this.a?this.b.next=a:this.a=this.b=a;this.b=a;this.e++};function jb(a){return(a=a.a)?a.k:null}function kb(a){return(a=jb(a))?K(a):""}function P(a,b){this.A=a;this.j=(this.l=b)?a.b:a.a;this.p=null} +P.prototype.next=function(){var a=this.j;if(null==a)return null;var b=this.p=a;this.j=this.l?a.i:a.next;return b.k};function Q(a,b){var c=a.evaluate(b);return c instanceof O?+kb(c):+c}function R(a,b){var c=a.evaluate(b);return c instanceof O?kb(c):""+c}function S(a,b){var c=a.evaluate(b);return c instanceof O?!!c.e:!!c};function T(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof O&&c instanceof O){e=new P(b,!1);for(d=e.next();d;d=e.next())for(b=new P(c,!1),f=b.next();f;f=b.next())if(a(K(d),K(f)))return!0;return!1}if(b instanceof O||c instanceof O){b instanceof O?e=b:(e=c,c=b);e=new P(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+K(d);break;case "boolean":d=!!K(d);break;case "string":d=K(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function lb(a,b,c,d){this.q=a;this.F=b;this.n=c;this.o=d}lb.prototype.toString=function(){return this.q};var mb={};function U(a,b,c,d){if(mb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new lb(a,b,c,d);mb[a.toString()]=a}U("div",6,1,function(a,b,c){return Q(a,c)/Q(b,c)});U("mod",6,1,function(a,b,c){return Q(a,c)%Q(b,c)}); +U("*",6,1,function(a,b,c){return Q(a,c)*Q(b,c)});U("+",5,1,function(a,b,c){return Q(a,c)+Q(b,c)});U("-",5,1,function(a,b,c){return Q(a,c)-Q(b,c)});U("<",4,2,function(a,b,c){return T(function(a,b){return a<b},a,b,c)});U(">",4,2,function(a,b,c){return T(function(a,b){return a>b},a,b,c)});U("<=",4,2,function(a,b,c){return T(function(a,b){return a<=b},a,b,c)});U(">=",4,2,function(a,b,c){return T(function(a,b){return a>=b},a,b,c)});U("=",3,2,function(a,b,c){return T(function(a,b){return a==b},a,b,c,!0)}); +U("!=",3,2,function(a,b,c){return T(function(a,b){return a!=b},a,b,c,!0)});U("and",2,2,function(a,b,c){return S(a,c)&&S(b,c)});U("or",1,2,function(a,b,c){return S(a,c)||S(b,c)});function nb(a,b,c,d,e,f,g,p,B){this.g=a;this.n=b;this.w=c;this.v=d;this.u=e;this.o=f;this.t=g;this.s=void 0!==p?p:g;this.B=!!B}nb.prototype.toString=function(){return this.g};var ob={};function V(a,b,c,d,e,f,g,p){if(ob.hasOwnProperty(a))throw Error("Function already created: "+a+".");ob[a]=new nb(a,b,c,d,!1,e,f,g,p)}V("boolean",2,!1,!1,function(a,b){return S(b,a)},1);V("ceiling",1,!1,!1,function(a,b){return Math.ceil(Q(b,a))},1); +V("concat",3,!1,!1,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+R(c,a)})},2,null);V("contains",2,!1,!1,function(a,b,c){b=R(b,a);a=R(c,a);return-1!=b.indexOf(a)},2);V("count",1,!1,!1,function(a,b){return b.evaluate(a).e},1,1,!0);V("false",2,!1,!1,h(!1),0);V("floor",1,!1,!1,function(a,b){return Math.floor(Q(b,a))},1); +V("id",4,!1,!1,function(a,b){function c(a){if(J){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=R(b,a).split(/\s+/),f=[];q(d,function(a){a=c(a);var b;if(!(b=!a)){a:if(m(f))b=m(a)&&1==a.length?f.indexOf(a,0):-1;else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=0<=b}b||f.push(a)});f.sort(Aa);var g=new O;q(f,function(a){g.add(a)});return g},1); +V("lang",2,!1,!1,h(!1),1);V("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.b},0);V("local-name",3,!1,!0,function(a,b){var c=b?jb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,!0);V("name",3,!1,!0,function(a,b){var c=b?jb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,!0);V("namespace-uri",3,!0,!1,h(""),0,1,!0); +V("normalize-space",3,!1,!0,function(a,b){return(b?R(b,a):K(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);V("not",2,!1,!1,function(a,b){return!S(b,a)},1);V("number",1,!1,!0,function(a,b){return b?Q(b,a):+K(a.c)},0,1);V("position",1,!0,!1,function(a){return a.D},0);V("round",1,!1,!1,function(a,b){return Math.round(Q(b,a))},1);V("starts-with",2,!1,!1,function(a,b,c){b=R(b,a);a=R(c,a);return 0==b.lastIndexOf(a,0)},2);V("string",3,!1,!0,function(a,b){return b?R(b,a):K(a.c)},0,1); +V("string-length",1,!1,!0,function(a,b){return(b?R(b,a):K(a.c)).length},0,1);V("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);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);V("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); +V("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);V("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new P(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,!0);V("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);V("true",2,!1,!1,h(!0),0);function pb(a,b,c,d){this.g=a;this.r=b;this.l=c;this.H=d}pb.prototype.toString=function(){return this.g};var qb={};function W(a,b,c,d){if(qb.hasOwnProperty(a))throw Error("Axis already created: "+a);qb[a]=new pb(a,b,c,!!d)}W("ancestor",function(a,b){for(var c=new O,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);W("ancestor-or-self",function(a,b){var c=new O,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +W("attribute",function(a,b){var c=new O,d=a.getName();if("style"==d&&b.style&&J)return c.add(new ab(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)J?g.nodeValue&&c.add(bb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(J?g.nodeValue&&c.add(bb(b,g,b.sourceIndex)):c.add(g));return c},!1);W("child",function(a,b,c,d,e){return(J?gb:hb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new O)},!1,!0);W("descendant",N,!1,!0); +W("descendant-or-self",function(a,b,c,d){var e=new O;M(b,c,d)&&a.matches(b)&&e.add(b);return N(a,b,c,d,e)},!1,!0);W("following",function(a,b,c,d){var e=new O;do for(var f=b;f=f.nextSibling;)M(f,c,d)&&a.matches(f)&&e.add(f),e=N(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);W("following-sibling",function(a,b){for(var c=new O,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);W("namespace",function(){return new O},!1); +W("parent",function(a,b){var c=new O;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);W("preceding",function(a,b,c,d){var e=new O,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var B=[];for(b=f[g];b=b.previousSibling;)B.unshift(b);for(var L=0,aa=B.length;L<aa;L++)b=B[L],M(b,c,d)&&a.matches(b)&&e.add(b),e=N(a,b,c,d,e)}return e},!0,!0); +W("preceding-sibling",function(a,b){for(var c=new O,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);W("self",function(a,b){var c=new O;a.matches(b)&&c.add(b);return c},!1);function rb(){return document.activeElement||document.body};function sb(){this.f=void 0} +function tb(a,b,c){switch(typeof b){case "string":ub(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==l(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],tb(a,a.f?a.f.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +ub(f,c),c.push(":"),tb(a,a.f?a.f.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var vb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},wb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function ub(a,b){b.push('"',a.replace(wb,function(a){if(a in vb)return vb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return vb[a]=e+b.toString(16)}),'"')};pa||oa||y&&(Ua?Ra(3.5):x?0<=n(E,3.5):D(3.5))||x&&(Ua?Ra(8):x?n(E,8):D(8));function X(a){switch(l(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=xb(a);return b}if("document"in a)return b={},b.WINDOW=xb(a),b;if(ba(a))return ha(a,X);a=wa(a,function(a,b){return"number"==typeof b||m(b)});return xa(a,X);default:return null}} +function yb(a,b){return"array"==l(a)?ha(a,function(a){return yb(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?zb(a.ELEMENT,b):"WINDOW"in a?zb(a.WINDOW,b):xa(a,function(a){return yb(a,b)}):a}function Ab(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.h=da());b.h||(b.h=da());return b}function xb(a){var b=Ab(a.ownerDocument),c=ya(b,function(b){return b==a});c||(c=":wdc:"+b.h++,b[c]=a);return c} +function zb(a,b){a=decodeURIComponent(a);var c=b||document,d=Ab(c);if(!(a in d))throw new I(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new I(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new I(10,"Element is no longer attached to the DOM");};function Bb(){var a=rb,b=[],c=window||ea,d;try{var a=m(a)?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=yb(b,c.document),f=a.apply(null,e);d={status:0,value:X(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}a=[];tb(new sb,d,a);return a.join("")}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Bb?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Bb;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/clear.js b/src/ghostdriver/third_party/webdriver-atoms/clear.js index 209d97c31..b305a6dd0 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/clear.js +++ b/src/ghostdriver/third_party/webdriver-atoms/clear.js @@ -1,121 +1,133 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r,s=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function u(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function w(a){return"string"==typeof a}function fa(a){return"function"==ba(a)}function ga(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}var ha="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ia=0,ja=Date.now||function(){return+new Date}; -function x(a,b){function c(){}c.prototype=b.prototype;a.Na=b.prototype;a.prototype=new c;a.prototype.constructor=a};var ka=window;function la(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ma(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function na(a,b){for(var c=0,d=ma(String(a)).split("."),e=ma(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",v=e[g]||"",t=RegExp("(\\d*)(\\D*)","g"),M=RegExp("(\\d*)(\\D*)","g");do{var da=t.exec(p)||["","",""],ea=M.exec(v)||["","",""];if(0==da[0].length&&0==ea[0].length)break;c=((0==da[1].length?0:parseInt(da[1],10))<(0==ea[1].length?0:parseInt(ea[1],10))?-1:(0==da[1].length?0:parseInt(da[1],10))>(0==ea[1].length?0:parseInt(ea[1],10))?1:0)||((0==da[2].length)< -(0==ea[2].length)?-1:(0==da[2].length)>(0==ea[2].length)?1:0)||(da[2]<ea[2]?-1:da[2]>ea[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function y(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=w(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=w(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;y(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function ta(a,b){for(var c=a.length,d=w(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function ua(a,b){var c;a:{c=a.length;for(var d=w(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:w(a)?a.charAt(c):a[c]}function va(a,b){var c;a:if(w(a))c=!w(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function wa(a){return pa.concat.apply(pa,arguments)} -function xa(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var ya={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", +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var l,m=this; +function ca(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ha="closure_uid_"+(1E9*Math.random()>>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)} +function ka(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)}}function la(a,b,c){la=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ja:ka;return la.apply(null,arguments)} +function ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var na=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c;a.prototype.constructor=a};var oa=window;function pa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function qa(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} +function ra(a,b){for(var c=0,d=qa(String(a)).split("."),e=qa(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",x=RegExp("(\\d*)(\\D*)","g"),T=RegExp("(\\d*)(\\D*)","g");do{var u=x.exec(k)||["","",""],q=T.exec(r)||["","",""];if(0==u[0].length&&0==q[0].length)break;c=((0==u[1].length?0:parseInt(u[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==u[1].length?0:parseInt(u[1],10))>(0==q[1].length?0:parseInt(q[1],10))?1:0)||((0==u[2].length)<(0==q[2].length)? +-1:(0==u[2].length)>(0==q[2].length)?1:0)||(u[2]<q[2]?-1:u[2]>q[2]?1:0)}while(0==c)}return c}function sa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ta=Array.prototype;function t(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function ua(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function va(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function wa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function xa(a,b){for(var c=a.length,d=p(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 ya(a,b){for(var c=a.length,d=p(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 za(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function Aa(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function Ba(a){return ta.concat.apply(ta,arguments)}function Ca(a,b,c){return 2>=arguments.length?ta.slice.call(a,b):ta.slice.call(a,b,c)};var Da={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var za="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Aa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Ba(a){Ca.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Aa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Ea(a){var b=a.match(Da);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Fa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ga(a){var b=a.match(Fa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function z(a,b){this.code=a;this.state=Ha[a]||Ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}x(z,Error); -var Ia="unknown error",Ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ha[13]=Ia;Ha[9]="unknown command";z.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa,Pa;function Qa(){return s.navigator?s.navigator.userAgent:m}Na=Ma=La=Ka=Ja=n;var Ra;if(Ra=Qa()){var Sa=s.navigator;Ja=0==Ra.indexOf("Opera");Ka=!Ja&&-1!=Ra.indexOf("MSIE");Ma=(La=!Ja&&-1!=Ra.indexOf("WebKit"))&&-1!=Ra.indexOf("Mobile");Na=!Ja&&!La&&"Gecko"==Sa.product}var A=Ja,B=Ka,C=Na,D=La,Ta=Ma,Ua,Va=s.navigator;Ua=Va&&Va.platform||"";Oa=-1!=Ua.indexOf("Mac");Pa=-1!=Ua.indexOf("Win");var Wa=-1!=Ua.indexOf("Linux");function Xa(){var a=s.document;return a?a.documentMode:k}var Ya; -a:{var Za="",$a;if(A&&s.opera)var ab=s.opera.version,Za="function"==typeof ab?ab():ab;else if(C?$a=/rv\:([^\);]+)(\)|;)/:B?$a=/MSIE\s+([^\);]+)(\)|;)/:D&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Qa()),Za=bb?bb[1]:"";if(B){var cb=Xa();if(cb>parseFloat(Za)){Ya=String(cb);break a}}Ya=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Ya,a))}function fb(a){return B&&gb>=a}var hb=s.document,gb=!hb||!B?k:Xa()||("CSS1Compat"==hb.compatMode?parseInt(Ya,10):5);var ib;!C&&!B||B&&fb(9)||C&&eb("1.9.1");B&&eb("9");var jb=B||A||D;function kb(a,b){this.x=u(a)?a:0;this.y=u(b)?b:0}kb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function lb(a,b){this.width=a;this.height=b}r=lb.prototype;r.toString=function(){return"("+this.width+" x "+this.height+")"};r.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};r.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};r.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};r.scale=function(a){this.width*=a;this.height*=a;return this};function mb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function nb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function ob(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function pb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var qb=3;function E(a){return a?new rb(F(a)):ib||(ib=new rb)}function sb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function tb(a){if(jb)return a.parentElement;a=a.parentNode;return ga(a)&&1==a.nodeType?a:m}function ub(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function vb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!fb(9)){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?wb(a,b):!c&&ub(e,b)?-1*xb(a,b):!d&&ub(f,a)?xb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(s.Range.START_TO_END,d)}function xb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return wb(d,a)}function wb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function yb(a,b){var c=[];return zb(a,b,c,l)?c[0]:k} -function zb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||zb(a,b,c,d))return l;a=a.nextSibling}return n}var Ab={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Bb={IMG:" ",BR:"\n"};function Cb(a,b,c){if(!(a.nodeName in Ab))if(a.nodeType==qb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Bb)b.push(Bb[a.nodeName]);else for(a=a.firstChild;a;)Cb(a,b,c),a=a.nextSibling} -function Db(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function Eb(a){try{return a&&a.activeElement}catch(b){}return m}function rb(a){this.P=a||s.document||document}rb.prototype.e=function(a){return w(a)?this.P.getElementById(a):a}; -function Fb(a,b,c,d){a=d||a.P;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&va(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function Gb(a){var b=a.P;a=!D&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new kb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}rb.prototype.contains=ub;var Hb,Ib,Jb,Kb,Lb,Mb,Nb;Nb=Mb=Lb=Kb=Jb=Ib=Hb=n;var Ob=Qa();Ob&&(-1!=Ob.indexOf("Firefox")?Hb=l:-1!=Ob.indexOf("Camino")?Ib=l:-1!=Ob.indexOf("iPhone")||-1!=Ob.indexOf("iPod")?Jb=l:-1!=Ob.indexOf("iPad")?Kb=l:-1!=Ob.indexOf("Android")?Lb=l:-1!=Ob.indexOf("Chrome")?Mb=l:-1!=Ob.indexOf("Safari")&&(Nb=l));var Pb=Hb,Qb=Ib,Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb,Vb=Nb;function Wb(a,b,c){this.i=a;this.Ja=b||1;this.r=c||1};var Xb=B&&!fb(9),Yb=B&&!fb(8);function Zb(a,b,c,d,e){this.i=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ma=e;this.parentNode=b}function $b(a,b,c){var d=Yb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Zb(b,a,b.nodeName,d,c)};function ac(a){this.fa=a;this.R=0}function bc(a){a=a.match(cc);for(var b=0;b<a.length;b++)dc.test(a[b])&&a.splice(b,1);return new ac(a)}var cc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),dc=/^\s/;function G(a,b){return a.fa[a.R+(b||0)]}ac.prototype.next=function(){return this.fa[this.R++]};ac.prototype.back=function(){this.R--};ac.prototype.empty=function(){return this.fa.length<=this.R};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Xb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Xb&&"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} -function ec(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Yb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function fc(a,b,c,d,e){return(Xb?gc:hc).call(m,a,b,w(c)?c:m,w(d)?d:m,e||new I)} -function gc(a,b,c,d,e){if(a instanceof ic||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=jc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)ec(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}kc(a,b,c,d,e);return e} -function hc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),y(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),y(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof lc?kc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),y(b,function(a){ec(a,c,d)&&e.add(a)}));return e} -function mc(a,b,c,d,e){var f;if((a instanceof ic||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=jc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return ec(a,c,d)}));y(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return nc(a,b,c,d,e)}function nc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)ec(b,c,d)&&a.matches(b)&&e.add(b);return e} -function kc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)ec(b,c,d)&&a.matches(b)&&e.add(b),kc(a,b,c,d,e)}function jc(a){if(a instanceof lc){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function I(){this.r=this.m=m;this.M=0}function oc(a){this.v=a;this.next=this.F=m}function pc(a,b){if(a.m){if(!b.m)return a}else return b;for(var c=a.m,d=b.m,e=m,f=m,g=0;c&&d;)c.v==d.v||c.v instanceof Zb&&d.v instanceof Zb&&c.v.i==d.v.i?(f=c,c=c.next,d=d.next):0<vb(c.v,d.v)?(f=d,d=d.next):(f=c,c=c.next),(f.F=e)?e.next=f:a.m=f,e=f,g++;for(f=c||d;f;)f.F=e,e=e.next=f,g++,f=f.next;a.r=e;a.M=g;return a} -I.prototype.unshift=function(a){a=new oc(a);a.next=this.m;this.r?this.m.F=a:this.m=this.r=a;this.m=a;this.M++};I.prototype.add=function(a){a=new oc(a);a.F=this.r;this.m?this.r.next=a:this.m=this.r=a;this.r=a;this.M++};function qc(a){return(a=a.m)?a.v:m}I.prototype.w=q("M");function rc(a){return(a=qc(a))?H(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.Ga=a;this.ha=(this.G=b)?a.r:a.m;this.aa=m} -tc.prototype.next=function(){var a=this.ha;if(a==m)return m;var b=this.aa=a;this.ha=this.G?a.F:a.next;return b.v};tc.prototype.remove=function(){var a=this.Ga,b=this.aa;b||h(Error("Next must be called at least once before remove."));var c=b.F,b=b.next;c?c.next=b:a.m=b;b?b.F=c:a.r=c;a.M--;this.aa=m};function J(a){this.l=a;this.o=this.z=n;this.N=m}J.prototype.j=q("z");function uc(a,b){a.z=b}function vc(a,b){a.o=b}J.prototype.B=q("N");function K(a,b){var c=a.evaluate(b);return c instanceof I?+rc(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof I?rc(c):""+c}function wc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.w():!!c};function xc(a,b,c){J.call(this,a.l);this.da=a;this.ma=b;this.ta=c;this.z=b.j()||c.j();this.o=b.o||c.o;this.da==yc&&(!c.o&&!c.j()&&4!=c.l&&0!=c.l&&b.B()?this.N={name:b.B().name,H:c}:!b.o&&(!b.j()&&4!=b.l&&0!=b.l&&c.B())&&(this.N={name:c.B().name,H:b}))}x(xc,J); -function zc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=sc(b);for(b=f.next();b;b=f.next()){e=sc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=sc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}xc.prototype.evaluate=function(a){return this.da.u(this.ma,this.ta,a)};xc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.da+"\n";a+=" ";b+=this.ma.toString(a)+"\n";return b+=this.ta.toString(a)};function Ac(a,b,c,d){this.Ia=a;this.ra=b;this.l=c;this.u=d}Ac.prototype.toString=q("Ia");var Bc={}; -function N(a,b,c,d){a in Bc&&h(Error("Binary operator already created: "+a));a=new Ac(a,b,c,d);return Bc[a.toString()]=a}N("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});N("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)});N("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});N("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});N("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});N("<",4,2,function(a,b,c){return zc(function(a,b){return a<b},a,b,c)}); -N(">",4,2,function(a,b,c){return zc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return zc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return zc(function(a,b){return a>=b},a,b,c)});var yc=N("=",3,2,function(a,b,c){return zc(function(a,b){return a==b},a,b,c,l)});N("!=",3,2,function(a,b,c){return zc(function(a,b){return a!=b},a,b,c,l)});N("and",2,2,function(a,b,c){return wc(a,c)&&wc(b,c)});N("or",1,2,function(a,b,c){return wc(a,c)||wc(b,c)});function Cc(a,b){b.w()&&4!=a.l&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));J.call(this,a.l);this.sa=a;this.g=b;this.z=a.j();this.o=a.o}x(Cc,J);Cc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return Dc(this.g,a)};Cc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.sa.toString(a);return b+=this.g.toString(a)};function Ec(a,b){b.length<a.pa&&h(Error("Function "+a.p+" expects at least"+a.pa+" arguments, "+b.length+" given"));a.ba!==m&&b.length>a.ba&&h(Error("Function "+a.p+" expects at most "+a.ba+" arguments, "+b.length+" given"));a.Ha&&y(b,function(b,d){4!=b.l&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});J.call(this,a.l);this.Q=a;this.X=b;uc(this,a.z||ta(b,function(a){return a.j()}));vc(this,a.Fa&&!b.length||a.Ea&&!!b.length||ta(b,function(a){return a.o}))}x(Ec,J); -Ec.prototype.evaluate=function(a){return this.Q.u.apply(m,wa(a,this.X))};Ec.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.Q+"\n";b+=" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=sa(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Fc(a,b,c,d,e,f,g,p,v){this.p=a;this.l=b;this.z=c;this.Fa=d;this.Ea=e;this.u=f;this.pa=g;this.ba=u(p)?p:g;this.Ha=!!v}Fc.prototype.toString=q("p");var Gc={}; -function O(a,b,c,d,e,f,g,p){a in Gc&&h(Error("Function already created: "+a+"."));Gc[a]=new Fc(a,b,c,d,n,e,f,g,p)}O("boolean",2,n,n,function(a,b){return wc(b,a)},1);O("ceiling",1,n,n,function(a,b){return Math.ceil(K(b,a))},1);O("concat",3,n,n,function(a,b){var c=xa(arguments,1);return sa(c,function(b,c){return b+L(c,a)},"")},2,m);O("contains",2,n,n,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);O("count",1,n,n,function(a,b){return b.evaluate(a).w()},1,1,l);O("false",2,n,n,aa(n),0); -O("floor",1,n,n,function(a,b){return Math.floor(K(b,a))},1);O("id",4,n,n,function(a,b){function c(a){if(Xb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ua(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.i,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];y(d,function(a){(a=c(a))&&!va(f,a)&&f.push(a)});f.sort(vb);var g=new I;y(f,function(a){g.add(a)});return g},1);O("lang",2,n,n,aa(n),1); -O("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.r},0);O("local-name",3,n,l,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,l);O("name",3,n,l,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,l);O("namespace-uri",3,l,n,aa(""),0,1,l);O("normalize-space",3,n,l,function(a,b){return(b?L(b,a):H(a.i)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -O("not",2,n,n,function(a,b){return!wc(b,a)},1);O("number",1,n,l,function(a,b){return b?K(b,a):+H(a.i)},0,1);O("position",1,l,n,function(a){return a.Ja},0);O("round",1,n,n,function(a,b){return Math.round(K(b,a))},1);O("starts-with",2,n,n,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,n,l,function(a,b){return b?L(b,a):H(a.i)},0,1);O("string-length",1,n,l,function(a,b){return(b?L(b,a):H(a.i)).length},0,1); -O("substring",3,n,n,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,n,n,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -O("substring-before",3,n,n,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,n,n,function(a,b){for(var c=sc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);O("translate",3,n,n,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(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);O("true",2,n,n,aa(l),0);function lc(a,b){this.xa=a;this.na=u(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=qb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Hc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}lc.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};lc.prototype.getName=q("xa"); -lc.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.xa;this.na===m||(b+="\n"+this.na.toString(a+" "));return b};function Ic(a){J.call(this,3);this.wa=a.substring(1,a.length-1)}x(Ic,J);Ic.prototype.evaluate=q("wa");Ic.prototype.toString=function(a){return(a||"")+"literal: "+this.wa};function ic(a){this.p=a.toLowerCase()}ic.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.p||this.p==a.nodeName.toLowerCase()?l:this.p==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};ic.prototype.getName=q("p");ic.prototype.toString=function(a){return(a||"")+"nametest: "+this.p};function Jc(a){J.call(this,1);this.ya=a}x(Jc,J);Jc.prototype.evaluate=q("ya");Jc.prototype.toString=function(a){return(a||"")+"number: "+this.ya};function Kc(a,b){J.call(this,a.l);this.ja=a;this.O=b;this.z=a.j();this.o=a.o;if(1==this.O.length){var c=this.O[0];!c.Z&&c.A==Lc&&(c=c.V,"*"!=c.getName()&&(this.N={name:c.getName(),H:m}))}}x(Kc,J);function Mc(){J.call(this,4)}x(Mc,J);Mc.prototype.evaluate=function(a){var b=new I;a=a.i;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Mc.prototype.toString=function(a){return a+"RootHelperExpr"};function Nc(){J.call(this,4)}x(Nc,J);Nc.prototype.evaluate=function(a){var b=new I;b.add(a.i);return b}; -Nc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Kc.prototype.evaluate=function(a){var b=this.ja.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.O;for(var c=0,d=a.length;c<d&&b.w();c++){var e=a[c],f=sc(b,e.A.G),g;if(!e.j()&&e.A==Oc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Wb(g))}else if(!e.j()&&e.A==Pc)g=f.next(),b=e.evaluate(new Wb(g));else{g=f.next();for(b=e.evaluate(new Wb(g));(g=f.next())!=m;)g=e.evaluate(new Wb(g)),b=pc(b,g)}}return b}; -Kc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ja.toString(b);this.O.length&&(c+=b+"Steps:\n",b+=" ",y(this.O,function(a){c+=a.toString(b)}));return c};function Qc(a,b){this.g=a;this.G=!!b}function Dc(a,b,c){for(c=c||0;c<a.g.length;c++)for(var d=a.g[c],e=sc(b),f=b.w(),g,p=0;g=e.next();p++){var v=a.G?f-p:p+1;g=d.evaluate(new Wb(g,v,f));var t;"number"==typeof g?t=v==g:"string"==typeof g||"boolean"==typeof g?t=!!g:g instanceof I?t=0<g.w():h(Error("Predicate.evaluate returned an unexpected type."));t||e.remove()}return b}Qc.prototype.B=function(){return 0<this.g.length?this.g[0].B():m}; -Qc.prototype.j=function(){for(var a=0;a<this.g.length;a++){var b=this.g[a];if(b.j()||1==b.l||0==b.l)return l}return n};Qc.prototype.w=function(){return this.g.length};Qc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return sa(this.g,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Rc(a,b,c,d){J.call(this,4);this.A=a;this.V=b;this.g=c||new Qc([]);this.Z=!!d;b=this.g.B();a.La&&b&&(a=b.name,a=Xb?a.toLowerCase():a,this.N={name:a,H:b.H});this.z=this.g.j()}x(Rc,J); -Rc.prototype.evaluate=function(a){var b=a.i,c=m,c=this.B(),d=m,e=m,f=0;c&&(d=c.name,e=c.H?L(c.H,a):m,f=1);if(this.Z)if(!this.j()&&this.A==Sc)c=fc(this.V,b,d,e),c=Dc(this.g,c,f);else if(a=sc((new Rc(Tc,new lc("node"))).evaluate(a)),b=a.next())for(c=this.u(b,d,e,f);(b=a.next())!=m;)c=pc(c,this.u(b,d,e,f));else c=new I;else c=this.u(a.i,d,e,f);return c};Rc.prototype.u=function(a,b,c,d){a=this.A.Q(this.V,a,b,c);return a=Dc(this.g,a,d)}; -Rc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.Z?"//":"/")+"\n";this.A.p&&(b+=a+"Axis: "+this.A+"\n");b+=this.V.toString(a);if(this.g.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.g.length;c++)var d=c<this.g.length-1?", ":"",b=b+(this.g[c].toString(a)+d);return b};function Uc(a,b,c,d){this.p=a;this.Q=b;this.G=c;this.La=d}Uc.prototype.toString=q("p");var Vc={}; -function P(a,b,c,d){a in Vc&&h(Error("Axis already created: "+a));b=new Uc(a,b,c,!!d);return Vc[a]=b}P("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);P("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Lc=P("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Xb)return c.add(new Zb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof lc&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Xb?g.nodeValue&&c.add($b(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Xb?g.nodeValue&&c.add($b(b,g,b.sourceIndex)):c.add(g));return c},n),Sc=P("child",function(a,b,c,d,e){return(Xb?mc:nc).call(m,a,b,w(c)?c:m,w(d)?d:m,e||new I)},n,l); -P("descendant",fc,n,l);var Tc=P("descendant-or-self",function(a,b,c,d){var e=new I;ec(b,c,d)&&a.matches(b)&&e.add(b);return fc(a,b,c,d,e)},n,l),Oc=P("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)ec(f,c,d)&&a.matches(f)&&e.add(f),e=fc(a,f,c,d,e);while(b=b.parentNode);return e},n,l);P("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);P("namespace",function(){return new I},n); -var Wc=P("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Pc=P("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var t=0,M=v.length;t<M;t++)b=v[t],ec(b,c,d)&&a.matches(b)&&e.add(b),e=fc(a,b,c,d,e)}return e},l,l); -P("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Xc=P("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Yc(a){J.call(this,1);this.ia=a;this.z=a.j();this.o=a.o}x(Yc,J);Yc.prototype.evaluate=function(a){return-K(this.ia,a)};Yc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ia.toString(a+" ")};function Zc(a){J.call(this,4);this.S=a;uc(this,ta(this.S,function(a){return a.j()}));vc(this,ta(this.S,function(a){return a.o}))}x(Zc,J);Zc.prototype.evaluate=function(a){var b=new I;y(this.S,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=pc(b,c)});return b};Zc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";y(this.S,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function $c(a){this.a=a}function ad(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=bd(a);var d=a.a.next();if(!d)break;var e=(d=Bc[d]||m)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new xc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new xc(c.pop(),c.pop(),b);return b}function Q(a,b){a.a.empty()&&h(Error(b))}function cd(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function dd(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function ed(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Ic(a)}function fd(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new ic(a.a.next()+a.a.next()+a.a.next()):new ic(a.a.next())} -function gd(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Mc;d=new Mc;Q(a,"Missing next location step.");b=hd(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=ad(a);Q(a,'unclosed "("');cd(a,")");break;case '"':case "'":b=ed(a);break;default:if(isNaN(+b))if(!Hc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=Gc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){Q(a,"Missing function argument list.");d.push(ad(a));if(","!=G(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");dd(a);b=new Ec(b,d)}else{b=m;break a}else b=new Jc(+a.a.next())}"["==G(a.a)&&(d=new Qc(id(a)),b=new Cc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=hd(a,"/"),d=new Nc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=hd(a,b),c.push(b);return new Kc(d, -c)} -function hd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Rc(Xc,new lc("node")),a.a.next(),d;if(".."==G(a.a))return d=new Rc(Wc,new lc("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Lc,a.a.next(),Q(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Vc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),Q(a,"Missing node name")):f=Sc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){Hc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Hc(c)||h(Error("Invalid type name: "+c));cd(a,"(");Q(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=ed(a);Q(a,"Bad nodetype");dd(a);c=new lc(c,g)}else c=fd(a);else"*"==e?c=fd(a):h(Error("Bad token: "+a.a.next()));e=new Qc(id(a),f.G);return d||new Rc(f,c,e,"//"==b)} -function id(a){for(var b=[];"["==G(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=ad(a);b.push(c);Q(a,"Unclosed predicate expression.");cd(a,"]")}return b}function bd(a){if("-"==G(a.a))return a.a.next(),new Yc(bd(a));var b=gd(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push(gd(a));a.a.back();a=new Zc(b)}return a};function jd(a){a.length||h(Error("Empty XPath expression."));a=bc(a);a.empty()&&h(Error("Invalid XPath expression."));var b=ad(new $c(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Wb(a));return new R(e,d)}} -function R(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?rc(a):""+a;break;case 1:this.numberValue=a instanceof I?+rc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.w():!!a;break;case 4:case 5:case 6:case 7:var d=sc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Zb?e.i:e);this.snapshotLength=a.w();this.invalidIteratorState=n;break;case 8:case 9:d=qc(a);this.singleNodeValue=d instanceof Zb?d.i:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function kd(a){a=a||s;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new jd(a)).evaluate(b,f)},b.createExpression=function(a){return new jd(a)})};var S={};S.Aa=function(){var a={Oa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();S.u=function(a,b,c){var d=F(a);(B||Tb)&&kd(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.Aa;return B&&!eb(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){C&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new z(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -S.Y=function(a,b){(!a||1!=a.nodeType)&&h(new z(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};S.C=function(a,b){var c=function(){var c=S.u(b,a,9);return c?(c=c.singleNodeValue,A?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||S.Y(c,a);return c}; -S.s=function(a,b){var c=function(){var c=S.u(b,a,7);if(c){var e=c.snapshotLength;A&&!u(e)&&S.Y(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();y(c,function(b){S.Y(b,a)});return c};function ld(a){return(a=a.exec(Qa()))?a[1]:""}var md=function(){if(Pb)return ld(/Firefox\/([0-9.]+)/);if(B||A)return Ya;if(Ub)return ld(/Chrome\/([0-9.]+)/);if(Vb)return ld(/Version\/([0-9.]+)/);if(Rb||Sb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Qa());if(a)return a[1]+"."+a[2]}else{if(Tb)return(a=ld(/Android\s+([0-9.]+)/))?a:ld(/Version\/([0-9.]+)/);if(Qb)return ld(/Camino\/([0-9.]+)/)}return""}();var nd,od;function T(a){return pd?nd(a):B?0<=na(gb,a):eb(a)}function qd(a){return pd?od(a):Tb?0<=na(rd,a):0<=na(md,a)} -var pd=function(){if(!C)return n;var a=s.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;nd=function(a){return 0<=d.Ba(e,""+a)};od=function(a){return 0<=d.Ba(f,""+a)};return l}(),sd=Sb||Rb,td;if(Tb){var ud=/Android\s+([0-9\.]+)/.exec(Qa());td=ud?ud[1]:"0"}else td="0"; -var rd=td,vd=B&&!fb(8),wd=B&&!fb(9),xd=B&&!fb(10);Tb&&qd(2.3);!A&&(!D||T("533"));function yd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function zd(a,b){return yd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function Ad(a){var b=a.getBoundingClientRect();B&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function Bd(a){if(B&&!fb(8))return a.offsetParent;var b=F(a),c=zd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=zd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function Cd(a){var b=new kb;if(1==a.nodeType){if(a.getBoundingClientRect){var c=Ad(a);b.x=c.left;b.y=c.top}else{c=Gb(E(a));var d,e=F(a),f=zd(a,"position"),g=C&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),p=new kb(0,0),v;d=e?F(e):document;if(v=B)if(v=!fb(9))v="CSS1Compat"!=E(d).P.compatMode;v=v?d.body:d.documentElement;if(a!=v)if(a.getBoundingClientRect)d=Ad(a),e=Gb(E(e)),p.x=d.left+e.x,p.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(v),p.x=d.screenX-e.screenX,p.y=d.screenY-e.screenY;else{g=a;do{p.x+=g.offsetLeft;p.y+=g.offsetTop;g!=a&&(p.x+=g.clientLeft||0,p.y+=g.clientTop||0);if(D&&"fixed"==zd(g,"position")){p.x+=e.body.scrollLeft;p.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(A||D&&"absolute"==f)p.y-=e.body.offsetTop;for(g=a;(g=Bd(g))&&g!=e.body&&g!=v;)if(p.x-=g.scrollLeft,!A||"TR"!=g.tagName)p.y-=g.scrollTop}b.x=p.x-c.x;b.y=p.y-c.y}if(C&&!eb(12)){var t;B?t="-ms-transform": -D?t="-webkit-transform":A?t="-o-transform":C&&(t="-moz-transform");var M;t&&(M=zd(a,t));M||(M=zd(a,"transform"));M?(a=M.match(Dd),a=!a?new kb(0,0):new kb(parseFloat(a[1]),parseFloat(a[2]))):a=new kb(0,0);b=new kb(b.x+a.x,b.y+a.y)}}else t=fa(a.ka),M=a,a.targetTouches?M=a.targetTouches[0]:t&&a.ka().targetTouches&&(M=a.ka().targetTouches[0]),b.x=M.clientX,b.y=M.clientY;return b} -function Ed(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(!u(b)||d)&&a.getBoundingClientRect?(a=Ad(a),new lb(a.right-a.left,a.bottom-a.top)):new lb(b,c)}var Dd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Fd(a,b){var c;if(c=vd)if(c="value"==b)if(c=U(a,"OPTION"))c=Gd(a,"value")===m;c?(c=[],Cb(a,c,n),c=c.join("")):c=a[b];return c}var Hd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Id(a){var b=[];y(a.split(Hd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return A?b.replace(/\w+:;/g,""):b}function Gd(a,b){b=b.toLowerCase();if("style"==b)return Id(a.style.cssText);if(vd&&"value"==b&&U(a,"INPUT"))return a.value;if(wd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Jd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Kd(a){var b=a.tagName.toUpperCase();return!va(Jd,b)?l:Fd(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Kd(a.parentNode):Db(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&Fd(b,"disabled")){if(!U(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:sb(a.previousSibling);)if(U(a,"LEGEND"))return l}return n},l)?n:l}var Ld="text search tel url email password number".split(" "); -function Md(a){function b(a){return"inherit"==a.contentEditable?(a=Nd(a))?b(a):n:"true"==a.contentEditable}return!u(a.contentEditable)?n:!B&&u(a.isContentEditable)?a.isContentEditable:b(a)}function Od(a){return(U(a,"TEXTAREA")?l:U(a,"INPUT")?va(Ld,a.type.toLowerCase()):Md(a)?l:n)&&!Fd(a,"readOnly")}function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:m} -function V(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=wd?"styleFloat":"cssFloat";c=yd(a,c)||Pd(a,c);if(c===m)c=m;else if(va(za,b)&&(Ca.test("#"==c.charAt(0)?c:"#"+c)||Ga(c).length||ya&&ya[c.toLowerCase()]||Ea(c).length)){var d=Ea(c);if(!d.length){a:if(d=Ga(c),!d.length){d=ya[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Ca.test(d)&&(d=Ba(d),d=Ba(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!u(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?u(d)?d:m:(c=Nd(a))?Pd(c,b):m} -function Qd(a){if(fa(a.getBBox)&&!U(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,"BODY")){b=(F(a)?F(a).parentWindow||F(a).defaultView:window)||k;"hidden"!=V(a,"overflow")?a=l:(a=Nd(a),!a||!U(a,"HTML")?a=l:(a=V(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ka).document;a=b.documentElement;var d=b.body;d||h(new z(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new lb(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new lb(a.clientWidth,a.clientHeight);return a}if("none"!=zd(a,"display"))a=Ed(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Ed(a);b.display=d;b.position=f;b.visibility=e}return a} -function Rd(a,b){function c(a){if("none"==V(a,"display"))return n;a=Nd(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?l:U(a,"PATH")&&(0<b.height||0<b.width)?(b=V(a,"stroke-width"),!!b&&0<parseInt(b,10)):ta(a.childNodes,function(b){return b.nodeType==qb&&"hidden"!=V(a,"overflow")||U(b)&&d(b)})}function e(a,b){var c;if((c=b==m?tb(a):tb(b))&&("hidden"==V(c,"overflow-x")||"hidden"==V(c,"overflow-y"))){var d=Qd(c),f=Cd(c),g=Cd(a);return f.x+d.width<=g.x&&"hidden"==V(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==V(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=V(a,"-o-transform")||V(a,"-webkit-transform")||V(a,"-ms-transform")||V(a,"-moz-transform")||V(a,"transform");if(b&&"none"!==b)return b=Cd(a),a=Qd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Nd(a);return!a||f(a)}U(a)||h(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var g=Db(a,function(a){return U(a,"SELECT")});return!!g&&Rd(g,l)}if(U(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?S.C('/descendant::*[@usemap = "#'+a.name+'"]',g):yb(g,function(b){return U(b)&&Gd(b,"usemap")=="#"+a.name});return!!g&&Rd(g,b)}return U(a,"AREA")?(g=Db(a,function(a){return U(a,"MAP")}),!!g&&Rd(g,b)):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Sd(a)||!d(a)||!e(a,m)?n:f(a)}function Td(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function Ud(a){var b=[];Vd(a,b);b=ra(b,Td);return Td(b.join("\n")).replace(/\xa0/g," ")} -function Vd(a,b){if(U(a,"BR"))b.push("");else{var c=U(a,"TD"),d=V(a,"display"),e=!c&&!va(Wd,d),f=a.previousElementSibling!=k?a.previousElementSibling:sb(a.previousSibling),f=f?V(f,"display"):"",g=V(a,"float")||V(a,"cssFloat")||V(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var p=Rd(a),v=m,t=m;p&&(v=V(a,"white-space"),t=V(a,"text-transform"));y(a.childNodes,function(a){a.nodeType==qb&&p?Xd(a,b,v,t):U(a)&&Vd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!la(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var Wd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function Xd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";la(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function Sd(a){if(xd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Yd(a)}function Yd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Yd(a));return b};var Zd={ga:function(a){return!(!a.querySelectorAll||!a.querySelector)},C:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(Zd.ga(b))return b.querySelector("."+a.replace(/\./g,"\\."))||m;var c=Fb(E(b),"*",a,b);return c.length?c[0]:m},s:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return Zd.ga(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):Fb(E(b),"*",a,b)}};var $d={C:function(a,b){!fa(b.querySelector)&&(B&&T(8)&&!ga(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:m},s:function(a,b){!fa(b.querySelectorAll)&&(B&&T(8)&&!ga(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);return b.querySelectorAll(a)}};var ae={},be={};ae.va=function(a,b,c){var d;try{d=$d.s("a",b)}catch(e){d=Fb(E(b),"A",m,b)}return ua(d,function(b){b=Ud(b);return c&&-1!=b.indexOf(a)||b==a})};ae.oa=function(a,b,c){var d;try{d=$d.s("a",b)}catch(e){d=Fb(E(b),"A",m,b)}return qa(d,function(b){b=Ud(b);return c&&-1!=b.indexOf(a)||b==a})};ae.C=function(a,b){return ae.va(a,b,n)};ae.s=function(a,b){return ae.oa(a,b,n)};be.C=function(a,b){return ae.va(a,b,l)};be.s=function(a,b){return ae.oa(a,b,l)};var ce={C:function(a,b){return b.getElementsByTagName(a)[0]||m},s:function(a,b){return b.getElementsByTagName(a)}};var de={className:Zd,"class name":Zd,css:$d,"css selector":$d,id:{C:function(a,b){var c=E(b),d=c.e(a);if(!d)return m;if(Gd(d,"id")==a&&ub(b,d))return d;c=Fb(c,"*");return ua(c,function(c){return Gd(c,"id")==a&&ub(b,c)})},s:function(a,b){var c=Fb(E(b),"*",m,b);return qa(c,function(b){return Gd(b,"id")==a})}},linkText:ae,"link text":ae,name:{C:function(a,b){var c=Fb(E(b),"*",m,b);return ua(c,function(b){return Gd(b,"name")==a})},s:function(a,b){var c=Fb(E(b),"*",m,b);return qa(c,function(b){return Gd(b, -"name")==a})}},partialLinkText:be,"partial link text":be,tagName:ce,"tag name":ce,xpath:S};function ee(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=m}if(c){var d=de[c];if(d&&fa(d.s))return d.s(a[c],b||ka.document)}h(Error("Unsupported locator strategy: "+c))};function fe(a){this.t=ka.document.documentElement;this.ua=m;var b=Eb(F(this.t));b&&ge(this,b);this.Da=a||new he}fe.prototype.e=q("t");function ge(a,b){a.t=b;a.ua=U(b,"OPTION")?Db(b,function(a){return U(a,"SELECT")}):m} -function ie(a){a=a.ua||a.t;var b=Eb(F(a));if(a==b)return n;if(b&&(fa(b.blur)||B&&ga(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){B&&"Unspecified error."==c.message||h(c)}B&&!T(8)&&(F(a)?F(a).parentWindow||F(a).defaultView:window).focus()}return fa(a.focus)||B&&ga(a.focus)?(A&&T(11)&&!Rd(a)?W(a,je):a.focus(),l):n}D||A||pd&&qd(3.6);function ke(a){return U(a,"FORM")} -function le(a){ke(a)||h(new z(12,"Element is not a form, so could not submit."));if(W(a,me))if(U(a.submit))if(!B||T(8))a.constructor.prototype.submit.call(a);else{var b=ee({id:"submit"},a),c=ee({name:"submit"},a);y(b,function(a){a.removeAttribute("id")});y(c,function(a){a.removeAttribute("name")});a=a.submit;y(b,function(a){a.setAttribute("id","submit")});y(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}function he(){this.T=0}he.prototype.h=function(a){return 0!=(this.T&a)};var ne=!(B&&!T(10))&&!A,oe=Tb?!qd(4):!sd;function X(a,b,c){this.f=a;this.I=b;this.J=c}X.prototype.create=function(a){a=F(a);wd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.I,this.J));return a};X.prototype.toString=q("f");function pe(a,b,c){X.call(this,a,b,c)}x(pe,X); -pe.prototype.create=function(a,b){var c=F(a);if(C){var d=c?c.parentWindow||c.defaultView:window,e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.f,this.I,this.J,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.f==qe&&b.preventDefault&&c.preventDefault()}else wd?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.f,this.I,this.J)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode, -D&&(c.charCode=this==qe?c.keyCode:0);return c};function re(a,b,c){X.call(this,a,b,c)}x(re,X); -re.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}ne||h(new z(9,"Browser does not support firing touch events."));var e=F(a),f=e?e.parentWindow||e.defaultView: -window,g=oe?d(b.changedTouches):c(b.changedTouches),p=b.touches==b.changedTouches?g:oe?d(b.touches):c(b.touches),v=b.targetTouches==b.changedTouches?g:oe?d(b.targetTouches):c(b.targetTouches),t;oe?(t=e.createEvent("MouseEvents"),t.initMouseEvent(this.f,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),t.touches=p,t.targetTouches=v,t.changedTouches=g,t.scale=b.scale,t.rotation=b.rotation):(t=e.createEvent("TouchEvent"),Tb?t.initTouchEvent(p,v,g,this.f, -f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey):t.initTouchEvent(this.f,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,v,g,b.scale,b.rotation),t.relatedTarget=b.relatedTarget);return t}; -var se=new X("blur",n,n),te=new X("change",l,n),je=new X("focus",n,n),ue=new X("input",n,n),me=new X("submit",l,l),ve=new X("textInput",l,l),we=new pe("keydown",l,l),qe=new pe("keypress",l,l),xe=new pe("keyup",l,l),ye=new re("touchend",l,l),ze=new re("touchstart",l,l);function W(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return wd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function Ae(a,b){if(Be(a))a.selectionStart=b;else if(B){var c=Ce(a),d=c[0];d.inRange(c[1])&&(b=De(a,b),d.collapse(l),d.move("character",b),d.select())}} -function Ee(a,b){var c=0,d=0;if(Be(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(B){var e=Ce(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,p=e=c.text,v=n;!v;)0==f.compareEndPoints("StartToEnd",f)?v=l:(f.moveEnd("character",-1),f.text==g?d+="\r\n":v=l);if(b)f=[d.length,-1];else{for(f=n;!f;)0==c.compareEndPoints("StartToEnd",c)?f=l:(c.moveEnd("character",-1),c.text==e?p+="\r\n":f=l);f=[d.length,d.length+p.length]}return f}c= -f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Fe(a,b){if(Be(a))a.selectionEnd=b;else if(B){var c=Ce(a),d=c[1];c[0].inRange(d)&&(b=De(a,b),c=De(a,Ee(a,l)[0]),d.collapse(l),d.moveEnd("character",b-c),d.select())}}function Ge(a,b){if(Be(a))a.selectionStart=b,a.selectionEnd=b;else if(B){b=De(a,b);var c=a.createTextRange();c.collapse(l);c.move("character",b);c.select()}} -function He(a,b){if(Be(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else B?(d=Ce(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select())):h(Error("Cannot set the selection end"))}function Ce(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} -function De(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Be(a){try{return"number"==typeof a.selectionStart}catch(b){return n}};function Ie(a){if("function"==typeof a.L)return a.L();if(w(a))return a.split("");if(ca(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ob(a)};function Je(a,b){this.n={};this.k=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.W(a)}r=Je.prototype;r.K=0;r.za=0;r.L=function(){Ke(this);for(var a=[],b=0;b<this.k.length;b++)a.push(this.n[this.k[b]]);return a};function Le(a){Ke(a);return a.k.concat()}r.remove=function(a){return Me(this.n,a)?(delete this.n[a],this.K--,this.za++,this.k.length>2*this.K&&Ke(this),l):n}; -function Ke(a){if(a.K!=a.k.length){for(var b=0,c=0;b<a.k.length;){var d=a.k[b];Me(a.n,d)&&(a.k[c++]=d);b++}a.k.length=c}if(a.K!=a.k.length){for(var e={},c=b=0;b<a.k.length;)d=a.k[b],Me(e,d)||(a.k[c++]=d,e[d]=1),b++;a.k.length=c}}r.get=function(a,b){return Me(this.n,a)?this.n[a]:b};r.set=function(a,b){Me(this.n,a)||(this.K++,this.k.push(a),this.za++);this.n[a]=b}; -r.W=function(a){var b;if(a instanceof Je)b=Le(a),a=a.L();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=ob(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function Me(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Ne(a){this.n=new Je;a&&this.W(a)}function Oe(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ha]||(a[ha]=++ia)):b.substr(0,1)+a}r=Ne.prototype;r.add=function(a){this.n.set(Oe(a),a)};r.W=function(a){a=Ie(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};r.remove=function(a){return this.n.remove(Oe(a))};r.contains=function(a){a=Oe(a);return Me(this.n.n,a)};r.L=function(){return this.n.L()};function Pe(a){fe.call(this);this.$=Od(this.e());this.q=0;this.ea=new Ne;a&&(y(a.pressed,function(a){Qe(this,a,l)},this),this.q=a.currentPos)}x(Pe,fe);var Re={};function Y(a,b,c){ga(a)&&(a=C?a.c:A?a.opera:a.d);a=new Se(a,b,c);if(b&&(!(b in Re)||c))Re[b]={key:a,shift:n},c&&(Re[c]={key:a,shift:l});return a}function Se(a,b,c){this.code=a;this.D=b||m;this.Ka=c||this.D}var Te=Y(8),Ue=Y(9),Ve=Y(13),Z=Y(16),We=Y(17),Xe=Y(18),Ye=Y(19);Y(20); -var Ze=Y(27),$e=Y(32," "),af=Y(33),bf=Y(34),cf=Y(35),df=Y(36),ef=Y(37),ff=Y(38),gf=Y(39),hf=Y(40);Y(44);var jf=Y(45),kf=Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","(");Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q"); +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", +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", +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"};var Ea="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Fa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ga=/^#(?:[0-9a-f]{3}){1,2}$/i,Ha=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ia=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function v(a,b){this.code=a;this.state=Ja[a]||Ka;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(v,Error); +var Ka="unknown error",Ja={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ja[13]=Ka;Ja[9]="unknown command";v.prototype.toString=function(){return this.name+": "+this.message};var La,Ma,Na,Oa,Pa,Qa,Ra;function Sa(){return m.navigator?m.navigator.userAgent:null}Pa=Oa=Na=Ma=La=!1;var Ta;if(Ta=Sa()){var Ua=m.navigator;La=0==Ta.indexOf("Opera");Ma=!La&&-1!=Ta.indexOf("MSIE");Oa=(Na=!La&&-1!=Ta.indexOf("WebKit"))&&-1!=Ta.indexOf("Mobile");Pa=!La&&!Na&&"Gecko"==Ua.product}var w=La,y=Ma,z=Pa,B=Na,Va=Oa,Wa,Xa=m.navigator;Wa=Xa&&Xa.platform||"";Qa=-1!=Wa.indexOf("Mac");Ra=-1!=Wa.indexOf("Win");var Ya=-1!=Wa.indexOf("Linux"); +function Za(){var a=m.document;return a?a.documentMode:void 0}var $a;a:{var ab="",bb;if(w&&m.opera)var cb=m.opera.version,ab="function"==typeof cb?cb():cb;else if(z?bb=/rv\:([^\);]+)(\)|;)/:y?bb=/MSIE\s+([^\);]+)(\)|;)/:B&&(bb=/WebKit\/(\S+)/),bb)var db=bb.exec(Sa()),ab=db?db[1]:"";if(y){var eb=Za();if(eb>parseFloat(ab)){$a=String(eb);break a}}$a=ab}var fb={};function jb(a){return fb[a]||(fb[a]=0<=ra($a,a))}var kb=m.document,lb=kb&&y?Za()||("CSS1Compat"==kb.compatMode?parseInt($a,10):5):void 0;var mb;!z&&!y||y&&y&&9<=lb||z&&jb("1.9.1");y&&jb("9");function nb(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}l=nb.prototype;l.toString=function(){return"("+this.x+", "+this.y+")"};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function ob(a,b){this.width=a;this.height=b}l=ob.prototype;l.toString=function(){return"("+this.width+" x "+this.height+")"};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function pb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function qb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function rb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function sb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var tb=3;function ub(a){return a?new vb(C(a)):mb||(mb=new vb)}function wb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new ob(a.clientWidth,a.clientHeight)}function xb(a){return a.parentWindow||a.defaultView}function yb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function zb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Ab(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(y&&!(y&&9<=lb)){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?Bb(a,b):!c&&zb(e,b)?-1*Cb(a,b):!d&&zb(f,a)?Cb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function Cb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Bb(d,a)}function Bb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var Db={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Eb={IMG:" ",BR:"\n"}; +function Fb(a,b,c){if(!(a.nodeName in Db))if(a.nodeType==tb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Eb)b.push(Eb[a.nodeName]);else for(a=a.firstChild;a;)Fb(a,b,c),a=a.nextSibling}function Gb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function vb(a){this.aa=a||m.document||document}vb.prototype.e=function(a){return p(a)?this.aa.getElementById(a):a}; +function Hb(a,b,c,d){a=d||a.aa;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&Aa(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} +vb.prototype.contains=zb;var Ib,Jb,Kb,Lb,Mb,Nb,Ob;Ob=Nb=Mb=Lb=Kb=Jb=Ib=!1;var Pb=Sa();Pb&&(-1!=Pb.indexOf("Firefox")?Ib=!0:-1!=Pb.indexOf("Camino")?Jb=!0:-1!=Pb.indexOf("iPhone")||-1!=Pb.indexOf("iPod")?Kb=!0:-1!=Pb.indexOf("iPad")?Lb=!0:-1!=Pb.indexOf("Android")?Mb=!0:-1!=Pb.indexOf("Chrome")?Nb=!0:-1!=Pb.indexOf("Safari")&&(Ob=!0));var Qb=Ib,Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb,Vb=Nb,Wb=Ob;function Xb(a,b,c){this.i=a;this.Pa=b||1;this.r=c||1};var Yb=y&&!(y&&9<=lb),Zb=y&&!(y&&8<=lb);function $b(a,b,c,d,e){this.i=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function ac(a,b,c){var d=Zb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $b(b,a,b.nodeName,d,c)};function bc(a){this.ja=a;this.S=0}function cc(a){a=a.match(dc);for(var b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);return new bc(a)}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function D(a,b){return a.ja[a.S+(b||0)]}bc.prototype.next=function(){return this.ja[this.S++]};bc.prototype.back=function(){this.S--};bc.prototype.empty=function(){return this.ja.length<=this.S};function E(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(Yb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Yb&&"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} +function fc(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Zb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function gc(a,b,c,d,e){return(Yb?hc:ic).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)} +function hc(a,b,c,d,e){if(a instanceof jc||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=kc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)fc(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}lc(a,b,c,d,e);return e} +function ic(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!y?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof G?lc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){fc(a,c,d)&&e.add(a)}));return e} +function mc(a,b,c,d,e){var f;if((a instanceof jc||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var g=kc(a);if("*"!=g&&(f=ua(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ua(f,function(a){return fc(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return nc(a,b,c,d,e)}function nc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&e.add(b);return e} +function lc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&e.add(b),lc(a,b,c,d,e)}function kc(a){if(a instanceof G){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function F(){this.r=this.m=null;this.O=0}function oc(a){this.v=a;this.next=this.G=null}function pc(a,b){if(!a.m)return b;if(!b.m)return a;for(var c=a.m,d=b.m,e=null,f=null,g=0;c&&d;)c.v==d.v||c.v instanceof $b&&d.v instanceof $b&&c.v.i==d.v.i?(f=c,c=c.next,d=d.next):0<Ab(c.v,d.v)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.m=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.O=g;return a} +F.prototype.unshift=function(a){a=new oc(a);a.next=this.m;this.r?this.m.G=a:this.m=this.r=a;this.m=a;this.O++};F.prototype.add=function(a){a=new oc(a);a.G=this.r;this.m?this.r.next=a:this.m=this.r=a;this.r=a;this.O++};function qc(a){return(a=a.m)?a.v:null}F.prototype.u=h("O");function rc(a){return(a=qc(a))?E(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.La=a;this.la=(this.I=b)?a.r:a.m;this.da=null} +tc.prototype.next=function(){var a=this.la;if(null==a)return null;var b=this.da=a;this.la=this.I?a.G:a.next;return b.v};tc.prototype.remove=function(){var a=this.La,b=this.da;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.m=b;b?b.G=c:a.r=c;a.O--;this.da=null};function H(a){this.l=a;this.o=this.w=!1;this.P=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.j=h("w");function uc(a,b){a.w=b}function vc(a,b){a.o=b}H.prototype.B=h("P");function J(a,b){var c=a.evaluate(b);return c instanceof F?+rc(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof F?rc(c):""+c}function wc(a,b){var c=a.evaluate(b);return c instanceof F?!!c.u():!!c};function xc(a,b,c){H.call(this,a.l);this.ha=a;this.ra=b;this.ya=c;this.w=b.j()||c.j();this.o=b.o||c.o;this.ha==yc&&(c.o||c.j()||4==c.l||0==c.l||!b.B()?b.o||(b.j()||4==b.l||0==b.l||!c.B())||(this.P={name:c.B().name,J:b}):this.P={name:b.B().name,J:c})}s(xc,H); +function zc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof F&&c instanceof F){e=sc(b);for(d=e.next();d;d=e.next())for(b=sc(c),f=b.next();f;f=b.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof F||c instanceof F){b instanceof F?e=b:(e=c,c=b);e=sc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+E(d);break;case "boolean":d=!!E(d);break;case "string":d=E(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}xc.prototype.evaluate=function(a){return this.ha.t(this.ra,this.ya,a)};xc.prototype.toString=function(){var a="Binary Expression: "+this.ha,a=a+I(this.ra);return a+=I(this.ya)};function Ac(a,b,c,d){this.Oa=a;this.wa=b;this.l=c;this.t=d}Ac.prototype.toString=h("Oa");var Bc={}; +function M(a,b,c,d){if(Bc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Ac(a,b,c,d);return Bc[a.toString()]=a}M("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});M("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});M("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});M("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});M("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});M("<",4,2,function(a,b,c){return zc(function(a,b){return a<b},a,b,c)}); +M(">",4,2,function(a,b,c){return zc(function(a,b){return a>b},a,b,c)});M("<=",4,2,function(a,b,c){return zc(function(a,b){return a<=b},a,b,c)});M(">=",4,2,function(a,b,c){return zc(function(a,b){return a>=b},a,b,c)});var yc=M("=",3,2,function(a,b,c){return zc(function(a,b){return a==b},a,b,c,!0)});M("!=",3,2,function(a,b,c){return zc(function(a,b){return a!=b},a,b,c,!0)});M("and",2,2,function(a,b,c){return wc(a,c)&&wc(b,c)});M("or",1,2,function(a,b,c){return wc(a,c)||wc(b,c)});function Cc(a,b){if(b.u()&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.l);this.xa=a;this.g=b;this.w=a.j();this.o=a.o}s(Cc,H);Cc.prototype.evaluate=function(a){a=this.xa.evaluate(a);return Dc(this.g,a)};Cc.prototype.toString=function(){var a;a="Filter:"+I(this.xa);return a+=I(this.g)};function Ec(a,b){if(b.length<a.ua)throw Error("Function "+a.q+" expects at least"+a.ua+" arguments, "+b.length+" given");if(null!==a.ea&&b.length>a.ea)throw Error("Function "+a.q+" expects at most "+a.ea+" arguments, "+b.length+" given");a.Ma&&t(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.q+" is not of type Nodeset: "+b);});H.call(this,a.l);this.R=a;this.Y=b;uc(this,a.w||xa(b,function(a){return a.j()}));vc(this,a.Ka&&!b.length||a.Ja&&!!b.length||xa(b,function(a){return a.o}))} +s(Ec,H);Ec.prototype.evaluate=function(a){return this.R.t.apply(null,Ba(a,this.Y))};Ec.prototype.toString=function(){var a="Function: "+this.R;if(this.Y.length)var b=wa(this.Y,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function Fc(a,b,c,d,e,f,g,k,r){this.q=a;this.l=b;this.w=c;this.Ka=d;this.Ja=e;this.t=f;this.ua=g;this.ea=n(k)?k:g;this.Ma=!!r}Fc.prototype.toString=h("q");var Gc={}; +function N(a,b,c,d,e,f,g,k){if(Gc.hasOwnProperty(a))throw Error("Function already created: "+a+".");Gc[a]=new Fc(a,b,c,d,!1,e,f,g,k)}N("boolean",2,!1,!1,function(a,b){return wc(b,a)},1);N("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);N("concat",3,!1,!1,function(a,b){var c=Ca(arguments,1);return wa(c,function(b,c){return b+L(c,a)},"")},2,null);N("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2); +N("count",1,!1,!1,function(a,b){return b.evaluate(a).u()},1,1,!0);N("false",2,!1,!1,aa(!1),0);N("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); +N("id",4,!1,!1,function(a,b){function c(a){if(Yb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return za(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.i,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!Aa(f,a)&&f.push(a)});f.sort(Ab);var g=new F;t(f,function(a){g.add(a)});return g},1);N("lang",2,!1,!1,aa(!1),1); +N("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);N("local-name",3,!1,!0,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,!0);N("name",3,!1,!0,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,!0);N("namespace-uri",3,!0,!1,aa(""),0,1,!0);N("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):E(a.i)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +N("not",2,!1,!1,function(a,b){return!wc(b,a)},1);N("number",1,!1,!0,function(a,b){return b?J(b,a):+E(a.i)},0,1);N("position",1,!0,!1,function(a){return a.Pa},0);N("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);N("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);N("string",3,!1,!0,function(a,b){return b?L(b,a):E(a.i)},0,1);N("string-length",1,!1,!0,function(a,b){return(b?L(b,a):E(a.i)).length},0,1); +N("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);N("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +N("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);N("sum",1,!1,!1,function(a,b){for(var c=sc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+E(e);return d},1,1,!0);N("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(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);N("true",2,!1,!1,aa(!0),0);function G(a,b){this.Ca=a;this.sa=n(b)?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=tb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Hc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}G.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};G.prototype.getName=h("Ca"); +G.prototype.toString=function(){var a="Kind Test: "+this.Ca;null===this.sa||(a+=I(this.sa));return a};function Ic(a){H.call(this,3);this.Ba=a.substring(1,a.length-1)}s(Ic,H);Ic.prototype.evaluate=h("Ba");Ic.prototype.toString=function(){return"Literal: "+this.Ba};function jc(a,b){this.q=a.toLowerCase();this.fa=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}jc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.q&&this.q!=a.nodeName.toLowerCase()?!1:this.fa==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};jc.prototype.getName=h("q");jc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.fa?"":this.fa+":")+this.q};function Jc(a){H.call(this,1);this.Da=a}s(Jc,H);Jc.prototype.evaluate=h("Da");Jc.prototype.toString=function(){return"Number: "+this.Da};function Kc(a,b){H.call(this,a.l);this.oa=a;this.Q=b;this.w=a.j();this.o=a.o;if(1==this.Q.length){var c=this.Q[0];c.$||c.A!=Lc||(c=c.W,"*"!=c.getName()&&(this.P={name:c.getName(),J:null}))}}s(Kc,H);function Mc(){H.call(this,4)}s(Mc,H);Mc.prototype.evaluate=function(a){var b=new F;a=a.i;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Mc.prototype.toString=aa("Root Helper Expression");function Nc(){H.call(this,4)}s(Nc,H);Nc.prototype.evaluate=function(a){var b=new F;b.add(a.i);return b}; +Nc.prototype.toString=aa("Context Helper Expression"); +Kc.prototype.evaluate=function(a){var b=this.oa.evaluate(a);if(!(b instanceof F))throw Error("Filter expression must evaluate to nodeset.");a=this.Q;for(var c=0,d=a.length;c<d&&b.u();c++){var e=a[c],f=sc(b,e.A.I),g;if(e.j()||e.A!=Oc)if(e.j()||e.A!=Pc)for(g=f.next(),b=e.evaluate(new Xb(g));null!=(g=f.next());)g=e.evaluate(new Xb(g)),b=pc(b,g);else g=f.next(),b=e.evaluate(new Xb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Xb(g))}}return b}; +Kc.prototype.toString=function(){var a;a="Path Expression:"+I(this.oa);if(this.Q.length){var b=wa(this.Q,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function Qc(a,b){this.g=a;this.I=!!b}function Dc(a,b,c){for(c=c||0;c<a.g.length;c++)for(var d=a.g[c],e=sc(b),f=b.u(),g,k=0;g=e.next();k++){var r=a.I?f-k:k+1;g=d.evaluate(new Xb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof F)r=0<g.u();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Qc.prototype.B=function(){return 0<this.g.length?this.g[0].B():null}; +Qc.prototype.j=function(){for(var a=0;a<this.g.length;a++){var b=this.g[a];if(b.j()||1==b.l||0==b.l)return!0}return!1};Qc.prototype.u=function(){return this.g.length};Qc.prototype.toString=function(){return wa(this.g,function(a,b){return a+I(b)},"Predicates:")};function Rc(a,b,c,d){H.call(this,4);this.A=a;this.W=b;this.g=c||new Qc([]);this.$=!!d;b=this.g.B();a.Ra&&b&&(a=b.name,a=Yb?a.toLowerCase():a,this.P={name:a,J:b.J});this.w=this.g.j()}s(Rc,H); +Rc.prototype.evaluate=function(a){var b=a.i,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.J?L(c.J,a):null,f=1);if(this.$)if(this.j()||this.A!=Sc)if(a=sc((new Rc(Tc,new G("node"))).evaluate(a)),b=a.next())for(c=this.t(b,d,e,f);null!=(b=a.next());)c=pc(c,this.t(b,d,e,f));else c=new F;else c=gc(this.W,b,d,e),c=Dc(this.g,c,f);else c=this.t(a.i,d,e,f);return c};Rc.prototype.t=function(a,b,c,d){a=this.A.R(this.W,a,b,c);return a=Dc(this.g,a,d)}; +Rc.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.$?"//":"/"));this.A.q&&(a+=I("Axis: "+this.A));a+=I(this.W);if(this.g.u()){var b=wa(this.g.g,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Uc(a,b,c,d){this.q=a;this.R=b;this.I=c;this.Ra=d}Uc.prototype.toString=h("q");var Vc={};function O(a,b,c,d){if(Vc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Uc(a,b,c,!!d);return Vc[a]=b} +O("ancestor",function(a,b){for(var c=new F,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);O("ancestor-or-self",function(a,b){var c=new F,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Lc=O("attribute",function(a,b){var c=new F,d=a.getName();if("style"==d&&b.style&&Yb)return c.add(new $b(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof G&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Yb?g.nodeValue&&c.add(ac(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Yb?g.nodeValue&&c.add(ac(b,g,b.sourceIndex)):c.add(g));return c},!1),Sc=O("child",function(a,b,c,d,e){return(Yb?mc:nc).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)}, +!1,!0);O("descendant",gc,!1,!0);var Tc=O("descendant-or-self",function(a,b,c,d){var e=new F;fc(b,c,d)&&a.matches(b)&&e.add(b);return gc(a,b,c,d,e)},!1,!0),Oc=O("following",function(a,b,c,d){var e=new F;do for(var f=b;f=f.nextSibling;)fc(f,c,d)&&a.matches(f)&&e.add(f),e=gc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);O("following-sibling",function(a,b){for(var c=new F,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);O("namespace",function(){return new F},!1); +var Wc=O("parent",function(a,b){var c=new F;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Pc=O("preceding",function(a,b,c,d){var e=new F,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var x=0,T=r.length;x<T;x++)b=r[x],fc(b,c,d)&&a.matches(b)&&e.add(b),e=gc(a,b,c,d,e)}return e},!0,!0); +O("preceding-sibling",function(a,b){for(var c=new F,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Xc=O("self",function(a,b){var c=new F;a.matches(b)&&c.add(b);return c},!1);function Yc(a){H.call(this,1);this.na=a;this.w=a.j();this.o=a.o}s(Yc,H);Yc.prototype.evaluate=function(a){return-J(this.na,a)};Yc.prototype.toString=function(){return"Unary Expression: -"+I(this.na)};function Zc(a){H.call(this,4);this.T=a;uc(this,xa(this.T,function(a){return a.j()}));vc(this,xa(this.T,function(a){return a.o}))}s(Zc,H);Zc.prototype.evaluate=function(a){var b=new F;t(this.T,function(c){c=c.evaluate(a);if(!(c instanceof F))throw Error("Path expression must evaluate to NodeSet.");b=pc(b,c)});return b};Zc.prototype.toString=function(){return wa(this.T,function(a,b){return a+I(b)},"Union Expression:")};function $c(a,b){this.b=a;this.Na=b}function ad(a){for(var b,c=[];;){P(a,"Missing right hand side of binary expression.");b=bd(a);var d=a.b.next();if(!d)break;var e=(d=Bc[d]||null)&&d.wa;if(!e){a.b.back();break}for(;c.length&&e<=c[c.length-1].wa;)b=new xc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new xc(c.pop(),c.pop(),b);return b}function P(a,b){if(a.b.empty())throw Error(b);}function cd(a,b){var c=a.b.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function dd(a){a=a.b.next();if(")"!=a)throw Error("Bad token: "+a);}function ed(a){a=a.b.next();if(2>a.length)throw Error("Unclosed literal string");return new Ic(a)}function fd(a){var b=a.b.next(),c=b.indexOf(":");if(-1==c)return new jc(b);var d=b.substring(0,c);a=a.Na(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new jc(b,a)} +function gd(a){var b,c=[],d;if("/"==D(a.b)||"//"==D(a.b)){b=a.b.next();d=D(a.b);if("/"==b&&(a.b.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Mc;d=new Mc;P(a,"Missing next location step.");b=hd(a,b);c.push(b)}else{a:{b=D(a.b);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.b.next();b=ad(a);P(a,'unclosed "("');cd(a,")");break;case '"':case "'":b=ed(a);break;default:if(isNaN(+b))if(!Hc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==D(a.b,1)){b=a.b.next();b=Gc[b]||null;a.b.next();for(d=[];")"!=D(a.b);){P(a,"Missing function argument list.");d.push(ad(a));if(","!=D(a.b))break;a.b.next()}P(a,"Unclosed function argument list.");dd(a);b=new Ec(b,d)}else{b=null;break a}else b=new Jc(+a.b.next())}"["==D(a.b)&&(d=new Qc(id(a)),b=new Cc(b,d))}if(b)if("/"==D(a.b)||"//"==D(a.b))d=b;else return b;else b=hd(a,"/"),d=new Nc,c.push(b)}for(;"/"==D(a.b)||"//"==D(a.b);)b=a.b.next(),P(a,"Missing next location step."),b=hd(a,b),c.push(b); +return new Kc(d,c)} +function hd(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.b))return d=new Rc(Xc,new G("node")),a.b.next(),d;if(".."==D(a.b))return d=new Rc(Wc,new G("node")),a.b.next(),d;var f;if("@"==D(a.b))f=Lc,a.b.next(),P(a,"Missing attribute name");else if("::"==D(a.b,1)){if(!/(?![0-9])[\w]/.test(D(a.b).charAt(0)))throw Error("Bad token: "+a.b.next());c=a.b.next();f=Vc[c]||null;if(!f)throw Error("No axis with name: "+c);a.b.next();P(a,"Missing node name")}else f=Sc; +c=D(a.b);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==D(a.b,1)){if(!Hc(c))throw Error("Invalid node type: "+c);c=a.b.next();if(!Hc(c))throw Error("Invalid type name: "+c);cd(a,"(");P(a,"Bad nodetype");e=D(a.b).charAt(0);var g=null;if('"'==e||"'"==e)g=ed(a);P(a,"Bad nodetype");dd(a);c=new G(c,g)}else c=fd(a);else if("*"==c)c=fd(a);else throw Error("Bad token: "+a.b.next());e=new Qc(id(a),f.I);return d||new Rc(f,c,e,"//"==b)} +function id(a){for(var b=[];"["==D(a.b);){a.b.next();P(a,"Missing predicate expression.");var c=ad(a);b.push(c);P(a,"Unclosed predicate expression.");cd(a,"]")}return b}function bd(a){if("-"==D(a.b))return a.b.next(),new Yc(bd(a));var b=gd(a);if("|"!=D(a.b))a=b;else{for(b=[b];"|"==a.b.next();)P(a,"Missing next union location path."),b.push(gd(a));a.b.back();a=new Zc(b)}return a};function jd(a){switch(a.nodeType){case 1:return ma(kd,a);case 9:return jd(a.documentElement);case 2:return a.ownerElement?jd(a.ownerElement):ld;case 11:case 10:case 6:case 12:return ld;default:return a.parentNode?jd(a.parentNode):ld}}function ld(){return null}function kd(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?kd(a.parentNode,b):null};function md(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=cc(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=la(b.lookupNamespaceURI,b)):b=aa(null);var d=ad(new $c(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Xb(a));return new Q(c,b)}} +function Q(a,b){if(0==b)if(a instanceof F)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 F))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof F?rc(a):""+a;break;case 1:this.numberValue=a instanceof F?+rc(a):+a;break;case 3:this.booleanValue=a instanceof F?0<a.u():!!a;break;case 4:case 5:case 6:case 7:var d= +sc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof $b?e.i:e);this.snapshotLength=a.u();this.invalidIteratorState=!1;break;case 8:case 9:d=qc(a);this.singleNodeValue=d instanceof $b?d.i:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}Q.ANY_TYPE=0;Q.NUMBER_TYPE=1;Q.STRING_TYPE=2;Q.BOOLEAN_TYPE=3;Q.UNORDERED_NODE_ITERATOR_TYPE=4;Q.ORDERED_NODE_ITERATOR_TYPE=5;Q.UNORDERED_NODE_SNAPSHOT_TYPE=6;Q.ORDERED_NODE_SNAPSHOT_TYPE=7;Q.ANY_UNORDERED_NODE_TYPE=8;Q.FIRST_ORDERED_NODE_TYPE=9;function nd(a){this.lookupNamespaceURI=jd(a)} +function od(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=Q,b.evaluate=function(a,b,e,f){return(new md(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new md(a,b)},b.createNSResolver=function(a){return new nd(a)})};var R={};R.Fa=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();R.t=function(a,b,c){var d=C(a);(y||Ub)&&od(d?xb(d):window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):R.Fa;return y&&!jb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!z||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new v(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +R.Z=function(a,b){if(!a||1!=a.nodeType)throw new v(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};R.C=function(a,b){var c=function(){var c=R.t(b,a,9);return c?(c=c.singleNodeValue,w?c:c||null):b.selectSingleNode?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||R.Z(c,a);return c}; +R.s=function(a,b){var c=function(){var c=R.t(b,a,7);if(c){var e=c.snapshotLength;w&&!n(e)&&R.Z(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){R.Z(b,a)});return c};function pd(a){return(a=a.exec(Sa()))?a[1]:""}var qd=function(){if(Qb)return pd(/Firefox\/([0-9.]+)/);if(y||w)return $a;if(Vb)return pd(/Chrome\/([0-9.]+)/);if(Wb)return pd(/Version\/([0-9.]+)/);if(Sb||Tb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Sa());if(a)return a[1]+"."+a[2]}else{if(Ub)return(a=pd(/Android\s+([0-9.]+)/))?a:pd(/Version\/([0-9.]+)/);if(Rb)return pd(/Camino\/([0-9.]+)/)}return""}();var rd,sd;function S(a){return td?rd(a):y?0<=ra(lb,a):jb(a)}function ud(a){return td?sd(a):Ub?0<=ra(vd,a):0<=ra(qd,a)} +var td=function(){if(!z)return!1;var a=m.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;rd=function(a){return 0<=d.Ga(e,""+a)};sd=function(a){return 0<=d.Ga(f,""+a)};return!0}(),wd=Tb||Sb,xd;if(Ub){var yd=/Android\s+([0-9\.]+)/.exec(Sa());xd=yd?yd[1]:"0"}else xd="0"; +var vd=xd,zd=y&&!(y&&8<=lb),Ad=y&&!(y&&9<=lb),Bd=y&&!(y&&10<=lb);Ub&&ud(2.3);Ub&&ud(4);Wb&&ud(6);function Cd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}l=Cd.prototype;l.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};l.contains=function(a){return this&&a?a instanceof Cd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +l.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};l.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};l.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function U(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}l=U.prototype;l.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};l.contains=function(a){return a instanceof U?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Dd(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}var Ed={thin:2,medium:4,thick:6}; +function Fd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Ed)d=Ed[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Gd(a){var b;a:{a=C(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return y&&b&&"undefined"===typeof b.nodeType?null:b}function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Hd(a,b){var c;if(c=zd)if(c="value"==b)if(c=V(a,"OPTION"))c=null===Id(a,"value");c?(c=[],Fb(a,c,!1),c=c.join("")):c=a[b];return c}var Jd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Kd(a){var b=[];t(a.split(Jd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return w?b.replace(/\w+:;/g,""):b}function Id(a,b){b=b.toLowerCase();if("style"==b)return Kd(a.style.cssText);if(zd&&"value"==b&&V(a,"INPUT"))return a.value;if(Ad&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}var Ld="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Md(a){var b=a.tagName.toUpperCase();return Aa(Ld,b)?Hd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Md(a.parentNode):!Gb(a,function(a){var b=a.parentNode;if(b&&V(b,"FIELDSET")&&Hd(b,"disabled")){if(!V(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:yb(a.previousSibling);)if(V(a,"LEGEND"))return!0}return!1},!0):!0}var Nd="text search tel url email password number".split(" "); +function Od(a){function b(a){return"inherit"==a.contentEditable?(a=Pd(a))?b(a):!1:"true"==a.contentEditable}return n(a.contentEditable)?!y&&n(a.isContentEditable)?a.isContentEditable:b(a):!1}function Qd(a){return(V(a,"TEXTAREA")?!0:V(a,"INPUT")?Aa(Nd,a.type.toLowerCase()):Od(a)?!0:!1)&&!Hd(a,"readOnly")}function Pd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:null} +function W(a,b){var c=sa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Ad?"styleFloat":"cssFloat";var d=Dd(a,c)||Rd(a,c);if(null===d)d=null;else if(Aa(Ea,c)){b:{var e=d.match(Ha);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ia))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=Da[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Fa,"#$1$1$2$2$3$3")),!Ga.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Rd(a,b){var c=a.currentStyle||a.style,d=c[b];!n(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?n(d)?d:null:(c=Pd(a))?Rd(c,b):null} +function Sd(a,b){function c(a){if("none"==W(a,"display"))return!1;a=Pd(a);return!a||c(a)}function d(a){var b=Td(a);return 0<b.height&&0<b.width?!0:V(a,"PATH")&&(0<b.height||0<b.width)?(a=W(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=W(a,"overflow")&&xa(a.childNodes,function(a){return a.nodeType==tb||V(a)&&d(a)})}function e(a){return Ud(a)==Vd&&ya(a.childNodes,function(a){return!V(a)||e(a)})}if(!V(a))throw Error("Argument to isShown must be of type Element");if(V(a,"OPTION")||V(a,"OPTGROUP")){var f= +Gb(a,function(a){return V(a,"SELECT")});return!!f&&Sd(f,!0)}return(f=Wd(a))?!!f.pa&&0<f.rect.width&&0<f.rect.height&&Sd(f.pa,b):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==Xd(a)||!d(a)?!1:!e(a)}var Vd="hidden"; +function Ud(a,b){function c(a){var b=W(a,"position");if("fixed"==b)return T=!0,a==k?null:k;for(a=Pd(a);a&&a!=k&&(0==W(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==W(a,"position"));)a=Pd(a);return a}function d(a){var b=a;if("visible"==x)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:W(b,"overflow-x"),y:W(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new vb(g)).aa;a=B||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=xb(b);a=y&&jb("10")&&b.pageYOffset!=a.scrollTop?new nb(a.scrollLeft,a.scrollTop):new nb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new nb(a.scrollLeft,a.scrollTop);return a}for(var f=Yd(a,b),g=C(a),k=g.documentElement,r=g.body,x=W(k,"overflow"),T,u=c(a);u;u=c(u)){var q=d(u);if("visible"!=q.x||"visible"!=q.y){var A=Td(u);if(0==A.width||0==A.height)return Vd;var K=f.right<A.left,ba=f.bottom<A.top;if(K&&"hidden"==q.x||ba&&"hidden"==q.y)return Vd; +if(K&&"visible"!=q.x||ba&&"visible"!=q.y){K=e(u);ba=f.bottom<A.top-K.y;if(f.right<A.left-K.x&&"visible"!=q.x||ba&&"visible"!=q.x)return Vd;f=Ud(u);return f==Vd?Vd:"scroll"}K=f.left>=A.left+A.width;A=f.top>=A.top+A.height;if(K&&"hidden"==q.x||A&&"hidden"==q.y)return Vd;if(K&&"visible"!=q.x||A&&"visible"!=q.y){if(T&&(q=e(u),f.left>=k.scrollWidth-q.x||f.right>=k.scrollHeight-q.y))return Vd;f=Ud(u);return f==Vd?Vd:"scroll"}}}return"none"}var Zd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Td(a){function b(a){var c=(C(a)?xb(C(a)):window).getComputedStyle(a,null).MozTransform.match(Zd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),T=parseFloat(c[3]),u=parseFloat(c[4]),q=parseFloat(c[5]),c=parseFloat(c[6]),A=f.left+f.width,K=f.top+f.height,ba=f.left*d,d=A*d,gb=f.left*e,e=A*e,hb=f.top*T,T=K*T,ib=f.top*u,A=K*u,K=ba+hb+q,u=gb+ib+c,hb=d+hb+q,ib=e+ib+c,ba=ba+T+q,gb=gb+A+c,q=d+T+q,c=e+A+c;f.left=Math.min(K,hb,ba,q);f.top=Math.min(u,ib,gb,c);q=Math.max(K,hb,ba,q);c=Math.max(u,ib, +gb,c);f.width=q-f.left;f.height=c-f.top}(a=Pd(a))&&b(a)}var c=Wd(a);if(c)return c.rect;if(V(a,"HTML"))return c=C(a),a=wb((c?xb(c):window)||window),new U(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new U(0,0,0,0)}var f=new U(d.left,d.top,d.right-d.left,d.bottom-d.top);y&&a.ownerDocument.body&&(c=C(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);w&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0== +f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));z&&!S(12)&&b(a);return f} +function Wd(a){var b=V(a,"MAP");if(!b&&!V(a,"AREA"))return null;var c=b?a:V(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=R.C('/descendant::*[@usemap = "#'+c.name+'"]',C(c)))&&(e=Td(d),!b&&"default"!=a.shape.toLowerCase())){var f=$d(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new U(a+e.left,b+e.top,c,f)}return{pa:d,rect:e||new U(0,0,0,0)}} +function $d(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new U(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new U(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 U(b,c,d-b,e-c)}return new U(0,0,0,0)} +function Yd(a,b){var c;c=Td(a);c=new Cd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof U?b:new U(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c}function ae(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")} +function be(a){var b=[];ce(a,b);b=va(b,ae);return ae(b.join("\n")).replace(/\xa0/g," ")} +function ce(a,b){if(V(a,"BR"))b.push("");else{var c=V(a,"TD"),d=W(a,"display"),e=!c&&!Aa(de,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:yb(a.previousSibling),f=f?W(f,"display"):"",g=W(a,"float")||W(a,"cssFloat")||W(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var k=Sd(a),r=null,x=null;k&&(r=W(a,"white-space"),x=W(a,"text-transform"));t(a.childNodes,function(a){a.nodeType==tb&&k?ee(a,b,r,x):V(a)&&ce(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||pa(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var de="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function ee(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";pa(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function Xd(a){if(Bd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return fe(a)}function fe(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=Pd(a))&&(b*=fe(a));return b};var ge={ka:function(a){return!(!a.querySelectorAll||!a.querySelector)},C:function(a,b){if(!a)throw Error("No class name specified");a=qa(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");if(ge.ka(b))return b.querySelector("."+a.replace(/\./g,"\\."))||null;var c=Hb(ub(b),"*",a,b);return c.length?c[0]:null},s:function(a,b){if(!a)throw Error("No class name specified");a=qa(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");return ge.ka(b)?b.querySelectorAll("."+ +a.replace(/\./g,"\\.")):Hb(ub(b),"*",a,b)}};var he={C:function(a,b){if(!fa(b.querySelector)&&y&&S(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=qa(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:null},s:function(a,b){if(!fa(b.querySelectorAll)&&y&&S(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=qa(a);return b.querySelectorAll(a)}};var ie={},je={};ie.Aa=function(a,b,c){var d;try{d=he.s("a",b)}catch(e){d=Hb(ub(b),"A",null,b)}return za(d,function(b){b=be(b);return c&&-1!=b.indexOf(a)||b==a})};ie.ta=function(a,b,c){var d;try{d=he.s("a",b)}catch(e){d=Hb(ub(b),"A",null,b)}return ua(d,function(b){b=be(b);return c&&-1!=b.indexOf(a)||b==a})};ie.C=function(a,b){return ie.Aa(a,b,!1)};ie.s=function(a,b){return ie.ta(a,b,!1)};je.C=function(a,b){return ie.Aa(a,b,!0)};je.s=function(a,b){return ie.ta(a,b,!0)};var ke={C:function(a,b){return b.getElementsByTagName(a)[0]||null},s:function(a,b){return b.getElementsByTagName(a)}};var le={className:ge,"class name":ge,css:he,"css selector":he,id:{C:function(a,b){var c=ub(b),d=c.e(a);if(!d)return null;if(Id(d,"id")==a&&zb(b,d))return d;c=Hb(c,"*");return za(c,function(c){return Id(c,"id")==a&&zb(b,c)})},s:function(a,b){var c=Hb(ub(b),"*",null,b);return ua(c,function(b){return Id(b,"id")==a})}},linkText:ie,"link text":ie,name:{C:function(a,b){var c=Hb(ub(b),"*",null,b);return za(c,function(b){return Id(b,"name")==a})},s:function(a,b){var c=Hb(ub(b),"*",null,b);return ua(c,function(b){return Id(b, +"name")==a})}},partialLinkText:je,"partial link text":je,tagName:ke,"tag name":ke,xpath:R};function me(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=null}if(c){var d=le[c];if(d&&fa(d.s))return d.s(a[c],b||oa.document)}throw Error("Unsupported locator strategy: "+c);};function ne(a,b){this.H=oa.document.documentElement;this.za=null;var c=Gd(this.H);c&&oe(this,c);this.Ia=a||new pe;this.ma=b||new qe}ne.prototype.e=h("H");function oe(a,b){a.H=b;a.za=V(b,"OPTION")?Gb(b,function(a){return V(a,"SELECT")}):null}ne.prototype.F=function(a){return this.ma.F(this.H,a)};ne.prototype.ca=function(a,b){return this.ma.ca(this.H,a,b)}; +function re(a){a=a.za||a.H;var b=Gd(a);if(a==b)return!1;if(b&&(fa(b.blur)||y&&ga(b.blur))){if(!V(b,"BODY"))try{b.blur()}catch(c){if(!y||"Unspecified error."!=c.message)throw c;}y&&!S(8)&&(C(a)?xb(C(a)):window).focus()}return fa(a.focus)||y&&ga(a.focus)?(w&&S(11)&&!Sd(a)?se(a,te):a.focus(),!0):!1}B||w||td&&ud(3.6);function ue(a){return V(a,"FORM")} +function ve(a){if(!ue(a))throw new v(12,"Element is not a form, so could not submit.");if(se(a,we))if(V(a.submit))if(!y||S(8))a.constructor.prototype.submit.call(a);else{var b=me({id:"submit"},a),c=me({name:"submit"},a);t(b,function(a){a.removeAttribute("id")});t(c,function(a){a.removeAttribute("name")});a=a.submit;t(b,function(a){a.setAttribute("id","submit")});t(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}function pe(){this.U=0} +pe.prototype.h=function(a){return 0!=(this.U&a)};function qe(){}qe.prototype.F=function(a,b){return se(a,b)};qe.prototype.ca=function(a,b,c){return se(a,b,c)};var xe=!(y&&!S(10))&&!w,ye=Ub?!ud(4):!wd;function X(a,b,c){this.f=a;this.K=b;this.L=c}X.prototype.create=function(a){a=C(a);Ad?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.K,this.L));return a};X.prototype.toString=h("f");function ze(a,b,c){X.call(this,a,b,c)}s(ze,X); +ze.prototype.create=function(a,b){var c=C(a);if(z){var d=c?xb(c):window,e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.f,this.K,this.L,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.f==Ae&&b.preventDefault&&c.preventDefault()}else Ad?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.f,this.K,this.L)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode,B&&(c.charCode=this==Ae? +c.keyCode:0);return c};function Be(a,b,c){X.call(this,a,b,c)}s(Be,X); +Be.prototype.create=function(a,b){function c(b){b=va(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=va(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!xe)throw new v(9,"Browser does not support firing touch events.");var e=C(a),f=e?xb(e):window,g= +ye?d(b.changedTouches):c(b.changedTouches),k=b.touches==b.changedTouches?g:ye?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:ye?d(b.targetTouches):c(b.targetTouches),x;ye?(x=e.createEvent("MouseEvents"),x.initMouseEvent(this.f,this.K,this.L,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),x.touches=k,x.targetTouches=r,x.changedTouches=g,x.scale=b.scale,x.rotation=b.rotation):(x=e.createEvent("TouchEvent"),Ub?x.initTouchEvent(k,r,g,this.f,f,0, +0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey):x.initTouchEvent(this.f,this.K,this.L,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),x.relatedTarget=b.relatedTarget);return x}; +var Ce=new X("blur",!1,!1),De=new X("change",!0,!1),te=new X("focus",!1,!1),Ee=new X("input",!0,!1),we=new X("submit",!0,!0),Fe=new X("textInput",!0,!0),Ge=new ze("keydown",!0,!0),Ae=new ze("keypress",!0,!0),He=new ze("keyup",!0,!0),Ie=new Be("touchend",!0,!0),Je=new Be("touchstart",!0,!0);function se(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return Ad?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function Ke(a,b){if(Le(a))a.selectionStart=b;else if(y){var c=Me(a),d=c[0];d.inRange(c[1])&&(b=Ne(a,b),d.collapse(!0),d.move("character",b),d.select())}} +function Oe(a,b){var c=0,d=0;if(Le(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(y){var e=Me(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,k=e=c.text,r=!1;!r;)0==f.compareEndPoints("StartToEnd",f)?r=!0:(f.moveEnd("character",-1),f.text==g?d+="\r\n":r=!0);if(b)f=[d.length,-1];else{for(f=!1;!f;)0==c.compareEndPoints("StartToEnd",c)?f=!0:(c.moveEnd("character",-1),c.text==e?k+="\r\n":f=!0);f=[d.length,d.length+k.length]}return f}c= +f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Pe(a,b){if(Le(a))a.selectionEnd=b;else if(y){var c=Me(a),d=c[1];c[0].inRange(d)&&(b=Ne(a,b),c=Ne(a,Oe(a,!0)[0]),d.collapse(!0),d.moveEnd("character",b-c),d.select())}}function Qe(a,b){if(Le(a))a.selectionStart=b,a.selectionEnd=b;else if(y){b=Ne(a,b);var c=a.createTextRange();c.collapse(!0);c.move("character",b);c.select()}} +function Re(a,b){if(Le(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else if(y)d=Me(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select());else throw Error("Cannot set the selection end");}function Me(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} +function Ne(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Le(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};function Se(a,b){this.n={};this.k=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.X(a)}l=Se.prototype;l.M=0;l.Ea=0;l.N=function(){Te(this);for(var a=[],b=0;b<this.k.length;b++)a.push(this.n[this.k[b]]);return a};function Ue(a){Te(a);return a.k.concat()}l.remove=function(a){return Ve(this.n,a)?(delete this.n[a],this.M--,this.Ea++,this.k.length>2*this.M&&Te(this),!0):!1}; +function Te(a){if(a.M!=a.k.length){for(var b=0,c=0;b<a.k.length;){var d=a.k[b];Ve(a.n,d)&&(a.k[c++]=d);b++}a.k.length=c}if(a.M!=a.k.length){for(var e={},c=b=0;b<a.k.length;)d=a.k[b],Ve(e,d)||(a.k[c++]=d,e[d]=1),b++;a.k.length=c}}l.get=function(a,b){return Ve(this.n,a)?this.n[a]:b};l.set=function(a,b){Ve(this.n,a)||(this.M++,this.k.push(a),this.Ea++);this.n[a]=b}; +l.X=function(a){var b;if(a instanceof Se)b=Ue(a),a=a.N();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=rb(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function Ve(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function We(a){if("function"==typeof a.N)return a.N();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return rb(a)};function Xe(a){this.n=new Se;a&&this.X(a)}function Ye(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ha]||(a[ha]=++ia)):b.substr(0,1)+a}l=Xe.prototype;l.add=function(a){this.n.set(Ye(a),a)};l.X=function(a){a=We(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};l.remove=function(a){return this.n.remove(Ye(a))};l.contains=function(a){a=Ye(a);return Ve(this.n.n,a)};l.N=function(){return this.n.N()};function Ze(a){ne.call(this);this.ba=Qd(this.e());this.p=0;this.ia=new Xe;a&&(t(a.pressed,function(a){$e(this,a,!0)},this),this.p=a.currentPos)}s(Ze,ne);var af={};function Y(a,b,c){ga(a)&&(a=z?a.c:w?a.opera:a.d);a=new bf(a,b,c);!b||b in af&&!c||(af[b]={key:a,shift:!1},c&&(af[c]={key:a,shift:!0}));return a}function bf(a,b,c){this.code=a;this.D=b||null;this.Qa=c||this.D}var cf=Y(8),df=Y(9),ef=Y(13),Z=Y(16),ff=Y(17),gf=Y(18),hf=Y(19);Y(20); +var jf=Y(27),kf=Y(32," "),lf=Y(33),mf=Y(34),nf=Y(35),of=Y(36),pf=Y(37),qf=Y(38),rf=Y(39),sf=Y(40);Y(44);var tf=Y(45),uf=Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","(");Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q"); Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z"); -var lf=Y(Pa?{c:91,d:91,opera:219}:Oa?{c:224,d:91,opera:17}:{c:0,d:91,opera:m}),mf=Y(Pa?{c:92,d:92,opera:220}:Oa?{c:224,d:93,opera:17}:{c:0,d:92,opera:m}),nf=Y(Pa?{c:93,d:93,opera:0}:Oa?{c:0,d:0,opera:16}:{c:93,d:m,opera:0}),of=Y({c:96,d:96,opera:48},"0"),pf=Y({c:97,d:97,opera:49},"1"),qf=Y({c:98,d:98,opera:50},"2"),rf=Y({c:99,d:99,opera:51},"3"),sf=Y({c:100,d:100,opera:52},"4"),tf=Y({c:101,d:101,opera:53},"5"),uf=Y({c:102,d:102,opera:54},"6"),vf=Y({c:103,d:103,opera:55},"7"),wf=Y({c:104,d:104,opera:56}, -"8"),xf=Y({c:105,d:105,opera:57},"9"),yf=Y({c:106,d:106,opera:Wa?56:42},"*"),zf=Y({c:107,d:107,opera:Wa?61:43},"+"),Af=Y({c:109,d:109,opera:Wa?109:45},"-"),Bf=Y({c:110,d:110,opera:Wa?190:78},"."),Cf=Y({c:111,d:111,opera:Wa?191:47},"/");Y(Wa&&A?m:144);var Df=Y(112),Ef=Y(113),Ff=Y(114),Gf=Y(115),Hf=Y(116),If=Y(117),Jf=Y(118),Kf=Y(119),Lf=Y(120),Mf=Y(121),Nf=Y(122),Of=Y(123),Pf=Y({c:107,d:187,opera:61},"=","+"),Qf=Y(108,",");Y({c:109,d:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">"); -Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");var Rf=Y({c:59,d:186,opera:59},";",":");Y(222,"'",'"');var Sf=[Xe,We,lf,Z],Tf=new Je;Tf.set(1,Z);Tf.set(2,We);Tf.set(4,Xe);Tf.set(8,lf);var Uf=function(a){var b=new Je;y(Le(a),function(c){b.set(a.get(c).code,c)});return b}(Tf);function Qe(a,b,c){if(va(Sf,b)){var d=Uf.get(b.code),e=a.Da;e.T=c?e.T|d:e.T&~d}c?a.ea.add(b):a.ea.remove(b)}var Vf=B||A?"\r\n":"\n";Pe.prototype.h=function(a){return this.ea.contains(a)}; -function Wf(a,b){va(Sf,b)&&a.h(b)&&h(new z(13,"Cannot press a modifier key that is already pressed."));var c=b.code!==m&&Xf(a,we,b);if(c||C)if((!Yf(b)||Xf(a,qe,b,!c))&&c)if(Zf(a,b),a.$)if(b.D){if(!$f){var c=ag(a,b),d=Ee(a.e(),l)[0]+1;He(a.e(),c);Ae(a.e(),d);D&&W(a.t,ve);wd||W(a.t,ue);a.q=d}}else switch(b){case Ve:$f||(D&&W(a.t,ve),U(a.e(),"TEXTAREA")&&(c=Ee(a.e(),l)[0]+Vf.length,He(a.e(),Vf),Ae(a.e(),c),B||W(a.t,ue),a.q=c));break;case Te:case kf:$f||(c=Ee(a.e(),n),c[0]==c[1]&&(b==Te?(Ae(a.e(),c[1]- -1),Fe(a.e(),c[1])):Fe(a.e(),c[1]+1)),c=Ee(a.e(),n),c=!(c[0]==a.e().value.length||0==c[1]),He(a.e(),""),(!B&&c||C&&b==Te)&&W(a.t,ue),c=Ee(a.e(),n),a.q=c[1]);break;case ef:case gf:var c=a.e(),e=Ee(c,l)[0],f=Ee(c,n)[1],g=d=0;b==ef?a.h(Z)?a.q==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Z)?a.q==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Z)?(Ae(c,d),Fe(c,g)):Ge(c,e);a.q=e;break;case df:case cf:c=a.e(),d=Ee(c,l)[0],g=Ee(c, -n)[1],b==df?(a.h(Z)?(Ae(c,0),Fe(c,a.q==d?g:d)):Ge(c,0),a.q=0):(a.h(Z)?(a.q==d&&Ae(c,g),Fe(c,c.value.length)):Ge(c,c.value.length),a.q=c.value.length)}Qe(a,b,l)}function Yf(a){if(a.D||a==Ve)return l;if(D)return n;if(B)return a==Ze;switch(a){case Z:case We:case Xe:return n;case lf:case mf:case nf:return C;default:return l}} -function Zf(a,b){if(b==Ve&&!C&&U(a.e(),"INPUT")){var c=Db(a.e(),ke,l);if(c){var d=c.getElementsByTagName("input");(ta(d,function(a){a:{if(U(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=l;break a}}if(U(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=l;break a}a=n}return a})||1==d.length||D&&!T(534))&&le(c)}}}function bg(a,b){a.h(b)||h(new z(13,"Cannot release a key that is not pressed. ("+b.code+")"));b.code===m||Xf(a,xe,b);Qe(a,b,n)} -function ag(a,b){b.D||h(new z(13,"not a character key"));return a.h(Z)?b.Ka:b.D}var $f=C&&!T(12);function Xf(a,b,c,d){c.code===m&&h(new z(13,"Key must have a keycode to be fired."));c={altKey:a.h(Xe),ctrlKey:a.h(We),metaKey:a.h(lf),shiftKey:a.h(Z),keyCode:c.code,charCode:c.D&&b==qe?ag(a,c).charCodeAt(0):0,preventDefault:!!d};return W(a.t,b,c)}function cg(a,b){ge(a,b);a.$=Od(b);var c=ie(a);a.$&&c&&(Ge(b,b.value.length),a.q=b.value.length)};function dg(a){(!Rd(a,l)||!Kd(a)||(B||A||C&&!T("1.9.2")?0:"none"==V(a,"pointer-events")))&&h(new z(12,"Element is not currently interactable and may not be manipulated"))}function eg(a){dg(a);Od(a)||h(new z(12,"Element must be user-editable in order to clear it."));var b=fg.Ca();ge(b,a);ie(b);a.value&&(a.value="",W(a,te));Md(a)&&(a.innerHTML=" ")} -function gg(a,b,c,d){function e(a){w(a)?y(a.split(""),function(a){1!=a.length&&h(new z(13,"Argument not a single character: "+a));var b=Re[a];b||(b=a.toUpperCase(),b=Y(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.D});a=b;b=f.h(Z);a.shift&&!b&&Wf(f,Z);Wf(f,a.key);bg(f,a.key);a.shift&&!b&&bg(f,Z)}):va(Sf,a)?f.h(a)?bg(f,a):Wf(f,a):(Wf(f,a),bg(f,a))}Rd(a,l)||h(new z(11,"Element is not currently visible and may not be manipulated"));dg(a);var f=c||new Pe;cg(f,a);if((!Vb||Ta)&&D&&"date"==a.type){c= -"array"==ba(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Ta&&Vb&&(W(a,ze),W(a,ye));W(a,je);a.value=c.match(g)[0];W(a,te);W(a,se);return}}"array"==ba(b)?y(b,e):e(b);d||y(Sf,function(a){f.h(a)&&bg(f,a)})}function fg(){fe.call(this)}x(fg,fe);(function(){var a=fg;a.Ca=function(){return a.la?a.la:a.la=new a}})();function $(a,b,c,d){function e(){return{qa:f,keys:[]}}var f=!!d,g=[],p=e();g.push(p);y(b,function(a){y(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.b[a];b===m?(g.push(p=e()),f&&(p.qa=n,g.push(p=e()))):u(b)?p.keys.push(b):h(Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16)))}else switch(a){case "\n":p.keys.push(Ve);break;case "\t":p.keys.push(Ue);break;case "\b":p.keys.push(Te);break;default:p.keys.push(a)}})});y(g,function(b){gg(a,b.keys,c,b.qa)})}$.b={}; -$.b["\ue000"]=m;$.b["\ue003"]=Te;$.b["\ue004"]=Ue;$.b["\ue006"]=Ve;$.b["\ue007"]=Ve;$.b["\ue008"]=Z;$.b["\ue009"]=We;$.b["\ue00a"]=Xe;$.b["\ue00b"]=Ye;$.b["\ue00c"]=Ze;$.b["\ue00d"]=$e;$.b["\ue00e"]=af;$.b["\ue00f"]=bf;$.b["\ue010"]=cf;$.b["\ue011"]=df;$.b["\ue012"]=ef;$.b["\ue013"]=ff;$.b["\ue014"]=gf;$.b["\ue015"]=hf;$.b["\ue016"]=jf;$.b["\ue017"]=kf;$.b["\ue018"]=Rf;$.b["\ue019"]=Pf;$.b["\ue01a"]=of;$.b["\ue01b"]=pf;$.b["\ue01c"]=qf;$.b["\ue01d"]=rf;$.b["\ue01e"]=sf;$.b["\ue01f"]=tf; -$.b["\ue020"]=uf;$.b["\ue021"]=vf;$.b["\ue022"]=wf;$.b["\ue023"]=xf;$.b["\ue024"]=yf;$.b["\ue025"]=zf;$.b["\ue027"]=Af;$.b["\ue028"]=Bf;$.b["\ue029"]=Cf;$.b["\ue026"]=Qf;$.b["\ue031"]=Df;$.b["\ue032"]=Ef;$.b["\ue033"]=Ff;$.b["\ue034"]=Gf;$.b["\ue035"]=Hf;$.b["\ue036"]=If;$.b["\ue037"]=Jf;$.b["\ue038"]=Kf;$.b["\ue039"]=Lf;$.b["\ue03a"]=Mf;$.b["\ue03b"]=Nf;$.b["\ue03c"]=Of;$.b["\ue03d"]=lf;function hg(){this.U=k} -function ig(a,b,c){switch(typeof b){case "string":jg(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],ig(a,a.U?a.U.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),jg(f, -c),c.push(":"),ig(a,a.U?a.U.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var kg={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},lg=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function jg(a,b){b.push('"',a.replace(lg,function(a){if(a in kg)return kg[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return kg[a]=e+b.toString(16)}),'"')};D||A||C&&T(3.5)||B&&T(8);function mg(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,mg);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=ng(a);return b}if("document"in a)return b={},b.WINDOW=ng(a),b;if(ca(a))return ra(a,mg);a=mb(a,function(a,b){return"number"==typeof b||w(b)});return nb(a,mg);default:return m}} -function og(a,b){return"array"==ba(a)?ra(a,function(a){return og(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?pg(a.ELEMENT,b):"WINDOW"in a?pg(a.WINDOW,b):nb(a,function(a){return og(a,b)}):a}function qg(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ca=ja());b.ca||(b.ca=ja());return b}function ng(a){var b=qg(a.ownerDocument),c=pb(b,function(b){return b==a});c||(c=":wdc:"+b.ca++,b[c]=a);return c} -function pg(a,b){a=decodeURIComponent(a);var c=b||document,d=qg(c);a in d||h(new z(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new z(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new z(10,"Element is no longer attached to the DOM"))};function rg(a){var b=eg;a=[a];var c=window||ka,d;try{var b=w(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=og(a,c.document),f=b.apply(m,e);d={status:0,value:mg(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}b=[];ig(new hg,d,b);return b.join("")}var sg=["_"],tg=s;!(sg[0]in tg)&&tg.execScript&&tg.execScript("var "+sg[0]);for(var ug;sg.length&&(ug=sg.shift());)!sg.length&&u(rg)?tg[ug]=rg:tg=tg[ug]?tg[ug]:tg[ug]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +var vf=Y(Ra?{c:91,d:91,opera:219}:Qa?{c:224,d:91,opera:17}:{c:0,d:91,opera:null}),wf=Y(Ra?{c:92,d:92,opera:220}:Qa?{c:224,d:93,opera:17}:{c:0,d:92,opera:null}),xf=Y(Ra?{c:93,d:93,opera:0}:Qa?{c:0,d:0,opera:16}:{c:93,d:null,opera:0}),yf=Y({c:96,d:96,opera:48},"0"),zf=Y({c:97,d:97,opera:49},"1"),Af=Y({c:98,d:98,opera:50},"2"),Bf=Y({c:99,d:99,opera:51},"3"),Cf=Y({c:100,d:100,opera:52},"4"),Df=Y({c:101,d:101,opera:53},"5"),Ef=Y({c:102,d:102,opera:54},"6"),Ff=Y({c:103,d:103,opera:55},"7"),Gf=Y({c:104, +d:104,opera:56},"8"),Hf=Y({c:105,d:105,opera:57},"9"),If=Y({c:106,d:106,opera:Ya?56:42},"*"),Jf=Y({c:107,d:107,opera:Ya?61:43},"+"),Kf=Y({c:109,d:109,opera:Ya?109:45},"-"),Lf=Y({c:110,d:110,opera:Ya?190:78},"."),Mf=Y({c:111,d:111,opera:Ya?191:47},"/");Y(Ya&&w?null:144);var Nf=Y(112),Of=Y(113),Pf=Y(114),Qf=Y(115),Rf=Y(116),Sf=Y(117),Tf=Y(118),Uf=Y(119),Vf=Y(120),Wf=Y(121),Xf=Y(122),Yf=Y(123),Zf=Y({c:107,d:187,opera:61},"=","+"),$f=Y(108,",");Y({c:109,d:189,opera:109},"-","_");Y(188,",","<"); +Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");var ag=Y({c:59,d:186,opera:59},";",":");Y(222,"'",'"');var bg=[gf,ff,vf,Z],cg=new Se;cg.set(1,Z);cg.set(2,ff);cg.set(4,gf);cg.set(8,vf);var dg=function(a){var b=new Se;t(Ue(a),function(c){b.set(a.get(c).code,c)});return b}(cg);function $e(a,b,c){if(Aa(bg,b)){var d=dg.get(b.code),e=a.Ia;e.U=c?e.U|d:e.U&~d}c?a.ia.add(b):a.ia.remove(b)}var eg=y||w?"\r\n":"\n";Ze.prototype.h=function(a){return this.ia.contains(a)}; +function fg(a,b){if(Aa(bg,b)&&a.h(b))throw new v(13,"Cannot press a modifier key that is already pressed.");var c=null!==b.code&&gg(a,Ge,b);if((c||z)&&((!hg(b)||gg(a,Ae,b,!c))&&c)&&(ig(a,b),a.ba))if(b.D){if(!jg){var c=kg(a,b),d=Oe(a.e(),!0)[0]+1;Re(a.e(),c);Ke(a.e(),d);B&&a.F(Fe);Ad||a.F(Ee);a.p=d}}else switch(b){case ef:jg||(B&&a.F(Fe),V(a.e(),"TEXTAREA")&&(c=Oe(a.e(),!0)[0]+eg.length,Re(a.e(),eg),Ke(a.e(),c),y||a.F(Ee),a.p=c));break;case cf:case uf:jg||(c=Oe(a.e(),!1),c[0]==c[1]&&(b==cf?(Ke(a.e(), +c[1]-1),Pe(a.e(),c[1])):Pe(a.e(),c[1]+1)),c=Oe(a.e(),!1),c=!(c[0]==a.e().value.length||0==c[1]),Re(a.e(),""),(!y&&c||z&&b==cf)&&a.F(Ee),c=Oe(a.e(),!1),a.p=c[1]);break;case pf:case rf:var c=a.e(),e=Oe(c,!0)[0],f=Oe(c,!1)[1],g=d=0;b==pf?a.h(Z)?a.p==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Z)?a.p==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Z)?(Ke(c,d),Pe(c,g)):Qe(c,e);a.p=e;break;case of:case nf:c=a.e(),d=Oe(c,!0)[0], +g=Oe(c,!1)[1],b==of?(a.h(Z)?(Ke(c,0),Pe(c,a.p==d?g:d)):Qe(c,0),a.p=0):(a.h(Z)?(a.p==d&&Ke(c,g),Pe(c,c.value.length)):Qe(c,c.value.length),a.p=c.value.length)}$e(a,b,!0)}function hg(a){if(a.D||a==ef)return!0;if(B)return!1;if(y)return a==jf;switch(a){case Z:case ff:case gf:return!1;case vf:case wf:case xf:return z;default:return!0}} +function ig(a,b){if(b==ef&&!z&&V(a.e(),"INPUT")){var c=Gb(a.e(),ue,!0);if(c){var d=c.getElementsByTagName("input");(xa(d,function(a){a:{if(V(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=!0;break a}}if(V(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=!0;break a}a=!1}return a})||1==d.length||B&&!S(534))&&ve(c)}}}function lg(a,b){if(!a.h(b))throw new v(13,"Cannot release a key that is not pressed. ("+b.code+")");null===b.code||gg(a,He,b);$e(a,b,!1)} +function kg(a,b){if(!b.D)throw new v(13,"not a character key");return a.h(Z)?b.Qa:b.D}var jg=z&&!S(12);function gg(a,b,c,d){if(null===c.code)throw new v(13,"Key must have a keycode to be fired.");c={altKey:a.h(gf),ctrlKey:a.h(ff),metaKey:a.h(vf),shiftKey:a.h(Z),keyCode:c.code,charCode:c.D&&b==Ae?kg(a,c).charCodeAt(0):0,preventDefault:!!d};return a.ca(b,c)}function mg(a,b){oe(a,b);a.ba=Qd(b);var c=re(a);a.ba&&c&&(Qe(b,b.value.length),a.p=b.value.length)};function ng(a){if(!Sd(a,!0)||!Md(a)||(y||w||z&&!S("1.9.2")?0:"none"==W(a,"pointer-events")))throw new v(12,"Element is not currently interactable and may not be manipulated");}function og(a){ng(a);if(!Qd(a))throw new v(12,"Element must be user-editable in order to clear it.");var b=pg.Ha();oe(b,a);re(b);a.value&&(a.value="",se(a,De));Od(a)&&(a.innerHTML=" ")} +function qg(a,b,c,d){function e(a){p(a)?t(a.split(""),function(a){if(1!=a.length)throw new v(13,"Argument not a single character: "+a);var b=af[a];b||(b=a.toUpperCase(),b=Y(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.D});a=b;b=f.h(Z);a.shift&&!b&&fg(f,Z);fg(f,a.key);lg(f,a.key);a.shift&&!b&&lg(f,Z)}):Aa(bg,a)?f.h(a)?lg(f,a):fg(f,a):(fg(f,a),lg(f,a))}a!=Gd(a)&&(ng(a),rg(a));var f=c||new Ze;mg(f,a);if((!Wb||Va)&&B&&"date"==a.type){c="array"==ca(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/; +if(c.match(g)){Va&&Wb&&(se(a,Je),se(a,Ie));se(a,te);a.value=c.match(g)[0];se(a,De);se(a,Ce);return}}"array"==ca(b)?t(b,e):e(b);d||t(bg,function(a){f.h(a)&&lg(f,a)})}function pg(){ne.call(this)}s(pg,ne);(function(){var a=pg;a.Ha=function(){return a.qa?a.qa:a.qa=new a}})(); +function rg(a){if("scroll"==Ud(a,void 0)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Ud(a,void 0)))return;for(var b=Yd(a,void 0),c=Pd(a);c;c=Pd(c)){var d=c,e=Td(d),f;var g=d;if(!y||y&&9<=lb)k=Dd(g,"borderLeftWidth"),f=Dd(g,"borderRightWidth"),r=Dd(g,"borderTopWidth"),g=Dd(g,"borderBottomWidth"),f=new Cd(parseFloat(r),parseFloat(f),parseFloat(g),parseFloat(k));else{var k=Fd(g,"borderLeft");f=Fd(g,"borderRight");var r=Fd(g,"borderTop"),g=Fd(g,"borderBottom");f=new Cd(r,f,g,k)}k=b.left-e.left- +f.left;e=b.top-e.top-f.top;f=d.clientHeight+b.top-b.bottom;d.scrollLeft+=Math.min(k,Math.max(k-(d.clientWidth+b.left-b.right),0));d.scrollTop+=Math.min(e,Math.max(e-f,0))}Ud(a,void 0)}};function $(a,b,c,d){function e(){return{va:f,keys:[]}}var f=!!d,g=[],k=e();g.push(k);t(b,function(a){t(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.a[a];if(null===b)g.push(k=e()),f&&(k.va=!1,g.push(k=e()));else if(n(b))k.keys.push(b);else throw Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16));}else switch(a){case "\n":k.keys.push(ef);break;case "\t":k.keys.push(df);break;case "\b":k.keys.push(cf);break;default:k.keys.push(a)}})});t(g,function(b){qg(a,b.keys,c,b.va)})} +$.a={};$.a["\ue000"]=null;$.a["\ue003"]=cf;$.a["\ue004"]=df;$.a["\ue006"]=ef;$.a["\ue007"]=ef;$.a["\ue008"]=Z;$.a["\ue009"]=ff;$.a["\ue00a"]=gf;$.a["\ue00b"]=hf;$.a["\ue00c"]=jf;$.a["\ue00d"]=kf;$.a["\ue00e"]=lf;$.a["\ue00f"]=mf;$.a["\ue010"]=nf;$.a["\ue011"]=of;$.a["\ue012"]=pf;$.a["\ue013"]=qf;$.a["\ue014"]=rf;$.a["\ue015"]=sf;$.a["\ue016"]=tf;$.a["\ue017"]=uf;$.a["\ue018"]=ag;$.a["\ue019"]=Zf;$.a["\ue01a"]=yf;$.a["\ue01b"]=zf;$.a["\ue01c"]=Af;$.a["\ue01d"]=Bf;$.a["\ue01e"]=Cf;$.a["\ue01f"]=Df; +$.a["\ue020"]=Ef;$.a["\ue021"]=Ff;$.a["\ue022"]=Gf;$.a["\ue023"]=Hf;$.a["\ue024"]=If;$.a["\ue025"]=Jf;$.a["\ue027"]=Kf;$.a["\ue028"]=Lf;$.a["\ue029"]=Mf;$.a["\ue026"]=$f;$.a["\ue031"]=Nf;$.a["\ue032"]=Of;$.a["\ue033"]=Pf;$.a["\ue034"]=Qf;$.a["\ue035"]=Rf;$.a["\ue036"]=Sf;$.a["\ue037"]=Tf;$.a["\ue038"]=Uf;$.a["\ue039"]=Vf;$.a["\ue03a"]=Wf;$.a["\ue03b"]=Xf;$.a["\ue03c"]=Yf;$.a["\ue03d"]=vf;function sg(){this.V=void 0} +function tg(a,b,c){switch(typeof b){case "string":ug(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],tg(a,a.V?a.V.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +ug(f,c),c.push(":"),tg(a,a.V?a.V.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var vg={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},wg=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function ug(a,b){b.push('"',a.replace(wg,function(a){if(a in vg)return vg[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return vg[a]=e+b.toString(16)}),'"')};B||w||z&&S(3.5)||y&&S(8);function xg(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return va(a,xg);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=yg(a);return b}if("document"in a)return b={},b.WINDOW=yg(a),b;if(da(a))return va(a,xg);a=pb(a,function(a,b){return ea(b)||p(b)});return qb(a,xg);default:return null}} +function zg(a,b){return"array"==ca(a)?va(a,function(a){return zg(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?Ag(a.ELEMENT,b):"WINDOW"in a?Ag(a.WINDOW,b):qb(a,function(a){return zg(a,b)}):a}function Bg(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ga=na());b.ga||(b.ga=na());return b}function yg(a){var b=Bg(a.ownerDocument),c=sb(b,function(b){return b==a});c||(c=":wdc:"+b.ga++,b[c]=a);return c} +function Ag(a,b){a=decodeURIComponent(a);var c=b||document,d=Bg(c);if(!(a in d))throw new v(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new v(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new v(10,"Element is no longer attached to the DOM");};function Cg(a,b){var c=[a],d;try{var e=b?Ag(b.WINDOW):window,f=zg(c,e.document),g=og.apply(null,f);d={status:0,value:xg(g)}}catch(k){d={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];tg(new sg,d,c);return c.join("")}var Dg=["_"],Eg=m;Dg[0]in Eg||!Eg.execScript||Eg.execScript("var "+Dg[0]);for(var Fg;Dg.length&&(Fg=Dg.shift());)Dg.length||void 0===Cg?Eg=Eg[Fg]?Eg[Fg]:Eg[Fg]={}:Eg[Fg]=Cg;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/clear_local_storage.js b/src/ghostdriver/third_party/webdriver-atoms/clear_local_storage.js index 8e7e699a3..a276ab1a8 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/clear_local_storage.js +++ b/src/ghostdriver/third_party/webdriver-atoms/clear_local_storage.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(A()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):D?0<=v(na,a):J(a)}function W(a){return wa?va(a):S?0<=v(xa,a):0<=v(ta,a)} -var wa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.c(e,""+a)};va=function(a){return 0<=d.c(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(A());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ea,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||C||E&&V(3.5)||D&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var Ka;if(Ka=D)Ka=D&&9<=na;Ka||E&&J("1.9.1")}D&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=D&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("local_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}} -;function Xa(a){this.d=a}Xa.prototype.clear=function(){this.d.clear()};function Ya(){if(!Wa())throw new s(13,"Local storage undefined");(new Xa(r.localStorage)).clear()};function Za(){var a=Ya,b=[],c=window||r,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Pa(b,c.document),f=a.apply(k,e);d={status:0,value:X(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}a=[];Ba(new Aa,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.c(e,""+a)};va=function(a){return 0<=d.c(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ga;if(Ga=z)Ga=z&&9<=na;Ga||A&&F("1.9.1")}z&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=z&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("local_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.d=a}Ta.prototype.clear=function(){this.d.clear()};function Ua(){if(!Sa())throw new n(13,"Local storage undefined");(new Ta(m.localStorage)).clear()};function Va(){var a=Ua,b=[],c=window||m,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=La(b,c.document),f=a.apply(null,e);d={status:0,value:X(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}a=[];U(new za,d,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/clear_session_storage.js b/src/ghostdriver/third_party/webdriver-atoms/clear_session_storage.js index 069467472..8c8035cb9 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/clear_session_storage.js +++ b/src/ghostdriver/third_party/webdriver-atoms/clear_session_storage.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(A()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):D?0<=v(na,a):J(a)}function W(a){return wa?va(a):S?0<=v(xa,a):0<=v(ta,a)} -var wa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.c(e,""+a)};va=function(a){return 0<=d.c(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(A());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ea,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||C||E&&V(3.5)||D&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var Ka;if(Ka=D)Ka=D&&9<=na;Ka||E&&J("1.9.1")}D&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=D&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("session_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter"); -}};function Xa(a){this.d=a}Xa.prototype.clear=function(){this.d.clear()};function Ya(){var a;if(Wa())a=new Xa(r.sessionStorage);else throw new s(13,"Session storage undefined");a.clear()};function Za(){var a=Ya,b=[],c=window||r,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Pa(b,c.document),f=a.apply(k,e);d={status:0,value:X(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}a=[];Ba(new Aa,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.c(e,""+a)};va=function(a){return 0<=d.c(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ga;if(Ga=z)Ga=z&&9<=na;Ga||A&&F("1.9.1")}z&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=z&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("session_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.d=a}Ta.prototype.clear=function(){this.d.clear()};function Ua(){var a;if(Sa())a=new Ta(m.sessionStorage);else throw new n(13,"Session storage undefined");a.clear()};function Va(){var a=Ua,b=[],c=window||m,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=La(b,c.document),f=a.apply(null,e);d={status:0,value:X(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}a=[];U(new za,d,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/click.js b/src/ghostdriver/third_party/webdriver-atoms/click.js index e971ce8ae..20ba630b7 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/click.js +++ b/src/ghostdriver/third_party/webdriver-atoms/click.js @@ -1,142 +1,152 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r,s=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var l,m=this; 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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function t(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}var fa="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ga=0,ha=Date.now||function(){return+new Date}; -function x(a,b){function c(){}c.prototype=b.prototype;a.eb=b.prototype;a.prototype=new c;a.prototype.constructor=a};var ka=window;function la(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ma(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function na(a,b){for(var c=0,d=ma(String(a)).split("."),e=ma(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",v=e[g]||"",w=RegExp("(\\d*)(\\D*)","g"),O=RegExp("(\\d*)(\\D*)","g");do{var ia=w.exec(p)||["","",""],ja=O.exec(v)||["","",""];if(0==ia[0].length&&0==ja[0].length)break;c=((0==ia[1].length?0:parseInt(ia[1],10))<(0==ja[1].length?0:parseInt(ja[1],10))?-1:(0==ia[1].length?0:parseInt(ia[1],10))>(0==ja[1].length?0:parseInt(ja[1],10))?1:0)||((0==ia[2].length)< -(0==ja[2].length)?-1:(0==ia[2].length)>(0==ja[2].length)?1:0)||(ia[2]<ja[2]?-1:ia[2]>ja[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function y(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=u(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=u(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;y(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function ta(a,b){for(var c=a.length,d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function ua(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:u(a)?a.charAt(c):a[c]}function va(a,b){var c;a:if(u(a))c=!u(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function wa(a){return pa.concat.apply(pa,arguments)} -function xa(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var ya={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return void 0!==a}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function n(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ba(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)} +function la(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)}}function ma(a,b,c){ma=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ka:la;return ma.apply(null,arguments)} +function na(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var oa=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.hb=b.prototype;a.prototype=new c;a.prototype.constructor=a};var pa=window;function qa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ra(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} +function sa(a,b){for(var c=0,d=ra(String(a)).split("."),e=ra(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",q=e[g]||"",u=RegExp("(\\d*)(\\D*)","g"),Y=RegExp("(\\d*)(\\D*)","g");do{var w=u.exec(k)||["","",""],s=Y.exec(q)||["","",""];if(0==w[0].length&&0==s[0].length)break;c=((0==w[1].length?0:parseInt(w[1],10))<(0==s[1].length?0:parseInt(s[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==s[1].length?0:parseInt(s[1],10))?1:0)||((0==w[2].length)<(0==s[2].length)? +-1:(0==w[2].length)>(0==s[2].length)?1:0)||(w[2]<s[2]?-1:w[2]>s[2]?1:0)}while(0==c)}return c}function ta(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ua=Array.prototype;function r(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function va(a,b){for(var c=a.length,d=[],e=0,f=n(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function wa(a,b){for(var c=a.length,d=Array(c),e=n(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function xa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;r(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ya(a,b){for(var c=a.length,d=n(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 za(a,b){for(var c=a.length,d=n(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 Aa(a,b){var c;a:{c=a.length;for(var d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:n(a)?a.charAt(c):a[c]}function Ba(a,b){var c;a:if(n(a))c=n(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function Ca(a){return ua.concat.apply(ua,arguments)}function Da(a,b,c){return 2>=arguments.length?ua.slice.call(a,b):ua.slice.call(a,b,c)};var Ea={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var za="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Aa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Ba(a){Ca.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Aa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Ea(a){var b=a.match(Da);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Fa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ga(a){var b=a.match(Fa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function z(a,b){this.code=a;this.state=Ha[a]||Ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}x(z,Error); -var Ia="unknown error",Ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ha[13]=Ia;Ha[9]="unknown command";z.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa,Pa;function Qa(){return s.navigator?s.navigator.userAgent:m}Na=Ma=La=Ka=Ja=n;var Ra;if(Ra=Qa()){var Sa=s.navigator;Ja=0==Ra.indexOf("Opera");Ka=!Ja&&-1!=Ra.indexOf("MSIE");Ma=(La=!Ja&&-1!=Ra.indexOf("WebKit"))&&-1!=Ra.indexOf("Mobile");Na=!Ja&&!La&&"Gecko"==Sa.product}var A=Ja,B=Ka,C=Na,D=La,Ta=Ma,Ua,Va=s.navigator;Ua=Va&&Va.platform||"";Oa=-1!=Ua.indexOf("Mac");Pa=-1!=Ua.indexOf("Win");var Wa=-1!=Ua.indexOf("Linux");function Xa(){var a=s.document;return a?a.documentMode:k}var Ya; -a:{var Za="",$a;if(A&&s.opera)var ab=s.opera.version,Za="function"==typeof ab?ab():ab;else if(C?$a=/rv\:([^\);]+)(\)|;)/:B?$a=/MSIE\s+([^\);]+)(\)|;)/:D&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Qa()),Za=bb?bb[1]:"";if(B){var cb=Xa();if(cb>parseFloat(Za)){Ya=String(cb);break a}}Ya=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Ya,a))}function fb(a){return B&&gb>=a}var hb=s.document,gb=!hb||!B?k:Xa()||("CSS1Compat"==hb.compatMode?parseInt(Ya,10):5);var ib;!C&&!B||B&&fb(9)||C&&eb("1.9.1");B&&eb("9");var jb=B||A||D;function kb(a,b){this.x=t(a)?a:0;this.y=t(b)?b:0}kb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function lb(a,b){this.width=a;this.height=b}r=lb.prototype;r.toString=function(){return"("+this.width+" x "+this.height+")"};r.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};r.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};r.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};r.scale=function(a){this.width*=a;this.height*=a;return this};function mb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function nb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function ob(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function pb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var qb=3;function E(a){return a?new rb(F(a)):ib||(ib=new rb)}function sb(a){var b=!D&&tb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new kb(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function ub(a){return a?a.parentWindow||a.defaultView:window}function tb(a){return"CSS1Compat"==a.compatMode}function vb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function wb(a){if(jb)return a.parentElement;a=a.parentNode;return ea(a)&&1==a.nodeType?a:m} -function xb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function yb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!fb(9)){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?zb(a,b):!c&&xb(e,b)?-1*Ab(a,b):!d&&xb(f,a)?Ab(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(s.Range.START_TO_END,d)}function Ab(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return zb(d,a)}function zb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Bb(a,b){var c=[];return Cb(a,b,c,l)?c[0]:k} -function Cb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||Cb(a,b,c,d))return l;a=a.nextSibling}return n}var Db={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Eb={IMG:" ",BR:"\n"};function Fb(a,b,c){if(!(a.nodeName in Db))if(a.nodeType==qb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Eb)b.push(Eb[a.nodeName]);else for(a=a.firstChild;a;)Fb(a,b,c),a=a.nextSibling} -function Gb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function rb(a){this.D=a||s.document||document}rb.prototype.c=function(a){return u(a)?this.D.getElementById(a):a}; -function Hb(a,b,c,d){a=d||a.D;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&va(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function Ib(a){return!D&&tb(a.D)?a.D.documentElement:a.D.body}rb.prototype.contains=xb;var Jb,Kb,Lb,Mb,Nb,Ob,Pb;Pb=Ob=Nb=Mb=Lb=Kb=Jb=n;var Qb=Qa();Qb&&(-1!=Qb.indexOf("Firefox")?Jb=l:-1!=Qb.indexOf("Camino")?Kb=l:-1!=Qb.indexOf("iPhone")||-1!=Qb.indexOf("iPod")?Lb=l:-1!=Qb.indexOf("iPad")?Mb=l:-1!=Qb.indexOf("Android")?Nb=l:-1!=Qb.indexOf("Chrome")?Ob=l:-1!=Qb.indexOf("Safari")&&(Pb=l));var Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb,Vb=Nb,Wb=Ob,Xb=Pb;function Yb(a,b,c){this.j=a;this.Oa=b||1;this.u=c||1};var Zb=B&&!fb(9),$b=B&&!fb(8);function ac(a,b,c,d,e){this.j=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.cb=e;this.parentNode=b}function bc(a,b,c){var d=$b&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new ac(b,a,b.nodeName,d,c)};function cc(a){this.ma=a;this.X=0}function dc(a){a=a.match(ec);for(var b=0;b<a.length;b++)fc.test(a[b])&&a.splice(b,1);return new cc(a)}var ec=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),fc=/^\s/;function G(a,b){return a.ma[a.X+(b||0)]}cc.prototype.next=function(){return this.ma[this.X++]};cc.prototype.back=function(){this.X--};cc.prototype.empty=function(){return this.ma.length<=this.X};function gc(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Zb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Zb&&"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} -function hc(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}$b&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ic(a,b,c,d,e){return(Zb?jc:kc).call(m,a,b,u(c)?c:m,u(d)?d:m,e||new H)} -function jc(a,b,c,d,e){if(a instanceof lc||8==a.g||c&&a.g===m){var f=b.all;if(!f)return e;a=mc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)hc(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}nc(a,b,c,d,e);return e} -function kc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),y(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),y(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof oc?nc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),y(b,function(a){hc(a,c,d)&&e.add(a)}));return e} -function pc(a,b,c,d,e){var f;if((a instanceof lc||8==a.g||c&&a.g===m)&&(f=b.childNodes)){var g=mc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return hc(a,c,d)}));y(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return qc(a,b,c,d,e)}function qc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)hc(b,c,d)&&a.matches(b)&&e.add(b);return e} -function nc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)hc(b,c,d)&&a.matches(b)&&e.add(b),nc(a,b,c,d,e)}function mc(a){if(a instanceof oc){if(8==a.g)return"!";if(a.g===m)return"*"}return a.getName()};function H(){this.u=this.n=m;this.Q=0}function rc(a){this.z=a;this.next=this.K=m}function sc(a,b){if(a.n){if(!b.n)return a}else return b;for(var c=a.n,d=b.n,e=m,f=m,g=0;c&&d;)c.z==d.z||c.z instanceof ac&&d.z instanceof ac&&c.z.j==d.z.j?(f=c,c=c.next,d=d.next):0<yb(c.z,d.z)?(f=d,d=d.next):(f=c,c=c.next),(f.K=e)?e.next=f:a.n=f,e=f,g++;for(f=c||d;f;)f.K=e,e=e.next=f,g++,f=f.next;a.u=e;a.Q=g;return a} -H.prototype.unshift=function(a){a=new rc(a);a.next=this.n;this.u?this.n.K=a:this.n=this.u=a;this.n=a;this.Q++};H.prototype.add=function(a){a=new rc(a);a.K=this.u;this.n?this.u.next=a:this.n=this.u=a;this.u=a;this.Q++};function tc(a){return(a=a.n)?a.z:m}H.prototype.A=q("Q");function uc(a){return(a=tc(a))?gc(a):""}function vc(a,b){return new wc(a,!!b)}function wc(a,b){this.La=a;this.oa=(this.M=b)?a.u:a.n;this.ha=m} -wc.prototype.next=function(){var a=this.oa;if(a==m)return m;var b=this.ha=a;this.oa=this.M?a.K:a.next;return b.z};wc.prototype.remove=function(){var a=this.La,b=this.ha;b||h(Error("Next must be called at least once before remove."));var c=b.K,b=b.next;c?c.next=b:a.n=b;b?b.K=c:a.u=c;a.Q--;this.ha=m};function I(a){this.m=a;this.p=this.B=n;this.T=m}I.prototype.k=q("B");function xc(a,b){a.B=b}function yc(a,b){a.p=b}I.prototype.F=q("T");function J(a,b){var c=a.evaluate(b);return c instanceof H?+uc(c):+c}function K(a,b){var c=a.evaluate(b);return c instanceof H?uc(c):""+c}function zc(a,b){var c=a.evaluate(b);return c instanceof H?!!c.A():!!c};function Ac(a,b,c){I.call(this,a.m);this.ka=a;this.sa=b;this.za=c;this.B=b.k()||c.k();this.p=b.p||c.p;this.ka==Bc&&(!c.p&&!c.k()&&4!=c.m&&0!=c.m&&b.F()?this.T={name:b.F().name,N:c}:!b.p&&(!b.k()&&4!=b.m&&0!=b.m&&c.F())&&(this.T={name:c.F().name,N:b}))}x(Ac,I); -function Cc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof H&&c instanceof H){f=vc(b);for(b=f.next();b;b=f.next()){e=vc(c);for(d=e.next();d;d=e.next())if(a(gc(b),gc(d)))return l}return n}if(b instanceof H||c instanceof H){b instanceof H?e=b:(e=c,c=b);e=vc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+gc(d);break;case "boolean":f=!!gc(d);break;case "string":f=gc(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}Ac.prototype.evaluate=function(a){return this.ka.w(this.sa,this.za,a)};Ac.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.ka+"\n";a+=" ";b+=this.sa.toString(a)+"\n";return b+=this.za.toString(a)};function Dc(a,b,c,d){this.Na=a;this.xa=b;this.m=c;this.w=d}Dc.prototype.toString=q("Na");var Ec={}; -function L(a,b,c,d){a in Ec&&h(Error("Binary operator already created: "+a));a=new Dc(a,b,c,d);return Ec[a.toString()]=a}L("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});L("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});L("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});L("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});L("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});L("<",4,2,function(a,b,c){return Cc(function(a,b){return a<b},a,b,c)}); -L(">",4,2,function(a,b,c){return Cc(function(a,b){return a>b},a,b,c)});L("<=",4,2,function(a,b,c){return Cc(function(a,b){return a<=b},a,b,c)});L(">=",4,2,function(a,b,c){return Cc(function(a,b){return a>=b},a,b,c)});var Bc=L("=",3,2,function(a,b,c){return Cc(function(a,b){return a==b},a,b,c,l)});L("!=",3,2,function(a,b,c){return Cc(function(a,b){return a!=b},a,b,c,l)});L("and",2,2,function(a,b,c){return zc(a,c)&&zc(b,c)});L("or",1,2,function(a,b,c){return zc(a,c)||zc(b,c)});function Fc(a,b){b.A()&&4!=a.m&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));I.call(this,a.m);this.ya=a;this.i=b;this.B=a.k();this.p=a.p}x(Fc,I);Fc.prototype.evaluate=function(a){a=this.ya.evaluate(a);return Gc(this.i,a)};Fc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ya.toString(a);return b+=this.i.toString(a)};function Hc(a,b){b.length<a.va&&h(Error("Function "+a.r+" expects at least"+a.va+" arguments, "+b.length+" given"));a.ia!==m&&b.length>a.ia&&h(Error("Function "+a.r+" expects at most "+a.ia+" arguments, "+b.length+" given"));a.Ma&&y(b,function(b,d){4!=b.m&&h(Error("Argument "+d+" to function "+a.r+" is not of type Nodeset: "+b))});I.call(this,a.m);this.W=a;this.ca=b;xc(this,a.B||ta(b,function(a){return a.k()}));yc(this,a.Ka&&!b.length||a.Ja&&!!b.length||ta(b,function(a){return a.p}))}x(Hc,I); -Hc.prototype.evaluate=function(a){return this.W.w.apply(m,wa(a,this.ca))};Hc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.W+"\n";b+=" ";this.ca.length&&(a+=b+"Arguments:",b+=" ",a=sa(this.ca,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Ic(a,b,c,d,e,f,g,p,v){this.r=a;this.m=b;this.B=c;this.Ka=d;this.Ja=e;this.w=f;this.va=g;this.ia=t(p)?p:g;this.Ma=!!v}Ic.prototype.toString=q("r");var Jc={}; -function M(a,b,c,d,e,f,g,p){a in Jc&&h(Error("Function already created: "+a+"."));Jc[a]=new Ic(a,b,c,d,n,e,f,g,p)}M("boolean",2,n,n,function(a,b){return zc(b,a)},1);M("ceiling",1,n,n,function(a,b){return Math.ceil(J(b,a))},1);M("concat",3,n,n,function(a,b){var c=xa(arguments,1);return sa(c,function(b,c){return b+K(c,a)},"")},2,m);M("contains",2,n,n,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2);M("count",1,n,n,function(a,b){return b.evaluate(a).A()},1,1,l);M("false",2,n,n,aa(n),0); -M("floor",1,n,n,function(a,b){return Math.floor(J(b,a))},1);M("id",4,n,n,function(a,b){function c(a){if(Zb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ua(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.j,e=9==d.nodeType?d:d.ownerDocument,d=K(b,a).split(/\s+/),f=[];y(d,function(a){(a=c(a))&&!va(f,a)&&f.push(a)});f.sort(yb);var g=new H;y(f,function(a){g.add(a)});return g},1);M("lang",2,n,n,aa(n),1); -M("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.u},0);M("local-name",3,n,l,function(a,b){var c=b?tc(b.evaluate(a)):a.j;return c?c.nodeName.toLowerCase():""},0,1,l);M("name",3,n,l,function(a,b){var c=b?tc(b.evaluate(a)):a.j;return c?c.nodeName.toLowerCase():""},0,1,l);M("namespace-uri",3,l,n,aa(""),0,1,l);M("normalize-space",3,n,l,function(a,b){return(b?K(b,a):gc(a.j)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -M("not",2,n,n,function(a,b){return!zc(b,a)},1);M("number",1,n,l,function(a,b){return b?J(b,a):+gc(a.j)},0,1);M("position",1,l,n,function(a){return a.Oa},0);M("round",1,n,n,function(a,b){return Math.round(J(b,a))},1);M("starts-with",2,n,n,function(a,b,c){b=K(b,a);a=K(c,a);return 0==b.lastIndexOf(a,0)},2);M("string",3,n,l,function(a,b){return b?K(b,a):gc(a.j)},0,1);M("string-length",1,n,l,function(a,b){return(b?K(b,a):gc(a.j)).length},0,1); -M("substring",3,n,n,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);M("substring-after",3,n,n,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -M("substring-before",3,n,n,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);M("sum",1,n,n,function(a,b){for(var c=vc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+gc(e);return d},1,1,l);M("translate",3,n,n,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(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);M("true",2,n,n,aa(l),0);function oc(a,b){this.Ca=a;this.ta=t(b)?b:m;this.g=m;switch(a){case "comment":this.g=8;break;case "text":this.g=qb;break;case "processing-instruction":this.g=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Kc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}oc.prototype.matches=function(a){return this.g===m||this.g==a.nodeType};oc.prototype.getName=q("Ca"); -oc.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.Ca;this.ta===m||(b+="\n"+this.ta.toString(a+" "));return b};function Lc(a){I.call(this,3);this.Ba=a.substring(1,a.length-1)}x(Lc,I);Lc.prototype.evaluate=q("Ba");Lc.prototype.toString=function(a){return(a||"")+"literal: "+this.Ba};function lc(a){this.r=a.toLowerCase()}lc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.r||this.r==a.nodeName.toLowerCase()?l:this.r==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};lc.prototype.getName=q("r");lc.prototype.toString=function(a){return(a||"")+"nametest: "+this.r};function Mc(a){I.call(this,1);this.Da=a}x(Mc,I);Mc.prototype.evaluate=q("Da");Mc.prototype.toString=function(a){return(a||"")+"number: "+this.Da};function Nc(a,b){I.call(this,a.m);this.qa=a;this.U=b;this.B=a.k();this.p=a.p;if(1==this.U.length){var c=this.U[0];!c.ea&&c.C==Oc&&(c=c.aa,"*"!=c.getName()&&(this.T={name:c.getName(),N:m}))}}x(Nc,I);function Pc(){I.call(this,4)}x(Pc,I);Pc.prototype.evaluate=function(a){var b=new H;a=a.j;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Pc.prototype.toString=function(a){return a+"RootHelperExpr"};function Qc(){I.call(this,4)}x(Qc,I);Qc.prototype.evaluate=function(a){var b=new H;b.add(a.j);return b}; -Qc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Nc.prototype.evaluate=function(a){var b=this.qa.evaluate(a);b instanceof H||h(Error("FilterExpr must evaluate to nodeset."));a=this.U;for(var c=0,d=a.length;c<d&&b.A();c++){var e=a[c],f=vc(b,e.C.M),g;if(!e.k()&&e.C==Rc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Yb(g))}else if(!e.k()&&e.C==Sc)g=f.next(),b=e.evaluate(new Yb(g));else{g=f.next();for(b=e.evaluate(new Yb(g));(g=f.next())!=m;)g=e.evaluate(new Yb(g)),b=sc(b,g)}}return b}; -Nc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.qa.toString(b);this.U.length&&(c+=b+"Steps:\n",b+=" ",y(this.U,function(a){c+=a.toString(b)}));return c};function Tc(a,b){this.i=a;this.M=!!b}function Gc(a,b,c){for(c=c||0;c<a.i.length;c++)for(var d=a.i[c],e=vc(b),f=b.A(),g,p=0;g=e.next();p++){var v=a.M?f-p:p+1;g=d.evaluate(new Yb(g,v,f));var w;"number"==typeof g?w=v==g:"string"==typeof g||"boolean"==typeof g?w=!!g:g instanceof H?w=0<g.A():h(Error("Predicate.evaluate returned an unexpected type."));w||e.remove()}return b}Tc.prototype.F=function(){return 0<this.i.length?this.i[0].F():m}; -Tc.prototype.k=function(){for(var a=0;a<this.i.length;a++){var b=this.i[a];if(b.k()||1==b.m||0==b.m)return l}return n};Tc.prototype.A=function(){return this.i.length};Tc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return sa(this.i,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Uc(a,b,c,d){I.call(this,4);this.C=a;this.aa=b;this.i=c||new Tc([]);this.ea=!!d;b=this.i.F();a.Ra&&b&&(a=b.name,a=Zb?a.toLowerCase():a,this.T={name:a,N:b.N});this.B=this.i.k()}x(Uc,I); -Uc.prototype.evaluate=function(a){var b=a.j,c=m,c=this.F(),d=m,e=m,f=0;c&&(d=c.name,e=c.N?K(c.N,a):m,f=1);if(this.ea)if(!this.k()&&this.C==Vc)c=ic(this.aa,b,d,e),c=Gc(this.i,c,f);else if(a=vc((new Uc(Wc,new oc("node"))).evaluate(a)),b=a.next())for(c=this.w(b,d,e,f);(b=a.next())!=m;)c=sc(c,this.w(b,d,e,f));else c=new H;else c=this.w(a.j,d,e,f);return c};Uc.prototype.w=function(a,b,c,d){a=this.C.W(this.aa,a,b,c);return a=Gc(this.i,a,d)}; -Uc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.ea?"//":"/")+"\n";this.C.r&&(b+=a+"Axis: "+this.C+"\n");b+=this.aa.toString(a);if(this.i.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.i.length;c++)var d=c<this.i.length-1?", ":"",b=b+(this.i[c].toString(a)+d);return b};function Xc(a,b,c,d){this.r=a;this.W=b;this.M=c;this.Ra=d}Xc.prototype.toString=q("r");var Yc={}; -function N(a,b,c,d){a in Yc&&h(Error("Axis already created: "+a));b=new Xc(a,b,c,!!d);return Yc[a]=b}N("ancestor",function(a,b){for(var c=new H,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);N("ancestor-or-self",function(a,b){var c=new H,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Oc=N("attribute",function(a,b){var c=new H,d=a.getName();if("style"==d&&b.style&&Zb)return c.add(new ac(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof oc&&a.g===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Zb?g.nodeValue&&c.add(bc(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Zb?g.nodeValue&&c.add(bc(b,g,b.sourceIndex)):c.add(g));return c},n),Vc=N("child",function(a,b,c,d,e){return(Zb?pc:qc).call(m,a,b,u(c)?c:m,u(d)?d:m,e||new H)},n,l); -N("descendant",ic,n,l);var Wc=N("descendant-or-self",function(a,b,c,d){var e=new H;hc(b,c,d)&&a.matches(b)&&e.add(b);return ic(a,b,c,d,e)},n,l),Rc=N("following",function(a,b,c,d){var e=new H;do for(var f=b;f=f.nextSibling;)hc(f,c,d)&&a.matches(f)&&e.add(f),e=ic(a,f,c,d,e);while(b=b.parentNode);return e},n,l);N("following-sibling",function(a,b){for(var c=new H,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);N("namespace",function(){return new H},n); -var Zc=N("parent",function(a,b){var c=new H;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Sc=N("preceding",function(a,b,c,d){var e=new H,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var w=0,O=v.length;w<O;w++)b=v[w],hc(b,c,d)&&a.matches(b)&&e.add(b),e=ic(a,b,c,d,e)}return e},l,l); -N("preceding-sibling",function(a,b){for(var c=new H,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var $c=N("self",function(a,b){var c=new H;a.matches(b)&&c.add(b);return c},n);function ad(a){I.call(this,1);this.pa=a;this.B=a.k();this.p=a.p}x(ad,I);ad.prototype.evaluate=function(a){return-J(this.pa,a)};ad.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.pa.toString(a+" ")};function bd(a){I.call(this,4);this.Y=a;xc(this,ta(this.Y,function(a){return a.k()}));yc(this,ta(this.Y,function(a){return a.p}))}x(bd,I);bd.prototype.evaluate=function(a){var b=new H;y(this.Y,function(c){c=c.evaluate(a);c instanceof H||h(Error("PathExpr must evaluate to NodeSet."));b=sc(b,c)});return b};bd.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";y(this.Y,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function cd(a){this.a=a}function dd(a){for(var b,c=[];;){P(a,"Missing right hand side of binary expression.");b=ed(a);var d=a.a.next();if(!d)break;var e=(d=Ec[d]||m)&&d.xa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].xa;)b=new Ac(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Ac(c.pop(),c.pop(),b);return b}function P(a,b){a.a.empty()&&h(Error(b))}function fd(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function gd(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function hd(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Lc(a)}function id(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new lc(a.a.next()+a.a.next()+a.a.next()):new lc(a.a.next())} -function jd(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Pc;d=new Pc;P(a,"Missing next location step.");b=kd(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=dd(a);P(a,'unclosed "("');fd(a,")");break;case '"':case "'":b=hd(a);break;default:if(isNaN(+b))if(!Kc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=Jc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){P(a,"Missing function argument list.");d.push(dd(a));if(","!=G(a.a))break;a.a.next()}P(a,"Unclosed function argument list.");gd(a);b=new Hc(b,d)}else{b=m;break a}else b=new Mc(+a.a.next())}"["==G(a.a)&&(d=new Tc(ld(a)),b=new Fc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=kd(a,"/"),d=new Qc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),P(a,"Missing next location step."),b=kd(a,b),c.push(b);return new Nc(d, -c)} -function kd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Uc($c,new oc("node")),a.a.next(),d;if(".."==G(a.a))return d=new Uc(Zc,new oc("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Oc,a.a.next(),P(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Yc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),P(a,"Missing node name")):f=Vc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){Kc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Kc(c)||h(Error("Invalid type name: "+c));fd(a,"(");P(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=hd(a);P(a,"Bad nodetype");gd(a);c=new oc(c,g)}else c=id(a);else"*"==e?c=id(a):h(Error("Bad token: "+a.a.next()));e=new Tc(ld(a),f.M);return d||new Uc(f,c,e,"//"==b)} -function ld(a){for(var b=[];"["==G(a.a);){a.a.next();P(a,"Missing predicate expression.");var c=dd(a);b.push(c);P(a,"Unclosed predicate expression.");fd(a,"]")}return b}function ed(a){if("-"==G(a.a))return a.a.next(),new ad(ed(a));var b=jd(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)P(a,"Missing next union location path."),b.push(jd(a));a.a.back();a=new bd(b)}return a};function md(a){a.length||h(Error("Empty XPath expression."));a=dc(a);a.empty()&&h(Error("Invalid XPath expression."));var b=dd(new cd(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Yb(a));return new Q(e,d)}} -function Q(a,b){0==b&&(a instanceof H?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof H))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof H?uc(a):""+a;break;case 1:this.numberValue=a instanceof H?+uc(a):+a;break;case 3:this.booleanValue=a instanceof H?0<a.A():!!a;break;case 4:case 5:case 6:case 7:var d=vc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof ac?e.j:e);this.snapshotLength=a.A();this.invalidIteratorState=n;break;case 8:case 9:d=tc(a);this.singleNodeValue=d instanceof ac?d.j:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -Q.ANY_TYPE=0;Q.NUMBER_TYPE=1;Q.STRING_TYPE=2;Q.BOOLEAN_TYPE=3;Q.UNORDERED_NODE_ITERATOR_TYPE=4;Q.ORDERED_NODE_ITERATOR_TYPE=5;Q.UNORDERED_NODE_SNAPSHOT_TYPE=6;Q.ORDERED_NODE_SNAPSHOT_TYPE=7;Q.ANY_UNORDERED_NODE_TYPE=8;Q.FIRST_ORDERED_NODE_TYPE=9;function nd(a){a=a||s;var b=a.document;b.evaluate||(a.XPathResult=Q,b.evaluate=function(a,b,e,f){return(new md(a)).evaluate(b,f)},b.createExpression=function(a){return new md(a)})};var R={};R.Fa=function(){var a={fb:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();R.w=function(a,b,c){var d=F(a);(B||Vb)&&nd(ub(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):R.Fa;return B&&!eb(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){C&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new z(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -R.da=function(a,b){(!a||1!=a.nodeType)&&h(new z(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};R.G=function(a,b){var c=function(){var c=R.w(b,a,9);return c?(c=c.singleNodeValue,A?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||R.da(c,a);return c}; -R.v=function(a,b){var c=function(){var c=R.w(b,a,7);if(c){var e=c.snapshotLength;A&&!t(e)&&R.da(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();y(c,function(b){R.da(b,a)});return c};function od(a){return(a=a.exec(Qa()))?a[1]:""}var pd=function(){if(Rb)return od(/Firefox\/([0-9.]+)/);if(B||A)return Ya;if(Wb)return od(/Chrome\/([0-9.]+)/);if(Xb)return od(/Version\/([0-9.]+)/);if(Tb||Ub){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Qa());if(a)return a[1]+"."+a[2]}else{if(Vb)return(a=od(/Android\s+([0-9.]+)/))?a:od(/Version\/([0-9.]+)/);if(Sb)return od(/Camino\/([0-9.]+)/)}return""}();var qd,rd;function S(a){return sd?qd(a):B?0<=na(gb,a):eb(a)}function td(a){return sd?rd(a):Vb?0<=na(ud,a):0<=na(pd,a)} -var sd=function(){if(!C)return n;var a=s.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;qd=function(a){return 0<=d.Ga(e,""+a)};rd=function(a){return 0<=d.Ga(f,""+a)};return l}(),vd=Ub||Tb,wd;if(Vb){var xd=/Android\s+([0-9\.]+)/.exec(Qa());wd=xd?xd[1]:"0"}else wd="0"; -var ud=wd,yd=B&&!fb(8),zd=fb(9),Ad=B&&!fb(9),Bd=fb(10),Cd=B&&!fb(10);Vb&&td(2.3);!A&&(!D||S("533"));function Dd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Dd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};Dd.prototype.contains=function(a){return!this||!a?n:a instanceof Dd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function Ed(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function Fd(a,b){return Ed(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function Gd(a){a=a?F(a):document;var b;if(b=B)if(b=!fb(9))b=E(a),b=!tb(b.D);return b?a.body:a.documentElement} -function Hd(a){var b=a.getBoundingClientRect();B&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function Id(a){if(B&&!fb(8))return a.offsetParent;var b=F(a),c=Fd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Fd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function Jd(a){var b,c=F(a),d=Fd(a,"position"),e=C&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new kb(0,0),g=Gd(c);if(a==g)return f;if(a.getBoundingClientRect)b=Hd(a),a=E(c),a=sb(a.D),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(D&&"fixed"==Fd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(A||D&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=Id(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!A||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function Kd(a){var b=new kb;if(1==a.nodeType){if(a.getBoundingClientRect){var c=Hd(a);b.x=c.left;b.y=c.top}else{var c=E(a),c=sb(c.D),d=Jd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(C&&!eb(12)){var e;B?e="-ms-transform":D?e="-webkit-transform":A?e="-o-transform":C&&(e="-moz-transform");var f;e&&(f=Fd(a,e));f||(f=Fd(a,"transform"));f?(a=f.match(Ld),a=!a?new kb(0,0):new kb(parseFloat(a[1]),parseFloat(a[2]))):a=new kb(0,0);b=new kb(b.x+a.x,b.y+a.y)}}else e=da(a.ra),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.ra().targetTouches&& -(f=a.ra().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function Md(a){if("none"!=Fd(a,"display"))return Nd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Nd(a);b.display=c;b.position=e;b.visibility=d;return a}function Nd(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(!t(b)||d)&&a.getBoundingClientRect?(a=Hd(a),new lb(a.right-a.left,a.bottom-a.top)):new lb(b,c)}var Od={thin:2,medium:4,thick:6}; -function Pd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Od)d=Od[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var Ld=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Qd(a){var b;a:{a=F(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function T(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Rd(a){return Sd(a,l)&&Td(a)&&!(B||A||C&&!S("1.9.2")?0:"none"==U(a,"pointer-events"))}function Ud(a){return T(a,"OPTION")?l:T(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Vd(a,b){var c;if(c=yd)if(c="value"==b)if(c=T(a,"OPTION"))c=Wd(a,"value")===m;c?(c=[],Fb(a,c,n),c=c.join("")):c=a[b];return c} -var Xd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function Yd(a){var b=[];y(a.split(Xd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return A?b.replace(/\w+:;/g,""):b} -function Wd(a,b){b=b.toLowerCase();if("style"==b)return Yd(a.style.cssText);if(yd&&"value"==b&&T(a,"INPUT"))return a.value;if(Ad&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Zd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Td(a){var b=a.tagName.toUpperCase();return!va(Zd,b)?l:Vd(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Td(a.parentNode):Gb(a,function(a){var b=a.parentNode;if(b&&T(b,"FIELDSET")&&Vd(b,"disabled")){if(!T(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:vb(a.previousSibling);)if(T(a,"LEGEND"))return l}return n},l)?n:l}var $d="text search tel url email password number".split(" "); -function ae(a){return T(a,"TEXTAREA")?l:T(a,"INPUT")?va($d,a.type.toLowerCase()):be(a)?l:n}function be(a){function b(a){return"inherit"==a.contentEditable?(a=ce(a))?b(a):n:"true"==a.contentEditable}return!t(a.contentEditable)?n:!B&&t(a.isContentEditable)?a.isContentEditable:b(a)}function ce(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return T(a)?a:m} -function U(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Ad?"styleFloat":"cssFloat";c=Ed(a,c)||de(a,c);if(c===m)c=m;else if(va(za,b)&&(Ca.test("#"==c.charAt(0)?c:"#"+c)||Ga(c).length||ya&&ya[c.toLowerCase()]||Ea(c).length)){var d=Ea(c);if(!d.length){a:if(d=Ga(c),!d.length){d=ya[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Ca.test(d)&&(d=Ba(d),d=Ba(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function de(a,b){var c=a.currentStyle||a.style,d=c[b];!t(d)&&da(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?t(d)?d:m:(c=ce(a))?de(c,b):m} -function ee(a){if(da(a.getBBox)&&!T(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(T(a,"BODY")){b=ub(F(a))||k;"hidden"!=U(a,"overflow")?a=l:(a=ce(a),!a||!T(a,"HTML")?a=l:(a=U(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ka).document;var b=a.documentElement,d=a.body;d||h(new z(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new lb(b,a)}else b=(b||window).document,b=tb(b)?b.documentElement:b.body,b=new lb(b.clientWidth,b.clientHeight);return b}return Md(a)} -function Sd(a,b){function c(a){if("none"==U(a,"display"))return n;a=ce(a);return!a||c(a)}function d(a){var b=ee(a);return 0<b.height&&0<b.width?l:T(a,"PATH")&&(0<b.height||0<b.width)?(b=U(a,"stroke-width"),!!b&&0<parseInt(b,10)):ta(a.childNodes,function(b){return b.nodeType==qb&&"hidden"!=U(a,"overflow")||T(b)&&d(b)})}function e(a,b){var c;if((c=b==m?wb(a):wb(b))&&("hidden"==U(c,"overflow-x")||"hidden"==U(c,"overflow-y"))){var d=ee(c),f=Kd(c),g=Kd(a);return f.x+d.width<=g.x&&"hidden"==U(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==U(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=U(a,"-o-transform")||U(a,"-webkit-transform")||U(a,"-ms-transform")||U(a,"-moz-transform")||U(a,"transform");if(b&&"none"!==b)return b=Kd(a),a=ee(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=ce(a);return!a||f(a)}T(a)||h(Error("Argument to isShown must be of type Element"));if(T(a,"OPTION")||T(a,"OPTGROUP")){var g=Gb(a,function(a){return T(a,"SELECT")});return!!g&&Sd(g,l)}if(T(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?R.G('/descendant::*[@usemap = "#'+a.name+'"]',g):Bb(g,function(b){return T(b)&&Wd(b,"usemap")=="#"+a.name});return!!g&&Sd(g,b)}return T(a,"AREA")?(g=Gb(a,function(a){return T(a,"MAP")}),!!g&&Sd(g,b)):T(a,"INPUT")&&"hidden"==a.type.toLowerCase()||T(a,"NOSCRIPT")||"hidden"==U(a,"visibility")||!c(a)||!b&&0==fe(a)||!d(a)||!e(a,m)?n:f(a)}function ge(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function he(a){var b=[];ie(a,b);b=ra(b,ge);return ge(b.join("\n")).replace(/\xa0/g," ")} -function ie(a,b){if(T(a,"BR"))b.push("");else{var c=T(a,"TD"),d=U(a,"display"),e=!c&&!va(je,d),f=a.previousElementSibling!=k?a.previousElementSibling:vb(a.previousSibling),f=f?U(f,"display"):"",g=U(a,"float")||U(a,"cssFloat")||U(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var p=Sd(a),v=m,w=m;p&&(v=U(a,"white-space"),w=U(a,"text-transform"));y(a.childNodes,function(a){a.nodeType==qb&&p?ke(a,b,v,w):T(a)&&ie(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!la(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var je="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function ke(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";la(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function fe(a){if(Cd){if("relative"==U(a,"position"))return 1;a=U(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return le(a)}function le(a){var b=1,c=U(a,"opacity");c&&(b=Number(c));(a=ce(a))&&(b*=le(a));return b};var me={na:function(a){return!(!a.querySelectorAll||!a.querySelector)},G:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(me.na(b))return b.querySelector("."+a.replace(/\./g,"\\."))||m;var c=Hb(E(b),"*",a,b);return c.length?c[0]:m},v:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return me.na(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):Hb(E(b),"*",a,b)}};var ne={G:function(a,b){!da(b.querySelector)&&(B&&S(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:m},v:function(a,b){!da(b.querySelectorAll)&&(B&&S(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);return b.querySelectorAll(a)}};var oe={},pe={};oe.Aa=function(a,b,c){var d;try{d=ne.v("a",b)}catch(e){d=Hb(E(b),"A",m,b)}return ua(d,function(b){b=he(b);return c&&-1!=b.indexOf(a)||b==a})};oe.ua=function(a,b,c){var d;try{d=ne.v("a",b)}catch(e){d=Hb(E(b),"A",m,b)}return qa(d,function(b){b=he(b);return c&&-1!=b.indexOf(a)||b==a})};oe.G=function(a,b){return oe.Aa(a,b,n)};oe.v=function(a,b){return oe.ua(a,b,n)};pe.G=function(a,b){return oe.Aa(a,b,l)};pe.v=function(a,b){return oe.ua(a,b,l)};var qe={G:function(a,b){return b.getElementsByTagName(a)[0]||m},v:function(a,b){return b.getElementsByTagName(a)}};var re={className:me,"class name":me,css:ne,"css selector":ne,id:{G:function(a,b){var c=E(b),d=c.c(a);if(!d)return m;if(Wd(d,"id")==a&&xb(b,d))return d;c=Hb(c,"*");return ua(c,function(c){return Wd(c,"id")==a&&xb(b,c)})},v:function(a,b){var c=Hb(E(b),"*",m,b);return qa(c,function(b){return Wd(b,"id")==a})}},linkText:oe,"link text":oe,name:{G:function(a,b){var c=Hb(E(b),"*",m,b);return ua(c,function(b){return Wd(b,"name")==a})},v:function(a,b){var c=Hb(E(b),"*",m,b);return qa(c,function(b){return Wd(b, -"name")==a})}},partialLinkText:pe,"partial link text":pe,tagName:qe,"tag name":qe,xpath:R};function se(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=m}if(c){var d=re[c];if(d&&da(d.v))return d.v(a[c],b||ka.document)}h(Error("Unsupported locator strategy: "+c))};function te(a){this.d=ka.document.documentElement;this.q=m;var b=Qd(this.d);b&&ue(this,b);this.R=a||new ve}te.prototype.c=q("d");function ue(a,b){a.d=b;a.q=T(b,"OPTION")?Gb(b,function(a){return T(a,"SELECT")}):m} -function we(a,b,c,d,e,f,g){if(!g&&!Rd(a.d))return n;e&&!(xe==b||ye==b)&&h(new z(12,"Event type does not allow related target: "+b));c={clientX:c.x,clientY:c.y,button:d,altKey:a.R.h(4),ctrlKey:a.R.h(2),shiftKey:a.R.h(1),metaKey:a.R.h(8),wheelDelta:f||0,relatedTarget:e||m};return(a=a.q?ze(a,b):a.d)?V(a,b,c):l} -function ze(a,b){if(B)switch(b){case xe:case Ae:return m;case Be:case Ce:case De:return a.q.multiple?a.q:m;default:return a.q}if(A)switch(b){case Be:case xe:return a.q.multiple?a.d:m;default:return a.d}if(D)switch(b){case Ee:case Fe:return a.q.multiple?a.d:a.q;default:return a.q.multiple?a.d:m}return a.d} -function Ge(a){a=a.q||a.d;var b=Qd(a);if(a==b)return n;if(b&&(da(b.blur)||B&&ea(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){B&&"Unspecified error."==c.message||h(c)}B&&!S(8)&&ub(F(a)).focus()}return da(a.focus)||B&&ea(a.focus)?(A&&S(11)&&!Sd(a)?V(a,He):a.focus(),l):n}var Ie=D||A||sd&&td(3.6);function Je(a){if(T(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b)return l}return T(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)?l:n} -function Ke(a){if(Ie||!a.href)return n;if(!sd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=ub(F(a)),c=b.location.href;a=Le(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function Me(a){return T(a,"FORM")} -function Ne(a){Me(a)||h(new z(12,"Element is not a form, so could not submit."));if(V(a,Oe))if(T(a.submit))if(!B||S(8))a.constructor.prototype.submit.call(a);else{var b=se({id:"submit"},a),c=se({name:"submit"},a);y(b,function(a){a.removeAttribute("id")});y(c,function(a){a.removeAttribute("name")});a=a.submit;y(b,function(a){a.setAttribute("id","submit")});y(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}var Pe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function Le(a,b){var c=b.match(Pe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function ve(){this.Z=0}ve.prototype.h=function(a){return 0!=(this.Z&a)};var Qe=!(B&&!S(10))&&!A,Re=Vb?!td(4):!vd,Se=B&&ka.navigator.msPointerEnabled;function W(a,b,c){this.g=a;this.H=b;this.I=c}W.prototype.create=function(a){a=F(a);Ad?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.g,this.H,this.I));return a};W.prototype.toString=q("g");function Te(a,b,c){W.call(this,a,b,c)}x(Te,W); -Te.prototype.create=function(a,b){!C&&this==Ue&&h(new z(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(Ad){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ye||this==xe)Object.defineProperty?(c=this==ye,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)): -d.relatedTarget=b.relatedTarget;this==Ve&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=ub(c);d=c.createEvent("MouseEvents");c=1;if(this==Ve&&(C||(d.wheelDelta=b.wheelDelta),C||A))c=b.wheelDelta/-40;C&&this==Ue&&(c=b.wheelDelta);d.initMouseEvent(this.g,this.H,this.I,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(B&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=Ib(E(a)),c=Gd(a),f=b.clientX+e.scrollLeft-c.clientLeft, -g=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function We(a,b,c){W.call(this,a,b,c)}x(We,W); -We.prototype.create=function(a,b){var c=F(a);if(C){var d=ub(c),e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.g,this.H,this.I,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.g==Xe&&b.preventDefault&&c.preventDefault()}else Ad?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.g,this.H,this.I)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode,D&&(c.charCode=this==Xe?c.keyCode: -0);return c};function Ye(a,b,c){W.call(this,a,b,c)}x(Ye,W); -Ye.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}Qe||h(new z(9,"Browser does not support firing touch events."));var e=F(a),f=ub(e),g=Re?d(b.changedTouches): -c(b.changedTouches),p=b.touches==b.changedTouches?g:Re?d(b.touches):c(b.touches),v=b.targetTouches==b.changedTouches?g:Re?d(b.targetTouches):c(b.targetTouches),w;Re?(w=e.createEvent("MouseEvents"),w.initMouseEvent(this.g,this.H,this.I,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),w.touches=p,w.targetTouches=v,w.changedTouches=g,w.scale=b.scale,w.rotation=b.rotation):(w=e.createEvent("TouchEvent"),Vb?w.initTouchEvent(p,v,g,this.g,f,0,0,b.clientX,b.clientY,b.ctrlKey, -b.altKey,b.shiftKey,b.metaKey):w.initTouchEvent(this.g,this.H,this.I,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,v,g,b.scale,b.rotation),w.relatedTarget=b.relatedTarget);return w};function Ze(a,b,c){W.call(this,a,b,c)}x(Ze,W); -Ze.prototype.create=function(a,b){Se||h(new z(9,"Browser does not support MSPointer events."));var c=F(a),d=ub(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.g,this.H,this.I,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Pa,b.rotation,b.Sa,b.Ta,b.pointerId,b.pointerType,0,b.Ia);return c}; -var $e=new W("blur",n,n),af=new W("change",l,n),He=new W("focus",n,n),bf=new W("input",n,n),Oe=new W("submit",l,l),cf=new W("textInput",l,l),Ee=new Te("click",l,l),Be=new Te("contextmenu",l,l),df=new Te("dblclick",l,l),ef=new Te("mousedown",l,l),Ce=new Te("mousemove",l,n),ye=new Te("mouseout",l,l),xe=new Te("mouseover",l,l),Fe=new Te("mouseup",l,l),Ve=new Te(C?"DOMMouseScroll":"mousewheel",l,l),Ue=new Te("MozMousePixelScroll",l,l),ff=new We("keydown",l,l),Xe=new We("keypress",l,l),gf=new We("keyup", -l,l),hf=new Ye("touchend",l,l),jf=new Ye("touchstart",l,l),kf=new Ze("MSPointerDown",l,l),De=new Ze("MSPointerMove",l,l),Ae=new Ze("MSPointerOver",l,l),lf=new Ze("MSPointerOut",l,l),mf=new Ze("MSPointerUp",l,l);function V(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return Ad?a.fireEvent("on"+b.g,c):a.dispatchEvent(c)};function nf(a,b){if(of(a))a.selectionStart=b;else if(B){var c=pf(a),d=c[0];d.inRange(c[1])&&(b=qf(a,b),d.collapse(l),d.move("character",b),d.select())}} -function rf(a,b){var c=0,d=0;if(of(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(B){var e=pf(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,p=e=c.text,v=n;!v;)0==f.compareEndPoints("StartToEnd",f)?v=l:(f.moveEnd("character",-1),f.text==g?d+="\r\n":v=l);if(b)f=[d.length,-1];else{for(f=n;!f;)0==c.compareEndPoints("StartToEnd",c)?f=l:(c.moveEnd("character",-1),c.text==e?p+="\r\n":f=l);f=[d.length,d.length+p.length]}return f}c= -f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function sf(a,b){if(of(a))a.selectionEnd=b;else if(B){var c=pf(a),d=c[1];c[0].inRange(d)&&(b=qf(a,b),c=qf(a,rf(a,l)[0]),d.collapse(l),d.moveEnd("character",b-c),d.select())}}function tf(a,b){if(of(a))a.selectionStart=b,a.selectionEnd=b;else if(B){b=qf(a,b);var c=a.createTextRange();c.collapse(l);c.move("character",b);c.select()}} -function uf(a,b){if(of(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else B?(d=pf(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select())):h(Error("Cannot set the selection end"))}function pf(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} -function qf(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function of(a){try{return"number"==typeof a.selectionStart}catch(b){return n}};function vf(a){if("function"==typeof a.P)return a.P();if(u(a))return a.split("");if(ca(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ob(a)};function wf(a,b){this.o={};this.l=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.ba(a)}r=wf.prototype;r.O=0;r.Ea=0;r.P=function(){xf(this);for(var a=[],b=0;b<this.l.length;b++)a.push(this.o[this.l[b]]);return a};function yf(a){xf(a);return a.l.concat()}r.remove=function(a){return zf(this.o,a)?(delete this.o[a],this.O--,this.Ea++,this.l.length>2*this.O&&xf(this),l):n}; -function xf(a){if(a.O!=a.l.length){for(var b=0,c=0;b<a.l.length;){var d=a.l[b];zf(a.o,d)&&(a.l[c++]=d);b++}a.l.length=c}if(a.O!=a.l.length){for(var e={},c=b=0;b<a.l.length;)d=a.l[b],zf(e,d)||(a.l[c++]=d,e[d]=1),b++;a.l.length=c}}r.get=function(a,b){return zf(this.o,a)?this.o[a]:b};r.set=function(a,b){zf(this.o,a)||(this.O++,this.l.push(a),this.Ea++);this.o[a]=b}; -r.ba=function(a){var b;if(a instanceof wf)b=yf(a),a=a.P();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=ob(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function zf(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Af(a){this.o=new wf;a&&this.ba(a)}function Bf(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a}r=Af.prototype;r.add=function(a){this.o.set(Bf(a),a)};r.ba=function(a){a=vf(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};r.remove=function(a){return this.o.remove(Bf(a))};r.contains=function(a){a=Bf(a);return zf(this.o.o,a)};r.P=function(){return this.o.P()};function Cf(a){te.call(this);this.fa=ae(this.c())&&!Vd(this.c(),"readOnly");this.s=0;this.la=new Af;a&&(y(a.pressed,function(a){Df(this,a,l)},this),this.s=a.currentPos)}x(Cf,te);var Ef={};function X(a,b,c){ea(a)&&(a=C?a.e:A?a.opera:a.f);a=new Ff(a,b,c);if(b&&(!(b in Ef)||c))Ef[b]={key:a,shift:n},c&&(Ef[c]={key:a,shift:l});return a}function Ff(a,b,c){this.code=a;this.J=b||m;this.Qa=c||this.J}var Gf=X(8),Hf=X(9),If=X(13),Y=X(16),Jf=X(17),Kf=X(18),Lf=X(19);X(20); -var Mf=X(27),Nf=X(32," "),Of=X(33),Pf=X(34),Qf=X(35),Rf=X(36),Sf=X(37),Tf=X(38),Uf=X(39),Vf=X(40);X(44);var Wf=X(45),Xf=X(46);X(48,"0",")");X(49,"1","!");X(50,"2","@");X(51,"3","#");X(52,"4","$");X(53,"5","%");X(54,"6","^");X(55,"7","&");X(56,"8","*");X(57,"9","(");X(65,"a","A");X(66,"b","B");X(67,"c","C");X(68,"d","D");X(69,"e","E");X(70,"f","F");X(71,"g","G");X(72,"h","H");X(73,"i","I");X(74,"j","J");X(75,"k","K");X(76,"l","L");X(77,"m","M");X(78,"n","N");X(79,"o","O");X(80,"p","P");X(81,"q","Q"); -X(82,"r","R");X(83,"s","S");X(84,"t","T");X(85,"u","U");X(86,"v","V");X(87,"w","W");X(88,"x","X");X(89,"y","Y");X(90,"z","Z"); -var Yf=X(Pa?{e:91,f:91,opera:219}:Oa?{e:224,f:91,opera:17}:{e:0,f:91,opera:m}),Zf=X(Pa?{e:92,f:92,opera:220}:Oa?{e:224,f:93,opera:17}:{e:0,f:92,opera:m}),$f=X(Pa?{e:93,f:93,opera:0}:Oa?{e:0,f:0,opera:16}:{e:93,f:m,opera:0}),ag=X({e:96,f:96,opera:48},"0"),bg=X({e:97,f:97,opera:49},"1"),cg=X({e:98,f:98,opera:50},"2"),dg=X({e:99,f:99,opera:51},"3"),eg=X({e:100,f:100,opera:52},"4"),fg=X({e:101,f:101,opera:53},"5"),gg=X({e:102,f:102,opera:54},"6"),hg=X({e:103,f:103,opera:55},"7"),ig=X({e:104,f:104,opera:56}, -"8"),jg=X({e:105,f:105,opera:57},"9"),kg=X({e:106,f:106,opera:Wa?56:42},"*"),lg=X({e:107,f:107,opera:Wa?61:43},"+"),mg=X({e:109,f:109,opera:Wa?109:45},"-"),ng=X({e:110,f:110,opera:Wa?190:78},"."),og=X({e:111,f:111,opera:Wa?191:47},"/");X(Wa&&A?m:144);var pg=X(112),qg=X(113),rg=X(114),sg=X(115),tg=X(116),ug=X(117),vg=X(118),wg=X(119),xg=X(120),yg=X(121),zg=X(122),Ag=X(123),Bg=X({e:107,f:187,opera:61},"=","+"),Cg=X(108,",");X({e:109,f:189,opera:109},"-","_");X(188,",","<");X(190,".",">"); -X(191,"/","?");X(192,"`","~");X(219,"[","{");X(220,"\\","|");X(221,"]","}");var Dg=X({e:59,f:186,opera:59},";",":");X(222,"'",'"');var Eg=[Kf,Jf,Yf,Y],Fg=new wf;Fg.set(1,Y);Fg.set(2,Jf);Fg.set(4,Kf);Fg.set(8,Yf);var Gg=function(a){var b=new wf;y(yf(a),function(c){b.set(a.get(c).code,c)});return b}(Fg);function Df(a,b,c){if(va(Eg,b)){var d=Gg.get(b.code),e=a.R;e.Z=c?e.Z|d:e.Z&~d}c?a.la.add(b):a.la.remove(b)}var Hg=B||A?"\r\n":"\n";Cf.prototype.h=function(a){return this.la.contains(a)}; -function Ig(a,b){va(Eg,b)&&a.h(b)&&h(new z(13,"Cannot press a modifier key that is already pressed."));var c=b.code!==m&&Jg(a,ff,b);if(c||C)if((!Kg(b)||Jg(a,Xe,b,!c))&&c)if(Lg(a,b),a.fa)if(b.J){if(!Mg){var c=Ng(a,b),d=rf(a.c(),l)[0]+1;uf(a.c(),c);nf(a.c(),d);D&&V(a.d,cf);Ad||V(a.d,bf);a.s=d}}else switch(b){case If:Mg||(D&&V(a.d,cf),T(a.c(),"TEXTAREA")&&(c=rf(a.c(),l)[0]+Hg.length,uf(a.c(),Hg),nf(a.c(),c),B||V(a.d,bf),a.s=c));break;case Gf:case Xf:Mg||(c=rf(a.c(),n),c[0]==c[1]&&(b==Gf?(nf(a.c(),c[1]- -1),sf(a.c(),c[1])):sf(a.c(),c[1]+1)),c=rf(a.c(),n),c=!(c[0]==a.c().value.length||0==c[1]),uf(a.c(),""),(!B&&c||C&&b==Gf)&&V(a.d,bf),c=rf(a.c(),n),a.s=c[1]);break;case Sf:case Uf:var c=a.c(),e=rf(c,l)[0],f=rf(c,n)[1],g=d=0;b==Sf?a.h(Y)?a.s==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Y)?a.s==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Y)?(nf(c,d),sf(c,g)):tf(c,e);a.s=e;break;case Rf:case Qf:c=a.c(),d=rf(c,l)[0],g=rf(c, -n)[1],b==Rf?(a.h(Y)?(nf(c,0),sf(c,a.s==d?g:d)):tf(c,0),a.s=0):(a.h(Y)?(a.s==d&&nf(c,g),sf(c,c.value.length)):tf(c,c.value.length),a.s=c.value.length)}Df(a,b,l)}function Kg(a){if(a.J||a==If)return l;if(D)return n;if(B)return a==Mf;switch(a){case Y:case Jf:case Kf:return n;case Yf:case Zf:case $f:return C;default:return l}} -function Lg(a,b){if(b==If&&!C&&T(a.c(),"INPUT")){var c=Gb(a.c(),Me,l);if(c){var d=c.getElementsByTagName("input");(ta(d,function(a){return Je(a)})||1==d.length||D&&!S(534))&&Ne(c)}}}function Og(a,b){a.h(b)||h(new z(13,"Cannot release a key that is not pressed. ("+b.code+")"));b.code===m||Jg(a,gf,b);Df(a,b,n)}function Ng(a,b){b.J||h(new z(13,"not a character key"));return a.h(Y)?b.Qa:b.J}var Mg=C&&!S(12); -function Jg(a,b,c,d){c.code===m&&h(new z(13,"Key must have a keycode to be fired."));c={altKey:a.h(Kf),ctrlKey:a.h(Jf),metaKey:a.h(Yf),shiftKey:a.h(Y),keyCode:c.code,charCode:c.J&&b==Xe?Ng(a,c).charCodeAt(0):0,preventDefault:!!d};return V(a.d,b,c)}function Pg(a,b){ue(a,b);a.fa=ae(b)&&!Vd(b,"readOnly");var c=Ge(a);a.fa&&c&&(tf(b,b.value.length),a.s=b.value.length)};function Qg(a,b){te.call(this,b);this.V=this.t=m;this.L=new kb(0,0);this.ga=this.S=n;if(a){this.t=a.Ua;try{T(a.Ha)&&(this.V=a.Ha)}catch(c){this.t=m}this.L=a.Va;this.S=a.bb;this.ga=a.Wa;try{T(a.element)&&ue(this,a.element)}catch(d){this.t=m}}}x(Qg,te);var Z={}; -Ad?(Z[Ee]=[0,0,0,m],Z[Be]=[m,m,0,m],Z[Fe]=[1,4,2,m],Z[ye]=[0,0,0,0],Z[Ce]=[1,4,2,0]):D||zd?(Z[Ee]=[0,1,2,m],Z[Be]=[m,m,2,m],Z[Fe]=[0,1,2,m],Z[ye]=[0,1,2,0],Z[Ce]=[0,1,2,0]):(Z[Ee]=[0,1,2,m],Z[Be]=[m,m,2,m],Z[Fe]=[0,1,2,m],Z[ye]=[0,0,0,0],Z[Ce]=[0,0,0,0]);Bd&&(Z[kf]=Z[Fe],Z[mf]=Z[Fe],Z[De]=[-1,-1,-1,-1],Z[lf]=Z[De],Z[Ae]=Z[De]);Z[df]=Z[Ee];Z[ef]=Z[Fe];Z[xe]=Z[ye];var Rg={Xa:kf,Ya:De,Za:lf,$a:Ae,ab:mf}; -Qg.prototype.move=function(a,b){var c=Rd(a),d=Kd(a);this.L.x=b.x+d.x;this.L.y=b.y+d.y;d=this.c();if(a!=d){try{ub(F(d)).closed&&(d=m)}catch(e){d=m}if(d){var f=d===ka.document.documentElement||d===ka.document.body,d=!this.ga&&f?m:d;Sg(this,ye,a)}ue(this,a);B||Sg(this,xe,d,m,c)}Sg(this,Ce,m,m,c);B&&a!=d&&Sg(this,xe,d,m,c);this.S=n}; -function Sg(a,b,c,d,e){a.ga=l;if(Bd){var f=Rg[b],g;if(g=f){g=a.L;var p=Tg(a,f),v=MSPointerEvent.MSPOINTER_TYPE_MOUSE;!e&&!Rd(a.d)?f=n:(c&&!(Ae==f||lf==f)&&h(new z(12,"Event type does not allow related target: "+f)),g={clientX:g.x,clientY:g.y,button:p,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:c||m,width:0,height:0,Pa:0,rotation:0,pointerId:1,Sa:0,Ta:0,pointerType:v,Ia:l},f=(p=a.q?ze(a,f):a.d)?V(p,f,g):l);g=!f}if(g)return n}return we(a,b,a.L,Tg(a,b),c,d,e)} -function Tg(a,b){if(!(b in Z))return 0;var c=Z[b][a.t===m?3:a.t];c===m&&h(new z(13,"Event does not permit the specified mouse button."));return c};function Ug(a,b){this.x=a;this.y=b}x(Ug,kb);Ug.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Ug.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Vg(a){Sd(a,l)||h(new z(11,"Element is not currently visible and may not be manipulated"))} -function Wg(a,b,c,d){function e(a){u(a)?y(a.split(""),function(a){1!=a.length&&h(new z(13,"Argument not a single character: "+a));var b=Ef[a];b||(b=a.toUpperCase(),b=X(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.J});a=b;b=f.h(Y);a.shift&&!b&&Ig(f,Y);Ig(f,a.key);Og(f,a.key);a.shift&&!b&&Og(f,Y)}):va(Eg,a)?f.h(a)?Og(f,a):Ig(f,a):(Ig(f,a),Og(f,a))}Vg(a);Rd(a)||h(new z(12,"Element is not currently interactable and may not be manipulated"));var f=c||new Cf;Pg(f,a);if((!Xb||Ta)&&D&&"date"==a.type){c= -"array"==ba(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Ta&&Xb&&(V(a,jf),V(a,hf));V(a,He);a.value=c.match(g)[0];V(a,af);V(a,$e);return}}"array"==ba(b)?y(b,e):e(b);d||y(Eg,function(a){f.h(a)&&Og(f,a)})} -function Xg(a,b,c){Vg(a);var d=F(a),d=D?d.body:d.documentElement,e;e=Jd(a);var f=Jd(d),g;if(B){var p=Pd(d,"borderLeft");g=Pd(d,"borderRight");var v=Pd(d,"borderTop"),w=Pd(d,"borderBottom");g=new Dd(v,g,w,p)}else p=Ed(d,"borderLeftWidth"),g=Ed(d,"borderRightWidth"),v=Ed(d,"borderTopWidth"),w=Ed(d,"borderBottomWidth"),g=new Dd(parseFloat(v),parseFloat(g),parseFloat(w),parseFloat(p));p=e.x-f.x-g.left;e=e.y-f.y-g.top;f=d.clientHeight-a.offsetHeight;g=d.scrollLeft;v=d.scrollTop;g+=Math.min(p,Math.max(p- -(d.clientWidth-a.offsetWidth),0));v+=Math.min(e,Math.max(e-f,0));e=new kb(g,v);d.scrollLeft=e.x;d.scrollTop=e.y;b?b=new Ug(b.x,b.y):(b=Yg(a),b=new Ug(b.width/2,b.height/2));c=c||new Qg;c.move(a,b);c.t!==m&&h(new z(13,"Cannot press more then one button or an already pressed button."));c.t=0;c.V=c.c();var O;a=C&&!td(4);(D||a)&&(T(c.c(),"OPTION")||T(c.c(),"SELECT"))?O=l:((a=C||B)&&(O=Qd(c.c())),O=(b=Sg(c,ef))&&a&&O!=Qd(c.c())?n:b);O&&Ge(c);c.t===m&&h(new z(13,"Cannot release a button when no button is pressed.")); -Sg(c,Fe);if(0==c.t&&c.c()==c.V){O=c.L;a=Tg(c,Ee);if(Rd(c.d)){d=b=m;if(!Ie)for(e=c.d;e;e=e.parentNode)if(T(e,"A")){b=e;break}else if(Je(e)){d=e;break}if(f=e=Ud(c.d)){f=c.d;Ud(f)||h(new z(15,"Element is not selectable"));p="selected";g=f.type&&f.type.toLowerCase();if("checkbox"==g||"radio"==g)p="checked";f=!!Vd(f,p)}if(c.q&&(p=c.q,!f||p.multiple))c.d.selected=!f,(!D||!p.multiple||Vb&&td(4))&&V(p,af);B&&d?d.click():we(c,Ee,O,a)&&(b&&Ke(b)?(O=b,a=O.href,b=ub(F(O)),B&&!S(8)&&(a=Le(b.location,a)),O.target? -b.open(a,O.target):b.location.href=a):e&&!c.q&&(!C&&!D&&!(f&&"radio"==c.d.type.toLowerCase()))&&(c.d.checked=!f,A&&!S(11)&&V(c.d,af)))}c.S&&Sg(c,df);c.S=!c.S}else 2==c.t&&Sg(c,Be);c.t=m;c.V=m}function Yg(a){var b=Md(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Yg(a.offsetParent)};function $(a,b,c,d){function e(){return{wa:f,keys:[]}}var f=!!d,g=[],p=e();g.push(p);y(b,function(a){y(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.b[a];b===m?(g.push(p=e()),f&&(p.wa=n,g.push(p=e()))):t(b)?p.keys.push(b):h(Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16)))}else switch(a){case "\n":p.keys.push(If);break;case "\t":p.keys.push(Hf);break;case "\b":p.keys.push(Gf);break;default:p.keys.push(a)}})});y(g,function(b){Wg(a,b.keys,c,b.wa)})}$.b={}; -$.b["\ue000"]=m;$.b["\ue003"]=Gf;$.b["\ue004"]=Hf;$.b["\ue006"]=If;$.b["\ue007"]=If;$.b["\ue008"]=Y;$.b["\ue009"]=Jf;$.b["\ue00a"]=Kf;$.b["\ue00b"]=Lf;$.b["\ue00c"]=Mf;$.b["\ue00d"]=Nf;$.b["\ue00e"]=Of;$.b["\ue00f"]=Pf;$.b["\ue010"]=Qf;$.b["\ue011"]=Rf;$.b["\ue012"]=Sf;$.b["\ue013"]=Tf;$.b["\ue014"]=Uf;$.b["\ue015"]=Vf;$.b["\ue016"]=Wf;$.b["\ue017"]=Xf;$.b["\ue018"]=Dg;$.b["\ue019"]=Bg;$.b["\ue01a"]=ag;$.b["\ue01b"]=bg;$.b["\ue01c"]=cg;$.b["\ue01d"]=dg;$.b["\ue01e"]=eg;$.b["\ue01f"]=fg; -$.b["\ue020"]=gg;$.b["\ue021"]=hg;$.b["\ue022"]=ig;$.b["\ue023"]=jg;$.b["\ue024"]=kg;$.b["\ue025"]=lg;$.b["\ue027"]=mg;$.b["\ue028"]=ng;$.b["\ue029"]=og;$.b["\ue026"]=Cg;$.b["\ue031"]=pg;$.b["\ue032"]=qg;$.b["\ue033"]=rg;$.b["\ue034"]=sg;$.b["\ue035"]=tg;$.b["\ue036"]=ug;$.b["\ue037"]=vg;$.b["\ue038"]=wg;$.b["\ue039"]=xg;$.b["\ue03a"]=yg;$.b["\ue03b"]=zg;$.b["\ue03c"]=Ag;$.b["\ue03d"]=Yf;function Zg(){this.$=k} -function $g(a,b,c){switch(typeof b){case "string":ah(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],$g(a,a.$?a.$.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),ah(f, -c),c.push(":"),$g(a,a.$?a.$.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var bh={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ch=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function ah(a,b){b.push('"',a.replace(ch,function(a){if(a in bh)return bh[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return bh[a]=e+b.toString(16)}),'"')};D||A||C&&S(3.5)||B&&S(8);function dh(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,dh);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=eh(a);return b}if("document"in a)return b={},b.WINDOW=eh(a),b;if(ca(a))return ra(a,dh);a=mb(a,function(a,b){return"number"==typeof b||u(b)});return nb(a,dh);default:return m}} -function fh(a,b){return"array"==ba(a)?ra(a,function(a){return fh(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?gh(a.ELEMENT,b):"WINDOW"in a?gh(a.WINDOW,b):nb(a,function(a){return fh(a,b)}):a}function hh(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ja=ha());b.ja||(b.ja=ha());return b}function eh(a){var b=hh(a.ownerDocument),c=pb(b,function(b){return b==a});c||(c=":wdc:"+b.ja++,b[c]=a);return c} -function gh(a,b){a=decodeURIComponent(a);var c=b||document,d=hh(c);a in d||h(new z(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new z(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new z(10,"Element is no longer attached to the DOM"))};function ih(a){var b=Xg;a=[a];var c=window||ka,d;try{var b=u(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=fh(a,c.document),f=b.apply(m,e);d={status:0,value:dh(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}b=[];$g(new Zg,d,b);return b.join("")}var jh=["_"],kh=s;!(jh[0]in kh)&&kh.execScript&&kh.execScript("var "+jh[0]);for(var lh;jh.length&&(lh=jh.shift());)!jh.length&&t(ih)?kh[lh]=ih:kh=kh[lh]?kh[lh]:kh[lh]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Fa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ga=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ha=/^#(?:[0-9a-f]{3}){1,2}$/i,Ia=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ja=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.state=Ka[a]||La;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}p(t,Error); +var La="unknown error",Ka={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ka[13]=La;Ka[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Ma,Na,Oa,Pa,Qa,Ra,Sa;function Ta(){return m.navigator?m.navigator.userAgent:null}Qa=Pa=Oa=Na=Ma=!1;var Ua;if(Ua=Ta()){var Va=m.navigator;Ma=0==Ua.indexOf("Opera");Na=!Ma&&-1!=Ua.indexOf("MSIE");Pa=(Oa=!Ma&&-1!=Ua.indexOf("WebKit"))&&-1!=Ua.indexOf("Mobile");Qa=!Ma&&!Oa&&"Gecko"==Va.product}var v=Ma,x=Na,y=Qa,z=Oa,Wa=Pa,Xa,Ya=m.navigator;Xa=Ya&&Ya.platform||"";Ra=-1!=Xa.indexOf("Mac");Sa=-1!=Xa.indexOf("Win");var Za=-1!=Xa.indexOf("Linux"); +function $a(){var a=m.document;return a?a.documentMode:void 0}var ab;a:{var bb="",cb;if(v&&m.opera)var db=m.opera.version,bb="function"==typeof db?db():db;else if(y?cb=/rv\:([^\);]+)(\)|;)/:x?cb=/MSIE\s+([^\);]+)(\)|;)/:z&&(cb=/WebKit\/(\S+)/),cb)var eb=cb.exec(Ta()),bb=eb?eb[1]:"";if(x){var fb=$a();if(fb>parseFloat(bb)){ab=String(fb);break a}}ab=bb}var gb={};function hb(a){return gb[a]||(gb[a]=0<=sa(ab,a))}function ib(a){return x&&jb>=a} +var kb=m.document,jb=kb&&x?$a()||("CSS1Compat"==kb.compatMode?parseInt(ab,10):5):void 0;var lb;!y&&!x||x&&ib(9)||y&&hb("1.9.1");x&&hb("9");function mb(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0}l=mb.prototype;l.toString=function(){return"("+this.x+", "+this.y+")"};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function nb(a,b){this.width=a;this.height=b}l=nb.prototype;l.toString=function(){return"("+this.width+" x "+this.height+")"};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function ob(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function pb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function qb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function rb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var sb=3;function tb(a){return a?new ub(A(a)):lb||(lb=new ub)}function vb(a){a=a.document;a=zb(a)?a.documentElement:a.body;return new nb(a.clientWidth,a.clientHeight)}function B(a){return a?a.parentWindow||a.defaultView:window}function zb(a){return"CSS1Compat"==a.compatMode}function Ab(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function Bb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Cb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!ib(9)){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?Db(a,b):!c&&Bb(e,b)?-1*Eb(a,b):!d&&Bb(f,a)?Eb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=A(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function Eb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Db(d,a)}function Db(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function A(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var Fb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Gb={IMG:" ",BR:"\n"}; +function Hb(a,b,c){if(!(a.nodeName in Fb))if(a.nodeType==sb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Gb)b.push(Gb[a.nodeName]);else for(a=a.firstChild;a;)Hb(a,b,c),a=a.nextSibling}function Ib(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function ub(a){this.F=a||m.document||document}ub.prototype.c=function(a){return n(a)?this.F.getElementById(a):a}; +function Jb(a,b,c,d){a=d||a.F;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&Ba(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} +function Kb(a){return!z&&zb(a.F)?a.F.documentElement:a.F.body||a.F.documentElement}ub.prototype.contains=Bb;var Lb,Mb,Nb,Ob,Pb,Qb,Rb;Rb=Qb=Pb=Ob=Nb=Mb=Lb=!1;var Sb=Ta();Sb&&(-1!=Sb.indexOf("Firefox")?Lb=!0:-1!=Sb.indexOf("Camino")?Mb=!0:-1!=Sb.indexOf("iPhone")||-1!=Sb.indexOf("iPod")?Nb=!0:-1!=Sb.indexOf("iPad")?Ob=!0:-1!=Sb.indexOf("Android")?Pb=!0:-1!=Sb.indexOf("Chrome")?Qb=!0:-1!=Sb.indexOf("Safari")&&(Rb=!0));var Tb=Lb,Ub=Mb,Vb=Nb,Wb=Ob,Xb=Pb,Yb=Qb,Zb=Rb;function $b(a,b,c){this.j=a;this.Wa=b||1;this.u=c||1};var ac=x&&!ib(9),bc=x&&!ib(8);function cc(a,b,c,d,e){this.j=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.gb=e;this.parentNode=b}function dc(a,b,c){var d=bc&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new cc(b,a,b.nodeName,d,c)};function ec(a){this.ta=a;this.ba=0}function fc(a){a=a.match(gc);for(var b=0;b<a.length;b++)hc.test(a[b])&&a.splice(b,1);return new ec(a)}var gc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),hc=/^\s/;function C(a,b){return a.ta[a.ba+(b||0)]}ec.prototype.next=function(){return this.ta[this.ba++]};ec.prototype.back=function(){this.ba--};ec.prototype.empty=function(){return this.ta.length<=this.ba};function ic(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(ac&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),ac&&"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} +function jc(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}bc&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function kc(a,b,c,d,e){return(ac?lc:mc).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new D)} +function lc(a,b,c,d,e){if(a instanceof nc||8==a.g||c&&null===a.g){var f=b.all;if(!f)return e;a=oc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)jc(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}pc(a,b,c,d,e);return e} +function mc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),r(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof qc?pc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),r(b,function(a){jc(a,c,d)&&e.add(a)}));return e} +function rc(a,b,c,d,e){var f;if((a instanceof nc||8==a.g||c&&null===a.g)&&(f=b.childNodes)){var g=oc(a);if("*"!=g&&(f=va(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=va(f,function(a){return jc(a,c,d)}));r(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return sc(a,b,c,d,e)}function sc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)jc(b,c,d)&&a.matches(b)&&e.add(b);return e} +function pc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)jc(b,c,d)&&a.matches(b)&&e.add(b),pc(a,b,c,d,e)}function oc(a){if(a instanceof qc){if(8==a.g)return"!";if(null===a.g)return"*"}return a.getName()};function D(){this.u=this.n=null;this.U=0}function tc(a){this.B=a;this.next=this.O=null}function uc(a,b){if(!a.n)return b;if(!b.n)return a;for(var c=a.n,d=b.n,e=null,f=null,g=0;c&&d;)c.B==d.B||c.B instanceof cc&&d.B instanceof cc&&c.B.j==d.B.j?(f=c,c=c.next,d=d.next):0<Cb(c.B,d.B)?(f=d,d=d.next):(f=c,c=c.next),(f.O=e)?e.next=f:a.n=f,e=f,g++;for(f=c||d;f;)f.O=e,e=e.next=f,g++,f=f.next;a.u=e;a.U=g;return a} +D.prototype.unshift=function(a){a=new tc(a);a.next=this.n;this.u?this.n.O=a:this.n=this.u=a;this.n=a;this.U++};D.prototype.add=function(a){a=new tc(a);a.O=this.u;this.n?this.u.next=a:this.n=this.u=a;this.u=a;this.U++};function vc(a){return(a=a.n)?a.B:null}D.prototype.A=h("U");function wc(a){return(a=vc(a))?ic(a):""}function xc(a,b){return new yc(a,!!b)}function yc(a,b){this.Sa=a;this.va=(this.P=b)?a.u:a.n;this.na=null} +yc.prototype.next=function(){var a=this.va;if(null==a)return null;var b=this.na=a;this.va=this.P?a.O:a.next;return b.B};yc.prototype.remove=function(){var a=this.Sa,b=this.na;if(!b)throw Error("Next must be called at least once before remove.");var c=b.O,b=b.next;c?c.next=b:a.n=b;b?b.O=c:a.u=c;a.U--;this.na=null};function E(a){this.m=a;this.p=this.C=!1;this.X=null}function G(a){return"\n "+a.toString().split("\n").join("\n ")}E.prototype.k=h("C");function zc(a,b){a.C=b}function Ac(a,b){a.p=b}E.prototype.G=h("X");function H(a,b){var c=a.evaluate(b);return c instanceof D?+wc(c):+c}function I(a,b){var c=a.evaluate(b);return c instanceof D?wc(c):""+c}function Bc(a,b){var c=a.evaluate(b);return c instanceof D?!!c.A():!!c};function Cc(a,b,c){E.call(this,a.m);this.ra=a;this.za=b;this.Ga=c;this.C=b.k()||c.k();this.p=b.p||c.p;this.ra==Dc&&(c.p||c.k()||4==c.m||0==c.m||!b.G()?b.p||(b.k()||4==b.m||0==b.m||!c.G())||(this.X={name:c.G().name,Q:b}):this.X={name:b.G().name,Q:c})}p(Cc,E); +function Ec(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof D&&c instanceof D){e=xc(b);for(d=e.next();d;d=e.next())for(b=xc(c),f=b.next();f;f=b.next())if(a(ic(d),ic(f)))return!0;return!1}if(b instanceof D||c instanceof D){b instanceof D?e=b:(e=c,c=b);e=xc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+ic(d);break;case "boolean":d=!!ic(d);break;case "string":d=ic(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}Cc.prototype.evaluate=function(a){return this.ra.w(this.za,this.Ga,a)};Cc.prototype.toString=function(){var a="Binary Expression: "+this.ra,a=a+G(this.za);return a+=G(this.Ga)};function Fc(a,b,c,d){this.Va=a;this.Ea=b;this.m=c;this.w=d}Fc.prototype.toString=h("Va");var Gc={}; +function J(a,b,c,d){if(Gc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Fc(a,b,c,d);return Gc[a.toString()]=a}J("div",6,1,function(a,b,c){return H(a,c)/H(b,c)});J("mod",6,1,function(a,b,c){return H(a,c)%H(b,c)});J("*",6,1,function(a,b,c){return H(a,c)*H(b,c)});J("+",5,1,function(a,b,c){return H(a,c)+H(b,c)});J("-",5,1,function(a,b,c){return H(a,c)-H(b,c)});J("<",4,2,function(a,b,c){return Ec(function(a,b){return a<b},a,b,c)}); +J(">",4,2,function(a,b,c){return Ec(function(a,b){return a>b},a,b,c)});J("<=",4,2,function(a,b,c){return Ec(function(a,b){return a<=b},a,b,c)});J(">=",4,2,function(a,b,c){return Ec(function(a,b){return a>=b},a,b,c)});var Dc=J("=",3,2,function(a,b,c){return Ec(function(a,b){return a==b},a,b,c,!0)});J("!=",3,2,function(a,b,c){return Ec(function(a,b){return a!=b},a,b,c,!0)});J("and",2,2,function(a,b,c){return Bc(a,c)&&Bc(b,c)});J("or",1,2,function(a,b,c){return Bc(a,c)||Bc(b,c)});function Hc(a,b){if(b.A()&&4!=a.m)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");E.call(this,a.m);this.Fa=a;this.i=b;this.C=a.k();this.p=a.p}p(Hc,E);Hc.prototype.evaluate=function(a){a=this.Fa.evaluate(a);return Ic(this.i,a)};Hc.prototype.toString=function(){var a;a="Filter:"+G(this.Fa);return a+=G(this.i)};function Jc(a,b){if(b.length<a.Ca)throw Error("Function "+a.t+" expects at least"+a.Ca+" arguments, "+b.length+" given");if(null!==a.oa&&b.length>a.oa)throw Error("Function "+a.t+" expects at most "+a.oa+" arguments, "+b.length+" given");a.Ta&&r(b,function(b,d){if(4!=b.m)throw Error("Argument "+d+" to function "+a.t+" is not of type Nodeset: "+b);});E.call(this,a.m);this.aa=a;this.ha=b;zc(this,a.C||ya(b,function(a){return a.k()}));Ac(this,a.Ra&&!b.length||a.Qa&&!!b.length||ya(b,function(a){return a.p}))} +p(Jc,E);Jc.prototype.evaluate=function(a){return this.aa.w.apply(null,Ca(a,this.ha))};Jc.prototype.toString=function(){var a="Function: "+this.aa;if(this.ha.length)var b=xa(this.ha,function(a,b){return a+G(b)},"Arguments:"),a=a+G(b);return a};function Kc(a,b,c,d,e,f,g,k,q){this.t=a;this.m=b;this.C=c;this.Ra=d;this.Qa=e;this.w=f;this.Ca=g;this.oa=ca(k)?k:g;this.Ta=!!q}Kc.prototype.toString=h("t");var Lc={}; +function K(a,b,c,d,e,f,g,k){if(Lc.hasOwnProperty(a))throw Error("Function already created: "+a+".");Lc[a]=new Kc(a,b,c,d,!1,e,f,g,k)}K("boolean",2,!1,!1,function(a,b){return Bc(b,a)},1);K("ceiling",1,!1,!1,function(a,b){return Math.ceil(H(b,a))},1);K("concat",3,!1,!1,function(a,b){var c=Da(arguments,1);return xa(c,function(b,c){return b+I(c,a)},"")},2,null);K("contains",2,!1,!1,function(a,b,c){b=I(b,a);a=I(c,a);return-1!=b.indexOf(a)},2); +K("count",1,!1,!1,function(a,b){return b.evaluate(a).A()},1,1,!0);K("false",2,!1,!1,aa(!1),0);K("floor",1,!1,!1,function(a,b){return Math.floor(H(b,a))},1); +K("id",4,!1,!1,function(a,b){function c(a){if(ac){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return Aa(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.j,e=9==d.nodeType?d:d.ownerDocument,d=I(b,a).split(/\s+/),f=[];r(d,function(a){(a=c(a))&&!Ba(f,a)&&f.push(a)});f.sort(Cb);var g=new D;r(f,function(a){g.add(a)});return g},1);K("lang",2,!1,!1,aa(!1),1); +K("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.u},0);K("local-name",3,!1,!0,function(a,b){var c=b?vc(b.evaluate(a)):a.j;return c?c.nodeName.toLowerCase():""},0,1,!0);K("name",3,!1,!0,function(a,b){var c=b?vc(b.evaluate(a)):a.j;return c?c.nodeName.toLowerCase():""},0,1,!0);K("namespace-uri",3,!0,!1,aa(""),0,1,!0);K("normalize-space",3,!1,!0,function(a,b){return(b?I(b,a):ic(a.j)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +K("not",2,!1,!1,function(a,b){return!Bc(b,a)},1);K("number",1,!1,!0,function(a,b){return b?H(b,a):+ic(a.j)},0,1);K("position",1,!0,!1,function(a){return a.Wa},0);K("round",1,!1,!1,function(a,b){return Math.round(H(b,a))},1);K("starts-with",2,!1,!1,function(a,b,c){b=I(b,a);a=I(c,a);return 0==b.lastIndexOf(a,0)},2);K("string",3,!1,!0,function(a,b){return b?I(b,a):ic(a.j)},0,1);K("string-length",1,!1,!0,function(a,b){return(b?I(b,a):ic(a.j)).length},0,1); +K("substring",3,!1,!1,function(a,b,c,d){c=H(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?H(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=I(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);K("substring-after",3,!1,!1,function(a,b,c){b=I(b,a);a=I(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +K("substring-before",3,!1,!1,function(a,b,c){b=I(b,a);a=I(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);K("sum",1,!1,!1,function(a,b){for(var c=xc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+ic(e);return d},1,1,!0);K("translate",3,!1,!1,function(a,b,c,d){b=I(b,a);c=I(c,a);var e=I(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);K("true",2,!1,!1,aa(!0),0);function qc(a,b){this.Ja=a;this.Aa=ca(b)?b:null;this.g=null;switch(a){case "comment":this.g=8;break;case "text":this.g=sb;break;case "processing-instruction":this.g=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Mc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}qc.prototype.matches=function(a){return null===this.g||this.g==a.nodeType};qc.prototype.getName=h("Ja"); +qc.prototype.toString=function(){var a="Kind Test: "+this.Ja;null===this.Aa||(a+=G(this.Aa));return a};function Nc(a){E.call(this,3);this.Ia=a.substring(1,a.length-1)}p(Nc,E);Nc.prototype.evaluate=h("Ia");Nc.prototype.toString=function(){return"Literal: "+this.Ia};function nc(a,b){this.t=a.toLowerCase();this.pa=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}nc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.t&&this.t!=a.nodeName.toLowerCase()?!1:this.pa==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};nc.prototype.getName=h("t");nc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.pa?"":this.pa+":")+this.t};function Oc(a){E.call(this,1);this.Ka=a}p(Oc,E);Oc.prototype.evaluate=h("Ka");Oc.prototype.toString=function(){return"Number: "+this.Ka};function Pc(a,b){E.call(this,a.m);this.xa=a;this.Y=b;this.C=a.k();this.p=a.p;if(1==this.Y.length){var c=this.Y[0];c.ja||c.D!=Qc||(c=c.fa,"*"!=c.getName()&&(this.X={name:c.getName(),Q:null}))}}p(Pc,E);function Rc(){E.call(this,4)}p(Rc,E);Rc.prototype.evaluate=function(a){var b=new D;a=a.j;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Rc.prototype.toString=aa("Root Helper Expression");function Sc(){E.call(this,4)}p(Sc,E);Sc.prototype.evaluate=function(a){var b=new D;b.add(a.j);return b}; +Sc.prototype.toString=aa("Context Helper Expression"); +Pc.prototype.evaluate=function(a){var b=this.xa.evaluate(a);if(!(b instanceof D))throw Error("Filter expression must evaluate to nodeset.");a=this.Y;for(var c=0,d=a.length;c<d&&b.A();c++){var e=a[c],f=xc(b,e.D.P),g;if(e.k()||e.D!=Tc)if(e.k()||e.D!=Uc)for(g=f.next(),b=e.evaluate(new $b(g));null!=(g=f.next());)g=e.evaluate(new $b(g)),b=uc(b,g);else g=f.next(),b=e.evaluate(new $b(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new $b(g))}}return b}; +Pc.prototype.toString=function(){var a;a="Path Expression:"+G(this.xa);if(this.Y.length){var b=xa(this.Y,function(a,b){return a+G(b)},"Steps:");a+=G(b)}return a};function Vc(a,b){this.i=a;this.P=!!b}function Ic(a,b,c){for(c=c||0;c<a.i.length;c++)for(var d=a.i[c],e=xc(b),f=b.A(),g,k=0;g=e.next();k++){var q=a.P?f-k:k+1;g=d.evaluate(new $b(g,q,f));if("number"==typeof g)q=q==g;else if("string"==typeof g||"boolean"==typeof g)q=!!g;else if(g instanceof D)q=0<g.A();else throw Error("Predicate.evaluate returned an unexpected type.");q||e.remove()}return b}Vc.prototype.G=function(){return 0<this.i.length?this.i[0].G():null}; +Vc.prototype.k=function(){for(var a=0;a<this.i.length;a++){var b=this.i[a];if(b.k()||1==b.m||0==b.m)return!0}return!1};Vc.prototype.A=function(){return this.i.length};Vc.prototype.toString=function(){return xa(this.i,function(a,b){return a+G(b)},"Predicates:")};function Wc(a,b,c,d){E.call(this,4);this.D=a;this.fa=b;this.i=c||new Vc([]);this.ja=!!d;b=this.i.G();a.Za&&b&&(a=b.name,a=ac?a.toLowerCase():a,this.X={name:a,Q:b.Q});this.C=this.i.k()}p(Wc,E); +Wc.prototype.evaluate=function(a){var b=a.j,c=null,c=this.G(),d=null,e=null,f=0;c&&(d=c.name,e=c.Q?I(c.Q,a):null,f=1);if(this.ja)if(this.k()||this.D!=Xc)if(a=xc((new Wc(Yc,new qc("node"))).evaluate(a)),b=a.next())for(c=this.w(b,d,e,f);null!=(b=a.next());)c=uc(c,this.w(b,d,e,f));else c=new D;else c=kc(this.fa,b,d,e),c=Ic(this.i,c,f);else c=this.w(a.j,d,e,f);return c};Wc.prototype.w=function(a,b,c,d){a=this.D.aa(this.fa,a,b,c);return a=Ic(this.i,a,d)}; +Wc.prototype.toString=function(){var a;a="Step:"+G("Operator: "+(this.ja?"//":"/"));this.D.t&&(a+=G("Axis: "+this.D));a+=G(this.fa);if(this.i.A()){var b=xa(this.i.i,function(a,b){return a+G(b)},"Predicates:");a+=G(b)}return a};function Zc(a,b,c,d){this.t=a;this.aa=b;this.P=c;this.Za=d}Zc.prototype.toString=h("t");var $c={};function L(a,b,c,d){if($c.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Zc(a,b,c,!!d);return $c[a]=b} +L("ancestor",function(a,b){for(var c=new D,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);L("ancestor-or-self",function(a,b){var c=new D,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Qc=L("attribute",function(a,b){var c=new D,d=a.getName();if("style"==d&&b.style&&ac)return c.add(new cc(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof qc&&null===a.g||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)ac?g.nodeValue&&c.add(dc(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(ac?g.nodeValue&&c.add(dc(b,g,b.sourceIndex)):c.add(g));return c},!1),Xc=L("child",function(a,b,c,d,e){return(ac?rc:sc).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new D)}, +!1,!0);L("descendant",kc,!1,!0);var Yc=L("descendant-or-self",function(a,b,c,d){var e=new D;jc(b,c,d)&&a.matches(b)&&e.add(b);return kc(a,b,c,d,e)},!1,!0),Tc=L("following",function(a,b,c,d){var e=new D;do for(var f=b;f=f.nextSibling;)jc(f,c,d)&&a.matches(f)&&e.add(f),e=kc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);L("following-sibling",function(a,b){for(var c=new D,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);L("namespace",function(){return new D},!1); +var ad=L("parent",function(a,b){var c=new D;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Uc=L("preceding",function(a,b,c,d){var e=new D,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var q=[];for(b=f[g];b=b.previousSibling;)q.unshift(b);for(var u=0,Y=q.length;u<Y;u++)b=q[u],jc(b,c,d)&&a.matches(b)&&e.add(b),e=kc(a,b,c,d,e)}return e},!0,!0); +L("preceding-sibling",function(a,b){for(var c=new D,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var bd=L("self",function(a,b){var c=new D;a.matches(b)&&c.add(b);return c},!1);function cd(a){E.call(this,1);this.wa=a;this.C=a.k();this.p=a.p}p(cd,E);cd.prototype.evaluate=function(a){return-H(this.wa,a)};cd.prototype.toString=function(){return"Unary Expression: -"+G(this.wa)};function dd(a){E.call(this,4);this.ca=a;zc(this,ya(this.ca,function(a){return a.k()}));Ac(this,ya(this.ca,function(a){return a.p}))}p(dd,E);dd.prototype.evaluate=function(a){var b=new D;r(this.ca,function(c){c=c.evaluate(a);if(!(c instanceof D))throw Error("Path expression must evaluate to NodeSet.");b=uc(b,c)});return b};dd.prototype.toString=function(){return xa(this.ca,function(a,b){return a+G(b)},"Union Expression:")};function ed(a,b){this.b=a;this.Ua=b}function fd(a){for(var b,c=[];;){M(a,"Missing right hand side of binary expression.");b=gd(a);var d=a.b.next();if(!d)break;var e=(d=Gc[d]||null)&&d.Ea;if(!e){a.b.back();break}for(;c.length&&e<=c[c.length-1].Ea;)b=new Cc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Cc(c.pop(),c.pop(),b);return b}function M(a,b){if(a.b.empty())throw Error(b);}function hd(a,b){var c=a.b.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function id(a){a=a.b.next();if(")"!=a)throw Error("Bad token: "+a);}function jd(a){a=a.b.next();if(2>a.length)throw Error("Unclosed literal string");return new Nc(a)}function kd(a){var b=a.b.next(),c=b.indexOf(":");if(-1==c)return new nc(b);var d=b.substring(0,c);a=a.Ua(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new nc(b,a)} +function ld(a){var b,c=[],d;if("/"==C(a.b)||"//"==C(a.b)){b=a.b.next();d=C(a.b);if("/"==b&&(a.b.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Rc;d=new Rc;M(a,"Missing next location step.");b=md(a,b);c.push(b)}else{a:{b=C(a.b);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.b.next();b=fd(a);M(a,'unclosed "("');hd(a,")");break;case '"':case "'":b=jd(a);break;default:if(isNaN(+b))if(!Mc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==C(a.b,1)){b=a.b.next();b=Lc[b]||null;a.b.next();for(d=[];")"!=C(a.b);){M(a,"Missing function argument list.");d.push(fd(a));if(","!=C(a.b))break;a.b.next()}M(a,"Unclosed function argument list.");id(a);b=new Jc(b,d)}else{b=null;break a}else b=new Oc(+a.b.next())}"["==C(a.b)&&(d=new Vc(nd(a)),b=new Hc(b,d))}if(b)if("/"==C(a.b)||"//"==C(a.b))d=b;else return b;else b=md(a,"/"),d=new Sc,c.push(b)}for(;"/"==C(a.b)||"//"==C(a.b);)b=a.b.next(),M(a,"Missing next location step."),b=md(a,b),c.push(b); +return new Pc(d,c)} +function md(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==C(a.b))return d=new Wc(bd,new qc("node")),a.b.next(),d;if(".."==C(a.b))return d=new Wc(ad,new qc("node")),a.b.next(),d;var f;if("@"==C(a.b))f=Qc,a.b.next(),M(a,"Missing attribute name");else if("::"==C(a.b,1)){if(!/(?![0-9])[\w]/.test(C(a.b).charAt(0)))throw Error("Bad token: "+a.b.next());c=a.b.next();f=$c[c]||null;if(!f)throw Error("No axis with name: "+c);a.b.next();M(a,"Missing node name")}else f=Xc; +c=C(a.b);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==C(a.b,1)){if(!Mc(c))throw Error("Invalid node type: "+c);c=a.b.next();if(!Mc(c))throw Error("Invalid type name: "+c);hd(a,"(");M(a,"Bad nodetype");e=C(a.b).charAt(0);var g=null;if('"'==e||"'"==e)g=jd(a);M(a,"Bad nodetype");id(a);c=new qc(c,g)}else c=kd(a);else if("*"==c)c=kd(a);else throw Error("Bad token: "+a.b.next());e=new Vc(nd(a),f.P);return d||new Wc(f,c,e,"//"==b)} +function nd(a){for(var b=[];"["==C(a.b);){a.b.next();M(a,"Missing predicate expression.");var c=fd(a);b.push(c);M(a,"Unclosed predicate expression.");hd(a,"]")}return b}function gd(a){if("-"==C(a.b))return a.b.next(),new cd(gd(a));var b=ld(a);if("|"!=C(a.b))a=b;else{for(b=[b];"|"==a.b.next();)M(a,"Missing next union location path."),b.push(ld(a));a.b.back();a=new dd(b)}return a};function od(a){switch(a.nodeType){case 1:return na(pd,a);case 9:return od(a.documentElement);case 2:return a.ownerElement?od(a.ownerElement):qd;case 11:case 10:case 6:case 12:return qd;default:return a.parentNode?od(a.parentNode):qd}}function qd(){return null}function pd(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?pd(a.parentNode,b):null};function rd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=fc(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ma(b.lookupNamespaceURI,b)):b=aa(null);var d=fd(new ed(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new $b(a));return new N(c,b)}} +function N(a,b){if(0==b)if(a instanceof D)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 D))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof D?wc(a):""+a;break;case 1:this.numberValue=a instanceof D?+wc(a):+a;break;case 3:this.booleanValue=a instanceof D?0<a.A():!!a;break;case 4:case 5:case 6:case 7:var d= +xc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof cc?e.j:e);this.snapshotLength=a.A();this.invalidIteratorState=!1;break;case 8:case 9:d=vc(a);this.singleNodeValue=d instanceof cc?d.j:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}N.ANY_TYPE=0;N.NUMBER_TYPE=1;N.STRING_TYPE=2;N.BOOLEAN_TYPE=3;N.UNORDERED_NODE_ITERATOR_TYPE=4;N.ORDERED_NODE_ITERATOR_TYPE=5;N.UNORDERED_NODE_SNAPSHOT_TYPE=6;N.ORDERED_NODE_SNAPSHOT_TYPE=7;N.ANY_UNORDERED_NODE_TYPE=8;N.FIRST_ORDERED_NODE_TYPE=9;function sd(a){this.lookupNamespaceURI=od(a)} +function td(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=N,b.evaluate=function(a,b,e,f){return(new rd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new rd(a,b)},b.createNSResolver=function(a){return new sd(a)})};var P={};P.Ma=function(){var a={ib:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();P.w=function(a,b,c){var d=A(a);(x||Xb)&&td(B(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):P.Ma;return x&&!hb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!y||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +P.ia=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};P.H=function(a,b){var c=function(){var c=P.w(b,a,9);return c?(c=c.singleNodeValue,v?c:c||null):b.selectSingleNode?(c=A(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||P.ia(c,a);return c}; +P.v=function(a,b){var c=function(){var c=P.w(b,a,7);if(c){var e=c.snapshotLength;v&&!ca(e)&&P.ia(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=A(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();r(c,function(b){P.ia(b,a)});return c};function ud(a){return(a=a.exec(Ta()))?a[1]:""}var vd=function(){if(Tb)return ud(/Firefox\/([0-9.]+)/);if(x||v)return ab;if(Yb)return ud(/Chrome\/([0-9.]+)/);if(Zb)return ud(/Version\/([0-9.]+)/);if(Vb||Wb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ta());if(a)return a[1]+"."+a[2]}else{if(Xb)return(a=ud(/Android\s+([0-9.]+)/))?a:ud(/Version\/([0-9.]+)/);if(Ub)return ud(/Camino\/([0-9.]+)/)}return""}();var wd,xd;function Q(a){return yd?wd(a):x?0<=sa(jb,a):hb(a)}function zd(a){return yd?xd(a):Xb?0<=sa(Ad,a):0<=sa(vd,a)} +var yd=function(){if(!y)return!1;var a=m.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;wd=function(a){return 0<=d.Na(e,""+a)};xd=function(a){return 0<=d.Na(f,""+a)};return!0}(),Bd=Wb||Vb,Cd;if(Xb){var Dd=/Android\s+([0-9\.]+)/.exec(Ta());Cd=Dd?Dd[1]:"0"}else Cd="0"; +var Ad=Cd,Ed=x&&!ib(8),Fd=ib(9),Gd=x&&!ib(9),Hd=ib(10),Id=x&&!ib(10);Xb&&zd(2.3);Xb&&zd(4);Zb&&zd(6);var Jd=x&&-1!=Ta().indexOf("IEMobile");function Kd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}l=Kd.prototype;l.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};l.contains=function(a){return this&&a?a instanceof Kd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +l.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};l.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};l.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function R(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}l=R.prototype;l.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};l.contains=function(a){return a instanceof R?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Ld(a,b){var c=A(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Md(a){a=a?A(a):document;var b;(b=!x)||(b=ib(9))||(b=tb(a),b=zb(b.F));return b?a.documentElement:a.body} +function Nd(a){var b=a.offsetWidth,c=a.offsetHeight,d=z&&!b&&!c;if((!ca(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}x&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new nb(e.right-e.left,e.bottom-e.top)}return new nb(b,c)}var Od={thin:2,medium:4,thick:6}; +function Pd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Od)d=Od[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Qd(a){var b;a:{a=A(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return x&&b&&"undefined"===typeof b.nodeType?null:b}function S(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Rd(a){return Sd(a,!0)&&Td(a)&&!(x||v||y&&!Q("1.9.2")?0:"none"==T(a,"pointer-events"))}function Ud(a){return S(a,"OPTION")?!0:S(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Vd(a){if(!Ud(a))throw new t(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Wd(a,b)}function Wd(a,b){var c;if(c=Ed)if(c="value"==b)if(c=S(a,"OPTION"))c=null===Xd(a,"value");c?(c=[],Hb(a,c,!1),c=c.join("")):c=a[b];return c}var Yd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Zd(a){var b=[];r(a.split(Yd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return v?b.replace(/\w+:;/g,""):b}function Xd(a,b){b=b.toLowerCase();if("style"==b)return Zd(a.style.cssText);if(Ed&&"value"==b&&S(a,"INPUT"))return a.value;if(Gd&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}var $d="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Td(a){var b=a.tagName.toUpperCase();return Ba($d,b)?Wd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Td(a.parentNode):!Ib(a,function(a){var b=a.parentNode;if(b&&S(b,"FIELDSET")&&Wd(b,"disabled")){if(!S(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:Ab(a.previousSibling);)if(S(a,"LEGEND"))return!0}return!1},!0):!0}var ae="text search tel url email password number".split(" "); +function be(a){return S(a,"TEXTAREA")?!0:S(a,"INPUT")?Ba(ae,a.type.toLowerCase()):ce(a)?!0:!1}function ce(a){function b(a){return"inherit"==a.contentEditable?(a=de(a))?b(a):!1:"true"==a.contentEditable}return ca(a.contentEditable)?!x&&ca(a.isContentEditable)?a.isContentEditable:b(a):!1}function de(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return S(a)?a:null} +function T(a,b){var c=ta(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Gd?"styleFloat":"cssFloat";var d=Ld(a,c)||ee(a,c);if(null===d)d=null;else if(Ba(Fa,c)){b:{var e=d.match(Ia);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ja))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=Ea[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ga,"#$1$1$2$2$3$3")),!Ha.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function ee(a,b){var c=a.currentStyle||a.style,d=c[b];!ca(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?ca(d)?d:null:(c=de(a))?ee(c,b):null} +function Sd(a,b){function c(a){if("none"==T(a,"display"))return!1;a=de(a);return!a||c(a)}function d(a){var b=fe(a);return 0<b.height&&0<b.width?!0:S(a,"PATH")&&(0<b.height||0<b.width)?(a=T(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=T(a,"overflow")&&ya(a.childNodes,function(a){return a.nodeType==sb||S(a)&&d(a)})}function e(a){return ge(a)==he&&za(a.childNodes,function(a){return!S(a)||e(a)})}if(!S(a))throw Error("Argument to isShown must be of type Element");if(S(a,"OPTION")||S(a,"OPTGROUP")){var f= +Ib(a,function(a){return S(a,"SELECT")});return!!f&&Sd(f,!0)}return(f=ie(a))?!!f.ya&&0<f.rect.width&&0<f.rect.height&&Sd(f.ya,b):S(a,"INPUT")&&"hidden"==a.type.toLowerCase()||S(a,"NOSCRIPT")||"hidden"==T(a,"visibility")||!c(a)||!b&&0==je(a)||!d(a)?!1:!e(a)}var he="hidden"; +function ge(a,b){function c(a){var b=T(a,"position");if("fixed"==b)return Y=!0,a==k?null:k;for(a=de(a);a&&a!=k&&(0==T(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==T(a,"position"));)a=de(a);return a}function d(a){var b=a;if("visible"==u)if(a==k&&q)b=q;else if(a==q)return{x:"visible",y:"visible"};b={x:T(b,"overflow-x"),y:T(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new ub(g)).F;a=!z&&zb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=x&&hb("10")&&b.pageYOffset!=a.scrollTop?new mb(a.scrollLeft,a.scrollTop):new mb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new mb(a.scrollLeft,a.scrollTop);return a}for(var f=ke(a,b),g=A(a),k=g.documentElement,q=g.body,u=T(k,"overflow"),Y,w=c(a);w;w=c(w)){var s=d(w);if("visible"!=s.x||"visible"!=s.y){var F=fe(w);if(0==F.width||0==F.height)return he;var O=f.right<F.left,ha=f.bottom<F.top;if(O&&"hidden"==s.x||ha&&"hidden"== +s.y)return he;if(O&&"visible"!=s.x||ha&&"visible"!=s.y){O=e(w);ha=f.bottom<F.top-O.y;if(f.right<F.left-O.x&&"visible"!=s.x||ha&&"visible"!=s.x)return he;f=ge(w);return f==he?he:"scroll"}O=f.left>=F.left+F.width;F=f.top>=F.top+F.height;if(O&&"hidden"==s.x||F&&"hidden"==s.y)return he;if(O&&"visible"!=s.x||F&&"visible"!=s.y){if(Y&&(s=e(w),f.left>=k.scrollWidth-s.x||f.right>=k.scrollHeight-s.y))return he;f=ge(w);return f==he?he:"scroll"}}}return"none"}var le=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function fe(a){function b(a){var c=B(A(a)).getComputedStyle(a,null).MozTransform.match(le);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),Y=parseFloat(c[3]),w=parseFloat(c[4]),s=parseFloat(c[5]),c=parseFloat(c[6]),F=f.left+f.width,O=f.top+f.height,ha=f.left*d,d=F*d,wb=f.left*e,e=F*e,xb=f.top*Y,Y=O*Y,yb=f.top*w,F=O*w,O=ha+xb+s,w=wb+yb+c,xb=d+xb+s,yb=e+yb+c,ha=ha+Y+s,wb=wb+F+c,s=d+Y+s,c=e+F+c;f.left=Math.min(O,xb,ha,s);f.top=Math.min(w,yb,wb,c);s=Math.max(O,xb,ha,s);c=Math.max(w,yb,wb,c);f.width=s- +f.left;f.height=c-f.top}(a=de(a))&&b(a)}var c=ie(a);if(c)return c.rect;if(S(a,"HTML"))return c=A(a),a=vb(B(c)||window),new R(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new R(0,0,0,0)}var f=new R(d.left,d.top,d.right-d.left,d.bottom-d.top);x&&a.ownerDocument.body&&(c=A(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);v&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));y&&!Q(12)&&b(a);return f} +function ie(a){var b=S(a,"MAP");if(!b&&!S(a,"AREA"))return null;var c=b?a:S(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=P.H('/descendant::*[@usemap = "#'+c.name+'"]',A(c)))&&(e=fe(d),!b&&"default"!=a.shape.toLowerCase())){var f=me(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new R(a+e.left,b+e.top,c,f)}return{ya:d,rect:e||new R(0,0,0,0)}} +function me(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new R(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new R(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 R(b,c,d-b,e-c)}return new R(0,0,0,0)} +function ke(a,b){var c;c=fe(a);c=new Kd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof R?b:new R(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c}function ne(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")} +function oe(a){var b=[];pe(a,b);b=wa(b,ne);return ne(b.join("\n")).replace(/\xa0/g," ")} +function pe(a,b){if(S(a,"BR"))b.push("");else{var c=S(a,"TD"),d=T(a,"display"),e=!c&&!Ba(qe,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:Ab(a.previousSibling),f=f?T(f,"display"):"",g=T(a,"float")||T(a,"cssFloat")||T(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var k=Sd(a),q=null,u=null;k&&(q=T(a,"white-space"),u=T(a,"text-transform"));r(a.childNodes,function(a){a.nodeType==sb&&k?re(a,b,q,u):S(a)&&pe(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||qa(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var qe="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function re(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";qa(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function je(a){if(Id){if("relative"==T(a,"position"))return 1;a=T(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return se(a)}function se(a){var b=1,c=T(a,"opacity");c&&(b=Number(c));(a=de(a))&&(b*=se(a));return b};var te={ua:function(a){return!(!a.querySelectorAll||!a.querySelector)},H:function(a,b){if(!a)throw Error("No class name specified");a=ra(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");if(te.ua(b))return b.querySelector("."+a.replace(/\./g,"\\."))||null;var c=Jb(tb(b),"*",a,b);return c.length?c[0]:null},v:function(a,b){if(!a)throw Error("No class name specified");a=ra(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");return te.ua(b)?b.querySelectorAll("."+ +a.replace(/\./g,"\\.")):Jb(tb(b),"*",a,b)}};var ue={H:function(a,b){if(!fa(b.querySelector)&&x&&Q(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=ra(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:null},v:function(a,b){if(!fa(b.querySelectorAll)&&x&&Q(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=ra(a);return b.querySelectorAll(a)}};var ve={},we={};ve.Ha=function(a,b,c){var d;try{d=ue.v("a",b)}catch(e){d=Jb(tb(b),"A",null,b)}return Aa(d,function(b){b=oe(b);return c&&-1!=b.indexOf(a)||b==a})};ve.Ba=function(a,b,c){var d;try{d=ue.v("a",b)}catch(e){d=Jb(tb(b),"A",null,b)}return va(d,function(b){b=oe(b);return c&&-1!=b.indexOf(a)||b==a})};ve.H=function(a,b){return ve.Ha(a,b,!1)};ve.v=function(a,b){return ve.Ba(a,b,!1)};we.H=function(a,b){return ve.Ha(a,b,!0)};we.v=function(a,b){return ve.Ba(a,b,!0)};var xe={H:function(a,b){return b.getElementsByTagName(a)[0]||null},v:function(a,b){return b.getElementsByTagName(a)}};var ye={className:te,"class name":te,css:ue,"css selector":ue,id:{H:function(a,b){var c=tb(b),d=c.c(a);if(!d)return null;if(Xd(d,"id")==a&&Bb(b,d))return d;c=Jb(c,"*");return Aa(c,function(c){return Xd(c,"id")==a&&Bb(b,c)})},v:function(a,b){var c=Jb(tb(b),"*",null,b);return va(c,function(b){return Xd(b,"id")==a})}},linkText:ve,"link text":ve,name:{H:function(a,b){var c=Jb(tb(b),"*",null,b);return Aa(c,function(b){return Xd(b,"name")==a})},v:function(a,b){var c=Jb(tb(b),"*",null,b);return va(c,function(b){return Xd(b, +"name")==a})}},partialLinkText:we,"partial link text":we,tagName:xe,"tag name":xe,xpath:P};function ze(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=null}if(c){var d=ye[c];if(d&&fa(d.v))return d.v(a[c],b||pa.document)}throw Error("Unsupported locator strategy: "+c);};function Ae(a,b){this.f=pa.document.documentElement;this.q=null;var c=Qd(this.f);c&&Be(this,c);this.V=a||new Ce;this.Z=b||new De}l=Ae.prototype;l.c=h("f");function Be(a,b){a.f=b;a.q=S(b,"OPTION")?Ib(b,function(a){return S(a,"SELECT")}):null}l.N=function(a){return this.Z.N(this.f,a)};l.la=function(a,b){return this.Z.la(this.f,a,b)}; +l.$=function(a,b,c,d,e,f,g){if(!f&&!Rd(this.f))return!1;if(d&&Ee!=a&&Fe!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:this.V.h(4),ctrlKey:this.V.h(2),shiftKey:this.V.h(1),metaKey:this.V.h(8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.f;a!=Ge&&a!=He&&g in Ie?c=Ie[g]:this.q&&(c=Je(this,a));return c?this.Z.$(c,a,b):!0}; +l.S=function(a,b,c,d,e,f,g,k){if(!k&&!Rd(this.f))return!1;if(g&&Ke!=a&&Le!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Xa:0,rotation:0,pointerId:d,$a:0,ab:0,pointerType:e,Pa:f};c=this.q?Je(this,a):this.f;Ie[d]&&(c=Ie[d]);d=B(A(this.f));var q;d&&a==Me&&(q=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){Ie[a]=this});a= +c?this.Z.S(c,a,b):!0;q&&(d.Element.prototype.msSetPointerCapture=q);return a};function Je(a,b){if(x)switch(b){case Ee:case Ke:return null;case Ne:case Oe:case Pe:return a.q.multiple?a.q:null;default:return a.q}if(v)switch(b){case Ne:case Ee:return a.q.multiple?a.f:null;default:return a.f}if(z)switch(b){case Ge:case Qe:return a.q.multiple?a.f:a.q;default:return a.q.multiple?a.f:null}return a.f} +function Re(a){a=a.q||a.f;var b=Qd(a);if(a==b)return!1;if(b&&(fa(b.blur)||x&&ga(b.blur))){if(!S(b,"BODY"))try{b.blur()}catch(c){if(!x||"Unspecified error."!=c.message)throw c;}x&&!Q(8)&&B(A(a)).focus()}return fa(a.focus)||x&&ga(a.focus)?(v&&Q(11)&&!Sd(a)?U(a,Se):a.focus(),!0):!1}var Te=z||v||yd&&zd(3.6);function Ue(a){if(S(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b)return!0}return S(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)?!0:!1} +function Ve(a){if(Te||!a.href)return!1;if(!yd)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=B(A(a)),c=b.location.href;a=We(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function Xe(a){return S(a,"FORM")} +function Ye(a){if(!Xe(a))throw new t(12,"Element is not a form, so could not submit.");if(U(a,Ze))if(S(a.submit))if(!x||Q(8))a.constructor.prototype.submit.call(a);else{var b=ze({id:"submit"},a),c=ze({name:"submit"},a);r(b,function(a){a.removeAttribute("id")});r(c,function(a){a.removeAttribute("name")});a=a.submit;r(b,function(a){a.setAttribute("id","submit")});r(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}var $e=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function We(a,b){var c=b.match($e);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function Ce(){this.da=0}Ce.prototype.h=function(a){return 0!=(this.da&a)};var Ie={};function De(){}De.prototype.N=function(a,b){return U(a,b)};De.prototype.la=function(a,b,c){return U(a,b,c)}; +De.prototype.$=function(a,b,c){return U(a,b,c)};De.prototype.S=function(a,b,c){return U(a,b,c)};var af=!(x&&!Q(10))&&!v,bf=Xb?!zd(4):!Bd,cf=x&&pa.navigator.msPointerEnabled;function V(a,b,c){this.g=a;this.I=b;this.J=c}V.prototype.create=function(a){a=A(a);Gd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.g,this.I,this.J));return a};V.prototype.toString=h("g");function df(a,b,c){V.call(this,a,b,c)}p(df,V); +df.prototype.create=function(a,b){if(!y&&this==ef)throw new t(9,"Browser does not support a mouse pixel scroll event.");var c=A(a),d;if(Gd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Fe||this==Ee)if(Object.defineProperty){var e=this==Fe;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==ff&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=B(c);d=c.createEvent("MouseEvents");var f=1;this==ff&&(y||(d.wheelDelta=b.wheelDelta),y||v)&&(f=b.wheelDelta/-40);y&&this==ef&&(f=b.wheelDelta);d.initMouseEvent(this.g,this.I,this.J,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(x&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=Kb(tb(a)),c=Md(c),g=b.clientX+e.scrollLeft- +c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function gf(a,b,c){V.call(this,a,b,c)}p(gf,V); +gf.prototype.create=function(a,b){var c=A(a);if(y){var d=B(c),e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.g,this.I,this.J,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.g==hf&&b.preventDefault&&c.preventDefault()}else Gd?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.g,this.I,this.J)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode,z&&(c.charCode=this==hf?c.keyCode: +0);return c};function jf(a,b,c){V.call(this,a,b,c)}p(jf,V); +jf.prototype.create=function(a,b){function c(b){b=wa(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=wa(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!af)throw new t(9,"Browser does not support firing touch events.");var e=A(a),f=B(e),g=bf?d(b.changedTouches): +c(b.changedTouches),k=b.touches==b.changedTouches?g:bf?d(b.touches):c(b.touches),q=b.targetTouches==b.changedTouches?g:bf?d(b.targetTouches):c(b.targetTouches),u;bf?(u=e.createEvent("MouseEvents"),u.initMouseEvent(this.g,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),u.touches=k,u.targetTouches=q,u.changedTouches=g,u.scale=b.scale,u.rotation=b.rotation):(u=e.createEvent("TouchEvent"),Xb?u.initTouchEvent(k,q,g,this.g,f,0,0,b.clientX,b.clientY,b.ctrlKey, +b.altKey,b.shiftKey,b.metaKey):u.initTouchEvent(this.g,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,q,g,b.scale,b.rotation),u.relatedTarget=b.relatedTarget);return u};function kf(a,b,c){V.call(this,a,b,c)}p(kf,V); +kf.prototype.create=function(a,b){if(!cf)throw new t(9,"Browser does not support MSPointer events.");var c=A(a),d=B(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.g,this.I,this.J,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Xa,b.rotation,b.$a,b.ab,b.pointerId,b.pointerType,0,b.Pa);return c}; +var lf=new V("blur",!1,!1),mf=new V("change",!0,!1),Se=new V("focus",!1,!1),nf=new V("input",!0,!1),Ze=new V("submit",!0,!0),of=new V("textInput",!0,!0),Ge=new df("click",!0,!0),Ne=new df("contextmenu",!0,!0),pf=new df("dblclick",!0,!0),He=new df("mousedown",!0,!0),Oe=new df("mousemove",!0,!1),Fe=new df("mouseout",!0,!0),Ee=new df("mouseover",!0,!0),Qe=new df("mouseup",!0,!0),ff=new df(y?"DOMMouseScroll":"mousewheel",!0,!0),ef=new df("MozMousePixelScroll",!0,!0),qf=new gf("keydown",!0,!0),hf=new gf("keypress", +!0,!0),rf=new gf("keyup",!0,!0),sf=new jf("touchend",!0,!0),tf=new jf("touchstart",!0,!0),uf=new kf("MSGotPointerCapture",!0,!1),vf=new kf("MSLostPointerCapture",!0,!1),Me=new kf("MSPointerDown",!0,!0),Pe=new kf("MSPointerMove",!0,!0),Ke=new kf("MSPointerOver",!0,!0),Le=new kf("MSPointerOut",!0,!0),wf=new kf("MSPointerUp",!0,!0);function U(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return Gd?a.fireEvent("on"+b.g,c):a.dispatchEvent(c)};function xf(a,b){if(yf(a))a.selectionStart=b;else if(x){var c=zf(a),d=c[0];d.inRange(c[1])&&(b=Af(a,b),d.collapse(!0),d.move("character",b),d.select())}} +function Bf(a,b){var c=0,d=0;if(yf(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(x){var e=zf(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,k=e=c.text,q=!1;!q;)0==f.compareEndPoints("StartToEnd",f)?q=!0:(f.moveEnd("character",-1),f.text==g?d+="\r\n":q=!0);if(b)f=[d.length,-1];else{for(f=!1;!f;)0==c.compareEndPoints("StartToEnd",c)?f=!0:(c.moveEnd("character",-1),c.text==e?k+="\r\n":f=!0);f=[d.length,d.length+k.length]}return f}c= +f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Cf(a,b){if(yf(a))a.selectionEnd=b;else if(x){var c=zf(a),d=c[1];c[0].inRange(d)&&(b=Af(a,b),c=Af(a,Bf(a,!0)[0]),d.collapse(!0),d.moveEnd("character",b-c),d.select())}}function Df(a,b){if(yf(a))a.selectionStart=b,a.selectionEnd=b;else if(x){b=Af(a,b);var c=a.createTextRange();c.collapse(!0);c.move("character",b);c.select()}} +function Ef(a,b){if(yf(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else if(x)d=zf(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select());else throw Error("Cannot set the selection end");}function zf(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} +function Af(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function yf(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};function Ff(a,b){this.o={};this.l=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.ga(a)}l=Ff.prototype;l.R=0;l.La=0;l.T=function(){Gf(this);for(var a=[],b=0;b<this.l.length;b++)a.push(this.o[this.l[b]]);return a};function Hf(a){Gf(a);return a.l.concat()}l.remove=function(a){return If(this.o,a)?(delete this.o[a],this.R--,this.La++,this.l.length>2*this.R&&Gf(this),!0):!1}; +function Gf(a){if(a.R!=a.l.length){for(var b=0,c=0;b<a.l.length;){var d=a.l[b];If(a.o,d)&&(a.l[c++]=d);b++}a.l.length=c}if(a.R!=a.l.length){for(var e={},c=b=0;b<a.l.length;)d=a.l[b],If(e,d)||(a.l[c++]=d,e[d]=1),b++;a.l.length=c}}l.get=function(a,b){return If(this.o,a)?this.o[a]:b};l.set=function(a,b){If(this.o,a)||(this.R++,this.l.push(a),this.La++);this.o[a]=b}; +l.ga=function(a){var b;if(a instanceof Ff)b=Hf(a),a=a.T();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=qb(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function If(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Jf(a){if("function"==typeof a.T)return a.T();if(n(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return qb(a)};function Kf(a){this.o=new Ff;a&&this.ga(a)}function Lf(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ia]||(a[ia]=++ja)):b.substr(0,1)+a}l=Kf.prototype;l.add=function(a){this.o.set(Lf(a),a)};l.ga=function(a){a=Jf(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};l.remove=function(a){return this.o.remove(Lf(a))};l.contains=function(a){a=Lf(a);return If(this.o.o,a)};l.T=function(){return this.o.T()};function Mf(a){Ae.call(this);this.ka=be(this.c())&&!Wd(this.c(),"readOnly");this.s=0;this.sa=new Kf;a&&(r(a.pressed,function(a){Nf(this,a,!0)},this),this.s=a.currentPos)}p(Mf,Ae);var Of={};function W(a,b,c){ga(a)&&(a=y?a.d:v?a.opera:a.e);a=new Pf(a,b,c);!b||b in Of&&!c||(Of[b]={key:a,shift:!1},c&&(Of[c]={key:a,shift:!0}));return a}function Pf(a,b,c){this.code=a;this.K=b||null;this.Ya=c||this.K}var Qf=W(8),Rf=W(9),Sf=W(13),X=W(16),Tf=W(17),Uf=W(18),Vf=W(19);W(20); +var Wf=W(27),Xf=W(32," "),Yf=W(33),Zf=W(34),$f=W(35),ag=W(36),bg=W(37),cg=W(38),dg=W(39),eg=W(40);W(44);var fg=W(45),gg=W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","(");W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q"); +W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z"); +var hg=W(Sa?{d:91,e:91,opera:219}:Ra?{d:224,e:91,opera:17}:{d:0,e:91,opera:null}),ig=W(Sa?{d:92,e:92,opera:220}:Ra?{d:224,e:93,opera:17}:{d:0,e:92,opera:null}),jg=W(Sa?{d:93,e:93,opera:0}:Ra?{d:0,e:0,opera:16}:{d:93,e:null,opera:0}),kg=W({d:96,e:96,opera:48},"0"),lg=W({d:97,e:97,opera:49},"1"),mg=W({d:98,e:98,opera:50},"2"),ng=W({d:99,e:99,opera:51},"3"),og=W({d:100,e:100,opera:52},"4"),pg=W({d:101,e:101,opera:53},"5"),qg=W({d:102,e:102,opera:54},"6"),rg=W({d:103,e:103,opera:55},"7"),sg=W({d:104, +e:104,opera:56},"8"),tg=W({d:105,e:105,opera:57},"9"),ug=W({d:106,e:106,opera:Za?56:42},"*"),vg=W({d:107,e:107,opera:Za?61:43},"+"),wg=W({d:109,e:109,opera:Za?109:45},"-"),xg=W({d:110,e:110,opera:Za?190:78},"."),yg=W({d:111,e:111,opera:Za?191:47},"/");W(Za&&v?null:144);var zg=W(112),Ag=W(113),Bg=W(114),Cg=W(115),Dg=W(116),Eg=W(117),Fg=W(118),Gg=W(119),Hg=W(120),Ig=W(121),Jg=W(122),Kg=W(123),Lg=W({d:107,e:187,opera:61},"=","+"),Mg=W(108,",");W({d:109,e:189,opera:109},"-","_");W(188,",","<"); +W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");var Ng=W({d:59,e:186,opera:59},";",":");W(222,"'",'"');var Og=[Uf,Tf,hg,X],Pg=new Ff;Pg.set(1,X);Pg.set(2,Tf);Pg.set(4,Uf);Pg.set(8,hg);var Qg=function(a){var b=new Ff;r(Hf(a),function(c){b.set(a.get(c).code,c)});return b}(Pg);function Nf(a,b,c){if(Ba(Og,b)){var d=Qg.get(b.code),e=a.V;e.da=c?e.da|d:e.da&~d}c?a.sa.add(b):a.sa.remove(b)}var Rg=x||v?"\r\n":"\n";Mf.prototype.h=function(a){return this.sa.contains(a)}; +function Sg(a,b){if(Ba(Og,b)&&a.h(b))throw new t(13,"Cannot press a modifier key that is already pressed.");var c=null!==b.code&&Tg(a,qf,b);if((c||y)&&((!Ug(b)||Tg(a,hf,b,!c))&&c)&&(Vg(a,b),a.ka))if(b.K){if(!Wg){var c=Xg(a,b),d=Bf(a.c(),!0)[0]+1;Ef(a.c(),c);xf(a.c(),d);z&&a.N(of);Gd||a.N(nf);a.s=d}}else switch(b){case Sf:Wg||(z&&a.N(of),S(a.c(),"TEXTAREA")&&(c=Bf(a.c(),!0)[0]+Rg.length,Ef(a.c(),Rg),xf(a.c(),c),x||a.N(nf),a.s=c));break;case Qf:case gg:Wg||(c=Bf(a.c(),!1),c[0]==c[1]&&(b==Qf?(xf(a.c(), +c[1]-1),Cf(a.c(),c[1])):Cf(a.c(),c[1]+1)),c=Bf(a.c(),!1),c=!(c[0]==a.c().value.length||0==c[1]),Ef(a.c(),""),(!x&&c||y&&b==Qf)&&a.N(nf),c=Bf(a.c(),!1),a.s=c[1]);break;case bg:case dg:var c=a.c(),e=Bf(c,!0)[0],f=Bf(c,!1)[1],g=d=0;b==bg?a.h(X)?a.s==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(X)?a.s==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(X)?(xf(c,d),Cf(c,g)):Df(c,e);a.s=e;break;case ag:case $f:c=a.c(),d=Bf(c,!0)[0], +g=Bf(c,!1)[1],b==ag?(a.h(X)?(xf(c,0),Cf(c,a.s==d?g:d)):Df(c,0),a.s=0):(a.h(X)?(a.s==d&&xf(c,g),Cf(c,c.value.length)):Df(c,c.value.length),a.s=c.value.length)}Nf(a,b,!0)}function Ug(a){if(a.K||a==Sf)return!0;if(z)return!1;if(x)return a==Wf;switch(a){case X:case Tf:case Uf:return!1;case hg:case ig:case jg:return y;default:return!0}} +function Vg(a,b){if(b==Sf&&!y&&S(a.c(),"INPUT")){var c=Ib(a.c(),Xe,!0);if(c){var d=c.getElementsByTagName("input");(ya(d,function(a){return Ue(a)})||1==d.length||z&&!Q(534))&&Ye(c)}}}function Yg(a,b){if(!a.h(b))throw new t(13,"Cannot release a key that is not pressed. ("+b.code+")");null===b.code||Tg(a,rf,b);Nf(a,b,!1)}function Xg(a,b){if(!b.K)throw new t(13,"not a character key");return a.h(X)?b.Ya:b.K}var Wg=y&&!Q(12); +function Tg(a,b,c,d){if(null===c.code)throw new t(13,"Key must have a keycode to be fired.");c={altKey:a.h(Uf),ctrlKey:a.h(Tf),metaKey:a.h(hg),shiftKey:a.h(X),keyCode:c.code,charCode:c.K&&b==hf?Xg(a,c).charCodeAt(0):0,preventDefault:!!d};return a.la(b,c)}function Zg(a,b){Be(a,b);a.ka=be(b)&&!Wd(b,"readOnly");var c=Re(a);a.ka&&c&&(Df(b,b.value.length),a.s=b.value.length)};function $g(a,b,c){Ae.call(this,b,c);this.M=this.r=null;this.L=new mb(0,0);this.ma=this.W=!1;if(a){this.r=a.bb;try{S(a.Oa)&&(this.M=a.Oa)}catch(d){this.r=null}this.L=a.cb;this.W=a.fb;this.ma=a.eb;try{S(a.element)&&Be(this,a.element)}catch(e){this.r=null}}}p($g,Ae);var Z={}; +Gd?(Z[Ge]=[0,0,0,null],Z[Ne]=[null,null,0,null],Z[Qe]=[1,4,2,null],Z[Fe]=[0,0,0,0],Z[Oe]=[1,4,2,0]):z||Fd?(Z[Ge]=[0,1,2,null],Z[Ne]=[null,null,2,null],Z[Qe]=[0,1,2,null],Z[Fe]=[0,1,2,0],Z[Oe]=[0,1,2,0]):(Z[Ge]=[0,1,2,null],Z[Ne]=[null,null,2,null],Z[Qe]=[0,1,2,null],Z[Fe]=[0,0,0,0],Z[Oe]=[0,0,0,0]);Hd&&(Z[Me]=Z[Qe],Z[wf]=Z[Qe],Z[Pe]=[-1,-1,-1,-1],Z[Le]=Z[Pe],Z[Ke]=Z[Pe]);Z[pf]=Z[Ge];Z[He]=Z[Qe];Z[Ee]=Z[Fe];var ah={};ah[He]=Me;ah[Oe]=Pe;ah[Fe]=Le;ah[Ee]=Ke;ah[Qe]=wf; +$g.prototype.move=function(a,b){var c=Rd(a),d=fe(a);this.L.x=b.x+d.left;this.L.y=b.y+d.top;d=this.c();if(a!=d){try{B(A(d)).closed&&(d=null)}catch(e){d=null}if(d){var f=d===pa.document.documentElement||d===pa.document.body,d=!this.ma&&f?null:d;bh(this,Fe,a)}Be(this,a);x||bh(this,Ee,d,null,c)}bh(this,Oe,null,null,c);x&&a!=d&&bh(this,Ee,d,null,c);this.W=!1}; +function bh(a,b,c,d,e){a.ma=!0;if(Hd){var f=ah[b];if(f&&!a.S(f,a.L,ch(a,f),1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0,c,e))return!1}return a.$(b,a.L,ch(a,b),c,d,e)}function ch(a,b){if(!(b in Z))return 0;var c=Z[b][null===a.r?3:a.r];if(null===c)throw new t(13,"Event does not permit the specified mouse button.");return c};function dh(a,b){this.x=a;this.y=b}p(dh,mb);dh.prototype.scale=mb.prototype.scale;dh.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function eh(a,b,c,d){function e(a){n(a)?r(a.split(""),function(a){if(1!=a.length)throw new t(13,"Argument not a single character: "+a);var b=Of[a];b||(b=a.toUpperCase(),b=W(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.K});a=b;b=f.h(X);a.shift&&!b&&Sg(f,X);Sg(f,a.key);Yg(f,a.key);a.shift&&!b&&Yg(f,X)}):Ba(Og,a)?f.h(a)?Yg(f,a):Sg(f,a):(Sg(f,a),Yg(f,a))}if(a!=Qd(a)){if(!Rd(a))throw new t(12,"Element is not currently interactable and may not be manipulated");fh(a)}var f=c||new Mf;Zg(f,a);if((!Zb|| +Wa)&&z&&"date"==a.type){c="array"==ba(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Wa&&Zb&&(U(a,tf),U(a,sf));U(a,Se);a.value=c.match(g)[0];U(a,mf);U(a,lf);return}}"array"==ba(b)?r(b,e):e(b);d||r(Og,function(a){f.h(a)&&Yg(f,a)})} +function gh(a,b,c){if(!Sd(a,!0))throw new t(11,"Element is not currently visible and may not be manipulated");fh(a,b||void 0);b?b=new dh(b.x,b.y):(b=hh(a),b=new dh(b.width/2,b.height/2));c=c||new $g;c.move(a,b);if(null!==c.r)throw new t(13,"Cannot press more then one button or an already pressed button.");c.r=0;c.M=c.c();var d;a=y&&!zd(4);(z||a)&&(S(c.c(),"OPTION")||S(c.c(),"SELECT"))?d=!0:((a=y||x)&&(d=Qd(c.c())),d=(b=bh(c,He))&&a&&d!=Qd(c.c())?!1:b);d&&(Hd&&(0==c.r&&S(c.M,"OPTION"))&&c.S(uf,c.L, +0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0),Re(c));if(null===c.r)throw new t(13,"Cannot release a button when no button is pressed.");c.q&&Rd(c.f)&&(d=c.q,a=Vd(c.f),!a||d.multiple)&&(c.f.selected=!a,(!z||!d.multiple||Yb&&zd(28)||Xb&&zd(4))&&U(d,mf));bh(c,Qe);if(0==c.r&&c.c()==c.M){if(!Jd||!S(c.M,"OPTION"))if(d=c.L,a=ch(c,Ge),Rd(c.f)){var e=b=null;if(!Te)for(var f=c.f;f;f=f.parentNode)if(S(f,"A")){b=f;break}else if(Ue(f)){e=f;break}var g=(f=!c.q&&Ud(c.f))&&Vd(c.f);x&&e?e.click():c.$(Ge,d,a,null,0, +!1,void 0)&&(b&&Ve(b)?(d=b,a=d.href,b=B(A(d)),x&&!Q(8)&&(a=We(b.location,a)),d.target?b.open(a,d.target):b.location.href=a):!f||(y||z||g&&"radio"==c.f.type.toLowerCase())||(c.f.checked=!g,v&&!Q(11)&&U(c.f,mf)))}c.W&&bh(c,pf);c.W=!c.W;Hd&&(0==c.r&&S(c.M,"OPTION"))&&c.S(vf,new mb(0,0),0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!1)}else 2==c.r&&bh(c,Ne);Ie={};c.r=null;c.M=null} +function hh(a){var b;if("none"!=(Ld(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=Nd(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=Nd(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:hh(a.offsetParent)} +function fh(a,b){if("scroll"==ge(a,b)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==ge(a,b)))return;for(var c=ke(a,b),d=de(a);d;d=de(d)){var e=d,f=fe(e),g;var k=e;if(x&&!ib(9)){var q=Pd(k,"borderLeft");g=Pd(k,"borderRight");var u=Pd(k,"borderTop"),k=Pd(k,"borderBottom");g=new Kd(u,g,k,q)}else q=Ld(k,"borderLeftWidth"),g=Ld(k,"borderRightWidth"),u=Ld(k,"borderTopWidth"),k=Ld(k,"borderBottomWidth"),g=new Kd(parseFloat(u),parseFloat(g),parseFloat(k),parseFloat(q));q=c.left-f.left-g.left;f=c.top- +f.top-g.top;g=e.clientHeight+c.top-c.bottom;e.scrollLeft+=Math.min(q,Math.max(q-(e.clientWidth+c.left-c.right),0));e.scrollTop+=Math.min(f,Math.max(f-g,0))}ge(a,b)}};function $(a,b,c,d){function e(){return{Da:f,keys:[]}}var f=!!d,g=[],k=e();g.push(k);r(b,function(a){r(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.a[a];if(null===b)g.push(k=e()),f&&(k.Da=!1,g.push(k=e()));else if(ca(b))k.keys.push(b);else throw Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16));}else switch(a){case "\n":k.keys.push(Sf);break;case "\t":k.keys.push(Rf);break;case "\b":k.keys.push(Qf);break;default:k.keys.push(a)}})});r(g,function(b){eh(a,b.keys,c, +b.Da)})}$.a={};$.a["\ue000"]=null;$.a["\ue003"]=Qf;$.a["\ue004"]=Rf;$.a["\ue006"]=Sf;$.a["\ue007"]=Sf;$.a["\ue008"]=X;$.a["\ue009"]=Tf;$.a["\ue00a"]=Uf;$.a["\ue00b"]=Vf;$.a["\ue00c"]=Wf;$.a["\ue00d"]=Xf;$.a["\ue00e"]=Yf;$.a["\ue00f"]=Zf;$.a["\ue010"]=$f;$.a["\ue011"]=ag;$.a["\ue012"]=bg;$.a["\ue013"]=cg;$.a["\ue014"]=dg;$.a["\ue015"]=eg;$.a["\ue016"]=fg;$.a["\ue017"]=gg;$.a["\ue018"]=Ng;$.a["\ue019"]=Lg;$.a["\ue01a"]=kg;$.a["\ue01b"]=lg;$.a["\ue01c"]=mg;$.a["\ue01d"]=ng;$.a["\ue01e"]=og; +$.a["\ue01f"]=pg;$.a["\ue020"]=qg;$.a["\ue021"]=rg;$.a["\ue022"]=sg;$.a["\ue023"]=tg;$.a["\ue024"]=ug;$.a["\ue025"]=vg;$.a["\ue027"]=wg;$.a["\ue028"]=xg;$.a["\ue029"]=yg;$.a["\ue026"]=Mg;$.a["\ue031"]=zg;$.a["\ue032"]=Ag;$.a["\ue033"]=Bg;$.a["\ue034"]=Cg;$.a["\ue035"]=Dg;$.a["\ue036"]=Eg;$.a["\ue037"]=Fg;$.a["\ue038"]=Gg;$.a["\ue039"]=Hg;$.a["\ue03a"]=Ig;$.a["\ue03b"]=Jg;$.a["\ue03c"]=Kg;$.a["\ue03d"]=hg;function ih(){this.ea=void 0} +function jh(a,b,c){switch(typeof b){case "string":kh(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],jh(a,a.ea?a.ea.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +kh(f,c),c.push(":"),jh(a,a.ea?a.ea.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var lh={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},mh=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function kh(a,b){b.push('"',a.replace(mh,function(a){if(a in lh)return lh[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return lh[a]=e+b.toString(16)}),'"')};z||v||y&&Q(3.5)||x&&Q(8);function nh(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return wa(a,nh);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=oh(a);return b}if("document"in a)return b={},b.WINDOW=oh(a),b;if(da(a))return wa(a,nh);a=ob(a,function(a,b){return ea(b)||n(b)});return pb(a,nh);default:return null}} +function ph(a,b){return"array"==ba(a)?wa(a,function(a){return ph(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?qh(a.ELEMENT,b):"WINDOW"in a?qh(a.WINDOW,b):pb(a,function(a){return ph(a,b)}):a}function rh(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.qa=oa());b.qa||(b.qa=oa());return b}function oh(a){var b=rh(a.ownerDocument),c=rb(b,function(b){return b==a});c||(c=":wdc:"+b.qa++,b[c]=a);return c} +function qh(a,b){a=decodeURIComponent(a);var c=b||document,d=rh(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function sh(a,b){var c=[a],d;try{var e=b?qh(b.WINDOW):window,f=ph(c,e.document),g=gh.apply(null,f);d={status:0,value:nh(g)}}catch(k){d={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];jh(new ih,d,c);return c.join("")}var th=["_"],uh=m;th[0]in uh||!uh.execScript||uh.execScript("var "+th[0]);for(var vh;th.length&&(vh=th.shift());)th.length||void 0===sh?uh=uh[vh]?uh[vh]:uh[vh]={}:uh[vh]=sh;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/default_content.js b/src/ghostdriver/third_party/webdriver-atoms/default_content.js deleted file mode 100644 index 3c386de3f..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/default_content.js +++ /dev/null @@ -1,35 +0,0 @@ -function(){return function(){var g=void 0,k=!0,l=null,m=!1;function n(a){return function(){return a}}var p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ca=Date.now||function(){return+new Date};var da=window;function s(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var t=d[h]||"",F=e[h]||"",N=RegExp("(\\d*)(\\D*)","g"),ea=RegExp("(\\d*)(\\D*)","g");do{var z=N.exec(t)||["","",""],A=ea.exec(F)||["","",""];if(0==z[0].length&&0==A[0].length)break;c=((0==z[1].length?0:parseInt(z[1],10))<(0==A[1].length?0:parseInt(A[1],10))?-1:(0==z[1].length?0:parseInt(z[1],10))>(0==A[1].length? -0:parseInt(A[1],10))?1:0)||((0==z[2].length)<(0==A[2].length)?-1:(0==z[2].length)>(0==A[2].length)?1:0)||(z[2]<A[2]?-1:z[2]>A[2]?1:0)}while(0==c)}return c};var fa=Array.prototype;function u(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function ga(a,b){for(var c=a.length,d=[],e=0,f=r(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var t=f[h];b.call(g,t,h,a)&&(d[e++]=t)}return d}function ha(a,b){for(var c=a.length,d=Array(c),e=r(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";u(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function ja(a,b){var c;a:{c=a.length;for(var d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:r(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?fa.slice.call(a,b):fa.slice.call(a,b,c)};var v,la,w,ma;function x(){return p.navigator?p.navigator.userAgent:l}ma=w=la=v=m;var y;if(y=x()){var na=p.navigator;v=0==y.indexOf("Opera");la=!v&&-1!=y.indexOf("MSIE");w=!v&&-1!=y.indexOf("WebKit");ma=!v&&!w&&"Gecko"==na.product}var B=v,C=la,D=ma,oa=w;function pa(){var a=p.document;return a?a.documentMode:g}var E; -a:{var qa="",G;if(B&&p.opera)var ra=p.opera.version,qa="function"==typeof ra?ra():ra;else if(D?G=/rv\:([^\);]+)(\)|;)/:C?G=/MSIE\s+([^\);]+)(\)|;)/:oa&&(G=/WebKit\/(\S+)/),G)var sa=G.exec(x()),qa=sa?sa[1]:"";if(C){var ta=pa();if(ta>parseFloat(qa)){E=String(ta);break a}}E=qa}var ua={};function va(a){return ua[a]||(ua[a]=0<=s(E,a))}var wa=p.document,H=!wa||!C?g:pa()||("CSS1Compat"==wa.compatMode?parseInt(E,10):5);!D&&!C||C&&C&&9<=H||D&&va("1.9.1");C&&va("9");function xa(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function za(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function Aa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Ba(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(C&&!(C&&9<=H)){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?Ca(a,b):!c&&Aa(e,b)?-1*Da(a,b):!d&&Aa(f,a)?Da(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(k);d=d.createRange();d.selectNode(b);d.collapse(k);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function Da(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ca(d,a)}function Ca(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Ea,Fa,Ga,Ha,Ia,Ja,Ka;Ka=Ja=Ia=Ha=Ga=Fa=Ea=m;var I=x();I&&(-1!=I.indexOf("Firefox")?Ea=k:-1!=I.indexOf("Camino")?Fa=k:-1!=I.indexOf("iPhone")||-1!=I.indexOf("iPod")?Ga=k:-1!=I.indexOf("iPad")?Ha=k:-1!=I.indexOf("Android")?Ia=k:-1!=I.indexOf("Chrome")?Ja=k:-1!=I.indexOf("Safari")&&(Ka=k));var La=Ea,Ma=Fa,Na=Ga,Oa=Ha,Pa=Ia,Qa=Ja,Ra=Ka;function J(a){return(a=a.exec(x()))?a[1]:""}var Sa=function(){if(La)return J(/Firefox\/([0-9.]+)/);if(C||B)return E;if(Qa)return J(/Chrome\/([0-9.]+)/);if(Ra)return J(/Version\/([0-9.]+)/);if(Na||Oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(Pa)return(a=J(/Android\s+([0-9.]+)/))?a:J(/Version\/([0-9.]+)/);if(Ma)return J(/Camino\/([0-9.]+)/)}return""}();var Ta,Ua;function Va(a){return Wa?Ta(a):C?0<=s(H,a):va(a)}var Wa=function(){if(!D)return m;var a=p.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;Ta=function(a){return 0<=d.m(e,""+a)};Ua=function(a){d.m(f,""+a)};return k}(),Xa; -if(Pa){var Ya=/Android\s+([0-9\.]+)/.exec(x());Xa=Ya?Ya[1]:"0"}else Xa="0";var Za=Xa;Pa&&(Wa?Ua(2.3):Pa?s(Za,2.3):s(Sa,2.3));function K(a,b){this.code=a;this.state=$a[a]||ab;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;K.F=a.prototype;K.prototype=new b})(); -var ab="unknown error",$a={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};$a[13]=ab;$a[9]="unknown command";K.prototype.toString=function(){return this.name+": "+this.message};var L=C&&!(C&&9<=H),bb=C&&!(C&&8<=H);function cb(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.B=e;this.parentNode=b}function db(a,b,c){var d=bb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new cb(b,a,b.nodeName,d,c)};function M(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(L&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),L&&"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} -function O(a,b,c){if(b===l)return k;try{if(!a.getAttribute)return m}catch(d){return m}bb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function eb(a,b,c,d,e){return(L?fb:gb).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new P)} -function fb(a,b,c,d,e){if(m||8==a.d||c&&a.d===l){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],t=0;b=f[t++];)O(b,c,d)&&h.push(b);f=h}for(t=0;b=f[t++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ib(a,b,c,d,e);return e} -function gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!C?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),u(b,function(a){O(a,c,d)&&e.add(a)}));return e} -function jb(a,b,c,d,e){var f;if((m||8==a.d||c&&a.d===l)&&(f=b.childNodes)){var h=hb(a);if("*"!=h&&(f=ga(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ga(f,function(a){return O(a,c,d)}));u(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return kb(a,b,c,d,e)}function kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b);return e} -function ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b),ib(a,b,c,d,e)}function hb(a){if(m){if(8==a.d)return"!";if(a.d===l)return"*"}return a.getName()};function P(){this.b=this.a=l;this.e=0}function lb(a){this.k=a;this.next=this.i=l}P.prototype.unshift=function(a){a=new lb(a);a.next=this.a;this.b?this.a.i=a:this.a=this.b=a;this.a=a;this.e++};P.prototype.add=function(a){a=new lb(a);a.i=this.b;this.a?this.b.next=a:this.a=this.b=a;this.b=a;this.e++};function mb(a){return(a=a.a)?a.k:l}function nb(a){return(a=mb(a))?M(a):""}function Q(a,b){this.z=a;this.j=(this.l=b)?a.b:a.a;this.p=l} -Q.prototype.next=function(){var a=this.j;if(a==l)return l;var b=this.p=a;this.j=this.l?a.i:a.next;return b.k};function R(a,b){var c=a.evaluate(b);return c instanceof P?+nb(c):+c}function S(a,b){var c=a.evaluate(b);return c instanceof P?nb(c):""+c}function T(a,b){var c=a.evaluate(b);return c instanceof P?!!c.e:!!c};function U(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof P&&c instanceof P){e=new Q(b,m);for(d=e.next();d;d=e.next()){b=new Q(c,m);for(f=b.next();f;f=b.next())if(a(M(d),M(f)))return k}return m}if(b instanceof P||c instanceof P){b instanceof P?e=b:(e=c,c=b);e=new Q(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+M(d);break;case "boolean":d=!!M(d);break;case "string":d=M(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return k}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function ob(a,b,c,d){this.q=a;this.D=b;this.n=c;this.o=d}ob.prototype.toString=function(){return this.q};var pb={};function V(a,b,c,d){if(a in pb)throw Error("Binary operator already created: "+a);a=new ob(a,b,c,d);pb[a.toString()]=a}V("div",6,1,function(a,b,c){return R(a,c)/R(b,c)});V("mod",6,1,function(a,b,c){return R(a,c)%R(b,c)});V("*",6,1,function(a,b,c){return R(a,c)*R(b,c)}); -V("+",5,1,function(a,b,c){return R(a,c)+R(b,c)});V("-",5,1,function(a,b,c){return R(a,c)-R(b,c)});V("<",4,2,function(a,b,c){return U(function(a,b){return a<b},a,b,c)});V(">",4,2,function(a,b,c){return U(function(a,b){return a>b},a,b,c)});V("<=",4,2,function(a,b,c){return U(function(a,b){return a<=b},a,b,c)});V(">=",4,2,function(a,b,c){return U(function(a,b){return a>=b},a,b,c)});V("=",3,2,function(a,b,c){return U(function(a,b){return a==b},a,b,c,k)}); -V("!=",3,2,function(a,b,c){return U(function(a,b){return a!=b},a,b,c,k)});V("and",2,2,function(a,b,c){return T(a,c)&&T(b,c)});V("or",1,2,function(a,b,c){return T(a,c)||T(b,c)});function qb(a,b,c,d,e,f,h,t,F){this.g=a;this.n=b;this.w=c;this.v=d;this.u=e;this.o=f;this.t=h;this.s=t!==g?t:h;this.A=!!F}qb.prototype.toString=function(){return this.g};var rb={};function W(a,b,c,d,e,f,h,t){if(a in rb)throw Error("Function already created: "+a+".");rb[a]=new qb(a,b,c,d,m,e,f,h,t)}W("boolean",2,m,m,function(a,b){return T(b,a)},1);W("ceiling",1,m,m,function(a,b){return Math.ceil(R(b,a))},1); -W("concat",3,m,m,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+S(c,a)})},2,l);W("contains",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return-1!=b.indexOf(a)},2);W("count",1,m,m,function(a,b){return b.evaluate(a).e},1,1,k);W("false",2,m,m,n(m),0);W("floor",1,m,m,function(a,b){return Math.floor(R(b,a))},1); -W("id",4,m,m,function(a,b){function c(a){if(L){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=S(b,a).split(/\s+/),f=[];u(d,function(a){a=c(a);var b;if(b=a){a:if(r(f))b=!r(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Ba);var h=new P;u(f,function(a){h.add(a)});return h},1); -W("lang",2,m,m,n(m),1);W("last",1,k,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.b},0);W("local-name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("namespace-uri",3,k,m,n(""),0,1,k);W("normalize-space",3,m,k,function(a,b){return(b?S(b,a):M(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -W("not",2,m,m,function(a,b){return!T(b,a)},1);W("number",1,m,k,function(a,b){return b?R(b,a):+M(a.c)},0,1);W("position",1,k,m,function(a){return a.C},0);W("round",1,m,m,function(a,b){return Math.round(R(b,a))},1);W("starts-with",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return 0==b.lastIndexOf(a,0)},2);W("string",3,m,k,function(a,b){return b?S(b,a):M(a.c)},0,1);W("string-length",1,m,k,function(a,b){return(b?S(b,a):M(a.c)).length},0,1); -W("substring",3,m,m,function(a,b,c,d){c=R(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?R(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=S(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);W("substring-after",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -W("substring-before",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);W("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new Q(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+M(e);return d},1,1,k);W("translate",3,m,m,function(a,b,c,d){b=S(b,a);c=S(c,a);var e=S(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);W("true",2,m,m,n(k),0);function sb(a,b,c,d){this.g=a;this.r=b;this.l=c;this.G=d}sb.prototype.toString=function(){return this.g};var tb={};function X(a,b,c,d){if(a in tb)throw Error("Axis already created: "+a);tb[a]=new sb(a,b,c,!!d)}X("ancestor",function(a,b){for(var c=new P,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},k);X("ancestor-or-self",function(a,b){var c=new P,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},k); -X("attribute",function(a,b){var c=new P,d=a.getName();if("style"==d&&b.style&&L)return c.add(new cb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.d===l||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)L?h.nodeValue&&c.add(db(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(L?h.nodeValue&&c.add(db(b,h,b.sourceIndex)):c.add(h));return c},m);X("child",function(a,b,c,d,e){return(L?jb:kb).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new P)},m,k);X("descendant",eb,m,k); -X("descendant-or-self",function(a,b,c,d){var e=new P;O(b,c,d)&&a.matches(b)&&e.add(b);return eb(a,b,c,d,e)},m,k);X("following",function(a,b,c,d){var e=new P;do for(var f=b;f=f.nextSibling;)O(f,c,d)&&a.matches(f)&&e.add(f),e=eb(a,f,c,d,e);while(b=b.parentNode);return e},m,k);X("following-sibling",function(a,b){for(var c=new P,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);X("namespace",function(){return new P},m); -X("parent",function(a,b){var c=new P;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);X("preceding",function(a,b,c,d){var e=new P,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,t=f.length;h<t;h++){var F=[];for(b=f[h];b=b.previousSibling;)F.unshift(b);for(var N=0,ea=F.length;N<ea;N++)b=F[N],O(b,c,d)&&a.matches(b)&&e.add(b),e=eb(a,b,c,d,e)}return e},k,k); -X("preceding-sibling",function(a,b){for(var c=new P,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},k);X("self",function(a,b){var c=new P;a.matches(b)&&c.add(b);return c},m);!B&&(!oa||Va("533"));function ub(){return da.top};function vb(){this.f=g} -function wb(a,b,c){switch(typeof b){case "string":xb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],wb(a,a.f?a.f.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),xb(f, -c),c.push(":"),wb(a,a.f?a.f.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var yb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},zb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function xb(a,b){b.push('"',a.replace(zb,function(a){if(a in yb)return yb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return yb[a]=e+b.toString(16)}),'"')};oa||B||D&&Va(3.5)||C&&Va(8);function Ab(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,Ab);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Bb(a);return b}if("document"in a)return b={},b.WINDOW=Bb(a),b;if(aa(a))return ha(a,Ab);a=xa(a,function(a,b){return"number"==typeof b||r(b)});return ya(a,Ab);default:return l}} -function Cb(a,b){return"array"==q(a)?ha(a,function(a){return Cb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Db(a.ELEMENT,b):"WINDOW"in a?Db(a.WINDOW,b):ya(a,function(a){return Cb(a,b)}):a}function Eb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.h=ca());b.h||(b.h=ca());return b}function Bb(a){var b=Eb(a.ownerDocument),c=za(b,function(b){return b==a});c||(c=":wdc:"+b.h++,b[c]=a);return c} -function Db(a,b){a=decodeURIComponent(a);var c=b||document,d=Eb(c);if(!(a in d))throw new K(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new K(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new K(10,"Element is no longer attached to the DOM");};function Fb(){var a=ub,b=[],c=window||da,d;try{var a=r(a)?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Cb(b,c.document),f=a.apply(l,e);d={status:0,value:Ab(f)}}catch(h){d={status:"code"in h?h.code:13,value:{message:h.message}}}a=[];wb(new vb,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Fb!==g?Z[$]=Fb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/deps.js b/src/ghostdriver/third_party/webdriver-atoms/deps.js deleted file mode 100644 index 1ce008789..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/deps.js +++ /dev/null @@ -1,16068 +0,0 @@ -// Copyright 2006 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Bootstrap for the Google JS Library (Closure). - * - * In uncompiled mode base.js will write out Closure's deps file, unless the - * global <code>CLOSURE_NO_DEPS</code> is set to true. This allows projects to - * include their own deps file(s) from different locations. - * - * - * @provideGoog - */ - - -/** - * @define {boolean} Overridden to true by the compiler when --closure_pass - * or --mark_as_compiled is specified. - */ -var COMPILED = false; - - -/** - * Base namespace for the Closure library. Checks to see goog is - * already defined in the current scope before assigning to prevent - * clobbering if base.js is loaded more than once. - * - * @const - */ -var goog = goog || {}; // Identifies this file as the Closure base. - - -/** - * Reference to the global context. In most cases this will be 'window'. - */ -goog.global = this; - - -/** - * @define {boolean} DEBUG is provided as a convenience so that debugging code - * that should not be included in a production js_binary can be easily stripped - * by specifying --define goog.DEBUG=false to the JSCompiler. For example, most - * toString() methods should be declared inside an "if (goog.DEBUG)" conditional - * because they are generally used for debugging purposes and it is difficult - * for the JSCompiler to statically determine whether they are used. - */ -goog.DEBUG = true; - - -/** - * @define {string} LOCALE defines the locale being used for compilation. It is - * used to select locale specific data to be compiled in js binary. BUILD rule - * can specify this value by "--define goog.LOCALE=<locale_name>" as JSCompiler - * option. - * - * Take into account that the locale code format is important. You should use - * the canonical Unicode format with hyphen as a delimiter. Language must be - * lowercase, Language Script - Capitalized, Region - UPPERCASE. - * There are few examples: pt-BR, en, en-US, sr-Latin-BO, zh-Hans-CN. - * - * See more info about locale codes here: - * http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers - * - * For language codes you should use values defined by ISO 693-1. See it here - * http://www.w3.org/WAI/ER/IG/ert/iso639.htm. There is only one exception from - * this rule: the Hebrew language. For legacy reasons the old code (iw) should - * be used instead of the new code (he), see http://wiki/Main/IIISynonyms. - */ -goog.LOCALE = 'en'; // default to en - - -/** - * Creates object stubs for a namespace. The presence of one or more - * goog.provide() calls indicate that the file defines the given - * objects/namespaces. Build tools also scan for provide/require statements - * to discern dependencies, build dependency files (see deps.js), etc. - * @see goog.require - * @param {string} name Namespace provided by this file in the form - * "goog.package.part". - */ -goog.provide = function(name) { - if (!COMPILED) { - // Ensure that the same namespace isn't provided twice. This is intended - // to teach new developers that 'goog.provide' is effectively a variable - // declaration. And when JSCompiler transforms goog.provide into a real - // variable declaration, the compiled JS should work the same as the raw - // JS--even when the raw JS uses goog.provide incorrectly. - if (goog.isProvided_(name)) { - throw Error('Namespace "' + name + '" already declared.'); - } - delete goog.implicitNamespaces_[name]; - - var namespace = name; - while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) { - if (goog.getObjectByName(namespace)) { - break; - } - goog.implicitNamespaces_[namespace] = true; - } - } - - goog.exportPath_(name); -}; - - -/** - * Marks that the current file should only be used for testing, and never for - * live code in production. - * @param {string=} opt_message Optional message to add to the error that's - * raised when used in production code. - */ -goog.setTestOnly = function(opt_message) { - if (COMPILED && !goog.DEBUG) { - opt_message = opt_message || ''; - throw Error('Importing test-only code into non-debug environment' + - opt_message ? ': ' + opt_message : '.'); - } -}; - - -if (!COMPILED) { - - /** - * Check if the given name has been goog.provided. This will return false for - * names that are available only as implicit namespaces. - * @param {string} name name of the object to look for. - * @return {boolean} Whether the name has been provided. - * @private - */ - goog.isProvided_ = function(name) { - return !goog.implicitNamespaces_[name] && !!goog.getObjectByName(name); - }; - - /** - * Namespaces implicitly defined by goog.provide. For example, - * goog.provide('goog.events.Event') implicitly declares - * that 'goog' and 'goog.events' must be namespaces. - * - * @type {Object} - * @private - */ - goog.implicitNamespaces_ = {}; -} - - -/** - * Builds an object structure for the provided namespace path, - * ensuring that names that already exist are not overwritten. For - * example: - * "a.b.c" -> a = {};a.b={};a.b.c={}; - * Used by goog.provide and goog.exportSymbol. - * @param {string} name name of the object that this file defines. - * @param {*=} opt_object the object to expose at the end of the path. - * @param {Object=} opt_objectToExportTo The object to add the path to; default - * is |goog.global|. - * @private - */ -goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) { - var parts = name.split('.'); - var cur = opt_objectToExportTo || goog.global; - - // Internet Explorer exhibits strange behavior when throwing errors from - // methods externed in this manner. See the testExportSymbolExceptions in - // base_test.html for an example. - if (!(parts[0] in cur) && cur.execScript) { - cur.execScript('var ' + parts[0]); - } - - // Certain browsers cannot parse code in the form for((a in b); c;); - // This pattern is produced by the JSCompiler when it collapses the - // statement above into the conditional loop below. To prevent this from - // happening, use a for-loop and reserve the init logic as below. - - // Parentheses added to eliminate strict JS warning in Firefox. - for (var part; parts.length && (part = parts.shift());) { - if (!parts.length && goog.isDef(opt_object)) { - // last part and we have an object; use it - cur[part] = opt_object; - } else if (cur[part]) { - cur = cur[part]; - } else { - cur = cur[part] = {}; - } - } -}; - - -/** - * Returns an object based on its fully qualified external name. If you are - * using a compilation pass that renames property names beware that using this - * function will not find renamed properties. - * - * @param {string} name The fully qualified name. - * @param {Object=} opt_obj The object within which to look; default is - * |goog.global|. - * @return {?} The value (object or primitive) or, if not found, null. - */ -goog.getObjectByName = function(name, opt_obj) { - var parts = name.split('.'); - var cur = opt_obj || goog.global; - for (var part; part = parts.shift(); ) { - if (goog.isDefAndNotNull(cur[part])) { - cur = cur[part]; - } else { - return null; - } - } - return cur; -}; - - -/** - * Globalizes a whole namespace, such as goog or goog.lang. - * - * @param {Object} obj The namespace to globalize. - * @param {Object=} opt_global The object to add the properties to. - * @deprecated Properties may be explicitly exported to the global scope, but - * this should no longer be done in bulk. - */ -goog.globalize = function(obj, opt_global) { - var global = opt_global || goog.global; - for (var x in obj) { - global[x] = obj[x]; - } -}; - - -/** - * Adds a dependency from a file to the files it requires. - * @param {string} relPath The path to the js file. - * @param {Array} provides An array of strings with the names of the objects - * this file provides. - * @param {Array} requires An array of strings with the names of the objects - * this file requires. - */ -goog.addDependency = function(relPath, provides, requires) { - if (!COMPILED) { - var provide, require; - var path = relPath.replace(/\\/g, '/'); - var deps = goog.dependencies_; - for (var i = 0; provide = provides[i]; i++) { - deps.nameToPath[provide] = path; - if (!(path in deps.pathToNames)) { - deps.pathToNames[path] = {}; - } - deps.pathToNames[path][provide] = true; - } - for (var j = 0; require = requires[j]; j++) { - if (!(path in deps.requires)) { - deps.requires[path] = {}; - } - deps.requires[path][require] = true; - } - } -}; - - - - -// NOTE(nnaze): The debug DOM loader was included in base.js as an orignal -// way to do "debug-mode" development. The dependency system can sometimes -// be confusing, as can the debug DOM loader's asyncronous nature. -// -// With the DOM loader, a call to goog.require() is not blocking -- the -// script will not load until some point after the current script. If a -// namespace is needed at runtime, it needs to be defined in a previous -// script, or loaded via require() with its registered dependencies. -// User-defined namespaces may need their own deps file. See http://go/js_deps, -// http://go/genjsdeps, or, externally, DepsWriter. -// http://code.google.com/closure/library/docs/depswriter.html -// -// Because of legacy clients, the DOM loader can't be easily removed from -// base.js. Work is being done to make it disableable or replaceable for -// different environments (DOM-less JavaScript interpreters like Rhino or V8, -// for example). See bootstrap/ for more information. - - -/** - * @define {boolean} Whether to enable the debug loader. - * - * If enabled, a call to goog.require() will attempt to load the namespace by - * appending a script tag to the DOM (if the namespace has been registered). - * - * If disabled, goog.require() will simply assert that the namespace has been - * provided (and depend on the fact that some outside tool correctly ordered - * the script). - */ -goog.ENABLE_DEBUG_LOADER = true; - - -/** - * Implements a system for the dynamic resolution of dependencies - * that works in parallel with the BUILD system. Note that all calls - * to goog.require will be stripped by the JSCompiler when the - * --closure_pass option is used. - * @see goog.provide - * @param {string} name Namespace to include (as was given in goog.provide()) - * in the form "goog.package.part". - */ -goog.require = function(name) { - - // if the object already exists we do not need do do anything - // TODO(arv): If we start to support require based on file name this has - // to change - // TODO(arv): If we allow goog.foo.* this has to change - // TODO(arv): If we implement dynamic load after page load we should probably - // not remove this code for the compiled output - if (!COMPILED) { - if (goog.isProvided_(name)) { - return; - } - - if (goog.ENABLE_DEBUG_LOADER) { - var path = goog.getPathFromDeps_(name); - if (path) { - goog.included_[path] = true; - goog.writeScripts_(); - return; - } - } - - var errorMessage = 'goog.require could not find: ' + name; - if (goog.global.console) { - goog.global.console['error'](errorMessage); - } - - - throw Error(errorMessage); - - } -}; - - -/** - * Path for included scripts - * @type {string} - */ -goog.basePath = ''; - - -/** - * A hook for overriding the base path. - * @type {string|undefined} - */ -goog.global.CLOSURE_BASE_PATH; - - -/** - * Whether to write out Closure's deps file. By default, - * the deps are written. - * @type {boolean|undefined} - */ -goog.global.CLOSURE_NO_DEPS; - - -/** - * A function to import a single script. This is meant to be overridden when - * Closure is being run in non-HTML contexts, such as web workers. It's defined - * in the global scope so that it can be set before base.js is loaded, which - * allows deps.js to be imported properly. - * - * The function is passed the script source, which is a relative URI. It should - * return true if the script was imported, false otherwise. - */ -goog.global.CLOSURE_IMPORT_SCRIPT; - - -/** - * Null function used for default values of callbacks, etc. - * @return {void} Nothing. - */ -goog.nullFunction = function() {}; - - -/** - * The identity function. Returns its first argument. - * - * @param {*=} opt_returnValue The single value that will be returned. - * @param {...*} var_args Optional trailing arguments. These are ignored. - * @return {?} The first argument. We can't know the type -- just pass it along - * without type. - * @deprecated Use goog.functions.identity instead. - */ -goog.identityFunction = function(opt_returnValue, var_args) { - return opt_returnValue; -}; - - -/** - * When defining a class Foo with an abstract method bar(), you can do: - * - * Foo.prototype.bar = goog.abstractMethod - * - * Now if a subclass of Foo fails to override bar(), an error - * will be thrown when bar() is invoked. - * - * Note: This does not take the name of the function to override as - * an argument because that would make it more difficult to obfuscate - * our JavaScript code. - * - * @type {!Function} - * @throws {Error} when invoked to indicate the method should be - * overridden. - */ -goog.abstractMethod = function() { - throw Error('unimplemented abstract method'); -}; - - -/** - * Adds a {@code getInstance} static method that always return the same instance - * object. - * @param {!Function} ctor The constructor for the class to add the static - * method to. - */ -goog.addSingletonGetter = function(ctor) { - ctor.getInstance = function() { - if (ctor.instance_) { - return ctor.instance_; - } - if (goog.DEBUG) { - // NOTE: JSCompiler can't optimize away Array#push. - goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor; - } - return ctor.instance_ = new ctor; - }; -}; - - -/** - * All singleton classes that have been instantiated, for testing. Don't read - * it directly, use the {@code goog.testing.singleton} module. The compiler - * removes this variable if unused. - * @type {!Array.<!Function>} - * @private - */ -goog.instantiatedSingletons_ = []; - - -if (!COMPILED && goog.ENABLE_DEBUG_LOADER) { - /** - * Object used to keep track of urls that have already been added. This - * record allows the prevention of circular dependencies. - * @type {Object} - * @private - */ - goog.included_ = {}; - - - /** - * This object is used to keep track of dependencies and other data that is - * used for loading scripts - * @private - * @type {Object} - */ - goog.dependencies_ = { - pathToNames: {}, // 1 to many - nameToPath: {}, // 1 to 1 - requires: {}, // 1 to many - // used when resolving dependencies to prevent us from - // visiting the file twice - visited: {}, - written: {} // used to keep track of script files we have written - }; - - - /** - * Tries to detect whether is in the context of an HTML document. - * @return {boolean} True if it looks like HTML document. - * @private - */ - goog.inHtmlDocument_ = function() { - var doc = goog.global.document; - return typeof doc != 'undefined' && - 'write' in doc; // XULDocument misses write. - }; - - - /** - * Tries to detect the base path of the base.js script that bootstraps Closure - * @private - */ - goog.findBasePath_ = function() { - if (goog.global.CLOSURE_BASE_PATH) { - goog.basePath = goog.global.CLOSURE_BASE_PATH; - return; - } else if (!goog.inHtmlDocument_()) { - return; - } - var doc = goog.global.document; - var scripts = doc.getElementsByTagName('script'); - // Search backwards since the current script is in almost all cases the one - // that has base.js. - for (var i = scripts.length - 1; i >= 0; --i) { - var src = scripts[i].src; - var qmark = src.lastIndexOf('?'); - var l = qmark == -1 ? src.length : qmark; - if (src.substr(l - 7, 7) == 'base.js') { - goog.basePath = src.substr(0, l - 7); - return; - } - } - }; - - - /** - * Imports a script if, and only if, that script hasn't already been imported. - * (Must be called at execution time) - * @param {string} src Script source. - * @private - */ - goog.importScript_ = function(src) { - var importScript = goog.global.CLOSURE_IMPORT_SCRIPT || - goog.writeScriptTag_; - if (!goog.dependencies_.written[src] && importScript(src)) { - goog.dependencies_.written[src] = true; - } - }; - - - /** - * The default implementation of the import function. Writes a script tag to - * import the script. - * - * @param {string} src The script source. - * @return {boolean} True if the script was imported, false otherwise. - * @private - */ - goog.writeScriptTag_ = function(src) { - if (goog.inHtmlDocument_()) { - var doc = goog.global.document; - - // If the user tries to require a new symbol after document load, - // something has gone terribly wrong. Doing a document.write would - // wipe out the page. - if (doc.readyState == 'complete') { - // Certain test frameworks load base.js multiple times, which tries - // to write deps.js each time. If that happens, just fail silently. - // These frameworks wipe the page between each load of base.js, so this - // is OK. - var isDeps = /\bdeps.js$/.test(src); - if (isDeps) { - return false; - } else { - throw Error('Cannot write "' + src + '" after document load'); - } - } - - doc.write( - '<script type="text/javascript" src="' + src + '"></' + 'script>'); - return true; - } else { - return false; - } - }; - - - /** - * Resolves dependencies based on the dependencies added using addDependency - * and calls importScript_ in the correct order. - * @private - */ - goog.writeScripts_ = function() { - // the scripts we need to write this time - var scripts = []; - var seenScript = {}; - var deps = goog.dependencies_; - - function visitNode(path) { - if (path in deps.written) { - return; - } - - // we have already visited this one. We can get here if we have cyclic - // dependencies - if (path in deps.visited) { - if (!(path in seenScript)) { - seenScript[path] = true; - scripts.push(path); - } - return; - } - - deps.visited[path] = true; - - if (path in deps.requires) { - for (var requireName in deps.requires[path]) { - // If the required name is defined, we assume that it was already - // bootstrapped by other means. - if (!goog.isProvided_(requireName)) { - if (requireName in deps.nameToPath) { - visitNode(deps.nameToPath[requireName]); - } else { - throw Error('Undefined nameToPath for ' + requireName); - } - } - } - } - - if (!(path in seenScript)) { - seenScript[path] = true; - scripts.push(path); - } - } - - for (var path in goog.included_) { - if (!deps.written[path]) { - visitNode(path); - } - } - - for (var i = 0; i < scripts.length; i++) { - if (scripts[i]) { - goog.importScript_(goog.basePath + scripts[i]); - } else { - throw Error('Undefined script input'); - } - } - }; - - - /** - * Looks at the dependency rules and tries to determine the script file that - * fulfills a particular rule. - * @param {string} rule In the form goog.namespace.Class or project.script. - * @return {?string} Url corresponding to the rule, or null. - * @private - */ - goog.getPathFromDeps_ = function(rule) { - if (rule in goog.dependencies_.nameToPath) { - return goog.dependencies_.nameToPath[rule]; - } else { - return null; - } - }; - - goog.findBasePath_(); - - // Allow projects to manage the deps files themselves. - if (!goog.global.CLOSURE_NO_DEPS) { - goog.importScript_(goog.basePath + 'deps.js'); - } -} - - - -//============================================================================== -// Language Enhancements -//============================================================================== - - -/** - * This is a "fixed" version of the typeof operator. It differs from the typeof - * operator in such a way that null returns 'null' and arrays return 'array'. - * @param {*} value The value to get the type of. - * @return {string} The name of the type. - */ -goog.typeOf = function(value) { - var s = typeof value; - if (s == 'object') { - if (value) { - // Check these first, so we can avoid calling Object.prototype.toString if - // possible. - // - // IE improperly marshals tyepof across execution contexts, but a - // cross-context object will still return false for "instanceof Object". - if (value instanceof Array) { - return 'array'; - } else if (value instanceof Object) { - return s; - } - - // HACK: In order to use an Object prototype method on the arbitrary - // value, the compiler requires the value be cast to type Object, - // even though the ECMA spec explicitly allows it. - var className = Object.prototype.toString.call( - /** @type {Object} */ (value)); - // In Firefox 3.6, attempting to access iframe window objects' length - // property throws an NS_ERROR_FAILURE, so we need to special-case it - // here. - if (className == '[object Window]') { - return 'object'; - } - - // We cannot always use constructor == Array or instanceof Array because - // different frames have different Array objects. In IE6, if the iframe - // where the array was created is destroyed, the array loses its - // prototype. Then dereferencing val.splice here throws an exception, so - // we can't use goog.isFunction. Calling typeof directly returns 'unknown' - // so that will work. In this case, this function will return false and - // most array functions will still work because the array is still - // array-like (supports length and []) even though it has lost its - // prototype. - // Mark Miller noticed that Object.prototype.toString - // allows access to the unforgeable [[Class]] property. - // 15.2.4.2 Object.prototype.toString ( ) - // When the toString method is called, the following steps are taken: - // 1. Get the [[Class]] property of this object. - // 2. Compute a string value by concatenating the three strings - // "[object ", Result(1), and "]". - // 3. Return Result(2). - // and this behavior survives the destruction of the execution context. - if ((className == '[object Array]' || - // In IE all non value types are wrapped as objects across window - // boundaries (not iframe though) so we have to do object detection - // for this edge case - typeof value.length == 'number' && - typeof value.splice != 'undefined' && - typeof value.propertyIsEnumerable != 'undefined' && - !value.propertyIsEnumerable('splice') - - )) { - return 'array'; - } - // HACK: There is still an array case that fails. - // function ArrayImpostor() {} - // ArrayImpostor.prototype = []; - // var impostor = new ArrayImpostor; - // this can be fixed by getting rid of the fast path - // (value instanceof Array) and solely relying on - // (value && Object.prototype.toString.vall(value) === '[object Array]') - // but that would require many more function calls and is not warranted - // unless closure code is receiving objects from untrusted sources. - - // IE in cross-window calls does not correctly marshal the function type - // (it appears just as an object) so we cannot use just typeof val == - // 'function'. However, if the object has a call property, it is a - // function. - if ((className == '[object Function]' || - typeof value.call != 'undefined' && - typeof value.propertyIsEnumerable != 'undefined' && - !value.propertyIsEnumerable('call'))) { - return 'function'; - } - - - } else { - return 'null'; - } - - } else if (s == 'function' && typeof value.call == 'undefined') { - // In Safari typeof nodeList returns 'function', and on Firefox - // typeof behaves similarly for HTML{Applet,Embed,Object}Elements - // and RegExps. We would like to return object for those and we can - // detect an invalid function by making sure that the function - // object has a call method. - return 'object'; - } - return s; -}; - - -/** - * Returns true if the specified value is not |undefined|. - * WARNING: Do not use this to test if an object has a property. Use the in - * operator instead. Additionally, this function assumes that the global - * undefined variable has not been redefined. - * @param {*} val Variable to test. - * @return {boolean} Whether variable is defined. - */ -goog.isDef = function(val) { - return val !== undefined; -}; - - -/** - * Returns true if the specified value is |null| - * @param {*} val Variable to test. - * @return {boolean} Whether variable is null. - */ -goog.isNull = function(val) { - return val === null; -}; - - -/** - * Returns true if the specified value is defined and not null - * @param {*} val Variable to test. - * @return {boolean} Whether variable is defined and not null. - */ -goog.isDefAndNotNull = function(val) { - // Note that undefined == null. - return val != null; -}; - - -/** - * Returns true if the specified value is an array - * @param {*} val Variable to test. - * @return {boolean} Whether variable is an array. - */ -goog.isArray = function(val) { - return goog.typeOf(val) == 'array'; -}; - - -/** - * Returns true if the object looks like an array. To qualify as array like - * the value needs to be either a NodeList or an object with a Number length - * property. - * @param {*} val Variable to test. - * @return {boolean} Whether variable is an array. - */ -goog.isArrayLike = function(val) { - var type = goog.typeOf(val); - return type == 'array' || type == 'object' && typeof val.length == 'number'; -}; - - -/** - * Returns true if the object looks like a Date. To qualify as Date-like - * the value needs to be an object and have a getFullYear() function. - * @param {*} val Variable to test. - * @return {boolean} Whether variable is a like a Date. - */ -goog.isDateLike = function(val) { - return goog.isObject(val) && typeof val.getFullYear == 'function'; -}; - - -/** - * Returns true if the specified value is a string - * @param {*} val Variable to test. - * @return {boolean} Whether variable is a string. - */ -goog.isString = function(val) { - return typeof val == 'string'; -}; - - -/** - * Returns true if the specified value is a boolean - * @param {*} val Variable to test. - * @return {boolean} Whether variable is boolean. - */ -goog.isBoolean = function(val) { - return typeof val == 'boolean'; -}; - - -/** - * Returns true if the specified value is a number - * @param {*} val Variable to test. - * @return {boolean} Whether variable is a number. - */ -goog.isNumber = function(val) { - return typeof val == 'number'; -}; - - -/** - * Returns true if the specified value is a function - * @param {*} val Variable to test. - * @return {boolean} Whether variable is a function. - */ -goog.isFunction = function(val) { - return goog.typeOf(val) == 'function'; -}; - - -/** - * Returns true if the specified value is an object. This includes arrays - * and functions. - * @param {*} val Variable to test. - * @return {boolean} Whether variable is an object. - */ -goog.isObject = function(val) { - var type = typeof val; - return type == 'object' && val != null || type == 'function'; - // return Object(val) === val also works, but is slower, especially if val is - // not an object. -}; - - -/** - * Gets a unique ID for an object. This mutates the object so that further - * calls with the same object as a parameter returns the same value. The unique - * ID is guaranteed to be unique across the current session amongst objects that - * are passed into {@code getUid}. There is no guarantee that the ID is unique - * or consistent across sessions. It is unsafe to generate unique ID for - * function prototypes. - * - * @param {Object} obj The object to get the unique ID for. - * @return {number} The unique ID for the object. - */ -goog.getUid = function(obj) { - // TODO(arv): Make the type stricter, do not accept null. - - // In Opera window.hasOwnProperty exists but always returns false so we avoid - // using it. As a consequence the unique ID generated for BaseClass.prototype - // and SubClass.prototype will be the same. - return obj[goog.UID_PROPERTY_] || - (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_); -}; - - -/** - * Removes the unique ID from an object. This is useful if the object was - * previously mutated using {@code goog.getUid} in which case the mutation is - * undone. - * @param {Object} obj The object to remove the unique ID field from. - */ -goog.removeUid = function(obj) { - // TODO(arv): Make the type stricter, do not accept null. - - // DOM nodes in IE are not instance of Object and throws exception - // for delete. Instead we try to use removeAttribute - if ('removeAttribute' in obj) { - obj.removeAttribute(goog.UID_PROPERTY_); - } - /** @preserveTry */ - try { - delete obj[goog.UID_PROPERTY_]; - } catch (ex) { - } -}; - - -/** - * Name for unique ID property. Initialized in a way to help avoid collisions - * with other closure javascript on the same page. - * @type {string} - * @private - */ -goog.UID_PROPERTY_ = 'closure_uid_' + - Math.floor(Math.random() * 2147483648).toString(36); - - -/** - * Counter for UID. - * @type {number} - * @private - */ -goog.uidCounter_ = 0; - - -/** - * Adds a hash code field to an object. The hash code is unique for the - * given object. - * @param {Object} obj The object to get the hash code for. - * @return {number} The hash code for the object. - * @deprecated Use goog.getUid instead. - */ -goog.getHashCode = goog.getUid; - - -/** - * Removes the hash code field from an object. - * @param {Object} obj The object to remove the field from. - * @deprecated Use goog.removeUid instead. - */ -goog.removeHashCode = goog.removeUid; - - -/** - * Clones a value. The input may be an Object, Array, or basic type. Objects and - * arrays will be cloned recursively. - * - * WARNINGS: - * <code>goog.cloneObject</code> does not detect reference loops. Objects that - * refer to themselves will cause infinite recursion. - * - * <code>goog.cloneObject</code> is unaware of unique identifiers, and copies - * UIDs created by <code>getUid</code> into cloned results. - * - * @param {*} obj The value to clone. - * @return {*} A clone of the input value. - * @deprecated goog.cloneObject is unsafe. Prefer the goog.object methods. - */ -goog.cloneObject = function(obj) { - var type = goog.typeOf(obj); - if (type == 'object' || type == 'array') { - if (obj.clone) { - return obj.clone(); - } - var clone = type == 'array' ? [] : {}; - for (var key in obj) { - clone[key] = goog.cloneObject(obj[key]); - } - return clone; - } - - return obj; -}; - - -/** - * A native implementation of goog.bind. - * @param {Function} fn A function to partially apply. - * @param {Object|undefined} selfObj Specifies the object which |this| should - * point to when the function is run. - * @param {...*} var_args Additional arguments that are partially - * applied to the function. - * @return {!Function} A partially-applied form of the function bind() was - * invoked as a method of. - * @private - * @suppress {deprecated} The compiler thinks that Function.prototype.bind - * is deprecated because some people have declared a pure-JS version. - * Only the pure-JS version is truly deprecated. - */ -goog.bindNative_ = function(fn, selfObj, var_args) { - return /** @type {!Function} */ (fn.call.apply(fn.bind, arguments)); -}; - - -/** - * A pure-JS implementation of goog.bind. - * @param {Function} fn A function to partially apply. - * @param {Object|undefined} selfObj Specifies the object which |this| should - * point to when the function is run. - * @param {...*} var_args Additional arguments that are partially - * applied to the function. - * @return {!Function} A partially-applied form of the function bind() was - * invoked as a method of. - * @private - */ -goog.bindJs_ = function(fn, selfObj, var_args) { - if (!fn) { - throw new Error(); - } - - if (arguments.length > 2) { - var boundArgs = Array.prototype.slice.call(arguments, 2); - return function() { - // Prepend the bound arguments to the current arguments. - var newArgs = Array.prototype.slice.call(arguments); - Array.prototype.unshift.apply(newArgs, boundArgs); - return fn.apply(selfObj, newArgs); - }; - - } else { - return function() { - return fn.apply(selfObj, arguments); - }; - } -}; - - -/** - * Partially applies this function to a particular 'this object' and zero or - * more arguments. The result is a new function with some arguments of the first - * function pre-filled and the value of |this| 'pre-specified'.<br><br> - * - * Remaining arguments specified at call-time are appended to the pre- - * specified ones.<br><br> - * - * Also see: {@link #partial}.<br><br> - * - * Usage: - * <pre>var barMethBound = bind(myFunction, myObj, 'arg1', 'arg2'); - * barMethBound('arg3', 'arg4');</pre> - * - * @param {Function} fn A function to partially apply. - * @param {Object|undefined} selfObj Specifies the object which |this| should - * point to when the function is run. - * @param {...*} var_args Additional arguments that are partially - * applied to the function. - * @return {!Function} A partially-applied form of the function bind() was - * invoked as a method of. - * @suppress {deprecated} See above. - */ -goog.bind = function(fn, selfObj, var_args) { - // TODO(nicksantos): narrow the type signature. - if (Function.prototype.bind && - // NOTE(nicksantos): Somebody pulled base.js into the default - // Chrome extension environment. This means that for Chrome extensions, - // they get the implementation of Function.prototype.bind that - // calls goog.bind instead of the native one. Even worse, we don't want - // to introduce a circular dependency between goog.bind and - // Function.prototype.bind, so we have to hack this to make sure it - // works correctly. - Function.prototype.bind.toString().indexOf('native code') != -1) { - goog.bind = goog.bindNative_; - } else { - goog.bind = goog.bindJs_; - } - return goog.bind.apply(null, arguments); -}; - - -/** - * Like bind(), except that a 'this object' is not required. Useful when the - * target function is already bound. - * - * Usage: - * var g = partial(f, arg1, arg2); - * g(arg3, arg4); - * - * @param {Function} fn A function to partially apply. - * @param {...*} var_args Additional arguments that are partially - * applied to fn. - * @return {!Function} A partially-applied form of the function bind() was - * invoked as a method of. - */ -goog.partial = function(fn, var_args) { - var args = Array.prototype.slice.call(arguments, 1); - return function() { - // Prepend the bound arguments to the current arguments. - var newArgs = Array.prototype.slice.call(arguments); - newArgs.unshift.apply(newArgs, args); - return fn.apply(this, newArgs); - }; -}; - - -/** - * Copies all the members of a source object to a target object. This method - * does not work on all browsers for all objects that contain keys such as - * toString or hasOwnProperty. Use goog.object.extend for this purpose. - * @param {Object} target Target. - * @param {Object} source Source. - */ -goog.mixin = function(target, source) { - for (var x in source) { - target[x] = source[x]; - } - - // For IE7 or lower, the for-in-loop does not contain any properties that are - // not enumerable on the prototype object (for example, isPrototypeOf from - // Object.prototype) but also it will not include 'replace' on objects that - // extend String and change 'replace' (not that it is common for anyone to - // extend anything except Object). -}; - - -/** - * @return {number} An integer value representing the number of milliseconds - * between midnight, January 1, 1970 and the current time. - */ -goog.now = Date.now || (function() { - // Unary plus operator converts its operand to a number which in the case of - // a date is done by calling getTime(). - return +new Date(); -}); - - -/** - * Evals javascript in the global scope. In IE this uses execScript, other - * browsers use goog.global.eval. If goog.global.eval does not evaluate in the - * global scope (for example, in Safari), appends a script tag instead. - * Throws an exception if neither execScript or eval is defined. - * @param {string} script JavaScript string. - */ -goog.globalEval = function(script) { - if (goog.global.execScript) { - goog.global.execScript(script, 'JavaScript'); - } else if (goog.global.eval) { - // Test to see if eval works - if (goog.evalWorksForGlobals_ == null) { - goog.global.eval('var _et_ = 1;'); - if (typeof goog.global['_et_'] != 'undefined') { - delete goog.global['_et_']; - goog.evalWorksForGlobals_ = true; - } else { - goog.evalWorksForGlobals_ = false; - } - } - - if (goog.evalWorksForGlobals_) { - goog.global.eval(script); - } else { - var doc = goog.global.document; - var scriptElt = doc.createElement('script'); - scriptElt.type = 'text/javascript'; - scriptElt.defer = false; - // Note(user): can't use .innerHTML since "t('<test>')" will fail and - // .text doesn't work in Safari 2. Therefore we append a text node. - scriptElt.appendChild(doc.createTextNode(script)); - doc.body.appendChild(scriptElt); - doc.body.removeChild(scriptElt); - } - } else { - throw Error('goog.globalEval not available'); - } -}; - - -/** - * Indicates whether or not we can call 'eval' directly to eval code in the - * global scope. Set to a Boolean by the first call to goog.globalEval (which - * empirically tests whether eval works for globals). @see goog.globalEval - * @type {?boolean} - * @private - */ -goog.evalWorksForGlobals_ = null; - - -/** - * Optional map of CSS class names to obfuscated names used with - * goog.getCssName(). - * @type {Object|undefined} - * @private - * @see goog.setCssNameMapping - */ -goog.cssNameMapping_; - - -/** - * Optional obfuscation style for CSS class names. Should be set to either - * 'BY_WHOLE' or 'BY_PART' if defined. - * @type {string|undefined} - * @private - * @see goog.setCssNameMapping - */ -goog.cssNameMappingStyle_; - - -/** - * Handles strings that are intended to be used as CSS class names. - * - * This function works in tandem with @see goog.setCssNameMapping. - * - * Without any mapping set, the arguments are simple joined with a - * hyphen and passed through unaltered. - * - * When there is a mapping, there are two possible styles in which - * these mappings are used. In the BY_PART style, each part (i.e. in - * between hyphens) of the passed in css name is rewritten according - * to the map. In the BY_WHOLE style, the full css name is looked up in - * the map directly. If a rewrite is not specified by the map, the - * compiler will output a warning. - * - * When the mapping is passed to the compiler, it will replace calls - * to goog.getCssName with the strings from the mapping, e.g. - * var x = goog.getCssName('foo'); - * var y = goog.getCssName(this.baseClass, 'active'); - * becomes: - * var x= 'foo'; - * var y = this.baseClass + '-active'; - * - * If one argument is passed it will be processed, if two are passed - * only the modifier will be processed, as it is assumed the first - * argument was generated as a result of calling goog.getCssName. - * - * @param {string} className The class name. - * @param {string=} opt_modifier A modifier to be appended to the class name. - * @return {string} The class name or the concatenation of the class name and - * the modifier. - */ -goog.getCssName = function(className, opt_modifier) { - var getMapping = function(cssName) { - return goog.cssNameMapping_[cssName] || cssName; - }; - - var renameByParts = function(cssName) { - // Remap all the parts individually. - var parts = cssName.split('-'); - var mapped = []; - for (var i = 0; i < parts.length; i++) { - mapped.push(getMapping(parts[i])); - } - return mapped.join('-'); - }; - - var rename; - if (goog.cssNameMapping_) { - rename = goog.cssNameMappingStyle_ == 'BY_WHOLE' ? - getMapping : renameByParts; - } else { - rename = function(a) { - return a; - }; - } - - if (opt_modifier) { - return className + '-' + rename(opt_modifier); - } else { - return rename(className); - } -}; - - -/** - * Sets the map to check when returning a value from goog.getCssName(). Example: - * <pre> - * goog.setCssNameMapping({ - * "goog": "a", - * "disabled": "b", - * }); - * - * var x = goog.getCssName('goog'); - * // The following evaluates to: "a a-b". - * goog.getCssName('goog') + ' ' + goog.getCssName(x, 'disabled') - * </pre> - * When declared as a map of string literals to string literals, the JSCompiler - * will replace all calls to goog.getCssName() using the supplied map if the - * --closure_pass flag is set. - * - * @param {!Object} mapping A map of strings to strings where keys are possible - * arguments to goog.getCssName() and values are the corresponding values - * that should be returned. - * @param {string=} opt_style The style of css name mapping. There are two valid - * options: 'BY_PART', and 'BY_WHOLE'. - * @see goog.getCssName for a description. - */ -goog.setCssNameMapping = function(mapping, opt_style) { - goog.cssNameMapping_ = mapping; - goog.cssNameMappingStyle_ = opt_style; -}; - - -/** - * To use CSS renaming in compiled mode, one of the input files should have a - * call to goog.setCssNameMapping() with an object literal that the JSCompiler - * can extract and use to replace all calls to goog.getCssName(). In uncompiled - * mode, JavaScript code should be loaded before this base.js file that declares - * a global variable, CLOSURE_CSS_NAME_MAPPING, which is used below. This is - * to ensure that the mapping is loaded before any calls to goog.getCssName() - * are made in uncompiled mode. - * - * A hook for overriding the CSS name mapping. - * @type {Object|undefined} - */ -goog.global.CLOSURE_CSS_NAME_MAPPING; - - -if (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) { - // This does not call goog.setCssNameMapping() because the JSCompiler - // requires that goog.setCssNameMapping() be called with an object literal. - goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING; -} - - -/** - * Gets a localized message. - * - * This function is a compiler primitive. If you give the compiler a localized - * message bundle, it will replace the string at compile-time with a localized - * version, and expand goog.getMsg call to a concatenated string. - * - * Messages must be initialized in the form: - * <code> - * var MSG_NAME = goog.getMsg('Hello {$placeholder}', {'placeholder': 'world'}); - * </code> - * - * @param {string} str Translatable string, places holders in the form {$foo}. - * @param {Object=} opt_values Map of place holder name to value. - * @return {string} message with placeholders filled. - */ -goog.getMsg = function(str, opt_values) { - var values = opt_values || {}; - for (var key in values) { - var value = ('' + values[key]).replace(/\$/g, '$$$$'); - str = str.replace(new RegExp('\\{\\$' + key + '\\}', 'gi'), value); - } - return str; -}; - - -/** - * Gets a localized message. If the message does not have a translation, gives a - * fallback message. - * - * This is useful when introducing a new message that has not yet been - * translated into all languages. - * - * This function is a compiler primtive. Must be used in the form: - * <code>var x = goog.getMsgWithFallback(MSG_A, MSG_B);</code> - * where MSG_A and MSG_B were initialized with goog.getMsg. - * - * @param {string} a The preferred message. - * @param {string} b The fallback message. - * @return {string} The best translated message. - */ -goog.getMsgWithFallback = function(a, b) { - return a; -}; - - -/** - * Exposes an unobfuscated global namespace path for the given object. - * Note that fields of the exported object *will* be obfuscated, - * unless they are exported in turn via this function or - * goog.exportProperty - * - * <p>Also handy for making public items that are defined in anonymous - * closures. - * - * ex. goog.exportSymbol('public.path.Foo', Foo); - * - * ex. goog.exportSymbol('public.path.Foo.staticFunction', - * Foo.staticFunction); - * public.path.Foo.staticFunction(); - * - * ex. goog.exportSymbol('public.path.Foo.prototype.myMethod', - * Foo.prototype.myMethod); - * new public.path.Foo().myMethod(); - * - * @param {string} publicPath Unobfuscated name to export. - * @param {*} object Object the name should point to. - * @param {Object=} opt_objectToExportTo The object to add the path to; default - * is |goog.global|. - */ -goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) { - goog.exportPath_(publicPath, object, opt_objectToExportTo); -}; - - -/** - * Exports a property unobfuscated into the object's namespace. - * ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction); - * ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod); - * @param {Object} object Object whose static property is being exported. - * @param {string} publicName Unobfuscated name to export. - * @param {*} symbol Object the name should point to. - */ -goog.exportProperty = function(object, publicName, symbol) { - object[publicName] = symbol; -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * Usage: - * <pre> - * function ParentClass(a, b) { } - * ParentClass.prototype.foo = function(a) { } - * - * function ChildClass(a, b, c) { - * goog.base(this, a, b); - * } - * goog.inherits(ChildClass, ParentClass); - * - * var child = new ChildClass('a', 'b', 'see'); - * child.foo(); // works - * </pre> - * - * In addition, a superclass' implementation of a method can be invoked - * as follows: - * - * <pre> - * ChildClass.prototype.foo = function(a) { - * ChildClass.superClass_.foo.call(this, a); - * // other code - * }; - * </pre> - * - * @param {Function} childCtor Child class. - * @param {Function} parentCtor Parent class. - */ -goog.inherits = function(childCtor, parentCtor) { - /** @constructor */ - function tempCtor() {}; - tempCtor.prototype = parentCtor.prototype; - childCtor.superClass_ = parentCtor.prototype; - childCtor.prototype = new tempCtor(); - /** @override */ - childCtor.prototype.constructor = childCtor; -}; - - -/** - * Call up to the superclass. - * - * If this is called from a constructor, then this calls the superclass - * contructor with arguments 1-N. - * - * If this is called from a prototype method, then you must pass - * the name of the method as the second argument to this function. If - * you do not, you will get a runtime error. This calls the superclass' - * method with arguments 2-N. - * - * This function only works if you use goog.inherits to express - * inheritance relationships between your classes. - * - * This function is a compiler primitive. At compile-time, the - * compiler will do macro expansion to remove a lot of - * the extra overhead that this function introduces. The compiler - * will also enforce a lot of the assumptions that this function - * makes, and treat it as a compiler error if you break them. - * - * @param {!Object} me Should always be "this". - * @param {*=} opt_methodName The method name if calling a super method. - * @param {...*} var_args The rest of the arguments. - * @return {*} The return value of the superclass method. - */ -goog.base = function(me, opt_methodName, var_args) { - var caller = arguments.callee.caller; - if (caller.superClass_) { - // This is a constructor. Call the superclass constructor. - return caller.superClass_.constructor.apply( - me, Array.prototype.slice.call(arguments, 1)); - } - - var args = Array.prototype.slice.call(arguments, 2); - var foundCaller = false; - for (var ctor = me.constructor; - ctor; ctor = ctor.superClass_ && ctor.superClass_.constructor) { - if (ctor.prototype[opt_methodName] === caller) { - foundCaller = true; - } else if (foundCaller) { - return ctor.prototype[opt_methodName].apply(me, args); - } - } - - // If we did not find the caller in the prototype chain, - // then one of two things happened: - // 1) The caller is an instance method. - // 2) This method was not called by the right caller. - if (me[opt_methodName] === caller) { - return me.constructor.prototype[opt_methodName].apply(me, args); - } else { - throw Error( - 'goog.base called from a method of one name ' + - 'to a method of a different name'); - } -}; - - -/** - * Allow for aliasing within scope functions. This function exists for - * uncompiled code - in compiled code the calls will be inlined and the - * aliases applied. In uncompiled code the function is simply run since the - * aliases as written are valid JavaScript. - * @param {function()} fn Function to call. This function can contain aliases - * to namespaces (e.g. "var dom = goog.dom") or classes - * (e.g. "var Timer = goog.Timer"). - */ -goog.scope = function(fn) { - fn.call(goog.global); -}; - - -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class representing operations on binary expressions. - */ - - -goog.provide('wgxpath.BinaryExpr'); - -goog.require('wgxpath.DataType'); -goog.require('wgxpath.Expr'); -goog.require('wgxpath.Node'); - - - -/** - * Constructor for BinaryExpr. - * - * @param {!wgxpath.BinaryExpr.Op} op A binary operator. - * @param {!wgxpath.Expr} left The left hand side of the expression. - * @param {!wgxpath.Expr} right The right hand side of the expression. - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.BinaryExpr = function(op, left, right) { - var opCast = /** @type {!wgxpath.BinaryExpr.Op_} */ (op); - wgxpath.Expr.call(this, opCast.dataType_); - - /** - * @private - * @type {!wgxpath.BinaryExpr.Op_} - */ - this.op_ = opCast; - - /** - * @private - * @type {!wgxpath.Expr} - */ - this.left_ = left; - - /** - * @private - * @type {!wgxpath.Expr} - */ - this.right_ = right; - - this.setNeedContextPosition(left.doesNeedContextPosition() || - right.doesNeedContextPosition()); - this.setNeedContextNode(left.doesNeedContextNode() || - right.doesNeedContextNode()); - - // Optimize [@id="foo"] and [@name="bar"] - if (this.op_ == wgxpath.BinaryExpr.Op.EQUAL) { - if (!right.doesNeedContextNode() && !right.doesNeedContextPosition() && - right.getDataType() != wgxpath.DataType.NODESET && - right.getDataType() != wgxpath.DataType.VOID && left.getQuickAttr()) { - this.setQuickAttr({ - name: left.getQuickAttr().name, - valueExpr: right}); - } else if (!left.doesNeedContextNode() && !left.doesNeedContextPosition() && - left.getDataType() != wgxpath.DataType.NODESET && - left.getDataType() != wgxpath.DataType.VOID && right.getQuickAttr()) { - this.setQuickAttr({ - name: right.getQuickAttr().name, - valueExpr: left}); - } - } -}; -goog.inherits(wgxpath.BinaryExpr, wgxpath.Expr); - - -/** - * Performs comparison between the left hand side and the right hand side. - * - * @private - * @param {function((string|number|boolean), (string|number|boolean))} - * comp A comparison function that takes two parameters. - * @param {!wgxpath.Expr} lhs The left hand side of the expression. - * @param {!wgxpath.Expr} rhs The right hand side of the expression. - * @param {!wgxpath.Context} ctx The context to perform the comparison in. - * @param {boolean=} opt_equChk Whether the comparison checks for equality. - * @return {boolean} True if comp returns true, false otherwise. - */ -wgxpath.BinaryExpr.compare_ = function(comp, lhs, rhs, ctx, opt_equChk) { - var left = lhs.evaluate(ctx); - var right = rhs.evaluate(ctx); - var lIter, rIter, lNode, rNode; - if (left instanceof wgxpath.NodeSet && right instanceof wgxpath.NodeSet) { - lIter = left.iterator(); - for (lNode = lIter.next(); lNode; lNode = lIter.next()) { - rIter = right.iterator(); - for (rNode = rIter.next(); rNode; rNode = rIter.next()) { - if (comp(wgxpath.Node.getValueAsString(lNode), - wgxpath.Node.getValueAsString(rNode))) { - return true; - } - } - } - return false; - } - if ((left instanceof wgxpath.NodeSet) || - (right instanceof wgxpath.NodeSet)) { - var nodeset, primitive; - if ((left instanceof wgxpath.NodeSet)) { - nodeset = left, primitive = right; - } else { - nodeset = right, primitive = left; - } - var iter = nodeset.iterator(); - var type = typeof primitive; - for (var node = iter.next(); node; node = iter.next()) { - var stringValue; - switch (type) { - case 'number': - stringValue = wgxpath.Node.getValueAsNumber(node); - break; - case 'boolean': - stringValue = wgxpath.Node.getValueAsBool(node); - break; - case 'string': - stringValue = wgxpath.Node.getValueAsString(node); - break; - default: - throw Error('Illegal primitive type for comparison.'); - } - if (comp(stringValue, - /** @type {(string|number|boolean)} */ (primitive))) { - return true; - } - } - return false; - } - if (opt_equChk) { - if (typeof left == 'boolean' || typeof right == 'boolean') { - return comp(!!left, !!right); - } - if (typeof left == 'number' || typeof right == 'number') { - return comp(+left, +right); - } - return comp(left, right); - } - return comp(+left, +right); -}; - - -/** - * @override - * @return {(boolean|number)} The boolean or number result. - */ -wgxpath.BinaryExpr.prototype.evaluate = function(ctx) { - return this.op_.evaluate_(this.left_, this.right_, ctx); -}; - - -/** - * @override - */ -wgxpath.BinaryExpr.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'binary expression: ' + this.op_ + '\n'; - indent += wgxpath.Expr.INDENT; - text += this.left_.toString(indent) + '\n'; - text += this.right_.toString(indent); - return text; -}; - - - -/** - * A binary operator. - * - * @param {string} opString The operator string. - * @param {number} precedence The precedence when evaluated. - * @param {!wgxpath.DataType} dataType The dataType to return when evaluated. - * @param {function(!wgxpath.Expr, !wgxpath.Expr, !wgxpath.Context)} - * evaluate An evaluation function. - * @constructor - * @private - */ -wgxpath.BinaryExpr.Op_ = function(opString, precedence, dataType, evaluate) { - - /** - * @private - * @type {string} - */ - this.opString_ = opString; - - /** - * @private - * @type {number} - */ - this.precedence_ = precedence; - - /** - * @private - * @type {!wgxpath.DataType} - */ - this.dataType_ = dataType; - - /** - * @private - * @type {function(!wgxpath.Expr, !wgxpath.Expr, !wgxpath.Context)} - */ - this.evaluate_ = evaluate; -}; - - -/** - * Returns the precedence for the operator. - * - * @return {number} The precedence. - */ -wgxpath.BinaryExpr.Op_.prototype.getPrecedence = function() { - return this.precedence_; -}; - - -/** - * @override - */ -wgxpath.BinaryExpr.Op_.prototype.toString = function() { - return this.opString_; -}; - - -/** - * A mapping from operator strings to operator objects. - * - * @private - * @type {!Object.<string, !wgxpath.BinaryExpr.Op>} - */ -wgxpath.BinaryExpr.stringToOpMap_ = {}; - - -/** - * Creates a binary operator. - * - * @param {string} opString The operator string. - * @param {number} precedence The precedence when evaluated. - * @param {!wgxpath.DataType} dataType The dataType to return when evaluated. - * @param {function(!wgxpath.Expr, !wgxpath.Expr, !wgxpath.Context)} - * evaluate An evaluation function. - * @return {!wgxpath.BinaryExpr.Op} A binary expression operator. - * @private - */ -wgxpath.BinaryExpr.createOp_ = function(opString, precedence, dataType, - evaluate) { - if (opString in wgxpath.BinaryExpr.stringToOpMap_) { - throw new Error('Binary operator already created: ' + opString); - } - // The upcast and then downcast for the JSCompiler. - var op = (/** @type {!Object} */ new wgxpath.BinaryExpr.Op_( - opString, precedence, dataType, evaluate)); - op = (/** @type {!wgxpath.BinaryExpr.Op} */ op); - wgxpath.BinaryExpr.stringToOpMap_[op.toString()] = op; - return op; -}; - - -/** - * Returns the operator with this opString or null if none. - * - * @param {string} opString The opString. - * @return {!wgxpath.BinaryExpr.Op} The operator. - */ -wgxpath.BinaryExpr.getOp = function(opString) { - return wgxpath.BinaryExpr.stringToOpMap_[opString] || null; -}; - - -/** - * Binary operator enumeration. - * - * @enum {{getPrecedence: function(): number}} - */ -wgxpath.BinaryExpr.Op = { - DIV: wgxpath.BinaryExpr.createOp_('div', 6, wgxpath.DataType.NUMBER, - function(left, right, ctx) { - return left.asNumber(ctx) / right.asNumber(ctx); - }), - MOD: wgxpath.BinaryExpr.createOp_('mod', 6, wgxpath.DataType.NUMBER, - function(left, right, ctx) { - return left.asNumber(ctx) % right.asNumber(ctx); - }), - MULT: wgxpath.BinaryExpr.createOp_('*', 6, wgxpath.DataType.NUMBER, - function(left, right, ctx) { - return left.asNumber(ctx) * right.asNumber(ctx); - }), - PLUS: wgxpath.BinaryExpr.createOp_('+', 5, wgxpath.DataType.NUMBER, - function(left, right, ctx) { - return left.asNumber(ctx) + right.asNumber(ctx); - }), - MINUS: wgxpath.BinaryExpr.createOp_('-', 5, wgxpath.DataType.NUMBER, - function(left, right, ctx) { - return left.asNumber(ctx) - right.asNumber(ctx); - }), - LESSTHAN: wgxpath.BinaryExpr.createOp_('<', 4, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return wgxpath.BinaryExpr.compare_(function(a, b) {return a < b;}, - left, right, ctx); - }), - GREATERTHAN: wgxpath.BinaryExpr.createOp_('>', 4, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return wgxpath.BinaryExpr.compare_(function(a, b) {return a > b;}, - left, right, ctx); - }), - LESSTHAN_EQUAL: wgxpath.BinaryExpr.createOp_( - '<=', 4, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return wgxpath.BinaryExpr.compare_(function(a, b) {return a <= b;}, - left, right, ctx); - }), - GREATERTHAN_EQUAL: wgxpath.BinaryExpr.createOp_('>=', 4, - wgxpath.DataType.BOOLEAN, function(left, right, ctx) { - return wgxpath.BinaryExpr.compare_(function(a, b) {return a >= b;}, - left, right, ctx); - }), - EQUAL: wgxpath.BinaryExpr.createOp_('=', 3, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return wgxpath.BinaryExpr.compare_(function(a, b) {return a == b;}, - left, right, ctx, true); - }), - NOT_EQUAL: wgxpath.BinaryExpr.createOp_('!=', 3, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return wgxpath.BinaryExpr.compare_(function(a, b) {return a != b}, - left, right, ctx, true); - }), - AND: wgxpath.BinaryExpr.createOp_('and', 2, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return left.asBool(ctx) && right.asBool(ctx); - }), - OR: wgxpath.BinaryExpr.createOp_('or', 1, wgxpath.DataType.BOOLEAN, - function(left, right, ctx) { - return left.asBool(ctx) || right.asBool(ctx); - }) -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Context information about nodes in their nodeset. - */ - -goog.provide('wgxpath.Context'); - - - -/** - * Provides information for where something is in the DOM. - * - * @param {!wgxpath.Node} node A node in the DOM. - * @param {number=} opt_position The position of this node in its nodeset, - * defaults to 1. - * @param {number=} opt_last Index of the last node in this nodeset, - * defaults to 1. - * @constructor - */ -wgxpath.Context = function(node, opt_position, opt_last) { - - /** - * @private - * @type {!wgxpath.Node} - */ - this.node_ = node; - - /** - * @private - * @type {number} - */ - this.position_ = opt_position || 1; - - /** - * @private - * @type {number} opt_last - */ - this.last_ = opt_last || 1; -}; - - -/** - * Returns the node for this context object. - * - * @return {!wgxpath.Node} The node for this context object. - */ -wgxpath.Context.prototype.getNode = function() { - return this.node_; -}; - - -/** - * Returns the position for this context object. - * - * @return {number} The position for this context object. - */ -wgxpath.Context.prototype.getPosition = function() { - return this.position_; -}; - - -/** - * Returns the last field for this context object. - * - * @return {number} The last field for this context object. - */ -wgxpath.Context.prototype.getLast = function() { - return this.last_; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Enumeration of internal data types. - */ - -goog.provide('wgxpath.DataType'); - - -/** - * Enum for data types. - * @enum {number} - */ -wgxpath.DataType = { - VOID: 0, - NUMBER: 1, - BOOLEAN: 2, - STRING: 3, - NODESET: 4 -}; -/* JavaScript-XPath 0.1.11 - * (c) 2007 Cybozu Labs, Inc. - * - * JavaScript-XPath is freely distributable under the terms of an MIT-style - * license. For details, see the JavaScript-XPath web site: - * http://coderepos.org/share/wiki/JavaScript-XPath - * -/*--------------------------------------------------------------------------*/ - -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Exports the wgxpath.install function. - * - */ - -goog.require('wgxpath'); - -goog.exportSymbol('wgxpath.install', wgxpath.install); -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview An abstract class representing basic expressions. - */ - -goog.provide('wgxpath.Expr'); - -goog.require('wgxpath.NodeSet'); - - - -/** - * Abstract constructor for an XPath expression. - * - * @param {!wgxpath.DataType} dataType The data type that the expression - * will be evaluated into. - * @constructor - */ -wgxpath.Expr = function(dataType) { - - /** - * @type {!wgxpath.DataType} - * @private - */ - this.dataType_ = dataType; - - /** - * @type {boolean} - * @private - */ - this.needContextPosition_ = false; - - /** - * @type {boolean} - * @private - */ - this.needContextNode_ = false; - - /** - * @type {?{name: string, valueExpr: wgxpath.Expr}} - * @private - */ - this.quickAttr_ = null; -}; - - -/** - * A default indentation for pretty printing. - * - * @const - * @type {string} - */ -wgxpath.Expr.INDENT = ' '; - - -/** - * Evaluates the expression. - * - * @param {!wgxpath.Context} ctx The context to evaluate the expression in. - * @return {!(string|boolean|number|wgxpath.NodeSet)} The evaluation result. - */ -wgxpath.Expr.prototype.evaluate = goog.abstractMethod; - - -/** - * Returns the string representation of the expression for debugging. - * - * @param {string=} opt_indent An optional indentation. - * @return {string} The string representation. - */ -wgxpath.Expr.prototype.toString = goog.abstractMethod; - - -/** - * Returns the data type of the expression. - * - * @return {!wgxpath.DataType} The data type that the expression - * will be evaluated into. - */ -wgxpath.Expr.prototype.getDataType = function() { - return this.dataType_; -}; - - -/** - * Returns whether the expression needs context position to be evaluated. - * - * @return {boolean} Whether context position is needed. - */ -wgxpath.Expr.prototype.doesNeedContextPosition = function() { - return this.needContextPosition_; -}; - - -/** - * Sets whether the expression needs context position to be evaluated. - * - * @param {boolean} flag Whether context position is needed. - */ -wgxpath.Expr.prototype.setNeedContextPosition = function(flag) { - this.needContextPosition_ = flag; -}; - - -/** - * Returns whether the expression needs context node to be evaluated. - * - * @return {boolean} Whether context node is needed. - */ -wgxpath.Expr.prototype.doesNeedContextNode = function() { - return this.needContextNode_; -}; - - -/** - * Sets whether the expression needs context node to be evaluated. - * - * @param {boolean} flag Whether context node is needed. - */ -wgxpath.Expr.prototype.setNeedContextNode = function(flag) { - this.needContextNode_ = flag; -}; - - -/** - * Returns the quick attribute information, if exists. - * - * @return {?{name: string, valueExpr: wgxpath.Expr}} The attribute - * information. - */ -wgxpath.Expr.prototype.getQuickAttr = function() { - return this.quickAttr_; -}; - - -/** - * Sets up the quick attribute info. - * - * @param {?{name: string, valueExpr: wgxpath.Expr}} attrInfo The attribute - * information. - */ -wgxpath.Expr.prototype.setQuickAttr = function(attrInfo) { - this.quickAttr_ = attrInfo; -}; - - -/** - * Evaluate and interpret the result as a number. - * - * @param {!wgxpath.Context} ctx The context to evaluate the expression in. - * @return {number} The evaluated number value. - */ -wgxpath.Expr.prototype.asNumber = function(ctx) { - var exrs = this.evaluate(ctx); - if (exrs instanceof wgxpath.NodeSet) { - return exrs.number(); - } - return +exrs; -}; - - -/** - * Evaluate and interpret the result as a string. - * - * @param {!wgxpath.Context} ctx The context to evaluate the expression in. - * @return {string} The evaluated string. - */ -wgxpath.Expr.prototype.asString = function(ctx) { - var exrs = this.evaluate(ctx); - if (exrs instanceof wgxpath.NodeSet) { - return exrs.string(); - } - return '' + exrs; -}; - - -/** - * Evaluate and interpret the result as a boolean value. - * - * @param {!wgxpath.Context} ctx The context to evaluate the expression in. - * @return {boolean} The evaluated boolean value. - */ -wgxpath.Expr.prototype.asBool = function(ctx) { - var exrs = this.evaluate(ctx); - if (exrs instanceof wgxpath.NodeSet) { - return !!exrs.getLength(); - } - return !!exrs; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class representing operations on filter expressions. - */ - -goog.provide('wgxpath.FilterExpr'); - -goog.require('wgxpath.Expr'); - - - -/** - * Constructor for FilterExpr. - * - * @param {!wgxpath.Expr} primary The primary expression. - * @param {!wgxpath.Predicates} predicates The predicates. - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.FilterExpr = function(primary, predicates) { - if (predicates.getLength() && primary.getDataType() != - wgxpath.DataType.NODESET) { - throw Error('Primary expression must evaluate to nodeset ' + - 'if filter has predicate(s).'); - } - wgxpath.Expr.call(this, primary.getDataType()); - - /** - * @type {!wgxpath.Expr} - * @private - */ - this.primary_ = primary; - - - /** - * @type {!wgxpath.Predicates} - * @private - */ - this.predicates_ = predicates; - - this.setNeedContextPosition(primary.doesNeedContextPosition()); - this.setNeedContextNode(primary.doesNeedContextNode()); -}; -goog.inherits(wgxpath.FilterExpr, wgxpath.Expr); - - -/** - * @override - * @return {!wgxpath.NodeSet} The nodeset result. - */ -wgxpath.FilterExpr.prototype.evaluate = function(ctx) { - var result = this.primary_.evaluate(ctx); - return this.predicates_.evaluatePredicates( - /** @type {!wgxpath.NodeSet} */ (result)); -}; - - -/** - * @override - */ -wgxpath.FilterExpr.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'Filter: ' + '\n'; - indent += wgxpath.Expr.INDENT; - text += this.primary_.toString(indent); - text += this.predicates_.toString(indent); - return text; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A function call expression. - */ - -goog.provide('wgxpath.FunctionCall'); - -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.dom.NodeType'); -goog.require('goog.string'); -goog.require('wgxpath.Expr'); -goog.require('wgxpath.Node'); -goog.require('wgxpath.NodeSet'); -goog.require('wgxpath.userAgent'); - - - -/** - * A function call expression. - * - * @constructor - * @extends {wgxpath.Expr} - * @param {!wgxpath.FunctionCall.Func} func Function. - * @param {!Array.<!wgxpath.Expr>} args Arguments to the function. - */ -wgxpath.FunctionCall = function(func, args) { - // Check the provided arguments match the function parameters. - if (args.length < func.minArgs_) { - throw new Error('Function ' + func.name_ + ' expects at least' + - func.minArgs_ + ' arguments, ' + args.length + ' given'); - } - if (!goog.isNull(func.maxArgs_) && args.length > func.maxArgs_) { - throw new Error('Function ' + func.name_ + ' expects at most ' + - func.maxArgs_ + ' arguments, ' + args.length + ' given'); - } - if (func.nodesetsRequired_) { - goog.array.forEach(args, function(arg, i) { - if (arg.getDataType() != wgxpath.DataType.NODESET) { - throw new Error('Argument ' + i + ' to function ' + func.name_ + - ' is not of type Nodeset: ' + arg); - } - }); - } - wgxpath.Expr.call(this, func.dataType_); - - /** - * @type {!wgxpath.FunctionCall.Func} - * @private - */ - this.func_ = func; - - /** - * @type {!Array.<!wgxpath.Expr>} - * @private - */ - this.args_ = args; - - this.setNeedContextPosition(func.needContextPosition_ || - goog.array.some(args, function(arg) { - return arg.doesNeedContextPosition(); - })); - this.setNeedContextNode( - (func.needContextNodeWithoutArgs_ && !args.length) || - (func.needContextNodeWithArgs_ && !!args.length) || - goog.array.some(args, function(arg) { - return arg.doesNeedContextNode(); - })); -}; -goog.inherits(wgxpath.FunctionCall, wgxpath.Expr); - - -/** - * @override - */ -wgxpath.FunctionCall.prototype.evaluate = function(ctx) { - var result = this.func_.evaluate_.apply(null, - goog.array.concat(ctx, this.args_)); - return /** @type {!(string|boolean|number|wgxpath.NodeSet)} */ (result); -}; - - -/** - * @override - */ -wgxpath.FunctionCall.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'Function: ' + this.func_ + '\n'; - indent += wgxpath.Expr.INDENT; - if (this.args_.length) { - text += indent + 'Arguments:'; - indent += wgxpath.Expr.INDENT; - text = goog.array.reduce(this.args_, function(prev, curr) { - return prev + '\n' + curr.toString(indent); - }, text); - } - return text; -}; - - - -/** - * A function in a function call expression. - * - * @constructor - * @param {string} name Name of the function. - * @param {wgxpath.DataType} dataType Datatype of the function return value. - * @param {boolean} needContextPosition Whether the function needs a context - * position. - * @param {boolean} needContextNodeWithoutArgs Whether the function needs a - * context node when not given arguments. - * @param {boolean} needContextNodeWithArgs Whether the function needs a context - * node when the function is given arguments. - * @param {function(!wgxpath.Context, ...[!wgxpath.Expr]):*} evaluate - * Evaluates the function in a context with any number of expression - * arguments. - * @param {number} minArgs Minimum number of arguments accepted by the function. - * @param {?number=} opt_maxArgs Maximum number of arguments accepted by the - * function; null means there is no max; defaults to minArgs. - * @param {boolean=} opt_nodesetsRequired Whether the args must be nodesets. - * @private - */ -wgxpath.FunctionCall.Func_ = function(name, dataType, needContextPosition, - needContextNodeWithoutArgs, needContextNodeWithArgs, evaluate, minArgs, - opt_maxArgs, opt_nodesetsRequired) { - - /** - * @type {string} - * @private - */ - this.name_ = name; - - /** - * @type {wgxpath.DataType} - * @private - */ - this.dataType_ = dataType; - - /** - * @type {boolean} - * @private - */ - this.needContextPosition_ = needContextPosition; - - /** - * @type {boolean} - * @private - */ - this.needContextNodeWithoutArgs_ = needContextNodeWithoutArgs; - - /** - * @type {boolean} - * @private - */ - this.needContextNodeWithArgs_ = needContextNodeWithArgs; - - /** - * @type {function(!wgxpath.Context, ...[!wgxpath.Expr]):*} - * @private - */ - this.evaluate_ = evaluate; - - /** - * @type {number} - * @private - */ - this.minArgs_ = minArgs; - - /** - * @type {?number} - * @private - */ - this.maxArgs_ = goog.isDef(opt_maxArgs) ? opt_maxArgs : minArgs; - - /** - * @type {boolean} - * @private - */ - this.nodesetsRequired_ = !!opt_nodesetsRequired; -}; - - -/** - * @override - */ -wgxpath.FunctionCall.Func_.prototype.toString = function() { - return this.name_; -}; - - -/** - * A mapping from function names to Func objects. - * - * @private - * @type {!Object.<string, !wgxpath.FunctionCall.Func>} - */ -wgxpath.FunctionCall.nameToFuncMap_ = {}; - - -/** - * Constructs a Func and maps its name to it. - * - * @param {string} name Name of the function. - * @param {wgxpath.DataType} dataType Datatype of the function return value. - * @param {boolean} needContextPosition Whether the function needs a context - * position. - * @param {boolean} needContextNodeWithoutArgs Whether the function needs a - * context node when not given arguments. - * @param {boolean} needContextNodeWithArgs Whether the function needs a context - * node when the function is given arguments. - * @param {function(!wgxpath.Context, ...[!wgxpath.Expr]):*} evaluate - * Evaluates the function in a context with any number of expression - * arguments. - * @param {number} minArgs Minimum number of arguments accepted by the function. - * @param {?number=} opt_maxArgs Maximum number of arguments accepted by the - * function; null means there is no max; defaults to minArgs. - * @param {boolean=} opt_nodesetsRequired Whether the args must be nodesets. - * @return {!wgxpath.FunctionCall.Func} The function created. - * @private - */ -wgxpath.FunctionCall.createFunc_ = function(name, dataType, - needContextPosition, needContextNodeWithoutArgs, needContextNodeWithArgs, - evaluate, minArgs, opt_maxArgs, opt_nodesetsRequired) { - if (name in wgxpath.FunctionCall.nameToFuncMap_) { - throw new Error('Function already created: ' + name + '.'); - } - var func = new wgxpath.FunctionCall.Func_(name, dataType, - needContextPosition, needContextNodeWithoutArgs, needContextNodeWithArgs, - evaluate, minArgs, opt_maxArgs, opt_nodesetsRequired); - func = (/** @type {!wgxpath.FunctionCall.Func} */ func); - wgxpath.FunctionCall.nameToFuncMap_[name] = func; - return func; -}; - - -/** - * Returns the function object for this name. - * - * @param {string} name The function's name. - * @return {wgxpath.FunctionCall.Func} The function object. - */ -wgxpath.FunctionCall.getFunc = function(name) { - return wgxpath.FunctionCall.nameToFuncMap_[name] || null; -}; - - -/** - * An XPath function enumeration. - * - * <p>A list of XPath 1.0 functions: - * http://www.w3.org/TR/xpath/#corelib - * - * @enum {!Object} - */ -wgxpath.FunctionCall.Func = { - BOOLEAN: wgxpath.FunctionCall.createFunc_('boolean', - wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx, expr) { - return expr.asBool(ctx); - }, 1), - CEILING: wgxpath.FunctionCall.createFunc_('ceiling', - wgxpath.DataType.NUMBER, false, false, false, - function(ctx, expr) { - return Math.ceil(expr.asNumber(ctx)); - }, 1), - CONCAT: wgxpath.FunctionCall.createFunc_('concat', - wgxpath.DataType.STRING, false, false, false, - function(ctx, var_args) { - var exprs = goog.array.slice(arguments, 1); - return goog.array.reduce(exprs, function(prev, curr) { - return prev + curr.asString(ctx); - }, ''); - }, 2, null), - CONTAINS: wgxpath.FunctionCall.createFunc_('contains', - wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx, expr1, expr2) { - return goog.string.contains(expr1.asString(ctx), expr2.asString(ctx)); - }, 2), - COUNT: wgxpath.FunctionCall.createFunc_('count', - wgxpath.DataType.NUMBER, false, false, false, - function(ctx, expr) { - return expr.evaluate(ctx).getLength(); - }, 1, 1, true), - FALSE: wgxpath.FunctionCall.createFunc_('false', - wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx) { - return false; - }, 0), - FLOOR: wgxpath.FunctionCall.createFunc_('floor', - wgxpath.DataType.NUMBER, false, false, false, - function(ctx, expr) { - return Math.floor(expr.asNumber(ctx)); - }, 1), - ID: wgxpath.FunctionCall.createFunc_('id', - wgxpath.DataType.NODESET, false, false, false, - function(ctx, expr) { - var ctxNode = ctx.getNode(); - var doc = ctxNode.nodeType == goog.dom.NodeType.DOCUMENT ? ctxNode : - ctxNode.ownerDocument; - var ids = expr.asString(ctx).split(/\s+/); - var nsArray = []; - goog.array.forEach(ids, function(id) { - var elem = idSingle(id); - if (elem && !goog.array.contains(nsArray, elem)) { - nsArray.push(elem); - } - }); - nsArray.sort(goog.dom.compareNodeOrder); - var ns = new wgxpath.NodeSet(); - goog.array.forEach(nsArray, function(n) { - ns.add(n); - }); - return ns; - - function idSingle(id) { - if (wgxpath.userAgent.IE_DOC_PRE_9) { - var allId = doc.all[id]; - if (allId) { - if (allId.nodeType && id == allId.id) { - return allId; - } else if (allId.length) { - return goog.array.find(allId, function(elem) { - return id == elem.id; - }); - } - } - return null; - } else { - return doc.getElementById(id); - } - } - }, 1), - LANG: wgxpath.FunctionCall.createFunc_('lang', - wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx, expr) { - // TODO(user): Fully implement this. - return false; - }, 1), - LAST: wgxpath.FunctionCall.createFunc_('last', - wgxpath.DataType.NUMBER, true, false, false, - function(ctx) { - if (arguments.length != 1) { - throw Error('Function last expects ()'); - } - return ctx.getLast(); - }, 0), - LOCAL_NAME: wgxpath.FunctionCall.createFunc_('local-name', - wgxpath.DataType.STRING, false, true, false, - function(ctx, opt_expr) { - var node = opt_expr ? opt_expr.evaluate(ctx).getFirst() : ctx.getNode(); - return node ? node.nodeName.toLowerCase() : ''; - }, 0, 1, true), - NAME: wgxpath.FunctionCall.createFunc_('name', - wgxpath.DataType.STRING, false, true, false, - function(ctx, opt_expr) { - // TODO(user): Fully implement this. - var node = opt_expr ? opt_expr.evaluate(ctx).getFirst() : ctx.getNode(); - return node ? node.nodeName.toLowerCase() : ''; - }, 0, 1, true), - NAMESPACE_URI: wgxpath.FunctionCall.createFunc_('namespace-uri', - wgxpath.DataType.STRING, true, false, false, - function(ctx, opt_expr) { - // TODO(user): Fully implement this. - return ''; - }, 0, 1, true), - NORMALIZE_SPACE: wgxpath.FunctionCall.createFunc_('normalize-space', - wgxpath.DataType.STRING, false, true, false, - function(ctx, opt_expr) { - var str = opt_expr ? opt_expr.asString(ctx) : - wgxpath.Node.getValueAsString(ctx.getNode()); - return goog.string.collapseWhitespace(str); - }, 0, 1), - NOT: wgxpath.FunctionCall.createFunc_('not', - wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx, expr) { - return !expr.asBool(ctx); - }, 1), - NUMBER: wgxpath.FunctionCall.createFunc_('number', - wgxpath.DataType.NUMBER, false, true, false, - function(ctx, opt_expr) { - return opt_expr ? opt_expr.asNumber(ctx) : - wgxpath.Node.getValueAsNumber(ctx.getNode()); - }, 0, 1), - POSITION: wgxpath.FunctionCall.createFunc_('position', - wgxpath.DataType.NUMBER, true, false, false, - function(ctx) { - return ctx.getPosition(); - }, 0), - ROUND: wgxpath.FunctionCall.createFunc_('round', - wgxpath.DataType.NUMBER, false, false, false, - function(ctx, expr) { - return Math.round(expr.asNumber(ctx)); - }, 1), - STARTS_WITH: wgxpath.FunctionCall.createFunc_('starts-with', - wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx, expr1, expr2) { - return goog.string.startsWith(expr1.asString(ctx), expr2.asString(ctx)); - }, 2), - STRING: wgxpath.FunctionCall.createFunc_( - 'string', wgxpath.DataType.STRING, false, true, false, - function(ctx, opt_expr) { - return opt_expr ? opt_expr.asString(ctx) : - wgxpath.Node.getValueAsString(ctx.getNode()); - }, 0, 1), - STRING_LENGTH: wgxpath.FunctionCall.createFunc_('string-length', - wgxpath.DataType.NUMBER, false, true, false, - function(ctx, opt_expr) { - var str = opt_expr ? opt_expr.asString(ctx) : - wgxpath.Node.getValueAsString(ctx.getNode()); - return str.length; - }, 0, 1), - SUBSTRING: wgxpath.FunctionCall.createFunc_('substring', - wgxpath.DataType.STRING, false, false, false, - function(ctx, expr1, expr2, opt_expr3) { - var startRaw = expr2.asNumber(ctx); - if (isNaN(startRaw) || startRaw == Infinity || startRaw == -Infinity) { - return ''; - } - var lengthRaw = opt_expr3 ? opt_expr3.asNumber(ctx) : Infinity; - if (isNaN(lengthRaw) || lengthRaw === -Infinity) { - return ''; - } - - // XPath indices are 1-based. - var startInt = Math.round(startRaw) - 1; - var start = Math.max(startInt, 0); - var str = expr1.asString(ctx); - - if (lengthRaw == Infinity) { - return str.substring(start); - } else { - var lengthInt = Math.round(lengthRaw); - // Length is from startInt, not start! - return str.substring(start, startInt + lengthInt); - } - }, 2, 3), - SUBSTRING_AFTER: wgxpath.FunctionCall.createFunc_('substring-after', - wgxpath.DataType.STRING, false, false, false, - function(ctx, expr1, expr2) { - var str1 = expr1.asString(ctx); - var str2 = expr2.asString(ctx); - var str2Index = str1.indexOf(str2); - return str2Index == -1 ? '' : str1.substring(str2Index + str2.length); - }, 2), - SUBSTRING_BEFORE: wgxpath.FunctionCall.createFunc_('substring-before', - wgxpath.DataType.STRING, false, false, false, - function(ctx, expr1, expr2) { - var str1 = expr1.asString(ctx); - var str2 = expr2.asString(ctx); - var str2Index = str1.indexOf(str2); - return str2Index == -1 ? '' : str1.substring(0, str2Index); - }, 2), - SUM: wgxpath.FunctionCall.createFunc_('sum', - wgxpath.DataType.NUMBER, false, false, false, - function(ctx, expr) { - var ns = expr.evaluate(ctx); - var iter = ns.iterator(); - var prev = 0; - for (var node = iter.next(); node; node = iter.next()) { - prev += wgxpath.Node.getValueAsNumber(node); - } - return prev; - }, 1, 1, true), - TRANSLATE: wgxpath.FunctionCall.createFunc_('translate', - wgxpath.DataType.STRING, false, false, false, - function(ctx, expr1, expr2, expr3) { - var str1 = expr1.asString(ctx); - var str2 = expr2.asString(ctx); - var str3 = expr3.asString(ctx); - - var map = []; - for (var i = 0; i < str2.length; i++) { - var ch = str2.charAt(i); - if (!(ch in map)) { - // If i >= str3.length, charAt will return the empty string. - map[ch] = str3.charAt(i); - } - } - - var translated = ''; - for (var i = 0; i < str1.length; i++) { - var ch = str1.charAt(i); - translated += (ch in map) ? map[ch] : ch; - } - return translated; - }, 3), - TRUE: wgxpath.FunctionCall.createFunc_( - 'true', wgxpath.DataType.BOOLEAN, false, false, false, - function(ctx) { - return true; - }, 0) -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Wrapper classes for attribute nodes in old IE browsers. - */ - -goog.provide('wgxpath.IEAttrWrapper'); - -goog.require('goog.dom.NodeType'); -goog.require('wgxpath.userAgent'); - - - -/** - * A wrapper for an attribute node in old IE. - * - * <p> Note: Although sourceIndex is equal to node.sourceIndex, it is - * denormalized into a separate parameter for performance, so that clients - * constructing multiple IEAttrWrappers can pass in the same sourceIndex - * rather than re-querying it each time. - * - * @constructor - * @extends {Attr} - * @param {!Node} node The attribute node. - * @param {!Node} parent The parent of the attribute node. - * @param {string} nodeName The name of the attribute node. - * @param {(string|number|boolean)} nodeValue The value of the attribute node. - * @param {number} sourceIndex The source index of the parent node. - */ -wgxpath.IEAttrWrapper = function(node, parent, nodeName, nodeValue, - sourceIndex) { - /** - * @type {!Node} - * @private - */ - this.node_ = node; - - /** - * @type {string} - */ - this.nodeName = nodeName; - - /** - * @type {(string|number|boolean)} - */ - this.nodeValue = nodeValue; - - /** - * @type {goog.dom.NodeType} - */ - this.nodeType = goog.dom.NodeType.ATTRIBUTE; - - /** - * @type {!Node} - */ - this.ownerElement = parent; - - /** - * @type {number} - * @private - */ - this.parentSourceIndex_ = sourceIndex; - - /** - * @type {!Node} - */ - this.parentNode = parent; -}; - - -/** - * Creates a wrapper for an attribute node in old IE. - * - * @param {!Node} parent The parent of the attribute node. - * @param {!Node} attr The attribute node. - * @param {number} sourceIndex The source index of the parent node. - * @return {!wgxpath.IEAttrWrapper} The constcuted wrapper. - */ -wgxpath.IEAttrWrapper.forAttrOf = function(parent, attr, sourceIndex) { - var nodeValue = (wgxpath.userAgent.IE_DOC_PRE_8 && attr.nodeName == 'href') ? - parent.getAttribute(attr.nodeName, 2) : attr.nodeValue; - return new wgxpath.IEAttrWrapper(attr, parent, attr.nodeName, nodeValue, - sourceIndex); -}; - - -/** - * Creates a wrapper for a style attribute node in old IE. - * - * @param {!Node} parent The parent of the attribute node. - * @param {number} sourceIndex The source index of the parent node. - * @return {!wgxpath.IEAttrWrapper} The constcuted wrapper. - */ -wgxpath.IEAttrWrapper.forStyleOf = function(parent, sourceIndex) { - return new wgxpath.IEAttrWrapper(parent.style, parent, 'style', - parent.style.cssText, sourceIndex); -}; - - -/** - * Returns the source index of the parent of the attribute node. - * - * @return {number} The source index of the parent. - */ -wgxpath.IEAttrWrapper.prototype.getParentSourceIndex = function() { - return this.parentSourceIndex_; -}; - - -/** - * Returns the attribute node contained in the wrapper. - * - * @return {!Node} The original attribute node. - */ -wgxpath.IEAttrWrapper.prototype.getNode = function() { - return this.node_; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class implementing the xpath 1.0 subset of the - * KindTest construct. - */ - -goog.provide('wgxpath.KindTest'); - -goog.require('goog.dom.NodeType'); -goog.require('wgxpath.NodeTest'); - - - -/** - * Constructs a subset of KindTest based on the xpath grammar: - * http://www.w3.org/TR/xpath20/#prod-xpath-KindTest - * - * @param {string} typeName Type name to be tested. - * @param {wgxpath.Literal=} opt_literal Optional literal for - * processing-instruction nodes. - * @constructor - * @implements {wgxpath.NodeTest} - */ -wgxpath.KindTest = function(typeName, opt_literal) { - - /** - * @type {string} - * @private - */ - this.typeName_ = typeName; - - /** - * @type {wgxpath.Literal} - * @private - */ - this.literal_ = goog.isDef(opt_literal) ? opt_literal : null; - - /** - * @type {?goog.dom.NodeType} - * @private - */ - this.type_ = null; - switch (typeName) { - case 'comment': - this.type_ = goog.dom.NodeType.COMMENT; - break; - case 'text': - this.type_ = goog.dom.NodeType.TEXT; - break; - case 'processing-instruction': - this.type_ = goog.dom.NodeType.PROCESSING_INSTRUCTION; - break; - case 'node': - break; - default: - throw Error('Unexpected argument'); - } -}; - - -/** - * Checks if a type name is a valid KindTest parameter. - * - * @param {string} typeName The type name to be checked. - * @return {boolean} Whether the type name is legal. - */ -wgxpath.KindTest.isValidType = function(typeName) { - return typeName == 'comment' || typeName == 'text' || - typeName == 'processing-instruction' || typeName == 'node'; -}; - - -/** - * @override - */ -wgxpath.KindTest.prototype.matches = function(node) { - return goog.isNull(this.type_) || this.type_ == node.nodeType; -}; - - -/** - * Returns the type of the node. - * - * @return {?number} The type of the node, or null if any type. - */ -wgxpath.KindTest.prototype.getType = function() { - return this.type_; -}; - - -/** - * @override - */ -wgxpath.KindTest.prototype.getName = function() { - return this.typeName_; -}; - - -/** - * @override - * @param {string=} opt_indent Optional indentation. - * @return {string} The string representation. - */ -wgxpath.KindTest.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'kindtest: ' + this.typeName_; - if (!goog.isNull(this.literal_)) { - text += '\n' + this.literal_.toString(indent + wgxpath.Expr.INDENT); - } - return text; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview The lexer class for tokenizing xpath expressions. - */ - -goog.provide('wgxpath.Lexer'); - - - -/** - * Constructs a lexer. - * - * @param {!Array.<string>} tokens Tokens to iterate over. - * @constructor - */ -wgxpath.Lexer = function(tokens) { - /** - * @type {!Array.<string>} - * @private - */ - this.tokens_ = tokens; - - /** - * @type {number} - * @private - */ - this.index_ = 0; -}; - - -/** - * Tokenizes a source string into an array of tokens. - * - * @param {string} source Source string to tokenize. - * @return {!wgxpath.Lexer} Essentially an iterator over the tokens. - */ -wgxpath.Lexer.tokenize = function(source) { - var tokens = source.match(wgxpath.Lexer.TOKEN_); - - // Removes tokens starting with whitespace from the array. - for (var i = 0; i < tokens.length; i++) { - if (wgxpath.Lexer.LEADING_WHITESPACE_.test(tokens[i])) { - tokens.splice(i, 1); - } - } - return new wgxpath.Lexer(tokens); -}; - - -/** - * Regular expressions to match XPath productions. - * - * @const - * @type {!RegExp} - * @private - */ -wgxpath.Lexer.TOKEN_ = new RegExp( - '\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+' + - // Nodename (possibly with namespace) or variable. - '|\\/\\/' + // Double slash. - '|\\.\\.' + // Double dot. - '|::' + // Double colon. - '|\\d+(?:\\.\\d*)?' + // Number starting with digit. - '|\\.\\d+' + // Number starting with decimal point. - '|"[^"]*"' + // Double quoted string. - '|\'[^\']*\'' + // Single quoted string. - '|[!<>]=' + // Operators - '|\\s+' + // Whitespaces. - '|.', // Any single character. - 'g'); - - -/** - * Regex to check if a string starts with a whitespace character. - * - * @const - * @type {!RegExp} - * @private - */ -wgxpath.Lexer.LEADING_WHITESPACE_ = /^\s/; - - -/** - * Peeks at the lexer. An optional index can be - * used to specify the token peek at. - * - * @param {number=} opt_i Index to peek at. Defaults to zero. - * @return {string} Token peeked. - */ -wgxpath.Lexer.prototype.peek = function(opt_i) { - return this.tokens_[this.index_ + (opt_i || 0)]; -}; - - -/** - * Returns the next token from the lexer and increments the index. - * - * @return {string} The next token. - */ -wgxpath.Lexer.prototype.next = function() { - return this.tokens_[this.index_++]; -}; - - -/** - * Decrements the index by one. - */ -wgxpath.Lexer.prototype.back = function() { - this.index_--; -}; - - -/** - * Checks whether the lexer is empty. - * - * @return {boolean} Whether the lexer is empty. - */ -wgxpath.Lexer.prototype.empty = function() { - return this.tokens_.length <= this.index_; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class representing the string literals. - */ - -goog.provide('wgxpath.Literal'); - -goog.require('wgxpath.Expr'); - - - -/** - * Constructs a string literal expression. - * - * @param {string} text The text value of the literal. - * @constructor - * @extends {wgxpath.Expr} - */ -wgxpath.Literal = function(text) { - wgxpath.Expr.call(this, wgxpath.DataType.STRING); - - /** - * @type {string} - * @private - */ - this.text_ = text.substring(1, text.length - 1); -}; -goog.inherits(wgxpath.Literal, wgxpath.Expr); - - -/** - * @override - * @return {string} The string result. - */ -wgxpath.Literal.prototype.evaluate = function(context) { - return this.text_; -}; - - -/** - * @override - */ -wgxpath.Literal.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - return indent + 'literal: ' + this.text_; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class implementing the NameTest construct. - */ - -goog.provide('wgxpath.NameTest'); - -goog.require('goog.dom.NodeType'); - - - -/** - * Constructs a NameTest based on the xpath grammar: - * http://www.w3.org/TR/xpath/#NT-NameTest - * - * @param {string} name Name to be tested. - * @constructor - * @implements {wgxpath.NodeTest} - */ -wgxpath.NameTest = function(name) { - /** - * @type {string} - * @private - */ - this.name_ = name.toLowerCase(); -}; - - -/** - * The default namespace for XHTML nodes. - * - * @const - * @type {string} - * @private - */ -wgxpath.NameTest.HTML_NAMESPACE_ = 'http://www.w3.org/1999/xhtml'; - - -/** - * @override - */ -wgxpath.NameTest.prototype.matches = function(node) { - var type = node.nodeType; - if (type == goog.dom.NodeType.ELEMENT || - type == goog.dom.NodeType.ATTRIBUTE) { - if (this.name_ == '*' || this.name_ == node.nodeName.toLowerCase()) { - return true; - } else { - var namespace = node.namespaceURI || wgxpath.NameTest.HTML_NAMESPACE_; - return this.name_ == namespace + ':*'; - } - } -}; - - -/** - * @override - */ -wgxpath.NameTest.prototype.getName = function() { - return this.name_; -}; - - -/** - * @override - * @param {string=} opt_indent Optional indentation. - * @return {string} The string representation. - */ -wgxpath.NameTest.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - return indent + 'nametest: ' + this.name_; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Node utilities. - */ - -goog.provide('wgxpath.Node'); - -goog.require('goog.array'); -goog.require('goog.dom.NodeType'); -goog.require('goog.userAgent'); -goog.require('wgxpath.IEAttrWrapper'); -goog.require('wgxpath.userAgent'); - - -/** @typedef {!(Node|wgxpath.IEAttrWrapper)} */ -wgxpath.Node = {}; - - -/** - * Returns whether two nodes are equal. - * - * @param {wgxpath.Node} a The first node. - * @param {wgxpath.Node} b The second node. - * @return {boolean} Whether the nodes are equal. - */ -wgxpath.Node.equal = function(a, b) { - return (a == b) || (a instanceof wgxpath.IEAttrWrapper && - b instanceof wgxpath.IEAttrWrapper && a.getNode() == - b.getNode()); -}; - - -/** - * Returns the string-value of the required type from a node. - * - * @param {!wgxpath.Node} node The node to get value from. - * @return {string} The value required. - */ -wgxpath.Node.getValueAsString = function(node) { - var t = null, type = node.nodeType; - // Old IE title problem. - var needTitleFix = function(node) { - return wgxpath.userAgent.IE_DOC_PRE_9 && - node.nodeName.toLowerCase() == 'title'; - }; - // goog.dom.getTextContent doesn't seem to work - if (type == goog.dom.NodeType.ELEMENT) { - t = node.textContent; - t = (t == undefined || t == null) ? node.innerText : t; - t = (t == undefined || t == null) ? '' : t; - } - if (typeof t != 'string') { - if (needTitleFix(node) && type == goog.dom.NodeType.ELEMENT) { - t = node.text; - } else if (type == goog.dom.NodeType.DOCUMENT || - type == goog.dom.NodeType.ELEMENT) { - node = (type == goog.dom.NodeType.DOCUMENT) ? - node.documentElement : node.firstChild; - var i = 0, stack = []; - for (t = ''; node;) { - do { - if (node.nodeType != goog.dom.NodeType.ELEMENT) { - t += node.nodeValue; - } - if (needTitleFix(node)) { - t += node.text; - } - stack[i++] = node; // push - } while (node = node.firstChild); - while (i && !(node = stack[--i].nextSibling)) {} - } - } else { - t = node.nodeValue; - } - } - return '' + t; -}; - - -/** - * Returns the string-value of the required type from a node, casted to number. - * - * @param {!wgxpath.Node} node The node to get value from. - * @return {number} The value required. - */ -wgxpath.Node.getValueAsNumber = function(node) { - return +wgxpath.Node.getValueAsString(node); -}; - - -/** - * Returns the string-value of the required type from a node, casted to boolean. - * - * @param {!wgxpath.Node} node The node to get value from. - * @return {boolean} The value required. - */ -wgxpath.Node.getValueAsBool = function(node) { - return !!wgxpath.Node.getValueAsString(node); -}; - - -/** - * Returns if the attribute matches the given value. - * - * @param {!wgxpath.Node} node The node to get value from. - * @param {?string} name The attribute name to match, if any. - * @param {?string} value The attribute value to match, if any. - * @return {boolean} Whether the node matches the attribute, if any. - */ -wgxpath.Node.attrMatches = function(node, name, value) { - // No attribute. - if (goog.isNull(name)) { - return true; - } - // TODO(user): If possible, figure out why this throws an exception in some - // cases on IE < 9. - try { - if (!node.getAttribute) { - return false; - } - } catch (e) { - return false; - } - if (wgxpath.userAgent.IE_DOC_PRE_8 && name == 'class') { - name = 'className'; - } - return value == null ? !!node.getAttribute(name) : - (node.getAttribute(name, 2) == value); -}; - - -/** - * Returns the descendants of a node. - * - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The node to get descendants from. - * @param {?string=} opt_attrName The attribute name to match, if any. - * @param {?string=} opt_attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet=} opt_nodeset The node set to add descendants to. - * @return {!wgxpath.NodeSet} The nodeset with descendants. - */ -wgxpath.Node.getDescendantNodes = function(test, node, opt_attrName, - opt_attrValue, opt_nodeset) { - var nodeset = opt_nodeset || new wgxpath.NodeSet(); - var func = wgxpath.userAgent.IE_DOC_PRE_9 ? - wgxpath.Node.getDescendantNodesIEPre9_ : - wgxpath.Node.getDescendantNodesGeneric_; - var attrName = goog.isString(opt_attrName) ? opt_attrName : null; - var attrValue = goog.isString(opt_attrValue) ? opt_attrValue : null; - return func.call(null, test, node, attrName, attrValue, nodeset); -}; - - -/** - * Returns the descendants of a node for IE. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The node to get descendants from. - * @param {?string} attrName The attribute name to match, if any. - * @param {?string} attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet} nodeset The node set to add descendants to. - * @return {!wgxpath.NodeSet} The nodeset with descendants. - */ -wgxpath.Node.getDescendantNodesIEPre9_ = function(test, node, attrName, - attrValue, nodeset) { - if (wgxpath.Node.doesNeedSpecialHandlingIEPre9_(test, attrName)) { - var descendants = node.all; - if (!descendants) { - return nodeset; - } - var name = wgxpath.Node.getNameFromTestIEPre9_(test); - // all.tags not working. - if (name != '*') { - descendants = node.getElementsByTagName(name); - if (!descendants) { - return nodeset; - } - } - if (attrName) { - /** - * The length property of the "all" collection is overwritten - * if there exists an element with id="length", therefore we - * have to iterate without knowing the length. - */ - var result = []; - var i = 0; - while (node = descendants[i++]) { - if (wgxpath.Node.attrMatches(node, attrName, attrValue)) { - result.push(node); - } - } - descendants = result; - } - var i = 0; - while (node = descendants[i++]) { - if (name != '*' || node.tagName != '!') { - nodeset.add(node); - } - } - return nodeset; - } - wgxpath.Node.doRecursiveAttrMatch_(test, node, attrName, - attrValue, nodeset); - return nodeset; -}; - - -/** - * Returns the descendants of a node for browsers other than IE. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The node to get descendants from. - * @param {?string} attrName The attribute name to match, if any. - * @param {?string} attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet} nodeset The node set to add descendants to. - * @return {!wgxpath.NodeSet} The nodeset with descendants. - */ -wgxpath.Node.getDescendantNodesGeneric_ = function(test, node, - attrName, attrValue, nodeset) { - if (node.getElementsByName && attrValue && attrName == 'name' && - !goog.userAgent.IE) { - var nodes = node.getElementsByName(attrValue); - goog.array.forEach(nodes, function(node) { - if (test.matches(node)) { - nodeset.add(node); - } - }); - } else if (node.getElementsByClassName && attrValue && attrName == 'class') { - var nodes = node.getElementsByClassName(attrValue); - goog.array.forEach(nodes, function(node) { - if (node.className == attrValue && test.matches(node)) { - nodeset.add(node); - } - }); - } else if (test instanceof wgxpath.KindTest) { - wgxpath.Node.doRecursiveAttrMatch_(test, node, attrName, - attrValue, nodeset); - } else if (node.getElementsByTagName) { - var nodes = node.getElementsByTagName(test.getName()); - goog.array.forEach(nodes, function(node) { - if (wgxpath.Node.attrMatches(node, attrName, attrValue)) { - nodeset.add(node); - } - }); - } - return nodeset; -}; - - -/** - * Returns the child nodes of a node. - * - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The node to get child nodes from. - * @param {?string=} opt_attrName The attribute name to match, if any. - * @param {?string=} opt_attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet=} opt_nodeset The node set to add child nodes to. - * @return {!wgxpath.NodeSet} The nodeset with child nodes. - */ -wgxpath.Node.getChildNodes = function(test, node, - opt_attrName, opt_attrValue, opt_nodeset) { - var nodeset = opt_nodeset || new wgxpath.NodeSet(); - var func = wgxpath.userAgent.IE_DOC_PRE_9 ? - wgxpath.Node.getChildNodesIEPre9_ : wgxpath.Node.getChildNodesGeneric_; - var attrName = goog.isString(opt_attrName) ? opt_attrName : null; - var attrValue = goog.isString(opt_attrValue) ? opt_attrValue : null; - return func.call(null, test, node, attrName, attrValue, nodeset); -}; - - -/** - * Returns the child nodes of a node for IE browsers. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The node to get child nodes from. - * @param {?string} attrName The attribute name to match, if any. - * @param {?string} attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet} nodeset The node set to add child nodes to. - * @return {!wgxpath.NodeSet} The nodeset with child nodes. - */ -wgxpath.Node.getChildNodesIEPre9_ = function(test, node, - attrName, attrValue, nodeset) { - var children; - if (wgxpath.Node.doesNeedSpecialHandlingIEPre9_(test, attrName) && - (children = node.childNodes)) { // node.children seems buggy. - var name = wgxpath.Node.getNameFromTestIEPre9_(test); - if (name != '*') { - //children = children.tags(name); // children.tags seems buggy. - children = goog.array.filter(children, function(child) { - return child.tagName && child.tagName.toLowerCase() == name; - }); - if (!children) { - return nodeset; - } - } - if (attrName) { - // TODO(user): See if an optimization is possible. - children = goog.array.filter(children, function(n) { - return wgxpath.Node.attrMatches(n, attrName, attrValue); - }); - } - goog.array.forEach(children, function(node) { - if (name != '*' || node.tagName != '!' && - !(name == '*' && node.nodeType != goog.dom.NodeType.ELEMENT)) { - nodeset.add(node); - } - }); - return nodeset; - } - return wgxpath.Node.getChildNodesGeneric_(test, node, attrName, - attrValue, nodeset); -}; - - -/** - * Returns the child nodes of a node genericly. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The node to get child nodes from. - * @param {?string} attrName The attribute name to match, if any. - * @param {?string} attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet} nodeset The node set to add child nodes to. - * @return {!wgxpath.NodeSet} The nodeset with child nodes. - */ -wgxpath.Node.getChildNodesGeneric_ = function(test, node, attrName, - attrValue, nodeset) { - for (var current = node.firstChild; current; current = current.nextSibling) { - if (wgxpath.Node.attrMatches(current, attrName, attrValue)) { - if (test.matches(current)) { - nodeset.add(current); - } - } - } - return nodeset; -}; - - -/** - * Returns whether a getting descendants/children call - * needs special handling on IE browsers. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {!wgxpath.Node} node The root node to start the recursive call on. - * @param {?string} attrName The attribute name to match, if any. - * @param {?string} attrValue The attribute value to match, if any. - * @param {!wgxpath.NodeSet} nodeset The NodeSet to add nodes to. - */ -wgxpath.Node.doRecursiveAttrMatch_ = function(test, node, - attrName, attrValue, nodeset) { - for (var n = node.firstChild; n; n = n.nextSibling) { - if (wgxpath.Node.attrMatches(n, attrName, attrValue) && - test.matches(n)) { - nodeset.add(n); - } - wgxpath.Node.doRecursiveAttrMatch_(test, n, attrName, - attrValue, nodeset); - } -}; - - -/** - * Returns whether a getting descendants/children call - * needs special handling on IE browsers. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest for matching nodes. - * @param {?string} attrName The attribute name to match, if any. - * @return {boolean} Whether the call needs special handling. - */ -wgxpath.Node.doesNeedSpecialHandlingIEPre9_ = function(test, attrName) { - return test instanceof wgxpath.NameTest || - test.getType() == goog.dom.NodeType.COMMENT || - (!!attrName && goog.isNull(test.getType())); -}; - - -/** - * Returns a fixed name of a NodeTest for IE browsers. - * - * @private - * @param {!wgxpath.NodeTest} test A NodeTest. - * @return {string} The name of the NodeTest. - */ -wgxpath.Node.getNameFromTestIEPre9_ = function(test) { - if (test instanceof wgxpath.KindTest) { - if (test.getType() == goog.dom.NodeType.COMMENT) { - return '!'; - } else if (goog.isNull(test.getType())) { - return '*'; - } - } - return test.getName(); -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Context information about nodes in their nodeset. - */ - -goog.provide('wgxpath.NodeSet'); - -goog.require('goog.dom'); -goog.require('wgxpath.Node'); - - - -/** - * A set of nodes sorted by their prefix order in the document. - * - * @constructor - */ -wgxpath.NodeSet = function() { - // In violation of standard Closure practice, we initialize properties to - // immutable constants in the constructor instead of on the prototype, - // because we have empirically measured better performance by doing so. - - /** - * A pointer to the first node in the linked list. - * - * @private - * @type {wgxpath.NodeSet.Entry_} - */ - this.first_ = null; - - /** - * A pointer to the last node in the linked list. - * - * @private - * @type {wgxpath.NodeSet.Entry_} - */ - this.last_ = null; - - /** - * Length of the linked list. - * - * @private - * @type {number} - */ - this.length_ = 0; -}; - - - -/** - * A entry for a node in a linked list - * - * @param {!wgxpath.Node} node The node to be added. - * @constructor - * @private - */ -wgxpath.NodeSet.Entry_ = function(node) { - // In violation of standard Closure practice, we initialize properties to - // immutable constants in the constructor instead of on the prototype, - // because we have empirically measured better performance by doing so. - - /** - * @type {!wgxpath.Node} - */ - this.node = node; - - /** - * @type {wgxpath.NodeSet.Entry_} - */ - this.prev = null; - - /** - * @type {wgxpath.NodeSet.Entry_} - */ - this.next = null; -}; - - -/** - * Merges two nodesets, removing duplicates. This function may modify both - * nodesets, and will return a reference to one of the two. - * - * <p> Note: We assume that the two nodesets are already sorted in DOM order. - * - * @param {!wgxpath.NodeSet} a The first nodeset. - * @param {!wgxpath.NodeSet} b The second nodeset. - * @return {!wgxpath.NodeSet} The merged nodeset. - */ -wgxpath.NodeSet.merge = function(a, b) { - if (!a.first_) { - return b; - } else if (!b.first_) { - return a; - } - var aCurr = a.first_; - var bCurr = b.first_; - var merged = a, tail = null, next = null, length = 0; - while (aCurr && bCurr) { - if (wgxpath.Node.equal(aCurr.node, bCurr.node)) { - next = aCurr; - aCurr = aCurr.next; - bCurr = bCurr.next; - } else { - var compareResult = goog.dom.compareNodeOrder( - /** @type {!Node} */ (aCurr.node), - /** @type {!Node} */ (bCurr.node)); - if (compareResult > 0) { - next = bCurr; - bCurr = bCurr.next; - } else { - next = aCurr; - aCurr = aCurr.next; - } - } - next.prev = tail; - if (tail) { - tail.next = next; - } else { - merged.first_ = next; - } - tail = next; - length++; - } - next = aCurr || bCurr; - while (next) { - next.prev = tail; - tail.next = next; - tail = next; - length++; - next = next.next; - } - merged.last_ = tail; - merged.length_ = length; - return merged; -}; - - -/** - * Prepends a node to this nodeset. - * - * @param {!wgxpath.Node} node The node to be added. - */ -wgxpath.NodeSet.prototype.unshift = function(node) { - var entry = new wgxpath.NodeSet.Entry_(node); - entry.next = this.first_; - if (!this.last_) { - this.first_ = this.last_ = entry; - } else { - this.first_.prev = entry; - } - this.first_ = entry; - this.length_++; -}; - - -/** - * Adds a node to this nodeset. - * - * @param {!wgxpath.Node} node The node to be added. - */ -wgxpath.NodeSet.prototype.add = function(node) { - var entry = new wgxpath.NodeSet.Entry_(node); - entry.prev = this.last_; - if (!this.first_) { - this.first_ = this.last_ = entry; - } else { - this.last_.next = entry; - } - this.last_ = entry; - this.length_++; -}; - - -/** - * Returns the first node of the nodeset. - * - * @return {?wgxpath.Node} The first node of the nodeset - if the nodeset is non-empty; - * otherwise null. - */ -wgxpath.NodeSet.prototype.getFirst = function() { - var first = this.first_; - if (first) { - return first.node; - } else { - return null; - } -}; - - -/** - * Return the length of this nodeset. - * - * @return {number} The length of the nodeset. - */ -wgxpath.NodeSet.prototype.getLength = function() { - return this.length_; -}; - - -/** - * Returns the string representation of this nodeset. - * - * @return {string} The string representation of this nodeset. - */ -wgxpath.NodeSet.prototype.string = function() { - var node = this.getFirst(); - return node ? wgxpath.Node.getValueAsString(node) : ''; -}; - - -/** - * Returns the number representation of this nodeset. - * - * @return {number} The number representation of this nodeset. - */ -wgxpath.NodeSet.prototype.number = function() { - return +this.string(); -}; - - -/** - * Returns an iterator over this nodeset. Once this iterator is made, DO NOT - * add to this nodeset until the iterator is done. - * - * @param {boolean=} opt_reverse Whether to iterate right to left or vice versa. - * @return {!wgxpath.NodeSet.Iterator} An iterator over the nodes. - */ -wgxpath.NodeSet.prototype.iterator = function(opt_reverse) { - return new wgxpath.NodeSet.Iterator(this, !!opt_reverse); -}; - - - -/** - * An iterator over the nodes of this nodeset. - * - * @param {!wgxpath.NodeSet} nodeset The nodeset to be iterated over. - * @param {boolean} reverse Whether to iterate in ascending or descending - * order. - * @constructor - */ -wgxpath.NodeSet.Iterator = function(nodeset, reverse) { - // In violation of standard Closure practice, we initialize properties to - // immutable constants in the constructor instead of on the prototype, - // because we have empirically measured better performance by doing so. - - /** - * @type {!wgxpath.NodeSet} - * @private - */ - this.nodeset_ = nodeset; - - /** - * @type {boolean} - * @private - */ - this.reverse_ = reverse; - - /** - * @type {wgxpath.NodeSet.Entry_} - * @private - */ - this.current_ = reverse ? nodeset.last_ : nodeset.first_; - - /** - * @type {wgxpath.NodeSet.Entry_} - * @private - */ - this.lastReturned_ = null; -}; - - -/** - * Returns the next value of the iteration or null if passes the end. - * - * @return {?wgxpath.Node} The next node from this iterator. - */ -wgxpath.NodeSet.Iterator.prototype.next = function() { - var current = this.current_; - if (current == null) { - return null; - } else { - var lastReturned = this.lastReturned_ = current; - if (this.reverse_) { - this.current_ = current.prev; - } else { - this.current_ = current.next; - } - return lastReturned.node; - } -}; - - -/** - * Deletes the last node that was returned from this iterator. - */ -wgxpath.NodeSet.Iterator.prototype.remove = function() { - /* TODO: to implement delDescendent(node) we shouldn't have to iterate over - * the entire array, only the things whose index comes after node. - * If the nodeset is already sorted we know all the descendents lie in a - * continguous block starting at nodecould start the iterator at node. - */ - var nodeset = this.nodeset_; - var entry = this.lastReturned_; - if (!entry) { - throw Error('Next must be called at least once before remove.'); - } - var prev = entry.prev; - var next = entry.next; - - // Modify the pointers of prev and next - if (prev) { - prev.next = next; - } else { - // If there was no prev node entry must've been first_, so update first_. - nodeset.first_ = next; - } - if (next) { - next.prev = prev; - } else { - // If there was no prev node entry must've been last_, so update last_. - nodeset.last_ = prev; - } - nodeset.length_--; - this.lastReturned_ = null; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview An interface for the NodeTest construct. - */ - -goog.provide('wgxpath.NodeTest'); - - - -/** - * The NodeTest interface to represent the NodeTest production - * in the xpath grammar: - * http://www.w3.org/TR/xpath-30/#prod-xpath30-NodeTest - * - * @interface - */ -wgxpath.NodeTest = function() {}; - - -/** - * Tests if a node matches the stored characteristics. - * - * @param {wgxpath.Node} node The node to be tested. - * @return {boolean} Whether the node passes the test. - */ -wgxpath.NodeTest.prototype.matches = goog.abstractMethod; - - -/** - * Returns the name of the test. - * - * @return {string} The name, either nodename or type name. - */ -wgxpath.NodeTest.prototype.getName = goog.abstractMethod; - - -/** - * Returns the string representation of the NodeTest for debugging. - * - * @param {string=} opt_indent Optional indentation. - * @return {string} The string representation. - */ -wgxpath.NodeTest.prototype.toString = goog.abstractMethod; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class representing number literals. - */ - -goog.provide('wgxpath.Number'); - -goog.require('wgxpath.Expr'); - - - -/** - * Constructs a number expression. - * - * @param {number} value The number value. - * @constructor - * @extends {wgxpath.Expr} - */ -wgxpath.Number = function(value) { - wgxpath.Expr.call(this, wgxpath.DataType.NUMBER); - - /** - * @type {number} - * @private - */ - this.value_ = value; -}; -goog.inherits(wgxpath.Number, wgxpath.Expr); - - -/** - * @override - * @return {number} The number result. - */ -wgxpath.Number.prototype.evaluate = function(ctx) { - return this.value_; -}; - - -/** - * @override - */ -wgxpath.Number.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - return indent + 'number: ' + this.value_; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A recursive descent Parser. - */ - -goog.provide('wgxpath.Parser'); - -goog.require('wgxpath.BinaryExpr'); -goog.require('wgxpath.FilterExpr'); -goog.require('wgxpath.FunctionCall'); -goog.require('wgxpath.KindTest'); -goog.require('wgxpath.Literal'); -goog.require('wgxpath.NameTest'); -goog.require('wgxpath.Number'); -goog.require('wgxpath.PathExpr'); -goog.require('wgxpath.Predicates'); -goog.require('wgxpath.Step'); -goog.require('wgxpath.UnaryExpr'); -goog.require('wgxpath.UnionExpr'); - - - -/** - * The recursive descent parser. - * - * @constructor - * @param {!wgxpath.Lexer} lexer The lexer. - */ -wgxpath.Parser = function(lexer) { - - /** - * @private - * @type {!wgxpath.Lexer} - */ - this.lexer_ = lexer; -}; - - -/** - * Apply recursive descent parsing on the input to construct an - * abstract syntax tree. - * - * @return {!wgxpath.Expr} The root of the constructed tree. - */ -wgxpath.Parser.prototype.parseExpr = function() { - var expr, stack = []; - while (true) { - this.checkNotEmpty_('Missing right hand side of binary expression.'); - expr = this.parseUnaryExpr_(); // See if it's just a UnaryExpr. - var opString = this.lexer_.next(); - if (!opString) { - break; // Done, we have only a UnaryExpr. - } - - var op = wgxpath.BinaryExpr.getOp(opString); - var precedence = op && op.getPrecedence(); - if (!precedence) { - this.lexer_.back(); - break; - } - // Precedence climbing - while (stack.length && - precedence <= stack[stack.length - 1].getPrecedence()) { - expr = new wgxpath.BinaryExpr(stack.pop(), stack.pop(), expr); - } - stack.push(expr, op); - } - while (stack.length) { - expr = new wgxpath.BinaryExpr(stack.pop(), stack.pop(), - /** @type {!wgxpath.Expr} */ (expr)); - } - return /** @type {!wgxpath.Expr} */ (expr); -}; - - -/** - * Checks that the lexer is not empty, - * displays the given error message if it is. - * - * @private - * @param {string} msg The error message to display. - */ -wgxpath.Parser.prototype.checkNotEmpty_ = function(msg) { - if (this.lexer_.empty()) { - throw Error(msg); - } -}; - - -/** - * Checks that the next token of the error message is the expected token. - * - * @private - * @param {string} expected The expected token. - */ -wgxpath.Parser.prototype.checkNextEquals_ = function(expected) { - var got = this.lexer_.next(); - if (got != expected) { - throw Error('Bad token, expected: ' + expected + ' got: ' + got); - } -}; - - -/** - * Checks that the next token of the error message is not the given token. - * - * @private - * @param {string} token The token. - */ -wgxpath.Parser.prototype.checkNextNotEquals_ = function(token) { - var next = this.lexer_.next(); - if (next != token) { - throw Error('Bad token: ' + next); - } -}; - - -/** - * Attempts to parse the input as a FilterExpr. - * - * @private - * @return {wgxpath.Expr} The root of the constructed tree. - */ -wgxpath.Parser.prototype.parseFilterExpr_ = function() { - var expr; - var token = this.lexer_.peek(); - var ch = token.charAt(0); - switch (ch) { - case '$': - throw Error('Variable reference not allowed in HTML XPath'); - case '(': - this.lexer_.next(); - expr = this.parseExpr(); - this.checkNotEmpty_('unclosed "("'); - this.checkNextEquals_(')'); - break; - case '"': - case "'": - expr = this.parseLiteral_(); - break; - default: - if (!isNaN(+token)) { - expr = this.parseNumber_(); - } else if (wgxpath.KindTest.isValidType(token)) { - return null; - } else if (/(?![0-9])[\w]/.test(ch) && this.lexer_.peek(1) == '(') { - expr = this.parseFunctionCall_(); - } else { - return null; - } - } - if (this.lexer_.peek() != '[') { - return expr; - } - var predicates = new wgxpath.Predicates(this.parsePredicates_()); - return new wgxpath.FilterExpr(expr, predicates); -}; - - -/** - * Parses FunctionCall. - * - * @private - * @return {!wgxpath.FunctionCall} The parsed expression. - */ -wgxpath.Parser.prototype.parseFunctionCall_ = function() { - var funcName = this.lexer_.next(); - var func = wgxpath.FunctionCall.getFunc(funcName); - this.lexer_.next(); - - var args = []; - while (this.lexer_.peek() != ')') { - this.checkNotEmpty_('Missing function argument list.'); - args.push(this.parseExpr()); - if (this.lexer_.peek() != ',') { - break; - } - this.lexer_.next(); - } - this.checkNotEmpty_('Unclosed function argument list.'); - this.checkNextNotEquals_(')'); - - return new wgxpath.FunctionCall(func, args); -}; - - -/** - * Parses the input to construct a KindTest. - * - * @private - * @return {!wgxpath.KindTest} The KindTest constructed. - */ -wgxpath.Parser.prototype.parseKindTest_ = function() { - var typeName = this.lexer_.next(); - if (!wgxpath.KindTest.isValidType(typeName)) { - throw Error('Invalid type name: ' + typeName); - } - this.checkNextEquals_('('); - this.checkNotEmpty_('Bad nodetype'); - var ch = this.lexer_.peek().charAt(0); - - var literal = null; - if (ch == '"' || ch == "'") { - literal = this.parseLiteral_(); - } - this.checkNotEmpty_('Bad nodetype'); - this.checkNextNotEquals_(')'); - return new wgxpath.KindTest(typeName, literal); -}; - - -/** - * Parses the input to construct a Literal. - * - * @private - * @return {!wgxpath.Literal} The Literal constructed. - */ -wgxpath.Parser.prototype.parseLiteral_ = function() { - var token = this.lexer_.next(); - if (token.length < 2) { - throw Error('Unclosed literal string'); - } - return new wgxpath.Literal(token); -}; - - -/** - * Parses the input to construct a NameTest. - * - * @private - * @return {!wgxpath.NameTest} The NameTest constructed. - */ -wgxpath.Parser.prototype.parseNameTest_ = function() { - // Has namespace - if (this.lexer_.peek() != '*' && this.lexer_.peek(1) == ':' && - this.lexer_.peek(2) == '*') { - return new wgxpath.NameTest(this.lexer_.next() + this.lexer_.next() + - this.lexer_.next()); - } - return new wgxpath.NameTest(this.lexer_.next()); -}; - - -/** - * Parses the input to construct a Number. - * - * @private - * @return {!wgxpath.Number} The Number constructed. - */ -wgxpath.Parser.prototype.parseNumber_ = function() { - return new wgxpath.Number(+this.lexer_.next()); -}; - - -/** - * Attempts to parse the input as a PathExpr. - * - * @private - * @return {!wgxpath.Expr} The root of the constructed tree. - */ -wgxpath.Parser.prototype.parsePathExpr_ = function() { - var op, expr; - var steps = []; - var filterExpr; - if (wgxpath.PathExpr.isValidOp(this.lexer_.peek())) { - op = this.lexer_.next(); - var token = this.lexer_.peek(); - if (op == '/' && (this.lexer_.empty() || - (token != '.' && token != '..' && token != '@' && token != '*' && - !/(?![0-9])[\w]/.test(token)))) { - return new wgxpath.PathExpr.RootHelperExpr(); - } - filterExpr = new wgxpath.PathExpr.RootHelperExpr(); - - this.checkNotEmpty_('Missing next location step.'); - expr = this.parseStep_(op); - steps.push(expr); - } else { - expr = this.parseFilterExpr_(); - if (!expr) { - expr = this.parseStep_('/'); - filterExpr = new wgxpath.PathExpr.ContextHelperExpr(); - steps.push(expr); - } else if (!wgxpath.PathExpr.isValidOp(this.lexer_.peek())) { - return expr; // Done. - } else { - filterExpr = expr; - } - } - while (true) { - if (!wgxpath.PathExpr.isValidOp(this.lexer_.peek())) { - break; - } - op = this.lexer_.next(); - this.checkNotEmpty_('Missing next location step.'); - expr = this.parseStep_(op); - steps.push(expr); - } - return new wgxpath.PathExpr(filterExpr, steps); -}; - - -/** - * Parses Step. - * - * @private - * @param {string} op The op for this step. - * @return {!wgxpath.Step} The parsed expression. - */ -wgxpath.Parser.prototype.parseStep_ = function(op) { - // TODO (evanrthomas) : Let parseStep see op instead of passing it - // as a parameter - var test, step, token, predicates; - if (op != '/' && op != '//') { - throw Error('Step op should be "/" or "//"'); - } - if (this.lexer_.peek() == '.') { - step = new wgxpath.Step(wgxpath.Step.Axis.SELF, - new wgxpath.KindTest('node')); - this.lexer_.next(); - return step; - } - else if (this.lexer_.peek() == '..') { - step = new wgxpath.Step(wgxpath.Step.Axis.PARENT, - new wgxpath.KindTest('node')); - this.lexer_.next(); - return step; - } else { - // Grab the axis. - var axis; - if (this.lexer_.peek() == '@') { - axis = wgxpath.Step.Axis.ATTRIBUTE; - this.lexer_.next(); - this.checkNotEmpty_('Missing attribute name'); - } else { - if (this.lexer_.peek(1) == '::') { - if (!/(?![0-9])[\w]/.test(this.lexer_.peek().charAt(0))) { - throw Error('Bad token: ' + this.lexer_.next()); - } - var axisName = this.lexer_.next(); - axis = wgxpath.Step.getAxis(axisName); - if (!axis) { - throw Error('No axis with name: ' + axisName); - } - this.lexer_.next(); - this.checkNotEmpty_('Missing node name'); - } else { - axis = wgxpath.Step.Axis.CHILD; - } - } - - // Grab the test. - token = this.lexer_.peek(); - if (!/(?![0-9])[\w]/.test(token.charAt(0))) { - if (token == '*') { - test = this.parseNameTest_(); - } else { - throw Error('Bad token: ' + this.lexer_.next()); - } - } else { - if (this.lexer_.peek(1) == '(') { - if (!wgxpath.KindTest.isValidType(token)) { - throw Error('Invalid node type: ' + token); - } - test = this.parseKindTest_(); - } else { - test = this.parseNameTest_(); - } - } - predicates = new wgxpath.Predicates(this.parsePredicates_(), - axis.isReverse()); - return step || new wgxpath.Step(axis, test, predicates, op == '//'); - } -}; - - -/** - * Parses and returns the predicates from the this.lexer_. - * - * @private - * @return {!Array.<!wgxpath.Expr>} An array of the predicates. - */ -wgxpath.Parser.prototype.parsePredicates_ = function() { - var predicates = []; - while (this.lexer_.peek() == '[') { - this.lexer_.next(); - this.checkNotEmpty_('Missing predicate expression.'); - var predicate = this.parseExpr(); - predicates.push(predicate); - this.checkNotEmpty_('Unclosed predicate expression.'); - this.checkNextEquals_(']'); - } - return predicates; -}; - - -/** - * Attempts to parse the input as a unary expression with - * recursive descent parsing. - * - * @private - * @return {!wgxpath.Expr} The root of the constructed tree. - */ -wgxpath.Parser.prototype.parseUnaryExpr_ = function() { - if (this.lexer_.peek() == '-') { - this.lexer_.next(); - return new wgxpath.UnaryExpr(this.parseUnaryExpr_()); - } else { - return this.parseUnionExpr_(); - } -}; - - -/** - * Attempts to parse the input as a union expression with - * recursive descent parsing. - * - * @private - * @return {!wgxpath.Expr} The root of the constructed tree. - */ -wgxpath.Parser.prototype.parseUnionExpr_ = function() { - var expr = this.parsePathExpr_(); - if (!(this.lexer_.peek() == '|')) { - return expr; // Not a UnionExpr, returning as is. - } - var paths = [expr]; - while (this.lexer_.next() == '|') { - this.checkNotEmpty_('Missing next union location path.'); - paths.push(this.parsePathExpr_()); - } - this.lexer_.back(); - return new wgxpath.UnionExpr(paths); -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview An class representing operations on path expressions. - */ - -goog.provide('wgxpath.PathExpr'); - - -goog.require('goog.array'); -goog.require('goog.dom.NodeType'); -goog.require('wgxpath.DataType'); -goog.require('wgxpath.Expr'); -goog.require('wgxpath.NodeSet'); - - - -/** - * Constructor for PathExpr. - * - * @param {!wgxpath.Expr} filter A filter expression. - * @param {!Array.<!wgxpath.Step>} steps The steps in the location path. - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.PathExpr = function(filter, steps) { - wgxpath.Expr.call(this, filter.getDataType()); - - /** - * @type {!wgxpath.Expr} - * @private - */ - this.filter_ = filter; - - /** - * @type {!Array.<!wgxpath.Step>} - * @private - */ - this.steps_ = steps; - - this.setNeedContextPosition(filter.doesNeedContextPosition()); - this.setNeedContextNode(filter.doesNeedContextNode()); - if (this.steps_.length == 1) { - var firstStep = this.steps_[0]; - if (!firstStep.doesIncludeDescendants() && - firstStep.getAxis() == wgxpath.Step.Axis.ATTRIBUTE) { - var test = firstStep.getTest(); - if (test.getName() != '*') { - this.setQuickAttr({ - name: test.getName(), - valueExpr: null - }); - } - } - } -}; -goog.inherits(wgxpath.PathExpr, wgxpath.Expr); - - - -/** - * Constructor for RootHelperExpr. - * - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.PathExpr.RootHelperExpr = function() { - wgxpath.Expr.call(this, wgxpath.DataType.NODESET); -}; -goog.inherits(wgxpath.PathExpr.RootHelperExpr, wgxpath.Expr); - - -/** - * Evaluates the root-node helper expression. - * - * @param {!wgxpath.Context} ctx The context to evaluate the expression in. - * @return {!wgxpath.NodeSet} The evaluation result. - */ -wgxpath.PathExpr.RootHelperExpr.prototype.evaluate = function(ctx) { - var nodeset = new wgxpath.NodeSet(); - var node = ctx.getNode(); - if (node.nodeType == goog.dom.NodeType.DOCUMENT) { - nodeset.add(node); - } else { - nodeset.add(/** @type {!Node} */ (node.ownerDocument)); - } - return nodeset; -}; - - -/** - * Returns the string representation of the RootHelperExpr for debugging. - * - * @param {string=} opt_indent An optional indentation. - * @return {string} The string representation. - */ -wgxpath.PathExpr.RootHelperExpr.prototype.toString = function(opt_indent) { - return opt_indent + 'RootHelperExpr'; -}; - - - -/** - * Constructor for ContextHelperExpr. - * - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.PathExpr.ContextHelperExpr = function() { - wgxpath.Expr.call(this, wgxpath.DataType.NODESET); -}; -goog.inherits(wgxpath.PathExpr.ContextHelperExpr, wgxpath.Expr); - - -/** - * Evaluates the context-node helper expression. - * - * @param {!wgxpath.Context} ctx The context to evaluate the expression in. - * @return {!wgxpath.NodeSet} The evaluation result. - */ -wgxpath.PathExpr.ContextHelperExpr.prototype.evaluate = function(ctx) { - var nodeset = new wgxpath.NodeSet(); - nodeset.add(ctx.getNode()); - return nodeset; -}; - - -/** - * Returns the string representation of the ContextHelperExpr for debugging. - * - * @param {string=} opt_indent An optional indentation. - * @return {string} The string representation. - */ -wgxpath.PathExpr.ContextHelperExpr.prototype.toString = function(opt_indent) { - return opt_indent + 'ContextHelperExpr'; -}; - - -/** - * Returns whether the token is a valid PathExpr operator. - * - * @param {string} token The token to be checked. - * @return {boolean} Whether the token is a valid operator. - */ -wgxpath.PathExpr.isValidOp = function(token) { - return token == '/' || token == '//'; -}; - - -/** - * @override - * @return {!wgxpath.NodeSet} The nodeset result. - */ -wgxpath.PathExpr.prototype.evaluate = function(ctx) { - var nodeset = this.filter_.evaluate(ctx); - if (!(nodeset instanceof wgxpath.NodeSet)) { - throw Error('FilterExpr must evaluate to nodeset.'); - } - var steps = this.steps_; - for (var i = 0, l0 = steps.length; i < l0 && nodeset.getLength(); i++) { - var step = steps[i]; - var reverse = step.getAxis().isReverse(); - var iter = nodeset.iterator(reverse); - nodeset = null; - var node, next; - if (!step.doesNeedContextPosition() && - step.getAxis() == wgxpath.Step.Axis.FOLLOWING) { - for (node = iter.next(); next = iter.next(); node = next) { - if (node.contains && !node.contains(next)) { - break; - } else { - if (!(next.compareDocumentPosition(/** @type {!Node} */ (node)) & - 8)) { - break; - } - } - } - nodeset = step.evaluate(new - wgxpath.Context(/** @type {wgxpath.Node} */ (node))); - } else if (!step.doesNeedContextPosition() && - step.getAxis() == wgxpath.Step.Axis.PRECEDING) { - node = iter.next(); - nodeset = step.evaluate(new - wgxpath.Context(/** @type {wgxpath.Node} */ (node))); - } else { - node = iter.next(); - nodeset = step.evaluate(new - wgxpath.Context(/** @type {wgxpath.Node} */ (node))); - while ((node = iter.next()) != null) { - var result = step.evaluate(new - wgxpath.Context(/** @type {wgxpath.Node} */ (node))); - nodeset = wgxpath.NodeSet.merge(nodeset, result); - } - } - } - return /** @type {!wgxpath.NodeSet} */ (nodeset); -}; - - -/** - * @override - */ -wgxpath.PathExpr.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'PathExpr:' + '\n'; - indent += wgxpath.Expr.INDENT; - text += this.filter_.toString(indent); - if (this.steps_.length) { - text += indent + 'Steps:' + '\n'; - indent += wgxpath.Expr.INDENT; - goog.array.forEach(this.steps_, function(step) { - text += step.toString(indent); - }); - } - return text; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview An abstract class representing expressions with predicates. - * baseExprWithPredictes are immutable objects that evaluate their - * predicates against nodesets and return the modified nodesets. - * - */ - - -goog.provide('wgxpath.Predicates'); - -goog.require('goog.array'); -goog.require('wgxpath.Context'); -goog.require('wgxpath.Expr'); - - - -/** - * An abstract class for expressions with predicates. - * - * @constructor - * @param {!Array.<!wgxpath.Expr>} predicates The array of predicates. - * @param {boolean=} opt_reverse Whether to iterate over the nodeset in reverse. - */ -wgxpath.Predicates = function(predicates, opt_reverse) { - - /** - * List of predicates - * - * @private - * @type {!Array.<!wgxpath.Expr>} - */ - this.predicates_ = predicates; - - - /** - * Which direction to iterate over the predicates - * - * @private - * @type {boolean} - */ - this.reverse_ = !!opt_reverse; -}; - - -/** - * Evaluates the predicates against the given nodeset. - * - * @param {!wgxpath.NodeSet} nodeset The nodes against which to evaluate - * the predicates. - * @param {number=} opt_start The index of the first predicate to evaluate, - * defaults to 0. - * @return {!wgxpath.NodeSet} nodeset The filtered nodeset. - */ -wgxpath.Predicates.prototype.evaluatePredicates = - function(nodeset, opt_start) { - for (var i = opt_start || 0; i < this.predicates_.length; i++) { - var predicate = this.predicates_[i]; - var iter = nodeset.iterator(); - var l = nodeset.getLength(); - var node; - for (var j = 0; node = iter.next(); j++) { - var position = this.reverse_ ? (l - j) : (j + 1); - var exrs = predicate.evaluate(new - wgxpath.Context(/** @type {wgxpath.Node} */ (node), position, l)); - var keep; - if (typeof exrs == 'number') { - keep = (position == exrs); - } else if (typeof exrs == 'string' || typeof exrs == 'boolean') { - keep = !!exrs; - } else if (exrs instanceof wgxpath.NodeSet) { - keep = (exrs.getLength() > 0); - } else { - throw Error('Predicate.evaluate returned an unexpected type.'); - } - if (!keep) { - iter.remove(); - } - } - } - return nodeset; -}; - - -/** - * Returns the quickAttr info. - * - * @return {?{name: string, valueExpr: wgxpath.Expr}} - */ -wgxpath.Predicates.prototype.getQuickAttr = function() { - return this.predicates_.length > 0 ? - this.predicates_[0].getQuickAttr() : null; -}; - - -/** - * Returns whether this set of predicates needs context position. - * - * @return {boolean} Whether something needs context position. - */ -wgxpath.Predicates.prototype.doesNeedContextPosition = function() { - for (var i = 0; i < this.predicates_.length; i++) { - var predicate = this.predicates_[i]; - if (predicate.doesNeedContextPosition() || - predicate.getDataType() == wgxpath.DataType.NUMBER || - predicate.getDataType() == wgxpath.DataType.VOID) { - return true; - } - } - return false; -}; - - -/** - * Returns the length of this set of predicates. - * - * @return {number} The number of expressions. - */ -wgxpath.Predicates.prototype.getLength = function() { - return this.predicates_.length; -}; - - -/** - * Returns a string represendation of this set of predicates for debugging. - * - * @param {string=} opt_indent An optional indentation. - * @return {string} The string representation. - */ -wgxpath.Predicates.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var header = indent + 'Predicates:'; - indent += wgxpath.Expr.INDENT; - return goog.array.reduce(this.predicates_, function(prev, curr) { - return prev + '\n' + indent + curr.toString(indent); - }, header); -}; -goog.provide('wgxpath.Step'); - -goog.require('goog.dom.NodeType'); -goog.require('wgxpath.DataType'); -goog.require('wgxpath.Expr'); -goog.require('wgxpath.KindTest'); -goog.require('wgxpath.Node'); -goog.require('wgxpath.Predicates'); -goog.require('wgxpath.userAgent'); - - - -/** - * Class for a step in a path expression - * http://www.w3.org/TR/xpath20/#id-steps. - * - * @extends {wgxpath.Expr} - * @constructor - * @param {!wgxpath.Step.Axis} axis The axis for this Step. - * @param {!wgxpath.NodeTest} test The test for this Step. - * @param {!wgxpath.Predicates=} opt_predicates The predicates for this - * Step. - * @param {boolean=} opt_descendants Whether descendants are to be included in - * this step ('//' vs '/'). - */ -wgxpath.Step = function(axis, test, opt_predicates, opt_descendants) { - var axisCast = /** @type {!wgxpath.Step.Axis_} */ (axis); - wgxpath.Expr.call(this, wgxpath.DataType.NODESET); - - /** - * @type {!wgxpath.Step.Axis_} - * @private - */ - this.axis_ = axisCast; - - - /** - * @type {!wgxpath.NodeTest} - * @private - */ - this.test_ = test; - - /** - * @type {!wgxpath.Predicates} - * @private - */ - this.predicates_ = opt_predicates || new wgxpath.Predicates([]); - - - /** - * Whether decendants are included in this step - * - * @private - * @type {boolean} - */ - this.descendants_ = !!opt_descendants; - - var quickAttrInfo = this.predicates_.getQuickAttr(); - if (axis.supportsQuickAttr_ && quickAttrInfo) { - var attrName = quickAttrInfo.name; - attrName = wgxpath.userAgent.IE_DOC_PRE_9 ? - attrName.toLowerCase() : attrName; - var attrValueExpr = quickAttrInfo.valueExpr; - this.setQuickAttr({ - name: attrName, - valueExpr: attrValueExpr - }); - } - this.setNeedContextPosition(this.predicates_.doesNeedContextPosition()); -}; -goog.inherits(wgxpath.Step, wgxpath.Expr); - - -/** - * @override - * @return {!wgxpath.NodeSet} The nodeset result. - */ -wgxpath.Step.prototype.evaluate = function(ctx) { - var node = ctx.getNode(); - var nodeset = null; - var quickAttr = this.getQuickAttr(); - var attrName = null; - var attrValue = null; - var pstart = 0; - if (quickAttr) { - attrName = quickAttr.name; - attrValue = quickAttr.valueExpr ? - quickAttr.valueExpr.asString(ctx) : null; - pstart = 1; - } - if (this.descendants_) { - if (!this.doesNeedContextPosition() && - this.axis_ == wgxpath.Step.Axis.CHILD) { - nodeset = wgxpath.Node.getDescendantNodes(this.test_, node, - attrName, attrValue); - nodeset = this.predicates_.evaluatePredicates(nodeset, pstart); - } else { - var step = new wgxpath.Step(wgxpath.Step.Axis.DESCENDANT_OR_SELF, - new wgxpath.KindTest('node')); - var iter = step.evaluate(ctx).iterator(); - var n = iter.next(); - if (!n) { - nodeset = new wgxpath.NodeSet(); - } else { - nodeset = this.evaluate_(/** @type {!wgxpath.Node} */ (n), - attrName, attrValue, pstart); - while ((n = iter.next()) != null) { - nodeset = wgxpath.NodeSet.merge(nodeset, - this.evaluate_(/** @type {!wgxpath.Node} */ (n), attrName, - attrValue, pstart)); - } - } - } - } else { - nodeset = this.evaluate_(ctx.getNode(), attrName, attrValue, pstart); - } - return nodeset; -}; - - -/** - * Evaluates this step on the given context to a nodeset. - * (assumes this.descendants_ = false) - * - * @private - * @param {!wgxpath.Node} node The context node. - * @param {?string} attrName The name of the attribute. - * @param {?string} attrValue The value of the attribute. - * @param {number} pstart The first predicate to evaluate. - * @return {!wgxpath.NodeSet} The nodeset from evaluating this Step. - */ -wgxpath.Step.prototype.evaluate_ = function( - node, attrName, attrValue, pstart) { - var nodeset = this.axis_.func_(this.test_, node, attrName, attrValue); - nodeset = this.predicates_.evaluatePredicates(nodeset, pstart); - return nodeset; -}; - - -/** - * Returns whether the step evaluation should include descendants. - * - * @return {boolean} Whether descendants are included. - */ -wgxpath.Step.prototype.doesIncludeDescendants = function() { - return this.descendants_; -}; - - -/** - * Returns the step's axis. - * - * @return {!wgxpath.Step.Axis} The axis. - */ -wgxpath.Step.prototype.getAxis = function() { - return (/** @type {!wgxpath.Step.Axis} */ this.axis_); -}; - - -/** - * Returns the test for this step. - * - * @return {!wgxpath.NodeTest} The test for this step. - */ -wgxpath.Step.prototype.getTest = function() { - return this.test_; -}; - - -/** - * @override - */ -wgxpath.Step.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'Step: ' + '\n'; - indent += wgxpath.Expr.INDENT; - text += indent + 'Operator: ' + (this.descendants_ ? '//' : '/') + '\n'; - if (this.axis_.name_) { - text += indent + 'Axis: ' + this.axis_ + '\n'; - } - text += this.test_.toString(indent); - if (this.predicates_.length) { - text += indent + 'Predicates: ' + '\n'; - for (var i = 0; i < this.predicates_.length; i++) { - var tail = i < this.predicates_.length - 1 ? ', ' : ''; - text += this.predicates_[i].toString(indent) + tail; - } - } - return text; -}; - - - -/** - * A step axis. - * - * @constructor - * @param {string} name The axis name. - * @param {function(!wgxpath.NodeTest, wgxpath.Node, ?string, ?string): - * !wgxpath.NodeSet} func The function for this axis. - * @param {boolean} reverse Whether to iterate over the nodeset in reverse. - * @param {boolean} supportsQuickAttr Whether quickAttr should be enabled for - * this axis. - * @private - */ -wgxpath.Step.Axis_ = function(name, func, reverse, supportsQuickAttr) { - - /** - * @private - * @type {string} - */ - this.name_ = name; - - /** - * @private - * @type {function(!wgxpath.NodeTest, wgxpath.Node, ?string, ?string): - * !wgxpath.NodeSet} - */ - this.func_ = func; - - /** - * @private - * @type {boolean} - */ - this.reverse_ = reverse; - - /** - * @private - * @type {boolean} - */ - this.supportsQuickAttr_ = supportsQuickAttr; -}; - - -/** - * Returns whether the nodes in the step should be iterated over in reverse. - * - * @return {boolean} Whether the nodes should be iterated over in reverse. - */ -wgxpath.Step.Axis_.prototype.isReverse = function() { - return this.reverse_; -}; - - -/** - * @override - */ -wgxpath.Step.Axis_.prototype.toString = function() { - return this.name_; -}; - - -/** - * A map from axis name to Axis. - * - * @type {!Object.<string, !wgxpath.Step.Axis>} - * @private - */ -wgxpath.Step.nameToAxisMap_ = {}; - - -/** - * Creates an axis and maps the axis's name to that axis. - * - * @param {string} name The axis name. - * @param {function(!wgxpath.NodeTest, wgxpath.Node, ?string, ?string): - * !wgxpath.NodeSet} func The function for this axis. - * @param {boolean} reverse Whether to iterate over nodesets in reverse. - * @param {boolean=} opt_supportsQuickAttr Whether quickAttr can be enabled - * for this axis. - * @return {!wgxpath.Step.Axis} The axis. - * @private - */ -wgxpath.Step.createAxis_ = - function(name, func, reverse, opt_supportsQuickAttr) { - if (name in wgxpath.Step.nameToAxisMap_) { - throw Error('Axis already created: ' + name); - } - // The upcast and then downcast for the JSCompiler. - var axis = (/** @type {!Object} */ new wgxpath.Step.Axis_( - name, func, reverse, !!opt_supportsQuickAttr)); - axis = (/** @type {!wgxpath.Step.Axis} */ axis); - wgxpath.Step.nameToAxisMap_[name] = axis; - return axis; -}; - - -/** - * Returns the axis for this axisname or null if none. - * - * @param {string} name The axis name. - * @return {wgxpath.Step.Axis} The axis. - */ -wgxpath.Step.getAxis = function(name) { - return wgxpath.Step.nameToAxisMap_[name] || null; -}; - - -/** - * Axis enumeration. - * - * @enum {{isReverse: function(): boolean}} - */ -wgxpath.Step.Axis = { - ANCESTOR: wgxpath.Step.createAxis_('ancestor', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - var parent = node; - while (parent = parent.parentNode) { - if (test.matches(parent)) { - nodeset.unshift(parent); - } - } - return nodeset; - }, true), - ANCESTOR_OR_SELF: wgxpath.Step.createAxis_('ancestor-or-self', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - var toMatch = node; - do { - if (test.matches(toMatch)) { - nodeset.unshift(toMatch); - } - } while (toMatch = toMatch.parentNode); - return nodeset; - }, true), - ATTRIBUTE: wgxpath.Step.createAxis_('attribute', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - var testName = test.getName(); - // IE8 doesn't allow access to the style attribute using getNamedItem. - // It returns an object with nodeValue = null. - if (testName == 'style' && node.style && - wgxpath.userAgent.IE_DOC_PRE_9) { - nodeset.add(wgxpath.IEAttrWrapper.forStyleOf( - /** @type {!Node} */ (node), node.sourceIndex)); - return nodeset; - } - var attrs = node.attributes; - if (attrs) { - if ((test instanceof wgxpath.KindTest && - goog.isNull(test.getType())) || testName == '*') { - var sourceIndex = node.sourceIndex; - for (var i = 0, attr; attr = attrs[i]; i++) { - if (wgxpath.userAgent.IE_DOC_PRE_9) { - if (attr.nodeValue) { - nodeset.add(wgxpath.IEAttrWrapper.forAttrOf( - /** @type {!Node} */ (node), attr, sourceIndex)); - } - } else { - nodeset.add(attr); - } - } - } else { - var attr = attrs.getNamedItem(testName); - if (attr) { - if (wgxpath.userAgent.IE_DOC_PRE_9) { - if (attr.nodeValue) { - nodeset.add(wgxpath.IEAttrWrapper.forAttrOf( - /** @type {!Node} */ (node), attr, node.sourceIndex)); - } - } else { - nodeset.add(attr); - } - } - } - } - return nodeset; - }, false), - CHILD: wgxpath.Step.createAxis_('child', - wgxpath.Node.getChildNodes, false, true), - DESCENDANT: wgxpath.Step.createAxis_('descendant', - wgxpath.Node.getDescendantNodes, false, true), - DESCENDANT_OR_SELF: wgxpath.Step.createAxis_('descendant-or-self', - function(test, node, attrName, attrValue) { - var nodeset = new wgxpath.NodeSet(); - if (wgxpath.Node.attrMatches(node, attrName, attrValue)) { - if (test.matches(node)) { - nodeset.add(node); - } - } - return wgxpath.Node.getDescendantNodes(test, node, - attrName, attrValue, nodeset); - }, false, true), - FOLLOWING: wgxpath.Step.createAxis_('following', - function(test, node, attrName, attrValue) { - var nodeset = new wgxpath.NodeSet(); - var parent = node; - do { - var child = parent; - while (child = child.nextSibling) { - if (wgxpath.Node.attrMatches(child, attrName, attrValue)) { - if (test.matches(child)) { - nodeset.add(child); - } - } - nodeset = wgxpath.Node.getDescendantNodes(test, child, - attrName, attrValue, nodeset); - } - } while (parent = parent.parentNode); - return nodeset; - }, false, true), - FOLLOWING_SIBLING: wgxpath.Step.createAxis_('following-sibling', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - var toMatch = node; - while (toMatch = toMatch.nextSibling) { - if (test.matches(toMatch)) { - nodeset.add(toMatch); - } - } - return nodeset; - }, false), - NAMESPACE: wgxpath.Step.createAxis_('namespace', - function(test, node) { - // not implemented - return new wgxpath.NodeSet(); - }, false), - PARENT: wgxpath.Step.createAxis_('parent', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - if (node.nodeType == goog.dom.NodeType.DOCUMENT) { - return nodeset; - } else if (node.nodeType == goog.dom.NodeType.ATTRIBUTE) { - nodeset.add(node.ownerElement); - return nodeset; - } - var parent = /** @type {!Node} */ (node.parentNode); - if (test.matches(parent)) { - nodeset.add(parent); - } - return nodeset; - }, false), - PRECEDING: wgxpath.Step.createAxis_('preceding', - function(test, node, attrName, attrValue) { - var nodeset = new wgxpath.NodeSet(); - var parents = []; - var parent = node; - do { - parents.unshift(parent); - } while (parent = parent.parentNode); - for (var i = 1, l0 = parents.length; i < l0; i++) { - var siblings = []; - node = parents[i]; - while (node = node.previousSibling) { - siblings.unshift(node); - } - for (var j = 0, l1 = siblings.length; j < l1; j++) { - node = siblings[j]; - if (wgxpath.Node.attrMatches(node, attrName, attrValue)) { - if (test.matches(node)) nodeset.add(node); - } - nodeset = wgxpath.Node.getDescendantNodes(test, node, - attrName, attrValue, nodeset); - } - } - return nodeset; - }, true, true), - PRECEDING_SIBLING: wgxpath.Step.createAxis_('preceding-sibling', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - var toMatch = node; - while (toMatch = toMatch.previousSibling) { - if (test.matches(toMatch)) { - nodeset.unshift(toMatch); - } - } - return nodeset; - }, true), - SELF: wgxpath.Step.createAxis_('self', - function(test, node) { - var nodeset = new wgxpath.NodeSet(); - if (test.matches(node)) { - nodeset.add(node); - } - return nodeset; - }, false) -}; -// This file was autogenerated by calcdeps.py -goog.addDependency("../../../wicked-good-xpath/test_js_deps.js", [], []); -goog.addDependency("../../../wicked-good-xpath/functionCall.js", ['wgxpath.FunctionCall'], ['goog.array', 'goog.dom', 'goog.dom.NodeType', 'goog.string', 'wgxpath.Expr', 'wgxpath.Node', 'wgxpath.NodeSet', 'wgxpath.userAgent']); -goog.addDependency("../../../wicked-good-xpath/unaryExpr.js", ['wgxpath.UnaryExpr'], ['wgxpath.DataType', 'wgxpath.Expr']); -goog.addDependency("../../../wicked-good-xpath/nodeset.js", ['wgxpath.NodeSet'], ['goog.dom', 'wgxpath.Node']); -goog.addDependency("../../../wicked-good-xpath/pathExpr.js", ['wgxpath.PathExpr'], ['goog.array', 'goog.dom.NodeType', 'wgxpath.DataType', 'wgxpath.Expr', 'wgxpath.NodeSet']); -goog.addDependency("../../../wicked-good-xpath/literal.js", ['wgxpath.Literal'], ['wgxpath.Expr']); -goog.addDependency("../../../wicked-good-xpath/node.js", ['wgxpath.Node'], ['goog.array', 'goog.dom.NodeType', 'goog.userAgent', 'wgxpath.IEAttrWrapper', 'wgxpath.userAgent']); -goog.addDependency("../../../wicked-good-xpath/step.js", ['wgxpath.Step'], ['goog.dom.NodeType', 'wgxpath.DataType', 'wgxpath.Expr', 'wgxpath.KindTest', 'wgxpath.Node', 'wgxpath.Predicates', 'wgxpath.userAgent']); -goog.addDependency("../../../wicked-good-xpath/parser.js", ['wgxpath.Parser'], ['wgxpath.BinaryExpr', 'wgxpath.FilterExpr', 'wgxpath.FunctionCall', 'wgxpath.KindTest', 'wgxpath.Literal', 'wgxpath.NameTest', 'wgxpath.Number', 'wgxpath.PathExpr', 'wgxpath.Predicates', 'wgxpath.Step', 'wgxpath.UnaryExpr', 'wgxpath.UnionExpr']); -goog.addDependency("../../../wicked-good-xpath/ieAttrWrapper.js", ['wgxpath.IEAttrWrapper'], ['goog.dom.NodeType', 'wgxpath.userAgent']); -goog.addDependency("../../../wicked-good-xpath/expr.js", ['wgxpath.Expr'], ['wgxpath.NodeSet']); -goog.addDependency("../../../wicked-good-xpath/number.js", ['wgxpath.Number'], ['wgxpath.Expr']); -goog.addDependency("../../../wicked-good-xpath/kindTest.js", ['wgxpath.KindTest'], ['goog.dom.NodeType', 'wgxpath.NodeTest']); -goog.addDependency("../../../wicked-good-xpath/lexer.js", ['wgxpath.Lexer'], []); -goog.addDependency("../../../wicked-good-xpath/wgxpath.js", ['wgxpath'], ['wgxpath.Context', 'wgxpath.IEAttrWrapper', 'wgxpath.Lexer', 'wgxpath.NodeSet', 'wgxpath.Parser']); -goog.addDependency("../../../wicked-good-xpath/nameTest.js", ['wgxpath.NameTest'], ['goog.dom.NodeType']); -goog.addDependency("../../../wicked-good-xpath/unionExpr.js", ['wgxpath.UnionExpr'], ['goog.array', 'wgxpath.DataType', 'wgxpath.Expr']); -goog.addDependency("../../../wicked-good-xpath/userAgent.js", ['wgxpath.userAgent'], ['goog.userAgent']); -goog.addDependency("../../../wicked-good-xpath/binaryExpr.js", ['wgxpath.BinaryExpr'], ['wgxpath.DataType', 'wgxpath.Expr', 'wgxpath.Node']); -goog.addDependency("../../../wicked-good-xpath/export.js", [], ['wgxpath']); -goog.addDependency("../../../wicked-good-xpath/dataType.js", ['wgxpath.DataType'], []); -goog.addDependency("../../../wicked-good-xpath/filterExpr.js", ['wgxpath.FilterExpr'], ['wgxpath.Expr']); -goog.addDependency("../../../wicked-good-xpath/nodeTest.js", ['wgxpath.NodeTest'], []); -goog.addDependency("../../../wicked-good-xpath/context.js", ['wgxpath.Context'], []); -goog.addDependency("../../../wicked-good-xpath/predicates.js", ['wgxpath.Predicates'], ['goog.array', 'wgxpath.Context', 'wgxpath.Expr']); -goog.addDependency("../../../wicked-good-xpath/test/test_js_deps.js", [], []); -goog.addDependency("../../../wicked-good-xpath/test/test.js", ['wgxpath.test'], ['goog.dom', 'goog.dom.NodeType', 'goog.userAgent']); -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class representing operations on unary expressions. - */ - -goog.provide('wgxpath.UnaryExpr'); - -goog.require('wgxpath.DataType'); -goog.require('wgxpath.Expr'); - - - -/** - * Constructor for UnaryExpr. - * - * @param {!wgxpath.Expr} expr The unary expression. - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.UnaryExpr = function(expr) { - wgxpath.Expr.call(this, wgxpath.DataType.NUMBER); - - /** - * @private - * @type {!wgxpath.Expr} - */ - this.expr_ = expr; - - this.setNeedContextPosition(expr.doesNeedContextPosition()); - this.setNeedContextNode(expr.doesNeedContextNode()); -}; -goog.inherits(wgxpath.UnaryExpr, wgxpath.Expr); - - -/** - * @override - * @return {number} The number result. - */ -wgxpath.UnaryExpr.prototype.evaluate = function(ctx) { - return -this.expr_.asNumber(ctx); -}; - - -/** - * @override - */ -wgxpath.UnaryExpr.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'UnaryExpr: -' + '\n'; - indent += wgxpath.Expr.INDENT; - text += this.expr_.toString(indent); - return text; -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview A class representing operations on union expressions. - */ - -goog.provide('wgxpath.UnionExpr'); - -goog.require('goog.array'); -goog.require('wgxpath.DataType'); -goog.require('wgxpath.Expr'); - - - -/** - * Constructor for UnionExpr. - * - * @param {!Array.<!wgxpath.Expr>} paths The paths in the union. - * @extends {wgxpath.Expr} - * @constructor - */ -wgxpath.UnionExpr = function(paths) { - wgxpath.Expr.call(this, wgxpath.DataType.NODESET); - - /** - * @type {!Array.<!wgxpath.Expr>} - * @private - */ - this.paths_ = paths; - this.setNeedContextPosition(goog.array.some(this.paths_, function(p) { - return p.doesNeedContextPosition(); - })); - this.setNeedContextNode(goog.array.some(this.paths_, function(p) { - return p.doesNeedContextNode(); - })); -}; -goog.inherits(wgxpath.UnionExpr, wgxpath.Expr); - - -/** - * @override - * @return {!wgxpath.NodeSet} The nodeset result. - */ -wgxpath.UnionExpr.prototype.evaluate = function(ctx) { - var nodeset = new wgxpath.NodeSet(); - goog.array.forEach(this.paths_, function(p) { - var result = p.evaluate(ctx); - if (!(result instanceof wgxpath.NodeSet)) { - throw Error('PathExpr must evaluate to NodeSet.'); - } - nodeset = wgxpath.NodeSet.merge(nodeset, result); - }); - return nodeset; -}; - - -/** - * @override - */ -wgxpath.UnionExpr.prototype.toString = function(opt_indent) { - var indent = opt_indent || ''; - var text = indent + 'UnionExpr:' + '\n'; - indent += wgxpath.Expr.INDENT; - goog.array.forEach(this.paths_, function(p) { - text += p.toString(indent) + '\n'; - }); - return text.substring(0, text.length); // Remove trailing newline. -}; -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * @fileoverview Constants for user agent detection. - */ - -goog.provide('wgxpath.userAgent'); - -goog.require('goog.userAgent'); - - -/** - * @type {boolean} - * @const - */ -wgxpath.userAgent.IE_DOC_PRE_9 = goog.userAgent.IE && - !goog.userAgent.isDocumentMode(9); - - -/** - * @type {boolean} - * @const - */ -wgxpath.userAgent.IE_DOC_PRE_8 = goog.userAgent.IE && - !goog.userAgent.isDocumentMode(8); -/* JavaScript-XPath 0.1.11 - * (c) 2007 Cybozu Labs, Inc. - * - * JavaScript-XPath is freely distributable under the terms of an MIT-style - * license. For details, see the JavaScript-XPath web site: - * http://coderepos.org/share/wiki/JavaScript-XPath - * -/*--------------------------------------------------------------------------*/ - -// Copyright 2012 Google Inc. All Rights Reserved. - -/** - * Wicked Good XPath - * - * @fileoverview A cross-browser XPath library forked from the - * JavaScript-XPath project by Cybozu Labs. - * - */ - -goog.provide('wgxpath'); - -goog.require('wgxpath.Context'); -goog.require('wgxpath.IEAttrWrapper'); -goog.require('wgxpath.Lexer'); -goog.require('wgxpath.NodeSet'); -goog.require('wgxpath.Parser'); - - -/** - * Enum for XPathResult types. - * - * @private - * @enum {number} - */ -wgxpath.XPathResultType_ = { - ANY_TYPE: 0, - NUMBER_TYPE: 1, - STRING_TYPE: 2, - BOOLEAN_TYPE: 3, - UNORDERED_NODE_ITERATOR_TYPE: 4, - ORDERED_NODE_ITERATOR_TYPE: 5, - UNORDERED_NODE_SNAPSHOT_TYPE: 6, - ORDERED_NODE_SNAPSHOT_TYPE: 7, - ANY_UNORDERED_NODE_TYPE: 8, - FIRST_ORDERED_NODE_TYPE: 9 -}; - - - -/** - * The exported XPathExpression type. - * - * @constructor - * @extends {XPathExpression} - * @param {string} expr The expression string. - * @private - */ -wgxpath.XPathExpression_ = function(expr) { - if (!expr.length) { - throw Error('Empty XPath expression.'); - } - - var lexer = wgxpath.Lexer.tokenize(expr); - - if (lexer.empty()) { - throw Error('Invalid XPath expression.'); - } - var gexpr = new wgxpath.Parser(lexer).parseExpr(); - if (!lexer.empty()) { - throw Error('Bad token: ' + lexer.next()); - } - this['evaluate'] = function(node, type) { - var value = gexpr.evaluate(new wgxpath.Context(node)); - return new wgxpath.XPathResult_(value, type); - }; -}; - - - -/** - * The exported XPathResult type. - * - * @constructor - * @extends {XPathResult} - * @param {(!wgxpath.NodeSet|number|string|boolean)} value The result value. - * @param {number} type The result type. - * @private - */ -wgxpath.XPathResult_ = function(value, type) { - if (type == wgxpath.XPathResultType_.ANY_TYPE) { - if (value instanceof wgxpath.NodeSet) { - type = wgxpath.XPathResultType_.UNORDERED_NODE_ITERATOR_TYPE; - } else if (typeof value == 'string') { - type = wgxpath.XPathResultType_.STRING_TYPE; - } else if (typeof value == 'number') { - type = wgxpath.XPathResultType_.NUMBER_TYPE; - } else if (typeof value == 'boolean') { - type = wgxpath.XPathResultType_.BOOLEAN_TYPE; - } else { - throw Error('Unexpected evaluation result.'); - } - } - if (type != wgxpath.XPathResultType_.STRING_TYPE && - type != wgxpath.XPathResultType_.NUMBER_TYPE && - type != wgxpath.XPathResultType_.BOOLEAN_TYPE && - !(value instanceof wgxpath.NodeSet)) { - throw Error('document.evaluate called with wrong result type.'); - } - this['resultType'] = type; - var nodes; - switch (type) { - case wgxpath.XPathResultType_.STRING_TYPE: - this['stringValue'] = (value instanceof wgxpath.NodeSet) ? - value.string() : '' + value; - break; - case wgxpath.XPathResultType_.NUMBER_TYPE: - this['numberValue'] = (value instanceof wgxpath.NodeSet) ? - value.number() : +value; - break; - case wgxpath.XPathResultType_.BOOLEAN_TYPE: - this['booleanValue'] = (value instanceof wgxpath.NodeSet) ? - value.getLength() > 0 : !!value; - break; - case wgxpath.XPathResultType_.UNORDERED_NODE_ITERATOR_TYPE: - case wgxpath.XPathResultType_.ORDERED_NODE_ITERATOR_TYPE: - case wgxpath.XPathResultType_.UNORDERED_NODE_SNAPSHOT_TYPE: - case wgxpath.XPathResultType_.ORDERED_NODE_SNAPSHOT_TYPE: - var iter = value.iterator(); - nodes = []; - for (var node = iter.next(); node; node = iter.next()) { - nodes.push(node instanceof wgxpath.IEAttrWrapper ? - node.getNode() : node); - } - this['snapshotLength'] = value.getLength(); - this['invalidIteratorState'] = false; - break; - case wgxpath.XPathResultType_.ANY_UNORDERED_NODE_TYPE: - case wgxpath.XPathResultType_.FIRST_ORDERED_NODE_TYPE: - var firstNode = value.getFirst(); - this['singleNodeValue'] = - firstNode instanceof wgxpath.IEAttrWrapper ? - firstNode.getNode() : firstNode; - break; - default: - throw Error('Unknown XPathResult type.'); - } - var index = 0; - this['iterateNext'] = function() { - if (type != wgxpath.XPathResultType_.UNORDERED_NODE_ITERATOR_TYPE && - type != wgxpath.XPathResultType_.ORDERED_NODE_ITERATOR_TYPE) { - throw Error('iterateNext called with wrong result type.'); - } - return (index >= nodes.length) ? null : nodes[index++]; - }; - this['snapshotItem'] = function(i) { - if (type != wgxpath.XPathResultType_.UNORDERED_NODE_SNAPSHOT_TYPE && - type != wgxpath.XPathResultType_.ORDERED_NODE_SNAPSHOT_TYPE) { - throw Error('snapshotItem called with wrong result type.'); - } - return (i >= nodes.length || i < 0) ? null : nodes[i]; - }; -}; -wgxpath.XPathResult_['ANY_TYPE'] = wgxpath.XPathResultType_.ANY_TYPE; -wgxpath.XPathResult_['NUMBER_TYPE'] = wgxpath.XPathResultType_.NUMBER_TYPE; -wgxpath.XPathResult_['STRING_TYPE'] = wgxpath.XPathResultType_.STRING_TYPE; -wgxpath.XPathResult_['BOOLEAN_TYPE'] = wgxpath.XPathResultType_.BOOLEAN_TYPE; -wgxpath.XPathResult_['UNORDERED_NODE_ITERATOR_TYPE'] = - wgxpath.XPathResultType_.UNORDERED_NODE_ITERATOR_TYPE; -wgxpath.XPathResult_['ORDERED_NODE_ITERATOR_TYPE'] = - wgxpath.XPathResultType_.ORDERED_NODE_ITERATOR_TYPE; -wgxpath.XPathResult_['UNORDERED_NODE_SNAPSHOT_TYPE'] = - wgxpath.XPathResultType_.UNORDERED_NODE_SNAPSHOT_TYPE; -wgxpath.XPathResult_['ORDERED_NODE_SNAPSHOT_TYPE'] = - wgxpath.XPathResultType_.ORDERED_NODE_SNAPSHOT_TYPE; -wgxpath.XPathResult_['ANY_UNORDERED_NODE_TYPE'] = - wgxpath.XPathResultType_.ANY_UNORDERED_NODE_TYPE; -wgxpath.XPathResult_['FIRST_ORDERED_NODE_TYPE'] = - wgxpath.XPathResultType_.FIRST_ORDERED_NODE_TYPE; - - -/** - * Installs the library. This is a noop if native XPath is available. - * - * @param {Window=} opt_win The window to install the library on. - */ -wgxpath.install = function(opt_win) { - var win = opt_win || goog.global; - var doc = win.document; - - // Installation is a noop if native XPath is available. - if (!doc['evaluate']) { - win['XPathResult'] = wgxpath.XPathResult_; - doc['evaluate'] = function(expr, context, nsresolver, type, result) { - return new wgxpath.XPathExpression_(expr).evaluate(context, type); - }; - doc['createExpression'] = function(expr) { - return new wgxpath.XPathExpression_(expr); - }; - } -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atoms for simulating user actions against the DOM. - * The bot.action namespace is required since these atoms would otherwise form a - * circular dependency between bot.dom and bot.events. - * - */ - -goog.provide('bot.action'); - -goog.require('bot'); -goog.require('bot.Device'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.Keyboard'); -goog.require('bot.Mouse'); -goog.require('bot.Touchscreen'); -goog.require('bot.dom'); -goog.require('bot.events'); -goog.require('bot.events.EventType'); -goog.require('bot.userAgent'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.math.Coordinate'); -goog.require('goog.math.Rect'); -goog.require('goog.math.Vec2'); -goog.require('goog.style'); -goog.require('goog.userAgent'); - - -/** - * Throws an exception if an element is not shown to the user, ignoring its - * opacity. - - * - * @param {!Element} element The element to check. - * @see bot.dom.isShown. - * @private - */ -bot.action.checkShown_ = function(element) { - if (!bot.dom.isShown(element, /*ignoreOpacity=*/true)) { - throw new bot.Error(bot.ErrorCode.ELEMENT_NOT_VISIBLE, - 'Element is not currently visible and may not be manipulated'); - } -}; - - -/** - * Throws an exception if the given element cannot be interacted with. - * - * @param {!Element} element The element to check. - * @throws {bot.Error} If the element cannot be interacted with. - * @see bot.dom.isInteractable. - * @private - */ -bot.action.checkInteractable_ = function(element) { - if (!bot.dom.isInteractable(element)) { - throw new bot.Error(bot.ErrorCode.INVALID_ELEMENT_STATE, - 'Element is not currently interactable and may not be manipulated'); - - } -}; - - -/** - * Clears the given {@code element} if it is a editable text field. - * - * @param {!Element} element The element to clear. - * @throws {bot.Error} If the element is not an editable text field. - */ -bot.action.clear = function(element) { - bot.action.checkInteractable_(element); - if (!bot.dom.isEditable(element)) { - throw new bot.Error(bot.ErrorCode.INVALID_ELEMENT_STATE, - 'Element must be user-editable in order to clear it.'); - } - - bot.action.LegacyDevice_.focusOnElement(element); - if (element.value) { - element.value = ''; - bot.events.fire(element, bot.events.EventType.CHANGE); - } - - if (bot.dom.isContentEditable(element)) { - // A single space is required, if you put empty string here you'll not be - // able to interact with this element anymore in Firefox. - element.innerHTML = ' '; - // contentEditable does not generate onchange event. - } -}; - - -/** - * Focuses on the given element if it is not already the active element. - * - * @param {!Element} element The element to focus on. - */ -bot.action.focusOnElement = function(element) { - bot.action.checkInteractable_(element); - bot.action.LegacyDevice_.focusOnElement(element); -}; - - -/** - * Types keys on the given {@code element} with a virtual keyboard. - * - * <p>Callers can pass in a string, a key in bot.Keyboard.Key, or an array - * of strings or keys. If a modifier key is provided, it is pressed but not - * released, until it is either is listed again or the function ends. - * - * <p>Example: - * bot.keys.type(element, ['ab', bot.Keyboard.Key.LEFT, - * bot.Keyboard.Key.SHIFT, 'cd']); - * - * @param {!Element} element The element receiving the event. - * @param {(string|!bot.Keyboard.Key| - * !Array.<(string|!bot.Keyboard.Key)>)} values Value or values to - * type on the element. - * @param {bot.Keyboard=} opt_keyboard Keyboard to use; if not provided, - * constructs one. - * @param {boolean=} opt_persistModifiers Whether modifier keys should remain - * pressed when this function ends. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.type = function( - element, values, opt_keyboard, opt_persistModifiers) { - bot.action.checkShown_(element); - bot.action.checkInteractable_(element); - var keyboard = opt_keyboard || new bot.Keyboard(); - keyboard.moveCursor(element); - - function typeValue(value) { - if (goog.isString(value)) { - goog.array.forEach(value.split(''), function(ch) { - var keyShiftPair = bot.Keyboard.Key.fromChar(ch); - var shiftIsPressed = keyboard.isPressed(bot.Keyboard.Keys.SHIFT); - if (keyShiftPair.shift && !shiftIsPressed) { - keyboard.pressKey(bot.Keyboard.Keys.SHIFT); - } - keyboard.pressKey(keyShiftPair.key); - keyboard.releaseKey(keyShiftPair.key); - if (keyShiftPair.shift && !shiftIsPressed) { - keyboard.releaseKey(bot.Keyboard.Keys.SHIFT); - } - }); - } else if (goog.array.contains(bot.Keyboard.MODIFIERS, value)) { - if (keyboard.isPressed(value)) { - keyboard.releaseKey(value); - } else { - keyboard.pressKey(value); - } - } else { - keyboard.pressKey(value); - keyboard.releaseKey(value); - } - } - - // mobile safari (iPhone / iPad). one cannot 'type' in a date field - // chrome implements this, but desktop Safari doesn't, what's webkit again? - if ((!(goog.userAgent.product.SAFARI && !goog.userAgent.MOBILE)) && - goog.userAgent.WEBKIT && element.type == 'date') { - var val = goog.isArray(values)? values = values.join("") : values; - var datePattern = /\d{4}-\d{2}-\d{2}/; - if (val.match(datePattern)) { - // The following events get fired on iOS first - if (goog.userAgent.MOBILE && goog.userAgent.product.SAFARI) { - bot.events.fire(element, bot.events.EventType.TOUCHSTART); - bot.events.fire(element, bot.events.EventType.TOUCHEND); - } - bot.events.fire(element, bot.events.EventType.FOCUS); - element.value = val.match(datePattern)[0]; - bot.events.fire(element, bot.events.EventType.CHANGE); - bot.events.fire(element, bot.events.EventType.BLUR); - return; - } - } - - if (goog.isArray(values)) { - goog.array.forEach(values, typeValue); - } else { - typeValue(values); - } - - if (!opt_persistModifiers) { - // Release all the modifier keys. - goog.array.forEach(bot.Keyboard.MODIFIERS, function(key) { - if (keyboard.isPressed(key)) { - keyboard.releaseKey(key); - } - }); - } -}; - - -/** - * Submits the form containing the given {@code element}. - * - * <p>Note this function submits the form, but does not simulate user input - * (a click or key press). - * - * @param {!Element} element The element to submit. - * @deprecated Click on a submit button or type ENTER in a text box instead. - */ -bot.action.submit = function(element) { - var form = bot.action.LegacyDevice_.findAncestorForm(element); - if (!form) { - throw new bot.Error(bot.ErrorCode.NO_SUCH_ELEMENT, - 'Element was not in a form, so could not submit.'); - } - bot.action.LegacyDevice_.submitForm(element, form); -}; - - -/** - * Moves the mouse over the given {@code element} with a virtual mouse. - * - * @param {!Element} element The element to click. - * @param {goog.math.Coordinate=} opt_coords Mouse position relative to the - * element. - * @param {bot.Mouse=} opt_mouse Mouse to use; if not provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.moveMouse = function(element, opt_coords, opt_mouse) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var mouse = opt_mouse || new bot.Mouse(); - mouse.move(element, coords); -}; - - -/** - * Clicks on the given {@code element} with a virtual mouse. - * - * @param {!Element} element The element to click. - * @param {goog.math.Coordinate=} opt_coords Mouse position relative to the - * element. - * @param {bot.Mouse=} opt_mouse Mouse to use; if not provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.click = function(element, opt_coords, opt_mouse) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var mouse = opt_mouse || new bot.Mouse(); - mouse.move(element, coords); - mouse.pressButton(bot.Mouse.Button.LEFT); - mouse.releaseButton(); -}; - - -/** - * Right-clicks on the given {@code element} with a virtual mouse. - * - * @param {!Element} element The element to click. - * @param {goog.math.Coordinate=} opt_coords Mouse position relative to the - * element. - * @param {bot.Mouse=} opt_mouse Mouse to use; if not provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.rightClick = function(element, opt_coords, opt_mouse) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var mouse = opt_mouse || new bot.Mouse(); - mouse.move(element, coords); - mouse.pressButton(bot.Mouse.Button.RIGHT); - mouse.releaseButton(); -}; - - -/** - * Double-clicks on the given {@code element} with a virtual mouse. - * - * @param {!Element} element The element to click. - * @param {goog.math.Coordinate=} opt_coords Mouse position relative to the - * element. - * @param {bot.Mouse=} opt_mouse Mouse to use; if not provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.doubleClick = function(element, opt_coords, opt_mouse) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var mouse = opt_mouse || new bot.Mouse(); - mouse.move(element, coords); - mouse.pressButton(bot.Mouse.Button.LEFT); - mouse.releaseButton(); - mouse.pressButton(bot.Mouse.Button.LEFT); - mouse.releaseButton(); -}; - - -/** - * Scrolls the mouse wheel on the given {@code element} with a virtual mouse. - * - * @param {!Element} element The element to scroll the mouse wheel on. - * @param {number} ticks Number of ticks to scroll the mouse wheel; a positive - * number scrolls down and a negative scrolls up. - * @param {goog.math.Coordinate=} opt_coords Mouse position relative to the - * element. - * @param {bot.Mouse=} opt_mouse Mouse to use; if not provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.scrollMouse = function(element, ticks, opt_coords, opt_mouse) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var mouse = opt_mouse || new bot.Mouse(); - mouse.move(element, coords); - mouse.scroll(ticks); -}; - - -/** - * Drags the given {@code element} by (dx, dy) with a virtual mouse. - * - * @param {!Element} element The element to drag. - * @param {number} dx Increment in x coordinate. - * @param {number} dy Increment in y coordinate. - * @param {goog.math.Coordinate=} opt_coords Drag start position relative to the - * element. - * @param {bot.Mouse=} opt_mouse Mouse to use; if not provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.drag = function(element, dx, dy, opt_coords, opt_mouse) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var mouse = opt_mouse || new bot.Mouse(); - mouse.move(element, coords); - mouse.pressButton(bot.Mouse.Button.LEFT); - - // Fire two mousemoves (middle and destination) to trigger a drag action. - var initPos = goog.style.getClientPosition(element); - var midXY = new goog.math.Coordinate(coords.x + Math.floor(dx / 2), - coords.y + Math.floor(dy / 2)); - mouse.move(element, midXY); - - var midPos = goog.style.getClientPosition(element); - var finalXY = new goog.math.Coordinate(initPos.x + coords.x + dx - midPos.x, - initPos.y + coords.y + dy - midPos.y); - mouse.move(element, finalXY); - - mouse.releaseButton(); -}; - - -/** - * Taps on the given {@code element} with a virtual touch screen. - * - * @param {!Element} element The element to tap. - * @param {goog.math.Coordinate=} opt_coords Finger position relative to the - * target. - * @param {bot.Touchscreen=} opt_touchscreen Touchscreen to use; if not - * provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.tap = function(element, opt_coords, opt_touchscreen) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var touchscreen = opt_touchscreen || new bot.Touchscreen(); - touchscreen.move(element, coords); - touchscreen.press(); - touchscreen.release(); -}; - - -/** - * Swipes the given {@code element} by (dx, dy) with a virtual touch screen. - * - * @param {!Element} element The element to swipe. - * @param {number} dx Increment in x coordinate. - * @param {number} dy Increment in y coordinate. - * @param {goog.math.Coordinate=} opt_coords Swipe start position relative to - * the element. - * @param {bot.Touchscreen=} opt_touchscreen Touchscreen to use; if not - * provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.swipe = function(element, dx, dy, opt_coords, opt_touchscreen) { - var coords = bot.action.prepareToInteractWith_(element, opt_coords); - var touchscreen = opt_touchscreen || new bot.Touchscreen(); - touchscreen.move(element, coords); - touchscreen.press(); - - // Fire two touchmoves (middle and destination) to trigger a drag action. - var initPos = goog.style.getClientPosition(element); - var midXY = new goog.math.Coordinate(coords.x + Math.floor(dx / 2), - coords.y + Math.floor(dy / 2)); - touchscreen.move(element, midXY); - - var midPos = goog.style.getClientPosition(element); - var finalXY = new goog.math.Coordinate(initPos.x + coords.x + dx - midPos.x, - initPos.y + coords.y + dy - midPos.y); - touchscreen.move(element, finalXY); - - touchscreen.release(); -}; - - -/** - * Pinches the given {@code element} by the given distance with a virtual touch - * screen. A positive distance moves two fingers inward toward each and a - * negative distances spreds them outward. The optional coordinate is the point - * the fingers move towards (for positive distances) or away from (for negative - * distances); and if not provided, defaults to the center of the element. - * - * @param {!Element} element The element to pinch. - * @param {number} distance The distance by which to pinch the element. - * @param {goog.math.Coordinate=} opt_coords Position relative to the element - * at the center of the pinch. - * @param {bot.Touchscreen=} opt_touchscreen Touchscreen to use; if not - * provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.pinch = function(element, distance, opt_coords, opt_touchscreen) { - if (distance == 0) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot pinch by a distance of zero.'); - } - function startSoThatEndsAtMax(offsetVec) { - if (distance < 0) { - var magnitude = offsetVec.magnitude(); - offsetVec.scale(magnitude ? (magnitude + distance) / magnitude : 0); - } - } - var halfDistance = distance / 2; - function scaleByHalfDistance(offsetVec) { - var magnitude = offsetVec.magnitude(); - offsetVec.scale(magnitude ? (magnitude - halfDistance) / magnitude : 0); - } - bot.action.multiTouchAction_(element, - startSoThatEndsAtMax, - scaleByHalfDistance, - opt_coords, - opt_touchscreen); -}; - - -/** - * Rotates the given {@code element} by the given angle with a virtual touch - * screen. A positive angle moves two fingers clockwise and a negative angle - * moves them counter-clockwise. The optional coordinate is the point to - * rotate around; and if not provided, defaults to the center of the element. - * - * @param {!Element} element The element to rotate. - * @param {number} angle The angle by which to rotate the element. - * @param {goog.math.Coordinate=} opt_coords Position relative to the element - * at the center of the rotation. - * @param {bot.Touchscreen=} opt_touchscreen Touchscreen to use; if not - * provided, constructs one. - * @throws {bot.Error} If the element cannot be interacted with. - */ -bot.action.rotate = function(element, angle, opt_coords, opt_touchscreen) { - if (angle == 0) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot rotate by an angle of zero.'); - } - function startHalfwayToMax(offsetVec) { - offsetVec.scale(0.5); - } - var halfRadians = Math.PI * (angle / 180) / 2; - function rotateByHalfAngle(offsetVec) { - offsetVec.rotate(halfRadians); - } - bot.action.multiTouchAction_(element, - startHalfwayToMax, - rotateByHalfAngle, - opt_coords, - opt_touchscreen); -}; - - -/** - * Performs a multi-touch action with two fingers on the given element. This - * helper function works by manipulating an "offsetVector", which is the vector - * away from the center of the interaction at which the fingers are positioned. - * It computes the maximum offset vector and passes it to transformStart to - * find the starting position of the fingers; it then passes it to transformHalf - * twice to find the midpoint and final position of the fingers. - * - * @param {!Element} element Element to interact with. - * @param {function(goog.math.Vec2)} transformStart Function to transform the - * maximum offset vector to the starting offset vector. - * @param {function(goog.math.Vec2)} transformHalf Function to transform the - * offset vector halfway to its destination. - * @param {goog.math.Coordinate=} opt_coords Position relative to the element - * at the center of the pinch. - * @param {bot.Touchscreen=} opt_touchscreen Touchscreen to use; if not - * provided, constructs one. - * @private - */ -bot.action.multiTouchAction_ = function(element, transformStart, transformHalf, - opt_coords, opt_touchscreen) { - var center = bot.action.prepareToInteractWith_(element, opt_coords); - var size = bot.action.getInteractableSize(element); - var offsetVec = new goog.math.Vec2( - Math.min(center.x, size.width - center.x), - Math.min(center.y, size.height - center.y)); - - var touchScreen = opt_touchscreen || new bot.Touchscreen(); - transformStart(offsetVec); - var start1 = goog.math.Vec2.sum(center, offsetVec); - var start2 = goog.math.Vec2.difference(center, offsetVec); - touchScreen.move(element, start1, start2); - touchScreen.press(/*Two Finger Press*/ true); - - var initPos = goog.style.getClientPosition(element); - transformHalf(offsetVec); - var mid1 = goog.math.Vec2.sum(center, offsetVec); - var mid2 = goog.math.Vec2.difference(center, offsetVec); - touchScreen.move(element, mid1, mid2); - - var movedVec = goog.math.Vec2.difference( - goog.style.getClientPosition(element), initPos); - transformHalf(offsetVec); - var end1 = goog.math.Vec2.sum(center, offsetVec).subtract(movedVec); - var end2 = goog.math.Vec2.difference(center, offsetVec).subtract(movedVec); - touchScreen.move(element, end1, end2); - touchScreen.release(); -}; - - -/** - * Prepares to interact with the given {@code element}. It checks if the the - * element is shown, scrolls the element into view, and returns the coordinates - * of the interaction, which if not provided, is the center of the element. - * - * @param {!Element} element The element to be interacted with. - * @param {goog.math.Coordinate=} opt_coords Position relative to the target. - * @return {!goog.math.Vec2} Coordinates at the center of the interaction. - * @throws {bot.Error} If the element cannot be interacted with. - * @private - */ -bot.action.prepareToInteractWith_ = function(element, opt_coords) { - bot.action.checkShown_(element); - - // Unlike element.scrollIntoView(), this scrolls the minimal amount - // necessary, not scrolling at all if the element is already in view. - var doc = goog.dom.getOwnerDocument(element); - goog.style.scrollIntoContainerView(element, - goog.userAgent.WEBKIT ? doc.body : doc.documentElement); - - // NOTE(user): Ideally, we would check that any provided coordinates fall - // within the bounds of the element, but this has proven difficult, because: - // (1) Browsers sometimes lie about the true size of elements, e.g. when text - // overflows the bounding box of an element, browsers report the size of the - // box even though the true area that can be interacted with is larger; and - // (2) Elements with children styled as position:absolute will often not have - // a bounding box that surrounds all of their children, but it is useful for - // the user to be able to interact with this parent element as if it does. - if (opt_coords) { - return goog.math.Vec2.fromCoordinate(opt_coords); - } else { - var size = bot.action.getInteractableSize(element); - return new goog.math.Vec2(size.width / 2, size.height / 2); - } -}; - - -/** - * Returns the interactable size of an element. - * - * @param {!Element} elem Element. - * @return {!goog.math.Size} size Size of the element. - */ -bot.action.getInteractableSize = function(elem) { - var size = goog.style.getSize(elem); - return ((size.width > 0 && size.height > 0) || !elem.offsetParent) ? size : - bot.action.getInteractableSize(elem.offsetParent); -}; - - - -/** - * A Device that is intended to allows access to protected members of the - * Device superclass. A singleton. - * - * @constructor - * @extends {bot.Device} - * @private - */ -bot.action.LegacyDevice_ = function() { - goog.base(this); -}; -goog.inherits(bot.action.LegacyDevice_, bot.Device); -goog.addSingletonGetter(bot.action.LegacyDevice_); - - -/** - * Focuses on the given element. See {@link bot.device.focusOnElement}. - * @param {!Element} element The element to focus on. - * @return {boolean} True if element.focus() was called on the element. - */ -bot.action.LegacyDevice_.focusOnElement = function(element) { - var instance = bot.action.LegacyDevice_.getInstance(); - instance.setElement(element); - return instance.focusOnElement(); -}; - - -/** - * Submit the form for the element. See {@link bot.device.submit}. - * @param {!Element} element The element to submit a form on. - * @param {!Element} form The form to submit. - */ -bot.action.LegacyDevice_.submitForm = function(element, form) { - var instance = bot.action.LegacyDevice_.getInstance(); - instance.setElement(element); - instance.submitForm(form); -}; - - -/** - * Find FORM element that is an ancestor of the passed in element. See - * {@link bot.device.findAncestorForm}. - * @param {!Element} element The element to find an ancestor form. - * @return {Element} form The ancestor form, or null if none. - */ -bot.action.LegacyDevice_.findAncestorForm = function(element) { - return bot.Device.findAncestorForm(element); -}; - - -/** - * Scrolls the given {@code element} in to the current viewport. Aims to do the - * minimum scrolling necessary, but prefers too much scrolling to too little. - * - * @param {!Element} element The element to scroll in to view. - * @param {!goog.math.Coordinate=} opt_coords Offset relative to the top-left - * corner of the element, to ensure is scrolled in to view. - * @return {boolean} Whether the element is in view after scrolling. - */ -bot.action.scrollIntoView = function(element, opt_coords) { - if (!bot.dom.isScrolledIntoView(element, opt_coords) && !bot.dom.isInParentOverflow(element, opt_coords)) { - // Some elements may not have a scrollIntoView function - for example, - // elements under an SVG element. Call those only if they exist. - if (typeof element.scrollIntoView == 'function') { - element.scrollIntoView(); - } - // In Opera 10, scrollIntoView only scrolls the element into the viewport of - // its immediate parent window, so we explicitly scroll the ancestor frames - // into view of their respective windows. Note that scrolling the top frame - // first --- and so on down to the element itself --- does not work, because - // Opera 10 apparently treats element.scrollIntoView() as a noop when it - // immediately follows a scrollIntoView() call on its parent frame. - if (goog.userAgent.OPERA && !bot.userAgent.isEngineVersion(11)) { - var win = goog.dom.getWindow(goog.dom.getOwnerDocument(element)); - for (var frame = win.frameElement; frame; frame = win.frameElement) { - frame.scrollIntoView(); - win = goog.dom.getWindow(goog.dom.getOwnerDocument(frame)); - } - } - } - if (opt_coords) { - var rect = new goog.math.Rect(opt_coords.x, opt_coords.y, 1, 1); - bot.dom.scrollElementRegionIntoClientView(element, rect); - } - var isInView = bot.dom.isScrolledIntoView(element, opt_coords); - if (!isInView && opt_coords) { - // It's possible that the element has been scrolled in to view, but the - // coords passed aren't in view; if this is the case, scroll those - // coordinates into view. - var elementCoordsInViewport = goog.style.getClientPosition(element); - var desiredPointInViewport = - goog.math.Coordinate.sum(elementCoordsInViewport, opt_coords); - try { - bot.dom.getInViewLocation( - desiredPointInViewport, - goog.dom.getWindow(goog.dom.getOwnerDocument(element))); - isInView = true; - } catch (ex) { - // Point couldn't be scrolled into view. - isInView = false; - } - } - - return isInView; -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Overall configuration of the browser automation atoms. - */ - - -goog.provide('bot'); - - -/** - * Frameworks using the atoms keep track of which window or frame is currently - * being used for command execution. Note that "window" may not always be - * defined (for example in firefox extensions) - * - * @private {!Window} - */ -bot.window_; - -try { - bot.window_ = window; -} catch (ignored) { - // We only reach this place in a firefox extension. - bot.window_ = goog.global; -} - - -/** - * Returns the window currently being used for command execution. - * - * @return {!Window} The window for command execution. - */ -bot.getWindow = function() { - return bot.window_; -}; - - -/** - * Sets the window to be used for command execution. - * - * @param {!Window} win The window for command execution. - */ -bot.setWindow = function(win) { - bot.window_ = win; -}; - - -/** - * Returns the document of the window currently being used for - * command execution. - * - * @return {!Document} The current window's document. - */ -bot.getDocument = function() { - return bot.window_.document; -}; -// Copyright 2012 Software Freedom Conservancy -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Utilities related to color and color conversion. - * Some of this code is borrowed and modified from goog.color and - * goog.color.alpha. - */ - -goog.provide('bot.color'); - -goog.require('goog.array'); -goog.require('goog.color.names'); - - -/** - * Returns a property, with a standardized color if it contains a - * convertible color. - * @param {string} propertyName Name of the CSS property in selector-case. - * @param {string} propertyValue The value of the CSS property. - * @return {string} The value, in a standardized format - * if it is a color property. - */ -bot.color.standardizeColor = function(propertyName, propertyValue) { - if (bot.color.isColorProperty(propertyName) && - bot.color.isConvertibleColor(propertyValue)) { - return bot.color.standardizeToRgba_(propertyValue); - } - return propertyValue; -}; - - -/** - * Returns a color in RGBA format - rgba(r, g, b, a). - * @param {string} propertyValue The value of the CSS property. - * @return {string} The value, in RGBA format. - * @private - */ -bot.color.standardizeToRgba_ = function(propertyValue) { - var rgba = bot.color.parseRgbaColor(propertyValue); - if (!rgba.length) { - rgba = bot.color.convertToRgba_(propertyValue); - bot.color.addAlphaIfNecessary_(rgba); - } - if (rgba.length != 4) { - return propertyValue; - } - return bot.color.toRgbaStyle_(rgba); -}; - - -/** - * Coverts a color to RGBA. - * @param {string} propertyValue The value of the CSS property. - * @return {!Array.<number>} array containing [r, g, b, a] - * with r, g, b as ints in [0, 255] and a as a float in [0, 1]. - * @private - */ -bot.color.convertToRgba_ = function(propertyValue) { - var rgba = bot.color.parseRgbColor_(propertyValue); - if (rgba.length) { - return rgba; - } - var hex = goog.color.names[propertyValue.toLowerCase()]; - hex = (!hex) ? bot.color.prependHashIfNecessary_(propertyValue) : hex; - if (bot.color.isValidHexColor_(hex)) { - rgba = bot.color.hexToRgb(bot.color.normalizeHex(hex)); - if (rgba.length) { - return rgba; - } - } - return []; -}; - - -/** - * Determines if the given string is a color that can be converted to RGBA. - * Browsers can return colors in the following formats: - * RGB, RGBA, Hex, NamedColor - * So only those are supported by this module and therefore considered - * convertible. - * - * @param {string} str Potential color string. - * @return {boolean} True if str is in a format that can be converted to RGBA. - */ -bot.color.isConvertibleColor = function(str) { - return !!(bot.color.isValidHexColor_( - bot.color.prependHashIfNecessary_(str)) || - bot.color.parseRgbColor_(str).length || - goog.color.names && goog.color.names[str.toLowerCase()] || - bot.color.parseRgbaColor(str).length - ); -}; - - -/** - * Used to determine whether a css property contains a color and - * should therefore be standardized to rgba. - * These are extracted from the W3C CSS spec: - * - * http://www.w3.org/TR/CSS/#properties - * - * Used by bot.color.isColorProperty() - * @const - * @private {!Array.<string>} - */ -bot.color.COLOR_PROPERTIES_ = [ - 'background-color', - 'border-top-color', - 'border-right-color', - 'border-bottom-color', - 'border-left-color', - 'color', - 'outline-color' -]; - - -/** - * Determines if the given property can contain a color. - * @param {string} str CSS property name. - * @return {boolean} True if str is a property that can contain a color. - */ -bot.color.isColorProperty = function(str) { - return goog.array.contains(bot.color.COLOR_PROPERTIES_, str); -}; - - -/** - * Regular expression for extracting the digits in a hex color triplet. - * @private {!RegExp} - * @const - */ -bot.color.HEX_TRIPLET_RE_ = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/; - - -/** - * Normalize an hex representation of a color - * @param {string} hexColor an hex color string. - * @return {string} hex color in the format '#rrggbb' with all lowercase - * literals. - */ -bot.color.normalizeHex = function(hexColor) { - if (!bot.color.isValidHexColor_(hexColor)) { - throw Error("'" + hexColor + "' is not a valid hex color"); - } - if (hexColor.length == 4) { // of the form #RGB - hexColor = hexColor.replace(bot.color.HEX_TRIPLET_RE_, '#$1$1$2$2$3$3'); - } - return hexColor.toLowerCase(); -}; - - -/** - * Converts a hex representation of a color to RGB. - * @param {string} hexColor Color to convert. - * @return {!Array} array containing [r, g, b] as ints in [0, 255]. - */ -bot.color.hexToRgb = function(hexColor) { - hexColor = bot.color.normalizeHex(hexColor); - var r = parseInt(hexColor.substr(1, 2), 16); - var g = parseInt(hexColor.substr(3, 2), 16); - var b = parseInt(hexColor.substr(5, 2), 16); - - return [r, g, b]; -}; - - -/** - * Helper for isValidHexColor_. - * @private {!RegExp} - * @const - */ -bot.color.VALID_HEX_COLOR_RE_ = /^#(?:[0-9a-f]{3}){1,2}$/i; - - -/** - * Checks if a string is a valid hex color. We expect strings of the format - * #RRGGBB (ex: #1b3d5f) or #RGB (ex: #3CA == #33CCAA). - * @param {string} str String to check. - * @return {boolean} Whether the string is a valid hex color. - * @private - */ -bot.color.isValidHexColor_ = function(str) { - return bot.color.VALID_HEX_COLOR_RE_.test(str); -}; - - -/** - * Helper for isNormalizedHexColor_. - * @private {!RegExp} - * @const - */ -bot.color.NORMALIZED_HEX_COLOR_RE_ = /^#[0-9a-f]{6}$/; - - -/** - * Checks if a string is a normalized hex color. - * We expect strings of the format #RRGGBB (ex: #1b3d5f) - * using only lowercase letters. - * @param {string} str String to check. - * @return {boolean} Whether the string is a normalized hex color. - * @private - */ -bot.color.isNormalizedHexColor_ = function(str) { - return bot.color.NORMALIZED_HEX_COLOR_RE_.test(str); -}; - - -/** - * Regular expression for matching and capturing RGBA style strings. - * Helper for parseRgbaColor. - * @private {!RegExp} - * @const - */ -bot.color.RGBA_COLOR_RE_ = - /^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; - - -/** - * Attempts to parse a string as an rgba color. We expect strings of the - * format '(r, g, b, a)', or 'rgba(r, g, b, a)', where r, g, b are ints in - * [0, 255] and a is a float in [0, 1]. - * @param {string} str String to check. - * @return {!Array.<number>} the integers [r, g, b, a] for valid colors or the - * empty array for invalid colors. - */ -bot.color.parseRgbaColor = function(str) { - // Each component is separate (rather than using a repeater) so we can - // capture the match. Also, we explicitly set each component to be either 0, - // or start with a non-zero, to prevent octal numbers from slipping through. - var regExpResultArray = str.match(bot.color.RGBA_COLOR_RE_); - if (regExpResultArray) { - var r = Number(regExpResultArray[1]); - var g = Number(regExpResultArray[2]); - var b = Number(regExpResultArray[3]); - var a = Number(regExpResultArray[4]); - if (r >= 0 && r <= 255 && - g >= 0 && g <= 255 && - b >= 0 && b <= 255 && - a >= 0 && a <= 1) { - return [r, g, b, a]; - } - } - return []; -}; - - -/** - * Regular expression for matching and capturing RGB style strings. Helper for - * parseRgbColor_. - * @private {!RegExp} - * @const - */ -bot.color.RGB_COLOR_RE_ = - /^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i; - - -/** - * Attempts to parse a string as an rgb color. We expect strings of the format - * '(r, g, b)', or 'rgb(r, g, b)', where each color component is an int in - * [0, 255]. - * @param {string} str String to check. - * @return {!Array.<number>} the integers [r, g, b] for valid colors or the - * empty array for invalid colors. - * @private - */ -bot.color.parseRgbColor_ = function(str) { - // Each component is separate (rather than using a repeater) so we can - // capture the match. Also, we explicitly set each component to be either 0, - // or start with a non-zero, to prevent octal numbers from slipping through. - var regExpResultArray = str.match(bot.color.RGB_COLOR_RE_); - if (regExpResultArray) { - var r = Number(regExpResultArray[1]); - var g = Number(regExpResultArray[2]); - var b = Number(regExpResultArray[3]); - if (r >= 0 && r <= 255 && - g >= 0 && g <= 255 && - b >= 0 && b <= 255) { - return [r, g, b]; - } - } - return []; -}; - - -/** - * Takes a string a prepends a '#' sign if one doesn't exist. - * Small helper method for use by bot.color and friends. - * @param {string} str String to check. - * @return {string} The value passed in, prepended with a '#' if it didn't - * already have one. - * @private - */ -bot.color.prependHashIfNecessary_ = function(str) { - return str.charAt(0) == '#' ? str : '#' + str; -}; - - -/** - * Takes an array and appends a 1 to it if the array only contains 3 elements. - * @param {!Array.<number>} arr The array to check. - * @return {!Array.<number>} The same array with a 1 appended - * if it only contained 3 elements. - * @private - */ -bot.color.addAlphaIfNecessary_ = function(arr) { - if (arr.length == 3) { - arr.push(1); - } - return arr; -}; - - -/** - * Takes an array of [r, g, b, a] and converts it into a string appropriate for - * CSS styles. - * @param {!Array.<number>} rgba An array with four elements. - * @return {string} string of the form 'rgba(r, g, b, a)'. - * @private - */ -bot.color.toRgbaStyle_ = function(rgba) { - return 'rgba(' + rgba.join(', ') + ')'; -}; - -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview The file contains the base class for input devices such as - * the keyboard, mouse, and touchscreen. - */ - -goog.provide('bot.Device'); - -goog.require('bot'); -goog.require('bot.dom'); -goog.require('bot.locators'); -goog.require('bot.userAgent'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.dom.TagName'); -goog.require('goog.userAgent'); -goog.require('goog.userAgent.product'); - - - -/** - * A Device class that provides common functionality for input devices. - * @param {bot.Device.ModifiersState=} opt_modifiersState state of modifier - * keys. The state is shared, not copied from this parameter. - * - * @constructor - */ -bot.Device = function(opt_modifiersState) { - /** - * Element being interacted with. - * @private {!Element} - */ - this.element_ = bot.getDocument().documentElement; - - /** - * If the element is an option, this is its parent select element. - * @private {Element} - */ - this.select_ = null; - - // If there is an active element, make that the current element instead. - var activeElement = bot.dom.getActiveElement(this.element_); - if (activeElement) { - this.setElement(activeElement); - } - - /** - * State of modifier keys for this device. - * @type {bot.Device.ModifiersState} - * @protected - */ - this.modifiersState = opt_modifiersState || new bot.Device.ModifiersState(); -}; - - -/** - * Returns the element with which the device is interacting. - * - * @return {!Element} Element being interacted with. - * @protected - */ -bot.Device.prototype.getElement = function() { - return this.element_; -}; - - -/** - * Sets the element with which the device is interacting. - * - * @param {!Element} element Element being interacted with. - * @protected - */ -bot.Device.prototype.setElement = function(element) { - this.element_ = element; - if (bot.dom.isElement(element, goog.dom.TagName.OPTION)) { - this.select_ = /** @type {Element} */ (goog.dom.getAncestor(element, - function(node) { - return bot.dom.isElement(node, goog.dom.TagName.SELECT); - })); - } else { - this.select_ = null; - } -}; - - -/** - * Fires an HTML event given the state of the device. - * - * @param {bot.events.EventType} type HTML Event type. - * @return {boolean} Whether the event fired successfully; false if cancelled. - * @protected - */ -bot.Device.prototype.fireHtmlEvent = function(type) { - return bot.events.fire(this.element_, type); -}; - - -/** - * Fires a keyboard event given the state of the device and the given arguments. - * TODO(user): Populate the modifier keys in this method. - * - * @param {bot.events.EventType} type Keyboard event type. - * @param {bot.events.KeyboardArgs} args Keyboard event arguments. - * @return {boolean} Whether the event fired successfully; false if cancelled. - * @protected - */ -bot.Device.prototype.fireKeyboardEvent = function(type, args) { - return bot.events.fire(this.element_, type, args); -}; - - -/** - * Fires a mouse event given the state of the device and the given arguments. - * TODO(user): Populate the modifier keys in this method. - * - * @param {bot.events.EventType} type Mouse event type. - * @param {!goog.math.Coordinate} coord The coordinate where event will fire. - * @param {number} button The mouse button value for the event. - * @param {Element=} opt_related The related element of this event. - * @param {?number=} opt_wheelDelta The wheel delta value for the event. - * @param {boolean=} opt_force Whether the event should be fired even if the - * element is not interactable, such as the case of a mousemove or - * mouseover event that immediately follows a mouseout. - * @return {boolean} Whether the event fired successfully; false if cancelled. - * @protected - */ -bot.Device.prototype.fireMouseEvent = function(type, coord, button, - opt_related, opt_wheelDelta, opt_force) { - if (!opt_force && !bot.dom.isInteractable(this.element_)) { - return false; - } - - if (opt_related && - !(bot.events.EventType.MOUSEOVER == type || - bot.events.EventType.MOUSEOUT == type)) { - throw new bot.Error(bot.ErrorCode.INVALID_ELEMENT_STATE, - 'Event type does not allow related target: ' + type); - } - - var args = { - clientX: coord.x, - clientY: coord.y, - button: button, - altKey: this.modifiersState.isAltPressed(), - ctrlKey: this.modifiersState.isControlPressed(), - shiftKey: this.modifiersState.isShiftPressed(), - metaKey: this.modifiersState.isMetaPressed(), - wheelDelta: opt_wheelDelta || 0, - relatedTarget: opt_related || null - }; - - var target = this.select_ ? - this.getTargetOfOptionMouseEvent_(type) : this.element_; - return target ? bot.events.fire(target, type, args) : true; -}; - - -/** - * Fires a touch event given the state of the deive and the given arguments. - * - * @param {bot.events.EventType} type Event type. - * @param {number} id The touch identifier. - * @param {!goog.math.Coordinate} coord The coordinate where event will fire. - * @param {number=} opt_id2 The touch identifier of the second finger. - * @param {!goog.math.Coordinate=} opt_coord2 The coordinate of the second - * finger, if any. - * @return {boolean} Whether the event fired successfully or was cancelled. - * @protected - */ -bot.Device.prototype.fireTouchEvent = function(type, id, coord, opt_id2, - opt_coord2) { - var args = { - touches: [], - targetTouches: [], - changedTouches: [], - altKey: this.modifiersState.isAltPressed(), - ctrlKey: this.modifiersState.isControlPressed(), - shiftKey: this.modifiersState.isShiftPressed(), - metaKey: this.modifiersState.isMetaPressed(), - relatedTarget: null, - scale: 0, - rotation: 0 - }; - - function addTouch(identifier, coords) { - // Android devices leave identifier to zero. - var id = goog.userAgent.product.ANDROID ? 0 : identifier; - var touch = { - identifier: identifier, - screenX: coords.x, - screenY: coords.y, - clientX: coords.x, - clientY: coords.y, - pageX: coords.x, - pageY: coords.y - }; - - args.changedTouches.push(touch); - if (type == bot.events.EventType.TOUCHSTART || - type == bot.events.EventType.TOUCHMOVE) { - args.touches.push(touch); - args.targetTouches.push(touch); - } - } - - addTouch(id, coord); - if (goog.isDef(opt_id2)) { - addTouch(opt_id2, opt_coord2); - } - - return bot.events.fire(this.element_, type, args); -}; - - -/** - * Fires a MSPointer event given the state of the device and the given - * arguments. - * - * @param {bot.events.EventType} type MSPointer event type. - * @param {!goog.math.Coordinate} coord The coordinate where event will fire. - * @param {number} button The mouse button value for the event. - * @param {number} pointerId The pointer id for this event. - * @param {number} device The device type used for this event. - * @param {boolean} isPrimary Whether the pointer represents the primary point - * of contact. - * @param {Element=} opt_related The related element of this event. - * @param {boolean=} opt_force Whether the event should be fired even if the - * element is not interactable, such as the case of a mousemove or - * mouseover event that immediately follows a mouseout. - * @return {boolean} Whether the event fired successfully; false if cancelled. - * @protected - */ -bot.Device.prototype.fireMSPointerEvent = function(type, coord, button, - pointerId, device, isPrimary, opt_related, opt_force) { - if (!opt_force && !bot.dom.isInteractable(this.element_)) { - return false; - } - - if (opt_related && - !(bot.events.EventType.MSPOINTEROVER == type || - bot.events.EventType.MSPOINTEROUT == type)) { - throw new bot.Error(bot.ErrorCode.INVALID_ELEMENT_STATE, - 'Event type does not allow related target: ' + type); - } - - var args = { - clientX: coord.x, - clientY: coord.y, - button: button, - altKey: false, - ctrlKey: false, - shiftKey: false, - metaKey: false, - relatedTarget: opt_related || null, - width: 0, - height: 0, - pressure: 0, // Pressure is only given when a stylus is used. - rotation: 0, - pointerId: pointerId, - tiltX: 0, - tiltY: 0, - pointerType: device, - isPrimary: isPrimary - }; - - var target = this.select_ ? - this.getTargetOfOptionMouseEvent_(type) : this.element_; - return target ? bot.events.fire(target, type, args) : true; -}; - - -/** - * A mouse event fired "on" an <option> element, doesn't always fire on the - * <option> element itself. Sometimes it fires on the parent <select> element - * and sometimes not at all, depending on the browser and event type. This - * returns the true target element of the event, or null if none is fired. - * - * @param {bot.events.EventType} type Type of event. - * @return {Element} Element the event should be fired on, null if none. - * @private - */ -bot.Device.prototype.getTargetOfOptionMouseEvent_ = function(type) { - // IE either fires the event on the parent select or not at all. - if (goog.userAgent.IE) { - switch (type) { - case bot.events.EventType.MOUSEOVER: - case bot.events.EventType.MSPOINTEROVER: - return null; - case bot.events.EventType.CONTEXTMENU: - case bot.events.EventType.MOUSEMOVE: - case bot.events.EventType.MSPOINTERMOVE: - return this.select_.multiple ? this.select_ : null; - default: - return this.select_; - } - } - - // Opera only skips mouseovers and contextmenus on single selects. - if (goog.userAgent.OPERA) { - switch (type) { - case bot.events.EventType.CONTEXTMENU: - case bot.events.EventType.MOUSEOVER: - return this.select_.multiple ? this.element_ : null; - default: - return this.element_; - } - } - - // WebKit always fires on the option element of multi-selects. - // On single-selects, it either fires on the parent or not at all. - if (goog.userAgent.WEBKIT) { - switch (type) { - case bot.events.EventType.CLICK: - case bot.events.EventType.MOUSEUP: - return this.select_.multiple ? this.element_ : this.select_; - default: - return this.select_.multiple ? this.element_ : null; - } - } - - // Firefox fires every event or the option element. - return this.element_; -}; - - -/** - * A helper function to fire click events. This method is shared between - * the mouse and touchscreen devices. - * - * @param {!goog.math.Coordinate} coord The coordinate where event will fire. - * @param {number} button The mouse button value for the event. - * @protected - */ -bot.Device.prototype.clickElement = function(coord, button) { - if (!bot.dom.isInteractable(this.element_)) { - return; - } - - // bot.events.fire(element, 'click') can trigger all onclick events, but may - // not follow links (FORM.action or A.href). - // TAG IE GECKO WebKit Opera - // A(href) No No Yes Yes - // FORM(action) No Yes Yes Yes - var targetLink = null; - var targetButton = null; - if (!bot.Device.ALWAYS_FOLLOWS_LINKS_ON_CLICK_) { - for (var e = this.element_; e; e = e.parentNode) { - if (bot.dom.isElement(e, goog.dom.TagName.A)) { - targetLink = /**@type {!Element}*/ (e); - break; - } else if (bot.Device.isFormSubmitElement(e)) { - targetButton = e; - break; - } - } - } - - var selectable = bot.dom.isSelectable(this.element_); - var wasSelected = selectable && bot.dom.isSelected(this.element_); - - // When an element is toggled as the result of a click, the toggling and the - // change event happens before the click event. However, on radio buttons and - // checkboxes, the click handler can prevent the toggle from happening, so - // for those we need to fire a click before toggling to see if the click was - // cancelled. For option elements, we toggle unconditionally before the click. - if (this.select_) { - this.toggleOption_(wasSelected); - } - - // NOTE(user): Clicking on a form submit button is a little broken: - // (1) When clicking a form submit button in IE, firing a click event or - // calling Form.submit() will not by itself submit the form, so we call - // Element.click() explicitly, but as a result, the coordinates of the click - // event are not provided. Also, when clicking on an <input type=image>, the - // coordinates click that are submitted with the form are always (0, 0). - // (2) When clicking a form submit button in GECKO, while the coordinates of - // the click event are correct, those submitted with the form are always (0,0) - // . - // TODO(user): See if either of these can be resolved, perhaps by adding - // hidden form elements with the coordinates before the form is submitted. - if (goog.userAgent.IE && targetButton) { - targetButton.click(); - return; - } - - var performDefault = this.fireMouseEvent( - bot.events.EventType.CLICK, coord, button); - if (!performDefault) { - return; - } - - if (targetLink && bot.Device.shouldFollowHref_(targetLink)) { - bot.Device.followHref_(targetLink); - } else if (selectable && !this.select_) { - this.toggleRadioButtonOrCheckbox_(wasSelected); - } -}; - - -/** - * Focuses on the given element and returns true if it supports being focused - * and does not already have focus; otherwise, returns false. If another element - * has focus, that element will be blurred before focusing on the given element. - * - * @return {boolean} Whether the element was given focus. - * @protected - */ -bot.Device.prototype.focusOnElement = function() { - // Focusing on an <option> always focuses on the parent <select>. - var elementToFocus = this.select_ || this.element_; - - var activeElement = bot.dom.getActiveElement(elementToFocus); - if (elementToFocus == activeElement) { - return false; - } - - // If there is a currently active element, try to blur it. - if (activeElement && (goog.isFunction(activeElement.blur) || - // IE reports native functions as being objects. - goog.userAgent.IE && goog.isObject(activeElement.blur))) { - // In IE, the focus() and blur() functions fire their respective events - // asynchronously, and as the result, the focus/blur events fired by the - // the atoms actions will often be in the wrong order on IE. Firing a blur - // out of order sometimes causes IE to throw an "Unspecified error", so we - // wrap it in a try-catch and catch and ignore the error in this case. - try { - if (activeElement.tagName.toLowerCase() !== 'body') { - activeElement.blur(); - } - } catch (e) { - if (!(goog.userAgent.IE && e.message == 'Unspecified error.')) { - throw e; - } - } - - // Sometimes IE6 and IE7 will not fire an onblur event after blur() - // is called, unless window.focus() is called immediately afterward. - // Note that IE8 will hit this branch unless the page is forced into - // IE8-strict mode. This shouldn't hurt anything, we just use the - // useragent sniff so we can compile this out for proper browsers. - if (goog.userAgent.IE && !bot.userAgent.isEngineVersion(8)) { - goog.dom.getWindow(goog.dom.getOwnerDocument(elementToFocus)).focus(); - } - } - - // Try to focus on the element. - if (goog.isFunction(elementToFocus.focus) || - goog.userAgent.IE && goog.isObject(elementToFocus.focus)) { - // Opera fires focus events on hidden elements (e.g. that are hidden after - // mousedown in a click sequence), but as of Opera 11 the focus() command - // does not, so we fire a focus event on the hidden element explicitly. - if (goog.userAgent.OPERA && bot.userAgent.isEngineVersion(11) && - !bot.dom.isShown(elementToFocus)) { - bot.events.fire(elementToFocus, bot.events.EventType.FOCUS); - } else { - elementToFocus.focus(); - } - return true; - } - - return false; -}; - - -/** - * Whether links must be manually followed when clicking (because firing click - * events doesn't follow them). - * - * @private {boolean} - * @const - */ -bot.Device.ALWAYS_FOLLOWS_LINKS_ON_CLICK_ = - goog.userAgent.WEBKIT || goog.userAgent.OPERA || - (bot.userAgent.FIREFOX_EXTENSION && bot.userAgent.isProductVersion(3.6)); - - -/** - * @param {Node} element The element to check. - * @return {boolean} Whether the element is a submit element in form. - * @protected - */ -bot.Device.isFormSubmitElement = function(element) { - if (bot.dom.isElement(element, goog.dom.TagName.INPUT)) { - var type = element.type.toLowerCase(); - if (type == 'submit' || type == 'image') { - return true; - } - } - - if (bot.dom.isElement(element, goog.dom.TagName.BUTTON)) { - var type = element.type.toLowerCase(); - if (type == 'submit') { - return true; - } - } - return false; -}; - - -/** - * Indicates whether we should manually follow the href of the element we're - * clicking. - * - * Versions of firefox from 4+ will handle links properly when this is used in - * an extension. Versions of Firefox prior to this may or may not do the right - * thing depending on whether a target window is opened and whether the click - * has caused a change in just the hash part of the URL. - * - * @param {!Element} element The element to consider. - * @return {boolean} Whether following an href should be skipped. - * @private - */ -bot.Device.shouldFollowHref_ = function(element) { - if (bot.Device.ALWAYS_FOLLOWS_LINKS_ON_CLICK_ || !element.href) { - return false; - } - - if (!bot.userAgent.FIREFOX_EXTENSION) { - return true; - } - - if (element.target || element.href.toLowerCase().indexOf('javascript') == 0) { - return false; - } - - var owner = goog.dom.getWindow(goog.dom.getOwnerDocument(element)); - var sourceUrl = owner.location.href; - var destinationUrl = bot.Device.resolveUrl_(owner.location, element.href); - var isOnlyHashChange = - sourceUrl.split('#')[0] === destinationUrl.split('#')[0]; - - return !isOnlyHashChange; -}; - - -/** - * Explicitly follows the href of an anchor. - * - * @param {!Element} anchorElement An anchor element. - * @private - */ -bot.Device.followHref_ = function(anchorElement) { - var targetHref = anchorElement.href; - var owner = goog.dom.getWindow(goog.dom.getOwnerDocument(anchorElement)); - - // IE7 and earlier incorrect resolve a relative href against the top window - // location instead of the window to which the href is assigned. As a result, - // we have to resolve the relative URL ourselves. We do not use Closure's - // goog.Uri to resolve, because it incorrectly fails to support empty but - // undefined query and fragment components and re-encodes the given url. - if (goog.userAgent.IE && !bot.userAgent.isEngineVersion(8)) { - targetHref = bot.Device.resolveUrl_(owner.location, targetHref); - } - - if (anchorElement.target) { - owner.open(targetHref, anchorElement.target); - } else { - owner.location.href = targetHref; - } -}; - - -/** - * Toggles the selected state of an option element. This is a noop if the option - * is selected and belongs to a single-select, because it can't be toggled off. - * - * @param {boolean} wasSelected Whether the element was originally selected. - * @private - */ -bot.Device.prototype.toggleOption_ = function(wasSelected) { - var select = /** @type {!Element} */ (this.select_); - // Cannot toggle off options in single-selects. - if (wasSelected && !select.multiple) { - return; - } - this.element_.selected = !wasSelected; - // Only WebKit fires the change event itself and only for multi-selects, - // except for Android versions >= 4.0. - if (!(goog.userAgent.WEBKIT && select.multiple) || - (goog.userAgent.product.ANDROID && bot.userAgent.isProductVersion(4))) { - bot.events.fire(select, bot.events.EventType.CHANGE); - } -}; - - -/** - * Toggles the selected state of a radio button or checkbox. This is a noop if - * it is a radio button that is selected, because it can't be toggled off. - * - * @param {boolean} wasSelected Whether the element was originally selected. - * @private - */ -bot.Device.prototype.toggleRadioButtonOrCheckbox_ = function(wasSelected) { - // Gecko and WebKit toggle the element as a result of a click. - if (goog.userAgent.GECKO || goog.userAgent.WEBKIT) { - return; - } - // Cannot toggle off radio buttons. - if (wasSelected && this.element_.type.toLowerCase() == 'radio') { - return; - } - this.element_.checked = !wasSelected; - // Only Opera versions < 11 do not fire the change event themselves. - if (goog.userAgent.OPERA && !bot.userAgent.isEngineVersion(11)) { - bot.events.fire(this.element_, bot.events.EventType.CHANGE); - } -}; - - -/** - * Find FORM element that is an ancestor of the passed in element. - * @param {Node} node The node to find a FORM for. - * @return {Element} The ancestor FORM element if it exists. - * @protected - */ -bot.Device.findAncestorForm = function(node) { - return (/** @type {Element} */ goog.dom.getAncestor( - node, bot.Device.isForm_, /*includeNode=*/true)); -}; - - -/** - * @param {Node} node The node to test. - * @return {boolean} Whether the node is a FORM element. - * @private - */ -bot.Device.isForm_ = function(node) { - return bot.dom.isElement(node, goog.dom.TagName.FORM); -}; - - -/** - * Submits the specified form. Unlike the public function, it expects to be - * given a <form> element and fails if it is not. - * @param {!Element} form The form to submit. - * @protected - */ -bot.Device.prototype.submitForm = function(form) { - if (!bot.Device.isForm_(form)) { - throw new bot.Error(bot.ErrorCode.INVALID_ELEMENT_STATE, - 'Element is not a form, so could not submit.'); - } - if (bot.events.fire(form, bot.events.EventType.SUBMIT)) { - // When a form has an element with an id or name exactly equal to "submit" - // (not uncommon) it masks the form.submit function. We can avoid this by - // calling the prototype's submit function, except in IE < 8, where DOM id - // elements don't let you reference their prototypes. For IE < 8, can change - // the id and names of the elements and revert them back, but they must be - // reverted before the submit call, because the onsubmit handler might rely - // on their being correct, and the HTTP request might otherwise be left with - // incorrect value names. Fortunately, saving the submit function and - // calling it after reverting the ids and names works! Oh, and goog.typeOf - // (and thus goog.isFunction) doesn't work for form.submit in IE < 8. - if (!bot.dom.isElement(form.submit)) { - form.submit(); - } else if (!goog.userAgent.IE || bot.userAgent.isEngineVersion(8)) { - /** @type {!Object} */ (form.constructor.prototype).submit.call(form); - } else { - var idMasks = bot.locators.findElements({'id': 'submit'}, form); - var nameMasks = bot.locators.findElements({'name': 'submit'}, form); - goog.array.forEach(idMasks, function(m) { - m.removeAttribute('id'); - }); - goog.array.forEach(nameMasks, function(m) { - m.removeAttribute('name'); - }); - var submitFunction = form.submit; - goog.array.forEach(idMasks, function(m) { - m.setAttribute('id', 'submit'); - }); - goog.array.forEach(nameMasks, function(m) { - m.setAttribute('name', 'submit'); - }); - submitFunction(); - } - } -}; - - -/** - * Regular expression for splitting up a URL into components. - * @private {!RegExp} - * @const - */ -bot.Device.URL_REGEXP_ = new RegExp( - '^' + - '([^:/?#.]+:)?' + // protocol - '(?://([^/]*))?' + // host - '([^?#]+)?' + // pathname - '(\\?[^#]*)?' + // search - '(#.*)?' + // hash - '$'); - - -/** - * Resolves a potentially relative URL against a base location. - * @param {!Location} base Base location against which to resolve. - * @param {string} rel Url to resolve against the location. - * @return {string} Resolution of url against base location. - * @private - */ -bot.Device.resolveUrl_ = function(base, rel) { - var m = rel.match(bot.Device.URL_REGEXP_); - if (!m) { - return ''; - } - var target = { - protocol: m[1] || '', - host: m[2] || '', - pathname: m[3] || '', - search: m[4] || '', - hash: m[5] || '' - }; - - if (!target.protocol) { - target.protocol = base.protocol; - if (!target.host) { - target.host = base.host; - if (!target.pathname) { - target.pathname = base.pathname; - target.search = target.search || base.search; - } else if (target.pathname.charAt(0) != '/') { - var lastSlashIndex = base.pathname.lastIndexOf('/'); - if (lastSlashIndex != -1) { - var directory = base.pathname.substr(0, lastSlashIndex + 1); - target.pathname = directory + target.pathname; - } - } - } - } - - return target.protocol + '//' + target.host + target.pathname + - target.search + target.hash; -}; - - - -/** - * Stores the state of modifier keys - * - * @constructor - */ -bot.Device.ModifiersState = function() { - /** - * State of the modifier keys. - * @private {number} - */ - this.pressedModifiers_ = 0; -}; - - -/** - * An enum for the various modifier keys (keycode-independent). - * @enum {number} - */ -bot.Device.Modifier = { - SHIFT: 0x1, - CONTROL: 0x2, - ALT: 0x4, - META: 0x8 -}; - - -/** - * Checks whether a specific modifier is pressed - * @param {!bot.Device.Modifier} modifier The modifier to check. - * @return {boolean} Whether the modifier is pressed. - */ -bot.Device.ModifiersState.prototype.isPressed = function(modifier) { - return (this.pressedModifiers_ & modifier) != 0; -}; - - -/** - * Sets the state of a given modifier. - * @param {!bot.Device.Modifier} modifier The modifier to set. - * @param {boolean} isPressed whether the modifier is set or released. - */ -bot.Device.ModifiersState.prototype.setPressed = function( - modifier, isPressed) { - if (isPressed) { - this.pressedModifiers_ = this.pressedModifiers_ | modifier; - } else { - this.pressedModifiers_ = this.pressedModifiers_ & (~modifier); - } -}; - - -/** - * @return {boolean} State of the Shift key. - */ -bot.Device.ModifiersState.prototype.isShiftPressed = function() { - return this.isPressed(bot.Device.Modifier.SHIFT); -}; - - -/** - * @return {boolean} State of the Control key. - */ -bot.Device.ModifiersState.prototype.isControlPressed = function() { - return this.isPressed(bot.Device.Modifier.CONTROL); -}; - - -/** - * @return {boolean} State of the Alt key. - */ -bot.Device.ModifiersState.prototype.isAltPressed = function() { - return this.isPressed(bot.Device.Modifier.ALT); -}; - - -/** - * @return {boolean} State of the Meta key. - */ -bot.Device.ModifiersState.prototype.isMetaPressed = function() { - return this.isPressed(bot.Device.Modifier.META); -}; -// Copyright 2012 Software Freedom Conservancy -// Copyright 2010 WebDriver committers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview DOM manipulation and querying routines. - */ - -goog.provide('bot.dom'); - -goog.require('bot'); -goog.require('bot.color'); -goog.require('bot.locators.xpath'); -goog.require('bot.userAgent'); -goog.require('bot.window'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.dom.NodeType'); -goog.require('goog.dom.TagName'); -goog.require('goog.math.Box'); -goog.require('goog.math.Coordinate'); -goog.require('goog.math.Rect'); -goog.require('goog.string'); -goog.require('goog.style'); -goog.require('goog.userAgent'); - - -/** - * Retrieves the active element for a node's owner document. - * @param {!(Node|Window)} nodeOrWindow The node whose owner document to get - * the active element for. - * @return {Element} The active element, if any. - */ -bot.dom.getActiveElement = function(nodeOrWindow) { - return goog.dom.getActiveElement( - goog.dom.getOwnerDocument(nodeOrWindow)); -}; - - -/** - * Returns whether the given node is an element and, optionally, whether it has - * the given tag name. If the tag name is not provided, returns true if the node - * is an element, regardless of the tag name.h - * - * @param {Node} node The node to test. - * @param {string=} opt_tagName Tag name to test the node for. - * @return {boolean} Whether the node is an element with the given tag name. - */ -bot.dom.isElement = function(node, opt_tagName) { - return !!node && node.nodeType == goog.dom.NodeType.ELEMENT && - (!opt_tagName || node.tagName.toUpperCase() == opt_tagName); -}; - - -/** - * Returns whether an element is in an interactable state: whether it is shown - * to the user, ignoring its opacity, and whether it is enabled. - * - * @param {!Element} element The element to check. - * @return {boolean} Whether the element is interactable. - * @see bot.dom.isShown. - * @see bot.dom.isEnabled - */ -bot.dom.isInteractable = function(element) { - return bot.dom.isShown(element, /*ignoreOpacity=*/true) && - bot.dom.isEnabled(element) && - !bot.dom.hasPointerEventsDisabled_(element); -}; - - -/** - * @param {!Element} element Element. - * @return {boolean} Whether element is set by the CSS pointer-events property - * not to be interactable. - * @private - */ -bot.dom.hasPointerEventsDisabled_ = function(element) { - if (goog.userAgent.IE || goog.userAgent.OPERA || - (goog.userAgent.GECKO && !bot.userAgent.isEngineVersion('1.9.2'))) { - // Don't support pointer events - return false; - } - return bot.dom.getEffectiveStyle(element, 'pointer-events') == 'none'; -}; - - -/** - * Returns whether the element can be checked or selected. - * - * @param {!Element} element The element to check. - * @return {boolean} Whether the element could be checked or selected. - */ -bot.dom.isSelectable = function(element) { - if (bot.dom.isElement(element, goog.dom.TagName.OPTION)) { - return true; - } - - if (bot.dom.isElement(element, goog.dom.TagName.INPUT)) { - var type = element.type.toLowerCase(); - return type == 'checkbox' || type == 'radio'; - } - - return false; -}; - - -/** - * Returns whether the element is checked or selected. - * - * @param {!Element} element The element to check. - * @return {boolean} Whether the element is checked or selected. - */ -bot.dom.isSelected = function(element) { - if (!bot.dom.isSelectable(element)) { - throw new bot.Error(bot.ErrorCode.ELEMENT_NOT_SELECTABLE, - 'Element is not selectable'); - } - - var propertyName = 'selected'; - var type = element.type && element.type.toLowerCase(); - if ('checkbox' == type || 'radio' == type) { - propertyName = 'checked'; - } - - return !!bot.dom.getProperty(element, propertyName); -}; - - -/** - * List of the focusable fields, according to - * http://www.w3.org/TR/html401/interact/scripts.html#adef-onfocus - * @const - * @private {!Array.<!goog.dom.TagName>} - */ -bot.dom.FOCUSABLE_FORM_FIELDS_ = [ - goog.dom.TagName.A, - goog.dom.TagName.AREA, - goog.dom.TagName.BUTTON, - goog.dom.TagName.INPUT, - goog.dom.TagName.LABEL, - goog.dom.TagName.SELECT, - goog.dom.TagName.TEXTAREA -]; - - -/** - * Returns whether a node is a focusable element. An element may receive focus - * if it is a form field or has a positive tabindex. - * @param {!Element} element The node to test. - * @return {boolean} Whether the node is focusable. - */ -bot.dom.isFocusable = function(element) { - return goog.array.some(bot.dom.FOCUSABLE_FORM_FIELDS_, function(tagName) { - return element.tagName.toUpperCase() == tagName; - }) || (bot.dom.getAttribute(element, 'tabindex') != null && - Number(bot.dom.getProperty(element, 'tabIndex')) >= 0); -}; - - -/** - * Looks up the given property (not to be confused with an attribute) on the - * given element. - * - * @param {!Element} element The element to use. - * @param {string} propertyName The name of the property. - * @return {*} The value of the property. - */ -bot.dom.getProperty = function(element, propertyName) { - // When an <option>'s value attribute is not set, its value property should be - // its text content, but IE < 8 does not adhere to that behavior, so fix it. - // http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-value-OPTION - if (bot.userAgent.IE_DOC_PRE8 && propertyName == 'value' && - bot.dom.isElement(element, goog.dom.TagName.OPTION) && - goog.isNull(bot.dom.getAttribute(element, 'value'))) { - return goog.dom.getRawTextContent(element); - } - return element[propertyName]; -}; - - -/** - * Regex to split on semicolons, but not when enclosed in parens or quotes. - * Helper for {@link bot.dom.standardizeStyleAttribute_}. - * If the style attribute ends with a semicolon this will include an empty - * string at the end of the array - * @const - * @private {!RegExp} - */ -bot.dom.SPLIT_STYLE_ATTRIBUTE_ON_SEMICOLONS_REGEXP_ = - new RegExp('[;]+' + - '(?=(?:(?:[^"]*"){2})*[^"]*$)' + - '(?=(?:(?:[^\']*\'){2})*[^\']*$)' + - '(?=(?:[^()]*\\([^()]*\\))*[^()]*$)'); - - -/** - * Standardize a style attribute value, which includes: - * (1) converting all property names lowercase - * (2) ensuring it ends in a trailing semi-colon - * (3) removing empty style values (which only appear on Opera). - * @param {string} value The style attribute value. - * @return {string} The identical value, with the formatting rules described - * above applied. - * @private - */ -bot.dom.standardizeStyleAttribute_ = function(value) { - var styleArray = value.split( - bot.dom.SPLIT_STYLE_ATTRIBUTE_ON_SEMICOLONS_REGEXP_); - var css = []; - goog.array.forEach(styleArray, function(pair) { - var i = pair.indexOf(':'); - if (i > 0) { - var keyValue = [pair.slice(0, i), pair.slice(i + 1)]; - if (keyValue.length == 2) { - css.push(keyValue[0].toLowerCase(), ':', keyValue[1], ';'); - } - } - }); - css = css.join(''); - css = css.charAt(css.length - 1) == ';' ? css : css + ';'; - return goog.userAgent.OPERA ? css.replace(/\w+:;/g, '') : css; -}; - - -/** - * Get the user-specified value of the given attribute of the element, or null - * if the attribute is not present. - * - * <p>For boolean attributes such as "selected" or "checked", this method - * returns the value of element.getAttribute(attributeName) cast to a String - * when attribute is present. For modern browsers, this will be the string the - * attribute is given in the HTML, but for IE8 it will be the name of the - * attribute, and for IE7, it will be the string "true". To test whether a - * boolean attribute is present, test whether the return value is non-null, the - * same as one would for non-boolean attributes. Specifically, do *not* test - * whether the boolean evaluation of the return value is true, because the value - * of a boolean attribute that is present will often be the empty string. - * - * <p>For the style attribute, it standardizes the value by lower-casing the - * property names and always including a trailing semi-colon. - * - * @param {!Element} element The element to use. - * @param {string} attributeName The name of the attribute to return. - * @return {?string} The value of the attribute or "null" if entirely missing. - */ -bot.dom.getAttribute = function(element, attributeName) { - attributeName = attributeName.toLowerCase(); - - // The style attribute should be a css text string that includes only what - // the HTML element specifies itself (excluding what is inherited from parent - // elements or style sheets). We standardize the format of this string via the - // standardizeStyleAttribute method. - if (attributeName == 'style') { - return bot.dom.standardizeStyleAttribute_(element.style.cssText); - } - - // In IE doc mode < 8, the "value" attribute of an <input> is only accessible - // as a property. - if (bot.userAgent.IE_DOC_PRE8 && attributeName == 'value' && - bot.dom.isElement(element, goog.dom.TagName.INPUT)) { - return element['value']; - } - - // In IE < 9, element.getAttributeNode will return null for some boolean - // attributes that are present, such as the selected attribute on <option> - // elements. This if-statement is sufficient if these cases are restricted - // to boolean attributes whose reflected property names are all lowercase - // (as attributeName is by this point), like "selected". We have not - // found a boolean attribute for which this does not work. - if (bot.userAgent.IE_DOC_PRE9 && element[attributeName] === true) { - return String(element.getAttribute(attributeName)); - } - - // When the attribute is not present, either attr will be null or - // attr.specified will be false. - var attr = element.getAttributeNode(attributeName); - return (attr && attr.specified) ? attr.value : null; -}; - - -/** - * List of elements that support the "disabled" attribute, as defined by the - * HTML 4.01 specification. - * @const - * @private {!Array.<goog.dom.TagName>} - * @see http://www.w3.org/TR/html401/interact/forms.html#h-17.12.1 - */ -bot.dom.DISABLED_ATTRIBUTE_SUPPORTED_ = [ - goog.dom.TagName.BUTTON, - goog.dom.TagName.INPUT, - goog.dom.TagName.OPTGROUP, - goog.dom.TagName.OPTION, - goog.dom.TagName.SELECT, - goog.dom.TagName.TEXTAREA -]; - - -/** - * Determines if an element is enabled. An element is considered enabled if it - * does not support the "disabled" attribute, or if it is not disabled. - * @param {!Element} el The element to test. - * @return {boolean} Whether the element is enabled. - */ -bot.dom.isEnabled = function(el) { - var tagName = el.tagName.toUpperCase(); - if (!goog.array.contains(bot.dom.DISABLED_ATTRIBUTE_SUPPORTED_, tagName)) { - return true; - } - - if (bot.dom.getProperty(el, 'disabled')) { - return false; - } - - // The element is not explicitly disabled, but if it is an OPTION or OPTGROUP, - // we must test if it inherits its state from a parent. - if (el.parentNode && - el.parentNode.nodeType == goog.dom.NodeType.ELEMENT && - goog.dom.TagName.OPTGROUP == tagName || - goog.dom.TagName.OPTION == tagName) { - return bot.dom.isEnabled((/**@type{!Element}*/el.parentNode)); - } - - // Is there an ancestor of the current element that is a disabled fieldset - // and whose child is also an ancestor-or-self of the current element but is - // not the first legend child of the fieldset. If so then the element is - // disabled. - if (goog.dom.getAncestor(el, function (e) { - var parent = e.parentNode; - - if (parent && - bot.dom.isElement(parent, goog.dom.TagName.FIELDSET) && - bot.dom.getProperty(/** @type {!Element} */ (parent), 'disabled')) { - if (!bot.dom.isElement(e, goog.dom.TagName.LEGEND)) { - return true; - } - - var sibling = e; - // Are there any previous legend siblings? If so then we are not the - // first and the element is disabled - while (sibling = goog.dom.getPreviousElementSibling(sibling)) { - if (bot.dom.isElement(sibling, goog.dom.TagName.LEGEND)) { - return true; - } - } - } - return false; - }, true)) { - return false; - } - - return true; -}; - - -/** - * List of input types that create text fields. - * @const - * @private {!Array.<String>} - * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#attr-input-type - */ -bot.dom.TEXTUAL_INPUT_TYPES_ = [ - 'text', - 'search', - 'tel', - 'url', - 'email', - 'password', - 'number' -]; - - -/** - * TODO(gdennis): Add support for designMode elements. - * - * @param {!Element} element The element to check. - * @return {boolean} Whether the element accepts user-typed text. - */ -bot.dom.isTextual = function(element) { - if (bot.dom.isElement(element, goog.dom.TagName.TEXTAREA)) { - return true; - } - - if (bot.dom.isElement(element, goog.dom.TagName.INPUT)) { - var type = element.type.toLowerCase(); - return goog.array.contains(bot.dom.TEXTUAL_INPUT_TYPES_, type); - } - - if (bot.dom.isContentEditable(element)) { - return true; - } - - return false; -}; - - -/** - * @param {!Element} element The element to check. - * @return {boolean} Whether the element is contentEditable. - */ -bot.dom.isContentEditable = function(element) { - // Check if browser supports contentEditable. - if (!goog.isDef(element['contentEditable'])) { - return false; - } - - // Checking the element's isContentEditable property is preferred except for - // IE where that property is not reliable on IE versions 7, 8, and 9. - if (!goog.userAgent.IE && goog.isDef(element['isContentEditable'])) { - return element.isContentEditable; - } - - // For IE and for browsers where contentEditable is supported but - // isContentEditable is not, traverse up the ancestors: - function legacyIsContentEditable(e) { - if (e.contentEditable == 'inherit') { - var parent = bot.dom.getParentElement(e); - return parent ? legacyIsContentEditable(parent) : false; - } else { - return e.contentEditable == 'true'; - } - } - return legacyIsContentEditable(element); -}; - - -/** - * TODO(gdennis): Merge isTextual into this function and move to bot.dom. - * For Puppet, requires adding support to getVisibleText for grabbing - * text from all textual elements. - * - * Whether the element may contain text the user can edit. - * - * @param {!Element} element The element to check. - * @return {boolean} Whether the element accepts user-typed text. - */ -bot.dom.isEditable = function(element) { - return bot.dom.isTextual(element) && - !bot.dom.getProperty(element, 'readOnly'); -}; - - -/** - * Returns the parent element of the given node, or null. This is required - * because the parent node may not be another element. - * - * @param {!Node} node The node who's parent is desired. - * @return {Element} The parent element, if available, null otherwise. - */ -bot.dom.getParentElement = function(node) { - var elem = node.parentNode; - - while (elem && - elem.nodeType != goog.dom.NodeType.ELEMENT && - elem.nodeType != goog.dom.NodeType.DOCUMENT && - elem.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) { - elem = elem.parentNode; - } - return (/** @type {Element} */ bot.dom.isElement(elem) ? elem : null); -}; - - -/** - * Retrieves an explicitly-set, inline style value of an element. This returns - * '' if there isn't a style attribute on the element or if this style property - * has not been explicitly set in script. - * - * @param {!Element} elem Element to get the style value from. - * @param {string} styleName Name of the style property in selector-case. - * @return {string} The value of the style property. - */ -bot.dom.getInlineStyle = function(elem, styleName) { - return goog.style.getStyle(elem, styleName); -}; - - -/** - * Retrieves the implicitly-set, effective style of an element, or null if it is - * unknown. It returns the computed style where available; otherwise it looks - * up the DOM tree for the first style value not equal to 'inherit,' using the - * IE currentStyle of each node if available, and otherwise the inline style. - * Since the computed, current, and inline styles can be different, the return - * value of this function is not always consistent across browsers. See: - * http://code.google.com/p/doctype/wiki/ArticleComputedStyleVsCascadedStyle - * - * @param {!Element} elem Element to get the style value from. - * @param {string} propertyName Name of the CSS property in selector-case. - * @return {?string} The value of the style property, or null. - */ -bot.dom.getEffectiveStyle = function(elem, propertyName) { - var styleName = goog.string.toCamelCase(propertyName); - if (styleName == 'float' || - styleName == 'cssFloat' || - styleName == 'styleFloat') { - styleName = bot.userAgent.IE_DOC_PRE9 ? 'styleFloat' : 'cssFloat'; - } - var style = goog.style.getComputedStyle(elem, styleName) || - bot.dom.getCascadedStyle_(elem, styleName); - if (style === null) { - return null; - } - return bot.color.standardizeColor(propertyName, style); -}; - - -/** - * Looks up the DOM tree for the first style value not equal to 'inherit,' using - * the currentStyle of each node if available, and otherwise the inline style. - * - * @param {!Element} elem Element to get the style value from. - * @param {string} styleName CSS style property in camelCase. - * @return {?string} The value of the style property, or null. - * @private - */ -bot.dom.getCascadedStyle_ = function(elem, styleName) { - var style = elem.currentStyle || elem.style; - var value = style[styleName]; - if (!goog.isDef(value) && goog.isFunction(style['getPropertyValue'])) { - value = style['getPropertyValue'](styleName); - } - - if (value != 'inherit') { - return goog.isDef(value) ? value : null; - } - var parent = bot.dom.getParentElement(elem); - return parent ? bot.dom.getCascadedStyle_(parent, styleName) : null; -}; - - -/** - * Would a user see scroll bars on the BODY element? In the case where the BODY - * has "overflow: hidden", and HTML has "overflow: auto" or "overflow: scroll" - * set, there's a scroll bar, so it's as if the BODY has "overflow: auto" set. - * In all other cases where BODY has "overflow: hidden", there are no - * scrollbars. http://www.w3.org/TR/CSS21/visufx.html#overflow - * - * @param {!Element} bodyElement The element, which must be a BODY element. - * @return {boolean} Whether scrollbars would be visible to a user. - * @private - */ -bot.dom.isBodyScrollBarShown_ = function(bodyElement) { - if (!bot.dom.isElement(bodyElement, goog.dom.TagName.BODY)) { - // bail - } - - var bodyOverflow = bot.dom.getEffectiveStyle(bodyElement, 'overflow'); - if (bodyOverflow != 'hidden') { - return true; - } - - var html = bot.dom.getParentElement(bodyElement); - if (!html || !bot.dom.isElement(html, goog.dom.TagName.HTML)) { - return true; // Seems like a reasonable default. - } - - var viewportOverflow = bot.dom.getEffectiveStyle(html, 'overflow'); - return viewportOverflow == 'auto' || viewportOverflow == 'scroll'; -}; - - -/** - * @param {!Element} element The element to use. - * @return {!goog.math.Size} The dimensions of the element. - */ -bot.dom.getElementSize = function(element) { - if (goog.isFunction(element['getBBox']) && !bot.dom.isElement(element, goog.dom.TagName.SVG)) { - try { - var bb = element['getBBox'](); - if (bb) { - // Opera will return an undefined bounding box for SVG elements. - // Which makes sense, but isn't useful. - return bb; - } - } catch (e) { - // Firefox will always throw for certain SVG elements, - // even if the function exists. - } - } - - // If the element is the BODY, then get the visible size. - if (bot.dom.isElement(element, goog.dom.TagName.BODY)) { - var doc = goog.dom.getOwnerDocument(element); - var win = goog.dom.getWindow(doc) || undefined; - if (!bot.dom.isBodyScrollBarShown_(element)) { - return goog.dom.getViewportSize(win); - } - return bot.window.getInteractableSize(win); - } - - return goog.style.getSize(element); -}; - - -/** - * Determines whether an element is what a user would call "shown". This means - * that the element is shown in the viewport of the browser, and only has - * height and width greater than 0px, and that its visibility is not "hidden" - * and its display property is not "none". - * Options and Optgroup elements are treated as special cases: they are - * considered shown iff they have a enclosing select element that is shown. - * - * @param {!Element} elem The element to consider. - * @param {boolean=} opt_ignoreOpacity Whether to ignore the element's opacity - * when determining whether it is shown; defaults to false. - * @return {boolean} Whether or not the element is visible. - */ -bot.dom.isShown = function(elem, opt_ignoreOpacity) { - if (!bot.dom.isElement(elem)) { - throw new Error('Argument to isShown must be of type Element'); - } - - // Option or optgroup is shown iff enclosing select is shown (ignoring the - // select's opacity). - if (bot.dom.isElement(elem, goog.dom.TagName.OPTION) || - bot.dom.isElement(elem, goog.dom.TagName.OPTGROUP)) { - var select = /**@type {Element}*/ (goog.dom.getAncestor(elem, function(e) { - return bot.dom.isElement(e, goog.dom.TagName.SELECT); - })); - return !!select && bot.dom.isShown(select, /*ignoreOpacity=*/true); - } - - // Map is shown iff image that uses it is shown. - if (bot.dom.isElement(elem, goog.dom.TagName.MAP)) { - if (!elem.name) { - return false; - } - var mapDoc = goog.dom.getOwnerDocument(elem); - var mapImage; - // TODO(gdennis): Avoid brute-force search once a cross-browser xpath - // locator is available. - if (mapDoc['evaluate']) { - // The "//*" XPath syntax can confuse the closure compiler, so we use - // the "/descendant::*" syntax instead. - // TODO(jleyba): Try to find a reproducible case for the compiler bug. - // TODO(jleyba): Restrict to applet, img, input:image, and object nodes. - var imageXpath = '/descendant::*[@usemap = "#' + elem.name + '"]'; - - // TODO(gdennis): Break dependency of bot.locators on bot.dom, - // so bot.locators.findElement can be called here instead. - mapImage = bot.locators.xpath.single(imageXpath, mapDoc); - } else { - mapImage = goog.dom.findNode(mapDoc, function(n) { - return bot.dom.isElement(n) && - bot.dom.getAttribute( - /** @type {!Element} */ (n), 'usemap') == '#' + elem.name; - }); - } - return !!mapImage && bot.dom.isShown((/** @type {!Element} */ mapImage), - opt_ignoreOpacity); - } - - // Area is shown iff enclosing map is shown. - if (bot.dom.isElement(elem, goog.dom.TagName.AREA)) { - var map = /**@type {Element}*/ (goog.dom.getAncestor(elem, function(e) { - return bot.dom.isElement(e, goog.dom.TagName.MAP); - })); - return !!map && bot.dom.isShown(map, opt_ignoreOpacity); - } - - // Any hidden input is not shown. - if (bot.dom.isElement(elem, goog.dom.TagName.INPUT) && - elem.type.toLowerCase() == 'hidden') { - return false; - } - - // Any NOSCRIPT element is not shown. - if (bot.dom.isElement(elem, goog.dom.TagName.NOSCRIPT)) { - return false; - } - - // Any element with hidden visibility is not shown. - if (bot.dom.getEffectiveStyle(elem, 'visibility') == 'hidden') { - return false; - } - - // Any element with a display style equal to 'none' or that has an ancestor - // with display style equal to 'none' is not shown. - function displayed(e) { - if (bot.dom.getEffectiveStyle(e, 'display') == 'none') { - return false; - } - var parent = bot.dom.getParentElement(e); - return !parent || displayed(parent); - } - if (!displayed(elem)) { - return false; - } - - // Any transparent element is not shown. - if (!opt_ignoreOpacity && bot.dom.getOpacity(elem) == 0) { - return false; - } - - // Any element without positive size dimensions is not shown. - function positiveSize(e) { - var size = bot.dom.getElementSize(e); - if (size.height > 0 && size.width > 0) { - return true; - } - // A vertical or horizontal SVG Path element will report zero width or - // height but is "shown" if it has a positive stroke-width. - if (bot.dom.isElement(e, 'PATH') && (size.height > 0 || size.width > 0)) { - var strokeWidth = bot.dom.getEffectiveStyle(e, 'stroke-width'); - return !!strokeWidth && (parseInt(strokeWidth, 10) > 0); - } - // Zero-sized elements should still be considered to have positive size - // if they have a child element or text node with positive size. - return goog.array.some(e.childNodes, function(n) { - return (n.nodeType == goog.dom.NodeType.TEXT && - bot.dom.getEffectiveStyle(e, 'overflow') != 'hidden') || - (bot.dom.isElement(n) && positiveSize(n)); - }); - } - if (!positiveSize(elem)) { - return false; - } - - // Elements should be hidden if their parent has a fixed size AND has the - // style overflow:hidden AND the element's location is not within the fixed - // size of the parent - function isOverflowHiding(e, block) { - var parent; - if (block == null) { - parent = goog.dom.getParentElement(e); - } else { - parent = goog.dom.getParentElement(block); - } - - if (parent && (bot.dom.getEffectiveStyle(parent, 'overflow-x') == 'hidden' || - bot.dom.getEffectiveStyle(parent, 'overflow-y') == 'hidden')) { - var sizeOfParent = bot.dom.getElementSize(parent); - var locOfParent = goog.style.getClientPosition(parent); - var locOfElement = goog.style.getClientPosition(e); - if (locOfParent.x + sizeOfParent.width <= locOfElement.x && - bot.dom.getEffectiveStyle(parent, 'overflow-x') == 'hidden') { - return false; - } - if (locOfParent.y + sizeOfParent.height <= locOfElement.y && - bot.dom.getEffectiveStyle(parent, 'overflow-y') == 'hidden') { - return false; - } - return true; - } - return !parent || isOverflowHiding(e, parent); - } - - if (!isOverflowHiding(elem, null)) { - return false; - } - - function isTransformHiding(e) { - var transform = bot.dom.getEffectiveStyle(e, '-o-transform') || - bot.dom.getEffectiveStyle(e, '-webkit-transform') || - bot.dom.getEffectiveStyle(e, '-ms-transform') || - bot.dom.getEffectiveStyle(e, '-moz-transform') || - bot.dom.getEffectiveStyle(e, 'transform'); - - // Not all browsers know what a transform is so if we have a returned value - // lets carry on checking up the tree just in case. If we ask for the - // transform matrix and look at the details there it will return the centre - // of the element - if (transform && transform !== "none") { - var locOfElement = goog.style.getClientPosition(e); - var sizeOfElement = bot.dom.getElementSize(e); - if ((locOfElement.x + (sizeOfElement.width)) >= 0 && - (locOfElement.y + (sizeOfElement.height)) >= 0){ - return true; - } else { - return false; - } - } else { - var parent = bot.dom.getParentElement(e); - return !parent || isTransformHiding(parent); - } - } - return isTransformHiding(elem); -}; - -/** -* Checks whether the element is currently scrolled into the parent's overflow -* region, such that the offset given, relative to the top-left corner of the -* element, is currently in the overflow region. -* -* @param {!Element} element The element to check. -* @param {!goog.math.Coordinate=} opt_coords Coordinate in the element, -* relative to the top-left corner of the element, to check. If none are -* specified, checks that the center of the element is in in the overflow. -* @return {boolean} Whether the coordinates specified, relative to the element, -* are scrolled in the parent overflow. -*/ -bot.dom.isInParentOverflow = function (element, opt_coords) { - var parent = goog.style.getOffsetParent(element); - var parentNode = goog.userAgent.GECKO || goog.userAgent.IE || - goog.userAgent.OPERA ? bot.dom.getParentElement(element) : parent; - - // Gecko will skip the BODY tag when calling getOffsetParent. However, the - // combination of the overflow values on the BODY _and_ HTML tags determine - // whether scroll bars are shown, so we need to guarantee that both values - // are checked. - if ((goog.userAgent.GECKO || goog.userAgent.IE || goog.userAgent.OPERA) && - bot.dom.isElement(parentNode, goog.dom.TagName.BODY)) { - parent = parentNode; - } - - if (parent && (bot.dom.getEffectiveStyle(parent, 'overflow') == 'scroll' || - bot.dom.getEffectiveStyle(parent, 'overflow') == 'auto')) { - var sizeOfParent = bot.dom.getElementSize(parent); - var locOfParent = goog.style.getClientPosition(parent); - var locOfElement = goog.style.getClientPosition(element); - var offsetX, offsetY; - if (opt_coords) { - offsetX = opt_coords.x; - offsetY = opt_coords.y; - } else { - var sizeOfElement = bot.dom.getElementSize(element); - offsetX = sizeOfElement.width / 2; - offsetY = sizeOfElement.height / 2; - } - var elementPointX = locOfElement.x + offsetX; - var elementPointY = locOfElement.y + offsetY; - if (elementPointX >= locOfParent.x + sizeOfParent.width) { - return true; - } - if (elementPointX <= locOfParent.x) { - return true; - } - if (elementPointY >= locOfParent.y + sizeOfParent.height) { - return true; - } - if (elementPointY <= locOfParent.y) { - return true; - } - return bot.dom.isInParentOverflow(parent); - } - return false; -}; - -/** - * Trims leading and trailing whitespace from strings, leaving non-breaking - * space characters in place. - * - * @param {string} str The string to trim. - * @return {string} str without any leading or trailing whitespace characters - * except non-breaking spaces. - * @private - */ -bot.dom.trimExcludingNonBreakingSpaceCharacters_ = function(str) { - return str.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g, ''); -}; - - -/** - * @param {!Element} elem The element to consider. - * @return {string} visible text. - */ -bot.dom.getVisibleText = function(elem) { - var lines = []; - bot.dom.appendVisibleTextLinesFromElement_(elem, lines); - lines = goog.array.map( - lines, - bot.dom.trimExcludingNonBreakingSpaceCharacters_); - var joined = lines.join('\n'); - var trimmed = bot.dom.trimExcludingNonBreakingSpaceCharacters_(joined); - - // Replace non-breakable spaces with regular ones. - return trimmed.replace(/\xa0/g, ' '); -}; - - -/** - * @param {!Element} elem Element. - * @param {!Array.<string>} lines Accumulated visible lines of text. - * @private - */ -bot.dom.appendVisibleTextLinesFromElement_ = function(elem, lines) { - function currLine() { - return (/** @type {string|undefined} */ goog.array.peek(lines)) || ''; - } - - // TODO(gdennis): Add case here for textual form elements. - if (bot.dom.isElement(elem, goog.dom.TagName.BR)) { - lines.push(''); - } else { - // TODO: properly handle display:run-in - var isTD = bot.dom.isElement(elem, goog.dom.TagName.TD); - var display = bot.dom.getEffectiveStyle(elem, 'display'); - // On some browsers, table cells incorrectly show up with block styles. - var isBlock = !isTD && - !goog.array.contains(bot.dom.INLINE_DISPLAY_BOXES_, display); - - // Add a newline before block elems when there is text on the current line, - // except when the previous sibling has a display: run-in. - // Also, do not run-in the previous sibling if this element is floated. - - var previousElementSibling = goog.dom.getPreviousElementSibling(elem); - var prevDisplay = (previousElementSibling) ? - bot.dom.getEffectiveStyle(previousElementSibling, 'display') : ''; - // TODO(dawagner): getEffectiveStyle should mask this for us - var thisFloat = bot.dom.getEffectiveStyle(elem, 'float') || - bot.dom.getEffectiveStyle(elem, 'cssFloat') || - bot.dom.getEffectiveStyle(elem, 'styleFloat'); - var runIntoThis = prevDisplay == 'run-in' && thisFloat == 'none'; - if (isBlock && !runIntoThis && !goog.string.isEmpty(currLine())) { - lines.push(''); - } - - // This element may be considered unshown, but have a child that is - // explicitly shown (e.g. this element has "visibility:hidden"). - // Nevertheless, any text nodes that are direct descendants of this - // element will not contribute to the visible text. - var shown = bot.dom.isShown(elem); - - // All text nodes that are children of this element need to know the - // effective "white-space" and "text-transform" styles to properly - // compute their contribution to visible text. Compute these values once. - var whitespace = null, textTransform = null; - if (shown) { - whitespace = bot.dom.getEffectiveStyle(elem, 'white-space'); - textTransform = bot.dom.getEffectiveStyle(elem, 'text-transform'); - } - - goog.array.forEach(elem.childNodes, function(node) { - if (node.nodeType == goog.dom.NodeType.TEXT && shown) { - var textNode = (/** @type {!Text} */ node); - bot.dom.appendVisibleTextLinesFromTextNode_(textNode, lines, - whitespace, textTransform); - } else if (bot.dom.isElement(node)) { - var castElem = (/** @type {!Element} */ node); - bot.dom.appendVisibleTextLinesFromElement_(castElem, lines); - } - }); - - var line = currLine(); - - // Here we differ from standard innerText implementations (if there were - // such a thing). Usually, table cells are separated by a tab, but we - // normalize tabs into single spaces. - if ((isTD || display == 'table-cell') && line && - !goog.string.endsWith(line, ' ')) { - lines[lines.length - 1] += ' '; - } - - // Add a newline after block elems when there is text on the current line, - // and the current element isn't marked as run-in. - if (isBlock && display != 'run-in' && !goog.string.isEmpty(line)) { - lines.push(''); - } - } -}; - - -/** - * Elements with one of these effective "display" styles are treated as inline - * display boxes and have their visible text appended to the current line. - * @private {!Array.<string>} - * @const - */ -bot.dom.INLINE_DISPLAY_BOXES_ = [ - 'inline', - 'inline-block', - 'inline-table', - 'none', - 'table-cell', - 'table-column', - 'table-column-group' -]; - - -/** - * @param {!Text} textNode Text node. - * @param {!Array.<string>} lines Accumulated visible lines of text. - * @param {?string} whitespace Parent element's "white-space" style. - * @param {?string} textTransform Parent element's "text-transform" style. - * @private - */ -bot.dom.appendVisibleTextLinesFromTextNode_ = function(textNode, lines, - whitespace, textTransform) { - // First, replace all zero-width spaces. Do this before regularizing spaces - // as the zero-width space is, by definition, a space. - var text = textNode.nodeValue.replace(/\u200b/g, ''); - - // Canonicalize the new lines, and then collapse new lines - // for the whitespace styles that collapse. See: - // https://developer.mozilla.org/en/CSS/white-space - text = goog.string.canonicalizeNewlines(text); - if (whitespace == 'normal' || whitespace == 'nowrap') { - text = text.replace(/\n/g, ' '); - } - - // For pre and pre-wrap whitespace styles, convert all breaking spaces to be - // non-breaking, otherwise, collapse all breaking spaces. Breaking spaces are - // converted to regular spaces by getVisibleText(). - if (whitespace == 'pre' || whitespace == 'pre-wrap') { - text = text.replace(/[ \f\t\v\u2028\u2029]/g, '\xa0'); - } else { - text = text.replace(/[\ \f\t\v\u2028\u2029]+/g, ' '); - } - - if (textTransform == 'capitalize') { - text = text.replace(/(^|\s)(\S)/g, function() { - return arguments[1] + arguments[2].toUpperCase(); - }); - } else if (textTransform == 'uppercase') { - text = text.toUpperCase(); - } else if (textTransform == 'lowercase') { - text = text.toLowerCase(); - } - - var currLine = lines.pop() || ''; - if (goog.string.endsWith(currLine, ' ') && - goog.string.startsWith(text, ' ')) { - text = text.substr(1); - } - lines.push(currLine + text); -}; - - -/** - * Gets the opacity of a node (x-browser). - * This gets the inline style opacity of the node and takes into account the - * cascaded or the computed style for this node. - * - * @param {!Element} elem Element whose opacity has to be found. - * @return {number} Opacity between 0 and 1. - */ -bot.dom.getOpacity = function(elem) { - // TODO(bsilverberg): Does this need to deal with rgba colors? - if (!bot.userAgent.IE_DOC_PRE10) { - return bot.dom.getOpacityNonIE_(elem); - } else { - if (bot.dom.getEffectiveStyle(elem, 'position') == 'relative') { - // Filter does not apply to non positioned elements. - return 1; - } - - var opacityStyle = bot.dom.getEffectiveStyle(elem, 'filter'); - var groups = opacityStyle.match(/^alpha\(opacity=(\d*)\)/) || - opacityStyle.match( - /^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/); - - if (groups) { - return Number(groups[1]) / 100; - } else { - return 1; // Opaque. - } - } -}; - - -/** - * Implementation of getOpacity for browsers that do support - * the "opacity" style. - * - * @param {!Element} elem Element whose opacity has to be found. - * @return {number} Opacity between 0 and 1. - * @private - */ -bot.dom.getOpacityNonIE_ = function(elem) { - // By default the element is opaque. - var elemOpacity = 1; - - var opacityStyle = bot.dom.getEffectiveStyle(elem, 'opacity'); - if (opacityStyle) { - elemOpacity = Number(opacityStyle); - } - - // Let's apply the parent opacity to the element. - var parentElement = bot.dom.getParentElement(elem); - if (parentElement) { - elemOpacity = elemOpacity * bot.dom.getOpacityNonIE_(parentElement); - } - return elemOpacity; -}; - - -/** - * This function calculates the amount of scrolling necessary to bring the - * target location into view. - * - * @param {number} targetLocation The target location relative to the current - * viewport. - * @param {number} viewportDimension The size of the current viewport. - * @return {number} Returns the scroll offset necessary to bring the given - * target location into view. - * @private - */ -bot.dom.calculateViewportScrolling_ = - function(targetLocation, viewportDimension) { - - if (targetLocation >= viewportDimension) { - // Scroll until the target location appears on the right/bottom side of - // the viewport. - return targetLocation - (viewportDimension - 1); - } - - if (targetLocation < 0) { - // Scroll until the target location appears on the left/top side of the - // viewport. - return targetLocation; - } - - // The location is already within the viewport. No scrolling necessary. - return 0; -}; - - -/** - * This function takes a relative location according to the current viewport. If - * this location is not visible in the viewport, it scrolls the location into - * view. The function returns the new relative location after scrolling. - * - * @param {!goog.math.Coordinate} targetLocation The target location relative - * to (0, 0) coordinate of the viewport. - * @param {Window=} opt_currentWindow The current browser window. - * @return {!goog.math.Coordinate} The target location within the viewport - * after scrolling. - */ -bot.dom.getInViewLocation = - function(targetLocation, opt_currentWindow) { - var currentWindow = opt_currentWindow || bot.getWindow(); - var viewportSize = goog.dom.getViewportSize(currentWindow); - - var xScrolling = bot.dom.calculateViewportScrolling_( - targetLocation.x, - viewportSize.width); - - var yScrolling = bot.dom.calculateViewportScrolling_( - targetLocation.y, - viewportSize.height); - - var scrollOffset = - goog.dom.getDomHelper(currentWindow.document).getDocumentScroll(); - - if (xScrolling != 0 || yScrolling != 0) { - currentWindow.scrollBy(xScrolling, yScrolling); - } - - // It is difficult to determine the size of the web page in some browsers. - // We check if the scrolling we intended to do really happened. If not we - // assume that the target location is not on the web page. - var newScrollOffset = - goog.dom.getDomHelper(currentWindow.document).getDocumentScroll(); - - if ((scrollOffset.x + xScrolling != newScrollOffset.x) || - (scrollOffset.y + yScrolling != newScrollOffset.y)) { - throw new bot.Error(bot.ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS, - 'The target location (' + (targetLocation.x + scrollOffset.x) + - ', ' + (targetLocation.y + scrollOffset.y) + ') is not on the ' + - 'webpage.'); - } - - var inViewLocation = new goog.math.Coordinate( - targetLocation.x - xScrolling, - targetLocation.y - yScrolling); - - // The target location should be within the viewport after scrolling. - // This is assertion code. We do not expect them ever to become true. - if (0 > inViewLocation.x || inViewLocation.x >= viewportSize.width) { - throw new bot.Error(bot.ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS, - 'The target location (' + - inViewLocation.x + ', ' + inViewLocation.y + - ') should be within the viewport (' + - viewportSize.width + ':' + viewportSize.height + - ') after scrolling.'); - } - - if (0 > inViewLocation.y || inViewLocation.y >= viewportSize.height) { - throw new bot.Error(bot.ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS, - 'The target location (' + - inViewLocation.x + ', ' + inViewLocation.y + - ') should be within the viewport (' + - viewportSize.width + ':' + viewportSize.height + - ') after scrolling.'); - } - - return inViewLocation; -}; - - -/** - * Scrolls the scrollable element so that the region is fully visible. - * If the region is too large, it will be aligned to the top-left of the - * scrollable element. The region should be relative to the scrollable - * element's current scroll position. - * - * @param {!goog.math.Rect} region The region to use. - * @param {!Element} scrollable The scrollable element to scroll. - * @private - */ -bot.dom.scrollRegionIntoView_ = function(region, scrollable) { - scrollable.scrollLeft += Math.min( - region.left, Math.max(region.left - region.width, 0)); - scrollable.scrollTop += Math.min( - region.top, Math.max(region.top - region.height, 0)); -}; - - -/** - * Scrolls the region of an element into the container's view. If the - * region is too large to fit in the view, it will be aligned to the - * top-left of the container. - * - * The element and container should be attached to the current document. - * - * @param {!Element} elem The element to use. - * @param {!goog.math.Rect} elemRegion The region relative to the element to be - * scrolled into view. - * @param {!Element} container A container of the given element. - * @private - */ -bot.dom.scrollElementRegionIntoContainerView_ = function(elem, elemRegion, - container) { - // Based largely from goog.style.scrollIntoContainerView. - var elemPos = goog.style.getPageOffset(elem); - var containerPos = goog.style.getPageOffset(container); - var containerBorder = goog.style.getBorderBox(container); - - // Relative pos. of the element's border box to the container's content box. - var relX = elemPos.x + elemRegion.left - containerPos.x - - containerBorder.left; - var relY = elemPos.y + elemRegion.top - containerPos.y - containerBorder.top; - - // How much the element can move in the container. - var spaceX = container.clientWidth - elemRegion.width; - var spaceY = container.clientHeight - elemRegion.height; - - bot.dom.scrollRegionIntoView_(new goog.math.Rect(relX, relY, spaceX, spaceY), - container); -}; - - -/** - * Scrolls the element into the client's view. If the element or region is - * too large to fit in the view, it will be aligned to the top-left of the - * container. - * - * The element should be attached to the current document. - * - * @param {!Element} elem The element to use. - * @param {!goog.math.Rect} elemRegion The region relative to the element to be - * scrolled into view. - */ -bot.dom.scrollElementRegionIntoClientView = function(elem, elemRegion) { - var doc = goog.dom.getOwnerDocument(elem); - - // Scroll the containers. - for (var container = bot.dom.getParentElement(elem); - container && container != doc.body && container != doc.documentElement; - container = bot.dom.getParentElement(container)) { - bot.dom.scrollElementRegionIntoContainerView_(elem, elemRegion, container); - } - - // Scroll the actual window. - var elemPageOffset = goog.style.getPageOffset(elem); - - var viewportSize = goog.dom.getDomHelper(doc).getViewportSize(); - - var region = new goog.math.Rect( - elemPageOffset.x + elemRegion.left - (doc.body ? doc.body.scrollLeft : 0), - elemPageOffset.y + elemRegion.top - (doc.body ? doc.body.scrollTop : 0), - viewportSize.width - elemRegion.width, - viewportSize.height - elemRegion.height); - - bot.dom.scrollRegionIntoView_(region, doc.body || doc.documentElement); -}; - - -/** - * Scrolls the element into the client's view and returns its position - * relative to the client viewport. If the element or region is too - * large to fit in the view, it will be aligned to the top-left of the - * container. - * - * The element should be attached to the current document. - * - * @param {!Element} elem The element to use. - * @param {!goog.math.Rect=} opt_elemRegion The region relative to the element - * to be scrolled into view. - * @return {!goog.math.Coordinate} The coordinate of the element in client - * space. - */ -bot.dom.getLocationInView = function(elem, opt_elemRegion) { - var elemRegion; - if (opt_elemRegion) { - elemRegion = new goog.math.Rect( - opt_elemRegion.left, opt_elemRegion.top, - opt_elemRegion.width, opt_elemRegion.height); - } else { - elemRegion = new goog.math.Rect(0, 0, elem.offsetWidth, elem.offsetHeight); - } - bot.dom.scrollElementRegionIntoClientView(elem, elemRegion); - - // This is needed for elements that are split across multiple lines. - var rect = elem.getClientRects ? elem.getClientRects()[0] : null; - var elemClientPos = rect ? - new goog.math.Coordinate(rect.left, rect.top) : - goog.style.getClientPosition(elem); - return new goog.math.Coordinate(elemClientPos.x + elemRegion.left, - elemClientPos.y + elemRegion.top); -}; - - -/** - * Checks whether the element is currently scrolled in to view, such that the - * offset given, relative to the top-left corner of the element, is currently - * displayed in the viewport. - * - * @param {!Element} element The element to check. - * @param {!goog.math.Coordinate=} opt_coords Coordinate in the element, - * relative to the top-left corner of the element, to check. If none are - * specified, checks that any part of the element is in view. - * @return {boolean} Whether the coordinates specified, relative to the element, - * are scrolled in to view. - */ -bot.dom.isScrolledIntoView = function(element, opt_coords) { - var ownerWindow = goog.dom.getWindow(goog.dom.getOwnerDocument(element)); - var topWindow = ownerWindow.top; - var elSize = goog.style.getSize(element); - - for (var win = ownerWindow;; win = win.parent) { - var scroll = goog.dom.getDomHelper(win.document).getDocumentScroll(); - var size = goog.dom.getViewportSize(win); - var viewportRect = new goog.math.Rect(scroll.x, - scroll.y, - size.width, - size.height); - - var elCoords = goog.style.getFramedPageOffset(element, win); - var elementRect = new goog.math.Rect(elCoords.x, - elCoords.y, - elSize.width, - elSize.height); - if (!goog.math.Rect.intersects(viewportRect, elementRect)) { - return false; - } - if (win == topWindow) { - break; - } - } - - var visibleBox = goog.style.getVisibleRectForElement(element); - if (!visibleBox) { - return false; - } - if (opt_coords) { - var elementOffset = goog.style.getPageOffset(element); - var desiredPoint = goog.math.Coordinate.sum(elementOffset, opt_coords); - return visibleBox.contains(desiredPoint); - } else { - var elementBox = goog.style.getBounds(element).toBox(); - return goog.math.Box.intersects(visibleBox, elementBox); - } -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Utilities for working with errors as defined by WebDriver's - * wire protocol: http://code.google.com/p/selenium/wiki/JsonWireProtocol. - */ - -goog.provide('bot.Error'); -goog.provide('bot.ErrorCode'); - - -/** - * Error codes from the WebDriver wire protocol: - * http://code.google.com/p/selenium/wiki/JsonWireProtocol#Response_Status_Codes - * - * @enum {number} - */ -bot.ErrorCode = { - SUCCESS: 0, // Included for completeness - - NO_SUCH_ELEMENT: 7, - NO_SUCH_FRAME: 8, - UNKNOWN_COMMAND: 9, - UNSUPPORTED_OPERATION: 9, // Alias. - STALE_ELEMENT_REFERENCE: 10, - ELEMENT_NOT_VISIBLE: 11, - INVALID_ELEMENT_STATE: 12, - UNKNOWN_ERROR: 13, - ELEMENT_NOT_SELECTABLE: 15, - JAVASCRIPT_ERROR: 17, - XPATH_LOOKUP_ERROR: 19, - TIMEOUT: 21, - NO_SUCH_WINDOW: 23, - INVALID_COOKIE_DOMAIN: 24, - UNABLE_TO_SET_COOKIE: 25, - MODAL_DIALOG_OPENED: 26, - NO_MODAL_DIALOG_OPEN: 27, - SCRIPT_TIMEOUT: 28, - INVALID_ELEMENT_COORDINATES: 29, - IME_NOT_AVAILABLE: 30, - IME_ENGINE_ACTIVATION_FAILED: 31, - INVALID_SELECTOR_ERROR: 32, - SESSION_NOT_CREATED: 33, - MOVE_TARGET_OUT_OF_BOUNDS: 34, - SQL_DATABASE_ERROR: 35, - INVALID_XPATH_SELECTOR: 51, - INVALID_XPATH_SELECTOR_RETURN_TYPE: 52, - // The following error codes are derived straight from HTTP return codes. - METHOD_NOT_ALLOWED: 405 -}; - - - -/** - * Error extension that includes error status codes from the WebDriver wire - * protocol: - * http://code.google.com/p/selenium/wiki/JsonWireProtocol#Response_Status_Codes - * - * @param {!bot.ErrorCode} code The error's status code. - * @param {string=} opt_message Optional error message. - * @constructor - * @extends {Error} - */ -bot.Error = function(code, opt_message) { - - /** - * This error's status code. - * @type {!bot.ErrorCode} - */ - this.code = code; - - /** @type {string} */ - this.state = - bot.Error.CODE_TO_STATE_[code] || bot.Error.State.UNKNOWN_ERROR; - - /** @override */ - this.message = opt_message || ''; - - var name = this.state.replace(/((?:^|\s+)[a-z])/g, function(str) { - // IE<9 does not support String#trim(). Also, IE does not include 0xa0 - // (the non-breaking-space) in the \s character class, so we have to - // explicitly include it. - return str.toUpperCase().replace(/^[\s\xa0]+/g, ''); - }); - var l = name.length - 'Error'.length; - if (l < 0 || name.indexOf('Error', l) != l) { - name += 'Error'; - } - - /** @override */ - this.name = name; - - // Generate a stacktrace for our custom error; ensure the error has our - // custom name and message so the stack prints correctly in all browsers. - var template = new Error(this.message); - template.name = this.name; - - /** @override */ - this.stack = template.stack || ''; -}; -goog.inherits(bot.Error, Error); - - -/** - * Status strings enumerated in the W3C WebDriver working draft. - * @enum {string} - * @see http://www.w3.org/TR/webdriver/#status-codes - */ -bot.Error.State = { - ELEMENT_NOT_SELECTABLE: 'element not selectable', - ELEMENT_NOT_VISIBLE: 'element not visible', - IME_ENGINE_ACTIVATION_FAILED: 'ime engine activation failed', - IME_NOT_AVAILABLE: 'ime not available', - INVALID_COOKIE_DOMAIN: 'invalid cookie domain', - INVALID_ELEMENT_COORDINATES: 'invalid element coordinates', - INVALID_ELEMENT_STATE: 'invalid element state', - INVALID_SELECTOR: 'invalid selector', - JAVASCRIPT_ERROR: 'javascript error', - MOVE_TARGET_OUT_OF_BOUNDS: 'move target out of bounds', - NO_SUCH_ALERT: 'no such alert', - NO_SUCH_DOM: 'no such dom', - NO_SUCH_ELEMENT: 'no such element', - NO_SUCH_FRAME: 'no such frame', - NO_SUCH_WINDOW: 'no such window', - SCRIPT_TIMEOUT: 'script timeout', - SESSION_NOT_CREATED: 'session not created', - STALE_ELEMENT_REFERENCE: 'stale element reference', - SUCCESS: 'success', - TIMEOUT: 'timeout', - UNABLE_TO_SET_COOKIE: 'unable to set cookie', - UNEXPECTED_ALERT_OPEN: 'unexpected alert open', - UNKNOWN_COMMAND: 'unknown command', - UNKNOWN_ERROR: 'unknown error', - UNSUPPORTED_OPERATION: 'unsupported operation' -}; - - -/** - * A map of error codes to state string. - * @private {!Object.<bot.ErrorCode, bot.Error.State>} - */ -bot.Error.CODE_TO_STATE_ = {}; -goog.scope(function() { - var map = bot.Error.CODE_TO_STATE_; - var code = bot.ErrorCode; - var state = bot.Error.State; - - map[code.ELEMENT_NOT_SELECTABLE] = state.ELEMENT_NOT_SELECTABLE; - map[code.ELEMENT_NOT_VISIBLE] = state.ELEMENT_NOT_VISIBLE; - map[code.IME_ENGINE_ACTIVATION_FAILED] = state.IME_ENGINE_ACTIVATION_FAILED; - map[code.IME_NOT_AVAILABLE] = state.IME_NOT_AVAILABLE; - map[code.INVALID_COOKIE_DOMAIN] = state.INVALID_COOKIE_DOMAIN; - map[code.INVALID_ELEMENT_COORDINATES] = state.INVALID_ELEMENT_COORDINATES; - map[code.INVALID_ELEMENT_STATE] = state.INVALID_ELEMENT_STATE; - map[code.INVALID_SELECTOR_ERROR] = state.INVALID_SELECTOR; - map[code.INVALID_XPATH_SELECTOR] = state.INVALID_SELECTOR; - map[code.INVALID_XPATH_SELECTOR_RETURN_TYPE] = state.INVALID_SELECTOR; - map[code.JAVASCRIPT_ERROR] = state.JAVASCRIPT_ERROR; - map[code.METHOD_NOT_ALLOWED] = state.UNSUPPORTED_OPERATION; - map[code.MOVE_TARGET_OUT_OF_BOUNDS] = state.MOVE_TARGET_OUT_OF_BOUNDS; - map[code.NO_MODAL_DIALOG_OPEN] = state.NO_SUCH_ALERT; - map[code.NO_SUCH_ELEMENT] = state.NO_SUCH_ELEMENT; - map[code.NO_SUCH_FRAME] = state.NO_SUCH_FRAME; - map[code.NO_SUCH_WINDOW] = state.NO_SUCH_WINDOW; - map[code.SCRIPT_TIMEOUT] = state.SCRIPT_TIMEOUT; - map[code.SESSION_NOT_CREATED] = state.SESSION_NOT_CREATED; - map[code.STALE_ELEMENT_REFERENCE] = state.STALE_ELEMENT_REFERENCE; - map[code.SUCCESS] = state.SUCCESS; - map[code.TIMEOUT] = state.TIMEOUT; - map[code.UNABLE_TO_SET_COOKIE] = state.UNABLE_TO_SET_COOKIE; - map[code.MODAL_DIALOG_OPENED] = state.UNEXPECTED_ALERT_OPEN; - map[code.UNKNOWN_ERROR] = state.UNKNOWN_ERROR; - map[code.UNSUPPORTED_OPERATION] = state.UNKNOWN_COMMAND; -}); // goog.scope - - -/** - * Flag used for duck-typing when this code is embedded in a Firefox extension. - * This is required since an Error thrown in one component and then reported - * to another will fail instanceof checks in the second component. - * @type {boolean} - */ -bot.Error.prototype.isAutomationError = true; - - -if (goog.DEBUG) { - /** @return {string} The string representation of this error. */ - bot.Error.prototype.toString = function() { - return this.name + ': ' + this.message; - }; -} -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Functions to do with firing and simulating events. - */ - - -goog.provide('bot.events'); -goog.provide('bot.events.EventArgs'); -goog.provide('bot.events.EventType'); -goog.provide('bot.events.KeyboardArgs'); -goog.provide('bot.events.MSGestureArgs'); -goog.provide('bot.events.MSPointerArgs'); -goog.provide('bot.events.MouseArgs'); -goog.provide('bot.events.Touch'); -goog.provide('bot.events.TouchArgs'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.userAgent'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.style'); -goog.require('goog.userAgent'); -goog.require('goog.userAgent.product'); - - -/** - * Whether the browser supports the construction of touch events. - * - * @const - * @type {boolean} - */ -bot.events.SUPPORTS_TOUCH_EVENTS = !(goog.userAgent.IE && - !bot.userAgent.isEngineVersion(10)) && - !goog.userAgent.OPERA; - - -/** - * Whether the browser supports a native touch api. - * - * @const - * @private {boolean} - */ -bot.events.BROKEN_TOUCH_API_ = (function() { - if (goog.userAgent.product.ANDROID) { - // Native touch api supported starting in version 4.0 (Ice Cream Sandwich). - return !bot.userAgent.isProductVersion(4); - } - return !bot.userAgent.IOS; -})(); - - -/** - * Whether the browser supports the construction of MSPointer events. - * - * @const - * @type {boolean} - */ -bot.events.SUPPORTS_MSPOINTER_EVENTS = - goog.userAgent.IE && bot.getWindow().navigator.msPointerEnabled; - - -/** - * Arguments to initialize an event. - * - * @typedef {bot.events.MouseArgs|bot.events.KeyboardArgs|bot.events.TouchArgs| - bot.events.MSGestureArgs|bot.events.MSPointerArgs} - */ -bot.events.EventArgs; - - -/** - * Arguments to initialize a mouse event. - * - * @typedef {{clientX: number, - * clientY: number, - * button: number, - * altKey: boolean, - * ctrlKey: boolean, - * shiftKey: boolean, - * metaKey: boolean, - * relatedTarget: Element, - * wheelDelta: number}} - */ -bot.events.MouseArgs; - - -/** - * Arguments to initialize a keyboard event. - * - * @typedef {{keyCode: number, - * charCode: number, - * altKey: boolean, - * ctrlKey: boolean, - * shiftKey: boolean, - * metaKey: boolean, - * preventDefault: boolean}} - */ -bot.events.KeyboardArgs; - - -/** - * Argument to initialize a touch event. - * - * @typedef {{touches: !Array.<bot.events.Touch>, - * targetTouches: !Array.<bot.events.Touch>, - * changedTouches: !Array.<bot.events.Touch>, - * altKey: boolean, - * ctrlKey: boolean, - * shiftKey: boolean, - * metaKey: boolean, - * relatedTarget: Element, - * scale: number, - * rotation: number}} - */ -bot.events.TouchArgs; - - -/** - * @typedef {{identifier: number, - * screenX: number, - * screenY: number, - * clientX: number, - * clientY: number, - * pageX: number, - * pageY: number}} - */ -bot.events.Touch; - - -/** - * Arguments to initialize an MSGesture event. - * - * @typedef {{clientX: number, - * clientY: number, - * translationX: number, - * translationY: number, - * scale: number, - * expansion: number, - * rotation: number, - * velocityX: number, - * velocityY: number, - * velocityExpansion: number, - * velocityAngular: number, - * relatedTarget: Element}} - */ -bot.events.MSGestureArgs; - - -/** - * Arguments to initialize an MSPointer event. - * - * @typedef {{clientX: number, - * clientY: number, - * button: number, - * altKey: boolean, - * ctrlKey: boolean, - * shiftKey: boolean, - * metaKey: boolean, - * relatedTarget: Element, - * width: number, - * height: number, - * pressure: number, - * rotation: number, - * pointerId: number, - * tiltX: number, - * tiltY: number, - * pointerType: number, - * isPrimary: boolean}} - */ -bot.events.MSPointerArgs; - - - -/** - * Factory for event objects of a specific type. - * - * @constructor - * @param {string} type Type of the created events. - * @param {boolean} bubbles Whether the created events bubble. - * @param {boolean} cancelable Whether the created events are cancelable. - * @private - */ -bot.events.EventFactory_ = function(type, bubbles, cancelable) { - /** @private {string} */ - this.type_ = type; - - /** @private {boolean} */ - this.bubbles_ = bubbles; - - /** @private {boolean} */ - this.cancelable_ = cancelable; -}; - - -/** - * Creates an event. - * - * @param {!Element} target Target element of the event. - * @param {bot.events.EventArgs=} opt_args Event arguments. - * @return {!Event} Newly created event. - */ -bot.events.EventFactory_.prototype.create = function(target, opt_args) { - var doc = goog.dom.getOwnerDocument(target); - var event; - - if (bot.userAgent.IE_DOC_PRE9) { - event = doc.createEventObject(); - } else { - event = doc.createEvent('HTMLEvents'); - event.initEvent(this.type_, this.bubbles_, this.cancelable_); - } - - return event; -}; - - -/** - * Overriding toString to return the unique type string improves debugging, - * and it allows event types to be mapped in JS objects without collisions. - * - * @return {string} String representation of the event type. - */ -bot.events.EventFactory_.prototype.toString = function() { - return this.type_; -}; - - - -/** - * Factory for mouse event objects of a specific type. - * - * @constructor - * @param {string} type Type of the created events. - * @param {boolean} bubbles Whether the created events bubble. - * @param {boolean} cancelable Whether the created events are cancelable. - * @extends {bot.events.EventFactory_} - * @private - */ -bot.events.MouseEventFactory_ = function(type, bubbles, cancelable) { - goog.base(this, type, bubbles, cancelable); -}; -goog.inherits(bot.events.MouseEventFactory_, bot.events.EventFactory_); - - -/** - * @override - */ -bot.events.MouseEventFactory_.prototype.create = function(target, opt_args) { - // Only Gecko supports the mouse pixel scroll event. - if (!goog.userAgent.GECKO && this == bot.events.EventType.MOUSEPIXELSCROLL) { - throw new bot.Error(bot.ErrorCode.UNSUPPORTED_OPERATION, - 'Browser does not support a mouse pixel scroll event.'); - } - - var args = (/** @type {!bot.events.MouseArgs} */ opt_args); - var doc = goog.dom.getOwnerDocument(target); - var event; - - if (bot.userAgent.IE_DOC_PRE9) { - event = doc.createEventObject(); - event.altKey = args.altKey; - event.ctrlKey = args.ctrlKey; - event.metaKey = args.metaKey; - event.shiftKey = args.shiftKey; - event.button = args.button; - - // NOTE: ie8 does a strange thing with the coordinates passed in the event: - // - if offset{X,Y} coordinates are specified, they are also used for - // client{X,Y}, event if client{X,Y} are also specified. - // - if only client{X,Y} are specified, they are also used for offset{x,y} - // Thus, for ie8, it is impossible to set both offset and client - // and have them be correct when they come out on the other side. - event.clientX = args.clientX; - event.clientY = args.clientY; - - // Sets a property of the event object using Object.defineProperty. - // Some readonly properties of the IE event object can only be set this way. - var setEventProperty = function(prop, value) { - Object.defineProperty(event, prop, { - get: function() { - return value; - } - }); - }; - - // IE has fromElement and toElement properties, no relatedTarget property. - // IE does not allow fromElement and toElement to be set directly, but - // Object.defineProperty can redefine them, when it is available. Do not - // use Object.defineProperties (plural) because it is even less supported. - // If defineProperty is unavailable, fall back to setting the relatedTarget, - // which many event frameworks, including jQuery and Closure, forgivingly - // pass on as the relatedTarget on their event object abstraction. - if (this == bot.events.EventType.MOUSEOUT || - this == bot.events.EventType.MOUSEOVER) { - if (Object.defineProperty) { - var out = (this == bot.events.EventType.MOUSEOUT); - setEventProperty('fromElement', out ? target : args.relatedTarget); - setEventProperty('toElement', out ? args.relatedTarget : target); - } else { - event.relatedTarget = args.relatedTarget; - } - } - - // IE does not allow the wheelDelta property to be set directly, so we can - // only do it where defineProperty is supported; otherwise store the wheel - // delta in the event "detail" as a last resort in case the app looks there. - if (this == bot.events.EventType.MOUSEWHEEL) { - if (Object.defineProperty) { - setEventProperty('wheelDelta', args.wheelDelta); - } else { - event.detail = args.wheelDelta; - } - } - } else { - var view = goog.dom.getWindow(doc); - event = doc.createEvent('MouseEvents'); - var detail = 1; - - // All browser but Firefox provide the wheelDelta value in the event. - // Firefox provides the scroll amount in the detail field, where it has the - // opposite polarity of the wheelDelta (upward scroll is negative) and is a - // factor of 40 less than the wheelDelta value. Opera provides both values. - // The wheelDelta value is normally some multiple of 40. - if (this == bot.events.EventType.MOUSEWHEEL) { - if (!goog.userAgent.GECKO) { - event.wheelDelta = args.wheelDelta; - } - if (goog.userAgent.GECKO || goog.userAgent.OPERA) { - detail = args.wheelDelta / -40; - } - } - - // Only Gecko supports a mouse pixel scroll event, so we use it as the - // "standard" and pass it along as is as the "detail" of the event. - if (goog.userAgent.GECKO && this == bot.events.EventType.MOUSEPIXELSCROLL) { - detail = args.wheelDelta; - } - - event.initMouseEvent(this.type_, this.bubbles_, this.cancelable_, view, - detail, /*screenX*/ 0, /*screenY*/ 0, args.clientX, args.clientY, - args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, args.button, - args.relatedTarget); - - // Trying to modify the properties throws an error, - // so we define getters to return the correct values. - if (goog.userAgent.IE && - event.pageX === 0 && event.pageY === 0 && Object.defineProperty) { - var scrollElem = goog.dom.getDomHelper(target).getDocumentScrollElement(); - var clientElem = goog.style.getClientViewportElement(target); - var pageX = args.clientX + scrollElem.scrollLeft - clientElem.clientLeft; - var pageY = args.clientY + scrollElem.scrollTop - clientElem.clientTop; - - Object.defineProperty(event, 'pageX', { - get: function() { - return pageX; - } - }); - Object.defineProperty(event, 'pageY', { - get: function() { - return pageY; - } - }); - } - } - - return event; -}; - - - -/** - * Factory for keyboard event objects of a specific type. - * - * @constructor - * @param {string} type Type of the created events. - * @param {boolean} bubbles Whether the created events bubble. - * @param {boolean} cancelable Whether the created events are cancelable. - * @extends {bot.events.EventFactory_} - * @private - */ -bot.events.KeyboardEventFactory_ = function(type, bubbles, cancelable) { - goog.base(this, type, bubbles, cancelable); -}; -goog.inherits(bot.events.KeyboardEventFactory_, bot.events.EventFactory_); - - -/** - * @override - */ -bot.events.KeyboardEventFactory_.prototype.create = function(target, opt_args) { - var args = (/** @type {!bot.events.KeyboardArgs} */ opt_args); - var doc = goog.dom.getOwnerDocument(target); - var event; - - if (goog.userAgent.GECKO) { - var view = goog.dom.getWindow(doc); - var keyCode = args.charCode ? 0 : args.keyCode; - event = doc.createEvent('KeyboardEvent'); - event.initKeyEvent(this.type_, this.bubbles_, this.cancelable_, view, - args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, keyCode, - args.charCode); - // https://bugzilla.mozilla.org/show_bug.cgi?id=501496 - if (this.type_ == bot.events.EventType.KEYPRESS && args.preventDefault) { - event.preventDefault(); - } - } else { - if (bot.userAgent.IE_DOC_PRE9) { - event = doc.createEventObject(); - } else { // WebKit, Opera, and IE 9+ in Standards mode. - event = doc.createEvent('Events'); - event.initEvent(this.type_, this.bubbles_, this.cancelable_); - } - event.altKey = args.altKey; - event.ctrlKey = args.ctrlKey; - event.metaKey = args.metaKey; - event.shiftKey = args.shiftKey; - event.keyCode = args.charCode || args.keyCode; - if (goog.userAgent.WEBKIT) { - event.charCode = (this == bot.events.EventType.KEYPRESS) ? - event.keyCode : 0; - } - } - - return event; -}; - - - -/** - * Factory for touch event objects of a specific type. - * - * @constructor - * @param {string} type Type of the created events. - * @param {boolean} bubbles Whether the created events bubble. - * @param {boolean} cancelable Whether the created events are cancelable. - * @extends {bot.events.EventFactory_} - * @private - */ -bot.events.TouchEventFactory_ = function(type, bubbles, cancelable) { - goog.base(this, type, bubbles, cancelable); -}; -goog.inherits(bot.events.TouchEventFactory_, bot.events.EventFactory_); - - -/** - * @override - */ -bot.events.TouchEventFactory_.prototype.create = function(target, opt_args) { - if (!bot.events.SUPPORTS_TOUCH_EVENTS) { - throw new bot.Error(bot.ErrorCode.UNSUPPORTED_OPERATION, - 'Browser does not support firing touch events.'); - } - - var args = (/** @type {!bot.events.TouchArgs} */ opt_args); - var doc = goog.dom.getOwnerDocument(target); - var view = goog.dom.getWindow(doc); - - // Creates a TouchList, using native touch Api, for touch events. - function createNativeTouchList(touchListArgs) { - var touches = goog.array.map(touchListArgs, function(touchArg) { - return doc.createTouch(view, target, touchArg.identifier, - touchArg.pageX, touchArg.pageY, touchArg.screenX, touchArg.screenY); - }); - - return doc.createTouchList.apply(doc, touches); - } - - // Creates a TouchList, using simulated touch Api, for touch events. - function createGenericTouchList(touchListArgs) { - var touches = goog.array.map(touchListArgs, function(touchArg) { - // The target field is not part of the W3C spec, but both android and iOS - // add the target field to each touch. - return { - identifier: touchArg.identifier, - screenX: touchArg.screenX, - screenY: touchArg.screenY, - clientX: touchArg.clientX, - clientY: touchArg.clientY, - pageX: touchArg.pageX, - pageY: touchArg.pageY, - target: target - }; - }); - touches.item = function(i) { - return touches[i]; - }; - return touches; - } - - function createTouchList(touches) { - return bot.events.BROKEN_TOUCH_API_ ? - createGenericTouchList(touches) : - createNativeTouchList(touches); - } - - // As a performance optimization, reuse the created touchlist when the lists - // are the same, which is often the case in practice. - var changedTouches = createTouchList(args.changedTouches); - var touches = (args.touches == args.changedTouches) ? - changedTouches : createTouchList(args.touches); - var targetTouches = (args.targetTouches == args.changedTouches) ? - changedTouches : createTouchList(args.targetTouches); - - var event; - if (bot.events.BROKEN_TOUCH_API_) { - event = doc.createEvent('MouseEvents'); - event.initMouseEvent(this.type_, this.bubbles_, this.cancelable_, view, - /*detail*/ 1, /*screenX*/ 0, /*screenY*/ 0, args.clientX, args.clientY, - args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, /*button*/ 0, - args.relatedTarget); - event.touches = touches; - event.targetTouches = targetTouches; - event.changedTouches = changedTouches; - event.scale = args.scale; - event.rotation = args.rotation; - } else { - event = doc.createEvent('TouchEvent'); - if (goog.userAgent.product.ANDROID) { - // Android's initTouchEvent method is not compliant with the W3C spec. - event.initTouchEvent(touches, targetTouches, changedTouches, - this.type_, view, /*screenX*/ 0, /*screenY*/ 0, args.clientX, - args.clientY, args.ctrlKey, args.altKey, args.shiftKey, args.metaKey); - } else { - event.initTouchEvent(this.type_, this.bubbles_, this.cancelable_, view, - /*detail*/ 1, /*screenX*/ 0, /*screenY*/ 0, args.clientX, - args.clientY, args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, - touches, targetTouches, changedTouches, args.scale, args.rotation); - } - event.relatedTarget = args.relatedTarget; - } - - return event; -}; - - - -/** - * Factory for MSGesture event objects of a specific type. - * - * @constructor - * @param {string} type Type of the created events. - * @param {boolean} bubbles Whether the created events bubble. - * @param {boolean} cancelable Whether the created events are cancelable. - * @extends {bot.events.EventFactory_} - * @private - */ -bot.events.MSGestureEventFactory_ = function(type, bubbles, cancelable) { - goog.base(this, type, bubbles, cancelable); -}; -goog.inherits(bot.events.MSGestureEventFactory_, bot.events.EventFactory_); - - -/** - * @override - */ -bot.events.MSGestureEventFactory_.prototype.create = function(target, - opt_args) { - if (!bot.events.SUPPORTS_MSPOINTER_EVENTS) { - throw new bot.Error(bot.ErrorCode.UNSUPPORTED_OPERATION, - 'Browser does not support MSGesture events.'); - } - - var args = (/** @type {!bot.events.MSGestureArgs} */ opt_args); - var doc = goog.dom.getOwnerDocument(target); - var view = goog.dom.getWindow(doc); - var event = doc.createEvent('MSGestureEvent'); - var timestamp = (new Date).getTime(); - - // See http://msdn.microsoft.com/en-us/library/windows/apps/hh441187.aspx - event.initGestureEvent(this.type_, this.bubbles_, this.cancelable_, view, - /*detail*/ 1, /*screenX*/ 0, /*screenY*/ 0, - args.clientX, args.clientY, /*offsetX*/ 0, - /*offsetY*/ 0, args.translationX, args.translationY, - args.scale, args.expansion, args.rotation, - args.velocityX, args.velocityY, args.velocityExpansion, - args.velocityAngular, timestamp, args.relatedTarget); - return event; -}; - - - -/** - * Factory for MSPointer event objects of a specific type. - * - * @constructor - * @param {string} type Type of the created events. - * @param {boolean} bubbles Whether the created events bubble. - * @param {boolean} cancelable Whether the created events are cancelable. - * @extends {bot.events.EventFactory_} - * @private - */ -bot.events.MSPointerEventFactory_ = function(type, bubbles, cancelable) { - goog.base(this, type, bubbles, cancelable); -}; -goog.inherits(bot.events.MSPointerEventFactory_, bot.events.EventFactory_); - - -/** - * @override - * @suppress {checkTypes} Closure compiler externs don't know about pointer - * events - */ -bot.events.MSPointerEventFactory_.prototype.create = function(target, - opt_args) { - if (!bot.events.SUPPORTS_MSPOINTER_EVENTS) { - throw new bot.Error(bot.ErrorCode.UNSUPPORTED_OPERATION, - 'Browser does not support MSPointer events.'); - } - - var args = (/** @type {!bot.events.MSPointerArgs} */ opt_args); - var doc = goog.dom.getOwnerDocument(target); - var view = goog.dom.getWindow(doc); - var event = doc.createEvent('MSPointerEvent'); - - // See http://msdn.microsoft.com/en-us/library/ie/hh772109(v=vs.85).aspx - event.initPointerEvent(this.type_, this.bubbles_, this.cancelable_, view, - /*detail*/ 0, /*screenX*/ 0, /*screenY*/ 0, - args.clientX, args.clientY, args.ctrlKey, args.altKey, - args.shiftKey, args.metaKey, args.button, - args.relatedTarget, /*offsetX*/ 0, /*offsetY*/ 0, - args.width, args.height, args.pressure, args.rotation, - args.tiltX, args.tiltY, args.pointerId, - args.pointerType, /*hwTimeStamp*/ 0, args.isPrimary); - - return event; -}; - - -/** - * The types of events this modules supports firing. - * - * <p>To see which events bubble and are cancelable, see: - * http://en.wikipedia.org/wiki/DOM_events - * - * @enum {!Object} - */ -bot.events.EventType = { - BLUR: new bot.events.EventFactory_('blur', false, false), - CHANGE: new bot.events.EventFactory_('change', true, false), - FOCUS: new bot.events.EventFactory_('focus', false, false), - FOCUSIN: new bot.events.EventFactory_('focusin', true, false), - FOCUSOUT: new bot.events.EventFactory_('focusout', true, false), - INPUT: new bot.events.EventFactory_('input', false, false), - PROPERTYCHANGE: new bot.events.EventFactory_('propertychange', false, false), - SELECT: new bot.events.EventFactory_('select', true, false), - SUBMIT: new bot.events.EventFactory_('submit', true, true), - TEXTINPUT: new bot.events.EventFactory_('textInput', true, true), - - // Mouse events. - CLICK: new bot.events.MouseEventFactory_('click', true, true), - CONTEXTMENU: new bot.events.MouseEventFactory_('contextmenu', true, true), - DBLCLICK: new bot.events.MouseEventFactory_('dblclick', true, true), - MOUSEDOWN: new bot.events.MouseEventFactory_('mousedown', true, true), - MOUSEMOVE: new bot.events.MouseEventFactory_('mousemove', true, false), - MOUSEOUT: new bot.events.MouseEventFactory_('mouseout', true, true), - MOUSEOVER: new bot.events.MouseEventFactory_('mouseover', true, true), - MOUSEUP: new bot.events.MouseEventFactory_('mouseup', true, true), - MOUSEWHEEL: new bot.events.MouseEventFactory_( - goog.userAgent.GECKO ? 'DOMMouseScroll' : 'mousewheel', true, true), - MOUSEPIXELSCROLL: new bot.events.MouseEventFactory_( - 'MozMousePixelScroll', true, true), - - // Keyboard events. - KEYDOWN: new bot.events.KeyboardEventFactory_('keydown', true, true), - KEYPRESS: new bot.events.KeyboardEventFactory_('keypress', true, true), - KEYUP: new bot.events.KeyboardEventFactory_('keyup', true, true), - - // Touch events. - TOUCHEND: new bot.events.TouchEventFactory_('touchend', true, true), - TOUCHMOVE: new bot.events.TouchEventFactory_('touchmove', true, true), - TOUCHSTART: new bot.events.TouchEventFactory_('touchstart', true, true), - - // MSGesture events - MSGESTURECHANGE: new bot.events.MSGestureEventFactory_( - 'MSGestureChange', true, true), - MSGESTUREEND: new bot.events.MSGestureEventFactory_( - 'MSGestureEnd', true, true), - MSGESTUREHOLD: new bot.events.MSGestureEventFactory_( - 'MSGestureHold', true, true), - MSGESTURESTART: new bot.events.MSGestureEventFactory_( - 'MSGestureStart', true, true), - MSGESTURETAP: new bot.events.MSGestureEventFactory_( - 'MSGestureTap', true, true), - MSINERTIASTART: new bot.events.MSGestureEventFactory_( - 'MSInertiaStart', true, true), - - // MSPointer events - MSPOINTERDOWN: new bot.events.MSPointerEventFactory_( - 'MSPointerDown', true, true), - MSPOINTERMOVE: new bot.events.MSPointerEventFactory_( - 'MSPointerMove', true, true), - MSPOINTEROVER: new bot.events.MSPointerEventFactory_( - 'MSPointerOver', true, true), - MSPOINTEROUT: new bot.events.MSPointerEventFactory_( - 'MSPointerOut', true, true), - MSPOINTERUP: new bot.events.MSPointerEventFactory_( - 'MSPointerUp', true, true) -}; - - -/** - * Fire a named event on a particular element. - * - * @param {!Element} target The element on which to fire the event. - * @param {!bot.events.EventType} type Event type. - * @param {bot.events.EventArgs=} opt_args Arguments to initialize the event. - * @return {boolean} Whether the event fired successfully or was cancelled. - */ -bot.events.fire = function(target, type, opt_args) { - var factory = /** @type {!bot.events.EventFactory_} */ (type); - var event = factory.create(target, opt_args); - - // Ensure the event's isTrusted property is set to false, so that - // bot.events.isSynthetic() can identify synthetic events from native ones. - if (!('isTrusted' in event)) { - event['isTrusted'] = false; - } - - if (bot.userAgent.IE_DOC_PRE9) { - return target.fireEvent('on' + factory.type_, event); - } else { - return target.dispatchEvent(event); - } -}; - - -/** - * Returns whether the event was synthetically created by the atoms; - * if false, was created by the browser in response to a live user action. - * - * @param {!(Event|goog.events.BrowserEvent)} event An event. - * @return {boolean} Whether the event was synthetically created. - */ -bot.events.isSynthetic = function(event) { - var e = event.getBrowserEvent ? event.getBrowserEvent() : event; - return 'isTrusted' in e ? !e['isTrusted'] : false; -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atoms for frame handling. - * - */ - - -goog.provide('bot.frame'); - -goog.require('bot.locators'); -goog.require('goog.dom'); -goog.require('goog.dom.TagName'); - - -/** - * @return {!Window} The top window. - */ -bot.frame.defaultContent = function() { - return bot.getWindow().top; -}; - - -/** - * @return {!Element} The currently active element. - */ -bot.frame.activeElement = function() { - return document.activeElement || document.body; -}; - - -/** - * Returns a reference to the window object corresponding to the given element. - * Note that the element must be a frame or an iframe. - * - * @param {!(HTMLIFrameElement|HTMLFrameElement)} element The iframe or frame - * element. - * @return {Window} The window reference for the given iframe or frame element. - */ -bot.frame.getFrameWindow = function(element) { - if (bot.frame.isFrame_(element)) { - var frame = /** @type {HTMLFrameElement|HTMLIFrameElement} */ (element); - return goog.dom.getFrameContentWindow(frame); - } - throw new bot.Error(bot.ErrorCode.NO_SUCH_FRAME, - "The given element isn't a frame or an iframe."); -}; - - -/** - * Returns whether an element is a frame (or iframe). - * - * @param {!Element} element The element to check. - * @return {boolean} Whether the element is a frame (or iframe). - * @private - */ -bot.frame.isFrame_ = function(element) { - return bot.dom.isElement(element, goog.dom.TagName.FRAME) || - bot.dom.isElement(element, goog.dom.TagName.IFRAME); -}; - - -/** - * Looks for a frame by its name or id (preferring name over id) - * under the given root. If no frame was found, we look for an - * iframe by name or id. - * - * @param {(string|number)} nameOrId The frame's name, the frame's id, or the - * index of the frame in the containing window. - * @param {!Window=} opt_root The window to perform the search under. - * Defaults to {@code bot.getWindow()}. - * @return {Window} The window if found, null otherwise. - */ -bot.frame.findFrameByNameOrId = function(nameOrId, opt_root) { - var domWindow = opt_root || bot.getWindow(); - - // Lookup frame by name - var numFrames = domWindow.frames.length; - for (var i = 0; i < numFrames; i++) { - var frame = domWindow.frames[i]; - var frameElement = frame.frameElement || frame; - if (frameElement.name == nameOrId) { - // This is needed because Safari 4 returns - // an HTMLFrameElement instead of a Window object. - if (frame.document) { - return frame; - } else { - return goog.dom.getFrameContentWindow(frame); - } - } - } - - // Lookup frame by id - var elements = bot.locators.findElements({id: nameOrId}, domWindow.document); - for (var i = 0; i < elements.length; i++) { - if (bot.frame.isFrame_(elements[i])) { - return goog.dom.getFrameContentWindow(elements[i]); - } - } - return null; -}; - - -/** - * Looks for a frame by its index under the given root. - * - * @param {number} index The frame's index. - * @param {!Window=} opt_root The window to perform - * the search under. Defaults to {@code bot.getWindow()}. - * @return {Window} The frame if found, null otherwise. - */ -bot.frame.findFrameByIndex = function(index, opt_root) { - var domWindow = opt_root || bot.getWindow(); - return domWindow.frames[index] || null; -}; - - -/** - * Gets the index of a frame in the given window. Note that the element must - * be a frame or an iframe. - * - * @param {!(HTMLIFrameElement|HTMLFrameElement)} element The iframe or frame - * element. - * @param {!Window=} opt_root The window to perform the search under. Defaults - * to {@code bot.getWindow()}. - * @return {?number} The index of the frame if found, null otherwise. - */ -bot.frame.getFrameIndex = function(element, opt_root) { - try { - var elementWindow = element.contentWindow; - } catch (e) { - // Happens in IE{7,8} if a frame doesn't have an enclosing frameset. - return null; - } - - if (!bot.frame.isFrame_(element)) { - return null; - } - - var domWindow = opt_root || bot.getWindow(); - for (var i = 0; i < domWindow.frames.length; i++) { - if (elementWindow == domWindow.frames[i]) { - return i; - } - } - return null; -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Browser atom for injecting JavaScript into the page under - * test. There is no point in using this atom directly from JavaScript. - * Instead, it is intended to be used in its compiled form when injecting - * script from another language (e.g. C++). - * - * TODO(jleyba): Add an example - */ - -goog.provide('bot.inject'); -goog.provide('bot.inject.cache'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.json'); -/** - * @suppress {extraRequire} Used as a forward declaration which causes - * compilation errors if missing. - */ -goog.require('bot.response.ResponseObject'); -goog.require('goog.array'); -goog.require('goog.dom.NodeType'); -goog.require('goog.object'); - - -/** - * Key used to identify DOM elements in the WebDriver wire protocol. - * @type {string} - * @const - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ -bot.inject.ELEMENT_KEY = 'ELEMENT'; - - -/** - * Key used to identify Window objects in the WebDriver wire protocol. - * @type {string} - * @const - */ -bot.inject.WINDOW_KEY = 'WINDOW'; - - -/** - * Converts an element to a JSON friendly value so that it can be - * stringified for transmission to the injector. Values are modified as - * follows: - * <ul> - * <li>booleans, numbers, strings, and null are returned as is</li> - * <li>undefined values are returned as null</li> - * <li>functions are returned as a string</li> - * <li>each element in an array is recursively processed</li> - * <li>DOM Elements are wrapped in object-literals as dictated by the - * WebDriver wire protocol</li> - * <li>all other objects will be treated as hash-maps, and will be - * recursively processed for any string and number key types (all - * other key types are discarded as they cannot be converted to JSON). - * </ul> - * - * @param {*} value The value to make JSON friendly. - * @return {*} The JSON friendly value. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ -bot.inject.wrapValue = function(value) { - switch (goog.typeOf(value)) { - case 'string': - case 'number': - case 'boolean': - return value; - - case 'function': - return value.toString(); - - case 'array': - return goog.array.map((/**@type {goog.array.ArrayLike}*/value), - bot.inject.wrapValue); - - case 'object': - // Since {*} expands to {Object|boolean|number|string|undefined}, the - // JSCompiler complains that it is too broad a type for the remainder of - // this block where {!Object} is expected. Downcast to prevent generating - // a ton of compiler warnings. - value = (/**@type {!Object}*/value); - - // Sniff out DOM elements. We're using duck-typing instead of an - // instanceof check since the instanceof might not always work - // (e.g. if the value originated from another Firefox component) - if (goog.object.containsKey(value, 'nodeType') && - (value['nodeType'] == goog.dom.NodeType.ELEMENT || - value['nodeType'] == goog.dom.NodeType.DOCUMENT)) { - var ret = {}; - ret[bot.inject.ELEMENT_KEY] = - bot.inject.cache.addElement((/**@type {!Element}*/value)); - return ret; - } - - // Check if this is a Window - if (goog.object.containsKey(value, 'document')) { - var ret = {}; - ret[bot.inject.WINDOW_KEY] = - bot.inject.cache.addElement((/**@type{!Window}*/value)); - return ret; - } - - if (goog.isArrayLike(value)) { - return goog.array.map((/**@type {goog.array.ArrayLike}*/value), - bot.inject.wrapValue); - } - - var filtered = goog.object.filter(value, function(val, key) { - return goog.isNumber(key) || goog.isString(key); - }); - return goog.object.map(filtered, bot.inject.wrapValue); - - default: // goog.typeOf(value) == 'undefined' || 'null' - return null; - } -}; - - -/** - * Unwraps any DOM element's encoded in the given {@code value}. - * @param {*} value The value to unwrap. - * @param {Document=} opt_doc The document whose cache to retrieve wrapped - * elements from. Defaults to the current document. - * @return {*} The unwrapped value. - * @private - */ -bot.inject.unwrapValue_ = function(value, opt_doc) { - if (goog.isArray(value)) { - return goog.array.map((/**@type {goog.array.ArrayLike}*/value), - function(v) { return bot.inject.unwrapValue_(v, opt_doc); }); - } else if (goog.isObject(value)) { - if (typeof value == 'function') { - return value; - } - - if (goog.object.containsKey(value, bot.inject.ELEMENT_KEY)) { - return bot.inject.cache.getElement(value[bot.inject.ELEMENT_KEY], - opt_doc); - } - - if (goog.object.containsKey(value, bot.inject.WINDOW_KEY)) { - return bot.inject.cache.getElement(value[bot.inject.WINDOW_KEY], - opt_doc); - } - - return goog.object.map(value, function(val) { - return bot.inject.unwrapValue_(val, opt_doc); - }); - } - return value; -}; - - -/** - * Recompiles {@code fn} in the context of another window so that the - * correct symbol table is used when the function is executed. This - * function assumes the {@code fn} can be decompiled to its source using - * {@code Function.prototype.toString} and that it only refers to symbols - * defined in the target window's context. - * - * @param {!(Function|string)} fn Either the function that shold be - * recompiled, or a string defining the body of an anonymous function - * that should be compiled in the target window's context. - * @param {!Window} theWindow The window to recompile the function in. - * @return {!Function} The recompiled function. - * @private - */ -bot.inject.recompileFunction_ = function(fn, theWindow) { - if (goog.isString(fn)) { - return new theWindow['Function'](fn); - } - return theWindow == window ? fn : new theWindow['Function']( - 'return (' + fn + ').apply(null,arguments);'); -}; - - -/** - * Executes an injected script. This function should never be called from - * within JavaScript itself. Instead, it is used from an external source that - * is injecting a script for execution. - * - * <p/>For example, in a WebDriver Java test, one might have: - * <pre><code> - * Object result = ((JavascriptExecutor) driver).executeScript( - * "return arguments[0] + arguments[1];", 1, 2); - * </code></pre> - * - * <p/>Once transmitted to the driver, this command would be injected into the - * page for evaluation as: - * <pre><code> - * bot.inject.executeScript( - * function() {return arguments[0] + arguments[1];}, - * [1, 2]); - * </code></pre> - * - * <p/>The details of how this actually gets injected for evaluation is left - * as an implementation detail for clients of this library. - * - * @param {!(Function|string)} fn Either the function to execute, or a string - * defining the body of an anonymous function that should be executed. This - * function should only contain references to symbols defined in the context - * of the current window. - * @param {Array.<*>} args An array of wrapped script arguments, as defined by - * the WebDriver wire protocol. - * @param {boolean=} opt_stringify Whether the result should be returned as a - * serialized JSON string. - * @param {!Window=} opt_window The window in whose context the function should - * be invoked; defaults to the current window. - * @return {!(string|bot.response.ResponseObject)} The response object. If - * opt_stringify is true, the result will be serialized and returned in - * string format. - */ -bot.inject.executeScript = function(fn, args, opt_stringify, opt_window) { - var win = opt_window || bot.getWindow(); - var ret; - try { - fn = bot.inject.recompileFunction_(fn, win); - var unwrappedArgs = (/**@type {Object}*/bot.inject.unwrapValue_(args, - win.document)); - ret = bot.inject.wrapResponse(fn.apply(null, unwrappedArgs)); - } catch (ex) { - ret = bot.inject.wrapError(ex); - } - return opt_stringify ? bot.json.stringify(ret) : ret; -}; - - -/** - * Executes an injected script, which is expected to finish asynchronously - * before the given {@code timeout}. When the script finishes or an error - * occurs, the given {@code onDone} callback will be invoked. This callback - * will have a single argument, a {@link bot.response.ResponseObject} object. - * - * The script signals its completion by invoking a supplied callback given - * as its last argument. The callback may be invoked with a single value. - * - * The script timeout event will be scheduled with the provided window, - * ensuring the timeout is synchronized with that window's event queue. - * Furthermore, asynchronous scripts do not work across new page loads; if an - * "unload" event is fired on the window while an asynchronous script is - * pending, the script will be aborted and an error will be returned. - * - * Like {@code bot.inject.executeScript}, this function should only be called - * from an external source. It handles wrapping and unwrapping of input/output - * values. - * - * @param {(function()|string)} fn Either the function to execute, or a string - * defining the body of an anonymous function that should be executed. - * @param {Array.<*>} args An array of wrapped script arguments, as defined by - * the WebDriver wire protocol. - * @param {number} timeout The amount of time, in milliseconds, the script - * should be permitted to run; must be non-negative. - * @param {function(string)|function(!bot.response.ResponseObject)} onDone - * The function to call when the given {@code fn} invokes its callback, - * or when an exception or timeout occurs. This will always be called. - * @param {boolean=} opt_stringify Whether the result should be returned as a - * serialized JSON string. - * @param {!Window=} opt_window The window to synchronize the script with; - * defaults to the current window. - */ -bot.inject.executeAsyncScript = function(fn, args, timeout, onDone, - opt_stringify, opt_window) { - var win = opt_window || window; - var timeoutId; - var responseSent = false; - - function sendResponse(status, value) { - if (!responseSent) { - if (win.removeEventListener) { - win.removeEventListener('unload', onunload, true); - } else { - win.detachEvent('onunload', onunload); - } - - win.clearTimeout(timeoutId); - if (status != bot.ErrorCode.SUCCESS) { - var err = new bot.Error(status, value.message || value + ''); - err.stack = value.stack; - value = bot.inject.wrapError(err); - } else { - value = bot.inject.wrapResponse(value); - } - onDone(opt_stringify ? bot.json.stringify(value) : value); - responseSent = true; - } - } - var sendError = goog.partial(sendResponse, bot.ErrorCode.UNKNOWN_ERROR); - - if (win.closed) { - sendError('Unable to execute script; the target window is closed.'); - return; - } - - fn = bot.inject.recompileFunction_(fn, win); - - args = /** @type {Array.<*>} */ (bot.inject.unwrapValue_(args, win.document)); - args.push(goog.partial(sendResponse, bot.ErrorCode.SUCCESS)); - - if (win.addEventListener) { - win.addEventListener('unload', onunload, true); - } else { - win.attachEvent('onunload', onunload); - } - - var startTime = goog.now(); - try { - fn.apply(win, args); - - // Register our timeout *after* the function has been invoked. This will - // ensure we don't timeout on a function that invokes its callback after - // a 0-based timeout. - timeoutId = win.setTimeout(function() { - sendResponse(bot.ErrorCode.SCRIPT_TIMEOUT, - Error('Timed out waiting for asyncrhonous script result ' + - 'after ' + (goog.now() - startTime) + ' ms')); - }, Math.max(0, timeout)); - } catch (ex) { - sendResponse(ex.code || bot.ErrorCode.UNKNOWN_ERROR, ex); - } - - function onunload() { - sendResponse(bot.ErrorCode.UNKNOWN_ERROR, - Error('Detected a page unload event; asynchronous script ' + - 'execution does not work across page loads.')); - } -}; - - -/** - * Wraps the response to an injected script that executed successfully so it - * can be JSON-ified for transmission to the process that injected this - * script. - * @param {*} value The script result. - * @return {{status:bot.ErrorCode,value:*}} The wrapped value. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Responses - */ -bot.inject.wrapResponse = function(value) { - return { - 'status': bot.ErrorCode.SUCCESS, - 'value': bot.inject.wrapValue(value) - }; -}; - - -/** - * Wraps a JavaScript error in an object-literal so that it can be JSON-ified - * for transmission to the process that injected this script. - * @param {Error} err The error to wrap. - * @return {{status:bot.ErrorCode,value:*}} The wrapped error object. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Failed_Commands - */ -bot.inject.wrapError = function(err) { - // TODO(user): Parse stackTrace - return { - 'status': goog.object.containsKey(err, 'code') ? - err['code'] : bot.ErrorCode.UNKNOWN_ERROR, - // TODO(user): Parse stackTrace - 'value': { - 'message': err.message - } - }; -}; - - -/** - * The property key used to store the element cache on the DOCUMENT node - * when it is injected into the page. Since compiling each browser atom results - * in a different symbol table, we must use this known key to access the cache. - * This ensures the same object is used between injections of different atoms. - * @const - * @private {string} - */ -bot.inject.cache.CACHE_KEY_ = '$wdc_'; - - -/** - * The prefix for each key stored in an cache. - * @type {string} - * @const - */ -bot.inject.cache.ELEMENT_KEY_PREFIX = ':wdc:'; - - -/** - * Retrieves the cache object for the given window. Will initialize the cache - * if it does not yet exist. - * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to - * the current document. - * @return {Object.<string, (Element|Window)>} The cache object. - * @private - */ -bot.inject.cache.getCache_ = function(opt_doc) { - var doc = opt_doc || document; - var cache = doc[bot.inject.cache.CACHE_KEY_]; - if (!cache) { - cache = doc[bot.inject.cache.CACHE_KEY_] = {}; - // Store the counter used for generated IDs in the cache so that it gets - // reset whenever the cache does. - cache.nextId = goog.now(); - } - // Sometimes the nextId does not get initialized and returns NaN - // TODO: Generate UID on the fly instead. - if (!cache.nextId) { - cache.nextId = goog.now(); - } - return cache; -}; - - -/** - * Adds an element to its ownerDocument's cache. - * @param {(Element|Window)} el The element or Window object to add. - * @return {string} The key generated for the cached element. - */ -bot.inject.cache.addElement = function(el) { - // Check if the element already exists in the cache. - var cache = bot.inject.cache.getCache_(el.ownerDocument); - var id = goog.object.findKey(cache, function(value) { - return value == el; - }); - if (!id) { - id = bot.inject.cache.ELEMENT_KEY_PREFIX + cache.nextId++; - cache[id] = el; - } - return id; -}; - - -/** - * Retrieves an element from the cache. Will verify that the element is - * still attached to the DOM before returning. - * @param {string} key The element's key in the cache. - * @param {Document=} opt_doc The document whose cache to retrieve the element - * from. Defaults to the current document. - * @return {Element|Window} The cached element. - */ -bot.inject.cache.getElement = function(key, opt_doc) { - key = decodeURIComponent(key); - var doc = opt_doc || document; - var cache = bot.inject.cache.getCache_(doc); - if (!goog.object.containsKey(cache, key)) { - // Throw STALE_ELEMENT_REFERENCE instead of NO_SUCH_ELEMENT since the - // key may have been defined by a prior document's cache. - throw new bot.Error(bot.ErrorCode.STALE_ELEMENT_REFERENCE, - 'Element does not exist in cache'); - } - - var el = cache[key]; - - // If this is a Window check if it's closed - if (goog.object.containsKey(el, 'setInterval')) { - if (el.closed) { - delete cache[key]; - throw new bot.Error(bot.ErrorCode.NO_SUCH_WINDOW, - 'Window has been closed.'); - } - return el; - } - - // Make sure the element is still attached to the DOM before returning. - var node = el; - while (node) { - if (node == doc.documentElement) { - return el; - } - node = node.parentNode; - } - delete cache[key]; - throw new bot.Error(bot.ErrorCode.STALE_ELEMENT_REFERENCE, - 'Element is no longer attached to the DOM'); -}; - -// Copyright 2012 WebDriver committers -// Copyright 2012 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Provides JSON utilities that uses native JSON parsing where - * possible (a feature not currently offered by Closure). - */ - -goog.provide('bot.json'); - -goog.require('bot.userAgent'); -goog.require('goog.json'); -goog.require('goog.userAgent'); - - -/** - * @define {boolean} NATIVE_JSON indicates whether the code should rely on the - * native {@ocde JSON} functions, if available. - * - * <p>The JSON functions can be defined by external libraries like Prototype - * and setting this flag to false forces the use of Closure's goog.json - * implementation. - * - * <p>If your JavaScript can be loaded by a third_party site and you are wary - * about relying on the native functions, specify - * "--define bot.json.NATIVE_JSON=false" to the Closure compiler. - */ -bot.json.NATIVE_JSON = true; - - -/** - * Whether the current browser supports the native JSON interface. - * @const - * @see http://caniuse.com/#search=JSON - * @private {boolean} - */ -bot.json.SUPPORTS_NATIVE_JSON_ = - // List WebKit and Opera first since every supported version of these - // browsers supports native JSON (and we can compile away large chunks of - // code for individual fragments by setting the appropriate compiler flags). - goog.userAgent.WEBKIT || goog.userAgent.OPERA || - (goog.userAgent.GECKO && bot.userAgent.isEngineVersion(3.5)) || - (goog.userAgent.IE && bot.userAgent.isEngineVersion(8)); - - -/** - * Converts a JSON object to its string representation. - * @param {*} jsonObj The input object. - * @param {?(function(string, *): *)=} opt_replacer A replacer function called - * for each (key, value) pair that determines how the value should be - * serialized. By default, this just returns the value and allows default - * serialization to kick in. - * @return {string} A JSON string representation of the input object. - */ -bot.json.stringify = bot.json.NATIVE_JSON && bot.json.SUPPORTS_NATIVE_JSON_ ? - JSON.stringify : goog.json.serialize; - - -/** - * Parses a JSON string and returns the result. - * @param {string} jsonStr The string to parse. - * @return {*} The JSON object. - * @throws {Error} If the input string is an invalid JSON string. - */ -bot.json.parse = bot.json.NATIVE_JSON && bot.json.SUPPORTS_NATIVE_JSON_ ? - JSON.parse : goog.json.parse; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview The file contains an abstraction of a keyboad - * for simulating the presing and releasing of keys. - */ - -goog.provide('bot.Keyboard'); -goog.provide('bot.Keyboard.Key'); -goog.provide('bot.Keyboard.Keys'); - -goog.require('bot.Device'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.dom'); -goog.require('bot.events.EventType'); -goog.require('goog.array'); -goog.require('goog.dom.TagName'); -goog.require('goog.dom.selection'); -goog.require('goog.structs.Map'); -goog.require('goog.structs.Set'); -goog.require('goog.userAgent'); - - - -/** - * A keyboard that provides atomic typing actions. - * - * @constructor - * @param {{pressed: !Array.<!bot.Keyboard.Key>, - currentPos: number}=} opt_state Optional keyboard state. - * @extends {bot.Device} - */ -bot.Keyboard = function(opt_state) { - goog.base(this); - - /** @private {boolean} */ - this.editable_ = bot.dom.isEditable(this.getElement()); - - /** @private {number} */ - this.currentPos_ = 0; - - /** @private {!goog.structs.Set.<!bot.Keyboard.Key>} */ - this.pressed_ = new goog.structs.Set(); - - if (opt_state) { - // If a state is passed, let's assume we were passed an object with - // the correct properties. - goog.array.forEach(opt_state['pressed'], function(key) { - this.setKeyPressed_(key, true); - }, this); - - this.currentPos_ = opt_state['currentPos']; - } -}; -goog.inherits(bot.Keyboard, bot.Device); - - -/** - * Maps characters to (key,boolean) pairs, where the key generates the - * character and the boolean is true when the shift must be pressed. - * - * @private {!Object.<string, {key: !bot.Keyboard.Key, shift: boolean}>} - * @const - */ -bot.Keyboard.CHAR_TO_KEY_ = {}; - - -/** - * Constructs a new key and, if it is a character key, adds a mapping from the - * character to is in the CHAR_TO_KEY_ map. Using this factory function instead - * of the new keyword, also helps reduce the size of the compiled Js fragment. - * - * @param {?number|{gecko: ?number, ieWebkit: ?number, opera: ?number}} code - * Either a single keycode or a record of per-browser keycodes. - * @param {string=} opt_char Character when shift is not pressed. - * @param {string=} opt_shiftChar Character when shift is pressed. - * @return {!bot.Keyboard.Key} The new key. - * @private - */ -bot.Keyboard.newKey_ = function(code, opt_char, opt_shiftChar) { - if (goog.isObject(code)) { - if (goog.userAgent.GECKO) { - code = code.gecko; - } else if (goog.userAgent.OPERA) { - code = code.opera; - } else { // IE and Webkit - code = code.ieWebkit; - } - } - var key = new bot.Keyboard.Key(code, opt_char, opt_shiftChar); - - // For a character key, potentially map the character to the key in the - // CHAR_TO_KEY_ map. Because of numpad, multiple keys may have the same - // character. To avoid mapping numpad keys, we overwrite a mapping only if - // the key has a distinct shift character. - if (opt_char && (!(opt_char in bot.Keyboard.CHAR_TO_KEY_) || opt_shiftChar)) { - bot.Keyboard.CHAR_TO_KEY_[opt_char] = {key: key, shift: false}; - if (opt_shiftChar) { - bot.Keyboard.CHAR_TO_KEY_[opt_shiftChar] = {key: key, shift: true}; - } - } - - return key; -}; - - - -/** - * A key on the keyboard. - * - * @constructor - * @param {?number} code Keycode for the key; null for the (rare) case - * that pressing the key issues no key events. - * @param {string=} opt_char Character when shift is not pressed; null - * when the key does not cause a character to be typed. - * @param {string=} opt_shiftChar Character when shift is pressed; null - * when the key does not cause a character to be typed. - */ -bot.Keyboard.Key = function(code, opt_char, opt_shiftChar) { - /** @type {?number} */ - this.code = code; - - /** @type {?string} */ - this.character = opt_char || null; - - /** @type {?string} */ - this.shiftChar = opt_shiftChar || this.character; -}; - - -/** - * An enumeration of keys known to this module. - * - * @enum {!bot.Keyboard.Key} - */ -bot.Keyboard.Keys = { - BACKSPACE: bot.Keyboard.newKey_(8), - TAB: bot.Keyboard.newKey_(9), - ENTER: bot.Keyboard.newKey_(13), - SHIFT: bot.Keyboard.newKey_(16), - CONTROL: bot.Keyboard.newKey_(17), - ALT: bot.Keyboard.newKey_(18), - PAUSE: bot.Keyboard.newKey_(19), - CAPS_LOCK: bot.Keyboard.newKey_(20), - ESC: bot.Keyboard.newKey_(27), - SPACE: bot.Keyboard.newKey_(32, ' '), - PAGE_UP: bot.Keyboard.newKey_(33), - PAGE_DOWN: bot.Keyboard.newKey_(34), - END: bot.Keyboard.newKey_(35), - HOME: bot.Keyboard.newKey_(36), - LEFT: bot.Keyboard.newKey_(37), - UP: bot.Keyboard.newKey_(38), - RIGHT: bot.Keyboard.newKey_(39), - DOWN: bot.Keyboard.newKey_(40), - PRINT_SCREEN: bot.Keyboard.newKey_(44), - INSERT: bot.Keyboard.newKey_(45), - DELETE: bot.Keyboard.newKey_(46), - - // Number keys - ZERO: bot.Keyboard.newKey_(48, '0', ')'), - ONE: bot.Keyboard.newKey_(49, '1', '!'), - TWO: bot.Keyboard.newKey_(50, '2', '@'), - THREE: bot.Keyboard.newKey_(51, '3', '#'), - FOUR: bot.Keyboard.newKey_(52, '4', '$'), - FIVE: bot.Keyboard.newKey_(53, '5', '%'), - SIX: bot.Keyboard.newKey_(54, '6', '^'), - SEVEN: bot.Keyboard.newKey_(55, '7', '&'), - EIGHT: bot.Keyboard.newKey_(56, '8', '*'), - NINE: bot.Keyboard.newKey_(57, '9', '('), - - // Letter keys - A: bot.Keyboard.newKey_(65, 'a', 'A'), - B: bot.Keyboard.newKey_(66, 'b', 'B'), - C: bot.Keyboard.newKey_(67, 'c', 'C'), - D: bot.Keyboard.newKey_(68, 'd', 'D'), - E: bot.Keyboard.newKey_(69, 'e', 'E'), - F: bot.Keyboard.newKey_(70, 'f', 'F'), - G: bot.Keyboard.newKey_(71, 'g', 'G'), - H: bot.Keyboard.newKey_(72, 'h', 'H'), - I: bot.Keyboard.newKey_(73, 'i', 'I'), - J: bot.Keyboard.newKey_(74, 'j', 'J'), - K: bot.Keyboard.newKey_(75, 'k', 'K'), - L: bot.Keyboard.newKey_(76, 'l', 'L'), - M: bot.Keyboard.newKey_(77, 'm', 'M'), - N: bot.Keyboard.newKey_(78, 'n', 'N'), - O: bot.Keyboard.newKey_(79, 'o', 'O'), - P: bot.Keyboard.newKey_(80, 'p', 'P'), - Q: bot.Keyboard.newKey_(81, 'q', 'Q'), - R: bot.Keyboard.newKey_(82, 'r', 'R'), - S: bot.Keyboard.newKey_(83, 's', 'S'), - T: bot.Keyboard.newKey_(84, 't', 'T'), - U: bot.Keyboard.newKey_(85, 'u', 'U'), - V: bot.Keyboard.newKey_(86, 'v', 'V'), - W: bot.Keyboard.newKey_(87, 'w', 'W'), - X: bot.Keyboard.newKey_(88, 'x', 'X'), - Y: bot.Keyboard.newKey_(89, 'y', 'Y'), - Z: bot.Keyboard.newKey_(90, 'z', 'Z'), - - // Branded keys - META: bot.Keyboard.newKey_( - goog.userAgent.WINDOWS ? {gecko: 91, ieWebkit: 91, opera: 219} : - (goog.userAgent.MAC ? {gecko: 224, ieWebkit: 91, opera: 17} : - {gecko: 0, ieWebkit: 91, opera: null})), // Linux - META_RIGHT: bot.Keyboard.newKey_( - goog.userAgent.WINDOWS ? {gecko: 92, ieWebkit: 92, opera: 220} : - (goog.userAgent.MAC ? {gecko: 224, ieWebkit: 93, opera: 17} : - {gecko: 0, ieWebkit: 92, opera: null})), // Linux - CONTEXT_MENU: bot.Keyboard.newKey_( - goog.userAgent.WINDOWS ? {gecko: 93, ieWebkit: 93, opera: 0} : - (goog.userAgent.MAC ? {gecko: 0, ieWebkit: 0, opera: 16} : - {gecko: 93, ieWebkit: null, opera: 0})), // Linux - - // Numpad keys - NUM_ZERO: bot.Keyboard.newKey_({gecko: 96, ieWebkit: 96, opera: 48}, '0'), - NUM_ONE: bot.Keyboard.newKey_({gecko: 97, ieWebkit: 97, opera: 49}, '1'), - NUM_TWO: bot.Keyboard.newKey_({gecko: 98, ieWebkit: 98, opera: 50}, '2'), - NUM_THREE: bot.Keyboard.newKey_({gecko: 99, ieWebkit: 99, opera: 51}, '3'), - NUM_FOUR: bot.Keyboard.newKey_({gecko: 100, ieWebkit: 100, opera: 52}, '4'), - NUM_FIVE: bot.Keyboard.newKey_({gecko: 101, ieWebkit: 101, opera: 53}, '5'), - NUM_SIX: bot.Keyboard.newKey_({gecko: 102, ieWebkit: 102, opera: 54}, '6'), - NUM_SEVEN: bot.Keyboard.newKey_({gecko: 103, ieWebkit: 103, opera: 55}, '7'), - NUM_EIGHT: bot.Keyboard.newKey_({gecko: 104, ieWebkit: 104, opera: 56}, '8'), - NUM_NINE: bot.Keyboard.newKey_({gecko: 105, ieWebkit: 105, opera: 57}, '9'), - NUM_MULTIPLY: bot.Keyboard.newKey_( - {gecko: 106, ieWebkit: 106, opera: goog.userAgent.LINUX ? 56 : 42}, '*'), - NUM_PLUS: bot.Keyboard.newKey_( - {gecko: 107, ieWebkit: 107, opera: goog.userAgent.LINUX ? 61 : 43}, '+'), - NUM_MINUS: bot.Keyboard.newKey_( - {gecko: 109, ieWebkit: 109, opera: goog.userAgent.LINUX ? 109 : 45}, '-'), - NUM_PERIOD: bot.Keyboard.newKey_( - {gecko: 110, ieWebkit: 110, opera: goog.userAgent.LINUX ? 190 : 78}, '.'), - NUM_DIVISION: bot.Keyboard.newKey_( - {gecko: 111, ieWebkit: 111, opera: goog.userAgent.LINUX ? 191 : 47}, '/'), - NUM_LOCK: bot.Keyboard.newKey_( - (goog.userAgent.LINUX && goog.userAgent.OPERA) ? null : 144), - - // Function keys - F1: bot.Keyboard.newKey_(112), - F2: bot.Keyboard.newKey_(113), - F3: bot.Keyboard.newKey_(114), - F4: bot.Keyboard.newKey_(115), - F5: bot.Keyboard.newKey_(116), - F6: bot.Keyboard.newKey_(117), - F7: bot.Keyboard.newKey_(118), - F8: bot.Keyboard.newKey_(119), - F9: bot.Keyboard.newKey_(120), - F10: bot.Keyboard.newKey_(121), - F11: bot.Keyboard.newKey_(122), - F12: bot.Keyboard.newKey_(123), - - // Punctuation keys - EQUALS: bot.Keyboard.newKey_( - {gecko: 107, ieWebkit: 187, opera: 61}, '=', '+'), - SEPARATOR: bot.Keyboard.newKey_(108, ','), - HYPHEN: bot.Keyboard.newKey_( - {gecko: 109, ieWebkit: 189, opera: 109}, '-', '_'), - COMMA: bot.Keyboard.newKey_(188, ',', '<'), - PERIOD: bot.Keyboard.newKey_(190, '.', '>'), - SLASH: bot.Keyboard.newKey_(191, '/', '?'), - BACKTICK: bot.Keyboard.newKey_(192, '`', '~'), - OPEN_BRACKET: bot.Keyboard.newKey_(219, '[', '{'), - BACKSLASH: bot.Keyboard.newKey_(220, '\\', '|'), - CLOSE_BRACKET: bot.Keyboard.newKey_(221, ']', '}'), - SEMICOLON: bot.Keyboard.newKey_( - {gecko: 59, ieWebkit: 186, opera: 59}, ';', ':'), - APOSTROPHE: bot.Keyboard.newKey_(222, '\'', '"') -}; - - -/** - * Given a character, returns a pair of a key and a boolean: the key being one - * that types the character and the boolean indicating whether the key must be - * shifted to type it. This function will never return a numpad key; that is, - * it will always return a symbol key when given a number or math symbol. - * - * If given a character for which this module does not know the key (the key - * is not in the bot.Keyboard.Keys enumeration), returns a key that types the - * given character but has a (likely incorrect) keycode of zero. - * - * @param {string} ch Single character. - * @return {{key: !bot.Keyboard.Key, shift: boolean}} A pair of a key and - * a boolean indicating whether shift must be pressed for the character. - */ -bot.Keyboard.Key.fromChar = function(ch) { - if (ch.length != 1) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Argument not a single character: ' + ch); - } - var keyShiftPair = bot.Keyboard.CHAR_TO_KEY_[ch]; - if (!keyShiftPair) { - // We don't know the true keycode of non-US keyboard characters, but - // ch.toUpperCase().charCodeAt(0) should occasionally be right, and - // at least yield a positive number. - var upperCase = ch.toUpperCase(); - var keyCode = upperCase.charCodeAt(0); - var key = bot.Keyboard.newKey_(keyCode, ch.toLowerCase(), upperCase); - keyShiftPair = {key: key, shift: (ch != key.character)}; - } - return keyShiftPair; -}; - - -/** - * Array of modifier keys. - * - * @type {!Array.<!bot.Keyboard.Key>} - * @const - */ -bot.Keyboard.MODIFIERS = [ - bot.Keyboard.Keys.ALT, - bot.Keyboard.Keys.CONTROL, - bot.Keyboard.Keys.META, - bot.Keyboard.Keys.SHIFT -]; - -/** - * Map of modifier to key. - * @private {!goog.structs.Map.<!bot.Device.Modifier, !bot.Keyboard.Key>} - */ -bot.Keyboard.MODIFIER_TO_KEY_MAP_ = (function() { - var modifiersMap = new goog.structs.Map(); - modifiersMap.set(bot.Device.Modifier.SHIFT, - bot.Keyboard.Keys.SHIFT); - modifiersMap.set(bot.Device.Modifier.CONTROL, - bot.Keyboard.Keys.CONTROL); - modifiersMap.set(bot.Device.Modifier.ALT, - bot.Keyboard.Keys.ALT); - modifiersMap.set(bot.Device.Modifier.META, - bot.Keyboard.Keys.META); - - return modifiersMap; -})(); - - -/** - * The reverse map - key to modifier. - * @private {!goog.structs.Map.<number, !bot.Device.Modifier>} - */ -bot.Keyboard.KEY_TO_MODIFIER_ = (function(modifiersMap) { - var keyToModifierMap = new goog.structs.Map(); - goog.array.forEach(modifiersMap.getKeys(), function(m) { - keyToModifierMap.set(modifiersMap.get(m).code, m); - }); - - return keyToModifierMap; -})(bot.Keyboard.MODIFIER_TO_KEY_MAP_); - - -/** - * Set the modifier state if the provided key is one, otherwise just add - * to the list of pressed keys. - * @param {bot.Keyboard.Key} key - * @param {boolean} isPressed - * @private - */ -bot.Keyboard.prototype.setKeyPressed_ = function(key, isPressed) { - if (goog.array.contains(bot.Keyboard.MODIFIERS, key)) { - var modifier = /** @type {bot.Device.Modifier}*/ ( - bot.Keyboard.KEY_TO_MODIFIER_.get(key.code)); - this.modifiersState.setPressed(modifier, isPressed); - } - - if (isPressed) { - this.pressed_.add(key); - } else { - this.pressed_.remove(key); - } -}; - - -/** - * The value used for newlines in the current browser/OS combination. Although - * the line endings look platform dependent, they are browser dependent. In - * particular, Opera uses \r\n on all platforms. - * @private {string} - * @const - */ -bot.Keyboard.NEW_LINE_ = - goog.userAgent.IE || goog.userAgent.OPERA ? '\r\n' : '\n'; - - -/** - * Returns whether the key is currently pressed. - * - * @param {bot.Keyboard.Key} key Key. - * @return {boolean} Whether the key is pressed. - */ -bot.Keyboard.prototype.isPressed = function(key) { - return this.pressed_.contains(key); -}; - - -/** - * Presses the given key on the keyboard. Keys that are pressed can be pressed - * again before releasing, to simulate repeated keys, except for modifier keys, - * which must be released before they can be pressed again. - * - * @param {!bot.Keyboard.Key} key Key to press. - */ -bot.Keyboard.prototype.pressKey = function(key) { - if (goog.array.contains(bot.Keyboard.MODIFIERS, key) && this.isPressed(key)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot press a modifier key that is already pressed.'); - } - - // Note that GECKO is special-cased below because of - // https://bugzilla.mozilla.org/show_bug.cgi?id=501496. "preventDefault on - // keydown does not cancel following keypress" - var performDefault = !goog.isNull(key.code) && - this.fireKeyEvent_(bot.events.EventType.KEYDOWN, key); - - // Fires keydown and stops if unsuccessful. - if (performDefault || goog.userAgent.GECKO) { - // Fires keypress if required and stops if unsuccessful. - if (!this.requiresKeyPress_(key) || - this.fireKeyEvent_( - bot.events.EventType.KEYPRESS, key, !performDefault)) { - if (performDefault) { - this.maybeSubmitForm_(key); - if (this.editable_) { - this.maybeEditText_(key); - } - } - } - } - - this.setKeyPressed_(key, true); -}; - - -/** - * Whether the given key currently requires a keypress. - * TODO(user): Make this dependent on the state of the modifier keys. - * - * @param {bot.Keyboard.Key} key Key. - * @return {boolean} Whether it requires a keypress event. - * @private - */ -bot.Keyboard.prototype.requiresKeyPress_ = function(key) { - if (key.character || key == bot.Keyboard.Keys.ENTER) { - return true; - } else if (goog.userAgent.WEBKIT) { - return false; - } else if (goog.userAgent.IE) { - return key == bot.Keyboard.Keys.ESC; - } else { // Gecko and Opera - switch (key) { - case bot.Keyboard.Keys.SHIFT: - case bot.Keyboard.Keys.CONTROL: - case bot.Keyboard.Keys.ALT: - return false; - case bot.Keyboard.Keys.META: - case bot.Keyboard.Keys.META_RIGHT: - case bot.Keyboard.Keys.CONTEXT_MENU: - return goog.userAgent.GECKO; - default: - return true; - } - } -}; - - -/** - * Maybe submit a form if the ENTER key is released. On non-FF browsers, firing - * the keyPress and keyRelease events for the ENTER key does not result in a - * form being submitted so we have to fire the form submit event as well. - * - * @param {bot.Keyboard.Key} key Key. - * @private - */ -bot.Keyboard.prototype.maybeSubmitForm_ = function(key) { - if (key != bot.Keyboard.Keys.ENTER) { - return; - } - if (goog.userAgent.GECKO || - !bot.dom.isElement(this.getElement(), goog.dom.TagName.INPUT)) { - return; - } - - var form = bot.Device.findAncestorForm(this.getElement()); - if (form) { - var inputs = form.getElementsByTagName('input'); - var hasSubmit = goog.array.some(inputs, function(e) { - return bot.Device.isFormSubmitElement(e); - }); - // The second part of this if statement will always include forms on Safari - // version < 5. - if (hasSubmit || inputs.length == 1 || - (goog.userAgent.WEBKIT && !bot.userAgent.isEngineVersion(534))) { - this.submitForm(form); - } - } -}; - - -/** - * Maybe edit text when a key is pressed in an editable form. - * - * @param {!bot.Keyboard.Key} key Key that was pressed. - * @private - */ -bot.Keyboard.prototype.maybeEditText_ = function(key) { - if (key.character) { - this.updateOnCharacter_(key); - } else { - switch (key) { - case bot.Keyboard.Keys.ENTER: - this.updateOnEnter_(); - break; - case bot.Keyboard.Keys.BACKSPACE: - case bot.Keyboard.Keys.DELETE: - this.updateOnBackspaceOrDelete_(key); - break; - case bot.Keyboard.Keys.LEFT: - case bot.Keyboard.Keys.RIGHT: - this.updateOnLeftOrRight_(key); - break; - case bot.Keyboard.Keys.HOME: - case bot.Keyboard.Keys.END: - this.updateOnHomeOrEnd_(key); - break; - } - } -}; - - -/** - * Releases the given key on the keyboard. Releasing a key that is not - * pressed results in an exception. - * - * @param {!bot.Keyboard.Key} key Key to release. - */ -bot.Keyboard.prototype.releaseKey = function(key) { - if (!this.isPressed(key)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot release a key that is not pressed. (' + key.code + ')'); - } - if (!goog.isNull(key.code)) { - this.fireKeyEvent_(bot.events.EventType.KEYUP, key); - } - - this.setKeyPressed_(key, false); -}; - - -/** - * Given the current state of the SHIFT and CAPS_LOCK key, returns the - * character that will be typed is the specified key is pressed. - * - * @param {!bot.Keyboard.Key} key Key. - * @return {string} Character to be typed. - * @private - */ -bot.Keyboard.prototype.getChar_ = function(key) { - if (!key.character) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, 'not a character key'); - } - var shiftPressed = this.isPressed(bot.Keyboard.Keys.SHIFT); - return /** @type {string} */ (shiftPressed ? key.shiftChar : key.character); -}; - - -/** - * Whether firing a keypress event causes text to be edited without any - * additional logic to surgically apply the edit. - * - * @const - * @private {boolean} - */ -bot.Keyboard.KEYPRESS_EDITS_TEXT_ = goog.userAgent.GECKO && - !bot.userAgent.isEngineVersion(12); - - -/** - * @param {!bot.Keyboard.Key} key Key with character to insert. - * @private - */ -bot.Keyboard.prototype.updateOnCharacter_ = function(key) { - if (bot.Keyboard.KEYPRESS_EDITS_TEXT_) { - return; - } - - var character = this.getChar_(key); - var newPos = goog.dom.selection.getStart(this.getElement()) + 1; - goog.dom.selection.setText(this.getElement(), character); - goog.dom.selection.setStart(this.getElement(), newPos); - if (goog.userAgent.WEBKIT) { - this.fireHtmlEvent(bot.events.EventType.TEXTINPUT); - } - if (!bot.userAgent.IE_DOC_PRE9) { - this.fireHtmlEvent(bot.events.EventType.INPUT); - } - this.updateCurrentPos_(newPos); -}; - - -/** @private */ -bot.Keyboard.prototype.updateOnEnter_ = function() { - if (bot.Keyboard.KEYPRESS_EDITS_TEXT_) { - return; - } - - // WebKit fires text input regardless of whether a new line is added, see: - // https://bugs.webkit.org/show_bug.cgi?id=54152 - if (goog.userAgent.WEBKIT) { - this.fireHtmlEvent(bot.events.EventType.TEXTINPUT); - } - if (bot.dom.isElement(this.getElement(), goog.dom.TagName.TEXTAREA)) { - var newPos = goog.dom.selection.getStart(this.getElement()) + - bot.Keyboard.NEW_LINE_.length; - goog.dom.selection.setText(this.getElement(), bot.Keyboard.NEW_LINE_); - goog.dom.selection.setStart(this.getElement(), newPos); - if (!goog.userAgent.IE) { - this.fireHtmlEvent(bot.events.EventType.INPUT); - } - this.updateCurrentPos_(newPos); - } -}; - - -/** - * @param {!bot.Keyboard.Key} key Backspace or delete key. - * @private - */ -bot.Keyboard.prototype.updateOnBackspaceOrDelete_ = function(key) { - if (bot.Keyboard.KEYPRESS_EDITS_TEXT_) { - return; - } - - // Determine what should be deleted. If text is already selected, that - // text is deleted, else we move left/right from the current cursor. - var endpoints = goog.dom.selection.getEndPoints(this.getElement()); - if (endpoints[0] == endpoints[1]) { - if (key == bot.Keyboard.Keys.BACKSPACE) { - goog.dom.selection.setStart(this.getElement(), endpoints[1] - 1); - // On IE, changing goog.dom.selection.setStart also changes the end. - goog.dom.selection.setEnd(this.getElement(), endpoints[1]); - } else { - goog.dom.selection.setEnd(this.getElement(), endpoints[1] + 1); - } - } - - // If the endpoints are equal (e.g., the cursor was at the beginning/end - // of the input), the text field won't be changed. - endpoints = goog.dom.selection.getEndPoints(this.getElement()); - var textChanged = !(endpoints[0] == this.getElement().value.length || - endpoints[1] == 0); - goog.dom.selection.setText(this.getElement(), ''); - - // Except for IE and GECKO, we need to fire the input event manually, but - // only if the text was actually changed. - // Note: Gecko has some strange behavior with the input event. In a - // textarea, backspace always sends an input event, while delete only - // sends one if you actually change the text. - // In a textbox/password box, backspace always sends an input event unless - // the box has no text. Delete behaves the same way in Firefox 3.0, but - // in later versions it only fires an input event if no text changes. - if (!goog.userAgent.IE && textChanged || - (goog.userAgent.GECKO && key == bot.Keyboard.Keys.BACKSPACE)) { - this.fireHtmlEvent(bot.events.EventType.INPUT); - } - - // Update the cursor position - endpoints = goog.dom.selection.getEndPoints(this.getElement()); - this.updateCurrentPos_(endpoints[1]); -}; - - -/** - * @param {!bot.Keyboard.Key} key Special key to press. - * @private - */ -bot.Keyboard.prototype.updateOnLeftOrRight_ = function(key) { - var element = this.getElement(); - var start = goog.dom.selection.getStart(element); - var end = goog.dom.selection.getEnd(element); - - var newPos, startPos = 0, endPos = 0; - if (key == bot.Keyboard.Keys.LEFT) { - if (this.isPressed(bot.Keyboard.Keys.SHIFT)) { - // If the current position of the cursor is at the start of the - // selection, pressing left expands the selection one character to the - // left; otherwise, pressing left collapses it one character to the - // left. - if (this.currentPos_ == start) { - // Never attempt to move further left than the beginning of the text. - startPos = Math.max(start - 1, 0); - endPos = end; - newPos = startPos; - } else { - startPos = start; - endPos = end - 1; - newPos = endPos; - } - } else { - // With no current selection, pressing left moves the cursor one - // character to the left; with an existing selection, it collapses the - // selection to the beginning of the selection. - newPos = start == end ? Math.max(start - 1, 0) : start; - } - } else { // (key == bot.Keyboard.Keys.RIGHT) - if (this.isPressed(bot.Keyboard.Keys.SHIFT)) { - // If the current position of the cursor is at the end of the selection, - // pressing right expands the selection one character to the right; - // otherwise, pressing right collapses it one character to the right. - if (this.currentPos_ == end) { - startPos = start; - // Never attempt to move further right than the end of the text. - endPos = Math.min(end + 1, element.value.length); - newPos = endPos; - } else { - startPos = start + 1; - endPos = end; - newPos = startPos; - } - } else { - // With no current selection, pressing right moves the cursor one - // character to the right; with an existing selection, it collapses the - // selection to the end of the selection. - newPos = start == end ? Math.min(end + 1, element.value.length) : end; - } - } - - if (this.isPressed(bot.Keyboard.Keys.SHIFT)) { - goog.dom.selection.setStart(element, startPos); - // On IE, changing goog.dom.selection.setStart also changes the end. - goog.dom.selection.setEnd(element, endPos); - } else { - goog.dom.selection.setCursorPosition(element, newPos); - } - this.updateCurrentPos_(newPos); -}; - - -/** - * @param {!bot.Keyboard.Key} key Special key to press. - * @private - */ -bot.Keyboard.prototype.updateOnHomeOrEnd_ = function(key) { - var element = this.getElement(); - var start = goog.dom.selection.getStart(element); - var end = goog.dom.selection.getEnd(element); - // TODO: Handle multiline (TEXTAREA) elements. - if (key == bot.Keyboard.Keys.HOME) { - if (this.isPressed(bot.Keyboard.Keys.SHIFT)) { - goog.dom.selection.setStart(element, 0); - // If current position is at the end of the selection, typing home - // changes the selection to begin at the beginning of the text, running - // to the where the current selection begins. - var endPos = this.currentPos_ == start ? end : start; - // On IE, changing goog.dom.selection.setStart also changes the end. - goog.dom.selection.setEnd(element, endPos); - } else { - goog.dom.selection.setCursorPosition(element, 0); - } - this.updateCurrentPos_(0); - } else { // (key == bot.Keyboard.Keys.END) - if (this.isPressed(bot.Keyboard.Keys.SHIFT)) { - if (this.currentPos_ == start) { - // Current position is at the beginning of the selection. Typing end - // changes the selection to begin where the current selection ends, - // running to the end of the text. - goog.dom.selection.setStart(element, end); - } - goog.dom.selection.setEnd(element, element.value.length); - } else { - goog.dom.selection.setCursorPosition(element, element.value.length); - } - this.updateCurrentPos_(element.value.length); - } -}; - -/** -* @param {number} pos New position of the cursor -* @private -*/ -bot.Keyboard.prototype.updateCurrentPos_ = function(pos) { - this.currentPos_ = pos; -}; - - -/** -* @param {bot.events.EventType} type Event type. -* @param {!bot.Keyboard.Key} key Key. -* @param {boolean=} opt_preventDefault Whether the default event should be -* prevented. Defaults to false. -* @return {boolean} Whether the event fired successfully or was cancelled. -* @private -*/ -bot.Keyboard.prototype.fireKeyEvent_ = function(type, key, opt_preventDefault) { - if (goog.isNull(key.code)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Key must have a keycode to be fired.'); - } - - var args = { - altKey: this.isPressed(bot.Keyboard.Keys.ALT), - ctrlKey: this.isPressed(bot.Keyboard.Keys.CONTROL), - metaKey: this.isPressed(bot.Keyboard.Keys.META), - shiftKey: this.isPressed(bot.Keyboard.Keys.SHIFT), - keyCode: key.code, - charCode: (key.character && type == bot.events.EventType.KEYPRESS) ? - this.getChar_(key).charCodeAt(0) : 0, - preventDefault: !!opt_preventDefault - }; - - return this.fireKeyboardEvent(type, args); -}; - - -/** - * Sets focus to the element. If the element does not have focus, place cursor - * at the end of the text in the element. - * - * @param {!Element} element Element that is moved to. - */ -bot.Keyboard.prototype.moveCursor = function(element) { - this.setElement(element); - this.editable_ = bot.dom.isEditable(element); - - var focusChanged = this.focusOnElement(); - if (this.editable_ && focusChanged) { - goog.dom.selection.setCursorPosition(element, element.value.length); - this.updateCurrentPos_(element.value.length); - } -}; - - -/** - * Serialize the current state of the keyboard. - * - * @return {{pressed: !Array.<!bot.Keyboard.Key>, currentPos: number}} The - * current keyboard state. - */ -bot.Keyboard.prototype.getState = function () { - // Need to use quoted literals here, so the compiler will not rename the - // properties of the emitted object. When the object is created via the - // "constructor", we will look for these *specific* properties. Everywhere - // else internally, we use the dot-notation, so it's okay if the compiler - // renames the internal variable name. - return { - 'pressed': this.pressed_.getValues(), - 'currentPos': this.currentPos_ - }; -}; - -/** - * Returns the state of the modifier keys, to be shared with other input - * devices. - * - * @return {bot.Device.ModifiersState} Modifiers state. - */ -bot.Keyboard.prototype.getModifiersState = function() { - return this.modifiersState; -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview The file contains an abstraction of a mouse for - * simulating the mouse actions. - */ - -goog.provide('bot.Mouse'); -goog.provide('bot.Mouse.Button'); -goog.provide('bot.Mouse.State'); - -goog.require('bot'); -goog.require('bot.Device'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.dom'); -goog.require('bot.events.EventType'); -goog.require('bot.userAgent'); -goog.require('goog.dom'); -goog.require('goog.dom.TagName'); -goog.require('goog.math.Coordinate'); -goog.require('goog.style'); -goog.require('goog.userAgent'); - - - -/** - * A mouse that provides atomic mouse actions. This mouse currently only - * supports having one button pressed at a time. - * @param {bot.Mouse.State=} opt_state The mouse's initial state. - * @param {bot.Device.ModifiersState=} opt_modifiersState State of the keyboard. - * - * @constructor - * @extends {bot.Device} - */ -bot.Mouse = function(opt_state, opt_modifiersState) { - goog.base(this, opt_modifiersState); - - /** @private {?bot.Mouse.Button} */ - this.buttonPressed_ = null; - - /** @private {Element} */ - this.elementPressed_ = null; - - /** @private {!goog.math.Coordinate} */ - this.clientXY_ = new goog.math.Coordinate(0, 0); - - /** @private {boolean} */ - this.nextClickIsDoubleClick_ = false; - - /** - * Whether this Mouse has ever explicitly interacted with any element. - * - * @private {boolean} - */ - this.hasEverInteracted_ = false; - - if (opt_state) { - this.buttonPressed_ = opt_state.buttonPressed; - - try { - if (bot.dom.isElement(opt_state.elementPressed)) { - this.elementPressed_ = opt_state.elementPressed; - } - } catch (ignored) { - this.buttonPressed_ = null; - } - - this.clientXY_ = opt_state.clientXY; - this.nextClickIsDoubleClick_ = opt_state.nextClickIsDoubleClick; - this.hasEverInteracted_ = opt_state.hasEverInteracted; - - try { - if (bot.dom.isElement(opt_state.element)) { - this.setElement((/** @type {!Element} */opt_state.element)); - } - } catch (ignored) { - this.buttonPressed_ = null; - } - } -}; -goog.inherits(bot.Mouse, bot.Device); - - -/** - * @typedef {{buttonPressed: ?bot.Mouse.Button, - * elementPressed: Element, - * clientXY: !goog.math.Coordinate, - * nextClickIsDoubleClick: boolean, - * hasEverInteracted: boolean, - * element: Element}} - */ -bot.Mouse.State; - - -/** - * Enumeration of mouse buttons that can be pressed. - * - * @enum {number} - */ -bot.Mouse.Button = { - LEFT: 0, - MIDDLE: 1, - RIGHT: 2 -}; - - -/** - * Index to indicate no button pressed in bot.Mouse.MOUSE_BUTTON_VALUE_MAP_. - * - * @private {number} - * @const - */ -bot.Mouse.NO_BUTTON_VALUE_INDEX_ = 3; - - -/** - * Maps mouse events to an array of button argument value for each mouse button. - * The array is indexed by the bot.Mouse.Button values. It encodes this table, - * where each cell contains the (left/middle/right/none) button values. - * click/ mouseup/ mouseout/ mousemove contextmenu - * dblclick/ mousedown mouseover - * IE_DOC_PRE9 0 0 0 X 1 4 2 X 0 0 0 0 1 4 2 0 X X 0 X - * WEBKIT/IE9 0 1 2 X 0 1 2 X 0 1 2 0 0 1 2 0 X X 2 X - * GECKO/OPERA 0 1 2 X 0 1 2 X 0 0 0 0 0 0 0 0 X X 2 X - * - * @private {!Object.<bot.events.EventType, !Array.<?number>>} - * @const - */ -bot.Mouse.MOUSE_BUTTON_VALUE_MAP_ = (function() { - // EventTypes can safely be used as keys without collisions in a JS Object, - // because its toString method returns a unique string (the event type name). - var buttonValueMap = {}; - if (bot.userAgent.IE_DOC_PRE9) { - buttonValueMap[bot.events.EventType.CLICK] = [0, 0, 0, null]; - buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 0, null]; - buttonValueMap[bot.events.EventType.MOUSEUP] = [1, 4, 2, null]; - buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 0, 0, 0]; - buttonValueMap[bot.events.EventType.MOUSEMOVE] = [1, 4, 2, 0]; - } else if (goog.userAgent.WEBKIT || bot.userAgent.IE_DOC_9) { - buttonValueMap[bot.events.EventType.CLICK] = [0, 1, 2, null]; - buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 2, null]; - buttonValueMap[bot.events.EventType.MOUSEUP] = [0, 1, 2, null]; - buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 1, 2, 0]; - buttonValueMap[bot.events.EventType.MOUSEMOVE] = [0, 1, 2, 0]; - } else { - buttonValueMap[bot.events.EventType.CLICK] = [0, 1, 2, null]; - buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 2, null]; - buttonValueMap[bot.events.EventType.MOUSEUP] = [0, 1, 2, null]; - buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 0, 0, 0]; - buttonValueMap[bot.events.EventType.MOUSEMOVE] = [0, 0, 0, 0]; - } - - if (bot.userAgent.IE_DOC_10) { - buttonValueMap[bot.events.EventType.MSPOINTERDOWN] = - buttonValueMap[bot.events.EventType.MOUSEUP]; - buttonValueMap[bot.events.EventType.MSPOINTERUP] = - buttonValueMap[bot.events.EventType.MOUSEUP]; - buttonValueMap[bot.events.EventType.MSPOINTERMOVE] = [-1, -1, -1, -1]; - buttonValueMap[bot.events.EventType.MSPOINTEROUT] = - buttonValueMap[bot.events.EventType.MSPOINTERMOVE]; - buttonValueMap[bot.events.EventType.MSPOINTEROVER] = - buttonValueMap[bot.events.EventType.MSPOINTERMOVE]; - } - - buttonValueMap[bot.events.EventType.DBLCLICK] = - buttonValueMap[bot.events.EventType.CLICK]; - buttonValueMap[bot.events.EventType.MOUSEDOWN] = - buttonValueMap[bot.events.EventType.MOUSEUP]; - buttonValueMap[bot.events.EventType.MOUSEOVER] = - buttonValueMap[bot.events.EventType.MOUSEOUT]; - return buttonValueMap; -})(); - - -/** - * Maps mouse events to corresponding MSPointer event. - * @private {!Object.<bot.events.EventType, bot.events.EventType>} - */ -bot.Mouse.MOUSE_EVENT_MAP_ = { - mousedown: bot.events.EventType.MSPOINTERDOWN, - mousemove: bot.events.EventType.MSPOINTERMOVE, - mouseout: bot.events.EventType.MSPOINTEROUT, - mouseover: bot.events.EventType.MSPOINTEROVER, - mouseup: bot.events.EventType.MSPOINTERUP -}; - - -/** - * Attempts to fire a mousedown event and then returns whether or not the - * element should receive focus as a result of the mousedown. - * - * @return {boolean} Whether to focus on the element after the mousedown. - * @private - */ -bot.Mouse.prototype.fireMousedown_ = function() { - // On some browsers, a mouse down event on an OPTION or SELECT element cause - // the SELECT to open, blocking further JS execution. This is undesirable, - // and so needs to be detected. We always focus in this case. - // TODO(simon): This is a nasty way to avoid locking the browser - var isFirefox3 = goog.userAgent.GECKO && !bot.userAgent.isProductVersion(4); - var blocksOnMousedown = (goog.userAgent.WEBKIT || isFirefox3) && - (bot.dom.isElement(this.getElement(), goog.dom.TagName.OPTION) || - bot.dom.isElement(this.getElement(), goog.dom.TagName.SELECT)); - if (blocksOnMousedown) { - return true; - } - - // On some browsers, if the mousedown event handler makes a focus() call to - // change the active element, this preempts the focus that would happen by - // default on the mousedown, so we should not explicitly focus in this case. - var beforeActiveElement; - var mousedownCanPreemptFocus = goog.userAgent.GECKO || goog.userAgent.IE; - if (mousedownCanPreemptFocus) { - beforeActiveElement = bot.dom.getActiveElement(this.getElement()); - } - var performFocus = this.fireMouseEvent_(bot.events.EventType.MOUSEDOWN); - if (performFocus && mousedownCanPreemptFocus && - beforeActiveElement != bot.dom.getActiveElement(this.getElement())) { - return false; - } - return performFocus; -}; - - -/** - * Press a mouse button on an element that the mouse is interacting with. - * - * @param {!bot.Mouse.Button} button Button. -*/ -bot.Mouse.prototype.pressButton = function(button) { - if (!goog.isNull(this.buttonPressed_)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot press more then one button or an already pressed button.'); - } - this.buttonPressed_ = button; - this.elementPressed_ = this.getElement(); - - var performFocus = this.fireMousedown_(); - if (performFocus) { - this.focusOnElement(); - } -}; - - -/** - * Releases the pressed mouse button. Throws exception if no button pressed. - * - */ -bot.Mouse.prototype.releaseButton = function() { - if (goog.isNull(this.buttonPressed_)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot release a button when no button is pressed.'); - } - - this.fireMouseEvent_(bot.events.EventType.MOUSEUP); - - // TODO(user): Middle button can also trigger click. - if (this.buttonPressed_ == bot.Mouse.Button.LEFT && - this.getElement() == this.elementPressed_) { - this.clickElement(this.clientXY_, - this.getButtonValue_(bot.events.EventType.CLICK)); - this.maybeDoubleClickElement_(); - - // TODO(user): In Linux, this fires after mousedown event. - } else if (this.buttonPressed_ == bot.Mouse.Button.RIGHT) { - this.fireMouseEvent_(bot.events.EventType.CONTEXTMENU); - } - this.buttonPressed_ = null; - this.elementPressed_ = null; -}; - - -/** - * A helper function to fire mouse double click events. - * - * @private - */ -bot.Mouse.prototype.maybeDoubleClickElement_ = function() { - // Trigger an additional double click event if it is the second click. - if (this.nextClickIsDoubleClick_) { - this.fireMouseEvent_(bot.events.EventType.DBLCLICK); - } - this.nextClickIsDoubleClick_ = !this.nextClickIsDoubleClick_; -}; - - -/** - * Given a coordinates (x,y) related to an element, move mouse to (x,y) of the - * element. The top-left point of the element is (0,0). - * - * @param {!Element} element The destination element. - * @param {!goog.math.Coordinate} coords Mouse position related to the target. - */ -bot.Mouse.prototype.move = function(element, coords) { - // If the element is interactable at the start of the move, it receives the - // full event sequence, even if hidden by an element mid sequence. - var toElemWasInteractable = bot.dom.isInteractable(element); - - var pos = goog.style.getClientPosition(element); - this.clientXY_.x = coords.x + pos.x; - this.clientXY_.y = coords.y + pos.y; - var fromElement = this.getElement(); - - if (element != fromElement) { - // If the window of fromElement is closed, set fromElement to null as a flag - // to skip the mouseout event and so relatedTarget of the mouseover is null. - try { - if (goog.dom.getWindow(goog.dom.getOwnerDocument(fromElement)).closed) { - fromElement = null; - } - } catch (ignore) { - // Sometimes accessing a window that no longer exists causes an error. - fromElement = null; - } - - if (fromElement) { - // For the first mouse interaction on a page, if the mouse was over the - // browser window, the browser will pass null as the relatedTarget for the - // mouseover event. For subsequent interactions, it will pass the - // last-focused element. Unfortunately, we don't have anywhere to keep the - // state of which elements have been focused across Mouse instances, so we - // treat every Mouse initially positioned over the documentElement or body - // as if it's on a new page. Accordingly, for complex actions (e.g. - // drag-and-drop), a single Mouse instance should be used for the whole - // action, to ensure the correct relatedTargets are fired for any events. - var isRoot = fromElement === bot.getDocument().documentElement || - fromElement === bot.getDocument().body; - fromElement = (!this.hasEverInteracted_ && isRoot) ? null : fromElement; - this.fireMouseEvent_(bot.events.EventType.MOUSEOUT, element); - } - this.setElement(element); - - // All browsers except IE fire the mouseover before the mousemove. - if (!goog.userAgent.IE) { - this.fireMouseEvent_(bot.events.EventType.MOUSEOVER, fromElement, null, - toElemWasInteractable); - } - } - - this.fireMouseEvent_(bot.events.EventType.MOUSEMOVE, null, null, - toElemWasInteractable); - - // IE fires the mouseover event after the mousemove. - if (goog.userAgent.IE && element != fromElement) { - this.fireMouseEvent_(bot.events.EventType.MOUSEOVER, fromElement, null, - toElemWasInteractable); - } - - this.nextClickIsDoubleClick_ = false; -}; - - -/** - * Scrolls the wheel of the mouse by the given number of ticks, where a positive - * number indicates a downward scroll and a negative is upward scroll. - * - * @param {number} ticks Number of ticks to scroll the mouse wheel. - */ -bot.Mouse.prototype.scroll = function(ticks) { - if (ticks == 0) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Must scroll a non-zero number of ticks.'); - } - - // The wheelDelta value for a single up-tick of the mouse wheel is 120, and - // a single down-tick is -120. The deltas in pixels (which is only relevant - // for Firefox) appears to be -57 and 57, respectively. - var wheelDelta = ticks > 0 ? -120 : 120; - var pixelDelta = ticks > 0 ? 57 : -57; - - // Browsers fire a separate event (or pair of events in Gecko) for each tick. - for (var i = 0; i < Math.abs(ticks); i++) { - this.fireMouseEvent_(bot.events.EventType.MOUSEWHEEL, null, wheelDelta); - if (goog.userAgent.GECKO) { - this.fireMouseEvent_(bot.events.EventType.MOUSEPIXELSCROLL, null, - pixelDelta); - } - } -}; - - -/** - * A helper function to fire mouse events. - * - * @param {bot.events.EventType} type Event type. - * @param {Element=} opt_related The related element of this event. - * @param {?number=} opt_wheelDelta The wheel delta value for the event. - * @param {boolean=} opt_force Whether the event should be fired even if the - * element is not interactable. - * @return {boolean} Whether the event fired successfully or was cancelled. - * @private - */ -bot.Mouse.prototype.fireMouseEvent_ = function(type, opt_related, - opt_wheelDelta, opt_force) { - this.hasEverInteracted_ = true; - if (bot.userAgent.IE_DOC_10) { - var msPointerEvent = bot.Mouse.MOUSE_EVENT_MAP_[type]; - if (msPointerEvent) { - // The pointerId for mouse events is always 1 and the mouse event is never - // fired if the MSPointer event fails. - if (!this.fireMSPointerEvent(msPointerEvent, this.clientXY_, - this.getButtonValue_(msPointerEvent), /* pointerId */ 1, - MSPointerEvent.MSPOINTER_TYPE_MOUSE, /* isPrimary */ true, - opt_related, opt_force)) { - return false; - } - } - } - return this.fireMouseEvent(type, this.clientXY_, - this.getButtonValue_(type), opt_related, opt_wheelDelta, opt_force); -}; - - -/** - * Given an event type and a mouse button, sets the mouse button value used - * for that event on the current browser. The mouse button value is 0 for any - * event not covered by bot.Mouse.MOUSE_BUTTON_VALUE_MAP_. - * - * @param {bot.events.EventType} eventType Type of mouse event. - * @return {number} The mouse button ID value to the current browser. - * @private -*/ -bot.Mouse.prototype.getButtonValue_ = function(eventType) { - if (!(eventType in bot.Mouse.MOUSE_BUTTON_VALUE_MAP_)) { - return 0; - } - - var buttonIndex = goog.isNull(this.buttonPressed_) ? - bot.Mouse.NO_BUTTON_VALUE_INDEX_ : this.buttonPressed_; - var buttonValue = bot.Mouse.MOUSE_BUTTON_VALUE_MAP_[eventType][buttonIndex]; - if (goog.isNull(buttonValue)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Event does not permit the specified mouse button.'); - } - return buttonValue; -}; - - -/** - * Serialize the current state of the mouse. - * @return {!bot.Mouse.State} The current mouse state. - */ -bot.Mouse.prototype.getState = function() { - var state = {}; - state.buttonPressed = this.buttonPressed_; - state.elementPressed = this.elementPressed_; - state.clientXY = this.clientXY_; - state.nextClickIsDoubleClick = this.nextClickIsDoubleClick_; - state.hasEverInteracted = this.hasEverInteracted_; - state.element = this.getElement(); - return state; -}; -// Copyright 2011 Software Freedom Conservancy. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Utilities for working with WebDriver response objects. - * @see: http://code.google.com/p/selenium/wiki/JsonWireProtocol#Responses - */ - -goog.provide('bot.response'); -goog.provide('bot.response.ResponseObject'); - -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); - - -/** - * Type definition for a response object, as defined by the JSON wire protocol. - * @typedef {{status: bot.ErrorCode, value: (*|{message: string})}} - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Responses - */ -bot.response.ResponseObject; - - -/** - * @param {*} value The value to test. - * @return {boolean} Whether the given value is a response object. - */ -bot.response.isResponseObject = function(value) { - return goog.isObject(value) && goog.isNumber(value['status']); -}; - - -/** - * Creates a new success response object with the provided value. - * @param {*} value The response value. - * @return {!bot.response.ResponseObject} The new response object. - */ -bot.response.createResponse = function(value) { - if (bot.response.isResponseObject(value)) { - return (/** @type {!bot.response.ResponseObject} */value); - } - return { - 'status': bot.ErrorCode.SUCCESS, - 'value': value - }; -}; - - -/** - * Converts an error value into its JSON representation as defined by the - * WebDriver wire protocol. - * @param {(bot.Error|Error|*)} error The error value to convert. - * @return {!bot.response.ResponseObject} The new response object. - */ -bot.response.createErrorResponse = function(error) { - if (bot.response.isResponseObject(error)) { - return (/** @type {!bot.response.ResponseObject} */error); - } - - var statusCode = error && goog.isNumber(error.code) ? error.code : - bot.ErrorCode.UNKNOWN_ERROR; - return { - 'status': (/** @type {bot.ErrorCode} */statusCode), - 'value': { - 'message': (error && error.message || error) + '' - } - }; -}; - - -/** - * Checks that a response object does not specify an error as defined by the - * WebDriver wire protocol. If the response object defines an error, it will - * be thrown. Otherwise, the response will be returned as is. - * @param {!bot.response.ResponseObject} responseObj The response object to - * check. - * @return {!bot.response.ResponseObject} The checked response object. - * @throws {bot.Error} If the response describes an error. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Failed_Commands - */ -bot.response.checkResponse = function(responseObj) { - var status = responseObj['status']; - if (status == bot.ErrorCode.SUCCESS) { - return responseObj; - } - - // If status is not defined, assume an unknown error. - status = status || bot.ErrorCode.UNKNOWN_ERROR; - - var value = responseObj['value']; - if (!value || !goog.isObject(value)) { - throw new bot.Error(status, value + ''); - } - - throw new bot.Error(status, value['message'] + ''); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview The file contains an abstraction of a touch screen - * for simulating atomic touchscreen actions. - */ - -goog.provide('bot.Touchscreen'); - -goog.require('bot'); -goog.require('bot.Device'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.events.EventType'); -goog.require('goog.math.Coordinate'); -goog.require('goog.style'); - - - -/** - * A TouchScreen that provides atomic touch actions. The metaphor - * for this abstraction is a finger moving above the touchscreen that - * can press and then release the touchscreen when specified. - * - * The touchscreen supports three actions: press, release, and move. - * - * @constructor - * @extends {bot.Device} - */ -bot.Touchscreen = function() { - goog.base(this); - - /** @private {!goog.math.Coordinate} */ - this.clientXY_ = new goog.math.Coordinate(0, 0); - - /** @private {!goog.math.Coordinate} */ - this.clientXY2_ = new goog.math.Coordinate(0, 0); -}; -goog.inherits(bot.Touchscreen, bot.Device); - - -/** @private {boolean} */ -bot.Touchscreen.prototype.hasMovedAfterPress_ = false; - - -/** @private {number} */ -bot.Touchscreen.prototype.touchIdentifier_ = 0; - - -/** @private {number} */ -bot.Touchscreen.prototype.touchIdentifier2_ = 0; - - -/** @private {number} */ -bot.Touchscreen.prototype.touchCounter_ = 1; - - -/** - * Press the touch screen. Pressing before moving results in an exception. - * Pressing while already pressed also results in an exception. - * - * @param {boolean=} opt_press2 Whether or not press the second finger during - * the press. If not defined or false, only the primary finger will be - * pressed. - */ -bot.Touchscreen.prototype.press = function(opt_press2) { - if (this.isPressed()) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot press touchscreen when already pressed.'); - } - - this.hasMovedAfterPress_ = false; - this.touchIdentifier_ = this.touchCounter_++; - if (opt_press2) { - this.touchIdentifier2_ = this.touchCounter_++; - } - - if (bot.userAgent.IE_DOC_10) { - this.firePointerEvents_(bot.Touchscreen.fireSinglePressPointer_); - } else { - this.fireTouchEvent_(bot.events.EventType.TOUCHSTART); - } -}; - - -/** - * Releases an element on a touchscreen. Releasing an element that is not - * pressed results in an exception. - */ -bot.Touchscreen.prototype.release = function() { - if (!this.isPressed()) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Cannot release touchscreen when not already pressed.'); - } - - if (bot.userAgent.IE_DOC_10) { - this.firePointerEvents_(bot.Touchscreen.fireSingleReleasePointer_); - } else { - this.fireTouchReleaseEvents_(); - } - this.touchIdentifier_ = 0; - this.touchIdentifier2_ = 0; -}; - - -/** - * Moves finger along the touchscreen. - * - * @param {!Element} element Element that is being pressed. - * @param {!goog.math.Coordinate} coords Coordinates relative to - * currentElement. - * @param {goog.math.Coordinate=} opt_coords2 Coordinates relative to - * currentElement. - */ -bot.Touchscreen.prototype.move = function(element, coords, opt_coords2) { - // The target element for touch actions is the original element. Hence, the - // element is set only when the touchscreen is not currently being pressed. - // The exception is IE10 which fire events on the moved to element. - if (!this.isPressed() || bot.userAgent.IE_DOC_10) { - this.setElement(element); - } - - var pos = goog.style.getClientPosition(element); - this.clientXY_.x = coords.x + pos.x; - this.clientXY_.y = coords.y + pos.y; - - if (goog.isDef(opt_coords2)) { - this.clientXY2_.x = opt_coords2.x + pos.x; - this.clientXY2_.y = opt_coords2.y + pos.y; - } - - if (this.isPressed()) { - this.hasMovedAfterPress_ = true; - if (bot.userAgent.IE_DOC_10) { - this.firePointerEvents_(bot.Touchscreen.fireSingleMovePointer_); - } else { - this.fireTouchEvent_(bot.events.EventType.TOUCHMOVE); - } - } -}; - - -/** - * Returns whether the touchscreen is currently pressed. - * - * @return {boolean} Whether the touchscreen is pressed. - */ -bot.Touchscreen.prototype.isPressed = function() { - return !!this.touchIdentifier_; -}; - - -/** - * A helper function to fire touch events. - * - * @param {bot.events.EventType} type Event type. - * @private - */ -bot.Touchscreen.prototype.fireTouchEvent_ = function(type) { - if (!this.isPressed()) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Should never fire event when touchscreen is not pressed.'); - } - var touchIdentifier2; - var coords2; - if (this.touchIdentifier2_) { - touchIdentifier2 = this.touchIdentifier2_; - coords2 = this.clientXY2_; - } - this.fireTouchEvent(type, this.touchIdentifier_, this.clientXY_, - touchIdentifier2, coords2); -}; - - -/** - * A helper function to fire touch events that occur on a release. - * - * @private - */ -bot.Touchscreen.prototype.fireTouchReleaseEvents_ = function() { - this.fireTouchEvent_(bot.events.EventType.TOUCHEND); - - // If no movement occurred since press, TouchScreen.Release will fire the - // legacy mouse events: mousemove, mousedown, mouseup, and click - // after the touch events have been fired. The click button should be zero - // and only one mousemove should fire. - if (!this.hasMovedAfterPress_) { - this.fireMouseEvent(bot.events.EventType.MOUSEMOVE, this.clientXY_, 0); - var performFocus = this.fireMouseEvent(bot.events.EventType.MOUSEDOWN, - this.clientXY_, 0); - // Element gets focus after the mousedown event only if the mousedown was - // not cancelled. - if (performFocus) { - this.focusOnElement(); - } - this.fireMouseEvent(bot.events.EventType.MOUSEUP, this.clientXY_, 0); - - // Special click logic to follow links and to perform form actions. - this.clickElement(this.clientXY_, /* button value */ 0); - } -}; - - -/** - * A helper function to fire a sequence of Pointer events. - * @param {function(!bot.Touchscreen, !goog.math.Coordinate, number, boolean)} - * fireSinglePointer A function that fires a set of events for one finger. - * @private - */ -bot.Touchscreen.prototype.firePointerEvents_ = function(fireSinglePointer) { - fireSinglePointer(this, this.clientXY_, this.touchIdentifier_, true); - if (this.touchIdentifier2_) { - fireSinglePointer(this, this.clientXY2_, this.touchIdentifier2_, false); - } -}; - - -/** - * A helper function to fire Pointer events related to a press. - * - * @param {!bot.Touchscreen} ts A touchscreen object. - * @param {!goog.math.Coordinate} coords Coordinates relative to - * currentElement. - * @param {number} id The touch identifier. - * @param {boolean} isPrimary Whether the pointer represents the primary point - * of contact. - * @private - */ -bot.Touchscreen.fireSinglePressPointer_ = function(ts, coords, id, isPrimary) { - // Fire a mousemove event. - ts.fireMouseEvent(bot.events.EventType.MOUSEMOVE, coords, 0); - - // Fire a MSPointerOver and mouseover events. - ts.fireMSPointerEvent(bot.events.EventType.MSPOINTEROVER, coords, 0, id, - MSPointerEvent.MSPOINTER_TYPE_TOUCH, isPrimary); - ts.fireMouseEvent(bot.events.EventType.MOUSEOVER, coords, 0); - - // Fire a MSPointerDown and mousedown events. - ts.fireMSPointerEvent(bot.events.EventType.MSPOINTERDOWN, coords, 0, id, - MSPointerEvent.MSPOINTER_TYPE_TOUCH, isPrimary); - - // Element gets focus after the mousedown event. - if (ts.fireMouseEvent(bot.events.EventType.MOUSEDOWN, coords, 0)) { - ts.focusOnElement(); - } -}; - - -/** - * A helper function to fire Pointer events related to a release. - * - * @param {!bot.Touchscreen} ts A touchscreen object. - * @param {!goog.math.Coordinate} coords Coordinates relative to - * currentElement. - * @param {number} id The touch identifier. - * @param {boolean} isPrimary Whether the pointer represents the primary point - * of contact. - * @private - */ -bot.Touchscreen.fireSingleReleasePointer_ = function(ts, coords, id, - isPrimary) { - // Fire a MSPointerUp and mouseup events. - ts.fireMSPointerEvent(bot.events.EventType.MSPOINTERUP, coords, 0, id, - MSPointerEvent.MSPOINTER_TYPE_TOUCH, isPrimary); - ts.fireMouseEvent(bot.events.EventType.MOUSEUP, coords, 0); - - // Fire a click. - ts.clickElement(coords, 0); - - // Fire a MSPointerOut and mouseout events. - ts.fireMSPointerEvent(bot.events.EventType.MSPOINTEROUT, coords, -1, id, - MSPointerEvent.MSPOINTER_TYPE_TOUCH, isPrimary); - ts.fireMouseEvent(bot.events.EventType.MOUSEOUT, coords, 0); -}; - - -/** - * A helper function to fire Pointer events related to a move. - * - * @param {!bot.Touchscreen} ts A touchscreen object. - * @param {!goog.math.Coordinate} coords Coordinates relative to - * currentElement. - * @param {number} id The touch identifier. - * @param {boolean} isPrimary Whether the pointer represents the primary point - * of contact. - * @private - */ -bot.Touchscreen.fireSingleMovePointer_ = function(ts, coords, id, isPrimary) { - // Fire a MSPointerMove and mousemove events. - ts.fireMSPointerEvent(bot.events.EventType.MSPOINTERMOVE, coords, -1, id, - MSPointerEvent.MSPOINTER_TYPE_TOUCH, isPrimary); - ts.fireMouseEvent(bot.events.EventType.MOUSEMOVE, coords, 0); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Similar to goog.userAgent.isVersion, but with support for - * getting the version information when running in a firefox extension. - */ -goog.provide('bot.userAgent'); - -goog.require('goog.string'); -goog.require('goog.userAgent'); -goog.require('goog.userAgent.product'); -goog.require('goog.userAgent.product.isVersion'); - - -/** - * Whether the rendering engine version of the current browser is equal to or - * greater than the given version. This implementation differs from - * goog.userAgent.isVersion in the following ways: - * <ol> - * <li>in a Firefox extension, tests the engine version through the XUL version - * comparator service, because no window.navigator object is available - * <li>in IE, compares the given version to the current documentMode - * </ol> - * - * @param {string|number} version The version number to check. - * @return {boolean} Whether the browser engine version is the same or higher - * than the given version. - */ -bot.userAgent.isEngineVersion = function(version) { - if (bot.userAgent.FIREFOX_EXTENSION) { - return bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_(version); - } else if (goog.userAgent.IE) { - return goog.string.compareVersions( - /** @type {number} */ (goog.userAgent.DOCUMENT_MODE), version) >= 0; - } else { - return goog.userAgent.isVersion(version); - } -}; - - -/** - * Whether the product version of the current browser is equal to or greater - * than the given version. This implementation differs from - * goog.userAgent.product.isVersion in the following ways: - * <ol> - * <li>in a Firefox extension, tests the product version through the XUL version - * comparator service, because no window.navigator object is available - * <li>on Android, always compares to the version to the OS version - * </ol> - * - * @param {string|number} version The version number to check. - * @return {boolean} Whether the browser product version is the same or higher - * than the given version. - */ -bot.userAgent.isProductVersion = function(version) { - if (bot.userAgent.FIREFOX_EXTENSION) { - return bot.userAgent.FIREFOX_EXTENSION_IS_PRODUCT_VERSION_(version); - } else if (goog.userAgent.product.ANDROID) { - return goog.string.compareVersions( - bot.userAgent.ANDROID_VERSION_, version) >= 0; - } else { - return goog.userAgent.product.isVersion(version); - } -}; - - -/** - * When we are in a Firefox extension, this is a function that accepts a version - * and returns whether the version of Gecko we are on is the same or higher - * than the given version. When we are not in a Firefox extension, this is null. - * - * @private {(undefined|function((string|number)): boolean)} - */ -bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_; - - -/** - * When we are in a Firefox extension, this is a function that accepts a version - * and returns whether the version of Firefox we are on is the same or higher - * than the given version. When we are not in a Firefox extension, this is null. - * - * @private {(undefined|function((string|number)): boolean)} - */ -bot.userAgent.FIREFOX_EXTENSION_IS_PRODUCT_VERSION_; - - -/** - * Whether we are in a Firefox extension. - * - * @const - * @type {boolean} - */ -bot.userAgent.FIREFOX_EXTENSION = (function() { - // False if this browser is not a Gecko browser. - if (!goog.userAgent.GECKO) { - return false; - } - - // False if this code isn't running in an extension. - var Components = goog.global.Components; - if (!Components) { - return false; - } - try { - if (!Components['classes']) { - return false; - } - } catch (e) { - return false; - } - - // Populate the version checker functions. - var cc = Components['classes']; - var ci = Components['interfaces']; - var versionComparator = cc['@mozilla.org/xpcom/version-comparator;1'][ - 'getService'](ci['nsIVersionComparator']); - var appInfo = cc['@mozilla.org/xre/app-info;1']['getService']( - ci['nsIXULAppInfo']); - var geckoVersion = appInfo['platformVersion']; - var firefoxVersion = appInfo['version']; - - bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_ = function(version) { - return versionComparator.compare(geckoVersion, '' + version) >= 0; - }; - bot.userAgent.FIREFOX_EXTENSION_IS_PRODUCT_VERSION_ = function(version) { - return versionComparator.compare(firefoxVersion, '' + version) >= 0; - }; - - return true; -})(); - - -/** - * Whether we are on IOS. - * - * @const - * @type {boolean} - */ -bot.userAgent.IOS = goog.userAgent.product.IPAD || - goog.userAgent.product.IPHONE; - - -/** - * Whether we are on a mobile browser. - * - * @const - * @type {boolean} - */ -bot.userAgent.MOBILE = bot.userAgent.IOS || goog.userAgent.product.ANDROID; - - -/** - * Android Operating System Version. - * - * @const - * @private {string} - */ -bot.userAgent.ANDROID_VERSION_ = (function() { - if (goog.userAgent.product.ANDROID) { - var userAgentString = goog.userAgent.getUserAgentString(); - var match = /Android\s+([0-9\.]+)/.exec(userAgentString); - return match ? match[1] : '0'; - } else { - return '0'; - } -})(); - - -/** - * Whether the current document is IE in a documentMode older than 8. - * @type {boolean} - * @const - */ -bot.userAgent.IE_DOC_PRE8 = goog.userAgent.IE && - !goog.userAgent.isDocumentMode(8); - - -/** - * Whether the current document is IE in IE9 (or newer) standards mode. - * @type {boolean} - * @const - */ -bot.userAgent.IE_DOC_9 = goog.userAgent.isDocumentMode(9); - - -/** - * Whether the current document is IE in a documentMode older than 9. - * @type {boolean} - * @const - */ -bot.userAgent.IE_DOC_PRE9 = goog.userAgent.IE && - !goog.userAgent.isDocumentMode(9); - - -/** - * Whether the current document is IE in IE10 (or newer) standards mode. - * @type {boolean} - * @const - */ -bot.userAgent.IE_DOC_10 = goog.userAgent.isDocumentMode(10); - - -/** - * Whether the current document is IE in a documentMode older than 10. - * @type {boolean} - * @const - */ -bot.userAgent.IE_DOC_PRE10 = goog.userAgent.IE && - !goog.userAgent.isDocumentMode(10); - - -/** - * Whether the current browser is Android pre-gingerbread. - * @type {boolean} - * @const - */ -bot.userAgent.ANDROID_PRE_GINGERBREAD = goog.userAgent.product.ANDROID && - !bot.userAgent.isProductVersion(2.3); - -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atoms for simulating user actions against the browser window. - */ - -goog.provide('bot.window'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.userAgent'); -goog.require('goog.math.Coordinate'); -goog.require('goog.math.Size'); -goog.require('goog.userAgent'); - - -/** - * Whether the value of history.length includes a newly loaded page. If not, - * after a new page load history.length is the number of pages that have loaded, - * minus 1, but becomes the total number of pages on a subsequent back() call. - * - * @const - * @private {boolean} - */ -bot.window.HISTORY_LENGTH_INCLUDES_NEW_PAGE_ = !goog.userAgent.IE && - !goog.userAgent.OPERA; - - -/** - * Whether value of history.length includes the pages ahead of the current one - * in the history. If not, history.length equals the number of prior pages. - * Here is the WebKit bug for this behavior that was fixed by version 533: - * https://bugs.webkit.org/show_bug.cgi?id=24472 - * - * @const - * @private {boolean} - */ -bot.window.HISTORY_LENGTH_INCLUDES_FORWARD_PAGES_ = !goog.userAgent.OPERA && - (!goog.userAgent.WEBKIT || bot.userAgent.isEngineVersion('533')); - - -/** - * Go back in the browser history. The number of pages to go back can - * optionally be specified and defaults to 1. - * - * @param {number=} opt_numPages Number of pages to go back. - */ -bot.window.back = function(opt_numPages) { - // Relax the upper bound by one for browsers that do not count - // newly loaded pages towards the value of window.history.length. - var maxPages = bot.window.HISTORY_LENGTH_INCLUDES_NEW_PAGE_ ? - bot.getWindow().history.length - 1 : bot.getWindow().history.length; - var numPages = bot.window.checkNumPages_(maxPages, opt_numPages); - bot.getWindow().history.go(-numPages); -}; - - -/** - * Go forward in the browser history. The number of pages to go forward can - * optionally be specified and defaults to 1. - * - * @param {number=} opt_numPages Number of pages to go forward. - */ -bot.window.forward = function(opt_numPages) { - // Do not check the upper bound (use null for infinity) for browsers that - // do not count forward pages towards the value of window.history.length. - var maxPages = bot.window.HISTORY_LENGTH_INCLUDES_FORWARD_PAGES_ ? - bot.getWindow().history.length - 1 : null; - var numPages = bot.window.checkNumPages_(maxPages, opt_numPages); - bot.getWindow().history.go(numPages); -}; - - -/** - * @param {?number} maxPages Upper bound on number of pages; null for infinity. - * @param {number=} opt_numPages Number of pages to move in history. - * @return {number} Correct number of pages to move in history. - * @private - */ -bot.window.checkNumPages_ = function(maxPages, opt_numPages) { - var numPages = goog.isDef(opt_numPages) ? opt_numPages : 1; - if (numPages <= 0) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'number of pages must be positive'); - } - if (maxPages !== null && numPages > maxPages) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'number of pages must be less than the length of the browser history'); - } - return numPages; -}; - - -/** - * Determine the size of the window that a user could interact with. This will - * be the greatest of document.body.(width|scrollWidth), the same for - * document.documentElement or the size of the viewport. - * - * @param {!Window=} opt_win Window to determine the size of. Defaults to - * bot.getWindow(). - * @return {!goog.math.Size} The calculated size. - */ -bot.window.getInteractableSize = function(opt_win) { - var win = opt_win || bot.getWindow(); - var doc = win.document; - var elem = doc.documentElement; - var body = doc.body; - if (!body) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'No BODY element present'); - } - - var widths = [ - elem.clientWidth, elem.scrollWidth, elem.offsetWidth, - body.scrollWidth, body.offsetWidth - ]; - var heights = [ - elem.clientHeight, elem.scrollHeight, elem.offsetHeight, - body.scrollHeight, body.offsetHeight - ]; - - var width = Math.max.apply(null, widths); - var height = Math.max.apply(null, heights); - - return new goog.math.Size(width, height); -}; - - -/** - * Determine the outer size of the window. - * - * @param {!Window=} opt_win Window to determine the size of. Defaults to - * bot.getWindow(). - * @return {!goog.math.Size} The calculated size. - */ -bot.window.getSize = function(opt_win) { - var win = opt_win || bot.getWindow(); - - var width = win.outerWidth; - var height = win.outerHeight; - - return new goog.math.Size(width, height); -}; - - -/** - * Set the outer size of the window. - * - * @param {!goog.math.Size} size The new window size. - * @param {!Window=} opt_win Window to determine the size of. Defaults to - * bot.getWindow(). - */ -bot.window.setSize = function(size, opt_win) { - var win = opt_win || bot.getWindow(); - - win.resizeTo(size.width, size.height); -}; - - -/** - * Get the position of the window. - * - * @param {!Window=} opt_win Window to determine the position of. Defaults to - * bot.getWindow(). - * @return {!goog.math.Coordinate} The position of the window. - */ -bot.window.getPosition = function(opt_win) { - var win = opt_win || bot.getWindow(); - var x, y; - - if (goog.userAgent.IE) { - x = win.screenLeft; - y = win.screenTop; - } else { - x = win.screenX; - y = win.screenY; - } - - return new goog.math.Coordinate(x, y); -}; - - -/** - * Set the position of the window. - * - * @param {!goog.math.Coordinate} targetPosition The target position. - * @param {!Window=} opt_win Window to set the position of. Defaults to - * bot.getWindow(). - */ -bot.window.setPosition = function(targetPosition, opt_win) { - var win = opt_win || bot.getWindow(); - win.moveTo(targetPosition.x, targetPosition.y); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('bot.locators.className'); - -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.dom.DomHelper'); -goog.require('goog.string'); - - -/** - * Tests whether the standardized W3C Selectors API are available on an - * element. - * @param {!(Document|Element)} root The document or element to test for CSS - * selector support. - * @return {boolean} Whether or not the root supports query selector APIs. - * @see http://www.w3.org/TR/selectors-api/ - * @private - */ -bot.locators.className.canUseQuerySelector_ = function(root) { - return !!(root.querySelectorAll && root.querySelector); -}; - - -/** - * Find an element by its class name. - * @param {string} target The class name to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.className.single = function(target, root) { - if (!target) { - throw Error('No class name specified'); - } - - target = goog.string.trim(target); - if (target.split(/\s+/).length > 1) { - throw Error('Compound class names not permitted'); - } - - // Closure will not properly escape class names that contain a '.' when using - // the native selectors API, so we have to handle this ourselves. - if (bot.locators.className.canUseQuerySelector_(root)) { - return root.querySelector('.' + target.replace(/\./g, '\\.')) || null; - } - var elements = goog.dom.getDomHelper(root).getElementsByTagNameAndClass( - /*tagName=*/'*', /*className=*/target, root); - return elements.length ? elements[0] : null; -}; - - -/** - * Find an element by its class name. - * @param {string} target The class name to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {!goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.className.many = function(target, root) { - if (!target) { - throw Error('No class name specified'); - } - - target = goog.string.trim(target); - if (target.split(/\s+/).length > 1) { - throw Error('Compound class names not permitted'); - } - - // Closure will not properly escape class names that contain a '.' when using - // the native selectors API, so we have to handle this ourselves. - if (bot.locators.className.canUseQuerySelector_(root)) { - return root.querySelectorAll('.' + target.replace(/\./g, '\\.')); - } - return goog.dom.getDomHelper(root).getElementsByTagNameAndClass( - /*tagName=*/'*', /*className=*/target, root); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(simon): Add support for using sizzle to locate elements - -goog.provide('bot.locators.css'); - -goog.require('bot.userAgent'); -goog.require('goog.dom.NodeType'); -goog.require('goog.string'); -goog.require('goog.userAgent'); - - -/** - * Find an element by using a CSS selector - * - * @param {string} target The selector to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.css.single = function(target, root) { - if (!goog.isFunction(root['querySelector']) && - // IE8 in non-compatibility mode reports querySelector as an object. - goog.userAgent.IE && bot.userAgent.isEngineVersion(8) && - !goog.isObject(root['querySelector'])) { - throw Error('CSS selection is not supported'); - } - - if (!target) { - throw Error('No selector specified'); - } - - target = goog.string.trim(target); - - var element = root.querySelector(target); - - return element && element.nodeType == goog.dom.NodeType.ELEMENT ? - (/**@type {Element}*/element) : null; -}; - - -/** - * Find all elements matching a CSS selector. - * - * @param {string} target The selector to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {!goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.css.many = function(target, root) { - if (!goog.isFunction(root['querySelectorAll']) && - // IE8 in non-compatibility mode reports querySelector as an object. - goog.userAgent.IE && bot.userAgent.isEngineVersion(8) && - !goog.isObject(root['querySelector'])) { - throw Error('CSS selection is not supported'); - } - - if (!target) { - throw Error('No selector specified'); - } - - target = goog.string.trim(target); - - return root.querySelectorAll(target); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('bot.locators.id'); - -goog.require('bot.dom'); -goog.require('goog.array'); -goog.require('goog.dom'); - - -/** - * Find an element by using the value of the ID attribute. - * @param {string} target The id to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.id.single = function(target, root) { - var dom = goog.dom.getDomHelper(root); - - var e = dom.getElement(target); - if (!e) { - return null; - } - - // On IE getting by ID returns the first match by id _or_ name. - if (bot.dom.getAttribute(e, 'id') == target && goog.dom.contains(root, e)) { - return e; - } - - var elements = dom.getElementsByTagNameAndClass('*'); - var element = goog.array.find(elements, function(element) { - return bot.dom.getAttribute(element, 'id') == target && - goog.dom.contains(root, element); - }); - return (/**@type{Element}*/element); -}; - - -/** - * Find many elements by using the value of the ID attribute. - * @param {string} target The id to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {!goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.id.many = function(target, root) { - var dom = goog.dom.getDomHelper(root); - var elements = dom.getElementsByTagNameAndClass('*', null, root); - return goog.array.filter(elements, function(e) { - return bot.dom.getAttribute(e, 'id') == target; - }); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('bot.locators.linkText'); -goog.provide('bot.locators.partialLinkText'); - -goog.require('bot'); -goog.require('bot.dom'); -goog.require('bot.locators.css'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.dom.DomHelper'); - - -/** - * Find an element by using the text value of a link - * @param {string} target The link text to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @param {boolean} opt_isPartial Whether the link text needs to be matched - * only partially. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - * @private - */ -bot.locators.linkText.single_ = function(target, root, opt_isPartial) { - var elements; - try { - elements = bot.locators.css.many('a', root); - } catch (e) { - // Old versions of browsers don't support CSS. They won't have XHTML - // support. Sorry. - elements = goog.dom.getDomHelper(root).getElementsByTagNameAndClass( - goog.dom.TagName.A, /*className=*/null, root); - } - - var element = goog.array.find(elements, function(element) { - var text = bot.dom.getVisibleText(element); - return (opt_isPartial && text.indexOf(target) != -1) || text == target; - }); - return (/**@type{Element}*/element); -}; - - -/** - * Find many elements by using the value of the link text - * @param {string} target The link text to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @param {boolean} opt_isPartial Whether the link text needs to be matched - * only partially. - * @return {goog.array.ArrayLike} All matching elements, or an empty list. - * @private - */ -bot.locators.linkText.many_ = function(target, root, opt_isPartial) { - var elements; - try { - elements = bot.locators.css.many('a', root); - } catch (e) { - // Old versions of browsers don't support CSS. They won't have XHTML - // support. Sorry. - elements = goog.dom.getDomHelper(root).getElementsByTagNameAndClass( - goog.dom.TagName.A, /*className=*/null, root); - } - - return goog.array.filter(elements, function(element) { - var text = bot.dom.getVisibleText(element); - return (opt_isPartial && text.indexOf(target) != -1) || text == target; - }); -}; - - -/** - * Find an element by using the text value of a link - * @param {string} target The link text to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.linkText.single = function(target, root) { - return bot.locators.linkText.single_(target, root, false); -}; - - -/** - * Find many elements by using the value of the link text - * @param {string} target The link text to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.linkText.many = function(target, root) { - return bot.locators.linkText.many_(target, root, false); -}; - - -/** - * Find an element by using part of the text value of a link. - * @param {string} target The link text to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.partialLinkText.single = function(target, root) { - return bot.locators.linkText.single_(target, root, true); -}; - - -/** - * Find many elements by using part of the value of the link text. - * @param {string} target The link text to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.partialLinkText.many = function(target, root) { - return bot.locators.linkText.many_(target, root, true); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Element locator functions. - */ - - -goog.provide('bot.locators'); - -goog.require('bot'); -goog.require('bot.locators.className'); -goog.require('bot.locators.css'); -goog.require('bot.locators.id'); -goog.require('bot.locators.linkText'); -goog.require('bot.locators.name'); -goog.require('bot.locators.partialLinkText'); -goog.require('bot.locators.tagName'); -goog.require('bot.locators.xpath'); -goog.require('goog.array'); // for the goog.array.ArrayLike typedef -goog.require('goog.object'); - - -/** - * @typedef {{single:function(string,!(Document|Element)):Element, - * many:function(string,!(Document|Element)):!goog.array.ArrayLike}} - */ -bot.locators.strategy; - - -/** - * Known element location strategies. The returned objects have two - * methods on them, "single" and "many", for locating a single element - * or multiple elements, respectively. - * - * Note that the versions with spaces are synonyms for those without spaces, - * and are specified at: - * https://code.google.com/p/selenium/wiki/JsonWireProtocol - * - * @const - * @private {Object.<string,bot.locators.strategy>} - */ -bot.locators.STRATEGIES_ = { - 'className': bot.locators.className, - 'class name': bot.locators.className, - - 'css': bot.locators.css, - 'css selector': bot.locators.css, - - 'id': bot.locators.id, - - 'linkText': bot.locators.linkText, - 'link text': bot.locators.linkText, - - 'name': bot.locators.name, - - 'partialLinkText': bot.locators.partialLinkText, - 'partial link text': bot.locators.partialLinkText, - - 'tagName': bot.locators.tagName, - 'tag name': bot.locators.tagName, - - 'xpath': bot.locators.xpath -}; - - -/** - * Add or override an existing strategy for locating elements. - * - * @param {string} name The name of the strategy. - * @param {!bot.locators.strategy} strategy The strategy to use. - */ -bot.locators.add = function(name, strategy) { - bot.locators.STRATEGIES_[name] = strategy; -}; - - -/** - * Returns one key from the object map that is not present in the - * Object.prototype, if any exists. - * - * @param {Object} target The object to pick a key from. - * @return {string?} The key or null if the object is empty. - */ -bot.locators.getOnlyKey = function(target) { - for (var k in target) { - if (target.hasOwnProperty(k)) { - return k; - } - } - return null; -}; - - -/** - * Find the first element in the DOM matching the target. The target - * object should have a single key, the name of which determines the - * locator strategy and the value of which gives the value to be - * searched for. For example {id: 'foo'} indicates that the first - * element on the DOM with the ID 'foo' should be returned. - * - * @param {!Object} target The selector to search for. - * @param {(Document|Element)=} opt_root The node from which to start the - * search. If not specified, will use {@code document} as the root. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.findElement = function(target, opt_root) { - var key = bot.locators.getOnlyKey(target); - - if (key) { - var strategy = bot.locators.STRATEGIES_[key]; - if (strategy && goog.isFunction(strategy.single)) { - var root = opt_root || bot.getDocument(); - return strategy.single(target[key], root); - } - } - throw Error('Unsupported locator strategy: ' + key); -}; - - -/** - * Find all elements in the DOM matching the target. The target object - * should have a single key, the name of which determines the locator - * strategy and the value of which gives the value to be searched - * for. For example {name: 'foo'} indicates that all elements with the - * 'name' attribute equal to 'foo' should be returned. - * - * @param {!Object} target The selector to search for. - * @param {(Document|Element)=} opt_root The node from which to start the - * search. If not specified, will use {@code document} as the root. - * @return {!goog.array.ArrayLike.<Element>} All matching elements found in the - * DOM. - */ -bot.locators.findElements = function(target, opt_root) { - var key = bot.locators.getOnlyKey(target); - - if (key) { - var strategy = bot.locators.STRATEGIES_[key]; - if (strategy && goog.isFunction(strategy.many)) { - var root = opt_root || bot.getDocument(); - return strategy.many(target[key], root); - } - } - throw Error('Unsupported locator strategy: ' + key); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('bot.locators.name'); - -goog.require('bot.dom'); -goog.require('goog.array'); -goog.require('goog.dom'); - - -/** - * Find an element by the value of the name attribute - * - * @param {string} target The name to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.name.single = function(target, root) { - var dom = goog.dom.getDomHelper(root); - var allElements = dom.getElementsByTagNameAndClass('*', null, root); - var element = goog.array.find(allElements, function(element) { - return bot.dom.getAttribute(element, 'name') == target; - }); - return (/**@type{Element}*/element); -}; - - -/** - * Find all elements by the value of the name attribute - * - * @param {string} target The name to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {!goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.name.many = function(target, root) { - var dom = goog.dom.getDomHelper(root); - var allElements = dom.getElementsByTagNameAndClass('*', null, root); - return goog.array.filter(allElements, function(element) { - return bot.dom.getAttribute(element, 'name') == target; - }); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('bot.locators.tagName'); - -goog.require('goog.array'); - - -/** - * Find an element by its tag name. - * @param {string} target The tag name to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.tagName.single = function(target, root) { - return root.getElementsByTagName(target)[0] || null; -}; - - -/** - * Find all elements with a given tag name. - * @param {string} target The tag name to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.tagName.many = function(target, root) { - return root.getElementsByTagName(target); -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Functions to locate elements by XPath. - * - * <p>The locator implementations below differ from the Closure functions - * goog.dom.xml.{selectSingleNode,selectNodes} in three important ways: - * <ol> - * <li>they do not refer to "document" which is undefined in the context of a - * Firefox extension; - * <li> they use a default NsResolver for browsers that do not provide - * document.createNSResolver (e.g. Android); and - * <li> they prefer document.evaluate to node.{selectSingleNode,selectNodes} - * because the latter silently return nothing when the xpath resolves to a - * non-Node type, limiting the error-checking the implementation can provide. - * </ol> - * - * TODO(user): Add support for browsers without native xpath - */ - -goog.provide('bot.locators.xpath'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.dom.NodeType'); -goog.require('goog.userAgent'); -goog.require('goog.userAgent.product'); -goog.require('wgxpath'); - - -/** - * XPathResult enum values. These are defined separately since - * the context running this script may not support the XPathResult - * type. - * @enum {number} - * @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult - * @private - */ -// TODO(berrada): Move this enum back to bot.locators.xpath namespace. -// The problem is that we alias bot.locators.xpath in locators.js, while -// we set the flag --collapse_properties (http://goo.gl/5W6cP). -// The compiler should have thrown the error anyways, it's a bug that it fails -// only when introducing this enum. -// Solution: remove --collapase_properties from the js_binary rule or -// use goog.exportSymbol to export the public methods and get rid of the alias. -bot.locators.XPathResult_ = { - ORDERED_NODE_SNAPSHOT_TYPE: 7, - FIRST_ORDERED_NODE_TYPE: 9 -}; - - -/** - * Default XPath namespace resolver. - * @private - */ -bot.locators.xpath.DEFAULT_RESOLVER_ = (function() { - var namespaces = {svg: 'http://www.w3.org/2000/svg'}; - return function(prefix) { - return namespaces[prefix] || null; - }; -})(); - - -/** - * Evaluates an XPath expression using a W3 XPathEvaluator. - * @param {!(Document|Element)} node The document or element to perform the - * search under. - * @param {string} path The xpath to search for. - * @param {!bot.locators.XPathResult_} resultType The desired result type. - * @return {XPathResult} The XPathResult or null if the root's ownerDocument - * does not support XPathEvaluators. - * @private - * @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate - */ -bot.locators.xpath.evaluate_ = function(node, path, resultType) { - var doc = goog.dom.getOwnerDocument(node); - - // Let the wgxpath library be compiled away unless we are on IE or Android. - // TODO(gdennis): Restrict this to just IE when we drop support for Froyo. - if (goog.userAgent.IE || goog.userAgent.product.ANDROID) { - wgxpath.install(goog.dom.getWindow(doc)); - } - - try { - var resolver = doc.createNSResolver ? - doc.createNSResolver(doc.documentElement) : - bot.locators.xpath.DEFAULT_RESOLVER_; - if (goog.userAgent.IE && !goog.userAgent.isVersion(7)) { - // IE6, and only IE6, has an issue where calling a custom function - // directly attached to the document object does not correctly propagate - // thrown errors. So in that case *only* we will use apply(). - return doc.evaluate.call(doc, path, node, resolver, resultType, null); - } else { - return doc.evaluate(path, node, resolver, resultType, null); - } - } catch (ex) { - // The Firefox XPath evaluator can throw an exception if the document is - // queried while it's in the midst of reloading, so we ignore it. In all - // other cases, we assume an invalid xpath has caused the exception. - if (!(goog.userAgent.GECKO && ex.name == 'NS_ERROR_ILLEGAL_VALUE')) { - throw new bot.Error(bot.ErrorCode.INVALID_SELECTOR_ERROR, - 'Unable to locate an element with the xpath expression ' + path + - ' because of the following error:\n' + ex); - } - } -}; - - -/** - * @param {Node|undefined} node Node to check whether it is an Element. - * @param {string} path XPath expression to include in the error message. - * @private - */ -bot.locators.xpath.checkElement_ = function(node, path) { - if (!node || node.nodeType != goog.dom.NodeType.ELEMENT) { - throw new bot.Error(bot.ErrorCode.INVALID_SELECTOR_ERROR, - 'The result of the xpath expression "' + path + - '" is: ' + node + '. It should be an element.'); - } -}; - - -/** - * Find an element by using an xpath expression - * @param {string} target The xpath to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {Element} The first matching element found in the DOM, or null if no - * such element could be found. - */ -bot.locators.xpath.single = function(target, root) { - - function selectSingleNode() { - var result = bot.locators.xpath.evaluate_(root, target, - bot.locators.XPathResult_.FIRST_ORDERED_NODE_TYPE); - if (result) { - var node = result.singleNodeValue; - // On Opera, a singleNodeValue of undefined indicates a type error, while - // other browsers may use it to indicate something has not been found. - return goog.userAgent.OPERA ? node : (node || null); - } else if (root.selectSingleNode) { - var doc = goog.dom.getOwnerDocument(root); - if (doc.setProperty) { - doc.setProperty('SelectionLanguage', 'XPath'); - } - return root.selectSingleNode(target); - } - return null; - } - - var node = selectSingleNode(); - if (!goog.isNull(node)) { - bot.locators.xpath.checkElement_(node, target); - } - return (/** @type {Element} */node); -}; - - -/** - * Find elements by using an xpath expression - * @param {string} target The xpath to search for. - * @param {!(Document|Element)} root The document or element to perform the - * search under. - * @return {!goog.array.ArrayLike} All matching elements, or an empty list. - */ -bot.locators.xpath.many = function(target, root) { - - function selectNodes() { - var result = bot.locators.xpath.evaluate_(root, target, - bot.locators.XPathResult_.ORDERED_NODE_SNAPSHOT_TYPE); - if (result) { - var count = result.snapshotLength; - // On Opera, if the XPath evaluates to a non-Node value, snapshotLength - // will be undefined and the result empty, so fail immediately. - if (goog.userAgent.OPERA && !goog.isDef(count)) { - bot.locators.xpath.checkElement_(null, target); - } - var results = []; - for (var i = 0; i < count; ++i) { - results.push(result.snapshotItem(i)); - } - return results; - } else if (root.selectNodes) { - var doc = goog.dom.getOwnerDocument(root); - if (doc.setProperty) { - doc.setProperty('SelectionLanguage', 'XPath'); - } - return root.selectNodes(target); - } - return []; - } - - var nodes = selectNodes(); - goog.array.forEach(nodes, function(n) { - bot.locators.xpath.checkElement_(n, target); - }); - return (/** @type {!goog.array.ArrayLike} */nodes); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atom to access application cache status. - * - */ - -goog.provide('bot.appcache'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.html5'); - - -/** - * Returns the current state of the application cache. - * - * @param {Window=} opt_window The window object whose cache is checked; - * defaults to the main window. - * @return {number} The state. - */ -bot.appcache.getStatus = function(opt_window) { - var win = opt_window || bot.getWindow(); - - if (bot.html5.isSupported(bot.html5.API.APPCACHE, win)) { - return win.applicationCache.status; - } else { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Undefined application cache'); - } -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atoms to check to connection state of a browser. - * - */ - -goog.provide('bot.connection'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.html5'); - - -/** - * @return {boolean} Whether the browser currently has an internet - * connection. - */ -bot.connection.isOnline = function() { - - if (bot.html5.isSupported(bot.html5.API.BROWSER_CONNECTION)) { - var win = bot.getWindow(); - return win.navigator.onLine; - } else { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Undefined browser connection state'); - } -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atoms for executing SQL queries on web client database. - * - */ - -goog.provide('bot.storage.database'); -goog.provide('bot.storage.database.ResultSet'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); - - -/** - * Opens the database to access its contents. This function will create the - * database if it does not exist. For details, - * @see http://www.w3.org/TR/webdatabase/#databases - * - * @param {string} databaseName The name of the database. - * @param {string=} opt_version The expected database version to be opened; - * defaults to the empty string. - * @param {string=} opt_displayName The name to be displayed to the user; - * defaults to the databaseName. - * @param {number=} opt_size The estimated initial quota size of the database; - * default value is 5MB. - * @param {Window=} opt_window The window associated with the database; - * defaults to the main window. - * @return {Database} The object to access the web database. - * - */ -bot.storage.database.openOrCreate = function(databaseName, opt_version, - opt_displayName, opt_size, opt_window) { - var version = opt_version || ''; - var displayName = opt_displayName || (databaseName + 'name'); - var size = opt_size || 5 * 1024 * 1024; - var win = opt_window || bot.getWindow(); - var db; - - return win.openDatabase(databaseName, version, displayName, size); -}; - - -/** - * It executes a single SQL query on a given web database storage. - * - * @param {string} databaseName The name of the database. - * @param {string} query The SQL statement. - * @param {Array.<*>} args Arguments needed for the SQL statement. - * @param {!function(!SQLTransaction, !bot.storage.database.ResultSet)} - * queryResultCallback Callback function to be invoked on successful query - * statement execution. - * @param {!function(SQLError)} txErrorCallback - * Callback function to be invoked on transaction (commit) failure. - * @param {!function()=} opt_txSuccessCallback - * Callback function to be invoked on successful transaction execution. - * @param {function(!SQLTransaction, !SQLError)=} opt_queryErrorCallback - * Callback function to be invoked on successful query statement execution. - * @see http://www.w3.org/TR/webdatabase/#executing-sql-statements - */ -bot.storage.database.executeSql = function(databaseName, query, args, - queryResultCallback, txErrorCallback, opt_txSuccessCallback, - opt_queryErrorCallback) { - - var db; - - try { - db = bot.storage.database.openOrCreate(databaseName); - } catch (e) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, e.message); - } - - var queryCallback = function(tx, result) { - var wrappedResult = new bot.storage.database.ResultSet(result); - queryResultCallback(tx, wrappedResult); - } - - var transactionCallback = function(tx) { - tx.executeSql(query, args, queryCallback, opt_queryErrorCallback); - } - - db.transaction(transactionCallback, txErrorCallback, - opt_txSuccessCallback); -}; - - - -/** - * A wrapper of the SQLResultSet object returned by the SQL statement. - * - * @param {!SQLResultSet} sqlResultSet The original SQLResultSet object. - * @constructor - */ -bot.storage.database.ResultSet = function(sqlResultSet) { - - /** - * The database rows retuned from the SQL query. - * @type {!Array.<*>} - */ - this.rows = []; - for (var i = 0; i < sqlResultSet.rows.length; i++) { - this.rows[i] = sqlResultSet.rows.item(i); - } - - /** - * The number of rows that were changed by the SQL statement - * @type {number} - */ - this.rowsAffected = sqlResultSet.rowsAffected; - - /** - * The row ID of the row that the SQLResultSet object's SQL statement - * inserted into the database, if the statement inserted a row; else - * it is assigned to -1. Originally, accessing insertId attribute of - * a SQLResultSet object returns the exception INVALID_ACCESS_ERR - * if no rows are inserted. - * @type {number} - */ - this.insertId = -1; - try { - this.insertId = sqlResultSet.insertId; - } catch (error) { - // If accessing sqlResultSet.insertId results in INVALID_ACCESS_ERR - // exception, this.insertId will be assigned to -1. - } -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Helper function to determine which HTML5 features are - * supported by browsers.. - */ - -goog.provide('bot.html5'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.userAgent'); -goog.require('goog.userAgent'); -goog.require('goog.userAgent.product'); - - -/** - * Identifier for supported HTML5 API in Webdriver. - * - * @enum {string} - */ -bot.html5.API = { - APPCACHE: 'appcache', - BROWSER_CONNECTION: 'browser_connection', - DATABASE: 'database', - GEOLOCATION: 'location', - LOCAL_STORAGE: 'local_storage', - SESSION_STORAGE: 'session_storage', - VIDEO: 'video', - AUDIO: 'audio', - CANVAS: 'canvas' -}; - - -/** - * True if the current browser is IE8. - * - * @private {boolean} - * @const - */ -bot.html5.IS_IE8_ = goog.userAgent.IE && - bot.userAgent.isEngineVersion(8) && !bot.userAgent.isEngineVersion(9); - - -/** - * True if the current browser is Safari 4. - * - * @private {boolean} - * @const - */ -bot.html5.IS_SAFARI4_ = goog.userAgent.product.SAFARI && - bot.userAgent.isProductVersion(4) && !bot.userAgent.isProductVersion(5); - - -/** - * True if the browser is Android 2.2 (Froyo). - * - * @private {boolean} - * @const - */ -bot.html5.IS_ANDROID_FROYO_ = goog.userAgent.product.ANDROID && - bot.userAgent.isProductVersion(2.2) && !bot.userAgent.isProductVersion(2.3); - - -/** - * True if the current browser is Safari 5 on Windows. - * - * @private {boolean} - * @const - */ -bot.html5.IS_SAFARI_WINDOWS_ = goog.userAgent.WINDOWS && - goog.userAgent.product.SAFARI && - (bot.userAgent.isProductVersion(4)) && - !bot.userAgent.isProductVersion(6); - - -/** - * Checks if the browser supports an HTML5 feature. - * - * @param {bot.html5.API} api HTML5 API identifier. - * @param {!Window=} opt_window The window to be accessed; - * defaults to the main window. - * @return {boolean} Whether the browser supports the feature. - */ -bot.html5.isSupported = function(api, opt_window) { - var win = opt_window || bot.getWindow(); - - switch (api) { - case bot.html5.API.APPCACHE: - // IE8 does not support application cache, though the APIs exist. - if (bot.html5.IS_IE8_) { - return false; - } - return goog.isDefAndNotNull(win.applicationCache); - - case bot.html5.API.BROWSER_CONNECTION: - return goog.isDefAndNotNull(win.navigator) && - goog.isDefAndNotNull(win.navigator.onLine); - - case bot.html5.API.DATABASE: - // Safari4 database API does not allow writes. - if (bot.html5.IS_SAFARI4_) { - return false; - } - // Android Froyo does not support database, though the APIs exist. - if (bot.html5.IS_ANDROID_FROYO_) { - return false; - } - return goog.isDefAndNotNull(win.openDatabase); - - case bot.html5.API.GEOLOCATION: - // Safari 4,5 on Windows do not support geolocation, see: - // https://discussions.apple.com/thread/3547900 - if (bot.html5.IS_SAFARI_WINDOWS_) { - return false; - } - return goog.isDefAndNotNull(win.navigator) && - goog.isDefAndNotNull(win.navigator.geolocation); - - case bot.html5.API.LOCAL_STORAGE: - // IE8 does not support local storage, though the APIs exist. - if (bot.html5.IS_IE8_) { - return false; - } - return goog.isDefAndNotNull(win.localStorage); - - case bot.html5.API.SESSION_STORAGE: - // IE8 does not support session storage, though the APIs exist. - if (bot.html5.IS_IE8_) { - return false; - } - return goog.isDefAndNotNull(win.sessionStorage) && - // To avoid browsers that only support this API partically - // like some versions of FF. - goog.isDefAndNotNull(win.sessionStorage.clear); - - default: - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Unsupported API identifier provided as parameter'); - } -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atom to retrieve the physical location of the device. - * - */ - -goog.provide('bot.geolocation'); - -goog.require('bot'); -goog.require('bot.html5'); - - -/** - * Default parameters used to configure the geolocation.getCurrentPosition - * method. These parameters mean retrieval of any cached position with high - * accuracy within a timeout interval of 5s. - * @const - * @type {GeolocationPositionOptions} - * @see http://dev.w3.org/geo/api/spec-source.html#position-options - */ -bot.geolocation.DEFAULT_OPTIONS = /** @type {GeolocationPositionOptions} */ ({ - enableHighAccuracy: true, - maximumAge: Infinity, - timeout: 5000 -}); - - -/** - * Provides a mechanism to retrieve the geolocation of the device. It invokes - * the navigator.geolocation.getCurrentPosition method of the HTML5 API which - * later callbacks with either position value or any error. The position/ - * error is updated with the callback functions. - * - * @param {function(?GeolocationPosition)} successCallback The callback method - * which is invoked on success. - * @param {function(GeolocationPositionError)=} opt_errorCallback The callback - * method which is invoked on error. - * @param {GeolocationPositionOptions=} opt_options The optional parameters to - * navigator.geolocation.getCurrentPosition; defaults to - * bot.geolocation.DEFAULT_OPTIONS. - */ -bot.geolocation.getCurrentPosition = function(successCallback, - opt_errorCallback, opt_options) { - var win = bot.getWindow(); - var posOptions = opt_options || bot.geolocation.DEFAULT_OPTIONS; - - if (bot.html5.isSupported(bot.html5.API.GEOLOCATION, win)) { - var geolocation = win.navigator.geolocation; - geolocation.getCurrentPosition(successCallback, - opt_errorCallback, posOptions); - } else { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, 'Geolocation undefined'); - } -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Atoms for accessing HTML5 web storage maps (localStorage, - * sessionStorage). These storage objects store each item as a key-value - * mapping pair. - * - */ - -goog.provide('bot.storage'); -goog.provide('bot.storage.Storage'); - -goog.require('bot'); -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.html5'); - - -/** - * A factory method to create a wrapper to access the HTML5 localStorage - * object. - * Note: We are not using Closure from goog.storage, - * Closure uses "window" object directly, which may not always be - * defined (for example in firefox extensions). - * We use bot.window() from bot.js instead to keep track of the window or frame - * is currently being used for command execution. The implementation is - * otherwise similar to the implementation in the Closure library - * (goog.storage.mechansim.HTML5LocalStorage). - * - * @param {Window=} opt_window The window whose storage to access; - * defaults to the main window. - * @return {!bot.storage.Storage} The wrapper Storage object. - */ -bot.storage.getLocalStorage = function(opt_window) { - var win = opt_window || bot.getWindow(); - - if (!bot.html5.isSupported(bot.html5.API.LOCAL_STORAGE, win)) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, 'Local storage undefined'); - } - var storageMap = win.localStorage; - return new bot.storage.Storage(storageMap); -}; - - -/** - * A factory method to create a wrapper to access the HTML5 sessionStorage - * object. - * - * @param {Window=} opt_window The window whose storage to access; - * defaults to the main window. - * @return {!bot.storage.Storage} The wrapper Storage object. - */ -bot.storage.getSessionStorage = function(opt_window) { - var win = opt_window || bot.getWindow(); - - if (bot.html5.isSupported(bot.html5.API.SESSION_STORAGE, win)) { - var storageMap = win.sessionStorage; - return new bot.storage.Storage(storageMap); - } - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, - 'Session storage undefined'); -}; - - - -/** - * Provides a wrapper object to the HTML5 web storage object. - * @constructor - * - * @param {Storage} storageMap HTML5 storage object e.g. localStorage, - * sessionStorage. - */ -bot.storage.Storage = function(storageMap) { - /** - * Member variable to access the assigned HTML5 storage object. - * @private {Storage} - */ - this.storageMap_ = storageMap; -}; - - -/** - * Sets the value item of a key/value pair in the Storage object. - * If the value given is null, the string 'null' will be inserted - * instead. - * - * @param {string} key The key of the item. - * @param {*} value The value of the item. - */ -bot.storage.Storage.prototype.setItem = function(key, value) { - try { - // Note: Ideally, browsers should set a null value. But the browsers - // report arbitrarily. Firefox returns <null>, while Chrome reports - // the string "null". We are setting the value to the string "null". - this.storageMap_.setItem(key, value + ''); - } catch (e) { - throw new bot.Error(bot.ErrorCode.UNKNOWN_ERROR, e.message); - } -}; - - -/** - * Returns the value item of a key in the Storage object. - * - * @param {string} key The key of the returned value. - * @return {?string} The mapped value if present in the storage object, - * otherwise null. If a null value was inserted for a given - * key, then the string 'null' is returned. - */ -bot.storage.Storage.prototype.getItem = function(key) { - var value = this.storageMap_.getItem(key); - return /** @type {?string} */ (value); -}; - - -/** - * Returns an array of keys of all keys of the Storage object. - * - * @return {Array.<string>} The array of stored keys.. - */ -bot.storage.Storage.prototype.keySet = function() { - var keys = []; - var length = this.size(); - for (var i = 0; i < length; i++) { - keys[i] = this.storageMap_.key(i); - } - return keys; -}; - - -/** - * Removes an item with a given key. - * - * @param {string} key The key item of the key/value pair. - * @return {?string} The removed value if present, otherwise null. - */ -bot.storage.Storage.prototype.removeItem = function(key) { - var value = this.getItem(key); - this.storageMap_.removeItem(key); - return value; -}; - - -/** - * Removes all items. - */ -bot.storage.Storage.prototype.clear = function() { - this.storageMap_.clear(); -}; - - -/** - * Returns the number of items in the Storage object. - * - * @return {number} The number of the key/value pairs. - */ -bot.storage.Storage.prototype.size = function() { - return this.storageMap_.length; -}; - - -/** - * Returns the key item of the key/value pairs in the Storage object - * of a given index. - * - * @param {number} index The index of the key/value pair list. - * @return {?string} The key item of a given index. - */ -bot.storage.Storage.prototype.key = function(index) { - return this.storageMap_.key(index); -}; - - -/** - * Returns HTML5 storage object of the wrapper Storage object - * - * @return {Storage} The storageMap attribute. - */ -bot.storage.Storage.prototype.getStorageMap = function() { - return this.storageMap_; -}; -// Copyright 2012 Software Freedom Conservancy. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('webdriver.Key'); - - -/** - * Representations of pressable keys that aren't text. These are stored in - * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to - * http://www.google.com.au/search?&q=unicode+pua&btnG=Search - * - * @enum {string} - */ -webdriver.Key = { - NULL: '\uE000', - CANCEL: '\uE001', // ^break - HELP: '\uE002', - BACK_SPACE: '\uE003', - TAB: '\uE004', - CLEAR: '\uE005', - RETURN: '\uE006', - ENTER: '\uE007', - SHIFT: '\uE008', - CONTROL: '\uE009', - ALT: '\uE00A', - PAUSE: '\uE00B', - ESCAPE: '\uE00C', - SPACE: '\uE00D', - PAGE_UP: '\uE00E', - PAGE_DOWN: '\uE00F', - END: '\uE010', - HOME: '\uE011', - ARROW_LEFT: '\uE012', - LEFT: '\uE012', - ARROW_UP: '\uE013', - UP: '\uE013', - ARROW_RIGHT: '\uE014', - RIGHT: '\uE014', - ARROW_DOWN: '\uE015', - DOWN: '\uE015', - INSERT: '\uE016', - DELETE: '\uE017', - SEMICOLON: '\uE018', - EQUALS: '\uE019', - - NUMPAD0: '\uE01A', // number pad keys - NUMPAD1: '\uE01B', - NUMPAD2: '\uE01C', - NUMPAD3: '\uE01D', - NUMPAD4: '\uE01E', - NUMPAD5: '\uE01F', - NUMPAD6: '\uE020', - NUMPAD7: '\uE021', - NUMPAD8: '\uE022', - NUMPAD9: '\uE023', - MULTIPLY: '\uE024', - ADD: '\uE025', - SEPARATOR: '\uE026', - SUBTRACT: '\uE027', - DECIMAL: '\uE028', - DIVIDE: '\uE029', - - F1: '\uE031', // function keys - F2: '\uE032', - F3: '\uE033', - F4: '\uE034', - F5: '\uE035', - F6: '\uE036', - F7: '\uE037', - F8: '\uE038', - F9: '\uE039', - F10: '\uE03A', - F11: '\uE03B', - F12: '\uE03C', - - COMMAND: '\uE03D', // Apple command key - META: '\uE03D' // alias for Windows key -}; -// Copyright 2010 WebDriver committers -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -/** - * @fileoverview Atoms-based implementation of the webelement interface. - */ - -goog.provide('webdriver.atoms.element'); - -goog.require('bot.Keyboard.Keys'); -goog.require('bot.action'); -goog.require('bot.dom'); -goog.require('goog.dom'); -goog.require('goog.dom.TagName'); -goog.require('goog.math'); -goog.require('goog.string'); -goog.require('goog.style'); -goog.require('webdriver.Key'); - - -/** - * @param {!Element} element The element to use. - * @return {boolean} Whether the element is checked or selected. - */ -webdriver.atoms.element.isSelected = function(element) { - // Although this method looks unloved, its compiled form is used by - // the Chrome and OperaDrivers. - if (!bot.dom.isSelectable(element)) { - return false; - } - - return bot.dom.isSelected(element); -}; - - -/** - * Common aliases for properties. This maps names that users use to the correct - * property name. - * - * @const - * @private {!Object.<string, string>} - */ -webdriver.atoms.element.PROPERTY_ALIASES_ = { - 'class': 'className', - 'readonly': 'readOnly' -}; - - -/** - * Used to determine whether we should return a boolean value from getAttribute. - * These are all extracted from the WHATWG spec: - * - * http://www.whatwg.org/specs/web-apps/current-work/ - * - * These must all be lower-case. - * - * @const - * @private {!Array.<string>} - */ -webdriver.atoms.element.BOOLEAN_PROPERTIES_ = [ - 'async', - 'autofocus', - 'autoplay', - 'checked', - 'compact', - 'complete', - 'controls', - 'declare', - 'defaultchecked', - 'defaultselected', - 'defer', - 'disabled', - 'draggable', - 'ended', - 'formnovalidate', - 'hidden', - 'indeterminate', - 'iscontenteditable', - 'ismap', - 'itemscope', - 'loop', - 'multiple', - 'muted', - 'nohref', - 'noresize', - 'noshade', - 'novalidate', - 'nowrap', - 'open', - 'paused', - 'pubdate', - 'readonly', - 'required', - 'reversed', - 'scoped', - 'seamless', - 'seeking', - 'selected', - 'spellcheck', - 'truespeed', - 'willvalidate' -]; - - -/** - * Get the value of the given property or attribute. If the "attribute" is for - * a boolean property, we return null in the case where the value is false. If - * the attribute name is "style" an attempt to convert that style into a string - * is done. - * - * @param {!Element} element The element to use. - * @param {string} attribute The name of the attribute to look up. - * @return {?string} The string value of the attribute or property, or null. - */ -webdriver.atoms.element.getAttribute = function(element, attribute) { - var value = null; - var name = attribute.toLowerCase(); - - if ('style' == name) { - value = element.style; - - if (value && !goog.isString(value)) { - value = value.cssText; - } - - return (/** @type {?string} */value); - } - - if (('selected' == name || 'checked' == name) && - bot.dom.isSelectable(element)) { - return bot.dom.isSelected(element) ? 'true' : null; - } - - // Our tests suggest that returning the attribute is desirable for - // the href attribute of <a> tags and the src attribute of <img> tags, - // but we normally attempt to get the property value before the attribute. - var isLink = bot.dom.isElement(element, goog.dom.TagName.A); - var isImg = bot.dom.isElement(element, goog.dom.TagName.IMG); - - // Although the attribute matters, the property is consistent. Return that in - // preference to the attribute for links and images. - if ((isImg && name == 'src') || (isLink && name == 'href')) { - value = bot.dom.getAttribute(element, name); - if (value) { - // We want the full URL if present - value = bot.dom.getProperty(element, name); - } - return (/** @type {?string} */value); - } - - var propName = webdriver.atoms.element.PROPERTY_ALIASES_[attribute] || - attribute; - if (goog.array.contains(webdriver.atoms.element.BOOLEAN_PROPERTIES_, name)) { - value = !goog.isNull(bot.dom.getAttribute(element, attribute)) || - bot.dom.getProperty(element, propName); - return value ? 'true' : null; - } - - var property; - try { - property = bot.dom.getProperty(element, propName); - } catch (e) { - // Leaves property undefined or null - } - - // 1- Call getAttribute if getProperty fails, - // i.e. property is null or undefined. - // This happens for event handlers in Firefox. - // For example, calling getProperty for 'onclick' would - // fail while getAttribute for 'onclick' will succeed and - // return the JS code of the handler. - // - // 2- When property is an object we fall back to the - // actual attribute instead. - // See issue http://code.google.com/p/selenium/issues/detail?id=966 - if (!goog.isDefAndNotNull(property) || goog.isObject(property)) { - value = bot.dom.getAttribute(element, attribute); - } else { - value = property; - } - - // The empty string is a valid return value. - return goog.isDefAndNotNull(value) ? value.toString() : null; -}; - - -/** - * Get the location of the element in page space, if it's displayed. - * - * @param {!Element} element The element to get the location for. - * @return {goog.math.Rect} The bounding rectangle of the element. - */ -webdriver.atoms.element.getLocation = function(element) { - if (!bot.dom.isShown(element)) { - return null; - } - return goog.style.getBounds(element); -}; - - -/** - * @param {Node} element The element to use. - * @return {boolean} Whether the element is in the HEAD tag. - * @private - */ -webdriver.atoms.element.isInHead_ = function(element) { - while (element) { - if (element.tagName && element.tagName.toLowerCase() == 'head') { - return true; - } - try { - element = element.parentNode; - } catch (e) { - // Fine. the DOM has dispeared from underneath us - return false; - } - } - - return false; -}; - - -/** - * @param {!Element} element The element to get the text from. - * @return {string} The visible text or an empty string. - */ -webdriver.atoms.element.getText = function(element) { - return bot.dom.getVisibleText(element); -}; - - -/** - * Types keys on the given {@code element} with a virtual keyboard. Converts - * special characters from the WebDriver JSON wire protocol to the appropriate - * {@link bot.Keyboard.Key} value. - * - * @param {!Element} element The element to type upon. - * @param {!Array.<string>} keys The keys to type on the element. - * @param {bot.Keyboard=} opt_keyboard Keyboard to use; if not provided, - * constructs one. - * @param {boolean=} opt_persistModifiers Whether modifier keys should remain - * pressed when this function ends. - * @see bot.action.type - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ -webdriver.atoms.element.type = function( - element, keys, opt_keyboard, opt_persistModifiers) { - var persistModifierKeys = !!opt_persistModifiers; - function createSequenceRecord() { - return {persist: persistModifierKeys, keys: []}; - } - - /** - * @type {!Array.<{persist: boolean, - * keys: !Array.<(string|!bot.Keyboard.Key)>}>} - */ - var convertedSequences = []; - - /** - * @type {{persist: boolean, - * keys: !Array.<(string|!bot.Keyboard.Key)>}} - */ - var current = createSequenceRecord(); - convertedSequences.push(current); - - goog.array.forEach(keys, function(sequence) { - goog.array.forEach(sequence.split(''), function(key) { - if (isWebDriverKey(key)) { - var webdriverKey = webdriver.atoms.element.type.JSON_TO_KEY_MAP_[key]; - // goog.isNull uses ==, which accepts undefined. - if (webdriverKey === null) { - // bot.action.type does not support a "null" key, so we have to - // terminate the entire sequence to release modifier keys. If - // we currently allow modifier key state to persist across key - // sequences, we need to inject a dummy sequence that does not - // persist state so every modifier key gets released. - convertedSequences.push(current = createSequenceRecord()); - if (persistModifierKeys) { - current.persist = false; - convertedSequences.push(current = createSequenceRecord()); - } - } else if (goog.isDef(webdriverKey)) { - current.keys.push(webdriverKey); - } else { - throw Error('Unsupported WebDriver key: \\u' + - key.charCodeAt(0).toString(16)); - } - } else { - // Handle common aliases. - switch (key) { - case '\n': - current.keys.push(bot.Keyboard.Keys.ENTER); - break; - case '\t': - current.keys.push(bot.Keyboard.Keys.TAB); - break; - case '\b': - current.keys.push(bot.Keyboard.Keys.BACKSPACE); - break; - default: - current.keys.push(key); - break; - } - } - }); - }); - - goog.array.forEach(convertedSequences, function(sequence) { - bot.action.type(element, sequence.keys, opt_keyboard, - sequence.persist); - }); - - function isWebDriverKey(c) { - return '\uE000' <= c && c <= '\uE03D'; - } -}; - - -/** - * Maps JSON wire protocol values to their {@link bot.Keyboard.Key} counterpart. - * @private {!Object.<bot.Keyboard.Key>} - * @const - */ -webdriver.atoms.element.type.JSON_TO_KEY_MAP_ = {}; -goog.scope(function() { -var map = webdriver.atoms.element.type.JSON_TO_KEY_MAP_; -var key = webdriver.Key; -var botKey = bot.Keyboard.Keys; - -map[key.NULL] = null; -map[key.BACK_SPACE] = botKey.BACKSPACE; -map[key.TAB] = botKey.TAB; -map[key.RETURN] = botKey.ENTER; -// This not correct, but most browsers will do the right thing. -map[key.ENTER] = botKey.ENTER; -map[key.SHIFT] = botKey.SHIFT; -map[key.CONTROL] = botKey.CONTROL; -map[key.ALT] = botKey.ALT; -map[key.PAUSE] = botKey.PAUSE; -map[key.ESCAPE] = botKey.ESC; -map[key.SPACE] = botKey.SPACE; -map[key.PAGE_UP] = botKey.PAGE_UP; -map[key.PAGE_DOWN] = botKey.PAGE_DOWN; -map[key.END] = botKey.END; -map[key.HOME] = botKey.HOME; -map[key.LEFT] = botKey.LEFT; -map[key.UP] = botKey.UP; -map[key.RIGHT] = botKey.RIGHT; -map[key.DOWN] = botKey.DOWN; -map[key.INSERT] = botKey.INSERT; -map[key.DELETE] = botKey.DELETE; -map[key.SEMICOLON] = botKey.SEMICOLON; -map[key.EQUALS] = botKey.EQUALS; -map[key.NUMPAD0] = botKey.NUM_ZERO; -map[key.NUMPAD1] = botKey.NUM_ONE; -map[key.NUMPAD2] = botKey.NUM_TWO; -map[key.NUMPAD3] = botKey.NUM_THREE; -map[key.NUMPAD4] = botKey.NUM_FOUR; -map[key.NUMPAD5] = botKey.NUM_FIVE; -map[key.NUMPAD6] = botKey.NUM_SIX; -map[key.NUMPAD7] = botKey.NUM_SEVEN; -map[key.NUMPAD8] = botKey.NUM_EIGHT; -map[key.NUMPAD9] = botKey.NUM_NINE; -map[key.MULTIPLY] = botKey.NUM_MULTIPLY; -map[key.ADD] = botKey.NUM_PLUS; -map[key.SUBTRACT] = botKey.NUM_MINUS; -map[key.DECIMAL] = botKey.NUM_PERIOD; -map[key.DIVIDE] = botKey.NUM_DIVISION; -map[key.SEPARATOR] = botKey.SEPARATOR; -map[key.F1] = botKey.F1; -map[key.F2] = botKey.F2; -map[key.F3] = botKey.F3; -map[key.F4] = botKey.F4; -map[key.F5] = botKey.F5; -map[key.F6] = botKey.F6; -map[key.F7] = botKey.F7; -map[key.F8] = botKey.F8; -map[key.F9] = botKey.F9; -map[key.F10] = botKey.F10; -map[key.F11] = botKey.F11; -map[key.F12] = botKey.F12; -map[key.META] = botKey.META; -}); // goog.scope -// Copyright 2012 WebDriver committers -// Copyright 2012 Software Freedom Conservancy -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Synthetic events for fun and profit. - */ - -goog.provide('webdriver.atoms.inputs'); - -goog.require('bot.Keyboard'); -goog.require('bot.Mouse'); -goog.require('bot.action'); -goog.require('goog.array'); -goog.require('goog.dom'); -goog.require('goog.math.Coordinate'); -goog.require('goog.style'); -goog.require('webdriver.atoms.element'); - - -/** - * Send keyboard input to a particular element. - * - * @param {Element} element The element to send the keyboard input to, or - * {@code null} to use the document's active element. - * @param {!Array.<string>} keys The keys to type on the element. - * @param {Array.<!bot.Keyboard.Key>=} opt_state The keyboard to use, or - * construct one. - * @param {boolean=} opt_persistModifiers Whether modifier keys should remain - * pressed when this function ends. - * @return {Array.<!bot.Keyboard.Key>} The keyboard state. - */ -webdriver.atoms.inputs.sendKeys = function( - element, keys, opt_state, opt_persistModifiers) { - var keyboard = new bot.Keyboard(opt_state); - if (!element) { - element = bot.dom.getActiveElement(document); - } - if (!element) { - throw Error('No element to send keys to'); - } - webdriver.atoms.element.type(element, keys, keyboard, opt_persistModifiers); - - return keyboard.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.sendKeys', - webdriver.atoms.inputs.sendKeys); - - -/** - * Click on an element. - * - * @param {Element} element The element to click. - * @param {bot.Mouse.State=} opt_state The serialized state of the mouse. - * @return {!bot.Mouse.State} The mouse state. - */ -webdriver.atoms.inputs.click = function(element, opt_state) { - var mouse = new bot.Mouse(opt_state); - if (!element) { - element = mouse.getState().element; - } - if (!element) { - throw Error('No element to send keys to'); - } - bot.action.click(element, null, mouse); - return mouse.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.click', - webdriver.atoms.inputs.click); - - -/** - * Move the mouse to a specific element and/or coordinate location. - * - * @param {!Element} element The element to move the mouse to. - * @param {number} x_offset The x coordinate to use as an offset. - * @param {number} y_offset The y coordinate to use as an offset. - * @param {bot.Mouse.State=} opt_state The serialized state of the mouse. - * @return {!bot.Mouse.State} The mouse state. - */ -webdriver.atoms.inputs.mouseMove = function(element, x_offset, y_offset, - opt_state) { - var mouse = new bot.Mouse(opt_state); - var target = element || mouse.getState().element; - - var offset_specified = (x_offset != null) && (y_offset != null); - x_offset = x_offset || 0; - y_offset = y_offset || 0; - - // If we have specified an element and no offset, we should - // move the mouse to the center of the specified element. - if (element) { - if (!offset_specified) { - var source_element_size = bot.action.getInteractableSize(element); - x_offset = Math.floor(source_element_size.width / 2); - y_offset = Math.floor(source_element_size.height / 2); - } - } else { - // Moving to an absolute offset from the current target element, - // so we have to account for the existing offset of the current - // mouse position to the element origin (upper-left corner). - var pos = goog.style.getClientPosition(target); - x_offset += (mouse.getState().clientXY.x - pos.x); - y_offset += (mouse.getState().clientXY.y - pos.y); - } - - var doc = goog.dom.getOwnerDocument(target); - var win = goog.dom.getWindow(doc); - var inViewAfterScroll = bot.action.scrollIntoView( - target, - new goog.math.Coordinate(x_offset, y_offset)); - - var coords = new goog.math.Coordinate(x_offset, y_offset); - mouse.move(target, coords); - return mouse.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.mouseMove', - webdriver.atoms.inputs.mouseMove); - - -/** - * Presses the primary mouse button at the current location. - * - * @param {bot.Mouse.State=} opt_state The serialized state of the mouse. - * @return {!bot.Mouse.State} The mouse state. - */ -webdriver.atoms.inputs.mouseButtonDown = function(opt_state) { - var mouse = new bot.Mouse(opt_state); - mouse.pressButton(bot.Mouse.Button.LEFT); - return mouse.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.mouseButtonDown', - webdriver.atoms.inputs.mouseButtonDown); - - -/** - * Releases the primary mouse button at the current location. - * - * @param {bot.Mouse.State=} opt_state The serialized state of the mouse. - * @return {!bot.Mouse.State} The mouse state. - */ -webdriver.atoms.inputs.mouseButtonUp = function(opt_state) { - var mouse = new bot.Mouse(opt_state); - mouse.releaseButton(); - return mouse.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.mouseButtonUp', - webdriver.atoms.inputs.mouseButtonUp); - - -/** - * Double-clicks primary mouse button at the current location. - * - * @param {bot.Mouse.State=} opt_state The serialized state of the mouse. - * @return {!bot.Mouse.State} The mouse state. - */ -webdriver.atoms.inputs.doubleClick = function(opt_state) { - var mouse = new bot.Mouse(opt_state); - mouse.pressButton(bot.Mouse.Button.LEFT); - mouse.releaseButton(); - mouse.pressButton(bot.Mouse.Button.LEFT); - mouse.releaseButton(); - return mouse.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.doubleClick', - webdriver.atoms.inputs.doubleClick); - - -/** - * Right-clicks mouse button at the current location. - * - * @param {bot.Mouse.State=} opt_state The serialized state of the mouse. - * @return {!bot.Mouse.State} The mouse state. - */ -webdriver.atoms.inputs.rightClick = function(opt_state) { - var mouse = new bot.Mouse(opt_state); - mouse.pressButton(bot.Mouse.Button.RIGHT); - mouse.releaseButton(); - return mouse.getState(); -}; -goog.exportSymbol('webdriver.atoms.inputs.rightClick', - webdriver.atoms.inputs.rightClick); -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for manipulating the DOM. - */ - -goog.provide('webdriver.atoms.inject.action'); - -goog.require('bot.action'); -goog.require('goog.dom.selection'); -goog.require('webdriver.atoms.element'); -goog.require('webdriver.atoms.inject'); - - -/** - * Sends key events to simulating typing on an element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to submit. - * @param {!Array.<string>} keys The keys to type. - * @return {string} A stringified {@link bot.response.ResponseObject}. - */ -webdriver.atoms.inject.action.type = function(element, keys) { - return webdriver.atoms.inject.executeScript(webdriver.atoms.element.type, - [element, keys]); -}; - - -/** - * Submits the form containing the given element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to submit. - * @return {string} A stringified {@link bot.response.ResponseObject}. - * @deprecated Click on a submit button or type ENTER in a text box instead. - */ -webdriver.atoms.inject.action.submit = function(element) { - return webdriver.atoms.inject.executeScript(bot.action.submit, [element]); -}; - - -/** - * Clear an element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to clear. - * @return {string} A stringified {@link bot.response.ResponseObject}. - * @see bot.action.clear - */ -webdriver.atoms.inject.action.clear = function(element) { - return webdriver.atoms.inject.executeScript(bot.action.clear, [element]); -}; - - -/** - * Click an element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to click. - * @return {string} A stringified {@link bot.response.ResponseObject}. - * @see bot.action.click - */ -webdriver.atoms.inject.action.click = function(element) { - return webdriver.atoms.inject.executeScript(bot.action.click, [element]); -}; - -// Copyright 2012 WebDriver committers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for handling application cache. - */ - -goog.provide('webdriver.atoms.inject.storage.appcache'); - -goog.require('bot.inject'); -goog.require('webdriver.atoms.storage.appcache'); - - -/** - * Gets the status of the application cache. - * - * @return {string} The status of the application cache. - */ -webdriver.atoms.inject.storage.appcache.getStatus = function() { - return /**@type {string}*/(bot.inject.executeScript( - webdriver.atoms.storage.appcache.getStatus, [], true)); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for querying the DOM. - */ - -goog.provide('webdriver.atoms.inject.dom'); - -goog.require('bot.action'); -goog.require('bot.dom'); -goog.require('webdriver.atoms.element'); -goog.require('webdriver.atoms.inject'); - - -/** - * Gets the visisble text for the given element. - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @return {string} The visible text wrapped in a JSON string as defined by the - * WebDriver wire protocol. - */ -webdriver.atoms.inject.dom.getText = function(element) { - return webdriver.atoms.inject.executeScript(bot.dom.getVisibleText, - [element]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @return {string} A boolean describing whether the element is - * checked or selected wrapped in a JSON string as defined by - * the wire protocol. - */ -webdriver.atoms.inject.dom.isSelected = function(element) { - return webdriver.atoms.inject.executeScript(bot.dom.isSelected, [element]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @return {string} The coordinates of the top left corner in a JSON - * string as defined by the wire protocol. - */ -webdriver.atoms.inject.dom.getTopLeftCoordinates = function(element) { - return webdriver.atoms.inject.executeScript(bot.dom.getLocationInView, - [element]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @param {string} attribute The attribute to look up. - * @return {string} The requested attribute value in a JSON string - * as defined by the wire protocol. - */ -webdriver.atoms.inject.dom.getAttributeValue = function(element, attribute) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.element.getAttribute, [element, attribute]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @return {string} The element size in a JSON string as - * defined by the wire protocol. - */ -webdriver.atoms.inject.dom.getSize = function(element) { - return webdriver.atoms.inject.executeScript(bot.dom.getElementSize, - [element]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @param {string} property The property to look up. - * @return {string} The value of the requested CSS property in a JSON - * string as defined by the wire protocol. - */ -webdriver.atoms.inject.dom.getValueOfCssProperty = - function(element, property) { - return webdriver.atoms.inject.executeScript(bot.dom.getEffectiveStyle, - [element, property]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to query. - * @return {string} A boolean describing whether the element is enabled - * in a JSON string as defined by the wire protocol. - */ -webdriver.atoms.inject.dom.isEnabled = function(element) { - return webdriver.atoms.inject.executeScript(bot.dom.isEnabled, [element]); -}; - - -/** - * @param {{bot.inject.ELEMENT_KEY: string}} element The element to check. - * @return {string} true if the element is visisble, false otherwise. - * The result is wrapped in a JSON string as defined by the wire - * protocol. - */ -webdriver.atoms.inject.dom.isDisplayed = function(element) { - return webdriver.atoms.inject.executeScript(bot.dom.isShown, - [element, /*ignoreOpacity=*/true]); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Wrapping execute script to use a serialized window object. - * - */ - -goog.provide('webdriver.atoms.inject'); - -goog.require('bot.inject'); -goog.require('bot.inject.cache'); - - -/** - * Wrapper to allow passing a seliazed window object to executeScript. - * - * @param {!(string|Function)} fn The function to execute. - * @param {Array.<*>} args Array of arguments to pass to fn. - * @param {{bot.inject.WINDOW_KEY:string}=} opt_window The serialized window - * object to be read from the cache. - * @return {string} The response object, serialized and returned in string - * format. - */ -webdriver.atoms.inject.executeScript = function(fn, args, opt_window) { - return /**@type {string}*/(bot.inject.executeScript(fn, args, true, - webdriver.atoms.inject.getWindow_(opt_window))); -}; - - -/** - * - * @param {!(string|Function)} fn The function to execute. - * @param {Array.<*>} args Array of arguments to pass to fn. - * @param {number} timeout The timeout to wait up to in millis. - * @param {function(string)|function(!bot.response.ResponseObject)} onDone - * The function to call when the given {@code fn} invokes its callback, - * or when an exception or timeout occurs. This will always be called. - * @param {{bot.inject.WINDOW_KEY:string}=} opt_window The serialized window - * object to be read from the cache. - */ -webdriver.atoms.inject.executeAsyncScript = - function(fn, args, timeout, onDone, opt_window) { - bot.inject.executeAsyncScript( - fn, args, timeout, onDone, true, - webdriver.atoms.inject.getWindow_(opt_window)); -}; - - -/** - * Get the window to use. - * - * @param {{bot.inject.WINDOW_KEY:string}=} opt_window The serialized window - * object to be read from the cache. - * @return {!Window} A reference to a window. - * @private - */ -webdriver.atoms.inject.getWindow_ = function(opt_window) { - var win; - if (opt_window) { - win = bot.inject.cache.getElement(opt_window[bot.inject.WINDOW_KEY]); - } else { - win = window; - } - return /**@type {!Window}*/(win); -};// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms to find elements in the page. - */ - -goog.provide('webdriver.atoms.inject.locators'); - -goog.require('bot.locators'); -goog.require('webdriver.atoms.inject'); - -/** - * Finds an element by using the given lookup strategy. - * @param {string} strategy The strategy to use to locate the element. - * @param {string} using The locator to use. - * @param {(Document|Element)=} opt_root The document or element to perform - * the search under. If not specified, will use {@code document} - * as the root. - * @return {string} The result wrapped - * in a JSON string as defined by the WebDriver wire protocol. - */ -webdriver.atoms.inject.locators.findElement = - function(strategy, using, opt_root) { - var locator = {}; - locator[strategy] = using; - return webdriver.atoms.inject.executeScript(bot.locators.findElement, - [locator, opt_root]); -}; - - -/** - * Finds all elements by using the given lookup strategy. - * @param {string} strategy The strategy to use to locate the element. - * @param {string} using The locator to use. - * @param {(Document|Element)=} opt_root The document or element to perform - * the search under. If not specified, will use {@code document} - * as the root. - * @return {string} The result wrapped - * in a JSON string as defined by the WebDriver wire protocol. - */ -webdriver.atoms.inject.locators.findElements = - function(strategy, using, opt_root) { - var locator = {}; - locator[strategy] = using; - return webdriver.atoms.inject.executeScript(bot.locators.findElements, - [locator, opt_root]); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for handling frames. - */ - -goog.provide('webdriver.atoms.inject.frame'); - -goog.require('bot.frame'); -goog.require('bot.inject.cache'); -goog.require('webdriver.atoms.inject'); - - -/** - * Finds a frame by id or name. - * - * @param {string} idOrName The frame id or name. - * @param {{bot.inject.WINDOW_KEY: string}=} opt_root The wrapped window to - * perform the search under. Defaults to window. - * @return {string} A frame element wrapped in a JSON string as defined by - * the wire protocol. - */ -webdriver.atoms.inject.frame.findFrameByIdOrName = - function(idOrName, opt_root) { - return webdriver.atoms.inject.executeScript(bot.frame.findFrameByNameOrId, - [idOrName, opt_root]); -}; - - -/** - * @return {string} A string representing the currently active element. - */ -webdriver.atoms.inject.frame.activeElement = function() { - return webdriver.atoms.inject.executeScript(bot.frame.activeElement, []); -}; - - -/** - * Finds a frame by index. - * - * @param {number} index The index of the frame to search for. - * @param {!Window=} opt_root The window to perform the search under. - * If not specified window is used as the default. - * @return {string} A frame element wrapped in a JSON string as defined by - * the wire protocol. - */ -webdriver.atoms.inject.frame.findFrameByIndex = function(index, opt_root) { - return webdriver.atoms.inject.executeScript(bot.frame.findFrameByIndex, - [index, opt_root]); -}; - - -/** - * @return {string} The default content of the current page, - * which is the top window. - */ -webdriver.atoms.inject.frame.defaultContent = function() { - return webdriver.atoms.inject.executeScript(bot.frame.defaultContent, []); -}; - - -/** - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to query. - * @return {string} The window corresponding to the frame element - * wrapped in a JSON string as defined by the wire protocol. - */ -webdriver.atoms.inject.frame.getFrameWindow = function(element) { - return webdriver.atoms.inject.executeScript(bot.frame.getFrameWindow, - [element]); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for handling local storage. - */ - -goog.provide('webdriver.atoms.inject.storage.local'); - -goog.require('webdriver.atoms.inject'); -goog.require('webdriver.atoms.storage.local'); - - -/** - * Sets an item in the local storage. - * - * @param {string} key The key of the item. - * @param {*} value The value of the item. - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.local.setItem = function(key, value) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.local.setItem, [key, value]); -}; - - -/** - * Gets an item from the local storage. - * - * @param {string} key The key of the item. - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.local.getItem = function(key) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.local.getItem, [key]); -}; - - -/** - * Gets the key set of the entries. - * - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.local.keySet = function() { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.local.keySet, []); -}; - - -/** - * Removes an item in the local storage. - * - * @param {string} key The key of the item. - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.local.removeItem = function(key) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.local.removeItem, [key]); -}; - - -/** - * Clears the local storage. - * - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.local.clear = function() { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.local.clear, []); -}; - - -/** - * Gets the size of the local storage. - * - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.local.size = function() { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.local.size, []); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for handling session storage. - */ - -goog.provide('webdriver.atoms.inject.storage.session'); - -goog.require('webdriver.atoms.inject'); -goog.require('webdriver.atoms.storage.session'); - - -/** - * Sets an item in the session storage. - * - * @param {string} key The key of the item. - * @param {*} value The value of the item. - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.session.setItem = function(key, value) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.session.setItem, [key, value]); -}; - - -/** - * Gets an item from the session storage. - * - * @param {string} key The key of the item. - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.session.getItem = function(key) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.session.getItem, [key]); -}; - - -/** - * Gets the key set of the entries. - * - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.session.keySet = function() { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.session.keySet, []); -}; - - -/** - * Removes an item in the session storage. - * - * @param {string} key The key of the item. - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.session.removeItem = function(key) { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.session.removeItem, [key]); -}; - - -/** - * Clears the session storage. - * - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.session.clear = function() { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.session.clear, []); -}; - - -/** - * Gets the size of the session storage. - * - * @return {string} The stringified result wrapped according to the wire - * protocol. - */ -webdriver.atoms.inject.storage.session.size = function() { - return webdriver.atoms.inject.executeScript( - webdriver.atoms.storage.session.size, []); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Ready to inject atoms for handling web SQL database. - */ - -goog.provide('webdriver.atoms.inject.storage.database'); - -goog.require('bot.Error'); -goog.require('bot.ErrorCode'); -goog.require('bot.storage.database'); -goog.require('webdriver.atoms.inject'); - - -/** - * Executes the given query in the Web SQL database specified. - * - * @param {string} databaseName The name of the database. - * @param {string} query The SQL statement. - * @param {Array.<*>} args Arguments to pass to the query. - * @param {function(string)} onDone The callback to invoke when done. The - * result, according to the wire protocol, will be passed to this callback. - */ -webdriver.atoms.inject.storage.database.executeSql = - function(databaseName, query, args, onDone) { - var onSuccessCallback = function(tx, result) { - onDone(webdriver.atoms.inject.executeScript(function(res) { - return result; - }, [result])); - }; - - var onErrorCallback = function(error) { - onDone(webdriver.atoms.inject.executeScript(function() { - throw new bot.Error(bot.ErrorCode.SQL_DATABASE_ERROR, - 'SQL Error Code: ' + error.code + '. SQL Error Message: ' + - error.message); - }, [])); - }; - - bot.storage.database.executeSql( - databaseName, query, args, onSuccessCallback, onErrorCallback); -}; -// Copyright 2012 WebDriver committers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Utility functions for accessing HTML5 appcache object. - * These functions are wrapper of the functions of individual method of - * bot.storage.Storage class. An extra redirection is used to define - * individual functional unit (atom) for injecting in Webdriver. - */ - -goog.provide('webdriver.atoms.storage.appcache'); - -goog.require('bot.appcache'); - - -/** - * Returns the status of the appcache. - * @return {number} status of the appcache. - */ -webdriver.atoms.storage.appcache.getStatus = function() { - return bot.appcache.getStatus(); -}; -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Utility functions for accessing HTML5 localStorage object. - * These functions are wrapper of the functions of individual method of - * bot.storage.Storage class. An extra redirection is used to define - * individual functional unit (atom) for injecting in Webdriver. - */ - -goog.provide('webdriver.atoms.storage.local'); - -goog.require('bot.storage'); - - -/** - * Utility function to set the value of a key/value pair in localStorage. - * @param {string} key The key of the item. - * @param {*} value The value of the item. - */ -webdriver.atoms.storage.local.setItem = function(key, value) { - bot.storage.getLocalStorage().setItem(key, value); -}; - - -/** - * Returns the value item of a key in the localStorage object. - * @param {string} key The key of the returned value. - * @return {?string} The mapped value if present in the localStorage object, - * otherwise null. - */ -webdriver.atoms.storage.local.getItem = function(key) { - return bot.storage.getLocalStorage().getItem(key); -}; - - -/** - * Returns an array of keys of all keys of the localStorage object. - * @return {Array.<string>} The array of stored keys. - */ -webdriver.atoms.storage.local.keySet = function() { - return bot.storage.getLocalStorage().keySet(); -}; - - -/** - * Removes an item with a given key. - * @param {string} key The key of the key/value pair. - * @return {?string} The removed value if present, otherwise null. - */ -webdriver.atoms.storage.local.removeItem = function(key) { - return bot.storage.getLocalStorage().removeItem(key); -}; - - -/** - * Removes all items from the localStorage object. - */ -webdriver.atoms.storage.local.clear = function() { - bot.storage.getLocalStorage().clear(); -}; - - -/** - * Returns the number of items in the localStorage object. - * @return {number} The number of the key/value pairs. - */ -webdriver.atoms.storage.local.size = function() { - return bot.storage.getLocalStorage().size(); -}; - - -/** - * Returns the key item of the key/value pairs in the localStorage object - * of a given index. - * @param {number} index The index of the key/value pair list. - * @return {?string} The key item of a given index. - */ -webdriver.atoms.storage.local.key = function(index) { - return bot.storage.getLocalStorage().key(index); -}; - -// Copyright 2011 WebDriver committers -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Utility functions for accessing HTML5 sessionStorage object. - * These functions are wrapper of the functions of individual method of - * bot.storage.Storage class. An extra redirection is used to define - * individual functional unit (atom) for injecting in Webdriver. - */ - -goog.provide('webdriver.atoms.storage.session'); - -goog.require('bot.storage'); - - -/** - * Utility function to set the value of a key/value pair in sessionStorage. - * @param {string} key The key of the item. - * @param {*} value The value of the item. - */ -webdriver.atoms.storage.session.setItem = function(key, value) { - bot.storage.getSessionStorage().setItem(key, value); -}; - - -/** - * Returns the value item of a key in the sessionStorage object. - * @param {string} key The key of the returned value. - * @return {?string} The mapped value if present in the sessionStorage object, - * otherwise null. - */ -webdriver.atoms.storage.session.getItem = function(key) { - return bot.storage.getSessionStorage().getItem(key); -}; - - -/** - * Returns an array of keys of all keys of the sessionStorage object. - * @return {Array.<string>} The array of stored keys.. - */ -webdriver.atoms.storage.session.keySet = function() { - return bot.storage.getSessionStorage().keySet(); -}; - - -/** - * Removes an item with a given key. - * @param {string} key The key of the key/value pair. - * @return {?string} The removed value if present, otherwise null. - */ -webdriver.atoms.storage.session.removeItem = function(key) { - return bot.storage.getSessionStorage().removeItem(key); -}; - - -/** - * Removes all items from the sessionStorage object. - */ -webdriver.atoms.storage.session.clear = function() { - bot.storage.getSessionStorage().clear(); -}; - - -/** - * Returns the number of items in the sessionStorage object. - * @return {number} The number of the key/value pairs. - */ -webdriver.atoms.storage.session.size = function() { - return bot.storage.getSessionStorage().size(); -}; - - -/** - * Returns the key item of the key/value pairs in the sessionStorage object - * of a given index. - * @param {number} index The index of the key/value pair list. - * @return {?string} The key item of a given index. - */ -webdriver.atoms.storage.session.key = function(index) { - return bot.storage.getSessionStorage().key(index); -}; - -/* -This file is part of the GhostDriver by Ivan De Marino <http://ivandemarino.me>. - -Copyright (c) 2012, Ivan De Marino <http://ivandemarino.me> -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** - * @fileoverview Ready to inject atoms for manipulating the DOM. - */ - -goog.provide('phantomjs.atoms.inject.action'); - -goog.require('bot.action'); -goog.require('bot.inject'); -goog.require('goog.dom.selection'); -goog.require('webdriver.atoms.element'); - -/** - * Focuses on the given element if it is not already the active element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to focus on. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - * @see bot.action.focusOnElement - */ -phantomjs.atoms.inject.action.focusOnElement = function(element) { - return bot.inject.executeScript(bot.action.focusOnElement, [element], true); -}; - -/** - * Moves the mouse over the given {@code element} with a virtual mouse. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to move to. - * @param {!{x:number,y:number}} opt_coords Mouse position relative to the element (optional). - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.moveMouse = function(element, opt_coords) { - return bot.inject.executeScript(bot.action.moveMouse, [element, opt_coords], true); -}; - -/** - * Right-clicks on the given {@code element} with a virtual mouse. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to right-click. - * @param {!{x:number,y:number}} opt_coords Mouse position relative to the element (optional). - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.rightClick = function(element, opt_coords) { - return bot.inject.executeScript(bot.action.rightClick, [element, opt_coords], true); -}; - -/** - * Double-clicks on the given {@code element} with a virtual mouse. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to double-click. - * @param {!{x:number,y:number}} opt_coords Mouse position relative to the element (optional). - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.doubleClick = function(element, opt_coords) { - return bot.inject.executeScript(bot.action.doubleClick, [element, opt_coords], true); -}; - -/** - * Scrolls the mouse wheel on the given {@code element} with a virtual mouse. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to scroll the mouse wheel on. - * @param {number} ticks Number of ticks to scroll the mouse wheel; - * a positive number scrolls down and a negative scrolls up. - * @param {!{x:number,y:number}} opt_coords Mouse position relative to the element (optional). - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.scrollMouse = function(element, ticks, opt_coords) { - return bot.inject.executeScript(bot.action.scrollMouse, [element, ticks, opt_coords], true); -}; - -/** - * Drags the given {@code element} by (dx, dy) with a virtual mouse. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to drag. - * @param {number} dx Increment in x coordinate. - * @param {number} dy Increment in y coordinate. - * @param {!{x:number,y:number}} opt_coords Drag start position relative to the element. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.drag = function(element, dx, dy, opt_coords) { - return bot.inject.executeScript(bot.action.drag, [element, dx, dy, opt_coords], true); -}; - -/** - * Scrolls the given {@code element} in to the current viewport. Aims to do the - * minimum scrolling necessary, but prefers too much scrolling to too little. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to scroll into view. - * @param {!{x:number,y:number}} opt_coords Offset relative to the top-left - * corner of the element, to ensure is scrolled in to view. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}; - * whether the element is in view after scrolling. - */ -phantomjs.atoms.inject.action.scrollIntoView = function(element, opt_coords) { - return bot.inject.executeScript(bot.action.scrollIntoView, [element, opt_coords], true); -}; - -/** - * Taps on the given {@code element} with a virtual touch screen. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to tap. - * @param {!{x:number,y:number}} opt_coords Finger position relative to the target. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.tap = function(element, opt_coords) { - return bot.inject.executeScript(bot.action.tap, [element, opt_coords], true); -}; - -/** - * Swipes the given {@code element} by (dx, dy) with a virtual touch screen. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to swipe. - * @param {number} dx Increment in x coordinate. - * @param {number} dy Increment in y coordinate. - * @param {!{x:number,y:number}} opt_coords Swipe start position relative to the element. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.swipe = function(element, dx, dy, opt_coords) { - return bot.inject.executeScript(bot.action.swipe, [element, dx, dy, opt_coords], true); -}; - -/** - * Pinches the given {@code element} by the given distance with a virtual touch - * screen. A positive distance moves two fingers inward toward each and a - * negative distances spreds them outward. The optional coordinate is the point - * the fingers move towards (for positive distances) or away from (for negative - * distances); and if not provided, defaults to the center of the element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to pinch. - * @param {number} distance The distance by which to pinch the element. - * @param {!{x:number,y:number}} opt_coords Position relative to the element at the center of the pinch. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.pinch = function(element, distance, opt_coords) { - return bot.inject.executeScript(bot.action.pinch, [element, distance, opt_coords], true); -}; - -/** - * Rotates the given {@code element} by the given angle with a virtual touch - * screen. A positive angle moves two fingers clockwise and a negative angle - * moves them counter-clockwise. The optional coordinate is the point to - * rotate around; and if not provided, defaults to the center of the element. - * - * @param {!{bot.inject.ELEMENT_KEY:string}} element The element to rotate. - * @param {number} angle The angle by which to rotate the element. - * @param {!{x:number,y:number}} opt_coords Position relative to the element at the center of the rotation. - * @return {(string|{status: bot.ErrorCode.<number>, value: *})} A stringified {@link bot.response.ResponseObject}. - */ -phantomjs.atoms.inject.action.rotate = function(element, angle, opt_coords) { - return bot.inject.executeScript(bot.action.rotate, [element, angle, opt_coords], true); -}; diff --git a/src/ghostdriver/third_party/webdriver-atoms/double_click.js b/src/ghostdriver/third_party/webdriver-atoms/double_click.js index 13b6c970d..d55b2802b 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/double_click.js +++ b/src/ghostdriver/third_party/webdriver-atoms/double_click.js @@ -1,114 +1,122 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function ba(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var l=this; function ca(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function ea(a){return"function"==ca(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var v=window;function ha(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",x=e[g]||"",J=RegExp("(\\d*)(\\D*)","g"),Gb=RegExp("(\\d*)(\\D*)","g");do{var $=J.exec(p)||["","",""],aa=Gb.exec(x)||["","",""];if(0==$[0].length&&0==aa[0].length)break;c=((0==$[1].length?0:parseInt($[1],10))<(0==aa[1].length?0:parseInt(aa[1],10))?-1:(0==$[1].length?0:parseInt($[1],10))>(0== -aa[1].length?0:parseInt(aa[1],10))?1:0)||((0==$[2].length)<(0==aa[2].length)?-1:(0==$[2].length)>(0==aa[2].length)?1:0)||($[2]<aa[2]?-1:$[2]>aa[2]?1:0)}while(0==c)}return c}function ia(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ja=Array.prototype;function w(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ka(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function la(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function ma(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function na(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function oa(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function pa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function qa(a){return ja.concat.apply(ja,arguments)} -function ra(a,b,c){return 2>=arguments.length?ja.slice.call(a,b):ja.slice.call(a,b,c)};var sa={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return void 0!==a}function ea(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)} +function ia(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)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)} +function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.Ua=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",q=e[g]||"",x=RegExp("(\\d*)(\\D*)","g"),y=RegExp("(\\d*)(\\D*)","g");do{var s=x.exec(k)||["","",""],n=y.exec(q)||["","",""];if(0==s[0].length&&0==n[0].length)break;c=((0==s[1].length?0:parseInt(s[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==s[1].length?0:parseInt(s[1],10))>(0==n[1].length? +0:parseInt(n[1],10))?1:0)||((0==s[2].length)<(0==n[2].length)?-1:(0==s[2].length)>(0==n[2].length)?1:0)||(s[2]<n[2]?-1:s[2]>n[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function r(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 qa(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 k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;r(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(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 ua(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 va(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(m(a))c=m(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ta="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ua=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function va(a){wa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(ua,"#$1$1$2$2$3$3"));return a.toLowerCase()}var wa=/^#(?:[0-9a-f]{3}){1,2}$/i,xa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function ya(a){var b=a.match(xa);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var za=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Aa(a){var b=a.match(za);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Ba[a]||Ca;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(y,Error); -var Ca="unknown error",Ba={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ba[13]=Ca;Ba[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Da,Ea,Fa,Ga,Ha,Ia;function Ja(){return r.navigator?r.navigator.userAgent:m}Ga=Fa=Ea=Da=n;var Ka;if(Ka=Ja()){var La=r.navigator;Da=0==Ka.indexOf("Opera");Ea=!Da&&-1!=Ka.indexOf("MSIE");Fa=!Da&&-1!=Ka.indexOf("WebKit");Ga=!Da&&!Fa&&"Gecko"==La.product}var z=Da,A=Ea,B=Ga,C=Fa,Ma,Na=r.navigator;Ma=Na&&Na.platform||"";Ha=-1!=Ma.indexOf("Mac");Ia=-1!=Ma.indexOf("Win");var Oa=-1!=Ma.indexOf("Linux");function Pa(){var a=r.document;return a?a.documentMode:k}var Qa; -a:{var Ra="",Sa;if(z&&r.opera)var Ta=r.opera.version,Ra="function"==typeof Ta?Ta():Ta;else if(B?Sa=/rv\:([^\);]+)(\)|;)/:A?Sa=/MSIE\s+([^\);]+)(\)|;)/:C&&(Sa=/WebKit\/(\S+)/),Sa)var Ua=Sa.exec(Ja()),Ra=Ua?Ua[1]:"";if(A){var Va=Pa();if(Va>parseFloat(Ra)){Qa=String(Va);break a}}Qa=Ra}var Wa={};function Xa(a){return Wa[a]||(Wa[a]=0<=ha(Qa,a))}function D(a){return A&&Ya>=a}var Za=r.document,Ya=!Za||!A?k:Pa()||("CSS1Compat"==Za.compatMode?parseInt(Qa,10):5);var $a;!B&&!A||A&&D(9)||B&&Xa("1.9.1");A&&Xa("9");var ab=A||z||C;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function bb(a,b){this.width=a;this.height=b}bb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};bb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};bb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};bb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function cb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function db(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function eb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var fb=3;function gb(a){return a?new hb(F(a)):$a||($a=new hb)}function ib(a){var b=!C&&jb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function kb(a){return a?a.parentWindow||a.defaultView:window}function jb(a){return"CSS1Compat"==a.compatMode}function lb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function mb(a){if(ab)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} -function nb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function ob(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?pb(a,b):!c&&nb(e,b)?-1*qb(a,b):!d&&nb(f,a)?qb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function qb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return pb(d,a)}function pb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function rb(a,b){var c=[];return sb(a,b,c,l)?c[0]:k} -function sb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||sb(a,b,c,d))return l;a=a.nextSibling}return n}var tb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},ub={IMG:" ",BR:"\n"};function vb(a,b,c){if(!(a.nodeName in tb))if(a.nodeType==fb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in ub)b.push(ub[a.nodeName]);else for(a=a.firstChild;a;)vb(a,b,c),a=a.nextSibling} -function wb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function hb(a){this.A=a||r.document||document}hb.prototype.v=function(a){return t(a)?this.A.getElementById(a):a};function xb(a){return!C&&jb(a.A)?a.A.documentElement:a.A.body}hb.prototype.contains=nb;var yb,zb,Ab,Bb,Cb,Db,Eb;Eb=Db=Cb=Bb=Ab=zb=yb=n;var Fb=Ja();Fb&&(-1!=Fb.indexOf("Firefox")?yb=l:-1!=Fb.indexOf("Camino")?zb=l:-1!=Fb.indexOf("iPhone")||-1!=Fb.indexOf("iPod")?Ab=l:-1!=Fb.indexOf("iPad")?Bb=l:-1!=Fb.indexOf("Android")?Cb=l:-1!=Fb.indexOf("Chrome")?Db=l:-1!=Fb.indexOf("Safari")&&(Eb=l));var Hb=yb,Ib=zb,Jb=Ab,Kb=Bb,Lb=Cb,Mb=Db,Nb=Eb;function Ob(a,b,c){this.g=a;this.Ba=b||1;this.p=c||1};var Pb=A&&!D(9),Qb=A&&!D(8);function Rb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Sb(a,b,c){var d=Qb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Rb(b,a,b.nodeName,d,c)};function Tb(a){this.ca=a;this.N=0}function Ub(a){a=a.match(Vb);for(var b=0;b<a.length;b++)Wb.test(a[b])&&a.splice(b,1);return new Tb(a)}var Vb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Wb=/^\s/;function G(a,b){return a.ca[a.N+(b||0)]}Tb.prototype.next=function(){return this.ca[this.N++]};Tb.prototype.back=function(){this.N--};Tb.prototype.empty=function(){return this.ca.length<=this.N};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Pb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Pb&&"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} -function Xb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Qb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Yb(a,b,c,d,e){return(Pb?Zb:$b).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new I)} -function Zb(a,b,c,d,e){if(a instanceof ac||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=bc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Xb(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}cc(a,b,c,d,e);return e} -function $b(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof K?cc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){Xb(a,c,d)&&e.add(a)}));return e} -function dc(a,b,c,d,e){var f;if((a instanceof ac||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=bc(a);if("*"!=g&&(f=ka(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ka(f,function(a){return Xb(a,c,d)}));w(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return ec(a,b,c,d,e)}function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function cc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b),cc(a,b,c,d,e)}function bc(a){if(a instanceof K){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.H=0}function fc(a){this.r=a;this.next=this.B=m}function gc(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Rb&&d.r instanceof Rb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<ob(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.H=g;return a} -I.prototype.unshift=function(a){a=new fc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.H++};I.prototype.add=function(a){a=new fc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.H++};function hc(a){return(a=a.k)?a.r:m}I.prototype.s=q("H");function ic(a){return(a=hc(a))?H(a):""}function jc(a,b){return new kc(a,!!b)}function kc(a,b){this.ya=a;this.da=(this.D=b)?a.p:a.k;this.Z=m} -kc.prototype.next=function(){var a=this.da;if(a==m)return m;var b=this.Z=a;this.da=this.D?a.B:a.next;return b.r};kc.prototype.remove=function(){var a=this.ya,b=this.Z;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.H--;this.Z=m};function L(a){this.j=a;this.l=this.t=n;this.J=m}L.prototype.h=q("t");function lc(a,b){a.t=b}function mc(a,b){a.l=b}L.prototype.w=q("J");function M(a,b){var c=a.evaluate(b);return c instanceof I?+ic(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof I?ic(c):""+c}function nc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function oc(a,b,c){L.call(this,a.j);this.ba=a;this.ha=b;this.ma=c;this.t=b.h()||c.h();this.l=b.l||c.l;this.ba==pc&&(!c.l&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.J={name:b.w().name,F:c}:!b.l&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.J={name:c.w().name,F:b}))}u(oc,L); -function qc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=jc(b);for(b=f.next();b;b=f.next()){e=jc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=jc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}oc.prototype.evaluate=function(a){return this.ba.q(this.ha,this.ma,a)};oc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.ba+"\n";a+=" ";b+=this.ha.toString(a)+"\n";return b+=this.ma.toString(a)};function rc(a,b,c,d){this.Aa=a;this.ka=b;this.j=c;this.q=d}rc.prototype.toString=q("Aa");var sc={}; -function O(a,b,c,d){a in sc&&h(Error("Binary operator already created: "+a));a=new rc(a,b,c,d);return sc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return qc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return qc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return qc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return qc(function(a,b){return a>=b},a,b,c)});var pc=O("=",3,2,function(a,b,c){return qc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return qc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return nc(a,c)&&nc(b,c)});O("or",1,2,function(a,b,c){return nc(a,c)||nc(b,c)});function tc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));L.call(this,a.j);this.la=a;this.e=b;this.t=a.h();this.l=a.l}u(tc,L);tc.prototype.evaluate=function(a){a=this.la.evaluate(a);return uc(this.e,a)};tc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.la.toString(a);return b+=this.e.toString(a)};function vc(a,b){b.length<a.ja&&h(Error("Function "+a.n+" expects at least"+a.ja+" arguments, "+b.length+" given"));a.$!==m&&b.length>a.$&&h(Error("Function "+a.n+" expects at most "+a.$+" arguments, "+b.length+" given"));a.za&&w(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.n+" is not of type Nodeset: "+b))});L.call(this,a.j);this.M=a;this.T=b;lc(this,a.t||na(b,function(a){return a.h()}));mc(this,a.xa&&!b.length||a.wa&&!!b.length||na(b,function(a){return a.l}))}u(vc,L); -vc.prototype.evaluate=function(a){return this.M.q.apply(m,qa(a,this.T))};vc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.M+"\n";b+=" ";this.T.length&&(a+=b+"Arguments:",b+=" ",a=ma(this.T,function(a,d){return a+"\n"+d.toString(b)},a));return a};function wc(a,b,c,d,e,f,g,p,x){this.n=a;this.j=b;this.t=c;this.xa=d;this.wa=e;this.q=f;this.ja=g;this.$=s(p)?p:g;this.za=!!x}wc.prototype.toString=q("n");var xc={}; -function P(a,b,c,d,e,f,g,p){a in xc&&h(Error("Function already created: "+a+"."));xc[a]=new wc(a,b,c,d,n,e,f,g,p)}P("boolean",2,n,n,function(a,b){return nc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,n,n,function(a,b){var c=ra(arguments,1);return ma(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);P("false",2,n,n,ba(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(M(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Pb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return oa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];w(d,function(a){(a=c(a))&&!pa(f,a)&&f.push(a)});f.sort(ob);var g=new I;w(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,ba(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);P("local-name",3,n,l,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,ba(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!nc(b,a)},1);P("number",1,n,l,function(a,b){return b?M(b,a):+H(a.g)},0,1);P("position",1,l,n,function(a){return a.Ba},0);P("round",1,n,n,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):H(a.g)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):H(a.g)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=jc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,ba(l),0);function K(a,b){this.oa=a;this.ia=s(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=fb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function yc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};K.prototype.getName=q("oa"); -K.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.oa;this.ia===m||(b+="\n"+this.ia.toString(a+" "));return b};function zc(a){L.call(this,3);this.na=a.substring(1,a.length-1)}u(zc,L);zc.prototype.evaluate=q("na");zc.prototype.toString=function(a){return(a||"")+"literal: "+this.na};function ac(a){this.n=a.toLowerCase()}ac.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.n||this.n==a.nodeName.toLowerCase()?l:this.n==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};ac.prototype.getName=q("n");ac.prototype.toString=function(a){return(a||"")+"nametest: "+this.n};function Ac(a){L.call(this,1);this.pa=a}u(Ac,L);Ac.prototype.evaluate=q("pa");Ac.prototype.toString=function(a){return(a||"")+"number: "+this.pa};function Bc(a,b){L.call(this,a.j);this.fa=a;this.K=b;this.t=a.h();this.l=a.l;if(1==this.K.length){var c=this.K[0];!c.X&&c.u==Cc&&(c=c.S,"*"!=c.getName()&&(this.J={name:c.getName(),F:m}))}}u(Bc,L);function Dc(){L.call(this,4)}u(Dc,L);Dc.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Dc.prototype.toString=function(a){return a+"RootHelperExpr"};function Ec(){L.call(this,4)}u(Ec,L);Ec.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Ec.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Bc.prototype.evaluate=function(a){var b=this.fa.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.K;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=jc(b,e.u.D),g;if(!e.h()&&e.u==Fc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ob(g))}else if(!e.h()&&e.u==Gc)g=f.next(),b=e.evaluate(new Ob(g));else{g=f.next();for(b=e.evaluate(new Ob(g));(g=f.next())!=m;)g=e.evaluate(new Ob(g)),b=gc(b,g)}}return b}; -Bc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.fa.toString(b);this.K.length&&(c+=b+"Steps:\n",b+=" ",w(this.K,function(a){c+=a.toString(b)}));return c};function Hc(a,b){this.e=a;this.D=!!b}function uc(a,b,c){for(c=c||0;c<a.e.length;c++)for(var d=a.e[c],e=jc(b),f=b.s(),g,p=0;g=e.next();p++){var x=a.D?f-p:p+1;g=d.evaluate(new Ob(g,x,f));var J;"number"==typeof g?J=x==g:"string"==typeof g||"boolean"==typeof g?J=!!g:g instanceof I?J=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));J||e.remove()}return b}Hc.prototype.w=function(){return 0<this.e.length?this.e[0].w():m}; -Hc.prototype.h=function(){for(var a=0;a<this.e.length;a++){var b=this.e[a];if(b.h()||1==b.j||0==b.j)return l}return n};Hc.prototype.s=function(){return this.e.length};Hc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return ma(this.e,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Ic(a,b,c,d){L.call(this,4);this.u=a;this.S=b;this.e=c||new Hc([]);this.X=!!d;b=this.e.w();a.Ea&&b&&(a=b.name,a=Pb?a.toLowerCase():a,this.J={name:a,F:b.F});this.t=this.e.h()}u(Ic,L); -Ic.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.F?N(c.F,a):m,f=1);if(this.X)if(!this.h()&&this.u==Jc)c=Yb(this.S,b,d,e),c=uc(this.e,c,f);else if(a=jc((new Ic(Kc,new K("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=gc(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Ic.prototype.q=function(a,b,c,d){a=this.u.M(this.S,a,b,c);return a=uc(this.e,a,d)}; -Ic.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.X?"//":"/")+"\n";this.u.n&&(b+=a+"Axis: "+this.u+"\n");b+=this.S.toString(a);if(this.e.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.e.length;c++)var d=c<this.e.length-1?", ":"",b=b+(this.e[c].toString(a)+d);return b};function Lc(a,b,c,d){this.n=a;this.M=b;this.D=c;this.Ea=d}Lc.prototype.toString=q("n");var Mc={}; -function Q(a,b,c,d){a in Mc&&h(Error("Axis already created: "+a));b=new Lc(a,b,c,!!d);return Mc[a]=b}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Cc=Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Pb)return c.add(new Rb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof K&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Pb?g.nodeValue&&c.add(Sb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Pb?g.nodeValue&&c.add(Sb(b,g,b.sourceIndex)):c.add(g));return c},n),Jc=Q("child",function(a,b,c,d,e){return(Pb?dc:ec).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new I)},n,l); -Q("descendant",Yb,n,l);var Kc=Q("descendant-or-self",function(a,b,c,d){var e=new I;Xb(b,c,d)&&a.matches(b)&&e.add(b);return Yb(a,b,c,d,e)},n,l),Fc=Q("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Xb(f,c,d)&&a.matches(f)&&e.add(f),e=Yb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new I},n); -var Nc=Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Gc=Q("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var x=[];for(b=f[g];b=b.previousSibling;)x.unshift(b);for(var J=0,Gb=x.length;J<Gb;J++)b=x[J],Xb(b,c,d)&&a.matches(b)&&e.add(b),e=Yb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Oc=Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Pc(a){L.call(this,1);this.ea=a;this.t=a.h();this.l=a.l}u(Pc,L);Pc.prototype.evaluate=function(a){return-M(this.ea,a)};Pc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ea.toString(a+" ")};function Qc(a){L.call(this,4);this.P=a;lc(this,na(this.P,function(a){return a.h()}));mc(this,na(this.P,function(a){return a.l}))}u(Qc,L);Qc.prototype.evaluate=function(a){var b=new I;w(this.P,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=gc(b,c)});return b};Qc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";w(this.P,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Rc(a){this.a=a}function Sc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Tc(a);var d=a.a.next();if(!d)break;var e=(d=sc[d]||m)&&d.ka;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ka;)b=new oc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new oc(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&h(Error(b))}function Uc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Vc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Wc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new zc(a)}function Xc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new ac(a.a.next()+a.a.next()+a.a.next()):new ac(a.a.next())} -function Yc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Dc;d=new Dc;R(a,"Missing next location step.");b=Zc(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Sc(a);R(a,'unclosed "("');Uc(a,")");break;case '"':case "'":b=Wc(a);break;default:if(isNaN(+b))if(!yc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=xc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){R(a,"Missing function argument list.");d.push(Sc(a));if(","!=G(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Vc(a);b=new vc(b,d)}else{b=m;break a}else b=new Ac(+a.a.next())}"["==G(a.a)&&(d=new Hc($c(a)),b=new tc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=Zc(a,"/"),d=new Ec,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Zc(a,b),c.push(b);return new Bc(d, -c)} -function Zc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Ic(Oc,new K("node")),a.a.next(),d;if(".."==G(a.a))return d=new Ic(Nc,new K("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Cc,a.a.next(),R(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Mc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Jc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){yc(e)||h(Error("Invalid node type: "+e));c=a.a.next();yc(c)||h(Error("Invalid type name: "+c));Uc(a,"(");R(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Wc(a);R(a,"Bad nodetype");Vc(a);c=new K(c,g)}else c=Xc(a);else"*"==e?c=Xc(a):h(Error("Bad token: "+a.a.next()));e=new Hc($c(a),f.D);return d||new Ic(f,c,e,"//"==b)} -function $c(a){for(var b=[];"["==G(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Sc(a);b.push(c);R(a,"Unclosed predicate expression.");Uc(a,"]")}return b}function Tc(a){if("-"==G(a.a))return a.a.next(),new Pc(Tc(a));var b=Yc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Yc(a));a.a.back();a=new Qc(b)}return a};function ad(a){a.length||h(Error("Empty XPath expression."));a=Ub(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Sc(new Rc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Ob(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?ic(a):""+a;break;case 1:this.numberValue=a instanceof I?+ic(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=jc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Rb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=hc(a);this.singleNodeValue=d instanceof Rb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function bd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new ad(a)).evaluate(b,f)},b.createExpression=function(a){return new ad(a)})};var T={};T.ra=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.q=function(a,b,c){var d=F(a);(A||Lb)&&bd(kb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ra;return A&&!Xa(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.W=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Da=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.W(c,a);return c}; -T.Ka=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&T.W(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){T.W(b,a)});return c};function cd(a){return(a=a.exec(Ja()))?a[1]:""}var dd=function(){if(Hb)return cd(/Firefox\/([0-9.]+)/);if(A||z)return Qa;if(Mb)return cd(/Chrome\/([0-9.]+)/);if(Nb)return cd(/Version\/([0-9.]+)/);if(Jb||Kb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ja());if(a)return a[1]+"."+a[2]}else{if(Lb)return(a=cd(/Android\s+([0-9.]+)/))?a:cd(/Version\/([0-9.]+)/);if(Ib)return cd(/Camino\/([0-9.]+)/)}return""}();var ed,fd;function U(a){return gd?ed(a):A?0<=ha(Ya,a):Xa(a)}function hd(a){return gd?fd(a):Lb?0<=ha(id,a):0<=ha(dd,a)} -var gd=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;ed=function(a){return 0<=d.ta(e,""+a)};fd=function(a){return 0<=d.ta(f,""+a)};return l}(),jd;if(Lb){var kd=/Android\s+([0-9\.]+)/.exec(Ja());jd=kd?kd[1]:"0"}else jd="0"; -var id=jd,ld=A&&!D(8),md=D(9),nd=A&&!D(9),od=D(10),pd=A&&!D(10);Lb&&hd(2.3);!z&&(!C||U("533"));function qd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}qd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};qd.prototype.contains=function(a){return!this||!a?n:a instanceof qd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function rd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function sd(a,b){return rd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function td(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=gb(a),b=!jb(b.A);return b?a.body:a.documentElement} -function ud(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function vd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=sd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=sd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function wd(a){var b,c=F(a),d=sd(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=td(c);if(a==g)return f;if(a.getBoundingClientRect)b=ud(a),a=gb(c),a=ib(a.A),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==sd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=vd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function xd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=ud(a);b.x=c.left;b.y=c.top}else{var c=gb(a),c=ib(c.A),d=wd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Xa(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=sd(a,e));f||(f=sd(a,"transform"));f?(a=f.match(yd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e=ea(a.ga),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.ga().targetTouches&& -(f=a.ga().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function zd(a){if("none"!=sd(a,"display"))return Ad(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Ad(a);b.display=c;b.position=e;b.visibility=d;return a}function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=ud(a),new bb(a.right-a.left,a.bottom-a.top)):new bb(b,c)}var Bd={thin:2,medium:4,thick:6}; -function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var yd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Dd(a){var b;a:{a=F(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,l)&&Gd(a)&&!(A||z||B&&!U("1.9.2")?0:"none"==W(a,"pointer-events"))}function Hd(a){return V(a,"OPTION")?l:V(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Id(a,b){var c;if(c=ld)if(c="value"==b)if(c=V(a,"OPTION"))c=Jd(a,"value")===m;c?(c=[],vb(a,c,n),c=c.join("")):c=a[b];return c} -var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function Ld(a){var b=[];w(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b} -function Jd(a,b){b=b.toLowerCase();if("style"==b)return Ld(a.style.cssText);if(ld&&"value"==b&&V(a,"INPUT"))return a.value;if(nd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Gd(a){var b=a.tagName.toUpperCase();return!pa(Md,b)?l:Id(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):wb(a,function(a){var b=a.parentNode;if(b&&V(b,"FIELDSET")&&Id(b,"disabled")){if(!V(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:lb(a.previousSibling);)if(V(a,"LEGEND"))return l}return n},l)?n:l} -function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:m} -function W(a,b){var c=ia(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=nd?"styleFloat":"cssFloat";c=rd(a,c)||Od(a,c);if(c===m)c=m;else if(pa(ta,b)&&(wa.test("#"==c.charAt(0)?c:"#"+c)||Aa(c).length||sa&&sa[c.toLowerCase()]||ya(c).length)){var d=ya(c);if(!d.length){a:if(d=Aa(c),!d.length){d=sa[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(wa.test(d)&&(d=va(d),d=va(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=Nd(a))?Od(c,b):m} -function Pd(a){if(ea(a.getBBox)&&!V(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(V(a,"BODY")){b=kb(F(a))||k;"hidden"!=W(a,"overflow")?a=l:(a=Nd(a),!a||!V(a,"HTML")?a=l:(a=W(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||v).document;var b=a.documentElement,d=a.body;d||h(new y(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new bb(b,a)}else b=(b||window).document,b=jb(b)?b.documentElement:b.body,b=new bb(b.clientWidth,b.clientHeight);return b}return zd(a)} -function Fd(a,b){function c(a){if("none"==W(a,"display"))return n;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?l:V(a,"PATH")&&(0<b.height||0<b.width)?(b=W(a,"stroke-width"),!!b&&0<parseInt(b,10)):na(a.childNodes,function(b){return b.nodeType==fb&&"hidden"!=W(a,"overflow")||V(b)&&d(b)})}function e(a,b){var c;if((c=b==m?mb(a):mb(b))&&("hidden"==W(c,"overflow-x")||"hidden"==W(c,"overflow-y"))){var d=Pd(c),f=xd(c),g=xd(a);return f.x+d.width<=g.x&&"hidden"==W(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==W(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=W(a,"-o-transform")||W(a,"-webkit-transform")||W(a,"-ms-transform")||W(a,"-moz-transform")||W(a,"transform");if(b&&"none"!==b)return b=xd(a),a=Pd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Nd(a);return!a||f(a)}V(a)||h(Error("Argument to isShown must be of type Element"));if(V(a,"OPTION")||V(a,"OPTGROUP")){var g=wb(a,function(a){return V(a,"SELECT")});return!!g&&Fd(g,l)}if(V(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?T.Da('/descendant::*[@usemap = "#'+a.name+'"]',g):rb(g,function(b){return V(b)&&Jd(b,"usemap")=="#"+a.name});return!!g&&Fd(g,b)}return V(a,"AREA")?(g=wb(a,function(a){return V(a,"MAP")}),!!g&&Fd(g,b)):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==Qd(a)||!d(a)||!e(a,m)?n:f(a)} -function Qd(a){if(pd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Rd(a)}function Rd(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Rd(a));return b};function Sd(a){this.d=v.document.documentElement;this.m=m;var b=Dd(this.d);b&&Td(this,b);this.O=a||new Ud}Sd.prototype.v=q("d");function Td(a,b){a.d=b;a.m=V(b,"OPTION")?wb(b,function(a){return V(a,"SELECT")}):m} -function Vd(a,b,c,d,e,f,g){if(!g&&!Ed(a.d))return n;e&&!(Wd==b||Xd==b)&&h(new y(12,"Event type does not allow related target: "+b));c={clientX:c.x,clientY:c.y,button:d,altKey:0!=(a.O.Q&4),ctrlKey:0!=(a.O.Q&2),shiftKey:0!=(a.O.Q&1),metaKey:0!=(a.O.Q&8),wheelDelta:f||0,relatedTarget:e||m};return(a=a.m?Yd(a,b):a.d)?Zd(a,b,c):l} -function Yd(a,b){if(A)switch(b){case Wd:case $d:return m;case ae:case be:case ce:return a.m.multiple?a.m:m;default:return a.m}if(z)switch(b){case ae:case Wd:return a.m.multiple?a.d:m;default:return a.d}if(C)switch(b){case de:case ee:return a.m.multiple?a.d:a.m;default:return a.m.multiple?a.d:m}return a.d}var fe=C||z||gd&&hd(3.6); -function ge(a){if(fe||!a.href)return n;if(!gd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=kb(F(a)),c=b.location.href;a=he(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var ie=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function he(a,b){var c=b.match(ie);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Ud(){this.Q=0};!A||U(10);Lb&&hd(4);var je=A&&v.navigator.msPointerEnabled;function ke(a,b,c){this.f=a;this.U=b;this.V=c}ke.prototype.create=function(a){a=F(a);nd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.U,this.V));return a};ke.prototype.toString=q("f");function X(a,b,c){ke.call(this,a,b,c)}u(X,ke); -X.prototype.create=function(a,b){!B&&this==le&&h(new y(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(nd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Xd||this==Wd)Object.defineProperty?(c=this==Xd,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==me&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=kb(c);d=c.createEvent("MouseEvents");c=1;if(this==me&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==le&&(c=b.wheelDelta);d.initMouseEvent(this.f,this.U,this.V,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=xb(gb(a)),c=td(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function ne(a,b,c){ke.call(this,a,b,c)}u(ne,ke); -ne.prototype.create=function(a,b){je||h(new y(9,"Browser does not support MSPointer events."));var c=F(a),d=kb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.f,this.U,this.V,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.va);return c}; -var oe=new ke("change",l,n),pe=new ke("focus",n,n),de=new X("click",l,l),ae=new X("contextmenu",l,l),qe=new X("dblclick",l,l),re=new X("mousedown",l,l),be=new X("mousemove",l,n),Xd=new X("mouseout",l,l),Wd=new X("mouseover",l,l),ee=new X("mouseup",l,l),me=new X(B?"DOMMouseScroll":"mousewheel",l,l),le=new X("MozMousePixelScroll",l,l),se=new ne("MSPointerDown",l,l),ce=new ne("MSPointerMove",l,l),$d=new ne("MSPointerOver",l,l),te=new ne("MSPointerOut",l,l),ue=new ne("MSPointerUp",l,l); -function Zd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return nd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function ve(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ve){d=we(a);xe(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ve.prototype.G=0;ve.prototype.qa=0;function we(a){xe(a);return a.i.concat()} -ve.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.G--,this.qa++,this.i.length>2*this.G&&xe(this),l):n};function xe(a){if(a.G!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.G!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -ve.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};ve.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.G++,this.i.push(a),this.qa++);this.z[a]=b};var ye={};function Y(a,b,c){fa(a)&&(a=B?a.b:z?a.opera:a.c);a=new ze(a,b,c);if(b&&(!(b in ye)||c))ye[b]={key:a,shift:n},c&&(ye[c]={key:a,shift:l});return a}function ze(a,b,c){this.code=a;this.sa=b||m;this.Sa=c||this.sa}Y(8);Y(9);Y(13);var Ae=Y(16),Be=Y(17),Ce=Y(18);Y(19);Y(20);Y(27);Y(32," ");Y(33);Y(34);Y(35);Y(36);Y(37);Y(38);Y(39);Y(40);Y(44);Y(45);Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","("); -Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q");Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z");var De=Y(Ia?{b:91,c:91,opera:219}:Ha?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -Y(Ia?{b:92,c:92,opera:220}:Ha?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});Y(Ia?{b:93,c:93,opera:0}:Ha?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});Y({b:96,c:96,opera:48},"0");Y({b:97,c:97,opera:49},"1");Y({b:98,c:98,opera:50},"2");Y({b:99,c:99,opera:51},"3");Y({b:100,c:100,opera:52},"4");Y({b:101,c:101,opera:53},"5");Y({b:102,c:102,opera:54},"6");Y({b:103,c:103,opera:55},"7");Y({b:104,c:104,opera:56},"8");Y({b:105,c:105,opera:57},"9");Y({b:106,c:106,opera:Oa?56:42},"*");Y({b:107,c:107,opera:Oa?61:43},"+"); -Y({b:109,c:109,opera:Oa?109:45},"-");Y({b:110,c:110,opera:Oa?190:78},".");Y({b:111,c:111,opera:Oa?191:47},"/");Y(Oa&&z?m:144);Y(112);Y(113);Y(114);Y(115);Y(116);Y(117);Y(118);Y(119);Y(120);Y(121);Y(122);Y(123);Y({b:107,c:187,opera:61},"=","+");Y(108,",");Y({b:109,c:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");Y({b:59,c:186,opera:59},";",":");Y(222,"'",'"');var Ee=new ve;Ee.set(1,Ae);Ee.set(2,Be);Ee.set(4,Ce); -Ee.set(8,De);(function(a){var b=new ve;w(we(a),function(c){b.set(a.get(c).code,c)});return b})(Ee);B&&U(12);function Fe(a,b){Sd.call(this,b);this.L=this.o=m;this.C=new E(0,0);this.Y=this.I=n;if(a){this.o=a.Ha;try{V(a.ua)&&(this.L=a.ua)}catch(c){this.o=m}this.C=a.Ia;this.I=a.Qa;this.Y=a.Ja;try{V(a.element)&&Td(this,a.element)}catch(d){this.o=m}}}u(Fe,Sd);var Z={}; -nd?(Z[de]=[0,0,0,m],Z[ae]=[m,m,0,m],Z[ee]=[1,4,2,m],Z[Xd]=[0,0,0,0],Z[be]=[1,4,2,0]):C||md?(Z[de]=[0,1,2,m],Z[ae]=[m,m,2,m],Z[ee]=[0,1,2,m],Z[Xd]=[0,1,2,0],Z[be]=[0,1,2,0]):(Z[de]=[0,1,2,m],Z[ae]=[m,m,2,m],Z[ee]=[0,1,2,m],Z[Xd]=[0,0,0,0],Z[be]=[0,0,0,0]);od&&(Z[se]=Z[ee],Z[ue]=Z[ee],Z[ce]=[-1,-1,-1,-1],Z[te]=Z[ce],Z[$d]=Z[ce]);Z[qe]=Z[de];Z[re]=Z[ee];Z[Wd]=Z[Xd];var Ge={La:se,Ma:ce,Na:te,Oa:$d,Pa:ue}; -function He(a){a.o!==m&&h(new y(13,"Cannot press more then one button or an already pressed button."));a.o=0;a.L=a.v();var b;var c=B&&!hd(4);if((C||c)&&(V(a.v(),"OPTION")||V(a.v(),"SELECT")))b=l;else{(c=B||A)&&(b=Dd(a.v()));var d=Ie(a,re);b=d&&c&&b!=Dd(a.v())?n:d}if(b&&(a=a.m||a.d,b=Dd(a),a!=b)){if(b&&(ea(b.blur)||A&&fa(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(e){A&&"Unspecified error."==e.message||h(e)}A&&!U(8)&&kb(F(a)).focus()}if(ea(a.focus)||A&&fa(a.focus))z&&U(11)&&!Fd(a)? -Zd(a,pe):a.focus()}} -function Je(a){a.o===m&&h(new y(13,"Cannot release a button when no button is pressed."));Ie(a,ee);if(0==a.o&&a.v()==a.L){var b=a.C,c=Ke(a,de);if(Ed(a.d)){var d=m,e=m;if(!fe)for(var f=a.d;f;f=f.parentNode)if(V(f,"A")){d=f;break}else{var g;a:{if(V(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=l;break a}if(V(f,"BUTTON")&&(g=f.type.toLowerCase(),"submit"==g)){g=l;break a}g=n}if(g){e=f;break}}if(g=f=Hd(a.d)){g=a.d;Hd(g)||h(new y(15,"Element is not selectable"));var p="selected",x=g.type&& -g.type.toLowerCase();if("checkbox"==x||"radio"==x)p="checked";g=!!Id(g,p)}if(a.m&&(p=a.m,!g||p.multiple))a.d.selected=!g,(!C||!p.multiple||Lb&&hd(4))&&Zd(p,oe);A&&e?e.click():Vd(a,de,b,c)&&(d&&ge(d)?(b=d,c=b.href,d=kb(F(b)),A&&!U(8)&&(c=he(d.location,c)),b.target?d.open(c,b.target):d.location.href=c):f&&!a.m&&(!B&&!C&&!(g&&"radio"==a.d.type.toLowerCase()))&&(a.d.checked=!g,z&&!U(11)&&Zd(a.d,oe)))}a.I&&Ie(a,qe);a.I=!a.I}else 2==a.o&&Ie(a,ae);a.o=m;a.L=m} -Fe.prototype.move=function(a,b){var c=Ed(a),d=xd(a);this.C.x=b.x+d.x;this.C.y=b.y+d.y;d=this.v();if(a!=d){try{kb(F(d)).closed&&(d=m)}catch(e){d=m}if(d){var f=d===v.document.documentElement||d===v.document.body,d=!this.Y&&f?m:d;Ie(this,Xd,a)}Td(this,a);A||Ie(this,Wd,d,m,c)}Ie(this,be,m,m,c);A&&a!=d&&Ie(this,Wd,d,m,c);this.I=n}; -function Ie(a,b,c,d,e){a.Y=l;if(od){var f=Ge[b],g;if(g=f){g=a.C;var p=Ke(a,f),x=MSPointerEvent.MSPOINTER_TYPE_MOUSE;!e&&!Ed(a.d)?f=n:(c&&!($d==f||te==f)&&h(new y(12,"Event type does not allow related target: "+f)),g={clientX:g.x,clientY:g.y,button:p,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:c||m,width:0,height:0,Ca:0,rotation:0,pointerId:1,Fa:0,Ga:0,pointerType:x,va:l},f=(p=a.m?Yd(a,f):a.d)?Zd(p,f,g):l);g=!f}if(g)return n}return Vd(a,b,a.C,Ke(a,b),c,d,e)} -function Ke(a,b){if(!(b in Z))return 0;var c=Z[b][a.o===m?3:a.o];c===m&&h(new y(13,"Event does not permit the specified mouse button."));return c};function Le(a,b){this.x=a;this.y=b}u(Le,E);Le.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Me(a,b,c){Fd(a,l)||h(new y(11,"Element is not currently visible and may not be manipulated"));var d=F(a),d=C?d.body:d.documentElement,e;e=wd(a);var f=wd(d),g;if(A){var p=Cd(d,"borderLeft");g=Cd(d,"borderRight");var x=Cd(d,"borderTop"),J=Cd(d,"borderBottom");g=new qd(x,g,J,p)}else p=rd(d,"borderLeftWidth"),g=rd(d,"borderRightWidth"),x=rd(d,"borderTopWidth"),J=rd(d,"borderBottomWidth"),g=new qd(parseFloat(x),parseFloat(g),parseFloat(J),parseFloat(p));p=e.x-f.x-g.left;e=e.y-f.y-g.top;f=d.clientHeight- -a.offsetHeight;g=d.scrollLeft;x=d.scrollTop;g+=Math.min(p,Math.max(p-(d.clientWidth-a.offsetWidth),0));x+=Math.min(e,Math.max(e-f,0));e=new E(g,x);d.scrollLeft=e.x;d.scrollTop=e.y;b?b=new Le(b.x,b.y):(b=Ne(a),b=new Le(b.width/2,b.height/2));c=c||new Fe;c.move(a,b);He(c);Je(c);He(c);Je(c)}function Ne(a){var b=zd(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ne(a.offsetParent)};function Oe(){this.R=k} -function Pe(a,b,c){switch(typeof b){case "string":Qe(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Pe(a,a.R?a.R.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Qe(f, -c),c.push(":"),Pe(a,a.R?a.R.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Re={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Se=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Qe(a,b){b.push('"',a.replace(Se,function(a){if(a in Re)return Re[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Re[a]=e+b.toString(16)}),'"')};C||z||B&&U(3.5)||A&&U(8);function Te(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return la(a,Te);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ue(a);return b}if("document"in a)return b={},b.WINDOW=Ue(a),b;if(da(a))return la(a,Te);a=cb(a,function(a,b){return"number"==typeof b||t(b)});return db(a,Te);default:return m}} -function Ve(a,b){return"array"==ca(a)?la(a,function(a){return Ve(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?We(a.ELEMENT,b):"WINDOW"in a?We(a.WINDOW,b):db(a,function(a){return Ve(a,b)}):a}function Xe(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.aa=ga());b.aa||(b.aa=ga());return b}function Ue(a){var b=Xe(a.ownerDocument),c=eb(b,function(b){return b==a});c||(c=":wdc:"+b.aa++,b[c]=a);return c} -function We(a,b){a=decodeURIComponent(a);var c=b||document,d=Xe(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function Ye(a,b){var c=[a,b],d=Me,e;try{var d=t(d)?new v.Function(d):v==window?d:new v.Function("return ("+d+").apply(null,arguments);"),f=Ve(c,v.document),g=d.apply(m,f);e={status:0,value:Te(g)}}catch(p){e={status:"code"in p?p.code:13,value:{message:p.message}}}c=[];Pe(new Oe,e,c);return c.join("")}var Ze=["_"],$e=r;!(Ze[0]in $e)&&$e.execScript&&$e.execScript("var "+Ze[0]);for(var af;Ze.length&&(af=Ze.shift());)!Ze.length&&s(Ye)?$e[af]=Ye:$e=$e[af]?$e[af]:$e[af]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}p(t,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return l.navigator?l.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=l.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var u=Ha,v=Ia,w=Ka,A=Ja,Qa,Ra=l.navigator;Qa=Ra&&Ra.platform||"";La=-1!=Qa.indexOf("Mac");Ma=-1!=Qa.indexOf("Win");var Sa=-1!=Qa.indexOf("Linux");function Ta(){var a=l.document;return a?a.documentMode:void 0}var Ua; +a:{var Va="",Wa;if(u&&l.opera)var Xa=l.opera.version,Va="function"==typeof Xa?Xa():Xa;else if(w?Wa=/rv\:([^\);]+)(\)|;)/:v?Wa=/MSIE\s+([^\);]+)(\)|;)/:A&&(Wa=/WebKit\/(\S+)/),Wa)var Ya=Wa.exec(Na()),Va=Ya?Ya[1]:"";if(v){var Za=Ta();if(Za>parseFloat(Va)){Ua=String(Za);break a}}Ua=Va}var $a={};function ab(a){return $a[a]||($a[a]=0<=na(Ua,a))}function B(a){return v&&eb>=a}var fb=l.document,eb=fb&&v?Ta()||("CSS1Compat"==fb.compatMode?parseInt(Ua,10):5):void 0;var gb;!w&&!v||v&&B(9)||w&&ab("1.9.1");v&&ab("9");function C(a,b){this.x=da(a)?a:0;this.y=da(b)?b:0}C.prototype.toString=function(){return"("+this.x+", "+this.y+")"};C.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};C.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};C.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function hb(a,b){this.width=a;this.height=b}hb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};hb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};hb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};hb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ib(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function jb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function kb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var lb=3;function mb(a){a=a.document;a=nb(a)?a.documentElement:a.body;return new hb(a.clientWidth,a.clientHeight)}function D(a){return a?a.parentWindow||a.defaultView:window}function nb(a){return"CSS1Compat"==a.compatMode}function ob(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!B(9)){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?rb(a,b):!c&&pb(e,b)?-1*sb(a,b):!d&&pb(f,a)?sb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=E(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(l.Range.START_TO_END,d)}function sb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return rb(d,a)}function rb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function E(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var tb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},ub={IMG:" ",BR:"\n"}; +function vb(a,b,c){if(!(a.nodeName in tb))if(a.nodeType==lb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in ub)b.push(ub[a.nodeName]);else for(a=a.firstChild;a;)vb(a,b,c),a=a.nextSibling}function wb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function xb(a){this.C=a||l.document||document}xb.prototype.v=function(a){return m(a)?this.C.getElementById(a):a}; +function yb(a){return!A&&nb(a.C)?a.C.documentElement:a.C.body||a.C.documentElement}xb.prototype.contains=pb;var zb,Ab,Bb,Cb,Db,Eb,Fb;Fb=Eb=Db=Cb=Bb=Ab=zb=!1;var Gb=Na();Gb&&(-1!=Gb.indexOf("Firefox")?zb=!0:-1!=Gb.indexOf("Camino")?Ab=!0:-1!=Gb.indexOf("iPhone")||-1!=Gb.indexOf("iPod")?Bb=!0:-1!=Gb.indexOf("iPad")?Cb=!0:-1!=Gb.indexOf("Android")?Db=!0:-1!=Gb.indexOf("Chrome")?Eb=!0:-1!=Gb.indexOf("Safari")&&(Fb=!0));var Hb=zb,Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb;function Ob(a,b,c){this.g=a;this.Ha=b||1;this.p=c||1};var Pb=v&&!B(9),Qb=v&&!B(8);function Rb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function Sb(a,b,c){var d=Qb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Rb(b,a,b.nodeName,d,c)};function Tb(a){this.ga=a;this.Q=0}function Ub(a){a=a.match(Vb);for(var b=0;b<a.length;b++)Wb.test(a[b])&&a.splice(b,1);return new Tb(a)}var Vb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Wb=/^\s/;function F(a,b){return a.ga[a.Q+(b||0)]}Tb.prototype.next=function(){return this.ga[this.Q++]};Tb.prototype.back=function(){this.Q--};Tb.prototype.empty=function(){return this.ga.length<=this.Q};function G(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(Pb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Pb&&"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} +function Xb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Qb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Yb(a,b,c,d,e){return(Pb?Zb:$b).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new H)} +function Zb(a,b,c,d,e){if(a instanceof ac||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=bc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Xb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}cc(a,b,c,d,e);return e} +function $b(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),r(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof I?cc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),r(b,function(a){Xb(a,c,d)&&e.add(a)}));return e} +function dc(a,b,c,d,e){var f;if((a instanceof ac||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var g=bc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Xb(a,c,d)}));r(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return ec(a,b,c,d,e)}function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function cc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b),cc(a,b,c,d,e)}function bc(a){if(a instanceof I){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function H(){this.p=this.k=null;this.K=0}function fc(a){this.s=a;this.next=this.F=null}function gc(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.s==d.s||c.s instanceof Rb&&d.s instanceof Rb&&c.s.g==d.s.g?(f=c,c=c.next,d=d.next):0<qb(c.s,d.s)?(f=d,d=d.next):(f=c,c=c.next),(f.F=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.F=e,e=e.next=f,g++,f=f.next;a.p=e;a.K=g;return a} +H.prototype.unshift=function(a){a=new fc(a);a.next=this.k;this.p?this.k.F=a:this.k=this.p=a;this.k=a;this.K++};H.prototype.add=function(a){a=new fc(a);a.F=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.K++};function hc(a){return(a=a.k)?a.s:null}H.prototype.r=h("K");function ic(a){return(a=hc(a))?G(a):""}function jc(a,b){return new kc(a,!!b)}function kc(a,b){this.Da=a;this.ha=(this.G=b)?a.p:a.k;this.ba=null} +kc.prototype.next=function(){var a=this.ha;if(null==a)return null;var b=this.ba=a;this.ha=this.G?a.F:a.next;return b.s};kc.prototype.remove=function(){var a=this.Da,b=this.ba;if(!b)throw Error("Next must be called at least once before remove.");var c=b.F,b=b.next;c?c.next=b:a.k=b;b?b.F=c:a.p=c;a.K--;this.ba=null};function J(a){this.j=a;this.l=this.t=!1;this.M=null}function L(a){return"\n "+a.toString().split("\n").join("\n ")}J.prototype.h=h("t");function lc(a,b){a.t=b}function mc(a,b){a.l=b}J.prototype.w=h("M");function M(a,b){var c=a.evaluate(b);return c instanceof H?+ic(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof H?ic(c):""+c}function nc(a,b){var c=a.evaluate(b);return c instanceof H?!!c.r():!!c};function oc(a,b,c){J.call(this,a.j);this.fa=a;this.ma=b;this.ra=c;this.t=b.h()||c.h();this.l=b.l||c.l;this.fa==pc&&(c.l||c.h()||4==c.j||0==c.j||!b.w()?b.l||(b.h()||4==b.j||0==b.j||!c.w())||(this.M={name:c.w().name,H:b}):this.M={name:b.w().name,H:c})}p(oc,J); +function qc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof H&&c instanceof H){e=jc(b);for(d=e.next();d;d=e.next())for(b=jc(c),f=b.next();f;f=b.next())if(a(G(d),G(f)))return!0;return!1}if(b instanceof H||c instanceof H){b instanceof H?e=b:(e=c,c=b);e=jc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}oc.prototype.evaluate=function(a){return this.fa.q(this.ma,this.ra,a)};oc.prototype.toString=function(){var a="Binary Expression: "+this.fa,a=a+L(this.ma);return a+=L(this.ra)};function rc(a,b,c,d){this.Ga=a;this.pa=b;this.j=c;this.q=d}rc.prototype.toString=h("Ga");var sc={}; +function O(a,b,c,d){if(sc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new rc(a,b,c,d);return sc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return qc(function(a,b){return a<b},a,b,c)}); +O(">",4,2,function(a,b,c){return qc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return qc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return qc(function(a,b){return a>=b},a,b,c)});var pc=O("=",3,2,function(a,b,c){return qc(function(a,b){return a==b},a,b,c,!0)});O("!=",3,2,function(a,b,c){return qc(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return nc(a,c)&&nc(b,c)});O("or",1,2,function(a,b,c){return nc(a,c)||nc(b,c)});function tc(a,b){if(b.r()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.j);this.qa=a;this.e=b;this.t=a.h();this.l=a.l}p(tc,J);tc.prototype.evaluate=function(a){a=this.qa.evaluate(a);return uc(this.e,a)};tc.prototype.toString=function(){var a;a="Filter:"+L(this.qa);return a+=L(this.e)};function vc(a,b){if(b.length<a.oa)throw Error("Function "+a.o+" expects at least"+a.oa+" arguments, "+b.length+" given");if(null!==a.ca&&b.length>a.ca)throw Error("Function "+a.o+" expects at most "+a.ca+" arguments, "+b.length+" given");a.Ea&&r(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});J.call(this,a.j);this.P=a;this.W=b;lc(this,a.t||ta(b,function(a){return a.h()}));mc(this,a.Ca&&!b.length||a.Ba&&!!b.length||ta(b,function(a){return a.l}))} +p(vc,J);vc.prototype.evaluate=function(a){return this.P.q.apply(null,xa(a,this.W))};vc.prototype.toString=function(){var a="Function: "+this.P;if(this.W.length)var b=sa(this.W,function(a,b){return a+L(b)},"Arguments:"),a=a+L(b);return a};function wc(a,b,c,d,e,f,g,k,q){this.o=a;this.j=b;this.t=c;this.Ca=d;this.Ba=e;this.q=f;this.oa=g;this.ca=da(k)?k:g;this.Ea=!!q}wc.prototype.toString=h("o");var xc={}; +function P(a,b,c,d,e,f,g,k){if(xc.hasOwnProperty(a))throw Error("Function already created: "+a+".");xc[a]=new wc(a,b,c,d,!1,e,f,g,k)}P("boolean",2,!1,!1,function(a,b){return nc(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+N(c,a)},"")},2,null);P("contains",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2); +P("count",1,!1,!1,function(a,b){return b.evaluate(a).r()},1,1,!0);P("false",2,!1,!1,aa(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(M(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(Pb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];r(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(qb);var g=new H;r(f,function(a){g.add(a)});return g},1);P("lang",2,!1,!1,aa(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.p},0);P("local-name",3,!1,!0,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,aa(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!nc(b,a)},1);P("number",1,!1,!0,function(a,b){return b?M(b,a):+G(a.g)},0,1);P("position",1,!0,!1,function(a){return a.Ha},0);P("round",1,!1,!1,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?N(b,a):G(a.g)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){for(var c=jc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,!1,!1,aa(!0),0);function I(a,b){this.ta=a;this.na=da(b)?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=lb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function yc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}I.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};I.prototype.getName=h("ta"); +I.prototype.toString=function(){var a="Kind Test: "+this.ta;null===this.na||(a+=L(this.na));return a};function zc(a){J.call(this,3);this.sa=a.substring(1,a.length-1)}p(zc,J);zc.prototype.evaluate=h("sa");zc.prototype.toString=function(){return"Literal: "+this.sa};function ac(a,b){this.o=a.toLowerCase();this.da=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}ac.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.o&&this.o!=a.nodeName.toLowerCase()?!1:this.da==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};ac.prototype.getName=h("o");ac.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.da?"":this.da+":")+this.o};function Ac(a){J.call(this,1);this.ua=a}p(Ac,J);Ac.prototype.evaluate=h("ua");Ac.prototype.toString=function(){return"Number: "+this.ua};function Bc(a,b){J.call(this,a.j);this.ka=a;this.N=b;this.t=a.h();this.l=a.l;if(1==this.N.length){var c=this.N[0];c.$||c.u!=Cc||(c=c.V,"*"!=c.getName()&&(this.M={name:c.getName(),H:null}))}}p(Bc,J);function Dc(){J.call(this,4)}p(Dc,J);Dc.prototype.evaluate=function(a){var b=new H;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Dc.prototype.toString=aa("Root Helper Expression");function Ec(){J.call(this,4)}p(Ec,J);Ec.prototype.evaluate=function(a){var b=new H;b.add(a.g);return b}; +Ec.prototype.toString=aa("Context Helper Expression"); +Bc.prototype.evaluate=function(a){var b=this.ka.evaluate(a);if(!(b instanceof H))throw Error("Filter expression must evaluate to nodeset.");a=this.N;for(var c=0,d=a.length;c<d&&b.r();c++){var e=a[c],f=jc(b,e.u.G),g;if(e.h()||e.u!=Fc)if(e.h()||e.u!=Gc)for(g=f.next(),b=e.evaluate(new Ob(g));null!=(g=f.next());)g=e.evaluate(new Ob(g)),b=gc(b,g);else g=f.next(),b=e.evaluate(new Ob(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ob(g))}}return b}; +Bc.prototype.toString=function(){var a;a="Path Expression:"+L(this.ka);if(this.N.length){var b=sa(this.N,function(a,b){return a+L(b)},"Steps:");a+=L(b)}return a};function Hc(a,b){this.e=a;this.G=!!b}function uc(a,b,c){for(c=c||0;c<a.e.length;c++)for(var d=a.e[c],e=jc(b),f=b.r(),g,k=0;g=e.next();k++){var q=a.G?f-k:k+1;g=d.evaluate(new Ob(g,q,f));if("number"==typeof g)q=q==g;else if("string"==typeof g||"boolean"==typeof g)q=!!g;else if(g instanceof H)q=0<g.r();else throw Error("Predicate.evaluate returned an unexpected type.");q||e.remove()}return b}Hc.prototype.w=function(){return 0<this.e.length?this.e[0].w():null}; +Hc.prototype.h=function(){for(var a=0;a<this.e.length;a++){var b=this.e[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Hc.prototype.r=function(){return this.e.length};Hc.prototype.toString=function(){return sa(this.e,function(a,b){return a+L(b)},"Predicates:")};function Ic(a,b,c,d){J.call(this,4);this.u=a;this.V=b;this.e=c||new Hc([]);this.$=!!d;b=this.e.w();a.Ka&&b&&(a=b.name,a=Pb?a.toLowerCase():a,this.M={name:a,H:b.H});this.t=this.e.h()}p(Ic,J); +Ic.prototype.evaluate=function(a){var b=a.g,c=null,c=this.w(),d=null,e=null,f=0;c&&(d=c.name,e=c.H?N(c.H,a):null,f=1);if(this.$)if(this.h()||this.u!=Jc)if(a=jc((new Ic(Kc,new I("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);null!=(b=a.next());)c=gc(c,this.q(b,d,e,f));else c=new H;else c=Yb(this.V,b,d,e),c=uc(this.e,c,f);else c=this.q(a.g,d,e,f);return c};Ic.prototype.q=function(a,b,c,d){a=this.u.P(this.V,a,b,c);return a=uc(this.e,a,d)}; +Ic.prototype.toString=function(){var a;a="Step:"+L("Operator: "+(this.$?"//":"/"));this.u.o&&(a+=L("Axis: "+this.u));a+=L(this.V);if(this.e.r()){var b=sa(this.e.e,function(a,b){return a+L(b)},"Predicates:");a+=L(b)}return a};function Lc(a,b,c,d){this.o=a;this.P=b;this.G=c;this.Ka=d}Lc.prototype.toString=h("o");var Mc={};function Q(a,b,c,d){if(Mc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Lc(a,b,c,!!d);return Mc[a]=b} +Q("ancestor",function(a,b){for(var c=new H,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new H,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Cc=Q("attribute",function(a,b){var c=new H,d=a.getName();if("style"==d&&b.style&&Pb)return c.add(new Rb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof I&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Pb?g.nodeValue&&c.add(Sb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Pb?g.nodeValue&&c.add(Sb(b,g,b.sourceIndex)):c.add(g));return c},!1),Jc=Q("child",function(a,b,c,d,e){return(Pb?dc:ec).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new H)}, +!1,!0);Q("descendant",Yb,!1,!0);var Kc=Q("descendant-or-self",function(a,b,c,d){var e=new H;Xb(b,c,d)&&a.matches(b)&&e.add(b);return Yb(a,b,c,d,e)},!1,!0),Fc=Q("following",function(a,b,c,d){var e=new H;do for(var f=b;f=f.nextSibling;)Xb(f,c,d)&&a.matches(f)&&e.add(f),e=Yb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new H,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new H},!1); +var Nc=Q("parent",function(a,b){var c=new H;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Gc=Q("preceding",function(a,b,c,d){var e=new H,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var q=[];for(b=f[g];b=b.previousSibling;)q.unshift(b);for(var x=0,y=q.length;x<y;x++)b=q[x],Xb(b,c,d)&&a.matches(b)&&e.add(b),e=Yb(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new H,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Oc=Q("self",function(a,b){var c=new H;a.matches(b)&&c.add(b);return c},!1);function Pc(a){J.call(this,1);this.ja=a;this.t=a.h();this.l=a.l}p(Pc,J);Pc.prototype.evaluate=function(a){return-M(this.ja,a)};Pc.prototype.toString=function(){return"Unary Expression: -"+L(this.ja)};function Qc(a){J.call(this,4);this.S=a;lc(this,ta(this.S,function(a){return a.h()}));mc(this,ta(this.S,function(a){return a.l}))}p(Qc,J);Qc.prototype.evaluate=function(a){var b=new H;r(this.S,function(c){c=c.evaluate(a);if(!(c instanceof H))throw Error("Path expression must evaluate to NodeSet.");b=gc(b,c)});return b};Qc.prototype.toString=function(){return sa(this.S,function(a,b){return a+L(b)},"Union Expression:")};function Rc(a,b){this.a=a;this.Fa=b}function Sc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Tc(a);var d=a.a.next();if(!d)break;var e=(d=sc[d]||null)&&d.pa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].pa;)b=new oc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new oc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Uc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Vc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Wc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new zc(a)}function Xc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new ac(b);var d=b.substring(0,c);a=a.Fa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new ac(b,a)} +function Yc(a){var b,c=[],d;if("/"==F(a.a)||"//"==F(a.a)){b=a.a.next();d=F(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Dc;d=new Dc;R(a,"Missing next location step.");b=Zc(a,b);c.push(b)}else{a:{b=F(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Sc(a);R(a,'unclosed "("');Uc(a,")");break;case '"':case "'":b=Wc(a);break;default:if(isNaN(+b))if(!yc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==F(a.a,1)){b=a.a.next();b=xc[b]||null;a.a.next();for(d=[];")"!=F(a.a);){R(a,"Missing function argument list.");d.push(Sc(a));if(","!=F(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Vc(a);b=new vc(b,d)}else{b=null;break a}else b=new Ac(+a.a.next())}"["==F(a.a)&&(d=new Hc($c(a)),b=new tc(b,d))}if(b)if("/"==F(a.a)||"//"==F(a.a))d=b;else return b;else b=Zc(a,"/"),d=new Ec,c.push(b)}for(;"/"==F(a.a)||"//"==F(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Zc(a,b),c.push(b); +return new Bc(d,c)} +function Zc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==F(a.a))return d=new Ic(Oc,new I("node")),a.a.next(),d;if(".."==F(a.a))return d=new Ic(Nc,new I("node")),a.a.next(),d;var f;if("@"==F(a.a))f=Cc,a.a.next(),R(a,"Missing attribute name");else if("::"==F(a.a,1)){if(!/(?![0-9])[\w]/.test(F(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Mc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=Jc; +c=F(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==F(a.a,1)){if(!yc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!yc(c))throw Error("Invalid type name: "+c);Uc(a,"(");R(a,"Bad nodetype");e=F(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Wc(a);R(a,"Bad nodetype");Vc(a);c=new I(c,g)}else c=Xc(a);else if("*"==c)c=Xc(a);else throw Error("Bad token: "+a.a.next());e=new Hc($c(a),f.G);return d||new Ic(f,c,e,"//"==b)} +function $c(a){for(var b=[];"["==F(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Sc(a);b.push(c);R(a,"Unclosed predicate expression.");Uc(a,"]")}return b}function Tc(a){if("-"==F(a.a))return a.a.next(),new Pc(Tc(a));var b=Yc(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Yc(a));a.a.back();a=new Qc(b)}return a};function ad(a){switch(a.nodeType){case 1:return ka(bd,a);case 9:return ad(a.documentElement);case 2:return a.ownerElement?ad(a.ownerElement):cd;case 11:case 10:case 6:case 12:return cd;default:return a.parentNode?ad(a.parentNode):cd}}function cd(){return null}function bd(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?bd(a.parentNode,b):null};function dd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Ub(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=aa(null);var d=Sc(new Rc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Ob(a));return new S(c,b)}} +function S(a,b){if(0==b)if(a instanceof H)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 H))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof H?ic(a):""+a;break;case 1:this.numberValue=a instanceof H?+ic(a):+a;break;case 3:this.booleanValue=a instanceof H?0<a.r():!!a;break;case 4:case 5:case 6:case 7:var d= +jc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Rb?e.g:e);this.snapshotLength=a.r();this.invalidIteratorState=!1;break;case 8:case 9:d=hc(a);this.singleNodeValue=d instanceof Rb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function ed(a){this.lookupNamespaceURI=ad(a)} +function fd(a){a=a||l;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new dd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new dd(a,b)},b.createNSResolver=function(a){return new ed(a)})};var T={};T.wa=function(){var a={Va:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.q=function(a,b,c){var d=E(a);(v||Lb)&&fd(D(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.wa;return v&&!ab(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!w||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +T.Z=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.Ja=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.Z(c,a);return c}; +T.Qa=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;u&&!da(e)&&T.Z(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();r(c,function(b){T.Z(b,a)});return c};function gd(a){return(a=a.exec(Na()))?a[1]:""}var hd=function(){if(Hb)return gd(/Firefox\/([0-9.]+)/);if(v||u)return Ua;if(Mb)return gd(/Chrome\/([0-9.]+)/);if(Nb)return gd(/Version\/([0-9.]+)/);if(Jb||Kb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Lb)return(a=gd(/Android\s+([0-9.]+)/))?a:gd(/Version\/([0-9.]+)/);if(Ib)return gd(/Camino\/([0-9.]+)/)}return""}();var id,jd;function U(a){return kd?id(a):v?0<=na(eb,a):ab(a)}function ld(a){return kd?jd(a):Lb?0<=na(md,a):0<=na(hd,a)} +var kd=function(){if(!w)return!1;var a=l.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;id=function(a){return 0<=d.ya(e,""+a)};jd=function(a){return 0<=d.ya(f,""+a)};return!0}(),nd;if(Lb){var od=/Android\s+([0-9\.]+)/.exec(Na());nd=od?od[1]:"0"}else nd="0"; +var md=nd,pd=v&&!B(8),qd=B(9),rd=v&&!B(9),sd=B(10),td=v&&!B(10);Lb&&ld(2.3);Lb&&ld(4);Nb&&ld(6);var ud=v&&-1!=Na().indexOf("IEMobile");function vd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}vd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};vd.prototype.contains=function(a){return this&&a?a instanceof vd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +vd.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};vd.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +vd.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}V.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};V.prototype.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +V.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};V.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +V.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function wd(a,b){var c=E(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function xd(a){a=a?E(a):document;var b;(b=!v)||(b=B(9))||(b=a?new xb(E(a)):gb||(gb=new xb),b=nb(b.C));return b?a.documentElement:a.body} +function yd(a){var b=a.offsetWidth,c=a.offsetHeight,d=A&&!b&&!c;if((!da(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}v&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new hb(e.right-e.left,e.bottom-e.top)}return new hb(b,c)}var zd={thin:2,medium:4,thick:6}; +function Ad(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in zd)d=zd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Bd(a){var b;a:{a=E(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return v&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Cd(a){return Dd(a,!0)&&Ed(a)&&!(v||u||w&&!U("1.9.2")?0:"none"==X(a,"pointer-events"))}function Fd(a){return W(a,"OPTION")?!0:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Gd(a){if(!Fd(a))throw new t(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Hd(a,b)}function Hd(a,b){var c;if(c=pd)if(c="value"==b)if(c=W(a,"OPTION"))c=null===Id(a);c?(c=[],vb(a,c,!1),c=c.join("")):c=a[b];return c}var Jd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Kd(a){var b=[];r(a.split(Jd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return u?b.replace(/\w+:;/g,""):b}function Id(a){var b;b="value";return"style"==b?Kd(a.style.cssText):pd&&"value"==b&&W(a,"INPUT")?a.value:rd&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Ld="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Ed(a){var b=a.tagName.toUpperCase();return wa(Ld,b)?Hd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Ed(a.parentNode):!wb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Hd(b,"disabled")){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:ob(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function Md(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=rd?"styleFloat":"cssFloat";var d=wd(a,c)||Nd(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Nd(a,b){var c=a.currentStyle||a.style,d=c[b];!da(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?da(d)?d:null:(c=Md(a))?Nd(c,b):null} +function Dd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=Md(a);return!a||c(a)}function d(a){var b=Od(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==lb||W(a)&&d(a)})}function e(a){return Pd(a)==Qd&&ua(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +wb(a,function(a){return W(a,"SELECT")});return!!f&&Dd(f,!0)}return(f=Rd(a))?!!f.la&&0<f.rect.width&&0<f.rect.height&&Dd(f.la,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Sd(a)||!d(a)?!1:!e(a)}var Qd="hidden"; +function Pd(a,b){function c(a){var b=X(a,"position");if("fixed"==b)return y=!0,a==k?null:k;for(a=Md(a);a&&a!=k&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=Md(a);return a}function d(a){var b=a;if("visible"==x)if(a==k&&q)b=q;else if(a==q)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new xb(g)).C;a=!A&&nb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=v&&ab("10")&&b.pageYOffset!=a.scrollTop?new C(a.scrollLeft,a.scrollTop):new C(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new C(a.scrollLeft,a.scrollTop);return a}for(var f=Td(a,b),g=E(a),k=g.documentElement,q=g.body,x=X(k,"overflow"),y,s=c(a);s;s=c(s)){var n=d(s);if("visible"!=n.x||"visible"!=n.y){var z=Od(s);if(0==z.width||0==z.height)return Qd;var K=f.right<z.left,ba=f.bottom<z.top;if(K&&"hidden"==n.x||ba&&"hidden"== +n.y)return Qd;if(K&&"visible"!=n.x||ba&&"visible"!=n.y){K=e(s);ba=f.bottom<z.top-K.y;if(f.right<z.left-K.x&&"visible"!=n.x||ba&&"visible"!=n.x)return Qd;f=Pd(s);return f==Qd?Qd:"scroll"}K=f.left>=z.left+z.width;z=f.top>=z.top+z.height;if(K&&"hidden"==n.x||z&&"hidden"==n.y)return Qd;if(K&&"visible"!=n.x||z&&"visible"!=n.y){if(y&&(n=e(s),f.left>=k.scrollWidth-n.x||f.right>=k.scrollHeight-n.y))return Qd;f=Pd(s);return f==Qd?Qd:"scroll"}}}return"none"}var Ud=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Od(a){function b(a){var c=D(E(a)).getComputedStyle(a,null).MozTransform.match(Ud);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),y=parseFloat(c[3]),s=parseFloat(c[4]),n=parseFloat(c[5]),c=parseFloat(c[6]),z=f.left+f.width,K=f.top+f.height,ba=f.left*d,d=z*d,bb=f.left*e,e=z*e,cb=f.top*y,y=K*y,db=f.top*s,z=K*s,K=ba+cb+n,s=bb+db+c,cb=d+cb+n,db=e+db+c,ba=ba+y+n,bb=bb+z+c,n=d+y+n,c=e+z+c;f.left=Math.min(K,cb,ba,n);f.top=Math.min(s,db,bb,c);n=Math.max(K,cb,ba,n);c=Math.max(s,db,bb,c);f.width=n- +f.left;f.height=c-f.top}(a=Md(a))&&b(a)}var c=Rd(a);if(c)return c.rect;if(W(a,"HTML"))return c=E(a),a=mb(D(c)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);v&&a.ownerDocument.body&&(c=E(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));w&&!U(12)&&b(a);return f} +function Rd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.Ja('/descendant::*[@usemap = "#'+c.name+'"]',E(c)))&&(e=Od(d),!b&&"default"!=a.shape.toLowerCase())){var f=Vd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{la:d,rect:e||new V(0,0,0,0)}} +function Vd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)} +function Td(a,b){var c;c=Od(a);c=new vd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof V?b:new V(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Sd(a){if(td){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Wd(a)}function Wd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Md(a))&&(b*=Wd(a));return b};function Xd(a,b){this.d=ma.document.documentElement;this.m=null;var c=Bd(this.d);c&&Yd(this,c);this.R=a||new Zd;this.ia=b||new $d}Xd.prototype.v=h("d");function Yd(a,b){a.d=b;a.m=W(b,"OPTION")?wb(b,function(a){return W(a,"SELECT")}):null} +Xd.prototype.O=function(a,b,c,d,e,f,g){if(!f&&!Cd(this.d))return!1;if(d&&ae!=a&&be!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:0!=(this.R.T&4),ctrlKey:0!=(this.R.T&2),shiftKey:0!=(this.R.T&1),metaKey:0!=(this.R.T&8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=ce&&a!=de&&g in ee?c=ee[g]:this.m&&(c=fe(this,a));return c?this.ia.O(c,a,b):!0}; +Xd.prototype.J=function(a,b,c,d,e,f,g,k){if(!k&&!Cd(this.d))return!1;if(g&&ge!=a&&he!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ia:0,rotation:0,pointerId:d,La:0,Ma:0,pointerType:e,Aa:f};c=this.m?fe(this,a):this.d;ee[d]&&(c=ee[d]);d=D(E(this.d));var q;d&&a==ie&&(q=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){ee[a]= +this});a=c?this.ia.J(c,a,b):!0;q&&(d.Element.prototype.msSetPointerCapture=q);return a};function fe(a,b){if(v)switch(b){case ae:case ge:return null;case je:case ke:case le:return a.m.multiple?a.m:null;default:return a.m}if(u)switch(b){case je:case ae:return a.m.multiple?a.d:null;default:return a.d}if(A)switch(b){case ce:case me:return a.m.multiple?a.d:a.m;default:return a.m.multiple?a.d:null}return a.d}var ne=A||u||kd&&ld(3.6); +function oe(a){if(ne||!a.href)return!1;if(!kd)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=D(E(a)),c=b.location.href;a=pe(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var qe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function pe(a,b){var c=b.match(qe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function Zd(){this.T=0}var ee={};function $d(){}$d.prototype.O=function(a,b,c){return re(a,b,c)};$d.prototype.J=function(a,b,c){return re(a,b,c)};v&&U(10);Lb&&ld(4);var se=v&&ma.navigator.msPointerEnabled;function te(a,b,c){this.f=a;this.X=b;this.Y=c}te.prototype.create=function(a){a=E(a);rd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.X,this.Y));return a};te.prototype.toString=h("f");function Y(a,b,c){te.call(this,a,b,c)}p(Y,te); +Y.prototype.create=function(a,b){if(!w&&this==ue)throw new t(9,"Browser does not support a mouse pixel scroll event.");var c=E(a),d;if(rd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==be||this==ae)if(Object.defineProperty){var e=this==be;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==ve&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=D(c);d=c.createEvent("MouseEvents");var f=1;this==ve&&(w||(d.wheelDelta=b.wheelDelta),w||u)&&(f=b.wheelDelta/-40);w&&this==ue&&(f=b.wheelDelta);d.initMouseEvent(this.f,this.X,this.Y,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(v&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=yb(a?new xb(E(a)):gb||(gb=new xb)), +c=xd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function we(a,b,c){te.call(this,a,b,c)}p(we,te); +we.prototype.create=function(a,b){if(!se)throw new t(9,"Browser does not support MSPointer events.");var c=E(a),d=D(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.f,this.X,this.Y,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ia,b.rotation,b.La,b.Ma,b.pointerId,b.pointerType,0,b.Aa);return c}; +var xe=new te("change",!0,!1),ye=new te("focus",!1,!1),ce=new Y("click",!0,!0),je=new Y("contextmenu",!0,!0),ze=new Y("dblclick",!0,!0),de=new Y("mousedown",!0,!0),ke=new Y("mousemove",!0,!1),be=new Y("mouseout",!0,!0),ae=new Y("mouseover",!0,!0),me=new Y("mouseup",!0,!0),ve=new Y(w?"DOMMouseScroll":"mousewheel",!0,!0),ue=new Y("MozMousePixelScroll",!0,!0),Ae=new we("MSGotPointerCapture",!0,!1),Be=new we("MSLostPointerCapture",!0,!1),ie=new we("MSPointerDown",!0,!0),le=new we("MSPointerMove",!0,!0), +ge=new we("MSPointerOver",!0,!0),he=new we("MSPointerOut",!0,!0),Ce=new we("MSPointerUp",!0,!0);function re(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return rd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function De(a,b){this.A={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De)for(d=Ee(a),Fe(a),e=[],c=0;c<a.i.length;c++)e.push(a.A[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.I=0;De.prototype.va=0;function Ee(a){Fe(a);return a.i.concat()} +De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.A,a)?(delete this.A[a],this.I--,this.va++,this.i.length>2*this.I&&Fe(this),!0):!1};function Fe(a){if(a.I!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.A,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.I!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.A,a)?this.A[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.A,a)||(this.I++,this.i.push(a),this.va++);this.A[a]=b};var Ge={};function Z(a,b,c){ga(a)&&(a=w?a.b:u?a.opera:a.c);a=new He(a,b,c);!b||b in Ge&&!c||(Ge[b]={key:a,shift:!1},c&&(Ge[c]={key:a,shift:!0}));return a}function He(a,b,c){this.code=a;this.xa=b||null;this.Ta=c||this.xa}Z(8);Z(9);Z(13);var Ie=Z(16),Je=Z(17),Ke=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Le=Z(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Sa?56:42},"*"); +Z({b:107,c:107,opera:Sa?61:43},"+");Z({b:109,c:109,opera:Sa?109:45},"-");Z({b:110,c:110,opera:Sa?190:78},".");Z({b:111,c:111,opera:Sa?191:47},"/");Z(Sa&&u?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Me=new De; +Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke);Me.set(8,Le);(function(a){var b=new De;r(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);w&&U(12);function Ne(a,b,c){Xd.call(this,b,c);this.D=this.n=null;this.B=new C(0,0);this.aa=this.L=!1;if(a){this.n=a.Na;try{W(a.za)&&(this.D=a.za)}catch(d){this.n=null}this.B=a.Oa;this.L=a.Ra;this.aa=a.Pa;try{W(a.element)&&Yd(this,a.element)}catch(e){this.n=null}}}p(Ne,Xd);var $={}; +rd?($[ce]=[0,0,0,null],$[je]=[null,null,0,null],$[me]=[1,4,2,null],$[be]=[0,0,0,0],$[ke]=[1,4,2,0]):A||qd?($[ce]=[0,1,2,null],$[je]=[null,null,2,null],$[me]=[0,1,2,null],$[be]=[0,1,2,0],$[ke]=[0,1,2,0]):($[ce]=[0,1,2,null],$[je]=[null,null,2,null],$[me]=[0,1,2,null],$[be]=[0,0,0,0],$[ke]=[0,0,0,0]);sd&&($[ie]=$[me],$[Ce]=$[me],$[le]=[-1,-1,-1,-1],$[he]=$[le],$[ge]=$[le]);$[ze]=$[ce];$[de]=$[me];$[ae]=$[be];var Oe={};Oe[de]=ie;Oe[ke]=le;Oe[be]=he;Oe[ae]=ge;Oe[me]=Ce; +function Pe(a){if(null!==a.n)throw new t(13,"Cannot press more then one button or an already pressed button.");a.n=0;a.D=a.v();var b;var c=w&&!ld(4);if((A||c)&&(W(a.v(),"OPTION")||W(a.v(),"SELECT")))b=!0;else{(c=w||v)&&(b=Bd(a.v()));var d=Qe(a,de);b=d&&c&&b!=Bd(a.v())?!1:d}if(b&&(sd&&(0==a.n&&W(a.D,"OPTION"))&&a.J(Ae,a.B,0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0),a=a.m||a.d,b=Bd(a),a!=b)){if(b&&(fa(b.blur)||v&&ga(b.blur))){if(!W(b,"BODY"))try{b.blur()}catch(e){if(!v||"Unspecified error."!=e.message)throw e; +}v&&!U(8)&&D(E(a)).focus()}if(fa(a.focus)||v&&ga(a.focus))u&&U(11)&&!Dd(a)?re(a,ye):a.focus()}} +function Re(a){if(null===a.n)throw new t(13,"Cannot release a button when no button is pressed.");if(a.m&&Cd(a.d)){var b=a.m,c=Gd(a.d);if(!c||b.multiple)a.d.selected=!c,(!A||!b.multiple||Mb&&ld(28)||Lb&&ld(4))&&re(b,xe)}Qe(a,me);if(0==a.n&&a.v()==a.D){if(!ud||!W(a.D,"OPTION"))if(b=a.B,c=Se(a,ce),Cd(a.d)){var d=null,e=null;if(!ne)for(var f=a.d;f;f=f.parentNode)if(W(f,"A")){d=f;break}else{var g;a:{if(W(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=!0;break a}if(W(f,"BUTTON")&&(g=f.type.toLowerCase(), +"submit"==g)){g=!0;break a}g=!1}if(g){e=f;break}}g=(f=!a.m&&Fd(a.d))&&Gd(a.d);v&&e?e.click():a.O(ce,b,c,null,0,!1,void 0)&&(d&&oe(d)?(b=d,c=b.href,d=D(E(b)),v&&!U(8)&&(c=pe(d.location,c)),b.target?d.open(c,b.target):d.location.href=c):!f||(w||A||g&&"radio"==a.d.type.toLowerCase())||(a.d.checked=!g,u&&!U(11)&&re(a.d,xe)))}a.L&&Qe(a,ze);a.L=!a.L;sd&&(0==a.n&&W(a.D,"OPTION"))&&a.J(Be,new C(0,0),0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!1)}else 2==a.n&&Qe(a,je);ee={};a.n=null;a.D=null} +Ne.prototype.move=function(a,b){var c=Cd(a),d=Od(a);this.B.x=b.x+d.left;this.B.y=b.y+d.top;d=this.v();if(a!=d){try{D(E(d)).closed&&(d=null)}catch(e){d=null}if(d){var f=d===ma.document.documentElement||d===ma.document.body,d=!this.aa&&f?null:d;Qe(this,be,a)}Yd(this,a);v||Qe(this,ae,d,null,c)}Qe(this,ke,null,null,c);v&&a!=d&&Qe(this,ae,d,null,c);this.L=!1}; +function Qe(a,b,c,d,e){a.aa=!0;if(sd){var f=Oe[b];if(f&&!a.J(f,a.B,Se(a,f),1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0,c,e))return!1}return a.O(b,a.B,Se(a,b),c,d,e)}function Se(a,b){if(!(b in $))return 0;var c=$[b][null===a.n?3:a.n];if(null===c)throw new t(13,"Event does not permit the specified mouse button.");return c};function Te(a,b){this.x=a;this.y=b}p(Te,C);Te.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Ue(a,b,c){if(!Dd(a,!0))throw new t(11,"Element is not currently visible and may not be manipulated");b:{var d=b||void 0;if("scroll"==Pd(a,d)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Pd(a,d)))break b;for(var e=Td(a,d),f=Md(a);f;f=Md(f)){var g=f,k=Od(g),q;var x=g;if(v&&!B(9)){var y=Ad(x,"borderLeft");q=Ad(x,"borderRight");var s=Ad(x,"borderTop"),x=Ad(x,"borderBottom");q=new vd(s,q,x,y)}else y=wd(x,"borderLeftWidth"),q=wd(x,"borderRightWidth"),s=wd(x,"borderTopWidth"),x=wd(x,"borderBottomWidth"), +q=new vd(parseFloat(s),parseFloat(q),parseFloat(x),parseFloat(y));y=e.left-k.left-q.left;k=e.top-k.top-q.top;q=g.clientHeight+e.top-e.bottom;g.scrollLeft+=Math.min(y,Math.max(y-(g.clientWidth+e.left-e.right),0));g.scrollTop+=Math.min(k,Math.max(k-q,0))}Pd(a,d)}}b?b=new Te(b.x,b.y):(b=Ve(a),b=new Te(b.width/2,b.height/2));c=c||new Ne;c.move(a,b);Pe(c);Re(c);Pe(c);Re(c)} +function Ve(a){var b;if("none"!=(wd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=yd(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=yd(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:Ve(a.offsetParent)};function We(){this.U=void 0} +function Xe(a,b,c){switch(typeof b){case "string":Ye(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Xe(a,a.U?a.U.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Ye(f,c),c.push(":"),Xe(a,a.U?a.U.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ze={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},$e=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ye(a,b){b.push('"',a.replace($e,function(a){if(a in Ze)return Ze[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ze[a]=e+b.toString(16)}),'"')};A||u||w&&U(3.5)||v&&U(8);function af(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,af);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=bf(a);return b}if("document"in a)return b={},b.WINDOW=bf(a),b;if(ea(a))return ra(a,af);a=ib(a,function(a,b){return"number"==typeof b||m(b)});return jb(a,af);default:return null}} +function cf(a,b){return"array"==ca(a)?ra(a,function(a){return cf(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?df(a.ELEMENT,b):"WINDOW"in a?df(a.WINDOW,b):jb(a,function(a){return cf(a,b)}):a}function ef(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ea=la());b.ea||(b.ea=la());return b}function bf(a){var b=ef(a.ownerDocument),c=kb(b,function(b){return b==a});c||(c=":wdc:"+b.ea++,b[c]=a);return c} +function df(a,b){a=decodeURIComponent(a);var c=b||document,d=ef(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function ff(a,b){var c=[a,b],d=Ue,e;try{var d=m(d)?new ma.Function(d):ma==window?d:new ma.Function("return ("+d+").apply(null,arguments);"),f=cf(c,ma.document),g=d.apply(null,f);e={status:0,value:af(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];Xe(new We,e,c);return c.join("")}var gf=["_"],hf=l;gf[0]in hf||!hf.execScript||hf.execScript("var "+gf[0]);for(var jf;gf.length&&(jf=gf.shift());)gf.length||void 0===ff?hf=hf[jf]?hf[jf]:hf[jf]={}:hf[jf]=ff;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/drag.js b/src/ghostdriver/third_party/webdriver-atoms/drag.js index 944602a7a..32233cf37 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/drag.js +++ b/src/ghostdriver/third_party/webdriver-atoms/drag.js @@ -1,113 +1,121 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function p(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var n=this; 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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return a!==k}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function s(a){return"string"==typeof a}function ea(a){return"function"==ba(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function t(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ha=window;function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var q=d[g]||"",x=e[g]||"",F=RegExp("(\\d*)(\\D*)","g"),W=RegExp("(\\d*)(\\D*)","g");do{var N=F.exec(q)||["","",""],u=W.exec(x)||["","",""];if(0==N[0].length&&0==u[0].length)break;c=((0==N[1].length?0:parseInt(N[1],10))<(0==u[1].length?0:parseInt(u[1],10))?-1:(0==N[1].length?0:parseInt(N[1],10))>(0==u[1].length? -0:parseInt(u[1],10))?1:0)||((0==N[2].length)<(0==u[2].length)?-1:(0==N[2].length)>(0==u[2].length)?1:0)||(N[2]<u[2]?-1:N[2]>u[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function v(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=s(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var q=f[g];b.call(k,q,g,a)&&(d[e++]=q)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=s(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function oa(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function pa(a,b){var c;a:{c=a.length;for(var d=s(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:s(a)?a.charAt(c):a[c]}function qa(a,b){var c;a:if(s(a))c=!s(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ra(a){return ka.concat.apply(ka,arguments)} -function sa(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ta={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return void 0!==a}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ea(a){return"function"==ba(a)}function fa(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ga(a,b,c){return a.call.apply(a.bind,arguments)} +function ha(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)}}function ia(a,b,c){ia=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ga:ha;return ia.apply(null,arguments)} +function ja(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ka=Date.now||function(){return+new Date};function r(a,b){function c(){}c.prototype=b.prototype;a.Ua=b.prototype;a.prototype=new c};var la=window;function ma(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",t=e[g]||"",z=RegExp("(\\d*)(\\D*)","g"),A=RegExp("(\\d*)(\\D*)","g");do{var q=z.exec(k)||["","",""],l=A.exec(t)||["","",""];if(0==q[0].length&&0==l[0].length)break;c=((0==q[1].length?0:parseInt(q[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==q[1].length?0:parseInt(q[1],10))>(0==l[1].length? +0:parseInt(l[1],10))?1:0)||((0==q[2].length)<(0==l[2].length)?-1:(0==q[2].length)>(0==l[2].length)?1:0)||(q[2]<l[2]?-1:q[2]>l[2]?1:0)}while(0==c)}return c}function na(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var oa=Array.prototype;function s(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function pa(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function qa(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;s(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=p(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 ua(a,b){for(var c=a.length,d=p(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 va(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return oa.concat.apply(oa,arguments)}function ya(a,b,c){return 2>=arguments.length?oa.slice.call(a,b):oa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ua="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function wa(a){xa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(va,"#$1$1$2$2$3$3"));return a.toLowerCase()}var xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a){var b=a.match(Aa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function w(a,b){this.code=a;this.state=Ca[a]||Da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}t(w,Error); -var Da="unknown error",Ca={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ca[13]=Da;Ca[9]="unknown command";w.prototype.toString=function(){return this.name+": "+this.message};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return r.navigator?r.navigator.userAgent:m}Ha=Ga=Fa=Ea=n;var La;if(La=Ka()){var Ma=r.navigator;Ea=0==La.indexOf("Opera");Fa=!Ea&&-1!=La.indexOf("MSIE");Ga=!Ea&&-1!=La.indexOf("WebKit");Ha=!Ea&&!Ga&&"Gecko"==Ma.product}var y=Ea,z=Fa,A=Ha,B=Ga,Na,Oa=r.navigator;Na=Oa&&Oa.platform||"";Ia=-1!=Na.indexOf("Mac");Ja=-1!=Na.indexOf("Win");var Pa=-1!=Na.indexOf("Linux");function Qa(){var a=r.document;return a?a.documentMode:k}var Ra; -a:{var Sa="",Ta;if(y&&r.opera)var Ua=r.opera.version,Sa="function"==typeof Ua?Ua():Ua;else if(A?Ta=/rv\:([^\);]+)(\)|;)/:z?Ta=/MSIE\s+([^\);]+)(\)|;)/:B&&(Ta=/WebKit\/(\S+)/),Ta)var Va=Ta.exec(Ka()),Sa=Va?Va[1]:"";if(z){var Wa=Qa();if(Wa>parseFloat(Sa)){Ra=String(Wa);break a}}Ra=Sa}var Xa={};function Ya(a){return Xa[a]||(Xa[a]=0<=ia(Ra,a))}function C(a){return z&&Za>=a}var $a=r.document,Za=!$a||!z?k:Qa()||("CSS1Compat"==$a.compatMode?parseInt(Ra,10):5);var ab;!A&&!z||z&&C(9)||A&&Ya("1.9.1");z&&Ya("9");var bb=z||y||B;function D(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0}D.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function db(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function eb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function fb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var gb=3;function hb(a){return a?new ib(E(a)):ab||(ab=new ib)}function jb(a){var b=!B&&kb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new D(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function lb(a){return a?a.parentWindow||a.defaultView:window}function kb(a){return"CSS1Compat"==a.compatMode}function mb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function nb(a){if(bb)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function u(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}r(u,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";u.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return n.navigator?n.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=n.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var w=Ha,x=Ia,y=Ka,B=Ja,Qa,Ra=n.navigator;Qa=Ra&&Ra.platform||"";La=-1!=Qa.indexOf("Mac");Ma=-1!=Qa.indexOf("Win");var Sa=-1!=Qa.indexOf("Linux");function Ta(){var a=n.document;return a?a.documentMode:void 0}var Ua; +a:{var Va="",Wa;if(w&&n.opera)var Xa=n.opera.version,Va="function"==typeof Xa?Xa():Xa;else if(y?Wa=/rv\:([^\);]+)(\)|;)/:x?Wa=/MSIE\s+([^\);]+)(\)|;)/:B&&(Wa=/WebKit\/(\S+)/),Wa)var Ya=Wa.exec(Na()),Va=Ya?Ya[1]:"";if(x){var Za=Ta();if(Za>parseFloat(Va)){Ua=String(Za);break a}}Ua=Va}var $a={};function ab(a){return $a[a]||($a[a]=0<=ma(Ua,a))}function C(a){return x&&bb>=a}var eb=n.document,bb=eb&&x?Ta()||("CSS1Compat"==eb.compatMode?parseInt(Ua,10):5):void 0;var fb;!y&&!x||x&&C(9)||y&&ab("1.9.1");x&&ab("9");function D(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0}D.prototype.toString=function(){return"("+this.x+", "+this.y+")"};D.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};D.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};D.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function gb(a,b){this.width=a;this.height=b}gb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};gb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};gb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};gb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function hb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ib(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function jb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var kb=3;function lb(a){a=a.document;a=mb(a)?a.documentElement:a.body;return new gb(a.clientWidth,a.clientHeight)}function F(a){return a?a.parentWindow||a.defaultView:window}function mb(a){return"CSS1Compat"==a.compatMode}function nb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(z&&!C(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=E(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function E(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){var c=[];return tb(a,b,c,l)?c[0]:k} -function tb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tb(a,b,c,d))return l;a=a.nextSibling}return n}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==gb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling} -function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function ib(a){this.A=a||r.document||document}ib.prototype.v=function(a){return s(a)?this.A.getElementById(a):a};function yb(a){return!B&&kb(a.A)?a.A.documentElement:a.A.body}ib.prototype.contains=ob;var zb,Ab,Bb,Cb,Db,Eb,Fb;Fb=Eb=Db=Cb=Bb=Ab=zb=n;var Gb=Ka();Gb&&(-1!=Gb.indexOf("Firefox")?zb=l:-1!=Gb.indexOf("Camino")?Ab=l:-1!=Gb.indexOf("iPhone")||-1!=Gb.indexOf("iPod")?Bb=l:-1!=Gb.indexOf("iPad")?Cb=l:-1!=Gb.indexOf("Android")?Db=l:-1!=Gb.indexOf("Chrome")?Eb=l:-1!=Gb.indexOf("Safari")&&(Fb=l));var Hb=zb,Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb;function Ob(a,b,c){this.g=a;this.Ba=b||1;this.p=c||1};var Pb=z&&!C(9),Qb=z&&!C(8);function Rb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Sb(a,b,c){var d=Qb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Rb(b,a,b.nodeName,d,c)};function Tb(a){this.ca=a;this.N=0}function Ub(a){a=a.match(Vb);for(var b=0;b<a.length;b++)Wb.test(a[b])&&a.splice(b,1);return new Tb(a)}var Vb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Wb=/^\s/;function G(a,b){return a.ca[a.N+(b||0)]}Tb.prototype.next=function(){return this.ca[this.N++]};Tb.prototype.back=function(){this.N--};Tb.prototype.empty=function(){return this.ca.length<=this.N};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Pb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Pb&&"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} -function Xb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Qb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Yb(a,b,c,d,e){return(Pb?Zb:$b).call(m,a,b,s(c)?c:m,s(d)?d:m,e||new I)} -function Zb(a,b,c,d,e){if(a instanceof ac||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=bc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],q=0;b=f[q++];)Xb(b,c,d)&&g.push(b);f=g}for(q=0;b=f[q++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}cc(a,b,c,d,e);return e} -function $b(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!z?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof J?cc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Xb(a,c,d)&&e.add(a)}));return e} -function dc(a,b,c,d,e){var f;if((a instanceof ac||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=bc(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return Xb(a,c,d)}));v(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return ec(a,b,c,d,e)}function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function cc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b),cc(a,b,c,d,e)}function bc(a){if(a instanceof J){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.H=0}function fc(a){this.r=a;this.next=this.B=m}function gc(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Rb&&d.r instanceof Rb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<pb(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.H=g;return a} -I.prototype.unshift=function(a){a=new fc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.H++};I.prototype.add=function(a){a=new fc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.H++};function hc(a){return(a=a.k)?a.r:m}I.prototype.s=p("H");function ic(a){return(a=hc(a))?H(a):""}function jc(a,b){return new kc(a,!!b)}function kc(a,b){this.ya=a;this.da=(this.D=b)?a.p:a.k;this.Z=m} -kc.prototype.next=function(){var a=this.da;if(a==m)return m;var b=this.Z=a;this.da=this.D?a.B:a.next;return b.r};kc.prototype.remove=function(){var a=this.ya,b=this.Z;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.H--;this.Z=m};function K(a){this.j=a;this.l=this.t=n;this.J=m}K.prototype.h=p("t");function lc(a,b){a.t=b}function mc(a,b){a.l=b}K.prototype.w=p("J");function L(a,b){var c=a.evaluate(b);return c instanceof I?+ic(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof I?ic(c):""+c}function nc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function oc(a,b,c){K.call(this,a.j);this.ba=a;this.ha=b;this.ma=c;this.t=b.h()||c.h();this.l=b.l||c.l;this.ba==pc&&(!c.l&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.J={name:b.w().name,F:c}:!b.l&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.J={name:c.w().name,F:b}))}t(oc,K); -function qc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=jc(b);for(b=f.next();b;b=f.next()){e=jc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=jc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}oc.prototype.evaluate=function(a){return this.ba.q(this.ha,this.ma,a)};oc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.ba+"\n";a+=" ";b+=this.ha.toString(a)+"\n";return b+=this.ma.toString(a)};function rc(a,b,c,d){this.Aa=a;this.ka=b;this.j=c;this.q=d}rc.prototype.toString=p("Aa");var sc={}; -function O(a,b,c,d){a in sc&&h(Error("Binary operator already created: "+a));a=new rc(a,b,c,d);return sc[a.toString()]=a}O("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});O("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});O("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});O("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});O("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});O("<",4,2,function(a,b,c){return qc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return qc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return qc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return qc(function(a,b){return a>=b},a,b,c)});var pc=O("=",3,2,function(a,b,c){return qc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return qc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return nc(a,c)&&nc(b,c)});O("or",1,2,function(a,b,c){return nc(a,c)||nc(b,c)});function tc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));K.call(this,a.j);this.la=a;this.e=b;this.t=a.h();this.l=a.l}t(tc,K);tc.prototype.evaluate=function(a){a=this.la.evaluate(a);return uc(this.e,a)};tc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.la.toString(a);return b+=this.e.toString(a)};function vc(a,b){b.length<a.ja&&h(Error("Function "+a.n+" expects at least"+a.ja+" arguments, "+b.length+" given"));a.$!==m&&b.length>a.$&&h(Error("Function "+a.n+" expects at most "+a.$+" arguments, "+b.length+" given"));a.za&&v(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.n+" is not of type Nodeset: "+b))});K.call(this,a.j);this.M=a;this.T=b;lc(this,a.t||oa(b,function(a){return a.h()}));mc(this,a.xa&&!b.length||a.wa&&!!b.length||oa(b,function(a){return a.l}))}t(vc,K); -vc.prototype.evaluate=function(a){return this.M.q.apply(m,ra(a,this.T))};vc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.M+"\n";b+=" ";this.T.length&&(a+=b+"Arguments:",b+=" ",a=na(this.T,function(a,d){return a+"\n"+d.toString(b)},a));return a};function wc(a,b,c,d,e,f,g,q,x){this.n=a;this.j=b;this.t=c;this.xa=d;this.wa=e;this.q=f;this.ja=g;this.$=ca(q)?q:g;this.za=!!x}wc.prototype.toString=p("n");var xc={}; -function P(a,b,c,d,e,f,g,q){a in xc&&h(Error("Function already created: "+a+"."));xc[a]=new wc(a,b,c,d,n,e,f,g,q)}P("boolean",2,n,n,function(a,b){return nc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(L(b,a))},1);P("concat",3,n,n,function(a,b){var c=sa(arguments,1);return na(c,function(b,c){return b+M(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(L(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Pb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return pa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!qa(f,a)&&f.push(a)});f.sort(pb);var g=new I;v(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);P("local-name",3,n,l,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?M(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!nc(b,a)},1);P("number",1,n,l,function(a,b){return b?L(b,a):+H(a.g)},0,1);P("position",1,l,n,function(a){return a.Ba},0);P("round",1,n,n,function(a,b){return Math.round(L(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?M(b,a):H(a.g)},0,1);P("string-length",1,n,l,function(a,b){return(b?M(b,a):H(a.g)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=jc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(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);P("true",2,n,n,aa(l),0);function J(a,b){this.oa=a;this.ia=ca(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=gb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function yc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}J.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};J.prototype.getName=p("oa"); -J.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.oa;this.ia===m||(b+="\n"+this.ia.toString(a+" "));return b};function zc(a){K.call(this,3);this.na=a.substring(1,a.length-1)}t(zc,K);zc.prototype.evaluate=p("na");zc.prototype.toString=function(a){return(a||"")+"literal: "+this.na};function ac(a){this.n=a.toLowerCase()}ac.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.n||this.n==a.nodeName.toLowerCase()?l:this.n==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};ac.prototype.getName=p("n");ac.prototype.toString=function(a){return(a||"")+"nametest: "+this.n};function Ac(a){K.call(this,1);this.pa=a}t(Ac,K);Ac.prototype.evaluate=p("pa");Ac.prototype.toString=function(a){return(a||"")+"number: "+this.pa};function Bc(a,b){K.call(this,a.j);this.fa=a;this.K=b;this.t=a.h();this.l=a.l;if(1==this.K.length){var c=this.K[0];!c.X&&c.u==Cc&&(c=c.S,"*"!=c.getName()&&(this.J={name:c.getName(),F:m}))}}t(Bc,K);function Dc(){K.call(this,4)}t(Dc,K);Dc.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Dc.prototype.toString=function(a){return a+"RootHelperExpr"};function Ec(){K.call(this,4)}t(Ec,K);Ec.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Ec.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Bc.prototype.evaluate=function(a){var b=this.fa.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.K;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=jc(b,e.u.D),g;if(!e.h()&&e.u==Fc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ob(g))}else if(!e.h()&&e.u==Gc)g=f.next(),b=e.evaluate(new Ob(g));else{g=f.next();for(b=e.evaluate(new Ob(g));(g=f.next())!=m;)g=e.evaluate(new Ob(g)),b=gc(b,g)}}return b}; -Bc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.fa.toString(b);this.K.length&&(c+=b+"Steps:\n",b+=" ",v(this.K,function(a){c+=a.toString(b)}));return c};function Hc(a,b){this.e=a;this.D=!!b}function uc(a,b,c){for(c=c||0;c<a.e.length;c++)for(var d=a.e[c],e=jc(b),f=b.s(),g,q=0;g=e.next();q++){var x=a.D?f-q:q+1;g=d.evaluate(new Ob(g,x,f));var F;"number"==typeof g?F=x==g:"string"==typeof g||"boolean"==typeof g?F=!!g:g instanceof I?F=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));F||e.remove()}return b}Hc.prototype.w=function(){return 0<this.e.length?this.e[0].w():m}; -Hc.prototype.h=function(){for(var a=0;a<this.e.length;a++){var b=this.e[a];if(b.h()||1==b.j||0==b.j)return l}return n};Hc.prototype.s=function(){return this.e.length};Hc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.e,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Ic(a,b,c,d){K.call(this,4);this.u=a;this.S=b;this.e=c||new Hc([]);this.X=!!d;b=this.e.w();a.Ea&&b&&(a=b.name,a=Pb?a.toLowerCase():a,this.J={name:a,F:b.F});this.t=this.e.h()}t(Ic,K); -Ic.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.F?M(c.F,a):m,f=1);if(this.X)if(!this.h()&&this.u==Jc)c=Yb(this.S,b,d,e),c=uc(this.e,c,f);else if(a=jc((new Ic(Kc,new J("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=gc(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Ic.prototype.q=function(a,b,c,d){a=this.u.M(this.S,a,b,c);return a=uc(this.e,a,d)}; -Ic.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.X?"//":"/")+"\n";this.u.n&&(b+=a+"Axis: "+this.u+"\n");b+=this.S.toString(a);if(this.e.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.e.length;c++)var d=c<this.e.length-1?", ":"",b=b+(this.e[c].toString(a)+d);return b};function Lc(a,b,c,d){this.n=a;this.M=b;this.D=c;this.Ea=d}Lc.prototype.toString=p("n");var Mc={}; -function Q(a,b,c,d){a in Mc&&h(Error("Axis already created: "+a));b=new Lc(a,b,c,!!d);return Mc[a]=b}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Cc=Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Pb)return c.add(new Rb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof J&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Pb?g.nodeValue&&c.add(Sb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Pb?g.nodeValue&&c.add(Sb(b,g,b.sourceIndex)):c.add(g));return c},n),Jc=Q("child",function(a,b,c,d,e){return(Pb?dc:ec).call(m,a,b,s(c)?c:m,s(d)?d:m,e||new I)},n,l); -Q("descendant",Yb,n,l);var Kc=Q("descendant-or-self",function(a,b,c,d){var e=new I;Xb(b,c,d)&&a.matches(b)&&e.add(b);return Yb(a,b,c,d,e)},n,l),Fc=Q("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Xb(f,c,d)&&a.matches(f)&&e.add(f),e=Yb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new I},n); -var Nc=Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Gc=Q("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,q=f.length;g<q;g++){var x=[];for(b=f[g];b=b.previousSibling;)x.unshift(b);for(var F=0,W=x.length;F<W;F++)b=x[F],Xb(b,c,d)&&a.matches(b)&&e.add(b),e=Yb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Oc=Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Pc(a){K.call(this,1);this.ea=a;this.t=a.h();this.l=a.l}t(Pc,K);Pc.prototype.evaluate=function(a){return-L(this.ea,a)};Pc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ea.toString(a+" ")};function Qc(a){K.call(this,4);this.P=a;lc(this,oa(this.P,function(a){return a.h()}));mc(this,oa(this.P,function(a){return a.l}))}t(Qc,K);Qc.prototype.evaluate=function(a){var b=new I;v(this.P,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=gc(b,c)});return b};Qc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";v(this.P,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Rc(a){this.a=a}function Sc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Tc(a);var d=a.a.next();if(!d)break;var e=(d=sc[d]||m)&&d.ka;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ka;)b=new oc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new oc(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&h(Error(b))}function Uc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Vc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Wc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new zc(a)}function Xc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new ac(a.a.next()+a.a.next()+a.a.next()):new ac(a.a.next())} -function Yc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Dc;d=new Dc;R(a,"Missing next location step.");b=Zc(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Sc(a);R(a,'unclosed "("');Uc(a,")");break;case '"':case "'":b=Wc(a);break;default:if(isNaN(+b))if(!yc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=xc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){R(a,"Missing function argument list.");d.push(Sc(a));if(","!=G(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Vc(a);b=new vc(b,d)}else{b=m;break a}else b=new Ac(+a.a.next())}"["==G(a.a)&&(d=new Hc($c(a)),b=new tc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=Zc(a,"/"),d=new Ec,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Zc(a,b),c.push(b);return new Bc(d, -c)} -function Zc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Ic(Oc,new J("node")),a.a.next(),d;if(".."==G(a.a))return d=new Ic(Nc,new J("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Cc,a.a.next(),R(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Mc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Jc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){yc(e)||h(Error("Invalid node type: "+e));c=a.a.next();yc(c)||h(Error("Invalid type name: "+c));Uc(a,"(");R(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Wc(a);R(a,"Bad nodetype");Vc(a);c=new J(c,g)}else c=Xc(a);else"*"==e?c=Xc(a):h(Error("Bad token: "+a.a.next()));e=new Hc($c(a),f.D);return d||new Ic(f,c,e,"//"==b)} -function $c(a){for(var b=[];"["==G(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Sc(a);b.push(c);R(a,"Unclosed predicate expression.");Uc(a,"]")}return b}function Tc(a){if("-"==G(a.a))return a.a.next(),new Pc(Tc(a));var b=Yc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Yc(a));a.a.back();a=new Qc(b)}return a};function ad(a){a.length||h(Error("Empty XPath expression."));a=Ub(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Sc(new Rc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Ob(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?ic(a):""+a;break;case 1:this.numberValue=a instanceof I?+ic(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=jc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Rb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=hc(a);this.singleNodeValue=d instanceof Rb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function bd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new ad(a)).evaluate(b,f)},b.createExpression=function(a){return new ad(a)})};var T={};T.ra=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.q=function(a,b,c){var d=E(a);(z||Lb)&&bd(lb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ra;return z&&!Ya(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){A&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new w(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.W=function(a,b){(!a||1!=a.nodeType)&&h(new w(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Da=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,y?c:c||m):b.selectSingleNode?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.W(c,a);return c}; -T.Ka=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;y&&!ca(e)&&T.W(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){T.W(b,a)});return c};function cd(a){return(a=a.exec(Ka()))?a[1]:""}var dd=function(){if(Hb)return cd(/Firefox\/([0-9.]+)/);if(z||y)return Ra;if(Mb)return cd(/Chrome\/([0-9.]+)/);if(Nb)return cd(/Version\/([0-9.]+)/);if(Jb||Kb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ka());if(a)return a[1]+"."+a[2]}else{if(Lb)return(a=cd(/Android\s+([0-9.]+)/))?a:cd(/Version\/([0-9.]+)/);if(Ib)return cd(/Camino\/([0-9.]+)/)}return""}();var ed,fd;function U(a){return gd?ed(a):z?0<=ia(Za,a):Ya(a)}function hd(a){return gd?fd(a):Lb?0<=ia(id,a):0<=ia(dd,a)} -var gd=function(){if(!A)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;ed=function(a){return 0<=d.ta(e,""+a)};fd=function(a){return 0<=d.ta(f,""+a)};return l}(),jd;if(Lb){var kd=/Android\s+([0-9\.]+)/.exec(Ka());jd=kd?kd[1]:"0"}else jd="0"; -var id=jd,ld=z&&!C(8),md=C(9),nd=z&&!C(9),od=C(10),pd=z&&!C(10);Lb&&hd(2.3);!y&&(!B||U("533"));function qd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}qd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};qd.prototype.contains=function(a){return!this||!a?n:a instanceof qd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function rd(a,b){var c=E(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function sd(a,b){return rd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function td(a){a=a?E(a):document;var b;if(b=z)if(b=!C(9))b=hb(a),b=!kb(b.A);return b?a.body:a.documentElement} -function ud(a){var b=a.getBoundingClientRect();z&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function vd(a){if(z&&!C(8))return a.offsetParent;var b=E(a),c=sd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=sd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function wd(a){var b,c=E(a),d=sd(a,"position"),e=A&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new D(0,0),g=td(c);if(a==g)return f;if(a.getBoundingClientRect)b=ud(a),a=hb(c),a=jb(a.A),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(B&&"fixed"==sd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(y||B&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=vd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!y||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function xd(a){var b=new D;if(1==a.nodeType){if(a.getBoundingClientRect){var c=ud(a);b.x=c.left;b.y=c.top}else{var c=hb(a),c=jb(c.A),d=wd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(A&&!Ya(12)){var e;z?e="-ms-transform":B?e="-webkit-transform":y?e="-o-transform":A&&(e="-moz-transform");var f;e&&(f=sd(a,e));f||(f=sd(a,"transform"));f?(a=f.match(yd),a=!a?new D(0,0):new D(parseFloat(a[1]),parseFloat(a[2]))):a=new D(0,0);b=new D(b.x+a.x,b.y+a.y)}}else e=ea(a.ga),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.ga().targetTouches&& -(f=a.ga().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function zd(a){if("none"!=sd(a,"display"))return Ad(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Ad(a);b.display=c;b.position=e;b.visibility=d;return a}function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;return(!ca(b)||d)&&a.getBoundingClientRect?(a=ud(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)}var Bd={thin:2,medium:4,thick:6}; -function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var yd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Dd(a){var b;a:{a=E(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,l)&&Gd(a)&&!(z||y||A&&!U("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return V(a,"OPTION")?l:V(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Id(a,b){var c;if(c=ld)if(c="value"==b)if(c=V(a,"OPTION"))c=Jd(a,"value")===m;c?(c=[],wb(a,c,n),c=c.join("")):c=a[b];return c} -var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function Ld(a){var b=[];v(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return y?b.replace(/\w+:;/g,""):b} -function Jd(a,b){b=b.toLowerCase();if("style"==b)return Ld(a.style.cssText);if(ld&&"value"==b&&V(a,"INPUT"))return a.value;if(nd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Gd(a){var b=a.tagName.toUpperCase();return!qa(Md,b)?l:Id(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):xb(a,function(a){var b=a.parentNode;if(b&&V(b,"FIELDSET")&&Id(b,"disabled")){if(!V(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:mb(a.previousSibling);)if(V(a,"LEGEND"))return l}return n},l)?n:l} -function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:m} -function X(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=nd?"styleFloat":"cssFloat";c=rd(a,c)||Pd(a,c);if(c===m)c=m;else if(qa(ua,b)&&(xa.test("#"==c.charAt(0)?c:"#"+c)||Ba(c).length||ta&&ta[c.toLowerCase()]||za(c).length)){var d=za(c);if(!d.length){a:if(d=Ba(c),!d.length){d=ta[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(xa.test(d)&&(d=wa(d),d=wa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!ca(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?ca(d)?d:m:(c=Od(a))?Pd(c,b):m} -function Qd(a){if(ea(a.getBBox)&&!V(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(V(a,"BODY")){b=lb(E(a))||k;"hidden"!=X(a,"overflow")?a=l:(a=Od(a),!a||!V(a,"HTML")?a=l:(a=X(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ha).document;var b=a.documentElement,d=a.body;d||h(new w(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new cb(b,a)}else b=(b||window).document,b=kb(b)?b.documentElement:b.body,b=new cb(b.clientWidth,b.clientHeight);return b}return zd(a)} -function Fd(a,b){function c(a){if("none"==X(a,"display"))return n;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?l:V(a,"PATH")&&(0<b.height||0<b.width)?(b=X(a,"stroke-width"),!!b&&0<parseInt(b,10)):oa(a.childNodes,function(b){return b.nodeType==gb&&"hidden"!=X(a,"overflow")||V(b)&&d(b)})}function e(a,b){var c;if((c=b==m?nb(a):nb(b))&&("hidden"==X(c,"overflow-x")||"hidden"==X(c,"overflow-y"))){var d=Qd(c),f=xd(c),g=xd(a);return f.x+d.width<=g.x&&"hidden"==X(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==X(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=X(a,"-o-transform")||X(a,"-webkit-transform")||X(a,"-ms-transform")||X(a,"-moz-transform")||X(a,"transform");if(b&&"none"!==b)return b=xd(a),a=Qd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Od(a);return!a||f(a)}V(a)||h(Error("Argument to isShown must be of type Element"));if(V(a,"OPTION")||V(a,"OPTGROUP")){var g=xb(a,function(a){return V(a,"SELECT")});return!!g&&Fd(g,l)}if(V(a,"MAP")){if(!a.name)return n;g=E(a);g= -g.evaluate?T.Da('/descendant::*[@usemap = "#'+a.name+'"]',g):sb(g,function(b){return V(b)&&Jd(b,"usemap")=="#"+a.name});return!!g&&Fd(g,b)}return V(a,"AREA")?(g=xb(a,function(a){return V(a,"MAP")}),!!g&&Fd(g,b)):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Rd(a)||!d(a)||!e(a,m)?n:f(a)} -function Rd(a){if(pd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Sd(a)}function Sd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Sd(a));return b};function Td(a){this.d=ha.document.documentElement;this.m=m;var b=Dd(this.d);b&&Ud(this,b);this.O=a||new Vd}Td.prototype.v=p("d");function Ud(a,b){a.d=b;a.m=V(b,"OPTION")?xb(b,function(a){return V(a,"SELECT")}):m} -function Wd(a,b,c,d,e,f,g){if(!g&&!Ed(a.d))return n;e&&!(Xd==b||Yd==b)&&h(new w(12,"Event type does not allow related target: "+b));c={clientX:c.x,clientY:c.y,button:d,altKey:0!=(a.O.Q&4),ctrlKey:0!=(a.O.Q&2),shiftKey:0!=(a.O.Q&1),metaKey:0!=(a.O.Q&8),wheelDelta:f||0,relatedTarget:e||m};return(a=a.m?Zd(a,b):a.d)?$d(a,b,c):l} -function Zd(a,b){if(z)switch(b){case Xd:case ae:return m;case be:case ce:case de:return a.m.multiple?a.m:m;default:return a.m}if(y)switch(b){case be:case Xd:return a.m.multiple?a.d:m;default:return a.d}if(B)switch(b){case ee:case fe:return a.m.multiple?a.d:a.m;default:return a.m.multiple?a.d:m}return a.d}var ge=B||y||gd&&hd(3.6); -function he(a){if(ge||!a.href)return n;if(!gd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=lb(E(a)),c=b.location.href;a=ie(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var je=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function ie(a,b){var c=b.match(je);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var q=a.pathname.lastIndexOf("/");-1!=q&&(f=a.pathname.substr(0,q+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Vd(){this.Q=0};!z||U(10);Lb&&hd(4);var ke=z&&ha.navigator.msPointerEnabled;function le(a,b,c){this.f=a;this.U=b;this.V=c}le.prototype.create=function(a){a=E(a);nd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.U,this.V));return a};le.prototype.toString=p("f");function Y(a,b,c){le.call(this,a,b,c)}t(Y,le); -Y.prototype.create=function(a,b){!A&&this==me&&h(new w(9,"Browser does not support a mouse pixel scroll event."));var c=E(a),d;if(nd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Yd||this==Xd)Object.defineProperty?(c=this==Yd,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==ne&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=lb(c);d=c.createEvent("MouseEvents");c=1;if(this==ne&&(A||(d.wheelDelta=b.wheelDelta),A||y))c=b.wheelDelta/-40;A&&this==me&&(c=b.wheelDelta);d.initMouseEvent(this.f,this.U,this.V,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(z&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=yb(hb(a)),c=td(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function oe(a,b,c){le.call(this,a,b,c)}t(oe,le); -oe.prototype.create=function(a,b){ke||h(new w(9,"Browser does not support MSPointer events."));var c=E(a),d=lb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.f,this.U,this.V,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.va);return c}; -var pe=new le("change",l,n),qe=new le("focus",n,n),ee=new Y("click",l,l),be=new Y("contextmenu",l,l),re=new Y("dblclick",l,l),se=new Y("mousedown",l,l),ce=new Y("mousemove",l,n),Yd=new Y("mouseout",l,l),Xd=new Y("mouseover",l,l),fe=new Y("mouseup",l,l),ne=new Y(A?"DOMMouseScroll":"mousewheel",l,l),me=new Y("MozMousePixelScroll",l,l),te=new oe("MSPointerDown",l,l),de=new oe("MSPointerMove",l,l),ae=new oe("MSPointerOver",l,l),ue=new oe("MSPointerOut",l,l),ve=new oe("MSPointerUp",l,l); -function $d(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return nd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function we(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof we){d=xe(a);ye(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}we.prototype.G=0;we.prototype.qa=0;function xe(a){ye(a);return a.i.concat()} -we.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.G--,this.qa++,this.i.length>2*this.G&&ye(this),l):n};function ye(a){if(a.G!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.G!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -we.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};we.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.G++,this.i.push(a),this.qa++);this.z[a]=b};var ze={};function Z(a,b,c){fa(a)&&(a=A?a.b:y?a.opera:a.c);a=new Ae(a,b,c);if(b&&(!(b in ze)||c))ze[b]={key:a,shift:n},c&&(ze[c]={key:a,shift:l});return a}function Ae(a,b,c){this.code=a;this.sa=b||m;this.Sa=c||this.sa}Z(8);Z(9);Z(13);var Be=Z(16),Ce=Z(17),De=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); -Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Ee=Z(Ja?{b:91,c:91,opera:219}:Ia?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -Z(Ja?{b:92,c:92,opera:220}:Ia?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});Z(Ja?{b:93,c:93,opera:0}:Ia?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Pa?56:42},"*");Z({b:107,c:107,opera:Pa?61:43},"+"); -Z({b:109,c:109,opera:Pa?109:45},"-");Z({b:110,c:110,opera:Pa?190:78},".");Z({b:111,c:111,opera:Pa?191:47},"/");Z(Pa&&y?m:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Fe=new we;Fe.set(1,Be);Fe.set(2,Ce);Fe.set(4,De); -Fe.set(8,Ee);(function(a){var b=new we;v(xe(a),function(c){b.set(a.get(c).code,c)});return b})(Fe);A&&U(12);function Ge(a,b){Td.call(this,b);this.L=this.o=m;this.C=new D(0,0);this.Y=this.I=n;if(a){this.o=a.Ha;try{V(a.ua)&&(this.L=a.ua)}catch(c){this.o=m}this.C=a.Ia;this.I=a.Qa;this.Y=a.Ja;try{V(a.element)&&Ud(this,a.element)}catch(d){this.o=m}}}t(Ge,Td);var $={}; -nd?($[ee]=[0,0,0,m],$[be]=[m,m,0,m],$[fe]=[1,4,2,m],$[Yd]=[0,0,0,0],$[ce]=[1,4,2,0]):B||md?($[ee]=[0,1,2,m],$[be]=[m,m,2,m],$[fe]=[0,1,2,m],$[Yd]=[0,1,2,0],$[ce]=[0,1,2,0]):($[ee]=[0,1,2,m],$[be]=[m,m,2,m],$[fe]=[0,1,2,m],$[Yd]=[0,0,0,0],$[ce]=[0,0,0,0]);od&&($[te]=$[fe],$[ve]=$[fe],$[de]=[-1,-1,-1,-1],$[ue]=$[de],$[ae]=$[de]);$[re]=$[ee];$[se]=$[fe];$[Xd]=$[Yd];var He={La:te,Ma:de,Na:ue,Oa:ae,Pa:ve}; -Ge.prototype.move=function(a,b){var c=Ed(a),d=xd(a);this.C.x=b.x+d.x;this.C.y=b.y+d.y;d=this.v();if(a!=d){try{lb(E(d)).closed&&(d=m)}catch(e){d=m}if(d){var f=d===ha.document.documentElement||d===ha.document.body,d=!this.Y&&f?m:d;Ie(this,Yd,a)}Ud(this,a);z||Ie(this,Xd,d,m,c)}Ie(this,ce,m,m,c);z&&a!=d&&Ie(this,Xd,d,m,c);this.I=n}; -function Ie(a,b,c,d,e){a.Y=l;if(od){var f=He[b],g;if(g=f){g=a.C;var q=Je(a,f),x=MSPointerEvent.MSPOINTER_TYPE_MOUSE;!e&&!Ed(a.d)?f=n:(c&&!(ae==f||ue==f)&&h(new w(12,"Event type does not allow related target: "+f)),g={clientX:g.x,clientY:g.y,button:q,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:c||m,width:0,height:0,Ca:0,rotation:0,pointerId:1,Fa:0,Ga:0,pointerType:x,va:l},f=(q=a.m?Zd(a,f):a.d)?$d(q,f,g):l);g=!f}if(g)return n}return Wd(a,b,a.C,Je(a,b),c,d,e)} -function Je(a,b){if(!(b in $))return 0;var c=$[b][a.o===m?3:a.o];c===m&&h(new w(13,"Event does not permit the specified mouse button."));return c};function Ke(a,b){this.x=a;this.y=b}t(Ke,D);Ke.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Le(a,b,c,d,e){Fd(a,l)||h(new w(11,"Element is not currently visible and may not be manipulated"));var f=E(a),f=B?f.body:f.documentElement,g;g=wd(a);var q=wd(f),x;if(z){var F=Cd(f,"borderLeft");x=Cd(f,"borderRight");var W=Cd(f,"borderTop"),N=Cd(f,"borderBottom");x=new qd(W,x,N,F)}else F=rd(f,"borderLeftWidth"),x=rd(f,"borderRightWidth"),W=rd(f,"borderTopWidth"),N=rd(f,"borderBottomWidth"),x=new qd(parseFloat(W),parseFloat(x),parseFloat(N),parseFloat(F));F=g.x-q.x-x.left;g=g.y-q.y-x.top;q= -f.clientHeight-a.offsetHeight;x=f.scrollLeft;W=f.scrollTop;x+=Math.min(F,Math.max(F-(f.clientWidth-a.offsetWidth),0));W+=Math.min(g,Math.max(g-q,0));g=new D(x,W);f.scrollLeft=g.x;f.scrollTop=g.y;d?d=new Ke(d.x,d.y):(d=Me(a),d=new Ke(d.width/2,d.height/2));e=e||new Ge;e.move(a,d);e.o!==m&&h(new w(13,"Cannot press more then one button or an already pressed button."));e.o=0;e.L=e.v();var u;f=A&&!hd(4);(B||f)&&(V(e.v(),"OPTION")||V(e.v(),"SELECT"))?u=l:((f=A||z)&&(u=Dd(e.v())),u=(g=Ie(e,se))&&f&&u!=Dd(e.v())? -n:g);if(u&&(u=e.m||e.d,f=Dd(u),u!=f)){if(f&&(ea(f.blur)||z&&fa(f.blur))){try{"body"!==f.tagName.toLowerCase()&&f.blur()}catch(Nd){z&&"Unspecified error."==Nd.message||h(Nd)}z&&!U(8)&&lb(E(u)).focus()}if(ea(u.focus)||z&&fa(u.focus))y&&U(11)&&!Fd(u)?$d(u,qe):u.focus()}u=xd(a);e.move(a,new D(d.x+Math.floor(b/2),d.y+Math.floor(c/2)));f=xd(a);e.move(a,new D(u.x+d.x+b-f.x,u.y+d.y+c-f.y));e.o===m&&h(new w(13,"Cannot release a button when no button is pressed."));Ie(e,fe);if(0==e.o&&e.v()==e.L){a=e.C;b=Je(e, -ee);if(Ed(e.d)){u=c=m;if(!ge)for(d=e.d;d;d=d.parentNode)if(V(d,"A")){c=d;break}else{a:{if(V(d,"INPUT")&&(f=d.type.toLowerCase(),"submit"==f||"image"==f)){f=l;break a}if(V(d,"BUTTON")&&(f=d.type.toLowerCase(),"submit"==f)){f=l;break a}f=n}if(f){u=d;break}}if(f=d=Hd(e.d)){f=e.d;Hd(f)||h(new w(15,"Element is not selectable"));g="selected";q=f.type&&f.type.toLowerCase();if("checkbox"==q||"radio"==q)g="checked";f=!!Id(f,g)}if(e.m&&(g=e.m,!f||g.multiple))e.d.selected=!f,(!B||!g.multiple||Lb&&hd(4))&&$d(g, -pe);z&&u?u.click():Wd(e,ee,a,b)&&(c&&he(c)?(a=c,b=a.href,c=lb(E(a)),z&&!U(8)&&(b=ie(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):d&&!e.m&&(!A&&!B&&!(f&&"radio"==e.d.type.toLowerCase()))&&(e.d.checked=!f,y&&!U(11)&&$d(e.d,pe)))}e.I&&Ie(e,re);e.I=!e.I}else 2==e.o&&Ie(e,be);e.o=m;e.L=m}function Me(a){var b=zd(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Me(a.offsetParent)};function Ne(){this.R=k} -function Oe(a,b,c){switch(typeof b){case "string":Pe(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Oe(a,a.R?a.R.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Pe(f, -c),c.push(":"),Oe(a,a.R?a.R.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Qe={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Re=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Pe(a,b){b.push('"',a.replace(Re,function(a){if(a in Qe)return Qe[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Qe[a]=e+b.toString(16)}),'"')};B||y||A&&U(3.5)||z&&U(8);function Se(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,Se);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Te(a);return b}if("document"in a)return b={},b.WINDOW=Te(a),b;if(da(a))return ma(a,Se);a=db(a,function(a,b){return"number"==typeof b||s(b)});return eb(a,Se);default:return m}} -function Ue(a,b){return"array"==ba(a)?ma(a,function(a){return Ue(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?Ve(a.ELEMENT,b):"WINDOW"in a?Ve(a.WINDOW,b):eb(a,function(a){return Ue(a,b)}):a}function We(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.aa=ga());b.aa||(b.aa=ga());return b}function Te(a){var b=We(a.ownerDocument),c=fb(b,function(b){return b==a});c||(c=":wdc:"+b.aa++,b[c]=a);return c} -function Ve(a,b){a=decodeURIComponent(a);var c=b||document,d=We(c);a in d||h(new w(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new w(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new w(10,"Element is no longer attached to the DOM"))};function Xe(a,b,c,d){a=[a,b,c,d];b=Le;var e;try{b=s(b)?new ha.Function(b):ha==window?b:new ha.Function("return ("+b+").apply(null,arguments);");var f=Ue(a,ha.document),g=b.apply(m,f);e={status:0,value:Se(g)}}catch(q){e={status:"code"in q?q.code:13,value:{message:q.message}}}f=[];Oe(new Ne,e,f);return f.join("")}var Ye=["_"],Ze=r;!(Ye[0]in Ze)&&Ze.execScript&&Ze.execScript("var "+Ye[0]);for(var $e;Ye.length&&($e=Ye.shift());)!Ye.length&&ca(Xe)?Ze[$e]=Xe:Ze=Ze[$e]?Ze[$e]:Ze[$e]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!C(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var sb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},tb={IMG:" ",BR:"\n"}; +function ub(a,b,c){if(!(a.nodeName in sb))if(a.nodeType==kb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in tb)b.push(tb[a.nodeName]);else for(a=a.firstChild;a;)ub(a,b,c),a=a.nextSibling}function vb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function wb(a){this.C=a||n.document||document}wb.prototype.v=function(a){return p(a)?this.C.getElementById(a):a}; +function xb(a){return!B&&mb(a.C)?a.C.documentElement:a.C.body||a.C.documentElement}wb.prototype.contains=ob;var yb,zb,Ab,Bb,Cb,Db,Eb;Eb=Db=Cb=Bb=Ab=zb=yb=!1;var Fb=Na();Fb&&(-1!=Fb.indexOf("Firefox")?yb=!0:-1!=Fb.indexOf("Camino")?zb=!0:-1!=Fb.indexOf("iPhone")||-1!=Fb.indexOf("iPod")?Ab=!0:-1!=Fb.indexOf("iPad")?Bb=!0:-1!=Fb.indexOf("Android")?Cb=!0:-1!=Fb.indexOf("Chrome")?Db=!0:-1!=Fb.indexOf("Safari")&&(Eb=!0));var Gb=yb,Hb=zb,Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb;function Nb(a,b,c){this.g=a;this.Ha=b||1;this.p=c||1};var Ob=x&&!C(9),Pb=x&&!C(8);function Qb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function Rb(a,b,c){var d=Pb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Qb(b,a,b.nodeName,d,c)};function Sb(a){this.ga=a;this.Q=0}function Tb(a){a=a.match(Ub);for(var b=0;b<a.length;b++)Vb.test(a[b])&&a.splice(b,1);return new Sb(a)}var Ub=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Vb=/^\s/;function H(a,b){return a.ga[a.Q+(b||0)]}Sb.prototype.next=function(){return this.ga[this.Q++]};Sb.prototype.back=function(){this.Q--};Sb.prototype.empty=function(){return this.ga.length<=this.Q};function I(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(Ob&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Ob&&"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} +function Wb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Pb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Xb(a,b,c,d,e){return(Ob?Yb:Zb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new J)} +function Yb(a,b,c,d,e){if(a instanceof $b||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=ac(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Wb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}bc(a,b,c,d,e);return e} +function Zb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),s(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),s(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof K?bc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),s(b,function(a){Wb(a,c,d)&&e.add(a)}));return e} +function cc(a,b,c,d,e){var f;if((a instanceof $b||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var g=ac(a);if("*"!=g&&(f=pa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=pa(f,function(a){return Wb(a,c,d)}));s(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return dc(a,b,c,d,e)}function dc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Wb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function bc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Wb(b,c,d)&&a.matches(b)&&e.add(b),bc(a,b,c,d,e)}function ac(a){if(a instanceof K){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function J(){this.p=this.k=null;this.K=0}function ec(a){this.s=a;this.next=this.F=null}function fc(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.s==d.s||c.s instanceof Qb&&d.s instanceof Qb&&c.s.g==d.s.g?(f=c,c=c.next,d=d.next):0<pb(c.s,d.s)?(f=d,d=d.next):(f=c,c=c.next),(f.F=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.F=e,e=e.next=f,g++,f=f.next;a.p=e;a.K=g;return a} +J.prototype.unshift=function(a){a=new ec(a);a.next=this.k;this.p?this.k.F=a:this.k=this.p=a;this.k=a;this.K++};J.prototype.add=function(a){a=new ec(a);a.F=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.K++};function gc(a){return(a=a.k)?a.s:null}J.prototype.r=h("K");function hc(a){return(a=gc(a))?I(a):""}function ic(a,b){return new jc(a,!!b)}function jc(a,b){this.Da=a;this.ha=(this.G=b)?a.p:a.k;this.ba=null} +jc.prototype.next=function(){var a=this.ha;if(null==a)return null;var b=this.ba=a;this.ha=this.G?a.F:a.next;return b.s};jc.prototype.remove=function(){var a=this.Da,b=this.ba;if(!b)throw Error("Next must be called at least once before remove.");var c=b.F,b=b.next;c?c.next=b:a.k=b;b?b.F=c:a.p=c;a.K--;this.ba=null};function L(a){this.j=a;this.l=this.t=!1;this.M=null}function M(a){return"\n "+a.toString().split("\n").join("\n ")}L.prototype.h=h("t");function kc(a,b){a.t=b}function lc(a,b){a.l=b}L.prototype.w=h("M");function N(a,b){var c=a.evaluate(b);return c instanceof J?+hc(c):+c}function O(a,b){var c=a.evaluate(b);return c instanceof J?hc(c):""+c}function mc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.r():!!c};function nc(a,b,c){L.call(this,a.j);this.fa=a;this.ma=b;this.ra=c;this.t=b.h()||c.h();this.l=b.l||c.l;this.fa==oc&&(c.l||c.h()||4==c.j||0==c.j||!b.w()?b.l||(b.h()||4==b.j||0==b.j||!c.w())||(this.M={name:c.w().name,H:b}):this.M={name:b.w().name,H:c})}r(nc,L); +function pc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof J&&c instanceof J){e=ic(b);for(d=e.next();d;d=e.next())for(b=ic(c),f=b.next();f;f=b.next())if(a(I(d),I(f)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=ic(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+I(d);break;case "boolean":d=!!I(d);break;case "string":d=I(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}nc.prototype.evaluate=function(a){return this.fa.q(this.ma,this.ra,a)};nc.prototype.toString=function(){var a="Binary Expression: "+this.fa,a=a+M(this.ma);return a+=M(this.ra)};function qc(a,b,c,d){this.Ga=a;this.pa=b;this.j=c;this.q=d}qc.prototype.toString=h("Ga");var rc={}; +function P(a,b,c,d){if(rc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new qc(a,b,c,d);return rc[a.toString()]=a}P("div",6,1,function(a,b,c){return N(a,c)/N(b,c)});P("mod",6,1,function(a,b,c){return N(a,c)%N(b,c)});P("*",6,1,function(a,b,c){return N(a,c)*N(b,c)});P("+",5,1,function(a,b,c){return N(a,c)+N(b,c)});P("-",5,1,function(a,b,c){return N(a,c)-N(b,c)});P("<",4,2,function(a,b,c){return pc(function(a,b){return a<b},a,b,c)}); +P(">",4,2,function(a,b,c){return pc(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return pc(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return pc(function(a,b){return a>=b},a,b,c)});var oc=P("=",3,2,function(a,b,c){return pc(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return pc(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return mc(a,c)&&mc(b,c)});P("or",1,2,function(a,b,c){return mc(a,c)||mc(b,c)});function sc(a,b){if(b.r()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");L.call(this,a.j);this.qa=a;this.e=b;this.t=a.h();this.l=a.l}r(sc,L);sc.prototype.evaluate=function(a){a=this.qa.evaluate(a);return tc(this.e,a)};sc.prototype.toString=function(){var a;a="Filter:"+M(this.qa);return a+=M(this.e)};function uc(a,b){if(b.length<a.oa)throw Error("Function "+a.o+" expects at least"+a.oa+" arguments, "+b.length+" given");if(null!==a.ca&&b.length>a.ca)throw Error("Function "+a.o+" expects at most "+a.ca+" arguments, "+b.length+" given");a.Ea&&s(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});L.call(this,a.j);this.P=a;this.W=b;kc(this,a.t||ta(b,function(a){return a.h()}));lc(this,a.Ca&&!b.length||a.Ba&&!!b.length||ta(b,function(a){return a.l}))} +r(uc,L);uc.prototype.evaluate=function(a){return this.P.q.apply(null,xa(a,this.W))};uc.prototype.toString=function(){var a="Function: "+this.P;if(this.W.length)var b=sa(this.W,function(a,b){return a+M(b)},"Arguments:"),a=a+M(b);return a};function vc(a,b,c,d,e,f,g,k,t){this.o=a;this.j=b;this.t=c;this.Ca=d;this.Ba=e;this.q=f;this.oa=g;this.ca=ca(k)?k:g;this.Ea=!!t}vc.prototype.toString=h("o");var wc={}; +function Q(a,b,c,d,e,f,g,k){if(wc.hasOwnProperty(a))throw Error("Function already created: "+a+".");wc[a]=new vc(a,b,c,d,!1,e,f,g,k)}Q("boolean",2,!1,!1,function(a,b){return mc(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(N(b,a))},1);Q("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+O(c,a)},"")},2,null);Q("contains",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return-1!=b.indexOf(a)},2); +Q("count",1,!1,!1,function(a,b){return b.evaluate(a).r()},1,1,!0);Q("false",2,!1,!1,aa(!1),0);Q("floor",1,!1,!1,function(a,b){return Math.floor(N(b,a))},1); +Q("id",4,!1,!1,function(a,b){function c(a){if(Ob){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=O(b,a).split(/\s+/),f=[];s(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(pb);var g=new J;s(f,function(a){g.add(a)});return g},1);Q("lang",2,!1,!1,aa(!1),1); +Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.p},0);Q("local-name",3,!1,!0,function(a,b){var c=b?gc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){var c=b?gc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,aa(""),0,1,!0);Q("normalize-space",3,!1,!0,function(a,b){return(b?O(b,a):I(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +Q("not",2,!1,!1,function(a,b){return!mc(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?N(b,a):+I(a.g)},0,1);Q("position",1,!0,!1,function(a){return a.Ha},0);Q("round",1,!1,!1,function(a,b){return Math.round(N(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?O(b,a):I(a.g)},0,1);Q("string-length",1,!1,!0,function(a,b){return(b?O(b,a):I(a.g)).length},0,1); +Q("substring",3,!1,!1,function(a,b,c,d){c=N(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?N(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=O(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +Q("substring-before",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){for(var c=ic(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=O(b,a);c=O(c,a);var e=O(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);Q("true",2,!1,!1,aa(!0),0);function K(a,b){this.ta=a;this.na=ca(b)?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=kb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function xc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};K.prototype.getName=h("ta"); +K.prototype.toString=function(){var a="Kind Test: "+this.ta;null===this.na||(a+=M(this.na));return a};function yc(a){L.call(this,3);this.sa=a.substring(1,a.length-1)}r(yc,L);yc.prototype.evaluate=h("sa");yc.prototype.toString=function(){return"Literal: "+this.sa};function $b(a,b){this.o=a.toLowerCase();this.da=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}$b.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.o&&this.o!=a.nodeName.toLowerCase()?!1:this.da==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};$b.prototype.getName=h("o");$b.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.da?"":this.da+":")+this.o};function zc(a){L.call(this,1);this.ua=a}r(zc,L);zc.prototype.evaluate=h("ua");zc.prototype.toString=function(){return"Number: "+this.ua};function Ac(a,b){L.call(this,a.j);this.ka=a;this.N=b;this.t=a.h();this.l=a.l;if(1==this.N.length){var c=this.N[0];c.$||c.u!=Bc||(c=c.V,"*"!=c.getName()&&(this.M={name:c.getName(),H:null}))}}r(Ac,L);function Cc(){L.call(this,4)}r(Cc,L);Cc.prototype.evaluate=function(a){var b=new J;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Cc.prototype.toString=aa("Root Helper Expression");function Dc(){L.call(this,4)}r(Dc,L);Dc.prototype.evaluate=function(a){var b=new J;b.add(a.g);return b}; +Dc.prototype.toString=aa("Context Helper Expression"); +Ac.prototype.evaluate=function(a){var b=this.ka.evaluate(a);if(!(b instanceof J))throw Error("Filter expression must evaluate to nodeset.");a=this.N;for(var c=0,d=a.length;c<d&&b.r();c++){var e=a[c],f=ic(b,e.u.G),g;if(e.h()||e.u!=Ec)if(e.h()||e.u!=Fc)for(g=f.next(),b=e.evaluate(new Nb(g));null!=(g=f.next());)g=e.evaluate(new Nb(g)),b=fc(b,g);else g=f.next(),b=e.evaluate(new Nb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Nb(g))}}return b}; +Ac.prototype.toString=function(){var a;a="Path Expression:"+M(this.ka);if(this.N.length){var b=sa(this.N,function(a,b){return a+M(b)},"Steps:");a+=M(b)}return a};function Gc(a,b){this.e=a;this.G=!!b}function tc(a,b,c){for(c=c||0;c<a.e.length;c++)for(var d=a.e[c],e=ic(b),f=b.r(),g,k=0;g=e.next();k++){var t=a.G?f-k:k+1;g=d.evaluate(new Nb(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.r();else throw Error("Predicate.evaluate returned an unexpected type.");t||e.remove()}return b}Gc.prototype.w=function(){return 0<this.e.length?this.e[0].w():null}; +Gc.prototype.h=function(){for(var a=0;a<this.e.length;a++){var b=this.e[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Gc.prototype.r=function(){return this.e.length};Gc.prototype.toString=function(){return sa(this.e,function(a,b){return a+M(b)},"Predicates:")};function Hc(a,b,c,d){L.call(this,4);this.u=a;this.V=b;this.e=c||new Gc([]);this.$=!!d;b=this.e.w();a.Ka&&b&&(a=b.name,a=Ob?a.toLowerCase():a,this.M={name:a,H:b.H});this.t=this.e.h()}r(Hc,L); +Hc.prototype.evaluate=function(a){var b=a.g,c=null,c=this.w(),d=null,e=null,f=0;c&&(d=c.name,e=c.H?O(c.H,a):null,f=1);if(this.$)if(this.h()||this.u!=Ic)if(a=ic((new Hc(Jc,new K("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);null!=(b=a.next());)c=fc(c,this.q(b,d,e,f));else c=new J;else c=Xb(this.V,b,d,e),c=tc(this.e,c,f);else c=this.q(a.g,d,e,f);return c};Hc.prototype.q=function(a,b,c,d){a=this.u.P(this.V,a,b,c);return a=tc(this.e,a,d)}; +Hc.prototype.toString=function(){var a;a="Step:"+M("Operator: "+(this.$?"//":"/"));this.u.o&&(a+=M("Axis: "+this.u));a+=M(this.V);if(this.e.r()){var b=sa(this.e.e,function(a,b){return a+M(b)},"Predicates:");a+=M(b)}return a};function Kc(a,b,c,d){this.o=a;this.P=b;this.G=c;this.Ka=d}Kc.prototype.toString=h("o");var Lc={};function R(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} +R("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);R("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Bc=R("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&Ob)return c.add(new Qb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof K&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Ob?g.nodeValue&&c.add(Rb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Ob?g.nodeValue&&c.add(Rb(b,g,b.sourceIndex)):c.add(g));return c},!1),Ic=R("child",function(a,b,c,d,e){return(Ob?cc:dc).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new J)}, +!1,!0);R("descendant",Xb,!1,!0);var Jc=R("descendant-or-self",function(a,b,c,d){var e=new J;Wb(b,c,d)&&a.matches(b)&&e.add(b);return Xb(a,b,c,d,e)},!1,!0),Ec=R("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)Wb(f,c,d)&&a.matches(f)&&e.add(f),e=Xb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);R("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);R("namespace",function(){return new J},!1); +var Mc=R("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Fc=R("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var t=[];for(b=f[g];b=b.previousSibling;)t.unshift(b);for(var z=0,A=t.length;z<A;z++)b=t[z],Wb(b,c,d)&&a.matches(b)&&e.add(b),e=Xb(a,b,c,d,e)}return e},!0,!0); +R("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Nc=R("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},!1);function Oc(a){L.call(this,1);this.ja=a;this.t=a.h();this.l=a.l}r(Oc,L);Oc.prototype.evaluate=function(a){return-N(this.ja,a)};Oc.prototype.toString=function(){return"Unary Expression: -"+M(this.ja)};function Pc(a){L.call(this,4);this.S=a;kc(this,ta(this.S,function(a){return a.h()}));lc(this,ta(this.S,function(a){return a.l}))}r(Pc,L);Pc.prototype.evaluate=function(a){var b=new J;s(this.S,function(c){c=c.evaluate(a);if(!(c instanceof J))throw Error("Path expression must evaluate to NodeSet.");b=fc(b,c)});return b};Pc.prototype.toString=function(){return sa(this.S,function(a,b){return a+M(b)},"Union Expression:")};function Qc(a,b){this.a=a;this.Fa=b}function Rc(a){for(var b,c=[];;){S(a,"Missing right hand side of binary expression.");b=Sc(a);var d=a.a.next();if(!d)break;var e=(d=rc[d]||null)&&d.pa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].pa;)b=new nc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new nc(c.pop(),c.pop(),b);return b}function S(a,b){if(a.a.empty())throw Error(b);}function Tc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Uc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Vc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new yc(a)}function Wc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new $b(b);var d=b.substring(0,c);a=a.Fa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new $b(b,a)} +function Xc(a){var b,c=[],d;if("/"==H(a.a)||"//"==H(a.a)){b=a.a.next();d=H(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Cc;d=new Cc;S(a,"Missing next location step.");b=Yc(a,b);c.push(b)}else{a:{b=H(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Rc(a);S(a,'unclosed "("');Tc(a,")");break;case '"':case "'":b=Vc(a);break;default:if(isNaN(+b))if(!xc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==H(a.a,1)){b=a.a.next();b=wc[b]||null;a.a.next();for(d=[];")"!=H(a.a);){S(a,"Missing function argument list.");d.push(Rc(a));if(","!=H(a.a))break;a.a.next()}S(a,"Unclosed function argument list.");Uc(a);b=new uc(b,d)}else{b=null;break a}else b=new zc(+a.a.next())}"["==H(a.a)&&(d=new Gc(Zc(a)),b=new sc(b,d))}if(b)if("/"==H(a.a)||"//"==H(a.a))d=b;else return b;else b=Yc(a,"/"),d=new Dc,c.push(b)}for(;"/"==H(a.a)||"//"==H(a.a);)b=a.a.next(),S(a,"Missing next location step."),b=Yc(a,b),c.push(b); +return new Ac(d,c)} +function Yc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==H(a.a))return d=new Hc(Nc,new K("node")),a.a.next(),d;if(".."==H(a.a))return d=new Hc(Mc,new K("node")),a.a.next(),d;var f;if("@"==H(a.a))f=Bc,a.a.next(),S(a,"Missing attribute name");else if("::"==H(a.a,1)){if(!/(?![0-9])[\w]/.test(H(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Lc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();S(a,"Missing node name")}else f=Ic; +c=H(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==H(a.a,1)){if(!xc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!xc(c))throw Error("Invalid type name: "+c);Tc(a,"(");S(a,"Bad nodetype");e=H(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Vc(a);S(a,"Bad nodetype");Uc(a);c=new K(c,g)}else c=Wc(a);else if("*"==c)c=Wc(a);else throw Error("Bad token: "+a.a.next());e=new Gc(Zc(a),f.G);return d||new Hc(f,c,e,"//"==b)} +function Zc(a){for(var b=[];"["==H(a.a);){a.a.next();S(a,"Missing predicate expression.");var c=Rc(a);b.push(c);S(a,"Unclosed predicate expression.");Tc(a,"]")}return b}function Sc(a){if("-"==H(a.a))return a.a.next(),new Oc(Sc(a));var b=Xc(a);if("|"!=H(a.a))a=b;else{for(b=[b];"|"==a.a.next();)S(a,"Missing next union location path."),b.push(Xc(a));a.a.back();a=new Pc(b)}return a};function $c(a){switch(a.nodeType){case 1:return ja(ad,a);case 9:return $c(a.documentElement);case 2:return a.ownerElement?$c(a.ownerElement):bd;case 11:case 10:case 6:case 12:return bd;default:return a.parentNode?$c(a.parentNode):bd}}function bd(){return null}function ad(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?ad(a.parentNode,b):null};function cd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Tb(a);if(c.empty())throw Error("Invalid XPath expression.");b?ea(b)||(b=ia(b.lookupNamespaceURI,b)):b=aa(null);var d=Rc(new Qc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Nb(a));return new T(c,b)}} +function T(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;var c;switch(b){case 2:this.stringValue=a instanceof J?hc(a):""+a;break;case 1:this.numberValue=a instanceof J?+hc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.r():!!a;break;case 4:case 5:case 6:case 7:var d= +ic(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Qb?e.g:e);this.snapshotLength=a.r();this.invalidIteratorState=!1;break;case 8:case 9:d=gc(a);this.singleNodeValue=d instanceof Qb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}T.ANY_TYPE=0;T.NUMBER_TYPE=1;T.STRING_TYPE=2;T.BOOLEAN_TYPE=3;T.UNORDERED_NODE_ITERATOR_TYPE=4;T.ORDERED_NODE_ITERATOR_TYPE=5;T.UNORDERED_NODE_SNAPSHOT_TYPE=6;T.ORDERED_NODE_SNAPSHOT_TYPE=7;T.ANY_UNORDERED_NODE_TYPE=8;T.FIRST_ORDERED_NODE_TYPE=9;function dd(a){this.lookupNamespaceURI=$c(a)} +function ed(a){a=a||n;var b=a.document;b.evaluate||(a.XPathResult=T,b.evaluate=function(a,b,e,f){return(new cd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new cd(a,b)},b.createNSResolver=function(a){return new dd(a)})};var U={};U.wa=function(){var a={Va:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();U.q=function(a,b,c){var d=G(a);(x||Kb)&&ed(F(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.wa;return x&&!ab(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!y||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new u(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +U.Z=function(a,b){if(!a||1!=a.nodeType)throw new u(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};U.Ja=function(a,b){var c=function(){var c=U.q(b,a,9);return c?(c=c.singleNodeValue,w?c:c||null):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||U.Z(c,a);return c}; +U.Qa=function(a,b){var c=function(){var c=U.q(b,a,7);if(c){var e=c.snapshotLength;w&&!ca(e)&&U.Z(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();s(c,function(b){U.Z(b,a)});return c};function fd(a){return(a=a.exec(Na()))?a[1]:""}var gd=function(){if(Gb)return fd(/Firefox\/([0-9.]+)/);if(x||w)return Ua;if(Lb)return fd(/Chrome\/([0-9.]+)/);if(Mb)return fd(/Version\/([0-9.]+)/);if(Ib||Jb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Kb)return(a=fd(/Android\s+([0-9.]+)/))?a:fd(/Version\/([0-9.]+)/);if(Hb)return fd(/Camino\/([0-9.]+)/)}return""}();var hd,id;function jd(a){return kd?hd(a):x?0<=ma(bb,a):ab(a)}function ld(a){return kd?id(a):Kb?0<=ma(md,a):0<=ma(gd,a)} +var kd=function(){if(!y)return!1;var a=n.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;hd=function(a){return 0<=d.ya(e,""+a)};id=function(a){return 0<=d.ya(f,""+a)};return!0}(),nd;if(Kb){var od=/Android\s+([0-9\.]+)/.exec(Na());nd=od?od[1]:"0"}else nd="0"; +var md=nd,pd=x&&!C(8),qd=C(9),rd=x&&!C(9),sd=C(10),td=x&&!C(10);Kb&&ld(2.3);Kb&&ld(4);Mb&&ld(6);var ud=x&&-1!=Na().indexOf("IEMobile");function vd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}vd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};vd.prototype.contains=function(a){return this&&a?a instanceof vd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +vd.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};vd.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +vd.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}V.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};V.prototype.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +V.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};V.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +V.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function wd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function xd(a){a=a?G(a):document;var b;(b=!x)||(b=C(9))||(b=a?new wb(G(a)):fb||(fb=new wb),b=mb(b.C));return b?a.documentElement:a.body} +function yd(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;if((!ca(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}x&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new gb(e.right-e.left,e.bottom-e.top)}return new gb(b,c)}var zd={thin:2,medium:4,thick:6}; +function Ad(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in zd)d=zd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Bd(a){var b;a:{a=G(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return x&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Cd(a){return Dd(a,!0)&&Ed(a)&&!(x||w||y&&!jd("1.9.2")?0:"none"==X(a,"pointer-events"))}function Fd(a){return W(a,"OPTION")?!0:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Gd(a){if(!Fd(a))throw new u(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Hd(a,b)}function Hd(a,b){var c;if(c=pd)if(c="value"==b)if(c=W(a,"OPTION"))c=null===Id(a);c?(c=[],ub(a,c,!1),c=c.join("")):c=a[b];return c}var Jd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Kd(a){var b=[];s(a.split(Jd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return w?b.replace(/\w+:;/g,""):b}function Id(a){var b;b="value";return"style"==b?Kd(a.style.cssText):pd&&"value"==b&&W(a,"INPUT")?a.value:rd&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Ld="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Ed(a){var b=a.tagName.toUpperCase();return wa(Ld,b)?Hd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Ed(a.parentNode):!vb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Hd(b,"disabled")){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:nb(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function Md(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=na(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=rd?"styleFloat":"cssFloat";var d=wd(a,c)||Nd(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Nd(a,b){var c=a.currentStyle||a.style,d=c[b];!ca(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?ca(d)?d:null:(c=Md(a))?Nd(c,b):null} +function Dd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=Md(a);return!a||c(a)}function d(a){var b=Od(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==kb||W(a)&&d(a)})}function e(a){return Pd(a)==Qd&&ua(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +vb(a,function(a){return W(a,"SELECT")});return!!f&&Dd(f,!0)}return(f=Rd(a))?!!f.la&&0<f.rect.width&&0<f.rect.height&&Dd(f.la,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Sd(a)||!d(a)?!1:!e(a)}var Qd="hidden"; +function Pd(a,b){function c(a){var b=X(a,"position");if("fixed"==b)return A=!0,a==k?null:k;for(a=Md(a);a&&a!=k&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=Md(a);return a}function d(a){var b=a;if("visible"==z)if(a==k&&t)b=t;else if(a==t)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new wb(g)).C;a=!B&&mb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=x&&ab("10")&&b.pageYOffset!=a.scrollTop?new D(a.scrollLeft,a.scrollTop):new D(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new D(a.scrollLeft,a.scrollTop);return a}for(var f=Td(a,b),g=G(a),k=g.documentElement,t=g.body,z=X(k,"overflow"),A,q=c(a);q;q=c(q)){var l=d(q);if("visible"!=l.x||"visible"!=l.y){var v=Od(q);if(0==v.width||0==v.height)return Qd;var E=f.right<v.left,m=f.bottom<v.top;if(E&&"hidden"==l.x||m&&"hidden"==l.y)return Qd; +if(E&&"visible"!=l.x||m&&"visible"!=l.y){E=e(q);m=f.bottom<v.top-E.y;if(f.right<v.left-E.x&&"visible"!=l.x||m&&"visible"!=l.x)return Qd;f=Pd(q);return f==Qd?Qd:"scroll"}E=f.left>=v.left+v.width;v=f.top>=v.top+v.height;if(E&&"hidden"==l.x||v&&"hidden"==l.y)return Qd;if(E&&"visible"!=l.x||v&&"visible"!=l.y){if(A&&(l=e(q),f.left>=k.scrollWidth-l.x||f.right>=k.scrollHeight-l.y))return Qd;f=Pd(q);return f==Qd?Qd:"scroll"}}}return"none"}var Ud=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Od(a){function b(a){var c=F(G(a)).getComputedStyle(a,null).MozTransform.match(Ud);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),A=parseFloat(c[3]),q=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),v=f.left+f.width,E=f.top+f.height,m=f.left*d,d=v*d,ra=f.left*e,e=v*e,cb=f.top*A,A=E*A,db=f.top*q,v=E*q,E=m+cb+l,q=ra+db+c,cb=d+cb+l,db=e+db+c,m=m+A+l,ra=ra+v+c,l=d+A+l,c=e+v+c;f.left=Math.min(E,cb,m,l);f.top=Math.min(q,db,ra,c);l=Math.max(E,cb,m,l);c=Math.max(q,db,ra,c);f.width=l-f.left; +f.height=c-f.top}(a=Md(a))&&b(a)}var c=Rd(a);if(c)return c.rect;if(W(a,"HTML"))return c=G(a),a=lb(F(c)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);x&&a.ownerDocument.body&&(c=G(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);w&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height= +a.offsetHeight));y&&!jd(12)&&b(a);return f} +function Rd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=U.Ja('/descendant::*[@usemap = "#'+c.name+'"]',G(c)))&&(e=Od(d),!b&&"default"!=a.shape.toLowerCase())){var f=Vd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{la:d,rect:e||new V(0,0,0,0)}} +function Vd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)} +function Td(a,b){var c;c=Od(a);c=new vd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof V?b:new V(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Sd(a){if(td){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Wd(a)}function Wd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Md(a))&&(b*=Wd(a));return b};function Xd(a,b){this.d=la.document.documentElement;this.m=null;var c=Bd(this.d);c&&Yd(this,c);this.R=a||new Zd;this.ia=b||new $d}Xd.prototype.v=h("d");function Yd(a,b){a.d=b;a.m=W(b,"OPTION")?vb(b,function(a){return W(a,"SELECT")}):null} +Xd.prototype.O=function(a,b,c,d,e,f,g){if(!f&&!Cd(this.d))return!1;if(d&&ae!=a&&be!=a)throw new u(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:0!=(this.R.T&4),ctrlKey:0!=(this.R.T&2),shiftKey:0!=(this.R.T&1),metaKey:0!=(this.R.T&8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=ce&&a!=de&&g in ee?c=ee[g]:this.m&&(c=fe(this,a));return c?this.ia.O(c,a,b):!0}; +Xd.prototype.J=function(a,b,c,d,e,f,g,k){if(!k&&!Cd(this.d))return!1;if(g&&ge!=a&&he!=a)throw new u(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ia:0,rotation:0,pointerId:d,La:0,Ma:0,pointerType:e,Aa:f};c=this.m?fe(this,a):this.d;ee[d]&&(c=ee[d]);d=F(G(this.d));var t;d&&a==ie&&(t=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){ee[a]= +this});a=c?this.ia.J(c,a,b):!0;t&&(d.Element.prototype.msSetPointerCapture=t);return a};function fe(a,b){if(x)switch(b){case ae:case ge:return null;case je:case ke:case le:return a.m.multiple?a.m:null;default:return a.m}if(w)switch(b){case je:case ae:return a.m.multiple?a.d:null;default:return a.d}if(B)switch(b){case ce:case me:return a.m.multiple?a.d:a.m;default:return a.m.multiple?a.d:null}return a.d}var ne=B||w||kd&&ld(3.6); +function oe(a){if(ne||!a.href)return!1;if(!kd)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=F(G(a)),c=b.location.href;a=pe(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var qe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function pe(a,b){var c=b.match(qe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function Zd(){this.T=0}var ee={};function $d(){}$d.prototype.O=function(a,b,c){return re(a,b,c)};$d.prototype.J=function(a,b,c){return re(a,b,c)};x&&jd(10);Kb&&ld(4);var se=x&&la.navigator.msPointerEnabled;function te(a,b,c){this.f=a;this.X=b;this.Y=c}te.prototype.create=function(a){a=G(a);rd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.X,this.Y));return a};te.prototype.toString=h("f");function Y(a,b,c){te.call(this,a,b,c)}r(Y,te); +Y.prototype.create=function(a,b){if(!y&&this==ue)throw new u(9,"Browser does not support a mouse pixel scroll event.");var c=G(a),d;if(rd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==be||this==ae)if(Object.defineProperty){var e=this==be;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==ve&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=F(c);d=c.createEvent("MouseEvents");var f=1;this==ve&&(y||(d.wheelDelta=b.wheelDelta),y||w)&&(f=b.wheelDelta/-40);y&&this==ue&&(f=b.wheelDelta);d.initMouseEvent(this.f,this.X,this.Y,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(x&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=xb(a?new wb(G(a)):fb||(fb=new wb)), +c=xd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function we(a,b,c){te.call(this,a,b,c)}r(we,te); +we.prototype.create=function(a,b){if(!se)throw new u(9,"Browser does not support MSPointer events.");var c=G(a),d=F(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.f,this.X,this.Y,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ia,b.rotation,b.La,b.Ma,b.pointerId,b.pointerType,0,b.Aa);return c}; +var xe=new te("change",!0,!1),ye=new te("focus",!1,!1),ce=new Y("click",!0,!0),je=new Y("contextmenu",!0,!0),ze=new Y("dblclick",!0,!0),de=new Y("mousedown",!0,!0),ke=new Y("mousemove",!0,!1),be=new Y("mouseout",!0,!0),ae=new Y("mouseover",!0,!0),me=new Y("mouseup",!0,!0),ve=new Y(y?"DOMMouseScroll":"mousewheel",!0,!0),ue=new Y("MozMousePixelScroll",!0,!0),Ae=new we("MSGotPointerCapture",!0,!1),Be=new we("MSLostPointerCapture",!0,!1),ie=new we("MSPointerDown",!0,!0),le=new we("MSPointerMove",!0,!0), +ge=new we("MSPointerOver",!0,!0),he=new we("MSPointerOut",!0,!0),Ce=new we("MSPointerUp",!0,!0);function re(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return rd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function De(a,b){this.A={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De)for(d=Ee(a),Fe(a),e=[],c=0;c<a.i.length;c++)e.push(a.A[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.I=0;De.prototype.va=0;function Ee(a){Fe(a);return a.i.concat()} +De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.A,a)?(delete this.A[a],this.I--,this.va++,this.i.length>2*this.I&&Fe(this),!0):!1};function Fe(a){if(a.I!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.A,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.I!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.A,a)?this.A[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.A,a)||(this.I++,this.i.push(a),this.va++);this.A[a]=b};var Ge={};function Z(a,b,c){fa(a)&&(a=y?a.b:w?a.opera:a.c);a=new He(a,b,c);!b||b in Ge&&!c||(Ge[b]={key:a,shift:!1},c&&(Ge[c]={key:a,shift:!0}));return a}function He(a,b,c){this.code=a;this.xa=b||null;this.Ta=c||this.xa}Z(8);Z(9);Z(13);var Ie=Z(16),Je=Z(17),Ke=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Le=Z(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Sa?56:42},"*"); +Z({b:107,c:107,opera:Sa?61:43},"+");Z({b:109,c:109,opera:Sa?109:45},"-");Z({b:110,c:110,opera:Sa?190:78},".");Z({b:111,c:111,opera:Sa?191:47},"/");Z(Sa&&w?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Me=new De; +Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke);Me.set(8,Le);(function(a){var b=new De;s(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);y&&jd(12);function Ne(a,b,c){Xd.call(this,b,c);this.D=this.n=null;this.B=new D(0,0);this.aa=this.L=!1;if(a){this.n=a.Na;try{W(a.za)&&(this.D=a.za)}catch(d){this.n=null}this.B=a.Oa;this.L=a.Ra;this.aa=a.Pa;try{W(a.element)&&Yd(this,a.element)}catch(e){this.n=null}}}r(Ne,Xd);var $={}; +rd?($[ce]=[0,0,0,null],$[je]=[null,null,0,null],$[me]=[1,4,2,null],$[be]=[0,0,0,0],$[ke]=[1,4,2,0]):B||qd?($[ce]=[0,1,2,null],$[je]=[null,null,2,null],$[me]=[0,1,2,null],$[be]=[0,1,2,0],$[ke]=[0,1,2,0]):($[ce]=[0,1,2,null],$[je]=[null,null,2,null],$[me]=[0,1,2,null],$[be]=[0,0,0,0],$[ke]=[0,0,0,0]);sd&&($[ie]=$[me],$[Ce]=$[me],$[le]=[-1,-1,-1,-1],$[he]=$[le],$[ge]=$[le]);$[ze]=$[ce];$[de]=$[me];$[ae]=$[be];var Oe={};Oe[de]=ie;Oe[ke]=le;Oe[be]=he;Oe[ae]=ge;Oe[me]=Ce; +Ne.prototype.move=function(a,b){var c=Cd(a),d=Od(a);this.B.x=b.x+d.left;this.B.y=b.y+d.top;d=this.v();if(a!=d){try{F(G(d)).closed&&(d=null)}catch(e){d=null}if(d){var f=d===la.document.documentElement||d===la.document.body,d=!this.aa&&f?null:d;Pe(this,be,a)}Yd(this,a);x||Pe(this,ae,d,null,c)}Pe(this,ke,null,null,c);x&&a!=d&&Pe(this,ae,d,null,c);this.L=!1}; +function Pe(a,b,c,d,e){a.aa=!0;if(sd){var f=Oe[b];if(f&&!a.J(f,a.B,Qe(a,f),1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0,c,e))return!1}return a.O(b,a.B,Qe(a,b),c,d,e)}function Qe(a,b){if(!(b in $))return 0;var c=$[b][null===a.n?3:a.n];if(null===c)throw new u(13,"Event does not permit the specified mouse button.");return c};function Re(a,b){this.x=a;this.y=b}r(Re,D);Re.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Se(a,b,c,d,e,f){if(!Dd(a,!0))throw new u(11,"Element is not currently visible and may not be manipulated");b:{var g=e||void 0;if("scroll"==Pd(a,g)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Pd(a,g)))break b;for(var k=Td(a,g),t=Md(a);t;t=Md(t)){var z=t,A=Od(z),q;var l=z;if(x&&!C(9)){var v=Ad(l,"borderLeft");q=Ad(l,"borderRight");var E=Ad(l,"borderTop"),l=Ad(l,"borderBottom");q=new vd(E,q,l,v)}else v=wd(l,"borderLeftWidth"),q=wd(l,"borderRightWidth"),E=wd(l,"borderTopWidth"),l=wd(l, +"borderBottomWidth"),q=new vd(parseFloat(E),parseFloat(q),parseFloat(l),parseFloat(v));v=k.left-A.left-q.left;A=k.top-A.top-q.top;q=z.clientHeight+k.top-k.bottom;z.scrollLeft+=Math.min(v,Math.max(v-(z.clientWidth+k.left-k.right),0));z.scrollTop+=Math.min(A,Math.max(A-q,0))}Pd(a,g)}}e?e=new Re(e.x,e.y):(e=Te(a),e=new Re(e.width/2,e.height/2));g=Od(a);f=f||new Ne;f.move(a,e);if(null!==f.n)throw new u(13,"Cannot press more then one button or an already pressed button.");f.n=0;f.D=f.v();var m;k=y&&!ld(4); +(B||k)&&(W(f.v(),"OPTION")||W(f.v(),"SELECT"))?m=!0:((k=y||x)&&(m=Bd(f.v())),m=(t=Pe(f,de))&&k&&m!=Bd(f.v())?!1:t);if(m&&(sd&&(0==f.n&&W(f.D,"OPTION"))&&f.J(Ae,f.B,0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0),m=f.m||f.d,k=Bd(m),m!=k)){if(k&&(ea(k.blur)||x&&fa(k.blur))){if(!W(k,"BODY"))try{k.blur()}catch(ra){if(!x||"Unspecified error."!=ra.message)throw ra;}x&&!jd(8)&&F(G(m)).focus()}if(ea(m.focus)||x&&fa(m.focus))w&&jd(11)&&!Dd(m)?re(m,ye):m.focus()}d=ca(d)?d:2;if(1>d)throw new u(13,"There must be at least one step as part of a drag."); +for(m=1;m<=d;m++)k=Math.floor(m*b/d),t=Math.floor(m*c/d),z=Od(a),f.move(a,new D(e.x+g.left+k-z.left,e.y+g.top+t-z.top));if(null===f.n)throw new u(13,"Cannot release a button when no button is pressed.");f.m&&Cd(f.d)&&(a=f.m,b=Gd(f.d),!b||a.multiple)&&(f.d.selected=!b,(!B||!a.multiple||Lb&&ld(28)||Kb&&ld(4))&&re(a,xe));Pe(f,me);if(0==f.n&&f.v()==f.D){if(!ud||!W(f.D,"OPTION"))if(a=f.B,b=Qe(f,ce),Cd(f.d)){d=c=null;if(!ne)for(m=f.d;m;m=m.parentNode)if(W(m,"A")){c=m;break}else{a:{if(W(m,"INPUT")&&(e=m.type.toLowerCase(), +"submit"==e||"image"==e)){e=!0;break a}if(W(m,"BUTTON")&&(e=m.type.toLowerCase(),"submit"==e)){e=!0;break a}e=!1}if(e){d=m;break}}e=(m=!f.m&&Fd(f.d))&&Gd(f.d);x&&d?d.click():f.O(ce,a,b,null,0,!1,void 0)&&(c&&oe(c)?(a=c,b=a.href,c=F(G(a)),x&&!jd(8)&&(b=pe(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):!m||(y||B||e&&"radio"==f.d.type.toLowerCase())||(f.d.checked=!e,w&&!jd(11)&&re(f.d,xe)))}f.L&&Pe(f,ze);f.L=!f.L;sd&&(0==f.n&&W(f.D,"OPTION"))&&f.J(Be,new D(0,0),0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE, +!1)}else 2==f.n&&Pe(f,je);ee={};f.n=null;f.D=null}function Te(a){var b;if("none"!=(wd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=yd(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=yd(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:Te(a.offsetParent)};function Ue(){this.U=void 0} +function Ve(a,b,c){switch(typeof b){case "string":We(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ve(a,a.U?a.U.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +We(f,c),c.push(":"),Ve(a,a.U?a.U.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Xe={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ye=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function We(a,b){b.push('"',a.replace(Ye,function(a){if(a in Xe)return Xe[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Xe[a]=e+b.toString(16)}),'"')};B||w||y&&jd(3.5)||x&&jd(8);function Ze(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return qa(a,Ze);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=$e(a);return b}if("document"in a)return b={},b.WINDOW=$e(a),b;if(da(a))return qa(a,Ze);a=hb(a,function(a,b){return"number"==typeof b||p(b)});return ib(a,Ze);default:return null}} +function af(a,b){return"array"==ba(a)?qa(a,function(a){return af(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?bf(a.ELEMENT,b):"WINDOW"in a?bf(a.WINDOW,b):ib(a,function(a){return af(a,b)}):a}function cf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ea=ka());b.ea||(b.ea=ka());return b}function $e(a){var b=cf(a.ownerDocument),c=jb(b,function(b){return b==a});c||(c=":wdc:"+b.ea++,b[c]=a);return c} +function bf(a,b){a=decodeURIComponent(a);var c=b||document,d=cf(c);if(!(a in d))throw new u(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new u(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new u(10,"Element is no longer attached to the DOM");};function df(a,b,c,d){a=[a,b,c,d];b=Se;var e;try{b=p(b)?new la.Function(b):la==window?b:new la.Function("return ("+b+").apply(null,arguments);");var f=af(a,la.document),g=b.apply(null,f);e={status:0,value:Ze(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}f=[];Ve(new Ue,e,f);return f.join("")}var ef=["_"],ff=n;ef[0]in ff||!ff.execScript||ff.execScript("var "+ef[0]);for(var gf;ef.length&&(gf=ef.shift());)ef.length||void 0===df?ff=ff[gf]?ff[gf]:ff[gf]={}:ff[gf]=df;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/execute_async_script.js b/src/ghostdriver/third_party/webdriver-atoms/execute_async_script.js index 885bde424..873776297 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/execute_async_script.js +++ b/src/ghostdriver/third_party/webdriver-atoms/execute_async_script.js @@ -1,15 +1,15 @@ -function(){return function(){var k=void 0,m=!0,p=!1,q=this; -function r(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";else if("function"== -b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=r(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ca(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var s=Date.now||function(){return+new Date};var t=0,u=13;function v(a,b){this.code=a;this.state=x[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=c.length-5;if(0>e||c.indexOf("Error",e)!=e)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=v,b=Error;function c(){}c.prototype=b.prototype;a.d=b.prototype;a.prototype=new c})(); -var da="unknown error",x={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference"}; -x[t]="success";x[21]="timeout";x[25]="unable to set cookie";x[26]="unexpected alert open";x[u]=da;x[9]="unknown command";v.prototype.toString=function(){return this.name+": "+this.message};function y(a,b){for(var c=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=Math.max(e.length,f.length),n=0;0==c&&n<d;n++){var w=e[n]||"",g=f[n]||"",K=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var l=K.exec(w)||["","",""],h=L.exec(g)||["","",""];if(0==l[0].length&&0==h[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==h[1].length?0:parseInt(h[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0==h[1].length? -0:parseInt(h[1],10))?1:0)||((0==l[2].length)<(0==h[2].length)?-1:(0==l[2].length)>(0==h[2].length)?1:0)||(l[2]<h[2]?-1:l[2]>h[2]?1:0)}while(0==c)}return c};var z,A,B,C;function D(){return q.navigator?q.navigator.userAgent:null}C=B=A=z=p;var E;if(E=D()){var ea=q.navigator;z=0==E.indexOf("Opera");A=!z&&-1!=E.indexOf("MSIE");B=!z&&-1!=E.indexOf("WebKit");C=!z&&!B&&"Gecko"==ea.product}var F=z,G=A,H=C,fa=B;function ga(){var a=q.document;return a?a.documentMode:k}var I; -a:{var J="",M;if(F&&q.opera)var N=q.opera.version,J="function"==typeof N?N():N;else if(H?M=/rv\:([^\);]+)(\)|;)/:G?M=/MSIE\s+([^\);]+)(\)|;)/:fa&&(M=/WebKit\/(\S+)/),M)var ha=M.exec(D()),J=ha?ha[1]:"";if(G){var ia=ga();if(ia>parseFloat(J)){I=String(ia);break a}}I=J}var ja={};function O(a){return ja[a]||(ja[a]=0<=y(I,a))}var ka=q.document,P=!ka||!G?k:ga()||("CSS1Compat"==ka.compatMode?parseInt(I,10):5);var Q,R,S,T,la,ma,na;na=ma=la=T=S=R=Q=p;var U=D();U&&(-1!=U.indexOf("Firefox")?Q=m:-1!=U.indexOf("Camino")?R=m:-1!=U.indexOf("iPhone")||-1!=U.indexOf("iPod")?S=m:-1!=U.indexOf("iPad")?T=m:-1!=U.indexOf("Android")?la=m:-1!=U.indexOf("Chrome")?ma=m:-1!=U.indexOf("Safari")&&(na=m));var oa=Q,pa=R,qa=S,ra=T,V=la,sa=ma,ta=na;function W(a){return(a=a.exec(D()))?a[1]:""}var ua=function(){if(oa)return W(/Firefox\/([0-9.]+)/);if(G||F)return I;if(sa)return W(/Chrome\/([0-9.]+)/);if(ta)return W(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(D());if(a)return a[1]+"."+a[2]}else{if(V)return(a=W(/Android\s+([0-9.]+)/))?a:W(/Version\/([0-9.]+)/);if(pa)return W(/Camino\/([0-9.]+)/)}return""}();var va,wa,xa=function(){if(!H)return p;var a=q.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}var c=a.classes,a=a.interfaces,e=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),f=c.platformVersion,d=c.version;va=function(a){return 0<=e.c(f,""+a)};wa=function(a){e.c(d,""+a)};return m}(),ya;if(V){var za=/Android\s+([0-9\.]+)/.exec(D());ya=za?za[1]:"0"}else ya="0";var Aa=ya; -V&&(xa?wa(2.3):V?y(Aa,2.3):y(ua,2.3));function Ba(){this.a=k} -function Ca(a,b,c){switch(typeof b){case "string":Da(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==r(b)){var e=b.length;c.push("[");for(var f="",d=0;d<e;d++)c.push(f),f=b[d],Ca(a,a.a?a.a.call(b,String(d),f):f,c),f=",";c.push("]");break}c.push("{");e="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(f=b[d],"function"!=typeof f&&(c.push(e), -Da(d,c),c.push(":"),Ca(a,a.a?a.a.call(b,d,f):f,c),e=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ea={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Da(a,b){b.push('"',a.replace(Fa,function(a){if(a in Ea)return Ea[a];var b=a.charCodeAt(0),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return Ea[a]=f+b.toString(16)}),'"')};fa||F||H&&(xa?va(3.5):G?0<=y(P,3.5):O(3.5))||G&&(xa?va(8):G?y(P,8):O(8));function Ga(a,b){for(var c=a.length,e=Array(c),f="string"==typeof a?a.split(""):a,d=0;d<c;d++)d in f&&(e[d]=b.call(k,f[d],d,a));return e};if(H||G){var Ha;if(Ha=G)Ha=G&&9<=P;Ha||H&&O("1.9.1")}G&&O("9");function Ia(a,b){var c={},e;for(e in a)b.call(k,a[e],e,a)&&(c[e]=a[e]);return c}function Ja(a,b){var c={},e;for(e in a)c[e]=b.call(k,a[e],e,a);return c}function Ka(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};function X(a){switch(r(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ga(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=La(a);return b}if("document"in a)return b={},b.WINDOW=La(a),b;if(aa(a))return Ga(a,X);a=Ia(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ja(a,X);default:return null}} -function Ma(a,b){return"array"==r(a)?Ga(a,function(a){return Ma(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Na(a.ELEMENT,b):"WINDOW"in a?Na(a.WINDOW,b):Ja(a,function(a){return Ma(a,b)}):a}function Oa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=s());b.b||(b.b=s());return b}function La(a){var b=Oa(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Na(a,b){a=decodeURIComponent(a);var c=b||document,e=Oa(c);if(!(a in e))throw new v(10,"Element does not exist in cache");var f=e[a];if("setInterval"in f){if(f.closed)throw delete e[a],new v(23,"Window has been closed.");return f}for(var d=f;d;){if(d==c.documentElement)return f;d=d.parentNode}delete e[a];throw new v(10,"Element is no longer attached to the DOM");};function Pa(a,b,c,e,f,d){function n(a,b){if(!L){g.removeEventListener?g.removeEventListener("unload",w,m):g.detachEvent("onunload",w);g.clearTimeout(K);if(a!=t){var c=new v(a,b.message||b+"");c.stack=b.stack;b={status:"code"in c?c.code:u,value:{message:c.message}}}else b={status:t,value:X(b)};var c=e,d;f?(d=[],Ca(new Ba,b,d),d=d.join("")):d=b;c(d);L=m}}function w(){n(u,Error("Detected a page unload event; asynchronous script execution does not work across page loads."))}var g=d||window,K,L=p;d=ca(n, -u);if(g.closed)d("Unable to execute script; the target window is closed.");else{a="string"==typeof a?new g.Function(a):g==window?a:new g.Function("return ("+a+").apply(null,arguments);");b=Ma(b,g.document);b.push(ca(n,t));g.addEventListener?g.addEventListener("unload",w,m):g.attachEvent("onunload",w);var l=s();try{a.apply(g,b),K=g.setTimeout(function(){n(28,Error("Timed out waiting for asyncrhonous script result after "+(s()-l)+" ms"))},Math.max(0,c))}catch(h){n(h.code||u,h)}}}var Y=["_"],Z=q; -!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Qa;if(Qa=!Y.length)Qa=Pa!==k;Qa?Z[$]=Pa:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var l=this; +function n(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ca(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var p=Date.now||function(){return+new Date};var q=0,r=13;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=c.length-5;if(0>e||c.indexOf("Error",e)!=e)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=s,b=Error;function c(){}c.prototype=b.prototype;a.d=b.prototype;a.prototype=new c})(); +var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference"}; +u[q]="success";u[21]="timeout";u[25]="unable to set cookie";u[26]="unexpected alert open";u[r]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=Math.max(e.length,f.length),m=0;0==c&&m<d;m++){var t=e[m]||"",g=f[m]||"",I=RegExp("(\\d*)(\\D*)","g"),J=RegExp("(\\d*)(\\D*)","g");do{var k=I.exec(t)||["","",""],h=J.exec(g)||["","",""];if(0==k[0].length&&0==h[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==h[1].length?0:parseInt(h[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>(0==h[1].length? +0:parseInt(h[1],10))?1:0)||((0==k[2].length)<(0==h[2].length)?-1:(0==k[2].length)>(0==h[2].length)?1:0)||(k[2]<h[2]?-1:k[2]>h[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return l.navigator?l.navigator.userAgent:null}z=y=x=w=!1;var B;if(B=A()){var ea=l.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y;function ga(){var a=l.document;return a?a.documentMode:void 0}var F; +a:{var G="",H;if(C&&l.opera)var K=l.opera.version,G="function"==typeof K?K():K;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ha=H.exec(A()),G=ha?ha[1]:"";if(D){var ia=ga();if(ia>parseFloat(G)){F=String(ia);break a}}F=G}var ja={};function L(a){return ja[a]||(ja[a]=0<=v(F,a))}var ka=l.document,M=ka&&D?ga()||("CSS1Compat"==ka.compatMode?parseInt(F,10):5):void 0;var N,O,P,Q,R,S,T;T=S=R=Q=P=O=N=!1;var U=A();U&&(-1!=U.indexOf("Firefox")?N=!0:-1!=U.indexOf("Camino")?O=!0:-1!=U.indexOf("iPhone")||-1!=U.indexOf("iPod")?P=!0:-1!=U.indexOf("iPad")?Q=!0:-1!=U.indexOf("Android")?R=!0:-1!=U.indexOf("Chrome")?S=!0:-1!=U.indexOf("Safari")&&(T=!0));var la=N,ma=O,na=P,oa=Q,V=R,pa=S,qa=T;function W(a){return(a=a.exec(A()))?a[1]:""}var ra=function(){if(la)return W(/Firefox\/([0-9.]+)/);if(D||C)return F;if(pa)return W(/Chrome\/([0-9.]+)/);if(qa)return W(/Version\/([0-9.]+)/);if(na||oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(V)return(a=W(/Android\s+([0-9.]+)/))?a:W(/Version\/([0-9.]+)/);if(ma)return W(/Camino\/([0-9.]+)/)}return""}();var sa,ta;function ua(a){va?ta(a):V?v(wa,a):v(ra,a)}var va=function(){if(!E)return!1;var a=l.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,e=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),f=c.platformVersion,d=c.version;sa=function(a){return 0<=e.c(f,""+a)};ta=function(a){e.c(d,""+a)};return!0}(),xa; +if(V){var ya=/Android\s+([0-9\.]+)/.exec(A());xa=ya?ya[1]:"0"}else xa="0";var wa=xa;V&&ua(2.3);V&&ua(4);qa&&ua(6);function za(){this.a=void 0} +function Aa(a,b,c){switch(typeof b){case "string":Ba(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==n(b)){var e=b.length;c.push("[");for(var f="",d=0;d<e;d++)c.push(f),f=b[d],Aa(a,a.a?a.a.call(b,String(d),f):f,c),f=",";c.push("]");break}c.push("{");e="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(f=b[d],"function"!=typeof f&&(c.push(e), +Ba(d,c),c.push(":"),Aa(a,a.a?a.a.call(b,d,f):f,c),e=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ca={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Da=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ba(a,b){b.push('"',a.replace(Da,function(a){if(a in Ca)return Ca[a];var b=a.charCodeAt(0),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return Ca[a]=f+b.toString(16)}),'"')};fa||C||E&&(va?sa(3.5):D?0<=v(M,3.5):L(3.5))||D&&(va?sa(8):D?v(M,8):L(8));function Ea(a,b){for(var c=a.length,e=Array(c),f="string"==typeof a?a.split(""):a,d=0;d<c;d++)d in f&&(e[d]=b.call(void 0,f[d],d,a));return e};if(E||D){var Fa;if(Fa=D)Fa=D&&9<=M;Fa||E&&L("1.9.1")}D&&L("9");function Ga(a,b){var c={},e;for(e in a)b.call(void 0,a[e],e,a)&&(c[e]=a[e]);return c}function Ha(a,b){var c={},e;for(e in a)c[e]=b.call(void 0,a[e],e,a);return c}function Ia(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ea(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ja(a);return b}if("document"in a)return b={},b.WINDOW=Ja(a),b;if(aa(a))return Ea(a,X);a=Ga(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ha(a,X);default:return null}} +function Ka(a,b){return"array"==n(a)?Ea(a,function(a){return Ka(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?La(a.ELEMENT,b):"WINDOW"in a?La(a.WINDOW,b):Ha(a,function(a){return Ka(a,b)}):a}function Ma(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=p());b.b||(b.b=p());return b}function Ja(a){var b=Ma(a.ownerDocument),c=Ia(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function La(a,b){a=decodeURIComponent(a);var c=b||document,e=Ma(c);if(!(a in e))throw new s(10,"Element does not exist in cache");var f=e[a];if("setInterval"in f){if(f.closed)throw delete e[a],new s(23,"Window has been closed.");return f}for(var d=f;d;){if(d==c.documentElement)return f;d=d.parentNode}delete e[a];throw new s(10,"Element is no longer attached to the DOM");};function Na(a,b,c,e,f,d){function m(a,b){if(!J){g.removeEventListener?g.removeEventListener("unload",t,!0):g.detachEvent("onunload",t);g.clearTimeout(I);if(a!=q){var c=new s(a,b.message||b+"");c.stack=b.stack;b={status:"code"in c?c.code:r,value:{message:c.message}}}else b={status:q,value:X(b)};var c=e,d;f?(d=[],Aa(new za,b,d),d=d.join("")):d=b;c(d);J=!0}}function t(){m(r,Error("Detected a page unload event; asynchronous script execution does not work across page loads."))}var g=d||window,I,J=!1;d= +ca(m,r);if(g.closed)d("Unable to execute script; the target window is closed.");else{a="string"==typeof a?new g.Function(a):g==window?a:new g.Function("return ("+a+").apply(null,arguments);");b=Ka(b,g.document);b.push(ca(m,q));g.addEventListener?g.addEventListener("unload",t,!0):g.attachEvent("onunload",t);var k=p();try{a.apply(g,b),I=g.setTimeout(function(){m(28,Error("Timed out waiting for asyncrhonous script result after "+(p()-k)+" ms"))},Math.max(0,c))}catch(h){m(h.code||r,h)}}} +var Y=["_"],Z=l;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Na?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Na;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/execute_script.js b/src/ghostdriver/third_party/webdriver-atoms/execute_script.js index 4d1ca0f57..f31ea3523 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/execute_script.js +++ b/src/ghostdriver/third_party/webdriver-atoms/execute_script.js @@ -1,13 +1,13 @@ -function(){return function(){var g=void 0,h=!0,m=!1,n=this; -function p(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";else if("function"== -b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=p(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var da=window;function q(a,b){this.code=a;this.state=r[a]||ea;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;q.d=a.prototype;q.prototype=new b})(); -var ea="unknown error",r={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};r[13]=ea;r[9]="unknown command";q.prototype.toString=function(){return this.name+": "+this.message};function s(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var y=d[t]||"",za=e[t]||"",Aa=RegExp("(\\d*)(\\D*)","g"),Ba=RegExp("(\\d*)(\\D*)","g");do{var k=Aa.exec(y)||["","",""],l=Ba.exec(za)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>(0== -l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var u,v,w,x;function z(){return n.navigator?n.navigator.userAgent:null}x=w=v=u=m;var A;if(A=z()){var fa=n.navigator;u=0==A.indexOf("Opera");v=!u&&-1!=A.indexOf("MSIE");w=!u&&-1!=A.indexOf("WebKit");x=!u&&!w&&"Gecko"==fa.product}var B=u,C=v,D=x,ga=w;function ha(){var a=n.document;return a?a.documentMode:g}var E; -a:{var F="",G;if(B&&n.opera)var H=n.opera.version,F="function"==typeof H?H():H;else if(D?G=/rv\:([^\);]+)(\)|;)/:C?G=/MSIE\s+([^\);]+)(\)|;)/:ga&&(G=/WebKit\/(\S+)/),G)var ia=G.exec(z()),F=ia?ia[1]:"";if(C){var ja=ha();if(ja>parseFloat(F)){E=String(ja);break a}}E=F}var ka={};function I(a){return ka[a]||(ka[a]=0<=s(E,a))}var la=n.document,J=!la||!C?g:ha()||("CSS1Compat"==la.compatMode?parseInt(E,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=m;var R=z();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var ma=K,na=L,oa=M,pa=N,S=O,qa=P,ra=Q;function T(a){return(a=a.exec(z()))?a[1]:""}var sa=function(){if(ma)return T(/Firefox\/([0-9.]+)/);if(C||B)return E;if(qa)return T(/Chrome\/([0-9.]+)/);if(ra)return T(/Version\/([0-9.]+)/);if(oa||pa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(z());if(a)return a[1]+"."+a[2]}else{if(S)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(na)return T(/Camino\/([0-9.]+)/)}return""}();var U,ta,V=function(){if(!D)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;U=function(a){return 0<=d.c(e,""+a)};ta=function(a){d.c(f,""+a)};return h}(),W;if(S){var ua=/Android\s+([0-9\.]+)/.exec(z());W=ua?ua[1]:"0"}else W="0";var va=W; -S&&(V?ta(2.3):S?s(va,2.3):s(sa,2.3));function wa(){this.a=g} -function xa(a,b,c){switch(typeof b){case "string":ya(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==p(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],xa(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), -ya(f,c),c.push(":"),xa(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ca={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Da=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function ya(a,b){b.push('"',a.replace(Da,function(a){if(a in Ca)return Ca[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ca[a]=e+b.toString(16)}),'"')};ga||B||D&&(V?U(3.5):C?0<=s(J,3.5):I(3.5))||C&&(V?U(8):C?s(J,8):I(8));function Ea(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(D||C){var Fa;if(Fa=C)Fa=C&&9<=J;Fa||D&&I("1.9.1")}C&&I("9");function Ga(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ha(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Ia(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(p(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ea(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ja(a);return b}if("document"in a)return b={},b.WINDOW=Ja(a),b;if(aa(a))return Ea(a,X);a=Ga(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ha(a,X);default:return null}} -function Ka(a,b){return"array"==p(a)?Ea(a,function(a){return Ka(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?La(a.ELEMENT,b):"WINDOW"in a?La(a.WINDOW,b):Ha(a,function(a){return Ka(a,b)}):a}function Ma(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ja(a){var b=Ma(a.ownerDocument),c=Ia(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function La(a,b){a=decodeURIComponent(a);var c=b||document,d=Ma(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new q(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};function Na(a,b,c,d){d=d||da;var e;try{a="string"==typeof a?new d.Function(a):d==window?a:new d.Function("return ("+a+").apply(null,arguments);");var f=Ka(b,d.document),t=a.apply(null,f);e={status:0,value:X(t)}}catch(y){e={status:"code"in y?y.code:13,value:{message:y.message}}}c&&(a=[],xa(new wa,e,a),e=a.join(""));return e}var Y=["_"],Z=n;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Oa;if(Oa=!Y.length)Oa=Na!==g;Oa?Z[$]=Na:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var da=window;function m(a,b){this.code=a;this.state=n[a]||ea;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;m.d=a.prototype;m.prototype=new b})(); +var ea="unknown error",n={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};n[13]=ea;n[9]="unknown command";m.prototype.toString=function(){return this.name+": "+this.message};function p(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var v=d[q]||"",xa=e[q]||"",ya=RegExp("(\\d*)(\\D*)","g"),za=RegExp("(\\d*)(\\D*)","g");do{var k=ya.exec(v)||["","",""],l=za.exec(xa)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>(0== +l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var r,s,t,u;function w(){return g.navigator?g.navigator.userAgent:null}u=t=s=r=!1;var x;if(x=w()){var fa=g.navigator;r=0==x.indexOf("Opera");s=!r&&-1!=x.indexOf("MSIE");t=!r&&-1!=x.indexOf("WebKit");u=!r&&!t&&"Gecko"==fa.product}var y=r,z=s,A=u,ga=t;function ha(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:ga&&(D=/WebKit\/(\S+)/),D)var ia=D.exec(w()),C=ia?ia[1]:"";if(z){var ja=ha();if(ja>parseFloat(C)){B=String(ja);break a}}B=C}var ka={};function F(a){return ka[a]||(ka[a]=0<=p(B,a))}var la=g.document,G=la&&z?ha()||("CSS1Compat"==la.compatMode?parseInt(B,10):5):void 0;var H,I,J,K,L,M,N;N=M=L=K=J=I=H=!1;var O=w();O&&(-1!=O.indexOf("Firefox")?H=!0:-1!=O.indexOf("Camino")?I=!0:-1!=O.indexOf("iPhone")||-1!=O.indexOf("iPod")?J=!0:-1!=O.indexOf("iPad")?K=!0:-1!=O.indexOf("Android")?L=!0:-1!=O.indexOf("Chrome")?M=!0:-1!=O.indexOf("Safari")&&(N=!0));var ma=H,na=I,oa=J,pa=K,P=L,qa=M,ra=N;function Q(a){return(a=a.exec(w()))?a[1]:""}var sa=function(){if(ma)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(qa)return Q(/Chrome\/([0-9.]+)/);if(ra)return Q(/Version\/([0-9.]+)/);if(oa||pa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(P)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(na)return Q(/Camino\/([0-9.]+)/)}return""}();var R,ta;function S(a){T?ta(a):P?p(ua,a):p(sa,a)}var T=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;R=function(a){return 0<=d.c(e,""+a)};ta=function(a){d.c(f,""+a)};return!0}(),U; +if(P){var va=/Android\s+([0-9\.]+)/.exec(w());U=va?va[1]:"0"}else U="0";var ua=U;P&&S(2.3);P&&S(4);ra&&S(6);function wa(){this.a=void 0} +function V(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],V(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Aa(f, +c),c.push(":"),V(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var W={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ba=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Aa(a,b){b.push('"',a.replace(Ba,function(a){if(a in W)return W[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return W[a]=e+b.toString(16)}),'"')};ga||y||A&&(T?R(3.5):z?0<=p(G,3.5):F(3.5))||z&&(T?R(8):z?p(G,8):F(8));function Ca(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Da;if(Da=z)Da=z&&9<=G;Da||A&&F("1.9.1")}z&&F("9");function Ea(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Fa(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ga(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ca(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ha(a);return b}if("document"in a)return b={},b.WINDOW=Ha(a),b;if(aa(a))return Ca(a,X);a=Ea(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Fa(a,X);default:return null}} +function Ia(a,b){return"array"==h(a)?Ca(a,function(a){return Ia(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ja(a.ELEMENT,b):"WINDOW"in a?Ja(a.WINDOW,b):Fa(a,function(a){return Ia(a,b)}):a}function Ka(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ha(a){var b=Ka(a.ownerDocument),c=Ga(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ja(a,b){a=decodeURIComponent(a);var c=b||document,d=Ka(c);if(!(a in d))throw new m(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new m(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new m(10,"Element is no longer attached to the DOM");};function La(a,b,c,d){d=d||da;var e;try{a="string"==typeof a?new d.Function(a):d==window?a:new d.Function("return ("+a+").apply(null,arguments);");var f=Ia(b,d.document),q=a.apply(null,f);e={status:0,value:X(q)}}catch(v){e={status:"code"in v?v.code:13,value:{message:v.message}}}c&&(a=[],V(new wa,e,a),e=a.join(""));return e}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===La?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=La;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/execute_sql.js b/src/ghostdriver/third_party/webdriver-atoms/execute_sql.js index d1765967d..2df3a4571 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/execute_sql.js +++ b/src/ghostdriver/third_party/webdriver-atoms/execute_sql.js @@ -1,13 +1,13 @@ -function(){return function(){var g=void 0,h=!0,k=!1,p=this; -function q(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";else if("function"== -b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function r(a,b){this.code=a;this.state=s[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;r.d=a.prototype;r.prototype=new b})(); -var da="unknown error",s={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};s[13]=da;s[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var ea=window;function fa(a,b,c,d,e){function f(a,c){var b=new ga(c);d(a,b)}var l;try{l=ea.openDatabase(a,"",a+"name",5242880)}catch(t){throw new r(13,t.message);}l.transaction(function(a){a.executeSql(b,c,f,g)},e,g)}function ga(a){this.rows=[];for(var b=0;b<a.rows.length;b++)this.rows[b]=a.rows.item(b);this.rowsAffected=a.rowsAffected;this.insertId=-1;try{this.insertId=a.insertId}catch(c){}};function u(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),l=0;0==c&&l<f;l++){var t=d[l]||"",Ba=e[l]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Ea=RegExp("(\\d*)(\\D*)","g");do{var m=Ca.exec(t)||["","",""],n=Ea.exec(Ba)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))>(0== -n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var v,w,x,y;function z(){return p.navigator?p.navigator.userAgent:null}y=x=w=v=k;var A;if(A=z()){var ha=p.navigator;v=0==A.indexOf("Opera");w=!v&&-1!=A.indexOf("MSIE");x=!v&&-1!=A.indexOf("WebKit");y=!v&&!x&&"Gecko"==ha.product}var B=v,C=w,D=y,ia=x;function ja(){var a=p.document;return a?a.documentMode:g}var E; -a:{var F="",G;if(B&&p.opera)var H=p.opera.version,F="function"==typeof H?H():H;else if(D?G=/rv\:([^\);]+)(\)|;)/:C?G=/MSIE\s+([^\);]+)(\)|;)/:ia&&(G=/WebKit\/(\S+)/),G)var ka=G.exec(z()),F=ka?ka[1]:"";if(C){var la=ja();if(la>parseFloat(F)){E=String(la);break a}}E=F}var ma={};function I(a){return ma[a]||(ma[a]=0<=u(E,a))}var na=p.document,J=!na||!C?g:ja()||("CSS1Compat"==na.compatMode?parseInt(E,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=k;var R=z();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,ta=Q;function T(a){return(a=a.exec(z()))?a[1]:""}var ua=function(){if(oa)return T(/Firefox\/([0-9.]+)/);if(C||B)return E;if(sa)return T(/Chrome\/([0-9.]+)/);if(ta)return T(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(z());if(a)return a[1]+"."+a[2]}else{if(S)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(pa)return T(/Camino\/([0-9.]+)/)}return""}();var U,va,V=function(){if(!D)return k;var a=p.Components;if(!a)return k;try{if(!a.classes)return k}catch(b){return k}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;U=function(a){return 0<=d.c(e,""+a)};va=function(a){d.c(f,""+a)};return h}(),W;if(S){var wa=/Android\s+([0-9\.]+)/.exec(z());W=wa?wa[1]:"0"}else W="0";var xa=W; -S&&(V?va(2.3):S?u(xa,2.3):u(ua,2.3));function ya(){this.a=g} -function za(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],za(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), -Aa(f,c),c.push(":"),za(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Aa(a,b){b.push('"',a.replace(Fa,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};ia||B||D&&(V?U(3.5):C?0<=u(J,3.5):I(3.5))||C&&(V?U(8):C?u(J,8):I(8));function Ga(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(D||C){var Ha;if(Ha=C)Ha=C&&9<=J;Ha||D&&I("1.9.1")}C&&I("9");function Ia(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ja(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Ka(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ga(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=La(a);return b}if("document"in a)return b={},b.WINDOW=La(a),b;if(aa(a))return Ga(a,X);a=Ia(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ja(a,X);default:return null}} -function Ma(a,b){return"array"==q(a)?Ga(a,function(a){return Ma(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Na(a.ELEMENT,b):"WINDOW"in a?Na(a.WINDOW,b):Ja(a,function(a){return Ma(a,b)}):a}function Oa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function La(a){var b=Oa(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Na(a,b){a=decodeURIComponent(a);var c=b||document,d=Oa(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new r(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function Pa(a,b){var c=a,d=window||ea,e;try{var c="string"==typeof c?new d.Function(c):d==window?c:new d.Function("return ("+c+").apply(null,arguments);"),f=Ma(b,d.document),l=c.apply(null,f);e={status:0,value:X(l)}}catch(t){e={status:"code"in t?t.code:13,value:{message:t.message}}}c=[];za(new ya,e,c);return c.join("")};function Qa(a,b,c,d){fa(a,b,c,function(a,b){d(Pa(function(){return b},[b]))},function(a){d(Pa(function(){throw new r(35,"SQL Error Code: "+a.code+". SQL Error Message: "+a.message);},[]))})}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Ra;if(Ra=!Y.length)Ra=Qa!==g;Ra?Z[$]=Qa:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.d=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};var ea=window;function fa(a,b,c,d,e){function f(a,c){var b=new ga(c);d(a,b)}var k;try{k=ea.openDatabase(a,"",a+"name",5242880)}catch(r){throw new n(13,r.message);}k.transaction(function(a){a.executeSql(b,c,f,void 0)},e,void 0)}function ga(a){this.rows=[];for(var b=0;b<a.rows.length;b++)this.rows[b]=a.rows.item(b);this.rowsAffected=a.rowsAffected;this.insertId=-1;try{this.insertId=a.insertId}catch(c){}};function q(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),k=0;0==c&&k<f;k++){var r=d[k]||"",za=e[k]||"",Aa=RegExp("(\\d*)(\\D*)","g"),Ca=RegExp("(\\d*)(\\D*)","g");do{var l=Aa.exec(r)||["","",""],m=Ca.exec(za)||["","",""];if(0==l[0].length&&0==m[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0== +m[1].length?0:parseInt(m[1],10))?1:0)||((0==l[2].length)<(0==m[2].length)?-1:(0==l[2].length)>(0==m[2].length)?1:0)||(l[2]<m[2]?-1:l[2]>m[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ha=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ha.product}var y=s,z=t,A=v,ia=u;function ja(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:ia&&(D=/WebKit\/(\S+)/),D)var ka=D.exec(w()),C=ka?ka[1]:"";if(z){var la=ja();if(la>parseFloat(C)){B=String(la);break a}}B=C}var ma={};function F(a){return ma[a]||(ma[a]=0<=q(B,a))}var na=g.document,G=na&&z?ja()||("CSS1Compat"==na.compatMode?parseInt(B,10):5):void 0;var H,I,J,K,L,M,N;N=M=L=K=J=I=H=!1;var O=w();O&&(-1!=O.indexOf("Firefox")?H=!0:-1!=O.indexOf("Camino")?I=!0:-1!=O.indexOf("iPhone")||-1!=O.indexOf("iPod")?J=!0:-1!=O.indexOf("iPad")?K=!0:-1!=O.indexOf("Android")?L=!0:-1!=O.indexOf("Chrome")?M=!0:-1!=O.indexOf("Safari")&&(N=!0));var oa=H,pa=I,qa=J,ra=K,P=L,sa=M,ta=N;function Q(a){return(a=a.exec(w()))?a[1]:""}var ua=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(ta)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(P)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var R,va;function S(a){T?va(a):P?q(wa,a):q(ua,a)}var T=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;R=function(a){return 0<=d.c(e,""+a)};va=function(a){d.c(f,""+a)};return!0}(),U; +if(P){var xa=/Android\s+([0-9\.]+)/.exec(w());U=xa?xa[1]:"0"}else U="0";var wa=U;P&&S(2.3);P&&S(4);ta&&S(6);function ya(){this.a=void 0} +function V(a,b,c){switch(typeof b){case "string":Ba(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],V(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ba(f, +c),c.push(":"),V(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var W={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Da=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ba(a,b){b.push('"',a.replace(Da,function(a){if(a in W)return W[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return W[a]=e+b.toString(16)}),'"')};ia||y||A&&(T?R(3.5):z?0<=q(G,3.5):F(3.5))||z&&(T?R(8):z?q(G,8):F(8));function Ea(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Fa;if(Fa=z)Fa=z&&9<=G;Fa||A&&F("1.9.1")}z&&F("9");function Ga(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ha(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ia(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ea(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ja(a);return b}if("document"in a)return b={},b.WINDOW=Ja(a),b;if(aa(a))return Ea(a,X);a=Ga(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ha(a,X);default:return null}} +function Ka(a,b){return"array"==h(a)?Ea(a,function(a){return Ka(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?La(a.ELEMENT,b):"WINDOW"in a?La(a.WINDOW,b):Ha(a,function(a){return Ka(a,b)}):a}function Ma(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ja(a){var b=Ma(a.ownerDocument),c=Ia(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function La(a,b){a=decodeURIComponent(a);var c=b||document,d=Ma(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};function Na(a,b){var c=a,d=window||ea,e;try{var c="string"==typeof c?new d.Function(c):d==window?c:new d.Function("return ("+c+").apply(null,arguments);"),f=Ka(b,d.document),k=c.apply(null,f);e={status:0,value:X(k)}}catch(r){e={status:"code"in r?r.code:13,value:{message:r.message}}}c=[];V(new ya,e,c);return c.join("")};function Oa(a,b,c,d){fa(a,b,c,function(a,b){d(Na(function(){return b},[b]))},function(a){d(Na(function(){throw new n(35,"SQL Error Code: "+a.code+". SQL Error Message: "+a.message);},[]))})}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Oa?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Oa;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/find_element.js b/src/ghostdriver/third_party/webdriver-atoms/find_element.js index 91301e3ac..9c754c229 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/find_element.js +++ b/src/ghostdriver/third_party/webdriver-atoms/find_element.js @@ -1,89 +1,97 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,p=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var fa=Date.now||function(){return+new Date}; -function u(a,b){function c(){}c.prototype=b.prototype;a.oa=b.prototype;a.prototype=new c};var ga=window;function ha(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ia(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function ja(a,b){for(var c=0,d=ia(String(a)).split("."),e=ia(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var n=d[g]||"",v=e[g]||"",w=RegExp("(\\d*)(\\D*)","g"),C=RegExp("(\\d*)(\\D*)","g");do{var T=w.exec(n)||["","",""],U=C.exec(v)||["","",""];if(0==T[0].length&&0==U[0].length)break;c=((0==T[1].length?0:parseInt(T[1],10))<(0==U[1].length?0:parseInt(U[1],10))?-1:(0==T[1].length?0:parseInt(T[1],10))>(0==U[1].length?0:parseInt(U[1],10))?1:0)||((0==T[2].length)<(0==U[2].length)? --1:(0==T[2].length)>(0==U[2].length)?1:0)||(T[2]<U[2]?-1:T[2]>U[2]?1:0)}while(0==c)}return c}function ka(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var la=Array.prototype;function x(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ma(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var n=f[g];b.call(k,n,g,a)&&(d[e++]=n)}return d}function na(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function oa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function pa(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return p}function qa(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function ra(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function sa(a){return la.concat.apply(la,arguments)} -function ta(a,b,c){return 2>=arguments.length?la.slice.call(a,b):la.slice.call(a,b,c)};var ua,va,wa,xa;function ya(){return r.navigator?r.navigator.userAgent:m}xa=wa=va=ua=p;var za;if(za=ya()){var Aa=r.navigator;ua=0==za.indexOf("Opera");va=!ua&&-1!=za.indexOf("MSIE");wa=!ua&&-1!=za.indexOf("WebKit");xa=!ua&&!wa&&"Gecko"==Aa.product}var y=ua,z=va,A=xa,B=wa;function Ba(){var a=r.document;return a?a.documentMode:k}var Ca; -a:{var Da="",Ea;if(y&&r.opera)var Fa=r.opera.version,Da="function"==typeof Fa?Fa():Fa;else if(A?Ea=/rv\:([^\);]+)(\)|;)/:z?Ea=/MSIE\s+([^\);]+)(\)|;)/:B&&(Ea=/WebKit\/(\S+)/),Ea)var Ga=Ea.exec(ya()),Da=Ga?Ga[1]:"";if(z){var Ha=Ba();if(Ha>parseFloat(Da)){Ca=String(Ha);break a}}Ca=Da}var Ia={};function Ja(a){return Ia[a]||(Ia[a]=0<=ja(Ca,a))}function D(a){return z&&Ka>=a}var La=r.document,Ka=!La||!z?k:Ba()||("CSS1Compat"==La.compatMode?parseInt(Ca,10):5);var Ma;!A&&!z||z&&D(9)||A&&Ja("1.9.1");z&&Ja("9");var Na=z||y||B;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function Oa(a,b){this.width=a;this.height=b}Oa.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Oa.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Oa.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Oa.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Pa(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function Qa(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function Ra(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var Sa=3;function F(a){return a?new Ta(G(a)):Ma||(Ma=new Ta)}function Ua(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Va(a){if(Na)return a.parentElement;a=a.parentNode;return ea(a)&&1==a.nodeType?a:m}function Wa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Xa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(z&&!D(9)){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?Ya(a,b):!c&&Wa(e,b)?-1*Za(a,b):!d&&Wa(f,a)?Za(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function Za(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ya(d,a)}function Ya(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function $a(a,b){var c=[];return ab(a,b,c,l)?c[0]:k} -function ab(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||ab(a,b,c,d))return l;a=a.nextSibling}return p}function bb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function Ta(a){this.A=a||r.document||document} -function cb(a,b,c,d){a=d||a.A;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&ra(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function db(a){var b=a.A;a=!B&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}Ta.prototype.contains=Wa;var eb={P:function(a){return!(!a.querySelectorAll||!a.querySelector)},m:function(a,b){a||h(Error("No class name specified"));a=ia(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(eb.P(b))return b.querySelector("."+a.replace(/\./g,"\\."))||m;var c=cb(F(b),"*",a,b);return c.length?c[0]:m},o:function(a,b){a||h(Error("No class name specified"));a=ia(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return eb.P(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):cb(F(b),"*",a,b)}};var fb,gb,hb,ib,jb,kb,lb;lb=kb=jb=ib=hb=gb=fb=p;var H=ya();H&&(-1!=H.indexOf("Firefox")?fb=l:-1!=H.indexOf("Camino")?gb=l:-1!=H.indexOf("iPhone")||-1!=H.indexOf("iPod")?hb=l:-1!=H.indexOf("iPad")?ib=l:-1!=H.indexOf("Android")?jb=l:-1!=H.indexOf("Chrome")?kb=l:-1!=H.indexOf("Safari")&&(lb=l));var mb=fb,nb=gb,ob=hb,pb=ib,qb=jb,rb=kb,sb=lb;function tb(a){return(a=a.exec(ya()))?a[1]:""}var ub=function(){if(mb)return tb(/Firefox\/([0-9.]+)/);if(z||y)return Ca;if(rb)return tb(/Chrome\/([0-9.]+)/);if(sb)return tb(/Version\/([0-9.]+)/);if(ob||pb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(ya());if(a)return a[1]+"."+a[2]}else{if(qb)return(a=tb(/Android\s+([0-9.]+)/))?a:tb(/Version\/([0-9.]+)/);if(nb)return tb(/Camino\/([0-9.]+)/)}return""}();var vb,wb;function xb(a){return yb?vb(a):z?0<=ja(Ka,a):Ja(a)}var yb=function(){if(!A)return p;var a=r.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}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;vb=function(a){return 0<=d.fa(e,""+a)};wb=function(a){d.fa(f,""+a)};return l}(),zb; -if(qb){var Ab=/Android\s+([0-9\.]+)/.exec(ya());zb=Ab?Ab[1]:"0"}else zb="0";var Bb=zb,Cb=z&&!D(8),Db=z&&!D(9),Eb=z&&!D(10);qb&&(yb?wb(2.3):qb?ja(Bb,2.3):ja(ub,2.3));var Fb={m:function(a,b){!da(b.querySelector)&&(z&&xb(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ia(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:m},o:function(a,b){!da(b.querySelectorAll)&&(z&&xb(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ia(a);return b.querySelectorAll(a)}};var Gb={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", +function(){return function(){function h(a){return function(){return this[a]}}function n(a){return function(){return a}}var q=this; +function aa(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function ca(a){return"function"==aa(a)}function da(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ea(a,b,c){return a.call.apply(a.bind,arguments)} +function fa(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)}}function ga(a,b,c){ga=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ea:fa;return ga.apply(null,arguments)} +function ha(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ia=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.ra=b.prototype;a.prototype=new c};var ja=window;function ka(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function la(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} +function ma(a,b){for(var c=0,d=la(String(a)).split("."),e=la(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var m=d[g]||"",t=e[g]||"",v=RegExp("(\\d*)(\\D*)","g"),p=RegExp("(\\d*)(\\D*)","g");do{var k=v.exec(m)||["","",""],l=p.exec(t)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)? +-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c}function na(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var oa=Array.prototype;function u(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function pa(a,b){for(var c=a.length,d=[],e=0,f=r(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var m=f[g];b.call(void 0,m,g,a)&&(d[e++]=m)}return d}function qa(a,b){for(var c=a.length,d=Array(c),e=r(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function ra(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;u(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function sa(a,b){for(var c=a.length,d=r(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 ta(a,b){for(var c=a.length,d=r(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 ua(a,b){var c;a:{c=a.length;for(var d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:r(a)?a.charAt(c):a[c]}function va(a,b){var c;a:if(r(a))c=r(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function wa(a){return oa.concat.apply(oa,arguments)}function xa(a,b,c){return 2>=arguments.length?oa.slice.call(a,b):oa.slice.call(a,b,c)};var ya,za,Aa,Ba;function Ca(){return q.navigator?q.navigator.userAgent:null}Ba=Aa=za=ya=!1;var Da;if(Da=Ca()){var Ea=q.navigator;ya=0==Da.indexOf("Opera");za=!ya&&-1!=Da.indexOf("MSIE");Aa=!ya&&-1!=Da.indexOf("WebKit");Ba=!ya&&!Aa&&"Gecko"==Ea.product}var Ka=ya,w=za,La=Ba,Ma=Aa;function Na(){var a=q.document;return a?a.documentMode:void 0}var Oa; +a:{var Pa="",Qa;if(Ka&&q.opera)var Ra=q.opera.version,Pa="function"==typeof Ra?Ra():Ra;else if(La?Qa=/rv\:([^\);]+)(\)|;)/:w?Qa=/MSIE\s+([^\);]+)(\)|;)/:Ma&&(Qa=/WebKit\/(\S+)/),Qa)var Sa=Qa.exec(Ca()),Pa=Sa?Sa[1]:"";if(w){var Ta=Na();if(Ta>parseFloat(Pa)){Oa=String(Ta);break a}}Oa=Pa}var Ua={};function Va(a){return Ua[a]||(Ua[a]=0<=ma(Oa,a))}var Wa=q.document,x=Wa&&w?Na()||("CSS1Compat"==Wa.compatMode?parseInt(Oa,10):5):void 0;var Xa;!La&&!w||w&&w&&9<=x||La&&Va("1.9.1");w&&Va("9");function Ya(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}Ya.prototype.toString=function(){return"("+this.x+", "+this.y+")"};Ya.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};Ya.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Ya.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function Za(a,b){this.width=a;this.height=b}Za.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Za.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Za.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Za.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function $a(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ab(a){var b=bb,c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function cb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var db=3;function y(a){return a?new eb(z(a)):Xa||(Xa=new eb)}function fb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new Za(a.clientWidth,a.clientHeight)}function gb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function hb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function ib(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=x)){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?jb(a,b):!c&&hb(e,b)?-1*kb(a,b):!d&&hb(f,a)?kb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=z(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(q.Range.START_TO_END,d)}function kb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return jb(d,a)}function jb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function z(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function lb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function eb(a){this.K=a||q.document||document} +function A(a,b,c,d){a=d||a.K;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&va(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c}eb.prototype.contains=hb;var mb={R:function(a){return!(!a.querySelectorAll||!a.querySelector)},n:function(a,b){if(!a)throw Error("No class name specified");a=la(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");if(mb.R(b))return b.querySelector("."+a.replace(/\./g,"\\."))||null;var c=A(y(b),"*",a,b);return c.length?c[0]:null},o:function(a,b){if(!a)throw Error("No class name specified");a=la(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");return mb.R(b)?b.querySelectorAll("."+ +a.replace(/\./g,"\\.")):A(y(b),"*",a,b)}};var nb,ob,pb,qb,rb,sb,tb;tb=sb=rb=qb=pb=ob=nb=!1;var B=Ca();B&&(-1!=B.indexOf("Firefox")?nb=!0:-1!=B.indexOf("Camino")?ob=!0:-1!=B.indexOf("iPhone")||-1!=B.indexOf("iPod")?pb=!0:-1!=B.indexOf("iPad")?qb=!0:-1!=B.indexOf("Android")?rb=!0:-1!=B.indexOf("Chrome")?sb=!0:-1!=B.indexOf("Safari")&&(tb=!0));var ub=nb,vb=ob,wb=pb,xb=qb,yb=rb,zb=sb,Ab=tb;function Bb(a){return(a=a.exec(Ca()))?a[1]:""}var Cb=function(){if(ub)return Bb(/Firefox\/([0-9.]+)/);if(w||Ka)return Oa;if(zb)return Bb(/Chrome\/([0-9.]+)/);if(Ab)return Bb(/Version\/([0-9.]+)/);if(wb||xb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ca());if(a)return a[1]+"."+a[2]}else{if(yb)return(a=Bb(/Android\s+([0-9.]+)/))?a:Bb(/Version\/([0-9.]+)/);if(vb)return Bb(/Camino\/([0-9.]+)/)}return""}();var Db,Eb;function Fb(a){return Gb?Db(a):w?0<=ma(x,a):Va(a)}function Hb(a){Gb?Eb(a):yb?ma(Ib,a):ma(Cb,a)} +var Gb=function(){if(!La)return!1;var a=q.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Db=function(a){return 0<=d.ha(e,""+a)};Eb=function(a){d.ha(f,""+a)};return!0}(),Jb;if(yb){var Kb=/Android\s+([0-9\.]+)/.exec(Ca());Jb=Kb?Kb[1]:"0"}else Jb="0"; +var Ib=Jb,Lb=w&&!(w&&8<=x),Mb=w&&!(w&&9<=x),Nb=w&&!(w&&10<=x);yb&&Hb(2.3);yb&&Hb(4);Ab&&Hb(6);var Ob={n:function(a,b){if(!ca(b.querySelector)&&w&&Fb(8)&&!da(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=la(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:null},o:function(a,b){if(!ca(b.querySelectorAll)&&w&&Fb(8)&&!da(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=la(a);return b.querySelectorAll(a)}};var Pb={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var Hb="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Ib=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Jb(a){Kb.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Ib,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Kb=/^#(?:[0-9a-f]{3}){1,2}$/i,Lb=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Mb(a){var b=a.match(Lb);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Nb=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ob(a){var b=a.match(Nb);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function Pb(a,b){this.code=a;this.state=Qb[a]||Rb;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(Pb,Error); -var Rb="unknown error",Qb={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Qb[13]=Rb;Qb[9]="unknown command";Pb.prototype.toString=function(){return this.name+": "+this.message};function Sb(a,b,c){this.c=a;this.la=b||1;this.j=c||1};var I=z&&!D(9),Tb=z&&!D(8);function Ub(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.na=e;this.parentNode=b}function Vb(a,b,c){var d=Tb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Ub(b,a,b.nodeName,d,c)};function Wb(a){this.O=a;this.C=0}function Xb(a){a=a.match(Yb);for(var b=0;b<a.length;b++)Zb.test(a[b])&&a.splice(b,1);return new Wb(a)}var Yb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Zb=/^\s/;function J(a,b){return a.O[a.C+(b||0)]}Wb.prototype.next=function(){return this.O[this.C++]};Wb.prototype.back=function(){this.C--};Wb.prototype.empty=function(){return this.O.length<=this.C};function K(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function $b(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return p}catch(d){return p}Tb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ac(a,b,c,d,e){return(I?bc:cc).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)} -function bc(a,b,c,d,e){if(a instanceof dc||8==a.i||c&&a.i===m){var f=b.all;if(!f)return e;a=ec(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],n=0;b=f[n++];)$b(b,c,d)&&g.push(b);f=g}for(n=0;b=f[n++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}fc(a,b,c,d,e);return e} -function cc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!z?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?fc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){$b(a,c,d)&&e.add(a)}));return e} -function gc(a,b,c,d,e){var f;if((a instanceof dc||8==a.i||c&&a.i===m)&&(f=b.childNodes)){var g=ec(a);if("*"!=g&&(f=ma(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ma(f,function(a){return $b(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return hc(a,b,c,d,e)}function hc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)$b(b,c,d)&&a.matches(b)&&e.add(b);return e} -function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)$b(b,c,d)&&a.matches(b)&&e.add(b),fc(a,b,c,d,e)}function ec(a){if(a instanceof M){if(8==a.i)return"!";if(a.i===m)return"*"}return a.getName()};function L(){this.j=this.f=m;this.v=0}function ic(a){this.l=a;this.next=this.s=m}function jc(a,b){if(a.f){if(!b.f)return a}else return b;for(var c=a.f,d=b.f,e=m,f=m,g=0;c&&d;)c.l==d.l||c.l instanceof Ub&&d.l instanceof Ub&&c.l.c==d.l.c?(f=c,c=c.next,d=d.next):0<Xa(c.l,d.l)?(f=d,d=d.next):(f=c,c=c.next),(f.s=e)?e.next=f:a.f=f,e=f,g++;for(f=c||d;f;)f.s=e,e=e.next=f,g++,f=f.next;a.j=e;a.v=g;return a} -L.prototype.unshift=function(a){a=new ic(a);a.next=this.f;this.j?this.f.s=a:this.f=this.j=a;this.f=a;this.v++};L.prototype.add=function(a){a=new ic(a);a.s=this.j;this.f?this.j.next=a:this.f=this.j=a;this.j=a;this.v++};function kc(a){return(a=a.f)?a.l:m}L.prototype.n=q("v");function lc(a){return(a=kc(a))?K(a):""}function mc(a,b){return new nc(a,!!b)}function nc(a,b){this.ia=a;this.Q=(this.t=b)?a.j:a.f;this.K=m} -nc.prototype.next=function(){var a=this.Q;if(a==m)return m;var b=this.K=a;this.Q=this.t?a.s:a.next;return b.l};nc.prototype.remove=function(){var a=this.ia,b=this.K;b||h(Error("Next must be called at least once before remove."));var c=b.s,b=b.next;c?c.next=b:a.f=b;b?b.s=c:a.j=c;a.v--;this.K=m};function N(a){this.e=a;this.g=this.p=p;this.w=m}N.prototype.d=q("p");function oc(a,b){a.p=b}function pc(a,b){a.g=b}N.prototype.r=q("w");function O(a,b){var c=a.evaluate(b);return c instanceof L?+lc(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?lc(c):""+c}function qc(a,b){var c=a.evaluate(b);return c instanceof L?!!c.n():!!c};function rc(a,b,c){N.call(this,a.e);this.N=a;this.U=b;this.$=c;this.p=b.d()||c.d();this.g=b.g||c.g;this.N==sc&&(!c.g&&!c.d()&&4!=c.e&&0!=c.e&&b.r()?this.w={name:b.r().name,u:c}:!b.g&&(!b.d()&&4!=b.e&&0!=b.e&&c.r())&&(this.w={name:c.r().name,u:b}))}u(rc,N); -function tc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof L&&c instanceof L){f=mc(b);for(b=f.next();b;b=f.next()){e=mc(c);for(d=e.next();d;d=e.next())if(a(K(b),K(d)))return l}return p}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=mc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+K(d);break;case "boolean":f=!!K(d);break;case "string":f=K(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return p}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}rc.prototype.evaluate=function(a){return this.N.k(this.U,this.$,a)};rc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.N+"\n";a+=" ";b+=this.U.toString(a)+"\n";return b+=this.$.toString(a)};function uc(a,b,c,d){this.ka=a;this.Y=b;this.e=c;this.k=d}uc.prototype.toString=q("ka");var vc={}; -function Q(a,b,c,d){a in vc&&h(Error("Binary operator already created: "+a));a=new uc(a,b,c,d);return vc[a.toString()]=a}Q("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});Q("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});Q("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});Q("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});Q("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});Q("<",4,2,function(a,b,c){return tc(function(a,b){return a<b},a,b,c)}); -Q(">",4,2,function(a,b,c){return tc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return tc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return tc(function(a,b){return a>=b},a,b,c)});var sc=Q("=",3,2,function(a,b,c){return tc(function(a,b){return a==b},a,b,c,l)});Q("!=",3,2,function(a,b,c){return tc(function(a,b){return a!=b},a,b,c,l)});Q("and",2,2,function(a,b,c){return qc(a,c)&&qc(b,c)});Q("or",1,2,function(a,b,c){return qc(a,c)||qc(b,c)});function wc(a,b){b.n()&&4!=a.e&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.e);this.Z=a;this.b=b;this.p=a.d();this.g=a.g}u(wc,N);wc.prototype.evaluate=function(a){a=this.Z.evaluate(a);return xc(this.b,a)};wc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.Z.toString(a);return b+=this.b.toString(a)};function yc(a,b){b.length<a.X&&h(Error("Function "+a.h+" expects at least"+a.X+" arguments, "+b.length+" given"));a.L!==m&&b.length>a.L&&h(Error("Function "+a.h+" expects at most "+a.L+" arguments, "+b.length+" given"));a.ja&&x(b,function(b,d){4!=b.e&&h(Error("Argument "+d+" to function "+a.h+" is not of type Nodeset: "+b))});N.call(this,a.e);this.B=a;this.H=b;oc(this,a.p||pa(b,function(a){return a.d()}));pc(this,a.ha&&!b.length||a.ga&&!!b.length||pa(b,function(a){return a.g}))}u(yc,N); -yc.prototype.evaluate=function(a){return this.B.k.apply(m,sa(a,this.H))};yc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.B+"\n";b+=" ";this.H.length&&(a+=b+"Arguments:",b+=" ",a=oa(this.H,function(a,d){return a+"\n"+d.toString(b)},a));return a};function zc(a,b,c,d,e,f,g,n,v){this.h=a;this.e=b;this.p=c;this.ha=d;this.ga=e;this.k=f;this.X=g;this.L=s(n)?n:g;this.ja=!!v}zc.prototype.toString=q("h");var Ac={}; -function R(a,b,c,d,e,f,g,n){a in Ac&&h(Error("Function already created: "+a+"."));Ac[a]=new zc(a,b,c,d,p,e,f,g,n)}R("boolean",2,p,p,function(a,b){return qc(b,a)},1);R("ceiling",1,p,p,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,p,p,function(a,b){var c=ta(arguments,1);return oa(c,function(b,c){return b+P(c,a)},"")},2,m);R("contains",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,p,p,function(a,b){return b.evaluate(a).n()},1,1,l);R("false",2,p,p,aa(p),0); -R("floor",1,p,p,function(a,b){return Math.floor(O(b,a))},1);R("id",4,p,p,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return qa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!ra(f,a)&&f.push(a)});f.sort(Xa);var g=new L;x(f,function(a){g.add(a)});return g},1);R("lang",2,p,p,aa(p),1); -R("last",1,l,p,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.j},0);R("local-name",3,p,l,function(a,b){var c=b?kc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,l);R("name",3,p,l,function(a,b){var c=b?kc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,l);R("namespace-uri",3,l,p,aa(""),0,1,l);R("normalize-space",3,p,l,function(a,b){return(b?P(b,a):K(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,p,p,function(a,b){return!qc(b,a)},1);R("number",1,p,l,function(a,b){return b?O(b,a):+K(a.c)},0,1);R("position",1,l,p,function(a){return a.la},0);R("round",1,p,p,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,p,l,function(a,b){return b?P(b,a):K(a.c)},0,1);R("string-length",1,p,l,function(a,b){return(b?P(b,a):K(a.c)).length},0,1); -R("substring",3,p,p,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,p,p,function(a,b){for(var c=mc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,l);R("translate",3,p,p,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);R("true",2,p,p,aa(l),0);function M(a,b){this.ca=a;this.V=s(b)?b:m;this.i=m;switch(a){case "comment":this.i=8;break;case "text":this.i=Sa;break;case "processing-instruction":this.i=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Bc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.matches=function(a){return this.i===m||this.i==a.nodeType};M.prototype.getName=q("ca"); -M.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.ca;this.V===m||(b+="\n"+this.V.toString(a+" "));return b};function Cc(a){N.call(this,3);this.ba=a.substring(1,a.length-1)}u(Cc,N);Cc.prototype.evaluate=q("ba");Cc.prototype.toString=function(a){return(a||"")+"literal: "+this.ba};function dc(a){this.h=a.toLowerCase()}dc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.h||this.h==a.nodeName.toLowerCase()?l:this.h==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};dc.prototype.getName=q("h");dc.prototype.toString=function(a){return(a||"")+"nametest: "+this.h};function Dc(a){N.call(this,1);this.da=a}u(Dc,N);Dc.prototype.evaluate=q("da");Dc.prototype.toString=function(a){return(a||"")+"number: "+this.da};function Ec(a,b){N.call(this,a.e);this.S=a;this.z=b;this.p=a.d();this.g=a.g;if(1==this.z.length){var c=this.z[0];!c.J&&c.q==Fc&&(c=c.G,"*"!=c.getName()&&(this.w={name:c.getName(),u:m}))}}u(Ec,N);function Gc(){N.call(this,4)}u(Gc,N);Gc.prototype.evaluate=function(a){var b=new L;a=a.c;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Gc.prototype.toString=function(a){return a+"RootHelperExpr"};function Hc(){N.call(this,4)}u(Hc,N);Hc.prototype.evaluate=function(a){var b=new L;b.add(a.c);return b}; -Hc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Ec.prototype.evaluate=function(a){var b=this.S.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));a=this.z;for(var c=0,d=a.length;c<d&&b.n();c++){var e=a[c],f=mc(b,e.q.t),g;if(!e.d()&&e.q==Ic){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Sb(g))}else if(!e.d()&&e.q==Jc)g=f.next(),b=e.evaluate(new Sb(g));else{g=f.next();for(b=e.evaluate(new Sb(g));(g=f.next())!=m;)g=e.evaluate(new Sb(g)),b=jc(b,g)}}return b}; -Ec.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.S.toString(b);this.z.length&&(c+=b+"Steps:\n",b+=" ",x(this.z,function(a){c+=a.toString(b)}));return c};function Kc(a,b){this.b=a;this.t=!!b}function xc(a,b,c){for(c=c||0;c<a.b.length;c++)for(var d=a.b[c],e=mc(b),f=b.n(),g,n=0;g=e.next();n++){var v=a.t?f-n:n+1;g=d.evaluate(new Sb(g,v,f));var w;"number"==typeof g?w=v==g:"string"==typeof g||"boolean"==typeof g?w=!!g:g instanceof L?w=0<g.n():h(Error("Predicate.evaluate returned an unexpected type."));w||e.remove()}return b}Kc.prototype.r=function(){return 0<this.b.length?this.b[0].r():m}; -Kc.prototype.d=function(){for(var a=0;a<this.b.length;a++){var b=this.b[a];if(b.d()||1==b.e||0==b.e)return l}return p};Kc.prototype.n=function(){return this.b.length};Kc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return oa(this.b,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Lc(a,b,c,d){N.call(this,4);this.q=a;this.G=b;this.b=c||new Kc([]);this.J=!!d;b=this.b.r();a.ma&&b&&(a=b.name,a=I?a.toLowerCase():a,this.w={name:a,u:b.u});this.p=this.b.d()}u(Lc,N); -Lc.prototype.evaluate=function(a){var b=a.c,c=m,c=this.r(),d=m,e=m,f=0;c&&(d=c.name,e=c.u?P(c.u,a):m,f=1);if(this.J)if(!this.d()&&this.q==Mc)c=ac(this.G,b,d,e),c=xc(this.b,c,f);else if(a=mc((new Lc(Nc,new M("node"))).evaluate(a)),b=a.next())for(c=this.k(b,d,e,f);(b=a.next())!=m;)c=jc(c,this.k(b,d,e,f));else c=new L;else c=this.k(a.c,d,e,f);return c};Lc.prototype.k=function(a,b,c,d){a=this.q.B(this.G,a,b,c);return a=xc(this.b,a,d)}; -Lc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.J?"//":"/")+"\n";this.q.h&&(b+=a+"Axis: "+this.q+"\n");b+=this.G.toString(a);if(this.b.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.b.length;c++)var d=c<this.b.length-1?", ":"",b=b+(this.b[c].toString(a)+d);return b};function Oc(a,b,c,d){this.h=a;this.B=b;this.t=c;this.ma=d}Oc.prototype.toString=q("h");var Pc={}; -function S(a,b,c,d){a in Pc&&h(Error("Axis already created: "+a));b=new Oc(a,b,c,!!d);return Pc[a]=b}S("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);S("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Fc=S("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new Ub(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.i===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)I?g.nodeValue&&c.add(Vb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(I?g.nodeValue&&c.add(Vb(b,g,b.sourceIndex)):c.add(g));return c},p),Mc=S("child",function(a,b,c,d,e){return(I?gc:hc).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)},p,l); -S("descendant",ac,p,l);var Nc=S("descendant-or-self",function(a,b,c,d){var e=new L;$b(b,c,d)&&a.matches(b)&&e.add(b);return ac(a,b,c,d,e)},p,l),Ic=S("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)$b(f,c,d)&&a.matches(f)&&e.add(f),e=ac(a,f,c,d,e);while(b=b.parentNode);return e},p,l);S("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},p);S("namespace",function(){return new L},p); -var Qc=S("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},p),Jc=S("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,n=f.length;g<n;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var w=0,C=v.length;w<C;w++)b=v[w],$b(b,c,d)&&a.matches(b)&&e.add(b),e=ac(a,b,c,d,e)}return e},l,l); -S("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Rc=S("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},p);function Sc(a){N.call(this,1);this.R=a;this.p=a.d();this.g=a.g}u(Sc,N);Sc.prototype.evaluate=function(a){return-O(this.R,a)};Sc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.R.toString(a+" ")};function Tc(a){N.call(this,4);this.D=a;oc(this,pa(this.D,function(a){return a.d()}));pc(this,pa(this.D,function(a){return a.g}))}u(Tc,N);Tc.prototype.evaluate=function(a){var b=new L;x(this.D,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=jc(b,c)});return b};Tc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.D,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Uc(a){this.a=a}function Vc(a){for(var b,c=[];;){V(a,"Missing right hand side of binary expression.");b=Wc(a);var d=a.a.next();if(!d)break;var e=(d=vc[d]||m)&&d.Y;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Y;)b=new rc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new rc(c.pop(),c.pop(),b);return b}function V(a,b){a.a.empty()&&h(Error(b))}function Xc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Yc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Zc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Cc(a)}function $c(a){return"*"!=J(a.a)&&":"==J(a.a,1)&&"*"==J(a.a,2)?new dc(a.a.next()+a.a.next()+a.a.next()):new dc(a.a.next())} -function ad(a){var b,c=[],d;if("/"==J(a.a)||"//"==J(a.a)){b=a.a.next();d=J(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Gc;d=new Gc;V(a,"Missing next location step.");b=bd(a,b);c.push(b)}else{a:{b=J(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Vc(a);V(a,'unclosed "("');Xc(a,")");break;case '"':case "'":b=Zc(a);break;default:if(isNaN(+b))if(!Bc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==J(a.a,1)){b=a.a.next();b=Ac[b]||m;a.a.next();for(d=[];")"!=J(a.a);){V(a,"Missing function argument list.");d.push(Vc(a));if(","!=J(a.a))break;a.a.next()}V(a,"Unclosed function argument list.");Yc(a);b=new yc(b,d)}else{b=m;break a}else b=new Dc(+a.a.next())}"["==J(a.a)&&(d=new Kc(cd(a)),b=new wc(b,d))}if(b)if("/"==J(a.a)||"//"==J(a.a))d=b;else return b;else b=bd(a,"/"),d=new Hc,c.push(b)}for(;"/"==J(a.a)||"//"==J(a.a);)b=a.a.next(),V(a,"Missing next location step."),b=bd(a,b),c.push(b);return new Ec(d, -c)} -function bd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==J(a.a))return d=new Lc(Rc,new M("node")),a.a.next(),d;if(".."==J(a.a))return d=new Lc(Qc,new M("node")),a.a.next(),d;var f;"@"==J(a.a)?(f=Fc,a.a.next(),V(a,"Missing attribute name")):"::"==J(a.a,1)?(/(?![0-9])[\w]/.test(J(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Pc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),V(a,"Missing node name")):f=Mc;e=J(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==J(a.a, -1)){Bc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Bc(c)||h(Error("Invalid type name: "+c));Xc(a,"(");V(a,"Bad nodetype");e=J(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Zc(a);V(a,"Bad nodetype");Yc(a);c=new M(c,g)}else c=$c(a);else"*"==e?c=$c(a):h(Error("Bad token: "+a.a.next()));e=new Kc(cd(a),f.t);return d||new Lc(f,c,e,"//"==b)} -function cd(a){for(var b=[];"["==J(a.a);){a.a.next();V(a,"Missing predicate expression.");var c=Vc(a);b.push(c);V(a,"Unclosed predicate expression.");Xc(a,"]")}return b}function Wc(a){if("-"==J(a.a))return a.a.next(),new Sc(Wc(a));var b=ad(a);if("|"!=J(a.a))a=b;else{for(b=[b];"|"==a.a.next();)V(a,"Missing next union location path."),b.push(ad(a));a.a.back();a=new Tc(b)}return a};function dd(a){a.length||h(Error("Empty XPath expression."));a=Xb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Vc(new Uc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Sb(a));return new W(e,d)}} -function W(a,b){0==b&&(a instanceof L?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof L))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?lc(a):""+a;break;case 1:this.numberValue=a instanceof L?+lc(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.n():!!a;break;case 4:case 5:case 6:case 7:var d=mc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Ub?e.c:e);this.snapshotLength=a.n();this.invalidIteratorState=p;break;case 8:case 9:d=kc(a);this.singleNodeValue=d instanceof Ub?d.c:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function ed(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=W,b.evaluate=function(a,b,e,f){return(new dd(a)).evaluate(b,f)},b.createExpression=function(a){return new dd(a)})};var X={};X.ea=function(){var a={pa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();X.k=function(a,b,c){var d=G(a);(z||qb)&&ed(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.ea;return z&&!Ja(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){A&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new Pb(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -X.I=function(a,b){(!a||1!=a.nodeType)&&h(new Pb(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};X.m=function(a,b){var c=function(){var c=X.k(b,a,9);return c?(c=c.singleNodeValue,y?c:c||m):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||X.I(c,a);return c}; -X.o=function(a,b){var c=function(){var c=X.k(b,a,7);if(c){var e=c.snapshotLength;y&&!s(e)&&X.I(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){X.I(b,a)});return c};!y&&(!B||xb("533"));function fd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function gd(a,b){return fd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function hd(a){var b=a.getBoundingClientRect();z&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function id(a){if(z&&!D(8))return a.offsetParent;var b=G(a),c=gd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=gd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function jd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=hd(a);b.x=c.left;b.y=c.top}else{c=db(F(a));var d,e=G(a),f=gd(a,"position"),g=A&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),n=new E(0,0),v;d=e?G(e):document;if(v=z)if(v=!D(9))v="CSS1Compat"!=F(d).A.compatMode;v=v?d.body:d.documentElement;if(a!=v)if(a.getBoundingClientRect)d=hd(a),e=db(F(e)),n.x=d.left+e.x,n.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(v),n.x=d.screenX-e.screenX,n.y=d.screenY-e.screenY;else{g=a;do{n.x+=g.offsetLeft;n.y+=g.offsetTop;g!=a&&(n.x+=g.clientLeft||0,n.y+=g.clientTop||0);if(B&&"fixed"==gd(g,"position")){n.x+=e.body.scrollLeft;n.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(y||B&&"absolute"==f)n.y-=e.body.offsetTop;for(g=a;(g=id(g))&&g!=e.body&&g!=v;)if(n.x-=g.scrollLeft,!y||"TR"!=g.tagName)n.y-=g.scrollTop}b.x=n.x-c.x;b.y=n.y-c.y}if(A&&!Ja(12)){var w;z?w="-ms-transform": -B?w="-webkit-transform":y?w="-o-transform":A&&(w="-moz-transform");var C;w&&(C=gd(a,w));C||(C=gd(a,"transform"));C?(a=C.match(kd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else w=da(a.T),C=a,a.targetTouches?C=a.targetTouches[0]:w&&a.T().targetTouches&&(C=a.T().targetTouches[0]),b.x=C.clientX,b.y=C.clientY;return b} -function ld(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=hd(a),new Oa(a.right-a.left,a.bottom-a.top)):new Oa(b,c)}var kd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var md=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function nd(a){var b=[];x(a.split(md),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return y?b.replace(/\w+:;/g,""):b} -function od(a,b){b=b.toLowerCase();if("style"==b)return nd(a.style.cssText);if(Cb&&"value"==b&&Y(a,"INPUT"))return a.value;if(Db&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}function pd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:m} -function Z(a,b){var c=ka(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Db?"styleFloat":"cssFloat";c=fd(a,c)||qd(a,c);if(c===m)c=m;else if(ra(Hb,b)&&(Kb.test("#"==c.charAt(0)?c:"#"+c)||Ob(c).length||Gb&&Gb[c.toLowerCase()]||Mb(c).length)){var d=Mb(c);if(!d.length){a:if(d=Ob(c),!d.length){d=Gb[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Kb.test(d)&&(d=Jb(d),d=Jb(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function qd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&da(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=pd(a))?qd(c,b):m} -function rd(a){if(da(a.getBBox)&&!Y(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=Z(a,"overflow")?a=l:(a=pd(a),!a||!Y(a,"HTML")?a=l:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ga).document;a=b.documentElement;var d=b.body;d||h(new Pb(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new Oa(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new Oa(a.clientWidth,a.clientHeight);return a}if("none"!=gd(a,"display"))a=ld(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=ld(a);b.display=d;b.position=f;b.visibility=e}return a} -function sd(a,b){function c(a){if("none"==Z(a,"display"))return p;a=pd(a);return!a||c(a)}function d(a){var b=rd(a);return 0<b.height&&0<b.width?l:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):pa(a.childNodes,function(b){return b.nodeType==Sa&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a,b){var c;if((c=b==m?Va(a):Va(b))&&("hidden"==Z(c,"overflow-x")||"hidden"==Z(c,"overflow-y"))){var d=rd(c),f=jd(c),g=jd(a);return f.x+d.width<=g.x&&"hidden"==Z(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==Z(c,"overflow-y")?p:l}return!c||e(a,c)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=jd(a),a=rd(a),0<=b.x+a.width&&0<=b.y+a.height?l:p;a=pd(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=bb(a,function(a){return Y(a,"SELECT")});return!!g&&sd(g,l)}if(Y(a,"MAP")){if(!a.name)return p;g=G(a);g= -g.evaluate?X.m('/descendant::*[@usemap = "#'+a.name+'"]',g):$a(g,function(b){return Y(b)&&od(b,"usemap")=="#"+a.name});return!!g&&sd(g,b)}return Y(a,"AREA")?(g=bb(a,function(a){return Y(a,"MAP")}),!!g&&sd(g,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==td(a)||!d(a)||!e(a,m)?p:f(a)}function ud(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function vd(a){var b=[];wd(a,b);b=na(b,ud);return ud(b.join("\n")).replace(/\xa0/g," ")} -function wd(a,b){if(Y(a,"BR"))b.push("");else{var c=Y(a,"TD"),d=Z(a,"display"),e=!c&&!ra(xd,d),f=a.previousElementSibling!=k?a.previousElementSibling:Ua(a.previousSibling),f=f?Z(f,"display"):"",g=Z(a,"float")||Z(a,"cssFloat")||Z(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var n=sd(a),v=m,w=m;n&&(v=Z(a,"white-space"),w=Z(a,"text-transform"));x(a.childNodes,function(a){a.nodeType==Sa&&n?yd(a,b,v,w):Y(a)&&wd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!ha(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var xd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function yd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ha(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function td(a){if(Eb){if("relative"==Z(a,"position"))return 1;a=Z(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return zd(a)}function zd(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=pd(a))&&(b*=zd(a));return b};var $={},Ad={};$.aa=function(a,b,c){var d;try{d=Fb.o("a",b)}catch(e){d=cb(F(b),"A",m,b)}return qa(d,function(b){b=vd(b);return c&&-1!=b.indexOf(a)||b==a})};$.W=function(a,b,c){var d;try{d=Fb.o("a",b)}catch(e){d=cb(F(b),"A",m,b)}return ma(d,function(b){b=vd(b);return c&&-1!=b.indexOf(a)||b==a})};$.m=function(a,b){return $.aa(a,b,p)};$.o=function(a,b){return $.W(a,b,p)};Ad.m=function(a,b){return $.aa(a,b,l)};Ad.o=function(a,b){return $.W(a,b,l)};var Bd={m:function(a,b){return b.getElementsByTagName(a)[0]||m},o:function(a,b){return b.getElementsByTagName(a)}};var Cd={className:eb,"class name":eb,css:Fb,"css selector":Fb,id:{m:function(a,b){var c=F(b),d=t(a)?c.A.getElementById(a):a;if(!d)return m;if(od(d,"id")==a&&Wa(b,d))return d;c=cb(c,"*");return qa(c,function(c){return od(c,"id")==a&&Wa(b,c)})},o:function(a,b){var c=cb(F(b),"*",m,b);return ma(c,function(b){return od(b,"id")==a})}},linkText:$,"link text":$,name:{m:function(a,b){var c=cb(F(b),"*",m,b);return qa(c,function(b){return od(b,"name")==a})},o:function(a,b){var c=cb(F(b),"*",m,b);return ma(c, -function(b){return od(b,"name")==a})}},partialLinkText:Ad,"partial link text":Ad,tagName:Bd,"tag name":Bd,xpath:X};function Dd(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=m}if(c){var d=Cd[c];if(d&&da(d.m))return d.m(a[c],b||ga.document)}h(Error("Unsupported locator strategy: "+c))};function Ed(){this.F=k} -function Fd(a,b,c){switch(typeof b){case "string":Gd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fd(a,a.F?a.F.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Gd(f, -c),c.push(":"),Fd(a,a.F?a.F.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Hd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Id=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Gd(a,b){b.push('"',a.replace(Id,function(a){if(a in Hd)return Hd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Hd[a]=e+b.toString(16)}),'"')};B||y||A&&xb(3.5)||z&&xb(8);function Jd(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return na(a,Jd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Kd(a);return b}if("document"in a)return b={},b.WINDOW=Kd(a),b;if(ca(a))return na(a,Jd);a=Pa(a,function(a,b){return"number"==typeof b||t(b)});return Qa(a,Jd);default:return m}} -function Ld(a,b){return"array"==ba(a)?na(a,function(a){return Ld(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?Md(a.ELEMENT,b):"WINDOW"in a?Md(a.WINDOW,b):Qa(a,function(a){return Ld(a,b)}):a}function Nd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.M=fa());b.M||(b.M=fa());return b}function Kd(a){var b=Nd(a.ownerDocument),c=Ra(b,function(b){return b==a});c||(c=":wdc:"+b.M++,b[c]=a);return c} -function Md(a,b){a=decodeURIComponent(a);var c=b||document,d=Nd(c);a in d||h(new Pb(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new Pb(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new Pb(10,"Element is no longer attached to the DOM"))};function Od(a,b,c){var d={};d[a]=b;a=Dd;c=[d,c];var d=window||ga,e;try{a=t(a)?new d.Function(a):d==window?a:new d.Function("return ("+a+").apply(null,arguments);");var f=Ld(c,d.document),g=a.apply(m,f);e={status:0,value:Jd(g)}}catch(n){e={status:"code"in n?n.code:13,value:{message:n.message}}}f=[];Fd(new Ed,e,f);return f.join("")}var Pd=["_"],Qd=r;!(Pd[0]in Qd)&&Qd.execScript&&Qd.execScript("var "+Pd[0]);for(var Rd;Pd.length&&(Rd=Pd.shift());)!Pd.length&&s(Od)?Qd[Rd]=Od:Qd=Qd[Rd]?Qd[Rd]:Qd[Rd]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Qb="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Rb=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Sb=/^#(?:[0-9a-f]{3}){1,2}$/i,Tb=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ub=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Vb(a,b){this.code=a;this.state=Wb[a]||Xb;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(Vb,Error); +var Xb="unknown error",Wb={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Wb[13]=Xb;Wb[9]="unknown command";Vb.prototype.toString=function(){return this.name+": "+this.message};function Yb(a,b,c){this.c=a;this.oa=b||1;this.j=c||1};var C=w&&!(w&&9<=x),Zb=w&&!(w&&8<=x);function $b(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.qa=e;this.parentNode=b}function ac(a,b,c){var d=Zb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $b(b,a,b.nodeName,d,c)};function bc(a){this.Q=a;this.C=0}function cc(a){a=a.match(dc);for(var b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);return new bc(a)}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function D(a,b){return a.Q[a.C+(b||0)]}bc.prototype.next=function(){return this.Q[this.C++]};bc.prototype.back=function(){this.C--};bc.prototype.empty=function(){return this.Q.length<=this.C};function E(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(C&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),C&&"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} +function F(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Zb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function fc(a,b,c,d,e){return(C?gc:hc).call(null,a,b,r(c)?c:null,r(d)?d:null,e||new G)} +function gc(a,b,c,d,e){if(a instanceof ic||8==a.i||c&&null===a.i){var f=b.all;if(!f)return e;a=jc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],m=0;b=f[m++];)F(b,c,d)&&g.push(b);f=g}for(m=0;b=f[m++];)"*"==a&&"!"==b.tagName||e.add(b);return e}kc(a,b,c,d,e);return e} +function hc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof H?kc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),u(b,function(a){F(a,c,d)&&e.add(a)}));return e} +function lc(a,b,c,d,e){var f;if((a instanceof ic||8==a.i||c&&null===a.i)&&(f=b.childNodes)){var g=jc(a);if("*"!=g&&(f=pa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=pa(f,function(a){return F(a,c,d)}));u(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return mc(a,b,c,d,e)}function mc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)F(b,c,d)&&a.matches(b)&&e.add(b);return e} +function kc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)F(b,c,d)&&a.matches(b)&&e.add(b),kc(a,b,c,d,e)}function jc(a){if(a instanceof H){if(8==a.i)return"!";if(null===a.i)return"*"}return a.getName()};function G(){this.j=this.f=null;this.v=0}function nc(a){this.m=a;this.next=this.s=null}function oc(a,b){if(!a.f)return b;if(!b.f)return a;for(var c=a.f,d=b.f,e=null,f=null,g=0;c&&d;)c.m==d.m||c.m instanceof $b&&d.m instanceof $b&&c.m.c==d.m.c?(f=c,c=c.next,d=d.next):0<ib(c.m,d.m)?(f=d,d=d.next):(f=c,c=c.next),(f.s=e)?e.next=f:a.f=f,e=f,g++;for(f=c||d;f;)f.s=e,e=e.next=f,g++,f=f.next;a.j=e;a.v=g;return a} +G.prototype.unshift=function(a){a=new nc(a);a.next=this.f;this.j?this.f.s=a:this.f=this.j=a;this.f=a;this.v++};G.prototype.add=function(a){a=new nc(a);a.s=this.j;this.f?this.j.next=a:this.f=this.j=a;this.j=a;this.v++};function pc(a){return(a=a.f)?a.m:null}G.prototype.l=h("v");function qc(a){return(a=pc(a))?E(a):""}function I(a,b){return new rc(a,!!b)}function rc(a,b){this.ka=a;this.S=(this.t=b)?a.j:a.f;this.L=null} +rc.prototype.next=function(){var a=this.S;if(null==a)return null;var b=this.L=a;this.S=this.t?a.s:a.next;return b.m};rc.prototype.remove=function(){var a=this.ka,b=this.L;if(!b)throw Error("Next must be called at least once before remove.");var c=b.s,b=b.next;c?c.next=b:a.f=b;b?b.s=c:a.j=c;a.v--;this.L=null};function J(a){this.e=a;this.g=this.p=!1;this.w=null}function K(a){return"\n "+a.toString().split("\n").join("\n ")}J.prototype.d=h("p");function sc(a,b){a.p=b}function tc(a,b){a.g=b}J.prototype.r=h("w");function L(a,b){var c=a.evaluate(b);return c instanceof G?+qc(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof G?qc(c):""+c}function uc(a,b){var c=a.evaluate(b);return c instanceof G?!!c.l():!!c};function vc(a,b,c){J.call(this,a.e);this.P=a;this.W=b;this.ba=c;this.p=b.d()||c.d();this.g=b.g||c.g;this.P==wc&&(c.g||c.d()||4==c.e||0==c.e||!b.r()?b.g||(b.d()||4==b.e||0==b.e||!c.r())||(this.w={name:c.r().name,u:b}):this.w={name:b.r().name,u:c})}s(vc,J); +function xc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof G&&c instanceof G){e=I(b);for(d=e.next();d;d=e.next())for(b=I(c),f=b.next();f;f=b.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof G||c instanceof G){b instanceof G?e=b:(e=c,c=b);e=I(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+E(d);break;case "boolean":d=!!E(d);break;case "string":d=E(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}vc.prototype.evaluate=function(a){return this.P.k(this.W,this.ba,a)};vc.prototype.toString=function(){var a="Binary Expression: "+this.P,a=a+K(this.W);return a+=K(this.ba)};function yc(a,b,c,d){this.na=a;this.$=b;this.e=c;this.k=d}yc.prototype.toString=h("na");var zc={}; +function N(a,b,c,d){if(zc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new yc(a,b,c,d);return zc[a.toString()]=a}N("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});N("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});N("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});N("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});N("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});N("<",4,2,function(a,b,c){return xc(function(a,b){return a<b},a,b,c)}); +N(">",4,2,function(a,b,c){return xc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return xc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return xc(function(a,b){return a>=b},a,b,c)});var wc=N("=",3,2,function(a,b,c){return xc(function(a,b){return a==b},a,b,c,!0)});N("!=",3,2,function(a,b,c){return xc(function(a,b){return a!=b},a,b,c,!0)});N("and",2,2,function(a,b,c){return uc(a,c)&&uc(b,c)});N("or",1,2,function(a,b,c){return uc(a,c)||uc(b,c)});function Ac(a,b){if(b.l()&&4!=a.e)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.e);this.aa=a;this.b=b;this.p=a.d();this.g=a.g}s(Ac,J);Ac.prototype.evaluate=function(a){a=this.aa.evaluate(a);return Bc(this.b,a)};Ac.prototype.toString=function(){var a;a="Filter:"+K(this.aa);return a+=K(this.b)};function Cc(a,b){if(b.length<a.Z)throw Error("Function "+a.h+" expects at least"+a.Z+" arguments, "+b.length+" given");if(null!==a.M&&b.length>a.M)throw Error("Function "+a.h+" expects at most "+a.M+" arguments, "+b.length+" given");a.la&&u(b,function(b,d){if(4!=b.e)throw Error("Argument "+d+" to function "+a.h+" is not of type Nodeset: "+b);});J.call(this,a.e);this.B=a;this.H=b;sc(this,a.p||sa(b,function(a){return a.d()}));tc(this,a.ja&&!b.length||a.ia&&!!b.length||sa(b,function(a){return a.g}))} +s(Cc,J);Cc.prototype.evaluate=function(a){return this.B.k.apply(null,wa(a,this.H))};Cc.prototype.toString=function(){var a="Function: "+this.B;if(this.H.length)var b=ra(this.H,function(a,b){return a+K(b)},"Arguments:"),a=a+K(b);return a};function Dc(a,b,c,d,e,f,g,m,t){this.h=a;this.e=b;this.p=c;this.ja=d;this.ia=e;this.k=f;this.Z=g;this.M=void 0!==m?m:g;this.la=!!t}Dc.prototype.toString=h("h");var Ec={}; +function O(a,b,c,d,e,f,g,m){if(Ec.hasOwnProperty(a))throw Error("Function already created: "+a+".");Ec[a]=new Dc(a,b,c,d,!1,e,f,g,m)}O("boolean",2,!1,!1,function(a,b){return uc(b,a)},1);O("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1);O("concat",3,!1,!1,function(a,b){var c=xa(arguments,1);return ra(c,function(b,c){return b+M(c,a)},"")},2,null);O("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2); +O("count",1,!1,!1,function(a,b){return b.evaluate(a).l()},1,1,!0);O("false",2,!1,!1,n(!1),0);O("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +O("id",4,!1,!1,function(a,b){function c(a){if(C){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ua(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];u(d,function(a){(a=c(a))&&!va(f,a)&&f.push(a)});f.sort(ib);var g=new G;u(f,function(a){g.add(a)});return g},1);O("lang",2,!1,!1,n(!1),1); +O("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.j},0);O("local-name",3,!1,!0,function(a,b){var c=b?pc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,!0);O("name",3,!1,!0,function(a,b){var c=b?pc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,!0);O("namespace-uri",3,!0,!1,n(""),0,1,!0);O("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):E(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +O("not",2,!1,!1,function(a,b){return!uc(b,a)},1);O("number",1,!1,!0,function(a,b){return b?L(b,a):+E(a.c)},0,1);O("position",1,!0,!1,function(a){return a.oa},0);O("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);O("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,!1,!0,function(a,b){return b?M(b,a):E(a.c)},0,1);O("string-length",1,!1,!0,function(a,b){return(b?M(b,a):E(a.c)).length},0,1); +O("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +O("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,!1,!1,function(a,b){for(var c=I(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+E(e);return d},1,1,!0);O("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(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);O("true",2,!1,!1,n(!0),0);function H(a,b){this.ea=a;this.X=void 0!==b?b:null;this.i=null;switch(a){case "comment":this.i=8;break;case "text":this.i=db;break;case "processing-instruction":this.i=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Fc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}H.prototype.matches=function(a){return null===this.i||this.i==a.nodeType};H.prototype.getName=h("ea"); +H.prototype.toString=function(){var a="Kind Test: "+this.ea;null===this.X||(a+=K(this.X));return a};function Gc(a){J.call(this,3);this.da=a.substring(1,a.length-1)}s(Gc,J);Gc.prototype.evaluate=h("da");Gc.prototype.toString=function(){return"Literal: "+this.da};function ic(a,b){this.h=a.toLowerCase();this.N=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}ic.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.h&&this.h!=a.nodeName.toLowerCase()?!1:this.N==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};ic.prototype.getName=h("h");ic.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.N?"":this.N+":")+this.h};function Hc(a){J.call(this,1);this.fa=a}s(Hc,J);Hc.prototype.evaluate=h("fa");Hc.prototype.toString=function(){return"Number: "+this.fa};function Ic(a,b){J.call(this,a.e);this.U=a;this.A=b;this.p=a.d();this.g=a.g;if(1==this.A.length){var c=this.A[0];c.J||c.q!=Jc||(c=c.G,"*"!=c.getName()&&(this.w={name:c.getName(),u:null}))}}s(Ic,J);function Kc(){J.call(this,4)}s(Kc,J);Kc.prototype.evaluate=function(a){var b=new G;a=a.c;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Kc.prototype.toString=n("Root Helper Expression");function Lc(){J.call(this,4)}s(Lc,J);Lc.prototype.evaluate=function(a){var b=new G;b.add(a.c);return b}; +Lc.prototype.toString=n("Context Helper Expression"); +Ic.prototype.evaluate=function(a){var b=this.U.evaluate(a);if(!(b instanceof G))throw Error("Filter expression must evaluate to nodeset.");a=this.A;for(var c=0,d=a.length;c<d&&b.l();c++){var e=a[c],f=I(b,e.q.t),g;if(e.d()||e.q!=Mc)if(e.d()||e.q!=Nc)for(g=f.next(),b=e.evaluate(new Yb(g));null!=(g=f.next());)g=e.evaluate(new Yb(g)),b=oc(b,g);else g=f.next(),b=e.evaluate(new Yb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Yb(g))}}return b}; +Ic.prototype.toString=function(){var a;a="Path Expression:"+K(this.U);if(this.A.length){var b=ra(this.A,function(a,b){return a+K(b)},"Steps:");a+=K(b)}return a};function Oc(a,b){this.b=a;this.t=!!b}function Bc(a,b,c){for(c=c||0;c<a.b.length;c++)for(var d=a.b[c],e=I(b),f=b.l(),g,m=0;g=e.next();m++){var t=a.t?f-m:m+1;g=d.evaluate(new Yb(g,t,f));if("number"==typeof g)t=t==g;else if("string"==typeof g||"boolean"==typeof g)t=!!g;else if(g instanceof G)t=0<g.l();else throw Error("Predicate.evaluate returned an unexpected type.");t||e.remove()}return b}Oc.prototype.r=function(){return 0<this.b.length?this.b[0].r():null}; +Oc.prototype.d=function(){for(var a=0;a<this.b.length;a++){var b=this.b[a];if(b.d()||1==b.e||0==b.e)return!0}return!1};Oc.prototype.l=function(){return this.b.length};Oc.prototype.toString=function(){return ra(this.b,function(a,b){return a+K(b)},"Predicates:")};function Q(a,b,c,d){J.call(this,4);this.q=a;this.G=b;this.b=c||new Oc([]);this.J=!!d;b=this.b.r();a.pa&&b&&(a=b.name,a=C?a.toLowerCase():a,this.w={name:a,u:b.u});this.p=this.b.d()}s(Q,J); +Q.prototype.evaluate=function(a){var b=a.c,c=null,c=this.r(),d=null,e=null,f=0;c&&(d=c.name,e=c.u?M(c.u,a):null,f=1);if(this.J)if(this.d()||this.q!=Pc)if(a=I((new Q(Qc,new H("node"))).evaluate(a)),b=a.next())for(c=this.k(b,d,e,f);null!=(b=a.next());)c=oc(c,this.k(b,d,e,f));else c=new G;else c=fc(this.G,b,d,e),c=Bc(this.b,c,f);else c=this.k(a.c,d,e,f);return c};Q.prototype.k=function(a,b,c,d){a=this.q.B(this.G,a,b,c);return a=Bc(this.b,a,d)}; +Q.prototype.toString=function(){var a;a="Step:"+K("Operator: "+(this.J?"//":"/"));this.q.h&&(a+=K("Axis: "+this.q));a+=K(this.G);if(this.b.l()){var b=ra(this.b.b,function(a,b){return a+K(b)},"Predicates:");a+=K(b)}return a};function Rc(a,b,c,d){this.h=a;this.B=b;this.t=c;this.pa=d}Rc.prototype.toString=h("h");var Sc={};function R(a,b,c,d){if(Sc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Rc(a,b,c,!!d);return Sc[a]=b} +R("ancestor",function(a,b){for(var c=new G,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);R("ancestor-or-self",function(a,b){var c=new G,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Jc=R("attribute",function(a,b){var c=new G,d=a.getName();if("style"==d&&b.style&&C)return c.add(new $b(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof H&&null===a.i||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)C?g.nodeValue&&c.add(ac(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(C?g.nodeValue&&c.add(ac(b,g,b.sourceIndex)):c.add(g));return c},!1),Pc=R("child",function(a,b,c,d,e){return(C?lc:mc).call(null,a,b,r(c)?c:null,r(d)?d:null,e||new G)},!1,!0); +R("descendant",fc,!1,!0);var Qc=R("descendant-or-self",function(a,b,c,d){var e=new G;F(b,c,d)&&a.matches(b)&&e.add(b);return fc(a,b,c,d,e)},!1,!0),Mc=R("following",function(a,b,c,d){var e=new G;do for(var f=b;f=f.nextSibling;)F(f,c,d)&&a.matches(f)&&e.add(f),e=fc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);R("following-sibling",function(a,b){for(var c=new G,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);R("namespace",function(){return new G},!1); +var Tc=R("parent",function(a,b){var c=new G;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Nc=R("preceding",function(a,b,c,d){var e=new G,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,m=f.length;g<m;g++){var t=[];for(b=f[g];b=b.previousSibling;)t.unshift(b);for(var v=0,p=t.length;v<p;v++)b=t[v],F(b,c,d)&&a.matches(b)&&e.add(b),e=fc(a,b,c,d,e)}return e},!0,!0); +R("preceding-sibling",function(a,b){for(var c=new G,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Uc=R("self",function(a,b){var c=new G;a.matches(b)&&c.add(b);return c},!1);function Vc(a){J.call(this,1);this.T=a;this.p=a.d();this.g=a.g}s(Vc,J);Vc.prototype.evaluate=function(a){return-L(this.T,a)};Vc.prototype.toString=function(){return"Unary Expression: -"+K(this.T)};function Wc(a){J.call(this,4);this.D=a;sc(this,sa(this.D,function(a){return a.d()}));tc(this,sa(this.D,function(a){return a.g}))}s(Wc,J);Wc.prototype.evaluate=function(a){var b=new G;u(this.D,function(c){c=c.evaluate(a);if(!(c instanceof G))throw Error("Path expression must evaluate to NodeSet.");b=oc(b,c)});return b};Wc.prototype.toString=function(){return ra(this.D,function(a,b){return a+K(b)},"Union Expression:")};function Xc(a,b){this.a=a;this.ma=b}function Yc(a){for(var b,c=[];;){S(a,"Missing right hand side of binary expression.");b=Zc(a);var d=a.a.next();if(!d)break;var e=(d=zc[d]||null)&&d.$;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].$;)b=new vc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new vc(c.pop(),c.pop(),b);return b}function S(a,b){if(a.a.empty())throw Error(b);}function $c(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function ad(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function bd(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Gc(a)}function cd(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new ic(b);var d=b.substring(0,c);a=a.ma(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new ic(b,a)} +function dd(a){var b,c=[],d;if("/"==D(a.a)||"//"==D(a.a)){b=a.a.next();d=D(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Kc;d=new Kc;S(a,"Missing next location step.");b=ed(a,b);c.push(b)}else{a:{b=D(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Yc(a);S(a,'unclosed "("');$c(a,")");break;case '"':case "'":b=bd(a);break;default:if(isNaN(+b))if(!Fc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==D(a.a,1)){b=a.a.next();b=Ec[b]||null;a.a.next();for(d=[];")"!=D(a.a);){S(a,"Missing function argument list.");d.push(Yc(a));if(","!=D(a.a))break;a.a.next()}S(a,"Unclosed function argument list.");ad(a);b=new Cc(b,d)}else{b=null;break a}else b=new Hc(+a.a.next())}"["==D(a.a)&&(d=new Oc(fd(a)),b=new Ac(b,d))}if(b)if("/"==D(a.a)||"//"==D(a.a))d=b;else return b;else b=ed(a,"/"),d=new Lc,c.push(b)}for(;"/"==D(a.a)||"//"==D(a.a);)b=a.a.next(),S(a,"Missing next location step."),b=ed(a,b),c.push(b); +return new Ic(d,c)} +function ed(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a))return d=new Q(Uc,new H("node")),a.a.next(),d;if(".."==D(a.a))return d=new Q(Tc,new H("node")),a.a.next(),d;var f;if("@"==D(a.a))f=Jc,a.a.next(),S(a,"Missing attribute name");else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Sc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();S(a,"Missing node name")}else f=Pc; +c=D(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==D(a.a,1)){if(!Fc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!Fc(c))throw Error("Invalid type name: "+c);$c(a,"(");S(a,"Bad nodetype");e=D(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=bd(a);S(a,"Bad nodetype");ad(a);c=new H(c,g)}else c=cd(a);else if("*"==c)c=cd(a);else throw Error("Bad token: "+a.a.next());e=new Oc(fd(a),f.t);return d||new Q(f,c,e,"//"==b)} +function fd(a){for(var b=[];"["==D(a.a);){a.a.next();S(a,"Missing predicate expression.");var c=Yc(a);b.push(c);S(a,"Unclosed predicate expression.");$c(a,"]")}return b}function Zc(a){if("-"==D(a.a))return a.a.next(),new Vc(Zc(a));var b=dd(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==a.a.next();)S(a,"Missing next union location path."),b.push(dd(a));a.a.back();a=new Wc(b)}return a};function gd(a){switch(a.nodeType){case 1:return ha(hd,a);case 9:return gd(a.documentElement);case 2:return a.ownerElement?gd(a.ownerElement):id;case 11:case 10:case 6:case 12:return id;default:return a.parentNode?gd(a.parentNode):id}}function id(){return null}function hd(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?hd(a.parentNode,b):null};function jd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=cc(a);if(c.empty())throw Error("Invalid XPath expression.");b?ca(b)||(b=ga(b.lookupNamespaceURI,b)):b=n(null);var d=Yc(new Xc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Yb(a));return new T(c,b)}} +function T(a,b){if(0==b)if(a instanceof G)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 G))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof G?qc(a):""+a;break;case 1:this.numberValue=a instanceof G?+qc(a):+a;break;case 3:this.booleanValue=a instanceof G?0<a.l():!!a;break;case 4:case 5:case 6:case 7:var d= +I(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof $b?e.c:e);this.snapshotLength=a.l();this.invalidIteratorState=!1;break;case 8:case 9:d=pc(a);this.singleNodeValue=d instanceof $b?d.c:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}T.ANY_TYPE=0;T.NUMBER_TYPE=1;T.STRING_TYPE=2;T.BOOLEAN_TYPE=3;T.UNORDERED_NODE_ITERATOR_TYPE=4;T.ORDERED_NODE_ITERATOR_TYPE=5;T.UNORDERED_NODE_SNAPSHOT_TYPE=6;T.ORDERED_NODE_SNAPSHOT_TYPE=7;T.ANY_UNORDERED_NODE_TYPE=8;T.FIRST_ORDERED_NODE_TYPE=9;function kd(a){this.lookupNamespaceURI=gd(a)} +function ld(a){a=a||q;var b=a.document;b.evaluate||(a.XPathResult=T,b.evaluate=function(a,b,e,f){return(new jd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new jd(a,b)},b.createNSResolver=function(a){return new kd(a)})};var U={};U.ga=function(){var a={sa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();U.k=function(a,b,c){var d=z(a);(w||yb)&&ld(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.ga;return w&&!Va(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!La||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new Vb(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +U.I=function(a,b){if(!a||1!=a.nodeType)throw new Vb(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};U.n=function(a,b){var c=function(){var c=U.k(b,a,9);return c?(c=c.singleNodeValue,Ka?c:c||null):b.selectSingleNode?(c=z(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||U.I(c,a);return c}; +U.o=function(a,b){var c=function(){var c=U.k(b,a,7);if(c){var e=c.snapshotLength;Ka&&void 0===e&&U.I(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=z(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();u(c,function(b){U.I(b,a)});return c};function md(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}md.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};md.prototype.contains=function(a){return this&&a?a instanceof md?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +md.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};md.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +md.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}V.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};V.prototype.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +V.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};V.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +V.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var nd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function od(a){var b=[];u(a.split(nd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return Ka?b.replace(/\w+:;/g,""):b} +function pd(a,b){b=b.toLowerCase();if("style"==b)return od(a.style.cssText);if(Lb&&"value"==b&&W(a,"INPUT"))return a.value;if(Mb&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}function qd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=na(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Mb?"styleFloat":"cssFloat";var d;a:{d=c;var e=z(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||rd(a,c);if(null===d)d=null;else if(va(Qb,c)){b:{var f=d.match(Tb);if(f){var c=Number(f[1]),e=Number(f[2]),g=Number(f[3]),f=Number(f[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g&&0<=f&&1>=f){c=[c,e,g,f];break b}}c=null}if(!c){b:{if(g= +d.match(Ub))if(c=Number(g[1]),e=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g){c=[c,e,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=Pb[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(Rb,"#$1$1$2$2$3$3")),!Sb.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} +function rd(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&ca(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=qd(a))?rd(c,b):null} +function sd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=qd(a);return!a||c(a)}function d(a){var b=td(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&sa(a.childNodes,function(a){return a.nodeType==db||W(a)&&d(a)})}function e(a){return ud(a)==Y&&ta(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +lb(a,function(a){return W(a,"SELECT")});return!!f&&sd(f,!0)}return(f=vd(a))?!!f.V&&0<f.rect.width&&0<f.rect.height&&sd(f.V,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==wd(a)||!d(a)?!1:!e(a)}var Y="hidden"; +function ud(a){function b(a){var b=X(a,"position");if("fixed"==b)return v=!0,a==g?null:g;for(a=qd(a);a&&a!=g&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=qd(a);return a}function c(a){var b=a;if("visible"==t)if(a==g&&m)b=m;else if(a==m)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(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==g){var b=(new eb(f)).K;a=Ma||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=w&&Va("10")&&b.pageYOffset!=a.scrollTop?new Ya(a.scrollLeft,a.scrollTop):new Ya(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Ya(a.scrollLeft,a.scrollTop);return a}var e=xd(a),f=z(a),g=f.documentElement,m=f.body,t=X(g,"overflow"),v;for(a=b(a);a;a=b(a)){var p=c(a);if("visible"!=p.x||"visible"!=p.y){var k=td(a);if(0==k.width||0==k.height)return Y;var l=e.right<k.left,P=e.bottom<k.top;if(l&&"hidden"==p.x|| +P&&"hidden"==p.y)return Y;if(l&&"visible"!=p.x||P&&"visible"!=p.y){l=d(a);P=e.bottom<k.top-l.y;if(e.right<k.left-l.x&&"visible"!=p.x||P&&"visible"!=p.x)return Y;e=ud(a);return e==Y?Y:"scroll"}l=e.left>=k.left+k.width;k=e.top>=k.top+k.height;if(l&&"hidden"==p.x||k&&"hidden"==p.y)return Y;if(l&&"visible"!=p.x||k&&"visible"!=p.y){if(v&&(p=d(a),e.left>=g.scrollWidth-p.x||e.right>=g.scrollHeight-p.y))return Y;e=ud(a);return e==Y?Y:"scroll"}}}return"none"}var yd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function td(a){function b(a){var c=(z(a)?z(a).parentWindow||z(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(yd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),p=parseFloat(c[3]),k=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),P=f.left+f.width,Fa=f.top+f.height,Ga=f.left*d,d=P*d,Ha=f.left*e,e=P*e,Ia=f.top*p,p=Fa*p,Ja=f.top*k,P=Fa*k,Fa=Ga+Ia+l,k=Ha+Ja+c,Ia=d+Ia+l,Ja=e+Ja+c,Ga=Ga+p+l,Ha=Ha+P+c,l=d+p+l,c=e+P+c;f.left=Math.min(Fa,Ia,Ga,l);f.top=Math.min(k,Ja,Ha,c);l=Math.max(Fa, +Ia,Ga,l);c=Math.max(k,Ja,Ha,c);f.width=l-f.left;f.height=c-f.top}(a=qd(a))&&b(a)}var c=vd(a);if(c)return c.rect;if(W(a,"HTML"))return c=z(a),a=fb((c?c.parentWindow||c.defaultView:window)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=z(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);Ka&&(0==f.width&& +0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));La&&!Fb(12)&&b(a);return f} +function vd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=U.n('/descendant::*[@usemap = "#'+c.name+'"]',z(c)))&&(e=td(d),!b&&"default"!=a.shape.toLowerCase())){var f=zd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{V:d,rect:e||new V(0,0,0,0)}} +function zd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)}function xd(a){a=td(a);return new md(a.top,a.left+a.width,a.top+a.height,a.left)} +function Ad(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function Bd(a){var b=[];Cd(a,b);b=qa(b,Ad);return Ad(b.join("\n")).replace(/\xa0/g," ")} +function Cd(a,b){if(W(a,"BR"))b.push("");else{var c=W(a,"TD"),d=X(a,"display"),e=!c&&!va(Dd,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:gb(a.previousSibling),f=f?X(f,"display"):"",g=X(a,"float")||X(a,"cssFloat")||X(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var m=sd(a),t=null,v=null;m&&(t=X(a,"white-space"),v=X(a,"text-transform"));u(a.childNodes,function(a){a.nodeType==db&&m?Ed(a,b,t,v):W(a)&&Cd(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||ka(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var Dd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function Ed(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ka(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function wd(a){if(Nb){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Fd(a)}function Fd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=qd(a))&&(b*=Fd(a));return b};var Z={},Gd={};Z.ca=function(a,b,c){var d;try{d=Ob.o("a",b)}catch(e){d=A(y(b),"A",null,b)}return ua(d,function(b){b=Bd(b);return c&&-1!=b.indexOf(a)||b==a})};Z.Y=function(a,b,c){var d;try{d=Ob.o("a",b)}catch(e){d=A(y(b),"A",null,b)}return pa(d,function(b){b=Bd(b);return c&&-1!=b.indexOf(a)||b==a})};Z.n=function(a,b){return Z.ca(a,b,!1)};Z.o=function(a,b){return Z.Y(a,b,!1)};Gd.n=function(a,b){return Z.ca(a,b,!0)};Gd.o=function(a,b){return Z.Y(a,b,!0)};var Hd={n:function(a,b){return b.getElementsByTagName(a)[0]||null},o:function(a,b){return b.getElementsByTagName(a)}};var Id={className:mb,"class name":mb,css:Ob,"css selector":Ob,id:{n:function(a,b){var c=y(b),d=r(a)?c.K.getElementById(a):a;if(!d)return null;if(pd(d,"id")==a&&hb(b,d))return d;c=A(c,"*");return ua(c,function(c){return pd(c,"id")==a&&hb(b,c)})},o:function(a,b){var c=A(y(b),"*",null,b);return pa(c,function(b){return pd(b,"id")==a})}},linkText:Z,"link text":Z,name:{n:function(a,b){var c=A(y(b),"*",null,b);return ua(c,function(b){return pd(b,"name")==a})},o:function(a,b){var c=A(y(b),"*",null,b);return pa(c, +function(b){return pd(b,"name")==a})}},partialLinkText:Gd,"partial link text":Gd,tagName:Hd,"tag name":Hd,xpath:U};function Jd(){this.F=void 0} +function Kd(a,b,c){switch(typeof b){case "string":Ld(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Kd(a,a.F?a.F.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Ld(f,c),c.push(":"),Kd(a,a.F?a.F.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Md={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Nd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ld(a,b){b.push('"',a.replace(Nd,function(a){if(a in Md)return Md[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Md[a]=e+b.toString(16)}),'"')};Ma||Ka||La&&Fb(3.5)||w&&Fb(8);function bb(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return qa(a,bb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Od(a);return b}if("document"in a)return b={},b.WINDOW=Od(a),b;if(ba(a))return qa(a,bb);a=$a(a,function(a,b){return"number"==typeof b||r(b)});return ab(a);default:return null}}function Pd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.O=ia());b.O||(b.O=ia());return b} +function Od(a){var b=Pd(a.ownerDocument),c=cb(b,function(b){return b==a});c||(c=":wdc:"+b.O++,b[c]=a);return c}function Qd(a,b){a=decodeURIComponent(a);var c=b||document,d=Pd(c);if(!(a in d))throw new Vb(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new Vb(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new Vb(10,"Element is no longer attached to the DOM");};function Rd(a,b,c,d){var e={};e[a]=b;var f;try{var g=d?Qd(d.WINDOW):window,m;a:{var t=c?Qd(c.ELEMENT,g.document):g.document,v;b:{for(var p in e)if(e.hasOwnProperty(p)){v=p;break b}v=null}if(v){var k=Id[v];if(k&&ca(k.n)){m=k.n(e[v],t||ja.document);break a}}throw Error("Unsupported locator strategy: "+v);}f={status:0,value:bb(m)}}catch(l){f={status:"code"in l?l.code:13,value:{message:l.message}}}a=[];Kd(new Jd,f,a);return a.join("")}var Sd=["_"],$=q;Sd[0]in $||!$.execScript||$.execScript("var "+Sd[0]); +for(var Td;Sd.length&&(Td=Sd.shift());)Sd.length||void 0===Rd?$=$[Td]?$[Td]:$[Td]={}:$[Td]=Rd;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/find_elements.js b/src/ghostdriver/third_party/webdriver-atoms/find_elements.js index 104e33d2e..7c3d4c741 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/find_elements.js +++ b/src/ghostdriver/third_party/webdriver-atoms/find_elements.js @@ -1,89 +1,97 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,p=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var fa=Date.now||function(){return+new Date}; -function u(a,b){function c(){}c.prototype=b.prototype;a.oa=b.prototype;a.prototype=new c};var ga=window;function ha(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ia(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function ja(a,b){for(var c=0,d=ia(String(a)).split("."),e=ia(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var n=d[g]||"",v=e[g]||"",w=RegExp("(\\d*)(\\D*)","g"),C=RegExp("(\\d*)(\\D*)","g");do{var T=w.exec(n)||["","",""],U=C.exec(v)||["","",""];if(0==T[0].length&&0==U[0].length)break;c=((0==T[1].length?0:parseInt(T[1],10))<(0==U[1].length?0:parseInt(U[1],10))?-1:(0==T[1].length?0:parseInt(T[1],10))>(0==U[1].length?0:parseInt(U[1],10))?1:0)||((0==T[2].length)<(0==U[2].length)? --1:(0==T[2].length)>(0==U[2].length)?1:0)||(T[2]<U[2]?-1:T[2]>U[2]?1:0)}while(0==c)}return c}function ka(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var la=Array.prototype;function x(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ma(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var n=f[g];b.call(k,n,g,a)&&(d[e++]=n)}return d}function na(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function oa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function pa(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return p}function qa(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function ra(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function sa(a){return la.concat.apply(la,arguments)} -function ta(a,b,c){return 2>=arguments.length?la.slice.call(a,b):la.slice.call(a,b,c)};var ua,va,wa,xa;function ya(){return r.navigator?r.navigator.userAgent:m}xa=wa=va=ua=p;var za;if(za=ya()){var Aa=r.navigator;ua=0==za.indexOf("Opera");va=!ua&&-1!=za.indexOf("MSIE");wa=!ua&&-1!=za.indexOf("WebKit");xa=!ua&&!wa&&"Gecko"==Aa.product}var y=ua,z=va,A=xa,B=wa;function Ba(){var a=r.document;return a?a.documentMode:k}var Ca; -a:{var Da="",Ea;if(y&&r.opera)var Fa=r.opera.version,Da="function"==typeof Fa?Fa():Fa;else if(A?Ea=/rv\:([^\);]+)(\)|;)/:z?Ea=/MSIE\s+([^\);]+)(\)|;)/:B&&(Ea=/WebKit\/(\S+)/),Ea)var Ga=Ea.exec(ya()),Da=Ga?Ga[1]:"";if(z){var Ha=Ba();if(Ha>parseFloat(Da)){Ca=String(Ha);break a}}Ca=Da}var Ia={};function Ja(a){return Ia[a]||(Ia[a]=0<=ja(Ca,a))}function D(a){return z&&Ka>=a}var La=r.document,Ka=!La||!z?k:Ba()||("CSS1Compat"==La.compatMode?parseInt(Ca,10):5);var Ma;!A&&!z||z&&D(9)||A&&Ja("1.9.1");z&&Ja("9");var Na=z||y||B;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function Oa(a,b){this.width=a;this.height=b}Oa.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Oa.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Oa.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Oa.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Pa(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function Qa(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function Ra(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var Sa=3;function F(a){return a?new Ta(G(a)):Ma||(Ma=new Ta)}function Ua(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Va(a){if(Na)return a.parentElement;a=a.parentNode;return ea(a)&&1==a.nodeType?a:m}function Wa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Xa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(z&&!D(9)){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?Ya(a,b):!c&&Wa(e,b)?-1*Za(a,b):!d&&Wa(f,a)?Za(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function Za(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ya(d,a)}function Ya(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function $a(a,b){var c=[];return ab(a,b,c,l)?c[0]:k} -function ab(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||ab(a,b,c,d))return l;a=a.nextSibling}return p}function bb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function Ta(a){this.A=a||r.document||document} -function cb(a,b,c,d){a=d||a.A;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&ra(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function db(a){var b=a.A;a=!B&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}Ta.prototype.contains=Wa;var eb={P:function(a){return!(!a.querySelectorAll||!a.querySelector)},r:function(a,b){a||h(Error("No class name specified"));a=ia(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(eb.P(b))return b.querySelector("."+a.replace(/\./g,"\\."))||m;var c=cb(F(b),"*",a,b);return c.length?c[0]:m},k:function(a,b){a||h(Error("No class name specified"));a=ia(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return eb.P(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):cb(F(b),"*",a,b)}};var fb,gb,hb,ib,jb,kb,lb;lb=kb=jb=ib=hb=gb=fb=p;var H=ya();H&&(-1!=H.indexOf("Firefox")?fb=l:-1!=H.indexOf("Camino")?gb=l:-1!=H.indexOf("iPhone")||-1!=H.indexOf("iPod")?hb=l:-1!=H.indexOf("iPad")?ib=l:-1!=H.indexOf("Android")?jb=l:-1!=H.indexOf("Chrome")?kb=l:-1!=H.indexOf("Safari")&&(lb=l));var mb=fb,nb=gb,ob=hb,pb=ib,qb=jb,rb=kb,sb=lb;function tb(a){return(a=a.exec(ya()))?a[1]:""}var ub=function(){if(mb)return tb(/Firefox\/([0-9.]+)/);if(z||y)return Ca;if(rb)return tb(/Chrome\/([0-9.]+)/);if(sb)return tb(/Version\/([0-9.]+)/);if(ob||pb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(ya());if(a)return a[1]+"."+a[2]}else{if(qb)return(a=tb(/Android\s+([0-9.]+)/))?a:tb(/Version\/([0-9.]+)/);if(nb)return tb(/Camino\/([0-9.]+)/)}return""}();var vb,wb;function xb(a){return yb?vb(a):z?0<=ja(Ka,a):Ja(a)}var yb=function(){if(!A)return p;var a=r.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}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;vb=function(a){return 0<=d.fa(e,""+a)};wb=function(a){d.fa(f,""+a)};return l}(),zb; -if(qb){var Ab=/Android\s+([0-9\.]+)/.exec(ya());zb=Ab?Ab[1]:"0"}else zb="0";var Bb=zb,Cb=z&&!D(8),Db=z&&!D(9),Eb=z&&!D(10);qb&&(yb?wb(2.3):qb?ja(Bb,2.3):ja(ub,2.3));var Fb={r:function(a,b){!da(b.querySelector)&&(z&&xb(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ia(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:m},k:function(a,b){!da(b.querySelectorAll)&&(z&&xb(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ia(a);return b.querySelectorAll(a)}};var Gb={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", +function(){return function(){function h(a){return function(){return this[a]}}function n(a){return function(){return a}}var q=this; +function aa(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function ca(a){return"function"==aa(a)}function da(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ea(a,b,c){return a.call.apply(a.bind,arguments)} +function fa(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)}}function ga(a,b,c){ga=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ea:fa;return ga.apply(null,arguments)} +function ha(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ia=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.ra=b.prototype;a.prototype=new c};var ja=window;function ka(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function la(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} +function ma(a,b){for(var c=0,d=la(String(a)).split("."),e=la(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var m=d[g]||"",t=e[g]||"",v=RegExp("(\\d*)(\\D*)","g"),p=RegExp("(\\d*)(\\D*)","g");do{var k=v.exec(m)||["","",""],l=p.exec(t)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)? +-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c}function na(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var oa=Array.prototype;function u(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function pa(a,b){for(var c=a.length,d=[],e=0,f=r(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var m=f[g];b.call(void 0,m,g,a)&&(d[e++]=m)}return d}function qa(a,b){for(var c=a.length,d=Array(c),e=r(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function ra(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;u(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function sa(a,b){for(var c=a.length,d=r(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 ta(a,b){for(var c=a.length,d=r(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 ua(a,b){var c;a:{c=a.length;for(var d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:r(a)?a.charAt(c):a[c]}function va(a,b){var c;a:if(r(a))c=r(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function wa(a){return oa.concat.apply(oa,arguments)}function xa(a,b,c){return 2>=arguments.length?oa.slice.call(a,b):oa.slice.call(a,b,c)};var ya,za,Aa,Ba;function Ca(){return q.navigator?q.navigator.userAgent:null}Ba=Aa=za=ya=!1;var Da;if(Da=Ca()){var Ea=q.navigator;ya=0==Da.indexOf("Opera");za=!ya&&-1!=Da.indexOf("MSIE");Aa=!ya&&-1!=Da.indexOf("WebKit");Ba=!ya&&!Aa&&"Gecko"==Ea.product}var Ka=ya,w=za,La=Ba,Ma=Aa;function Na(){var a=q.document;return a?a.documentMode:void 0}var Oa; +a:{var Pa="",Qa;if(Ka&&q.opera)var Ra=q.opera.version,Pa="function"==typeof Ra?Ra():Ra;else if(La?Qa=/rv\:([^\);]+)(\)|;)/:w?Qa=/MSIE\s+([^\);]+)(\)|;)/:Ma&&(Qa=/WebKit\/(\S+)/),Qa)var Sa=Qa.exec(Ca()),Pa=Sa?Sa[1]:"";if(w){var Ta=Na();if(Ta>parseFloat(Pa)){Oa=String(Ta);break a}}Oa=Pa}var Ua={};function Va(a){return Ua[a]||(Ua[a]=0<=ma(Oa,a))}var Wa=q.document,x=Wa&&w?Na()||("CSS1Compat"==Wa.compatMode?parseInt(Oa,10):5):void 0;var Xa;!La&&!w||w&&w&&9<=x||La&&Va("1.9.1");w&&Va("9");function Ya(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}Ya.prototype.toString=function(){return"("+this.x+", "+this.y+")"};Ya.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};Ya.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Ya.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function Za(a,b){this.width=a;this.height=b}Za.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Za.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Za.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Za.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function $a(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ab(a){var b=bb,c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function cb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var db=3;function y(a){return a?new eb(z(a)):Xa||(Xa=new eb)}function fb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new Za(a.clientWidth,a.clientHeight)}function gb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function hb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function ib(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=x)){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?jb(a,b):!c&&hb(e,b)?-1*kb(a,b):!d&&hb(f,a)?kb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=z(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(q.Range.START_TO_END,d)}function kb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return jb(d,a)}function jb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function z(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function lb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function eb(a){this.K=a||q.document||document} +function A(a,b,c,d){a=d||a.K;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&va(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c}eb.prototype.contains=hb;var mb={R:function(a){return!(!a.querySelectorAll||!a.querySelector)},r:function(a,b){if(!a)throw Error("No class name specified");a=la(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");if(mb.R(b))return b.querySelector("."+a.replace(/\./g,"\\."))||null;var c=A(y(b),"*",a,b);return c.length?c[0]:null},k:function(a,b){if(!a)throw Error("No class name specified");a=la(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");return mb.R(b)?b.querySelectorAll("."+ +a.replace(/\./g,"\\.")):A(y(b),"*",a,b)}};var nb,ob,pb,qb,rb,sb,tb;tb=sb=rb=qb=pb=ob=nb=!1;var B=Ca();B&&(-1!=B.indexOf("Firefox")?nb=!0:-1!=B.indexOf("Camino")?ob=!0:-1!=B.indexOf("iPhone")||-1!=B.indexOf("iPod")?pb=!0:-1!=B.indexOf("iPad")?qb=!0:-1!=B.indexOf("Android")?rb=!0:-1!=B.indexOf("Chrome")?sb=!0:-1!=B.indexOf("Safari")&&(tb=!0));var ub=nb,vb=ob,wb=pb,xb=qb,yb=rb,zb=sb,Ab=tb;function Bb(a){return(a=a.exec(Ca()))?a[1]:""}var Cb=function(){if(ub)return Bb(/Firefox\/([0-9.]+)/);if(w||Ka)return Oa;if(zb)return Bb(/Chrome\/([0-9.]+)/);if(Ab)return Bb(/Version\/([0-9.]+)/);if(wb||xb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ca());if(a)return a[1]+"."+a[2]}else{if(yb)return(a=Bb(/Android\s+([0-9.]+)/))?a:Bb(/Version\/([0-9.]+)/);if(vb)return Bb(/Camino\/([0-9.]+)/)}return""}();var Db,Eb;function Fb(a){return Gb?Db(a):w?0<=ma(x,a):Va(a)}function Hb(a){Gb?Eb(a):yb?ma(Ib,a):ma(Cb,a)} +var Gb=function(){if(!La)return!1;var a=q.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Db=function(a){return 0<=d.ha(e,""+a)};Eb=function(a){d.ha(f,""+a)};return!0}(),Jb;if(yb){var Kb=/Android\s+([0-9\.]+)/.exec(Ca());Jb=Kb?Kb[1]:"0"}else Jb="0"; +var Ib=Jb,Lb=w&&!(w&&8<=x),Mb=w&&!(w&&9<=x),Nb=w&&!(w&&10<=x);yb&&Hb(2.3);yb&&Hb(4);Ab&&Hb(6);var Ob={r:function(a,b){if(!ca(b.querySelector)&&w&&Fb(8)&&!da(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=la(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:null},k:function(a,b){if(!ca(b.querySelectorAll)&&w&&Fb(8)&&!da(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=la(a);return b.querySelectorAll(a)}};var Pb={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var Hb="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Ib=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Jb(a){Kb.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Ib,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Kb=/^#(?:[0-9a-f]{3}){1,2}$/i,Lb=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Mb(a){var b=a.match(Lb);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Nb=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ob(a){var b=a.match(Nb);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function Pb(a,b){this.code=a;this.state=Qb[a]||Rb;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(Pb,Error); -var Rb="unknown error",Qb={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Qb[13]=Rb;Qb[9]="unknown command";Pb.prototype.toString=function(){return this.name+": "+this.message};function Sb(a,b,c){this.c=a;this.la=b||1;this.j=c||1};var I=z&&!D(9),Tb=z&&!D(8);function Ub(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.na=e;this.parentNode=b}function Vb(a,b,c){var d=Tb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Ub(b,a,b.nodeName,d,c)};function Wb(a){this.O=a;this.C=0}function Xb(a){a=a.match(Yb);for(var b=0;b<a.length;b++)Zb.test(a[b])&&a.splice(b,1);return new Wb(a)}var Yb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Zb=/^\s/;function J(a,b){return a.O[a.C+(b||0)]}Wb.prototype.next=function(){return this.O[this.C++]};Wb.prototype.back=function(){this.C--};Wb.prototype.empty=function(){return this.O.length<=this.C};function K(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function $b(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return p}catch(d){return p}Tb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ac(a,b,c,d,e){return(I?bc:cc).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)} -function bc(a,b,c,d,e){if(a instanceof dc||8==a.i||c&&a.i===m){var f=b.all;if(!f)return e;a=ec(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],n=0;b=f[n++];)$b(b,c,d)&&g.push(b);f=g}for(n=0;b=f[n++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}fc(a,b,c,d,e);return e} -function cc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!z?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?fc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){$b(a,c,d)&&e.add(a)}));return e} -function gc(a,b,c,d,e){var f;if((a instanceof dc||8==a.i||c&&a.i===m)&&(f=b.childNodes)){var g=ec(a);if("*"!=g&&(f=ma(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ma(f,function(a){return $b(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return hc(a,b,c,d,e)}function hc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)$b(b,c,d)&&a.matches(b)&&e.add(b);return e} -function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)$b(b,c,d)&&a.matches(b)&&e.add(b),fc(a,b,c,d,e)}function ec(a){if(a instanceof M){if(8==a.i)return"!";if(a.i===m)return"*"}return a.getName()};function L(){this.j=this.f=m;this.v=0}function ic(a){this.m=a;this.next=this.s=m}function jc(a,b){if(a.f){if(!b.f)return a}else return b;for(var c=a.f,d=b.f,e=m,f=m,g=0;c&&d;)c.m==d.m||c.m instanceof Ub&&d.m instanceof Ub&&c.m.c==d.m.c?(f=c,c=c.next,d=d.next):0<Xa(c.m,d.m)?(f=d,d=d.next):(f=c,c=c.next),(f.s=e)?e.next=f:a.f=f,e=f,g++;for(f=c||d;f;)f.s=e,e=e.next=f,g++,f=f.next;a.j=e;a.v=g;return a} -L.prototype.unshift=function(a){a=new ic(a);a.next=this.f;this.j?this.f.s=a:this.f=this.j=a;this.f=a;this.v++};L.prototype.add=function(a){a=new ic(a);a.s=this.j;this.f?this.j.next=a:this.f=this.j=a;this.j=a;this.v++};function kc(a){return(a=a.f)?a.m:m}L.prototype.n=q("v");function lc(a){return(a=kc(a))?K(a):""}function mc(a,b){return new nc(a,!!b)}function nc(a,b){this.ia=a;this.Q=(this.t=b)?a.j:a.f;this.K=m} -nc.prototype.next=function(){var a=this.Q;if(a==m)return m;var b=this.K=a;this.Q=this.t?a.s:a.next;return b.m};nc.prototype.remove=function(){var a=this.ia,b=this.K;b||h(Error("Next must be called at least once before remove."));var c=b.s,b=b.next;c?c.next=b:a.f=b;b?b.s=c:a.j=c;a.v--;this.K=m};function N(a){this.e=a;this.g=this.o=p;this.w=m}N.prototype.d=q("o");function oc(a,b){a.o=b}function pc(a,b){a.g=b}N.prototype.q=q("w");function O(a,b){var c=a.evaluate(b);return c instanceof L?+lc(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?lc(c):""+c}function qc(a,b){var c=a.evaluate(b);return c instanceof L?!!c.n():!!c};function rc(a,b,c){N.call(this,a.e);this.N=a;this.U=b;this.$=c;this.o=b.d()||c.d();this.g=b.g||c.g;this.N==sc&&(!c.g&&!c.d()&&4!=c.e&&0!=c.e&&b.q()?this.w={name:b.q().name,u:c}:!b.g&&(!b.d()&&4!=b.e&&0!=b.e&&c.q())&&(this.w={name:c.q().name,u:b}))}u(rc,N); -function tc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof L&&c instanceof L){f=mc(b);for(b=f.next();b;b=f.next()){e=mc(c);for(d=e.next();d;d=e.next())if(a(K(b),K(d)))return l}return p}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=mc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+K(d);break;case "boolean":f=!!K(d);break;case "string":f=K(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return p}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}rc.prototype.evaluate=function(a){return this.N.l(this.U,this.$,a)};rc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.N+"\n";a+=" ";b+=this.U.toString(a)+"\n";return b+=this.$.toString(a)};function uc(a,b,c,d){this.ka=a;this.Y=b;this.e=c;this.l=d}uc.prototype.toString=q("ka");var vc={}; -function Q(a,b,c,d){a in vc&&h(Error("Binary operator already created: "+a));a=new uc(a,b,c,d);return vc[a.toString()]=a}Q("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});Q("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});Q("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});Q("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});Q("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});Q("<",4,2,function(a,b,c){return tc(function(a,b){return a<b},a,b,c)}); -Q(">",4,2,function(a,b,c){return tc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return tc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return tc(function(a,b){return a>=b},a,b,c)});var sc=Q("=",3,2,function(a,b,c){return tc(function(a,b){return a==b},a,b,c,l)});Q("!=",3,2,function(a,b,c){return tc(function(a,b){return a!=b},a,b,c,l)});Q("and",2,2,function(a,b,c){return qc(a,c)&&qc(b,c)});Q("or",1,2,function(a,b,c){return qc(a,c)||qc(b,c)});function wc(a,b){b.n()&&4!=a.e&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.e);this.Z=a;this.b=b;this.o=a.d();this.g=a.g}u(wc,N);wc.prototype.evaluate=function(a){a=this.Z.evaluate(a);return xc(this.b,a)};wc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.Z.toString(a);return b+=this.b.toString(a)};function yc(a,b){b.length<a.X&&h(Error("Function "+a.h+" expects at least"+a.X+" arguments, "+b.length+" given"));a.L!==m&&b.length>a.L&&h(Error("Function "+a.h+" expects at most "+a.L+" arguments, "+b.length+" given"));a.ja&&x(b,function(b,d){4!=b.e&&h(Error("Argument "+d+" to function "+a.h+" is not of type Nodeset: "+b))});N.call(this,a.e);this.B=a;this.H=b;oc(this,a.o||pa(b,function(a){return a.d()}));pc(this,a.ha&&!b.length||a.ga&&!!b.length||pa(b,function(a){return a.g}))}u(yc,N); -yc.prototype.evaluate=function(a){return this.B.l.apply(m,sa(a,this.H))};yc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.B+"\n";b+=" ";this.H.length&&(a+=b+"Arguments:",b+=" ",a=oa(this.H,function(a,d){return a+"\n"+d.toString(b)},a));return a};function zc(a,b,c,d,e,f,g,n,v){this.h=a;this.e=b;this.o=c;this.ha=d;this.ga=e;this.l=f;this.X=g;this.L=s(n)?n:g;this.ja=!!v}zc.prototype.toString=q("h");var Ac={}; -function R(a,b,c,d,e,f,g,n){a in Ac&&h(Error("Function already created: "+a+"."));Ac[a]=new zc(a,b,c,d,p,e,f,g,n)}R("boolean",2,p,p,function(a,b){return qc(b,a)},1);R("ceiling",1,p,p,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,p,p,function(a,b){var c=ta(arguments,1);return oa(c,function(b,c){return b+P(c,a)},"")},2,m);R("contains",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,p,p,function(a,b){return b.evaluate(a).n()},1,1,l);R("false",2,p,p,aa(p),0); -R("floor",1,p,p,function(a,b){return Math.floor(O(b,a))},1);R("id",4,p,p,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return qa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!ra(f,a)&&f.push(a)});f.sort(Xa);var g=new L;x(f,function(a){g.add(a)});return g},1);R("lang",2,p,p,aa(p),1); -R("last",1,l,p,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.j},0);R("local-name",3,p,l,function(a,b){var c=b?kc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,l);R("name",3,p,l,function(a,b){var c=b?kc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,l);R("namespace-uri",3,l,p,aa(""),0,1,l);R("normalize-space",3,p,l,function(a,b){return(b?P(b,a):K(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,p,p,function(a,b){return!qc(b,a)},1);R("number",1,p,l,function(a,b){return b?O(b,a):+K(a.c)},0,1);R("position",1,l,p,function(a){return a.la},0);R("round",1,p,p,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,p,l,function(a,b){return b?P(b,a):K(a.c)},0,1);R("string-length",1,p,l,function(a,b){return(b?P(b,a):K(a.c)).length},0,1); -R("substring",3,p,p,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,p,p,function(a,b){for(var c=mc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,l);R("translate",3,p,p,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);R("true",2,p,p,aa(l),0);function M(a,b){this.ca=a;this.V=s(b)?b:m;this.i=m;switch(a){case "comment":this.i=8;break;case "text":this.i=Sa;break;case "processing-instruction":this.i=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Bc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.matches=function(a){return this.i===m||this.i==a.nodeType};M.prototype.getName=q("ca"); -M.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.ca;this.V===m||(b+="\n"+this.V.toString(a+" "));return b};function Cc(a){N.call(this,3);this.ba=a.substring(1,a.length-1)}u(Cc,N);Cc.prototype.evaluate=q("ba");Cc.prototype.toString=function(a){return(a||"")+"literal: "+this.ba};function dc(a){this.h=a.toLowerCase()}dc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.h||this.h==a.nodeName.toLowerCase()?l:this.h==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};dc.prototype.getName=q("h");dc.prototype.toString=function(a){return(a||"")+"nametest: "+this.h};function Dc(a){N.call(this,1);this.da=a}u(Dc,N);Dc.prototype.evaluate=q("da");Dc.prototype.toString=function(a){return(a||"")+"number: "+this.da};function Ec(a,b){N.call(this,a.e);this.S=a;this.z=b;this.o=a.d();this.g=a.g;if(1==this.z.length){var c=this.z[0];!c.J&&c.p==Fc&&(c=c.G,"*"!=c.getName()&&(this.w={name:c.getName(),u:m}))}}u(Ec,N);function Gc(){N.call(this,4)}u(Gc,N);Gc.prototype.evaluate=function(a){var b=new L;a=a.c;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Gc.prototype.toString=function(a){return a+"RootHelperExpr"};function Hc(){N.call(this,4)}u(Hc,N);Hc.prototype.evaluate=function(a){var b=new L;b.add(a.c);return b}; -Hc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Ec.prototype.evaluate=function(a){var b=this.S.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));a=this.z;for(var c=0,d=a.length;c<d&&b.n();c++){var e=a[c],f=mc(b,e.p.t),g;if(!e.d()&&e.p==Ic){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Sb(g))}else if(!e.d()&&e.p==Jc)g=f.next(),b=e.evaluate(new Sb(g));else{g=f.next();for(b=e.evaluate(new Sb(g));(g=f.next())!=m;)g=e.evaluate(new Sb(g)),b=jc(b,g)}}return b}; -Ec.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.S.toString(b);this.z.length&&(c+=b+"Steps:\n",b+=" ",x(this.z,function(a){c+=a.toString(b)}));return c};function Kc(a,b){this.b=a;this.t=!!b}function xc(a,b,c){for(c=c||0;c<a.b.length;c++)for(var d=a.b[c],e=mc(b),f=b.n(),g,n=0;g=e.next();n++){var v=a.t?f-n:n+1;g=d.evaluate(new Sb(g,v,f));var w;"number"==typeof g?w=v==g:"string"==typeof g||"boolean"==typeof g?w=!!g:g instanceof L?w=0<g.n():h(Error("Predicate.evaluate returned an unexpected type."));w||e.remove()}return b}Kc.prototype.q=function(){return 0<this.b.length?this.b[0].q():m}; -Kc.prototype.d=function(){for(var a=0;a<this.b.length;a++){var b=this.b[a];if(b.d()||1==b.e||0==b.e)return l}return p};Kc.prototype.n=function(){return this.b.length};Kc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return oa(this.b,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Lc(a,b,c,d){N.call(this,4);this.p=a;this.G=b;this.b=c||new Kc([]);this.J=!!d;b=this.b.q();a.ma&&b&&(a=b.name,a=I?a.toLowerCase():a,this.w={name:a,u:b.u});this.o=this.b.d()}u(Lc,N); -Lc.prototype.evaluate=function(a){var b=a.c,c=m,c=this.q(),d=m,e=m,f=0;c&&(d=c.name,e=c.u?P(c.u,a):m,f=1);if(this.J)if(!this.d()&&this.p==Mc)c=ac(this.G,b,d,e),c=xc(this.b,c,f);else if(a=mc((new Lc(Nc,new M("node"))).evaluate(a)),b=a.next())for(c=this.l(b,d,e,f);(b=a.next())!=m;)c=jc(c,this.l(b,d,e,f));else c=new L;else c=this.l(a.c,d,e,f);return c};Lc.prototype.l=function(a,b,c,d){a=this.p.B(this.G,a,b,c);return a=xc(this.b,a,d)}; -Lc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.J?"//":"/")+"\n";this.p.h&&(b+=a+"Axis: "+this.p+"\n");b+=this.G.toString(a);if(this.b.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.b.length;c++)var d=c<this.b.length-1?", ":"",b=b+(this.b[c].toString(a)+d);return b};function Oc(a,b,c,d){this.h=a;this.B=b;this.t=c;this.ma=d}Oc.prototype.toString=q("h");var Pc={}; -function S(a,b,c,d){a in Pc&&h(Error("Axis already created: "+a));b=new Oc(a,b,c,!!d);return Pc[a]=b}S("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);S("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Fc=S("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new Ub(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.i===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)I?g.nodeValue&&c.add(Vb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(I?g.nodeValue&&c.add(Vb(b,g,b.sourceIndex)):c.add(g));return c},p),Mc=S("child",function(a,b,c,d,e){return(I?gc:hc).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)},p,l); -S("descendant",ac,p,l);var Nc=S("descendant-or-self",function(a,b,c,d){var e=new L;$b(b,c,d)&&a.matches(b)&&e.add(b);return ac(a,b,c,d,e)},p,l),Ic=S("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)$b(f,c,d)&&a.matches(f)&&e.add(f),e=ac(a,f,c,d,e);while(b=b.parentNode);return e},p,l);S("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},p);S("namespace",function(){return new L},p); -var Qc=S("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},p),Jc=S("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,n=f.length;g<n;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var w=0,C=v.length;w<C;w++)b=v[w],$b(b,c,d)&&a.matches(b)&&e.add(b),e=ac(a,b,c,d,e)}return e},l,l); -S("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Rc=S("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},p);function Sc(a){N.call(this,1);this.R=a;this.o=a.d();this.g=a.g}u(Sc,N);Sc.prototype.evaluate=function(a){return-O(this.R,a)};Sc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.R.toString(a+" ")};function Tc(a){N.call(this,4);this.D=a;oc(this,pa(this.D,function(a){return a.d()}));pc(this,pa(this.D,function(a){return a.g}))}u(Tc,N);Tc.prototype.evaluate=function(a){var b=new L;x(this.D,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=jc(b,c)});return b};Tc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.D,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Uc(a){this.a=a}function Vc(a){for(var b,c=[];;){V(a,"Missing right hand side of binary expression.");b=Wc(a);var d=a.a.next();if(!d)break;var e=(d=vc[d]||m)&&d.Y;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Y;)b=new rc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new rc(c.pop(),c.pop(),b);return b}function V(a,b){a.a.empty()&&h(Error(b))}function Xc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Yc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Zc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Cc(a)}function $c(a){return"*"!=J(a.a)&&":"==J(a.a,1)&&"*"==J(a.a,2)?new dc(a.a.next()+a.a.next()+a.a.next()):new dc(a.a.next())} -function ad(a){var b,c=[],d;if("/"==J(a.a)||"//"==J(a.a)){b=a.a.next();d=J(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Gc;d=new Gc;V(a,"Missing next location step.");b=bd(a,b);c.push(b)}else{a:{b=J(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Vc(a);V(a,'unclosed "("');Xc(a,")");break;case '"':case "'":b=Zc(a);break;default:if(isNaN(+b))if(!Bc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==J(a.a,1)){b=a.a.next();b=Ac[b]||m;a.a.next();for(d=[];")"!=J(a.a);){V(a,"Missing function argument list.");d.push(Vc(a));if(","!=J(a.a))break;a.a.next()}V(a,"Unclosed function argument list.");Yc(a);b=new yc(b,d)}else{b=m;break a}else b=new Dc(+a.a.next())}"["==J(a.a)&&(d=new Kc(cd(a)),b=new wc(b,d))}if(b)if("/"==J(a.a)||"//"==J(a.a))d=b;else return b;else b=bd(a,"/"),d=new Hc,c.push(b)}for(;"/"==J(a.a)||"//"==J(a.a);)b=a.a.next(),V(a,"Missing next location step."),b=bd(a,b),c.push(b);return new Ec(d, -c)} -function bd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==J(a.a))return d=new Lc(Rc,new M("node")),a.a.next(),d;if(".."==J(a.a))return d=new Lc(Qc,new M("node")),a.a.next(),d;var f;"@"==J(a.a)?(f=Fc,a.a.next(),V(a,"Missing attribute name")):"::"==J(a.a,1)?(/(?![0-9])[\w]/.test(J(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Pc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),V(a,"Missing node name")):f=Mc;e=J(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==J(a.a, -1)){Bc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Bc(c)||h(Error("Invalid type name: "+c));Xc(a,"(");V(a,"Bad nodetype");e=J(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Zc(a);V(a,"Bad nodetype");Yc(a);c=new M(c,g)}else c=$c(a);else"*"==e?c=$c(a):h(Error("Bad token: "+a.a.next()));e=new Kc(cd(a),f.t);return d||new Lc(f,c,e,"//"==b)} -function cd(a){for(var b=[];"["==J(a.a);){a.a.next();V(a,"Missing predicate expression.");var c=Vc(a);b.push(c);V(a,"Unclosed predicate expression.");Xc(a,"]")}return b}function Wc(a){if("-"==J(a.a))return a.a.next(),new Sc(Wc(a));var b=ad(a);if("|"!=J(a.a))a=b;else{for(b=[b];"|"==a.a.next();)V(a,"Missing next union location path."),b.push(ad(a));a.a.back();a=new Tc(b)}return a};function dd(a){a.length||h(Error("Empty XPath expression."));a=Xb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Vc(new Uc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Sb(a));return new W(e,d)}} -function W(a,b){0==b&&(a instanceof L?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof L))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?lc(a):""+a;break;case 1:this.numberValue=a instanceof L?+lc(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.n():!!a;break;case 4:case 5:case 6:case 7:var d=mc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Ub?e.c:e);this.snapshotLength=a.n();this.invalidIteratorState=p;break;case 8:case 9:d=kc(a);this.singleNodeValue=d instanceof Ub?d.c:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function ed(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=W,b.evaluate=function(a,b,e,f){return(new dd(a)).evaluate(b,f)},b.createExpression=function(a){return new dd(a)})};var X={};X.ea=function(){var a={pa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();X.l=function(a,b,c){var d=G(a);(z||qb)&&ed(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.ea;return z&&!Ja(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){A&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new Pb(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -X.I=function(a,b){(!a||1!=a.nodeType)&&h(new Pb(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};X.r=function(a,b){var c=function(){var c=X.l(b,a,9);return c?(c=c.singleNodeValue,y?c:c||m):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||X.I(c,a);return c}; -X.k=function(a,b){var c=function(){var c=X.l(b,a,7);if(c){var e=c.snapshotLength;y&&!s(e)&&X.I(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){X.I(b,a)});return c};!y&&(!B||xb("533"));function fd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function gd(a,b){return fd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function hd(a){var b=a.getBoundingClientRect();z&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function id(a){if(z&&!D(8))return a.offsetParent;var b=G(a),c=gd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=gd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function jd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=hd(a);b.x=c.left;b.y=c.top}else{c=db(F(a));var d,e=G(a),f=gd(a,"position"),g=A&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),n=new E(0,0),v;d=e?G(e):document;if(v=z)if(v=!D(9))v="CSS1Compat"!=F(d).A.compatMode;v=v?d.body:d.documentElement;if(a!=v)if(a.getBoundingClientRect)d=hd(a),e=db(F(e)),n.x=d.left+e.x,n.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(v),n.x=d.screenX-e.screenX,n.y=d.screenY-e.screenY;else{g=a;do{n.x+=g.offsetLeft;n.y+=g.offsetTop;g!=a&&(n.x+=g.clientLeft||0,n.y+=g.clientTop||0);if(B&&"fixed"==gd(g,"position")){n.x+=e.body.scrollLeft;n.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(y||B&&"absolute"==f)n.y-=e.body.offsetTop;for(g=a;(g=id(g))&&g!=e.body&&g!=v;)if(n.x-=g.scrollLeft,!y||"TR"!=g.tagName)n.y-=g.scrollTop}b.x=n.x-c.x;b.y=n.y-c.y}if(A&&!Ja(12)){var w;z?w="-ms-transform": -B?w="-webkit-transform":y?w="-o-transform":A&&(w="-moz-transform");var C;w&&(C=gd(a,w));C||(C=gd(a,"transform"));C?(a=C.match(kd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else w=da(a.T),C=a,a.targetTouches?C=a.targetTouches[0]:w&&a.T().targetTouches&&(C=a.T().targetTouches[0]),b.x=C.clientX,b.y=C.clientY;return b} -function ld(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=hd(a),new Oa(a.right-a.left,a.bottom-a.top)):new Oa(b,c)}var kd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var md=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function nd(a){var b=[];x(a.split(md),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return y?b.replace(/\w+:;/g,""):b} -function od(a,b){b=b.toLowerCase();if("style"==b)return nd(a.style.cssText);if(Cb&&"value"==b&&Y(a,"INPUT"))return a.value;if(Db&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}function pd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:m} -function Z(a,b){var c=ka(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Db?"styleFloat":"cssFloat";c=fd(a,c)||qd(a,c);if(c===m)c=m;else if(ra(Hb,b)&&(Kb.test("#"==c.charAt(0)?c:"#"+c)||Ob(c).length||Gb&&Gb[c.toLowerCase()]||Mb(c).length)){var d=Mb(c);if(!d.length){a:if(d=Ob(c),!d.length){d=Gb[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Kb.test(d)&&(d=Jb(d),d=Jb(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function qd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&da(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=pd(a))?qd(c,b):m} -function rd(a){if(da(a.getBBox)&&!Y(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=Z(a,"overflow")?a=l:(a=pd(a),!a||!Y(a,"HTML")?a=l:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ga).document;a=b.documentElement;var d=b.body;d||h(new Pb(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new Oa(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new Oa(a.clientWidth,a.clientHeight);return a}if("none"!=gd(a,"display"))a=ld(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=ld(a);b.display=d;b.position=f;b.visibility=e}return a} -function sd(a,b){function c(a){if("none"==Z(a,"display"))return p;a=pd(a);return!a||c(a)}function d(a){var b=rd(a);return 0<b.height&&0<b.width?l:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):pa(a.childNodes,function(b){return b.nodeType==Sa&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a,b){var c;if((c=b==m?Va(a):Va(b))&&("hidden"==Z(c,"overflow-x")||"hidden"==Z(c,"overflow-y"))){var d=rd(c),f=jd(c),g=jd(a);return f.x+d.width<=g.x&&"hidden"==Z(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==Z(c,"overflow-y")?p:l}return!c||e(a,c)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=jd(a),a=rd(a),0<=b.x+a.width&&0<=b.y+a.height?l:p;a=pd(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=bb(a,function(a){return Y(a,"SELECT")});return!!g&&sd(g,l)}if(Y(a,"MAP")){if(!a.name)return p;g=G(a);g= -g.evaluate?X.r('/descendant::*[@usemap = "#'+a.name+'"]',g):$a(g,function(b){return Y(b)&&od(b,"usemap")=="#"+a.name});return!!g&&sd(g,b)}return Y(a,"AREA")?(g=bb(a,function(a){return Y(a,"MAP")}),!!g&&sd(g,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==td(a)||!d(a)||!e(a,m)?p:f(a)}function ud(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function vd(a){var b=[];wd(a,b);b=na(b,ud);return ud(b.join("\n")).replace(/\xa0/g," ")} -function wd(a,b){if(Y(a,"BR"))b.push("");else{var c=Y(a,"TD"),d=Z(a,"display"),e=!c&&!ra(xd,d),f=a.previousElementSibling!=k?a.previousElementSibling:Ua(a.previousSibling),f=f?Z(f,"display"):"",g=Z(a,"float")||Z(a,"cssFloat")||Z(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var n=sd(a),v=m,w=m;n&&(v=Z(a,"white-space"),w=Z(a,"text-transform"));x(a.childNodes,function(a){a.nodeType==Sa&&n?yd(a,b,v,w):Y(a)&&wd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!ha(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var xd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function yd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ha(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function td(a){if(Eb){if("relative"==Z(a,"position"))return 1;a=Z(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return zd(a)}function zd(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=pd(a))&&(b*=zd(a));return b};var $={},Ad={};$.aa=function(a,b,c){var d;try{d=Fb.k("a",b)}catch(e){d=cb(F(b),"A",m,b)}return qa(d,function(b){b=vd(b);return c&&-1!=b.indexOf(a)||b==a})};$.W=function(a,b,c){var d;try{d=Fb.k("a",b)}catch(e){d=cb(F(b),"A",m,b)}return ma(d,function(b){b=vd(b);return c&&-1!=b.indexOf(a)||b==a})};$.r=function(a,b){return $.aa(a,b,p)};$.k=function(a,b){return $.W(a,b,p)};Ad.r=function(a,b){return $.aa(a,b,l)};Ad.k=function(a,b){return $.W(a,b,l)};var Bd={r:function(a,b){return b.getElementsByTagName(a)[0]||m},k:function(a,b){return b.getElementsByTagName(a)}};var Cd={className:eb,"class name":eb,css:Fb,"css selector":Fb,id:{r:function(a,b){var c=F(b),d=t(a)?c.A.getElementById(a):a;if(!d)return m;if(od(d,"id")==a&&Wa(b,d))return d;c=cb(c,"*");return qa(c,function(c){return od(c,"id")==a&&Wa(b,c)})},k:function(a,b){var c=cb(F(b),"*",m,b);return ma(c,function(b){return od(b,"id")==a})}},linkText:$,"link text":$,name:{r:function(a,b){var c=cb(F(b),"*",m,b);return qa(c,function(b){return od(b,"name")==a})},k:function(a,b){var c=cb(F(b),"*",m,b);return ma(c, -function(b){return od(b,"name")==a})}},partialLinkText:Ad,"partial link text":Ad,tagName:Bd,"tag name":Bd,xpath:X};function Dd(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=m}if(c){var d=Cd[c];if(d&&da(d.k))return d.k(a[c],b||ga.document)}h(Error("Unsupported locator strategy: "+c))};function Ed(){this.F=k} -function Fd(a,b,c){switch(typeof b){case "string":Gd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fd(a,a.F?a.F.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Gd(f, -c),c.push(":"),Fd(a,a.F?a.F.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Hd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Id=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Gd(a,b){b.push('"',a.replace(Id,function(a){if(a in Hd)return Hd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Hd[a]=e+b.toString(16)}),'"')};B||y||A&&xb(3.5)||z&&xb(8);function Jd(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return na(a,Jd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Kd(a);return b}if("document"in a)return b={},b.WINDOW=Kd(a),b;if(ca(a))return na(a,Jd);a=Pa(a,function(a,b){return"number"==typeof b||t(b)});return Qa(a,Jd);default:return m}} -function Ld(a,b){return"array"==ba(a)?na(a,function(a){return Ld(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?Md(a.ELEMENT,b):"WINDOW"in a?Md(a.WINDOW,b):Qa(a,function(a){return Ld(a,b)}):a}function Nd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.M=fa());b.M||(b.M=fa());return b}function Kd(a){var b=Nd(a.ownerDocument),c=Ra(b,function(b){return b==a});c||(c=":wdc:"+b.M++,b[c]=a);return c} -function Md(a,b){a=decodeURIComponent(a);var c=b||document,d=Nd(c);a in d||h(new Pb(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new Pb(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new Pb(10,"Element is no longer attached to the DOM"))};function Od(a,b,c){var d={};d[a]=b;a=Dd;c=[d,c];var d=window||ga,e;try{a=t(a)?new d.Function(a):d==window?a:new d.Function("return ("+a+").apply(null,arguments);");var f=Ld(c,d.document),g=a.apply(m,f);e={status:0,value:Jd(g)}}catch(n){e={status:"code"in n?n.code:13,value:{message:n.message}}}f=[];Fd(new Ed,e,f);return f.join("")}var Pd=["_"],Qd=r;!(Pd[0]in Qd)&&Qd.execScript&&Qd.execScript("var "+Pd[0]);for(var Rd;Pd.length&&(Rd=Pd.shift());)!Pd.length&&s(Od)?Qd[Rd]=Od:Qd=Qd[Rd]?Qd[Rd]:Qd[Rd]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Qb="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Rb=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Sb=/^#(?:[0-9a-f]{3}){1,2}$/i,Tb=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ub=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Vb(a,b){this.code=a;this.state=Wb[a]||Xb;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(Vb,Error); +var Xb="unknown error",Wb={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Wb[13]=Xb;Wb[9]="unknown command";Vb.prototype.toString=function(){return this.name+": "+this.message};function Yb(a,b,c){this.c=a;this.oa=b||1;this.j=c||1};var C=w&&!(w&&9<=x),Zb=w&&!(w&&8<=x);function $b(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.qa=e;this.parentNode=b}function ac(a,b,c){var d=Zb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $b(b,a,b.nodeName,d,c)};function bc(a){this.Q=a;this.C=0}function cc(a){a=a.match(dc);for(var b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);return new bc(a)}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function D(a,b){return a.Q[a.C+(b||0)]}bc.prototype.next=function(){return this.Q[this.C++]};bc.prototype.back=function(){this.C--};bc.prototype.empty=function(){return this.Q.length<=this.C};function E(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(C&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),C&&"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} +function F(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Zb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function fc(a,b,c,d,e){return(C?gc:hc).call(null,a,b,r(c)?c:null,r(d)?d:null,e||new G)} +function gc(a,b,c,d,e){if(a instanceof ic||8==a.i||c&&null===a.i){var f=b.all;if(!f)return e;a=jc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],m=0;b=f[m++];)F(b,c,d)&&g.push(b);f=g}for(m=0;b=f[m++];)"*"==a&&"!"==b.tagName||e.add(b);return e}kc(a,b,c,d,e);return e} +function hc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof H?kc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),u(b,function(a){F(a,c,d)&&e.add(a)}));return e} +function lc(a,b,c,d,e){var f;if((a instanceof ic||8==a.i||c&&null===a.i)&&(f=b.childNodes)){var g=jc(a);if("*"!=g&&(f=pa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=pa(f,function(a){return F(a,c,d)}));u(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return mc(a,b,c,d,e)}function mc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)F(b,c,d)&&a.matches(b)&&e.add(b);return e} +function kc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)F(b,c,d)&&a.matches(b)&&e.add(b),kc(a,b,c,d,e)}function jc(a){if(a instanceof H){if(8==a.i)return"!";if(null===a.i)return"*"}return a.getName()};function G(){this.j=this.f=null;this.v=0}function nc(a){this.n=a;this.next=this.s=null}function oc(a,b){if(!a.f)return b;if(!b.f)return a;for(var c=a.f,d=b.f,e=null,f=null,g=0;c&&d;)c.n==d.n||c.n instanceof $b&&d.n instanceof $b&&c.n.c==d.n.c?(f=c,c=c.next,d=d.next):0<ib(c.n,d.n)?(f=d,d=d.next):(f=c,c=c.next),(f.s=e)?e.next=f:a.f=f,e=f,g++;for(f=c||d;f;)f.s=e,e=e.next=f,g++,f=f.next;a.j=e;a.v=g;return a} +G.prototype.unshift=function(a){a=new nc(a);a.next=this.f;this.j?this.f.s=a:this.f=this.j=a;this.f=a;this.v++};G.prototype.add=function(a){a=new nc(a);a.s=this.j;this.f?this.j.next=a:this.f=this.j=a;this.j=a;this.v++};function pc(a){return(a=a.f)?a.n:null}G.prototype.m=h("v");function qc(a){return(a=pc(a))?E(a):""}function I(a,b){return new rc(a,!!b)}function rc(a,b){this.ka=a;this.S=(this.t=b)?a.j:a.f;this.L=null} +rc.prototype.next=function(){var a=this.S;if(null==a)return null;var b=this.L=a;this.S=this.t?a.s:a.next;return b.n};rc.prototype.remove=function(){var a=this.ka,b=this.L;if(!b)throw Error("Next must be called at least once before remove.");var c=b.s,b=b.next;c?c.next=b:a.f=b;b?b.s=c:a.j=c;a.v--;this.L=null};function J(a){this.e=a;this.g=this.o=!1;this.w=null}function K(a){return"\n "+a.toString().split("\n").join("\n ")}J.prototype.d=h("o");function sc(a,b){a.o=b}function tc(a,b){a.g=b}J.prototype.q=h("w");function L(a,b){var c=a.evaluate(b);return c instanceof G?+qc(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof G?qc(c):""+c}function uc(a,b){var c=a.evaluate(b);return c instanceof G?!!c.m():!!c};function vc(a,b,c){J.call(this,a.e);this.P=a;this.W=b;this.ba=c;this.o=b.d()||c.d();this.g=b.g||c.g;this.P==wc&&(c.g||c.d()||4==c.e||0==c.e||!b.q()?b.g||(b.d()||4==b.e||0==b.e||!c.q())||(this.w={name:c.q().name,u:b}):this.w={name:b.q().name,u:c})}s(vc,J); +function xc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof G&&c instanceof G){e=I(b);for(d=e.next();d;d=e.next())for(b=I(c),f=b.next();f;f=b.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof G||c instanceof G){b instanceof G?e=b:(e=c,c=b);e=I(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+E(d);break;case "boolean":d=!!E(d);break;case "string":d=E(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}vc.prototype.evaluate=function(a){return this.P.l(this.W,this.ba,a)};vc.prototype.toString=function(){var a="Binary Expression: "+this.P,a=a+K(this.W);return a+=K(this.ba)};function yc(a,b,c,d){this.na=a;this.$=b;this.e=c;this.l=d}yc.prototype.toString=h("na");var zc={}; +function N(a,b,c,d){if(zc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new yc(a,b,c,d);return zc[a.toString()]=a}N("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});N("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});N("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});N("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});N("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});N("<",4,2,function(a,b,c){return xc(function(a,b){return a<b},a,b,c)}); +N(">",4,2,function(a,b,c){return xc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return xc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return xc(function(a,b){return a>=b},a,b,c)});var wc=N("=",3,2,function(a,b,c){return xc(function(a,b){return a==b},a,b,c,!0)});N("!=",3,2,function(a,b,c){return xc(function(a,b){return a!=b},a,b,c,!0)});N("and",2,2,function(a,b,c){return uc(a,c)&&uc(b,c)});N("or",1,2,function(a,b,c){return uc(a,c)||uc(b,c)});function Ac(a,b){if(b.m()&&4!=a.e)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.e);this.aa=a;this.b=b;this.o=a.d();this.g=a.g}s(Ac,J);Ac.prototype.evaluate=function(a){a=this.aa.evaluate(a);return Bc(this.b,a)};Ac.prototype.toString=function(){var a;a="Filter:"+K(this.aa);return a+=K(this.b)};function Cc(a,b){if(b.length<a.Z)throw Error("Function "+a.h+" expects at least"+a.Z+" arguments, "+b.length+" given");if(null!==a.M&&b.length>a.M)throw Error("Function "+a.h+" expects at most "+a.M+" arguments, "+b.length+" given");a.la&&u(b,function(b,d){if(4!=b.e)throw Error("Argument "+d+" to function "+a.h+" is not of type Nodeset: "+b);});J.call(this,a.e);this.B=a;this.H=b;sc(this,a.o||sa(b,function(a){return a.d()}));tc(this,a.ja&&!b.length||a.ia&&!!b.length||sa(b,function(a){return a.g}))} +s(Cc,J);Cc.prototype.evaluate=function(a){return this.B.l.apply(null,wa(a,this.H))};Cc.prototype.toString=function(){var a="Function: "+this.B;if(this.H.length)var b=ra(this.H,function(a,b){return a+K(b)},"Arguments:"),a=a+K(b);return a};function Dc(a,b,c,d,e,f,g,m,t){this.h=a;this.e=b;this.o=c;this.ja=d;this.ia=e;this.l=f;this.Z=g;this.M=void 0!==m?m:g;this.la=!!t}Dc.prototype.toString=h("h");var Ec={}; +function O(a,b,c,d,e,f,g,m){if(Ec.hasOwnProperty(a))throw Error("Function already created: "+a+".");Ec[a]=new Dc(a,b,c,d,!1,e,f,g,m)}O("boolean",2,!1,!1,function(a,b){return uc(b,a)},1);O("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1);O("concat",3,!1,!1,function(a,b){var c=xa(arguments,1);return ra(c,function(b,c){return b+M(c,a)},"")},2,null);O("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2); +O("count",1,!1,!1,function(a,b){return b.evaluate(a).m()},1,1,!0);O("false",2,!1,!1,n(!1),0);O("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +O("id",4,!1,!1,function(a,b){function c(a){if(C){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ua(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];u(d,function(a){(a=c(a))&&!va(f,a)&&f.push(a)});f.sort(ib);var g=new G;u(f,function(a){g.add(a)});return g},1);O("lang",2,!1,!1,n(!1),1); +O("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.j},0);O("local-name",3,!1,!0,function(a,b){var c=b?pc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,!0);O("name",3,!1,!0,function(a,b){var c=b?pc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,!0);O("namespace-uri",3,!0,!1,n(""),0,1,!0);O("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):E(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +O("not",2,!1,!1,function(a,b){return!uc(b,a)},1);O("number",1,!1,!0,function(a,b){return b?L(b,a):+E(a.c)},0,1);O("position",1,!0,!1,function(a){return a.oa},0);O("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);O("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,!1,!0,function(a,b){return b?M(b,a):E(a.c)},0,1);O("string-length",1,!1,!0,function(a,b){return(b?M(b,a):E(a.c)).length},0,1); +O("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +O("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,!1,!1,function(a,b){for(var c=I(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+E(e);return d},1,1,!0);O("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(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);O("true",2,!1,!1,n(!0),0);function H(a,b){this.ea=a;this.X=void 0!==b?b:null;this.i=null;switch(a){case "comment":this.i=8;break;case "text":this.i=db;break;case "processing-instruction":this.i=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Fc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}H.prototype.matches=function(a){return null===this.i||this.i==a.nodeType};H.prototype.getName=h("ea"); +H.prototype.toString=function(){var a="Kind Test: "+this.ea;null===this.X||(a+=K(this.X));return a};function Gc(a){J.call(this,3);this.da=a.substring(1,a.length-1)}s(Gc,J);Gc.prototype.evaluate=h("da");Gc.prototype.toString=function(){return"Literal: "+this.da};function ic(a,b){this.h=a.toLowerCase();this.N=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}ic.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.h&&this.h!=a.nodeName.toLowerCase()?!1:this.N==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};ic.prototype.getName=h("h");ic.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.N?"":this.N+":")+this.h};function Hc(a){J.call(this,1);this.fa=a}s(Hc,J);Hc.prototype.evaluate=h("fa");Hc.prototype.toString=function(){return"Number: "+this.fa};function Ic(a,b){J.call(this,a.e);this.U=a;this.A=b;this.o=a.d();this.g=a.g;if(1==this.A.length){var c=this.A[0];c.J||c.p!=Jc||(c=c.G,"*"!=c.getName()&&(this.w={name:c.getName(),u:null}))}}s(Ic,J);function Kc(){J.call(this,4)}s(Kc,J);Kc.prototype.evaluate=function(a){var b=new G;a=a.c;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Kc.prototype.toString=n("Root Helper Expression");function Lc(){J.call(this,4)}s(Lc,J);Lc.prototype.evaluate=function(a){var b=new G;b.add(a.c);return b}; +Lc.prototype.toString=n("Context Helper Expression"); +Ic.prototype.evaluate=function(a){var b=this.U.evaluate(a);if(!(b instanceof G))throw Error("Filter expression must evaluate to nodeset.");a=this.A;for(var c=0,d=a.length;c<d&&b.m();c++){var e=a[c],f=I(b,e.p.t),g;if(e.d()||e.p!=Mc)if(e.d()||e.p!=Nc)for(g=f.next(),b=e.evaluate(new Yb(g));null!=(g=f.next());)g=e.evaluate(new Yb(g)),b=oc(b,g);else g=f.next(),b=e.evaluate(new Yb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Yb(g))}}return b}; +Ic.prototype.toString=function(){var a;a="Path Expression:"+K(this.U);if(this.A.length){var b=ra(this.A,function(a,b){return a+K(b)},"Steps:");a+=K(b)}return a};function Oc(a,b){this.b=a;this.t=!!b}function Bc(a,b,c){for(c=c||0;c<a.b.length;c++)for(var d=a.b[c],e=I(b),f=b.m(),g,m=0;g=e.next();m++){var t=a.t?f-m:m+1;g=d.evaluate(new Yb(g,t,f));if("number"==typeof g)t=t==g;else if("string"==typeof g||"boolean"==typeof g)t=!!g;else if(g instanceof G)t=0<g.m();else throw Error("Predicate.evaluate returned an unexpected type.");t||e.remove()}return b}Oc.prototype.q=function(){return 0<this.b.length?this.b[0].q():null}; +Oc.prototype.d=function(){for(var a=0;a<this.b.length;a++){var b=this.b[a];if(b.d()||1==b.e||0==b.e)return!0}return!1};Oc.prototype.m=function(){return this.b.length};Oc.prototype.toString=function(){return ra(this.b,function(a,b){return a+K(b)},"Predicates:")};function Q(a,b,c,d){J.call(this,4);this.p=a;this.G=b;this.b=c||new Oc([]);this.J=!!d;b=this.b.q();a.pa&&b&&(a=b.name,a=C?a.toLowerCase():a,this.w={name:a,u:b.u});this.o=this.b.d()}s(Q,J); +Q.prototype.evaluate=function(a){var b=a.c,c=null,c=this.q(),d=null,e=null,f=0;c&&(d=c.name,e=c.u?M(c.u,a):null,f=1);if(this.J)if(this.d()||this.p!=Pc)if(a=I((new Q(Qc,new H("node"))).evaluate(a)),b=a.next())for(c=this.l(b,d,e,f);null!=(b=a.next());)c=oc(c,this.l(b,d,e,f));else c=new G;else c=fc(this.G,b,d,e),c=Bc(this.b,c,f);else c=this.l(a.c,d,e,f);return c};Q.prototype.l=function(a,b,c,d){a=this.p.B(this.G,a,b,c);return a=Bc(this.b,a,d)}; +Q.prototype.toString=function(){var a;a="Step:"+K("Operator: "+(this.J?"//":"/"));this.p.h&&(a+=K("Axis: "+this.p));a+=K(this.G);if(this.b.m()){var b=ra(this.b.b,function(a,b){return a+K(b)},"Predicates:");a+=K(b)}return a};function Rc(a,b,c,d){this.h=a;this.B=b;this.t=c;this.pa=d}Rc.prototype.toString=h("h");var Sc={};function R(a,b,c,d){if(Sc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Rc(a,b,c,!!d);return Sc[a]=b} +R("ancestor",function(a,b){for(var c=new G,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);R("ancestor-or-self",function(a,b){var c=new G,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Jc=R("attribute",function(a,b){var c=new G,d=a.getName();if("style"==d&&b.style&&C)return c.add(new $b(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof H&&null===a.i||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)C?g.nodeValue&&c.add(ac(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(C?g.nodeValue&&c.add(ac(b,g,b.sourceIndex)):c.add(g));return c},!1),Pc=R("child",function(a,b,c,d,e){return(C?lc:mc).call(null,a,b,r(c)?c:null,r(d)?d:null,e||new G)},!1,!0); +R("descendant",fc,!1,!0);var Qc=R("descendant-or-self",function(a,b,c,d){var e=new G;F(b,c,d)&&a.matches(b)&&e.add(b);return fc(a,b,c,d,e)},!1,!0),Mc=R("following",function(a,b,c,d){var e=new G;do for(var f=b;f=f.nextSibling;)F(f,c,d)&&a.matches(f)&&e.add(f),e=fc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);R("following-sibling",function(a,b){for(var c=new G,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);R("namespace",function(){return new G},!1); +var Tc=R("parent",function(a,b){var c=new G;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Nc=R("preceding",function(a,b,c,d){var e=new G,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,m=f.length;g<m;g++){var t=[];for(b=f[g];b=b.previousSibling;)t.unshift(b);for(var v=0,p=t.length;v<p;v++)b=t[v],F(b,c,d)&&a.matches(b)&&e.add(b),e=fc(a,b,c,d,e)}return e},!0,!0); +R("preceding-sibling",function(a,b){for(var c=new G,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Uc=R("self",function(a,b){var c=new G;a.matches(b)&&c.add(b);return c},!1);function Vc(a){J.call(this,1);this.T=a;this.o=a.d();this.g=a.g}s(Vc,J);Vc.prototype.evaluate=function(a){return-L(this.T,a)};Vc.prototype.toString=function(){return"Unary Expression: -"+K(this.T)};function Wc(a){J.call(this,4);this.D=a;sc(this,sa(this.D,function(a){return a.d()}));tc(this,sa(this.D,function(a){return a.g}))}s(Wc,J);Wc.prototype.evaluate=function(a){var b=new G;u(this.D,function(c){c=c.evaluate(a);if(!(c instanceof G))throw Error("Path expression must evaluate to NodeSet.");b=oc(b,c)});return b};Wc.prototype.toString=function(){return ra(this.D,function(a,b){return a+K(b)},"Union Expression:")};function Xc(a,b){this.a=a;this.ma=b}function Yc(a){for(var b,c=[];;){S(a,"Missing right hand side of binary expression.");b=Zc(a);var d=a.a.next();if(!d)break;var e=(d=zc[d]||null)&&d.$;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].$;)b=new vc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new vc(c.pop(),c.pop(),b);return b}function S(a,b){if(a.a.empty())throw Error(b);}function $c(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function ad(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function bd(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Gc(a)}function cd(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new ic(b);var d=b.substring(0,c);a=a.ma(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new ic(b,a)} +function dd(a){var b,c=[],d;if("/"==D(a.a)||"//"==D(a.a)){b=a.a.next();d=D(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Kc;d=new Kc;S(a,"Missing next location step.");b=ed(a,b);c.push(b)}else{a:{b=D(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Yc(a);S(a,'unclosed "("');$c(a,")");break;case '"':case "'":b=bd(a);break;default:if(isNaN(+b))if(!Fc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==D(a.a,1)){b=a.a.next();b=Ec[b]||null;a.a.next();for(d=[];")"!=D(a.a);){S(a,"Missing function argument list.");d.push(Yc(a));if(","!=D(a.a))break;a.a.next()}S(a,"Unclosed function argument list.");ad(a);b=new Cc(b,d)}else{b=null;break a}else b=new Hc(+a.a.next())}"["==D(a.a)&&(d=new Oc(fd(a)),b=new Ac(b,d))}if(b)if("/"==D(a.a)||"//"==D(a.a))d=b;else return b;else b=ed(a,"/"),d=new Lc,c.push(b)}for(;"/"==D(a.a)||"//"==D(a.a);)b=a.a.next(),S(a,"Missing next location step."),b=ed(a,b),c.push(b); +return new Ic(d,c)} +function ed(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a))return d=new Q(Uc,new H("node")),a.a.next(),d;if(".."==D(a.a))return d=new Q(Tc,new H("node")),a.a.next(),d;var f;if("@"==D(a.a))f=Jc,a.a.next(),S(a,"Missing attribute name");else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Sc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();S(a,"Missing node name")}else f=Pc; +c=D(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==D(a.a,1)){if(!Fc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!Fc(c))throw Error("Invalid type name: "+c);$c(a,"(");S(a,"Bad nodetype");e=D(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=bd(a);S(a,"Bad nodetype");ad(a);c=new H(c,g)}else c=cd(a);else if("*"==c)c=cd(a);else throw Error("Bad token: "+a.a.next());e=new Oc(fd(a),f.t);return d||new Q(f,c,e,"//"==b)} +function fd(a){for(var b=[];"["==D(a.a);){a.a.next();S(a,"Missing predicate expression.");var c=Yc(a);b.push(c);S(a,"Unclosed predicate expression.");$c(a,"]")}return b}function Zc(a){if("-"==D(a.a))return a.a.next(),new Vc(Zc(a));var b=dd(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==a.a.next();)S(a,"Missing next union location path."),b.push(dd(a));a.a.back();a=new Wc(b)}return a};function gd(a){switch(a.nodeType){case 1:return ha(hd,a);case 9:return gd(a.documentElement);case 2:return a.ownerElement?gd(a.ownerElement):id;case 11:case 10:case 6:case 12:return id;default:return a.parentNode?gd(a.parentNode):id}}function id(){return null}function hd(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?hd(a.parentNode,b):null};function jd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=cc(a);if(c.empty())throw Error("Invalid XPath expression.");b?ca(b)||(b=ga(b.lookupNamespaceURI,b)):b=n(null);var d=Yc(new Xc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Yb(a));return new T(c,b)}} +function T(a,b){if(0==b)if(a instanceof G)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 G))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof G?qc(a):""+a;break;case 1:this.numberValue=a instanceof G?+qc(a):+a;break;case 3:this.booleanValue=a instanceof G?0<a.m():!!a;break;case 4:case 5:case 6:case 7:var d= +I(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof $b?e.c:e);this.snapshotLength=a.m();this.invalidIteratorState=!1;break;case 8:case 9:d=pc(a);this.singleNodeValue=d instanceof $b?d.c:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}T.ANY_TYPE=0;T.NUMBER_TYPE=1;T.STRING_TYPE=2;T.BOOLEAN_TYPE=3;T.UNORDERED_NODE_ITERATOR_TYPE=4;T.ORDERED_NODE_ITERATOR_TYPE=5;T.UNORDERED_NODE_SNAPSHOT_TYPE=6;T.ORDERED_NODE_SNAPSHOT_TYPE=7;T.ANY_UNORDERED_NODE_TYPE=8;T.FIRST_ORDERED_NODE_TYPE=9;function kd(a){this.lookupNamespaceURI=gd(a)} +function ld(a){a=a||q;var b=a.document;b.evaluate||(a.XPathResult=T,b.evaluate=function(a,b,e,f){return(new jd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new jd(a,b)},b.createNSResolver=function(a){return new kd(a)})};var U={};U.ga=function(){var a={sa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();U.l=function(a,b,c){var d=z(a);(w||yb)&&ld(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.ga;return w&&!Va(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!La||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new Vb(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +U.I=function(a,b){if(!a||1!=a.nodeType)throw new Vb(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};U.r=function(a,b){var c=function(){var c=U.l(b,a,9);return c?(c=c.singleNodeValue,Ka?c:c||null):b.selectSingleNode?(c=z(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||U.I(c,a);return c}; +U.k=function(a,b){var c=function(){var c=U.l(b,a,7);if(c){var e=c.snapshotLength;Ka&&void 0===e&&U.I(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=z(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();u(c,function(b){U.I(b,a)});return c};function md(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}md.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};md.prototype.contains=function(a){return this&&a?a instanceof md?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +md.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};md.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +md.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}V.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};V.prototype.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +V.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};V.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +V.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var nd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function od(a){var b=[];u(a.split(nd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return Ka?b.replace(/\w+:;/g,""):b} +function pd(a,b){b=b.toLowerCase();if("style"==b)return od(a.style.cssText);if(Lb&&"value"==b&&W(a,"INPUT"))return a.value;if(Mb&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}function qd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=na(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Mb?"styleFloat":"cssFloat";var d;a:{d=c;var e=z(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||rd(a,c);if(null===d)d=null;else if(va(Qb,c)){b:{var f=d.match(Tb);if(f){var c=Number(f[1]),e=Number(f[2]),g=Number(f[3]),f=Number(f[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g&&0<=f&&1>=f){c=[c,e,g,f];break b}}c=null}if(!c){b:{if(g= +d.match(Ub))if(c=Number(g[1]),e=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g){c=[c,e,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=Pb[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(Rb,"#$1$1$2$2$3$3")),!Sb.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} +function rd(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&ca(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=qd(a))?rd(c,b):null} +function sd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=qd(a);return!a||c(a)}function d(a){var b=td(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&sa(a.childNodes,function(a){return a.nodeType==db||W(a)&&d(a)})}function e(a){return ud(a)==Y&&ta(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +lb(a,function(a){return W(a,"SELECT")});return!!f&&sd(f,!0)}return(f=vd(a))?!!f.V&&0<f.rect.width&&0<f.rect.height&&sd(f.V,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==wd(a)||!d(a)?!1:!e(a)}var Y="hidden"; +function ud(a){function b(a){var b=X(a,"position");if("fixed"==b)return v=!0,a==g?null:g;for(a=qd(a);a&&a!=g&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=qd(a);return a}function c(a){var b=a;if("visible"==t)if(a==g&&m)b=m;else if(a==m)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(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==g){var b=(new eb(f)).K;a=Ma||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=w&&Va("10")&&b.pageYOffset!=a.scrollTop?new Ya(a.scrollLeft,a.scrollTop):new Ya(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Ya(a.scrollLeft,a.scrollTop);return a}var e=xd(a),f=z(a),g=f.documentElement,m=f.body,t=X(g,"overflow"),v;for(a=b(a);a;a=b(a)){var p=c(a);if("visible"!=p.x||"visible"!=p.y){var k=td(a);if(0==k.width||0==k.height)return Y;var l=e.right<k.left,P=e.bottom<k.top;if(l&&"hidden"==p.x|| +P&&"hidden"==p.y)return Y;if(l&&"visible"!=p.x||P&&"visible"!=p.y){l=d(a);P=e.bottom<k.top-l.y;if(e.right<k.left-l.x&&"visible"!=p.x||P&&"visible"!=p.x)return Y;e=ud(a);return e==Y?Y:"scroll"}l=e.left>=k.left+k.width;k=e.top>=k.top+k.height;if(l&&"hidden"==p.x||k&&"hidden"==p.y)return Y;if(l&&"visible"!=p.x||k&&"visible"!=p.y){if(v&&(p=d(a),e.left>=g.scrollWidth-p.x||e.right>=g.scrollHeight-p.y))return Y;e=ud(a);return e==Y?Y:"scroll"}}}return"none"}var yd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function td(a){function b(a){var c=(z(a)?z(a).parentWindow||z(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(yd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),p=parseFloat(c[3]),k=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),P=f.left+f.width,Fa=f.top+f.height,Ga=f.left*d,d=P*d,Ha=f.left*e,e=P*e,Ia=f.top*p,p=Fa*p,Ja=f.top*k,P=Fa*k,Fa=Ga+Ia+l,k=Ha+Ja+c,Ia=d+Ia+l,Ja=e+Ja+c,Ga=Ga+p+l,Ha=Ha+P+c,l=d+p+l,c=e+P+c;f.left=Math.min(Fa,Ia,Ga,l);f.top=Math.min(k,Ja,Ha,c);l=Math.max(Fa, +Ia,Ga,l);c=Math.max(k,Ja,Ha,c);f.width=l-f.left;f.height=c-f.top}(a=qd(a))&&b(a)}var c=vd(a);if(c)return c.rect;if(W(a,"HTML"))return c=z(a),a=fb((c?c.parentWindow||c.defaultView:window)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=z(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);Ka&&(0==f.width&& +0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));La&&!Fb(12)&&b(a);return f} +function vd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=U.r('/descendant::*[@usemap = "#'+c.name+'"]',z(c)))&&(e=td(d),!b&&"default"!=a.shape.toLowerCase())){var f=zd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{V:d,rect:e||new V(0,0,0,0)}} +function zd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)}function xd(a){a=td(a);return new md(a.top,a.left+a.width,a.top+a.height,a.left)} +function Ad(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function Bd(a){var b=[];Cd(a,b);b=qa(b,Ad);return Ad(b.join("\n")).replace(/\xa0/g," ")} +function Cd(a,b){if(W(a,"BR"))b.push("");else{var c=W(a,"TD"),d=X(a,"display"),e=!c&&!va(Dd,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:gb(a.previousSibling),f=f?X(f,"display"):"",g=X(a,"float")||X(a,"cssFloat")||X(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var m=sd(a),t=null,v=null;m&&(t=X(a,"white-space"),v=X(a,"text-transform"));u(a.childNodes,function(a){a.nodeType==db&&m?Ed(a,b,t,v):W(a)&&Cd(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||ka(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var Dd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function Ed(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ka(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function wd(a){if(Nb){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Fd(a)}function Fd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=qd(a))&&(b*=Fd(a));return b};var Z={},Gd={};Z.ca=function(a,b,c){var d;try{d=Ob.k("a",b)}catch(e){d=A(y(b),"A",null,b)}return ua(d,function(b){b=Bd(b);return c&&-1!=b.indexOf(a)||b==a})};Z.Y=function(a,b,c){var d;try{d=Ob.k("a",b)}catch(e){d=A(y(b),"A",null,b)}return pa(d,function(b){b=Bd(b);return c&&-1!=b.indexOf(a)||b==a})};Z.r=function(a,b){return Z.ca(a,b,!1)};Z.k=function(a,b){return Z.Y(a,b,!1)};Gd.r=function(a,b){return Z.ca(a,b,!0)};Gd.k=function(a,b){return Z.Y(a,b,!0)};var Hd={r:function(a,b){return b.getElementsByTagName(a)[0]||null},k:function(a,b){return b.getElementsByTagName(a)}};var Id={className:mb,"class name":mb,css:Ob,"css selector":Ob,id:{r:function(a,b){var c=y(b),d=r(a)?c.K.getElementById(a):a;if(!d)return null;if(pd(d,"id")==a&&hb(b,d))return d;c=A(c,"*");return ua(c,function(c){return pd(c,"id")==a&&hb(b,c)})},k:function(a,b){var c=A(y(b),"*",null,b);return pa(c,function(b){return pd(b,"id")==a})}},linkText:Z,"link text":Z,name:{r:function(a,b){var c=A(y(b),"*",null,b);return ua(c,function(b){return pd(b,"name")==a})},k:function(a,b){var c=A(y(b),"*",null,b);return pa(c, +function(b){return pd(b,"name")==a})}},partialLinkText:Gd,"partial link text":Gd,tagName:Hd,"tag name":Hd,xpath:U};function Jd(){this.F=void 0} +function Kd(a,b,c){switch(typeof b){case "string":Ld(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Kd(a,a.F?a.F.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Ld(f,c),c.push(":"),Kd(a,a.F?a.F.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Md={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Nd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ld(a,b){b.push('"',a.replace(Nd,function(a){if(a in Md)return Md[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Md[a]=e+b.toString(16)}),'"')};Ma||Ka||La&&Fb(3.5)||w&&Fb(8);function bb(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return qa(a,bb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Od(a);return b}if("document"in a)return b={},b.WINDOW=Od(a),b;if(ba(a))return qa(a,bb);a=$a(a,function(a,b){return"number"==typeof b||r(b)});return ab(a);default:return null}}function Pd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.O=ia());b.O||(b.O=ia());return b} +function Od(a){var b=Pd(a.ownerDocument),c=cb(b,function(b){return b==a});c||(c=":wdc:"+b.O++,b[c]=a);return c}function Qd(a,b){a=decodeURIComponent(a);var c=b||document,d=Pd(c);if(!(a in d))throw new Vb(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new Vb(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new Vb(10,"Element is no longer attached to the DOM");};function Rd(a,b,c,d){var e={};e[a]=b;var f;try{var g=d?Qd(d.WINDOW):window,m;a:{var t=c?Qd(c.ELEMENT,g.document):g.document,v;b:{for(var p in e)if(e.hasOwnProperty(p)){v=p;break b}v=null}if(v){var k=Id[v];if(k&&ca(k.k)){m=k.k(e[v],t||ja.document);break a}}throw Error("Unsupported locator strategy: "+v);}f={status:0,value:bb(m)}}catch(l){f={status:"code"in l?l.code:13,value:{message:l.message}}}a=[];Kd(new Jd,f,a);return a.join("")}var Sd=["_"],$=q;Sd[0]in $||!$.execScript||$.execScript("var "+Sd[0]); +for(var Td;Sd.length&&(Td=Sd.shift());)Sd.length||void 0===Rd?$=$[Td]?$[Td]:$[Td]={}:$[Td]=Rd;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/focus_on_element.js b/src/ghostdriver/third_party/webdriver-atoms/focus_on_element.js index c1552e6b7..4aa122b88 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/focus_on_element.js +++ b/src/ghostdriver/third_party/webdriver-atoms/focus_on_element.js @@ -1,90 +1,97 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function g(a){return function(){return this[a]}}function aa(a){return function(){return a}}var k=this; 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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var fa=Date.now||function(){return+new Date}; -function u(a,b){function c(){}c.prototype=b.prototype;a.Ba=b.prototype;a.prototype=new c};var ga=window;function ha(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",x=e[g]||"",y=RegExp("(\\d*)(\\D*)","g"),F=RegExp("(\\d*)(\\D*)","g");do{var U=y.exec(p)||["","",""],V=F.exec(x)||["","",""];if(0==U[0].length&&0==V[0].length)break;c=((0==U[1].length?0:parseInt(U[1],10))<(0==V[1].length?0:parseInt(V[1],10))?-1:(0==U[1].length?0:parseInt(U[1],10))>(0==V[1].length? -0:parseInt(V[1],10))?1:0)||((0==U[2].length)<(0==V[2].length)?-1:(0==U[2].length)>(0==V[2].length)?1:0)||(U[2]<V[2]?-1:U[2]>V[2]?1:0)}while(0==c)}return c}function ia(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ja=Array.prototype;function v(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ka(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function la(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function ma(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function na(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function oa(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function pa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function qa(a){return ja.concat.apply(ja,arguments)} -function ra(a,b,c){return 2>=arguments.length?ja.slice.call(a,b):ja.slice.call(a,b,c)};var sa={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function l(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function fa(a,b,c){return a.call.apply(a.bind,arguments)} +function ga(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)}}function ha(a,b,c){ha=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return ha.apply(null,arguments)} +function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ja=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.Fa=b.prototype;a.prototype=new c};var ka=window;function la(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var s=d[h]||"",z=e[h]||"",U=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var m=U.exec(s)||["","",""],n=q.exec(z)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))>(0==n[1].length? +0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c}function ma(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var na=Array.prototype;function r(a,b){for(var c=a.length,d=l(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function oa(a,b){for(var c=a.length,d=[],e=0,f=l(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var s=f[h];b.call(void 0,s,h,a)&&(d[e++]=s)}return d}function pa(a,b){for(var c=a.length,d=Array(c),e=l(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function qa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;r(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ra(a,b){for(var c=a.length,d=l(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 sa(a,b){for(var c=a.length,d=l(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 ta(a,b){var c;a:{c=a.length;for(var d=l(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:l(a)?a.charAt(c):a[c]}function ua(a,b){var c;a:if(l(a))c=l(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function va(a){return na.concat.apply(na,arguments)}function wa(a,b,c){return 2>=arguments.length?na.slice.call(a,b):na.slice.call(a,b,c)};var xa={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ta="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ua=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function va(a){wa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(ua,"#$1$1$2$2$3$3"));return a.toLowerCase()}var wa=/^#(?:[0-9a-f]{3}){1,2}$/i,xa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function ya(a){var b=a.match(xa);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var za=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Aa(a){var b=a.match(za);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function w(a,b){this.code=a;this.state=Ba[a]||Ca;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(w,Error); -var Ca="unknown error",Ba={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ba[13]=Ca;Ba[9]="unknown command";w.prototype.toString=function(){return this.name+": "+this.message};var Da,Ea,Fa,Ga,Ha,Ia;function Ja(){return r.navigator?r.navigator.userAgent:m}Ga=Fa=Ea=Da=n;var Ka;if(Ka=Ja()){var La=r.navigator;Da=0==Ka.indexOf("Opera");Ea=!Da&&-1!=Ka.indexOf("MSIE");Fa=!Da&&-1!=Ka.indexOf("WebKit");Ga=!Da&&!Fa&&"Gecko"==La.product}var z=Da,A=Ea,B=Ga,C=Fa,Ma,Na=r.navigator;Ma=Na&&Na.platform||"";Ha=-1!=Ma.indexOf("Mac");Ia=-1!=Ma.indexOf("Win");var Oa=-1!=Ma.indexOf("Linux");function Pa(){var a=r.document;return a?a.documentMode:k}var Qa; -a:{var Ra="",Sa;if(z&&r.opera)var Ta=r.opera.version,Ra="function"==typeof Ta?Ta():Ta;else if(B?Sa=/rv\:([^\);]+)(\)|;)/:A?Sa=/MSIE\s+([^\);]+)(\)|;)/:C&&(Sa=/WebKit\/(\S+)/),Sa)var Ua=Sa.exec(Ja()),Ra=Ua?Ua[1]:"";if(A){var Va=Pa();if(Va>parseFloat(Ra)){Qa=String(Va);break a}}Qa=Ra}var Wa={};function Xa(a){return Wa[a]||(Wa[a]=0<=ha(Qa,a))}function D(a){return A&&Ya>=a}var Za=r.document,Ya=!Za||!A?k:Pa()||("CSS1Compat"==Za.compatMode?parseInt(Qa,10):5);var $a;!B&&!A||A&&D(9)||B&&Xa("1.9.1");A&&Xa("9");var ab=A||z||C;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function bb(a,b){this.width=a;this.height=b}bb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};bb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};bb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};bb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function cb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function db(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function eb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var fb=3;function gb(a){return a?new hb(G(a)):$a||($a=new hb)}function ib(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function jb(a){if(ab)return a.parentElement;a=a.parentNode;return ea(a)&&1==a.nodeType?a:m}function kb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function lb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?mb(a,b):!c&&kb(e,b)?-1*nb(a,b):!d&&kb(f,a)?nb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function nb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return mb(d,a)}function mb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function ob(a,b){var c=[];return pb(a,b,c,l)?c[0]:k} -function pb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||pb(a,b,c,d))return l;a=a.nextSibling}return n}function qb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function hb(a){this.T=a||r.document||document}function rb(a){var b=a.T;a=!C&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}hb.prototype.contains=kb;var sb,tb,ub,vb,wb,xb,yb;yb=xb=wb=vb=ub=tb=sb=n;var H=Ja();H&&(-1!=H.indexOf("Firefox")?sb=l:-1!=H.indexOf("Camino")?tb=l:-1!=H.indexOf("iPhone")||-1!=H.indexOf("iPod")?ub=l:-1!=H.indexOf("iPad")?vb=l:-1!=H.indexOf("Android")?wb=l:-1!=H.indexOf("Chrome")?xb=l:-1!=H.indexOf("Safari")&&(yb=l));var zb=sb,Ab=tb,Bb=ub,Cb=vb,Db=wb,Eb=xb,Fb=yb;function Gb(a,b,c){this.e=a;this.ta=b||1;this.m=c||1};var I=A&&!D(9),Hb=A&&!D(8);function Ib(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ya=e;this.parentNode=b}function Jb(a,b,c){var d=Hb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Ib(b,a,b.nodeName,d,c)};function Kb(a){this.R=a;this.F=0}function Lb(a){a=a.match(Mb);for(var b=0;b<a.length;b++)Nb.test(a[b])&&a.splice(b,1);return new Kb(a)}var Mb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Nb=/^\s/;function J(a,b){return a.R[a.F+(b||0)]}Kb.prototype.next=function(){return this.R[this.F++]};Kb.prototype.back=function(){this.F--};Kb.prototype.empty=function(){return this.R.length<=this.F};function K(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function Ob(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Hb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Pb(a,b,c,d,e){return(I?Qb:Rb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)} -function Qb(a,b,c,d,e){if(a instanceof Sb||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=Tb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Ob(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Ub(a,b,c,d,e);return e} -function Rb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?Ub(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Ob(a,c,d)&&e.add(a)}));return e} -function Vb(a,b,c,d,e){var f;if((a instanceof Sb||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=Tb(a);if("*"!=g&&(f=ka(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ka(f,function(a){return Ob(a,c,d)}));v(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return Wb(a,b,c,d,e)}function Wb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Ob(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Ub(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Ob(b,c,d)&&a.matches(b)&&e.add(b),Ub(a,b,c,d,e)}function Tb(a){if(a instanceof M){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function L(){this.m=this.j=m;this.A=0}function Xb(a){this.o=a;this.next=this.u=m}function Yb(a,b){if(a.j){if(!b.j)return a}else return b;for(var c=a.j,d=b.j,e=m,f=m,g=0;c&&d;)c.o==d.o||c.o instanceof Ib&&d.o instanceof Ib&&c.o.e==d.o.e?(f=c,c=c.next,d=d.next):0<lb(c.o,d.o)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.j=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.A=g;return a} -L.prototype.unshift=function(a){a=new Xb(a);a.next=this.j;this.m?this.j.u=a:this.j=this.m=a;this.j=a;this.A++};L.prototype.add=function(a){a=new Xb(a);a.u=this.m;this.j?this.m.next=a:this.j=this.m=a;this.m=a;this.A++};function Zb(a){return(a=a.j)?a.o:m}L.prototype.p=q("A");function $b(a){return(a=Zb(a))?K(a):""}function ac(a,b){return new bc(a,!!b)}function bc(a,b){this.qa=a;this.S=(this.v=b)?a.m:a.j;this.N=m} -bc.prototype.next=function(){var a=this.S;if(a==m)return m;var b=this.N=a;this.S=this.v?a.u:a.next;return b.o};bc.prototype.remove=function(){var a=this.qa,b=this.N;b||h(Error("Next must be called at least once before remove."));var c=b.u,b=b.next;c?c.next=b:a.j=b;b?b.u=c:a.m=c;a.A--;this.N=m};function N(a){this.i=a;this.k=this.q=n;this.B=m}N.prototype.g=q("q");function cc(a,b){a.q=b}function dc(a,b){a.k=b}N.prototype.s=q("B");function O(a,b){var c=a.evaluate(b);return c instanceof L?+$b(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?$b(c):""+c}function ec(a,b){var c=a.evaluate(b);return c instanceof L?!!c.p():!!c};function fc(a,b,c){N.call(this,a.i);this.Q=a;this.Y=b;this.ca=c;this.q=b.g()||c.g();this.k=b.k||c.k;this.Q==gc&&(!c.k&&!c.g()&&4!=c.i&&0!=c.i&&b.s()?this.B={name:b.s().name,w:c}:!b.k&&(!b.g()&&4!=b.i&&0!=b.i&&c.s())&&(this.B={name:c.s().name,w:b}))}u(fc,N); -function hc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof L&&c instanceof L){f=ac(b);for(b=f.next();b;b=f.next()){e=ac(c);for(d=e.next();d;d=e.next())if(a(K(b),K(d)))return l}return n}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=ac(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+K(d);break;case "boolean":f=!!K(d);break;case "string":f=K(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}fc.prototype.evaluate=function(a){return this.Q.n(this.Y,this.ca,a)};fc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.Q+"\n";a+=" ";b+=this.Y.toString(a)+"\n";return b+=this.ca.toString(a)};function ic(a,b,c,d){this.sa=a;this.aa=b;this.i=c;this.n=d}ic.prototype.toString=q("sa");var jc={}; -function Q(a,b,c,d){a in jc&&h(Error("Binary operator already created: "+a));a=new ic(a,b,c,d);return jc[a.toString()]=a}Q("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});Q("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});Q("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});Q("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});Q("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});Q("<",4,2,function(a,b,c){return hc(function(a,b){return a<b},a,b,c)}); -Q(">",4,2,function(a,b,c){return hc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return hc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return hc(function(a,b){return a>=b},a,b,c)});var gc=Q("=",3,2,function(a,b,c){return hc(function(a,b){return a==b},a,b,c,l)});Q("!=",3,2,function(a,b,c){return hc(function(a,b){return a!=b},a,b,c,l)});Q("and",2,2,function(a,b,c){return ec(a,c)&&ec(b,c)});Q("or",1,2,function(a,b,c){return ec(a,c)||ec(b,c)});function kc(a,b){b.p()&&4!=a.i&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.i);this.ba=a;this.d=b;this.q=a.g();this.k=a.k}u(kc,N);kc.prototype.evaluate=function(a){a=this.ba.evaluate(a);return lc(this.d,a)};kc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ba.toString(a);return b+=this.d.toString(a)};function mc(a,b){b.length<a.$&&h(Error("Function "+a.l+" expects at least"+a.$+" arguments, "+b.length+" given"));a.O!==m&&b.length>a.O&&h(Error("Function "+a.l+" expects at most "+a.O+" arguments, "+b.length+" given"));a.ra&&v(b,function(b,d){4!=b.i&&h(Error("Argument "+d+" to function "+a.l+" is not of type Nodeset: "+b))});N.call(this,a.i);this.D=a;this.J=b;cc(this,a.q||na(b,function(a){return a.g()}));dc(this,a.pa&&!b.length||a.oa&&!!b.length||na(b,function(a){return a.k}))}u(mc,N); -mc.prototype.evaluate=function(a){return this.D.n.apply(m,qa(a,this.J))};mc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.D+"\n";b+=" ";this.J.length&&(a+=b+"Arguments:",b+=" ",a=ma(this.J,function(a,d){return a+"\n"+d.toString(b)},a));return a};function nc(a,b,c,d,e,f,g,p,x){this.l=a;this.i=b;this.q=c;this.pa=d;this.oa=e;this.n=f;this.$=g;this.O=s(p)?p:g;this.ra=!!x}nc.prototype.toString=q("l");var oc={}; -function R(a,b,c,d,e,f,g,p){a in oc&&h(Error("Function already created: "+a+"."));oc[a]=new nc(a,b,c,d,n,e,f,g,p)}R("boolean",2,n,n,function(a,b){return ec(b,a)},1);R("ceiling",1,n,n,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,n,n,function(a,b){var c=ra(arguments,1);return ma(c,function(b,c){return b+P(c,a)},"")},2,m);R("contains",2,n,n,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,n,n,function(a,b){return b.evaluate(a).p()},1,1,l);R("false",2,n,n,aa(n),0); -R("floor",1,n,n,function(a,b){return Math.floor(O(b,a))},1);R("id",4,n,n,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return oa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!pa(f,a)&&f.push(a)});f.sort(lb);var g=new L;v(f,function(a){g.add(a)});return g},1);R("lang",2,n,n,aa(n),1); -R("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.m},0);R("local-name",3,n,l,function(a,b){var c=b?Zb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,l);R("name",3,n,l,function(a,b){var c=b?Zb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,l);R("namespace-uri",3,l,n,aa(""),0,1,l);R("normalize-space",3,n,l,function(a,b){return(b?P(b,a):K(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,n,n,function(a,b){return!ec(b,a)},1);R("number",1,n,l,function(a,b){return b?O(b,a):+K(a.e)},0,1);R("position",1,l,n,function(a){return a.ta},0);R("round",1,n,n,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,n,n,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,n,l,function(a,b){return b?P(b,a):K(a.e)},0,1);R("string-length",1,n,l,function(a,b){return(b?P(b,a):K(a.e)).length},0,1); -R("substring",3,n,n,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,n,n,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,n,n,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,n,n,function(a,b){for(var c=ac(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,l);R("translate",3,n,n,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);R("true",2,n,n,aa(l),0);function M(a,b){this.fa=a;this.Z=s(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=fb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function pc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};M.prototype.getName=q("fa"); -M.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.fa;this.Z===m||(b+="\n"+this.Z.toString(a+" "));return b};function qc(a){N.call(this,3);this.ea=a.substring(1,a.length-1)}u(qc,N);qc.prototype.evaluate=q("ea");qc.prototype.toString=function(a){return(a||"")+"literal: "+this.ea};function Sb(a){this.l=a.toLowerCase()}Sb.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.l||this.l==a.nodeName.toLowerCase()?l:this.l==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};Sb.prototype.getName=q("l");Sb.prototype.toString=function(a){return(a||"")+"nametest: "+this.l};function rc(a){N.call(this,1);this.ga=a}u(rc,N);rc.prototype.evaluate=q("ga");rc.prototype.toString=function(a){return(a||"")+"number: "+this.ga};function sc(a,b){N.call(this,a.i);this.V=a;this.C=b;this.q=a.g();this.k=a.k;if(1==this.C.length){var c=this.C[0];!c.L&&c.r==tc&&(c=c.I,"*"!=c.getName()&&(this.B={name:c.getName(),w:m}))}}u(sc,N);function uc(){N.call(this,4)}u(uc,N);uc.prototype.evaluate=function(a){var b=new L;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};uc.prototype.toString=function(a){return a+"RootHelperExpr"};function vc(){N.call(this,4)}u(vc,N);vc.prototype.evaluate=function(a){var b=new L;b.add(a.e);return b}; -vc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -sc.prototype.evaluate=function(a){var b=this.V.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));a=this.C;for(var c=0,d=a.length;c<d&&b.p();c++){var e=a[c],f=ac(b,e.r.v),g;if(!e.g()&&e.r==wc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Gb(g))}else if(!e.g()&&e.r==xc)g=f.next(),b=e.evaluate(new Gb(g));else{g=f.next();for(b=e.evaluate(new Gb(g));(g=f.next())!=m;)g=e.evaluate(new Gb(g)),b=Yb(b,g)}}return b}; -sc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.V.toString(b);this.C.length&&(c+=b+"Steps:\n",b+=" ",v(this.C,function(a){c+=a.toString(b)}));return c};function yc(a,b){this.d=a;this.v=!!b}function lc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=ac(b),f=b.p(),g,p=0;g=e.next();p++){var x=a.v?f-p:p+1;g=d.evaluate(new Gb(g,x,f));var y;"number"==typeof g?y=x==g:"string"==typeof g||"boolean"==typeof g?y=!!g:g instanceof L?y=0<g.p():h(Error("Predicate.evaluate returned an unexpected type."));y||e.remove()}return b}yc.prototype.s=function(){return 0<this.d.length?this.d[0].s():m}; -yc.prototype.g=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.g()||1==b.i||0==b.i)return l}return n};yc.prototype.p=function(){return this.d.length};yc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return ma(this.d,function(a,d){return a+"\n"+b+d.toString(b)},a)};function zc(a,b,c,d){N.call(this,4);this.r=a;this.I=b;this.d=c||new yc([]);this.L=!!d;b=this.d.s();a.va&&b&&(a=b.name,a=I?a.toLowerCase():a,this.B={name:a,w:b.w});this.q=this.d.g()}u(zc,N); -zc.prototype.evaluate=function(a){var b=a.e,c=m,c=this.s(),d=m,e=m,f=0;c&&(d=c.name,e=c.w?P(c.w,a):m,f=1);if(this.L)if(!this.g()&&this.r==Ac)c=Pb(this.I,b,d,e),c=lc(this.d,c,f);else if(a=ac((new zc(Bc,new M("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);(b=a.next())!=m;)c=Yb(c,this.n(b,d,e,f));else c=new L;else c=this.n(a.e,d,e,f);return c};zc.prototype.n=function(a,b,c,d){a=this.r.D(this.I,a,b,c);return a=lc(this.d,a,d)}; -zc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.L?"//":"/")+"\n";this.r.l&&(b+=a+"Axis: "+this.r+"\n");b+=this.I.toString(a);if(this.d.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.d.length;c++)var d=c<this.d.length-1?", ":"",b=b+(this.d[c].toString(a)+d);return b};function Cc(a,b,c,d){this.l=a;this.D=b;this.v=c;this.va=d}Cc.prototype.toString=q("l");var Dc={}; -function S(a,b,c,d){a in Dc&&h(Error("Axis already created: "+a));b=new Cc(a,b,c,!!d);return Dc[a]=b}S("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);S("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var tc=S("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new Ib(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)I?g.nodeValue&&c.add(Jb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(I?g.nodeValue&&c.add(Jb(b,g,b.sourceIndex)):c.add(g));return c},n),Ac=S("child",function(a,b,c,d,e){return(I?Vb:Wb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)},n,l); -S("descendant",Pb,n,l);var Bc=S("descendant-or-self",function(a,b,c,d){var e=new L;Ob(b,c,d)&&a.matches(b)&&e.add(b);return Pb(a,b,c,d,e)},n,l),wc=S("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)Ob(f,c,d)&&a.matches(f)&&e.add(f),e=Pb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);S("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);S("namespace",function(){return new L},n); -var Ec=S("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),xc=S("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var x=[];for(b=f[g];b=b.previousSibling;)x.unshift(b);for(var y=0,F=x.length;y<F;y++)b=x[y],Ob(b,c,d)&&a.matches(b)&&e.add(b),e=Pb(a,b,c,d,e)}return e},l,l); -S("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Fc=S("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},n);function Gc(a){N.call(this,1);this.U=a;this.q=a.g();this.k=a.k}u(Gc,N);Gc.prototype.evaluate=function(a){return-O(this.U,a)};Gc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.U.toString(a+" ")};function Hc(a){N.call(this,4);this.G=a;cc(this,na(this.G,function(a){return a.g()}));dc(this,na(this.G,function(a){return a.k}))}u(Hc,N);Hc.prototype.evaluate=function(a){var b=new L;v(this.G,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=Yb(b,c)});return b};Hc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";v(this.G,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Ic(a){this.a=a}function Jc(a){for(var b,c=[];;){T(a,"Missing right hand side of binary expression.");b=Kc(a);var d=a.a.next();if(!d)break;var e=(d=jc[d]||m)&&d.aa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].aa;)b=new fc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new fc(c.pop(),c.pop(),b);return b}function T(a,b){a.a.empty()&&h(Error(b))}function Lc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Mc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Nc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new qc(a)}function Oc(a){return"*"!=J(a.a)&&":"==J(a.a,1)&&"*"==J(a.a,2)?new Sb(a.a.next()+a.a.next()+a.a.next()):new Sb(a.a.next())} -function Pc(a){var b,c=[],d;if("/"==J(a.a)||"//"==J(a.a)){b=a.a.next();d=J(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new uc;d=new uc;T(a,"Missing next location step.");b=Qc(a,b);c.push(b)}else{a:{b=J(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Jc(a);T(a,'unclosed "("');Lc(a,")");break;case '"':case "'":b=Nc(a);break;default:if(isNaN(+b))if(!pc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==J(a.a,1)){b=a.a.next();b=oc[b]||m;a.a.next();for(d=[];")"!=J(a.a);){T(a,"Missing function argument list.");d.push(Jc(a));if(","!=J(a.a))break;a.a.next()}T(a,"Unclosed function argument list.");Mc(a);b=new mc(b,d)}else{b=m;break a}else b=new rc(+a.a.next())}"["==J(a.a)&&(d=new yc(Rc(a)),b=new kc(b,d))}if(b)if("/"==J(a.a)||"//"==J(a.a))d=b;else return b;else b=Qc(a,"/"),d=new vc,c.push(b)}for(;"/"==J(a.a)||"//"==J(a.a);)b=a.a.next(),T(a,"Missing next location step."),b=Qc(a,b),c.push(b);return new sc(d, -c)} -function Qc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==J(a.a))return d=new zc(Fc,new M("node")),a.a.next(),d;if(".."==J(a.a))return d=new zc(Ec,new M("node")),a.a.next(),d;var f;"@"==J(a.a)?(f=tc,a.a.next(),T(a,"Missing attribute name")):"::"==J(a.a,1)?(/(?![0-9])[\w]/.test(J(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Dc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),T(a,"Missing node name")):f=Ac;e=J(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==J(a.a, -1)){pc(e)||h(Error("Invalid node type: "+e));c=a.a.next();pc(c)||h(Error("Invalid type name: "+c));Lc(a,"(");T(a,"Bad nodetype");e=J(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Nc(a);T(a,"Bad nodetype");Mc(a);c=new M(c,g)}else c=Oc(a);else"*"==e?c=Oc(a):h(Error("Bad token: "+a.a.next()));e=new yc(Rc(a),f.v);return d||new zc(f,c,e,"//"==b)} -function Rc(a){for(var b=[];"["==J(a.a);){a.a.next();T(a,"Missing predicate expression.");var c=Jc(a);b.push(c);T(a,"Unclosed predicate expression.");Lc(a,"]")}return b}function Kc(a){if("-"==J(a.a))return a.a.next(),new Gc(Kc(a));var b=Pc(a);if("|"!=J(a.a))a=b;else{for(b=[b];"|"==a.a.next();)T(a,"Missing next union location path."),b.push(Pc(a));a.a.back();a=new Hc(b)}return a};function Sc(a){a.length||h(Error("Empty XPath expression."));a=Lb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Jc(new Ic(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Gb(a));return new W(e,d)}} -function W(a,b){0==b&&(a instanceof L?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof L))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?$b(a):""+a;break;case 1:this.numberValue=a instanceof L?+$b(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.p():!!a;break;case 4:case 5:case 6:case 7:var d=ac(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Ib?e.e:e);this.snapshotLength=a.p();this.invalidIteratorState=n;break;case 8:case 9:d=Zb(a);this.singleNodeValue=d instanceof Ib?d.e:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function Tc(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=W,b.evaluate=function(a,b,e,f){return(new Sc(a)).evaluate(b,f)},b.createExpression=function(a){return new Sc(a)})};var X={};X.ia=function(){var a={Ca:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();X.n=function(a,b,c){var d=G(a);(A||Db)&&Tc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.ia;return A&&!Xa(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new w(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -X.K=function(a,b){(!a||1!=a.nodeType)&&h(new w(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};X.ua=function(a,b){var c=function(){var c=X.n(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||X.K(c,a);return c}; -X.wa=function(a,b){var c=function(){var c=X.n(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&X.K(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){X.K(b,a)});return c};function Uc(a){return(a=a.exec(Ja()))?a[1]:""}var Vc=function(){if(zb)return Uc(/Firefox\/([0-9.]+)/);if(A||z)return Qa;if(Eb)return Uc(/Chrome\/([0-9.]+)/);if(Fb)return Uc(/Version\/([0-9.]+)/);if(Bb||Cb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ja());if(a)return a[1]+"."+a[2]}else{if(Db)return(a=Uc(/Android\s+([0-9.]+)/))?a:Uc(/Version\/([0-9.]+)/);if(Ab)return Uc(/Camino\/([0-9.]+)/)}return""}();var Wc,Xc;function Yc(a){return Zc?Wc(a):A?0<=ha(Ya,a):Xa(a)}function $c(a){Zc?Xc(a):Db?ha(ad,a):ha(Vc,a)} -var Zc=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;Wc=function(a){return 0<=d.ma(e,""+a)};Xc=function(a){d.ma(f,""+a)};return l}(),bd;if(Db){var cd=/Android\s+([0-9\.]+)/.exec(Ja());bd=cd?cd[1]:"0"}else bd="0"; -var ad=bd,dd=A&&!D(8),ed=A&&!D(9),fd=A&&!D(10);Db&&$c(2.3);!z&&(!C||Yc("533"));function gd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function hd(a,b){return gd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function id(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function jd(a){if(A&&!D(8))return a.offsetParent;var b=G(a),c=hd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=hd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function kd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=id(a);b.x=c.left;b.y=c.top}else{c=rb(gb(a));var d,e=G(a),f=hd(a,"position"),g=B&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),p=new E(0,0),x;d=e?G(e):document;if(x=A)if(x=!D(9))x="CSS1Compat"!=gb(d).T.compatMode;x=x?d.body:d.documentElement;if(a!=x)if(a.getBoundingClientRect)d=id(a),e=rb(gb(e)),p.x=d.left+e.x,p.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(x),p.x=d.screenX-e.screenX,p.y=d.screenY-e.screenY;else{g=a;do{p.x+=g.offsetLeft;p.y+=g.offsetTop;g!=a&&(p.x+=g.clientLeft||0,p.y+=g.clientTop||0);if(C&&"fixed"==hd(g,"position")){p.x+=e.body.scrollLeft;p.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(z||C&&"absolute"==f)p.y-=e.body.offsetTop;for(g=a;(g=jd(g))&&g!=e.body&&g!=x;)if(p.x-=g.scrollLeft,!z||"TR"!=g.tagName)p.y-=g.scrollTop}b.x=p.x-c.x;b.y=p.y-c.y}if(B&&!Xa(12)){var y;A?y="-ms-transform": -C?y="-webkit-transform":z?y="-o-transform":B&&(y="-moz-transform");var F;y&&(F=hd(a,y));F||(F=hd(a,"transform"));F?(a=F.match(ld),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else y=da(a.W),F=a,a.targetTouches?F=a.targetTouches[0]:y&&a.W().targetTouches&&(F=a.W().targetTouches[0]),b.x=F.clientX,b.y=F.clientY;return b} -function md(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=id(a),new bb(a.right-a.left,a.bottom-a.top)):new bb(b,c)}var ld=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function nd(a){var b;a:{a=G(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var od=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function pd(a){var b=[];v(a.split(od),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function qd(a){var b;b="usemap";return"style"==b?pd(a.style.cssText):dd&&"value"==b&&Y(a,"INPUT")?a.value:ed&&a[b]===l?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:m}var rd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function sd(a){var b=a.tagName.toUpperCase();return!pa(rd,b)?l:a.disabled?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?sd(a.parentNode):qb(a,function(a){var b=a.parentNode;if(b&&Y(b,"FIELDSET")&&b.disabled){if(!Y(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:ib(a.previousSibling);)if(Y(a,"LEGEND"))return l}return n},l)?n:l}function td(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:m} -function Z(a,b){var c=ia(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=ed?"styleFloat":"cssFloat";c=gd(a,c)||ud(a,c);if(c===m)c=m;else if(pa(ta,b)&&(wa.test("#"==c.charAt(0)?c:"#"+c)||Aa(c).length||sa&&sa[c.toLowerCase()]||ya(c).length)){var d=ya(c);if(!d.length){a:if(d=Aa(c),!d.length){d=sa[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(wa.test(d)&&(d=va(d),d=va(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function ud(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&da(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=td(a))?ud(c,b):m} -function vd(a){if(da(a.getBBox)&&!Y(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=Z(a,"overflow")?a=l:(a=td(a),!a||!Y(a,"HTML")?a=l:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ga).document;a=b.documentElement;var d=b.body;d||h(new w(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new bb(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new bb(a.clientWidth,a.clientHeight);return a}if("none"!=hd(a,"display"))a=md(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=md(a);b.display=d;b.position=f;b.visibility=e}return a} -function wd(a,b){function c(a){if("none"==Z(a,"display"))return n;a=td(a);return!a||c(a)}function d(a){var b=vd(a);return 0<b.height&&0<b.width?l:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):na(a.childNodes,function(b){return b.nodeType==fb&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a,b){var c;if((c=b==m?jb(a):jb(b))&&("hidden"==Z(c,"overflow-x")||"hidden"==Z(c,"overflow-y"))){var d=vd(c),f=kd(c),g=kd(a);return f.x+d.width<=g.x&&"hidden"==Z(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==Z(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=kd(a),a=vd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=td(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=qb(a,function(a){return Y(a,"SELECT")});return!!g&&wd(g,l)}if(Y(a,"MAP")){if(!a.name)return n;g=G(a);g= -g.evaluate?X.ua('/descendant::*[@usemap = "#'+a.name+'"]',g):ob(g,function(b){return Y(b)&&qd(b)=="#"+a.name});return!!g&&wd(g,b)}return Y(a,"AREA")?(g=qb(a,function(a){return Y(a,"MAP")}),!!g&&wd(g,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==xd(a)||!d(a)||!e(a,m)?n:f(a)} -function xd(a){if(fd){if("relative"==Z(a,"position"))return 1;a=Z(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return yd(a)}function yd(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=td(a))&&(b*=yd(a));return b};function zd(a){this.M=ga.document.documentElement;this.da=m;var b=nd(this.M);b&&Ad(this,b);this.xa=a||new Bd}function Ad(a,b){a.M=b;a.da=Y(b,"OPTION")?qb(b,function(a){return Y(a,"SELECT")}):m}C||z||Zc&&$c(3.6);function Bd(){this.za=0};A&&Yc(10);Db&&$c(4);function Cd(a,b,c){this.f=a;this.ja=b;this.ka=c}Cd.prototype.create=function(a){a=G(a);ed?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.ja,this.ka));return a};Cd.prototype.toString=q("f");var Dd=new Cd("focus",n,n);function Ed(a,b){this.t={};this.h=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Ed){d=Fd(a);Gd(a);e=[];for(c=0;c<a.h.length;c++)e.push(a.t[a.h[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Ed.prototype.z=0;Ed.prototype.ha=0;function Fd(a){Gd(a);return a.h.concat()} -Ed.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.z--,this.ha++,this.h.length>2*this.z&&Gd(this),l):n};function Gd(a){if(a.z!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.z!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}} -Ed.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Ed.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.z++,this.h.push(a),this.ha++);this.t[a]=b};var Hd={};function $(a,b,c){ea(a)&&(a=B?a.b:z?a.opera:a.c);a=new Id(a,b,c);if(b&&(!(b in Hd)||c))Hd[b]={key:a,shift:n},c&&(Hd[c]={key:a,shift:l});return a}function Id(a,b,c){this.code=a;this.la=b||m;this.Aa=c||this.la}$(8);$(9);$(13);var Jd=$(16),Kd=$(17),Ld=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); -$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Md=$(Ia?{b:91,c:91,opera:219}:Ha?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -$(Ia?{b:92,c:92,opera:220}:Ha?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});$(Ia?{b:93,c:93,opera:0}:Ha?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Oa?56:42},"*");$({b:107,c:107,opera:Oa?61:43},"+"); -$({b:109,c:109,opera:Oa?109:45},"-");$({b:110,c:110,opera:Oa?190:78},".");$({b:111,c:111,opera:Oa?191:47},"/");$(Oa&&z?m:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Nd=new Ed;Nd.set(1,Jd);Nd.set(2,Kd);Nd.set(4,Ld); -Nd.set(8,Md);(function(a){var b=new Ed;v(Fd(a),function(c){b.set(a.get(c).code,c)});return b})(Nd);B&&Yc(12);function Od(a){(!wd(a,l)||!sd(a)||(A||z||B&&!Yc("1.9.2")?0:"none"==Z(a,"pointer-events")))&&h(new w(12,"Element is not currently interactable and may not be manipulated"));var b=Pd.na();Ad(b,a);a=b.da||b.M;b=nd(a);if(a!=b){if(b&&(da(b.blur)||A&&ea(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){A&&"Unspecified error."==c.message||h(c)}A&&!Yc(8)&&(G(a)?G(a).parentWindow||G(a).defaultView:window).focus()}if(da(a.focus)||A&&ea(a.focus))z&&Yc(11)&&!wd(a)?(b=Dd.create(a,k),"isTrusted"in -b||(b.isTrusted=n),ed?a.fireEvent("on"+Dd.f,b):a.dispatchEvent(b)):a.focus()}}function Pd(){zd.call(this)}u(Pd,zd);(function(){var a=Pd;a.na=function(){return a.X?a.X:a.X=new a}})();function Qd(){this.H=k} -function Rd(a,b,c){switch(typeof b){case "string":Sd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Rd(a,a.H?a.H.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Sd(f, -c),c.push(":"),Rd(a,a.H?a.H.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Td={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ud=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Sd(a,b){b.push('"',a.replace(Ud,function(a){if(a in Td)return Td[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Td[a]=e+b.toString(16)}),'"')};C||z||B&&Yc(3.5)||A&&Yc(8);function Vd(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return la(a,Vd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Wd(a);return b}if("document"in a)return b={},b.WINDOW=Wd(a),b;if(ca(a))return la(a,Vd);a=cb(a,function(a,b){return"number"==typeof b||t(b)});return db(a,Vd);default:return m}} -function Xd(a,b){return"array"==ba(a)?la(a,function(a){return Xd(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?Yd(a.ELEMENT,b):"WINDOW"in a?Yd(a.WINDOW,b):db(a,function(a){return Xd(a,b)}):a}function Zd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.P=fa());b.P||(b.P=fa());return b}function Wd(a){var b=Zd(a.ownerDocument),c=eb(b,function(b){return b==a});c||(c=":wdc:"+b.P++,b[c]=a);return c} -function Yd(a,b){a=decodeURIComponent(a);var c=b||document,d=Zd(c);a in d||h(new w(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new w(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new w(10,"Element is no longer attached to the DOM"))};function $d(a){a=[a];var b=Od,c;try{var b=t(b)?new ga.Function(b):ga==window?b:new ga.Function("return ("+b+").apply(null,arguments);"),d=Xd(a,ga.document),e=b.apply(m,d);c={status:0,value:Vd(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}d=[];Rd(new Qd,c,d);return d.join("")}var ae=["_"],be=r;!(ae[0]in be)&&be.execScript&&be.execScript("var "+ae[0]);for(var ce;ae.length&&(ce=ae.shift());)!ae.length&&s($d)?be[ce]=$d:be=be[ce]?be[ce]:be[ce]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var ya="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),za=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Aa=/^#(?:[0-9a-f]{3}){1,2}$/i,Ba=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ca=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.state=Ia[a]||Ja;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}p(t,Error); +var Ja="unknown error",Ia={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ia[13]=Ja;Ia[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Ka,La,Ma,Na,Oa,Pa;function Qa(){return k.navigator?k.navigator.userAgent:null}Na=Ma=La=Ka=!1;var Ra;if(Ra=Qa()){var Sa=k.navigator;Ka=0==Ra.indexOf("Opera");La=!Ka&&-1!=Ra.indexOf("MSIE");Ma=!Ka&&-1!=Ra.indexOf("WebKit");Na=!Ka&&!Ma&&"Gecko"==Sa.product}var u=Ka,v=La,w=Na,Ta=Ma,Ua,Va=k.navigator;Ua=Va&&Va.platform||"";Oa=-1!=Ua.indexOf("Mac");Pa=-1!=Ua.indexOf("Win");var Wa=-1!=Ua.indexOf("Linux");function Xa(){var a=k.document;return a?a.documentMode:void 0}var Ya; +a:{var Za="",$a;if(u&&k.opera)var ab=k.opera.version,Za="function"==typeof ab?ab():ab;else if(w?$a=/rv\:([^\);]+)(\)|;)/:v?$a=/MSIE\s+([^\);]+)(\)|;)/:Ta&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Qa()),Za=bb?bb[1]:"";if(v){var cb=Xa();if(cb>parseFloat(Za)){Ya=String(cb);break a}}Ya=Za}var db={};function eb(a){return db[a]||(db[a]=0<=la(Ya,a))}var fb=k.document,gb=fb&&v?Xa()||("CSS1Compat"==fb.compatMode?parseInt(Ya,10):5):void 0;!w&&!v||v&&v&&9<=gb||w&&eb("1.9.1");v&&eb("9");function hb(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}hb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};hb.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};hb.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};hb.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function ib(a,b){this.width=a;this.height=b}ib.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};ib.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};ib.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};ib.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function jb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function kb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function lb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var mb=3;function nb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new ib(a.clientWidth,a.clientHeight)}function ob(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!(v&&9<=gb)){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?rb(a,b):!c&&pb(e,b)?-1*sb(a,b):!d&&pb(f,a)?sb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=x(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function sb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return rb(d,a)}function rb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function x(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function tb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function ub(a){this.oa=a||k.document||document}ub.prototype.contains=pb;var vb,wb,xb,yb,zb,Ab,Bb;Bb=Ab=zb=yb=xb=wb=vb=!1;var y=Qa();y&&(-1!=y.indexOf("Firefox")?vb=!0:-1!=y.indexOf("Camino")?wb=!0:-1!=y.indexOf("iPhone")||-1!=y.indexOf("iPod")?xb=!0:-1!=y.indexOf("iPad")?yb=!0:-1!=y.indexOf("Android")?zb=!0:-1!=y.indexOf("Chrome")?Ab=!0:-1!=y.indexOf("Safari")&&(Bb=!0));var Cb=vb,Db=wb,Eb=xb,Fb=yb,Gb=zb,Hb=Ab,Ib=Bb;function Jb(a,b,c){this.e=a;this.wa=b||1;this.m=c||1};var A=v&&!(v&&9<=gb),Kb=v&&!(v&&8<=gb);function Lb(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ca=e;this.parentNode=b}function Mb(a,b,c){var d=Kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Lb(b,a,b.nodeName,d,c)};function Nb(a){this.T=a;this.G=0}function Ob(a){a=a.match(Pb);for(var b=0;b<a.length;b++)Qb.test(a[b])&&a.splice(b,1);return new Nb(a)}var Pb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Qb=/^\s/;function B(a,b){return a.T[a.G+(b||0)]}Nb.prototype.next=function(){return this.T[this.G++]};Nb.prototype.back=function(){this.G--};Nb.prototype.empty=function(){return this.T.length<=this.G};function C(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(A&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),A&&"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} +function D(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 Rb(a,b,c,d,e){return(A?Sb:Tb).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new E)} +function Sb(a,b,c,d,e){if(a instanceof Ub||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=Vb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],s=0;b=f[s++];)D(b,c,d)&&h.push(b);f=h}for(s=0;b=f[s++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Wb(a,b,c,d,e);return e} +function Tb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),r(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof F?Wb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),r(b,function(a){D(a,c,d)&&e.add(a)}));return e} +function Xb(a,b,c,d,e){var f;if((a instanceof Ub||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var h=Vb(a);if("*"!=h&&(f=oa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=oa(f,function(a){return D(a,c,d)}));r(f,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return Yb(a,b,c,d,e)}function Yb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Wb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b),Wb(a,b,c,d,e)}function Vb(a){if(a instanceof F){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function E(){this.m=this.j=null;this.B=0}function Zb(a){this.p=a;this.next=this.u=null}function $b(a,b){if(!a.j)return b;if(!b.j)return a;for(var c=a.j,d=b.j,e=null,f=null,h=0;c&&d;)c.p==d.p||c.p instanceof Lb&&d.p instanceof Lb&&c.p.e==d.p.e?(f=c,c=c.next,d=d.next):0<qb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.j=f,e=f,h++;for(f=c||d;f;)f.u=e,e=e.next=f,h++,f=f.next;a.m=e;a.B=h;return a} +E.prototype.unshift=function(a){a=new Zb(a);a.next=this.j;this.m?this.j.u=a:this.j=this.m=a;this.j=a;this.B++};E.prototype.add=function(a){a=new Zb(a);a.u=this.m;this.j?this.m.next=a:this.j=this.m=a;this.m=a;this.B++};function ac(a){return(a=a.j)?a.p:null}E.prototype.o=g("B");function bc(a){return(a=ac(a))?C(a):""}function G(a,b){return new cc(a,!!b)}function cc(a,b){this.sa=a;this.U=(this.v=b)?a.m:a.j;this.O=null} +cc.prototype.next=function(){var a=this.U;if(null==a)return null;var b=this.O=a;this.U=this.v?a.u:a.next;return b.p};cc.prototype.remove=function(){var a=this.sa,b=this.O;if(!b)throw Error("Next must be called at least once before remove.");var c=b.u,b=b.next;c?c.next=b:a.j=b;b?b.u=c:a.m=c;a.B--;this.O=null};function H(a){this.i=a;this.k=this.q=!1;this.C=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.g=g("q");function dc(a,b){a.q=b}function ec(a,b){a.k=b}H.prototype.s=g("C");function J(a,b){var c=a.evaluate(b);return c instanceof E?+bc(c):+c}function K(a,b){var c=a.evaluate(b);return c instanceof E?bc(c):""+c}function fc(a,b){var c=a.evaluate(b);return c instanceof E?!!c.o():!!c};function gc(a,b,c){H.call(this,a.i);this.S=a;this.Z=b;this.da=c;this.q=b.g()||c.g();this.k=b.k||c.k;this.S==hc&&(c.k||c.g()||4==c.i||0==c.i||!b.s()?b.k||(b.g()||4==b.i||0==b.i||!c.s())||(this.C={name:c.s().name,w:b}):this.C={name:b.s().name,w:c})}p(gc,H); +function ic(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof E&&c instanceof E){e=G(b);for(d=e.next();d;d=e.next())for(b=G(c),f=b.next();f;f=b.next())if(a(C(d),C(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?e=b:(e=c,c=b);e=G(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+C(d);break;case "boolean":d=!!C(d);break;case "string":d=C(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}gc.prototype.evaluate=function(a){return this.S.n(this.Z,this.da,a)};gc.prototype.toString=function(){var a="Binary Expression: "+this.S,a=a+I(this.Z);return a+=I(this.da)};function jc(a,b,c,d){this.va=a;this.ba=b;this.i=c;this.n=d}jc.prototype.toString=g("va");var kc={}; +function L(a,b,c,d){if(kc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new jc(a,b,c,d);return kc[a.toString()]=a}L("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});L("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});L("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});L("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});L("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});L("<",4,2,function(a,b,c){return ic(function(a,b){return a<b},a,b,c)}); +L(">",4,2,function(a,b,c){return ic(function(a,b){return a>b},a,b,c)});L("<=",4,2,function(a,b,c){return ic(function(a,b){return a<=b},a,b,c)});L(">=",4,2,function(a,b,c){return ic(function(a,b){return a>=b},a,b,c)});var hc=L("=",3,2,function(a,b,c){return ic(function(a,b){return a==b},a,b,c,!0)});L("!=",3,2,function(a,b,c){return ic(function(a,b){return a!=b},a,b,c,!0)});L("and",2,2,function(a,b,c){return fc(a,c)&&fc(b,c)});L("or",1,2,function(a,b,c){return fc(a,c)||fc(b,c)});function lc(a,b){if(b.o()&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.i);this.ca=a;this.d=b;this.q=a.g();this.k=a.k}p(lc,H);lc.prototype.evaluate=function(a){a=this.ca.evaluate(a);return mc(this.d,a)};lc.prototype.toString=function(){var a;a="Filter:"+I(this.ca);return a+=I(this.d)};function nc(a,b){if(b.length<a.aa)throw Error("Function "+a.l+" expects at least"+a.aa+" arguments, "+b.length+" given");if(null!==a.P&&b.length>a.P)throw Error("Function "+a.l+" expects at most "+a.P+" arguments, "+b.length+" given");a.ta&&r(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.l+" is not of type Nodeset: "+b);});H.call(this,a.i);this.F=a;this.K=b;dc(this,a.q||ra(b,function(a){return a.g()}));ec(this,a.ra&&!b.length||a.qa&&!!b.length||ra(b,function(a){return a.k}))} +p(nc,H);nc.prototype.evaluate=function(a){return this.F.n.apply(null,va(a,this.K))};nc.prototype.toString=function(){var a="Function: "+this.F;if(this.K.length)var b=qa(this.K,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function oc(a,b,c,d,e,f,h,s,z){this.l=a;this.i=b;this.q=c;this.ra=d;this.qa=e;this.n=f;this.aa=h;this.P=void 0!==s?s:h;this.ta=!!z}oc.prototype.toString=g("l");var pc={}; +function M(a,b,c,d,e,f,h,s){if(pc.hasOwnProperty(a))throw Error("Function already created: "+a+".");pc[a]=new oc(a,b,c,d,!1,e,f,h,s)}M("boolean",2,!1,!1,function(a,b){return fc(b,a)},1);M("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);M("concat",3,!1,!1,function(a,b){var c=wa(arguments,1);return qa(c,function(b,c){return b+K(c,a)},"")},2,null);M("contains",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2); +M("count",1,!1,!1,function(a,b){return b.evaluate(a).o()},1,1,!0);M("false",2,!1,!1,aa(!1),0);M("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); +M("id",4,!1,!1,function(a,b){function c(a){if(A){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ta(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=K(b,a).split(/\s+/),f=[];r(d,function(a){(a=c(a))&&!ua(f,a)&&f.push(a)});f.sort(qb);var h=new E;r(f,function(a){h.add(a)});return h},1);M("lang",2,!1,!1,aa(!1),1); +M("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.m},0);M("local-name",3,!1,!0,function(a,b){var c=b?ac(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);M("name",3,!1,!0,function(a,b){var c=b?ac(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);M("namespace-uri",3,!0,!1,aa(""),0,1,!0);M("normalize-space",3,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +M("not",2,!1,!1,function(a,b){return!fc(b,a)},1);M("number",1,!1,!0,function(a,b){return b?J(b,a):+C(a.e)},0,1);M("position",1,!0,!1,function(a){return a.wa},0);M("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);M("starts-with",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return 0==b.lastIndexOf(a,0)},2);M("string",3,!1,!0,function(a,b){return b?K(b,a):C(a.e)},0,1);M("string-length",1,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).length},0,1); +M("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);M("substring-after",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +M("substring-before",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);M("sum",1,!1,!1,function(a,b){for(var c=G(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+C(e);return d},1,1,!0);M("translate",3,!1,!1,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(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);M("true",2,!1,!1,aa(!0),0);function F(a,b){this.ga=a;this.$=void 0!==b?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=mb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function qc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}F.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};F.prototype.getName=g("ga"); +F.prototype.toString=function(){var a="Kind Test: "+this.ga;null===this.$||(a+=I(this.$));return a};function rc(a){H.call(this,3);this.fa=a.substring(1,a.length-1)}p(rc,H);rc.prototype.evaluate=g("fa");rc.prototype.toString=function(){return"Literal: "+this.fa};function Ub(a,b){this.l=a.toLowerCase();this.Q=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Ub.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.l&&this.l!=a.nodeName.toLowerCase()?!1:this.Q==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Ub.prototype.getName=g("l");Ub.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.Q?"":this.Q+":")+this.l};function sc(a){H.call(this,1);this.ha=a}p(sc,H);sc.prototype.evaluate=g("ha");sc.prototype.toString=function(){return"Number: "+this.ha};function tc(a,b){H.call(this,a.i);this.W=a;this.D=b;this.q=a.g();this.k=a.k;if(1==this.D.length){var c=this.D[0];c.M||c.r!=uc||(c=c.J,"*"!=c.getName()&&(this.C={name:c.getName(),w:null}))}}p(tc,H);function vc(){H.call(this,4)}p(vc,H);vc.prototype.evaluate=function(a){var b=new E;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};vc.prototype.toString=aa("Root Helper Expression");function wc(){H.call(this,4)}p(wc,H);wc.prototype.evaluate=function(a){var b=new E;b.add(a.e);return b}; +wc.prototype.toString=aa("Context Helper Expression"); +tc.prototype.evaluate=function(a){var b=this.W.evaluate(a);if(!(b instanceof E))throw Error("Filter expression must evaluate to nodeset.");a=this.D;for(var c=0,d=a.length;c<d&&b.o();c++){var e=a[c],f=G(b,e.r.v),h;if(e.g()||e.r!=xc)if(e.g()||e.r!=yc)for(h=f.next(),b=e.evaluate(new Jb(h));null!=(h=f.next());)h=e.evaluate(new Jb(h)),b=$b(b,h);else h=f.next(),b=e.evaluate(new Jb(h));else{for(h=f.next();(b=f.next())&&(!h.contains||h.contains(b))&&b.compareDocumentPosition(h)&8;h=b);b=e.evaluate(new Jb(h))}}return b}; +tc.prototype.toString=function(){var a;a="Path Expression:"+I(this.W);if(this.D.length){var b=qa(this.D,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function zc(a,b){this.d=a;this.v=!!b}function mc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=G(b),f=b.o(),h,s=0;h=e.next();s++){var z=a.v?f-s:s+1;h=d.evaluate(new Jb(h,z,f));if("number"==typeof h)z=z==h;else if("string"==typeof h||"boolean"==typeof h)z=!!h;else if(h instanceof E)z=0<h.o();else throw Error("Predicate.evaluate returned an unexpected type.");z||e.remove()}return b}zc.prototype.s=function(){return 0<this.d.length?this.d[0].s():null}; +zc.prototype.g=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.g()||1==b.i||0==b.i)return!0}return!1};zc.prototype.o=function(){return this.d.length};zc.prototype.toString=function(){return qa(this.d,function(a,b){return a+I(b)},"Predicates:")};function N(a,b,c,d){H.call(this,4);this.r=a;this.J=b;this.d=c||new zc([]);this.M=!!d;b=this.d.s();a.ya&&b&&(a=b.name,a=A?a.toLowerCase():a,this.C={name:a,w:b.w});this.q=this.d.g()}p(N,H); +N.prototype.evaluate=function(a){var b=a.e,c=null,c=this.s(),d=null,e=null,f=0;c&&(d=c.name,e=c.w?K(c.w,a):null,f=1);if(this.M)if(this.g()||this.r!=Ac)if(a=G((new N(Bc,new F("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);null!=(b=a.next());)c=$b(c,this.n(b,d,e,f));else c=new E;else c=Rb(this.J,b,d,e),c=mc(this.d,c,f);else c=this.n(a.e,d,e,f);return c};N.prototype.n=function(a,b,c,d){a=this.r.F(this.J,a,b,c);return a=mc(this.d,a,d)}; +N.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.M?"//":"/"));this.r.l&&(a+=I("Axis: "+this.r));a+=I(this.J);if(this.d.o()){var b=qa(this.d.d,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Cc(a,b,c,d){this.l=a;this.F=b;this.v=c;this.ya=d}Cc.prototype.toString=g("l");var Dc={};function O(a,b,c,d){if(Dc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Cc(a,b,c,!!d);return Dc[a]=b} +O("ancestor",function(a,b){for(var c=new E,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);O("ancestor-or-self",function(a,b){var c=new E,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var uc=O("attribute",function(a,b){var c=new E,d=a.getName();if("style"==d&&b.style&&A)return c.add(new Lb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof F&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)A?h.nodeValue&&c.add(Mb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(A?h.nodeValue&&c.add(Mb(b,h,b.sourceIndex)):c.add(h));return c},!1),Ac=O("child",function(a,b,c,d,e){return(A?Xb:Yb).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new E)},!1,!0); +O("descendant",Rb,!1,!0);var Bc=O("descendant-or-self",function(a,b,c,d){var e=new E;D(b,c,d)&&a.matches(b)&&e.add(b);return Rb(a,b,c,d,e)},!1,!0),xc=O("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)D(f,c,d)&&a.matches(f)&&e.add(f),e=Rb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);O("following-sibling",function(a,b){for(var c=new E,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);O("namespace",function(){return new E},!1); +var Ec=O("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),yc=O("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,s=f.length;h<s;h++){var z=[];for(b=f[h];b=b.previousSibling;)z.unshift(b);for(var U=0,q=z.length;U<q;U++)b=z[U],D(b,c,d)&&a.matches(b)&&e.add(b),e=Rb(a,b,c,d,e)}return e},!0,!0); +O("preceding-sibling",function(a,b){for(var c=new E,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Fc=O("self",function(a,b){var c=new E;a.matches(b)&&c.add(b);return c},!1);function Gc(a){H.call(this,1);this.V=a;this.q=a.g();this.k=a.k}p(Gc,H);Gc.prototype.evaluate=function(a){return-J(this.V,a)};Gc.prototype.toString=function(){return"Unary Expression: -"+I(this.V)};function Hc(a){H.call(this,4);this.H=a;dc(this,ra(this.H,function(a){return a.g()}));ec(this,ra(this.H,function(a){return a.k}))}p(Hc,H);Hc.prototype.evaluate=function(a){var b=new E;r(this.H,function(c){c=c.evaluate(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=$b(b,c)});return b};Hc.prototype.toString=function(){return qa(this.H,function(a,b){return a+I(b)},"Union Expression:")};function Ic(a,b){this.a=a;this.ua=b}function Jc(a){for(var b,c=[];;){P(a,"Missing right hand side of binary expression.");b=Kc(a);var d=a.a.next();if(!d)break;var e=(d=kc[d]||null)&&d.ba;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ba;)b=new gc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new gc(c.pop(),c.pop(),b);return b}function P(a,b){if(a.a.empty())throw Error(b);}function Lc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Mc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Nc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new rc(a)}function Oc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Ub(b);var d=b.substring(0,c);a=a.ua(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Ub(b,a)} +function Pc(a){var b,c=[],d;if("/"==B(a.a)||"//"==B(a.a)){b=a.a.next();d=B(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new vc;d=new vc;P(a,"Missing next location step.");b=Qc(a,b);c.push(b)}else{a:{b=B(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Jc(a);P(a,'unclosed "("');Lc(a,")");break;case '"':case "'":b=Nc(a);break;default:if(isNaN(+b))if(!qc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==B(a.a,1)){b=a.a.next();b=pc[b]||null;a.a.next();for(d=[];")"!=B(a.a);){P(a,"Missing function argument list.");d.push(Jc(a));if(","!=B(a.a))break;a.a.next()}P(a,"Unclosed function argument list.");Mc(a);b=new nc(b,d)}else{b=null;break a}else b=new sc(+a.a.next())}"["==B(a.a)&&(d=new zc(Rc(a)),b=new lc(b,d))}if(b)if("/"==B(a.a)||"//"==B(a.a))d=b;else return b;else b=Qc(a,"/"),d=new wc,c.push(b)}for(;"/"==B(a.a)||"//"==B(a.a);)b=a.a.next(),P(a,"Missing next location step."),b=Qc(a,b),c.push(b); +return new tc(d,c)} +function Qc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==B(a.a))return d=new N(Fc,new F("node")),a.a.next(),d;if(".."==B(a.a))return d=new N(Ec,new F("node")),a.a.next(),d;var f;if("@"==B(a.a))f=uc,a.a.next(),P(a,"Missing attribute name");else if("::"==B(a.a,1)){if(!/(?![0-9])[\w]/.test(B(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Dc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();P(a,"Missing node name")}else f=Ac; +c=B(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==B(a.a,1)){if(!qc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!qc(c))throw Error("Invalid type name: "+c);Lc(a,"(");P(a,"Bad nodetype");e=B(a.a).charAt(0);var h=null;if('"'==e||"'"==e)h=Nc(a);P(a,"Bad nodetype");Mc(a);c=new F(c,h)}else c=Oc(a);else if("*"==c)c=Oc(a);else throw Error("Bad token: "+a.a.next());e=new zc(Rc(a),f.v);return d||new N(f,c,e,"//"==b)} +function Rc(a){for(var b=[];"["==B(a.a);){a.a.next();P(a,"Missing predicate expression.");var c=Jc(a);b.push(c);P(a,"Unclosed predicate expression.");Lc(a,"]")}return b}function Kc(a){if("-"==B(a.a))return a.a.next(),new Gc(Kc(a));var b=Pc(a);if("|"!=B(a.a))a=b;else{for(b=[b];"|"==a.a.next();)P(a,"Missing next union location path."),b.push(Pc(a));a.a.back();a=new Hc(b)}return a};function Sc(a){switch(a.nodeType){case 1:return ia(Tc,a);case 9:return Sc(a.documentElement);case 2:return a.ownerElement?Sc(a.ownerElement):Uc;case 11:case 10:case 6:case 12:return Uc;default:return a.parentNode?Sc(a.parentNode):Uc}}function Uc(){return null}function Tc(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?Tc(a.parentNode,b):null};function Vc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Ob(a);if(c.empty())throw Error("Invalid XPath expression.");b?da(b)||(b=ha(b.lookupNamespaceURI,b)):b=aa(null);var d=Jc(new Ic(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Jb(a));return new Q(c,b)}} +function Q(a,b){if(0==b)if(a instanceof E)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 E))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof E?bc(a):""+a;break;case 1:this.numberValue=a instanceof E?+bc(a):+a;break;case 3:this.booleanValue=a instanceof E?0<a.o():!!a;break;case 4:case 5:case 6:case 7:var d= +G(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Lb?e.e:e);this.snapshotLength=a.o();this.invalidIteratorState=!1;break;case 8:case 9:d=ac(a);this.singleNodeValue=d instanceof Lb?d.e:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}Q.ANY_TYPE=0;Q.NUMBER_TYPE=1;Q.STRING_TYPE=2;Q.BOOLEAN_TYPE=3;Q.UNORDERED_NODE_ITERATOR_TYPE=4;Q.ORDERED_NODE_ITERATOR_TYPE=5;Q.UNORDERED_NODE_SNAPSHOT_TYPE=6;Q.ORDERED_NODE_SNAPSHOT_TYPE=7;Q.ANY_UNORDERED_NODE_TYPE=8;Q.FIRST_ORDERED_NODE_TYPE=9;function Wc(a){this.lookupNamespaceURI=Sc(a)} +function Xc(a){a=a||k;var b=a.document;b.evaluate||(a.XPathResult=Q,b.evaluate=function(a,b,e,f){return(new Vc(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Vc(a,b)},b.createNSResolver=function(a){return new Wc(a)})};var S={};S.ja=function(){var a={Ga:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();S.n=function(a,b,c){var d=x(a);(v||Gb)&&Xc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.ja;return v&&!eb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!w||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +S.L=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};S.xa=function(a,b){var c=function(){var c=S.n(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=x(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||S.L(c,a);return c}; +S.Aa=function(a,b){var c=function(){var c=S.n(b,a,7);if(c){var e=c.snapshotLength;u&&void 0===e&&S.L(null,a);for(var f=[],h=0;h<e;++h)f.push(c.snapshotItem(h));return f}return b.selectNodes?(c=x(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();r(c,function(b){S.L(b,a)});return c};function Yc(a){return(a=a.exec(Qa()))?a[1]:""}var Zc=function(){if(Cb)return Yc(/Firefox\/([0-9.]+)/);if(v||u)return Ya;if(Hb)return Yc(/Chrome\/([0-9.]+)/);if(Ib)return Yc(/Version\/([0-9.]+)/);if(Eb||Fb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Qa());if(a)return a[1]+"."+a[2]}else{if(Gb)return(a=Yc(/Android\s+([0-9.]+)/))?a:Yc(/Version\/([0-9.]+)/);if(Db)return Yc(/Camino\/([0-9.]+)/)}return""}();var $c,ad;function T(a){return bd?$c(a):v?0<=la(gb,a):eb(a)}function cd(a){bd?ad(a):Gb?la(dd,a):la(Zc,a)} +var bd=function(){if(!w)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;$c=function(a){return 0<=d.na(e,""+a)};ad=function(a){d.na(f,""+a)};return!0}(),ed;if(Gb){var fd=/Android\s+([0-9\.]+)/.exec(Qa());ed=fd?fd[1]:"0"}else ed="0"; +var dd=ed,gd=v&&!(v&&9<=gb),hd=v&&!(v&&10<=gb);Gb&&cd(2.3);Gb&&cd(4);Ib&&cd(6);function id(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}id.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};id.prototype.contains=function(a){return this&&a?a instanceof id?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +id.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};id.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +id.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}V.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};V.prototype.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +V.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};V.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +V.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function jd(a){var b;a:{a=x(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return v&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var kd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function ld(a){var b=a.tagName.toUpperCase();return ua(kd,b)?a.disabled?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?ld(a.parentNode):!tb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&b.disabled){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:ob(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function md(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=ma(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=gd?"styleFloat":"cssFloat";var d;a:{d=c;var e=x(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||nd(a,c);if(null===d)d=null;else if(ua(ya,c)){b:{var f=d.match(Ba);if(f){var c=Number(f[1]),e=Number(f[2]),h=Number(f[3]),f=Number(f[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=h&&255>=h&&0<=f&&1>=f){c=[c,e,h,f];break b}}c=null}if(!c){b:{if(h= +d.match(Ca))if(c=Number(h[1]),e=Number(h[2]),h=Number(h[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=h&&255>=h){c=[c,e,h,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=xa[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(za,"#$1$1$2$2$3$3")),!Aa.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} +function nd(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&da(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=md(a))?nd(c,b):null} +function od(a,b){function c(a){if("none"==X(a,"display"))return!1;a=md(a);return!a||c(a)}function d(a){var b=pd(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ra(a.childNodes,function(a){return a.nodeType==mb||W(a)&&d(a)})}function e(a){return qd(a)==Y&&sa(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +tb(a,function(a){return W(a,"SELECT")});return!!f&&od(f,!0)}return(f=rd(a))?!!f.X&&0<f.rect.width&&0<f.rect.height&&od(f.X,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==sd(a)||!d(a)?!1:!e(a)}var Y="hidden"; +function qd(a){function b(a){var b=X(a,"position");if("fixed"==b)return U=!0,a==h?null:h;for(a=md(a);a&&a!=h&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=md(a);return a}function c(a){var b=a;if("visible"==z)if(a==h&&s)b=s;else if(a==s)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==h&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function d(a){if(a==h){var b=(new ub(f)).oa;a=Ta||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=v&&eb("10")&&b.pageYOffset!=a.scrollTop?new hb(a.scrollLeft,a.scrollTop):new hb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new hb(a.scrollLeft,a.scrollTop);return a}var e=td(a),f=x(a),h=f.documentElement,s=f.body,z=X(h,"overflow"),U;for(a=b(a);a;a=b(a)){var q=c(a);if("visible"!=q.x||"visible"!=q.y){var m=pd(a);if(0==m.width||0==m.height)return Y;var n=e.right<m.left,R=e.bottom<m.top;if(n&&"hidden"==q.x|| +R&&"hidden"==q.y)return Y;if(n&&"visible"!=q.x||R&&"visible"!=q.y){n=d(a);R=e.bottom<m.top-n.y;if(e.right<m.left-n.x&&"visible"!=q.x||R&&"visible"!=q.x)return Y;e=qd(a);return e==Y?Y:"scroll"}n=e.left>=m.left+m.width;m=e.top>=m.top+m.height;if(n&&"hidden"==q.x||m&&"hidden"==q.y)return Y;if(n&&"visible"!=q.x||m&&"visible"!=q.y){if(U&&(q=d(a),e.left>=h.scrollWidth-q.x||e.right>=h.scrollHeight-q.y))return Y;e=qd(a);return e==Y?Y:"scroll"}}}return"none"}var ud=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function pd(a){function b(a){var c=(x(a)?x(a).parentWindow||x(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(ud);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),q=parseFloat(c[3]),m=parseFloat(c[4]),n=parseFloat(c[5]),c=parseFloat(c[6]),R=f.left+f.width,Da=f.top+f.height,Ea=f.left*d,d=R*d,Fa=f.left*e,e=R*e,Ga=f.top*q,q=Da*q,Ha=f.top*m,R=Da*m,Da=Ea+Ga+n,m=Fa+Ha+c,Ga=d+Ga+n,Ha=e+Ha+c,Ea=Ea+q+n,Fa=Fa+R+c,n=d+q+n,c=e+R+c;f.left=Math.min(Da,Ga,Ea,n);f.top=Math.min(m,Ha,Fa,c);n=Math.max(Da, +Ga,Ea,n);c=Math.max(m,Ha,Fa,c);f.width=n-f.left;f.height=c-f.top}(a=md(a))&&b(a)}var c=rd(a);if(c)return c.rect;if(W(a,"HTML"))return c=x(a),a=nb((c?c.parentWindow||c.defaultView:window)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);v&&a.ownerDocument.body&&(c=x(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&& +0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));w&&!T(12)&&b(a);return f} +function rd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=S.xa('/descendant::*[@usemap = "#'+c.name+'"]',x(c)))&&(e=pd(d),!b&&"default"!=a.shape.toLowerCase())){var f=vd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{X:d,rect:e||new V(0,0,0,0)}} +function vd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)}function td(a){a=pd(a);return new id(a.top,a.left+a.width,a.top+a.height,a.left)} +function sd(a){if(hd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return wd(a)}function wd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=md(a))&&(b*=wd(a));return b};function xd(a,b){this.N=ka.document.documentElement;this.ea=null;var c=jd(this.N);c&&yd(this,c);this.Ba=a||new zd;this.za=b||new Ad}function yd(a,b){a.N=b;a.ea=W(b,"OPTION")?tb(b,function(a){return W(a,"SELECT")}):null}Ta||u||bd&&cd(3.6);function zd(){this.Da=0}function Ad(){};v&&T(10);Gb&&cd(4);function Bd(a,b,c){this.f=a;this.ka=b;this.la=c}Bd.prototype.create=function(a){a=x(a);gd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.ka,this.la));return a};Bd.prototype.toString=g("f");var Cd=new Bd("focus",!1,!1);function Z(a,b){this.t={};this.h=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Z)for(d=Dd(a),Ed(a),e=[],c=0;c<a.h.length;c++)e.push(a.t[a.h[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Z.prototype.A=0;Z.prototype.ia=0;function Dd(a){Ed(a);return a.h.concat()} +Z.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.A--,this.ia++,this.h.length>2*this.A&&Ed(this),!0):!1};function Ed(a){if(a.A!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.A!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}} +Z.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Z.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.A++,this.h.push(a),this.ia++);this.t[a]=b};var Fd={};function $(a,b,c){ea(a)&&(a=w?a.b:u?a.opera:a.c);a=new Gd(a,b,c);!b||b in Fd&&!c||(Fd[b]={key:a,shift:!1},c&&(Fd[c]={key:a,shift:!0}));return a}function Gd(a,b,c){this.code=a;this.ma=b||null;this.Ea=c||this.ma}$(8);$(9);$(13);var Hd=$(16),Id=$(17),Jd=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); +$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Kd=$(Pa?{b:91,c:91,opera:219}:Oa?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +$(Pa?{b:92,c:92,opera:220}:Oa?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});$(Pa?{b:93,c:93,opera:0}:Oa?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Wa?56:42},"*"); +$({b:107,c:107,opera:Wa?61:43},"+");$({b:109,c:109,opera:Wa?109:45},"-");$({b:110,c:110,opera:Wa?190:78},".");$({b:111,c:111,opera:Wa?191:47},"/");$(Wa&&u?null:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Ld=new Z; +Ld.set(1,Hd);Ld.set(2,Id);Ld.set(4,Jd);Ld.set(8,Kd);(function(a){var b=new Z;r(Dd(a),function(c){b.set(a.get(c).code,c)});return b})(Ld);w&&T(12);function Md(a){if(!od(a,!0)||!ld(a)||(v||u||w&&!T("1.9.2")?0:"none"==X(a,"pointer-events")))throw new t(12,"Element is not currently interactable and may not be manipulated");var b=Nd.pa();yd(b,a);a=b.ea||b.N;b=jd(a);if(a!=b){if(b&&(da(b.blur)||v&&ea(b.blur))){if(!W(b,"BODY"))try{b.blur()}catch(c){if(!v||"Unspecified error."!=c.message)throw c;}v&&!T(8)&&(x(a)?x(a).parentWindow||x(a).defaultView:window).focus()}if(da(a.focus)||v&&ea(a.focus))u&&T(11)&&!od(a)?(b=Cd.create(a,void 0),"isTrusted"in b|| +(b.isTrusted=!1),gd?a.fireEvent("on"+Cd.f,b):a.dispatchEvent(b)):a.focus()}}function Nd(){xd.call(this)}p(Nd,xd);(function(){var a=Nd;a.pa=function(){return a.Y?a.Y:a.Y=new a}})();function Od(){this.I=void 0} +function Pd(a,b,c){switch(typeof b){case "string":Qd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Pd(a,a.I?a.I.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Qd(f,c),c.push(":"),Pd(a,a.I?a.I.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Rd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Sd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Qd(a,b){b.push('"',a.replace(Sd,function(a){if(a in Rd)return Rd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Rd[a]=e+b.toString(16)}),'"')};Ta||u||w&&T(3.5)||v&&T(8);function Td(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return pa(a,Td);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ud(a);return b}if("document"in a)return b={},b.WINDOW=Ud(a),b;if(ca(a))return pa(a,Td);a=jb(a,function(a,b){return"number"==typeof b||l(b)});return kb(a,Td);default:return null}} +function Vd(a,b){return"array"==ba(a)?pa(a,function(a){return Vd(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?Wd(a.ELEMENT,b):"WINDOW"in a?Wd(a.WINDOW,b):kb(a,function(a){return Vd(a,b)}):a}function Xd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.R=ja());b.R||(b.R=ja());return b}function Ud(a){var b=Xd(a.ownerDocument),c=lb(b,function(b){return b==a});c||(c=":wdc:"+b.R++,b[c]=a);return c} +function Wd(a,b){a=decodeURIComponent(a);var c=b||document,d=Xd(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function Yd(a){a=[a];var b=Md,c;try{var b=l(b)?new ka.Function(b):ka==window?b:new ka.Function("return ("+b+").apply(null,arguments);"),d=Vd(a,ka.document),e=b.apply(null,d);c={status:0,value:Td(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}d=[];Pd(new Od,c,d);return d.join("")}var Zd=["_"],$d=k;Zd[0]in $d||!$d.execScript||$d.execScript("var "+Zd[0]);for(var ae;Zd.length&&(ae=Zd.shift());)Zd.length||void 0===Yd?$d=$d[ae]?$d[ae]:$d[ae]={}:$d[ae]=Yd;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/frame_by_id_or_name.js b/src/ghostdriver/third_party/webdriver-atoms/frame_by_id_or_name.js deleted file mode 100644 index daf50603a..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/frame_by_id_or_name.js +++ /dev/null @@ -1,90 +0,0 @@ -function(){return function(){function h(a){throw a;}var k=void 0,m=!0,n=null,p=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var s=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function t(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&a!=n||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var fa=Date.now||function(){return+new Date}; -function v(a,b){function c(){}c.prototype=b.prototype;a.oa=b.prototype;a.prototype=new c};var ga=window;function ha(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ia(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function ja(a,b){for(var c=0,d=ia(String(a)).split("."),e=ia(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var l=d[g]||"",r=e[g]||"",w=RegExp("(\\d*)(\\D*)","g"),C=RegExp("(\\d*)(\\D*)","g");do{var T=w.exec(l)||["","",""],U=C.exec(r)||["","",""];if(0==T[0].length&&0==U[0].length)break;c=((0==T[1].length?0:parseInt(T[1],10))<(0==U[1].length?0:parseInt(U[1],10))?-1:(0==T[1].length?0:parseInt(T[1],10))>(0==U[1].length?0:parseInt(U[1],10))?1:0)||((0==T[2].length)<(0==U[2].length)? --1:(0==T[2].length)>(0==U[2].length)?1:0)||(T[2]<U[2]?-1:T[2]>U[2]?1:0)}while(0==c)}return c}function ka(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var la=Array.prototype;function x(a,b){for(var c=a.length,d=u(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ma(a,b){for(var c=a.length,d=[],e=0,f=u(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var l=f[g];b.call(k,l,g,a)&&(d[e++]=l)}return d}function na(a,b){for(var c=a.length,d=Array(c),e=u(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function oa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function pa(a,b){for(var c=a.length,d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return m;return p}function qa(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?n:u(a)?a.charAt(c):a[c]}function ra(a,b){var c;a:if(u(a))c=!u(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function sa(a){return la.concat.apply(la,arguments)} -function ta(a,b,c){return 2>=arguments.length?la.slice.call(a,b):la.slice.call(a,b,c)};var ua,va,wa,xa;function ya(){return s.navigator?s.navigator.userAgent:n}xa=wa=va=ua=p;var za;if(za=ya()){var Aa=s.navigator;ua=0==za.indexOf("Opera");va=!ua&&-1!=za.indexOf("MSIE");wa=!ua&&-1!=za.indexOf("WebKit");xa=!ua&&!wa&&"Gecko"==Aa.product}var y=ua,z=va,A=xa,B=wa;function Ba(){var a=s.document;return a?a.documentMode:k}var Ca; -a:{var Da="",Ea;if(y&&s.opera)var Fa=s.opera.version,Da="function"==typeof Fa?Fa():Fa;else if(A?Ea=/rv\:([^\);]+)(\)|;)/:z?Ea=/MSIE\s+([^\);]+)(\)|;)/:B&&(Ea=/WebKit\/(\S+)/),Ea)var Ga=Ea.exec(ya()),Da=Ga?Ga[1]:"";if(z){var Ha=Ba();if(Ha>parseFloat(Da)){Ca=String(Ha);break a}}Ca=Da}var Ia={};function Ja(a){return Ia[a]||(Ia[a]=0<=ja(Ca,a))}function D(a){return z&&Ka>=a}var La=s.document,Ka=!La||!z?k:Ba()||("CSS1Compat"==La.compatMode?parseInt(Ca,10):5);var Ma;!A&&!z||z&&D(9)||A&&Ja("1.9.1");z&&Ja("9");var Na=z||y||B;function E(a,b){this.x=t(a)?a:0;this.y=t(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function Oa(a,b){this.width=a;this.height=b}Oa.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Oa.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Oa.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Oa.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Pa(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function Qa(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function Ra(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var Sa=3;function F(a){return a?new Ta(G(a)):Ma||(Ma=new Ta)}function Ua(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Va(a){if(Na)return a.parentElement;a=a.parentNode;return ea(a)&&1==a.nodeType?a:n}function Wa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Xa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(z&&!D(9)){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?Ya(a,b):!c&&Wa(e,b)?-1*Za(a,b):!d&&Wa(f,a)?Za(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(m);d=d.createRange();d.selectNode(b);d.collapse(m);return c.compareBoundaryPoints(s.Range.START_TO_END,d)}function Za(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ya(d,a)}function Ya(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function $a(a,b){var c=[];return ab(a,b,c,m)?c[0]:k} -function ab(a,b,c,d){if(a!=n)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||ab(a,b,c,d))return m;a=a.nextSibling}return p}function bb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return n}function Ta(a){this.A=a||s.document||document} -function cb(a,b,c,d){a=d||a.A;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&ra(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function db(a){var b=a.A;a=!B&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}Ta.prototype.contains=Wa;var eb={P:function(a){return!(!a.querySelectorAll||!a.querySelector)},r:function(a,b){a||h(Error("No class name specified"));a=ia(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(eb.P(b))return b.querySelector("."+a.replace(/\./g,"\\."))||n;var c=cb(F(b),"*",a,b);return c.length?c[0]:n},k:function(a,b){a||h(Error("No class name specified"));a=ia(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return eb.P(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):cb(F(b),"*",a,b)}};var fb,gb,hb,ib,jb,kb,lb;lb=kb=jb=ib=hb=gb=fb=p;var H=ya();H&&(-1!=H.indexOf("Firefox")?fb=m:-1!=H.indexOf("Camino")?gb=m:-1!=H.indexOf("iPhone")||-1!=H.indexOf("iPod")?hb=m:-1!=H.indexOf("iPad")?ib=m:-1!=H.indexOf("Android")?jb=m:-1!=H.indexOf("Chrome")?kb=m:-1!=H.indexOf("Safari")&&(lb=m));var mb=fb,nb=gb,ob=hb,pb=ib,qb=jb,rb=kb,sb=lb;function tb(a){return(a=a.exec(ya()))?a[1]:""}var ub=function(){if(mb)return tb(/Firefox\/([0-9.]+)/);if(z||y)return Ca;if(rb)return tb(/Chrome\/([0-9.]+)/);if(sb)return tb(/Version\/([0-9.]+)/);if(ob||pb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(ya());if(a)return a[1]+"."+a[2]}else{if(qb)return(a=tb(/Android\s+([0-9.]+)/))?a:tb(/Version\/([0-9.]+)/);if(nb)return tb(/Camino\/([0-9.]+)/)}return""}();var vb,wb;function xb(a){return yb?vb(a):z?0<=ja(Ka,a):Ja(a)}var yb=function(){if(!A)return p;var a=s.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}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;vb=function(a){return 0<=d.fa(e,""+a)};wb=function(a){d.fa(f,""+a)};return m}(),zb; -if(qb){var Ab=/Android\s+([0-9\.]+)/.exec(ya());zb=Ab?Ab[1]:"0"}else zb="0";var Bb=zb,Cb=z&&!D(8),Db=z&&!D(9),Eb=z&&!D(10);qb&&(yb?wb(2.3):qb?ja(Bb,2.3):ja(ub,2.3));var Fb={r:function(a,b){!da(b.querySelector)&&(z&&xb(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ia(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:n},k:function(a,b){!da(b.querySelectorAll)&&(z&&xb(8)&&!ea(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ia(a);return b.querySelectorAll(a)}};var Gb={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", -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", -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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var Hb="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Ib=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Jb(a){Kb.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Ib,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Kb=/^#(?:[0-9a-f]{3}){1,2}$/i,Lb=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Mb(a){var b=a.match(Lb);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Nb=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ob(a){var b=a.match(Nb);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function Pb(a,b){this.code=a;this.state=Qb[a]||Rb;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}v(Pb,Error); -var Rb="unknown error",Qb={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Qb[13]=Rb;Qb[9]="unknown command";Pb.prototype.toString=function(){return this.name+": "+this.message};function Sb(a,b,c){this.c=a;this.la=b||1;this.j=c||1};var I=z&&!D(9),Tb=z&&!D(8);function Ub(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.na=e;this.parentNode=b}function Vb(a,b,c){var d=Tb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Ub(b,a,b.nodeName,d,c)};function Wb(a){this.O=a;this.C=0}function Xb(a){a=a.match(Yb);for(var b=0;b<a.length;b++)Zb.test(a[b])&&a.splice(b,1);return new Wb(a)}var Yb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Zb=/^\s/;function J(a,b){return a.O[a.C+(b||0)]}Wb.prototype.next=function(){return this.O[this.C++]};Wb.prototype.back=function(){this.C--};Wb.prototype.empty=function(){return this.O.length<=this.C};function K(a){var b=n,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==n?a.innerText:b,b=b==k||b==n?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function $b(a,b,c){if(b===n)return m;try{if(!a.getAttribute)return p}catch(d){return p}Tb&&"class"==b&&(b="className");return c==n?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ac(a,b,c,d,e){return(I?bc:cc).call(n,a,b,u(c)?c:n,u(d)?d:n,e||new L)} -function bc(a,b,c,d,e){if(a instanceof dc||8==a.i||c&&a.i===n){var f=b.all;if(!f)return e;a=ec(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],l=0;b=f[l++];)$b(b,c,d)&&g.push(b);f=g}for(l=0;b=f[l++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}fc(a,b,c,d,e);return e} -function cc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!z?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?fc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){$b(a,c,d)&&e.add(a)}));return e} -function gc(a,b,c,d,e){var f;if((a instanceof dc||8==a.i||c&&a.i===n)&&(f=b.childNodes)){var g=ec(a);if("*"!=g&&(f=ma(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ma(f,function(a){return $b(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return hc(a,b,c,d,e)}function hc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)$b(b,c,d)&&a.matches(b)&&e.add(b);return e} -function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)$b(b,c,d)&&a.matches(b)&&e.add(b),fc(a,b,c,d,e)}function ec(a){if(a instanceof M){if(8==a.i)return"!";if(a.i===n)return"*"}return a.getName()};function L(){this.j=this.f=n;this.v=0}function ic(a){this.m=a;this.next=this.s=n}function jc(a,b){if(a.f){if(!b.f)return a}else return b;for(var c=a.f,d=b.f,e=n,f=n,g=0;c&&d;)c.m==d.m||c.m instanceof Ub&&d.m instanceof Ub&&c.m.c==d.m.c?(f=c,c=c.next,d=d.next):0<Xa(c.m,d.m)?(f=d,d=d.next):(f=c,c=c.next),(f.s=e)?e.next=f:a.f=f,e=f,g++;for(f=c||d;f;)f.s=e,e=e.next=f,g++,f=f.next;a.j=e;a.v=g;return a} -L.prototype.unshift=function(a){a=new ic(a);a.next=this.f;this.j?this.f.s=a:this.f=this.j=a;this.f=a;this.v++};L.prototype.add=function(a){a=new ic(a);a.s=this.j;this.f?this.j.next=a:this.f=this.j=a;this.j=a;this.v++};function kc(a){return(a=a.f)?a.m:n}L.prototype.n=q("v");function lc(a){return(a=kc(a))?K(a):""}function mc(a,b){return new nc(a,!!b)}function nc(a,b){this.ia=a;this.Q=(this.t=b)?a.j:a.f;this.K=n} -nc.prototype.next=function(){var a=this.Q;if(a==n)return n;var b=this.K=a;this.Q=this.t?a.s:a.next;return b.m};nc.prototype.remove=function(){var a=this.ia,b=this.K;b||h(Error("Next must be called at least once before remove."));var c=b.s,b=b.next;c?c.next=b:a.f=b;b?b.s=c:a.j=c;a.v--;this.K=n};function N(a){this.e=a;this.g=this.o=p;this.w=n}N.prototype.d=q("o");function oc(a,b){a.o=b}function pc(a,b){a.g=b}N.prototype.q=q("w");function O(a,b){var c=a.evaluate(b);return c instanceof L?+lc(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?lc(c):""+c}function qc(a,b){var c=a.evaluate(b);return c instanceof L?!!c.n():!!c};function rc(a,b,c){N.call(this,a.e);this.N=a;this.U=b;this.$=c;this.o=b.d()||c.d();this.g=b.g||c.g;this.N==sc&&(!c.g&&!c.d()&&4!=c.e&&0!=c.e&&b.q()?this.w={name:b.q().name,u:c}:!b.g&&(!b.d()&&4!=b.e&&0!=b.e&&c.q())&&(this.w={name:c.q().name,u:b}))}v(rc,N); -function tc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof L&&c instanceof L){f=mc(b);for(b=f.next();b;b=f.next()){e=mc(c);for(d=e.next();d;d=e.next())if(a(K(b),K(d)))return m}return p}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=mc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+K(d);break;case "boolean":f=!!K(d);break;case "string":f=K(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return m}return p}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}rc.prototype.evaluate=function(a){return this.N.l(this.U,this.$,a)};rc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.N+"\n";a+=" ";b+=this.U.toString(a)+"\n";return b+=this.$.toString(a)};function uc(a,b,c,d){this.ka=a;this.Y=b;this.e=c;this.l=d}uc.prototype.toString=q("ka");var vc={}; -function Q(a,b,c,d){a in vc&&h(Error("Binary operator already created: "+a));a=new uc(a,b,c,d);return vc[a.toString()]=a}Q("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});Q("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});Q("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});Q("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});Q("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});Q("<",4,2,function(a,b,c){return tc(function(a,b){return a<b},a,b,c)}); -Q(">",4,2,function(a,b,c){return tc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return tc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return tc(function(a,b){return a>=b},a,b,c)});var sc=Q("=",3,2,function(a,b,c){return tc(function(a,b){return a==b},a,b,c,m)});Q("!=",3,2,function(a,b,c){return tc(function(a,b){return a!=b},a,b,c,m)});Q("and",2,2,function(a,b,c){return qc(a,c)&&qc(b,c)});Q("or",1,2,function(a,b,c){return qc(a,c)||qc(b,c)});function wc(a,b){b.n()&&4!=a.e&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.e);this.Z=a;this.b=b;this.o=a.d();this.g=a.g}v(wc,N);wc.prototype.evaluate=function(a){a=this.Z.evaluate(a);return xc(this.b,a)};wc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.Z.toString(a);return b+=this.b.toString(a)};function yc(a,b){b.length<a.X&&h(Error("Function "+a.h+" expects at least"+a.X+" arguments, "+b.length+" given"));a.L!==n&&b.length>a.L&&h(Error("Function "+a.h+" expects at most "+a.L+" arguments, "+b.length+" given"));a.ja&&x(b,function(b,d){4!=b.e&&h(Error("Argument "+d+" to function "+a.h+" is not of type Nodeset: "+b))});N.call(this,a.e);this.B=a;this.H=b;oc(this,a.o||pa(b,function(a){return a.d()}));pc(this,a.ha&&!b.length||a.ga&&!!b.length||pa(b,function(a){return a.g}))}v(yc,N); -yc.prototype.evaluate=function(a){return this.B.l.apply(n,sa(a,this.H))};yc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.B+"\n";b+=" ";this.H.length&&(a+=b+"Arguments:",b+=" ",a=oa(this.H,function(a,d){return a+"\n"+d.toString(b)},a));return a};function zc(a,b,c,d,e,f,g,l,r){this.h=a;this.e=b;this.o=c;this.ha=d;this.ga=e;this.l=f;this.X=g;this.L=t(l)?l:g;this.ja=!!r}zc.prototype.toString=q("h");var Ac={}; -function R(a,b,c,d,e,f,g,l){a in Ac&&h(Error("Function already created: "+a+"."));Ac[a]=new zc(a,b,c,d,p,e,f,g,l)}R("boolean",2,p,p,function(a,b){return qc(b,a)},1);R("ceiling",1,p,p,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,p,p,function(a,b){var c=ta(arguments,1);return oa(c,function(b,c){return b+P(c,a)},"")},2,n);R("contains",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,p,p,function(a,b){return b.evaluate(a).n()},1,1,m);R("false",2,p,p,aa(p),0); -R("floor",1,p,p,function(a,b){return Math.floor(O(b,a))},1);R("id",4,p,p,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return qa(b,function(b){return a==b.id})}return n}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!ra(f,a)&&f.push(a)});f.sort(Xa);var g=new L;x(f,function(a){g.add(a)});return g},1);R("lang",2,p,p,aa(p),1); -R("last",1,m,p,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.j},0);R("local-name",3,p,m,function(a,b){var c=b?kc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,m);R("name",3,p,m,function(a,b){var c=b?kc(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,m);R("namespace-uri",3,m,p,aa(""),0,1,m);R("normalize-space",3,p,m,function(a,b){return(b?P(b,a):K(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,p,p,function(a,b){return!qc(b,a)},1);R("number",1,p,m,function(a,b){return b?O(b,a):+K(a.c)},0,1);R("position",1,m,p,function(a){return a.la},0);R("round",1,p,p,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,p,m,function(a,b){return b?P(b,a):K(a.c)},0,1);R("string-length",1,p,m,function(a,b){return(b?P(b,a):K(a.c)).length},0,1); -R("substring",3,p,p,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,p,p,function(a,b){for(var c=mc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,m);R("translate",3,p,p,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);R("true",2,p,p,aa(m),0);function M(a,b){this.ca=a;this.V=t(b)?b:n;this.i=n;switch(a){case "comment":this.i=8;break;case "text":this.i=Sa;break;case "processing-instruction":this.i=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Bc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.matches=function(a){return this.i===n||this.i==a.nodeType};M.prototype.getName=q("ca"); -M.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.ca;this.V===n||(b+="\n"+this.V.toString(a+" "));return b};function Cc(a){N.call(this,3);this.ba=a.substring(1,a.length-1)}v(Cc,N);Cc.prototype.evaluate=q("ba");Cc.prototype.toString=function(a){return(a||"")+"literal: "+this.ba};function dc(a){this.h=a.toLowerCase()}dc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.h||this.h==a.nodeName.toLowerCase()?m:this.h==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};dc.prototype.getName=q("h");dc.prototype.toString=function(a){return(a||"")+"nametest: "+this.h};function Dc(a){N.call(this,1);this.da=a}v(Dc,N);Dc.prototype.evaluate=q("da");Dc.prototype.toString=function(a){return(a||"")+"number: "+this.da};function Ec(a,b){N.call(this,a.e);this.S=a;this.z=b;this.o=a.d();this.g=a.g;if(1==this.z.length){var c=this.z[0];!c.J&&c.p==Fc&&(c=c.G,"*"!=c.getName()&&(this.w={name:c.getName(),u:n}))}}v(Ec,N);function Gc(){N.call(this,4)}v(Gc,N);Gc.prototype.evaluate=function(a){var b=new L;a=a.c;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Gc.prototype.toString=function(a){return a+"RootHelperExpr"};function Hc(){N.call(this,4)}v(Hc,N);Hc.prototype.evaluate=function(a){var b=new L;b.add(a.c);return b}; -Hc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Ec.prototype.evaluate=function(a){var b=this.S.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));a=this.z;for(var c=0,d=a.length;c<d&&b.n();c++){var e=a[c],f=mc(b,e.p.t),g;if(!e.d()&&e.p==Ic){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Sb(g))}else if(!e.d()&&e.p==Jc)g=f.next(),b=e.evaluate(new Sb(g));else{g=f.next();for(b=e.evaluate(new Sb(g));(g=f.next())!=n;)g=e.evaluate(new Sb(g)),b=jc(b,g)}}return b}; -Ec.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.S.toString(b);this.z.length&&(c+=b+"Steps:\n",b+=" ",x(this.z,function(a){c+=a.toString(b)}));return c};function Kc(a,b){this.b=a;this.t=!!b}function xc(a,b,c){for(c=c||0;c<a.b.length;c++)for(var d=a.b[c],e=mc(b),f=b.n(),g,l=0;g=e.next();l++){var r=a.t?f-l:l+1;g=d.evaluate(new Sb(g,r,f));var w;"number"==typeof g?w=r==g:"string"==typeof g||"boolean"==typeof g?w=!!g:g instanceof L?w=0<g.n():h(Error("Predicate.evaluate returned an unexpected type."));w||e.remove()}return b}Kc.prototype.q=function(){return 0<this.b.length?this.b[0].q():n}; -Kc.prototype.d=function(){for(var a=0;a<this.b.length;a++){var b=this.b[a];if(b.d()||1==b.e||0==b.e)return m}return p};Kc.prototype.n=function(){return this.b.length};Kc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return oa(this.b,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Lc(a,b,c,d){N.call(this,4);this.p=a;this.G=b;this.b=c||new Kc([]);this.J=!!d;b=this.b.q();a.ma&&b&&(a=b.name,a=I?a.toLowerCase():a,this.w={name:a,u:b.u});this.o=this.b.d()}v(Lc,N); -Lc.prototype.evaluate=function(a){var b=a.c,c=n,c=this.q(),d=n,e=n,f=0;c&&(d=c.name,e=c.u?P(c.u,a):n,f=1);if(this.J)if(!this.d()&&this.p==Mc)c=ac(this.G,b,d,e),c=xc(this.b,c,f);else if(a=mc((new Lc(Nc,new M("node"))).evaluate(a)),b=a.next())for(c=this.l(b,d,e,f);(b=a.next())!=n;)c=jc(c,this.l(b,d,e,f));else c=new L;else c=this.l(a.c,d,e,f);return c};Lc.prototype.l=function(a,b,c,d){a=this.p.B(this.G,a,b,c);return a=xc(this.b,a,d)}; -Lc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.J?"//":"/")+"\n";this.p.h&&(b+=a+"Axis: "+this.p+"\n");b+=this.G.toString(a);if(this.b.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.b.length;c++)var d=c<this.b.length-1?", ":"",b=b+(this.b[c].toString(a)+d);return b};function Oc(a,b,c,d){this.h=a;this.B=b;this.t=c;this.ma=d}Oc.prototype.toString=q("h");var Pc={}; -function S(a,b,c,d){a in Pc&&h(Error("Axis already created: "+a));b=new Oc(a,b,c,!!d);return Pc[a]=b}S("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},m);S("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},m); -var Fc=S("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new Ub(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.i===n||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)I?g.nodeValue&&c.add(Vb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(I?g.nodeValue&&c.add(Vb(b,g,b.sourceIndex)):c.add(g));return c},p),Mc=S("child",function(a,b,c,d,e){return(I?gc:hc).call(n,a,b,u(c)?c:n,u(d)?d:n,e||new L)},p,m); -S("descendant",ac,p,m);var Nc=S("descendant-or-self",function(a,b,c,d){var e=new L;$b(b,c,d)&&a.matches(b)&&e.add(b);return ac(a,b,c,d,e)},p,m),Ic=S("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)$b(f,c,d)&&a.matches(f)&&e.add(f),e=ac(a,f,c,d,e);while(b=b.parentNode);return e},p,m);S("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},p);S("namespace",function(){return new L},p); -var Qc=S("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},p),Jc=S("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,l=f.length;g<l;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var w=0,C=r.length;w<C;w++)b=r[w],$b(b,c,d)&&a.matches(b)&&e.add(b),e=ac(a,b,c,d,e)}return e},m,m); -S("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},m);var Rc=S("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},p);function Sc(a){N.call(this,1);this.R=a;this.o=a.d();this.g=a.g}v(Sc,N);Sc.prototype.evaluate=function(a){return-O(this.R,a)};Sc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.R.toString(a+" ")};function Tc(a){N.call(this,4);this.D=a;oc(this,pa(this.D,function(a){return a.d()}));pc(this,pa(this.D,function(a){return a.g}))}v(Tc,N);Tc.prototype.evaluate=function(a){var b=new L;x(this.D,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=jc(b,c)});return b};Tc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.D,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Uc(a){this.a=a}function Vc(a){for(var b,c=[];;){V(a,"Missing right hand side of binary expression.");b=Wc(a);var d=a.a.next();if(!d)break;var e=(d=vc[d]||n)&&d.Y;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Y;)b=new rc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new rc(c.pop(),c.pop(),b);return b}function V(a,b){a.a.empty()&&h(Error(b))}function Xc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Yc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Zc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Cc(a)}function $c(a){return"*"!=J(a.a)&&":"==J(a.a,1)&&"*"==J(a.a,2)?new dc(a.a.next()+a.a.next()+a.a.next()):new dc(a.a.next())} -function ad(a){var b,c=[],d;if("/"==J(a.a)||"//"==J(a.a)){b=a.a.next();d=J(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Gc;d=new Gc;V(a,"Missing next location step.");b=bd(a,b);c.push(b)}else{a:{b=J(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Vc(a);V(a,'unclosed "("');Xc(a,")");break;case '"':case "'":b=Zc(a);break;default:if(isNaN(+b))if(!Bc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==J(a.a,1)){b=a.a.next();b=Ac[b]||n;a.a.next();for(d=[];")"!=J(a.a);){V(a,"Missing function argument list.");d.push(Vc(a));if(","!=J(a.a))break;a.a.next()}V(a,"Unclosed function argument list.");Yc(a);b=new yc(b,d)}else{b=n;break a}else b=new Dc(+a.a.next())}"["==J(a.a)&&(d=new Kc(cd(a)),b=new wc(b,d))}if(b)if("/"==J(a.a)||"//"==J(a.a))d=b;else return b;else b=bd(a,"/"),d=new Hc,c.push(b)}for(;"/"==J(a.a)||"//"==J(a.a);)b=a.a.next(),V(a,"Missing next location step."),b=bd(a,b),c.push(b);return new Ec(d, -c)} -function bd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==J(a.a))return d=new Lc(Rc,new M("node")),a.a.next(),d;if(".."==J(a.a))return d=new Lc(Qc,new M("node")),a.a.next(),d;var f;"@"==J(a.a)?(f=Fc,a.a.next(),V(a,"Missing attribute name")):"::"==J(a.a,1)?(/(?![0-9])[\w]/.test(J(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Pc[e]||n)||h(Error("No axis with name: "+e)),a.a.next(),V(a,"Missing node name")):f=Mc;e=J(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==J(a.a, -1)){Bc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Bc(c)||h(Error("Invalid type name: "+c));Xc(a,"(");V(a,"Bad nodetype");e=J(a.a).charAt(0);var g=n;if('"'==e||"'"==e)g=Zc(a);V(a,"Bad nodetype");Yc(a);c=new M(c,g)}else c=$c(a);else"*"==e?c=$c(a):h(Error("Bad token: "+a.a.next()));e=new Kc(cd(a),f.t);return d||new Lc(f,c,e,"//"==b)} -function cd(a){for(var b=[];"["==J(a.a);){a.a.next();V(a,"Missing predicate expression.");var c=Vc(a);b.push(c);V(a,"Unclosed predicate expression.");Xc(a,"]")}return b}function Wc(a){if("-"==J(a.a))return a.a.next(),new Sc(Wc(a));var b=ad(a);if("|"!=J(a.a))a=b;else{for(b=[b];"|"==a.a.next();)V(a,"Missing next union location path."),b.push(ad(a));a.a.back();a=new Tc(b)}return a};function dd(a){a.length||h(Error("Empty XPath expression."));a=Xb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Vc(new Uc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Sb(a));return new W(e,d)}} -function W(a,b){0==b&&(a instanceof L?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof L))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?lc(a):""+a;break;case 1:this.numberValue=a instanceof L?+lc(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.n():!!a;break;case 4:case 5:case 6:case 7:var d=mc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Ub?e.c:e);this.snapshotLength=a.n();this.invalidIteratorState=p;break;case 8:case 9:d=kc(a);this.singleNodeValue=d instanceof Ub?d.c:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?n:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?n:c[a]}} -W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function ed(a){a=a||s;var b=a.document;b.evaluate||(a.XPathResult=W,b.evaluate=function(a,b,e,f){return(new dd(a)).evaluate(b,f)},b.createExpression=function(a){return new dd(a)})};var X={};X.ea=function(){var a={pa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||n}}();X.l=function(a,b,c){var d=G(a);(z||qb)&&ed(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.ea;return z&&!Ja(7)?d.evaluate.call(d,b,a,e,c,n):d.evaluate(b,a,e,c,n)}catch(f){A&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new Pb(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -X.I=function(a,b){(!a||1!=a.nodeType)&&h(new Pb(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};X.r=function(a,b){var c=function(){var c=X.l(b,a,9);return c?(c=c.singleNodeValue,y?c:c||n):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):n}();c===n||X.I(c,a);return c}; -X.k=function(a,b){var c=function(){var c=X.l(b,a,7);if(c){var e=c.snapshotLength;y&&!t(e)&&X.I(n,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){X.I(b,a)});return c};!y&&(!B||xb("533"));function fd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,n))?c[b]||c.getPropertyValue(b)||"":""}function gd(a,b){return fd(a,b)||(a.currentStyle?a.currentStyle[b]:n)||a.style&&a.style[b]}function hd(a){var b=a.getBoundingClientRect();z&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function id(a){if(z&&!D(8))return a.offsetParent;var b=G(a),c=gd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=gd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return n} -function jd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=hd(a);b.x=c.left;b.y=c.top}else{c=db(F(a));var d,e=G(a),f=gd(a,"position"),g=A&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),l=new E(0,0),r;d=e?G(e):document;if(r=z)if(r=!D(9))r="CSS1Compat"!=F(d).A.compatMode;r=r?d.body:d.documentElement;if(a!=r)if(a.getBoundingClientRect)d=hd(a),e=db(F(e)),l.x=d.left+e.x,l.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(r),l.x=d.screenX-e.screenX,l.y=d.screenY-e.screenY;else{g=a;do{l.x+=g.offsetLeft;l.y+=g.offsetTop;g!=a&&(l.x+=g.clientLeft||0,l.y+=g.clientTop||0);if(B&&"fixed"==gd(g,"position")){l.x+=e.body.scrollLeft;l.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(y||B&&"absolute"==f)l.y-=e.body.offsetTop;for(g=a;(g=id(g))&&g!=e.body&&g!=r;)if(l.x-=g.scrollLeft,!y||"TR"!=g.tagName)l.y-=g.scrollTop}b.x=l.x-c.x;b.y=l.y-c.y}if(A&&!Ja(12)){var w;z?w="-ms-transform": -B?w="-webkit-transform":y?w="-o-transform":A&&(w="-moz-transform");var C;w&&(C=gd(a,w));C||(C=gd(a,"transform"));C?(a=C.match(kd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else w=da(a.T),C=a,a.targetTouches?C=a.targetTouches[0]:w&&a.T().targetTouches&&(C=a.T().targetTouches[0]),b.x=C.clientX,b.y=C.clientY;return b} -function ld(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;return(!t(b)||d)&&a.getBoundingClientRect?(a=hd(a),new Oa(a.right-a.left,a.bottom-a.top)):new Oa(b,c)}var kd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var md=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function nd(a){var b=[];x(a.split(md),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return y?b.replace(/\w+:;/g,""):b} -function od(a,b){b=b.toLowerCase();if("style"==b)return nd(a.style.cssText);if(Cb&&"value"==b&&Y(a,"INPUT"))return a.value;if(Db&&a[b]===m)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:n}function pd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:n} -function Z(a,b){var c=ka(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Db?"styleFloat":"cssFloat";c=fd(a,c)||qd(a,c);if(c===n)c=n;else if(ra(Hb,b)&&(Kb.test("#"==c.charAt(0)?c:"#"+c)||Ob(c).length||Gb&&Gb[c.toLowerCase()]||Mb(c).length)){var d=Mb(c);if(!d.length){a:if(d=Ob(c),!d.length){d=Gb[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Kb.test(d)&&(d=Jb(d),d=Jb(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function qd(a,b){var c=a.currentStyle||a.style,d=c[b];!t(d)&&da(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?t(d)?d:n:(c=pd(a))?qd(c,b):n} -function rd(a){if(da(a.getBBox)&&!Y(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=Z(a,"overflow")?a=m:(a=pd(a),!a||!Y(a,"HTML")?a=m:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ga).document;a=b.documentElement;var d=b.body;d||h(new Pb(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(n,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(n,b);a=new Oa(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new Oa(a.clientWidth,a.clientHeight);return a}if("none"!=gd(a,"display"))a=ld(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=ld(a);b.display=d;b.position=f;b.visibility=e}return a} -function sd(a,b){function c(a){if("none"==Z(a,"display"))return p;a=pd(a);return!a||c(a)}function d(a){var b=rd(a);return 0<b.height&&0<b.width?m:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):pa(a.childNodes,function(b){return b.nodeType==Sa&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a,b){var c;if((c=b==n?Va(a):Va(b))&&("hidden"==Z(c,"overflow-x")||"hidden"==Z(c,"overflow-y"))){var d=rd(c),f=jd(c),g=jd(a);return f.x+d.width<=g.x&&"hidden"==Z(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==Z(c,"overflow-y")?p:m}return!c||e(a,c)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=jd(a),a=rd(a),0<=b.x+a.width&&0<=b.y+a.height?m:p;a=pd(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=bb(a,function(a){return Y(a,"SELECT")});return!!g&&sd(g,m)}if(Y(a,"MAP")){if(!a.name)return p;g=G(a);g= -g.evaluate?X.r('/descendant::*[@usemap = "#'+a.name+'"]',g):$a(g,function(b){return Y(b)&&od(b,"usemap")=="#"+a.name});return!!g&&sd(g,b)}return Y(a,"AREA")?(g=bb(a,function(a){return Y(a,"MAP")}),!!g&&sd(g,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==td(a)||!d(a)||!e(a,n)?p:f(a)}function ud(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function vd(a){var b=[];wd(a,b);b=na(b,ud);return ud(b.join("\n")).replace(/\xa0/g," ")} -function wd(a,b){if(Y(a,"BR"))b.push("");else{var c=Y(a,"TD"),d=Z(a,"display"),e=!c&&!ra(xd,d),f=a.previousElementSibling!=k?a.previousElementSibling:Ua(a.previousSibling),f=f?Z(f,"display"):"",g=Z(a,"float")||Z(a,"cssFloat")||Z(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var l=sd(a),r=n,w=n;l&&(r=Z(a,"white-space"),w=Z(a,"text-transform"));x(a.childNodes,function(a){a.nodeType==Sa&&l?yd(a,b,r,w):Y(a)&&wd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!ha(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var xd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function yd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ha(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function td(a){if(Eb){if("relative"==Z(a,"position"))return 1;a=Z(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return zd(a)}function zd(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=pd(a))&&(b*=zd(a));return b};var $={},Ad={};$.aa=function(a,b,c){var d;try{d=Fb.k("a",b)}catch(e){d=cb(F(b),"A",n,b)}return qa(d,function(b){b=vd(b);return c&&-1!=b.indexOf(a)||b==a})};$.W=function(a,b,c){var d;try{d=Fb.k("a",b)}catch(e){d=cb(F(b),"A",n,b)}return ma(d,function(b){b=vd(b);return c&&-1!=b.indexOf(a)||b==a})};$.r=function(a,b){return $.aa(a,b,p)};$.k=function(a,b){return $.W(a,b,p)};Ad.r=function(a,b){return $.aa(a,b,m)};Ad.k=function(a,b){return $.W(a,b,m)};var Bd={r:function(a,b){return b.getElementsByTagName(a)[0]||n},k:function(a,b){return b.getElementsByTagName(a)}};var Cd={className:eb,"class name":eb,css:Fb,"css selector":Fb,id:{r:function(a,b){var c=F(b),d=u(a)?c.A.getElementById(a):a;if(!d)return n;if(od(d,"id")==a&&Wa(b,d))return d;c=cb(c,"*");return qa(c,function(c){return od(c,"id")==a&&Wa(b,c)})},k:function(a,b){var c=cb(F(b),"*",n,b);return ma(c,function(b){return od(b,"id")==a})}},linkText:$,"link text":$,name:{r:function(a,b){var c=cb(F(b),"*",n,b);return qa(c,function(b){return od(b,"name")==a})},k:function(a,b){var c=cb(F(b),"*",n,b);return ma(c, -function(b){return od(b,"name")==a})}},partialLinkText:Ad,"partial link text":Ad,tagName:Bd,"tag name":Bd,xpath:X};function Dd(a,b){for(var c=b||ga,d=c.frames.length,e=0;e<d;e++){var f=c.frames[e];if((f.frameElement||f).name==a)return f.document?f:f.contentWindow||(f.contentDocument||f.contentWindow.document).parentWindow||(f.contentDocument||f.contentWindow.document).defaultView}var g;a:{var d={id:a},c=c.document,l;b:{for(l in d)if(d.hasOwnProperty(l))break b;l=n}if(l&&(e=Cd[l])&&da(e.k)){g=e.k(d[l],c||ga.document);break a}h(Error("Unsupported locator strategy: "+l))}for(e=0;e<g.length;e++)if(Y(g[e],"FRAME")|| -Y(g[e],"IFRAME"))return g[e].contentWindow||(g[e].contentDocument||g[e].contentWindow.document).parentWindow||(g[e].contentDocument||g[e].contentWindow.document).defaultView;return n};function Ed(){this.F=k} -function Fd(a,b,c){switch(typeof b){case "string":Gd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==n){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fd(a,a.F?a.F.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Gd(f, -c),c.push(":"),Fd(a,a.F?a.F.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Hd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Id=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Gd(a,b){b.push('"',a.replace(Id,function(a){if(a in Hd)return Hd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Hd[a]=e+b.toString(16)}),'"')};B||y||A&&xb(3.5)||z&&xb(8);function Jd(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return na(a,Jd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Kd(a);return b}if("document"in a)return b={},b.WINDOW=Kd(a),b;if(ca(a))return na(a,Jd);a=Pa(a,function(a,b){return"number"==typeof b||u(b)});return Qa(a,Jd);default:return n}} -function Ld(a,b){return"array"==ba(a)?na(a,function(a){return Ld(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?Md(a.ELEMENT,b):"WINDOW"in a?Md(a.WINDOW,b):Qa(a,function(a){return Ld(a,b)}):a}function Nd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.M=fa());b.M||(b.M=fa());return b}function Kd(a){var b=Nd(a.ownerDocument),c=Ra(b,function(b){return b==a});c||(c=":wdc:"+b.M++,b[c]=a);return c} -function Md(a,b){a=decodeURIComponent(a);var c=b||document,d=Nd(c);a in d||h(new Pb(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new Pb(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new Pb(10,"Element is no longer attached to the DOM"))};function Od(a,b){var c=Dd,d=[a,b],e=window||ga,f;try{var c=u(c)?new e.Function(c):e==window?c:new e.Function("return ("+c+").apply(null,arguments);"),g=Ld(d,e.document),l=c.apply(n,g);f={status:0,value:Jd(l)}}catch(r){f={status:"code"in r?r.code:13,value:{message:r.message}}}c=[];Fd(new Ed,f,c);return c.join("")}var Pd=["_"],Qd=s;!(Pd[0]in Qd)&&Qd.execScript&&Qd.execScript("var "+Pd[0]);for(var Rd;Pd.length&&(Rd=Pd.shift());)!Pd.length&&t(Od)?Qd[Rd]=Od:Qd=Qd[Rd]?Qd[Rd]:Qd[Rd]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/frame_by_index.js b/src/ghostdriver/third_party/webdriver-atoms/frame_by_index.js deleted file mode 100644 index 80a1ca196..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/frame_by_index.js +++ /dev/null @@ -1,35 +0,0 @@ -function(){return function(){var g=void 0,k=!0,l=null,m=!1;function n(a){return function(){return a}}var q=this; -function r(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=r(a);return"array"==b||"object"==b&&"number"==typeof a.length}function s(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ca=Date.now||function(){return+new Date};var da=window;function t(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var p=d[h]||"",x=e[h]||"",N=RegExp("(\\d*)(\\D*)","g"),ea=RegExp("(\\d*)(\\D*)","g");do{var A=N.exec(p)||["","",""],B=ea.exec(x)||["","",""];if(0==A[0].length&&0==B[0].length)break;c=((0==A[1].length?0:parseInt(A[1],10))<(0==B[1].length?0:parseInt(B[1],10))?-1:(0==A[1].length?0:parseInt(A[1],10))>(0==B[1].length? -0:parseInt(B[1],10))?1:0)||((0==A[2].length)<(0==B[2].length)?-1:(0==A[2].length)>(0==B[2].length)?1:0)||(A[2]<B[2]?-1:A[2]>B[2]?1:0)}while(0==c)}return c};var fa=Array.prototype;function u(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function ga(a,b){for(var c=a.length,d=[],e=0,f=s(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var p=f[h];b.call(g,p,h,a)&&(d[e++]=p)}return d}function ha(a,b){for(var c=a.length,d=Array(c),e=s(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";u(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function ja(a,b){var c;a:{c=a.length;for(var d=s(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:s(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?fa.slice.call(a,b):fa.slice.call(a,b,c)};var v,la,w,ma;function y(){return q.navigator?q.navigator.userAgent:l}ma=w=la=v=m;var z;if(z=y()){var na=q.navigator;v=0==z.indexOf("Opera");la=!v&&-1!=z.indexOf("MSIE");w=!v&&-1!=z.indexOf("WebKit");ma=!v&&!w&&"Gecko"==na.product}var C=v,D=la,E=ma,oa=w;function pa(){var a=q.document;return a?a.documentMode:g}var F; -a:{var qa="",G;if(C&&q.opera)var ra=q.opera.version,qa="function"==typeof ra?ra():ra;else if(E?G=/rv\:([^\);]+)(\)|;)/:D?G=/MSIE\s+([^\);]+)(\)|;)/:oa&&(G=/WebKit\/(\S+)/),G)var sa=G.exec(y()),qa=sa?sa[1]:"";if(D){var ta=pa();if(ta>parseFloat(qa)){F=String(ta);break a}}F=qa}var ua={};function va(a){return ua[a]||(ua[a]=0<=t(F,a))}var wa=q.document,H=!wa||!D?g:pa()||("CSS1Compat"==wa.compatMode?parseInt(F,10):5);!E&&!D||D&&D&&9<=H||E&&va("1.9.1");D&&va("9");function xa(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function za(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function Aa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Ba(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(D&&!(D&&9<=H)){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?Ca(a,b):!c&&Aa(e,b)?-1*Da(a,b):!d&&Aa(f,a)?Da(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(k);d=d.createRange();d.selectNode(b);d.collapse(k);return c.compareBoundaryPoints(q.Range.START_TO_END,d)}function Da(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ca(d,a)}function Ca(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Ea,Fa,Ga,Ha,Ia,Ja,Ka;Ka=Ja=Ia=Ha=Ga=Fa=Ea=m;var I=y();I&&(-1!=I.indexOf("Firefox")?Ea=k:-1!=I.indexOf("Camino")?Fa=k:-1!=I.indexOf("iPhone")||-1!=I.indexOf("iPod")?Ga=k:-1!=I.indexOf("iPad")?Ha=k:-1!=I.indexOf("Android")?Ia=k:-1!=I.indexOf("Chrome")?Ja=k:-1!=I.indexOf("Safari")&&(Ka=k));var La=Ea,Ma=Fa,Na=Ga,Oa=Ha,Pa=Ia,Qa=Ja,Ra=Ka;function J(a){return(a=a.exec(y()))?a[1]:""}var Sa=function(){if(La)return J(/Firefox\/([0-9.]+)/);if(D||C)return F;if(Qa)return J(/Chrome\/([0-9.]+)/);if(Ra)return J(/Version\/([0-9.]+)/);if(Na||Oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(y());if(a)return a[1]+"."+a[2]}else{if(Pa)return(a=J(/Android\s+([0-9.]+)/))?a:J(/Version\/([0-9.]+)/);if(Ma)return J(/Camino\/([0-9.]+)/)}return""}();var Ta,Ua;function Va(a){return Wa?Ta(a):D?0<=t(H,a):va(a)}var Wa=function(){if(!E)return m;var a=q.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;Ta=function(a){return 0<=d.m(e,""+a)};Ua=function(a){d.m(f,""+a)};return k}(),Xa; -if(Pa){var Ya=/Android\s+([0-9\.]+)/.exec(y());Xa=Ya?Ya[1]:"0"}else Xa="0";var Za=Xa;Pa&&(Wa?Ua(2.3):Pa?t(Za,2.3):t(Sa,2.3));function K(a,b){this.code=a;this.state=$a[a]||ab;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;K.F=a.prototype;K.prototype=new b})(); -var ab="unknown error",$a={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};$a[13]=ab;$a[9]="unknown command";K.prototype.toString=function(){return this.name+": "+this.message};var L=D&&!(D&&9<=H),bb=D&&!(D&&8<=H);function cb(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.B=e;this.parentNode=b}function db(a,b,c){var d=bb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new cb(b,a,b.nodeName,d,c)};function M(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(L&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),L&&"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} -function O(a,b,c){if(b===l)return k;try{if(!a.getAttribute)return m}catch(d){return m}bb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function eb(a,b,c,d,e){return(L?fb:gb).call(l,a,b,s(c)?c:l,s(d)?d:l,e||new P)} -function fb(a,b,c,d,e){if(m||8==a.d||c&&a.d===l){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],p=0;b=f[p++];)O(b,c,d)&&h.push(b);f=h}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ib(a,b,c,d,e);return e} -function gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!D?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),u(b,function(a){O(a,c,d)&&e.add(a)}));return e} -function jb(a,b,c,d,e){var f;if((m||8==a.d||c&&a.d===l)&&(f=b.childNodes)){var h=hb(a);if("*"!=h&&(f=ga(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ga(f,function(a){return O(a,c,d)}));u(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return kb(a,b,c,d,e)}function kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b);return e} -function ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b),ib(a,b,c,d,e)}function hb(a){if(m){if(8==a.d)return"!";if(a.d===l)return"*"}return a.getName()};function P(){this.b=this.a=l;this.e=0}function lb(a){this.k=a;this.next=this.i=l}P.prototype.unshift=function(a){a=new lb(a);a.next=this.a;this.b?this.a.i=a:this.a=this.b=a;this.a=a;this.e++};P.prototype.add=function(a){a=new lb(a);a.i=this.b;this.a?this.b.next=a:this.a=this.b=a;this.b=a;this.e++};function mb(a){return(a=a.a)?a.k:l}function nb(a){return(a=mb(a))?M(a):""}function Q(a,b){this.z=a;this.j=(this.l=b)?a.b:a.a;this.p=l} -Q.prototype.next=function(){var a=this.j;if(a==l)return l;var b=this.p=a;this.j=this.l?a.i:a.next;return b.k};function R(a,b){var c=a.evaluate(b);return c instanceof P?+nb(c):+c}function S(a,b){var c=a.evaluate(b);return c instanceof P?nb(c):""+c}function T(a,b){var c=a.evaluate(b);return c instanceof P?!!c.e:!!c};function U(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof P&&c instanceof P){e=new Q(b,m);for(d=e.next();d;d=e.next()){b=new Q(c,m);for(f=b.next();f;f=b.next())if(a(M(d),M(f)))return k}return m}if(b instanceof P||c instanceof P){b instanceof P?e=b:(e=c,c=b);e=new Q(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+M(d);break;case "boolean":d=!!M(d);break;case "string":d=M(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return k}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function ob(a,b,c,d){this.q=a;this.D=b;this.n=c;this.o=d}ob.prototype.toString=function(){return this.q};var pb={};function V(a,b,c,d){if(a in pb)throw Error("Binary operator already created: "+a);a=new ob(a,b,c,d);pb[a.toString()]=a}V("div",6,1,function(a,b,c){return R(a,c)/R(b,c)});V("mod",6,1,function(a,b,c){return R(a,c)%R(b,c)});V("*",6,1,function(a,b,c){return R(a,c)*R(b,c)}); -V("+",5,1,function(a,b,c){return R(a,c)+R(b,c)});V("-",5,1,function(a,b,c){return R(a,c)-R(b,c)});V("<",4,2,function(a,b,c){return U(function(a,b){return a<b},a,b,c)});V(">",4,2,function(a,b,c){return U(function(a,b){return a>b},a,b,c)});V("<=",4,2,function(a,b,c){return U(function(a,b){return a<=b},a,b,c)});V(">=",4,2,function(a,b,c){return U(function(a,b){return a>=b},a,b,c)});V("=",3,2,function(a,b,c){return U(function(a,b){return a==b},a,b,c,k)}); -V("!=",3,2,function(a,b,c){return U(function(a,b){return a!=b},a,b,c,k)});V("and",2,2,function(a,b,c){return T(a,c)&&T(b,c)});V("or",1,2,function(a,b,c){return T(a,c)||T(b,c)});function qb(a,b,c,d,e,f,h,p,x){this.g=a;this.n=b;this.w=c;this.v=d;this.u=e;this.o=f;this.t=h;this.s=p!==g?p:h;this.A=!!x}qb.prototype.toString=function(){return this.g};var rb={};function W(a,b,c,d,e,f,h,p){if(a in rb)throw Error("Function already created: "+a+".");rb[a]=new qb(a,b,c,d,m,e,f,h,p)}W("boolean",2,m,m,function(a,b){return T(b,a)},1);W("ceiling",1,m,m,function(a,b){return Math.ceil(R(b,a))},1); -W("concat",3,m,m,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+S(c,a)})},2,l);W("contains",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return-1!=b.indexOf(a)},2);W("count",1,m,m,function(a,b){return b.evaluate(a).e},1,1,k);W("false",2,m,m,n(m),0);W("floor",1,m,m,function(a,b){return Math.floor(R(b,a))},1); -W("id",4,m,m,function(a,b){function c(a){if(L){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=S(b,a).split(/\s+/),f=[];u(d,function(a){a=c(a);var b;if(b=a){a:if(s(f))b=!s(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Ba);var h=new P;u(f,function(a){h.add(a)});return h},1); -W("lang",2,m,m,n(m),1);W("last",1,k,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.b},0);W("local-name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("namespace-uri",3,k,m,n(""),0,1,k);W("normalize-space",3,m,k,function(a,b){return(b?S(b,a):M(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -W("not",2,m,m,function(a,b){return!T(b,a)},1);W("number",1,m,k,function(a,b){return b?R(b,a):+M(a.c)},0,1);W("position",1,k,m,function(a){return a.C},0);W("round",1,m,m,function(a,b){return Math.round(R(b,a))},1);W("starts-with",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return 0==b.lastIndexOf(a,0)},2);W("string",3,m,k,function(a,b){return b?S(b,a):M(a.c)},0,1);W("string-length",1,m,k,function(a,b){return(b?S(b,a):M(a.c)).length},0,1); -W("substring",3,m,m,function(a,b,c,d){c=R(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?R(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=S(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);W("substring-after",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -W("substring-before",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);W("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new Q(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+M(e);return d},1,1,k);W("translate",3,m,m,function(a,b,c,d){b=S(b,a);c=S(c,a);var e=S(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);W("true",2,m,m,n(k),0);function sb(a,b,c,d){this.g=a;this.r=b;this.l=c;this.G=d}sb.prototype.toString=function(){return this.g};var tb={};function X(a,b,c,d){if(a in tb)throw Error("Axis already created: "+a);tb[a]=new sb(a,b,c,!!d)}X("ancestor",function(a,b){for(var c=new P,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},k);X("ancestor-or-self",function(a,b){var c=new P,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},k); -X("attribute",function(a,b){var c=new P,d=a.getName();if("style"==d&&b.style&&L)return c.add(new cb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.d===l||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)L?h.nodeValue&&c.add(db(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(L?h.nodeValue&&c.add(db(b,h,b.sourceIndex)):c.add(h));return c},m);X("child",function(a,b,c,d,e){return(L?jb:kb).call(l,a,b,s(c)?c:l,s(d)?d:l,e||new P)},m,k);X("descendant",eb,m,k); -X("descendant-or-self",function(a,b,c,d){var e=new P;O(b,c,d)&&a.matches(b)&&e.add(b);return eb(a,b,c,d,e)},m,k);X("following",function(a,b,c,d){var e=new P;do for(var f=b;f=f.nextSibling;)O(f,c,d)&&a.matches(f)&&e.add(f),e=eb(a,f,c,d,e);while(b=b.parentNode);return e},m,k);X("following-sibling",function(a,b){for(var c=new P,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);X("namespace",function(){return new P},m); -X("parent",function(a,b){var c=new P;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);X("preceding",function(a,b,c,d){var e=new P,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,p=f.length;h<p;h++){var x=[];for(b=f[h];b=b.previousSibling;)x.unshift(b);for(var N=0,ea=x.length;N<ea;N++)b=x[N],O(b,c,d)&&a.matches(b)&&e.add(b),e=eb(a,b,c,d,e)}return e},k,k); -X("preceding-sibling",function(a,b){for(var c=new P,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},k);X("self",function(a,b){var c=new P;a.matches(b)&&c.add(b);return c},m);!C&&(!oa||Va("533"));function ub(a,b){return(b||da).frames[a]||l};function vb(){this.f=g} -function wb(a,b,c){switch(typeof b){case "string":xb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==r(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],wb(a,a.f?a.f.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),xb(f, -c),c.push(":"),wb(a,a.f?a.f.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var yb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},zb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function xb(a,b){b.push('"',a.replace(zb,function(a){if(a in yb)return yb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return yb[a]=e+b.toString(16)}),'"')};oa||C||E&&Va(3.5)||D&&Va(8);function Ab(a){switch(r(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,Ab);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Bb(a);return b}if("document"in a)return b={},b.WINDOW=Bb(a),b;if(aa(a))return ha(a,Ab);a=xa(a,function(a,b){return"number"==typeof b||s(b)});return ya(a,Ab);default:return l}} -function Cb(a,b){return"array"==r(a)?ha(a,function(a){return Cb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Db(a.ELEMENT,b):"WINDOW"in a?Db(a.WINDOW,b):ya(a,function(a){return Cb(a,b)}):a}function Eb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.h=ca());b.h||(b.h=ca());return b}function Bb(a){var b=Eb(a.ownerDocument),c=za(b,function(b){return b==a});c||(c=":wdc:"+b.h++,b[c]=a);return c} -function Db(a,b){a=decodeURIComponent(a);var c=b||document,d=Eb(c);if(!(a in d))throw new K(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new K(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new K(10,"Element is no longer attached to the DOM");};function Fb(a,b){var c=ub,d=[a,b],e=window||da,f;try{var c=s(c)?new e.Function(c):e==window?c:new e.Function("return ("+c+").apply(null,arguments);"),h=Cb(d,e.document),p=c.apply(l,h);f={status:0,value:Ab(p)}}catch(x){f={status:"code"in x?x.code:13,value:{message:x.message}}}c=[];wb(new vb,f,c);return c.join("")}var Y=["_"],Z=q;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Fb!==g?Z[$]=Fb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_appcache_status.js b/src/ghostdriver/third_party/webdriver-atoms/get_appcache_status.js index 620b7e32d..14e828fb2 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_appcache_status.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_appcache_status.js @@ -1,14 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=t[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.d=a.prototype;s.prototype=new b})(); -var da="unknown error",t={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};t[13]=da;t[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function u(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),H=0;0==c&&H<f;H++){var Ea=d[H]||"",Fa=e[H]||"",Ga=RegExp("(\\d*)(\\D*)","g"),Ha=RegExp("(\\d*)(\\D*)","g");do{var m=Ga.exec(Ea)||["","",""],n=Ha.exec(Fa)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var v,w,x,y;function z(){return p.navigator?p.navigator.userAgent:k}y=x=w=v=l;var A;if(A=z()){var ea=p.navigator;v=0==A.indexOf("Opera");w=!v&&-1!=A.indexOf("MSIE");x=!v&&-1!=A.indexOf("WebKit");y=!v&&!x&&"Gecko"==ea.product}var B=v,C=w,D=y,fa=x,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var E; -a:{var F="",G;if(B&&p.opera)var I=p.opera.version,F="function"==typeof I?I():I;else if(D?G=/rv\:([^\);]+)(\)|;)/:C?G=/MSIE\s+([^\);]+)(\)|;)/:fa&&(G=/WebKit\/(\S+)/),G)var ja=G.exec(z()),F=ja?ja[1]:"";if(C){var ka=ia();if(ka>parseFloat(F)){E=String(ka);break a}}E=F}var la={};function J(a){return la[a]||(la[a]=0<=u(E,a))}var ma=p.document,na=!ma||!C?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(E,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=z();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(z()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(C||B)return E;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(z());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):C?0<=u(na,a):J(a)}function W(a){return wa?va(a):S?0<=u(xa,a):0<=u(ta,a)} -var wa=function(){if(!D)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.c(e,""+a)};va=function(a){return 0<=d.c(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(z());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ia=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ia,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||B||D&&V(3.5)||C&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(D||C){var Ka;if(Ka=C)Ka=C&&9<=na;Ka||D&&J("1.9.1")}C&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=C&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("appcache"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}};function Xa(){var a;if(Wa())a=r.applicationCache.status;else throw new s(13,"Undefined application cache");return a};function Ya(){var a=Xa,b=[],c;try{var a="string"==typeof a?new r.Function(a):r==window?a:new r.Function("return ("+a+").apply(null,arguments);"),d=Pa(b,r.document),e=a.apply(k,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Ba(new Aa,c,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Za;if(Za=!Y.length)Za=Ya!==g;Za?Z[$]=Ya:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.d=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function q(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),D=0;0==c&&D<f;D++){var za=d[D]||"",Aa=e[D]||"",Ba=RegExp("(\\d*)(\\D*)","g"),Ca=RegExp("(\\d*)(\\D*)","g");do{var k=Ba.exec(za)||["","",""],l=Ca.exec(Aa)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var r,s,t,u;function v(){return g.navigator?g.navigator.userAgent:null}u=t=s=r=!1;var w;if(w=v()){var ea=g.navigator;r=0==w.indexOf("Opera");s=!r&&-1!=w.indexOf("MSIE");t=!r&&-1!=w.indexOf("WebKit");u=!r&&!t&&"Gecko"==ea.product}var x=r,y=s,z=u,fa=t,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var A; +a:{var B="",C;if(x&&g.opera)var E=g.opera.version,B="function"==typeof E?E():E;else if(z?C=/rv\:([^\);]+)(\)|;)/:y?C=/MSIE\s+([^\);]+)(\)|;)/:fa&&(C=/WebKit\/(\S+)/),C)var ja=C.exec(v()),B=ja?ja[1]:"";if(y){var ka=ia();if(ka>parseFloat(B)){A=String(ka);break a}}A=B}var la={};function F(a){return la[a]||(la[a]=0<=q(A,a))}var ma=g.document,na=ma&&y?ia()||("CSS1Compat"==ma.compatMode?parseInt(A,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=v();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(v()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(y||x)return A;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):y?0<=q(na,a):F(a)}function S(a){return wa?va(a):O?0<=q(xa,a):0<=q(ta,a)} +var wa=function(){if(!z)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.c(e,""+a)};va=function(a){return 0<=d.c(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(v());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function Da(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||x||z&&R(3.5)||y&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(z||y){var Ga;if(Ga=y)Ga=y&&9<=na;Ga||z&&F("1.9.1")}y&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=y&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("appcache"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(){var a;if(Sa())a=m.applicationCache.status;else throw new n(13,"Undefined application cache");return a};function Ua(){var a=Ta,b=[],c;try{var a="string"==typeof a?new m.Function(a):m==window?a:new m.Function("return ("+a+").apply(null,arguments);"),d=La(b,m.document),e=a.apply(null,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];U(new Da,c,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Ua?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Ua;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_attribute.js b/src/ghostdriver/third_party/webdriver-atoms/get_attribute.js index 44cbb39e0..63a79c1f1 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_attribute.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_attribute.js @@ -1,37 +1,37 @@ -function(){return function(){var f=void 0,g=!0,k=null,l=!1;function aa(a){return function(){return a}}var n=this;function p(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}Math.floor(2147483648*Math.random()).toString(36);function ca(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),h=Math.max(d.length,e.length),m=0;0==c&&m<h;m++){var t=d[m]||"",H=e[m]||"",T=RegExp("(\\d*)(\\D*)","g"),ma=RegExp("(\\d*)(\\D*)","g");do{var A=T.exec(t)||["","",""],B=ma.exec(H)||["","",""];if(0==A[0].length&&0==B[0].length)break;c=((0==A[1].length?0:parseInt(A[1],10))<(0==B[1].length?0:parseInt(B[1],10))?-1:(0==A[1].length?0:parseInt(A[1],10))>(0==B[1].length? -0:parseInt(B[1],10))?1:0)||((0==A[2].length)<(0==B[2].length)?-1:(0==A[2].length)>(0==B[2].length)?1:0)||(A[2]<B[2]?-1:A[2]>B[2]?1:0)}while(0==c)}return c};var da=Array.prototype;function ea(a,b){if(p(a))return!p(b)||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function q(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(f,d[e],e,a)}function fa(a,b){for(var c=a.length,d=[],e=0,h=p(a)?a.split(""):a,m=0;m<c;m++)if(m in h){var t=h[m];b.call(f,t,m,a)&&(d[e++]=t)}return d}function ga(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(f,c,d,e,a)});return c} -function ha(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(f,d[e],e,a)){c=e;break a}c=-1}return 0>c?k:p(a)?a.charAt(c):a[c]}function ia(a,b,c){return 2>=arguments.length?da.slice.call(a,b):da.slice.call(a,b,c)};function ja(a,b){this.code=a;this.state=ka[a]||la;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;ja.L=a.prototype;ja.prototype=new b})(); -var la="unknown error",ka={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ka[13]=la;ka[9]="unknown command";ja.prototype.toString=function(){return this.name+": "+this.message};var r,na,oa,pa,qa,ra;function s(){return n.navigator?n.navigator.userAgent:k}pa=oa=na=r=l;var sa;if(sa=s()){var ta=n.navigator;r=0==sa.indexOf("Opera");na=!r&&-1!=sa.indexOf("MSIE");oa=!r&&-1!=sa.indexOf("WebKit");pa=!r&&!oa&&"Gecko"==ta.product}var u=r,v=na,w=pa,ua=oa,va,wa=n.navigator;va=wa&&wa.platform||"";qa=-1!=va.indexOf("Mac");ra=-1!=va.indexOf("Win");var x=-1!=va.indexOf("Linux");function xa(){var a=n.document;return a?a.documentMode:f}var y; -a:{var ya="",z;if(u&&n.opera)var za=n.opera.version,ya="function"==typeof za?za():za;else if(w?z=/rv\:([^\);]+)(\)|;)/:v?z=/MSIE\s+([^\);]+)(\)|;)/:ua&&(z=/WebKit\/(\S+)/),z)var Aa=z.exec(s()),ya=Aa?Aa[1]:"";if(v){var Ba=xa();if(Ba>parseFloat(ya)){y=String(Ba);break a}}y=ya}var Ca={};function Da(a){Ca[a]||(Ca[a]=0<=ca(y,a))}var Ea=n.document,C=!Ea||!v?f:xa()||("CSS1Compat"==Ea.compatMode?parseInt(y,10):5);!w&&!v||v&&v&&9<=C||w&&Da("1.9.1");v&&Da("9");function Fa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Ga(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!(v&&9<=C)){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,h=b.parentNode;return e==h?Ha(a,b):!c&&Fa(e,b)?-1*Ia(a,b):!d&&Fa(h,a)?Ia(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:h.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(g);d=d.createRange();d.selectNode(b);d.collapse(g);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Ia(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ha(d,a)}function Ha(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var Ja={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ka={IMG:" ",BR:"\n"}; -function La(a,b,c){if(!(a.nodeName in Ja))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ka)b.push(Ka[a.nodeName]);else for(a=a.firstChild;a;)La(a,b,c),a=a.nextSibling};var Ma,Na,Oa,Pa,Qa,Ra,Sa;Sa=Ra=Qa=Pa=Oa=Na=Ma=l;var D=s();D&&(-1!=D.indexOf("Firefox")?Ma=g:-1!=D.indexOf("Camino")?Na=g:-1!=D.indexOf("iPhone")||-1!=D.indexOf("iPod")?Oa=g:-1!=D.indexOf("iPad")?Pa=g:-1!=D.indexOf("Android")?Qa=g:-1!=D.indexOf("Chrome")?Ra=g:-1!=D.indexOf("Safari")&&(Sa=g));var Ta=Ma,Ua=Na,Va=Oa,Wa=Pa,E=Qa,Xa=Ra,Ya=Sa;var F=v&&!(v&&9<=C),Za=v&&!(v&&8<=C);function $a(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.H=e;this.parentNode=b}function ab(a,b,c){var d=Za&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $a(b,a,b.nodeName,d,c)};function G(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==f||b==k?a.innerText:b,b=b==f||b==k?"":b);if("string"!=typeof b)if(F&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),F&&"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} -function I(a,b,c){if(b===k)return g;try{if(!a.getAttribute)return l}catch(d){return l}Za&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function bb(a,b,c,d,e){return(F?cb:db).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new J)} -function cb(a,b,c,d,e){if(l||8==a.h||c&&a.h===k){var h=b.all;if(!h)return e;a=eb(a);if("*"!=a&&(h=b.getElementsByTagName(a),!h))return e;if(c){for(var m=[],t=0;b=h[t++];)I(b,c,d)&&m.push(b);h=m}for(t=0;b=h[t++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}fb(a,b,c,d,e);return e} -function db(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):l?fb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){I(a,c,d)&&e.add(a)}));return e} -function gb(a,b,c,d,e){var h;if((l||8==a.h||c&&a.h===k)&&(h=b.childNodes)){var m=eb(a);if("*"!=m&&(h=fa(h,function(a){return a.tagName&&a.tagName.toLowerCase()==m}),!h))return e;c&&(h=fa(h,function(a){return I(a,c,d)}));q(h,function(a){("*"!=m||"!"!=a.tagName&&!("*"==m&&1!=a.nodeType))&&e.add(a)});return e}return hb(a,b,c,d,e)}function hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b);return e} -function fb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b),fb(a,b,c,d,e)}function eb(a){if(l){if(8==a.h)return"!";if(a.h===k)return"*"}return a.getName()};function J(){this.e=this.d=k;this.i=0}function ib(a){this.n=a;this.next=this.l=k}J.prototype.unshift=function(a){a=new ib(a);a.next=this.d;this.e?this.d.l=a:this.d=this.e=a;this.d=a;this.i++};J.prototype.add=function(a){a=new ib(a);a.l=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function jb(a){return(a=a.d)?a.n:k}function kb(a){return(a=jb(a))?G(a):""}function K(a,b){this.F=a;this.m=(this.o=b)?a.e:a.d;this.t=k} -K.prototype.next=function(){var a=this.m;if(a==k)return k;var b=this.t=a;this.m=this.o?a.l:a.next;return b.n};function L(a,b){var c=a.evaluate(b);return c instanceof J?+kb(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof J?kb(c):""+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?!!c.i:!!c};function O(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var h;if(b instanceof J&&c instanceof J){e=new K(b,l);for(d=e.next();d;d=e.next()){b=new K(c,l);for(h=b.next();h;h=b.next())if(a(G(d),G(h)))return g}return l}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=new K(e,l);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return g}return l}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function lb(a,b,c,d){this.u=a;this.J=b;this.r=c;this.s=d}lb.prototype.toString=function(){return this.u};var mb={};function P(a,b,c,d){if(a in mb)throw Error("Binary operator already created: "+a);a=new lb(a,b,c,d);mb[a.toString()]=a}P("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});P("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});P("*",6,1,function(a,b,c){return L(a,c)*L(b,c)}); -P("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});P("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});P("<",4,2,function(a,b,c){return O(function(a,b){return a<b},a,b,c)});P(">",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,g)}); -P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,g)});P("and",2,2,function(a,b,c){return N(a,c)&&N(b,c)});P("or",1,2,function(a,b,c){return N(a,c)||N(b,c)});function nb(a,b,c,d,e,h,m,t,H){this.k=a;this.r=b;this.D=c;this.C=d;this.B=e;this.s=h;this.A=m;this.z=t!==f?t:m;this.G=!!H}nb.prototype.toString=function(){return this.k};var ob={};function Q(a,b,c,d,e,h,m,t){if(a in ob)throw Error("Function already created: "+a+".");ob[a]=new nb(a,b,c,d,l,e,h,m,t)}Q("boolean",2,l,l,function(a,b){return N(b,a)},1);Q("ceiling",1,l,l,function(a,b){return Math.ceil(L(b,a))},1); -Q("concat",3,l,l,function(a,b){var c=ia(arguments,1);return ga(c,function(b,c){return b+M(c,a)})},2,k);Q("contains",2,l,l,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);Q("count",1,l,l,function(a,b){return b.evaluate(a).i},1,1,g);Q("false",2,l,l,aa(l),0);Q("floor",1,l,l,function(a,b){return Math.floor(L(b,a))},1); -Q("id",4,l,l,function(a,b){function c(a){if(F){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 k}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),h=[];q(d,function(a){(a=c(a))&&!(0<=ea(h,a))&&h.push(a)});h.sort(Ga);var m=new J;q(h,function(a){m.add(a)});return m},1);Q("lang",2,l,l,aa(l),1); -Q("last",1,g,l,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);Q("local-name",3,l,g,function(a,b){var c=b?jb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,g);Q("name",3,l,g,function(a,b){var c=b?jb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,g);Q("namespace-uri",3,g,l,aa(""),0,1,g);Q("normalize-space",3,l,g,function(a,b){return(b?M(b,a):G(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -Q("not",2,l,l,function(a,b){return!N(b,a)},1);Q("number",1,l,g,function(a,b){return b?L(b,a):+G(a.f)},0,1);Q("position",1,g,l,function(a){return a.I},0);Q("round",1,l,l,function(a,b){return Math.round(L(b,a))},1);Q("starts-with",2,l,l,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,l,g,function(a,b){return b?M(b,a):G(a.f)},0,1);Q("string-length",1,l,g,function(a,b){return(b?M(b,a):G(a.f)).length},0,1); -Q("substring",3,l,l,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,l,l,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -Q("substring-before",3,l,l,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,l,l,function(a,b){var c;c=b.evaluate(a);c=new K(c,l);for(var d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,g);Q("translate",3,l,l,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(d,a);a=[];for(d=0;d<c.length;d++){var h=c.charAt(d);h in a||(a[h]=e.charAt(d))}c="";for(d=0;d<b.length;d++)h=b.charAt(d),c+=h in a?a[h]:h;return c},3);Q("true",2,l,l,aa(g),0);function pb(a,b,c,d){this.k=a;this.w=b;this.o=c;this.M=d}pb.prototype.toString=function(){return this.k};var qb={};function R(a,b,c,d){if(a in qb)throw Error("Axis already created: "+a);qb[a]=new pb(a,b,c,!!d)}R("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},g);R("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},g); -R("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&F)return c.add(new $a(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(l&&a.h===k||"*"==d)for(var d=b.sourceIndex,h=0,m;m=e[h];h++)F?m.nodeValue&&c.add(ab(b,m,d)):c.add(m);else(m=e.getNamedItem(d))&&(F?m.nodeValue&&c.add(ab(b,m,b.sourceIndex)):c.add(m));return c},l);R("child",function(a,b,c,d,e){return(F?gb:hb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new J)},l,g);R("descendant",bb,l,g); -R("descendant-or-self",function(a,b,c,d){var e=new J;I(b,c,d)&&a.matches(b)&&e.add(b);return bb(a,b,c,d,e)},l,g);R("following",function(a,b,c,d){var e=new J;do for(var h=b;h=h.nextSibling;)I(h,c,d)&&a.matches(h)&&e.add(h),e=bb(a,h,c,d,e);while(b=b.parentNode);return e},l,g);R("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},l);R("namespace",function(){return new J},l); -R("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},l);R("preceding",function(a,b,c,d){var e=new J,h=[];do h.unshift(b);while(b=b.parentNode);for(var m=1,t=h.length;m<t;m++){var H=[];for(b=h[m];b=b.previousSibling;)H.unshift(b);for(var T=0,ma=H.length;T<ma;T++)b=H[T],I(b,c,d)&&a.matches(b)&&e.add(b),e=bb(a,b,c,d,e)}return e},g,g); -R("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},g);R("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},l);function S(a){return(a=a.exec(s()))?a[1]:""}var rb=function(){if(Ta)return S(/Firefox\/([0-9.]+)/);if(v||u)return y;if(Xa)return S(/Chrome\/([0-9.]+)/);if(Ya)return S(/Version\/([0-9.]+)/);if(Va||Wa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(s());if(a)return a[1]+"."+a[2]}else{if(E)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(Ua)return S(/Camino\/([0-9.]+)/)}return""}();var sb,tb;function ub(a){vb?sb(a):v?ca(C,a):Da(a)}function wb(a){vb?tb(a):E?ca(xb,a):ca(rb,a)}var vb=function(){if(!w)return l;var a=n.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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,h=c.version;sb=function(a){d.q(e,""+a)};tb=function(a){d.q(h,""+a)};return g}(),yb; -if(E){var zb=/Android\s+([0-9\.]+)/.exec(s());yb=zb?zb[1]:"0"}else yb="0";var xb=yb,Ab=v&&!(v&&8<=C),Bb=v&&!(v&&9<=C);E&&wb(2.3);!u&&(!ua||ub("533"));function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Cb(a){return U(a,"OPTION")?g:U(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):l}function Db(a,b){var c;if(c=Ab)if(c="value"==b)if(c=U(a,"OPTION"))c=Eb(a,"value")===k;c?(c=[],La(a,c,l),c=c.join("")):c=a[b];return c}var Fb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Gb(a){var b=[];q(a.split(Fb),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return u?b.replace(/\w+:;/g,""):b}function Eb(a,b){b=b.toLowerCase();if("style"==b)return Gb(a.style.cssText);if(Ab&&"value"==b&&U(a,"INPUT"))return a.value;if(Bb&&a[b]===g)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:k};ua||u||vb&&wb(3.6);v&&ub(10);E&&wb(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V){d=Hb(a);Ib(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],h=0;for(d in a)c[h++]=d;d=c;c=[];h=0;for(e in a)c[h++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.j=0;V.prototype.v=0;function Hb(a){Ib(a);return a.c.concat()} -function Ib(a){if(a.j!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.j!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.j++,this.c.push(a),this.v++);this.g[a]=b};var Jb={};function W(a,b,c){ba(a)&&(a=w?a.a:u?a.opera:a.b);a=new Kb(a,b,c);if(b&&(!(b in Jb)||c))Jb[b]={key:a,shift:l},c&&(Jb[c]={key:a,shift:g});return a}function Kb(a,b,c){this.code=a;this.p=b||k;this.K=c||this.p}W(8);W(9);W(13);var Lb=W(16),Mb=W(17),Nb=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","("); -W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Ob=W(ra?{a:91,b:91,opera:219}:qa?{a:224,b:91,opera:17}:{a:0,b:91,opera:k}); -W(ra?{a:92,b:92,opera:220}:qa?{a:224,b:93,opera:17}:{a:0,b:92,opera:k});W(ra?{a:93,b:93,opera:0}:qa?{a:0,b:0,opera:16}:{a:93,b:k,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:x?56:42},"*");W({a:107,b:107,opera:x?61:43},"+"); -W({a:109,b:109,opera:x?109:45},"-");W({a:110,b:110,opera:x?190:78},".");W({a:111,b:111,opera:x?191:47},"/");W(x&&u?k:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Lb);X.set(2,Mb);X.set(4,Nb);X.set(8,Ob); -(function(a){var b=new V;q(Hb(a),function(c){b.set(a.get(c).code,c)});return b})(X);w&&ub(12);var Pb={"class":"className",readonly:"readOnly"},Qb="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" ");function Rb(a,b){var c=k,d=b.toLowerCase();if("style"==d){if((c=a.style)&&!p(c))c=c.cssText;return c}if(("selected"==d||"checked"==d)&&Cb(a)){if(!Cb(a))throw new ja(15,"Element is not selectable");var d="selected",e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)d="checked";return Db(a,d)?"true":k}c=U(a,"A");if(U(a,"IMG")&&"src"==d||c&&"href"==d)return(c=Eb(a,d))&&(c=Db(a,d)),c;c=Pb[b]||b;if(0<=ea(Qb,d))return(c=Eb(a,b)!==k||Db(a,c))?"true":k;try{e=Db(a,c)}catch(h){}c=e==k||ba(e)?Eb(a, -b):e;return c!=k?c.toString():k}var Y=["_"],Z=n;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Rb!==f?Z[$]=Rb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){function f(a){return function(){return a}}var k=this;function l(a){return"string"==typeof a}function aa(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};function m(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var q=d[h]||"",E=e[h]||"",R=RegExp("(\\d*)(\\D*)","g"),la=RegExp("(\\d*)(\\D*)","g");do{var w=R.exec(q)||["","",""],x=la.exec(E)||["","",""];if(0==w[0].length&&0==x[0].length)break;c=((0==w[1].length?0:parseInt(w[1],10))<(0==x[1].length?0:parseInt(x[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==x[1].length? +0:parseInt(x[1],10))?1:0)||((0==w[2].length)<(0==x[2].length)?-1:(0==w[2].length)>(0==x[2].length)?1:0)||(w[2]<x[2]?-1:w[2]>x[2]?1:0)}while(0==c)}return c};var ba=Array.prototype;function ca(a,b){if(l(a))return l(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 n(a,b){for(var c=a.length,d=l(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,g=l(a)?a.split(""):a,h=0;h<c;h++)if(h in g){var q=g[h];b.call(void 0,q,h,a)&&(d[e++]=q)}return d} +function ea(a,b){if(a.reduce)return a.reduce(b,"");var c="";n(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function fa(a,b){var c;a:{c=a.length;for(var d=l(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:l(a)?a.charAt(c):a[c]}function ga(a,b,c){return 2>=arguments.length?ba.slice.call(a,b):ba.slice.call(a,b,c)};function p(a,b){this.code=a;this.state=ha[a]||ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;p.M=a.prototype;p.prototype=new b})(); +var ia="unknown error",ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ha[13]=ia;ha[9]="unknown command";p.prototype.toString=function(){return this.name+": "+this.message};var r,ja,ka,ma,na,oa;function s(){return k.navigator?k.navigator.userAgent:null}ma=ka=ja=r=!1;var pa;if(pa=s()){var qa=k.navigator;r=0==pa.indexOf("Opera");ja=!r&&-1!=pa.indexOf("MSIE");ka=!r&&-1!=pa.indexOf("WebKit");ma=!r&&!ka&&"Gecko"==qa.product}var t=r,u=ja,v=ma,ra=ka,sa,ta=k.navigator;sa=ta&&ta.platform||"";na=-1!=sa.indexOf("Mac");oa=-1!=sa.indexOf("Win");var y=-1!=sa.indexOf("Linux");function ua(){var a=k.document;return a?a.documentMode:void 0}var z; +a:{var va="",A;if(t&&k.opera)var wa=k.opera.version,va="function"==typeof wa?wa():wa;else if(v?A=/rv\:([^\);]+)(\)|;)/:u?A=/MSIE\s+([^\);]+)(\)|;)/:ra&&(A=/WebKit\/(\S+)/),A)var xa=A.exec(s()),va=xa?xa[1]:"";if(u){var ya=ua();if(ya>parseFloat(va)){z=String(ya);break a}}z=va}var za={};function Aa(a){za[a]||(za[a]=0<=m(z,a))}var Ba=k.document,B=Ba&&u?ua()||("CSS1Compat"==Ba.compatMode?parseInt(z,10):5):void 0;!v&&!u||u&&u&&9<=B||v&&Aa("1.9.1");u&&Aa("9");function Ca(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Da(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(u&&!(u&&9<=B)){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,g=b.parentNode;return e==g?Ea(a,b):!c&&Ca(e,b)?-1*Fa(a,b):!d&&Ca(g,a)?Fa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| +a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Fa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ea(d,a)}function Ea(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var Ga={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ha={IMG:" ",BR:"\n"}; +function Ia(a,b,c){if(!(a.nodeName in Ga))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ha)b.push(Ha[a.nodeName]);else for(a=a.firstChild;a;)Ia(a,b,c),a=a.nextSibling};var Ja,Ka,La,Ma,Na,Oa,Pa;Pa=Oa=Na=Ma=La=Ka=Ja=!1;var C=s();C&&(-1!=C.indexOf("Firefox")?Ja=!0:-1!=C.indexOf("Camino")?Ka=!0:-1!=C.indexOf("iPhone")||-1!=C.indexOf("iPod")?La=!0:-1!=C.indexOf("iPad")?Ma=!0:-1!=C.indexOf("Android")?Na=!0:-1!=C.indexOf("Chrome")?Oa=!0:-1!=C.indexOf("Safari")&&(Pa=!0));var Qa=Ja,Ra=Ka,Sa=La,Ta=Ma,D=Na,Ua=Oa,Va=Pa;var F=u&&!(u&&9<=B),Wa=u&&!(u&&8<=B);function Xa(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.I=e;this.parentNode=b}function Ya(a,b,c){var d=Wa&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Xa(b,a,b.nodeName,d,c)};function G(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(F&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),F&&"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} +function H(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Wa&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Za(a,b,c,d,e){return(F?$a:ab).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new I)} +function $a(a,b,c,d,e){if(8==a.h||c&&null===a.h){var g=b.all;if(!g)return e;a=bb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var h=[],q=0;b=g[q++];)H(b,c,d)&&h.push(b);g=h}for(q=0;b=g[q++];)"*"==a&&"!"==b.tagName||e.add(b);return e}cb(a,b,c,d,e);return e} +function ab(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!u?(b=b.getElementsByName(d),n(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),n(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),n(b,function(a){H(a,c,d)&&e.add(a)}));return e} +function db(a,b,c,d,e){var g;if((8==a.h||c&&null===a.h)&&(g=b.childNodes)){var h=bb(a);if("*"!=h&&(g=da(g,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!g))return e;c&&(g=da(g,function(a){return H(a,c,d)}));n(g,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return eb(a,b,c,d,e)}function eb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b);return e} +function cb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b),cb(a,b,c,d,e)}function bb(a){return a.getName()};function I(){this.e=this.d=null;this.i=0}function fb(a){this.n=a;this.next=this.l=null}I.prototype.unshift=function(a){a=new fb(a);a.next=this.d;this.e?this.d.l=a:this.d=this.e=a;this.d=a;this.i++};I.prototype.add=function(a){a=new fb(a);a.l=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function gb(a){return(a=a.d)?a.n:null}function hb(a){return(a=gb(a))?G(a):""}function J(a,b){this.G=a;this.m=(this.o=b)?a.e:a.d;this.t=null} +J.prototype.next=function(){var a=this.m;if(null==a)return null;var b=this.t=a;this.m=this.o?a.l:a.next;return b.n};function K(a,b){var c=a.evaluate(b);return c instanceof I?+hb(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof I?hb(c):""+c}function M(a,b){var c=a.evaluate(b);return c instanceof I?!!c.i:!!c};function N(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof I&&c instanceof I){e=new J(b,!1);for(d=e.next();d;d=e.next())for(b=new J(c,!1),g=b.next();g;g=b.next())if(a(G(d),G(g)))return!0;return!1}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=new J(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function ib(a,b,c,d){this.u=a;this.K=b;this.r=c;this.s=d}ib.prototype.toString=function(){return this.u};var jb={};function O(a,b,c,d){if(jb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new ib(a,b,c,d);jb[a.toString()]=a}O("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});O("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)}); +O("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});O("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});O("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});O("<",4,2,function(a,b,c){return N(function(a,b){return a<b},a,b,c)});O(">",4,2,function(a,b,c){return N(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return N(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return N(function(a,b){return a>=b},a,b,c)});O("=",3,2,function(a,b,c){return N(function(a,b){return a==b},a,b,c,!0)}); +O("!=",3,2,function(a,b,c){return N(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});O("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function kb(a,b,c,d,e,g,h,q,E){this.k=a;this.r=b;this.F=c;this.D=d;this.C=e;this.s=g;this.B=h;this.A=void 0!==q?q:h;this.H=!!E}kb.prototype.toString=function(){return this.k};var lb={};function P(a,b,c,d,e,g,h,q){if(lb.hasOwnProperty(a))throw Error("Function already created: "+a+".");lb[a]=new kb(a,b,c,d,!1,e,g,h,q)}P("boolean",2,!1,!1,function(a,b){return M(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1); +P("concat",3,!1,!1,function(a,b){var c=ga(arguments,1);return ea(c,function(b,c){return b+L(c,a)})},2,null);P("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);P("count",1,!1,!1,function(a,b){return b.evaluate(a).i},1,1,!0);P("false",2,!1,!1,f(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(F){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return fa(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),g=[];n(d,function(a){a=c(a);!a||0<=ca(g,a)||g.push(a)});g.sort(Da);var h=new I;n(g,function(a){h.add(a)});return h},1);P("lang",2,!1,!1,f(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);P("local-name",3,!1,!0,function(a,b){var c=b?gb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?gb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,f(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):G(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!M(b,a)},1);P("number",1,!1,!0,function(a,b){return b?K(b,a):+G(a.f)},0,1);P("position",1,!0,!1,function(a){return a.J},0);P("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?L(b,a):G(a.f)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?L(b,a):G(a.f)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new J(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);P("true",2,!1,!1,f(!0),0);function mb(a,b,c,d){this.k=a;this.w=b;this.o=c;this.N=d}mb.prototype.toString=function(){return this.k};var nb={};function Q(a,b,c,d){if(nb.hasOwnProperty(a))throw Error("Axis already created: "+a);nb[a]=new mb(a,b,c,!!d)}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&F)return c.add(new Xa(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,g=0,h;h=e[g];g++)F?h.nodeValue&&c.add(Ya(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(F?h.nodeValue&&c.add(Ya(b,h,b.sourceIndex)):c.add(h));return c},!1);Q("child",function(a,b,c,d,e){return(F?db:eb).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new I)},!1,!0);Q("descendant",Za,!1,!0); +Q("descendant-or-self",function(a,b,c,d){var e=new I;H(b,c,d)&&a.matches(b)&&e.add(b);return Za(a,b,c,d,e)},!1,!0);Q("following",function(a,b,c,d){var e=new I;do for(var g=b;g=g.nextSibling;)H(g,c,d)&&a.matches(g)&&e.add(g),e=Za(a,g,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new I},!1); +Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);Q("preceding",function(a,b,c,d){var e=new I,g=[];do g.unshift(b);while(b=b.parentNode);for(var h=1,q=g.length;h<q;h++){var E=[];for(b=g[h];b=b.previousSibling;)E.unshift(b);for(var R=0,la=E.length;R<la;R++)b=E[R],H(b,c,d)&&a.matches(b)&&e.add(b),e=Za(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},!1);function S(a){return(a=a.exec(s()))?a[1]:""}var ob=function(){if(Qa)return S(/Firefox\/([0-9.]+)/);if(u||t)return z;if(Ua)return S(/Chrome\/([0-9.]+)/);if(Va)return S(/Version\/([0-9.]+)/);if(Sa||Ta){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(s());if(a)return a[1]+"."+a[2]}else{if(D)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(Ra)return S(/Camino\/([0-9.]+)/)}return""}();var pb,qb;function T(a){rb?qb(a):D?m(sb,a):m(ob,a)}var rb=function(){if(!v)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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,g=c.version;pb=function(a){d.q(e,""+a)};qb=function(a){d.q(g,""+a)};return!0}(),tb; +if(D){var ub=/Android\s+([0-9\.]+)/.exec(s());tb=ub?ub[1]:"0"}else tb="0";var sb=tb,vb=u&&!(u&&8<=B),wb=u&&!(u&&9<=B);D&&T(2.3);D&&T(4);Va&&T(6);function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function xb(a){return U(a,"OPTION")?!0:U(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}function yb(a,b){var c;if(c=vb)if(c="value"==b)if(c=U(a,"OPTION"))c=null===zb(a,"value");c?(c=[],Ia(a,c,!1),c=c.join("")):c=a[b];return c}var Ab=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Bb(a){var b=[];n(a.split(Ab),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return t?b.replace(/\w+:;/g,""):b}function zb(a,b){b=b.toLowerCase();if("style"==b)return Bb(a.style.cssText);if(vb&&"value"==b&&U(a,"INPUT"))return a.value;if(wb&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null};ra||t||rb&&T(3.6);u&&(rb?pb(10):u?m(B,10):Aa(10));D&&T(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V)for(d=Cb(a),Db(a),e=[],c=0;c<a.c.length;c++)e.push(a.g[a.c[c]]);else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.j=0;V.prototype.v=0;function Cb(a){Db(a);return a.c.concat()} +function Db(a){if(a.j!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.j!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; +V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.j++,this.c.push(a),this.v++);this.g[a]=b};var Eb={};function W(a,b,c){aa(a)&&(a=v?a.a:t?a.opera:a.b);a=new Fb(a,b,c);!b||b in Eb&&!c||(Eb[b]={key:a,shift:!1},c&&(Eb[c]={key:a,shift:!0}));return a}function Fb(a,b,c){this.code=a;this.p=b||null;this.L=c||this.p}W(8);W(9);W(13);var Gb=W(16),Hb=W(17),Ib=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","("); +W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Jb=W(oa?{a:91,b:91,opera:219}:na?{a:224,b:91,opera:17}:{a:0,b:91,opera:null}); +W(oa?{a:92,b:92,opera:220}:na?{a:224,b:93,opera:17}:{a:0,b:92,opera:null});W(oa?{a:93,b:93,opera:0}:na?{a:0,b:0,opera:16}:{a:93,b:null,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:y?56:42},"*"); +W({a:107,b:107,opera:y?61:43},"+");W({a:109,b:109,opera:y?109:45},"-");W({a:110,b:110,opera:y?190:78},".");W({a:111,b:111,opera:y?191:47},"/");W(y&&t?null:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Gb); +X.set(2,Hb);X.set(4,Ib);X.set(8,Jb);(function(a){var b=new V;n(Cb(a),function(c){b.set(a.get(c).code,c)});return b})(X);v&&(rb?pb(12):u?m(B,12):Aa(12));var Kb={"class":"className",readonly:"readOnly"},Lb="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" ");function Mb(a,b){var c=null,d=b.toLowerCase();if("style"==d)return(c=a.style)&&!l(c)&&(c=c.cssText),c;if(("selected"==d||"checked"==d)&&xb(a)){if(!xb(a))throw new p(15,"Element is not selectable");var d="selected",e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)d="checked";return yb(a,d)?"true":null}c=U(a,"A");if(U(a,"IMG")&&"src"==d||c&&"href"==d)return(c=zb(a,d))&&(c=yb(a,d)),c;c=Kb[b]||b;if(0<=ca(Lb,d))return(c=null!==zb(a,b)||yb(a,c))?"true":null;try{e=yb(a,c)}catch(g){}c=null==e|| +aa(e)?zb(a,b):e;return null!=c?c.toString():null}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Mb?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Mb;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_attribute_value.js b/src/ghostdriver/third_party/webdriver-atoms/get_attribute_value.js index 3056034f2..131b38482 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_attribute_value.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_attribute_value.js @@ -1,46 +1,46 @@ -function(){return function(){var f=void 0,h=!0,k=null,l=!1;function aa(a){return function(){return a}}var n=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};var fa=window;function ga(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),m=0;0==c&&m<g;m++){var r=d[m]||"",z=e[m]||"",U=RegExp("(\\d*)(\\D*)","g"),ra=RegExp("(\\d*)(\\D*)","g");do{var B=U.exec(r)||["","",""],C=ra.exec(z)||["","",""];if(0==B[0].length&&0==C[0].length)break;c=((0==B[1].length?0:parseInt(B[1],10))<(0==C[1].length?0:parseInt(C[1],10))?-1:(0==B[1].length?0:parseInt(B[1],10))>(0==C[1].length? -0:parseInt(C[1],10))?1:0)||((0==B[2].length)<(0==C[2].length)?-1:(0==B[2].length)>(0==C[2].length)?1:0)||(B[2]<C[2]?-1:B[2]>C[2]?1:0)}while(0==c)}return c};var ha=Array.prototype;function ia(a,b){if(p(a))return!p(b)||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function q(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(f,d[e],e,a)}function ja(a,b){for(var c=a.length,d=[],e=0,g=p(a)?a.split(""):a,m=0;m<c;m++)if(m in g){var r=g[m];b.call(f,r,m,a)&&(d[e++]=r)}return d} -function ka(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(f,e[g],g,a));return d}function la(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(f,c,d,e,a)});return c}function ma(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(f,d[e],e,a)){c=e;break a}c=-1}return 0>c?k:p(a)?a.charAt(c):a[c]}function na(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};function s(a,b){this.code=a;this.state=oa[a]||pa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.N=a.prototype;s.prototype=new b})(); -var pa="unknown error",oa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};oa[13]=pa;oa[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};var t,qa,sa,ta,ua,va;function u(){return n.navigator?n.navigator.userAgent:k}ta=sa=qa=t=l;var wa;if(wa=u()){var xa=n.navigator;t=0==wa.indexOf("Opera");qa=!t&&-1!=wa.indexOf("MSIE");sa=!t&&-1!=wa.indexOf("WebKit");ta=!t&&!sa&&"Gecko"==xa.product}var v=t,w=qa,x=ta,ya=sa,za,Aa=n.navigator;za=Aa&&Aa.platform||"";ua=-1!=za.indexOf("Mac");va=-1!=za.indexOf("Win");var y=-1!=za.indexOf("Linux");function Ba(){var a=n.document;return a?a.documentMode:f}var A; -a:{var Ca="",D;if(v&&n.opera)var Da=n.opera.version,Ca="function"==typeof Da?Da():Da;else if(x?D=/rv\:([^\);]+)(\)|;)/:w?D=/MSIE\s+([^\);]+)(\)|;)/:ya&&(D=/WebKit\/(\S+)/),D)var Ea=D.exec(u()),Ca=Ea?Ea[1]:"";if(w){var Fa=Ba();if(Fa>parseFloat(Ca)){A=String(Fa);break a}}A=Ca}var Ga={};function Ha(a){return Ga[a]||(Ga[a]=0<=ga(A,a))}var Ia=n.document,E=!Ia||!w?f:Ba()||("CSS1Compat"==Ia.compatMode?parseInt(A,10):5);!x&&!w||w&&w&&9<=E||x&&Ha("1.9.1");w&&Ha("9");function Ja(a,b){var c={},d;for(d in a)b.call(f,a[d],d,a)&&(c[d]=a[d]);return c}function Ka(a,b){var c={},d;for(d in a)c[d]=b.call(f,a[d],d,a);return c}function La(a,b){for(var c in a)if(b.call(f,a[c],c,a))return c};function Ma(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Na(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=E)){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,g=b.parentNode;return e==g?Oa(a,b):!c&&Ma(e,b)?-1*Pa(a,b):!d&&Ma(g,a)?Pa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(h);d=d.createRange();d.selectNode(b);d.collapse(h);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Pa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Oa(d,a)}function Oa(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var Qa={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ra={IMG:" ",BR:"\n"}; -function Sa(a,b,c){if(!(a.nodeName in Qa))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ra)b.push(Ra[a.nodeName]);else for(a=a.firstChild;a;)Sa(a,b,c),a=a.nextSibling};var Ta,Ua,Va,Wa,Xa,Ya,Za;Za=Ya=Xa=Wa=Va=Ua=Ta=l;var F=u();F&&(-1!=F.indexOf("Firefox")?Ta=h:-1!=F.indexOf("Camino")?Ua=h:-1!=F.indexOf("iPhone")||-1!=F.indexOf("iPod")?Va=h:-1!=F.indexOf("iPad")?Wa=h:-1!=F.indexOf("Android")?Xa=h:-1!=F.indexOf("Chrome")?Ya=h:-1!=F.indexOf("Safari")&&(Za=h));var $a=Ta,ab=Ua,bb=Va,cb=Wa,G=Xa,db=Ya,eb=Za;var H=w&&!(w&&9<=E),fb=w&&!(w&&8<=E);function gb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.J=e;this.parentNode=b}function hb(a,b,c){var d=fb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new gb(b,a,b.nodeName,d,c)};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==f||b==k?a.innerText:b,b=b==f||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),H&&"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} -function J(a,b,c){if(b===k)return h;try{if(!a.getAttribute)return l}catch(d){return l}fb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ib(a,b,c,d,e){return(H?jb:kb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new K)} -function jb(a,b,c,d,e){if(l||8==a.h||c&&a.h===k){var g=b.all;if(!g)return e;a=lb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var m=[],r=0;b=g[r++];)J(b,c,d)&&m.push(b);g=m}for(r=0;b=g[r++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}mb(a,b,c,d,e);return e} -function kb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):l?mb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){J(a,c,d)&&e.add(a)}));return e} -function nb(a,b,c,d,e){var g;if((l||8==a.h||c&&a.h===k)&&(g=b.childNodes)){var m=lb(a);if("*"!=m&&(g=ja(g,function(a){return a.tagName&&a.tagName.toLowerCase()==m}),!g))return e;c&&(g=ja(g,function(a){return J(a,c,d)}));q(g,function(a){("*"!=m||"!"!=a.tagName&&!("*"==m&&1!=a.nodeType))&&e.add(a)});return e}return ob(a,b,c,d,e)}function ob(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b);return e} -function mb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b),mb(a,b,c,d,e)}function lb(a){if(l){if(8==a.h)return"!";if(a.h===k)return"*"}return a.getName()};function K(){this.e=this.d=k;this.i=0}function pb(a){this.p=a;this.next=this.n=k}K.prototype.unshift=function(a){a=new pb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};K.prototype.add=function(a){a=new pb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function qb(a){return(a=a.d)?a.p:k}function rb(a){return(a=qb(a))?I(a):""}function L(a,b){this.H=a;this.o=(this.q=b)?a.e:a.d;this.v=k} -L.prototype.next=function(){var a=this.o;if(a==k)return k;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function M(a,b){var c=a.evaluate(b);return c instanceof K?+rb(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof K?rb(c):""+c}function O(a,b){var c=a.evaluate(b);return c instanceof K?!!c.i:!!c};function P(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof K&&c instanceof K){e=new L(b,l);for(d=e.next();d;d=e.next()){b=new L(c,l);for(g=b.next();g;g=b.next())if(a(I(d),I(g)))return h}return l}if(b instanceof K||c instanceof K){b instanceof K?e=b:(e=c,c=b);e=new L(e,l);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+I(d);break;case "boolean":d=!!I(d);break;case "string":d=I(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return h}return l}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function sb(a,b,c,d){this.w=a;this.L=b;this.t=c;this.u=d}sb.prototype.toString=function(){return this.w};var tb={};function Q(a,b,c,d){if(a in tb)throw Error("Binary operator already created: "+a);a=new sb(a,b,c,d);tb[a.toString()]=a}Q("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});Q("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});Q("*",6,1,function(a,b,c){return M(a,c)*M(b,c)}); -Q("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});Q("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});Q("<",4,2,function(a,b,c){return P(function(a,b){return a<b},a,b,c)});Q(">",4,2,function(a,b,c){return P(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return P(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return P(function(a,b){return a>=b},a,b,c)});Q("=",3,2,function(a,b,c){return P(function(a,b){return a==b},a,b,c,h)}); -Q("!=",3,2,function(a,b,c){return P(function(a,b){return a!=b},a,b,c,h)});Q("and",2,2,function(a,b,c){return O(a,c)&&O(b,c)});Q("or",1,2,function(a,b,c){return O(a,c)||O(b,c)});function ub(a,b,c,d,e,g,m,r,z){this.l=a;this.t=b;this.G=c;this.F=d;this.D=e;this.u=g;this.C=m;this.B=r!==f?r:m;this.I=!!z}ub.prototype.toString=function(){return this.l};var vb={};function R(a,b,c,d,e,g,m,r){if(a in vb)throw Error("Function already created: "+a+".");vb[a]=new ub(a,b,c,d,l,e,g,m,r)}R("boolean",2,l,l,function(a,b){return O(b,a)},1);R("ceiling",1,l,l,function(a,b){return Math.ceil(M(b,a))},1); -R("concat",3,l,l,function(a,b){var c=na(arguments,1);return la(c,function(b,c){return b+N(c,a)})},2,k);R("contains",2,l,l,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);R("count",1,l,l,function(a,b){return b.evaluate(a).i},1,1,h);R("false",2,l,l,aa(l),0);R("floor",1,l,l,function(a,b){return Math.floor(M(b,a))},1); -R("id",4,l,l,function(a,b){function c(a){if(H){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ma(b,function(b){return a==b.id})}return k}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),g=[];q(d,function(a){(a=c(a))&&!(0<=ia(g,a))&&g.push(a)});g.sort(Na);var m=new K;q(g,function(a){m.add(a)});return m},1);R("lang",2,l,l,aa(l),1); -R("last",1,h,l,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);R("local-name",3,l,h,function(a,b){var c=b?qb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);R("name",3,l,h,function(a,b){var c=b?qb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);R("namespace-uri",3,h,l,aa(""),0,1,h);R("normalize-space",3,l,h,function(a,b){return(b?N(b,a):I(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,l,l,function(a,b){return!O(b,a)},1);R("number",1,l,h,function(a,b){return b?M(b,a):+I(a.f)},0,1);R("position",1,h,l,function(a){return a.K},0);R("round",1,l,l,function(a,b){return Math.round(M(b,a))},1);R("starts-with",2,l,l,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,l,h,function(a,b){return b?N(b,a):I(a.f)},0,1);R("string-length",1,l,h,function(a,b){return(b?N(b,a):I(a.f)).length},0,1); -R("substring",3,l,l,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,l,l,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,l,l,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,l,l,function(a,b){var c;c=b.evaluate(a);c=new L(c,l);for(var d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,h);R("translate",3,l,l,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);R("true",2,l,l,aa(h),0);function wb(a,b,c,d){this.l=a;this.A=b;this.q=c;this.O=d}wb.prototype.toString=function(){return this.l};var xb={};function S(a,b,c,d){if(a in xb)throw Error("Axis already created: "+a);xb[a]=new wb(a,b,c,!!d)}S("ancestor",function(a,b){for(var c=new K,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},h);S("ancestor-or-self",function(a,b){var c=new K,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},h); -S("attribute",function(a,b){var c=new K,d=a.getName();if("style"==d&&b.style&&H)return c.add(new gb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(l&&a.h===k||"*"==d)for(var d=b.sourceIndex,g=0,m;m=e[g];g++)H?m.nodeValue&&c.add(hb(b,m,d)):c.add(m);else(m=e.getNamedItem(d))&&(H?m.nodeValue&&c.add(hb(b,m,b.sourceIndex)):c.add(m));return c},l);S("child",function(a,b,c,d,e){return(H?nb:ob).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new K)},l,h);S("descendant",ib,l,h); -S("descendant-or-self",function(a,b,c,d){var e=new K;J(b,c,d)&&a.matches(b)&&e.add(b);return ib(a,b,c,d,e)},l,h);S("following",function(a,b,c,d){var e=new K;do for(var g=b;g=g.nextSibling;)J(g,c,d)&&a.matches(g)&&e.add(g),e=ib(a,g,c,d,e);while(b=b.parentNode);return e},l,h);S("following-sibling",function(a,b){for(var c=new K,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},l);S("namespace",function(){return new K},l); -S("parent",function(a,b){var c=new K;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},l);S("preceding",function(a,b,c,d){var e=new K,g=[];do g.unshift(b);while(b=b.parentNode);for(var m=1,r=g.length;m<r;m++){var z=[];for(b=g[m];b=b.previousSibling;)z.unshift(b);for(var U=0,ra=z.length;U<ra;U++)b=z[U],J(b,c,d)&&a.matches(b)&&e.add(b),e=ib(a,b,c,d,e)}return e},h,h); -S("preceding-sibling",function(a,b){for(var c=new K,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},h);S("self",function(a,b){var c=new K;a.matches(b)&&c.add(b);return c},l);function T(a){return(a=a.exec(u()))?a[1]:""}var yb=function(){if($a)return T(/Firefox\/([0-9.]+)/);if(w||v)return A;if(db)return T(/Chrome\/([0-9.]+)/);if(eb)return T(/Version\/([0-9.]+)/);if(bb||cb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(u());if(a)return a[1]+"."+a[2]}else{if(G)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(ab)return T(/Camino\/([0-9.]+)/)}return""}();var zb,Ab;function V(a){return Bb?zb(a):w?0<=ga(E,a):Ha(a)}function Cb(a){Bb?Ab(a):G?ga(Db,a):ga(yb,a)} -var Bb=function(){if(!x)return l;var a=n.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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,g=c.version;zb=function(a){return 0<=d.s(e,""+a)};Ab=function(a){d.s(g,""+a)};return h}(),Eb;if(G){var Fb=/Android\s+([0-9\.]+)/.exec(u());Eb=Fb?Fb[1]:"0"}else Eb="0"; -var Db=Eb,Gb=w&&!(w&&8<=E),Hb=w&&!(w&&9<=E);G&&Cb(2.3);!v&&(!ya||V("533"));function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ib(a){return W(a,"OPTION")?h:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):l}function Jb(a,b){var c;if(c=Gb)if(c="value"==b)if(c=W(a,"OPTION"))c=Kb(a,"value")===k;c?(c=[],Sa(a,c,l),c=c.join("")):c=a[b];return c}var Lb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Mb(a){var b=[];q(a.split(Lb),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return v?b.replace(/\w+:;/g,""):b}function Kb(a,b){b=b.toLowerCase();if("style"==b)return Mb(a.style.cssText);if(Gb&&"value"==b&&W(a,"INPUT"))return a.value;if(Hb&&a[b]===h)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:k};ya||v||Bb&&Cb(3.6);w&&V(10);G&&Cb(4);function X(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof X){d=Nb(a);Ob(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}X.prototype.k=0;X.prototype.z=0;function Nb(a){Ob(a);return a.c.concat()} -function Ob(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}X.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -X.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.z++);this.g[a]=b};var Pb={};function Y(a,b,c){da(a)&&(a=x?a.a:v?a.opera:a.b);a=new Qb(a,b,c);if(b&&(!(b in Pb)||c))Pb[b]={key:a,shift:l},c&&(Pb[c]={key:a,shift:h});return a}function Qb(a,b,c){this.code=a;this.r=b||k;this.M=c||this.r}Y(8);Y(9);Y(13);var Rb=Y(16),Sb=Y(17),Tb=Y(18);Y(19);Y(20);Y(27);Y(32," ");Y(33);Y(34);Y(35);Y(36);Y(37);Y(38);Y(39);Y(40);Y(44);Y(45);Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","("); -Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q");Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z");var Ub=Y(va?{a:91,b:91,opera:219}:ua?{a:224,b:91,opera:17}:{a:0,b:91,opera:k}); -Y(va?{a:92,b:92,opera:220}:ua?{a:224,b:93,opera:17}:{a:0,b:92,opera:k});Y(va?{a:93,b:93,opera:0}:ua?{a:0,b:0,opera:16}:{a:93,b:k,opera:0});Y({a:96,b:96,opera:48},"0");Y({a:97,b:97,opera:49},"1");Y({a:98,b:98,opera:50},"2");Y({a:99,b:99,opera:51},"3");Y({a:100,b:100,opera:52},"4");Y({a:101,b:101,opera:53},"5");Y({a:102,b:102,opera:54},"6");Y({a:103,b:103,opera:55},"7");Y({a:104,b:104,opera:56},"8");Y({a:105,b:105,opera:57},"9");Y({a:106,b:106,opera:y?56:42},"*");Y({a:107,b:107,opera:y?61:43},"+"); -Y({a:109,b:109,opera:y?109:45},"-");Y({a:110,b:110,opera:y?190:78},".");Y({a:111,b:111,opera:y?191:47},"/");Y(y&&v?k:144);Y(112);Y(113);Y(114);Y(115);Y(116);Y(117);Y(118);Y(119);Y(120);Y(121);Y(122);Y(123);Y({a:107,b:187,opera:61},"=","+");Y(108,",");Y({a:109,b:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");Y({a:59,b:186,opera:59},";",":");Y(222,"'",'"');var Z=new X;Z.set(1,Rb);Z.set(2,Sb);Z.set(4,Tb);Z.set(8,Ub); -(function(a){var b=new X;q(Nb(a),function(c){b.set(a.get(c).code,c)});return b})(Z);x&&V(12);var Vb={"class":"className",readonly:"readOnly"},Wb="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" "); -function Xb(a,b){var c=k,d=b.toLowerCase();if("style"==d){if((c=a.style)&&!p(c))c=c.cssText;return c}if(("selected"==d||"checked"==d)&&Ib(a)){if(!Ib(a))throw new s(15,"Element is not selectable");var d="selected",e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)d="checked";return Jb(a,d)?"true":k}c=W(a,"A");if(W(a,"IMG")&&"src"==d||c&&"href"==d)return(c=Kb(a,d))&&(c=Jb(a,d)),c;c=Vb[b]||b;if(0<=ia(Wb,d))return(c=Kb(a,b)!==k||Jb(a,c))?"true":k;try{e=Jb(a,c)}catch(g){}c=e==k||da(e)?Kb(a,b): -e;return c!=k?c.toString():k};function Yb(){this.j=f} -function Zb(a,b,c){switch(typeof b){case "string":$b(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Zb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),$b(g, -c),c.push(":"),Zb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var ac={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},bc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function $b(a,b){b.push('"',a.replace(bc,function(a){if(a in ac)return ac[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return ac[a]=e+b.toString(16)}),'"')};ya||v||x&&V(3.5)||w&&V(8);function cc(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ka(a,cc);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=dc(a);return b}if("document"in a)return b={},b.WINDOW=dc(a),b;if(ca(a))return ka(a,cc);a=Ja(a,function(a,b){return"number"==typeof b||p(b)});return Ka(a,cc);default:return k}} -function ec(a,b){return"array"==ba(a)?ka(a,function(a){return ec(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?fc(a.ELEMENT,b):"WINDOW"in a?fc(a.WINDOW,b):Ka(a,function(a){return ec(a,b)}):a}function gc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ea());b.m||(b.m=ea());return b}function dc(a){var b=gc(a.ownerDocument),c=La(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} -function fc(a,b){a=decodeURIComponent(a);var c=b||document,d=gc(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};function hc(a,b){var c=Xb,d=[a,b],e=window||fa,g;try{var c=p(c)?new e.Function(c):e==window?c:new e.Function("return ("+c+").apply(null,arguments);"),m=ec(d,e.document),r=c.apply(k,m);g={status:0,value:cc(r)}}catch(z){g={status:"code"in z?z.code:13,value:{message:z.message}}}c=[];Zb(new Yb,g,c);return c.join("")}var ic=["_"],$=n;!(ic[0]in $)&&$.execScript&&$.execScript("var "+ic[0]);for(var jc;ic.length&&(jc=ic.shift());)!ic.length&&hc!==f?$[jc]=hc:$=$[jc]?$[jc]:$[jc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){function f(a){return function(){return a}}var k=this; +function l(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function da(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var n=d[h]||"",D=e[h]||"",R=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var w=R.exec(n)||["","",""],x=na.exec(D)||["","",""];if(0==w[0].length&&0==x[0].length)break;c=((0==w[1].length?0:parseInt(w[1],10))<(0==x[1].length?0:parseInt(x[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==x[1].length? +0:parseInt(x[1],10))?1:0)||((0==w[2].length)<(0==x[2].length)?-1:(0==w[2].length)>(0==x[2].length)?1:0)||(w[2]<x[2]?-1:w[2]>x[2]?1:0)}while(0==c)}return c};var ea=Array.prototype;function fa(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 p(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 ga(a,b){for(var c=a.length,d=[],e=0,g=m(a)?a.split(""):a,h=0;h<c;h++)if(h in g){var n=g[h];b.call(void 0,n,h,a)&&(d[e++]=n)}return d} +function ha(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(void 0,e[g],g,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";p(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function ja(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?ea.slice.call(a,b):ea.slice.call(a,b,c)};function q(a,b){this.code=a;this.state=la[a]||ma;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;q.O=a.prototype;q.prototype=new b})(); +var ma="unknown error",la={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};la[13]=ma;la[9]="unknown command";q.prototype.toString=function(){return this.name+": "+this.message};var r,oa,pa,qa,ra,sa;function s(){return k.navigator?k.navigator.userAgent:null}qa=pa=oa=r=!1;var ta;if(ta=s()){var ua=k.navigator;r=0==ta.indexOf("Opera");oa=!r&&-1!=ta.indexOf("MSIE");pa=!r&&-1!=ta.indexOf("WebKit");qa=!r&&!pa&&"Gecko"==ua.product}var t=r,u=oa,v=qa,va=pa,wa,xa=k.navigator;wa=xa&&xa.platform||"";ra=-1!=wa.indexOf("Mac");sa=-1!=wa.indexOf("Win");var y=-1!=wa.indexOf("Linux");function ya(){var a=k.document;return a?a.documentMode:void 0}var z; +a:{var za="",A;if(t&&k.opera)var Aa=k.opera.version,za="function"==typeof Aa?Aa():Aa;else if(v?A=/rv\:([^\);]+)(\)|;)/:u?A=/MSIE\s+([^\);]+)(\)|;)/:va&&(A=/WebKit\/(\S+)/),A)var Ba=A.exec(s()),za=Ba?Ba[1]:"";if(u){var Ca=ya();if(Ca>parseFloat(za)){z=String(Ca);break a}}z=za}var Da={};function Ea(a){return Da[a]||(Da[a]=0<=da(z,a))}var Fa=k.document,B=Fa&&u?ya()||("CSS1Compat"==Fa.compatMode?parseInt(z,10):5):void 0;!v&&!u||u&&u&&9<=B||v&&Ea("1.9.1");u&&Ea("9");function Ga(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ha(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ia(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Ja(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Ka(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(u&&!(u&&9<=B)){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,g=b.parentNode;return e==g?La(a,b):!c&&Ja(e,b)?-1*Ma(a,b):!d&&Ja(g,a)?Ma(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| +a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Ma(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return La(d,a)}function La(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var Na={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Oa={IMG:" ",BR:"\n"}; +function Pa(a,b,c){if(!(a.nodeName in Na))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Oa)b.push(Oa[a.nodeName]);else for(a=a.firstChild;a;)Pa(a,b,c),a=a.nextSibling};var Qa,Ra,Sa,Ta,Ua,Va,Wa;Wa=Va=Ua=Ta=Sa=Ra=Qa=!1;var C=s();C&&(-1!=C.indexOf("Firefox")?Qa=!0:-1!=C.indexOf("Camino")?Ra=!0:-1!=C.indexOf("iPhone")||-1!=C.indexOf("iPod")?Sa=!0:-1!=C.indexOf("iPad")?Ta=!0:-1!=C.indexOf("Android")?Ua=!0:-1!=C.indexOf("Chrome")?Va=!0:-1!=C.indexOf("Safari")&&(Wa=!0));var Xa=Qa,Ya=Ra,Za=Sa,$a=Ta,E=Ua,ab=Va,bb=Wa;var F=u&&!(u&&9<=B),cb=u&&!(u&&8<=B);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.K=e;this.parentNode=b}function eb(a,b,c){var d=cb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new db(b,a,b.nodeName,d,c)};function G(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(F&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),F&&"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} +function H(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}cb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function fb(a,b,c,d,e){return(F?gb:hb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new I)} +function gb(a,b,c,d,e){if(8==a.h||c&&null===a.h){var g=b.all;if(!g)return e;a=ib(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var h=[],n=0;b=g[n++];)H(b,c,d)&&h.push(b);g=h}for(n=0;b=g[n++];)"*"==a&&"!"==b.tagName||e.add(b);return e}jb(a,b,c,d,e);return e} +function hb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!u?(b=b.getElementsByName(d),p(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),p(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),p(b,function(a){H(a,c,d)&&e.add(a)}));return e} +function kb(a,b,c,d,e){var g;if((8==a.h||c&&null===a.h)&&(g=b.childNodes)){var h=ib(a);if("*"!=h&&(g=ga(g,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!g))return e;c&&(g=ga(g,function(a){return H(a,c,d)}));p(g,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return lb(a,b,c,d,e)}function lb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b);return e} +function jb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b),jb(a,b,c,d,e)}function ib(a){return a.getName()};function I(){this.e=this.d=null;this.i=0}function mb(a){this.p=a;this.next=this.n=null}I.prototype.unshift=function(a){a=new mb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};I.prototype.add=function(a){a=new mb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function nb(a){return(a=a.d)?a.p:null}function ob(a){return(a=nb(a))?G(a):""}function J(a,b){this.I=a;this.o=(this.q=b)?a.e:a.d;this.v=null} +J.prototype.next=function(){var a=this.o;if(null==a)return null;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function K(a,b){var c=a.evaluate(b);return c instanceof I?+ob(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof I?ob(c):""+c}function M(a,b){var c=a.evaluate(b);return c instanceof I?!!c.i:!!c};function N(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof I&&c instanceof I){e=new J(b,!1);for(d=e.next();d;d=e.next())for(b=new J(c,!1),g=b.next();g;g=b.next())if(a(G(d),G(g)))return!0;return!1}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=new J(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function pb(a,b,c,d){this.w=a;this.M=b;this.t=c;this.u=d}pb.prototype.toString=function(){return this.w};var qb={};function O(a,b,c,d){if(qb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new pb(a,b,c,d);qb[a.toString()]=a}O("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});O("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)}); +O("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});O("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});O("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});O("<",4,2,function(a,b,c){return N(function(a,b){return a<b},a,b,c)});O(">",4,2,function(a,b,c){return N(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return N(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return N(function(a,b){return a>=b},a,b,c)});O("=",3,2,function(a,b,c){return N(function(a,b){return a==b},a,b,c,!0)}); +O("!=",3,2,function(a,b,c){return N(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});O("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function rb(a,b,c,d,e,g,h,n,D){this.l=a;this.t=b;this.H=c;this.G=d;this.F=e;this.u=g;this.D=h;this.C=void 0!==n?n:h;this.J=!!D}rb.prototype.toString=function(){return this.l};var sb={};function P(a,b,c,d,e,g,h,n){if(sb.hasOwnProperty(a))throw Error("Function already created: "+a+".");sb[a]=new rb(a,b,c,d,!1,e,g,h,n)}P("boolean",2,!1,!1,function(a,b){return M(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1); +P("concat",3,!1,!1,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+L(c,a)})},2,null);P("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);P("count",1,!1,!1,function(a,b){return b.evaluate(a).i},1,1,!0);P("false",2,!1,!1,f(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(F){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),g=[];p(d,function(a){a=c(a);!a||0<=fa(g,a)||g.push(a)});g.sort(Ka);var h=new I;p(g,function(a){h.add(a)});return h},1);P("lang",2,!1,!1,f(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);P("local-name",3,!1,!0,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,f(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):G(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!M(b,a)},1);P("number",1,!1,!0,function(a,b){return b?K(b,a):+G(a.f)},0,1);P("position",1,!0,!1,function(a){return a.L},0);P("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?L(b,a):G(a.f)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?L(b,a):G(a.f)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new J(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);P("true",2,!1,!1,f(!0),0);function tb(a,b,c,d){this.l=a;this.B=b;this.q=c;this.P=d}tb.prototype.toString=function(){return this.l};var ub={};function Q(a,b,c,d){if(ub.hasOwnProperty(a))throw Error("Axis already created: "+a);ub[a]=new tb(a,b,c,!!d)}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&F)return c.add(new db(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,g=0,h;h=e[g];g++)F?h.nodeValue&&c.add(eb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(F?h.nodeValue&&c.add(eb(b,h,b.sourceIndex)):c.add(h));return c},!1);Q("child",function(a,b,c,d,e){return(F?kb:lb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new I)},!1,!0);Q("descendant",fb,!1,!0); +Q("descendant-or-self",function(a,b,c,d){var e=new I;H(b,c,d)&&a.matches(b)&&e.add(b);return fb(a,b,c,d,e)},!1,!0);Q("following",function(a,b,c,d){var e=new I;do for(var g=b;g=g.nextSibling;)H(g,c,d)&&a.matches(g)&&e.add(g),e=fb(a,g,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new I},!1); +Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);Q("preceding",function(a,b,c,d){var e=new I,g=[];do g.unshift(b);while(b=b.parentNode);for(var h=1,n=g.length;h<n;h++){var D=[];for(b=g[h];b=b.previousSibling;)D.unshift(b);for(var R=0,na=D.length;R<na;R++)b=D[R],H(b,c,d)&&a.matches(b)&&e.add(b),e=fb(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},!1);function S(a){return(a=a.exec(s()))?a[1]:""}var vb=function(){if(Xa)return S(/Firefox\/([0-9.]+)/);if(u||t)return z;if(ab)return S(/Chrome\/([0-9.]+)/);if(bb)return S(/Version\/([0-9.]+)/);if(Za||$a){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(s());if(a)return a[1]+"."+a[2]}else{if(E)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(Ya)return S(/Camino\/([0-9.]+)/)}return""}();var wb,xb;function yb(a){return zb?wb(a):u?0<=da(B,a):Ea(a)}function T(a){zb?xb(a):E?da(Ab,a):da(vb,a)} +var zb=function(){if(!v)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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,g=c.version;wb=function(a){return 0<=d.s(e,""+a)};xb=function(a){d.s(g,""+a)};return!0}(),Bb;if(E){var Cb=/Android\s+([0-9\.]+)/.exec(s());Bb=Cb?Cb[1]:"0"}else Bb="0"; +var Ab=Bb,Db=u&&!(u&&8<=B),Eb=u&&!(u&&9<=B);E&&T(2.3);E&&T(4);bb&&T(6);function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Fb(a){return U(a,"OPTION")?!0:U(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}function Gb(a,b){var c;if(c=Db)if(c="value"==b)if(c=U(a,"OPTION"))c=null===Hb(a,"value");c?(c=[],Pa(a,c,!1),c=c.join("")):c=a[b];return c}var Ib=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Jb(a){var b=[];p(a.split(Ib),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return t?b.replace(/\w+:;/g,""):b}function Hb(a,b){b=b.toLowerCase();if("style"==b)return Jb(a.style.cssText);if(Db&&"value"==b&&U(a,"INPUT"))return a.value;if(Eb&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null};va||t||zb&&T(3.6);u&&yb(10);E&&T(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V)for(d=Kb(a),Lb(a),e=[],c=0;c<a.c.length;c++)e.push(a.g[a.c[c]]);else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.k=0;V.prototype.A=0;function Kb(a){Lb(a);return a.c.concat()} +function Lb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; +V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.A++);this.g[a]=b};var Mb={};function W(a,b,c){ba(a)&&(a=v?a.a:t?a.opera:a.b);a=new Nb(a,b,c);!b||b in Mb&&!c||(Mb[b]={key:a,shift:!1},c&&(Mb[c]={key:a,shift:!0}));return a}function Nb(a,b,c){this.code=a;this.r=b||null;this.N=c||this.r}W(8);W(9);W(13);var Ob=W(16),Pb=W(17),Qb=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","("); +W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Rb=W(sa?{a:91,b:91,opera:219}:ra?{a:224,b:91,opera:17}:{a:0,b:91,opera:null}); +W(sa?{a:92,b:92,opera:220}:ra?{a:224,b:93,opera:17}:{a:0,b:92,opera:null});W(sa?{a:93,b:93,opera:0}:ra?{a:0,b:0,opera:16}:{a:93,b:null,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:y?56:42},"*"); +W({a:107,b:107,opera:y?61:43},"+");W({a:109,b:109,opera:y?109:45},"-");W({a:110,b:110,opera:y?190:78},".");W({a:111,b:111,opera:y?191:47},"/");W(y&&t?null:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Ob); +X.set(2,Pb);X.set(4,Qb);X.set(8,Rb);(function(a){var b=new V;p(Kb(a),function(c){b.set(a.get(c).code,c)});return b})(X);v&&yb(12);var Sb={"class":"className",readonly:"readOnly"},Tb="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" "); +function Ub(a,b){var c=null,d=b.toLowerCase();if("style"==d)return(c=a.style)&&!m(c)&&(c=c.cssText),c;if(("selected"==d||"checked"==d)&&Fb(a)){if(!Fb(a))throw new q(15,"Element is not selectable");var d="selected",e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)d="checked";return Gb(a,d)?"true":null}c=U(a,"A");if(U(a,"IMG")&&"src"==d||c&&"href"==d)return(c=Hb(a,d))&&(c=Gb(a,d)),c;c=Sb[b]||b;if(0<=fa(Tb,d))return(c=null!==Hb(a,b)||Gb(a,c))?"true":null;try{e=Gb(a,c)}catch(g){}c=null==e|| +ba(e)?Hb(a,b):e;return null!=c?c.toString():null};function Vb(){this.j=void 0} +function Wb(a,b,c){switch(typeof b){case "string":Xb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==l(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Wb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d), +Xb(g,c),c.push(":"),Wb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Yb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Zb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Xb(a,b){b.push('"',a.replace(Zb,function(a){if(a in Yb)return Yb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Yb[a]=e+b.toString(16)}),'"')};va||t||v&&yb(3.5)||u&&yb(8);function $b(a){switch(l(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,$b);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=ac(a);return b}if("document"in a)return b={},b.WINDOW=ac(a),b;if(aa(a))return ha(a,$b);a=Ga(a,function(a,b){return"number"==typeof b||m(b)});return Ha(a,$b);default:return null}} +function bc(a,b){return"array"==l(a)?ha(a,function(a){return bc(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?cc(a.ELEMENT,b):"WINDOW"in a?cc(a.WINDOW,b):Ha(a,function(a){return bc(a,b)}):a}function dc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ca());b.m||(b.m=ca());return b}function ac(a){var b=dc(a.ownerDocument),c=Ia(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} +function cc(a,b){a=decodeURIComponent(a);var c=b||document,d=dc(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new q(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};function ec(a,b,c){a=[a,b];var d;try{var e=c?cc(c.WINDOW):window,g=bc(a,e.document),h=Ub.apply(null,g);d={status:0,value:$b(h)}}catch(n){d={status:"code"in n?n.code:13,value:{message:n.message}}}c=[];Wb(new Vb,d,c);return c.join("")}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===ec?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=ec;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_current_position.js b/src/ghostdriver/third_party/webdriver-atoms/get_current_position.js index a0215dca0..d8ec66e78 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_current_position.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_current_position.js @@ -1,7 +1,8 @@ -function(){return function(){var c=!0,d=null,e=!1,f=this;var m=window;function n(a,g){this.code=a;this.state=p[a]||q;this.message=g||"";var b=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),h=b.length-5;if(0>h||b.indexOf("Error",h)!=h)b+="Error";this.name=b;b=Error(this.message);b.name=this.name;this.stack=b.stack||""}(function(){var a=Error;function g(){}g.prototype=a.prototype;n.b=a.prototype;n.prototype=new g})(); -var q="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=q;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,g){for(var b=0,h=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),B=String(g).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),J=Math.max(h.length,B.length),C=0;0==b&&C<J;C++){var la=h[C]||"",ma=B[C]||"",na=RegExp("(\\d*)(\\D*)","g"),oa=RegExp("(\\d*)(\\D*)","g");do{var k=na.exec(la)||["","",""],l=oa.exec(ma)||["","",""];if(0==k[0].length&&0==l[0].length)break;b=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> -(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==b)}return b};var s,t,u,v;function w(){return f.navigator?f.navigator.userAgent:d}v=u=t=s=e;var x;if(x=w()){var aa=f.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==aa.product}var ba=s,y=t,ca=v,da=u,ea=f.navigator,fa=-1!=(ea&&ea.platform||"").indexOf("Win");function ga(){var a=f.document;return a?a.documentMode:void 0}var z; -a:{var A="",D;if(ba&&f.opera)var E=f.opera.version,A="function"==typeof E?E():E;else if(ca?D=/rv\:([^\);]+)(\)|;)/:y?D=/MSIE\s+([^\);]+)(\)|;)/:da&&(D=/WebKit\/(\S+)/),D)var ha=D.exec(w()),A=ha?ha[1]:"";if(y){var ia=ga();if(ia>parseFloat(A)){z=String(ia);break a}}z=A}var F={},ja=f.document,ka=!ja||!y?void 0:ga()||("CSS1Compat"==ja.compatMode?parseInt(z,10):5);var G,H,I,K,L,M,N;N=M=L=K=I=H=G=e;var O=w();O&&(-1!=O.indexOf("Firefox")?G=c:-1!=O.indexOf("Camino")?H=c:-1!=O.indexOf("iPhone")||-1!=O.indexOf("iPod")?I=c:-1!=O.indexOf("iPad")?K=c:-1!=O.indexOf("Android")?L=c:-1!=O.indexOf("Chrome")?M=c:-1!=O.indexOf("Safari")&&(N=c));var pa=G,qa=H,ra=I,sa=K,P=L,ta=M,Q=N;function R(a){return(a=a.exec(w()))?a[1]:""}var ua=function(){if(pa)return R(/Firefox\/([0-9.]+)/);if(y||ba)return z;if(ta)return R(/Chrome\/([0-9.]+)/);if(Q)return R(/Version\/([0-9.]+)/);if(ra||sa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(P)return(a=R(/Android\s+([0-9.]+)/))?a:R(/Version\/([0-9.]+)/);if(qa)return R(/Camino\/([0-9.]+)/)}return""}();var S,va;function T(a){return U?va(a):P?0<=r(wa,a):0<=r(ua,a)}var U=function(){if(!ca)return e;var a=f.Components;if(!a)return e;try{if(!a.classes)return e}catch(g){return e}var b=a.classes,a=a.interfaces,h=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),B=b.platformVersion,J=b.version;S=function(a){return 0<=h.a(B,""+a)};va=function(a){return 0<=h.a(J,""+a)};return c}(),V; -if(P){var xa=/Android\s+([0-9\.]+)/.exec(w());V=xa?xa[1]:"0"}else V="0";var wa=V;P&&T(2.3);var W=y&&(U?S(8):y?0<=r(ka,8):F[8]||(F[8]=0<=r(z,8)))&&!(U?S(9):y?0<=r(ka,9):F[9]||(F[9]=0<=r(z,9))),ya=Q&&T(4)&&!T(5),za=P&&T(2.2)&&!T(2.3),Aa=fa&&Q&&T(4)&&!T(6); -function Ba(){var a=m||m;switch("location"){case "appcache":return W?e:a.applicationCache!=d;case "browser_connection":return a.navigator!=d&&a.navigator.onLine!=d;case "database":return ya||za?e:a.openDatabase!=d;case "location":return Aa?e:a.navigator!=d&&a.navigator.geolocation!=d;case "local_storage":return W?e:a.localStorage!=d;case "session_storage":return W?e:a.sessionStorage!=d&&a.sessionStorage.clear!=d;default:throw new n(13,"Unsupported API identifier provided as parameter");}};var Ca={enableHighAccuracy:c,maximumAge:Infinity,timeout:5E3};function Da(a,g,b){b=b||Ca;if(Ba())m.navigator.geolocation.getCurrentPosition(a,g,b);else throw new n(13,"Geolocation undefined");}var X=["_"],Y=f;!(X[0]in Y)&&Y.execScript&&Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());){var $;if($=!X.length)$=void 0!==Da;$?Y[Z]=Da:Y=Y[Z]?Y[Z]:Y[Z]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var c=this;var h=window;function k(a,d){this.code=a;this.state=l[a]||m;this.message=d||"";var b=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=b.length-5;if(0>e||b.indexOf("Error",e)!=e)b+="Error";this.name=b;b=Error(this.message);b.name=this.name;this.stack=b.stack||""}(function(){var a=Error;function d(){}d.prototype=a.prototype;k.b=a.prototype;k.prototype=new d})(); +var m="unknown error",l={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};l[13]=m;l[9]="unknown command";k.prototype.toString=function(){return this.name+": "+this.message};function n(a,d){for(var b=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),y=String(d).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),H=Math.max(e.length,y.length),z=0;0==b&&z<H;z++){var ha=e[z]||"",ia=y[z]||"",ja=RegExp("(\\d*)(\\D*)","g"),ka=RegExp("(\\d*)(\\D*)","g");do{var f=ja.exec(ha)||["","",""],g=ka.exec(ia)||["","",""];if(0==f[0].length&&0==g[0].length)break;b=((0==f[1].length?0:parseInt(f[1],10))<(0==g[1].length?0:parseInt(g[1],10))?-1:(0==f[1].length?0:parseInt(f[1],10))> +(0==g[1].length?0:parseInt(g[1],10))?1:0)||((0==f[2].length)<(0==g[2].length)?-1:(0==f[2].length)>(0==g[2].length)?1:0)||(f[2]<g[2]?-1:f[2]>g[2]?1:0)}while(0==b)}return b};var p,q,r,s;function t(){return c.navigator?c.navigator.userAgent:null}s=r=q=p=!1;var u;if(u=t()){var aa=c.navigator;p=0==u.indexOf("Opera");q=!p&&-1!=u.indexOf("MSIE");r=!p&&-1!=u.indexOf("WebKit");s=!p&&!r&&"Gecko"==aa.product}var v=p,w=q,x=s,ba=r,A=c.navigator,ca=-1!=(A&&A.platform||"").indexOf("Win");function B(){var a=c.document;return a?a.documentMode:void 0}var C; +a:{var D="",E;if(v&&c.opera)var F=c.opera.version,D="function"==typeof F?F():F;else if(x?E=/rv\:([^\);]+)(\)|;)/:w?E=/MSIE\s+([^\);]+)(\)|;)/:ba&&(E=/WebKit\/(\S+)/),E)var da=E.exec(t()),D=da?da[1]:"";if(w){var ea=B();if(ea>parseFloat(D)){C=String(ea);break a}}C=D}var G={},fa=c.document,ga=fa&&w?B()||("CSS1Compat"==fa.compatMode?parseInt(C,10):5):void 0;var I,J,K,L,M,N,O;O=N=M=L=K=J=I=!1;var P=t();P&&(-1!=P.indexOf("Firefox")?I=!0:-1!=P.indexOf("Camino")?J=!0:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=!0:-1!=P.indexOf("iPad")?L=!0:-1!=P.indexOf("Android")?M=!0:-1!=P.indexOf("Chrome")?N=!0:-1!=P.indexOf("Safari")&&(O=!0));var la=I,ma=J,na=K,oa=L,Q=M,pa=N,R=O;function S(a){return(a=a.exec(t()))?a[1]:""}var qa=function(){if(la)return S(/Firefox\/([0-9.]+)/);if(w||v)return C;if(pa)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(na||oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ma)return S(/Camino\/([0-9.]+)/)}return""}();var T,ra;function U(a){return V?ra(a):Q?0<=n(sa,a):0<=n(qa,a)}var V=function(){if(!x)return!1;var a=c.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(d){return!1}var b=a.classes,a=a.interfaces,e=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),y=b.platformVersion,H=b.version;T=function(a){return 0<=e.a(y,""+a)};ra=function(a){return 0<=e.a(H,""+a)};return!0}(),W; +if(Q){var ta=/Android\s+([0-9\.]+)/.exec(t());W=ta?ta[1]:"0"}else W="0";var sa=W;Q&&U(2.3);Q&&U(4);R&&U(6);var X=w&&(V?T(8):w?0<=n(ga,8):G[8]||(G[8]=0<=n(C,8)))&&!(V?T(9):w?0<=n(ga,9):G[9]||(G[9]=0<=n(C,9))),ua=R&&U(4)&&!U(5),va=Q&&U(2.2)&&!U(2.3),wa=ca&&R&&U(4)&&!U(6); +function xa(){var a=h||h;switch("location"){case "appcache":return X?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return ua||va?!1:null!=a.openDatabase;case "location":return wa?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return X?!1:null!=a.localStorage;case "session_storage":return X?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new k(13,"Unsupported API identifier provided as parameter"); +}};var ya={enableHighAccuracy:!0,maximumAge:Infinity,timeout:5E3};function za(a,d,b){b=b||ya;if(xa())h.navigator.geolocation.getCurrentPosition(a,d,b);else throw new k(13,"Geolocation undefined");}var Y=["_"],Z=c;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===za?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=za;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_element_from_cache.js b/src/ghostdriver/third_party/webdriver-atoms/get_element_from_cache.js deleted file mode 100644 index a8e6f1597..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/get_element_from_cache.js +++ /dev/null @@ -1,7 +0,0 @@ -function(){return function(){var e=!0,f=!1,l=this,m=Date.now||function(){return+new Date};function p(a,g){this.code=a;this.state=q[a]||r;this.message=g||"";var b=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),c=b.length-5;if(0>c||b.indexOf("Error",c)!=c)b+="Error";this.name=b;b=Error(this.message);b.name=this.name;this.stack=b.stack||""}(function(){var a=Error;function g(){}g.prototype=a.prototype;p.c=a.prototype;p.prototype=new g})(); -var r="unknown error",q={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};q[13]=r;q[9]="unknown command";p.prototype.toString=function(){return this.name+": "+this.message};function s(a,g){for(var b=0,c=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(g).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),n=Math.max(c.length,d.length),B=0;0==b&&B<n;B++){var ja=c[B]||"",ka=d[B]||"",la=RegExp("(\\d*)(\\D*)","g"),ma=RegExp("(\\d*)(\\D*)","g");do{var h=la.exec(ja)||["","",""],k=ma.exec(ka)||["","",""];if(0==h[0].length&&0==k[0].length)break;b=((0==h[1].length?0:parseInt(h[1],10))<(0==k[1].length?0:parseInt(k[1],10))?-1:(0==h[1].length?0:parseInt(h[1],10))> -(0==k[1].length?0:parseInt(k[1],10))?1:0)||((0==h[2].length)<(0==k[2].length)?-1:(0==h[2].length)>(0==k[2].length)?1:0)||(h[2]<k[2]?-1:h[2]>k[2]?1:0)}while(0==b)}return b};var t,u,v,w;function x(){return l.navigator?l.navigator.userAgent:null}w=v=u=t=f;var y;if(y=x()){var aa=l.navigator;t=0==y.indexOf("Opera");u=!t&&-1!=y.indexOf("MSIE");v=!t&&-1!=y.indexOf("WebKit");w=!t&&!v&&"Gecko"==aa.product}var z=t,A=u,C=w,ba=v;function ca(){var a=l.document;return a?a.documentMode:void 0}var D; -a:{var E="",F;if(z&&l.opera)var G=l.opera.version,E="function"==typeof G?G():G;else if(C?F=/rv\:([^\);]+)(\)|;)/:A?F=/MSIE\s+([^\);]+)(\)|;)/:ba&&(F=/WebKit\/(\S+)/),F)var da=F.exec(x()),E=da?da[1]:"";if(A){var ea=ca();if(ea>parseFloat(E)){D=String(ea);break a}}D=E}var fa={};function H(a){return fa[a]||(fa[a]=0<=s(D,a))}var ga=l.document,I=!ga||!A?void 0:ca()||("CSS1Compat"==ga.compatMode?parseInt(D,10):5);var J,K,L,M,N,O,P;P=O=N=M=L=K=J=f;var Q=x();Q&&(-1!=Q.indexOf("Firefox")?J=e:-1!=Q.indexOf("Camino")?K=e:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=e:-1!=Q.indexOf("iPad")?M=e:-1!=Q.indexOf("Android")?N=e:-1!=Q.indexOf("Chrome")?O=e:-1!=Q.indexOf("Safari")&&(P=e));var ha=J,ia=K,na=L,oa=M,R=N,pa=O,qa=P;function S(a){return(a=a.exec(x()))?a[1]:""}var ra=function(){if(ha)return S(/Firefox\/([0-9.]+)/);if(A||z)return D;if(pa)return S(/Chrome\/([0-9.]+)/);if(qa)return S(/Version\/([0-9.]+)/);if(na||oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(R)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ia)return S(/Camino\/([0-9.]+)/)}return""}();var T,sa,U=function(){if(!C)return f;var a=l.Components;if(!a)return f;try{if(!a.classes)return f}catch(g){return f}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,n=b.version;T=function(a){return 0<=c.b(d,""+a)};sa=function(a){c.b(n,""+a)};return e}(),V;if(R){var ta=/Android\s+([0-9\.]+)/.exec(x());V=ta?ta[1]:"0"}else V="0";var ua=V; -R&&(U?sa(2.3):R?s(ua,2.3):s(ra,2.3));ba||z||C&&(U?T(3.5):A?0<=s(I,3.5):H(3.5))||A&&(U?T(8):A?s(I,8):H(8));if(C||A){var W;if(W=A)W=A&&9<=I;W||C&&H("1.9.1")}A&&H("9");function va(a,g){a=decodeURIComponent(a);var b=g||document,c;c=b||document;var d=c.$wdc_;d||(d=c.$wdc_={},d.a=m());d.a||(d.a=m());c=d;if(!(a in c))throw new p(10,"Element does not exist in cache");d=c[a];if("setInterval"in d){if(d.closed)throw delete c[a],new p(23,"Window has been closed.");return d}for(var n=d;n;){if(n==b.documentElement)return d;n=n.parentNode}delete c[a];throw new p(10,"Element is no longer attached to the DOM");}var X=["_"],Y=l;!(X[0]in Y)&&Y.execScript&&Y.execScript("var "+X[0]); -for(var Z;X.length&&(Z=X.shift());){var $;if($=!X.length)$=void 0!==va;$?Y[Z]=va:Y=Y[Z]?Y[Z]:Y[Z]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_frame_window.js b/src/ghostdriver/third_party/webdriver-atoms/get_frame_window.js deleted file mode 100644 index f759297d5..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/get_frame_window.js +++ /dev/null @@ -1,35 +0,0 @@ -function(){return function(){var g=void 0,k=!0,l=null,m=!1;function n(a){return function(){return a}}var p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function r(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ca=Date.now||function(){return+new Date};var da=window;function s(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var t=d[h]||"",F=e[h]||"",N=RegExp("(\\d*)(\\D*)","g"),ea=RegExp("(\\d*)(\\D*)","g");do{var z=N.exec(t)||["","",""],A=ea.exec(F)||["","",""];if(0==z[0].length&&0==A[0].length)break;c=((0==z[1].length?0:parseInt(z[1],10))<(0==A[1].length?0:parseInt(A[1],10))?-1:(0==z[1].length?0:parseInt(z[1],10))>(0==A[1].length? -0:parseInt(A[1],10))?1:0)||((0==z[2].length)<(0==A[2].length)?-1:(0==z[2].length)>(0==A[2].length)?1:0)||(z[2]<A[2]?-1:z[2]>A[2]?1:0)}while(0==c)}return c};var fa=Array.prototype;function u(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function ga(a,b){for(var c=a.length,d=[],e=0,f=r(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var t=f[h];b.call(g,t,h,a)&&(d[e++]=t)}return d}function ha(a,b){for(var c=a.length,d=Array(c),e=r(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";u(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function ja(a,b){var c;a:{c=a.length;for(var d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:r(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?fa.slice.call(a,b):fa.slice.call(a,b,c)};var v,la,w,ma;function x(){return p.navigator?p.navigator.userAgent:l}ma=w=la=v=m;var y;if(y=x()){var na=p.navigator;v=0==y.indexOf("Opera");la=!v&&-1!=y.indexOf("MSIE");w=!v&&-1!=y.indexOf("WebKit");ma=!v&&!w&&"Gecko"==na.product}var B=v,C=la,D=ma,oa=w;function pa(){var a=p.document;return a?a.documentMode:g}var E; -a:{var qa="",G;if(B&&p.opera)var ra=p.opera.version,qa="function"==typeof ra?ra():ra;else if(D?G=/rv\:([^\);]+)(\)|;)/:C?G=/MSIE\s+([^\);]+)(\)|;)/:oa&&(G=/WebKit\/(\S+)/),G)var sa=G.exec(x()),qa=sa?sa[1]:"";if(C){var ta=pa();if(ta>parseFloat(qa)){E=String(ta);break a}}E=qa}var ua={};function va(a){return ua[a]||(ua[a]=0<=s(E,a))}var wa=p.document,H=!wa||!C?g:pa()||("CSS1Compat"==wa.compatMode?parseInt(E,10):5);!D&&!C||C&&C&&9<=H||D&&va("1.9.1");C&&va("9");function xa(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function za(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function Aa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Ba(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(C&&!(C&&9<=H)){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?Ca(a,b):!c&&Aa(e,b)?-1*Da(a,b):!d&&Aa(f,a)?Da(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(k);d=d.createRange();d.selectNode(b);d.collapse(k);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function Da(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ca(d,a)}function Ca(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Ea,Fa,Ga,Ha,Ia,Ja,Ka;Ka=Ja=Ia=Ha=Ga=Fa=Ea=m;var I=x();I&&(-1!=I.indexOf("Firefox")?Ea=k:-1!=I.indexOf("Camino")?Fa=k:-1!=I.indexOf("iPhone")||-1!=I.indexOf("iPod")?Ga=k:-1!=I.indexOf("iPad")?Ha=k:-1!=I.indexOf("Android")?Ia=k:-1!=I.indexOf("Chrome")?Ja=k:-1!=I.indexOf("Safari")&&(Ka=k));var La=Ea,Ma=Fa,Na=Ga,Oa=Ha,Pa=Ia,Qa=Ja,Ra=Ka;function J(a){return(a=a.exec(x()))?a[1]:""}var Sa=function(){if(La)return J(/Firefox\/([0-9.]+)/);if(C||B)return E;if(Qa)return J(/Chrome\/([0-9.]+)/);if(Ra)return J(/Version\/([0-9.]+)/);if(Na||Oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(Pa)return(a=J(/Android\s+([0-9.]+)/))?a:J(/Version\/([0-9.]+)/);if(Ma)return J(/Camino\/([0-9.]+)/)}return""}();var Ta,Ua;function Va(a){return Wa?Ta(a):C?0<=s(H,a):va(a)}var Wa=function(){if(!D)return m;var a=p.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;Ta=function(a){return 0<=d.m(e,""+a)};Ua=function(a){d.m(f,""+a)};return k}(),Xa; -if(Pa){var Ya=/Android\s+([0-9\.]+)/.exec(x());Xa=Ya?Ya[1]:"0"}else Xa="0";var Za=Xa;Pa&&(Wa?Ua(2.3):Pa?s(Za,2.3):s(Sa,2.3));function K(a,b){this.code=a;this.state=$a[a]||ab;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;K.F=a.prototype;K.prototype=new b})(); -var ab="unknown error",$a={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};$a[13]=ab;$a[9]="unknown command";K.prototype.toString=function(){return this.name+": "+this.message};var L=C&&!(C&&9<=H),bb=C&&!(C&&8<=H);function cb(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.B=e;this.parentNode=b}function db(a,b,c){var d=bb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new cb(b,a,b.nodeName,d,c)};function M(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(L&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),L&&"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} -function O(a,b,c){if(b===l)return k;try{if(!a.getAttribute)return m}catch(d){return m}bb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function eb(a,b,c,d,e){return(L?fb:gb).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new P)} -function fb(a,b,c,d,e){if(m||8==a.d||c&&a.d===l){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],t=0;b=f[t++];)O(b,c,d)&&h.push(b);f=h}for(t=0;b=f[t++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ib(a,b,c,d,e);return e} -function gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!C?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),u(b,function(a){O(a,c,d)&&e.add(a)}));return e} -function jb(a,b,c,d,e){var f;if((m||8==a.d||c&&a.d===l)&&(f=b.childNodes)){var h=hb(a);if("*"!=h&&(f=ga(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ga(f,function(a){return O(a,c,d)}));u(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return kb(a,b,c,d,e)}function kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b);return e} -function ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b),ib(a,b,c,d,e)}function hb(a){if(m){if(8==a.d)return"!";if(a.d===l)return"*"}return a.getName()};function P(){this.b=this.a=l;this.e=0}function lb(a){this.k=a;this.next=this.i=l}P.prototype.unshift=function(a){a=new lb(a);a.next=this.a;this.b?this.a.i=a:this.a=this.b=a;this.a=a;this.e++};P.prototype.add=function(a){a=new lb(a);a.i=this.b;this.a?this.b.next=a:this.a=this.b=a;this.b=a;this.e++};function mb(a){return(a=a.a)?a.k:l}function nb(a){return(a=mb(a))?M(a):""}function Q(a,b){this.z=a;this.j=(this.l=b)?a.b:a.a;this.p=l} -Q.prototype.next=function(){var a=this.j;if(a==l)return l;var b=this.p=a;this.j=this.l?a.i:a.next;return b.k};function R(a,b){var c=a.evaluate(b);return c instanceof P?+nb(c):+c}function S(a,b){var c=a.evaluate(b);return c instanceof P?nb(c):""+c}function T(a,b){var c=a.evaluate(b);return c instanceof P?!!c.e:!!c};function U(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof P&&c instanceof P){e=new Q(b,m);for(d=e.next();d;d=e.next()){b=new Q(c,m);for(f=b.next();f;f=b.next())if(a(M(d),M(f)))return k}return m}if(b instanceof P||c instanceof P){b instanceof P?e=b:(e=c,c=b);e=new Q(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+M(d);break;case "boolean":d=!!M(d);break;case "string":d=M(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return k}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function ob(a,b,c,d){this.q=a;this.D=b;this.n=c;this.o=d}ob.prototype.toString=function(){return this.q};var pb={};function V(a,b,c,d){if(a in pb)throw Error("Binary operator already created: "+a);a=new ob(a,b,c,d);pb[a.toString()]=a}V("div",6,1,function(a,b,c){return R(a,c)/R(b,c)});V("mod",6,1,function(a,b,c){return R(a,c)%R(b,c)});V("*",6,1,function(a,b,c){return R(a,c)*R(b,c)}); -V("+",5,1,function(a,b,c){return R(a,c)+R(b,c)});V("-",5,1,function(a,b,c){return R(a,c)-R(b,c)});V("<",4,2,function(a,b,c){return U(function(a,b){return a<b},a,b,c)});V(">",4,2,function(a,b,c){return U(function(a,b){return a>b},a,b,c)});V("<=",4,2,function(a,b,c){return U(function(a,b){return a<=b},a,b,c)});V(">=",4,2,function(a,b,c){return U(function(a,b){return a>=b},a,b,c)});V("=",3,2,function(a,b,c){return U(function(a,b){return a==b},a,b,c,k)}); -V("!=",3,2,function(a,b,c){return U(function(a,b){return a!=b},a,b,c,k)});V("and",2,2,function(a,b,c){return T(a,c)&&T(b,c)});V("or",1,2,function(a,b,c){return T(a,c)||T(b,c)});function qb(a,b,c,d,e,f,h,t,F){this.g=a;this.n=b;this.w=c;this.v=d;this.u=e;this.o=f;this.t=h;this.s=t!==g?t:h;this.A=!!F}qb.prototype.toString=function(){return this.g};var rb={};function W(a,b,c,d,e,f,h,t){if(a in rb)throw Error("Function already created: "+a+".");rb[a]=new qb(a,b,c,d,m,e,f,h,t)}W("boolean",2,m,m,function(a,b){return T(b,a)},1);W("ceiling",1,m,m,function(a,b){return Math.ceil(R(b,a))},1); -W("concat",3,m,m,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+S(c,a)})},2,l);W("contains",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return-1!=b.indexOf(a)},2);W("count",1,m,m,function(a,b){return b.evaluate(a).e},1,1,k);W("false",2,m,m,n(m),0);W("floor",1,m,m,function(a,b){return Math.floor(R(b,a))},1); -W("id",4,m,m,function(a,b){function c(a){if(L){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=S(b,a).split(/\s+/),f=[];u(d,function(a){a=c(a);var b;if(b=a){a:if(r(f))b=!r(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Ba);var h=new P;u(f,function(a){h.add(a)});return h},1); -W("lang",2,m,m,n(m),1);W("last",1,k,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.b},0);W("local-name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("name",3,m,k,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,k);W("namespace-uri",3,k,m,n(""),0,1,k);W("normalize-space",3,m,k,function(a,b){return(b?S(b,a):M(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -W("not",2,m,m,function(a,b){return!T(b,a)},1);W("number",1,m,k,function(a,b){return b?R(b,a):+M(a.c)},0,1);W("position",1,k,m,function(a){return a.C},0);W("round",1,m,m,function(a,b){return Math.round(R(b,a))},1);W("starts-with",2,m,m,function(a,b,c){b=S(b,a);a=S(c,a);return 0==b.lastIndexOf(a,0)},2);W("string",3,m,k,function(a,b){return b?S(b,a):M(a.c)},0,1);W("string-length",1,m,k,function(a,b){return(b?S(b,a):M(a.c)).length},0,1); -W("substring",3,m,m,function(a,b,c,d){c=R(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?R(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=S(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);W("substring-after",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -W("substring-before",3,m,m,function(a,b,c){b=S(b,a);a=S(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);W("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new Q(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+M(e);return d},1,1,k);W("translate",3,m,m,function(a,b,c,d){b=S(b,a);c=S(c,a);var e=S(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);W("true",2,m,m,n(k),0);function sb(a,b,c,d){this.g=a;this.r=b;this.l=c;this.G=d}sb.prototype.toString=function(){return this.g};var tb={};function X(a,b,c,d){if(a in tb)throw Error("Axis already created: "+a);tb[a]=new sb(a,b,c,!!d)}X("ancestor",function(a,b){for(var c=new P,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},k);X("ancestor-or-self",function(a,b){var c=new P,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},k); -X("attribute",function(a,b){var c=new P,d=a.getName();if("style"==d&&b.style&&L)return c.add(new cb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.d===l||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)L?h.nodeValue&&c.add(db(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(L?h.nodeValue&&c.add(db(b,h,b.sourceIndex)):c.add(h));return c},m);X("child",function(a,b,c,d,e){return(L?jb:kb).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new P)},m,k);X("descendant",eb,m,k); -X("descendant-or-self",function(a,b,c,d){var e=new P;O(b,c,d)&&a.matches(b)&&e.add(b);return eb(a,b,c,d,e)},m,k);X("following",function(a,b,c,d){var e=new P;do for(var f=b;f=f.nextSibling;)O(f,c,d)&&a.matches(f)&&e.add(f),e=eb(a,f,c,d,e);while(b=b.parentNode);return e},m,k);X("following-sibling",function(a,b){for(var c=new P,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);X("namespace",function(){return new P},m); -X("parent",function(a,b){var c=new P;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);X("preceding",function(a,b,c,d){var e=new P,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,t=f.length;h<t;h++){var F=[];for(b=f[h];b=b.previousSibling;)F.unshift(b);for(var N=0,ea=F.length;N<ea;N++)b=F[N],O(b,c,d)&&a.matches(b)&&e.add(b),e=eb(a,b,c,d,e)}return e},k,k); -X("preceding-sibling",function(a,b){for(var c=new P,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},k);X("self",function(a,b){var c=new P;a.matches(b)&&c.add(b);return c},m);!B&&(!oa||Va("533"));function ub(a){if(a&&1==a.nodeType&&"FRAME"==a.tagName.toUpperCase()||a&&1==a.nodeType&&"IFRAME"==a.tagName.toUpperCase())return a.contentWindow||(a.contentDocument||a.contentWindow.document).parentWindow||(a.contentDocument||a.contentWindow.document).defaultView;throw new K(8,"The given element isn't a frame or an iframe.");};function vb(){this.f=g} -function wb(a,b,c){switch(typeof b){case "string":xb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],wb(a,a.f?a.f.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),xb(f, -c),c.push(":"),wb(a,a.f?a.f.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var yb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},zb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function xb(a,b){b.push('"',a.replace(zb,function(a){if(a in yb)return yb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return yb[a]=e+b.toString(16)}),'"')};oa||B||D&&Va(3.5)||C&&Va(8);function Ab(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,Ab);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Bb(a);return b}if("document"in a)return b={},b.WINDOW=Bb(a),b;if(aa(a))return ha(a,Ab);a=xa(a,function(a,b){return"number"==typeof b||r(b)});return ya(a,Ab);default:return l}} -function Cb(a,b){return"array"==q(a)?ha(a,function(a){return Cb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Db(a.ELEMENT,b):"WINDOW"in a?Db(a.WINDOW,b):ya(a,function(a){return Cb(a,b)}):a}function Eb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.h=ca());b.h||(b.h=ca());return b}function Bb(a){var b=Eb(a.ownerDocument),c=za(b,function(b){return b==a});c||(c=":wdc:"+b.h++,b[c]=a);return c} -function Db(a,b){a=decodeURIComponent(a);var c=b||document,d=Eb(c);if(!(a in d))throw new K(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new K(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new K(10,"Element is no longer attached to the DOM");};function Fb(a){var b=ub;a=[a];var c=window||da,d;try{var b=r(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Cb(a,c.document),f=b.apply(l,e);d={status:0,value:Ab(f)}}catch(h){d={status:"code"in h?h.code:13,value:{message:h.message}}}b=[];wb(new vb,d,b);return b.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Fb!==g?Z[$]=Fb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_in_view_location.js b/src/ghostdriver/third_party/webdriver-atoms/get_in_view_location.js deleted file mode 100644 index 24e306aa6..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/get_in_view_location.js +++ /dev/null @@ -1,29 +0,0 @@ -function(){return function(){var g=void 0,k=!0,l=null,m=!1;function n(a){return function(){return a}}var p=this;function r(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);var aa=window;function s(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var q=d[h]||"",D=e[h]||"",K=RegExp("(\\d*)(\\D*)","g"),ba=RegExp("(\\d*)(\\D*)","g");do{var x=K.exec(q)||["","",""],y=ba.exec(D)||["","",""];if(0==x[0].length&&0==y[0].length)break;c=((0==x[1].length?0:parseInt(x[1],10))<(0==y[1].length?0:parseInt(y[1],10))?-1:(0==x[1].length?0:parseInt(x[1],10))>(0==y[1].length? -0:parseInt(y[1],10))?1:0)||((0==x[2].length)<(0==y[2].length)?-1:(0==x[2].length)>(0==y[2].length)?1:0)||(x[2]<y[2]?-1:x[2]>y[2]?1:0)}while(0==c)}return c};var ca=Array.prototype;function t(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function da(a,b){for(var c=a.length,d=[],e=0,f=r(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var q=f[h];b.call(g,q,h,a)&&(d[e++]=q)}return d}function ea(a,b){if(a.reduce)return a.reduce(b,"");var c="";t(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function fa(a,b){var c;a:{c=a.length;for(var d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:r(a)?a.charAt(c):a[c]}function ga(a,b,c){return 2>=arguments.length?ca.slice.call(a,b):ca.slice.call(a,b,c)};function u(a,b){this.code=a;this.state=ha[a]||ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;u.I=a.prototype;u.prototype=new b})(); -var ia="unknown error",ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ha[13]=ia;ha[9]="unknown command";u.prototype.toString=function(){return this.name+": "+this.message};var v,ja,w,ka;function z(){return p.navigator?p.navigator.userAgent:l}ka=w=ja=v=m;var A;if(A=z()){var la=p.navigator;v=0==A.indexOf("Opera");ja=!v&&-1!=A.indexOf("MSIE");w=!v&&-1!=A.indexOf("WebKit");ka=!v&&!w&&"Gecko"==la.product}var ma=v,B=ja,C=ka,na=w;function oa(){var a=p.document;return a?a.documentMode:g}var E; -a:{var F="",G;if(ma&&p.opera)var pa=p.opera.version,F="function"==typeof pa?pa():pa;else if(C?G=/rv\:([^\);]+)(\)|;)/:B?G=/MSIE\s+([^\);]+)(\)|;)/:na&&(G=/WebKit\/(\S+)/),G)var qa=G.exec(z()),F=qa?qa[1]:"";if(B){var ra=oa();if(ra>parseFloat(F)){E=String(ra);break a}}E=F}var sa={};function ta(a){sa[a]||(sa[a]=0<=s(E,a))}var ua=p.document,H=!ua||!B?g:oa()||("CSS1Compat"==ua.compatMode?parseInt(E,10):5);var I;!C&&!B||B&&B&&9<=H||C&&ta("1.9.1");B&&ta("9");function va(a,b){this.x=a!==g?a:0;this.y=b!==g?b:0}va.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function J(a,b){this.width=a;this.height=b}J.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};J.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};J.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};J.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function wa(a){var b=!na&&"CSS1Compat"==a.compatMode?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new va(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function xa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function ya(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!(B&&9<=H)){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?za(a,b):!c&&xa(e,b)?-1*Aa(a,b):!d&&xa(f,a)?Aa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=Ba(a);c=d.createRange(); -c.selectNode(a);c.collapse(k);d=d.createRange();d.selectNode(b);d.collapse(k);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function Aa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return za(d,a)}function za(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function Ba(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function L(a){this.l=a||p.document||document}L.prototype.contains=xa;var Ca,Da,Ea,Fa,Ga,Ha,Ia;Ia=Ha=Ga=Fa=Ea=Da=Ca=m;var M=z();M&&(-1!=M.indexOf("Firefox")?Ca=k:-1!=M.indexOf("Camino")?Da=k:-1!=M.indexOf("iPhone")||-1!=M.indexOf("iPod")?Ea=k:-1!=M.indexOf("iPad")?Fa=k:-1!=M.indexOf("Android")?Ga=k:-1!=M.indexOf("Chrome")?Ha=k:-1!=M.indexOf("Safari")&&(Ia=k));var Ja=Ca,Ka=Da,La=Ea,Ma=Fa,N=Ga,Na=Ha,Oa=Ia;var O=B&&!(B&&9<=H),Pa=B&&!(B&&8<=H);function Qa(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.G=e;this.parentNode=b}function Ra(a,b,c){var d=Pa&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Qa(b,a,b.nodeName,d,c)};function P(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(O&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),O&&"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} -function Q(a,b,c){if(b===l)return k;try{if(!a.getAttribute)return m}catch(d){return m}Pa&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function R(a,b,c,d,e){return(O?Sa:Ta).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new S)} -function Sa(a,b,c,d,e){if(8==a.g()||c&&a.g()===l){var f=b.all;if(!f)return e;a=a.getName();if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],q=0;b=f[q++];)Q(b,c,d)&&h.push(b);f=h}for(q=0;b=f[q++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Ua(a,b,c,d,e);return e} -function Ta(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){Q(a,c,d)&&e.add(a)}));return e} -function Va(a,b,c,d,e){var f;if((8==a.g()||c&&a.g()===l)&&(f=b.childNodes)){var h=a.getName();if("*"!=h&&(f=da(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=da(f,function(a){return Q(a,c,d)}));t(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return Wa(a,b,c,d,e)}function Wa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Q(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Ua(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Q(b,c,d)&&a.matches(b)&&e.add(b),Ua(a,b,c,d,e)};function S(){this.d=this.c=l;this.h=0}function Xa(a){this.m=a;this.next=this.j=l}S.prototype.unshift=function(a){a=new Xa(a);a.next=this.c;this.d?this.c.j=a:this.c=this.d=a;this.c=a;this.h++};S.prototype.add=function(a){a=new Xa(a);a.j=this.d;this.c?this.d.next=a:this.c=this.d=a;this.d=a;this.h++};function Ya(a){return(a=a.c)?a.m:l}function Za(a){return new $a(a,m)}function $a(a,b){this.D=a;this.k=(this.n=b)?a.d:a.c;this.r=l} -$a.prototype.next=function(){var a=this.k;if(a==l)return l;var b=this.r=a;this.k=this.n?a.j:a.next;return b.m};function T(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof S&&c instanceof S){e=Za(b);for(d=e.next();d;d=e.next()){b=Za(c);for(f=b.next();f;f=b.next())if(a(P(d),P(f)))return k}return m}if(b instanceof S||c instanceof S){b instanceof S?e=b:(e=c,c=b);e=Za(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+P(d);break;case "boolean":d=!!P(d);break;case "string":d=P(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return k}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function ab(a,b,c,d){this.s=a;this.H=b;this.p=c;this.q=d}ab.prototype.toString=function(){return this.s};var bb={};function U(a,b,c,d){if(a in bb)throw Error("Binary operator already created: "+a);a=new ab(a,b,c,d);bb[a.toString()]=a}U("div",6,1,function(a,b,c){return a.b(c)/b.b(c)});U("mod",6,1,function(a,b,c){return a.b(c)%b.b(c)});U("*",6,1,function(a,b,c){return a.b(c)*b.b(c)}); -U("+",5,1,function(a,b,c){return a.b(c)+b.b(c)});U("-",5,1,function(a,b,c){return a.b(c)-b.b(c)});U("<",4,2,function(a,b,c){return T(function(a,b){return a<b},a,b,c)});U(">",4,2,function(a,b,c){return T(function(a,b){return a>b},a,b,c)});U("<=",4,2,function(a,b,c){return T(function(a,b){return a<=b},a,b,c)});U(">=",4,2,function(a,b,c){return T(function(a,b){return a>=b},a,b,c)});U("=",3,2,function(a,b,c){return T(function(a,b){return a==b},a,b,c,k)}); -U("!=",3,2,function(a,b,c){return T(function(a,b){return a!=b},a,b,c,k)});U("and",2,2,function(a,b,c){return a.f(c)&&b.f(c)});U("or",1,2,function(a,b,c){return a.f(c)||b.f(c)});function cb(a,b,c,d,e,f,h,q,D){this.i=a;this.p=b;this.C=c;this.B=d;this.A=e;this.q=f;this.z=h;this.w=q!==g?q:h;this.F=!!D}cb.prototype.toString=function(){return this.i};var db={};function V(a,b,c,d,e,f,h,q){if(a in db)throw Error("Function already created: "+a+".");db[a]=new cb(a,b,c,d,m,e,f,h,q)}V("boolean",2,m,m,function(a,b){return b.f(a)},1);V("ceiling",1,m,m,function(a,b){return Math.ceil(b.b(a))},1); -V("concat",3,m,m,function(a,b){var c=ga(arguments,1);return ea(c,function(b,c){return b+c.a(a)})},2,l);V("contains",2,m,m,function(a,b,c){b=b.a(a);a=c.a(a);return-1!=b.indexOf(a)},2);V("count",1,m,m,function(a,b){return b.evaluate(a).h},1,1,k);V("false",2,m,m,n(m),0);V("floor",1,m,m,function(a,b){return Math.floor(b.b(a))},1); -V("id",4,m,m,function(a,b){function c(a){if(O){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return fa(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=b.a(a).split(/\s+/),f=[];t(d,function(a){a=c(a);var b;if(b=a){a:if(r(f))b=!r(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(ya);var h=new S;t(f,function(a){h.add(a)});return h},1); -V("lang",2,m,m,n(m),1);V("last",1,k,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.u()},0);V("local-name",3,m,k,function(a,b){var c=b?Ya(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,k);V("name",3,m,k,function(a,b){var c=b?Ya(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,k);V("namespace-uri",3,k,m,n(""),0,1,k);V("normalize-space",3,m,k,function(a,b){return(b?b.a(a):P(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -V("not",2,m,m,function(a,b){return!b.f(a)},1);V("number",1,m,k,function(a,b){return b?b.b(a):+P(a.e)},0,1);V("position",1,k,m,function(a){return a.v()},0);V("round",1,m,m,function(a,b){return Math.round(b.b(a))},1);V("starts-with",2,m,m,function(a,b,c){b=b.a(a);a=c.a(a);return 0==b.lastIndexOf(a,0)},2);V("string",3,m,k,function(a,b){return b?b.a(a):P(a.e)},0,1);V("string-length",1,m,k,function(a,b){return(b?b.a(a):P(a.e)).length},0,1); -V("substring",3,m,m,function(a,b,c,d){c=c.b(a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?d.b(a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=b.a(a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);V("substring-after",3,m,m,function(a,b,c){b=b.a(a);a=c.a(a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -V("substring-before",3,m,m,function(a,b,c){b=b.a(a);a=c.a(a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);V("sum",1,m,m,function(a,b){for(var c=Za(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+P(e);return d},1,1,k);V("translate",3,m,m,function(a,b,c,d){b=b.a(a);c=c.a(a);var e=d.a(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);V("true",2,m,m,n(k),0);function eb(a,b,c,d){this.i=a;this.t=b;this.n=c;this.J=d}eb.prototype.toString=function(){return this.i};var fb={};function W(a,b,c,d){if(a in fb)throw Error("Axis already created: "+a);fb[a]=new eb(a,b,c,!!d)}W("ancestor",function(a,b){for(var c=new S,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},k);W("ancestor-or-self",function(a,b){var c=new S,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},k); -W("attribute",function(a,b){var c=new S,d=a.getName();if("style"==d&&b.style&&O)return c.add(new Qa(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)O?h.nodeValue&&c.add(Ra(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(O?h.nodeValue&&c.add(Ra(b,h,b.sourceIndex)):c.add(h));return c},m);W("child",function(a,b,c,d,e){return(O?Va:Wa).call(l,a,b,r(c)?c:l,r(d)?d:l,e||new S)},m,k);W("descendant",R,m,k); -W("descendant-or-self",function(a,b,c,d){var e=new S;Q(b,c,d)&&a.matches(b)&&e.add(b);return R(a,b,c,d,e)},m,k);W("following",function(a,b,c,d){var e=new S;do for(var f=b;f=f.nextSibling;)Q(f,c,d)&&a.matches(f)&&e.add(f),e=R(a,f,c,d,e);while(b=b.parentNode);return e},m,k);W("following-sibling",function(a,b){for(var c=new S,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);W("namespace",function(){return new S},m); -W("parent",function(a,b){var c=new S;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);W("preceding",function(a,b,c,d){var e=new S,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,q=f.length;h<q;h++){var D=[];for(b=f[h];b=b.previousSibling;)D.unshift(b);for(var K=0,ba=D.length;K<ba;K++)b=D[K],Q(b,c,d)&&a.matches(b)&&e.add(b),e=R(a,b,c,d,e)}return e},k,k); -W("preceding-sibling",function(a,b){for(var c=new S,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},k);W("self",function(a,b){var c=new S;a.matches(b)&&c.add(b);return c},m);function X(a){return(a=a.exec(z()))?a[1]:""}var gb=function(){if(Ja)return X(/Firefox\/([0-9.]+)/);if(B||ma)return E;if(Na)return X(/Chrome\/([0-9.]+)/);if(Oa)return X(/Version\/([0-9.]+)/);if(La||Ma){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(z());if(a)return a[1]+"."+a[2]}else{if(N)return(a=X(/Android\s+([0-9.]+)/))?a:X(/Version\/([0-9.]+)/);if(Ka)return X(/Camino\/([0-9.]+)/)}return""}();var hb,ib,jb=function(){if(!C)return m;var a=p.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;hb=function(a){d.o(e,""+a)};ib=function(a){d.o(f,""+a)};return k}(),kb;if(N){var lb=/Android\s+([0-9\.]+)/.exec(z());kb=lb?lb[1]:"0"}else kb="0";var mb=kb; -N&&(jb?ib(2.3):N?s(mb,2.3):s(gb,2.3));!ma&&na&&(jb?hb("533"):B?s(H,"533"):ta("533"));function nb(a,b){var c=b||aa,d;d=(c||window).document;d="CSS1Compat"==d.compatMode?d.documentElement:d.body;d=new J(d.clientWidth,d.clientHeight);var e=a.x>=d.width?a.x-(d.width-1):0>a.x?a.x:0,f=a.y>=d.height?a.y-(d.height-1):0>a.y?a.y:0,h;h=c.document?new L(Ba(c.document)):I||(I=new L);h=wa(h.l);(0!=e||0!=f)&&c.scrollBy(e,f);c=c.document?new L(Ba(c.document)):I||(I=new L);c=wa(c.l);if(h.x+e!=c.x||h.y+f!=c.y)throw new u(34,"The target location ("+(a.x+h.x)+", "+(a.y+h.y)+") is not on the webpage."); -c=new va(a.x-e,a.y-f);if(0>c.x||c.x>=d.width)throw new u(34,"The target location ("+c.x+", "+c.y+") should be within the viewport ("+d.width+":"+d.height+") after scrolling.");if(0>c.y||c.y>=d.height)throw new u(34,"The target location ("+c.x+", "+c.y+") should be within the viewport ("+d.width+":"+d.height+") after scrolling.");return c}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&nb!==g?Z[$]=nb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_item.js b/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_item.js index f0c6ec610..caa3a1865 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_item.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_item.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(A()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):D?0<=v(na,a):J(a)}function W(a){return wa?va(a):S?0<=v(xa,a):0<=v(ta,a)} -var wa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(A());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ea,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||C||E&&V(3.5)||D&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var Ka;if(Ka=D)Ka=D&&9<=na;Ka||E&&J("1.9.1")}D&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=D&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("local_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}} -;function Xa(a){this.c=a}Xa.prototype.getItem=function(a){return this.c.getItem(a)};Xa.prototype.clear=function(){this.c.clear()};function Ya(a){if(!Wa())throw new s(13,"Local storage undefined");return(new Xa(r.localStorage)).getItem(a)};function Za(a){var b=Ya;a=[a];var c=window||r,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Pa(a,c.document),f=b.apply(k,e);d={status:0,value:X(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}b=[];Ba(new Aa,d,b);return b.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ga;if(Ga=z)Ga=z&&9<=na;Ga||A&&F("1.9.1")}z&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=z&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("local_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.c=a}Ta.prototype.getItem=function(a){return this.c.getItem(a)};Ta.prototype.clear=function(){this.c.clear()};function Ua(a){if(!Sa())throw new n(13,"Local storage undefined");return(new Ta(m.localStorage)).getItem(a)};function Va(a){var b=Ua;a=[a];var c=window||m,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=La(a,c.document),f=b.apply(null,e);d={status:0,value:X(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}b=[];U(new za,d,b);return b.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_keys.js b/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_keys.js index 89ff00078..0b42d2514 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_keys.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_keys.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,ta=Q;function T(a){return(a=a.exec(A()))?a[1]:""}var ua=function(){if(oa)return T(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return T(/Chrome\/([0-9.]+)/);if(ta)return T(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(pa)return T(/Camino\/([0-9.]+)/)}return""}();var va,wa;function U(a){return xa?va(a):D?0<=v(na,a):J(a)}function V(a){return xa?wa(a):S?0<=v(ya,a):0<=v(ua,a)} -var xa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;va=function(a){return 0<=d.d(e,""+a)};wa=function(a){return 0<=d.d(f,""+a)};return h}(),za;if(S){var Aa=/Android\s+([0-9\.]+)/.exec(A());za=Aa?Aa[1]:"0"}else za="0";var ya=za;S&&V(2.3);function Ba(){this.a=g} -function Ca(a,b,c){switch(typeof b){case "string":Da(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ca(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Da(f, -c),c.push(":"),Ca(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ea={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ja=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Da(a,b){b.push('"',a.replace(Ja,function(a){if(a in Ea)return Ea[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ea[a]=e+b.toString(16)}),'"')};fa||C||E&&U(3.5)||D&&U(8);function Ka(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var La;if(La=D)La=D&&9<=na;La||E&&J("1.9.1")}D&&J("9");function Ma(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Na(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Oa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function W(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ka(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Pa(a);return b}if("document"in a)return b={},b.WINDOW=Pa(a),b;if(aa(a))return Ka(a,W);a=Ma(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Na(a,W);default:return k}} -function Qa(a,b){return"array"==q(a)?Ka(a,function(a){return Qa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ra(a.ELEMENT,b):"WINDOW"in a?Ra(a.WINDOW,b):Na(a,function(a){return Qa(a,b)}):a}function Sa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.c=ca());b.c||(b.c=ca());return b}function Pa(a){var b=Sa(a.ownerDocument),c=Oa(b,function(b){return b==a});c||(c=":wdc:"+b.c++,b[c]=a);return c} -function Ra(a,b){a=decodeURIComponent(a);var c=b||document,d=Sa(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Ta=D&&U(8)&&!U(9),Ua=ta&&V(4)&&!V(5),Va=S&&V(2.2)&&!V(2.3),Wa=ha&&ta&&V(4)&&!V(6); -function Xa(){var a=r||r;switch("local_storage"){case "appcache":return Ta?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ua||Va?l:a.openDatabase!=k;case "location":return Wa?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Ta?l:a.localStorage!=k;case "session_storage":return Ta?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}} -;function X(a){this.b=a}X.prototype.clear=function(){this.b.clear()};X.prototype.size=function(){return this.b.length};X.prototype.key=function(a){return this.b.key(a)};function Ya(){var a;if(!Xa())throw new s(13,"Local storage undefined");a=new X(r.localStorage);for(var b=[],c=a.size(),d=0;d<c;d++)b[d]=a.b.key(d);return b};function Za(){var a=Ya,b=[],c=window||r,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Qa(b,c.document),f=a.apply(k,e);d={status:0,value:W(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}a=[];Ca(new Ba,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function Ga(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ha;if(Ha=z)Ha=z&&9<=na;Ha||A&&F("1.9.1")}z&&F("9");function Ia(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ja(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ka(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function W(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ga(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=La(a);return b}if("document"in a)return b={},b.WINDOW=La(a),b;if(aa(a))return Ga(a,W);a=Ia(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ja(a,W);default:return null}} +function Ma(a,b){return"array"==h(a)?Ga(a,function(a){return Ma(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Na(a.ELEMENT,b):"WINDOW"in a?Na(a.WINDOW,b):Ja(a,function(a){return Ma(a,b)}):a}function Oa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.c=ca());b.c||(b.c=ca());return b}function La(a){var b=Oa(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.c++,b[c]=a);return c} +function Na(a,b){a=decodeURIComponent(a);var c=b||document,d=Oa(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Pa=z&&R(8)&&!R(9),Qa=P&&S(4)&&!S(5),Ra=O&&S(2.2)&&!S(2.3),Sa=ha&&P&&S(4)&&!S(6); +function Ta(){var a=m||m;switch("local_storage"){case "appcache":return Pa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Qa||Ra?!1:null!=a.openDatabase;case "location":return Sa?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Pa?!1:null!=a.localStorage;case "session_storage":return Pa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function X(a){this.b=a}X.prototype.clear=function(){this.b.clear()};X.prototype.size=function(){return this.b.length};X.prototype.key=function(a){return this.b.key(a)};function Ua(){var a;if(!Ta())throw new n(13,"Local storage undefined");a=new X(m.localStorage);for(var b=[],c=a.size(),d=0;d<c;d++)b[d]=a.b.key(d);return b};function Va(){var a=Ua,b=[],c=window||m,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Ma(b,c.document),f=a.apply(null,e);d={status:0,value:W(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}a=[];U(new za,d,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_size.js b/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_size.js index 31894fe98..ac4b0c6db 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_size.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_local_storage_size.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(A()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):D?0<=v(na,a):J(a)}function W(a){return wa?va(a):S?0<=v(xa,a):0<=v(ta,a)} -var wa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(A());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ea,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||C||E&&V(3.5)||D&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var Ka;if(Ka=D)Ka=D&&9<=na;Ka||E&&J("1.9.1")}D&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=D&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("local_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}} -;function Xa(a){this.c=a}Xa.prototype.clear=function(){this.c.clear()};Xa.prototype.size=function(){return this.c.length};function Ya(){if(!Wa())throw new s(13,"Local storage undefined");return(new Xa(r.localStorage)).size()};function Za(){var a=Ya,b=[],c=window||r,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Pa(b,c.document),f=a.apply(k,e);d={status:0,value:X(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}a=[];Ba(new Aa,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ga;if(Ga=z)Ga=z&&9<=na;Ga||A&&F("1.9.1")}z&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=z&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("local_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.c=a}Ta.prototype.clear=function(){this.c.clear()};Ta.prototype.size=function(){return this.c.length};function Ua(){if(!Sa())throw new n(13,"Local storage undefined");return(new Ta(m.localStorage)).size()};function Va(){var a=Ua,b=[],c=window||m,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=La(b,c.document),f=a.apply(null,e);d={status:0,value:X(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}a=[];U(new za,d,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_location.js b/src/ghostdriver/third_party/webdriver-atoms/get_location.js index 33e2d8957..a43e9d4ee 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_location.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_location.js @@ -1,7 +1,7 @@ -function(){return function(){var e=this;var g,m,n,p;function q(){return e.navigator?e.navigator.userAgent:null}p=n=m=g=!1;var r;if(r=q()){var s=e.navigator;g=0==r.indexOf("Opera");m=!g&&-1!=r.indexOf("MSIE");n=!g&&-1!=r.indexOf("WebKit");p=!g&&!n&&"Gecko"==s.product}var t=g,u=m,v=p,w=n;function x(){var a=e.document;return a?a.documentMode:void 0}var y; -a:{var z="",A;if(t&&e.opera)var B=e.opera.version,z="function"==typeof B?B():B;else if(v?A=/rv\:([^\);]+)(\)|;)/:u?A=/MSIE\s+([^\);]+)(\)|;)/:w&&(A=/WebKit\/(\S+)/),A)var C=A.exec(q()),z=C?C[1]:"";if(u){var D=x();if(D>parseFloat(z)){y=String(D);break a}}y=z}var E={}; -function F(a){if(!E[a]){for(var b=0,c=String(y).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),h=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),G=Math.max(c.length,h.length),d=0;0==b&&d<G;d++){var f=c[d]||"",S=h[d]||"",T=RegExp("(\\d*)(\\D*)","g"),U=RegExp("(\\d*)(\\D*)","g");do{var k=T.exec(f)||["","",""],l=U.exec(S)||["","",""];if(0==k[0].length&&0==l[0].length)break;b=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> -(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==b)}E[a]=0<=b}}var H=e.document,I=!H||!u?void 0:x()||("CSS1Compat"==H.compatMode?parseInt(y,10):5);var J;!v&&!u||u&&u&&9<=I||v&&F("1.9.1");u&&F("9");function K(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}K.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function L(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function M(a){this.a=a||e.document||document};function N(a){var b;a:{b=L(a);if(b.defaultView&&b.defaultView.getComputedStyle&&(b=b.defaultView.getComputedStyle(a,null))){b=b.position||b.getPropertyValue("position")||"";break a}b=""}return b||(a.currentStyle?a.currentStyle.position:null)||a.style&&a.style.position} -function O(a){if(u&&!(u&&8<=I))return a.offsetParent;var b=L(a),c=N(a),h="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=N(a),h=h&&"static"==c&&a!=b.documentElement&&a!=b.body,!h&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null};function P(a){var b,c=L(a),h=N(a),G=v&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==h&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),d=new K(0,0),f;b=c?L(c):document;if(f=u)if(f=!(u&&9<=I))f="CSS1Compat"!=(b?new M(L(b)):J||(J=new M)).a.compatMode;f=f?b.body:b.documentElement;if(a==f)return d;if(a.getBoundingClientRect)b=a.getBoundingClientRect(),u&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop),a=(c? -new M(L(c)):J||(J=new M)).a,c=!w&&"CSS1Compat"==a.compatMode?a.documentElement:a.body,a=a.parentWindow||a.defaultView,c=new K(a.pageXOffset||c.scrollLeft,a.pageYOffset||c.scrollTop),d.x=b.left+c.x,d.y=b.top+c.y;else if(c.getBoxObjectFor&&!G)b=c.getBoxObjectFor(a),c=c.getBoxObjectFor(f),d.x=b.screenX-c.screenX,d.y=b.screenY-c.screenY;else{b=a;do{d.x+=b.offsetLeft;d.y+=b.offsetTop;b!=a&&(d.x+=b.clientLeft||0,d.y+=b.clientTop||0);if(w&&"fixed"==N(b)){d.x+=c.body.scrollLeft;d.y+=c.body.scrollTop;break}b= -b.offsetParent}while(b&&b!=a);if(t||w&&"absolute"==h)d.y-=c.body.offsetTop;for(b=a;(b=O(b))&&b!=c.body&&b!=f;)if(d.x-=b.scrollLeft,!t||"TR"!=b.tagName)d.y-=b.scrollTop}return d}var Q=["_"],R=e;!(Q[0]in R)&&R.execScript&&R.execScript("var "+Q[0]);for(var V;Q.length&&(V=Q.shift());)!Q.length&&void 0!==P?R[V]=P:R=R[V]?R[V]:R[V]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var e=this;var g,n,p,q;function r(){return e.navigator?e.navigator.userAgent:null}q=p=n=g=!1;var s;if(s=r()){var t=e.navigator;g=0==s.indexOf("Opera");n=!g&&-1!=s.indexOf("MSIE");p=!g&&-1!=s.indexOf("WebKit");q=!g&&!p&&"Gecko"==t.product}var u=g,v=n,w=q,x=p;function y(){var a=e.document;return a?a.documentMode:void 0}var z; +a:{var A="",B;if(u&&e.opera)var C=e.opera.version,A="function"==typeof C?C():C;else if(w?B=/rv\:([^\);]+)(\)|;)/:v?B=/MSIE\s+([^\);]+)(\)|;)/:x&&(B=/WebKit\/(\S+)/),B)var D=B.exec(r()),A=D?D[1]:"";if(v){var E=y();if(E>parseFloat(A)){z=String(E);break a}}z=A}var F={}; +function G(a){var b;if(!(b=F[a])){b=0;for(var c=String(z).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),h=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),J=Math.max(c.length,h.length),d=0;0==b&&d<J;d++){var f=c[d]||"",m=h[d]||"",Q=RegExp("(\\d*)(\\D*)","g"),U=RegExp("(\\d*)(\\D*)","g");do{var k=Q.exec(f)||["","",""],l=U.exec(m)||["","",""];if(0==k[0].length&&0==l[0].length)break;b=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1], +10))>(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==b)}b=F[a]=0<=b}return b}var H=e.document,I=H&&v?y()||("CSS1Compat"==H.compatMode?parseInt(z,10):5):void 0;var K;!w&&!v||v&&v&&9<=I||w&&G("1.9.1");v&&G("9");function L(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}L.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function M(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function N(a){this.a=a||e.document||document};function O(a){var b;a:{b=M(a);if(b.defaultView&&b.defaultView.getComputedStyle&&(b=b.defaultView.getComputedStyle(a,null))){b=b.position||b.getPropertyValue("position")||"";break a}b=""}return b||(a.currentStyle?a.currentStyle.position:null)||a.style&&a.style.position} +function P(a){if(v&&!(v&&8<=I))return a.offsetParent;var b=M(a),c=O(a),h="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=O(a),h=h&&"static"==c&&a!=b.documentElement&&a!=b.body,!h&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null};function R(a){var b,c=M(a),h=O(a),J=w&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==h&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),d=new L(0,0),f;b=c?M(c):document;(f=!v)||(f=v&&9<=I)||(f="CSS1Compat"==(b?new N(M(b)):K||(K=new N)).a.compatMode);f=f?b.documentElement:b.body;if(a==f)return d;if(a.getBoundingClientRect){a:{var m;try{m=a.getBoundingClientRect()}catch(Q){b={left:0,top:0,right:0,bottom:0};break a}v&&a.ownerDocument.body&&(b=a.ownerDocument,m.left-=b.documentElement.clientLeft+ +b.body.clientLeft,m.top-=b.documentElement.clientTop+b.body.clientTop);b=m}a=(c?new N(M(c)):K||(K=new N)).a;c=x||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement;a=a.parentWindow||a.defaultView;c=v&&G("10")&&a.pageYOffset!=c.scrollTop?new L(c.scrollLeft,c.scrollTop):new L(a.pageXOffset||c.scrollLeft,a.pageYOffset||c.scrollTop);d.x=b.left+c.x;d.y=b.top+c.y}else if(c.getBoxObjectFor&&!J)b=c.getBoxObjectFor(a),c=c.getBoxObjectFor(f),d.x=b.screenX-c.screenX,d.y=b.screenY-c.screenY; +else{b=a;do{d.x+=b.offsetLeft;d.y+=b.offsetTop;b!=a&&(d.x+=b.clientLeft||0,d.y+=b.clientTop||0);if(x&&"fixed"==O(b)){d.x+=c.body.scrollLeft;d.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(u||x&&"absolute"==h)d.y-=c.body.offsetTop;for(b=a;(b=P(b))&&b!=c.body&&b!=f;)d.x-=b.scrollLeft,u&&"TR"==b.tagName||(d.y-=b.scrollTop)}return d}var S=["_"],T=e;S[0]in T||!T.execScript||T.execScript("var "+S[0]);for(var V;S.length&&(V=S.shift());)S.length||void 0===R?T=T[V]?T[V]:T[V]={}:T[V]=R;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_location_in_view.js b/src/ghostdriver/third_party/webdriver-atoms/get_location_in_view.js index d3cbbd0d9..fb46468c5 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_location_in_view.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_location_in_view.js @@ -1,36 +1,15 @@ -function(){return function(){var g=void 0,k=!0,l=null,m=!1;function aa(a){return function(){return a}}var n=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function p(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);function ca(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var r=d[h]||"",B=e[h]||"",t=RegExp("(\\d*)(\\D*)","g"),s=RegExp("(\\d*)(\\D*)","g");do{var u=t.exec(r)||["","",""],v=s.exec(B)||["","",""];if(0==u[0].length&&0==v[0].length)break;c=((0==u[1].length?0:parseInt(u[1],10))<(0==v[1].length?0:parseInt(v[1],10))?-1:(0==u[1].length?0:parseInt(u[1],10))>(0==v[1].length? -0:parseInt(v[1],10))?1:0)||((0==u[2].length)<(0==v[2].length)?-1:(0==u[2].length)>(0==v[2].length)?1:0)||(u[2]<v[2]?-1:u[2]>v[2]?1:0)}while(0==c)}return c};var da=Array.prototype;function w(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function ea(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var r=f[h];b.call(g,r,h,a)&&(d[e++]=r)}return d}function fa(a,b){if(a.reduce)return a.reduce(b,"");var c="";w(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function ga(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:p(a)?a.charAt(c):a[c]}function ha(a,b,c){return 2>=arguments.length?da.slice.call(a,b):da.slice.call(a,b,c)};var x,ia,ja,ka;function y(){return n.navigator?n.navigator.userAgent:l}ka=ja=ia=x=m;var la;if(la=y()){var ma=n.navigator;x=0==la.indexOf("Opera");ia=!x&&-1!=la.indexOf("MSIE");ja=!x&&-1!=la.indexOf("WebKit");ka=!x&&!ja&&"Gecko"==ma.product}var z=x,A=ia,C=ka,D=ja;function na(){var a=n.document;return a?a.documentMode:g}var F; -a:{var oa="",G;if(z&&n.opera)var pa=n.opera.version,oa="function"==typeof pa?pa():pa;else if(C?G=/rv\:([^\);]+)(\)|;)/:A?G=/MSIE\s+([^\);]+)(\)|;)/:D&&(G=/WebKit\/(\S+)/),G)var qa=G.exec(y()),oa=qa?qa[1]:"";if(A){var ra=na();if(ra>parseFloat(oa)){F=String(ra);break a}}F=oa}var sa={};function ta(a){return sa[a]||(sa[a]=0<=ca(F,a))}var ua=n.document,H=!ua||!A?g:na()||("CSS1Compat"==ua.compatMode?parseInt(F,10):5);var va;!C&&!A||A&&A&&9<=H||C&&ta("1.9.1");A&&ta("9");function I(a,b){this.x=a!==g?a:0;this.y=b!==g?b:0}I.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function J(a,b){this.width=a;this.height=b}J.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};J.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};J.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};J.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function wa(a){return a?new xa(K(a)):va||(va=new xa)}function ya(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function za(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!(A&&9<=H)){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?Aa(a,b):!c&&ya(e,b)?-1*Ba(a,b):!d&&ya(f,a)?Ba(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=K(a);c=d.createRange(); -c.selectNode(a);c.collapse(k);d=d.createRange();d.selectNode(b);d.collapse(k);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Ba(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Aa(d,a)}function Aa(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function K(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function xa(a){this.g=a||n.document||document} -function Ca(a){var b=a.g;a=!D&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new I(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}xa.prototype.contains=ya;var Da,Ea,Fa,Ga,Ha,Ia,Ja;Ja=Ia=Ha=Ga=Fa=Ea=Da=m;var L=y();L&&(-1!=L.indexOf("Firefox")?Da=k:-1!=L.indexOf("Camino")?Ea=k:-1!=L.indexOf("iPhone")||-1!=L.indexOf("iPod")?Fa=k:-1!=L.indexOf("iPad")?Ga=k:-1!=L.indexOf("Android")?Ha=k:-1!=L.indexOf("Chrome")?Ia=k:-1!=L.indexOf("Safari")&&(Ja=k));var Ka=Da,La=Ea,Ma=Fa,Na=Ga,Oa=Ha,Pa=Ia,Qa=Ja;var M=A&&!(A&&9<=H),Ra=A&&!(A&&8<=H);function Sa(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.H=e;this.parentNode=b}function Ta(a,b,c){var d=Ra&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Sa(b,a,b.nodeName,d,c)};function N(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(M&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),M&&"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} -function O(a,b,c){if(b===l)return k;try{if(!a.getAttribute)return m}catch(d){return m}Ra&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ua(a,b,c,d,e){return(M?Va:Wa).call(l,a,b,p(c)?c:l,p(d)?d:l,e||new P)} -function Va(a,b,c,d,e){if(8==a.h()||c&&a.h()===l){var f=b.all;if(!f)return e;a=a.getName();if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],r=0;b=f[r++];)O(b,c,d)&&h.push(b);f=h}for(r=0;b=f[r++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Xa(a,b,c,d,e);return e} -function Wa(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){O(a,c,d)&&e.add(a)}));return e} -function Ya(a,b,c,d,e){var f;if((8==a.h()||c&&a.h()===l)&&(f=b.childNodes)){var h=a.getName();if("*"!=h&&(f=ea(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ea(f,function(a){return O(a,c,d)}));w(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return Za(a,b,c,d,e)}function Za(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Xa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)O(b,c,d)&&a.matches(b)&&e.add(b),Xa(a,b,c,d,e)};function P(){this.d=this.c=l;this.i=0}function $a(a){this.n=a;this.next=this.k=l}P.prototype.unshift=function(a){a=new $a(a);a.next=this.c;this.d?this.c.k=a:this.c=this.d=a;this.c=a;this.i++};P.prototype.add=function(a){a=new $a(a);a.k=this.d;this.c?this.d.next=a:this.c=this.d=a;this.d=a;this.i++};function ab(a){return(a=a.c)?a.n:l}function bb(a){return new cb(a,m)}function cb(a,b){this.F=a;this.l=(this.o=b)?a.d:a.c;this.s=l} -cb.prototype.next=function(){var a=this.l;if(a==l)return l;var b=this.s=a;this.l=this.o?a.k:a.next;return b.n};function Q(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof P&&c instanceof P){e=bb(b);for(d=e.next();d;d=e.next()){b=bb(c);for(f=b.next();f;f=b.next())if(a(N(d),N(f)))return k}return m}if(b instanceof P||c instanceof P){b instanceof P?e=b:(e=c,c=b);e=bb(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+N(d);break;case "boolean":d=!!N(d);break;case "string":d=N(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return k}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function db(a,b,c,d){this.t=a;this.I=b;this.q=c;this.r=d}db.prototype.toString=function(){return this.t};var eb={};function R(a,b,c,d){if(a in eb)throw Error("Binary operator already created: "+a);a=new db(a,b,c,d);eb[a.toString()]=a}R("div",6,1,function(a,b,c){return a.b(c)/b.b(c)});R("mod",6,1,function(a,b,c){return a.b(c)%b.b(c)});R("*",6,1,function(a,b,c){return a.b(c)*b.b(c)}); -R("+",5,1,function(a,b,c){return a.b(c)+b.b(c)});R("-",5,1,function(a,b,c){return a.b(c)-b.b(c)});R("<",4,2,function(a,b,c){return Q(function(a,b){return a<b},a,b,c)});R(">",4,2,function(a,b,c){return Q(function(a,b){return a>b},a,b,c)});R("<=",4,2,function(a,b,c){return Q(function(a,b){return a<=b},a,b,c)});R(">=",4,2,function(a,b,c){return Q(function(a,b){return a>=b},a,b,c)});R("=",3,2,function(a,b,c){return Q(function(a,b){return a==b},a,b,c,k)}); -R("!=",3,2,function(a,b,c){return Q(function(a,b){return a!=b},a,b,c,k)});R("and",2,2,function(a,b,c){return a.f(c)&&b.f(c)});R("or",1,2,function(a,b,c){return a.f(c)||b.f(c)});function fb(a,b,c,d,e,f,h,r,B){this.j=a;this.q=b;this.D=c;this.C=d;this.B=e;this.r=f;this.A=h;this.z=r!==g?r:h;this.G=!!B}fb.prototype.toString=function(){return this.j};var gb={};function S(a,b,c,d,e,f,h,r){if(a in gb)throw Error("Function already created: "+a+".");gb[a]=new fb(a,b,c,d,m,e,f,h,r)}S("boolean",2,m,m,function(a,b){return b.f(a)},1);S("ceiling",1,m,m,function(a,b){return Math.ceil(b.b(a))},1); -S("concat",3,m,m,function(a,b){var c=ha(arguments,1);return fa(c,function(b,c){return b+c.a(a)})},2,l);S("contains",2,m,m,function(a,b,c){b=b.a(a);a=c.a(a);return-1!=b.indexOf(a)},2);S("count",1,m,m,function(a,b){return b.evaluate(a).i},1,1,k);S("false",2,m,m,aa(m),0);S("floor",1,m,m,function(a,b){return Math.floor(b.b(a))},1); -S("id",4,m,m,function(a,b){function c(a){if(M){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ga(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=b.a(a).split(/\s+/),f=[];w(d,function(a){a=c(a);var b;if(b=a){a:if(p(f))b=!p(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(za);var h=new P;w(f,function(a){h.add(a)});return h},1); -S("lang",2,m,m,aa(m),1);S("last",1,k,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.v()},0);S("local-name",3,m,k,function(a,b){var c=b?ab(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,k);S("name",3,m,k,function(a,b){var c=b?ab(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,k);S("namespace-uri",3,k,m,aa(""),0,1,k); -S("normalize-space",3,m,k,function(a,b){return(b?b.a(a):N(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);S("not",2,m,m,function(a,b){return!b.f(a)},1);S("number",1,m,k,function(a,b){return b?b.b(a):+N(a.e)},0,1);S("position",1,k,m,function(a){return a.w()},0);S("round",1,m,m,function(a,b){return Math.round(b.b(a))},1);S("starts-with",2,m,m,function(a,b,c){b=b.a(a);a=c.a(a);return 0==b.lastIndexOf(a,0)},2);S("string",3,m,k,function(a,b){return b?b.a(a):N(a.e)},0,1); -S("string-length",1,m,k,function(a,b){return(b?b.a(a):N(a.e)).length},0,1);S("substring",3,m,m,function(a,b,c,d){c=c.b(a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?d.b(a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=b.a(a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);S("substring-after",3,m,m,function(a,b,c){b=b.a(a);a=c.a(a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -S("substring-before",3,m,m,function(a,b,c){b=b.a(a);a=c.a(a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);S("sum",1,m,m,function(a,b){for(var c=bb(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+N(e);return d},1,1,k);S("translate",3,m,m,function(a,b,c,d){b=b.a(a);c=c.a(a);var e=d.a(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);S("true",2,m,m,aa(k),0);function hb(a,b,c,d){this.j=a;this.u=b;this.o=c;this.J=d}hb.prototype.toString=function(){return this.j};var ib={};function T(a,b,c,d){if(a in ib)throw Error("Axis already created: "+a);ib[a]=new hb(a,b,c,!!d)}T("ancestor",function(a,b){for(var c=new P,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},k);T("ancestor-or-self",function(a,b){var c=new P,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},k); -T("attribute",function(a,b){var c=new P,d=a.getName();if("style"==d&&b.style&&M)return c.add(new Sa(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)M?h.nodeValue&&c.add(Ta(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(M?h.nodeValue&&c.add(Ta(b,h,b.sourceIndex)):c.add(h));return c},m);T("child",function(a,b,c,d,e){return(M?Ya:Za).call(l,a,b,p(c)?c:l,p(d)?d:l,e||new P)},m,k);T("descendant",Ua,m,k); -T("descendant-or-self",function(a,b,c,d){var e=new P;O(b,c,d)&&a.matches(b)&&e.add(b);return Ua(a,b,c,d,e)},m,k);T("following",function(a,b,c,d){var e=new P;do for(var f=b;f=f.nextSibling;)O(f,c,d)&&a.matches(f)&&e.add(f),e=Ua(a,f,c,d,e);while(b=b.parentNode);return e},m,k);T("following-sibling",function(a,b){for(var c=new P,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);T("namespace",function(){return new P},m); -T("parent",function(a,b){var c=new P;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);T("preceding",function(a,b,c,d){var e=new P,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,r=f.length;h<r;h++){var B=[];for(b=f[h];b=b.previousSibling;)B.unshift(b);for(var t=0,s=B.length;t<s;t++)b=B[t],O(b,c,d)&&a.matches(b)&&e.add(b),e=Ua(a,b,c,d,e)}return e},k,k); -T("preceding-sibling",function(a,b){for(var c=new P,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},k);T("self",function(a,b){var c=new P;a.matches(b)&&c.add(b);return c},m);function U(a){return(a=a.exec(y()))?a[1]:""}var jb=function(){if(Ka)return U(/Firefox\/([0-9.]+)/);if(A||z)return F;if(Pa)return U(/Chrome\/([0-9.]+)/);if(Qa)return U(/Version\/([0-9.]+)/);if(Ma||Na){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(y());if(a)return a[1]+"."+a[2]}else{if(Oa)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(La)return U(/Camino\/([0-9.]+)/)}return""}();var kb,lb,mb=function(){if(!C)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;kb=function(a){d.p(e,""+a)};lb=function(a){d.p(f,""+a)};return k}(),nb;if(Oa){var ob=/Android\s+([0-9\.]+)/.exec(y());nb=ob?ob[1]:"0"}else nb="0";var pb=nb; -Oa&&(mb?lb(2.3):Oa?ca(pb,2.3):ca(jb,2.3));!z&&D&&(mb?kb("533"):A?ca(H,"533"):ta("533"));function V(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}V.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};V.prototype.contains=function(a){return!this||!a?m:a instanceof V?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function W(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}W.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};W.prototype.contains=function(a){return a instanceof W?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function X(a,b){var c=K(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,l))?c[b]||c.getPropertyValue(b)||"":""}function Y(a,b){return X(a,b)||(a.currentStyle?a.currentStyle[b]:l)||a.style&&a.style[b]}function qb(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function rb(a){if(A&&!(A&&8<=H))return a.offsetParent;var b=K(a),c=Y(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Y(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return l} -function sb(a){var b,c=K(a),d=Y(a,"position"),e=C&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new I(0,0),h;b=c?K(c):document;if(h=A)if(h=!(A&&9<=H))h="CSS1Compat"!=wa(b).g.compatMode;h=h?b.body:b.documentElement;if(a==h)return f;if(a.getBoundingClientRect)b=qb(a),a=Ca(wa(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY; -else{e=a;do{f.x+=e.offsetLeft;f.y+=e.offsetTop;e!=a&&(f.x+=e.clientLeft||0,f.y+=e.clientTop||0);if(D&&"fixed"==Y(e,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}e=e.offsetParent}while(e&&e!=a);if(z||D&&"absolute"==d)f.y-=c.body.offsetTop;for(e=a;(e=rb(e))&&e!=c.body&&e!=h;)if(f.x-=e.scrollLeft,!z||"TR"!=e.tagName)f.y-=e.scrollTop}return f}var tb={thin:2,medium:4,thick:6}; -function ub(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:l))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:l,d;if(c in tb)d=tb[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var vb=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function wb(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return a&&1==a.nodeType?a:l}function xb(a,b){b.scrollLeft+=Math.min(a.left,Math.max(a.left-a.width,0));b.scrollTop+=Math.min(a.top,Math.max(a.top-a.height,0))};function yb(a,b){var c;c=b?new W(b.left,b.top,b.width,b.height):new W(0,0,a.offsetWidth,a.offsetHeight);for(var d=K(a),e=wb(a);e&&e!=d.body&&e!=d.documentElement;e=wb(e)){var f=c,h=e,r=sb(a),B=sb(h),t;var s=h;if(A){t=ub(s,"borderLeft");var u=ub(s,"borderRight"),v=ub(s,"borderTop"),s=ub(s,"borderBottom");t=new V(v,u,s,t)}else t=X(s,"borderLeftWidth"),u=X(s,"borderRightWidth"),v=X(s,"borderTopWidth"),s=X(s,"borderBottomWidth"),t=new V(parseFloat(v),parseFloat(u),parseFloat(s),parseFloat(t));xb(new W(r.x+ -f.left-B.x-t.left,r.y+f.top-B.y-t.top,h.clientWidth-f.width,h.clientHeight-f.height),h)}e=sb(a);f=wa(d);f=(f.g.parentWindow||f.g.defaultView||window).document;f="CSS1Compat"==f.compatMode?f.documentElement:f.body;f=new J(f.clientWidth,f.clientHeight);xb(new W(e.x+c.left-(d.body?d.body.scrollLeft:0),e.y+c.top-(d.body?d.body.scrollTop:0),f.width-c.width,f.height-c.height),d.body||d.documentElement);var d=a.getClientRects?a.getClientRects()[0]:l,q;if(d)q=new I(d.left,d.top);else{d=new I;if(1==a.nodeType){if(a.getBoundingClientRect? -(e=qb(a),d.x=e.left,d.y=e.top):(e=Ca(wa(a)),f=sb(a),d.x=f.x-e.x,d.y=f.y-e.y),C&&!ta(12)){A?q="-ms-transform":D?q="-webkit-transform":z?q="-o-transform":C&&(q="-moz-transform");var E;q&&(E=Y(a,q));E||(E=Y(a,"transform"));E?(q=E.match(vb),q=!q?new I(0,0):new I(parseFloat(q[1]),parseFloat(q[2]))):q=new I(0,0);d=new I(d.x+q.x,d.y+q.y)}}else q="function"==ba(a.m),E=a,a.targetTouches?E=a.targetTouches[0]:q&&a.m().targetTouches&&(E=a.m().targetTouches[0]),d.x=E.clientX,d.y=E.clientY;q=d}return new I(q.x+ -c.left,q.y+c.top)}var Z=["_"],$=n;!(Z[0]in $)&&$.execScript&&$.execScript("var "+Z[0]);for(var zb;Z.length&&(zb=Z.shift());)!Z.length&&yb!==g?$[zb]=yb:$=$[zb]?$[zb]:$[zb]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var h=this; +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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b};var k,l,p,q;function r(){return h.navigator?h.navigator.userAgent:null}q=p=l=k=!1;var s;if(s=r()){var ca=h.navigator;k=0==s.indexOf("Opera");l=!k&&-1!=s.indexOf("MSIE");p=!k&&-1!=s.indexOf("WebKit");q=!k&&!p&&"Gecko"==ca.product}var t=k,u=l,v=q,w=p;function x(){var a=h.document;return a?a.documentMode:void 0}var y; +a:{var z="",A;if(t&&h.opera)var B=h.opera.version,z="function"==typeof B?B():B;else if(v?A=/rv\:([^\);]+)(\)|;)/:u?A=/MSIE\s+([^\);]+)(\)|;)/:w&&(A=/WebKit\/(\S+)/),A)var C=A.exec(r()),z=C?C[1]:"";if(u){var D=x();if(D>parseFloat(z)){y=String(D);break a}}y=z}var E={}; +function F(a){var b;if(!(b=E[a])){b=0;for(var c=String(y).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(c.length,d.length),e=0;0==b&&e<f;e++){var g=c[e]||"",ea=d[e]||"",fa=RegExp("(\\d*)(\\D*)","g"),ga=RegExp("(\\d*)(\\D*)","g");do{var m=fa.exec(g)||["","",""],n=ga.exec(ea)||["","",""];if(0==m[0].length&&0==n[0].length)break;b=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1], +10))>(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==b)}b=E[a]=0<=b}return b}var G=h.document,H=G&&u?x()||("CSS1Compat"==G.compatMode?parseInt(y,10):5):void 0;var I;!v&&!u||u&&u&&9<=H||v&&F("1.9.1");u&&F("9");function J(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}J.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function K(a,b){this.width=a;this.height=b}K.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};function L(a){return a?new M(N(a)):I||(I=new M)}function N(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function M(a){this.a=a||h.document||document}function da(a){a=(a.a.parentWindow||a.a.defaultView||window).document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new K(a.clientWidth,a.clientHeight)} +function O(a){var b=a.a;a=w||"CSS1Compat"!=b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;return u&&F("10")&&b.pageYOffset!=a.scrollTop?new J(a.scrollLeft,a.scrollTop):new J(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)};function P(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}P.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};function Q(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}Q.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};function R(a,b){var c=N(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function S(a,b){return R(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]} +function T(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}u&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} +function ha(a){if(u&&!(u&&8<=H))return a.offsetParent;var b=N(a),c=S(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=S(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null} +function U(a){var b,c=N(a),d=S(a,"position"),f=v&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),e=new J(0,0),g;b=c?N(c):document;(g=!u)||(g=u&&9<=H)||(g="CSS1Compat"==L(b).a.compatMode);g=g?b.documentElement:b.body;if(a==g)return e;if(a.getBoundingClientRect)b=T(a),a=O(L(c)),e.x=b.left+a.x,e.y=b.top+a.y;else if(c.getBoxObjectFor&&!f)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),e.x=b.screenX-a.screenX,e.y=b.screenY-a.screenY;else{f= +a;do{e.x+=f.offsetLeft;e.y+=f.offsetTop;f!=a&&(e.x+=f.clientLeft||0,e.y+=f.clientTop||0);if(w&&"fixed"==S(f,"position")){e.x+=c.body.scrollLeft;e.y+=c.body.scrollTop;break}f=f.offsetParent}while(f&&f!=a);if(t||w&&"absolute"==d)e.y-=c.body.offsetTop;for(f=a;(f=ha(f))&&f!=c.body&&f!=g;)e.x-=f.scrollLeft,t&&"TR"==f.tagName||(e.y-=f.scrollTop)}return e} +function V(a){if(1==a.nodeType){var b;if(a.getBoundingClientRect)b=T(a),b=new J(b.left,b.top);else{b=O(L(a));var c=U(a);b=new J(c.x-b.x,c.y-b.y)}if(v&&!F(12)){var d;u?d="-ms-transform":w?d="-webkit-transform":t?d="-o-transform":v&&(d="-moz-transform");var f;d&&(f=S(a,d));f||(f=S(a,"transform"));a=f?(a=f.match(ia))?new J(parseFloat(a[1]),parseFloat(a[2])):new J(0,0):new J(0,0);a=new J(b.x+a.x,b.y+a.y)}else a=b;return a}d="function"==ba(a.b);f=a;a.targetTouches?f=a.targetTouches[0]:d&&a.b().targetTouches&& +(f=a.b().targetTouches[0]);return new J(f.clientX,f.clientY)}var W={thin:2,medium:4,thick:6};function X(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in W)d=W[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var f=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=f;d=c}return d}var ia=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function ja(a,b){var c;c=U(b);var d=U(a);c=new J(c.x-d.x,c.y-d.y);if(!u||u&&9<=H)d=R(a,"borderLeftWidth"),f=R(a,"borderRightWidth"),e=R(a,"borderTopWidth"),g=R(a,"borderBottomWidth"),d=new P(parseFloat(e),parseFloat(f),parseFloat(g),parseFloat(d));else var d=X(a,"borderLeft"),f=X(a,"borderRight"),e=X(a,"borderTop"),g=X(a,"borderBottom"),d=new P(e,f,g,d);c.x-=d.left;c.y-=d.top;return c} +function ka(a,b,c){function d(a,b,c,d,f){d=new Q(c.x+d.left,c.y+d.top,d.width,d.height);c=[0,0];b=[b.width,b.height];var e=[d.left,d.top];d=[d.width,d.height];for(var g=0;2>g;g++)if(d[g]>b[g])c[g]=f?e[g]+d[g]/2-b[g]/2:e[g];else{var aa=e[g]-b[g]+d[g];0<aa?c[g]=aa:0>e[g]&&(c[g]=e[g])}f=new J(c[0],c[1]);a.scrollLeft+=f.x;a.scrollTop+=f.y}for(var f=N(a),e=a.parentNode,g;e&&e!=f.documentElement&&e!=f.body;)g=ja(e,a),d(e,new K(e.clientWidth,e.clientHeight),g,b,c),e=e.parentNode;g=V(a);a=da(L(a));d(f.body, +a,g,b,c)};function la(a,b,c){c||(c=new Q(0,0,a.offsetWidth,a.offsetHeight));ka(a,c,b);a=V(a);return new J(a.x+c.left,a.y+c.top)}var Y=["_"],Z=h;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===la?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=la;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_item.js b/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_item.js index 33c149c8e..8c6afb507 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_item.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_item.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(A()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):D?0<=v(na,a):J(a)}function W(a){return wa?va(a):S?0<=v(xa,a):0<=v(ta,a)} -var wa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(A());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ea,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||C||E&&V(3.5)||D&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var Ka;if(Ka=D)Ka=D&&9<=na;Ka||E&&J("1.9.1")}D&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=D&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("session_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter"); -}};function Xa(a){this.c=a}Xa.prototype.getItem=function(a){return this.c.getItem(a)};Xa.prototype.clear=function(){this.c.clear()};function Ya(a){var b;if(Wa())b=new Xa(r.sessionStorage);else throw new s(13,"Session storage undefined");return b.getItem(a)};function Za(a){var b=Ya;a=[a];var c=window||r,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Pa(a,c.document),f=b.apply(k,e);d={status:0,value:X(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}b=[];Ba(new Aa,d,b);return b.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ga;if(Ga=z)Ga=z&&9<=na;Ga||A&&F("1.9.1")}z&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=z&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("session_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.c=a}Ta.prototype.getItem=function(a){return this.c.getItem(a)};Ta.prototype.clear=function(){this.c.clear()};function Ua(a){var b;if(Sa())b=new Ta(m.sessionStorage);else throw new n(13,"Session storage undefined");return b.getItem(a)};function Va(a){var b=Ua;a=[a];var c=window||m,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=La(a,c.document),f=b.apply(null,e);d={status:0,value:X(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}b=[];U(new za,d,b);return b.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_keys.js b/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_keys.js index 2741d2e1e..6c8f5a13a 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_keys.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_keys.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,ta=Q;function T(a){return(a=a.exec(A()))?a[1]:""}var ua=function(){if(oa)return T(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return T(/Chrome\/([0-9.]+)/);if(ta)return T(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(pa)return T(/Camino\/([0-9.]+)/)}return""}();var va,wa;function U(a){return xa?va(a):D?0<=v(na,a):J(a)}function V(a){return xa?wa(a):S?0<=v(ya,a):0<=v(ua,a)} -var xa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;va=function(a){return 0<=d.d(e,""+a)};wa=function(a){return 0<=d.d(f,""+a)};return h}(),za;if(S){var Aa=/Android\s+([0-9\.]+)/.exec(A());za=Aa?Aa[1]:"0"}else za="0";var ya=za;S&&V(2.3);function Ba(){this.a=g} -function Ca(a,b,c){switch(typeof b){case "string":Da(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ca(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Da(f, -c),c.push(":"),Ca(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ea={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ja=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Da(a,b){b.push('"',a.replace(Ja,function(a){if(a in Ea)return Ea[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ea[a]=e+b.toString(16)}),'"')};fa||C||E&&U(3.5)||D&&U(8);function Ka(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var La;if(La=D)La=D&&9<=na;La||E&&J("1.9.1")}D&&J("9");function Ma(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Na(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Oa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function W(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ka(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Pa(a);return b}if("document"in a)return b={},b.WINDOW=Pa(a),b;if(aa(a))return Ka(a,W);a=Ma(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Na(a,W);default:return k}} -function Qa(a,b){return"array"==q(a)?Ka(a,function(a){return Qa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ra(a.ELEMENT,b):"WINDOW"in a?Ra(a.WINDOW,b):Na(a,function(a){return Qa(a,b)}):a}function Sa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.c=ca());b.c||(b.c=ca());return b}function Pa(a){var b=Sa(a.ownerDocument),c=Oa(b,function(b){return b==a});c||(c=":wdc:"+b.c++,b[c]=a);return c} -function Ra(a,b){a=decodeURIComponent(a);var c=b||document,d=Sa(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Ta=D&&U(8)&&!U(9),Ua=ta&&V(4)&&!V(5),Va=S&&V(2.2)&&!V(2.3),Wa=ha&&ta&&V(4)&&!V(6); -function Xa(){var a=r||r;switch("session_storage"){case "appcache":return Ta?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ua||Va?l:a.openDatabase!=k;case "location":return Wa?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Ta?l:a.localStorage!=k;case "session_storage":return Ta?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter"); -}};function X(a){this.b=a}X.prototype.clear=function(){this.b.clear()};X.prototype.size=function(){return this.b.length};X.prototype.key=function(a){return this.b.key(a)};function Ya(){var a;if(Xa())a=new X(r.sessionStorage);else throw new s(13,"Session storage undefined");for(var b=[],c=a.size(),d=0;d<c;d++)b[d]=a.b.key(d);return b};function Za(){var a=Ya,b=[],c=window||r,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Qa(b,c.document),f=a.apply(k,e);d={status:0,value:W(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}a=[];Ca(new Ba,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function Ga(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ha;if(Ha=z)Ha=z&&9<=na;Ha||A&&F("1.9.1")}z&&F("9");function Ia(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ja(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ka(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function W(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ga(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=La(a);return b}if("document"in a)return b={},b.WINDOW=La(a),b;if(aa(a))return Ga(a,W);a=Ia(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ja(a,W);default:return null}} +function Ma(a,b){return"array"==h(a)?Ga(a,function(a){return Ma(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Na(a.ELEMENT,b):"WINDOW"in a?Na(a.WINDOW,b):Ja(a,function(a){return Ma(a,b)}):a}function Oa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.c=ca());b.c||(b.c=ca());return b}function La(a){var b=Oa(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.c++,b[c]=a);return c} +function Na(a,b){a=decodeURIComponent(a);var c=b||document,d=Oa(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Pa=z&&R(8)&&!R(9),Qa=P&&S(4)&&!S(5),Ra=O&&S(2.2)&&!S(2.3),Sa=ha&&P&&S(4)&&!S(6); +function Ta(){var a=m||m;switch("session_storage"){case "appcache":return Pa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Qa||Ra?!1:null!=a.openDatabase;case "location":return Sa?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Pa?!1:null!=a.localStorage;case "session_storage":return Pa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function X(a){this.b=a}X.prototype.clear=function(){this.b.clear()};X.prototype.size=function(){return this.b.length};X.prototype.key=function(a){return this.b.key(a)};function Ua(){var a;if(Ta())a=new X(m.sessionStorage);else throw new n(13,"Session storage undefined");for(var b=[],c=a.size(),d=0;d<c;d++)b[d]=a.b.key(d);return b};function Va(){var a=Ua,b=[],c=window||m,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Ma(b,c.document),f=a.apply(null,e);d={status:0,value:W(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}a=[];U(new za,d,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_size.js b/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_size.js index 5e1d70ba5..d98a2f80e 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_size.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_session_storage_size.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,T=Q;function U(a){return(a=a.exec(A()))?a[1]:""}var ta=function(){if(oa)return U(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return U(/Chrome\/([0-9.]+)/);if(T)return U(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(pa)return U(/Camino\/([0-9.]+)/)}return""}();var ua,va;function V(a){return wa?ua(a):D?0<=v(na,a):J(a)}function W(a){return wa?va(a):S?0<=v(xa,a):0<=v(ta,a)} -var wa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return h}(),ya;if(S){var za=/Android\s+([0-9\.]+)/.exec(A());ya=za?za[1]:"0"}else ya="0";var xa=ya;S&&W(2.3);function Aa(){this.a=g} -function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f, -c),c.push(":"),Ba(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Da={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ca(a,b){b.push('"',a.replace(Ea,function(a){if(a in Da)return Da[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Da[a]=e+b.toString(16)}),'"')};fa||C||E&&V(3.5)||D&&V(8);function Ja(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var Ka;if(Ka=D)Ka=D&&9<=na;Ka||E&&J("1.9.1")}D&&J("9");function La(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,d=Ra(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=D&&V(8)&&!V(9),Ta=T&&W(4)&&!W(5),Ua=S&&W(2.2)&&!W(2.3),Va=ha&&T&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("session_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter"); -}};function Xa(a){this.c=a}Xa.prototype.clear=function(){this.c.clear()};Xa.prototype.size=function(){return this.c.length};function Ya(){var a;if(Wa())a=new Xa(r.sessionStorage);else throw new s(13,"Session storage undefined");return a.size()};function Za(){var a=Ya,b=[],c=window||r,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=Pa(b,c.document),f=a.apply(k,e);d={status:0,value:X(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}a=[];Ba(new Aa,d,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function W(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ga;if(Ga=z)Ga=z&&9<=na;Ga||A&&F("1.9.1")}z&&F("9");function Ha(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ia(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return W(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return W(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?W(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,d=Na(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=z&&R(8)&&!R(9),Pa=P&&S(4)&&!S(5),Qa=O&&S(2.2)&&!S(2.3),Ra=ha&&P&&S(4)&&!S(6); +function Sa(){var a=m||m;switch("session_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.c=a}Ta.prototype.clear=function(){this.c.clear()};Ta.prototype.size=function(){return this.c.length};function Ua(){var a;if(Sa())a=new Ta(m.sessionStorage);else throw new n(13,"Session storage undefined");return a.size()};function Va(){var a=Ua,b=[],c=window||m,d;try{var a="string"==typeof a?new c.Function(a):c==window?a:new c.Function("return ("+a+").apply(null,arguments);"),e=La(b,c.document),f=a.apply(null,e);d={status:0,value:X(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}a=[];U(new za,d,a);return a.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_size.js b/src/ghostdriver/third_party/webdriver-atoms/get_size.js index 861a499b4..66af95f6d 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_size.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_size.js @@ -1,52 +1,77 @@ -function(){return function(){var f=void 0,h=!0,k=null,m=!1;function aa(a){return function(){return a}}var n=this; -function p(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=p(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var da=Date.now||function(){return+new Date};var ea=window;function fa(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),l=0;0==c&&l<g;l++){var u=d[l]||"",I=e[l]||"",V=RegExp("(\\d*)(\\D*)","g"),qa=RegExp("(\\d*)(\\D*)","g");do{var A=V.exec(u)||["","",""],B=qa.exec(I)||["","",""];if(0==A[0].length&&0==B[0].length)break;c=((0==A[1].length?0:parseInt(A[1],10))<(0==B[1].length?0:parseInt(B[1],10))?-1:(0==A[1].length?0:parseInt(A[1],10))>(0==B[1].length? -0:parseInt(B[1],10))?1:0)||((0==A[2].length)<(0==B[2].length)?-1:(0==A[2].length)>(0==B[2].length)?1:0)||(A[2]<B[2]?-1:A[2]>B[2]?1:0)}while(0==c)}return c}function ga(){return"overflow".replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()})};var ha=Array.prototype;function r(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(f,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,g=q(a)?a.split(""):a,l=0;l<c;l++)if(l in g){var u=g[l];b.call(f,u,l,a)&&(d[e++]=u)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=q(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(f,e[g],g,a));return d}function ka(a,b){if(a.reduce)return a.reduce(b,"");var c="";r(a,function(d,e){c=b.call(f,c,d,e,a)});return c} -function la(a,b){var c;a:{c=a.length;for(var d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(f,d[e],e,a)){c=e;break a}c=-1}return 0>c?k:q(a)?a.charAt(c):a[c]}function ma(a,b){var c;a:if(q(a))c=!q(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function na(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};var oa={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", -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", -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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var pa="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ra=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function sa(a){if(!ta.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(ra,"#$1$1$2$2$3$3"));return a.toLowerCase()}var ta=/^#(?:[0-9a-f]{3}){1,2}$/i,ua=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function va(a){var b=a.match(ua);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var wa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function xa(a){var b=a.match(wa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function s(a,b){this.code=a;this.state=ya[a]||za;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.N=a.prototype;s.prototype=new b})(); -var za="unknown error",ya={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ya[13]=za;ya[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};var t,Aa,Ba,Ca,Da,Ea;function v(){return n.navigator?n.navigator.userAgent:k}Ca=Ba=Aa=t=m;var Fa;if(Fa=v()){var Ga=n.navigator;t=0==Fa.indexOf("Opera");Aa=!t&&-1!=Fa.indexOf("MSIE");Ba=!t&&-1!=Fa.indexOf("WebKit");Ca=!t&&!Ba&&"Gecko"==Ga.product}var w=t,x=Aa,y=Ca,z=Ba,Ha,Ia=n.navigator;Ha=Ia&&Ia.platform||"";Da=-1!=Ha.indexOf("Mac");Ea=-1!=Ha.indexOf("Win");var C=-1!=Ha.indexOf("Linux");function Ja(){var a=n.document;return a?a.documentMode:f}var D; -a:{var Ka="",E;if(w&&n.opera)var La=n.opera.version,Ka="function"==typeof La?La():La;else if(y?E=/rv\:([^\);]+)(\)|;)/:x?E=/MSIE\s+([^\);]+)(\)|;)/:z&&(E=/WebKit\/(\S+)/),E)var Ma=E.exec(v()),Ka=Ma?Ma[1]:"";if(x){var Na=Ja();if(Na>parseFloat(Ka)){D=String(Na);break a}}D=Ka}var Oa={};function Pa(a){return Oa[a]||(Oa[a]=0<=fa(D,a))}var Qa=n.document,F=!Qa||!x?f:Ja()||("CSS1Compat"==Qa.compatMode?parseInt(D,10):5);!y&&!x||x&&x&&9<=F||y&&Pa("1.9.1");x&&Pa("9");function G(a,b){this.width=a;this.height=b}G.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};G.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};G.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};G.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Ra(a,b){var c={},d;for(d in a)b.call(f,a[d],d,a)&&(c[d]=a[d]);return c}function Sa(a,b){var c={},d;for(d in a)c[d]=b.call(f,a[d],d,a);return c}function Ta(a,b){for(var c in a)if(b.call(f,a[c],c,a))return c};function Ua(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Va(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!(x&&9<=F)){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,g=b.parentNode;return e==g?Wa(a,b):!c&&Ua(e,b)?-1*Xa(a,b):!d&&Ua(g,a)?Xa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=H(a);c=d.createRange(); -c.selectNode(a);c.collapse(h);d=d.createRange();d.selectNode(b);d.collapse(h);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Xa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Wa(d,a)}function Wa(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function H(a){return 9==a.nodeType?a:a.ownerDocument||a.document};var Ya,Za,$a,ab,bb,cb,db;db=cb=bb=ab=$a=Za=Ya=m;var J=v();J&&(-1!=J.indexOf("Firefox")?Ya=h:-1!=J.indexOf("Camino")?Za=h:-1!=J.indexOf("iPhone")||-1!=J.indexOf("iPod")?$a=h:-1!=J.indexOf("iPad")?ab=h:-1!=J.indexOf("Android")?bb=h:-1!=J.indexOf("Chrome")?cb=h:-1!=J.indexOf("Safari")&&(db=h));var eb=Ya,fb=Za,gb=$a,hb=ab,K=bb,ib=cb,jb=db;var L=x&&!(x&&9<=F),kb=x&&!(x&&8<=F);function lb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.J=e;this.parentNode=b}function mb(a,b,c){var d=kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new lb(b,a,b.nodeName,d,c)};function M(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==f||b==k?a.innerText:b,b=b==f||b==k?"":b);if("string"!=typeof b)if(L&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),L&&"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} -function N(a,b,c){if(b===k)return h;try{if(!a.getAttribute)return m}catch(d){return m}kb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function nb(a,b,c,d,e){return(L?ob:pb).call(k,a,b,q(c)?c:k,q(d)?d:k,e||new O)} -function ob(a,b,c,d,e){if(m||8==a.h||c&&a.h===k){var g=b.all;if(!g)return e;a=qb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var l=[],u=0;b=g[u++];)N(b,c,d)&&l.push(b);g=l}for(u=0;b=g[u++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}rb(a,b,c,d,e);return e} -function pb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),r(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?rb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),r(b,function(a){N(a,c,d)&&e.add(a)}));return e} -function sb(a,b,c,d,e){var g;if((m||8==a.h||c&&a.h===k)&&(g=b.childNodes)){var l=qb(a);if("*"!=l&&(g=ia(g,function(a){return a.tagName&&a.tagName.toLowerCase()==l}),!g))return e;c&&(g=ia(g,function(a){return N(a,c,d)}));r(g,function(a){("*"!=l||"!"!=a.tagName&&!("*"==l&&1!=a.nodeType))&&e.add(a)});return e}return tb(a,b,c,d,e)}function tb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)N(b,c,d)&&a.matches(b)&&e.add(b);return e} -function rb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)N(b,c,d)&&a.matches(b)&&e.add(b),rb(a,b,c,d,e)}function qb(a){if(m){if(8==a.h)return"!";if(a.h===k)return"*"}return a.getName()};function O(){this.e=this.d=k;this.i=0}function ub(a){this.p=a;this.next=this.n=k}O.prototype.unshift=function(a){a=new ub(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};O.prototype.add=function(a){a=new ub(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function vb(a){return(a=a.d)?a.p:k}function wb(a){return(a=vb(a))?M(a):""}function xb(a,b){this.H=a;this.o=(this.q=b)?a.e:a.d;this.v=k} -xb.prototype.next=function(){var a=this.o;if(a==k)return k;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function P(a,b){var c=a.evaluate(b);return c instanceof O?+wb(c):+c}function Q(a,b){var c=a.evaluate(b);return c instanceof O?wb(c):""+c}function R(a,b){var c=a.evaluate(b);return c instanceof O?!!c.i:!!c};function S(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof O&&c instanceof O){e=new xb(b,m);for(d=e.next();d;d=e.next()){b=new xb(c,m);for(g=b.next();g;g=b.next())if(a(M(d),M(g)))return h}return m}if(b instanceof O||c instanceof O){b instanceof O?e=b:(e=c,c=b);e=new xb(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+M(d);break;case "boolean":d=!!M(d);break;case "string":d=M(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return h}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function yb(a,b,c,d){this.w=a;this.L=b;this.t=c;this.u=d}yb.prototype.toString=function(){return this.w};var zb={};function T(a,b,c,d){if(a in zb)throw Error("Binary operator already created: "+a);a=new yb(a,b,c,d);zb[a.toString()]=a}T("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});T("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});T("*",6,1,function(a,b,c){return P(a,c)*P(b,c)}); -T("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});T("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});T("<",4,2,function(a,b,c){return S(function(a,b){return a<b},a,b,c)});T(">",4,2,function(a,b,c){return S(function(a,b){return a>b},a,b,c)});T("<=",4,2,function(a,b,c){return S(function(a,b){return a<=b},a,b,c)});T(">=",4,2,function(a,b,c){return S(function(a,b){return a>=b},a,b,c)});T("=",3,2,function(a,b,c){return S(function(a,b){return a==b},a,b,c,h)}); -T("!=",3,2,function(a,b,c){return S(function(a,b){return a!=b},a,b,c,h)});T("and",2,2,function(a,b,c){return R(a,c)&&R(b,c)});T("or",1,2,function(a,b,c){return R(a,c)||R(b,c)});function Ab(a,b,c,d,e,g,l,u,I){this.l=a;this.t=b;this.G=c;this.F=d;this.D=e;this.u=g;this.C=l;this.B=u!==f?u:l;this.I=!!I}Ab.prototype.toString=function(){return this.l};var Bb={};function U(a,b,c,d,e,g,l,u){if(a in Bb)throw Error("Function already created: "+a+".");Bb[a]=new Ab(a,b,c,d,m,e,g,l,u)}U("boolean",2,m,m,function(a,b){return R(b,a)},1);U("ceiling",1,m,m,function(a,b){return Math.ceil(P(b,a))},1); -U("concat",3,m,m,function(a,b){var c=na(arguments,1);return ka(c,function(b,c){return b+Q(c,a)})},2,k);U("contains",2,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);U("count",1,m,m,function(a,b){return b.evaluate(a).i},1,1,h);U("false",2,m,m,aa(m),0);U("floor",1,m,m,function(a,b){return Math.floor(P(b,a))},1); -U("id",4,m,m,function(a,b){function c(a){if(L){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return la(b,function(b){return a==b.id})}return k}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),g=[];r(d,function(a){(a=c(a))&&!ma(g,a)&&g.push(a)});g.sort(Va);var l=new O;r(g,function(a){l.add(a)});return l},1);U("lang",2,m,m,aa(m),1);U("last",1,h,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0); -U("local-name",3,m,h,function(a,b){var c=b?vb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);U("name",3,m,h,function(a,b){var c=b?vb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);U("namespace-uri",3,h,m,aa(""),0,1,h);U("normalize-space",3,m,h,function(a,b){return(b?Q(b,a):M(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);U("not",2,m,m,function(a,b){return!R(b,a)},1);U("number",1,m,h,function(a,b){return b?P(b,a):+M(a.f)},0,1); -U("position",1,h,m,function(a){return a.K},0);U("round",1,m,m,function(a,b){return Math.round(P(b,a))},1);U("starts-with",2,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);U("string",3,m,h,function(a,b){return b?Q(b,a):M(a.f)},0,1);U("string-length",1,m,h,function(a,b){return(b?Q(b,a):M(a.f)).length},0,1); -U("substring",3,m,m,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);U("substring-after",3,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -U("substring-before",3,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);U("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new xb(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+M(e);return d},1,1,h);U("translate",3,m,m,function(a,b,c,d){b=Q(b,a);c=Q(c,a);var e=Q(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);U("true",2,m,m,aa(h),0);function Cb(a,b,c,d){this.l=a;this.A=b;this.q=c;this.O=d}Cb.prototype.toString=function(){return this.l};var Db={};function W(a,b,c,d){if(a in Db)throw Error("Axis already created: "+a);Db[a]=new Cb(a,b,c,!!d)}W("ancestor",function(a,b){for(var c=new O,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},h);W("ancestor-or-self",function(a,b){var c=new O,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},h); -W("attribute",function(a,b){var c=new O,d=a.getName();if("style"==d&&b.style&&L)return c.add(new lb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.h===k||"*"==d)for(var d=b.sourceIndex,g=0,l;l=e[g];g++)L?l.nodeValue&&c.add(mb(b,l,d)):c.add(l);else(l=e.getNamedItem(d))&&(L?l.nodeValue&&c.add(mb(b,l,b.sourceIndex)):c.add(l));return c},m);W("child",function(a,b,c,d,e){return(L?sb:tb).call(k,a,b,q(c)?c:k,q(d)?d:k,e||new O)},m,h);W("descendant",nb,m,h); -W("descendant-or-self",function(a,b,c,d){var e=new O;N(b,c,d)&&a.matches(b)&&e.add(b);return nb(a,b,c,d,e)},m,h);W("following",function(a,b,c,d){var e=new O;do for(var g=b;g=g.nextSibling;)N(g,c,d)&&a.matches(g)&&e.add(g),e=nb(a,g,c,d,e);while(b=b.parentNode);return e},m,h);W("following-sibling",function(a,b){for(var c=new O,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);W("namespace",function(){return new O},m); -W("parent",function(a,b){var c=new O;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);W("preceding",function(a,b,c,d){var e=new O,g=[];do g.unshift(b);while(b=b.parentNode);for(var l=1,u=g.length;l<u;l++){var I=[];for(b=g[l];b=b.previousSibling;)I.unshift(b);for(var V=0,qa=I.length;V<qa;V++)b=I[V],N(b,c,d)&&a.matches(b)&&e.add(b),e=nb(a,b,c,d,e)}return e},h,h); -W("preceding-sibling",function(a,b){for(var c=new O,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},h);W("self",function(a,b){var c=new O;a.matches(b)&&c.add(b);return c},m);function X(a){return(a=a.exec(v()))?a[1]:""}var Eb=function(){if(eb)return X(/Firefox\/([0-9.]+)/);if(x||w)return D;if(ib)return X(/Chrome\/([0-9.]+)/);if(jb)return X(/Version\/([0-9.]+)/);if(gb||hb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(K)return(a=X(/Android\s+([0-9.]+)/))?a:X(/Version\/([0-9.]+)/);if(fb)return X(/Camino\/([0-9.]+)/)}return""}();var Fb,Gb;function Hb(a){return Ib?Fb(a):x?0<=fa(F,a):Pa(a)}function Jb(a){Ib?Gb(a):K?fa(Kb,a):fa(Eb,a)} -var Ib=function(){if(!y)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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,g=c.version;Fb=function(a){return 0<=d.s(e,""+a)};Gb=function(a){d.s(g,""+a)};return h}(),Lb;if(K){var Mb=/Android\s+([0-9\.]+)/.exec(v());Lb=Mb?Mb[1]:"0"}else Lb="0";var Kb=Lb,Nb=x&&!(x&&9<=F); -K&&Jb(2.3);!w&&(!z||Hb("533"));function Ob(a,b){var c=H(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,k))?c[b]||c.getPropertyValue(b)||"":""}function Pb(a){var b=a.offsetWidth,c=a.offsetHeight,d=z&&!b&&!c;return(b===f||d)&&a.getBoundingClientRect?(b=a.getBoundingClientRect(),x&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop),new G(b.right-b.left,b.bottom-b.top)):new G(b,c)};function Qb(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Rb(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Qb(a)?a:k} -function Sb(a){var b=ga();if("float"==b||"cssFloat"==b||"styleFloat"==b)b=Nb?"styleFloat":"cssFloat";a=Ob(a,b)||Tb(a,b);if(a===k)a=k;else if(ma(pa,"overflow")&&(ta.test("#"==a.charAt(0)?a:"#"+a)||xa(a).length||oa&&oa[a.toLowerCase()]||va(a).length)){b=va(a);if(!b.length){a:if(b=xa(a),!b.length){b=oa[a.toLowerCase()];b=!b?"#"==a.charAt(0)?a:"#"+a:b;if(ta.test(b)&&(b=sa(b),b=sa(b),b=[parseInt(b.substr(1,2),16),parseInt(b.substr(3,2),16),parseInt(b.substr(5,2),16)],b.length))break a;b=[]}3==b.length&& -b.push(1)}a=4!=b.length?a:"rgba("+b.join(", ")+")"}return a}function Tb(a,b){var c=a.currentStyle||a.style,d=c[b];d===f&&"function"==p(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?d!==f?d:k:(c=Rb(a))?Tb(c,b):k} -function Ub(a){if("function"==p(a.getBBox)&&!Qb(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Qb(a,"BODY")){b=(H(a)?H(a).parentWindow||H(a).defaultView:window)||f;"hidden"!=Sb(a)?a=h:(a=Rb(a),!a||!Qb(a,"HTML")?a=h:(a=Sb(a),a="auto"==a||"scroll"==a));if(a){b=(b||ea).document;a=b.documentElement;var d=b.body;if(!d)throw new s(13,"No BODY element present");b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(k,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(k,b);a=new G(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new G(a.clientWidth,a.clientHeight);return a}if("none"!=(Ob(a,"display")||(a.currentStyle?a.currentStyle.display:k)||a.style&&a.style.display))a=Pb(a);else{var b=a.style,d=b.display,e=b.visibility,g=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Pb(a);b.display=d;b.position=g;b.visibility=e}return a};z||w||Ib&&Jb(3.6);x&&Hb(10);K&&Jb(4);function Y(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y){d=Vb(a);Wb(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.k=0;Y.prototype.z=0;function Vb(a){Wb(a);return a.c.concat()} -function Wb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.z++);this.g[a]=b};var Xb={};function Z(a,b,c){ca(a)&&(a=y?a.a:w?a.opera:a.b);a=new Yb(a,b,c);if(b&&(!(b in Xb)||c))Xb[b]={key:a,shift:m},c&&(Xb[c]={key:a,shift:h});return a}function Yb(a,b,c){this.code=a;this.r=b||k;this.M=c||this.r}Z(8);Z(9);Z(13);var Zb=Z(16),$b=Z(17),ac=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); -Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var bc=Z(Ea?{a:91,b:91,opera:219}:Da?{a:224,b:91,opera:17}:{a:0,b:91,opera:k}); -Z(Ea?{a:92,b:92,opera:220}:Da?{a:224,b:93,opera:17}:{a:0,b:92,opera:k});Z(Ea?{a:93,b:93,opera:0}:Da?{a:0,b:0,opera:16}:{a:93,b:k,opera:0});Z({a:96,b:96,opera:48},"0");Z({a:97,b:97,opera:49},"1");Z({a:98,b:98,opera:50},"2");Z({a:99,b:99,opera:51},"3");Z({a:100,b:100,opera:52},"4");Z({a:101,b:101,opera:53},"5");Z({a:102,b:102,opera:54},"6");Z({a:103,b:103,opera:55},"7");Z({a:104,b:104,opera:56},"8");Z({a:105,b:105,opera:57},"9");Z({a:106,b:106,opera:C?56:42},"*");Z({a:107,b:107,opera:C?61:43},"+"); -Z({a:109,b:109,opera:C?109:45},"-");Z({a:110,b:110,opera:C?190:78},".");Z({a:111,b:111,opera:C?191:47},"/");Z(C&&w?k:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({a:107,b:187,opera:61},"=","+");Z(108,",");Z({a:109,b:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({a:59,b:186,opera:59},";",":");Z(222,"'",'"');var cc=new Y;cc.set(1,Zb);cc.set(2,$b);cc.set(4,ac); -cc.set(8,bc);(function(a){var b=new Y;r(Vb(a),function(c){b.set(a.get(c).code,c)});return b})(cc);y&&Hb(12);function dc(){this.j=f} -function ec(a,b,c){switch(typeof b){case "string":fc(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==p(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],ec(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),fc(g, -c),c.push(":"),ec(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var gc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},hc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function fc(a,b){b.push('"',a.replace(hc,function(a){if(a in gc)return gc[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return gc[a]=e+b.toString(16)}),'"')};z||w||y&&Hb(3.5)||x&&Hb(8);function ic(a){switch(p(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,ic);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=jc(a);return b}if("document"in a)return b={},b.WINDOW=jc(a),b;if(ba(a))return ja(a,ic);a=Ra(a,function(a,b){return"number"==typeof b||q(b)});return Sa(a,ic);default:return k}} -function kc(a,b){return"array"==p(a)?ja(a,function(a){return kc(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?lc(a.ELEMENT,b):"WINDOW"in a?lc(a.WINDOW,b):Sa(a,function(a){return kc(a,b)}):a}function mc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=da());b.m||(b.m=da());return b}function jc(a){var b=mc(a.ownerDocument),c=Ta(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} -function lc(a,b){a=decodeURIComponent(a);var c=b||document,d=mc(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};function nc(a){var b=Ub;a=[a];var c=window||ea,d;try{var b=q(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=kc(a,c.document),g=b.apply(k,e);d={status:0,value:ic(g)}}catch(l){d={status:"code"in l?l.code:13,value:{message:l.message}}}b=[];ec(new dc,d,b);return b.join("")}var oc=["_"],$=n;!(oc[0]in $)&&$.execScript&&$.execScript("var "+oc[0]);for(var pc;oc.length&&(pc=oc.shift());)!oc.length&&nc!==f?$[pc]=nc:$=$[pc]?$[pc]:$[pc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){function g(a){return function(){return this[a]}}function k(a){return function(){return a}}var l=this; +function aa(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)} +function ea(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)}}function fa(a,b,c){fa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return fa.apply(null,arguments)} +function ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ha=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.va=b.prototype;a.prototype=new c};function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var n=d[h]||"",x=e[h]||"",ka=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var v=ka.exec(n)||["","",""],r=L.exec(x)||["","",""];if(0==v[0].length&&0==r[0].length)break;c=((0==v[1].length?0:parseInt(v[1],10))<(0==r[1].length?0:parseInt(r[1],10))?-1:(0==v[1].length?0:parseInt(v[1],10))>(0==r[1].length? +0:parseInt(r[1],10))?1:0)||((0==v[2].length)<(0==r[2].length)?-1:(0==v[2].length)>(0==r[2].length)?1:0)||(v[2]<r[2]?-1:v[2]>r[2]?1:0)}while(0==c)}return c};var ja=Array.prototype;function q(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 la(a,b){for(var c=a.length,d=[],e=0,f=m(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var n=f[h];b.call(void 0,n,h,a)&&(d[e++]=n)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function s(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;q(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function na(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 oa(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function pa(a){return ja.concat.apply(ja,arguments)} +function qa(a,b,c){return 2>=arguments.length?ja.slice.call(a,b):ja.slice.call(a,b,c)};function t(a,b){this.code=a;this.state=ra[a]||sa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}p(t,Error); +var sa="unknown error",ra={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ra[13]=sa;ra[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var ta,Aa,Ba,Ca,Da,Ea;function Fa(){return l.navigator?l.navigator.userAgent:null}Ca=Ba=Aa=ta=!1;var Ga;if(Ga=Fa()){var Ha=l.navigator;ta=0==Ga.indexOf("Opera");Aa=!ta&&-1!=Ga.indexOf("MSIE");Ba=!ta&&-1!=Ga.indexOf("WebKit");Ca=!ta&&!Ba&&"Gecko"==Ha.product}var u=ta,w=Aa,y=Ca,Ia=Ba,Ja,Ka=l.navigator;Ja=Ka&&Ka.platform||"";Da=-1!=Ja.indexOf("Mac");Ea=-1!=Ja.indexOf("Win");var La=-1!=Ja.indexOf("Linux");function Ma(){var a=l.document;return a?a.documentMode:void 0}var Na; +a:{var Oa="",Pa;if(u&&l.opera)var Qa=l.opera.version,Oa="function"==typeof Qa?Qa():Qa;else if(y?Pa=/rv\:([^\);]+)(\)|;)/:w?Pa=/MSIE\s+([^\);]+)(\)|;)/:Ia&&(Pa=/WebKit\/(\S+)/),Pa)var Ra=Pa.exec(Fa()),Oa=Ra?Ra[1]:"";if(w){var Sa=Ma();if(Sa>parseFloat(Oa)){Na=String(Sa);break a}}Na=Oa}var Ta={};function Ua(a){return Ta[a]||(Ta[a]=0<=ia(Na,a))}var Va=l.document,Wa=Va&&w?Ma()||("CSS1Compat"==Va.compatMode?parseInt(Na,10):5):void 0;!y&&!w||w&&w&&9<=Wa||y&&Ua("1.9.1");w&&Ua("9");function Xa(a,b){this.width=a;this.height=b}Xa.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Xa.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Xa.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Xa.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Ya(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Za(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function $a(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function ab(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new Xa(a.clientWidth,a.clientHeight)}function bb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function cb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=Wa)){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?db(a,b):!c&&bb(e,b)?-1*eb(a,b):!d&&bb(f,a)?eb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=z(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(l.Range.START_TO_END,d)}function eb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return db(d,a)}function db(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function z(a){return 9==a.nodeType?a:a.ownerDocument||a.document};var fb,gb,hb,ib,jb,kb,lb;lb=kb=jb=ib=hb=gb=fb=!1;var A=Fa();A&&(-1!=A.indexOf("Firefox")?fb=!0:-1!=A.indexOf("Camino")?gb=!0:-1!=A.indexOf("iPhone")||-1!=A.indexOf("iPod")?hb=!0:-1!=A.indexOf("iPad")?ib=!0:-1!=A.indexOf("Android")?jb=!0:-1!=A.indexOf("Chrome")?kb=!0:-1!=A.indexOf("Safari")&&(lb=!0));var mb=fb,nb=gb,ob=hb,pb=ib,B=jb,qb=kb,rb=lb;function sb(a,b,c){this.e=a;this.oa=b||1;this.m=c||1};var C=w&&!(w&&9<=Wa),tb=w&&!(w&&8<=Wa);function ub(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ta=e;this.parentNode=b}function vb(a,b,c){var d=tb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new ub(b,a,b.nodeName,d,c)};function wb(a){this.S=a;this.G=0}function xb(a){a=a.match(yb);for(var b=0;b<a.length;b++)zb.test(a[b])&&a.splice(b,1);return new wb(a)}var yb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),zb=/^\s/;function D(a,b){return a.S[a.G+(b||0)]}wb.prototype.next=function(){return this.S[this.G++]};wb.prototype.back=function(){this.G--};wb.prototype.empty=function(){return this.S.length<=this.G};function E(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(C&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),C&&"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} +function F(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}tb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ab(a,b,c,d,e){return(C?Bb:Cb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new G)} +function Bb(a,b,c,d,e){if(a instanceof H||8==a.l||c&&null===a.l){var f=b.all;if(!f)return e;a=Db(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],n=0;b=f[n++];)F(b,c,d)&&h.push(b);f=h}for(n=0;b=f[n++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Eb(a,b,c,d,e);return e} +function Cb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof I?Eb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){F(a,c,d)&&e.add(a)}));return e} +function Fb(a,b,c,d,e){var f;if((a instanceof H||8==a.l||c&&null===a.l)&&(f=b.childNodes)){var h=Db(a);if("*"!=h&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=la(f,function(a){return F(a,c,d)}));q(f,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return Gb(a,b,c,d,e)}function Gb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)F(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Eb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)F(b,c,d)&&a.matches(b)&&e.add(b),Eb(a,b,c,d,e)}function Db(a){if(a instanceof I){if(8==a.l)return"!";if(null===a.l)return"*"}return a.getName()};function G(){this.m=this.i=null;this.B=0}function Hb(a){this.p=a;this.next=this.u=null}function Ib(a,b){if(!a.i)return b;if(!b.i)return a;for(var c=a.i,d=b.i,e=null,f=null,h=0;c&&d;)c.p==d.p||c.p instanceof ub&&d.p instanceof ub&&c.p.e==d.p.e?(f=c,c=c.next,d=d.next):0<cb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,h++;for(f=c||d;f;)f.u=e,e=e.next=f,h++,f=f.next;a.m=e;a.B=h;return a} +G.prototype.unshift=function(a){a=new Hb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.B++};G.prototype.add=function(a){a=new Hb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.B++};function Jb(a){return(a=a.i)?a.p:null}G.prototype.o=g("B");function Kb(a){return(a=Jb(a))?E(a):""}function J(a,b){return new Lb(a,!!b)}function Lb(a,b){this.ka=a;this.T=(this.v=b)?a.m:a.i;this.N=null} +Lb.prototype.next=function(){var a=this.T;if(null==a)return null;var b=this.N=a;this.T=this.v?a.u:a.next;return b.p};Lb.prototype.remove=function(){var a=this.ka,b=this.N;if(!b)throw Error("Next must be called at least once before remove.");var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.B--;this.N=null};function K(a){this.h=a;this.j=this.q=!1;this.C=null}function M(a){return"\n "+a.toString().split("\n").join("\n ")}K.prototype.f=g("q");function Mb(a,b){a.q=b}function Nb(a,b){a.j=b}K.prototype.s=g("C");function N(a,b){var c=a.evaluate(b);return c instanceof G?+Kb(c):+c}function O(a,b){var c=a.evaluate(b);return c instanceof G?Kb(c):""+c}function Ob(a,b){var c=a.evaluate(b);return c instanceof G?!!c.o():!!c};function Pb(a,b,c){K.call(this,a.h);this.R=a;this.W=b;this.aa=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.R==Qb&&(c.j||c.f()||4==c.h||0==c.h||!b.s()?b.j||(b.f()||4==b.h||0==b.h||!c.s())||(this.C={name:c.s().name,w:b}):this.C={name:b.s().name,w:c})}p(Pb,K); +function Rb(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof G&&c instanceof G){e=J(b);for(d=e.next();d;d=e.next())for(b=J(c),f=b.next();f;f=b.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof G||c instanceof G){b instanceof G?e=b:(e=c,c=b);e=J(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+E(d);break;case "boolean":d=!!E(d);break;case "string":d=E(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}Pb.prototype.evaluate=function(a){return this.R.n(this.W,this.aa,a)};Pb.prototype.toString=function(){var a="Binary Expression: "+this.R,a=a+M(this.W);return a+=M(this.aa)};function Sb(a,b,c,d){this.na=a;this.Z=b;this.h=c;this.n=d}Sb.prototype.toString=g("na");var Tb={}; +function P(a,b,c,d){if(Tb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Sb(a,b,c,d);return Tb[a.toString()]=a}P("div",6,1,function(a,b,c){return N(a,c)/N(b,c)});P("mod",6,1,function(a,b,c){return N(a,c)%N(b,c)});P("*",6,1,function(a,b,c){return N(a,c)*N(b,c)});P("+",5,1,function(a,b,c){return N(a,c)+N(b,c)});P("-",5,1,function(a,b,c){return N(a,c)-N(b,c)});P("<",4,2,function(a,b,c){return Rb(function(a,b){return a<b},a,b,c)}); +P(">",4,2,function(a,b,c){return Rb(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return Rb(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return Rb(function(a,b){return a>=b},a,b,c)});var Qb=P("=",3,2,function(a,b,c){return Rb(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return Rb(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return Ob(a,c)&&Ob(b,c)});P("or",1,2,function(a,b,c){return Ob(a,c)||Ob(b,c)});function Ub(a,b){if(b.o()&&4!=a.h)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");K.call(this,a.h);this.$=a;this.d=b;this.q=a.f();this.j=a.j}p(Ub,K);Ub.prototype.evaluate=function(a){a=this.$.evaluate(a);return Vb(this.d,a)};Ub.prototype.toString=function(){var a;a="Filter:"+M(this.$);return a+=M(this.d)};function Wb(a,b){if(b.length<a.Y)throw Error("Function "+a.k+" expects at least"+a.Y+" arguments, "+b.length+" given");if(null!==a.O&&b.length>a.O)throw Error("Function "+a.k+" expects at most "+a.O+" arguments, "+b.length+" given");a.la&&q(b,function(b,d){if(4!=b.h)throw Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b);});K.call(this,a.h);this.F=a;this.K=b;Mb(this,a.q||na(b,function(a){return a.f()}));Nb(this,a.ja&&!b.length||a.ia&&!!b.length||na(b,function(a){return a.j}))} +p(Wb,K);Wb.prototype.evaluate=function(a){return this.F.n.apply(null,pa(a,this.K))};Wb.prototype.toString=function(){var a="Function: "+this.F;if(this.K.length)var b=s(this.K,function(a,b){return a+M(b)},"Arguments:"),a=a+M(b);return a};function Xb(a,b,c,d,e,f,h,n,x){this.k=a;this.h=b;this.q=c;this.ja=d;this.ia=e;this.n=f;this.Y=h;this.O=void 0!==n?n:h;this.la=!!x}Xb.prototype.toString=g("k");var Yb={}; +function Q(a,b,c,d,e,f,h,n){if(Yb.hasOwnProperty(a))throw Error("Function already created: "+a+".");Yb[a]=new Xb(a,b,c,d,!1,e,f,h,n)}Q("boolean",2,!1,!1,function(a,b){return Ob(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(N(b,a))},1);Q("concat",3,!1,!1,function(a,b){var c=qa(arguments,1);return s(c,function(b,c){return b+O(c,a)},"")},2,null);Q("contains",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return-1!=b.indexOf(a)},2); +Q("count",1,!1,!1,function(a,b){return b.evaluate(a).o()},1,1,!0);Q("false",2,!1,!1,k(!1),0);Q("floor",1,!1,!1,function(a,b){return Math.floor(N(b,a))},1); +Q("id",4,!1,!1,function(a,b){function c(a){if(C){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return oa(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=O(b,a).split(/\s+/),f=[];q(d,function(a){a=c(a);var b;if(!(b=!a)){a:if(m(f))b=m(a)&&1==a.length?f.indexOf(a,0):-1;else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=0<=b}b||f.push(a)});f.sort(cb);var h=new G;q(f,function(a){h.add(a)});return h},1); +Q("lang",2,!1,!1,k(!1),1);Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.m},0);Q("local-name",3,!1,!0,function(a,b){var c=b?Jb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){var c=b?Jb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,k(""),0,1,!0); +Q("normalize-space",3,!1,!0,function(a,b){return(b?O(b,a):E(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);Q("not",2,!1,!1,function(a,b){return!Ob(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?N(b,a):+E(a.e)},0,1);Q("position",1,!0,!1,function(a){return a.oa},0);Q("round",1,!1,!1,function(a,b){return Math.round(N(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?O(b,a):E(a.e)},0,1); +Q("string-length",1,!1,!0,function(a,b){return(b?O(b,a):E(a.e)).length},0,1);Q("substring",3,!1,!1,function(a,b,c,d){c=N(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?N(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=O(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +Q("substring-before",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){for(var c=J(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+E(e);return d},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=O(b,a);c=O(c,a);var e=O(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);Q("true",2,!1,!1,k(!0),0);function I(a,b){this.ca=a;this.X=void 0!==b?b:null;this.l=null;switch(a){case "comment":this.l=8;break;case "text":this.l=3;break;case "processing-instruction":this.l=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Zb(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}I.prototype.matches=function(a){return null===this.l||this.l==a.nodeType};I.prototype.getName=g("ca"); +I.prototype.toString=function(){var a="Kind Test: "+this.ca;null===this.X||(a+=M(this.X));return a};function $b(a){K.call(this,3);this.ba=a.substring(1,a.length-1)}p($b,K);$b.prototype.evaluate=g("ba");$b.prototype.toString=function(){return"Literal: "+this.ba};function H(a,b){this.k=a.toLowerCase();this.P=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}H.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.k&&this.k!=a.nodeName.toLowerCase()?!1:this.P==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};H.prototype.getName=g("k");H.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.P?"":this.P+":")+this.k};function ac(a){K.call(this,1);this.da=a}p(ac,K);ac.prototype.evaluate=g("da");ac.prototype.toString=function(){return"Number: "+this.da};function bc(a,b){K.call(this,a.h);this.V=a;this.D=b;this.q=a.f();this.j=a.j;if(1==this.D.length){var c=this.D[0];c.M||c.r!=cc||(c=c.J,"*"!=c.getName()&&(this.C={name:c.getName(),w:null}))}}p(bc,K);function dc(){K.call(this,4)}p(dc,K);dc.prototype.evaluate=function(a){var b=new G;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};dc.prototype.toString=k("Root Helper Expression");function ec(){K.call(this,4)}p(ec,K);ec.prototype.evaluate=function(a){var b=new G;b.add(a.e);return b}; +ec.prototype.toString=k("Context Helper Expression"); +bc.prototype.evaluate=function(a){var b=this.V.evaluate(a);if(!(b instanceof G))throw Error("Filter expression must evaluate to nodeset.");a=this.D;for(var c=0,d=a.length;c<d&&b.o();c++){var e=a[c],f=J(b,e.r.v),h;if(e.f()||e.r!=fc)if(e.f()||e.r!=gc)for(h=f.next(),b=e.evaluate(new sb(h));null!=(h=f.next());)h=e.evaluate(new sb(h)),b=Ib(b,h);else h=f.next(),b=e.evaluate(new sb(h));else{for(h=f.next();(b=f.next())&&(!h.contains||h.contains(b))&&b.compareDocumentPosition(h)&8;h=b);b=e.evaluate(new sb(h))}}return b}; +bc.prototype.toString=function(){var a;a="Path Expression:"+M(this.V);if(this.D.length){var b=s(this.D,function(a,b){return a+M(b)},"Steps:");a+=M(b)}return a};function R(a,b){this.d=a;this.v=!!b}function Vb(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=J(b),f=b.o(),h,n=0;h=e.next();n++){var x=a.v?f-n:n+1;h=d.evaluate(new sb(h,x,f));if("number"==typeof h)x=x==h;else if("string"==typeof h||"boolean"==typeof h)x=!!h;else if(h instanceof G)x=0<h.o();else throw Error("Predicate.evaluate returned an unexpected type.");x||e.remove()}return b}R.prototype.s=function(){return 0<this.d.length?this.d[0].s():null}; +R.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return!0}return!1};R.prototype.o=function(){return this.d.length};R.prototype.toString=function(){return s(this.d,function(a,b){return a+M(b)},"Predicates:")};function S(a,b,c,d){K.call(this,4);this.r=a;this.J=b;this.d=c||new R([]);this.M=!!d;b=this.d.s();a.qa&&b&&(a=b.name,a=C?a.toLowerCase():a,this.C={name:a,w:b.w});this.q=this.d.f()}p(S,K); +S.prototype.evaluate=function(a){var b=a.e,c=null,c=this.s(),d=null,e=null,f=0;c&&(d=c.name,e=c.w?O(c.w,a):null,f=1);if(this.M)if(this.f()||this.r!=hc)if(a=J((new S(ic,new I("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);null!=(b=a.next());)c=Ib(c,this.n(b,d,e,f));else c=new G;else c=Ab(this.J,b,d,e),c=Vb(this.d,c,f);else c=this.n(a.e,d,e,f);return c};S.prototype.n=function(a,b,c,d){a=this.r.F(this.J,a,b,c);return a=Vb(this.d,a,d)}; +S.prototype.toString=function(){var a;a="Step:"+M("Operator: "+(this.M?"//":"/"));this.r.k&&(a+=M("Axis: "+this.r));a+=M(this.J);if(this.d.o()){var b=s(this.d.d,function(a,b){return a+M(b)},"Predicates:");a+=M(b)}return a};function jc(a,b,c,d){this.k=a;this.F=b;this.v=c;this.qa=d}jc.prototype.toString=g("k");var kc={};function T(a,b,c,d){if(kc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new jc(a,b,c,!!d);return kc[a]=b} +T("ancestor",function(a,b){for(var c=new G,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);T("ancestor-or-self",function(a,b){var c=new G,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var cc=T("attribute",function(a,b){var c=new G,d=a.getName();if("style"==d&&b.style&&C)return c.add(new ub(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof I&&null===a.l||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)C?h.nodeValue&&c.add(vb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(C?h.nodeValue&&c.add(vb(b,h,b.sourceIndex)):c.add(h));return c},!1),hc=T("child",function(a,b,c,d,e){return(C?Fb:Gb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new G)},!1,!0); +T("descendant",Ab,!1,!0);var ic=T("descendant-or-self",function(a,b,c,d){var e=new G;F(b,c,d)&&a.matches(b)&&e.add(b);return Ab(a,b,c,d,e)},!1,!0),fc=T("following",function(a,b,c,d){var e=new G;do for(var f=b;f=f.nextSibling;)F(f,c,d)&&a.matches(f)&&e.add(f),e=Ab(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);T("following-sibling",function(a,b){for(var c=new G,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);T("namespace",function(){return new G},!1); +var lc=T("parent",function(a,b){var c=new G;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),gc=T("preceding",function(a,b,c,d){var e=new G,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,n=f.length;h<n;h++){var x=[];for(b=f[h];b=b.previousSibling;)x.unshift(b);for(var ka=0,L=x.length;ka<L;ka++)b=x[ka],F(b,c,d)&&a.matches(b)&&e.add(b),e=Ab(a,b,c,d,e)}return e},!0,!0); +T("preceding-sibling",function(a,b){for(var c=new G,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var mc=T("self",function(a,b){var c=new G;a.matches(b)&&c.add(b);return c},!1);function nc(a){K.call(this,1);this.U=a;this.q=a.f();this.j=a.j}p(nc,K);nc.prototype.evaluate=function(a){return-N(this.U,a)};nc.prototype.toString=function(){return"Unary Expression: -"+M(this.U)};function oc(a){K.call(this,4);this.H=a;Mb(this,na(this.H,function(a){return a.f()}));Nb(this,na(this.H,function(a){return a.j}))}p(oc,K);oc.prototype.evaluate=function(a){var b=new G;q(this.H,function(c){c=c.evaluate(a);if(!(c instanceof G))throw Error("Path expression must evaluate to NodeSet.");b=Ib(b,c)});return b};oc.prototype.toString=function(){return s(this.H,function(a,b){return a+M(b)},"Union Expression:")};function pc(a,b){this.a=a;this.ma=b}function qc(a){for(var b,c=[];;){U(a,"Missing right hand side of binary expression.");b=rc(a);var d=a.a.next();if(!d)break;var e=(d=Tb[d]||null)&&d.Z;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Z;)b=new Pb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Pb(c.pop(),c.pop(),b);return b}function U(a,b){if(a.a.empty())throw Error(b);}function sc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function tc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function uc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new $b(a)}function vc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new H(b);var d=b.substring(0,c);a=a.ma(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new H(b,a)} +function wc(a){var b,c=[],d;if("/"==D(a.a)||"//"==D(a.a)){b=a.a.next();d=D(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new dc;d=new dc;U(a,"Missing next location step.");b=xc(a,b);c.push(b)}else{a:{b=D(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=qc(a);U(a,'unclosed "("');sc(a,")");break;case '"':case "'":b=uc(a);break;default:if(isNaN(+b))if(!Zb(b)&&/(?![0-9])[\w]/.test(d)&& +"("==D(a.a,1)){b=a.a.next();b=Yb[b]||null;a.a.next();for(d=[];")"!=D(a.a);){U(a,"Missing function argument list.");d.push(qc(a));if(","!=D(a.a))break;a.a.next()}U(a,"Unclosed function argument list.");tc(a);b=new Wb(b,d)}else{b=null;break a}else b=new ac(+a.a.next())}"["==D(a.a)&&(d=new R(yc(a)),b=new Ub(b,d))}if(b)if("/"==D(a.a)||"//"==D(a.a))d=b;else return b;else b=xc(a,"/"),d=new ec,c.push(b)}for(;"/"==D(a.a)||"//"==D(a.a);)b=a.a.next(),U(a,"Missing next location step."),b=xc(a,b),c.push(b);return new bc(d, +c)} +function xc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a))return d=new S(mc,new I("node")),a.a.next(),d;if(".."==D(a.a))return d=new S(lc,new I("node")),a.a.next(),d;var f;if("@"==D(a.a))f=cc,a.a.next(),U(a,"Missing attribute name");else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=kc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();U(a,"Missing node name")}else f=hc; +c=D(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==D(a.a,1)){if(!Zb(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!Zb(c))throw Error("Invalid type name: "+c);sc(a,"(");U(a,"Bad nodetype");e=D(a.a).charAt(0);var h=null;if('"'==e||"'"==e)h=uc(a);U(a,"Bad nodetype");tc(a);c=new I(c,h)}else c=vc(a);else if("*"==c)c=vc(a);else throw Error("Bad token: "+a.a.next());e=new R(yc(a),f.v);return d||new S(f,c,e,"//"==b)} +function yc(a){for(var b=[];"["==D(a.a);){a.a.next();U(a,"Missing predicate expression.");var c=qc(a);b.push(c);U(a,"Unclosed predicate expression.");sc(a,"]")}return b}function rc(a){if("-"==D(a.a))return a.a.next(),new nc(rc(a));var b=wc(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==a.a.next();)U(a,"Missing next union location path."),b.push(wc(a));a.a.back();a=new oc(b)}return a};function zc(a){switch(a.nodeType){case 1:return ga(Ac,a);case 9:return zc(a.documentElement);case 2:return a.ownerElement?zc(a.ownerElement):Bc;case 11:case 10:case 6:case 12:return Bc;default:return a.parentNode?zc(a.parentNode):Bc}}function Bc(){return null}function Ac(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?Ac(a.parentNode,b):null};function Cc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=xb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=fa(b.lookupNamespaceURI,b)):b=k(null);var d=qc(new pc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new sb(a));return new V(c,b)}} +function V(a,b){if(0==b)if(a instanceof G)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 G))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof G?Kb(a):""+a;break;case 1:this.numberValue=a instanceof G?+Kb(a):+a;break;case 3:this.booleanValue=a instanceof G?0<a.o():!!a;break;case 4:case 5:case 6:case 7:var d= +J(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof ub?e.e:e);this.snapshotLength=a.o();this.invalidIteratorState=!1;break;case 8:case 9:d=Jb(a);this.singleNodeValue=d instanceof ub?d.e:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}V.ANY_TYPE=0;V.NUMBER_TYPE=1;V.STRING_TYPE=2;V.BOOLEAN_TYPE=3;V.UNORDERED_NODE_ITERATOR_TYPE=4;V.ORDERED_NODE_ITERATOR_TYPE=5;V.UNORDERED_NODE_SNAPSHOT_TYPE=6;V.ORDERED_NODE_SNAPSHOT_TYPE=7;V.ANY_UNORDERED_NODE_TYPE=8;V.FIRST_ORDERED_NODE_TYPE=9;function Dc(a){this.lookupNamespaceURI=zc(a)} +function Ec(a){a=a||l;var b=a.document;b.evaluate||(a.XPathResult=V,b.evaluate=function(a,b,e,f){return(new Cc(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Cc(a,b)},b.createNSResolver=function(a){return new Dc(a)})};var W={};W.fa=function(){var a={wa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();W.n=function(a,b,c){var d=z(a);(w||B)&&Ec(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):W.fa;return w&&!Ua(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!y||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +W.L=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};W.pa=function(a,b){var c=function(){var c=W.n(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=z(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||W.L(c,a);return c}; +W.sa=function(a,b){var c=function(){var c=W.n(b,a,7);if(c){var e=c.snapshotLength;u&&void 0===e&&W.L(null,a);for(var f=[],h=0;h<e;++h)f.push(c.snapshotItem(h));return f}return b.selectNodes?(c=z(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();q(c,function(b){W.L(b,a)});return c};function Fc(a){return(a=a.exec(Fa()))?a[1]:""}var Gc=function(){if(mb)return Fc(/Firefox\/([0-9.]+)/);if(w||u)return Na;if(qb)return Fc(/Chrome\/([0-9.]+)/);if(rb)return Fc(/Version\/([0-9.]+)/);if(ob||pb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Fa());if(a)return a[1]+"."+a[2]}else{if(B)return(a=Fc(/Android\s+([0-9.]+)/))?a:Fc(/Version\/([0-9.]+)/);if(nb)return Fc(/Camino\/([0-9.]+)/)}return""}();var Hc,Ic;function Jc(a){return Kc?Hc(a):w?0<=ia(Wa,a):Ua(a)}function Lc(a){Kc?Ic(a):B?ia(Mc,a):ia(Gc,a)} +var Kc=function(){if(!y)return!1;var a=l.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Hc=function(a){return 0<=d.ha(e,""+a)};Ic=function(a){d.ha(f,""+a)};return!0}(),Nc;if(B){var Oc=/Android\s+([0-9\.]+)/.exec(Fa());Nc=Oc?Oc[1]:"0"}else Nc="0"; +var Mc=Nc,Pc=w&&!(w&&10<=Wa);B&&Lc(2.3);B&&Lc(4);rb&&Lc(6);function X(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}X.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};X.prototype.contains=function(a){return a instanceof X?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +X.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};X.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +X.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Qc(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var Rc=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Sc(a){function b(a){var c=(z(a)?z(a).parentWindow||z(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(Rc);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),L=parseFloat(c[3]),v=parseFloat(c[4]),r=parseFloat(c[5]),c=parseFloat(c[6]),ua=f.left+f.width,va=f.top+f.height,wa=f.left*d,d=ua*d,xa=f.left*e,e=ua*e,ya=f.top*L,L=va*L,za=f.top*v,ua=va*v,va=wa+ya+r,v=xa+za+c,ya=d+ya+r,za=e+za+c,wa=wa+L+r,xa=xa+ua+c,r=d+L+r,c=e+ua+c;f.left=Math.min(va,ya,wa,r);f.top=Math.min(v,za,xa,c); +r=Math.max(va,ya,wa,r);c=Math.max(v,za,xa,c);f.width=r-f.left;f.height=c-f.top}for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;(a=Qc(a)?a:null)&&b(a)}var c=Tc(a);if(c)return c.rect;if(Qc(a,"HTML"))return c=z(a),a=ab((c?c.parentWindow||c.defaultView:window)||window),new X(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new X(0,0,0,0)}var f=new X(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=z(a),f.left-=c.documentElement.clientLeft+ +c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));y&&!Jc(12)&&b(a);return f} +function Tc(a){var b=Qc(a,"MAP");if(!b&&!Qc(a,"AREA"))return null;var c=b?a:Qc(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=W.pa('/descendant::*[@usemap = "#'+c.name+'"]',z(c)))&&(e=Sc(d),!b&&"default"!=a.shape.toLowerCase())){var f=Uc(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new X(a+e.left,b+e.top,c,f)}return{ra:d,rect:e||new X(0,0,0,0)}} +function Uc(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new X(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new X(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 X(b,c,d-b,e-c)}return new X(0,0,0,0)};Ia||u||Kc&&Lc(3.6);w&&Jc(10);B&&Lc(4);function Y(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y)for(d=Vc(a),Wc(a),e=[],c=0;c<a.g.length;c++)e.push(a.t[a.g[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.A=0;Y.prototype.ea=0;function Vc(a){Wc(a);return a.g.concat()} +Y.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.A--,this.ea++,this.g.length>2*this.A&&Wc(this),!0):!1};function Wc(a){if(a.A!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.A!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} +Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.A++,this.g.push(a),this.ea++);this.t[a]=b};var Xc={};function Z(a,b,c){ca(a)&&(a=y?a.b:u?a.opera:a.c);a=new Yc(a,b,c);!b||b in Xc&&!c||(Xc[b]={key:a,shift:!1},c&&(Xc[c]={key:a,shift:!0}));return a}function Yc(a,b,c){this.code=a;this.ga=b||null;this.ua=c||this.ga}Z(8);Z(9);Z(13);var Zc=Z(16),$c=Z(17),ad=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var bd=Z(Ea?{b:91,c:91,opera:219}:Da?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ea?{b:92,c:92,opera:220}:Da?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ea?{b:93,c:93,opera:0}:Da?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:La?56:42},"*"); +Z({b:107,c:107,opera:La?61:43},"+");Z({b:109,c:109,opera:La?109:45},"-");Z({b:110,c:110,opera:La?190:78},".");Z({b:111,c:111,opera:La?191:47},"/");Z(La&&u?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var cd=new Y; +cd.set(1,Zc);cd.set(2,$c);cd.set(4,ad);cd.set(8,bd);(function(a){var b=new Y;q(Vc(a),function(c){b.set(a.get(c).code,c)});return b})(cd);y&&Jc(12);function dd(){this.I=void 0} +function ed(a,b,c){switch(typeof b){case "string":fd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],ed(a,a.I?a.I.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +fd(f,c),c.push(":"),ed(a,a.I?a.I.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var gd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},hd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function fd(a,b){b.push('"',a.replace(hd,function(a){if(a in gd)return gd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return gd[a]=e+b.toString(16)}),'"')};Ia||u||y&&Jc(3.5)||w&&Jc(8);function id(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,id);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=jd(a);return b}if("document"in a)return b={},b.WINDOW=jd(a),b;if(ba(a))return ma(a,id);a=Ya(a,function(a,b){return"number"==typeof b||m(b)});return Za(a,id);default:return null}} +function kd(a,b){return"array"==aa(a)?ma(a,function(a){return kd(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?ld(a.ELEMENT,b):"WINDOW"in a?ld(a.WINDOW,b):Za(a,function(a){return kd(a,b)}):a}function md(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.Q=ha());b.Q||(b.Q=ha());return b}function jd(a){var b=md(a.ownerDocument),c=$a(b,function(b){return b==a});c||(c=":wdc:"+b.Q++,b[c]=a);return c} +function ld(a,b){a=decodeURIComponent(a);var c=b||document,d=md(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function nd(a,b,c){var d;try{var e=c?ld(c.WINDOW):window,f=kd(b,e.document),h=a.apply(null,f);d={status:0,value:id(h)}}catch(n){d={status:"code"in n?n.code:13,value:{message:n.message}}}a=[];ed(new dd,d,a);return a.join("")};function od(a,b){return nd(function(a){var b=Sc(a);a=b.height;b=b.width;Pc||(b=Math.floor(b),a=Math.floor(a));return{width:b,height:a}},[a],b)}var pd=["_"],$=l;pd[0]in $||!$.execScript||$.execScript("var "+pd[0]);for(var qd;pd.length&&(qd=pd.shift());)pd.length||void 0===od?$=$[qd]?$[qd]:$[qd]={}:$[qd]=od;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_text.js b/src/ghostdriver/third_party/webdriver-atoms/get_text.js index 077ce28f8..7d21f54b9 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_text.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_text.js @@ -1,91 +1,99 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,p=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.ta=b.prototype;a.prototype=new c};var fa=window;function ga(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b} -function ha(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var n=d[g]||"",w=e[g]||"",x=RegExp("(\\d*)(\\D*)","g"),E=RegExp("(\\d*)(\\D*)","g");do{var U=x.exec(n)||["","",""],V=E.exec(w)||["","",""];if(0==U[0].length&&0==V[0].length)break;c=((0==U[1].length?0:parseInt(U[1],10))<(0==V[1].length?0:parseInt(V[1],10))?-1:(0==U[1].length?0:parseInt(U[1],10))>(0==V[1].length? -0:parseInt(V[1],10))?1:0)||((0==U[2].length)<(0==V[2].length)?-1:(0==U[2].length)>(0==V[2].length)?1:0)||(U[2]<V[2]?-1:U[2]>V[2]?1:0)}while(0==c)}return c}function ia(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ja=Array.prototype;function v(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ka(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var n=f[g];b.call(k,n,g,a)&&(d[e++]=n)}return d}function la(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function ma(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function na(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return p}function oa(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function pa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function qa(a){return ja.concat.apply(ja,arguments)} -function ra(a,b,c){return 2>=arguments.length?ja.slice.call(a,b):ja.slice.call(a,b,c)};var sa={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", +function(){return function(){function h(a){return function(){return this[a]}}function k(a){return function(){return a}}var p=this; +function aa(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)} +function ea(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)}}function fa(a,b,c){fa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return fa.apply(null,arguments)} +function ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ha=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.wa=b.prototype;a.prototype=new c};function ia(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b} +function ja(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var l=d[g]||"",v=e[g]||"",L=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var m=L.exec(l)||["","",""],n=r.exec(v)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))>(0==n[1].length? +0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c}function ka(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var la=Array.prototype;function t(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function ma(a,b){for(var c=a.length,d=[],e=0,f=q(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var l=f[g];b.call(void 0,l,g,a)&&(d[e++]=l)}return d}function na(a,b){for(var c=a.length,d=Array(c),e=q(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function oa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function pa(a,b){for(var c=a.length,d=q(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 qa(a,b){for(var c=a.length,d=q(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 ra(a,b){var c;a:{c=a.length;for(var d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:q(a)?a.charAt(c):a[c]}function sa(a,b){var c;a:if(q(a))c=q(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ta(a){return la.concat.apply(la,arguments)}function ua(a,b,c){return 2>=arguments.length?la.slice.call(a,b):la.slice.call(a,b,c)};var va={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ta="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ua=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function va(a){wa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(ua,"#$1$1$2$2$3$3"));return a.toLowerCase()}var wa=/^#(?:[0-9a-f]{3}){1,2}$/i,xa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function ya(a){var b=a.match(xa);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var za=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Aa(a){var b=a.match(za);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Ba[a]||Ca;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(y,Error); -var Ca="unknown error",Ba={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ba[13]=Ca;Ba[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Da,Ea,Fa,Ga,Ha,Ia;function Ja(){return r.navigator?r.navigator.userAgent:m}Ga=Fa=Ea=Da=p;var Ka;if(Ka=Ja()){var La=r.navigator;Da=0==Ka.indexOf("Opera");Ea=!Da&&-1!=Ka.indexOf("MSIE");Fa=!Da&&-1!=Ka.indexOf("WebKit");Ga=!Da&&!Fa&&"Gecko"==La.product}var z=Da,A=Ea,B=Ga,C=Fa,Ma,Na=r.navigator;Ma=Na&&Na.platform||"";Ha=-1!=Ma.indexOf("Mac");Ia=-1!=Ma.indexOf("Win");var Oa=-1!=Ma.indexOf("Linux");function Pa(){var a=r.document;return a?a.documentMode:k}var Qa; -a:{var Ra="",Sa;if(z&&r.opera)var Ta=r.opera.version,Ra="function"==typeof Ta?Ta():Ta;else if(B?Sa=/rv\:([^\);]+)(\)|;)/:A?Sa=/MSIE\s+([^\);]+)(\)|;)/:C&&(Sa=/WebKit\/(\S+)/),Sa)var Ua=Sa.exec(Ja()),Ra=Ua?Ua[1]:"";if(A){var Va=Pa();if(Va>parseFloat(Ra)){Qa=String(Va);break a}}Qa=Ra}var Wa={};function Xa(a){return Wa[a]||(Wa[a]=0<=ha(Qa,a))}function D(a){return A&&Ya>=a}var Za=r.document,Ya=!Za||!A?k:Pa()||("CSS1Compat"==Za.compatMode?parseInt(Qa,10):5);var $a;!B&&!A||A&&D(9)||B&&Xa("1.9.1");A&&Xa("9");var ab=A||z||C;function F(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}F.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function bb(a,b){this.width=a;this.height=b}bb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};bb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};bb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};bb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function cb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function db(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function eb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var fb=3;function gb(a){return a?new hb(G(a)):$a||($a=new hb)}function ib(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function jb(a){if(ab)return a.parentElement;a=a.parentNode;return da(a)&&1==a.nodeType?a:m}function kb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function lb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?mb(a,b):!c&&kb(e,b)?-1*nb(a,b):!d&&kb(f,a)?nb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function nb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return mb(d,a)}function mb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function ob(a,b){var c=[];return pb(a,b,c,l)?c[0]:k} -function pb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||pb(a,b,c,d))return l;a=a.nextSibling}return p}function qb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function hb(a){this.S=a||r.document||document}function rb(a){var b=a.S;a=!C&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new F(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}hb.prototype.contains=kb;var sb,tb,ub,vb,wb,xb,yb;yb=xb=wb=vb=ub=tb=sb=p;var H=Ja();H&&(-1!=H.indexOf("Firefox")?sb=l:-1!=H.indexOf("Camino")?tb=l:-1!=H.indexOf("iPhone")||-1!=H.indexOf("iPod")?ub=l:-1!=H.indexOf("iPad")?vb=l:-1!=H.indexOf("Android")?wb=l:-1!=H.indexOf("Chrome")?xb=l:-1!=H.indexOf("Safari")&&(yb=l));var zb=sb,Ab=tb,Bb=ub,Cb=vb,Db=wb,Eb=xb,Fb=yb;function Gb(a,b,c){this.e=a;this.na=b||1;this.m=c||1};var I=A&&!D(9),Hb=A&&!D(8);function Ib(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ra=e;this.parentNode=b}function Jb(a,b,c){var d=Hb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Ib(b,a,b.nodeName,d,c)};function Kb(a){this.Q=a;this.F=0}function Lb(a){a=a.match(Mb);for(var b=0;b<a.length;b++)Nb.test(a[b])&&a.splice(b,1);return new Kb(a)}var Mb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Nb=/^\s/;function J(a,b){return a.Q[a.F+(b||0)]}Kb.prototype.next=function(){return this.Q[this.F++]};Kb.prototype.back=function(){this.F--};Kb.prototype.empty=function(){return this.Q.length<=this.F};function K(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function Ob(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return p}catch(d){return p}Hb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Pb(a,b,c,d,e){return(I?Qb:Rb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)} -function Qb(a,b,c,d,e){if(a instanceof Sb||8==a.l||c&&a.l===m){var f=b.all;if(!f)return e;a=Tb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],n=0;b=f[n++];)Ob(b,c,d)&&g.push(b);f=g}for(n=0;b=f[n++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Ub(a,b,c,d,e);return e} -function Rb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?Ub(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Ob(a,c,d)&&e.add(a)}));return e} -function Vb(a,b,c,d,e){var f;if((a instanceof Sb||8==a.l||c&&a.l===m)&&(f=b.childNodes)){var g=Tb(a);if("*"!=g&&(f=ka(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ka(f,function(a){return Ob(a,c,d)}));v(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return Wb(a,b,c,d,e)}function Wb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Ob(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Ub(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Ob(b,c,d)&&a.matches(b)&&e.add(b),Ub(a,b,c,d,e)}function Tb(a){if(a instanceof M){if(8==a.l)return"!";if(a.l===m)return"*"}return a.getName()};function L(){this.m=this.i=m;this.A=0}function Xb(a){this.o=a;this.next=this.u=m}function Yb(a,b){if(a.i){if(!b.i)return a}else return b;for(var c=a.i,d=b.i,e=m,f=m,g=0;c&&d;)c.o==d.o||c.o instanceof Ib&&d.o instanceof Ib&&c.o.e==d.o.e?(f=c,c=c.next,d=d.next):0<lb(c.o,d.o)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.A=g;return a} -L.prototype.unshift=function(a){a=new Xb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.A++};L.prototype.add=function(a){a=new Xb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.A++};function Zb(a){return(a=a.i)?a.o:m}L.prototype.p=q("A");function $b(a){return(a=Zb(a))?K(a):""}function ac(a,b){return new bc(a,!!b)}function bc(a,b){this.ka=a;this.R=(this.v=b)?a.m:a.i;this.M=m} -bc.prototype.next=function(){var a=this.R;if(a==m)return m;var b=this.M=a;this.R=this.v?a.u:a.next;return b.o};bc.prototype.remove=function(){var a=this.ka,b=this.M;b||h(Error("Next must be called at least once before remove."));var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.A--;this.M=m};function N(a){this.h=a;this.j=this.q=p;this.B=m}N.prototype.f=q("q");function cc(a,b){a.q=b}function dc(a,b){a.j=b}N.prototype.s=q("B");function O(a,b){var c=a.evaluate(b);return c instanceof L?+$b(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?$b(c):""+c}function ec(a,b){var c=a.evaluate(b);return c instanceof L?!!c.p():!!c};function fc(a,b,c){N.call(this,a.h);this.P=a;this.W=b;this.aa=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.P==gc&&(!c.j&&!c.f()&&4!=c.h&&0!=c.h&&b.s()?this.B={name:b.s().name,w:c}:!b.j&&(!b.f()&&4!=b.h&&0!=b.h&&c.s())&&(this.B={name:c.s().name,w:b}))}u(fc,N); -function hc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof L&&c instanceof L){f=ac(b);for(b=f.next();b;b=f.next()){e=ac(c);for(d=e.next();d;d=e.next())if(a(K(b),K(d)))return l}return p}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=ac(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+K(d);break;case "boolean":f=!!K(d);break;case "string":f=K(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return p}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}fc.prototype.evaluate=function(a){return this.P.n(this.W,this.aa,a)};fc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.P+"\n";a+=" ";b+=this.W.toString(a)+"\n";return b+=this.aa.toString(a)};function ic(a,b,c,d){this.ma=a;this.Z=b;this.h=c;this.n=d}ic.prototype.toString=q("ma");var jc={}; -function Q(a,b,c,d){a in jc&&h(Error("Binary operator already created: "+a));a=new ic(a,b,c,d);return jc[a.toString()]=a}Q("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});Q("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});Q("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});Q("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});Q("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});Q("<",4,2,function(a,b,c){return hc(function(a,b){return a<b},a,b,c)}); -Q(">",4,2,function(a,b,c){return hc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return hc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return hc(function(a,b){return a>=b},a,b,c)});var gc=Q("=",3,2,function(a,b,c){return hc(function(a,b){return a==b},a,b,c,l)});Q("!=",3,2,function(a,b,c){return hc(function(a,b){return a!=b},a,b,c,l)});Q("and",2,2,function(a,b,c){return ec(a,c)&&ec(b,c)});Q("or",1,2,function(a,b,c){return ec(a,c)||ec(b,c)});function kc(a,b){b.p()&&4!=a.h&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.h);this.$=a;this.d=b;this.q=a.f();this.j=a.j}u(kc,N);kc.prototype.evaluate=function(a){a=this.$.evaluate(a);return lc(this.d,a)};kc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.$.toString(a);return b+=this.d.toString(a)};function mc(a,b){b.length<a.Y&&h(Error("Function "+a.k+" expects at least"+a.Y+" arguments, "+b.length+" given"));a.N!==m&&b.length>a.N&&h(Error("Function "+a.k+" expects at most "+a.N+" arguments, "+b.length+" given"));a.la&&v(b,function(b,d){4!=b.h&&h(Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b))});N.call(this,a.h);this.D=a;this.J=b;cc(this,a.q||na(b,function(a){return a.f()}));dc(this,a.ja&&!b.length||a.ia&&!!b.length||na(b,function(a){return a.j}))}u(mc,N); -mc.prototype.evaluate=function(a){return this.D.n.apply(m,qa(a,this.J))};mc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.D+"\n";b+=" ";this.J.length&&(a+=b+"Arguments:",b+=" ",a=ma(this.J,function(a,d){return a+"\n"+d.toString(b)},a));return a};function nc(a,b,c,d,e,f,g,n,w){this.k=a;this.h=b;this.q=c;this.ja=d;this.ia=e;this.n=f;this.Y=g;this.N=s(n)?n:g;this.la=!!w}nc.prototype.toString=q("k");var oc={}; -function R(a,b,c,d,e,f,g,n){a in oc&&h(Error("Function already created: "+a+"."));oc[a]=new nc(a,b,c,d,p,e,f,g,n)}R("boolean",2,p,p,function(a,b){return ec(b,a)},1);R("ceiling",1,p,p,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,p,p,function(a,b){var c=ra(arguments,1);return ma(c,function(b,c){return b+P(c,a)},"")},2,m);R("contains",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,p,p,function(a,b){return b.evaluate(a).p()},1,1,l);R("false",2,p,p,aa(p),0); -R("floor",1,p,p,function(a,b){return Math.floor(O(b,a))},1);R("id",4,p,p,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return oa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!pa(f,a)&&f.push(a)});f.sort(lb);var g=new L;v(f,function(a){g.add(a)});return g},1);R("lang",2,p,p,aa(p),1); -R("last",1,l,p,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.m},0);R("local-name",3,p,l,function(a,b){var c=b?Zb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,l);R("name",3,p,l,function(a,b){var c=b?Zb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,l);R("namespace-uri",3,l,p,aa(""),0,1,l);R("normalize-space",3,p,l,function(a,b){return(b?P(b,a):K(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,p,p,function(a,b){return!ec(b,a)},1);R("number",1,p,l,function(a,b){return b?O(b,a):+K(a.e)},0,1);R("position",1,l,p,function(a){return a.na},0);R("round",1,p,p,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,p,l,function(a,b){return b?P(b,a):K(a.e)},0,1);R("string-length",1,p,l,function(a,b){return(b?P(b,a):K(a.e)).length},0,1); -R("substring",3,p,p,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,p,p,function(a,b){for(var c=ac(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,l);R("translate",3,p,p,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);R("true",2,p,p,aa(l),0);function M(a,b){this.ca=a;this.X=s(b)?b:m;this.l=m;switch(a){case "comment":this.l=8;break;case "text":this.l=fb;break;case "processing-instruction":this.l=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function pc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.matches=function(a){return this.l===m||this.l==a.nodeType};M.prototype.getName=q("ca"); -M.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.ca;this.X===m||(b+="\n"+this.X.toString(a+" "));return b};function qc(a){N.call(this,3);this.ba=a.substring(1,a.length-1)}u(qc,N);qc.prototype.evaluate=q("ba");qc.prototype.toString=function(a){return(a||"")+"literal: "+this.ba};function Sb(a){this.k=a.toLowerCase()}Sb.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.k||this.k==a.nodeName.toLowerCase()?l:this.k==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};Sb.prototype.getName=q("k");Sb.prototype.toString=function(a){return(a||"")+"nametest: "+this.k};function rc(a){N.call(this,1);this.da=a}u(rc,N);rc.prototype.evaluate=q("da");rc.prototype.toString=function(a){return(a||"")+"number: "+this.da};function sc(a,b){N.call(this,a.h);this.U=a;this.C=b;this.q=a.f();this.j=a.j;if(1==this.C.length){var c=this.C[0];!c.L&&c.r==tc&&(c=c.I,"*"!=c.getName()&&(this.B={name:c.getName(),w:m}))}}u(sc,N);function uc(){N.call(this,4)}u(uc,N);uc.prototype.evaluate=function(a){var b=new L;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};uc.prototype.toString=function(a){return a+"RootHelperExpr"};function vc(){N.call(this,4)}u(vc,N);vc.prototype.evaluate=function(a){var b=new L;b.add(a.e);return b}; -vc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -sc.prototype.evaluate=function(a){var b=this.U.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));a=this.C;for(var c=0,d=a.length;c<d&&b.p();c++){var e=a[c],f=ac(b,e.r.v),g;if(!e.f()&&e.r==wc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Gb(g))}else if(!e.f()&&e.r==xc)g=f.next(),b=e.evaluate(new Gb(g));else{g=f.next();for(b=e.evaluate(new Gb(g));(g=f.next())!=m;)g=e.evaluate(new Gb(g)),b=Yb(b,g)}}return b}; -sc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.U.toString(b);this.C.length&&(c+=b+"Steps:\n",b+=" ",v(this.C,function(a){c+=a.toString(b)}));return c};function yc(a,b){this.d=a;this.v=!!b}function lc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=ac(b),f=b.p(),g,n=0;g=e.next();n++){var w=a.v?f-n:n+1;g=d.evaluate(new Gb(g,w,f));var x;"number"==typeof g?x=w==g:"string"==typeof g||"boolean"==typeof g?x=!!g:g instanceof L?x=0<g.p():h(Error("Predicate.evaluate returned an unexpected type."));x||e.remove()}return b}yc.prototype.s=function(){return 0<this.d.length?this.d[0].s():m}; -yc.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return l}return p};yc.prototype.p=function(){return this.d.length};yc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return ma(this.d,function(a,d){return a+"\n"+b+d.toString(b)},a)};function zc(a,b,c,d){N.call(this,4);this.r=a;this.I=b;this.d=c||new yc([]);this.L=!!d;b=this.d.s();a.pa&&b&&(a=b.name,a=I?a.toLowerCase():a,this.B={name:a,w:b.w});this.q=this.d.f()}u(zc,N); -zc.prototype.evaluate=function(a){var b=a.e,c=m,c=this.s(),d=m,e=m,f=0;c&&(d=c.name,e=c.w?P(c.w,a):m,f=1);if(this.L)if(!this.f()&&this.r==Ac)c=Pb(this.I,b,d,e),c=lc(this.d,c,f);else if(a=ac((new zc(Bc,new M("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);(b=a.next())!=m;)c=Yb(c,this.n(b,d,e,f));else c=new L;else c=this.n(a.e,d,e,f);return c};zc.prototype.n=function(a,b,c,d){a=this.r.D(this.I,a,b,c);return a=lc(this.d,a,d)}; -zc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.L?"//":"/")+"\n";this.r.k&&(b+=a+"Axis: "+this.r+"\n");b+=this.I.toString(a);if(this.d.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.d.length;c++)var d=c<this.d.length-1?", ":"",b=b+(this.d[c].toString(a)+d);return b};function Cc(a,b,c,d){this.k=a;this.D=b;this.v=c;this.pa=d}Cc.prototype.toString=q("k");var Dc={}; -function S(a,b,c,d){a in Dc&&h(Error("Axis already created: "+a));b=new Cc(a,b,c,!!d);return Dc[a]=b}S("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);S("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var tc=S("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new Ib(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.l===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)I?g.nodeValue&&c.add(Jb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(I?g.nodeValue&&c.add(Jb(b,g,b.sourceIndex)):c.add(g));return c},p),Ac=S("child",function(a,b,c,d,e){return(I?Vb:Wb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)},p,l); -S("descendant",Pb,p,l);var Bc=S("descendant-or-self",function(a,b,c,d){var e=new L;Ob(b,c,d)&&a.matches(b)&&e.add(b);return Pb(a,b,c,d,e)},p,l),wc=S("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)Ob(f,c,d)&&a.matches(f)&&e.add(f),e=Pb(a,f,c,d,e);while(b=b.parentNode);return e},p,l);S("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},p);S("namespace",function(){return new L},p); -var Ec=S("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},p),xc=S("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,n=f.length;g<n;g++){var w=[];for(b=f[g];b=b.previousSibling;)w.unshift(b);for(var x=0,E=w.length;x<E;x++)b=w[x],Ob(b,c,d)&&a.matches(b)&&e.add(b),e=Pb(a,b,c,d,e)}return e},l,l); -S("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Fc=S("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},p);function Gc(a){N.call(this,1);this.T=a;this.q=a.f();this.j=a.j}u(Gc,N);Gc.prototype.evaluate=function(a){return-O(this.T,a)};Gc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.T.toString(a+" ")};function Hc(a){N.call(this,4);this.G=a;cc(this,na(this.G,function(a){return a.f()}));dc(this,na(this.G,function(a){return a.j}))}u(Hc,N);Hc.prototype.evaluate=function(a){var b=new L;v(this.G,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=Yb(b,c)});return b};Hc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";v(this.G,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Ic(a){this.a=a}function Jc(a){for(var b,c=[];;){T(a,"Missing right hand side of binary expression.");b=Kc(a);var d=a.a.next();if(!d)break;var e=(d=jc[d]||m)&&d.Z;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Z;)b=new fc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new fc(c.pop(),c.pop(),b);return b}function T(a,b){a.a.empty()&&h(Error(b))}function Lc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Mc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Nc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new qc(a)}function Oc(a){return"*"!=J(a.a)&&":"==J(a.a,1)&&"*"==J(a.a,2)?new Sb(a.a.next()+a.a.next()+a.a.next()):new Sb(a.a.next())} -function Pc(a){var b,c=[],d;if("/"==J(a.a)||"//"==J(a.a)){b=a.a.next();d=J(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new uc;d=new uc;T(a,"Missing next location step.");b=Qc(a,b);c.push(b)}else{a:{b=J(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Jc(a);T(a,'unclosed "("');Lc(a,")");break;case '"':case "'":b=Nc(a);break;default:if(isNaN(+b))if(!pc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==J(a.a,1)){b=a.a.next();b=oc[b]||m;a.a.next();for(d=[];")"!=J(a.a);){T(a,"Missing function argument list.");d.push(Jc(a));if(","!=J(a.a))break;a.a.next()}T(a,"Unclosed function argument list.");Mc(a);b=new mc(b,d)}else{b=m;break a}else b=new rc(+a.a.next())}"["==J(a.a)&&(d=new yc(Rc(a)),b=new kc(b,d))}if(b)if("/"==J(a.a)||"//"==J(a.a))d=b;else return b;else b=Qc(a,"/"),d=new vc,c.push(b)}for(;"/"==J(a.a)||"//"==J(a.a);)b=a.a.next(),T(a,"Missing next location step."),b=Qc(a,b),c.push(b);return new sc(d, -c)} -function Qc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==J(a.a))return d=new zc(Fc,new M("node")),a.a.next(),d;if(".."==J(a.a))return d=new zc(Ec,new M("node")),a.a.next(),d;var f;"@"==J(a.a)?(f=tc,a.a.next(),T(a,"Missing attribute name")):"::"==J(a.a,1)?(/(?![0-9])[\w]/.test(J(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Dc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),T(a,"Missing node name")):f=Ac;e=J(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==J(a.a, -1)){pc(e)||h(Error("Invalid node type: "+e));c=a.a.next();pc(c)||h(Error("Invalid type name: "+c));Lc(a,"(");T(a,"Bad nodetype");e=J(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Nc(a);T(a,"Bad nodetype");Mc(a);c=new M(c,g)}else c=Oc(a);else"*"==e?c=Oc(a):h(Error("Bad token: "+a.a.next()));e=new yc(Rc(a),f.v);return d||new zc(f,c,e,"//"==b)} -function Rc(a){for(var b=[];"["==J(a.a);){a.a.next();T(a,"Missing predicate expression.");var c=Jc(a);b.push(c);T(a,"Unclosed predicate expression.");Lc(a,"]")}return b}function Kc(a){if("-"==J(a.a))return a.a.next(),new Gc(Kc(a));var b=Pc(a);if("|"!=J(a.a))a=b;else{for(b=[b];"|"==a.a.next();)T(a,"Missing next union location path."),b.push(Pc(a));a.a.back();a=new Hc(b)}return a};function Sc(a){a.length||h(Error("Empty XPath expression."));a=Lb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Jc(new Ic(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Gb(a));return new W(e,d)}} -function W(a,b){0==b&&(a instanceof L?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof L))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?$b(a):""+a;break;case 1:this.numberValue=a instanceof L?+$b(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.p():!!a;break;case 4:case 5:case 6:case 7:var d=ac(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Ib?e.e:e);this.snapshotLength=a.p();this.invalidIteratorState=p;break;case 8:case 9:d=Zb(a);this.singleNodeValue=d instanceof Ib?d.e:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function Tc(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=W,b.evaluate=function(a,b,e,f){return(new Sc(a)).evaluate(b,f)},b.createExpression=function(a){return new Sc(a)})};var X={};X.fa=function(){var a={ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();X.n=function(a,b,c){var d=G(a);(A||Db)&&Tc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.fa;return A&&!Xa(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -X.K=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};X.oa=function(a,b){var c=function(){var c=X.n(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||X.K(c,a);return c}; -X.qa=function(a,b){var c=function(){var c=X.n(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&X.K(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){X.K(b,a)});return c};function Uc(a){return(a=a.exec(Ja()))?a[1]:""}var Vc=function(){if(zb)return Uc(/Firefox\/([0-9.]+)/);if(A||z)return Qa;if(Eb)return Uc(/Chrome\/([0-9.]+)/);if(Fb)return Uc(/Version\/([0-9.]+)/);if(Bb||Cb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ja());if(a)return a[1]+"."+a[2]}else{if(Db)return(a=Uc(/Android\s+([0-9.]+)/))?a:Uc(/Version\/([0-9.]+)/);if(Ab)return Uc(/Camino\/([0-9.]+)/)}return""}();var Wc,Xc;function Yc(a){return Zc?Wc(a):A?0<=ha(Ya,a):Xa(a)}function $c(a){Zc?Xc(a):Db?ha(ad,a):ha(Vc,a)} -var Zc=function(){if(!B)return p;var a=r.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}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;Wc=function(a){return 0<=d.ha(e,""+a)};Xc=function(a){d.ha(f,""+a)};return l}(),bd;if(Db){var cd=/Android\s+([0-9\.]+)/.exec(Ja());bd=cd?cd[1]:"0"}else bd="0"; -var ad=bd,dd=A&&!D(8),ed=A&&!D(9),fd=A&&!D(10);Db&&$c(2.3);!z&&(!C||Yc("533"));function gd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function hd(a,b){return gd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function id(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function jd(a){if(A&&!D(8))return a.offsetParent;var b=G(a),c=hd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=hd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function kd(a){var b=new F;if(1==a.nodeType){if(a.getBoundingClientRect){var c=id(a);b.x=c.left;b.y=c.top}else{c=rb(gb(a));var d,e=G(a),f=hd(a,"position"),g=B&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),n=new F(0,0),w;d=e?G(e):document;if(w=A)if(w=!D(9))w="CSS1Compat"!=gb(d).S.compatMode;w=w?d.body:d.documentElement;if(a!=w)if(a.getBoundingClientRect)d=id(a),e=rb(gb(e)),n.x=d.left+e.x,n.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(w),n.x=d.screenX-e.screenX,n.y=d.screenY-e.screenY;else{g=a;do{n.x+=g.offsetLeft;n.y+=g.offsetTop;g!=a&&(n.x+=g.clientLeft||0,n.y+=g.clientTop||0);if(C&&"fixed"==hd(g,"position")){n.x+=e.body.scrollLeft;n.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(z||C&&"absolute"==f)n.y-=e.body.offsetTop;for(g=a;(g=jd(g))&&g!=e.body&&g!=w;)if(n.x-=g.scrollLeft,!z||"TR"!=g.tagName)n.y-=g.scrollTop}b.x=n.x-c.x;b.y=n.y-c.y}if(B&&!Xa(12)){var x;A?x="-ms-transform": -C?x="-webkit-transform":z?x="-o-transform":B&&(x="-moz-transform");var E;x&&(E=hd(a,x));E||(E=hd(a,"transform"));E?(a=E.match(ld),a=!a?new F(0,0):new F(parseFloat(a[1]),parseFloat(a[2]))):a=new F(0,0);b=new F(b.x+a.x,b.y+a.y)}}else x="function"==ba(a.V),E=a,a.targetTouches?E=a.targetTouches[0]:x&&a.V().targetTouches&&(E=a.V().targetTouches[0]),b.x=E.clientX,b.y=E.clientY;return b} -function md(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=id(a),new bb(a.right-a.left,a.bottom-a.top)):new bb(b,c)}var ld=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var nd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function od(a){var b=[];v(a.split(nd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b} -function pd(a){var b;b="usemap";return"style"==b?od(a.style.cssText):dd&&"value"==b&&Y(a,"INPUT")?a.value:ed&&a[b]===l?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:m}function qd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:m} -function Z(a,b){var c=ia(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=ed?"styleFloat":"cssFloat";c=gd(a,c)||rd(a,c);if(c===m)c=m;else if(pa(ta,b)&&(wa.test("#"==c.charAt(0)?c:"#"+c)||Aa(c).length||sa&&sa[c.toLowerCase()]||ya(c).length)){var d=ya(c);if(!d.length){a:if(d=Aa(c),!d.length){d=sa[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(wa.test(d)&&(d=va(d),d=va(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function rd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=qd(a))?rd(c,b):m} -function sd(a){if("function"==ba(a.getBBox)&&!Y(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=Z(a,"overflow")?a=l:(a=qd(a),!a||!Y(a,"HTML")?a=l:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||fa).document;a=b.documentElement;var d=b.body;d||h(new y(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth, -a.offsetWidth,d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new bb(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new bb(a.clientWidth,a.clientHeight);return a}if("none"!=hd(a,"display"))a=md(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=md(a);b.display=d;b.position=f;b.visibility=e}return a} -function td(a,b){function c(a){if("none"==Z(a,"display"))return p;a=qd(a);return!a||c(a)}function d(a){var b=sd(a);return 0<b.height&&0<b.width?l:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):na(a.childNodes,function(b){return b.nodeType==fb&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a,b){var c;if((c=b==m?jb(a):jb(b))&&("hidden"==Z(c,"overflow-x")||"hidden"==Z(c,"overflow-y"))){var d=sd(c),f=kd(c),g=kd(a);return f.x+d.width<=g.x&&"hidden"==Z(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==Z(c,"overflow-y")?p:l}return!c||e(a,c)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=kd(a),a=sd(a),0<=b.x+a.width&&0<=b.y+a.height?l:p;a=qd(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=qb(a,function(a){return Y(a,"SELECT")});return!!g&&td(g,l)}if(Y(a,"MAP")){if(!a.name)return p;g=G(a);g= -g.evaluate?X.oa('/descendant::*[@usemap = "#'+a.name+'"]',g):ob(g,function(b){return Y(b)&&pd(b)=="#"+a.name});return!!g&&td(g,b)}return Y(a,"AREA")?(g=qb(a,function(a){return Y(a,"MAP")}),!!g&&td(g,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==ud(a)||!d(a)||!e(a,m)?p:f(a)}function vd(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function wd(a){var b=[];xd(a,b);b=la(b,vd);return vd(b.join("\n")).replace(/\xa0/g," ")} -function xd(a,b){if(Y(a,"BR"))b.push("");else{var c=Y(a,"TD"),d=Z(a,"display"),e=!c&&!pa(yd,d),f=a.previousElementSibling!=k?a.previousElementSibling:ib(a.previousSibling),f=f?Z(f,"display"):"",g=Z(a,"float")||Z(a,"cssFloat")||Z(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var n=td(a),w=m,x=m;n&&(w=Z(a,"white-space"),x=Z(a,"text-transform"));v(a.childNodes,function(a){a.nodeType==fb&&n?zd(a,b,w,x):Y(a)&&xd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!ga(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var yd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function zd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ga(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function ud(a){if(fd){if("relative"==Z(a,"position"))return 1;a=Z(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Ad(a)}function Ad(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=qd(a))&&(b*=Ad(a));return b};C||z||Zc&&$c(3.6);A&&Yc(10);Db&&$c(4);function Bd(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Bd){d=Cd(a);Dd(a);e=[];for(c=0;c<a.g.length;c++)e.push(a.t[a.g[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Bd.prototype.z=0;Bd.prototype.ea=0;function Cd(a){Dd(a);return a.g.concat()} -Bd.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.z--,this.ea++,this.g.length>2*this.z&&Dd(this),l):p};function Dd(a){if(a.z!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.z!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} -Bd.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Bd.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.z++,this.g.push(a),this.ea++);this.t[a]=b};var Ed={};function $(a,b,c){da(a)&&(a=B?a.b:z?a.opera:a.c);a=new Fd(a,b,c);if(b&&(!(b in Ed)||c))Ed[b]={key:a,shift:p},c&&(Ed[c]={key:a,shift:l});return a}function Fd(a,b,c){this.code=a;this.ga=b||m;this.sa=c||this.ga}$(8);$(9);$(13);var Gd=$(16),Hd=$(17),Id=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); -$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Jd=$(Ia?{b:91,c:91,opera:219}:Ha?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -$(Ia?{b:92,c:92,opera:220}:Ha?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});$(Ia?{b:93,c:93,opera:0}:Ha?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Oa?56:42},"*");$({b:107,c:107,opera:Oa?61:43},"+"); -$({b:109,c:109,opera:Oa?109:45},"-");$({b:110,c:110,opera:Oa?190:78},".");$({b:111,c:111,opera:Oa?191:47},"/");$(Oa&&z?m:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Kd=new Bd;Kd.set(1,Gd);Kd.set(2,Hd);Kd.set(4,Id); -Kd.set(8,Jd);(function(a){var b=new Bd;v(Cd(a),function(c){b.set(a.get(c).code,c)});return b})(Kd);B&&Yc(12);function Ld(){this.H=k} -function Md(a,b,c){switch(typeof b){case "string":Nd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Md(a,a.H?a.H.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Nd(f, -c),c.push(":"),Md(a,a.H?a.H.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Od={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Pd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Nd(a,b){b.push('"',a.replace(Pd,function(a){if(a in Od)return Od[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Od[a]=e+b.toString(16)}),'"')};C||z||B&&Yc(3.5)||A&&Yc(8);function Qd(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return la(a,Qd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Rd(a);return b}if("document"in a)return b={},b.WINDOW=Rd(a),b;if(ca(a))return la(a,Qd);a=cb(a,function(a,b){return"number"==typeof b||t(b)});return db(a,Qd);default:return m}} -function Sd(a,b){return"array"==ba(a)?la(a,function(a){return Sd(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?Td(a.ELEMENT,b):"WINDOW"in a?Td(a.WINDOW,b):db(a,function(a){return Sd(a,b)}):a}function Ud(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.O=ea());b.O||(b.O=ea());return b}function Rd(a){var b=Ud(a.ownerDocument),c=eb(b,function(b){return b==a});c||(c=":wdc:"+b.O++,b[c]=a);return c} -function Td(a,b){a=decodeURIComponent(a);var c=b||document,d=Ud(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function Vd(a){var b=wd;a=[a];var c=window||fa,d;try{var b=t(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Sd(a,c.document),f=b.apply(m,e);d={status:0,value:Qd(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}b=[];Md(new Ld,d,b);return b.join("")}var Wd=["_"],Xd=r;!(Wd[0]in Xd)&&Xd.execScript&&Xd.execScript("var "+Wd[0]);for(var Yd;Wd.length&&(Yd=Wd.shift());)!Wd.length&&s(Vd)?Xd[Yd]=Vd:Xd=Xd[Yd]?Xd[Yd]:Xd[Yd]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var wa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),xa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,ya=/^#(?:[0-9a-f]{3}){1,2}$/i,za=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a,b){this.code=a;this.state=Ha[a]||Ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(Ba,Error); +var Ia="unknown error",Ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ha[13]=Ia;Ha[9]="unknown command";Ba.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa;function Pa(){return p.navigator?p.navigator.userAgent:null}Ma=La=Ka=Ja=!1;var Qa;if(Qa=Pa()){var Ra=p.navigator;Ja=0==Qa.indexOf("Opera");Ka=!Ja&&-1!=Qa.indexOf("MSIE");La=!Ja&&-1!=Qa.indexOf("WebKit");Ma=!Ja&&!La&&"Gecko"==Ra.product}var u=Ja,w=Ka,x=Ma,Sa=La,Ta,Ua=p.navigator;Ta=Ua&&Ua.platform||"";Na=-1!=Ta.indexOf("Mac");Oa=-1!=Ta.indexOf("Win");var Va=-1!=Ta.indexOf("Linux");function Wa(){var a=p.document;return a?a.documentMode:void 0}var Xa; +a:{var Ya="",Za;if(u&&p.opera)var $a=p.opera.version,Ya="function"==typeof $a?$a():$a;else if(x?Za=/rv\:([^\);]+)(\)|;)/:w?Za=/MSIE\s+([^\);]+)(\)|;)/:Sa&&(Za=/WebKit\/(\S+)/),Za)var ab=Za.exec(Pa()),Ya=ab?ab[1]:"";if(w){var bb=Wa();if(bb>parseFloat(Ya)){Xa=String(bb);break a}}Xa=Ya}var cb={};function db(a){return cb[a]||(cb[a]=0<=ja(Xa,a))}var eb=p.document,fb=eb&&w?Wa()||("CSS1Compat"==eb.compatMode?parseInt(Xa,10):5):void 0;!x&&!w||w&&w&&9<=fb||x&&db("1.9.1");w&&db("9");function gb(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}gb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};gb.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};gb.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};gb.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function hb(a,b){this.width=a;this.height=b}hb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};hb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};hb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};hb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ib(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function jb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function kb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var lb=3;function mb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new hb(a.clientWidth,a.clientHeight)}function nb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=fb)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=y(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function y(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function tb(a){this.ja=a||p.document||document}tb.prototype.contains=ob;var ub,vb,wb,xb,yb,zb,Ab;Ab=zb=yb=xb=wb=vb=ub=!1;var z=Pa();z&&(-1!=z.indexOf("Firefox")?ub=!0:-1!=z.indexOf("Camino")?vb=!0:-1!=z.indexOf("iPhone")||-1!=z.indexOf("iPod")?wb=!0:-1!=z.indexOf("iPad")?xb=!0:-1!=z.indexOf("Android")?yb=!0:-1!=z.indexOf("Chrome")?zb=!0:-1!=z.indexOf("Safari")&&(Ab=!0));var Bb=ub,Cb=vb,Db=wb,Eb=xb,Fb=yb,Gb=zb,Hb=Ab;function Ib(a,b,c){this.e=a;this.qa=b||1;this.m=c||1};var A=w&&!(w&&9<=fb),Jb=w&&!(w&&8<=fb);function Kb(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ua=e;this.parentNode=b}function Lb(a,b,c){var d=Jb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Kb(b,a,b.nodeName,d,c)};function Mb(a){this.S=a;this.G=0}function Nb(a){a=a.match(Ob);for(var b=0;b<a.length;b++)Pb.test(a[b])&&a.splice(b,1);return new Mb(a)}var Ob=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Pb=/^\s/;function B(a,b){return a.S[a.G+(b||0)]}Mb.prototype.next=function(){return this.S[this.G++]};Mb.prototype.back=function(){this.G--};Mb.prototype.empty=function(){return this.S.length<=this.G};function C(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(A&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),A&&"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} +function D(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Jb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Qb(a,b,c,d,e){return(A?Rb:Sb).call(null,a,b,q(c)?c:null,q(d)?d:null,e||new E)} +function Rb(a,b,c,d,e){if(a instanceof Tb||8==a.l||c&&null===a.l){var f=b.all;if(!f)return e;a=Ub(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],l=0;b=f[l++];)D(b,c,d)&&g.push(b);f=g}for(l=0;b=f[l++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Vb(a,b,c,d,e);return e} +function Sb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof F?Vb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){D(a,c,d)&&e.add(a)}));return e} +function Wb(a,b,c,d,e){var f;if((a instanceof Tb||8==a.l||c&&null===a.l)&&(f=b.childNodes)){var g=Ub(a);if("*"!=g&&(f=ma(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ma(f,function(a){return D(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return Xb(a,b,c,d,e)}function Xb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Vb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b),Vb(a,b,c,d,e)}function Ub(a){if(a instanceof F){if(8==a.l)return"!";if(null===a.l)return"*"}return a.getName()};function E(){this.m=this.i=null;this.B=0}function Yb(a){this.p=a;this.next=this.u=null}function Zb(a,b){if(!a.i)return b;if(!b.i)return a;for(var c=a.i,d=b.i,e=null,f=null,g=0;c&&d;)c.p==d.p||c.p instanceof Kb&&d.p instanceof Kb&&c.p.e==d.p.e?(f=c,c=c.next,d=d.next):0<pb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.B=g;return a} +E.prototype.unshift=function(a){a=new Yb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.B++};E.prototype.add=function(a){a=new Yb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.B++};function $b(a){return(a=a.i)?a.p:null}E.prototype.o=h("B");function ac(a){return(a=$b(a))?C(a):""}function G(a,b){return new bc(a,!!b)}function bc(a,b){this.ma=a;this.T=(this.v=b)?a.m:a.i;this.N=null} +bc.prototype.next=function(){var a=this.T;if(null==a)return null;var b=this.N=a;this.T=this.v?a.u:a.next;return b.p};bc.prototype.remove=function(){var a=this.ma,b=this.N;if(!b)throw Error("Next must be called at least once before remove.");var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.B--;this.N=null};function H(a){this.h=a;this.j=this.q=!1;this.C=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.f=h("q");function cc(a,b){a.q=b}function dc(a,b){a.j=b}H.prototype.s=h("C");function J(a,b){var c=a.evaluate(b);return c instanceof E?+ac(c):+c}function K(a,b){var c=a.evaluate(b);return c instanceof E?ac(c):""+c}function ec(a,b){var c=a.evaluate(b);return c instanceof E?!!c.o():!!c};function fc(a,b,c){H.call(this,a.h);this.R=a;this.X=b;this.ba=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.R==gc&&(c.j||c.f()||4==c.h||0==c.h||!b.s()?b.j||(b.f()||4==b.h||0==b.h||!c.s())||(this.C={name:c.s().name,w:b}):this.C={name:b.s().name,w:c})}s(fc,H); +function hc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof E&&c instanceof E){e=G(b);for(d=e.next();d;d=e.next())for(b=G(c),f=b.next();f;f=b.next())if(a(C(d),C(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?e=b:(e=c,c=b);e=G(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+C(d);break;case "boolean":d=!!C(d);break;case "string":d=C(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}fc.prototype.evaluate=function(a){return this.R.n(this.X,this.ba,a)};fc.prototype.toString=function(){var a="Binary Expression: "+this.R,a=a+I(this.X);return a+=I(this.ba)};function ic(a,b,c,d){this.pa=a;this.$=b;this.h=c;this.n=d}ic.prototype.toString=h("pa");var jc={}; +function M(a,b,c,d){if(jc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new ic(a,b,c,d);return jc[a.toString()]=a}M("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});M("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});M("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});M("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});M("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});M("<",4,2,function(a,b,c){return hc(function(a,b){return a<b},a,b,c)}); +M(">",4,2,function(a,b,c){return hc(function(a,b){return a>b},a,b,c)});M("<=",4,2,function(a,b,c){return hc(function(a,b){return a<=b},a,b,c)});M(">=",4,2,function(a,b,c){return hc(function(a,b){return a>=b},a,b,c)});var gc=M("=",3,2,function(a,b,c){return hc(function(a,b){return a==b},a,b,c,!0)});M("!=",3,2,function(a,b,c){return hc(function(a,b){return a!=b},a,b,c,!0)});M("and",2,2,function(a,b,c){return ec(a,c)&&ec(b,c)});M("or",1,2,function(a,b,c){return ec(a,c)||ec(b,c)});function kc(a,b){if(b.o()&&4!=a.h)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.h);this.aa=a;this.d=b;this.q=a.f();this.j=a.j}s(kc,H);kc.prototype.evaluate=function(a){a=this.aa.evaluate(a);return lc(this.d,a)};kc.prototype.toString=function(){var a;a="Filter:"+I(this.aa);return a+=I(this.d)};function mc(a,b){if(b.length<a.Z)throw Error("Function "+a.k+" expects at least"+a.Z+" arguments, "+b.length+" given");if(null!==a.O&&b.length>a.O)throw Error("Function "+a.k+" expects at most "+a.O+" arguments, "+b.length+" given");a.na&&t(b,function(b,d){if(4!=b.h)throw Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b);});H.call(this,a.h);this.F=a;this.K=b;cc(this,a.q||pa(b,function(a){return a.f()}));dc(this,a.la&&!b.length||a.ka&&!!b.length||pa(b,function(a){return a.j}))} +s(mc,H);mc.prototype.evaluate=function(a){return this.F.n.apply(null,ta(a,this.K))};mc.prototype.toString=function(){var a="Function: "+this.F;if(this.K.length)var b=oa(this.K,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function nc(a,b,c,d,e,f,g,l,v){this.k=a;this.h=b;this.q=c;this.la=d;this.ka=e;this.n=f;this.Z=g;this.O=void 0!==l?l:g;this.na=!!v}nc.prototype.toString=h("k");var oc={}; +function N(a,b,c,d,e,f,g,l){if(oc.hasOwnProperty(a))throw Error("Function already created: "+a+".");oc[a]=new nc(a,b,c,d,!1,e,f,g,l)}N("boolean",2,!1,!1,function(a,b){return ec(b,a)},1);N("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);N("concat",3,!1,!1,function(a,b){var c=ua(arguments,1);return oa(c,function(b,c){return b+K(c,a)},"")},2,null);N("contains",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2); +N("count",1,!1,!1,function(a,b){return b.evaluate(a).o()},1,1,!0);N("false",2,!1,!1,k(!1),0);N("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); +N("id",4,!1,!1,function(a,b){function c(a){if(A){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ra(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=K(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!sa(f,a)&&f.push(a)});f.sort(pb);var g=new E;t(f,function(a){g.add(a)});return g},1);N("lang",2,!1,!1,k(!1),1); +N("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.m},0);N("local-name",3,!1,!0,function(a,b){var c=b?$b(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);N("name",3,!1,!0,function(a,b){var c=b?$b(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);N("namespace-uri",3,!0,!1,k(""),0,1,!0);N("normalize-space",3,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +N("not",2,!1,!1,function(a,b){return!ec(b,a)},1);N("number",1,!1,!0,function(a,b){return b?J(b,a):+C(a.e)},0,1);N("position",1,!0,!1,function(a){return a.qa},0);N("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);N("starts-with",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return 0==b.lastIndexOf(a,0)},2);N("string",3,!1,!0,function(a,b){return b?K(b,a):C(a.e)},0,1);N("string-length",1,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).length},0,1); +N("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);N("substring-after",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +N("substring-before",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);N("sum",1,!1,!1,function(a,b){for(var c=G(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+C(e);return d},1,1,!0);N("translate",3,!1,!1,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(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);N("true",2,!1,!1,k(!0),0);function F(a,b){this.da=a;this.Y=void 0!==b?b:null;this.l=null;switch(a){case "comment":this.l=8;break;case "text":this.l=lb;break;case "processing-instruction":this.l=7;break;case "node":break;default:throw Error("Unexpected argument");}}function pc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}F.prototype.matches=function(a){return null===this.l||this.l==a.nodeType};F.prototype.getName=h("da"); +F.prototype.toString=function(){var a="Kind Test: "+this.da;null===this.Y||(a+=I(this.Y));return a};function qc(a){H.call(this,3);this.ca=a.substring(1,a.length-1)}s(qc,H);qc.prototype.evaluate=h("ca");qc.prototype.toString=function(){return"Literal: "+this.ca};function Tb(a,b){this.k=a.toLowerCase();this.P=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Tb.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.k&&this.k!=a.nodeName.toLowerCase()?!1:this.P==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Tb.prototype.getName=h("k");Tb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.P?"":this.P+":")+this.k};function rc(a){H.call(this,1);this.ea=a}s(rc,H);rc.prototype.evaluate=h("ea");rc.prototype.toString=function(){return"Number: "+this.ea};function sc(a,b){H.call(this,a.h);this.V=a;this.D=b;this.q=a.f();this.j=a.j;if(1==this.D.length){var c=this.D[0];c.M||c.r!=tc||(c=c.J,"*"!=c.getName()&&(this.C={name:c.getName(),w:null}))}}s(sc,H);function uc(){H.call(this,4)}s(uc,H);uc.prototype.evaluate=function(a){var b=new E;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};uc.prototype.toString=k("Root Helper Expression");function vc(){H.call(this,4)}s(vc,H);vc.prototype.evaluate=function(a){var b=new E;b.add(a.e);return b}; +vc.prototype.toString=k("Context Helper Expression"); +sc.prototype.evaluate=function(a){var b=this.V.evaluate(a);if(!(b instanceof E))throw Error("Filter expression must evaluate to nodeset.");a=this.D;for(var c=0,d=a.length;c<d&&b.o();c++){var e=a[c],f=G(b,e.r.v),g;if(e.f()||e.r!=wc)if(e.f()||e.r!=xc)for(g=f.next(),b=e.evaluate(new Ib(g));null!=(g=f.next());)g=e.evaluate(new Ib(g)),b=Zb(b,g);else g=f.next(),b=e.evaluate(new Ib(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ib(g))}}return b}; +sc.prototype.toString=function(){var a;a="Path Expression:"+I(this.V);if(this.D.length){var b=oa(this.D,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function yc(a,b){this.d=a;this.v=!!b}function lc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=G(b),f=b.o(),g,l=0;g=e.next();l++){var v=a.v?f-l:l+1;g=d.evaluate(new Ib(g,v,f));if("number"==typeof g)v=v==g;else if("string"==typeof g||"boolean"==typeof g)v=!!g;else if(g instanceof E)v=0<g.o();else throw Error("Predicate.evaluate returned an unexpected type.");v||e.remove()}return b}yc.prototype.s=function(){return 0<this.d.length?this.d[0].s():null}; +yc.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return!0}return!1};yc.prototype.o=function(){return this.d.length};yc.prototype.toString=function(){return oa(this.d,function(a,b){return a+I(b)},"Predicates:")};function O(a,b,c,d){H.call(this,4);this.r=a;this.J=b;this.d=c||new yc([]);this.M=!!d;b=this.d.s();a.sa&&b&&(a=b.name,a=A?a.toLowerCase():a,this.C={name:a,w:b.w});this.q=this.d.f()}s(O,H); +O.prototype.evaluate=function(a){var b=a.e,c=null,c=this.s(),d=null,e=null,f=0;c&&(d=c.name,e=c.w?K(c.w,a):null,f=1);if(this.M)if(this.f()||this.r!=zc)if(a=G((new O(Ac,new F("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);null!=(b=a.next());)c=Zb(c,this.n(b,d,e,f));else c=new E;else c=Qb(this.J,b,d,e),c=lc(this.d,c,f);else c=this.n(a.e,d,e,f);return c};O.prototype.n=function(a,b,c,d){a=this.r.F(this.J,a,b,c);return a=lc(this.d,a,d)}; +O.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.M?"//":"/"));this.r.k&&(a+=I("Axis: "+this.r));a+=I(this.J);if(this.d.o()){var b=oa(this.d.d,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Bc(a,b,c,d){this.k=a;this.F=b;this.v=c;this.sa=d}Bc.prototype.toString=h("k");var Cc={};function P(a,b,c,d){if(Cc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Bc(a,b,c,!!d);return Cc[a]=b} +P("ancestor",function(a,b){for(var c=new E,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);P("ancestor-or-self",function(a,b){var c=new E,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var tc=P("attribute",function(a,b){var c=new E,d=a.getName();if("style"==d&&b.style&&A)return c.add(new Kb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof F&&null===a.l||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)A?g.nodeValue&&c.add(Lb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(A?g.nodeValue&&c.add(Lb(b,g,b.sourceIndex)):c.add(g));return c},!1),zc=P("child",function(a,b,c,d,e){return(A?Wb:Xb).call(null,a,b,q(c)?c:null,q(d)?d:null,e||new E)},!1,!0); +P("descendant",Qb,!1,!0);var Ac=P("descendant-or-self",function(a,b,c,d){var e=new E;D(b,c,d)&&a.matches(b)&&e.add(b);return Qb(a,b,c,d,e)},!1,!0),wc=P("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)D(f,c,d)&&a.matches(f)&&e.add(f),e=Qb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);P("following-sibling",function(a,b){for(var c=new E,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);P("namespace",function(){return new E},!1); +var Dc=P("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),xc=P("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,l=f.length;g<l;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var L=0,r=v.length;L<r;L++)b=v[L],D(b,c,d)&&a.matches(b)&&e.add(b),e=Qb(a,b,c,d,e)}return e},!0,!0); +P("preceding-sibling",function(a,b){for(var c=new E,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Ec=P("self",function(a,b){var c=new E;a.matches(b)&&c.add(b);return c},!1);function Fc(a){H.call(this,1);this.U=a;this.q=a.f();this.j=a.j}s(Fc,H);Fc.prototype.evaluate=function(a){return-J(this.U,a)};Fc.prototype.toString=function(){return"Unary Expression: -"+I(this.U)};function Gc(a){H.call(this,4);this.H=a;cc(this,pa(this.H,function(a){return a.f()}));dc(this,pa(this.H,function(a){return a.j}))}s(Gc,H);Gc.prototype.evaluate=function(a){var b=new E;t(this.H,function(c){c=c.evaluate(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=Zb(b,c)});return b};Gc.prototype.toString=function(){return oa(this.H,function(a,b){return a+I(b)},"Union Expression:")};function Hc(a,b){this.a=a;this.oa=b}function Ic(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Jc(a);var d=a.a.next();if(!d)break;var e=(d=jc[d]||null)&&d.$;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].$;)b=new fc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new fc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Kc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Lc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Mc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new qc(a)}function Nc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Tb(b);var d=b.substring(0,c);a=a.oa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Tb(b,a)} +function Oc(a){var b,c=[],d;if("/"==B(a.a)||"//"==B(a.a)){b=a.a.next();d=B(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new uc;d=new uc;R(a,"Missing next location step.");b=Pc(a,b);c.push(b)}else{a:{b=B(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Ic(a);R(a,'unclosed "("');Kc(a,")");break;case '"':case "'":b=Mc(a);break;default:if(isNaN(+b))if(!pc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==B(a.a,1)){b=a.a.next();b=oc[b]||null;a.a.next();for(d=[];")"!=B(a.a);){R(a,"Missing function argument list.");d.push(Ic(a));if(","!=B(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Lc(a);b=new mc(b,d)}else{b=null;break a}else b=new rc(+a.a.next())}"["==B(a.a)&&(d=new yc(Qc(a)),b=new kc(b,d))}if(b)if("/"==B(a.a)||"//"==B(a.a))d=b;else return b;else b=Pc(a,"/"),d=new vc,c.push(b)}for(;"/"==B(a.a)||"//"==B(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Pc(a,b),c.push(b); +return new sc(d,c)} +function Pc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==B(a.a))return d=new O(Ec,new F("node")),a.a.next(),d;if(".."==B(a.a))return d=new O(Dc,new F("node")),a.a.next(),d;var f;if("@"==B(a.a))f=tc,a.a.next(),R(a,"Missing attribute name");else if("::"==B(a.a,1)){if(!/(?![0-9])[\w]/.test(B(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Cc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=zc; +c=B(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==B(a.a,1)){if(!pc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!pc(c))throw Error("Invalid type name: "+c);Kc(a,"(");R(a,"Bad nodetype");e=B(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Mc(a);R(a,"Bad nodetype");Lc(a);c=new F(c,g)}else c=Nc(a);else if("*"==c)c=Nc(a);else throw Error("Bad token: "+a.a.next());e=new yc(Qc(a),f.v);return d||new O(f,c,e,"//"==b)} +function Qc(a){for(var b=[];"["==B(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Ic(a);b.push(c);R(a,"Unclosed predicate expression.");Kc(a,"]")}return b}function Jc(a){if("-"==B(a.a))return a.a.next(),new Fc(Jc(a));var b=Oc(a);if("|"!=B(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Oc(a));a.a.back();a=new Gc(b)}return a};function Rc(a){switch(a.nodeType){case 1:return ga(Sc,a);case 9:return Rc(a.documentElement);case 2:return a.ownerElement?Rc(a.ownerElement):Tc;case 11:case 10:case 6:case 12:return Tc;default:return a.parentNode?Rc(a.parentNode):Tc}}function Tc(){return null}function Sc(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?Sc(a.parentNode,b):null};function Uc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Nb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=fa(b.lookupNamespaceURI,b)):b=k(null);var d=Ic(new Hc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Ib(a));return new S(c,b)}} +function S(a,b){if(0==b)if(a instanceof E)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 E))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof E?ac(a):""+a;break;case 1:this.numberValue=a instanceof E?+ac(a):+a;break;case 3:this.booleanValue=a instanceof E?0<a.o():!!a;break;case 4:case 5:case 6:case 7:var d= +G(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Kb?e.e:e);this.snapshotLength=a.o();this.invalidIteratorState=!1;break;case 8:case 9:d=$b(a);this.singleNodeValue=d instanceof Kb?d.e:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function Vc(a){this.lookupNamespaceURI=Rc(a)} +function Wc(a){a=a||p;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new Uc(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Uc(a,b)},b.createNSResolver=function(a){return new Vc(a)})};var T={};T.ga=function(){var a={xa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.n=function(a,b,c){var d=y(a);(w||Fb)&&Wc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ga;return w&&!db(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!x||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new Ba(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +T.L=function(a,b){if(!a||1!=a.nodeType)throw new Ba(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.ra=function(a,b){var c=function(){var c=T.n(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.L(c,a);return c}; +T.ta=function(a,b){var c=function(){var c=T.n(b,a,7);if(c){var e=c.snapshotLength;u&&void 0===e&&T.L(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){T.L(b,a)});return c};function Xc(a){return(a=a.exec(Pa()))?a[1]:""}var Yc=function(){if(Bb)return Xc(/Firefox\/([0-9.]+)/);if(w||u)return Xa;if(Gb)return Xc(/Chrome\/([0-9.]+)/);if(Hb)return Xc(/Version\/([0-9.]+)/);if(Db||Eb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Pa());if(a)return a[1]+"."+a[2]}else{if(Fb)return(a=Xc(/Android\s+([0-9.]+)/))?a:Xc(/Version\/([0-9.]+)/);if(Cb)return Xc(/Camino\/([0-9.]+)/)}return""}();var Zc,$c;function ad(a){return bd?Zc(a):w?0<=ja(fb,a):db(a)}function cd(a){bd?$c(a):Fb?ja(dd,a):ja(Yc,a)} +var bd=function(){if(!x)return!1;var a=p.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Zc=function(a){return 0<=d.ia(e,""+a)};$c=function(a){d.ia(f,""+a)};return!0}(),ed;if(Fb){var fd=/Android\s+([0-9\.]+)/.exec(Pa());ed=fd?fd[1]:"0"}else ed="0"; +var dd=ed,gd=w&&!(w&&9<=fb),hd=w&&!(w&&10<=fb);Fb&&cd(2.3);Fb&&cd(4);Hb&&cd(6);function id(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}id.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};id.prototype.contains=function(a){return this&&a?a instanceof id?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +id.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};id.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +id.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function U(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}U.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};U.prototype.contains=function(a){return a instanceof U?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +U.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};U.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +U.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function jd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:null} +function W(a,b){var c=ka(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=gd?"styleFloat":"cssFloat";var d;a:{d=c;var e=y(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||kd(a,c);if(null===d)d=null;else if(sa(wa,c)){b:{var f=d.match(za);if(f){var c=Number(f[1]),e=Number(f[2]),g=Number(f[3]),f=Number(f[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g&&0<=f&&1>=f){c=[c,e,g,f];break b}}c=null}if(!c){b:{if(g= +d.match(Aa))if(c=Number(g[1]),e=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g){c=[c,e,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=va[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(xa,"#$1$1$2$2$3$3")),!ya.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} +function kd(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&"function"==aa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=jd(a))?kd(c,b):null} +function ld(a,b){function c(a){if("none"==W(a,"display"))return!1;a=jd(a);return!a||c(a)}function d(a){var b=md(a);return 0<b.height&&0<b.width?!0:V(a,"PATH")&&(0<b.height||0<b.width)?(a=W(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=W(a,"overflow")&&pa(a.childNodes,function(a){return a.nodeType==lb||V(a)&&d(a)})}function e(a){return nd(a)==X&&qa(a.childNodes,function(a){return!V(a)||e(a)})}if(!V(a))throw Error("Argument to isShown must be of type Element");if(V(a,"OPTION")||V(a,"OPTGROUP")){var f= +sb(a,function(a){return V(a,"SELECT")});return!!f&&ld(f,!0)}return(f=od(a))?!!f.W&&0<f.rect.width&&0<f.rect.height&&ld(f.W,b):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==pd(a)||!d(a)?!1:!e(a)}var X="hidden"; +function nd(a){function b(a){var b=W(a,"position");if("fixed"==b)return L=!0,a==g?null:g;for(a=jd(a);a&&a!=g&&(0==W(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==W(a,"position"));)a=jd(a);return a}function c(a){var b=a;if("visible"==v)if(a==g&&l)b=l;else if(a==l)return{x:"visible",y:"visible"};b={x:W(b,"overflow-x"),y:W(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==g){var b=(new tb(f)).ja;a=Sa||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=w&&db("10")&&b.pageYOffset!=a.scrollTop?new gb(a.scrollLeft,a.scrollTop):new gb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new gb(a.scrollLeft,a.scrollTop);return a}var e=qd(a),f=y(a),g=f.documentElement,l=f.body,v=W(g,"overflow"),L;for(a=b(a);a;a=b(a)){var r=c(a);if("visible"!=r.x||"visible"!=r.y){var m=md(a);if(0==m.width||0==m.height)return X;var n=e.right<m.left,Q=e.bottom<m.top;if(n&&"hidden"==r.x|| +Q&&"hidden"==r.y)return X;if(n&&"visible"!=r.x||Q&&"visible"!=r.y){n=d(a);Q=e.bottom<m.top-n.y;if(e.right<m.left-n.x&&"visible"!=r.x||Q&&"visible"!=r.x)return X;e=nd(a);return e==X?X:"scroll"}n=e.left>=m.left+m.width;m=e.top>=m.top+m.height;if(n&&"hidden"==r.x||m&&"hidden"==r.y)return X;if(n&&"visible"!=r.x||m&&"visible"!=r.y){if(L&&(r=d(a),e.left>=g.scrollWidth-r.x||e.right>=g.scrollHeight-r.y))return X;e=nd(a);return e==X?X:"scroll"}}}return"none"}var rd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function md(a){function b(a){var c=(y(a)?y(a).parentWindow||y(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(rd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),r=parseFloat(c[3]),m=parseFloat(c[4]),n=parseFloat(c[5]),c=parseFloat(c[6]),Q=f.left+f.width,Ca=f.top+f.height,Da=f.left*d,d=Q*d,Ea=f.left*e,e=Q*e,Fa=f.top*r,r=Ca*r,Ga=f.top*m,Q=Ca*m,Ca=Da+Fa+n,m=Ea+Ga+c,Fa=d+Fa+n,Ga=e+Ga+c,Da=Da+r+n,Ea=Ea+Q+c,n=d+r+n,c=e+Q+c;f.left=Math.min(Ca,Fa,Da,n);f.top=Math.min(m,Ga,Ea,c);n=Math.max(Ca, +Fa,Da,n);c=Math.max(m,Ga,Ea,c);f.width=n-f.left;f.height=c-f.top}(a=jd(a))&&b(a)}var c=od(a);if(c)return c.rect;if(V(a,"HTML"))return c=y(a),a=mb((c?c.parentWindow||c.defaultView:window)||window),new U(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new U(0,0,0,0)}var f=new U(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=y(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&& +0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));x&&!ad(12)&&b(a);return f} +function od(a){var b=V(a,"MAP");if(!b&&!V(a,"AREA"))return null;var c=b?a:V(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.ra('/descendant::*[@usemap = "#'+c.name+'"]',y(c)))&&(e=md(d),!b&&"default"!=a.shape.toLowerCase())){var f=sd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new U(a+e.left,b+e.top,c,f)}return{W:d,rect:e||new U(0,0,0,0)}} +function sd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new U(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new U(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 U(b,c,d-b,e-c)}return new U(0,0,0,0)}function qd(a){a=md(a);return new id(a.top,a.left+a.width,a.top+a.height,a.left)} +function td(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function ud(a){var b=[];vd(a,b);b=na(b,td);return td(b.join("\n")).replace(/\xa0/g," ")} +function vd(a,b){if(V(a,"BR"))b.push("");else{var c=V(a,"TD"),d=W(a,"display"),e=!c&&!sa(wd,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:nb(a.previousSibling),f=f?W(f,"display"):"",g=W(a,"float")||W(a,"cssFloat")||W(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var l=ld(a),v=null,L=null;l&&(v=W(a,"white-space"),L=W(a,"text-transform"));t(a.childNodes,function(a){a.nodeType==lb&&l?xd(a,b,v,L):V(a)&&vd(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||ia(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var wd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function xd(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ia(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function pd(a){if(hd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return yd(a)}function yd(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=jd(a))&&(b*=yd(a));return b};Sa||u||bd&&cd(3.6);w&&ad(10);Fb&&cd(4);function Y(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y)for(d=zd(a),Ad(a),e=[],c=0;c<a.g.length;c++)e.push(a.t[a.g[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.A=0;Y.prototype.fa=0;function zd(a){Ad(a);return a.g.concat()} +Y.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.A--,this.fa++,this.g.length>2*this.A&&Ad(this),!0):!1};function Ad(a){if(a.A!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.A!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} +Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.A++,this.g.push(a),this.fa++);this.t[a]=b};var Bd={};function Z(a,b,c){ca(a)&&(a=x?a.b:u?a.opera:a.c);a=new Cd(a,b,c);!b||b in Bd&&!c||(Bd[b]={key:a,shift:!1},c&&(Bd[c]={key:a,shift:!0}));return a}function Cd(a,b,c){this.code=a;this.ha=b||null;this.va=c||this.ha}Z(8);Z(9);Z(13);var Dd=Z(16),Ed=Z(17),Fd=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Gd=Z(Oa?{b:91,c:91,opera:219}:Na?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Oa?{b:92,c:92,opera:220}:Na?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Oa?{b:93,c:93,opera:0}:Na?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Va?56:42},"*"); +Z({b:107,c:107,opera:Va?61:43},"+");Z({b:109,c:109,opera:Va?109:45},"-");Z({b:110,c:110,opera:Va?190:78},".");Z({b:111,c:111,opera:Va?191:47},"/");Z(Va&&u?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Hd=new Y; +Hd.set(1,Dd);Hd.set(2,Ed);Hd.set(4,Fd);Hd.set(8,Gd);(function(a){var b=new Y;t(zd(a),function(c){b.set(a.get(c).code,c)});return b})(Hd);x&&ad(12);function Id(){this.I=void 0} +function Jd(a,b,c){switch(typeof b){case "string":Kd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Jd(a,a.I?a.I.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Kd(f,c),c.push(":"),Jd(a,a.I?a.I.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ld={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Md=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Kd(a,b){b.push('"',a.replace(Md,function(a){if(a in Ld)return Ld[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ld[a]=e+b.toString(16)}),'"')};Sa||u||x&&ad(3.5)||w&&ad(8);function Nd(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return na(a,Nd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Od(a);return b}if("document"in a)return b={},b.WINDOW=Od(a),b;if(ba(a))return na(a,Nd);a=ib(a,function(a,b){return"number"==typeof b||q(b)});return jb(a,Nd);default:return null}} +function Pd(a,b){return"array"==aa(a)?na(a,function(a){return Pd(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?Qd(a.ELEMENT,b):"WINDOW"in a?Qd(a.WINDOW,b):jb(a,function(a){return Pd(a,b)}):a}function Rd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.Q=ha());b.Q||(b.Q=ha());return b}function Od(a){var b=Rd(a.ownerDocument),c=kb(b,function(b){return b==a});c||(c=":wdc:"+b.Q++,b[c]=a);return c} +function Qd(a,b){a=decodeURIComponent(a);var c=b||document,d=Rd(c);if(!(a in d))throw new Ba(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new Ba(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new Ba(10,"Element is no longer attached to the DOM");};function Sd(a,b){var c=[a],d;try{var e=b?Qd(b.WINDOW):window,f=Pd(c,e.document),g=ud.apply(null,f);d={status:0,value:Nd(g)}}catch(l){d={status:"code"in l?l.code:13,value:{message:l.message}}}c=[];Jd(new Id,d,c);return c.join("")}var Td=["_"],$=p;Td[0]in $||!$.execScript||$.execScript("var "+Td[0]);for(var Ud;Td.length&&(Ud=Td.shift());)Td.length||void 0===Sd?$=$[Ud]?$[Ud]:$[Ud]={}:$[Ud]=Sd;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_top_left_coordinates.js b/src/ghostdriver/third_party/webdriver-atoms/get_top_left_coordinates.js deleted file mode 100644 index 57dd588ea..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/get_top_left_coordinates.js +++ /dev/null @@ -1,50 +0,0 @@ -function(){return function(){var g=void 0,h=!0,l=null,m=!1;function aa(a){return function(){return a}}var n=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};var fa=window;function ga(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),k=0;0==c&&k<f;k++){var s=d[k]||"",F=e[k]||"",x=RegExp("(\\d*)(\\D*)","g"),v=RegExp("(\\d*)(\\D*)","g");do{var z=x.exec(s)||["","",""],A=v.exec(F)||["","",""];if(0==z[0].length&&0==A[0].length)break;c=((0==z[1].length?0:parseInt(z[1],10))<(0==A[1].length?0:parseInt(A[1],10))?-1:(0==z[1].length?0:parseInt(z[1],10))>(0==A[1].length? -0:parseInt(A[1],10))?1:0)||((0==z[2].length)<(0==A[2].length)?-1:(0==z[2].length)>(0==A[2].length)?1:0)||(z[2]<A[2]?-1:z[2]>A[2]?1:0)}while(0==c)}return c};var ha=Array.prototype;function q(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(g,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,k=0;k<c;k++)if(k in f){var s=f[k];b.call(g,s,k,a)&&(d[e++]=s)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d}function ka(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(g,c,d,e,a)});return c} -function la(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(g,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:p(a)?a.charAt(c):a[c]}function ma(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};function t(a,b){this.code=a;this.state=na[a]||oa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;t.P=a.prototype;t.prototype=new b})(); -var oa="unknown error",na={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};na[13]=oa;na[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var u,pa,qa,ra,sa,ta;function w(){return n.navigator?n.navigator.userAgent:l}ra=qa=pa=u=m;var ua;if(ua=w()){var va=n.navigator;u=0==ua.indexOf("Opera");pa=!u&&-1!=ua.indexOf("MSIE");qa=!u&&-1!=ua.indexOf("WebKit");ra=!u&&!qa&&"Gecko"==va.product}var y=u,B=pa,C=ra,D=qa,wa,xa=n.navigator;wa=xa&&xa.platform||"";sa=-1!=wa.indexOf("Mac");ta=-1!=wa.indexOf("Win");var E=-1!=wa.indexOf("Linux");function ya(){var a=n.document;return a?a.documentMode:g}var za; -a:{var Aa="",Ba;if(y&&n.opera)var Ca=n.opera.version,Aa="function"==typeof Ca?Ca():Ca;else if(C?Ba=/rv\:([^\);]+)(\)|;)/:B?Ba=/MSIE\s+([^\);]+)(\)|;)/:D&&(Ba=/WebKit\/(\S+)/),Ba)var Da=Ba.exec(w()),Aa=Da?Da[1]:"";if(B){var Ea=ya();if(Ea>parseFloat(Aa)){za=String(Ea);break a}}za=Aa}var Fa={};function Ga(a){return Fa[a]||(Fa[a]=0<=ga(za,a))}var Ha=n.document,G=!Ha||!B?g:ya()||("CSS1Compat"==Ha.compatMode?parseInt(za,10):5);var Ia;!C&&!B||B&&B&&9<=G||C&&Ga("1.9.1");B&&Ga("9");function H(a,b){this.x=a!==g?a:0;this.y=b!==g?b:0}H.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function Ja(a,b){this.width=a;this.height=b}Ja.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};Ja.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};Ja.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Ja.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Ka(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function La(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Ma(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function Na(a){return a?new Oa(I(a)):Ia||(Ia=new Oa)}function Pa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Qa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!(B&&9<=G)){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?Ra(a,b):!c&&Pa(e,b)?-1*Sa(a,b):!d&&Pa(f,a)?Sa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=I(a);c=d.createRange(); -c.selectNode(a);c.collapse(h);d=d.createRange();d.selectNode(b);d.collapse(h);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Sa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ra(d,a)}function Ra(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function I(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Oa(a){this.i=a||n.document||document} -function Ta(a){var b=a.i;a=!D&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new H(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}Oa.prototype.contains=Pa;var Ua,Va,Wa,Xa,Ya,Za,$a;$a=Za=Ya=Xa=Wa=Va=Ua=m;var K=w();K&&(-1!=K.indexOf("Firefox")?Ua=h:-1!=K.indexOf("Camino")?Va=h:-1!=K.indexOf("iPhone")||-1!=K.indexOf("iPod")?Wa=h:-1!=K.indexOf("iPad")?Xa=h:-1!=K.indexOf("Android")?Ya=h:-1!=K.indexOf("Chrome")?Za=h:-1!=K.indexOf("Safari")&&($a=h));var ab=Ua,bb=Va,cb=Wa,db=Xa,eb=Ya,fb=Za,gb=$a;var L=B&&!(B&&9<=G),hb=B&&!(B&&8<=G);function ib(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.L=e;this.parentNode=b}function jb(a,b,c){var d=hb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new ib(b,a,b.nodeName,d,c)};function M(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==g||b==l?a.innerText:b,b=b==g||b==l?"":b);if("string"!=typeof b)if(L&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),L&&"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} -function N(a,b,c){if(b===l)return h;try{if(!a.getAttribute)return m}catch(d){return m}hb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function kb(a,b,c,d,e){return(L?lb:mb).call(l,a,b,p(c)?c:l,p(d)?d:l,e||new O)} -function lb(a,b,c,d,e){if(m||8==a.h||c&&a.h===l){var f=b.all;if(!f)return e;a=nb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var k=[],s=0;b=f[s++];)N(b,c,d)&&k.push(b);f=k}for(s=0;b=f[s++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ob(a,b,c,d,e);return e} -function mb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?ob(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){N(a,c,d)&&e.add(a)}));return e} -function pb(a,b,c,d,e){var f;if((m||8==a.h||c&&a.h===l)&&(f=b.childNodes)){var k=nb(a);if("*"!=k&&(f=ia(f,function(a){return a.tagName&&a.tagName.toLowerCase()==k}),!f))return e;c&&(f=ia(f,function(a){return N(a,c,d)}));q(f,function(a){("*"!=k||"!"!=a.tagName&&!("*"==k&&1!=a.nodeType))&&e.add(a)});return e}return qb(a,b,c,d,e)}function qb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)N(b,c,d)&&a.matches(b)&&e.add(b);return e} -function ob(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)N(b,c,d)&&a.matches(b)&&e.add(b),ob(a,b,c,d,e)}function nb(a){if(m){if(8==a.h)return"!";if(a.h===l)return"*"}return a.getName()};function O(){this.e=this.d=l;this.j=0}function rb(a){this.r=a;this.next=this.o=l}O.prototype.unshift=function(a){a=new rb(a);a.next=this.d;this.e?this.d.o=a:this.d=this.e=a;this.d=a;this.j++};O.prototype.add=function(a){a=new rb(a);a.o=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.j++};function sb(a){return(a=a.d)?a.r:l}function tb(a){return(a=sb(a))?M(a):""}function ub(a,b){this.J=a;this.p=(this.s=b)?a.e:a.d;this.z=l} -ub.prototype.next=function(){var a=this.p;if(a==l)return l;var b=this.z=a;this.p=this.s?a.o:a.next;return b.r};function P(a,b){var c=a.evaluate(b);return c instanceof O?+tb(c):+c}function Q(a,b){var c=a.evaluate(b);return c instanceof O?tb(c):""+c}function R(a,b){var c=a.evaluate(b);return c instanceof O?!!c.j:!!c};function S(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof O&&c instanceof O){e=new ub(b,m);for(d=e.next();d;d=e.next()){b=new ub(c,m);for(f=b.next();f;f=b.next())if(a(M(d),M(f)))return h}return m}if(b instanceof O||c instanceof O){b instanceof O?e=b:(e=c,c=b);e=new ub(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+M(d);break;case "boolean":d=!!M(d);break;case "string":d=M(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return h}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function vb(a,b,c,d){this.A=a;this.N=b;this.v=c;this.w=d}vb.prototype.toString=function(){return this.A};var wb={};function T(a,b,c,d){if(a in wb)throw Error("Binary operator already created: "+a);a=new vb(a,b,c,d);wb[a.toString()]=a}T("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});T("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});T("*",6,1,function(a,b,c){return P(a,c)*P(b,c)}); -T("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});T("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});T("<",4,2,function(a,b,c){return S(function(a,b){return a<b},a,b,c)});T(">",4,2,function(a,b,c){return S(function(a,b){return a>b},a,b,c)});T("<=",4,2,function(a,b,c){return S(function(a,b){return a<=b},a,b,c)});T(">=",4,2,function(a,b,c){return S(function(a,b){return a>=b},a,b,c)});T("=",3,2,function(a,b,c){return S(function(a,b){return a==b},a,b,c,h)}); -T("!=",3,2,function(a,b,c){return S(function(a,b){return a!=b},a,b,c,h)});T("and",2,2,function(a,b,c){return R(a,c)&&R(b,c)});T("or",1,2,function(a,b,c){return R(a,c)||R(b,c)});function xb(a,b,c,d,e,f,k,s,F){this.m=a;this.v=b;this.I=c;this.H=d;this.G=e;this.w=f;this.F=k;this.D=s!==g?s:k;this.K=!!F}xb.prototype.toString=function(){return this.m};var yb={};function U(a,b,c,d,e,f,k,s){if(a in yb)throw Error("Function already created: "+a+".");yb[a]=new xb(a,b,c,d,m,e,f,k,s)}U("boolean",2,m,m,function(a,b){return R(b,a)},1);U("ceiling",1,m,m,function(a,b){return Math.ceil(P(b,a))},1); -U("concat",3,m,m,function(a,b){var c=ma(arguments,1);return ka(c,function(b,c){return b+Q(c,a)})},2,l);U("contains",2,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);U("count",1,m,m,function(a,b){return b.evaluate(a).j},1,1,h);U("false",2,m,m,aa(m),0);U("floor",1,m,m,function(a,b){return Math.floor(P(b,a))},1); -U("id",4,m,m,function(a,b){function c(a){if(L){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return la(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),f=[];q(d,function(a){a=c(a);var b;if(b=a){a:if(p(f))b=!p(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Qa);var k=new O;q(f,function(a){k.add(a)});return k},1); -U("lang",2,m,m,aa(m),1);U("last",1,h,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);U("local-name",3,m,h,function(a,b){var c=b?sb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);U("name",3,m,h,function(a,b){var c=b?sb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);U("namespace-uri",3,h,m,aa(""),0,1,h);U("normalize-space",3,m,h,function(a,b){return(b?Q(b,a):M(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -U("not",2,m,m,function(a,b){return!R(b,a)},1);U("number",1,m,h,function(a,b){return b?P(b,a):+M(a.f)},0,1);U("position",1,h,m,function(a){return a.M},0);U("round",1,m,m,function(a,b){return Math.round(P(b,a))},1);U("starts-with",2,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);U("string",3,m,h,function(a,b){return b?Q(b,a):M(a.f)},0,1);U("string-length",1,m,h,function(a,b){return(b?Q(b,a):M(a.f)).length},0,1); -U("substring",3,m,m,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);U("substring-after",3,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -U("substring-before",3,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);U("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new ub(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+M(e);return d},1,1,h);U("translate",3,m,m,function(a,b,c,d){b=Q(b,a);c=Q(c,a);var e=Q(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);U("true",2,m,m,aa(h),0);function zb(a,b,c,d){this.m=a;this.C=b;this.s=c;this.Q=d}zb.prototype.toString=function(){return this.m};var Ab={};function V(a,b,c,d){if(a in Ab)throw Error("Axis already created: "+a);Ab[a]=new zb(a,b,c,!!d)}V("ancestor",function(a,b){for(var c=new O,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},h);V("ancestor-or-self",function(a,b){var c=new O,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},h); -V("attribute",function(a,b){var c=new O,d=a.getName();if("style"==d&&b.style&&L)return c.add(new ib(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.h===l||"*"==d)for(var d=b.sourceIndex,f=0,k;k=e[f];f++)L?k.nodeValue&&c.add(jb(b,k,d)):c.add(k);else(k=e.getNamedItem(d))&&(L?k.nodeValue&&c.add(jb(b,k,b.sourceIndex)):c.add(k));return c},m);V("child",function(a,b,c,d,e){return(L?pb:qb).call(l,a,b,p(c)?c:l,p(d)?d:l,e||new O)},m,h);V("descendant",kb,m,h); -V("descendant-or-self",function(a,b,c,d){var e=new O;N(b,c,d)&&a.matches(b)&&e.add(b);return kb(a,b,c,d,e)},m,h);V("following",function(a,b,c,d){var e=new O;do for(var f=b;f=f.nextSibling;)N(f,c,d)&&a.matches(f)&&e.add(f),e=kb(a,f,c,d,e);while(b=b.parentNode);return e},m,h);V("following-sibling",function(a,b){for(var c=new O,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);V("namespace",function(){return new O},m); -V("parent",function(a,b){var c=new O;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);V("preceding",function(a,b,c,d){var e=new O,f=[];do f.unshift(b);while(b=b.parentNode);for(var k=1,s=f.length;k<s;k++){var F=[];for(b=f[k];b=b.previousSibling;)F.unshift(b);for(var x=0,v=F.length;x<v;x++)b=F[x],N(b,c,d)&&a.matches(b)&&e.add(b),e=kb(a,b,c,d,e)}return e},h,h); -V("preceding-sibling",function(a,b){for(var c=new O,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},h);V("self",function(a,b){var c=new O;a.matches(b)&&c.add(b);return c},m);function W(a){return(a=a.exec(w()))?a[1]:""}var Bb=function(){if(ab)return W(/Firefox\/([0-9.]+)/);if(B||y)return za;if(fb)return W(/Chrome\/([0-9.]+)/);if(gb)return W(/Version\/([0-9.]+)/);if(cb||db){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(eb)return(a=W(/Android\s+([0-9.]+)/))?a:W(/Version\/([0-9.]+)/);if(bb)return W(/Camino\/([0-9.]+)/)}return""}();var Cb,Db;function Eb(a){return Fb?Cb(a):B?0<=ga(G,a):Ga(a)}function Gb(a){Fb?Db(a):eb?ga(Hb,a):ga(Bb,a)} -var Fb=function(){if(!C)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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;Cb=function(a){return 0<=d.u(e,""+a)};Db=function(a){d.u(f,""+a)};return h}(),Ib;if(eb){var Jb=/Android\s+([0-9\.]+)/.exec(w());Ib=Jb?Jb[1]:"0"}else Ib="0";var Hb=Ib;eb&&Gb(2.3);!y&&(!D||Eb("533"));function Kb(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Kb.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};Kb.prototype.contains=function(a){return!this||!a?m:a instanceof Kb?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function X(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}X.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};X.prototype.contains=function(a){return a instanceof X?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function Lb(a,b){var c=I(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,l))?c[b]||c.getPropertyValue(b)||"":""}function Mb(a,b){return Lb(a,b)||(a.currentStyle?a.currentStyle[b]:l)||a.style&&a.style[b]}function Nb(a){var b=a.getBoundingClientRect();B&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function Ob(a){if(B&&!(B&&8<=G))return a.offsetParent;var b=I(a),c=Mb(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Mb(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return l} -function Pb(a){var b,c=I(a),d=Mb(a,"position"),e=C&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new H(0,0),k;b=c?I(c):document;if(k=B)if(k=!(B&&9<=G))k="CSS1Compat"!=Na(b).i.compatMode;k=k?b.body:b.documentElement;if(a==k)return f;if(a.getBoundingClientRect)b=Nb(a),a=Ta(Na(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(k),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY; -else{e=a;do{f.x+=e.offsetLeft;f.y+=e.offsetTop;e!=a&&(f.x+=e.clientLeft||0,f.y+=e.clientTop||0);if(D&&"fixed"==Mb(e,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}e=e.offsetParent}while(e&&e!=a);if(y||D&&"absolute"==d)f.y-=c.body.offsetTop;for(e=a;(e=Ob(e))&&e!=c.body&&e!=k;)if(f.x-=e.scrollLeft,!y||"TR"!=e.tagName)f.y-=e.scrollTop}return f}var Qb={thin:2,medium:4,thick:6}; -function Rb(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:l))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:l,d;if(c in Qb)d=Qb[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var Sb=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Tb(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return a&&1==a.nodeType?a:l}function Ub(a,b){b.scrollLeft+=Math.min(a.left,Math.max(a.left-a.width,0));b.scrollTop+=Math.min(a.top,Math.max(a.top-a.height,0))} -function Vb(a,b){var c;c=b?new X(b.left,b.top,b.width,b.height):new X(0,0,a.offsetWidth,a.offsetHeight);for(var d=I(a),e=Tb(a);e&&e!=d.body&&e!=d.documentElement;e=Tb(e)){var f=c,k=e,s=Pb(a),F=Pb(k),x;var v=k;if(B){x=Rb(v,"borderLeft");var z=Rb(v,"borderRight"),A=Rb(v,"borderTop"),v=Rb(v,"borderBottom");x=new Kb(A,z,v,x)}else x=Lb(v,"borderLeftWidth"),z=Lb(v,"borderRightWidth"),A=Lb(v,"borderTopWidth"),v=Lb(v,"borderBottomWidth"),x=new Kb(parseFloat(A),parseFloat(z),parseFloat(v),parseFloat(x));Ub(new X(s.x+ -f.left-F.x-x.left,s.y+f.top-F.y-x.top,k.clientWidth-f.width,k.clientHeight-f.height),k)}e=Pb(a);f=Na(d);f=(f.i.parentWindow||f.i.defaultView||window).document;f="CSS1Compat"==f.compatMode?f.documentElement:f.body;f=new Ja(f.clientWidth,f.clientHeight);Ub(new X(e.x+c.left-(d.body?d.body.scrollLeft:0),e.y+c.top-(d.body?d.body.scrollTop:0),f.width-c.width,f.height-c.height),d.body||d.documentElement);var d=a.getClientRects?a.getClientRects()[0]:l,r;if(d)r=new H(d.left,d.top);else{d=new H;if(1==a.nodeType){if(a.getBoundingClientRect? -(e=Nb(a),d.x=e.left,d.y=e.top):(e=Ta(Na(a)),f=Pb(a),d.x=f.x-e.x,d.y=f.y-e.y),C&&!Ga(12)){B?r="-ms-transform":D?r="-webkit-transform":y?r="-o-transform":C&&(r="-moz-transform");var J;r&&(J=Mb(a,r));J||(J=Mb(a,"transform"));J?(r=J.match(Sb),r=!r?new H(0,0):new H(parseFloat(r[1]),parseFloat(r[2]))):r=new H(0,0);d=new H(d.x+r.x,d.y+r.y)}}else r="function"==ba(a.q),J=a,a.targetTouches?J=a.targetTouches[0]:r&&a.q().targetTouches&&(J=a.q().targetTouches[0]),d.x=J.clientX,d.y=J.clientY;r=d}return new H(r.x+ -c.left,r.y+c.top)};D||y||Fb&&Gb(3.6);B&&Eb(10);eb&&Gb(4);function Y(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y){d=Wb(a);Xb(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.l=0;Y.prototype.B=0;function Wb(a){Xb(a);return a.c.concat()} -function Xb(a){if(a.l!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.l!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.l++,this.c.push(a),this.B++);this.g[a]=b};var Yb={};function Z(a,b,c){da(a)&&(a=C?a.a:y?a.opera:a.b);a=new Zb(a,b,c);if(b&&(!(b in Yb)||c))Yb[b]={key:a,shift:m},c&&(Yb[c]={key:a,shift:h});return a}function Zb(a,b,c){this.code=a;this.t=b||l;this.O=c||this.t}Z(8);Z(9);Z(13);var $b=Z(16),ac=Z(17),bc=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); -Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var cc=Z(ta?{a:91,b:91,opera:219}:sa?{a:224,b:91,opera:17}:{a:0,b:91,opera:l}); -Z(ta?{a:92,b:92,opera:220}:sa?{a:224,b:93,opera:17}:{a:0,b:92,opera:l});Z(ta?{a:93,b:93,opera:0}:sa?{a:0,b:0,opera:16}:{a:93,b:l,opera:0});Z({a:96,b:96,opera:48},"0");Z({a:97,b:97,opera:49},"1");Z({a:98,b:98,opera:50},"2");Z({a:99,b:99,opera:51},"3");Z({a:100,b:100,opera:52},"4");Z({a:101,b:101,opera:53},"5");Z({a:102,b:102,opera:54},"6");Z({a:103,b:103,opera:55},"7");Z({a:104,b:104,opera:56},"8");Z({a:105,b:105,opera:57},"9");Z({a:106,b:106,opera:E?56:42},"*");Z({a:107,b:107,opera:E?61:43},"+"); -Z({a:109,b:109,opera:E?109:45},"-");Z({a:110,b:110,opera:E?190:78},".");Z({a:111,b:111,opera:E?191:47},"/");Z(E&&y?l:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({a:107,b:187,opera:61},"=","+");Z(108,",");Z({a:109,b:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({a:59,b:186,opera:59},";",":");Z(222,"'",'"');var dc=new Y;dc.set(1,$b);dc.set(2,ac);dc.set(4,bc); -dc.set(8,cc);(function(a){var b=new Y;q(Wb(a),function(c){b.set(a.get(c).code,c)});return b})(dc);C&&Eb(12);function ec(){this.k=g} -function fc(a,b,c){switch(typeof b){case "string":gc(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],fc(a,a.k?a.k.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),gc(f, -c),c.push(":"),fc(a,a.k?a.k.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var hc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ic=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function gc(a,b){b.push('"',a.replace(ic,function(a){if(a in hc)return hc[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return hc[a]=e+b.toString(16)}),'"')};D||y||C&&Eb(3.5)||B&&Eb(8);function jc(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,jc);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=kc(a);return b}if("document"in a)return b={},b.WINDOW=kc(a),b;if(ca(a))return ja(a,jc);a=Ka(a,function(a,b){return"number"==typeof b||p(b)});return La(a,jc);default:return l}} -function lc(a,b){return"array"==ba(a)?ja(a,function(a){return lc(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?mc(a.ELEMENT,b):"WINDOW"in a?mc(a.WINDOW,b):La(a,function(a){return lc(a,b)}):a}function nc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.n=ea());b.n||(b.n=ea());return b}function kc(a){var b=nc(a.ownerDocument),c=Ma(b,function(b){return b==a});c||(c=":wdc:"+b.n++,b[c]=a);return c} -function mc(a,b){a=decodeURIComponent(a);var c=b||document,d=nc(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function oc(a){var b=Vb;a=[a];var c=window||fa,d;try{var b=p(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=lc(a,c.document),f=b.apply(l,e);d={status:0,value:jc(f)}}catch(k){d={status:"code"in k?k.code:13,value:{message:k.message}}}b=[];fc(new ec,d,b);return b.join("")}var pc=["_"],$=n;!(pc[0]in $)&&$.execScript&&$.execScript("var "+pc[0]);for(var qc;pc.length&&(qc=pc.shift());)!pc.length&&oc!==g?$[qc]=oc:$=$[qc]?$[qc]:$[qc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_value_of_css_property.js b/src/ghostdriver/third_party/webdriver-atoms/get_value_of_css_property.js index accf1296f..fb40228d5 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/get_value_of_css_property.js +++ b/src/ghostdriver/third_party/webdriver-atoms/get_value_of_css_property.js @@ -1,50 +1,48 @@ -function(){return function(){var f=void 0,h=!0,l=null,m=!1;function aa(a){return function(){return a}}var n=this; -function p(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=p(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var da=Date.now||function(){return+new Date};var ea=window;function fa(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),k=0;0==c&&k<g;k++){var s=d[k]||"",z=e[k]||"",U=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var B=U.exec(s)||["","",""],C=na.exec(z)||["","",""];if(0==B[0].length&&0==C[0].length)break;c=((0==B[1].length?0:parseInt(B[1],10))<(0==C[1].length?0:parseInt(C[1],10))?-1:(0==B[1].length?0:parseInt(B[1],10))>(0==C[1].length? -0:parseInt(C[1],10))?1:0)||((0==B[2].length)<(0==C[2].length)?-1:(0==B[2].length)>(0==C[2].length)?1:0)||(B[2]<C[2]?-1:B[2]>C[2]?1:0)}while(0==c)}return c}function ga(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ha=Array.prototype;function r(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(f,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,g=q(a)?a.split(""):a,k=0;k<c;k++)if(k in g){var s=g[k];b.call(f,s,k,a)&&(d[e++]=s)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=q(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(f,e[g],g,a));return d}function ka(a,b){if(a.reduce)return a.reduce(b,"");var c="";r(a,function(d,e){c=b.call(f,c,d,e,a)});return c} -function la(a,b){var c;a:{c=a.length;for(var d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(f,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:q(a)?a.charAt(c):a[c]}function ma(a,b){var c;a:if(q(a))c=!q(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function oa(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};var pa={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", +function(){return function(){function f(a){return function(){return a}}var k=this; +function l(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function p(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var n=d[h]||"",D=e[h]||"",R=RegExp("(\\d*)(\\D*)","g"),ja=RegExp("(\\d*)(\\D*)","g");do{var w=R.exec(n)||["","",""],x=ja.exec(D)||["","",""];if(0==w[0].length&&0==x[0].length)break;c=((0==w[1].length?0:parseInt(w[1],10))<(0==x[1].length?0:parseInt(x[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==x[1].length? +0:parseInt(x[1],10))?1:0)||((0==w[2].length)<(0==x[2].length)?-1:(0==w[2].length)>(0==x[2].length)?1:0)||(w[2]<x[2]?-1:w[2]>x[2]?1:0)}while(0==c)}return c}function da(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ea=Array.prototype;function fa(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 q(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 ga(a,b){for(var c=a.length,d=[],e=0,g=m(a)?a.split(""):a,h=0;h<c;h++)if(h in g){var n=g[h];b.call(void 0,n,h,a)&&(d[e++]=n)}return d} +function ha(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(void 0,e[g],g,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function ka(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function la(a,b,c){return 2>=arguments.length?ea.slice.call(a,b):ea.slice.call(a,b,c)};var ma={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var qa="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ra=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function sa(a){if(!ta.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(ra,"#$1$1$2$2$3$3"));return a.toLowerCase()}var ta=/^#(?:[0-9a-f]{3}){1,2}$/i,ua=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function va(a){var b=a.match(ua);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var wa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function xa(a){var b=a.match(wa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function t(a,b){this.code=a;this.state=ya[a]||za;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;t.N=a.prototype;t.prototype=new b})(); -var za="unknown error",ya={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ya[13]=za;ya[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var u,Aa,Ba,Ca,Da,Ea;function v(){return n.navigator?n.navigator.userAgent:l}Ca=Ba=Aa=u=m;var Fa;if(Fa=v()){var Ga=n.navigator;u=0==Fa.indexOf("Opera");Aa=!u&&-1!=Fa.indexOf("MSIE");Ba=!u&&-1!=Fa.indexOf("WebKit");Ca=!u&&!Ba&&"Gecko"==Ga.product}var w=u,x=Aa,y=Ca,Ha=Ba,Ia,Ja=n.navigator;Ia=Ja&&Ja.platform||"";Da=-1!=Ia.indexOf("Mac");Ea=-1!=Ia.indexOf("Win");var A=-1!=Ia.indexOf("Linux");function Ka(){var a=n.document;return a?a.documentMode:f}var D; -a:{var La="",E;if(w&&n.opera)var Ma=n.opera.version,La="function"==typeof Ma?Ma():Ma;else if(y?E=/rv\:([^\);]+)(\)|;)/:x?E=/MSIE\s+([^\);]+)(\)|;)/:Ha&&(E=/WebKit\/(\S+)/),E)var Na=E.exec(v()),La=Na?Na[1]:"";if(x){var Oa=Ka();if(Oa>parseFloat(La)){D=String(Oa);break a}}D=La}var Pa={};function Qa(a){return Pa[a]||(Pa[a]=0<=fa(D,a))}var Ra=n.document,F=!Ra||!x?f:Ka()||("CSS1Compat"==Ra.compatMode?parseInt(D,10):5);!y&&!x||x&&x&&9<=F||y&&Qa("1.9.1");x&&Qa("9");function Sa(a,b){var c={},d;for(d in a)b.call(f,a[d],d,a)&&(c[d]=a[d]);return c}function Ta(a,b){var c={},d;for(d in a)c[d]=b.call(f,a[d],d,a);return c}function Ua(a,b){for(var c in a)if(b.call(f,a[c],c,a))return c};function Va(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Wa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!(x&&9<=F)){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,g=b.parentNode;return e==g?Xa(a,b):!c&&Va(e,b)?-1*Ya(a,b):!d&&Va(g,a)?Ya(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(h);d=d.createRange();d.selectNode(b);d.collapse(h);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Ya(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Xa(d,a)}function Xa(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Za,$a,ab,bb,cb,db,eb;eb=db=cb=bb=ab=$a=Za=m;var G=v();G&&(-1!=G.indexOf("Firefox")?Za=h:-1!=G.indexOf("Camino")?$a=h:-1!=G.indexOf("iPhone")||-1!=G.indexOf("iPod")?ab=h:-1!=G.indexOf("iPad")?bb=h:-1!=G.indexOf("Android")?cb=h:-1!=G.indexOf("Chrome")?db=h:-1!=G.indexOf("Safari")&&(eb=h));var fb=Za,gb=$a,hb=ab,ib=bb,H=cb,jb=db,kb=eb;var I=x&&!(x&&9<=F),lb=x&&!(x&&8<=F);function mb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.J=e;this.parentNode=b}function nb(a,b,c){var d=lb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new mb(b,a,b.nodeName,d,c)};function J(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==f||b==l?a.innerText:b,b=b==f||b==l?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function K(a,b,c){if(b===l)return h;try{if(!a.getAttribute)return m}catch(d){return m}lb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ob(a,b,c,d,e){return(I?pb:qb).call(l,a,b,q(c)?c:l,q(d)?d:l,e||new L)} -function pb(a,b,c,d,e){if(m||8==a.h||c&&a.h===l){var g=b.all;if(!g)return e;a=rb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var k=[],s=0;b=g[s++];)K(b,c,d)&&k.push(b);g=k}for(s=0;b=g[s++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}sb(a,b,c,d,e);return e} -function qb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),r(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?sb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),r(b,function(a){K(a,c,d)&&e.add(a)}));return e} -function tb(a,b,c,d,e){var g;if((m||8==a.h||c&&a.h===l)&&(g=b.childNodes)){var k=rb(a);if("*"!=k&&(g=ia(g,function(a){return a.tagName&&a.tagName.toLowerCase()==k}),!g))return e;c&&(g=ia(g,function(a){return K(a,c,d)}));r(g,function(a){("*"!=k||"!"!=a.tagName&&!("*"==k&&1!=a.nodeType))&&e.add(a)});return e}return ub(a,b,c,d,e)}function ub(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)K(b,c,d)&&a.matches(b)&&e.add(b);return e} -function sb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)K(b,c,d)&&a.matches(b)&&e.add(b),sb(a,b,c,d,e)}function rb(a){if(m){if(8==a.h)return"!";if(a.h===l)return"*"}return a.getName()};function L(){this.e=this.d=l;this.i=0}function vb(a){this.p=a;this.next=this.n=l}L.prototype.unshift=function(a){a=new vb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};L.prototype.add=function(a){a=new vb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function wb(a){return(a=a.d)?a.p:l}function xb(a){return(a=wb(a))?J(a):""}function M(a,b){this.H=a;this.o=(this.q=b)?a.e:a.d;this.v=l} -M.prototype.next=function(){var a=this.o;if(a==l)return l;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function N(a,b){var c=a.evaluate(b);return c instanceof L?+xb(c):+c}function O(a,b){var c=a.evaluate(b);return c instanceof L?xb(c):""+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?!!c.i:!!c};function Q(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof L&&c instanceof L){e=new M(b,m);for(d=e.next();d;d=e.next()){b=new M(c,m);for(g=b.next();g;g=b.next())if(a(J(d),J(g)))return h}return m}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=new M(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+J(d);break;case "boolean":d=!!J(d);break;case "string":d=J(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return h}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function yb(a,b,c,d){this.w=a;this.L=b;this.t=c;this.u=d}yb.prototype.toString=function(){return this.w};var zb={};function R(a,b,c,d){if(a in zb)throw Error("Binary operator already created: "+a);a=new yb(a,b,c,d);zb[a.toString()]=a}R("div",6,1,function(a,b,c){return N(a,c)/N(b,c)});R("mod",6,1,function(a,b,c){return N(a,c)%N(b,c)});R("*",6,1,function(a,b,c){return N(a,c)*N(b,c)}); -R("+",5,1,function(a,b,c){return N(a,c)+N(b,c)});R("-",5,1,function(a,b,c){return N(a,c)-N(b,c)});R("<",4,2,function(a,b,c){return Q(function(a,b){return a<b},a,b,c)});R(">",4,2,function(a,b,c){return Q(function(a,b){return a>b},a,b,c)});R("<=",4,2,function(a,b,c){return Q(function(a,b){return a<=b},a,b,c)});R(">=",4,2,function(a,b,c){return Q(function(a,b){return a>=b},a,b,c)});R("=",3,2,function(a,b,c){return Q(function(a,b){return a==b},a,b,c,h)}); -R("!=",3,2,function(a,b,c){return Q(function(a,b){return a!=b},a,b,c,h)});R("and",2,2,function(a,b,c){return P(a,c)&&P(b,c)});R("or",1,2,function(a,b,c){return P(a,c)||P(b,c)});function Ab(a,b,c,d,e,g,k,s,z){this.l=a;this.t=b;this.G=c;this.F=d;this.D=e;this.u=g;this.C=k;this.B=s!==f?s:k;this.I=!!z}Ab.prototype.toString=function(){return this.l};var Bb={};function S(a,b,c,d,e,g,k,s){if(a in Bb)throw Error("Function already created: "+a+".");Bb[a]=new Ab(a,b,c,d,m,e,g,k,s)}S("boolean",2,m,m,function(a,b){return P(b,a)},1);S("ceiling",1,m,m,function(a,b){return Math.ceil(N(b,a))},1); -S("concat",3,m,m,function(a,b){var c=oa(arguments,1);return ka(c,function(b,c){return b+O(c,a)})},2,l);S("contains",2,m,m,function(a,b,c){b=O(b,a);a=O(c,a);return-1!=b.indexOf(a)},2);S("count",1,m,m,function(a,b){return b.evaluate(a).i},1,1,h);S("false",2,m,m,aa(m),0);S("floor",1,m,m,function(a,b){return Math.floor(N(b,a))},1); -S("id",4,m,m,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return la(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=O(b,a).split(/\s+/),g=[];r(d,function(a){(a=c(a))&&!ma(g,a)&&g.push(a)});g.sort(Wa);var k=new L;r(g,function(a){k.add(a)});return k},1);S("lang",2,m,m,aa(m),1);S("last",1,h,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0); -S("local-name",3,m,h,function(a,b){var c=b?wb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);S("name",3,m,h,function(a,b){var c=b?wb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);S("namespace-uri",3,h,m,aa(""),0,1,h);S("normalize-space",3,m,h,function(a,b){return(b?O(b,a):J(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);S("not",2,m,m,function(a,b){return!P(b,a)},1);S("number",1,m,h,function(a,b){return b?N(b,a):+J(a.f)},0,1); -S("position",1,h,m,function(a){return a.K},0);S("round",1,m,m,function(a,b){return Math.round(N(b,a))},1);S("starts-with",2,m,m,function(a,b,c){b=O(b,a);a=O(c,a);return 0==b.lastIndexOf(a,0)},2);S("string",3,m,h,function(a,b){return b?O(b,a):J(a.f)},0,1);S("string-length",1,m,h,function(a,b){return(b?O(b,a):J(a.f)).length},0,1); -S("substring",3,m,m,function(a,b,c,d){c=N(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?N(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=O(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);S("substring-after",3,m,m,function(a,b,c){b=O(b,a);a=O(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -S("substring-before",3,m,m,function(a,b,c){b=O(b,a);a=O(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);S("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new M(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+J(e);return d},1,1,h);S("translate",3,m,m,function(a,b,c,d){b=O(b,a);c=O(c,a);var e=O(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);S("true",2,m,m,aa(h),0);function Cb(a,b,c,d){this.l=a;this.A=b;this.q=c;this.O=d}Cb.prototype.toString=function(){return this.l};var Db={};function T(a,b,c,d){if(a in Db)throw Error("Axis already created: "+a);Db[a]=new Cb(a,b,c,!!d)}T("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},h);T("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},h); -T("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new mb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.h===l||"*"==d)for(var d=b.sourceIndex,g=0,k;k=e[g];g++)I?k.nodeValue&&c.add(nb(b,k,d)):c.add(k);else(k=e.getNamedItem(d))&&(I?k.nodeValue&&c.add(nb(b,k,b.sourceIndex)):c.add(k));return c},m);T("child",function(a,b,c,d,e){return(I?tb:ub).call(l,a,b,q(c)?c:l,q(d)?d:l,e||new L)},m,h);T("descendant",ob,m,h); -T("descendant-or-self",function(a,b,c,d){var e=new L;K(b,c,d)&&a.matches(b)&&e.add(b);return ob(a,b,c,d,e)},m,h);T("following",function(a,b,c,d){var e=new L;do for(var g=b;g=g.nextSibling;)K(g,c,d)&&a.matches(g)&&e.add(g),e=ob(a,g,c,d,e);while(b=b.parentNode);return e},m,h);T("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);T("namespace",function(){return new L},m); -T("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);T("preceding",function(a,b,c,d){var e=new L,g=[];do g.unshift(b);while(b=b.parentNode);for(var k=1,s=g.length;k<s;k++){var z=[];for(b=g[k];b=b.previousSibling;)z.unshift(b);for(var U=0,na=z.length;U<na;U++)b=z[U],K(b,c,d)&&a.matches(b)&&e.add(b),e=ob(a,b,c,d,e)}return e},h,h); -T("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},h);T("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},m);function V(a){return(a=a.exec(v()))?a[1]:""}var Eb=function(){if(fb)return V(/Firefox\/([0-9.]+)/);if(x||w)return D;if(jb)return V(/Chrome\/([0-9.]+)/);if(kb)return V(/Version\/([0-9.]+)/);if(hb||ib){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(H)return(a=V(/Android\s+([0-9.]+)/))?a:V(/Version\/([0-9.]+)/);if(gb)return V(/Camino\/([0-9.]+)/)}return""}();var Fb,Gb;function W(a){return Hb?Fb(a):x?0<=fa(F,a):Qa(a)}function Ib(a){Hb?Gb(a):H?fa(Jb,a):fa(Eb,a)} -var Hb=function(){if(!y)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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,g=c.version;Fb=function(a){return 0<=d.s(e,""+a)};Gb=function(a){d.s(g,""+a)};return h}(),Kb;if(H){var Lb=/Android\s+([0-9\.]+)/.exec(v());Kb=Lb?Lb[1]:"0"}else Kb="0";var Jb=Kb,Mb=x&&!(x&&9<=F); -H&&Ib(2.3);!w&&(!Ha||W("533"));function Nb(a,b){var c=ga(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Mb?"styleFloat":"cssFloat";var d;a:{d=c;var e=9==a.nodeType?a:a.ownerDocument||a.document;if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,l))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}c=d||Ob(a,c);if(c===l)c=l;else if(ma(qa,b)&&(ta.test("#"==c.charAt(0)?c:"#"+c)||xa(c).length||pa&&pa[c.toLowerCase()]||va(c).length)){d=va(c);if(!d.length){a:if(d=xa(c),!d.length){d=pa[c.toLowerCase()]; -d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(ta.test(d)&&(d=sa(d),d=sa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c=4!=d.length?c:"rgba("+d.join(", ")+")"}return c} -function Ob(a,b){var c=a.currentStyle||a.style,d=c[b];d===f&&"function"==p(c.getPropertyValue)&&(d=c.getPropertyValue(b));if("inherit"!=d)return d!==f?d:l;for(c=a.parentNode;c&&1!=c.nodeType&&9!=c.nodeType&&11!=c.nodeType;)c=c.parentNode;return(c=c&&1==c.nodeType?c:l)?Ob(c,b):l};Ha||w||Hb&&Ib(3.6);x&&W(10);H&&Ib(4);function X(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof X){d=Pb(a);Qb(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}X.prototype.k=0;X.prototype.z=0;function Pb(a){Qb(a);return a.c.concat()} -function Qb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}X.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -X.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.z++);this.g[a]=b};var Rb={};function Y(a,b,c){ca(a)&&(a=y?a.a:w?a.opera:a.b);a=new Sb(a,b,c);if(b&&(!(b in Rb)||c))Rb[b]={key:a,shift:m},c&&(Rb[c]={key:a,shift:h});return a}function Sb(a,b,c){this.code=a;this.r=b||l;this.M=c||this.r}Y(8);Y(9);Y(13);var Tb=Y(16),Ub=Y(17),Vb=Y(18);Y(19);Y(20);Y(27);Y(32," ");Y(33);Y(34);Y(35);Y(36);Y(37);Y(38);Y(39);Y(40);Y(44);Y(45);Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","("); -Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q");Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z");var Wb=Y(Ea?{a:91,b:91,opera:219}:Da?{a:224,b:91,opera:17}:{a:0,b:91,opera:l}); -Y(Ea?{a:92,b:92,opera:220}:Da?{a:224,b:93,opera:17}:{a:0,b:92,opera:l});Y(Ea?{a:93,b:93,opera:0}:Da?{a:0,b:0,opera:16}:{a:93,b:l,opera:0});Y({a:96,b:96,opera:48},"0");Y({a:97,b:97,opera:49},"1");Y({a:98,b:98,opera:50},"2");Y({a:99,b:99,opera:51},"3");Y({a:100,b:100,opera:52},"4");Y({a:101,b:101,opera:53},"5");Y({a:102,b:102,opera:54},"6");Y({a:103,b:103,opera:55},"7");Y({a:104,b:104,opera:56},"8");Y({a:105,b:105,opera:57},"9");Y({a:106,b:106,opera:A?56:42},"*");Y({a:107,b:107,opera:A?61:43},"+"); -Y({a:109,b:109,opera:A?109:45},"-");Y({a:110,b:110,opera:A?190:78},".");Y({a:111,b:111,opera:A?191:47},"/");Y(A&&w?l:144);Y(112);Y(113);Y(114);Y(115);Y(116);Y(117);Y(118);Y(119);Y(120);Y(121);Y(122);Y(123);Y({a:107,b:187,opera:61},"=","+");Y(108,",");Y({a:109,b:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");Y({a:59,b:186,opera:59},";",":");Y(222,"'",'"');var Z=new X;Z.set(1,Tb);Z.set(2,Ub);Z.set(4,Vb);Z.set(8,Wb); -(function(a){var b=new X;r(Pb(a),function(c){b.set(a.get(c).code,c)});return b})(Z);y&&W(12);function Xb(){this.j=f} -function Yb(a,b,c){switch(typeof b){case "string":Zb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==p(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Yb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),Zb(g, -c),c.push(":"),Yb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var $b={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ac=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Zb(a,b){b.push('"',a.replace(ac,function(a){if(a in $b)return $b[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return $b[a]=e+b.toString(16)}),'"')};Ha||w||y&&W(3.5)||x&&W(8);function bc(a){switch(p(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,bc);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=cc(a);return b}if("document"in a)return b={},b.WINDOW=cc(a),b;if(ba(a))return ja(a,bc);a=Sa(a,function(a,b){return"number"==typeof b||q(b)});return Ta(a,bc);default:return l}} -function dc(a,b){return"array"==p(a)?ja(a,function(a){return dc(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?ec(a.ELEMENT,b):"WINDOW"in a?ec(a.WINDOW,b):Ta(a,function(a){return dc(a,b)}):a}function fc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=da());b.m||(b.m=da());return b}function cc(a){var b=fc(a.ownerDocument),c=Ua(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} -function ec(a,b){a=decodeURIComponent(a);var c=b||document,d=fc(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function gc(a,b){var c=Nb,d=[a,b],e=window||ea,g;try{var c=q(c)?new e.Function(c):e==window?c:new e.Function("return ("+c+").apply(null,arguments);"),k=dc(d,e.document),s=c.apply(l,k);g={status:0,value:bc(s)}}catch(z){g={status:"code"in z?z.code:13,value:{message:z.message}}}c=[];Yb(new Xb,g,c);return c.join("")}var hc=["_"],$=n;!(hc[0]in $)&&$.execScript&&$.execScript("var "+hc[0]);for(var ic;hc.length&&(ic=hc.shift());)!hc.length&&gc!==f?$[ic]=gc:$=$[ic]?$[ic]:$[ic]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var na="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),oa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,pa=/^#(?:[0-9a-f]{3}){1,2}$/i,qa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,ra=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function r(a,b){this.code=a;this.state=sa[a]||ta;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;r.O=a.prototype;r.prototype=new b})(); +var ta="unknown error",sa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};sa[13]=ta;sa[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var s,ua,va,wa,xa,ya;function t(){return k.navigator?k.navigator.userAgent:null}wa=va=ua=s=!1;var za;if(za=t()){var Aa=k.navigator;s=0==za.indexOf("Opera");ua=!s&&-1!=za.indexOf("MSIE");va=!s&&-1!=za.indexOf("WebKit");wa=!s&&!va&&"Gecko"==Aa.product}var u=s,v=ua,y=wa,Ba=va,Ca,Da=k.navigator;Ca=Da&&Da.platform||"";xa=-1!=Ca.indexOf("Mac");ya=-1!=Ca.indexOf("Win");var z=-1!=Ca.indexOf("Linux");function Ea(){var a=k.document;return a?a.documentMode:void 0}var A; +a:{var Fa="",B;if(u&&k.opera)var Ga=k.opera.version,Fa="function"==typeof Ga?Ga():Ga;else if(y?B=/rv\:([^\);]+)(\)|;)/:v?B=/MSIE\s+([^\);]+)(\)|;)/:Ba&&(B=/WebKit\/(\S+)/),B)var Ha=B.exec(t()),Fa=Ha?Ha[1]:"";if(v){var Ia=Ea();if(Ia>parseFloat(Fa)){A=String(Ia);break a}}A=Fa}var Ja={};function Ka(a){return Ja[a]||(Ja[a]=0<=p(A,a))}var La=k.document,C=La&&v?Ea()||("CSS1Compat"==La.compatMode?parseInt(A,10):5):void 0;!y&&!v||v&&v&&9<=C||y&&Ka("1.9.1");v&&Ka("9");function Ma(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Na(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Oa(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Pa(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Qa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!(v&&9<=C)){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,g=b.parentNode;return e==g?Ra(a,b):!c&&Pa(e,b)?-1*Sa(a,b):!d&&Pa(g,a)?Sa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| +a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Sa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ra(d,a)}function Ra(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var Ta,Ua,Va,Wa,Xa,Ya,Za;Za=Ya=Xa=Wa=Va=Ua=Ta=!1;var E=t();E&&(-1!=E.indexOf("Firefox")?Ta=!0:-1!=E.indexOf("Camino")?Ua=!0:-1!=E.indexOf("iPhone")||-1!=E.indexOf("iPod")?Va=!0:-1!=E.indexOf("iPad")?Wa=!0:-1!=E.indexOf("Android")?Xa=!0:-1!=E.indexOf("Chrome")?Ya=!0:-1!=E.indexOf("Safari")&&(Za=!0));var $a=Ta,ab=Ua,bb=Va,cb=Wa,F=Xa,db=Ya,eb=Za;var G=v&&!(v&&9<=C),fb=v&&!(v&&8<=C);function gb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.K=e;this.parentNode=b}function hb(a,b,c){var d=fb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new gb(b,a,b.nodeName,d,c)};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(G&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),G&&"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} +function I(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}fb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ib(a,b,c,d,e){return(G?jb:kb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)} +function jb(a,b,c,d,e){if(8==a.h||c&&null===a.h){var g=b.all;if(!g)return e;a=lb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var h=[],n=0;b=g[n++];)I(b,c,d)&&h.push(b);g=h}for(n=0;b=g[n++];)"*"==a&&"!"==b.tagName||e.add(b);return e}mb(a,b,c,d,e);return e} +function kb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){I(a,c,d)&&e.add(a)}));return e} +function nb(a,b,c,d,e){var g;if((8==a.h||c&&null===a.h)&&(g=b.childNodes)){var h=lb(a);if("*"!=h&&(g=ga(g,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!g))return e;c&&(g=ga(g,function(a){return I(a,c,d)}));q(g,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return ob(a,b,c,d,e)}function ob(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b);return e} +function mb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b),mb(a,b,c,d,e)}function lb(a){return a.getName()};function J(){this.e=this.d=null;this.i=0}function pb(a){this.p=a;this.next=this.n=null}J.prototype.unshift=function(a){a=new pb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};J.prototype.add=function(a){a=new pb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function qb(a){return(a=a.d)?a.p:null}function rb(a){return(a=qb(a))?H(a):""}function K(a,b){this.I=a;this.o=(this.q=b)?a.e:a.d;this.v=null} +K.prototype.next=function(){var a=this.o;if(null==a)return null;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function L(a,b){var c=a.evaluate(b);return c instanceof J?+rb(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof J?rb(c):""+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?!!c.i:!!c};function O(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof J&&c instanceof J){e=new K(b,!1);for(d=e.next();d;d=e.next())for(b=new K(c,!1),g=b.next();g;g=b.next())if(a(H(d),H(g)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=new K(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+H(d);break;case "boolean":d=!!H(d);break;case "string":d=H(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function sb(a,b,c,d){this.w=a;this.M=b;this.t=c;this.u=d}sb.prototype.toString=function(){return this.w};var tb={};function P(a,b,c,d){if(tb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new sb(a,b,c,d);tb[a.toString()]=a}P("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});P("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)}); +P("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});P("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});P("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});P("<",4,2,function(a,b,c){return O(function(a,b){return a<b},a,b,c)});P(">",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)}); +P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return N(a,c)&&N(b,c)});P("or",1,2,function(a,b,c){return N(a,c)||N(b,c)});function ub(a,b,c,d,e,g,h,n,D){this.l=a;this.t=b;this.H=c;this.G=d;this.F=e;this.u=g;this.D=h;this.C=void 0!==n?n:h;this.J=!!D}ub.prototype.toString=function(){return this.l};var vb={};function Q(a,b,c,d,e,g,h,n){if(vb.hasOwnProperty(a))throw Error("Function already created: "+a+".");vb[a]=new ub(a,b,c,d,!1,e,g,h,n)}Q("boolean",2,!1,!1,function(a,b){return N(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1); +Q("concat",3,!1,!1,function(a,b){var c=la(arguments,1);return ia(c,function(b,c){return b+M(c,a)})},2,null);Q("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);Q("count",1,!1,!1,function(a,b){return b.evaluate(a).i},1,1,!0);Q("false",2,!1,!1,f(!1),0);Q("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +Q("id",4,!1,!1,function(a,b){function c(a){if(G){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ka(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),g=[];q(d,function(a){a=c(a);!a||0<=fa(g,a)||g.push(a)});g.sort(Qa);var h=new J;q(g,function(a){h.add(a)});return h},1);Q("lang",2,!1,!1,f(!1),1); +Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);Q("local-name",3,!1,!0,function(a,b){var c=b?qb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){var c=b?qb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,f(""),0,1,!0);Q("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):H(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +Q("not",2,!1,!1,function(a,b){return!N(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?L(b,a):+H(a.f)},0,1);Q("position",1,!0,!1,function(a){return a.L},0);Q("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?M(b,a):H(a.f)},0,1);Q("string-length",1,!1,!0,function(a,b){return(b?M(b,a):H(a.f)).length},0,1); +Q("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +Q("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new K(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);Q("true",2,!1,!1,f(!0),0);function wb(a,b,c,d){this.l=a;this.B=b;this.q=c;this.P=d}wb.prototype.toString=function(){return this.l};var xb={};function S(a,b,c,d){if(xb.hasOwnProperty(a))throw Error("Axis already created: "+a);xb[a]=new wb(a,b,c,!!d)}S("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);S("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +S("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&G)return c.add(new gb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,g=0,h;h=e[g];g++)G?h.nodeValue&&c.add(hb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(G?h.nodeValue&&c.add(hb(b,h,b.sourceIndex)):c.add(h));return c},!1);S("child",function(a,b,c,d,e){return(G?nb:ob).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)},!1,!0);S("descendant",ib,!1,!0); +S("descendant-or-self",function(a,b,c,d){var e=new J;I(b,c,d)&&a.matches(b)&&e.add(b);return ib(a,b,c,d,e)},!1,!0);S("following",function(a,b,c,d){var e=new J;do for(var g=b;g=g.nextSibling;)I(g,c,d)&&a.matches(g)&&e.add(g),e=ib(a,g,c,d,e);while(b=b.parentNode);return e},!1,!0);S("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);S("namespace",function(){return new J},!1); +S("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);S("preceding",function(a,b,c,d){var e=new J,g=[];do g.unshift(b);while(b=b.parentNode);for(var h=1,n=g.length;h<n;h++){var D=[];for(b=g[h];b=b.previousSibling;)D.unshift(b);for(var R=0,ja=D.length;R<ja;R++)b=D[R],I(b,c,d)&&a.matches(b)&&e.add(b),e=ib(a,b,c,d,e)}return e},!0,!0); +S("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);S("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},!1);function T(a){return(a=a.exec(t()))?a[1]:""}var yb=function(){if($a)return T(/Firefox\/([0-9.]+)/);if(v||u)return A;if(db)return T(/Chrome\/([0-9.]+)/);if(eb)return T(/Version\/([0-9.]+)/);if(bb||cb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(F)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(ab)return T(/Camino\/([0-9.]+)/)}return""}();var zb,Ab;function Bb(a){return Cb?zb(a):v?0<=p(C,a):Ka(a)}function U(a){Cb?Ab(a):F?p(Db,a):p(yb,a)}var Cb=function(){if(!y)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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,g=c.version;zb=function(a){return 0<=d.s(e,""+a)};Ab=function(a){d.s(g,""+a)};return!0}(),Eb; +if(F){var Fb=/Android\s+([0-9\.]+)/.exec(t());Eb=Fb?Fb[1]:"0"}else Eb="0";var Db=Eb,Gb=v&&!(v&&9<=C);F&&U(2.3);F&&U(4);eb&&U(6);function Hb(a,b){var c=da(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Gb?"styleFloat":"cssFloat";var d;a:{d=c;var e=9==a.nodeType?a:a.ownerDocument||a.document;if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||Ib(a,c);if(null===d)d=null;else if(0<=fa(na,c)){b:{var g=d.match(qa);if(g){var c=Number(g[1]),e=Number(g[2]),h=Number(g[3]),g=Number(g[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=h&&255>=h&&0<=g&& +1>=g){c=[c,e,h,g];break b}}c=null}if(!c){b:{if(h=d.match(ra))if(c=Number(h[1]),e=Number(h[2]),h=Number(h[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=h&&255>=h){c=[c,e,h,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=ma[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(oa,"#$1$1$2$2$3$3")),!pa.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} +function Ib(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&"function"==l(c.getPropertyValue)&&(d=c.getPropertyValue(b));if("inherit"!=d)return void 0!==d?d:null;for(c=a.parentNode;c&&1!=c.nodeType&&9!=c.nodeType&&11!=c.nodeType;)c=c.parentNode;return(c=c&&1==c.nodeType?c:null)?Ib(c,b):null};Ba||u||Cb&&U(3.6);v&&Bb(10);F&&U(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V)for(d=Jb(a),Kb(a),e=[],c=0;c<a.c.length;c++)e.push(a.g[a.c[c]]);else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.k=0;V.prototype.A=0;function Jb(a){Kb(a);return a.c.concat()} +function Kb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; +V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.A++);this.g[a]=b};var Lb={};function W(a,b,c){ba(a)&&(a=y?a.a:u?a.opera:a.b);a=new Mb(a,b,c);!b||b in Lb&&!c||(Lb[b]={key:a,shift:!1},c&&(Lb[c]={key:a,shift:!0}));return a}function Mb(a,b,c){this.code=a;this.r=b||null;this.N=c||this.r}W(8);W(9);W(13);var Nb=W(16),Ob=W(17),Pb=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","("); +W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Qb=W(ya?{a:91,b:91,opera:219}:xa?{a:224,b:91,opera:17}:{a:0,b:91,opera:null}); +W(ya?{a:92,b:92,opera:220}:xa?{a:224,b:93,opera:17}:{a:0,b:92,opera:null});W(ya?{a:93,b:93,opera:0}:xa?{a:0,b:0,opera:16}:{a:93,b:null,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:z?56:42},"*"); +W({a:107,b:107,opera:z?61:43},"+");W({a:109,b:109,opera:z?109:45},"-");W({a:110,b:110,opera:z?190:78},".");W({a:111,b:111,opera:z?191:47},"/");W(z&&u?null:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Nb); +X.set(2,Ob);X.set(4,Pb);X.set(8,Qb);(function(a){var b=new V;q(Jb(a),function(c){b.set(a.get(c).code,c)});return b})(X);y&&Bb(12);function Rb(){this.j=void 0} +function Sb(a,b,c){switch(typeof b){case "string":Tb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==l(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Sb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d), +Tb(g,c),c.push(":"),Sb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ub={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Vb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Tb(a,b){b.push('"',a.replace(Vb,function(a){if(a in Ub)return Ub[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ub[a]=e+b.toString(16)}),'"')};Ba||u||y&&Bb(3.5)||v&&Bb(8);function Wb(a){switch(l(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,Wb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Xb(a);return b}if("document"in a)return b={},b.WINDOW=Xb(a),b;if(aa(a))return ha(a,Wb);a=Ma(a,function(a,b){return"number"==typeof b||m(b)});return Na(a,Wb);default:return null}} +function Yb(a,b){return"array"==l(a)?ha(a,function(a){return Yb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Zb(a.ELEMENT,b):"WINDOW"in a?Zb(a.WINDOW,b):Na(a,function(a){return Yb(a,b)}):a}function $b(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ca());b.m||(b.m=ca());return b}function Xb(a){var b=$b(a.ownerDocument),c=Oa(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} +function Zb(a,b){a=decodeURIComponent(a);var c=b||document,d=$b(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new r(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function ac(a,b,c){a=[a,b];var d;try{var e=c?Zb(c.WINDOW):window,g=Yb(a,e.document),h=Hb.apply(null,g);d={status:0,value:Wb(h)}}catch(n){d={status:"code"in n?n.code:13,value:{message:n.message}}}c=[];Sb(new Rb,d,c);return c.join("")}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===ac?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=ac;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_window_position.js b/src/ghostdriver/third_party/webdriver-atoms/get_window_position.js deleted file mode 100644 index bd370d8b7..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/get_window_position.js +++ /dev/null @@ -1,3 +0,0 @@ -function(){return function(){var d=!0,g=!1,h=this;var aa=window;function k(a,b){for(var c=0,r=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),x=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),D=Math.max(r.length,x.length),y=0;0==c&&y<D;y++){var da=r[y]||"",ea=x[y]||"",fa=RegExp("(\\d*)(\\D*)","g"),ga=RegExp("(\\d*)(\\D*)","g");do{var e=fa.exec(da)||["","",""],f=ga.exec(ea)||["","",""];if(0==e[0].length&&0==f[0].length)break;c=((0==e[1].length?0:parseInt(e[1],10))<(0==f[1].length?0:parseInt(f[1],10))?-1:(0==e[1].length?0:parseInt(e[1],10))> -(0==f[1].length?0:parseInt(f[1],10))?1:0)||((0==e[2].length)<(0==f[2].length)?-1:(0==e[2].length)>(0==f[2].length)?1:0)||(e[2]<f[2]?-1:e[2]>f[2]?1:0)}while(0==c)}return c};var l,m,n,p;function q(){return h.navigator?h.navigator.userAgent:null}p=n=m=l=g;var s;if(s=q()){var ba=h.navigator;l=0==s.indexOf("Opera");m=!l&&-1!=s.indexOf("MSIE");n=!l&&-1!=s.indexOf("WebKit");p=!l&&!n&&"Gecko"==ba.product}var t=l,u=m,v=p,w=n;function z(){var a=h.document;return a?a.documentMode:void 0}var A; -a:{var B="",C;if(t&&h.opera)var E=h.opera.version,B="function"==typeof E?E():E;else if(v?C=/rv\:([^\);]+)(\)|;)/:u?C=/MSIE\s+([^\);]+)(\)|;)/:w&&(C=/WebKit\/(\S+)/),C)var F=C.exec(q()),B=F?F[1]:"";if(u){var G=z();if(G>parseFloat(B)){A=String(G);break a}}A=B}var H={},I=h.document,ca=!I||!u?void 0:z()||("CSS1Compat"==I.compatMode?parseInt(A,10):5);var J,K,L,M,N,O,P;P=O=N=M=L=K=J=g;var Q=q();Q&&(-1!=Q.indexOf("Firefox")?J=d:-1!=Q.indexOf("Camino")?K=d:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=d:-1!=Q.indexOf("iPad")?M=d:-1!=Q.indexOf("Android")?N=d:-1!=Q.indexOf("Chrome")?O=d:-1!=Q.indexOf("Safari")&&(P=d));var ha=J,ia=K,ja=L,ka=M,R=N,la=O,ma=P;function S(a){return(a=a.exec(q()))?a[1]:""}var na=function(){if(ha)return S(/Firefox\/([0-9.]+)/);if(u||t)return A;if(la)return S(/Chrome\/([0-9.]+)/);if(ma)return S(/Version\/([0-9.]+)/);if(ja||ka){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(q());if(a)return a[1]+"."+a[2]}else{if(R)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ia)return S(/Camino\/([0-9.]+)/)}return""}();var T,U,V=function(){if(!v)return g;var a=h.Components;if(!a)return g;try{if(!a.classes)return g}catch(b){return g}var c=a.classes,a=a.interfaces,r=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),x=c.platformVersion,D=c.version;T=function(a){r.a(x,""+a)};U=function(a){r.a(D,""+a)};return d}(),W;if(R){var X=/Android\s+([0-9\.]+)/.exec(q());W=X?X[1]:"0"}else W="0";var oa=W;R&&(V?U(2.3):R?k(oa,2.3):k(na,2.3));function pa(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}pa.prototype.toString=function(){return"("+this.x+", "+this.y+")"};!t&&w&&(V?T("533"):u?k(ca,"533"):H["533"]||(H["533"]=0<=k(A,"533")));function qa(a){var b=a||aa;u?(a=b.screenLeft,b=b.screenTop):(a=b.screenX,b=b.screenY);return new pa(a,b)}var Y=["_"],Z=h;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&void 0!==qa?Z[$]=qa:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/get_window_size.js b/src/ghostdriver/third_party/webdriver-atoms/get_window_size.js deleted file mode 100644 index 1cd53f79b..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/get_window_size.js +++ /dev/null @@ -1,4 +0,0 @@ -function(){return function(){var c=!0,f=!1,g=this;var aa=window;function h(a,w){for(var b=0,p=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),x=String(w).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),D=Math.max(p.length,x.length),y=0;0==b&&y<D;y++){var ea=p[y]||"",fa=x[y]||"",ga=RegExp("(\\d*)(\\D*)","g"),ha=RegExp("(\\d*)(\\D*)","g");do{var d=ga.exec(ea)||["","",""],e=ha.exec(fa)||["","",""];if(0==d[0].length&&0==e[0].length)break;b=((0==d[1].length?0:parseInt(d[1],10))<(0==e[1].length?0:parseInt(e[1],10))?-1:(0==d[1].length?0:parseInt(d[1],10))> -(0==e[1].length?0:parseInt(e[1],10))?1:0)||((0==d[2].length)<(0==e[2].length)?-1:(0==d[2].length)>(0==e[2].length)?1:0)||(d[2]<e[2]?-1:d[2]>e[2]?1:0)}while(0==b)}return b};var k,l,m,n;function q(){return g.navigator?g.navigator.userAgent:null}n=m=l=k=f;var r;if(r=q()){var ba=g.navigator;k=0==r.indexOf("Opera");l=!k&&-1!=r.indexOf("MSIE");m=!k&&-1!=r.indexOf("WebKit");n=!k&&!m&&"Gecko"==ba.product}var s=k,t=l,u=n,v=m;function z(){var a=g.document;return a?a.documentMode:void 0}var A; -a:{var B="",C;if(s&&g.opera)var E=g.opera.version,B="function"==typeof E?E():E;else if(u?C=/rv\:([^\);]+)(\)|;)/:t?C=/MSIE\s+([^\);]+)(\)|;)/:v&&(C=/WebKit\/(\S+)/),C)var F=C.exec(q()),B=F?F[1]:"";if(t){var G=z();if(G>parseFloat(B)){A=String(G);break a}}A=B}var H={},I=g.document,ca=!I||!t?void 0:z()||("CSS1Compat"==I.compatMode?parseInt(A,10):5);var J,K,L,M,N,O,P;P=O=N=M=L=K=J=f;var Q=q();Q&&(-1!=Q.indexOf("Firefox")?J=c:-1!=Q.indexOf("Camino")?K=c:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=c:-1!=Q.indexOf("iPad")?M=c:-1!=Q.indexOf("Android")?N=c:-1!=Q.indexOf("Chrome")?O=c:-1!=Q.indexOf("Safari")&&(P=c));var da=J,ia=K,ja=L,ka=M,R=N,la=O,ma=P;function S(a){return(a=a.exec(q()))?a[1]:""}var na=function(){if(da)return S(/Firefox\/([0-9.]+)/);if(t||s)return A;if(la)return S(/Chrome\/([0-9.]+)/);if(ma)return S(/Version\/([0-9.]+)/);if(ja||ka){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(q());if(a)return a[1]+"."+a[2]}else{if(R)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ia)return S(/Camino\/([0-9.]+)/)}return""}();var T,U,V=function(){if(!u)return f;var a=g.Components;if(!a)return f;try{if(!a.classes)return f}catch(w){return f}var b=a.classes,a=a.interfaces,p=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),x=b.platformVersion,D=b.version;T=function(a){p.a(x,""+a)};U=function(a){p.a(D,""+a)};return c}(),W;if(R){var oa=/Android\s+([0-9\.]+)/.exec(q());W=oa?oa[1]:"0"}else W="0";var pa=W; -R&&(V?U(2.3):R?h(pa,2.3):h(na,2.3));function qa(a,w){this.width=a;this.height=w}qa.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};!s&&v&&(V?T("533"):t?h(ca,"533"):H["533"]||(H["533"]=0<=h(A,"533")));function ra(a){a=a||aa;return new qa(a.outerWidth,a.outerHeight)}var X=["_"],Y=g;!(X[0]in Y)&&Y.execScript&&Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());){var $;if($=!X.length)$=void 0!==ra;$?Y[Z]=ra:Y=Y[Z]?Y[Z]:Y[Z]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/is_displayed.js b/src/ghostdriver/third_party/webdriver-atoms/is_displayed.js index f2cadf7f6..6147eea0d 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/is_displayed.js +++ b/src/ghostdriver/third_party/webdriver-atoms/is_displayed.js @@ -1,87 +1,94 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,p=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.ta=b.prototype;a.prototype=new c};var fa=window;function ga(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var n=d[g]||"",v=e[g]||"",w=RegExp("(\\d*)(\\D*)","g"),D=RegExp("(\\d*)(\\D*)","g");do{var U=w.exec(n)||["","",""],V=D.exec(v)||["","",""];if(0==U[0].length&&0==V[0].length)break;c=((0==U[1].length?0:parseInt(U[1],10))<(0==V[1].length?0:parseInt(V[1],10))?-1:(0==U[1].length?0:parseInt(U[1],10))>(0==V[1].length? -0:parseInt(V[1],10))?1:0)||((0==U[2].length)<(0==V[2].length)?-1:(0==U[2].length)>(0==V[2].length)?1:0)||(U[2]<V[2]?-1:U[2]>V[2]?1:0)}while(0==c)}return c}function ha(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ia=Array.prototype;function x(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ja(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var n=f[g];b.call(k,n,g,a)&&(d[e++]=n)}return d}function ka(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function la(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function ma(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return p}function na(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function oa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function pa(a){return ia.concat.apply(ia,arguments)} -function qa(a,b,c){return 2>=arguments.length?ia.slice.call(a,b):ia.slice.call(a,b,c)};var ra={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", +function(){return function(){function h(a){return function(){return this[a]}}function k(a){return function(){return a}}var n=this; +function aa(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)} +function ea(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)}}function fa(a,b,c){fa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return fa.apply(null,arguments)} +function ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ha=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.wa=b.prototype;a.prototype=new c};function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var q=d[g]||"",u=e[g]||"",U=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var l=U.exec(q)||["","",""],m=r.exec(u)||["","",""];if(0==l[0].length&&0==m[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0==m[1].length? +0:parseInt(m[1],10))?1:0)||((0==l[2].length)<(0==m[2].length)?-1:(0==l[2].length)>(0==m[2].length)?1:0)||(l[2]<m[2]?-1:l[2]>m[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function t(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var q=f[g];b.call(void 0,q,g,a)&&(d[e++]=q)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function oa(a,b){for(var c=a.length,d=p(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 pa(a,b){for(var c=a.length,d=p(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 qa(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function ra(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function sa(a){return ka.concat.apply(ka,arguments)}function ta(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ua={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var sa="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ta=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function ua(a){va.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(ta,"#$1$1$2$2$3$3"));return a.toLowerCase()}var va=/^#(?:[0-9a-f]{3}){1,2}$/i,wa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function xa(a){var b=a.match(wa);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var ya=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Aa[a]||Ba;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(y,Error); -var Ba="unknown error",Aa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Aa[13]=Ba;Aa[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Ca,Da,Ea,Fa,Ga,Ha;function Ia(){return r.navigator?r.navigator.userAgent:m}Fa=Ea=Da=Ca=p;var Ja;if(Ja=Ia()){var Ka=r.navigator;Ca=0==Ja.indexOf("Opera");Da=!Ca&&-1!=Ja.indexOf("MSIE");Ea=!Ca&&-1!=Ja.indexOf("WebKit");Fa=!Ca&&!Ea&&"Gecko"==Ka.product}var z=Ca,A=Da,B=Fa,C=Ea,La,Ma=r.navigator;La=Ma&&Ma.platform||"";Ga=-1!=La.indexOf("Mac");Ha=-1!=La.indexOf("Win");var Na=-1!=La.indexOf("Linux");function Oa(){var a=r.document;return a?a.documentMode:k}var Pa; -a:{var Qa="",Ra;if(z&&r.opera)var Sa=r.opera.version,Qa="function"==typeof Sa?Sa():Sa;else if(B?Ra=/rv\:([^\);]+)(\)|;)/:A?Ra=/MSIE\s+([^\);]+)(\)|;)/:C&&(Ra=/WebKit\/(\S+)/),Ra)var Ta=Ra.exec(Ia()),Qa=Ta?Ta[1]:"";if(A){var Ua=Oa();if(Ua>parseFloat(Qa)){Pa=String(Ua);break a}}Pa=Qa}var Va={};function Wa(a){return Va[a]||(Va[a]=0<=ga(Pa,a))}function E(a){return A&&Xa>=a}var Ya=r.document,Xa=!Ya||!A?k:Oa()||("CSS1Compat"==Ya.compatMode?parseInt(Pa,10):5);var Za;!B&&!A||A&&E(9)||B&&Wa("1.9.1");A&&Wa("9");var $a=A||z||C;function F(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}F.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function ab(a,b){this.width=a;this.height=b}ab.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};ab.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};ab.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};ab.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function bb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function cb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function db(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var eb=3;function fb(a){return a?new gb(G(a)):Za||(Za=new gb)}function hb(a){if($a)return a.parentElement;a=a.parentNode;return da(a)&&1==a.nodeType?a:m}function ib(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function jb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!E(9)){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?kb(a,b):!c&&ib(e,b)?-1*lb(a,b):!d&&ib(f,a)?lb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function lb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return kb(d,a)}function kb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function mb(a,b){var c=[];return nb(a,b,c,l)?c[0]:k} -function nb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||nb(a,b,c,d))return l;a=a.nextSibling}return p}function ob(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function gb(a){this.S=a||r.document||document}function pb(a){var b=a.S;a=!C&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new F(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}gb.prototype.contains=ib;var qb,rb,sb,tb,ub,vb,wb;wb=vb=ub=tb=sb=rb=qb=p;var H=Ia();H&&(-1!=H.indexOf("Firefox")?qb=l:-1!=H.indexOf("Camino")?rb=l:-1!=H.indexOf("iPhone")||-1!=H.indexOf("iPod")?sb=l:-1!=H.indexOf("iPad")?tb=l:-1!=H.indexOf("Android")?ub=l:-1!=H.indexOf("Chrome")?vb=l:-1!=H.indexOf("Safari")&&(wb=l));var xb=qb,yb=rb,zb=sb,Ab=tb,Bb=ub,Cb=vb,Db=wb;function Eb(a,b,c){this.e=a;this.na=b||1;this.m=c||1};var I=A&&!E(9),Fb=A&&!E(8);function Gb(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ra=e;this.parentNode=b}function Hb(a,b,c){var d=Fb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Gb(b,a,b.nodeName,d,c)};function Ib(a){this.Q=a;this.F=0}function Jb(a){a=a.match(Kb);for(var b=0;b<a.length;b++)Lb.test(a[b])&&a.splice(b,1);return new Ib(a)}var Kb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Lb=/^\s/;function J(a,b){return a.Q[a.F+(b||0)]}Ib.prototype.next=function(){return this.Q[this.F++]};Ib.prototype.back=function(){this.F--};Ib.prototype.empty=function(){return this.Q.length<=this.F};function K(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(I&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),I&&"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} -function Mb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return p}catch(d){return p}Fb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Nb(a,b,c,d,e){return(I?Ob:Pb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)} -function Ob(a,b,c,d,e){if(a instanceof Qb||8==a.l||c&&a.l===m){var f=b.all;if(!f)return e;a=Rb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],n=0;b=f[n++];)Mb(b,c,d)&&g.push(b);f=g}for(n=0;b=f[n++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Sb(a,b,c,d,e);return e} -function Pb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?Sb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){Mb(a,c,d)&&e.add(a)}));return e} -function Tb(a,b,c,d,e){var f;if((a instanceof Qb||8==a.l||c&&a.l===m)&&(f=b.childNodes)){var g=Rb(a);if("*"!=g&&(f=ja(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ja(f,function(a){return Mb(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return Ub(a,b,c,d,e)}function Ub(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Mb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Sb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Mb(b,c,d)&&a.matches(b)&&e.add(b),Sb(a,b,c,d,e)}function Rb(a){if(a instanceof M){if(8==a.l)return"!";if(a.l===m)return"*"}return a.getName()};function L(){this.m=this.i=m;this.A=0}function Vb(a){this.o=a;this.next=this.u=m}function Wb(a,b){if(a.i){if(!b.i)return a}else return b;for(var c=a.i,d=b.i,e=m,f=m,g=0;c&&d;)c.o==d.o||c.o instanceof Gb&&d.o instanceof Gb&&c.o.e==d.o.e?(f=c,c=c.next,d=d.next):0<jb(c.o,d.o)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.A=g;return a} -L.prototype.unshift=function(a){a=new Vb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.A++};L.prototype.add=function(a){a=new Vb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.A++};function Xb(a){return(a=a.i)?a.o:m}L.prototype.p=q("A");function Yb(a){return(a=Xb(a))?K(a):""}function Zb(a,b){return new $b(a,!!b)}function $b(a,b){this.ka=a;this.R=(this.v=b)?a.m:a.i;this.M=m} -$b.prototype.next=function(){var a=this.R;if(a==m)return m;var b=this.M=a;this.R=this.v?a.u:a.next;return b.o};$b.prototype.remove=function(){var a=this.ka,b=this.M;b||h(Error("Next must be called at least once before remove."));var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.A--;this.M=m};function N(a){this.h=a;this.j=this.q=p;this.B=m}N.prototype.f=q("q");function ac(a,b){a.q=b}function bc(a,b){a.j=b}N.prototype.s=q("B");function O(a,b){var c=a.evaluate(b);return c instanceof L?+Yb(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof L?Yb(c):""+c}function cc(a,b){var c=a.evaluate(b);return c instanceof L?!!c.p():!!c};function dc(a,b,c){N.call(this,a.h);this.P=a;this.W=b;this.aa=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.P==ec&&(!c.j&&!c.f()&&4!=c.h&&0!=c.h&&b.s()?this.B={name:b.s().name,w:c}:!b.j&&(!b.f()&&4!=b.h&&0!=b.h&&c.s())&&(this.B={name:c.s().name,w:b}))}u(dc,N); -function fc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof L&&c instanceof L){f=Zb(b);for(b=f.next();b;b=f.next()){e=Zb(c);for(d=e.next();d;d=e.next())if(a(K(b),K(d)))return l}return p}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=Zb(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+K(d);break;case "boolean":f=!!K(d);break;case "string":f=K(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return p}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}dc.prototype.evaluate=function(a){return this.P.n(this.W,this.aa,a)};dc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.P+"\n";a+=" ";b+=this.W.toString(a)+"\n";return b+=this.aa.toString(a)};function gc(a,b,c,d){this.ma=a;this.Z=b;this.h=c;this.n=d}gc.prototype.toString=q("ma");var hc={}; -function Q(a,b,c,d){a in hc&&h(Error("Binary operator already created: "+a));a=new gc(a,b,c,d);return hc[a.toString()]=a}Q("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});Q("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});Q("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});Q("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});Q("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});Q("<",4,2,function(a,b,c){return fc(function(a,b){return a<b},a,b,c)}); -Q(">",4,2,function(a,b,c){return fc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return fc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return fc(function(a,b){return a>=b},a,b,c)});var ec=Q("=",3,2,function(a,b,c){return fc(function(a,b){return a==b},a,b,c,l)});Q("!=",3,2,function(a,b,c){return fc(function(a,b){return a!=b},a,b,c,l)});Q("and",2,2,function(a,b,c){return cc(a,c)&&cc(b,c)});Q("or",1,2,function(a,b,c){return cc(a,c)||cc(b,c)});function ic(a,b){b.p()&&4!=a.h&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.h);this.$=a;this.d=b;this.q=a.f();this.j=a.j}u(ic,N);ic.prototype.evaluate=function(a){a=this.$.evaluate(a);return jc(this.d,a)};ic.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.$.toString(a);return b+=this.d.toString(a)};function kc(a,b){b.length<a.Y&&h(Error("Function "+a.k+" expects at least"+a.Y+" arguments, "+b.length+" given"));a.N!==m&&b.length>a.N&&h(Error("Function "+a.k+" expects at most "+a.N+" arguments, "+b.length+" given"));a.la&&x(b,function(b,d){4!=b.h&&h(Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b))});N.call(this,a.h);this.D=a;this.J=b;ac(this,a.q||ma(b,function(a){return a.f()}));bc(this,a.ja&&!b.length||a.ia&&!!b.length||ma(b,function(a){return a.j}))}u(kc,N); -kc.prototype.evaluate=function(a){return this.D.n.apply(m,pa(a,this.J))};kc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.D+"\n";b+=" ";this.J.length&&(a+=b+"Arguments:",b+=" ",a=la(this.J,function(a,d){return a+"\n"+d.toString(b)},a));return a};function lc(a,b,c,d,e,f,g,n,v){this.k=a;this.h=b;this.q=c;this.ja=d;this.ia=e;this.n=f;this.Y=g;this.N=s(n)?n:g;this.la=!!v}lc.prototype.toString=q("k");var mc={}; -function R(a,b,c,d,e,f,g,n){a in mc&&h(Error("Function already created: "+a+"."));mc[a]=new lc(a,b,c,d,p,e,f,g,n)}R("boolean",2,p,p,function(a,b){return cc(b,a)},1);R("ceiling",1,p,p,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,p,p,function(a,b){var c=qa(arguments,1);return la(c,function(b,c){return b+P(c,a)},"")},2,m);R("contains",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,p,p,function(a,b){return b.evaluate(a).p()},1,1,l);R("false",2,p,p,aa(p),0); -R("floor",1,p,p,function(a,b){return Math.floor(O(b,a))},1);R("id",4,p,p,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return na(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!oa(f,a)&&f.push(a)});f.sort(jb);var g=new L;x(f,function(a){g.add(a)});return g},1);R("lang",2,p,p,aa(p),1); -R("last",1,l,p,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.m},0);R("local-name",3,p,l,function(a,b){var c=b?Xb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,l);R("name",3,p,l,function(a,b){var c=b?Xb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,l);R("namespace-uri",3,l,p,aa(""),0,1,l);R("normalize-space",3,p,l,function(a,b){return(b?P(b,a):K(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,p,p,function(a,b){return!cc(b,a)},1);R("number",1,p,l,function(a,b){return b?O(b,a):+K(a.e)},0,1);R("position",1,l,p,function(a){return a.na},0);R("round",1,p,p,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,p,p,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,p,l,function(a,b){return b?P(b,a):K(a.e)},0,1);R("string-length",1,p,l,function(a,b){return(b?P(b,a):K(a.e)).length},0,1); -R("substring",3,p,p,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,p,p,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,p,p,function(a,b){for(var c=Zb(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+K(e);return d},1,1,l);R("translate",3,p,p,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);R("true",2,p,p,aa(l),0);function M(a,b){this.ca=a;this.X=s(b)?b:m;this.l=m;switch(a){case "comment":this.l=8;break;case "text":this.l=eb;break;case "processing-instruction":this.l=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function nc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.matches=function(a){return this.l===m||this.l==a.nodeType};M.prototype.getName=q("ca"); -M.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.ca;this.X===m||(b+="\n"+this.X.toString(a+" "));return b};function oc(a){N.call(this,3);this.ba=a.substring(1,a.length-1)}u(oc,N);oc.prototype.evaluate=q("ba");oc.prototype.toString=function(a){return(a||"")+"literal: "+this.ba};function Qb(a){this.k=a.toLowerCase()}Qb.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.k||this.k==a.nodeName.toLowerCase()?l:this.k==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};Qb.prototype.getName=q("k");Qb.prototype.toString=function(a){return(a||"")+"nametest: "+this.k};function pc(a){N.call(this,1);this.da=a}u(pc,N);pc.prototype.evaluate=q("da");pc.prototype.toString=function(a){return(a||"")+"number: "+this.da};function qc(a,b){N.call(this,a.h);this.U=a;this.C=b;this.q=a.f();this.j=a.j;if(1==this.C.length){var c=this.C[0];!c.L&&c.r==rc&&(c=c.I,"*"!=c.getName()&&(this.B={name:c.getName(),w:m}))}}u(qc,N);function sc(){N.call(this,4)}u(sc,N);sc.prototype.evaluate=function(a){var b=new L;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};sc.prototype.toString=function(a){return a+"RootHelperExpr"};function tc(){N.call(this,4)}u(tc,N);tc.prototype.evaluate=function(a){var b=new L;b.add(a.e);return b}; -tc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -qc.prototype.evaluate=function(a){var b=this.U.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));a=this.C;for(var c=0,d=a.length;c<d&&b.p();c++){var e=a[c],f=Zb(b,e.r.v),g;if(!e.f()&&e.r==uc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Eb(g))}else if(!e.f()&&e.r==vc)g=f.next(),b=e.evaluate(new Eb(g));else{g=f.next();for(b=e.evaluate(new Eb(g));(g=f.next())!=m;)g=e.evaluate(new Eb(g)),b=Wb(b,g)}}return b}; -qc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.U.toString(b);this.C.length&&(c+=b+"Steps:\n",b+=" ",x(this.C,function(a){c+=a.toString(b)}));return c};function wc(a,b){this.d=a;this.v=!!b}function jc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=Zb(b),f=b.p(),g,n=0;g=e.next();n++){var v=a.v?f-n:n+1;g=d.evaluate(new Eb(g,v,f));var w;"number"==typeof g?w=v==g:"string"==typeof g||"boolean"==typeof g?w=!!g:g instanceof L?w=0<g.p():h(Error("Predicate.evaluate returned an unexpected type."));w||e.remove()}return b}wc.prototype.s=function(){return 0<this.d.length?this.d[0].s():m}; -wc.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return l}return p};wc.prototype.p=function(){return this.d.length};wc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return la(this.d,function(a,d){return a+"\n"+b+d.toString(b)},a)};function xc(a,b,c,d){N.call(this,4);this.r=a;this.I=b;this.d=c||new wc([]);this.L=!!d;b=this.d.s();a.pa&&b&&(a=b.name,a=I?a.toLowerCase():a,this.B={name:a,w:b.w});this.q=this.d.f()}u(xc,N); -xc.prototype.evaluate=function(a){var b=a.e,c=m,c=this.s(),d=m,e=m,f=0;c&&(d=c.name,e=c.w?P(c.w,a):m,f=1);if(this.L)if(!this.f()&&this.r==yc)c=Nb(this.I,b,d,e),c=jc(this.d,c,f);else if(a=Zb((new xc(zc,new M("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);(b=a.next())!=m;)c=Wb(c,this.n(b,d,e,f));else c=new L;else c=this.n(a.e,d,e,f);return c};xc.prototype.n=function(a,b,c,d){a=this.r.D(this.I,a,b,c);return a=jc(this.d,a,d)}; -xc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.L?"//":"/")+"\n";this.r.k&&(b+=a+"Axis: "+this.r+"\n");b+=this.I.toString(a);if(this.d.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.d.length;c++)var d=c<this.d.length-1?", ":"",b=b+(this.d[c].toString(a)+d);return b};function Ac(a,b,c,d){this.k=a;this.D=b;this.v=c;this.pa=d}Ac.prototype.toString=q("k");var Bc={}; -function S(a,b,c,d){a in Bc&&h(Error("Axis already created: "+a));b=new Ac(a,b,c,!!d);return Bc[a]=b}S("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);S("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var rc=S("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&I)return c.add(new Gb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.l===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)I?g.nodeValue&&c.add(Hb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(I?g.nodeValue&&c.add(Hb(b,g,b.sourceIndex)):c.add(g));return c},p),yc=S("child",function(a,b,c,d,e){return(I?Tb:Ub).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new L)},p,l); -S("descendant",Nb,p,l);var zc=S("descendant-or-self",function(a,b,c,d){var e=new L;Mb(b,c,d)&&a.matches(b)&&e.add(b);return Nb(a,b,c,d,e)},p,l),uc=S("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)Mb(f,c,d)&&a.matches(f)&&e.add(f),e=Nb(a,f,c,d,e);while(b=b.parentNode);return e},p,l);S("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},p);S("namespace",function(){return new L},p); -var Cc=S("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},p),vc=S("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,n=f.length;g<n;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var w=0,D=v.length;w<D;w++)b=v[w],Mb(b,c,d)&&a.matches(b)&&e.add(b),e=Nb(a,b,c,d,e)}return e},l,l); -S("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Dc=S("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},p);function Ec(a){N.call(this,1);this.T=a;this.q=a.f();this.j=a.j}u(Ec,N);Ec.prototype.evaluate=function(a){return-O(this.T,a)};Ec.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.T.toString(a+" ")};function Fc(a){N.call(this,4);this.G=a;ac(this,ma(this.G,function(a){return a.f()}));bc(this,ma(this.G,function(a){return a.j}))}u(Fc,N);Fc.prototype.evaluate=function(a){var b=new L;x(this.G,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=Wb(b,c)});return b};Fc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.G,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Gc(a){this.a=a}function Hc(a){for(var b,c=[];;){T(a,"Missing right hand side of binary expression.");b=Ic(a);var d=a.a.next();if(!d)break;var e=(d=hc[d]||m)&&d.Z;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Z;)b=new dc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new dc(c.pop(),c.pop(),b);return b}function T(a,b){a.a.empty()&&h(Error(b))}function Jc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Kc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Lc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new oc(a)}function Mc(a){return"*"!=J(a.a)&&":"==J(a.a,1)&&"*"==J(a.a,2)?new Qb(a.a.next()+a.a.next()+a.a.next()):new Qb(a.a.next())} -function Nc(a){var b,c=[],d;if("/"==J(a.a)||"//"==J(a.a)){b=a.a.next();d=J(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new sc;d=new sc;T(a,"Missing next location step.");b=Oc(a,b);c.push(b)}else{a:{b=J(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Hc(a);T(a,'unclosed "("');Jc(a,")");break;case '"':case "'":b=Lc(a);break;default:if(isNaN(+b))if(!nc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==J(a.a,1)){b=a.a.next();b=mc[b]||m;a.a.next();for(d=[];")"!=J(a.a);){T(a,"Missing function argument list.");d.push(Hc(a));if(","!=J(a.a))break;a.a.next()}T(a,"Unclosed function argument list.");Kc(a);b=new kc(b,d)}else{b=m;break a}else b=new pc(+a.a.next())}"["==J(a.a)&&(d=new wc(Pc(a)),b=new ic(b,d))}if(b)if("/"==J(a.a)||"//"==J(a.a))d=b;else return b;else b=Oc(a,"/"),d=new tc,c.push(b)}for(;"/"==J(a.a)||"//"==J(a.a);)b=a.a.next(),T(a,"Missing next location step."),b=Oc(a,b),c.push(b);return new qc(d, -c)} -function Oc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==J(a.a))return d=new xc(Dc,new M("node")),a.a.next(),d;if(".."==J(a.a))return d=new xc(Cc,new M("node")),a.a.next(),d;var f;"@"==J(a.a)?(f=rc,a.a.next(),T(a,"Missing attribute name")):"::"==J(a.a,1)?(/(?![0-9])[\w]/.test(J(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Bc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),T(a,"Missing node name")):f=yc;e=J(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==J(a.a, -1)){nc(e)||h(Error("Invalid node type: "+e));c=a.a.next();nc(c)||h(Error("Invalid type name: "+c));Jc(a,"(");T(a,"Bad nodetype");e=J(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Lc(a);T(a,"Bad nodetype");Kc(a);c=new M(c,g)}else c=Mc(a);else"*"==e?c=Mc(a):h(Error("Bad token: "+a.a.next()));e=new wc(Pc(a),f.v);return d||new xc(f,c,e,"//"==b)} -function Pc(a){for(var b=[];"["==J(a.a);){a.a.next();T(a,"Missing predicate expression.");var c=Hc(a);b.push(c);T(a,"Unclosed predicate expression.");Jc(a,"]")}return b}function Ic(a){if("-"==J(a.a))return a.a.next(),new Ec(Ic(a));var b=Nc(a);if("|"!=J(a.a))a=b;else{for(b=[b];"|"==a.a.next();)T(a,"Missing next union location path."),b.push(Nc(a));a.a.back();a=new Fc(b)}return a};function Qc(a){a.length||h(Error("Empty XPath expression."));a=Jb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Hc(new Gc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Eb(a));return new W(e,d)}} -function W(a,b){0==b&&(a instanceof L?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof L))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?Yb(a):""+a;break;case 1:this.numberValue=a instanceof L?+Yb(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.p():!!a;break;case 4:case 5:case 6:case 7:var d=Zb(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Gb?e.e:e);this.snapshotLength=a.p();this.invalidIteratorState=p;break;case 8:case 9:d=Xb(a);this.singleNodeValue=d instanceof Gb?d.e:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function Rc(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=W,b.evaluate=function(a,b,e,f){return(new Qc(a)).evaluate(b,f)},b.createExpression=function(a){return new Qc(a)})};var X={};X.fa=function(){var a={ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();X.n=function(a,b,c){var d=G(a);(A||Bb)&&Rc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.fa;return A&&!Wa(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -X.K=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};X.oa=function(a,b){var c=function(){var c=X.n(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||X.K(c,a);return c}; -X.qa=function(a,b){var c=function(){var c=X.n(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&X.K(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){X.K(b,a)});return c};function Sc(a){return(a=a.exec(Ia()))?a[1]:""}var Tc=function(){if(xb)return Sc(/Firefox\/([0-9.]+)/);if(A||z)return Pa;if(Cb)return Sc(/Chrome\/([0-9.]+)/);if(Db)return Sc(/Version\/([0-9.]+)/);if(zb||Ab){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ia());if(a)return a[1]+"."+a[2]}else{if(Bb)return(a=Sc(/Android\s+([0-9.]+)/))?a:Sc(/Version\/([0-9.]+)/);if(yb)return Sc(/Camino\/([0-9.]+)/)}return""}();var Uc,Vc;function Wc(a){return Xc?Uc(a):A?0<=ga(Xa,a):Wa(a)}function Yc(a){Xc?Vc(a):Bb?ga(Zc,a):ga(Tc,a)} -var Xc=function(){if(!B)return p;var a=r.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}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;Uc=function(a){return 0<=d.ha(e,""+a)};Vc=function(a){d.ha(f,""+a)};return l}(),$c;if(Bb){var ad=/Android\s+([0-9\.]+)/.exec(Ia());$c=ad?ad[1]:"0"}else $c="0"; -var Zc=$c,bd=A&&!E(8),cd=A&&!E(9),dd=A&&!E(10);Bb&&Yc(2.3);!z&&(!C||Wc("533"));function ed(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function fd(a,b){return ed(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function gd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function hd(a){if(A&&!E(8))return a.offsetParent;var b=G(a),c=fd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=fd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function id(a){var b=new F;if(1==a.nodeType){if(a.getBoundingClientRect){var c=gd(a);b.x=c.left;b.y=c.top}else{c=pb(fb(a));var d,e=G(a),f=fd(a,"position"),g=B&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),n=new F(0,0),v;d=e?G(e):document;if(v=A)if(v=!E(9))v="CSS1Compat"!=fb(d).S.compatMode;v=v?d.body:d.documentElement;if(a!=v)if(a.getBoundingClientRect)d=gd(a),e=pb(fb(e)),n.x=d.left+e.x,n.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(v),n.x=d.screenX-e.screenX,n.y=d.screenY-e.screenY;else{g=a;do{n.x+=g.offsetLeft;n.y+=g.offsetTop;g!=a&&(n.x+=g.clientLeft||0,n.y+=g.clientTop||0);if(C&&"fixed"==fd(g,"position")){n.x+=e.body.scrollLeft;n.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(z||C&&"absolute"==f)n.y-=e.body.offsetTop;for(g=a;(g=hd(g))&&g!=e.body&&g!=v;)if(n.x-=g.scrollLeft,!z||"TR"!=g.tagName)n.y-=g.scrollTop}b.x=n.x-c.x;b.y=n.y-c.y}if(B&&!Wa(12)){var w;A?w="-ms-transform": -C?w="-webkit-transform":z?w="-o-transform":B&&(w="-moz-transform");var D;w&&(D=fd(a,w));D||(D=fd(a,"transform"));D?(a=D.match(jd),a=!a?new F(0,0):new F(parseFloat(a[1]),parseFloat(a[2]))):a=new F(0,0);b=new F(b.x+a.x,b.y+a.y)}}else w="function"==ba(a.V),D=a,a.targetTouches?D=a.targetTouches[0]:w&&a.V().targetTouches&&(D=a.V().targetTouches[0]),b.x=D.clientX,b.y=D.clientY;return b} -function kd(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=gd(a),new ab(a.right-a.left,a.bottom-a.top)):new ab(b,c)}var jd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var ld=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function md(a){var b=[];x(a.split(ld),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b} -function nd(a){var b;b="usemap";return"style"==b?md(a.style.cssText):bd&&"value"==b&&Y(a,"INPUT")?a.value:cd&&a[b]===l?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:m}function od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:m} -function Z(a,b){var c=ha(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=cd?"styleFloat":"cssFloat";c=ed(a,c)||pd(a,c);if(c===m)c=m;else if(oa(sa,b)&&(va.test("#"==c.charAt(0)?c:"#"+c)||za(c).length||ra&&ra[c.toLowerCase()]||xa(c).length)){var d=xa(c);if(!d.length){a:if(d=za(c),!d.length){d=ra[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(va.test(d)&&(d=ua(d),d=ua(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function pd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=od(a))?pd(c,b):m} -function qd(a){if("function"==ba(a.getBBox)&&!Y(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=Z(a,"overflow")?a=l:(a=od(a),!a||!Y(a,"HTML")?a=l:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||fa).document;a=b.documentElement;var d=b.body;d||h(new y(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth, -a.offsetWidth,d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new ab(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new ab(a.clientWidth,a.clientHeight);return a}if("none"!=fd(a,"display"))a=kd(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=kd(a);b.display=d;b.position=f;b.visibility=e}return a} -function rd(a,b){function c(a){if("none"==Z(a,"display"))return p;a=od(a);return!a||c(a)}function d(a){var b=qd(a);return 0<b.height&&0<b.width?l:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):ma(a.childNodes,function(b){return b.nodeType==eb&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a,b){var c;if((c=b==m?hb(a):hb(b))&&("hidden"==Z(c,"overflow-x")||"hidden"==Z(c,"overflow-y"))){var d=qd(c),f=id(c),g=id(a);return f.x+d.width<=g.x&&"hidden"==Z(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==Z(c,"overflow-y")?p:l}return!c||e(a,c)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=id(a),a=qd(a),0<=b.x+a.width&&0<=b.y+a.height?l:p;a=od(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=ob(a,function(a){return Y(a,"SELECT")});return!!g&&rd(g,l)}if(Y(a,"MAP")){if(!a.name)return p;g=G(a);g= -g.evaluate?X.oa('/descendant::*[@usemap = "#'+a.name+'"]',g):mb(g,function(b){return Y(b)&&nd(b)=="#"+a.name});return!!g&&rd(g,b)}return Y(a,"AREA")?(g=ob(a,function(a){return Y(a,"MAP")}),!!g&&rd(g,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==sd(a)||!d(a)||!e(a,m)?p:f(a)} -function sd(a){if(dd){if("relative"==Z(a,"position"))return 1;a=Z(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return td(a)}function td(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=od(a))&&(b*=td(a));return b};C||z||Xc&&Yc(3.6);A&&Wc(10);Bb&&Yc(4);function ud(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ud){d=vd(a);wd(a);e=[];for(c=0;c<a.g.length;c++)e.push(a.t[a.g[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ud.prototype.z=0;ud.prototype.ea=0;function vd(a){wd(a);return a.g.concat()} -ud.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.z--,this.ea++,this.g.length>2*this.z&&wd(this),l):p};function wd(a){if(a.z!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.z!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} -ud.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};ud.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.z++,this.g.push(a),this.ea++);this.t[a]=b};var xd={};function $(a,b,c){da(a)&&(a=B?a.b:z?a.opera:a.c);a=new yd(a,b,c);if(b&&(!(b in xd)||c))xd[b]={key:a,shift:p},c&&(xd[c]={key:a,shift:l});return a}function yd(a,b,c){this.code=a;this.ga=b||m;this.sa=c||this.ga}$(8);$(9);$(13);var zd=$(16),Ad=$(17),Bd=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); -$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Cd=$(Ha?{b:91,c:91,opera:219}:Ga?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -$(Ha?{b:92,c:92,opera:220}:Ga?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});$(Ha?{b:93,c:93,opera:0}:Ga?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Na?56:42},"*");$({b:107,c:107,opera:Na?61:43},"+"); -$({b:109,c:109,opera:Na?109:45},"-");$({b:110,c:110,opera:Na?190:78},".");$({b:111,c:111,opera:Na?191:47},"/");$(Na&&z?m:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Dd=new ud;Dd.set(1,zd);Dd.set(2,Ad);Dd.set(4,Bd); -Dd.set(8,Cd);(function(a){var b=new ud;x(vd(a),function(c){b.set(a.get(c).code,c)});return b})(Dd);B&&Wc(12);function Ed(){this.H=k} -function Fd(a,b,c){switch(typeof b){case "string":Gd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fd(a,a.H?a.H.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Gd(f, -c),c.push(":"),Fd(a,a.H?a.H.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Hd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Id=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Gd(a,b){b.push('"',a.replace(Id,function(a){if(a in Hd)return Hd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Hd[a]=e+b.toString(16)}),'"')};C||z||B&&Wc(3.5)||A&&Wc(8);function Jd(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ka(a,Jd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Kd(a);return b}if("document"in a)return b={},b.WINDOW=Kd(a),b;if(ca(a))return ka(a,Jd);a=bb(a,function(a,b){return"number"==typeof b||t(b)});return cb(a,Jd);default:return m}} -function Ld(a,b){return"array"==ba(a)?ka(a,function(a){return Ld(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?Md(a.ELEMENT,b):"WINDOW"in a?Md(a.WINDOW,b):cb(a,function(a){return Ld(a,b)}):a}function Nd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.O=ea());b.O||(b.O=ea());return b}function Kd(a){var b=Nd(a.ownerDocument),c=db(b,function(b){return b==a});c||(c=":wdc:"+b.O++,b[c]=a);return c} -function Md(a,b){a=decodeURIComponent(a);var c=b||document,d=Nd(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function Od(a){var b=rd;a=[a,l];var c=window||fa,d;try{var b=t(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Ld(a,c.document),f=b.apply(m,e);d={status:0,value:Jd(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}b=[];Fd(new Ed,d,b);return b.join("")}var Pd=["_"],Qd=r;!(Pd[0]in Qd)&&Qd.execScript&&Qd.execScript("var "+Pd[0]);for(var Rd;Pd.length&&(Rd=Pd.shift());)!Pd.length&&s(Od)?Qd[Rd]=Od:Qd=Qd[Rd]?Qd[Rd]:Qd[Rd]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var va="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),wa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,za=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Aa(a,b){this.code=a;this.state=Ba[a]||Ha;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(Aa,Error); +var Ha="unknown error",Ba={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ba[13]=Ha;Ba[9]="unknown command";Aa.prototype.toString=function(){return this.name+": "+this.message};var Ia,Ja,Ka,La,Ma,Na;function Oa(){return n.navigator?n.navigator.userAgent:null}La=Ka=Ja=Ia=!1;var Pa;if(Pa=Oa()){var Qa=n.navigator;Ia=0==Pa.indexOf("Opera");Ja=!Ia&&-1!=Pa.indexOf("MSIE");Ka=!Ia&&-1!=Pa.indexOf("WebKit");La=!Ia&&!Ka&&"Gecko"==Qa.product}var v=Ia,w=Ja,x=La,Ra=Ka,Sa,Ta=n.navigator;Sa=Ta&&Ta.platform||"";Ma=-1!=Sa.indexOf("Mac");Na=-1!=Sa.indexOf("Win");var Ua=-1!=Sa.indexOf("Linux");function Va(){var a=n.document;return a?a.documentMode:void 0}var Wa; +a:{var Xa="",Ya;if(v&&n.opera)var Za=n.opera.version,Xa="function"==typeof Za?Za():Za;else if(x?Ya=/rv\:([^\);]+)(\)|;)/:w?Ya=/MSIE\s+([^\);]+)(\)|;)/:Ra&&(Ya=/WebKit\/(\S+)/),Ya)var $a=Ya.exec(Oa()),Xa=$a?$a[1]:"";if(w){var ab=Va();if(ab>parseFloat(Xa)){Wa=String(ab);break a}}Wa=Xa}var bb={};function cb(a){return bb[a]||(bb[a]=0<=ia(Wa,a))}var db=n.document,eb=db&&w?Va()||("CSS1Compat"==db.compatMode?parseInt(Wa,10):5):void 0;!x&&!w||w&&w&&9<=eb||x&&cb("1.9.1");w&&cb("9");function fb(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}fb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};fb.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};fb.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};fb.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function gb(a,b){this.width=a;this.height=b}gb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};gb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};gb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};gb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function hb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ib(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function jb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var kb=3;function lb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new gb(a.clientWidth,a.clientHeight)}function mb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function nb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=eb)){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?ob(a,b):!c&&mb(e,b)?-1*pb(a,b):!d&&mb(f,a)?pb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=y(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function pb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return ob(d,a)}function ob(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function y(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function qb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function rb(a){this.ja=a||n.document||document}rb.prototype.contains=mb;var sb,tb,ub,vb,wb,xb,yb;yb=xb=wb=vb=ub=tb=sb=!1;var z=Oa();z&&(-1!=z.indexOf("Firefox")?sb=!0:-1!=z.indexOf("Camino")?tb=!0:-1!=z.indexOf("iPhone")||-1!=z.indexOf("iPod")?ub=!0:-1!=z.indexOf("iPad")?vb=!0:-1!=z.indexOf("Android")?wb=!0:-1!=z.indexOf("Chrome")?xb=!0:-1!=z.indexOf("Safari")&&(yb=!0));var zb=sb,Ab=tb,Bb=ub,Cb=vb,Db=wb,Eb=xb,Fb=yb;function Gb(a,b,c){this.e=a;this.qa=b||1;this.m=c||1};var A=w&&!(w&&9<=eb),Hb=w&&!(w&&8<=eb);function Ib(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ua=e;this.parentNode=b}function Jb(a,b,c){var d=Hb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Ib(b,a,b.nodeName,d,c)};function Kb(a){this.S=a;this.G=0}function Lb(a){a=a.match(Mb);for(var b=0;b<a.length;b++)Nb.test(a[b])&&a.splice(b,1);return new Kb(a)}var Mb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Nb=/^\s/;function B(a,b){return a.S[a.G+(b||0)]}Kb.prototype.next=function(){return this.S[this.G++]};Kb.prototype.back=function(){this.G--};Kb.prototype.empty=function(){return this.S.length<=this.G};function C(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(A&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),A&&"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} +function D(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Hb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ob(a,b,c,d,e){return(A?Pb:Qb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new E)} +function Pb(a,b,c,d,e){if(a instanceof Rb||8==a.l||c&&null===a.l){var f=b.all;if(!f)return e;a=Sb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],q=0;b=f[q++];)D(b,c,d)&&g.push(b);f=g}for(q=0;b=f[q++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Tb(a,b,c,d,e);return e} +function Qb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof F?Tb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){D(a,c,d)&&e.add(a)}));return e} +function Ub(a,b,c,d,e){var f;if((a instanceof Rb||8==a.l||c&&null===a.l)&&(f=b.childNodes)){var g=Sb(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return D(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return Vb(a,b,c,d,e)}function Vb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Tb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b),Tb(a,b,c,d,e)}function Sb(a){if(a instanceof F){if(8==a.l)return"!";if(null===a.l)return"*"}return a.getName()};function E(){this.m=this.i=null;this.B=0}function Wb(a){this.p=a;this.next=this.u=null}function Xb(a,b){if(!a.i)return b;if(!b.i)return a;for(var c=a.i,d=b.i,e=null,f=null,g=0;c&&d;)c.p==d.p||c.p instanceof Ib&&d.p instanceof Ib&&c.p.e==d.p.e?(f=c,c=c.next,d=d.next):0<nb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.B=g;return a} +E.prototype.unshift=function(a){a=new Wb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.B++};E.prototype.add=function(a){a=new Wb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.B++};function Yb(a){return(a=a.i)?a.p:null}E.prototype.o=h("B");function Zb(a){return(a=Yb(a))?C(a):""}function G(a,b){return new $b(a,!!b)}function $b(a,b){this.ma=a;this.T=(this.v=b)?a.m:a.i;this.N=null} +$b.prototype.next=function(){var a=this.T;if(null==a)return null;var b=this.N=a;this.T=this.v?a.u:a.next;return b.p};$b.prototype.remove=function(){var a=this.ma,b=this.N;if(!b)throw Error("Next must be called at least once before remove.");var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.B--;this.N=null};function H(a){this.h=a;this.j=this.q=!1;this.C=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.f=h("q");function ac(a,b){a.q=b}function bc(a,b){a.j=b}H.prototype.s=h("C");function J(a,b){var c=a.evaluate(b);return c instanceof E?+Zb(c):+c}function K(a,b){var c=a.evaluate(b);return c instanceof E?Zb(c):""+c}function cc(a,b){var c=a.evaluate(b);return c instanceof E?!!c.o():!!c};function dc(a,b,c){H.call(this,a.h);this.R=a;this.X=b;this.ba=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.R==ec&&(c.j||c.f()||4==c.h||0==c.h||!b.s()?b.j||(b.f()||4==b.h||0==b.h||!c.s())||(this.C={name:c.s().name,w:b}):this.C={name:b.s().name,w:c})}s(dc,H); +function fc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof E&&c instanceof E){e=G(b);for(d=e.next();d;d=e.next())for(b=G(c),f=b.next();f;f=b.next())if(a(C(d),C(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?e=b:(e=c,c=b);e=G(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+C(d);break;case "boolean":d=!!C(d);break;case "string":d=C(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}dc.prototype.evaluate=function(a){return this.R.n(this.X,this.ba,a)};dc.prototype.toString=function(){var a="Binary Expression: "+this.R,a=a+I(this.X);return a+=I(this.ba)};function gc(a,b,c,d){this.pa=a;this.$=b;this.h=c;this.n=d}gc.prototype.toString=h("pa");var hc={}; +function L(a,b,c,d){if(hc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new gc(a,b,c,d);return hc[a.toString()]=a}L("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});L("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});L("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});L("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});L("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});L("<",4,2,function(a,b,c){return fc(function(a,b){return a<b},a,b,c)}); +L(">",4,2,function(a,b,c){return fc(function(a,b){return a>b},a,b,c)});L("<=",4,2,function(a,b,c){return fc(function(a,b){return a<=b},a,b,c)});L(">=",4,2,function(a,b,c){return fc(function(a,b){return a>=b},a,b,c)});var ec=L("=",3,2,function(a,b,c){return fc(function(a,b){return a==b},a,b,c,!0)});L("!=",3,2,function(a,b,c){return fc(function(a,b){return a!=b},a,b,c,!0)});L("and",2,2,function(a,b,c){return cc(a,c)&&cc(b,c)});L("or",1,2,function(a,b,c){return cc(a,c)||cc(b,c)});function ic(a,b){if(b.o()&&4!=a.h)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.h);this.aa=a;this.d=b;this.q=a.f();this.j=a.j}s(ic,H);ic.prototype.evaluate=function(a){a=this.aa.evaluate(a);return jc(this.d,a)};ic.prototype.toString=function(){var a;a="Filter:"+I(this.aa);return a+=I(this.d)};function kc(a,b){if(b.length<a.Z)throw Error("Function "+a.k+" expects at least"+a.Z+" arguments, "+b.length+" given");if(null!==a.O&&b.length>a.O)throw Error("Function "+a.k+" expects at most "+a.O+" arguments, "+b.length+" given");a.na&&t(b,function(b,d){if(4!=b.h)throw Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b);});H.call(this,a.h);this.F=a;this.K=b;ac(this,a.q||oa(b,function(a){return a.f()}));bc(this,a.la&&!b.length||a.ka&&!!b.length||oa(b,function(a){return a.j}))} +s(kc,H);kc.prototype.evaluate=function(a){return this.F.n.apply(null,sa(a,this.K))};kc.prototype.toString=function(){var a="Function: "+this.F;if(this.K.length)var b=na(this.K,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function lc(a,b,c,d,e,f,g,q,u){this.k=a;this.h=b;this.q=c;this.la=d;this.ka=e;this.n=f;this.Z=g;this.O=void 0!==q?q:g;this.na=!!u}lc.prototype.toString=h("k");var mc={}; +function M(a,b,c,d,e,f,g,q){if(mc.hasOwnProperty(a))throw Error("Function already created: "+a+".");mc[a]=new lc(a,b,c,d,!1,e,f,g,q)}M("boolean",2,!1,!1,function(a,b){return cc(b,a)},1);M("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);M("concat",3,!1,!1,function(a,b){var c=ta(arguments,1);return na(c,function(b,c){return b+K(c,a)},"")},2,null);M("contains",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2); +M("count",1,!1,!1,function(a,b){return b.evaluate(a).o()},1,1,!0);M("false",2,!1,!1,k(!1),0);M("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); +M("id",4,!1,!1,function(a,b){function c(a){if(A){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return qa(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=K(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!ra(f,a)&&f.push(a)});f.sort(nb);var g=new E;t(f,function(a){g.add(a)});return g},1);M("lang",2,!1,!1,k(!1),1); +M("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.m},0);M("local-name",3,!1,!0,function(a,b){var c=b?Yb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);M("name",3,!1,!0,function(a,b){var c=b?Yb(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);M("namespace-uri",3,!0,!1,k(""),0,1,!0);M("normalize-space",3,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +M("not",2,!1,!1,function(a,b){return!cc(b,a)},1);M("number",1,!1,!0,function(a,b){return b?J(b,a):+C(a.e)},0,1);M("position",1,!0,!1,function(a){return a.qa},0);M("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);M("starts-with",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return 0==b.lastIndexOf(a,0)},2);M("string",3,!1,!0,function(a,b){return b?K(b,a):C(a.e)},0,1);M("string-length",1,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).length},0,1); +M("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);M("substring-after",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +M("substring-before",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);M("sum",1,!1,!1,function(a,b){for(var c=G(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+C(e);return d},1,1,!0);M("translate",3,!1,!1,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(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);M("true",2,!1,!1,k(!0),0);function F(a,b){this.da=a;this.Y=void 0!==b?b:null;this.l=null;switch(a){case "comment":this.l=8;break;case "text":this.l=kb;break;case "processing-instruction":this.l=7;break;case "node":break;default:throw Error("Unexpected argument");}}function nc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}F.prototype.matches=function(a){return null===this.l||this.l==a.nodeType};F.prototype.getName=h("da"); +F.prototype.toString=function(){var a="Kind Test: "+this.da;null===this.Y||(a+=I(this.Y));return a};function oc(a){H.call(this,3);this.ca=a.substring(1,a.length-1)}s(oc,H);oc.prototype.evaluate=h("ca");oc.prototype.toString=function(){return"Literal: "+this.ca};function Rb(a,b){this.k=a.toLowerCase();this.P=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Rb.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.k&&this.k!=a.nodeName.toLowerCase()?!1:this.P==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Rb.prototype.getName=h("k");Rb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.P?"":this.P+":")+this.k};function pc(a){H.call(this,1);this.ea=a}s(pc,H);pc.prototype.evaluate=h("ea");pc.prototype.toString=function(){return"Number: "+this.ea};function qc(a,b){H.call(this,a.h);this.V=a;this.D=b;this.q=a.f();this.j=a.j;if(1==this.D.length){var c=this.D[0];c.M||c.r!=rc||(c=c.J,"*"!=c.getName()&&(this.C={name:c.getName(),w:null}))}}s(qc,H);function sc(){H.call(this,4)}s(sc,H);sc.prototype.evaluate=function(a){var b=new E;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};sc.prototype.toString=k("Root Helper Expression");function tc(){H.call(this,4)}s(tc,H);tc.prototype.evaluate=function(a){var b=new E;b.add(a.e);return b}; +tc.prototype.toString=k("Context Helper Expression"); +qc.prototype.evaluate=function(a){var b=this.V.evaluate(a);if(!(b instanceof E))throw Error("Filter expression must evaluate to nodeset.");a=this.D;for(var c=0,d=a.length;c<d&&b.o();c++){var e=a[c],f=G(b,e.r.v),g;if(e.f()||e.r!=uc)if(e.f()||e.r!=vc)for(g=f.next(),b=e.evaluate(new Gb(g));null!=(g=f.next());)g=e.evaluate(new Gb(g)),b=Xb(b,g);else g=f.next(),b=e.evaluate(new Gb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Gb(g))}}return b}; +qc.prototype.toString=function(){var a;a="Path Expression:"+I(this.V);if(this.D.length){var b=na(this.D,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function wc(a,b){this.d=a;this.v=!!b}function jc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=G(b),f=b.o(),g,q=0;g=e.next();q++){var u=a.v?f-q:q+1;g=d.evaluate(new Gb(g,u,f));if("number"==typeof g)u=u==g;else if("string"==typeof g||"boolean"==typeof g)u=!!g;else if(g instanceof E)u=0<g.o();else throw Error("Predicate.evaluate returned an unexpected type.");u||e.remove()}return b}wc.prototype.s=function(){return 0<this.d.length?this.d[0].s():null}; +wc.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return!0}return!1};wc.prototype.o=function(){return this.d.length};wc.prototype.toString=function(){return na(this.d,function(a,b){return a+I(b)},"Predicates:")};function N(a,b,c,d){H.call(this,4);this.r=a;this.J=b;this.d=c||new wc([]);this.M=!!d;b=this.d.s();a.sa&&b&&(a=b.name,a=A?a.toLowerCase():a,this.C={name:a,w:b.w});this.q=this.d.f()}s(N,H); +N.prototype.evaluate=function(a){var b=a.e,c=null,c=this.s(),d=null,e=null,f=0;c&&(d=c.name,e=c.w?K(c.w,a):null,f=1);if(this.M)if(this.f()||this.r!=xc)if(a=G((new N(yc,new F("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);null!=(b=a.next());)c=Xb(c,this.n(b,d,e,f));else c=new E;else c=Ob(this.J,b,d,e),c=jc(this.d,c,f);else c=this.n(a.e,d,e,f);return c};N.prototype.n=function(a,b,c,d){a=this.r.F(this.J,a,b,c);return a=jc(this.d,a,d)}; +N.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.M?"//":"/"));this.r.k&&(a+=I("Axis: "+this.r));a+=I(this.J);if(this.d.o()){var b=na(this.d.d,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function zc(a,b,c,d){this.k=a;this.F=b;this.v=c;this.sa=d}zc.prototype.toString=h("k");var Ac={};function O(a,b,c,d){if(Ac.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new zc(a,b,c,!!d);return Ac[a]=b} +O("ancestor",function(a,b){for(var c=new E,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);O("ancestor-or-self",function(a,b){var c=new E,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var rc=O("attribute",function(a,b){var c=new E,d=a.getName();if("style"==d&&b.style&&A)return c.add(new Ib(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof F&&null===a.l||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)A?g.nodeValue&&c.add(Jb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(A?g.nodeValue&&c.add(Jb(b,g,b.sourceIndex)):c.add(g));return c},!1),xc=O("child",function(a,b,c,d,e){return(A?Ub:Vb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new E)},!1,!0); +O("descendant",Ob,!1,!0);var yc=O("descendant-or-self",function(a,b,c,d){var e=new E;D(b,c,d)&&a.matches(b)&&e.add(b);return Ob(a,b,c,d,e)},!1,!0),uc=O("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)D(f,c,d)&&a.matches(f)&&e.add(f),e=Ob(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);O("following-sibling",function(a,b){for(var c=new E,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);O("namespace",function(){return new E},!1); +var Bc=O("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),vc=O("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,q=f.length;g<q;g++){var u=[];for(b=f[g];b=b.previousSibling;)u.unshift(b);for(var U=0,r=u.length;U<r;U++)b=u[U],D(b,c,d)&&a.matches(b)&&e.add(b),e=Ob(a,b,c,d,e)}return e},!0,!0); +O("preceding-sibling",function(a,b){for(var c=new E,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Cc=O("self",function(a,b){var c=new E;a.matches(b)&&c.add(b);return c},!1);function Dc(a){H.call(this,1);this.U=a;this.q=a.f();this.j=a.j}s(Dc,H);Dc.prototype.evaluate=function(a){return-J(this.U,a)};Dc.prototype.toString=function(){return"Unary Expression: -"+I(this.U)};function Ec(a){H.call(this,4);this.H=a;ac(this,oa(this.H,function(a){return a.f()}));bc(this,oa(this.H,function(a){return a.j}))}s(Ec,H);Ec.prototype.evaluate=function(a){var b=new E;t(this.H,function(c){c=c.evaluate(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=Xb(b,c)});return b};Ec.prototype.toString=function(){return na(this.H,function(a,b){return a+I(b)},"Union Expression:")};function Fc(a,b){this.a=a;this.oa=b}function Gc(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=Hc(a);var d=a.a.next();if(!d)break;var e=(d=hc[d]||null)&&d.$;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].$;)b=new dc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new dc(c.pop(),c.pop(),b);return b}function Q(a,b){if(a.a.empty())throw Error(b);}function Ic(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Jc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Kc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new oc(a)}function Lc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Rb(b);var d=b.substring(0,c);a=a.oa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Rb(b,a)} +function Mc(a){var b,c=[],d;if("/"==B(a.a)||"//"==B(a.a)){b=a.a.next();d=B(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new sc;d=new sc;Q(a,"Missing next location step.");b=Nc(a,b);c.push(b)}else{a:{b=B(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Gc(a);Q(a,'unclosed "("');Ic(a,")");break;case '"':case "'":b=Kc(a);break;default:if(isNaN(+b))if(!nc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==B(a.a,1)){b=a.a.next();b=mc[b]||null;a.a.next();for(d=[];")"!=B(a.a);){Q(a,"Missing function argument list.");d.push(Gc(a));if(","!=B(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");Jc(a);b=new kc(b,d)}else{b=null;break a}else b=new pc(+a.a.next())}"["==B(a.a)&&(d=new wc(Oc(a)),b=new ic(b,d))}if(b)if("/"==B(a.a)||"//"==B(a.a))d=b;else return b;else b=Nc(a,"/"),d=new tc,c.push(b)}for(;"/"==B(a.a)||"//"==B(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=Nc(a,b),c.push(b); +return new qc(d,c)} +function Nc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==B(a.a))return d=new N(Cc,new F("node")),a.a.next(),d;if(".."==B(a.a))return d=new N(Bc,new F("node")),a.a.next(),d;var f;if("@"==B(a.a))f=rc,a.a.next(),Q(a,"Missing attribute name");else if("::"==B(a.a,1)){if(!/(?![0-9])[\w]/.test(B(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Ac[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();Q(a,"Missing node name")}else f=xc; +c=B(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==B(a.a,1)){if(!nc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!nc(c))throw Error("Invalid type name: "+c);Ic(a,"(");Q(a,"Bad nodetype");e=B(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Kc(a);Q(a,"Bad nodetype");Jc(a);c=new F(c,g)}else c=Lc(a);else if("*"==c)c=Lc(a);else throw Error("Bad token: "+a.a.next());e=new wc(Oc(a),f.v);return d||new N(f,c,e,"//"==b)} +function Oc(a){for(var b=[];"["==B(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=Gc(a);b.push(c);Q(a,"Unclosed predicate expression.");Ic(a,"]")}return b}function Hc(a){if("-"==B(a.a))return a.a.next(),new Dc(Hc(a));var b=Mc(a);if("|"!=B(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push(Mc(a));a.a.back();a=new Ec(b)}return a};function Pc(a){switch(a.nodeType){case 1:return ga(Qc,a);case 9:return Pc(a.documentElement);case 2:return a.ownerElement?Pc(a.ownerElement):Rc;case 11:case 10:case 6:case 12:return Rc;default:return a.parentNode?Pc(a.parentNode):Rc}}function Rc(){return null}function Qc(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?Qc(a.parentNode,b):null};function Sc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Lb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=fa(b.lookupNamespaceURI,b)):b=k(null);var d=Gc(new Fc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Gb(a));return new R(c,b)}} +function R(a,b){if(0==b)if(a instanceof E)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 E))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof E?Zb(a):""+a;break;case 1:this.numberValue=a instanceof E?+Zb(a):+a;break;case 3:this.booleanValue=a instanceof E?0<a.o():!!a;break;case 4:case 5:case 6:case 7:var d= +G(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Ib?e.e:e);this.snapshotLength=a.o();this.invalidIteratorState=!1;break;case 8:case 9:d=Yb(a);this.singleNodeValue=d instanceof Ib?d.e:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function Tc(a){this.lookupNamespaceURI=Pc(a)} +function Uc(a){a=a||n;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new Sc(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Sc(a,b)},b.createNSResolver=function(a){return new Tc(a)})};var S={};S.ga=function(){var a={xa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();S.n=function(a,b,c){var d=y(a);(w||Db)&&Uc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.ga;return w&&!cb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!x||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new Aa(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +S.L=function(a,b){if(!a||1!=a.nodeType)throw new Aa(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};S.ra=function(a,b){var c=function(){var c=S.n(b,a,9);return c?(c=c.singleNodeValue,v?c:c||null):b.selectSingleNode?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||S.L(c,a);return c}; +S.ta=function(a,b){var c=function(){var c=S.n(b,a,7);if(c){var e=c.snapshotLength;v&&void 0===e&&S.L(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){S.L(b,a)});return c};function Vc(a){return(a=a.exec(Oa()))?a[1]:""}var Wc=function(){if(zb)return Vc(/Firefox\/([0-9.]+)/);if(w||v)return Wa;if(Eb)return Vc(/Chrome\/([0-9.]+)/);if(Fb)return Vc(/Version\/([0-9.]+)/);if(Bb||Cb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Oa());if(a)return a[1]+"."+a[2]}else{if(Db)return(a=Vc(/Android\s+([0-9.]+)/))?a:Vc(/Version\/([0-9.]+)/);if(Ab)return Vc(/Camino\/([0-9.]+)/)}return""}();var Xc,Yc;function Zc(a){return $c?Xc(a):w?0<=ia(eb,a):cb(a)}function ad(a){$c?Yc(a):Db?ia(bd,a):ia(Wc,a)} +var $c=function(){if(!x)return!1;var a=n.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Xc=function(a){return 0<=d.ia(e,""+a)};Yc=function(a){d.ia(f,""+a)};return!0}(),cd;if(Db){var dd=/Android\s+([0-9\.]+)/.exec(Oa());cd=dd?dd[1]:"0"}else cd="0"; +var bd=cd,ed=w&&!(w&&9<=eb),fd=w&&!(w&&10<=eb);Db&&ad(2.3);Db&&ad(4);Fb&&ad(6);function gd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}gd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};gd.prototype.contains=function(a){return this&&a?a instanceof gd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +gd.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};gd.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +gd.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function T(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}T.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};T.prototype.contains=function(a){return a instanceof T?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +T.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};T.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +T.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function hd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:null} +function W(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=ed?"styleFloat":"cssFloat";var d;a:{d=c;var e=y(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||id(a,c);if(null===d)d=null;else if(ra(va,c)){b:{var f=d.match(ya);if(f){var c=Number(f[1]),e=Number(f[2]),g=Number(f[3]),f=Number(f[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g&&0<=f&&1>=f){c=[c,e,g,f];break b}}c=null}if(!c){b:{if(g= +d.match(za))if(c=Number(g[1]),e=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g){c=[c,e,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=ua[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(wa,"#$1$1$2$2$3$3")),!xa.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} +function id(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&"function"==aa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=hd(a))?id(c,b):null} +function jd(a,b){function c(a){if("none"==W(a,"display"))return!1;a=hd(a);return!a||c(a)}function d(a){var b=kd(a);return 0<b.height&&0<b.width?!0:V(a,"PATH")&&(0<b.height||0<b.width)?(a=W(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=W(a,"overflow")&&oa(a.childNodes,function(a){return a.nodeType==kb||V(a)&&d(a)})}function e(a){return ld(a)==X&&pa(a.childNodes,function(a){return!V(a)||e(a)})}if(!V(a))throw Error("Argument to isShown must be of type Element");if(V(a,"OPTION")||V(a,"OPTGROUP")){var f= +qb(a,function(a){return V(a,"SELECT")});return!!f&&jd(f,!0)}return(f=md(a))?!!f.W&&0<f.rect.width&&0<f.rect.height&&jd(f.W,b):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==nd(a)||!d(a)?!1:!e(a)}var X="hidden"; +function ld(a){function b(a){var b=W(a,"position");if("fixed"==b)return U=!0,a==g?null:g;for(a=hd(a);a&&a!=g&&(0==W(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==W(a,"position"));)a=hd(a);return a}function c(a){var b=a;if("visible"==u)if(a==g&&q)b=q;else if(a==q)return{x:"visible",y:"visible"};b={x:W(b,"overflow-x"),y:W(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==g){var b=(new rb(f)).ja;a=Ra||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=w&&cb("10")&&b.pageYOffset!=a.scrollTop?new fb(a.scrollLeft,a.scrollTop):new fb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new fb(a.scrollLeft,a.scrollTop);return a}var e=od(a),f=y(a),g=f.documentElement,q=f.body,u=W(g,"overflow"),U;for(a=b(a);a;a=b(a)){var r=c(a);if("visible"!=r.x||"visible"!=r.y){var l=kd(a);if(0==l.width||0==l.height)return X;var m=e.right<l.left,P=e.bottom<l.top;if(m&&"hidden"==r.x|| +P&&"hidden"==r.y)return X;if(m&&"visible"!=r.x||P&&"visible"!=r.y){m=d(a);P=e.bottom<l.top-m.y;if(e.right<l.left-m.x&&"visible"!=r.x||P&&"visible"!=r.x)return X;e=ld(a);return e==X?X:"scroll"}m=e.left>=l.left+l.width;l=e.top>=l.top+l.height;if(m&&"hidden"==r.x||l&&"hidden"==r.y)return X;if(m&&"visible"!=r.x||l&&"visible"!=r.y){if(U&&(r=d(a),e.left>=g.scrollWidth-r.x||e.right>=g.scrollHeight-r.y))return X;e=ld(a);return e==X?X:"scroll"}}}return"none"}var pd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function kd(a){function b(a){var c=(y(a)?y(a).parentWindow||y(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(pd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),r=parseFloat(c[3]),l=parseFloat(c[4]),m=parseFloat(c[5]),c=parseFloat(c[6]),P=f.left+f.width,Ca=f.top+f.height,Da=f.left*d,d=P*d,Ea=f.left*e,e=P*e,Fa=f.top*r,r=Ca*r,Ga=f.top*l,P=Ca*l,Ca=Da+Fa+m,l=Ea+Ga+c,Fa=d+Fa+m,Ga=e+Ga+c,Da=Da+r+m,Ea=Ea+P+c,m=d+r+m,c=e+P+c;f.left=Math.min(Ca,Fa,Da,m);f.top=Math.min(l,Ga,Ea,c);m=Math.max(Ca, +Fa,Da,m);c=Math.max(l,Ga,Ea,c);f.width=m-f.left;f.height=c-f.top}(a=hd(a))&&b(a)}var c=md(a);if(c)return c.rect;if(V(a,"HTML"))return c=y(a),a=lb((c?c.parentWindow||c.defaultView:window)||window),new T(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new T(0,0,0,0)}var f=new T(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=y(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);v&&(0==f.width&& +0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));x&&!Zc(12)&&b(a);return f} +function md(a){var b=V(a,"MAP");if(!b&&!V(a,"AREA"))return null;var c=b?a:V(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=S.ra('/descendant::*[@usemap = "#'+c.name+'"]',y(c)))&&(e=kd(d),!b&&"default"!=a.shape.toLowerCase())){var f=qd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new T(a+e.left,b+e.top,c,f)}return{W:d,rect:e||new T(0,0,0,0)}} +function qd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new T(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new T(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 T(b,c,d-b,e-c)}return new T(0,0,0,0)}function od(a){a=kd(a);return new gd(a.top,a.left+a.width,a.top+a.height,a.left)} +function nd(a){if(fd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return rd(a)}function rd(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=hd(a))&&(b*=rd(a));return b};Ra||v||$c&&ad(3.6);w&&Zc(10);Db&&ad(4);function Y(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y)for(d=sd(a),td(a),e=[],c=0;c<a.g.length;c++)e.push(a.t[a.g[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.A=0;Y.prototype.fa=0;function sd(a){td(a);return a.g.concat()} +Y.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.A--,this.fa++,this.g.length>2*this.A&&td(this),!0):!1};function td(a){if(a.A!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.A!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} +Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.A++,this.g.push(a),this.fa++);this.t[a]=b};var ud={};function Z(a,b,c){ca(a)&&(a=x?a.b:v?a.opera:a.c);a=new vd(a,b,c);!b||b in ud&&!c||(ud[b]={key:a,shift:!1},c&&(ud[c]={key:a,shift:!0}));return a}function vd(a,b,c){this.code=a;this.ha=b||null;this.va=c||this.ha}Z(8);Z(9);Z(13);var wd=Z(16),xd=Z(17),yd=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var zd=Z(Na?{b:91,c:91,opera:219}:Ma?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Na?{b:92,c:92,opera:220}:Ma?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Na?{b:93,c:93,opera:0}:Ma?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Ua?56:42},"*"); +Z({b:107,c:107,opera:Ua?61:43},"+");Z({b:109,c:109,opera:Ua?109:45},"-");Z({b:110,c:110,opera:Ua?190:78},".");Z({b:111,c:111,opera:Ua?191:47},"/");Z(Ua&&v?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Ad=new Y; +Ad.set(1,wd);Ad.set(2,xd);Ad.set(4,yd);Ad.set(8,zd);(function(a){var b=new Y;t(sd(a),function(c){b.set(a.get(c).code,c)});return b})(Ad);x&&Zc(12);function Bd(){this.I=void 0} +function Cd(a,b,c){switch(typeof b){case "string":Dd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Cd(a,a.I?a.I.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Dd(f,c),c.push(":"),Cd(a,a.I?a.I.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ed={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Dd(a,b){b.push('"',a.replace(Fd,function(a){if(a in Ed)return Ed[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ed[a]=e+b.toString(16)}),'"')};Ra||v||x&&Zc(3.5)||w&&Zc(8);function Gd(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,Gd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Hd(a);return b}if("document"in a)return b={},b.WINDOW=Hd(a),b;if(ba(a))return ma(a,Gd);a=hb(a,function(a,b){return"number"==typeof b||p(b)});return ib(a,Gd);default:return null}} +function Id(a,b){return"array"==aa(a)?ma(a,function(a){return Id(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?Jd(a.ELEMENT,b):"WINDOW"in a?Jd(a.WINDOW,b):ib(a,function(a){return Id(a,b)}):a}function Kd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.Q=ha());b.Q||(b.Q=ha());return b}function Hd(a){var b=Kd(a.ownerDocument),c=jb(b,function(b){return b==a});c||(c=":wdc:"+b.Q++,b[c]=a);return c} +function Jd(a,b){a=decodeURIComponent(a);var c=b||document,d=Kd(c);if(!(a in d))throw new Aa(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new Aa(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new Aa(10,"Element is no longer attached to the DOM");};function Ld(a,b){var c=[a,!0],d=jd,e;try{var f=b?Jd(b.WINDOW):window,g=Id(c,f.document),q=d.apply(null,g);e={status:0,value:Gd(q)}}catch(u){e={status:"code"in u?u.code:13,value:{message:u.message}}}c=[];Cd(new Bd,e,c);return c.join("")}var Md=["_"],$=n;Md[0]in $||!$.execScript||$.execScript("var "+Md[0]);for(var Nd;Md.length&&(Nd=Md.shift());)Md.length||void 0===Ld?$=$[Nd]?$[Nd]:$[Nd]={}:$[Nd]=Ld;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/is_enabled.js b/src/ghostdriver/third_party/webdriver-atoms/is_enabled.js index 618787ead..c7db148ba 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/is_enabled.js +++ b/src/ghostdriver/third_party/webdriver-atoms/is_enabled.js @@ -1,42 +1,42 @@ -function(){return function(){var f=void 0,h=!0,k=null,m=!1;function aa(a){return function(){return a}}var n=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};var fa=window;function ga(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),l=0;0==c&&l<g;l++){var u=d[l]||"",H=e[l]||"",S=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var A=S.exec(u)||["","",""],B=na.exec(H)||["","",""];if(0==A[0].length&&0==B[0].length)break;c=((0==A[1].length?0:parseInt(A[1],10))<(0==B[1].length?0:parseInt(B[1],10))?-1:(0==A[1].length?0:parseInt(A[1],10))>(0==B[1].length? -0:parseInt(B[1],10))?1:0)||((0==A[2].length)<(0==B[2].length)?-1:(0==A[2].length)>(0==B[2].length)?1:0)||(A[2]<B[2]?-1:A[2]>B[2]?1:0)}while(0==c)}return c};var ha=Array.prototype;function ia(a,b){if(p(a))return!p(b)||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function q(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(f,d[e],e,a)}function ja(a,b){for(var c=a.length,d=[],e=0,g=p(a)?a.split(""):a,l=0;l<c;l++)if(l in g){var u=g[l];b.call(f,u,l,a)&&(d[e++]=u)}return d} -function ka(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(f,e[g],g,a));return d}function la(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(f,c,d,e,a)});return c}function ma(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(f,d[e],e,a)){c=e;break a}c=-1}return 0>c?k:p(a)?a.charAt(c):a[c]}function oa(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};function r(a,b){this.code=a;this.state=pa[a]||qa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;r.N=a.prototype;r.prototype=new b})(); -var qa="unknown error",pa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};pa[13]=qa;pa[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var s,ra,sa,ta,ua,va;function t(){return n.navigator?n.navigator.userAgent:k}ta=sa=ra=s=m;var wa;if(wa=t()){var xa=n.navigator;s=0==wa.indexOf("Opera");ra=!s&&-1!=wa.indexOf("MSIE");sa=!s&&-1!=wa.indexOf("WebKit");ta=!s&&!sa&&"Gecko"==xa.product}var v=s,w=ra,x=ta,ya=sa,za,Aa=n.navigator;za=Aa&&Aa.platform||"";ua=-1!=za.indexOf("Mac");va=-1!=za.indexOf("Win");var y=-1!=za.indexOf("Linux");function Ba(){var a=n.document;return a?a.documentMode:f}var z; -a:{var Ca="",C;if(v&&n.opera)var Da=n.opera.version,Ca="function"==typeof Da?Da():Da;else if(x?C=/rv\:([^\);]+)(\)|;)/:w?C=/MSIE\s+([^\);]+)(\)|;)/:ya&&(C=/WebKit\/(\S+)/),C)var Ea=C.exec(t()),Ca=Ea?Ea[1]:"";if(w){var Fa=Ba();if(Fa>parseFloat(Ca)){z=String(Fa);break a}}z=Ca}var Ga={};function Ha(a){return Ga[a]||(Ga[a]=0<=ga(z,a))}var Ia=n.document,D=!Ia||!w?f:Ba()||("CSS1Compat"==Ia.compatMode?parseInt(z,10):5);!x&&!w||w&&w&&9<=D||x&&Ha("1.9.1");w&&Ha("9");function Ja(a,b){var c={},d;for(d in a)b.call(f,a[d],d,a)&&(c[d]=a[d]);return c}function Ka(a,b){var c={},d;for(d in a)c[d]=b.call(f,a[d],d,a);return c}function La(a,b){for(var c in a)if(b.call(f,a[c],c,a))return c};function Ma(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Na(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Oa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=D)){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,g=b.parentNode;return e==g?Pa(a,b):!c&&Na(e,b)?-1*Qa(a,b):!d&&Na(g,a)?Qa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(h);d=d.createRange();d.selectNode(b);d.collapse(h);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Qa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Pa(d,a)}function Pa(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function Ra(a,b){for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k};var Sa,Ta,Ua,Va,Wa,Xa,Ya;Ya=Xa=Wa=Va=Ua=Ta=Sa=m;var E=t();E&&(-1!=E.indexOf("Firefox")?Sa=h:-1!=E.indexOf("Camino")?Ta=h:-1!=E.indexOf("iPhone")||-1!=E.indexOf("iPod")?Ua=h:-1!=E.indexOf("iPad")?Va=h:-1!=E.indexOf("Android")?Wa=h:-1!=E.indexOf("Chrome")?Xa=h:-1!=E.indexOf("Safari")&&(Ya=h));var Za=Sa,$a=Ta,ab=Ua,bb=Va,F=Wa,cb=Xa,db=Ya;var G=w&&!(w&&9<=D),eb=w&&!(w&&8<=D);function fb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.J=e;this.parentNode=b}function gb(a,b,c){var d=eb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new fb(b,a,b.nodeName,d,c)};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==f||b==k?a.innerText:b,b=b==f||b==k?"":b);if("string"!=typeof b)if(G&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),G&&"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} -function J(a,b,c){if(b===k)return h;try{if(!a.getAttribute)return m}catch(d){return m}eb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function hb(a,b,c,d,e){return(G?ib:jb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new K)} -function ib(a,b,c,d,e){if(m||8==a.h||c&&a.h===k){var g=b.all;if(!g)return e;a=kb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var l=[],u=0;b=g[u++];)J(b,c,d)&&l.push(b);g=l}for(u=0;b=g[u++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}lb(a,b,c,d,e);return e} -function jb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?lb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){J(a,c,d)&&e.add(a)}));return e} -function mb(a,b,c,d,e){var g;if((m||8==a.h||c&&a.h===k)&&(g=b.childNodes)){var l=kb(a);if("*"!=l&&(g=ja(g,function(a){return a.tagName&&a.tagName.toLowerCase()==l}),!g))return e;c&&(g=ja(g,function(a){return J(a,c,d)}));q(g,function(a){("*"!=l||"!"!=a.tagName&&!("*"==l&&1!=a.nodeType))&&e.add(a)});return e}return nb(a,b,c,d,e)}function nb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b);return e} -function lb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b),lb(a,b,c,d,e)}function kb(a){if(m){if(8==a.h)return"!";if(a.h===k)return"*"}return a.getName()};function K(){this.e=this.d=k;this.i=0}function ob(a){this.p=a;this.next=this.n=k}K.prototype.unshift=function(a){a=new ob(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};K.prototype.add=function(a){a=new ob(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function pb(a){return(a=a.d)?a.p:k}function qb(a){return(a=pb(a))?I(a):""}function L(a,b){this.H=a;this.o=(this.q=b)?a.e:a.d;this.v=k} -L.prototype.next=function(){var a=this.o;if(a==k)return k;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function M(a,b){var c=a.evaluate(b);return c instanceof K?+qb(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof K?qb(c):""+c}function O(a,b){var c=a.evaluate(b);return c instanceof K?!!c.i:!!c};function P(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof K&&c instanceof K){e=new L(b,m);for(d=e.next();d;d=e.next()){b=new L(c,m);for(g=b.next();g;g=b.next())if(a(I(d),I(g)))return h}return m}if(b instanceof K||c instanceof K){b instanceof K?e=b:(e=c,c=b);e=new L(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+I(d);break;case "boolean":d=!!I(d);break;case "string":d=I(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return h}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function rb(a,b,c,d){this.w=a;this.L=b;this.t=c;this.u=d}rb.prototype.toString=function(){return this.w};var sb={};function Q(a,b,c,d){if(a in sb)throw Error("Binary operator already created: "+a);a=new rb(a,b,c,d);sb[a.toString()]=a}Q("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});Q("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});Q("*",6,1,function(a,b,c){return M(a,c)*M(b,c)}); -Q("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});Q("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});Q("<",4,2,function(a,b,c){return P(function(a,b){return a<b},a,b,c)});Q(">",4,2,function(a,b,c){return P(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return P(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return P(function(a,b){return a>=b},a,b,c)});Q("=",3,2,function(a,b,c){return P(function(a,b){return a==b},a,b,c,h)}); -Q("!=",3,2,function(a,b,c){return P(function(a,b){return a!=b},a,b,c,h)});Q("and",2,2,function(a,b,c){return O(a,c)&&O(b,c)});Q("or",1,2,function(a,b,c){return O(a,c)||O(b,c)});function tb(a,b,c,d,e,g,l,u,H){this.l=a;this.t=b;this.G=c;this.F=d;this.D=e;this.u=g;this.C=l;this.B=u!==f?u:l;this.I=!!H}tb.prototype.toString=function(){return this.l};var ub={};function R(a,b,c,d,e,g,l,u){if(a in ub)throw Error("Function already created: "+a+".");ub[a]=new tb(a,b,c,d,m,e,g,l,u)}R("boolean",2,m,m,function(a,b){return O(b,a)},1);R("ceiling",1,m,m,function(a,b){return Math.ceil(M(b,a))},1); -R("concat",3,m,m,function(a,b){var c=oa(arguments,1);return la(c,function(b,c){return b+N(c,a)})},2,k);R("contains",2,m,m,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);R("count",1,m,m,function(a,b){return b.evaluate(a).i},1,1,h);R("false",2,m,m,aa(m),0);R("floor",1,m,m,function(a,b){return Math.floor(M(b,a))},1); -R("id",4,m,m,function(a,b){function c(a){if(G){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ma(b,function(b){return a==b.id})}return k}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),g=[];q(d,function(a){(a=c(a))&&!(0<=ia(g,a))&&g.push(a)});g.sort(Oa);var l=new K;q(g,function(a){l.add(a)});return l},1);R("lang",2,m,m,aa(m),1); -R("last",1,h,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);R("local-name",3,m,h,function(a,b){var c=b?pb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);R("name",3,m,h,function(a,b){var c=b?pb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);R("namespace-uri",3,h,m,aa(""),0,1,h);R("normalize-space",3,m,h,function(a,b){return(b?N(b,a):I(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,m,m,function(a,b){return!O(b,a)},1);R("number",1,m,h,function(a,b){return b?M(b,a):+I(a.f)},0,1);R("position",1,h,m,function(a){return a.K},0);R("round",1,m,m,function(a,b){return Math.round(M(b,a))},1);R("starts-with",2,m,m,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,m,h,function(a,b){return b?N(b,a):I(a.f)},0,1);R("string-length",1,m,h,function(a,b){return(b?N(b,a):I(a.f)).length},0,1); -R("substring",3,m,m,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,m,m,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,m,m,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new L(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,h);R("translate",3,m,m,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);R("true",2,m,m,aa(h),0);function vb(a,b,c,d){this.l=a;this.A=b;this.q=c;this.O=d}vb.prototype.toString=function(){return this.l};var wb={};function T(a,b,c,d){if(a in wb)throw Error("Axis already created: "+a);wb[a]=new vb(a,b,c,!!d)}T("ancestor",function(a,b){for(var c=new K,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},h);T("ancestor-or-self",function(a,b){var c=new K,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},h); -T("attribute",function(a,b){var c=new K,d=a.getName();if("style"==d&&b.style&&G)return c.add(new fb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.h===k||"*"==d)for(var d=b.sourceIndex,g=0,l;l=e[g];g++)G?l.nodeValue&&c.add(gb(b,l,d)):c.add(l);else(l=e.getNamedItem(d))&&(G?l.nodeValue&&c.add(gb(b,l,b.sourceIndex)):c.add(l));return c},m);T("child",function(a,b,c,d,e){return(G?mb:nb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new K)},m,h);T("descendant",hb,m,h); -T("descendant-or-self",function(a,b,c,d){var e=new K;J(b,c,d)&&a.matches(b)&&e.add(b);return hb(a,b,c,d,e)},m,h);T("following",function(a,b,c,d){var e=new K;do for(var g=b;g=g.nextSibling;)J(g,c,d)&&a.matches(g)&&e.add(g),e=hb(a,g,c,d,e);while(b=b.parentNode);return e},m,h);T("following-sibling",function(a,b){for(var c=new K,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);T("namespace",function(){return new K},m); -T("parent",function(a,b){var c=new K;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);T("preceding",function(a,b,c,d){var e=new K,g=[];do g.unshift(b);while(b=b.parentNode);for(var l=1,u=g.length;l<u;l++){var H=[];for(b=g[l];b=b.previousSibling;)H.unshift(b);for(var S=0,na=H.length;S<na;S++)b=H[S],J(b,c,d)&&a.matches(b)&&e.add(b),e=hb(a,b,c,d,e)}return e},h,h); -T("preceding-sibling",function(a,b){for(var c=new K,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},h);T("self",function(a,b){var c=new K;a.matches(b)&&c.add(b);return c},m);function U(a){return(a=a.exec(t()))?a[1]:""}var xb=function(){if(Za)return U(/Firefox\/([0-9.]+)/);if(w||v)return z;if(cb)return U(/Chrome\/([0-9.]+)/);if(db)return U(/Version\/([0-9.]+)/);if(ab||bb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(F)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if($a)return U(/Camino\/([0-9.]+)/)}return""}();var yb,zb;function V(a){return Ab?yb(a):w?0<=ga(D,a):Ha(a)}function Bb(a){Ab?zb(a):F?ga(Cb,a):ga(xb,a)} -var Ab=function(){if(!x)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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,g=c.version;yb=function(a){return 0<=d.s(e,""+a)};zb=function(a){d.s(g,""+a)};return h}(),Db;if(F){var Eb=/Android\s+([0-9\.]+)/.exec(t());Db=Eb?Eb[1]:"0"}else Db="0";var Cb=Db;F&&Bb(2.3);!v&&(!ya||V("533"));function Fb(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var Gb="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Hb(a){var b=a.tagName.toUpperCase();return!(0<=ia(Gb,b))?h:a.disabled?m:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Hb(a.parentNode):Ra(a,function(a){var b=a.parentNode;if(b&&Fb(b,"FIELDSET")&&b.disabled){if(!Fb(a,"LEGEND"))return h;for(;a=a.previousElementSibling!=f?a.previousElementSibling:Ma(a.previousSibling);)if(Fb(a,"LEGEND"))return h}return m})?m:h};ya||v||Ab&&Bb(3.6);w&&V(10);F&&Bb(4);function W(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof W){d=Ib(a);Jb(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}W.prototype.k=0;W.prototype.z=0;function Ib(a){Jb(a);return a.c.concat()} -function Jb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}W.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -W.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.z++);this.g[a]=b};var Kb={};function X(a,b,c){da(a)&&(a=x?a.a:v?a.opera:a.b);a=new Lb(a,b,c);if(b&&(!(b in Kb)||c))Kb[b]={key:a,shift:m},c&&(Kb[c]={key:a,shift:h});return a}function Lb(a,b,c){this.code=a;this.r=b||k;this.M=c||this.r}X(8);X(9);X(13);var Mb=X(16),Nb=X(17),Ob=X(18);X(19);X(20);X(27);X(32," ");X(33);X(34);X(35);X(36);X(37);X(38);X(39);X(40);X(44);X(45);X(46);X(48,"0",")");X(49,"1","!");X(50,"2","@");X(51,"3","#");X(52,"4","$");X(53,"5","%");X(54,"6","^");X(55,"7","&");X(56,"8","*");X(57,"9","("); -X(65,"a","A");X(66,"b","B");X(67,"c","C");X(68,"d","D");X(69,"e","E");X(70,"f","F");X(71,"g","G");X(72,"h","H");X(73,"i","I");X(74,"j","J");X(75,"k","K");X(76,"l","L");X(77,"m","M");X(78,"n","N");X(79,"o","O");X(80,"p","P");X(81,"q","Q");X(82,"r","R");X(83,"s","S");X(84,"t","T");X(85,"u","U");X(86,"v","V");X(87,"w","W");X(88,"x","X");X(89,"y","Y");X(90,"z","Z");var Pb=X(va?{a:91,b:91,opera:219}:ua?{a:224,b:91,opera:17}:{a:0,b:91,opera:k}); -X(va?{a:92,b:92,opera:220}:ua?{a:224,b:93,opera:17}:{a:0,b:92,opera:k});X(va?{a:93,b:93,opera:0}:ua?{a:0,b:0,opera:16}:{a:93,b:k,opera:0});X({a:96,b:96,opera:48},"0");X({a:97,b:97,opera:49},"1");X({a:98,b:98,opera:50},"2");X({a:99,b:99,opera:51},"3");X({a:100,b:100,opera:52},"4");X({a:101,b:101,opera:53},"5");X({a:102,b:102,opera:54},"6");X({a:103,b:103,opera:55},"7");X({a:104,b:104,opera:56},"8");X({a:105,b:105,opera:57},"9");X({a:106,b:106,opera:y?56:42},"*");X({a:107,b:107,opera:y?61:43},"+"); -X({a:109,b:109,opera:y?109:45},"-");X({a:110,b:110,opera:y?190:78},".");X({a:111,b:111,opera:y?191:47},"/");X(y&&v?k:144);X(112);X(113);X(114);X(115);X(116);X(117);X(118);X(119);X(120);X(121);X(122);X(123);X({a:107,b:187,opera:61},"=","+");X(108,",");X({a:109,b:189,opera:109},"-","_");X(188,",","<");X(190,".",">");X(191,"/","?");X(192,"`","~");X(219,"[","{");X(220,"\\","|");X(221,"]","}");X({a:59,b:186,opera:59},";",":");X(222,"'",'"');var Y=new W;Y.set(1,Mb);Y.set(2,Nb);Y.set(4,Ob);Y.set(8,Pb); -(function(a){var b=new W;q(Ib(a),function(c){b.set(a.get(c).code,c)});return b})(Y);x&&V(12);function Qb(){this.j=f} -function Rb(a,b,c){switch(typeof b){case "string":Sb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Rb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),Sb(g, -c),c.push(":"),Rb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Tb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ub=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Sb(a,b){b.push('"',a.replace(Ub,function(a){if(a in Tb)return Tb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Tb[a]=e+b.toString(16)}),'"')};ya||v||x&&V(3.5)||w&&V(8);function Vb(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ka(a,Vb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Wb(a);return b}if("document"in a)return b={},b.WINDOW=Wb(a),b;if(ca(a))return ka(a,Vb);a=Ja(a,function(a,b){return"number"==typeof b||p(b)});return Ka(a,Vb);default:return k}} -function Xb(a,b){return"array"==ba(a)?ka(a,function(a){return Xb(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?Yb(a.ELEMENT,b):"WINDOW"in a?Yb(a.WINDOW,b):Ka(a,function(a){return Xb(a,b)}):a}function Zb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ea());b.m||(b.m=ea());return b}function Wb(a){var b=Zb(a.ownerDocument),c=La(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} -function Yb(a,b){a=decodeURIComponent(a);var c=b||document,d=Zb(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new r(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function $b(a){var b=Hb;a=[a];var c=window||fa,d;try{var b=p(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Xb(a,c.document),g=b.apply(k,e);d={status:0,value:Vb(g)}}catch(l){d={status:"code"in l?l.code:13,value:{message:l.message}}}b=[];Rb(new Qb,d,b);return b.join("")}var Z=["_"],$=n;!(Z[0]in $)&&$.execScript&&$.execScript("var "+Z[0]);for(var ac;Z.length&&(ac=Z.shift());)!Z.length&&$b!==f?$[ac]=$b:$=$[ac]?$[ac]:$[ac]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){function f(a){return function(){return a}}var k=this; +function l(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function p(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var n=d[h]||"",v=e[h]||"",P=RegExp("(\\d*)(\\D*)","g"),ja=RegExp("(\\d*)(\\D*)","g");do{var x=P.exec(n)||["","",""],y=ja.exec(v)||["","",""];if(0==x[0].length&&0==y[0].length)break;c=((0==x[1].length?0:parseInt(x[1],10))<(0==y[1].length?0:parseInt(y[1],10))?-1:(0==x[1].length?0:parseInt(x[1],10))>(0==y[1].length? +0:parseInt(y[1],10))?1:0)||((0==x[2].length)<(0==y[2].length)?-1:(0==x[2].length)>(0==y[2].length)?1:0)||(x[2]<y[2]?-1:x[2]>y[2]?1:0)}while(0==c)}return c};var da=Array.prototype;function ea(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 q(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 fa(a,b){for(var c=a.length,d=[],e=0,g=m(a)?a.split(""):a,h=0;h<c;h++)if(h in g){var n=g[h];b.call(void 0,n,h,a)&&(d[e++]=n)}return d} +function ga(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(void 0,e[g],g,a));return d}function ha(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function ia(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?da.slice.call(a,b):da.slice.call(a,b,c)};function r(a,b){this.code=a;this.state=la[a]||ma;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;r.O=a.prototype;r.prototype=new b})(); +var ma="unknown error",la={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};la[13]=ma;la[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var s,na,oa,pa,qa,ra;function t(){return k.navigator?k.navigator.userAgent:null}pa=oa=na=s=!1;var sa;if(sa=t()){var ta=k.navigator;s=0==sa.indexOf("Opera");na=!s&&-1!=sa.indexOf("MSIE");oa=!s&&-1!=sa.indexOf("WebKit");pa=!s&&!oa&&"Gecko"==ta.product}var u=s,w=na,z=pa,ua=oa,va,wa=k.navigator;va=wa&&wa.platform||"";qa=-1!=va.indexOf("Mac");ra=-1!=va.indexOf("Win");var A=-1!=va.indexOf("Linux");function xa(){var a=k.document;return a?a.documentMode:void 0}var B; +a:{var ya="",C;if(u&&k.opera)var za=k.opera.version,ya="function"==typeof za?za():za;else if(z?C=/rv\:([^\);]+)(\)|;)/:w?C=/MSIE\s+([^\);]+)(\)|;)/:ua&&(C=/WebKit\/(\S+)/),C)var Aa=C.exec(t()),ya=Aa?Aa[1]:"";if(w){var Ba=xa();if(Ba>parseFloat(ya)){B=String(Ba);break a}}B=ya}var Ca={};function Da(a){return Ca[a]||(Ca[a]=0<=p(B,a))}var Ea=k.document,D=Ea&&w?xa()||("CSS1Compat"==Ea.compatMode?parseInt(B,10):5):void 0;!z&&!w||w&&w&&9<=D||z&&Da("1.9.1");w&&Da("9");function Fa(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ga(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ha(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Ia(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Ja(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Ka(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=D)){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,g=b.parentNode;return e==g?La(a,b):!c&&Ja(e,b)?-1*Ma(a,b):!d&&Ja(g,a)?Ma(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| +a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Ma(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return La(d,a)}function La(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function Na(a,b){for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null};var Oa,Pa,Qa,Ra,Sa,Ta,Ua;Ua=Ta=Sa=Ra=Qa=Pa=Oa=!1;var E=t();E&&(-1!=E.indexOf("Firefox")?Oa=!0:-1!=E.indexOf("Camino")?Pa=!0:-1!=E.indexOf("iPhone")||-1!=E.indexOf("iPod")?Qa=!0:-1!=E.indexOf("iPad")?Ra=!0:-1!=E.indexOf("Android")?Sa=!0:-1!=E.indexOf("Chrome")?Ta=!0:-1!=E.indexOf("Safari")&&(Ua=!0));var Va=Oa,Wa=Pa,Xa=Qa,Ya=Ra,F=Sa,Za=Ta,$a=Ua;var G=w&&!(w&&9<=D),ab=w&&!(w&&8<=D);function bb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.K=e;this.parentNode=b}function cb(a,b,c){var d=ab&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new bb(b,a,b.nodeName,d,c)};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(G&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),G&&"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} +function I(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}ab&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function db(a,b,c,d,e){return(G?eb:fb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)} +function eb(a,b,c,d,e){if(8==a.h||c&&null===a.h){var g=b.all;if(!g)return e;a=gb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var h=[],n=0;b=g[n++];)I(b,c,d)&&h.push(b);g=h}for(n=0;b=g[n++];)"*"==a&&"!"==b.tagName||e.add(b);return e}hb(a,b,c,d,e);return e} +function fb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){I(a,c,d)&&e.add(a)}));return e} +function ib(a,b,c,d,e){var g;if((8==a.h||c&&null===a.h)&&(g=b.childNodes)){var h=gb(a);if("*"!=h&&(g=fa(g,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!g))return e;c&&(g=fa(g,function(a){return I(a,c,d)}));q(g,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return jb(a,b,c,d,e)}function jb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b);return e} +function hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b),hb(a,b,c,d,e)}function gb(a){return a.getName()};function J(){this.e=this.d=null;this.i=0}function kb(a){this.p=a;this.next=this.n=null}J.prototype.unshift=function(a){a=new kb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};J.prototype.add=function(a){a=new kb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function lb(a){return(a=a.d)?a.p:null}function mb(a){return(a=lb(a))?H(a):""}function K(a,b){this.I=a;this.o=(this.q=b)?a.e:a.d;this.v=null} +K.prototype.next=function(){var a=this.o;if(null==a)return null;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function L(a,b){var c=a.evaluate(b);return c instanceof J?+mb(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof J?mb(c):""+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?!!c.i:!!c};function O(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof J&&c instanceof J){e=new K(b,!1);for(d=e.next();d;d=e.next())for(b=new K(c,!1),g=b.next();g;g=b.next())if(a(H(d),H(g)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=new K(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+H(d);break;case "boolean":d=!!H(d);break;case "string":d=H(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function nb(a,b,c,d){this.w=a;this.M=b;this.t=c;this.u=d}nb.prototype.toString=function(){return this.w};var ob={};function Q(a,b,c,d){if(ob.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new nb(a,b,c,d);ob[a.toString()]=a}Q("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});Q("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)}); +Q("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});Q("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});Q("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});Q("<",4,2,function(a,b,c){return O(function(a,b){return a<b},a,b,c)});Q(">",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});Q("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)}); +Q("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});Q("and",2,2,function(a,b,c){return N(a,c)&&N(b,c)});Q("or",1,2,function(a,b,c){return N(a,c)||N(b,c)});function pb(a,b,c,d,e,g,h,n,v){this.l=a;this.t=b;this.H=c;this.G=d;this.F=e;this.u=g;this.D=h;this.C=void 0!==n?n:h;this.J=!!v}pb.prototype.toString=function(){return this.l};var qb={};function R(a,b,c,d,e,g,h,n){if(qb.hasOwnProperty(a))throw Error("Function already created: "+a+".");qb[a]=new pb(a,b,c,d,!1,e,g,h,n)}R("boolean",2,!1,!1,function(a,b){return N(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1); +R("concat",3,!1,!1,function(a,b){var c=ka(arguments,1);return ha(c,function(b,c){return b+M(c,a)})},2,null);R("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);R("count",1,!1,!1,function(a,b){return b.evaluate(a).i},1,1,!0);R("false",2,!1,!1,f(!1),0);R("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +R("id",4,!1,!1,function(a,b){function c(a){if(G){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ia(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),g=[];q(d,function(a){a=c(a);!a||0<=ea(g,a)||g.push(a)});g.sort(Ka);var h=new J;q(g,function(a){h.add(a)});return h},1);R("lang",2,!1,!1,f(!1),1); +R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);R("local-name",3,!1,!0,function(a,b){var c=b?lb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){var c=b?lb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,f(""),0,1,!0);R("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):H(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +R("not",2,!1,!1,function(a,b){return!N(b,a)},1);R("number",1,!1,!0,function(a,b){return b?L(b,a):+H(a.f)},0,1);R("position",1,!0,!1,function(a){return a.L},0);R("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?M(b,a):H(a.f)},0,1);R("string-length",1,!1,!0,function(a,b){return(b?M(b,a):H(a.f)).length},0,1); +R("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +R("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new K(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);R("true",2,!1,!1,f(!0),0);function rb(a,b,c,d){this.l=a;this.B=b;this.q=c;this.P=d}rb.prototype.toString=function(){return this.l};var sb={};function S(a,b,c,d){if(sb.hasOwnProperty(a))throw Error("Axis already created: "+a);sb[a]=new rb(a,b,c,!!d)}S("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);S("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +S("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&G)return c.add(new bb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,g=0,h;h=e[g];g++)G?h.nodeValue&&c.add(cb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(G?h.nodeValue&&c.add(cb(b,h,b.sourceIndex)):c.add(h));return c},!1);S("child",function(a,b,c,d,e){return(G?ib:jb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)},!1,!0);S("descendant",db,!1,!0); +S("descendant-or-self",function(a,b,c,d){var e=new J;I(b,c,d)&&a.matches(b)&&e.add(b);return db(a,b,c,d,e)},!1,!0);S("following",function(a,b,c,d){var e=new J;do for(var g=b;g=g.nextSibling;)I(g,c,d)&&a.matches(g)&&e.add(g),e=db(a,g,c,d,e);while(b=b.parentNode);return e},!1,!0);S("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);S("namespace",function(){return new J},!1); +S("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);S("preceding",function(a,b,c,d){var e=new J,g=[];do g.unshift(b);while(b=b.parentNode);for(var h=1,n=g.length;h<n;h++){var v=[];for(b=g[h];b=b.previousSibling;)v.unshift(b);for(var P=0,ja=v.length;P<ja;P++)b=v[P],I(b,c,d)&&a.matches(b)&&e.add(b),e=db(a,b,c,d,e)}return e},!0,!0); +S("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);S("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},!1);function T(a){return(a=a.exec(t()))?a[1]:""}var tb=function(){if(Va)return T(/Firefox\/([0-9.]+)/);if(w||u)return B;if(Za)return T(/Chrome\/([0-9.]+)/);if($a)return T(/Version\/([0-9.]+)/);if(Xa||Ya){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(F)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(Wa)return T(/Camino\/([0-9.]+)/)}return""}();var ub,vb;function wb(a){return xb?ub(a):w?0<=p(D,a):Da(a)}function U(a){xb?vb(a):F?p(yb,a):p(tb,a)}var xb=function(){if(!z)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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,g=c.version;ub=function(a){return 0<=d.s(e,""+a)};vb=function(a){d.s(g,""+a)};return!0}(),zb; +if(F){var Ab=/Android\s+([0-9\.]+)/.exec(t());zb=Ab?Ab[1]:"0"}else zb="0";var yb=zb;F&&U(2.3);F&&U(4);$a&&U(6);function Bb(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var Cb="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Db(a){var b=a.tagName.toUpperCase();return 0<=ea(Cb,b)?a.disabled?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Db(a.parentNode):!Na(a,function(a){var b=a.parentNode;if(b&&Bb(b,"FIELDSET")&&b.disabled){if(!Bb(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:Ia(a.previousSibling);)if(Bb(a,"LEGEND"))return!0}return!1}):!0};ua||u||xb&&U(3.6);w&&wb(10);F&&U(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V)for(d=Eb(a),Fb(a),e=[],c=0;c<a.c.length;c++)e.push(a.g[a.c[c]]);else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.k=0;V.prototype.A=0;function Eb(a){Fb(a);return a.c.concat()} +function Fb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; +V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.A++);this.g[a]=b};var Gb={};function W(a,b,c){ba(a)&&(a=z?a.a:u?a.opera:a.b);a=new Hb(a,b,c);!b||b in Gb&&!c||(Gb[b]={key:a,shift:!1},c&&(Gb[c]={key:a,shift:!0}));return a}function Hb(a,b,c){this.code=a;this.r=b||null;this.N=c||this.r}W(8);W(9);W(13);var Ib=W(16),Jb=W(17),Kb=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","("); +W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Lb=W(ra?{a:91,b:91,opera:219}:qa?{a:224,b:91,opera:17}:{a:0,b:91,opera:null}); +W(ra?{a:92,b:92,opera:220}:qa?{a:224,b:93,opera:17}:{a:0,b:92,opera:null});W(ra?{a:93,b:93,opera:0}:qa?{a:0,b:0,opera:16}:{a:93,b:null,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:A?56:42},"*"); +W({a:107,b:107,opera:A?61:43},"+");W({a:109,b:109,opera:A?109:45},"-");W({a:110,b:110,opera:A?190:78},".");W({a:111,b:111,opera:A?191:47},"/");W(A&&u?null:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Ib); +X.set(2,Jb);X.set(4,Kb);X.set(8,Lb);(function(a){var b=new V;q(Eb(a),function(c){b.set(a.get(c).code,c)});return b})(X);z&&wb(12);function Mb(){this.j=void 0} +function Nb(a,b,c){switch(typeof b){case "string":Ob(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==l(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Nb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d), +Ob(g,c),c.push(":"),Nb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Pb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Qb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ob(a,b){b.push('"',a.replace(Qb,function(a){if(a in Pb)return Pb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Pb[a]=e+b.toString(16)}),'"')};ua||u||z&&wb(3.5)||w&&wb(8);function Rb(a){switch(l(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ga(a,Rb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Sb(a);return b}if("document"in a)return b={},b.WINDOW=Sb(a),b;if(aa(a))return ga(a,Rb);a=Fa(a,function(a,b){return"number"==typeof b||m(b)});return Ga(a,Rb);default:return null}} +function Tb(a,b){return"array"==l(a)?ga(a,function(a){return Tb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ub(a.ELEMENT,b):"WINDOW"in a?Ub(a.WINDOW,b):Ga(a,function(a){return Tb(a,b)}):a}function Vb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ca());b.m||(b.m=ca());return b}function Sb(a){var b=Vb(a.ownerDocument),c=Ha(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} +function Ub(a,b){a=decodeURIComponent(a);var c=b||document,d=Vb(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new r(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function Wb(a,b){var c=[a],d=Db,e;try{var g=b?Ub(b.WINDOW):window,h=Tb(c,g.document),n=d.apply(null,h);e={status:0,value:Rb(n)}}catch(v){e={status:"code"in v?v.code:13,value:{message:v.message}}}c=[];Nb(new Mb,e,c);return c.join("")}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Wb?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Wb;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/is_online.js b/src/ghostdriver/third_party/webdriver-atoms/is_online.js index ae77c194a..0b5b1bf9d 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/is_online.js +++ b/src/ghostdriver/third_party/webdriver-atoms/is_online.js @@ -1,7 +1,8 @@ -function(){return function(){var c=!0,d=null,e=!1,f=this;var l=window;function m(a,p){this.code=a;this.state=n[a]||q;this.message=p||"";var b=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),g=b.length-5;if(0>g||b.indexOf("Error",g)!=g)b+="Error";this.name=b;b=Error(this.message);b.name=this.name;this.stack=b.stack||""}(function(){var a=Error;function p(){}p.prototype=a.prototype;m.b=a.prototype;m.prototype=new p})(); -var q="unknown error",n={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};n[13]=q;n[9]="unknown command";m.prototype.toString=function(){return this.name+": "+this.message};function r(a,p){for(var b=0,g=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),C=String(p).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),J=Math.max(g.length,C.length),D=0;0==b&&D<J;D++){var ka=g[D]||"",la=C[D]||"",ma=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var h=ma.exec(ka)||["","",""],k=na.exec(la)||["","",""];if(0==h[0].length&&0==k[0].length)break;b=((0==h[1].length?0:parseInt(h[1],10))<(0==k[1].length?0:parseInt(k[1],10))?-1:(0==h[1].length?0:parseInt(h[1],10))> -(0==k[1].length?0:parseInt(k[1],10))?1:0)||((0==h[2].length)<(0==k[2].length)?-1:(0==h[2].length)>(0==k[2].length)?1:0)||(h[2]<k[2]?-1:h[2]>k[2]?1:0)}while(0==b)}return b};var s,t,u,v;function w(){return f.navigator?f.navigator.userAgent:d}v=u=t=s=e;var x;if(x=w()){var aa=f.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==aa.product}var y=s,z=t,ba=v,ca=u,da=f.navigator,ea=-1!=(da&&da.platform||"").indexOf("Win");function fa(){var a=f.document;return a?a.documentMode:void 0}var A; -a:{var B="",E;if(y&&f.opera)var F=f.opera.version,B="function"==typeof F?F():F;else if(ba?E=/rv\:([^\);]+)(\)|;)/:z?E=/MSIE\s+([^\);]+)(\)|;)/:ca&&(E=/WebKit\/(\S+)/),E)var ga=E.exec(w()),B=ga?ga[1]:"";if(z){var ha=fa();if(ha>parseFloat(B)){A=String(ha);break a}}A=B}var G={},ia=f.document,ja=!ia||!z?void 0:fa()||("CSS1Compat"==ia.compatMode?parseInt(A,10):5);var H,I,K,L,M,N,O;O=N=M=L=K=I=H=e;var P=w();P&&(-1!=P.indexOf("Firefox")?H=c:-1!=P.indexOf("Camino")?I=c:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=c:-1!=P.indexOf("iPad")?L=c:-1!=P.indexOf("Android")?M=c:-1!=P.indexOf("Chrome")?N=c:-1!=P.indexOf("Safari")&&(O=c));var oa=H,pa=I,qa=K,ra=L,Q=M,sa=N,R=O;function S(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return S(/Firefox\/([0-9.]+)/);if(z||y)return A;if(sa)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(pa)return S(/Camino\/([0-9.]+)/)}return""}();var T,ua;function U(a){return V?ua(a):Q?0<=r(va,a):0<=r(ta,a)}var V=function(){if(!ba)return e;var a=f.Components;if(!a)return e;try{if(!a.classes)return e}catch(p){return e}var b=a.classes,a=a.interfaces,g=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),C=b.platformVersion,J=b.version;T=function(a){return 0<=g.a(C,""+a)};ua=function(a){return 0<=g.a(J,""+a)};return c}(),W; -if(Q){var wa=/Android\s+([0-9\.]+)/.exec(w());W=wa?wa[1]:"0"}else W="0";var va=W;Q&&U(2.3);var X=z&&(V?T(8):z?0<=r(ja,8):G[8]||(G[8]=0<=r(A,8)))&&!(V?T(9):z?0<=r(ja,9):G[9]||(G[9]=0<=r(A,9))),xa=R&&U(4)&&!U(5),ya=Q&&U(2.2)&&!U(2.3),za=ea&&R&&U(4)&&!U(6); -function Aa(){switch("browser_connection"){case "appcache":return X?e:l.applicationCache!=d;case "browser_connection":return l.navigator!=d&&l.navigator.onLine!=d;case "database":return xa||ya?e:l.openDatabase!=d;case "location":return za?e:l.navigator!=d&&l.navigator.geolocation!=d;case "local_storage":return X?e:l.localStorage!=d;case "session_storage":return X?e:l.sessionStorage!=d&&l.sessionStorage.clear!=d;default:throw new m(13,"Unsupported API identifier provided as parameter");}};function Ba(){if(Aa())return l.navigator.onLine;throw new m(13,"Undefined browser connection state");}var Y=["_"],Z=f;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&void 0!==Ba?Z[$]=Ba:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var c=this;var d=window;function h(a,m){this.code=a;this.state=k[a]||l;this.message=m||"";var b=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=b.length-5;if(0>e||b.indexOf("Error",e)!=e)b+="Error";this.name=b;b=Error(this.message);b.name=this.name;this.stack=b.stack||""}(function(){var a=Error;function m(){}m.prototype=a.prototype;h.b=a.prototype;h.prototype=new m})(); +var l="unknown error",k={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};k[13]=l;k[9]="unknown command";h.prototype.toString=function(){return this.name+": "+this.message};function n(a,m){for(var b=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),z=String(m).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),H=Math.max(e.length,z.length),A=0;0==b&&A<H;A++){var ha=e[A]||"",ia=z[A]||"",ja=RegExp("(\\d*)(\\D*)","g"),ka=RegExp("(\\d*)(\\D*)","g");do{var f=ja.exec(ha)||["","",""],g=ka.exec(ia)||["","",""];if(0==f[0].length&&0==g[0].length)break;b=((0==f[1].length?0:parseInt(f[1],10))<(0==g[1].length?0:parseInt(g[1],10))?-1:(0==f[1].length?0:parseInt(f[1],10))> +(0==g[1].length?0:parseInt(g[1],10))?1:0)||((0==f[2].length)<(0==g[2].length)?-1:(0==f[2].length)>(0==g[2].length)?1:0)||(f[2]<g[2]?-1:f[2]>g[2]?1:0)}while(0==b)}return b};var p,q,r,s;function t(){return c.navigator?c.navigator.userAgent:null}s=r=q=p=!1;var u;if(u=t()){var aa=c.navigator;p=0==u.indexOf("Opera");q=!p&&-1!=u.indexOf("MSIE");r=!p&&-1!=u.indexOf("WebKit");s=!p&&!r&&"Gecko"==aa.product}var v=p,w=q,x=s,ba=r,y=c.navigator,ca=-1!=(y&&y.platform||"").indexOf("Win");function B(){var a=c.document;return a?a.documentMode:void 0}var C; +a:{var D="",E;if(v&&c.opera)var F=c.opera.version,D="function"==typeof F?F():F;else if(x?E=/rv\:([^\);]+)(\)|;)/:w?E=/MSIE\s+([^\);]+)(\)|;)/:ba&&(E=/WebKit\/(\S+)/),E)var da=E.exec(t()),D=da?da[1]:"";if(w){var ea=B();if(ea>parseFloat(D)){C=String(ea);break a}}C=D}var G={},fa=c.document,ga=fa&&w?B()||("CSS1Compat"==fa.compatMode?parseInt(C,10):5):void 0;var I,J,K,L,M,N,O;O=N=M=L=K=J=I=!1;var P=t();P&&(-1!=P.indexOf("Firefox")?I=!0:-1!=P.indexOf("Camino")?J=!0:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=!0:-1!=P.indexOf("iPad")?L=!0:-1!=P.indexOf("Android")?M=!0:-1!=P.indexOf("Chrome")?N=!0:-1!=P.indexOf("Safari")&&(O=!0));var la=I,ma=J,na=K,oa=L,Q=M,pa=N,R=O;function S(a){return(a=a.exec(t()))?a[1]:""}var qa=function(){if(la)return S(/Firefox\/([0-9.]+)/);if(w||v)return C;if(pa)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(na||oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ma)return S(/Camino\/([0-9.]+)/)}return""}();var T,ra;function U(a){return V?ra(a):Q?0<=n(sa,a):0<=n(qa,a)}var V=function(){if(!x)return!1;var a=c.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(m){return!1}var b=a.classes,a=a.interfaces,e=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),z=b.platformVersion,H=b.version;T=function(a){return 0<=e.a(z,""+a)};ra=function(a){return 0<=e.a(H,""+a)};return!0}(),W; +if(Q){var ta=/Android\s+([0-9\.]+)/.exec(t());W=ta?ta[1]:"0"}else W="0";var sa=W;Q&&U(2.3);Q&&U(4);R&&U(6);var X=w&&(V?T(8):w?0<=n(ga,8):G[8]||(G[8]=0<=n(C,8)))&&!(V?T(9):w?0<=n(ga,9):G[9]||(G[9]=0<=n(C,9))),ua=R&&U(4)&&!U(5),va=Q&&U(2.2)&&!U(2.3),wa=ca&&R&&U(4)&&!U(6); +function xa(){switch("browser_connection"){case "appcache":return X?!1:null!=d.applicationCache;case "browser_connection":return null!=d.navigator&&null!=d.navigator.onLine;case "database":return ua||va?!1:null!=d.openDatabase;case "location":return wa?!1:null!=d.navigator&&null!=d.navigator.geolocation;case "local_storage":return X?!1:null!=d.localStorage;case "session_storage":return X?!1:null!=d.sessionStorage&&null!=d.sessionStorage.clear;default:throw new h(13,"Unsupported API identifier provided as parameter"); +}};function ya(){if(xa())return d.navigator.onLine;throw new h(13,"Undefined browser connection state");}var Y=["_"],Z=c;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===ya?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=ya;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/is_selected.js b/src/ghostdriver/third_party/webdriver-atoms/is_selected.js index 7e1d66060..92e2bab6b 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/is_selected.js +++ b/src/ghostdriver/third_party/webdriver-atoms/is_selected.js @@ -1,44 +1,43 @@ -function(){return function(){var f=void 0,h=!0,l=null,m=!1;function aa(a){return function(){return a}}var n=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=l||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};var fa=window;function ga(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),k=0;0==c&&k<g;k++){var u=d[k]||"",I=e[k]||"",T=RegExp("(\\d*)(\\D*)","g"),oa=RegExp("(\\d*)(\\D*)","g");do{var A=T.exec(u)||["","",""],B=oa.exec(I)||["","",""];if(0==A[0].length&&0==B[0].length)break;c=((0==A[1].length?0:parseInt(A[1],10))<(0==B[1].length?0:parseInt(B[1],10))?-1:(0==A[1].length?0:parseInt(A[1],10))>(0==B[1].length? -0:parseInt(B[1],10))?1:0)||((0==A[2].length)<(0==B[2].length)?-1:(0==A[2].length)>(0==B[2].length)?1:0)||(A[2]<B[2]?-1:A[2]>B[2]?1:0)}while(0==c)}return c};var ha=Array.prototype;function q(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(f,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,g=p(a)?a.split(""):a,k=0;k<c;k++)if(k in g){var u=g[k];b.call(f,u,k,a)&&(d[e++]=u)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(f,e[g],g,a));return d}function ka(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(f,c,d,e,a)});return c} -function la(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(f,d[e],e,a)){c=e;break a}c=-1}return 0>c?l:p(a)?a.charAt(c):a[c]}function ma(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};function r(a,b){this.code=a;this.state=na[a]||pa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;r.N=a.prototype;r.prototype=new b})(); -var pa="unknown error",na={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};na[13]=pa;na[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var s,qa,ra,sa,ta,ua;function t(){return n.navigator?n.navigator.userAgent:l}sa=ra=qa=s=m;var va;if(va=t()){var wa=n.navigator;s=0==va.indexOf("Opera");qa=!s&&-1!=va.indexOf("MSIE");ra=!s&&-1!=va.indexOf("WebKit");sa=!s&&!ra&&"Gecko"==wa.product}var v=s,w=qa,x=sa,xa=ra,ya,za=n.navigator;ya=za&&za.platform||"";ta=-1!=ya.indexOf("Mac");ua=-1!=ya.indexOf("Win");var y=-1!=ya.indexOf("Linux");function Aa(){var a=n.document;return a?a.documentMode:f}var z; -a:{var Ba="",C;if(v&&n.opera)var Ca=n.opera.version,Ba="function"==typeof Ca?Ca():Ca;else if(x?C=/rv\:([^\);]+)(\)|;)/:w?C=/MSIE\s+([^\);]+)(\)|;)/:xa&&(C=/WebKit\/(\S+)/),C)var Da=C.exec(t()),Ba=Da?Da[1]:"";if(w){var Ea=Aa();if(Ea>parseFloat(Ba)){z=String(Ea);break a}}z=Ba}var Fa={};function Ga(a){return Fa[a]||(Fa[a]=0<=ga(z,a))}var Ha=n.document,D=!Ha||!w?f:Aa()||("CSS1Compat"==Ha.compatMode?parseInt(z,10):5);!x&&!w||w&&w&&9<=D||x&&Ga("1.9.1");w&&Ga("9");function Ia(a,b){var c={},d;for(d in a)b.call(f,a[d],d,a)&&(c[d]=a[d]);return c}function Ja(a,b){var c={},d;for(d in a)c[d]=b.call(f,a[d],d,a);return c}function Ka(a,b){for(var c in a)if(b.call(f,a[c],c,a))return c};function La(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function Ma(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=D)){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,g=b.parentNode;return e==g?Na(a,b):!c&&La(e,b)?-1*Oa(a,b):!d&&La(g,a)?Oa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| -a.document;c=d.createRange();c.selectNode(a);c.collapse(h);d=d.createRange();d.selectNode(b);d.collapse(h);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Oa(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Na(d,a)}function Na(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var Pa={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Qa={IMG:" ",BR:"\n"}; -function Ra(a,b,c){if(!(a.nodeName in Pa))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Qa)b.push(Qa[a.nodeName]);else for(a=a.firstChild;a;)Ra(a,b,c),a=a.nextSibling};var Sa,Ta,Ua,Va,Wa,Xa,Ya;Ya=Xa=Wa=Va=Ua=Ta=Sa=m;var E=t();E&&(-1!=E.indexOf("Firefox")?Sa=h:-1!=E.indexOf("Camino")?Ta=h:-1!=E.indexOf("iPhone")||-1!=E.indexOf("iPod")?Ua=h:-1!=E.indexOf("iPad")?Va=h:-1!=E.indexOf("Android")?Wa=h:-1!=E.indexOf("Chrome")?Xa=h:-1!=E.indexOf("Safari")&&(Ya=h));var Za=Sa,$a=Ta,ab=Ua,bb=Va,F=Wa,cb=Xa,db=Ya;var G=w&&!(w&&9<=D),eb=w&&!(w&&8<=D);function fb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.J=e;this.parentNode=b}function gb(a,b,c){var d=eb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new fb(b,a,b.nodeName,d,c)};function H(a){var b=l,c=a.nodeType;1==c&&(b=a.textContent,b=b==f||b==l?a.innerText:b,b=b==f||b==l?"":b);if("string"!=typeof b)if(G&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),G&&"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} -function J(a,b,c){if(b===l)return h;try{if(!a.getAttribute)return m}catch(d){return m}eb&&"class"==b&&(b="className");return c==l?!!a.getAttribute(b):a.getAttribute(b,2)==c}function hb(a,b,c,d,e){return(G?ib:jb).call(l,a,b,p(c)?c:l,p(d)?d:l,e||new K)} -function ib(a,b,c,d,e){if(m||8==a.h||c&&a.h===l){var g=b.all;if(!g)return e;a=kb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var k=[],u=0;b=g[u++];)J(b,c,d)&&k.push(b);g=k}for(u=0;b=g[u++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}lb(a,b,c,d,e);return e} -function jb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):m?lb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){J(a,c,d)&&e.add(a)}));return e} -function mb(a,b,c,d,e){var g;if((m||8==a.h||c&&a.h===l)&&(g=b.childNodes)){var k=kb(a);if("*"!=k&&(g=ia(g,function(a){return a.tagName&&a.tagName.toLowerCase()==k}),!g))return e;c&&(g=ia(g,function(a){return J(a,c,d)}));q(g,function(a){("*"!=k||"!"!=a.tagName&&!("*"==k&&1!=a.nodeType))&&e.add(a)});return e}return nb(a,b,c,d,e)}function nb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b);return e} -function lb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b),lb(a,b,c,d,e)}function kb(a){if(m){if(8==a.h)return"!";if(a.h===l)return"*"}return a.getName()};function K(){this.e=this.d=l;this.i=0}function ob(a){this.p=a;this.next=this.n=l}K.prototype.unshift=function(a){a=new ob(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};K.prototype.add=function(a){a=new ob(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function pb(a){return(a=a.d)?a.p:l}function qb(a){return(a=pb(a))?H(a):""}function L(a,b){this.H=a;this.o=(this.q=b)?a.e:a.d;this.v=l} -L.prototype.next=function(){var a=this.o;if(a==l)return l;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function M(a,b){var c=a.evaluate(b);return c instanceof K?+qb(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof K?qb(c):""+c}function O(a,b){var c=a.evaluate(b);return c instanceof K?!!c.i:!!c};function P(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof K&&c instanceof K){e=new L(b,m);for(d=e.next();d;d=e.next()){b=new L(c,m);for(g=b.next();g;g=b.next())if(a(H(d),H(g)))return h}return m}if(b instanceof K||c instanceof K){b instanceof K?e=b:(e=c,c=b);e=new L(e,m);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+H(d);break;case "boolean":d=!!H(d);break;case "string":d=H(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return h}return m}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function rb(a,b,c,d){this.w=a;this.L=b;this.t=c;this.u=d}rb.prototype.toString=function(){return this.w};var sb={};function Q(a,b,c,d){if(a in sb)throw Error("Binary operator already created: "+a);a=new rb(a,b,c,d);sb[a.toString()]=a}Q("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});Q("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});Q("*",6,1,function(a,b,c){return M(a,c)*M(b,c)}); -Q("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});Q("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});Q("<",4,2,function(a,b,c){return P(function(a,b){return a<b},a,b,c)});Q(">",4,2,function(a,b,c){return P(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return P(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return P(function(a,b){return a>=b},a,b,c)});Q("=",3,2,function(a,b,c){return P(function(a,b){return a==b},a,b,c,h)}); -Q("!=",3,2,function(a,b,c){return P(function(a,b){return a!=b},a,b,c,h)});Q("and",2,2,function(a,b,c){return O(a,c)&&O(b,c)});Q("or",1,2,function(a,b,c){return O(a,c)||O(b,c)});function tb(a,b,c,d,e,g,k,u,I){this.l=a;this.t=b;this.G=c;this.F=d;this.D=e;this.u=g;this.C=k;this.B=u!==f?u:k;this.I=!!I}tb.prototype.toString=function(){return this.l};var ub={};function R(a,b,c,d,e,g,k,u){if(a in ub)throw Error("Function already created: "+a+".");ub[a]=new tb(a,b,c,d,m,e,g,k,u)}R("boolean",2,m,m,function(a,b){return O(b,a)},1);R("ceiling",1,m,m,function(a,b){return Math.ceil(M(b,a))},1); -R("concat",3,m,m,function(a,b){var c=ma(arguments,1);return ka(c,function(b,c){return b+N(c,a)})},2,l);R("contains",2,m,m,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);R("count",1,m,m,function(a,b){return b.evaluate(a).i},1,1,h);R("false",2,m,m,aa(m),0);R("floor",1,m,m,function(a,b){return Math.floor(M(b,a))},1); -R("id",4,m,m,function(a,b){function c(a){if(G){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return la(b,function(b){return a==b.id})}return l}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),g=[];q(d,function(a){a=c(a);var b;if(b=a){a:if(p(g))b=!p(a)||1!=a.length?-1:g.indexOf(a,0);else{for(b=0;b<g.length;b++)if(b in g&&g[b]===a)break a;b=-1}b=!(0<=b)}b&&g.push(a)});g.sort(Ma);var k=new K;q(g,function(a){k.add(a)});return k},1); -R("lang",2,m,m,aa(m),1);R("last",1,h,m,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);R("local-name",3,m,h,function(a,b){var c=b?pb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);R("name",3,m,h,function(a,b){var c=b?pb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,h);R("namespace-uri",3,h,m,aa(""),0,1,h);R("normalize-space",3,m,h,function(a,b){return(b?N(b,a):H(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -R("not",2,m,m,function(a,b){return!O(b,a)},1);R("number",1,m,h,function(a,b){return b?M(b,a):+H(a.f)},0,1);R("position",1,h,m,function(a){return a.K},0);R("round",1,m,m,function(a,b){return Math.round(M(b,a))},1);R("starts-with",2,m,m,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,m,h,function(a,b){return b?N(b,a):H(a.f)},0,1);R("string-length",1,m,h,function(a,b){return(b?N(b,a):H(a.f)).length},0,1); -R("substring",3,m,m,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,m,m,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -R("substring-before",3,m,m,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,m,m,function(a,b){var c;c=b.evaluate(a);c=new L(c,m);for(var d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,h);R("translate",3,m,m,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);R("true",2,m,m,aa(h),0);function vb(a,b,c,d){this.l=a;this.A=b;this.q=c;this.O=d}vb.prototype.toString=function(){return this.l};var wb={};function S(a,b,c,d){if(a in wb)throw Error("Axis already created: "+a);wb[a]=new vb(a,b,c,!!d)}S("ancestor",function(a,b){for(var c=new K,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},h);S("ancestor-or-self",function(a,b){var c=new K,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},h); -S("attribute",function(a,b){var c=new K,d=a.getName();if("style"==d&&b.style&&G)return c.add(new fb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(m&&a.h===l||"*"==d)for(var d=b.sourceIndex,g=0,k;k=e[g];g++)G?k.nodeValue&&c.add(gb(b,k,d)):c.add(k);else(k=e.getNamedItem(d))&&(G?k.nodeValue&&c.add(gb(b,k,b.sourceIndex)):c.add(k));return c},m);S("child",function(a,b,c,d,e){return(G?mb:nb).call(l,a,b,p(c)?c:l,p(d)?d:l,e||new K)},m,h);S("descendant",hb,m,h); -S("descendant-or-self",function(a,b,c,d){var e=new K;J(b,c,d)&&a.matches(b)&&e.add(b);return hb(a,b,c,d,e)},m,h);S("following",function(a,b,c,d){var e=new K;do for(var g=b;g=g.nextSibling;)J(g,c,d)&&a.matches(g)&&e.add(g),e=hb(a,g,c,d,e);while(b=b.parentNode);return e},m,h);S("following-sibling",function(a,b){for(var c=new K,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);S("namespace",function(){return new K},m); -S("parent",function(a,b){var c=new K;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m);S("preceding",function(a,b,c,d){var e=new K,g=[];do g.unshift(b);while(b=b.parentNode);for(var k=1,u=g.length;k<u;k++){var I=[];for(b=g[k];b=b.previousSibling;)I.unshift(b);for(var T=0,oa=I.length;T<oa;T++)b=I[T],J(b,c,d)&&a.matches(b)&&e.add(b),e=hb(a,b,c,d,e)}return e},h,h); -S("preceding-sibling",function(a,b){for(var c=new K,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},h);S("self",function(a,b){var c=new K;a.matches(b)&&c.add(b);return c},m);function U(a){return(a=a.exec(t()))?a[1]:""}var xb=function(){if(Za)return U(/Firefox\/([0-9.]+)/);if(w||v)return z;if(cb)return U(/Chrome\/([0-9.]+)/);if(db)return U(/Version\/([0-9.]+)/);if(ab||bb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(F)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if($a)return U(/Camino\/([0-9.]+)/)}return""}();var yb,zb;function V(a){return Ab?yb(a):w?0<=ga(D,a):Ga(a)}function Bb(a){Ab?zb(a):F?ga(Cb,a):ga(xb,a)} -var Ab=function(){if(!x)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}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,g=c.version;yb=function(a){return 0<=d.s(e,""+a)};zb=function(a){d.s(g,""+a)};return h}(),Db;if(F){var Eb=/Android\s+([0-9\.]+)/.exec(t());Db=Eb?Eb[1]:"0"}else Db="0"; -var Cb=Db,Fb=w&&!(w&&8<=D),Gb=w&&!(w&&9<=D);F&&Bb(2.3);!v&&(!xa||V("533"));function Hb(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ib(a){var b;Hb(a,"OPTION")?b=h:Hb(a,"INPUT")?(b=a.type.toLowerCase(),b="checkbox"==b||"radio"==b):b=m;if(!b)throw new r(15,"Element is not selectable");b="selected";var c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";if(c=Fb)if(c="value"==b)if(c=Hb(a,"OPTION"))c=Jb(a)===l;c?(b=[],Ra(a,b,m),a=b.join("")):a=a[b];return!!a}var Kb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Lb(a){var b=[];q(a.split(Kb),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return v?b.replace(/\w+:;/g,""):b}function Jb(a){var b;b="value";return"style"==b?Lb(a.style.cssText):Fb&&"value"==b&&Hb(a,"INPUT")?a.value:Gb&&a[b]===h?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:l};xa||v||Ab&&Bb(3.6);w&&V(10);F&&Bb(4);function W(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof W){d=Mb(a);Nb(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.g[a.c[c]])}else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}W.prototype.k=0;W.prototype.z=0;function Mb(a){Nb(a);return a.c.concat()} -function Nb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}W.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; -W.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.z++);this.g[a]=b};var Ob={};function X(a,b,c){da(a)&&(a=x?a.a:v?a.opera:a.b);a=new Pb(a,b,c);if(b&&(!(b in Ob)||c))Ob[b]={key:a,shift:m},c&&(Ob[c]={key:a,shift:h});return a}function Pb(a,b,c){this.code=a;this.r=b||l;this.M=c||this.r}X(8);X(9);X(13);var Qb=X(16),Rb=X(17),Sb=X(18);X(19);X(20);X(27);X(32," ");X(33);X(34);X(35);X(36);X(37);X(38);X(39);X(40);X(44);X(45);X(46);X(48,"0",")");X(49,"1","!");X(50,"2","@");X(51,"3","#");X(52,"4","$");X(53,"5","%");X(54,"6","^");X(55,"7","&");X(56,"8","*");X(57,"9","("); -X(65,"a","A");X(66,"b","B");X(67,"c","C");X(68,"d","D");X(69,"e","E");X(70,"f","F");X(71,"g","G");X(72,"h","H");X(73,"i","I");X(74,"j","J");X(75,"k","K");X(76,"l","L");X(77,"m","M");X(78,"n","N");X(79,"o","O");X(80,"p","P");X(81,"q","Q");X(82,"r","R");X(83,"s","S");X(84,"t","T");X(85,"u","U");X(86,"v","V");X(87,"w","W");X(88,"x","X");X(89,"y","Y");X(90,"z","Z");var Tb=X(ua?{a:91,b:91,opera:219}:ta?{a:224,b:91,opera:17}:{a:0,b:91,opera:l}); -X(ua?{a:92,b:92,opera:220}:ta?{a:224,b:93,opera:17}:{a:0,b:92,opera:l});X(ua?{a:93,b:93,opera:0}:ta?{a:0,b:0,opera:16}:{a:93,b:l,opera:0});X({a:96,b:96,opera:48},"0");X({a:97,b:97,opera:49},"1");X({a:98,b:98,opera:50},"2");X({a:99,b:99,opera:51},"3");X({a:100,b:100,opera:52},"4");X({a:101,b:101,opera:53},"5");X({a:102,b:102,opera:54},"6");X({a:103,b:103,opera:55},"7");X({a:104,b:104,opera:56},"8");X({a:105,b:105,opera:57},"9");X({a:106,b:106,opera:y?56:42},"*");X({a:107,b:107,opera:y?61:43},"+"); -X({a:109,b:109,opera:y?109:45},"-");X({a:110,b:110,opera:y?190:78},".");X({a:111,b:111,opera:y?191:47},"/");X(y&&v?l:144);X(112);X(113);X(114);X(115);X(116);X(117);X(118);X(119);X(120);X(121);X(122);X(123);X({a:107,b:187,opera:61},"=","+");X(108,",");X({a:109,b:189,opera:109},"-","_");X(188,",","<");X(190,".",">");X(191,"/","?");X(192,"`","~");X(219,"[","{");X(220,"\\","|");X(221,"]","}");X({a:59,b:186,opera:59},";",":");X(222,"'",'"');var Y=new W;Y.set(1,Qb);Y.set(2,Rb);Y.set(4,Sb);Y.set(8,Tb); -(function(a){var b=new W;q(Mb(a),function(c){b.set(a.get(c).code,c)});return b})(Y);x&&V(12);function Ub(){this.j=f} -function Vb(a,b,c){switch(typeof b){case "string":Wb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Vb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),Wb(g, -c),c.push(":"),Vb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Xb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Yb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Wb(a,b){b.push('"',a.replace(Yb,function(a){if(a in Xb)return Xb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Xb[a]=e+b.toString(16)}),'"')};xa||v||x&&V(3.5)||w&&V(8);function Zb(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,Zb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=$b(a);return b}if("document"in a)return b={},b.WINDOW=$b(a),b;if(ca(a))return ja(a,Zb);a=Ia(a,function(a,b){return"number"==typeof b||p(b)});return Ja(a,Zb);default:return l}} -function ac(a,b){return"array"==ba(a)?ja(a,function(a){return ac(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?bc(a.ELEMENT,b):"WINDOW"in a?bc(a.WINDOW,b):Ja(a,function(a){return ac(a,b)}):a}function cc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ea());b.m||(b.m=ea());return b}function $b(a){var b=cc(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} -function bc(a,b){a=decodeURIComponent(a);var c=b||document,d=cc(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new r(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function dc(a){var b=Ib;a=[a];var c=window||fa,d;try{var b=p(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=ac(a,c.document),g=b.apply(l,e);d={status:0,value:Zb(g)}}catch(k){d={status:"code"in k?k.code:13,value:{message:k.message}}}b=[];Vb(new Ub,d,b);return b.join("")}var Z=["_"],$=n;!(Z[0]in $)&&$.execScript&&$.execScript("var "+Z[0]);for(var ec;Z.length&&(ec=Z.shift());)!Z.length&&dc!==f?$[ec]=dc:$=$[ec]?$[ec]:$[ec]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){function f(a){return function(){return a}}var k=this; +function l(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function p(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var n=d[h]||"",D=e[h]||"",Q=RegExp("(\\d*)(\\D*)","g"),ka=RegExp("(\\d*)(\\D*)","g");do{var w=Q.exec(n)||["","",""],x=ka.exec(D)||["","",""];if(0==w[0].length&&0==x[0].length)break;c=((0==w[1].length?0:parseInt(w[1],10))<(0==x[1].length?0:parseInt(x[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==x[1].length? +0:parseInt(x[1],10))?1:0)||((0==w[2].length)<(0==x[2].length)?-1:(0==w[2].length)>(0==x[2].length)?1:0)||(w[2]<x[2]?-1:w[2]>x[2]?1:0)}while(0==c)}return c};var da=Array.prototype;function q(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 ea(a,b){for(var c=a.length,d=[],e=0,g=m(a)?a.split(""):a,h=0;h<c;h++)if(h in g){var n=g[h];b.call(void 0,n,h,a)&&(d[e++]=n)}return d}function fa(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(void 0,e[g],g,a));return d} +function ga(a,b){if(a.reduce)return a.reduce(b,"");var c="";q(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function ha(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function ia(a,b,c){return 2>=arguments.length?da.slice.call(a,b):da.slice.call(a,b,c)};function r(a,b){this.code=a;this.state=ja[a]||la;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;r.O=a.prototype;r.prototype=new b})(); +var la="unknown error",ja={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};ja[13]=la;ja[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var s,ma,na,oa,pa,qa;function t(){return k.navigator?k.navigator.userAgent:null}oa=na=ma=s=!1;var ra;if(ra=t()){var sa=k.navigator;s=0==ra.indexOf("Opera");ma=!s&&-1!=ra.indexOf("MSIE");na=!s&&-1!=ra.indexOf("WebKit");oa=!s&&!na&&"Gecko"==sa.product}var u=s,v=ma,y=oa,ta=na,ua,va=k.navigator;ua=va&&va.platform||"";pa=-1!=ua.indexOf("Mac");qa=-1!=ua.indexOf("Win");var z=-1!=ua.indexOf("Linux");function wa(){var a=k.document;return a?a.documentMode:void 0}var A; +a:{var xa="",B;if(u&&k.opera)var ya=k.opera.version,xa="function"==typeof ya?ya():ya;else if(y?B=/rv\:([^\);]+)(\)|;)/:v?B=/MSIE\s+([^\);]+)(\)|;)/:ta&&(B=/WebKit\/(\S+)/),B)var za=B.exec(t()),xa=za?za[1]:"";if(v){var Aa=wa();if(Aa>parseFloat(xa)){A=String(Aa);break a}}A=xa}var Ba={};function Ca(a){return Ba[a]||(Ba[a]=0<=p(A,a))}var Da=k.document,C=Da&&v?wa()||("CSS1Compat"==Da.compatMode?parseInt(A,10):5):void 0;!y&&!v||v&&v&&9<=C||y&&Ca("1.9.1");v&&Ca("9");function Ea(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Fa(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ga(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Ha(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Ia(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!(v&&9<=C)){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,g=b.parentNode;return e==g?Ja(a,b):!c&&Ha(e,b)?-1*Ka(a,b):!d&&Ha(g,a)?Ka(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument|| +a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Ka(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ja(d,a)}function Ja(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var La={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ma={IMG:" ",BR:"\n"}; +function Na(a,b,c){if(!(a.nodeName in La))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ma)b.push(Ma[a.nodeName]);else for(a=a.firstChild;a;)Na(a,b,c),a=a.nextSibling};var Oa,Pa,Qa,Ra,Sa,Ta,Ua;Ua=Ta=Sa=Ra=Qa=Pa=Oa=!1;var E=t();E&&(-1!=E.indexOf("Firefox")?Oa=!0:-1!=E.indexOf("Camino")?Pa=!0:-1!=E.indexOf("iPhone")||-1!=E.indexOf("iPod")?Qa=!0:-1!=E.indexOf("iPad")?Ra=!0:-1!=E.indexOf("Android")?Sa=!0:-1!=E.indexOf("Chrome")?Ta=!0:-1!=E.indexOf("Safari")&&(Ua=!0));var Va=Oa,Wa=Pa,Xa=Qa,Ya=Ra,F=Sa,Za=Ta,$a=Ua;var G=v&&!(v&&9<=C),ab=v&&!(v&&8<=C);function bb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.K=e;this.parentNode=b}function cb(a,b,c){var d=ab&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new bb(b,a,b.nodeName,d,c)};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(G&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),G&&"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} +function I(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}ab&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function db(a,b,c,d,e){return(G?eb:fb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)} +function eb(a,b,c,d,e){if(8==a.h||c&&null===a.h){var g=b.all;if(!g)return e;a=gb(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var h=[],n=0;b=g[n++];)I(b,c,d)&&h.push(b);g=h}for(n=0;b=g[n++];)"*"==a&&"!"==b.tagName||e.add(b);return e}hb(a,b,c,d,e);return e} +function fb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),q(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),q(b,function(a){I(a,c,d)&&e.add(a)}));return e} +function ib(a,b,c,d,e){var g;if((8==a.h||c&&null===a.h)&&(g=b.childNodes)){var h=gb(a);if("*"!=h&&(g=ea(g,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!g))return e;c&&(g=ea(g,function(a){return I(a,c,d)}));q(g,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return jb(a,b,c,d,e)}function jb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b);return e} +function hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b),hb(a,b,c,d,e)}function gb(a){return a.getName()};function J(){this.e=this.d=null;this.i=0}function kb(a){this.p=a;this.next=this.n=null}J.prototype.unshift=function(a){a=new kb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};J.prototype.add=function(a){a=new kb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function lb(a){return(a=a.d)?a.p:null}function mb(a){return(a=lb(a))?H(a):""}function K(a,b){this.I=a;this.o=(this.q=b)?a.e:a.d;this.v=null} +K.prototype.next=function(){var a=this.o;if(null==a)return null;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function L(a,b){var c=a.evaluate(b);return c instanceof J?+mb(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof J?mb(c):""+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?!!c.i:!!c};function O(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof J&&c instanceof J){e=new K(b,!1);for(d=e.next();d;d=e.next())for(b=new K(c,!1),g=b.next();g;g=b.next())if(a(H(d),H(g)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=new K(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+H(d);break;case "boolean":d=!!H(d);break;case "string":d=H(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function nb(a,b,c,d){this.w=a;this.M=b;this.t=c;this.u=d}nb.prototype.toString=function(){return this.w};var ob={};function P(a,b,c,d){if(ob.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new nb(a,b,c,d);ob[a.toString()]=a}P("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});P("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)}); +P("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});P("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});P("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});P("<",4,2,function(a,b,c){return O(function(a,b){return a<b},a,b,c)});P(">",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)}); +P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return N(a,c)&&N(b,c)});P("or",1,2,function(a,b,c){return N(a,c)||N(b,c)});function pb(a,b,c,d,e,g,h,n,D){this.l=a;this.t=b;this.H=c;this.G=d;this.F=e;this.u=g;this.D=h;this.C=void 0!==n?n:h;this.J=!!D}pb.prototype.toString=function(){return this.l};var qb={};function R(a,b,c,d,e,g,h,n){if(qb.hasOwnProperty(a))throw Error("Function already created: "+a+".");qb[a]=new pb(a,b,c,d,!1,e,g,h,n)}R("boolean",2,!1,!1,function(a,b){return N(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1); +R("concat",3,!1,!1,function(a,b){var c=ia(arguments,1);return ga(c,function(b,c){return b+M(c,a)})},2,null);R("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);R("count",1,!1,!1,function(a,b){return b.evaluate(a).i},1,1,!0);R("false",2,!1,!1,f(!1),0);R("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +R("id",4,!1,!1,function(a,b){function c(a){if(G){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.f,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),g=[];q(d,function(a){a=c(a);var b;if(!(b=!a)){a:if(m(g))b=m(a)&&1==a.length?g.indexOf(a,0):-1;else{for(b=0;b<g.length;b++)if(b in g&&g[b]===a)break a;b=-1}b=0<=b}b||g.push(a)});g.sort(Ia);var h=new J;q(g,function(a){h.add(a)});return h},1); +R("lang",2,!1,!1,f(!1),1);R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);R("local-name",3,!1,!0,function(a,b){var c=b?lb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){var c=b?lb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,f(""),0,1,!0); +R("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):H(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);R("not",2,!1,!1,function(a,b){return!N(b,a)},1);R("number",1,!1,!0,function(a,b){return b?L(b,a):+H(a.f)},0,1);R("position",1,!0,!1,function(a){return a.L},0);R("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?M(b,a):H(a.f)},0,1); +R("string-length",1,!1,!0,function(a,b){return(b?M(b,a):H(a.f)).length},0,1);R("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +R("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new K(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);R("true",2,!1,!1,f(!0),0);function rb(a,b,c,d){this.l=a;this.B=b;this.q=c;this.P=d}rb.prototype.toString=function(){return this.l};var sb={};function S(a,b,c,d){if(sb.hasOwnProperty(a))throw Error("Axis already created: "+a);sb[a]=new rb(a,b,c,!!d)}S("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);S("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +S("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&G)return c.add(new bb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,g=0,h;h=e[g];g++)G?h.nodeValue&&c.add(cb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(G?h.nodeValue&&c.add(cb(b,h,b.sourceIndex)):c.add(h));return c},!1);S("child",function(a,b,c,d,e){return(G?ib:jb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new J)},!1,!0);S("descendant",db,!1,!0); +S("descendant-or-self",function(a,b,c,d){var e=new J;I(b,c,d)&&a.matches(b)&&e.add(b);return db(a,b,c,d,e)},!1,!0);S("following",function(a,b,c,d){var e=new J;do for(var g=b;g=g.nextSibling;)I(g,c,d)&&a.matches(g)&&e.add(g),e=db(a,g,c,d,e);while(b=b.parentNode);return e},!1,!0);S("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);S("namespace",function(){return new J},!1); +S("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);S("preceding",function(a,b,c,d){var e=new J,g=[];do g.unshift(b);while(b=b.parentNode);for(var h=1,n=g.length;h<n;h++){var D=[];for(b=g[h];b=b.previousSibling;)D.unshift(b);for(var Q=0,ka=D.length;Q<ka;Q++)b=D[Q],I(b,c,d)&&a.matches(b)&&e.add(b),e=db(a,b,c,d,e)}return e},!0,!0); +S("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);S("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},!1);function T(a){return(a=a.exec(t()))?a[1]:""}var tb=function(){if(Va)return T(/Firefox\/([0-9.]+)/);if(v||u)return A;if(Za)return T(/Chrome\/([0-9.]+)/);if($a)return T(/Version\/([0-9.]+)/);if(Xa||Ya){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(F)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(Wa)return T(/Camino\/([0-9.]+)/)}return""}();var ub,vb;function wb(a){return xb?ub(a):v?0<=p(C,a):Ca(a)}function U(a){xb?vb(a):F?p(yb,a):p(tb,a)}var xb=function(){if(!y)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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,g=c.version;ub=function(a){return 0<=d.s(e,""+a)};vb=function(a){d.s(g,""+a)};return!0}(),zb; +if(F){var Ab=/Android\s+([0-9\.]+)/.exec(t());zb=Ab?Ab[1]:"0"}else zb="0";var yb=zb,Bb=v&&!(v&&8<=C),Cb=v&&!(v&&9<=C);F&&U(2.3);F&&U(4);$a&&U(6);function Db(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Eb(a){var b;Db(a,"OPTION")?b=!0:Db(a,"INPUT")?(b=a.type.toLowerCase(),b="checkbox"==b||"radio"==b):b=!1;if(!b)throw new r(15,"Element is not selectable");b="selected";var c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";if(c=Bb)if(c="value"==b)if(c=Db(a,"OPTION"))c=null===Fb(a);c?(b=[],Na(a,b,!1),a=!b.join("")):a=!a[b];return!a}var Gb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Hb(a){var b=[];q(a.split(Gb),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return u?b.replace(/\w+:;/g,""):b}function Fb(a){var b;b="value";return"style"==b?Hb(a.style.cssText):Bb&&"value"==b&&Db(a,"INPUT")?a.value:Cb&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null};ta||u||xb&&U(3.6);v&&wb(10);F&&U(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V)for(d=Ib(a),Jb(a),e=[],c=0;c<a.c.length;c++)e.push(a.g[a.c[c]]);else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.k=0;V.prototype.A=0;function Ib(a){Jb(a);return a.c.concat()} +function Jb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b}; +V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.A++);this.g[a]=b};var Kb={};function W(a,b,c){ba(a)&&(a=y?a.a:u?a.opera:a.b);a=new Lb(a,b,c);!b||b in Kb&&!c||(Kb[b]={key:a,shift:!1},c&&(Kb[c]={key:a,shift:!0}));return a}function Lb(a,b,c){this.code=a;this.r=b||null;this.N=c||this.r}W(8);W(9);W(13);var Mb=W(16),Nb=W(17),Ob=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","("); +W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Pb=W(qa?{a:91,b:91,opera:219}:pa?{a:224,b:91,opera:17}:{a:0,b:91,opera:null}); +W(qa?{a:92,b:92,opera:220}:pa?{a:224,b:93,opera:17}:{a:0,b:92,opera:null});W(qa?{a:93,b:93,opera:0}:pa?{a:0,b:0,opera:16}:{a:93,b:null,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:z?56:42},"*"); +W({a:107,b:107,opera:z?61:43},"+");W({a:109,b:109,opera:z?109:45},"-");W({a:110,b:110,opera:z?190:78},".");W({a:111,b:111,opera:z?191:47},"/");W(z&&u?null:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Mb); +X.set(2,Nb);X.set(4,Ob);X.set(8,Pb);(function(a){var b=new V;q(Ib(a),function(c){b.set(a.get(c).code,c)});return b})(X);y&&wb(12);function Qb(){this.j=void 0} +function Rb(a,b,c){switch(typeof b){case "string":Sb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==l(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Rb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d), +Sb(g,c),c.push(":"),Rb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Tb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ub=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Sb(a,b){b.push('"',a.replace(Ub,function(a){if(a in Tb)return Tb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Tb[a]=e+b.toString(16)}),'"')};ta||u||y&&wb(3.5)||v&&wb(8);function Vb(a){switch(l(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return fa(a,Vb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Wb(a);return b}if("document"in a)return b={},b.WINDOW=Wb(a),b;if(aa(a))return fa(a,Vb);a=Ea(a,function(a,b){return"number"==typeof b||m(b)});return Fa(a,Vb);default:return null}} +function Xb(a,b){return"array"==l(a)?fa(a,function(a){return Xb(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Yb(a.ELEMENT,b):"WINDOW"in a?Yb(a.WINDOW,b):Fa(a,function(a){return Xb(a,b)}):a}function Zb(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ca());b.m||(b.m=ca());return b}function Wb(a){var b=Zb(a.ownerDocument),c=Ga(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c} +function Yb(a,b){a=decodeURIComponent(a);var c=b||document,d=Zb(c);if(!(a in d))throw new r(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new r(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new r(10,"Element is no longer attached to the DOM");};function $b(a,b){var c=[a],d;try{var e=b?Yb(b.WINDOW):window,g=Xb(c,e.document),h=Eb.apply(null,g);d={status:0,value:Vb(h)}}catch(n){d={status:"code"in n?n.code:13,value:{message:n.message}}}c=[];Rb(new Qb,d,c);return c.join("")}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===$b?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=$b;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/lastupdate b/src/ghostdriver/third_party/webdriver-atoms/lastupdate index 6ee2bcc25..7f097a62a 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/lastupdate +++ b/src/ghostdriver/third_party/webdriver-atoms/lastupdate @@ -1,7 +1,7 @@ -2013-06-17 02:01:14 +2014-01-02 22:06:54 -commit 4e90c975c693adf6252a92f753587b9c534806df (HEAD, tag: refs/tags/selenium-2.33.0) +commit 14fa800511cc5d66d426e08b0b2ab926c7ed7398 (HEAD, tag: refs/tags/selenium-2.39.0) Author: Jim Evans <james.h.evans.jr@gmail.com> -Date: Wed May 22 11:14:19 2013 -0400 +Date: Mon Dec 16 11:26:02 2013 -0500 - Bumping IEDriverServer version resources to 2.33.0.0 + Updating .NET CHANGELOG for 2.39.0 release diff --git a/src/ghostdriver/third_party/webdriver-atoms/move_mouse.js b/src/ghostdriver/third_party/webdriver-atoms/move_mouse.js index ab9dc9e80..312eb55e0 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/move_mouse.js +++ b/src/ghostdriver/third_party/webdriver-atoms/move_mouse.js @@ -1,103 +1,114 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function p(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var l=this; 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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var v=window;function fa(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var q=d[g]||"",y=e[g]||"",H=RegExp("(\\d*)(\\D*)","g"),zb=RegExp("(\\d*)(\\D*)","g");do{var Z=H.exec(q)||["","",""],$=zb.exec(y)||["","",""];if(0==Z[0].length&&0==$[0].length)break;c=((0==Z[1].length?0:parseInt(Z[1],10))<(0==$[1].length?0:parseInt($[1],10))?-1:(0==Z[1].length?0:parseInt(Z[1],10))>(0==$[1].length? -0:parseInt($[1],10))?1:0)||((0==Z[2].length)<(0==$[2].length)?-1:(0==Z[2].length)>(0==$[2].length)?1:0)||(Z[2]<$[2]?-1:Z[2]>$[2]?1:0)}while(0==c)}return c}function ga(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ha=Array.prototype;function w(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var q=f[g];b.call(k,q,g,a)&&(d[e++]=q)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function ka(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function la(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function ma(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function na(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function oa(a){return ha.concat.apply(ha,arguments)} -function pa(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};var qa={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return void 0!==a}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ea(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function fa(a,b,c){return a.call.apply(a.bind,arguments)} +function ga(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)}}function ha(a,b,c){ha=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return ha.apply(null,arguments)} +function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ja=Date.now||function(){return+new Date};function q(a,b){function c(){}c.prototype=b.prototype;a.Ua=b.prototype;a.prototype=new c};var ka=window;function la(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",n=e[g]||"",w=RegExp("(\\d*)(\\D*)","g"),x=RegExp("(\\d*)(\\D*)","g");do{var r=w.exec(k)||["","",""],m=x.exec(n)||["","",""];if(0==r[0].length&&0==m[0].length)break;c=((0==r[1].length?0:parseInt(r[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==r[1].length?0:parseInt(r[1],10))>(0==m[1].length? +0:parseInt(m[1],10))?1:0)||((0==r[2].length)<(0==m[2].length)?-1:(0==r[2].length)>(0==m[2].length)?1:0)||(r[2]<m[2]?-1:r[2]>m[2]?1:0)}while(0==c)}return c}function ma(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var na=Array.prototype;function s(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function oa(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function pa(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function qa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;s(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ra(a,b){for(var c=a.length,d=p(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 sa(a,b){for(var c=a.length,d=p(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 ta(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function ua(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function va(a){return na.concat.apply(na,arguments)}function wa(a,b,c){return 2>=arguments.length?na.slice.call(a,b):na.slice.call(a,b,c)};var xa={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ra="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),sa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function ta(a){ua.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(sa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var ua=/^#(?:[0-9a-f]{3}){1,2}$/i,va=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function wa(a){var b=a.match(va);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var xa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function ya(a){var b=a.match(xa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function x(a,b){this.code=a;this.state=za[a]||Aa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(x,Error); -var Aa="unknown error",za={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};za[13]=Aa;za[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ba,Ca,Da,Ea,Fa,Ga;function Ha(){return r.navigator?r.navigator.userAgent:m}Ea=Da=Ca=Ba=n;var Ia;if(Ia=Ha()){var Ja=r.navigator;Ba=0==Ia.indexOf("Opera");Ca=!Ba&&-1!=Ia.indexOf("MSIE");Da=!Ba&&-1!=Ia.indexOf("WebKit");Ea=!Ba&&!Da&&"Gecko"==Ja.product}var z=Ba,A=Ca,B=Ea,C=Da,Ka,La=r.navigator;Ka=La&&La.platform||"";Fa=-1!=Ka.indexOf("Mac");Ga=-1!=Ka.indexOf("Win");var Ma=-1!=Ka.indexOf("Linux");function Na(){var a=r.document;return a?a.documentMode:k}var Oa; -a:{var Pa="",Qa;if(z&&r.opera)var Ra=r.opera.version,Pa="function"==typeof Ra?Ra():Ra;else if(B?Qa=/rv\:([^\);]+)(\)|;)/:A?Qa=/MSIE\s+([^\);]+)(\)|;)/:C&&(Qa=/WebKit\/(\S+)/),Qa)var Sa=Qa.exec(Ha()),Pa=Sa?Sa[1]:"";if(A){var Ta=Na();if(Ta>parseFloat(Pa)){Oa=String(Ta);break a}}Oa=Pa}var Ua={};function Va(a){return Ua[a]||(Ua[a]=0<=fa(Oa,a))}function D(a){return A&&Wa>=a}var Xa=r.document,Wa=!Xa||!A?k:Na()||("CSS1Compat"==Xa.compatMode?parseInt(Oa,10):5);var Ya;!B&&!A||A&&D(9)||B&&Va("1.9.1");A&&Va("9");var Za=A||z||C;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function $a(a,b){this.width=a;this.height=b}$a.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};$a.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};$a.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};$a.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ab(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function bb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function cb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var db=3;function eb(a){return a?new fb(F(a)):Ya||(Ya=new fb)}function gb(a){var b=!C&&hb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function hb(a){return"CSS1Compat"==a.compatMode}function ib(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function jb(a){if(Za)return a.parentElement;a=a.parentNode;return da(a)&&1==a.nodeType?a:m} -function kb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function lb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?mb(a,b):!c&&kb(e,b)?-1*nb(a,b):!d&&kb(f,a)?nb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function nb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return mb(d,a)}function mb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function ob(a,b){var c=[];return pb(a,b,c,l)?c[0]:k} -function pb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||pb(a,b,c,d))return l;a=a.nextSibling}return n}function qb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function fb(a){this.w=a||r.document||document}fb.prototype.ea=function(a){return t(a)?this.w.getElementById(a):a};function rb(a){return!C&&hb(a.w)?a.w.documentElement:a.w.body}fb.prototype.contains=kb;var sb,tb,ub,vb,wb,xb,yb;yb=xb=wb=vb=ub=tb=sb=n;var Ab=Ha();Ab&&(-1!=Ab.indexOf("Firefox")?sb=l:-1!=Ab.indexOf("Camino")?tb=l:-1!=Ab.indexOf("iPhone")||-1!=Ab.indexOf("iPod")?ub=l:-1!=Ab.indexOf("iPad")?vb=l:-1!=Ab.indexOf("Android")?wb=l:-1!=Ab.indexOf("Chrome")?xb=l:-1!=Ab.indexOf("Safari")&&(yb=l));var Bb=sb,Cb=tb,Db=ub,Eb=vb,Fb=wb,Gb=xb,Hb=yb;function Ib(a,b,c){this.f=a;this.Ba=b||1;this.n=c||1};var Jb=A&&!D(9),Kb=A&&!D(8);function Lb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Mb(a,b,c){var d=Kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Lb(b,a,b.nodeName,d,c)};function Nb(a){this.$=a;this.K=0}function Ob(a){a=a.match(Pb);for(var b=0;b<a.length;b++)Qb.test(a[b])&&a.splice(b,1);return new Nb(a)}var Pb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Qb=/^\s/;function G(a,b){return a.$[a.K+(b||0)]}Nb.prototype.next=function(){return this.$[this.K++]};Nb.prototype.back=function(){this.K--};Nb.prototype.empty=function(){return this.$.length<=this.K};function I(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Jb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Jb&&"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} -function Rb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Kb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Sb(a,b,c,d,e){return(Jb?Tb:Ub).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new J)} -function Tb(a,b,c,d,e){if(a instanceof Vb||8==a.e||c&&a.e===m){var f=b.all;if(!f)return e;a=Wb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],q=0;b=f[q++];)Rb(b,c,d)&&g.push(b);f=g}for(q=0;b=f[q++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Xb(a,b,c,d,e);return e} -function Ub(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof K?Xb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){Rb(a,c,d)&&e.add(a)}));return e} -function Yb(a,b,c,d,e){var f;if((a instanceof Vb||8==a.e||c&&a.e===m)&&(f=b.childNodes)){var g=Wb(a);if("*"!=g&&(f=ia(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ia(f,function(a){return Rb(a,c,d)}));w(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return Zb(a,b,c,d,e)}function Zb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Rb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Xb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Rb(b,c,d)&&a.matches(b)&&e.add(b),Xb(a,b,c,d,e)}function Wb(a){if(a instanceof K){if(8==a.e)return"!";if(a.e===m)return"*"}return a.getName()};function J(){this.n=this.j=m;this.G=0}function $b(a){this.p=a;this.next=this.z=m}function ac(a,b){if(a.j){if(!b.j)return a}else return b;for(var c=a.j,d=b.j,e=m,f=m,g=0;c&&d;)c.p==d.p||c.p instanceof Lb&&d.p instanceof Lb&&c.p.f==d.p.f?(f=c,c=c.next,d=d.next):0<lb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.z=e)?e.next=f:a.j=f,e=f,g++;for(f=c||d;f;)f.z=e,e=e.next=f,g++,f=f.next;a.n=e;a.G=g;return a} -J.prototype.unshift=function(a){a=new $b(a);a.next=this.j;this.n?this.j.z=a:this.j=this.n=a;this.j=a;this.G++};J.prototype.add=function(a){a=new $b(a);a.z=this.n;this.j?this.n.next=a:this.j=this.n=a;this.n=a;this.G++};function bc(a){return(a=a.j)?a.p:m}J.prototype.r=p("G");function cc(a){return(a=bc(a))?I(a):""}function dc(a,b){return new ec(a,!!b)}function ec(a,b){this.ya=a;this.aa=(this.A=b)?a.n:a.j;this.W=m} -ec.prototype.next=function(){var a=this.aa;if(a==m)return m;var b=this.W=a;this.aa=this.A?a.z:a.next;return b.p};ec.prototype.remove=function(){var a=this.ya,b=this.W;b||h(Error("Next must be called at least once before remove."));var c=b.z,b=b.next;c?c.next=b:a.j=b;b?b.z=c:a.n=c;a.G--;this.W=m};function L(a){this.i=a;this.k=this.s=n;this.H=m}L.prototype.g=p("s");function fc(a,b){a.s=b}function gc(a,b){a.k=b}L.prototype.u=p("H");function M(a,b){var c=a.evaluate(b);return c instanceof J?+cc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?cc(c):""+c}function hc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.r():!!c};function ic(a,b,c){L.call(this,a.i);this.Z=a;this.fa=b;this.la=c;this.s=b.g()||c.g();this.k=b.k||c.k;this.Z==jc&&(!c.k&&!c.g()&&4!=c.i&&0!=c.i&&b.u()?this.H={name:b.u().name,B:c}:!b.k&&(!b.g()&&4!=b.i&&0!=b.i&&c.u())&&(this.H={name:c.u().name,B:b}))}u(ic,L); -function kc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof J&&c instanceof J){f=dc(b);for(b=f.next();b;b=f.next()){e=dc(c);for(d=e.next();d;d=e.next())if(a(I(b),I(d)))return l}return n}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=dc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+I(d);break;case "boolean":f=!!I(d);break;case "string":f=I(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}ic.prototype.evaluate=function(a){return this.Z.o(this.fa,this.la,a)};ic.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.Z+"\n";a+=" ";b+=this.fa.toString(a)+"\n";return b+=this.la.toString(a)};function lc(a,b,c,d){this.Aa=a;this.ja=b;this.i=c;this.o=d}lc.prototype.toString=p("Aa");var mc={}; -function O(a,b,c,d){a in mc&&h(Error("Binary operator already created: "+a));a=new lc(a,b,c,d);return mc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return kc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return kc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return kc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return kc(function(a,b){return a>=b},a,b,c)});var jc=O("=",3,2,function(a,b,c){return kc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return kc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return hc(a,c)&&hc(b,c)});O("or",1,2,function(a,b,c){return hc(a,c)||hc(b,c)});function nc(a,b){b.r()&&4!=a.i&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));L.call(this,a.i);this.ka=a;this.d=b;this.s=a.g();this.k=a.k}u(nc,L);nc.prototype.evaluate=function(a){a=this.ka.evaluate(a);return oc(this.d,a)};nc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ka.toString(a);return b+=this.d.toString(a)};function pc(a,b){b.length<a.ha&&h(Error("Function "+a.l+" expects at least"+a.ha+" arguments, "+b.length+" given"));a.X!==m&&b.length>a.X&&h(Error("Function "+a.l+" expects at most "+a.X+" arguments, "+b.length+" given"));a.za&&w(b,function(b,d){4!=b.i&&h(Error("Argument "+d+" to function "+a.l+" is not of type Nodeset: "+b))});L.call(this,a.i);this.J=a;this.Q=b;fc(this,a.s||la(b,function(a){return a.g()}));gc(this,a.xa&&!b.length||a.wa&&!!b.length||la(b,function(a){return a.k}))}u(pc,L); -pc.prototype.evaluate=function(a){return this.J.o.apply(m,oa(a,this.Q))};pc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.J+"\n";b+=" ";this.Q.length&&(a+=b+"Arguments:",b+=" ",a=ka(this.Q,function(a,d){return a+"\n"+d.toString(b)},a));return a};function qc(a,b,c,d,e,f,g,q,y){this.l=a;this.i=b;this.s=c;this.xa=d;this.wa=e;this.o=f;this.ha=g;this.X=s(q)?q:g;this.za=!!y}qc.prototype.toString=p("l");var rc={}; -function P(a,b,c,d,e,f,g,q){a in rc&&h(Error("Function already created: "+a+"."));rc[a]=new qc(a,b,c,d,n,e,f,g,q)}P("boolean",2,n,n,function(a,b){return hc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,n,n,function(a,b){var c=pa(arguments,1);return ka(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).r()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(M(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Jb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ma(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];w(d,function(a){(a=c(a))&&!na(f,a)&&f.push(a)});f.sort(lb);var g=new J;w(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.n},0);P("local-name",3,n,l,function(a,b){var c=b?bc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?bc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):I(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!hc(b,a)},1);P("number",1,n,l,function(a,b){return b?M(b,a):+I(a.f)},0,1);P("position",1,l,n,function(a){return a.Ba},0);P("round",1,n,n,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):I(a.f)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):I(a.f)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=dc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,aa(l),0);function K(a,b){this.na=a;this.ga=s(b)?b:m;this.e=m;switch(a){case "comment":this.e=8;break;case "text":this.e=db;break;case "processing-instruction":this.e=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function sc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return this.e===m||this.e==a.nodeType};K.prototype.getName=p("na"); -K.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.na;this.ga===m||(b+="\n"+this.ga.toString(a+" "));return b};function tc(a){L.call(this,3);this.ma=a.substring(1,a.length-1)}u(tc,L);tc.prototype.evaluate=p("ma");tc.prototype.toString=function(a){return(a||"")+"literal: "+this.ma};function Vb(a){this.l=a.toLowerCase()}Vb.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.l||this.l==a.nodeName.toLowerCase()?l:this.l==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};Vb.prototype.getName=p("l");Vb.prototype.toString=function(a){return(a||"")+"nametest: "+this.l};function uc(a){L.call(this,1);this.oa=a}u(uc,L);uc.prototype.evaluate=p("oa");uc.prototype.toString=function(a){return(a||"")+"number: "+this.oa};function vc(a,b){L.call(this,a.i);this.ca=a;this.I=b;this.s=a.g();this.k=a.k;if(1==this.I.length){var c=this.I[0];!c.U&&c.t==wc&&(c=c.P,"*"!=c.getName()&&(this.H={name:c.getName(),B:m}))}}u(vc,L);function xc(){L.call(this,4)}u(xc,L);xc.prototype.evaluate=function(a){var b=new J;a=a.f;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};xc.prototype.toString=function(a){return a+"RootHelperExpr"};function yc(){L.call(this,4)}u(yc,L);yc.prototype.evaluate=function(a){var b=new J;b.add(a.f);return b}; -yc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -vc.prototype.evaluate=function(a){var b=this.ca.evaluate(a);b instanceof J||h(Error("FilterExpr must evaluate to nodeset."));a=this.I;for(var c=0,d=a.length;c<d&&b.r();c++){var e=a[c],f=dc(b,e.t.A),g;if(!e.g()&&e.t==zc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ib(g))}else if(!e.g()&&e.t==Ac)g=f.next(),b=e.evaluate(new Ib(g));else{g=f.next();for(b=e.evaluate(new Ib(g));(g=f.next())!=m;)g=e.evaluate(new Ib(g)),b=ac(b,g)}}return b}; -vc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ca.toString(b);this.I.length&&(c+=b+"Steps:\n",b+=" ",w(this.I,function(a){c+=a.toString(b)}));return c};function Bc(a,b){this.d=a;this.A=!!b}function oc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=dc(b),f=b.r(),g,q=0;g=e.next();q++){var y=a.A?f-q:q+1;g=d.evaluate(new Ib(g,y,f));var H;"number"==typeof g?H=y==g:"string"==typeof g||"boolean"==typeof g?H=!!g:g instanceof J?H=0<g.r():h(Error("Predicate.evaluate returned an unexpected type."));H||e.remove()}return b}Bc.prototype.u=function(){return 0<this.d.length?this.d[0].u():m}; -Bc.prototype.g=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.g()||1==b.i||0==b.i)return l}return n};Bc.prototype.r=function(){return this.d.length};Bc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return ka(this.d,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Cc(a,b,c,d){L.call(this,4);this.t=a;this.P=b;this.d=c||new Bc([]);this.U=!!d;b=this.d.u();a.Ea&&b&&(a=b.name,a=Jb?a.toLowerCase():a,this.H={name:a,B:b.B});this.s=this.d.g()}u(Cc,L); -Cc.prototype.evaluate=function(a){var b=a.f,c=m,c=this.u(),d=m,e=m,f=0;c&&(d=c.name,e=c.B?N(c.B,a):m,f=1);if(this.U)if(!this.g()&&this.t==Dc)c=Sb(this.P,b,d,e),c=oc(this.d,c,f);else if(a=dc((new Cc(Ec,new K("node"))).evaluate(a)),b=a.next())for(c=this.o(b,d,e,f);(b=a.next())!=m;)c=ac(c,this.o(b,d,e,f));else c=new J;else c=this.o(a.f,d,e,f);return c};Cc.prototype.o=function(a,b,c,d){a=this.t.J(this.P,a,b,c);return a=oc(this.d,a,d)}; -Cc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.U?"//":"/")+"\n";this.t.l&&(b+=a+"Axis: "+this.t+"\n");b+=this.P.toString(a);if(this.d.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.d.length;c++)var d=c<this.d.length-1?", ":"",b=b+(this.d[c].toString(a)+d);return b};function Fc(a,b,c,d){this.l=a;this.J=b;this.A=c;this.Ea=d}Fc.prototype.toString=p("l");var Gc={}; -function Q(a,b,c,d){a in Gc&&h(Error("Axis already created: "+a));b=new Fc(a,b,c,!!d);return Gc[a]=b}Q("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var wc=Q("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&Jb)return c.add(new Lb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof K&&a.e===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Jb?g.nodeValue&&c.add(Mb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Jb?g.nodeValue&&c.add(Mb(b,g,b.sourceIndex)):c.add(g));return c},n),Dc=Q("child",function(a,b,c,d,e){return(Jb?Yb:Zb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new J)},n,l); -Q("descendant",Sb,n,l);var Ec=Q("descendant-or-self",function(a,b,c,d){var e=new J;Rb(b,c,d)&&a.matches(b)&&e.add(b);return Sb(a,b,c,d,e)},n,l),zc=Q("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)Rb(f,c,d)&&a.matches(f)&&e.add(f),e=Sb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new J},n); -var Hc=Q("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Ac=Q("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,q=f.length;g<q;g++){var y=[];for(b=f[g];b=b.previousSibling;)y.unshift(b);for(var H=0,zb=y.length;H<zb;H++)b=y[H],Rb(b,c,d)&&a.matches(b)&&e.add(b),e=Sb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Ic=Q("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},n);function Jc(a){L.call(this,1);this.ba=a;this.s=a.g();this.k=a.k}u(Jc,L);Jc.prototype.evaluate=function(a){return-M(this.ba,a)};Jc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ba.toString(a+" ")};function Kc(a){L.call(this,4);this.M=a;fc(this,la(this.M,function(a){return a.g()}));gc(this,la(this.M,function(a){return a.k}))}u(Kc,L);Kc.prototype.evaluate=function(a){var b=new J;w(this.M,function(c){c=c.evaluate(a);c instanceof J||h(Error("PathExpr must evaluate to NodeSet."));b=ac(b,c)});return b};Kc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";w(this.M,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Lc(a){this.a=a}function Mc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Nc(a);var d=a.a.next();if(!d)break;var e=(d=mc[d]||m)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ja;)b=new ic(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new ic(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&h(Error(b))}function Oc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Pc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Qc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new tc(a)}function Rc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new Vb(a.a.next()+a.a.next()+a.a.next()):new Vb(a.a.next())} -function Sc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new xc;d=new xc;R(a,"Missing next location step.");b=Tc(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Mc(a);R(a,'unclosed "("');Oc(a,")");break;case '"':case "'":b=Qc(a);break;default:if(isNaN(+b))if(!sc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=rc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){R(a,"Missing function argument list.");d.push(Mc(a));if(","!=G(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Pc(a);b=new pc(b,d)}else{b=m;break a}else b=new uc(+a.a.next())}"["==G(a.a)&&(d=new Bc(Uc(a)),b=new nc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=Tc(a,"/"),d=new yc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Tc(a,b),c.push(b);return new vc(d, -c)} -function Tc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Cc(Ic,new K("node")),a.a.next(),d;if(".."==G(a.a))return d=new Cc(Hc,new K("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=wc,a.a.next(),R(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Gc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Dc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){sc(e)||h(Error("Invalid node type: "+e));c=a.a.next();sc(c)||h(Error("Invalid type name: "+c));Oc(a,"(");R(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Qc(a);R(a,"Bad nodetype");Pc(a);c=new K(c,g)}else c=Rc(a);else"*"==e?c=Rc(a):h(Error("Bad token: "+a.a.next()));e=new Bc(Uc(a),f.A);return d||new Cc(f,c,e,"//"==b)} -function Uc(a){for(var b=[];"["==G(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Mc(a);b.push(c);R(a,"Unclosed predicate expression.");Oc(a,"]")}return b}function Nc(a){if("-"==G(a.a))return a.a.next(),new Jc(Nc(a));var b=Sc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Sc(a));a.a.back();a=new Kc(b)}return a};function Vc(a){a.length||h(Error("Empty XPath expression."));a=Ob(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Mc(new Lc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Ib(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof J?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof J))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof J?cc(a):""+a;break;case 1:this.numberValue=a instanceof J?+cc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.r():!!a;break;case 4:case 5:case 6:case 7:var d=dc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Lb?e.f:e);this.snapshotLength=a.r();this.invalidIteratorState=n;break;case 8:case 9:d=bc(a);this.singleNodeValue=d instanceof Lb?d.f:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function Wc(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new Vc(a)).evaluate(b,f)},b.createExpression=function(a){return new Vc(a)})};var T={};T.qa=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.o=function(a,b,c){var d=F(a);(A||Fb)&&Wc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.qa;return A&&!Va(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.T=function(a,b){(!a||1!=a.nodeType)&&h(new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Da=function(a,b){var c=function(){var c=T.o(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.T(c,a);return c}; -T.Ka=function(a,b){var c=function(){var c=T.o(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&T.T(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){T.T(b,a)});return c};function Xc(a){return(a=a.exec(Ha()))?a[1]:""}var Yc=function(){if(Bb)return Xc(/Firefox\/([0-9.]+)/);if(A||z)return Oa;if(Gb)return Xc(/Chrome\/([0-9.]+)/);if(Hb)return Xc(/Version\/([0-9.]+)/);if(Db||Eb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ha());if(a)return a[1]+"."+a[2]}else{if(Fb)return(a=Xc(/Android\s+([0-9.]+)/))?a:Xc(/Version\/([0-9.]+)/);if(Cb)return Xc(/Camino\/([0-9.]+)/)}return""}();var Zc,$c;function ad(a){return bd?Zc(a):A?0<=fa(Wa,a):Va(a)}function cd(a){bd?$c(a):Fb?fa(dd,a):fa(Yc,a)} -var bd=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;Zc=function(a){return 0<=d.sa(e,""+a)};$c=function(a){d.sa(f,""+a)};return l}(),ed;if(Fb){var fd=/Android\s+([0-9\.]+)/.exec(Ha());ed=fd?fd[1]:"0"}else ed="0"; -var dd=ed,gd=A&&!D(8),hd=D(9),id=A&&!D(9),jd=D(10),kd=A&&!D(10);Fb&&cd(2.3);!z&&(!C||ad("533"));function ld(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}ld.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};ld.prototype.contains=function(a){return!this||!a?n:a instanceof ld?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function md(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function nd(a,b){return md(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function od(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=eb(a),b=!hb(b.w);return b?a.body:a.documentElement} -function pd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function qd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=nd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=nd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function rd(a){var b,c=F(a),d=nd(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=od(c);if(a==g)return f;if(a.getBoundingClientRect)b=pd(a),a=eb(c),a=gb(a.w),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==nd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=qd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function sd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=pd(a);b.x=c.left;b.y=c.top}else{var c=eb(a),c=gb(c.w),d=rd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Va(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=nd(a,e));f||(f=nd(a,"transform"));f?(a=f.match(td),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e="function"==ba(a.da),f=a,a.targetTouches?f=a.targetTouches[0]: -e&&a.da().targetTouches&&(f=a.da().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function ud(a){if("none"!=nd(a,"display"))return vd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=vd(a);b.display=c;b.position=e;b.visibility=d;return a}function vd(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=pd(a),new $a(a.right-a.left,a.bottom-a.top)):new $a(b,c)} -var wd={thin:2,medium:4,thick:6};function xd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in wd)d=wd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var td=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function yd(a){return zd(a,l)&&Ad(a)&&!(A||z||B&&!ad("1.9.2")?0:"none"==V(a,"pointer-events"))}var Bd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Cd(a){var b=[];w(a.split(Bd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Dd(a){var b;b="usemap";return"style"==b?Cd(a.style.cssText):gd&&"value"==b&&U(a,"INPUT")?a.value:id&&a[b]===l?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:m}var Ed="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Ad(a){var b=a.tagName.toUpperCase();return!na(Ed,b)?l:a.disabled?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Ad(a.parentNode):qb(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&b.disabled){if(!U(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:ib(a.previousSibling);)if(U(a,"LEGEND"))return l}return n},l)?n:l}function Fd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:m} -function V(a,b){var c=ga(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=id?"styleFloat":"cssFloat";c=md(a,c)||Gd(a,c);if(c===m)c=m;else if(na(ra,b)&&(ua.test("#"==c.charAt(0)?c:"#"+c)||ya(c).length||qa&&qa[c.toLowerCase()]||wa(c).length)){var d=wa(c);if(!d.length){a:if(d=ya(c),!d.length){d=qa[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(ua.test(d)&&(d=ta(d),d=ta(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Gd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=Fd(a))?Gd(c,b):m} -function Hd(a){if("function"==ba(a.getBBox)&&!U(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,"BODY")){b=(F(a)?F(a).parentWindow||F(a).defaultView:window)||k;"hidden"!=V(a,"overflow")?a=l:(a=Fd(a),!a||!U(a,"HTML")?a=l:(a=V(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||v).document;var b=a.documentElement,d=a.body;d||h(new x(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth, -b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m,a);b=new $a(b,a)}else b=(b||window).document,b=hb(b)?b.documentElement:b.body,b=new $a(b.clientWidth,b.clientHeight);return b}return ud(a)} -function zd(a,b){function c(a){if("none"==V(a,"display"))return n;a=Fd(a);return!a||c(a)}function d(a){var b=Hd(a);return 0<b.height&&0<b.width?l:U(a,"PATH")&&(0<b.height||0<b.width)?(b=V(a,"stroke-width"),!!b&&0<parseInt(b,10)):la(a.childNodes,function(b){return b.nodeType==db&&"hidden"!=V(a,"overflow")||U(b)&&d(b)})}function e(a,b){var c;if((c=b==m?jb(a):jb(b))&&("hidden"==V(c,"overflow-x")||"hidden"==V(c,"overflow-y"))){var d=Hd(c),f=sd(c),g=sd(a);return f.x+d.width<=g.x&&"hidden"==V(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==V(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=V(a,"-o-transform")||V(a,"-webkit-transform")||V(a,"-ms-transform")||V(a,"-moz-transform")||V(a,"transform");if(b&&"none"!==b)return b=sd(a),a=Hd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Fd(a);return!a||f(a)}U(a)||h(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var g=qb(a,function(a){return U(a,"SELECT")});return!!g&&zd(g,l)}if(U(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?T.Da('/descendant::*[@usemap = "#'+a.name+'"]',g):ob(g,function(b){return U(b)&&Dd(b)=="#"+a.name});return!!g&&zd(g,b)}return U(a,"AREA")?(g=qb(a,function(a){return U(a,"MAP")}),!!g&&zd(g,b)):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Id(a)||!d(a)||!e(a,m)?n:f(a)} -function Id(a){if(kd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Jd(a)}function Jd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Fd(a))&&(b*=Jd(a));return b};function Kd(a){this.m=v.document.documentElement;this.q=m;var b;a:{var c=F(this.m);try{b=c&&c.activeElement;break a}catch(d){}b=m}b&&Ld(this,b);this.L=a||new Md}Kd.prototype.ea=p("m");function Ld(a,b){a.m=b;a.q=U(b,"OPTION")?qb(b,function(a){return U(a,"SELECT")}):m} -function Nd(a,b){if(A)switch(b){case Od:case Pd:return m;case Qd:case Rd:case Sd:return a.q.multiple?a.q:m;default:return a.q}if(z)switch(b){case Qd:case Od:return a.q.multiple?a.m:m;default:return a.m}if(C)switch(b){case Td:case Ud:return a.q.multiple?a.m:a.q;default:return a.q.multiple?a.m:m}return a.m}C||z||bd&&cd(3.6);function Md(){this.N=0};!A||ad(10);Fb&&cd(4);var Vd=A&&v.navigator.msPointerEnabled;function Wd(a,b,c){this.e=a;this.R=b;this.S=c}Wd.prototype.create=function(a){a=F(a);id?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.R,this.S));return a};Wd.prototype.toString=p("e");function W(a,b,c){Wd.call(this,a,b,c)}u(W,Wd); -W.prototype.create=function(a,b){!B&&this==Xd&&h(new x(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(id){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Yd||this==Od)Object.defineProperty?(c=this==Yd,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==Zd&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=c?c.parentWindow||c.defaultView:window;d=c.createEvent("MouseEvents");c=1;if(this==Zd&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==Xd&&(c=b.wheelDelta);d.initMouseEvent(this.e,this.R,this.S,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=rb(eb(a)),c=od(a),f=b.clientX+ -e.scrollLeft-c.clientLeft,g=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function $d(a,b,c){Wd.call(this,a,b,c)}u($d,Wd); -$d.prototype.create=function(a,b){Vd||h(new x(9,"Browser does not support MSPointer events."));var c=F(a),d=c?c.parentWindow||c.defaultView:window,c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.R,this.S,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.va);return c}; -var Td=new W("click",l,l),Qd=new W("contextmenu",l,l),ae=new W("dblclick",l,l),be=new W("mousedown",l,l),Rd=new W("mousemove",l,n),Yd=new W("mouseout",l,l),Od=new W("mouseover",l,l),Ud=new W("mouseup",l,l),Zd=new W(B?"DOMMouseScroll":"mousewheel",l,l),Xd=new W("MozMousePixelScroll",l,l),ce=new $d("MSPointerDown",l,l),Sd=new $d("MSPointerMove",l,l),Pd=new $d("MSPointerOver",l,l),de=new $d("MSPointerOut",l,l),ee=new $d("MSPointerUp",l,l); -function fe(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return id?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function ge(a,b){this.v={};this.h=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ge){d=he(a);ie(a);e=[];for(c=0;c<a.h.length;c++)e.push(a.v[a.h[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ge.prototype.F=0;ge.prototype.pa=0;function he(a){ie(a);return a.h.concat()} -ge.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.v,a)?(delete this.v[a],this.F--,this.pa++,this.h.length>2*this.F&&ie(this),l):n};function ie(a){if(a.F!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.v,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.F!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}} -ge.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.v,a)?this.v[a]:b};ge.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.v,a)||(this.F++,this.h.push(a),this.pa++);this.v[a]=b};var je={};function X(a,b,c){da(a)&&(a=B?a.b:z?a.opera:a.c);a=new ke(a,b,c);if(b&&(!(b in je)||c))je[b]={key:a,shift:n},c&&(je[c]={key:a,shift:l});return a}function ke(a,b,c){this.code=a;this.ra=b||m;this.Sa=c||this.ra}X(8);X(9);X(13);var le=X(16),me=X(17),ne=X(18);X(19);X(20);X(27);X(32," ");X(33);X(34);X(35);X(36);X(37);X(38);X(39);X(40);X(44);X(45);X(46);X(48,"0",")");X(49,"1","!");X(50,"2","@");X(51,"3","#");X(52,"4","$");X(53,"5","%");X(54,"6","^");X(55,"7","&");X(56,"8","*");X(57,"9","("); -X(65,"a","A");X(66,"b","B");X(67,"c","C");X(68,"d","D");X(69,"e","E");X(70,"f","F");X(71,"g","G");X(72,"h","H");X(73,"i","I");X(74,"j","J");X(75,"k","K");X(76,"l","L");X(77,"m","M");X(78,"n","N");X(79,"o","O");X(80,"p","P");X(81,"q","Q");X(82,"r","R");X(83,"s","S");X(84,"t","T");X(85,"u","U");X(86,"v","V");X(87,"w","W");X(88,"x","X");X(89,"y","Y");X(90,"z","Z");var oe=X(Ga?{b:91,c:91,opera:219}:Fa?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -X(Ga?{b:92,c:92,opera:220}:Fa?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});X(Ga?{b:93,c:93,opera:0}:Fa?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});X({b:96,c:96,opera:48},"0");X({b:97,c:97,opera:49},"1");X({b:98,c:98,opera:50},"2");X({b:99,c:99,opera:51},"3");X({b:100,c:100,opera:52},"4");X({b:101,c:101,opera:53},"5");X({b:102,c:102,opera:54},"6");X({b:103,c:103,opera:55},"7");X({b:104,c:104,opera:56},"8");X({b:105,c:105,opera:57},"9");X({b:106,c:106,opera:Ma?56:42},"*");X({b:107,c:107,opera:Ma?61:43},"+"); -X({b:109,c:109,opera:Ma?109:45},"-");X({b:110,c:110,opera:Ma?190:78},".");X({b:111,c:111,opera:Ma?191:47},"/");X(Ma&&z?m:144);X(112);X(113);X(114);X(115);X(116);X(117);X(118);X(119);X(120);X(121);X(122);X(123);X({b:107,c:187,opera:61},"=","+");X(108,",");X({b:109,c:189,opera:109},"-","_");X(188,",","<");X(190,".",">");X(191,"/","?");X(192,"`","~");X(219,"[","{");X(220,"\\","|");X(221,"]","}");X({b:59,c:186,opera:59},";",":");X(222,"'",'"');var pe=new ge;pe.set(1,le);pe.set(2,me);pe.set(4,ne); -pe.set(8,oe);(function(a){var b=new ge;w(he(a),function(c){b.set(a.get(c).code,c)});return b})(pe);B&&ad(12);function qe(a,b){Kd.call(this,b);this.ua=this.C=m;this.D=new E(0,0);this.V=this.ia=n;if(a){this.C=a.Ha;try{U(a.ta)&&(this.ua=a.ta)}catch(c){this.C=m}this.D=a.Ia;this.ia=a.Qa;this.V=a.Ja;try{U(a.element)&&Ld(this,a.element)}catch(d){this.C=m}}}u(qe,Kd);var Y={}; -id?(Y[Td]=[0,0,0,m],Y[Qd]=[m,m,0,m],Y[Ud]=[1,4,2,m],Y[Yd]=[0,0,0,0],Y[Rd]=[1,4,2,0]):C||hd?(Y[Td]=[0,1,2,m],Y[Qd]=[m,m,2,m],Y[Ud]=[0,1,2,m],Y[Yd]=[0,1,2,0],Y[Rd]=[0,1,2,0]):(Y[Td]=[0,1,2,m],Y[Qd]=[m,m,2,m],Y[Ud]=[0,1,2,m],Y[Yd]=[0,0,0,0],Y[Rd]=[0,0,0,0]);jd&&(Y[ce]=Y[Ud],Y[ee]=Y[Ud],Y[Sd]=[-1,-1,-1,-1],Y[de]=Y[Sd],Y[Pd]=Y[Sd]);Y[ae]=Y[Td];Y[be]=Y[Ud];Y[Od]=Y[Yd];var re={La:ce,Ma:Sd,Na:de,Oa:Pd,Pa:ee}; -qe.prototype.move=function(a,b){var c=yd(a),d=sd(a);this.D.x=b.x+d.x;this.D.y=b.y+d.y;d=this.ea();if(a!=d){try{(F(d)?F(d).parentWindow||F(d).defaultView:window).closed&&(d=m)}catch(e){d=m}if(d){var f=d===v.document.documentElement||d===v.document.body,d=!this.V&&f?m:d;se(this,Yd,a)}Ld(this,a);A||se(this,Od,d,m,c)}se(this,Rd,m,m,c);A&&a!=d&&se(this,Od,d,m,c);this.ia=n}; -function se(a,b,c,d,e){a.V=l;if(jd){var f=re[b],g;if(g=f){g=a.D;var q=te(a,f),y=MSPointerEvent.MSPOINTER_TYPE_MOUSE;!e&&!yd(a.m)?f=n:(c&&!(Pd==f||de==f)&&h(new x(12,"Event type does not allow related target: "+f)),g={clientX:g.x,clientY:g.y,button:q,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:c||m,width:0,height:0,Ca:0,rotation:0,pointerId:1,Fa:0,Ga:0,pointerType:y,va:l},f=(q=a.q?Nd(a,f):a.m)?fe(q,f,g):l);g=!f}if(g)return}f=a.D;g=te(a,b);if(e||yd(a.m))c&&!(Od==b||Yd==b)&&h(new x(12,"Event type does not allow related target: "+ -b)),c={clientX:f.x,clientY:f.y,button:g,altKey:0!=(a.L.N&4),ctrlKey:0!=(a.L.N&2),shiftKey:0!=(a.L.N&1),metaKey:0!=(a.L.N&8),wheelDelta:d||0,relatedTarget:c||m},(a=a.q?Nd(a,b):a.m)&&fe(a,b,c)}function te(a,b){if(!(b in Y))return 0;var c=Y[b][a.C===m?3:a.C];c===m&&h(new x(13,"Event does not permit the specified mouse button."));return c};function ue(a,b){this.x=a;this.y=b}u(ue,E);ue.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ve(a,b,c){zd(a,l)||h(new x(11,"Element is not currently visible and may not be manipulated"));var d=F(a),d=C?d.body:d.documentElement,e;e=rd(a);var f=rd(d),g;if(A){var q=xd(d,"borderLeft");g=xd(d,"borderRight");var y=xd(d,"borderTop"),H=xd(d,"borderBottom");g=new ld(y,g,H,q)}else q=md(d,"borderLeftWidth"),g=md(d,"borderRightWidth"),y=md(d,"borderTopWidth"),H=md(d,"borderBottomWidth"),g=new ld(parseFloat(y),parseFloat(g),parseFloat(H),parseFloat(q));q=e.x-f.x-g.left;e=e.y-f.y-g.top;f=d.clientHeight- -a.offsetHeight;g=d.scrollLeft;y=d.scrollTop;g+=Math.min(q,Math.max(q-(d.clientWidth-a.offsetWidth),0));y+=Math.min(e,Math.max(e-f,0));e=new E(g,y);d.scrollLeft=e.x;d.scrollTop=e.y;b?b=new ue(b.x,b.y):(b=we(a),b=new ue(b.width/2,b.height/2));(c||new qe).move(a,b)}function we(a){var b=ud(a);return 0<b.width&&0<b.height||!a.offsetParent?b:we(a.offsetParent)};function xe(){this.O=k} -function ye(a,b,c){switch(typeof b){case "string":ze(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],ye(a,a.O?a.O.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),ze(f, -c),c.push(":"),ye(a,a.O?a.O.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Ae={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Be=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function ze(a,b){b.push('"',a.replace(Be,function(a){if(a in Ae)return Ae[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ae[a]=e+b.toString(16)}),'"')};C||z||B&&ad(3.5)||A&&ad(8);function Ce(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,Ce);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=De(a);return b}if("document"in a)return b={},b.WINDOW=De(a),b;if(ca(a))return ja(a,Ce);a=ab(a,function(a,b){return"number"==typeof b||t(b)});return bb(a,Ce);default:return m}} -function Ee(a,b){return"array"==ba(a)?ja(a,function(a){return Ee(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?Fe(a.ELEMENT,b):"WINDOW"in a?Fe(a.WINDOW,b):bb(a,function(a){return Ee(a,b)}):a}function Ge(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.Y=ea());b.Y||(b.Y=ea());return b}function De(a){var b=Ge(a.ownerDocument),c=cb(b,function(b){return b==a});c||(c=":wdc:"+b.Y++,b[c]=a);return c} -function Fe(a,b){a=decodeURIComponent(a);var c=b||document,d=Ge(c);a in d||h(new x(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new x(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new x(10,"Element is no longer attached to the DOM"))};function He(a,b){var c=[a,b],d=ve,e;try{var d=t(d)?new v.Function(d):v==window?d:new v.Function("return ("+d+").apply(null,arguments);"),f=Ee(c,v.document),g=d.apply(m,f);e={status:0,value:Ce(g)}}catch(q){e={status:"code"in q?q.code:13,value:{message:q.message}}}c=[];ye(new xe,e,c);return c.join("")}var Ie=["_"],Je=r;!(Ie[0]in Je)&&Je.execScript&&Je.execScript("var "+Ie[0]);for(var Ke;Ie.length&&(Ke=Ie.shift());)!Ie.length&&s(He)?Je[Ke]=He:Je=Je[Ke]?Je[Ke]:Je[Ke]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var ya="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),za=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Aa=/^#(?:[0-9a-f]{3}){1,2}$/i,Ba=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ca=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.state=Da[a]||Ea;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}q(t,Error); +var Ea="unknown error",Da={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Da[13]=Ea;Da[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Fa,Ga,Ha,Ia,Ja,Ka;function La(){return l.navigator?l.navigator.userAgent:null}Ia=Ha=Ga=Fa=!1;var Ma;if(Ma=La()){var Na=l.navigator;Fa=0==Ma.indexOf("Opera");Ga=!Fa&&-1!=Ma.indexOf("MSIE");Ha=!Fa&&-1!=Ma.indexOf("WebKit");Ia=!Fa&&!Ha&&"Gecko"==Na.product}var u=Fa,v=Ga,y=Ia,Oa=Ha,Pa,Qa=l.navigator;Pa=Qa&&Qa.platform||"";Ja=-1!=Pa.indexOf("Mac");Ka=-1!=Pa.indexOf("Win");var Ra=-1!=Pa.indexOf("Linux");function Sa(){var a=l.document;return a?a.documentMode:void 0}var Ta; +a:{var Ua="",Va;if(u&&l.opera)var Wa=l.opera.version,Ua="function"==typeof Wa?Wa():Wa;else if(y?Va=/rv\:([^\);]+)(\)|;)/:v?Va=/MSIE\s+([^\);]+)(\)|;)/:Oa&&(Va=/WebKit\/(\S+)/),Va)var $a=Va.exec(La()),Ua=$a?$a[1]:"";if(v){var ab=Sa();if(ab>parseFloat(Ua)){Ta=String(ab);break a}}Ta=Ua}var bb={};function cb(a){return bb[a]||(bb[a]=0<=la(Ta,a))}function A(a){return v&&db>=a}var eb=l.document,db=eb&&v?Sa()||("CSS1Compat"==eb.compatMode?parseInt(Ta,10):5):void 0;var fb;!y&&!v||v&&A(9)||y&&cb("1.9.1");v&&cb("9");function B(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0}B.prototype.toString=function(){return"("+this.x+", "+this.y+")"};B.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};B.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};B.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function gb(a,b){this.width=a;this.height=b}gb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};gb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};gb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};gb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function hb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ib(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function jb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var kb=3;function lb(a){a=a.document;a=mb(a)?a.documentElement:a.body;return new gb(a.clientWidth,a.clientHeight)}function nb(a){return a?a.parentWindow||a.defaultView:window}function mb(a){return"CSS1Compat"==a.compatMode}function ob(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!A(9)){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?rb(a,b):!c&&pb(e,b)?-1*sb(a,b):!d&&pb(f,a)?sb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(l.Range.START_TO_END,d)}function sb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return rb(d,a)}function rb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function tb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function ub(a){this.w=a||l.document||document}ub.prototype.ia=function(a){return p(a)?this.w.getElementById(a):a};function vb(a){return!Oa&&mb(a.w)?a.w.documentElement:a.w.body||a.w.documentElement}ub.prototype.contains=pb;var wb,xb,yb,zb,Ab,Bb,Cb;Cb=Bb=Ab=zb=yb=xb=wb=!1;var D=La();D&&(-1!=D.indexOf("Firefox")?wb=!0:-1!=D.indexOf("Camino")?xb=!0:-1!=D.indexOf("iPhone")||-1!=D.indexOf("iPod")?yb=!0:-1!=D.indexOf("iPad")?zb=!0:-1!=D.indexOf("Android")?Ab=!0:-1!=D.indexOf("Chrome")?Bb=!0:-1!=D.indexOf("Safari")&&(Cb=!0));var Db=wb,Eb=xb,Fb=yb,Gb=zb,Hb=Ab,Ib=Bb,Jb=Cb;function Kb(a,b,c){this.f=a;this.Ha=b||1;this.n=c||1};var Lb=v&&!A(9),Mb=v&&!A(8);function Nb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function Ob(a,b,c){var d=Mb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Nb(b,a,b.nodeName,d,c)};function Pb(a){this.da=a;this.L=0}function Qb(a){a=a.match(Rb);for(var b=0;b<a.length;b++)Sb.test(a[b])&&a.splice(b,1);return new Pb(a)}var Rb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Sb=/^\s/;function E(a,b){return a.da[a.L+(b||0)]}Pb.prototype.next=function(){return this.da[this.L++]};Pb.prototype.back=function(){this.L--};Pb.prototype.empty=function(){return this.da.length<=this.L};function F(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(Lb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Lb&&"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} +function Tb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Mb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ub(a,b,c,d,e){return(Lb?Vb:Wb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new G)} +function Vb(a,b,c,d,e){if(a instanceof Xb||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=Yb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Tb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Zb(a,b,c,d,e);return e} +function Wb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),s(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),s(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof H?Zb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),s(b,function(a){Tb(a,c,d)&&e.add(a)}));return e} +function $b(a,b,c,d,e){var f;if((a instanceof Xb||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=Yb(a);if("*"!=g&&(f=oa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=oa(f,function(a){return Tb(a,c,d)}));s(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return ac(a,b,c,d,e)}function ac(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Tb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Zb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Tb(b,c,d)&&a.matches(b)&&e.add(b),Zb(a,b,c,d,e)}function Yb(a){if(a instanceof H){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function G(){this.n=this.j=null;this.H=0}function bc(a){this.q=a;this.next=this.A=null}function cc(a,b){if(!a.j)return b;if(!b.j)return a;for(var c=a.j,d=b.j,e=null,f=null,g=0;c&&d;)c.q==d.q||c.q instanceof Nb&&d.q instanceof Nb&&c.q.f==d.q.f?(f=c,c=c.next,d=d.next):0<qb(c.q,d.q)?(f=d,d=d.next):(f=c,c=c.next),(f.A=e)?e.next=f:a.j=f,e=f,g++;for(f=c||d;f;)f.A=e,e=e.next=f,g++,f=f.next;a.n=e;a.H=g;return a} +G.prototype.unshift=function(a){a=new bc(a);a.next=this.j;this.n?this.j.A=a:this.j=this.n=a;this.j=a;this.H++};G.prototype.add=function(a){a=new bc(a);a.A=this.n;this.j?this.n.next=a:this.j=this.n=a;this.n=a;this.H++};function dc(a){return(a=a.j)?a.q:null}G.prototype.p=h("H");function ec(a){return(a=dc(a))?F(a):""}function fc(a,b){return new gc(a,!!b)}function gc(a,b){this.Da=a;this.ea=(this.B=b)?a.n:a.j;this.Z=null} +gc.prototype.next=function(){var a=this.ea;if(null==a)return null;var b=this.Z=a;this.ea=this.B?a.A:a.next;return b.q};gc.prototype.remove=function(){var a=this.Da,b=this.Z;if(!b)throw Error("Next must be called at least once before remove.");var c=b.A,b=b.next;c?c.next=b:a.j=b;b?b.A=c:a.n=c;a.H--;this.Z=null};function J(a){this.i=a;this.k=this.s=!1;this.I=null}function K(a){return"\n "+a.toString().split("\n").join("\n ")}J.prototype.g=h("s");function hc(a,b){a.s=b}function ic(a,b){a.k=b}J.prototype.u=h("I");function L(a,b){var c=a.evaluate(b);return c instanceof G?+ec(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof G?ec(c):""+c}function jc(a,b){var c=a.evaluate(b);return c instanceof G?!!c.p():!!c};function kc(a,b,c){J.call(this,a.i);this.ca=a;this.ka=b;this.qa=c;this.s=b.g()||c.g();this.k=b.k||c.k;this.ca==lc&&(c.k||c.g()||4==c.i||0==c.i||!b.u()?b.k||(b.g()||4==b.i||0==b.i||!c.u())||(this.I={name:c.u().name,C:b}):this.I={name:b.u().name,C:c})}q(kc,J); +function mc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof G&&c instanceof G){e=fc(b);for(d=e.next();d;d=e.next())for(b=fc(c),f=b.next();f;f=b.next())if(a(F(d),F(f)))return!0;return!1}if(b instanceof G||c instanceof G){b instanceof G?e=b:(e=c,c=b);e=fc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+F(d);break;case "boolean":d=!!F(d);break;case "string":d=F(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}kc.prototype.evaluate=function(a){return this.ca.o(this.ka,this.qa,a)};kc.prototype.toString=function(){var a="Binary Expression: "+this.ca,a=a+K(this.ka);return a+=K(this.qa)};function nc(a,b,c,d){this.Ga=a;this.oa=b;this.i=c;this.o=d}nc.prototype.toString=h("Ga");var oc={}; +function N(a,b,c,d){if(oc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new nc(a,b,c,d);return oc[a.toString()]=a}N("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});N("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});N("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});N("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});N("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});N("<",4,2,function(a,b,c){return mc(function(a,b){return a<b},a,b,c)}); +N(">",4,2,function(a,b,c){return mc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return mc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return mc(function(a,b){return a>=b},a,b,c)});var lc=N("=",3,2,function(a,b,c){return mc(function(a,b){return a==b},a,b,c,!0)});N("!=",3,2,function(a,b,c){return mc(function(a,b){return a!=b},a,b,c,!0)});N("and",2,2,function(a,b,c){return jc(a,c)&&jc(b,c)});N("or",1,2,function(a,b,c){return jc(a,c)||jc(b,c)});function pc(a,b){if(b.p()&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.i);this.pa=a;this.d=b;this.s=a.g();this.k=a.k}q(pc,J);pc.prototype.evaluate=function(a){a=this.pa.evaluate(a);return qc(this.d,a)};pc.prototype.toString=function(){var a;a="Filter:"+K(this.pa);return a+=K(this.d)};function rc(a,b){if(b.length<a.ma)throw Error("Function "+a.m+" expects at least"+a.ma+" arguments, "+b.length+" given");if(null!==a.$&&b.length>a.$)throw Error("Function "+a.m+" expects at most "+a.$+" arguments, "+b.length+" given");a.Ea&&s(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.m+" is not of type Nodeset: "+b);});J.call(this,a.i);this.K=a;this.R=b;hc(this,a.s||ra(b,function(a){return a.g()}));ic(this,a.Ca&&!b.length||a.Ba&&!!b.length||ra(b,function(a){return a.k}))} +q(rc,J);rc.prototype.evaluate=function(a){return this.K.o.apply(null,va(a,this.R))};rc.prototype.toString=function(){var a="Function: "+this.K;if(this.R.length)var b=qa(this.R,function(a,b){return a+K(b)},"Arguments:"),a=a+K(b);return a};function sc(a,b,c,d,e,f,g,k,n){this.m=a;this.i=b;this.s=c;this.Ca=d;this.Ba=e;this.o=f;this.ma=g;this.$=ca(k)?k:g;this.Ea=!!n}sc.prototype.toString=h("m");var tc={}; +function O(a,b,c,d,e,f,g,k){if(tc.hasOwnProperty(a))throw Error("Function already created: "+a+".");tc[a]=new sc(a,b,c,d,!1,e,f,g,k)}O("boolean",2,!1,!1,function(a,b){return jc(b,a)},1);O("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1);O("concat",3,!1,!1,function(a,b){var c=wa(arguments,1);return qa(c,function(b,c){return b+M(c,a)},"")},2,null);O("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2); +O("count",1,!1,!1,function(a,b){return b.evaluate(a).p()},1,1,!0);O("false",2,!1,!1,aa(!1),0);O("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +O("id",4,!1,!1,function(a,b){function c(a){if(Lb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ta(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];s(d,function(a){(a=c(a))&&!ua(f,a)&&f.push(a)});f.sort(qb);var g=new G;s(f,function(a){g.add(a)});return g},1);O("lang",2,!1,!1,aa(!1),1); +O("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.n},0);O("local-name",3,!1,!0,function(a,b){var c=b?dc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);O("name",3,!1,!0,function(a,b){var c=b?dc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);O("namespace-uri",3,!0,!1,aa(""),0,1,!0);O("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):F(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +O("not",2,!1,!1,function(a,b){return!jc(b,a)},1);O("number",1,!1,!0,function(a,b){return b?L(b,a):+F(a.f)},0,1);O("position",1,!0,!1,function(a){return a.Ha},0);O("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);O("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,!1,!0,function(a,b){return b?M(b,a):F(a.f)},0,1);O("string-length",1,!1,!0,function(a,b){return(b?M(b,a):F(a.f)).length},0,1); +O("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +O("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,!1,!1,function(a,b){for(var c=fc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+F(e);return d},1,1,!0);O("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(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);O("true",2,!1,!1,aa(!0),0);function H(a,b){this.sa=a;this.la=ca(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=kb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function uc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}H.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};H.prototype.getName=h("sa"); +H.prototype.toString=function(){var a="Kind Test: "+this.sa;null===this.la||(a+=K(this.la));return a};function vc(a){J.call(this,3);this.ra=a.substring(1,a.length-1)}q(vc,J);vc.prototype.evaluate=h("ra");vc.prototype.toString=function(){return"Literal: "+this.ra};function Xb(a,b){this.m=a.toLowerCase();this.aa=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Xb.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.m&&this.m!=a.nodeName.toLowerCase()?!1:this.aa==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Xb.prototype.getName=h("m");Xb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.aa?"":this.aa+":")+this.m};function wc(a){J.call(this,1);this.ta=a}q(wc,J);wc.prototype.evaluate=h("ta");wc.prototype.toString=function(){return"Number: "+this.ta};function xc(a,b){J.call(this,a.i);this.ha=a;this.J=b;this.s=a.g();this.k=a.k;if(1==this.J.length){var c=this.J[0];c.V||c.t!=yc||(c=c.Q,"*"!=c.getName()&&(this.I={name:c.getName(),C:null}))}}q(xc,J);function zc(){J.call(this,4)}q(zc,J);zc.prototype.evaluate=function(a){var b=new G;a=a.f;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};zc.prototype.toString=aa("Root Helper Expression");function Ac(){J.call(this,4)}q(Ac,J);Ac.prototype.evaluate=function(a){var b=new G;b.add(a.f);return b}; +Ac.prototype.toString=aa("Context Helper Expression"); +xc.prototype.evaluate=function(a){var b=this.ha.evaluate(a);if(!(b instanceof G))throw Error("Filter expression must evaluate to nodeset.");a=this.J;for(var c=0,d=a.length;c<d&&b.p();c++){var e=a[c],f=fc(b,e.t.B),g;if(e.g()||e.t!=Bc)if(e.g()||e.t!=Cc)for(g=f.next(),b=e.evaluate(new Kb(g));null!=(g=f.next());)g=e.evaluate(new Kb(g)),b=cc(b,g);else g=f.next(),b=e.evaluate(new Kb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Kb(g))}}return b}; +xc.prototype.toString=function(){var a;a="Path Expression:"+K(this.ha);if(this.J.length){var b=qa(this.J,function(a,b){return a+K(b)},"Steps:");a+=K(b)}return a};function Dc(a,b){this.d=a;this.B=!!b}function qc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=fc(b),f=b.p(),g,k=0;g=e.next();k++){var n=a.B?f-k:k+1;g=d.evaluate(new Kb(g,n,f));if("number"==typeof g)n=n==g;else if("string"==typeof g||"boolean"==typeof g)n=!!g;else if(g instanceof G)n=0<g.p();else throw Error("Predicate.evaluate returned an unexpected type.");n||e.remove()}return b}Dc.prototype.u=function(){return 0<this.d.length?this.d[0].u():null}; +Dc.prototype.g=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.g()||1==b.i||0==b.i)return!0}return!1};Dc.prototype.p=function(){return this.d.length};Dc.prototype.toString=function(){return qa(this.d,function(a,b){return a+K(b)},"Predicates:")};function Ec(a,b,c,d){J.call(this,4);this.t=a;this.Q=b;this.d=c||new Dc([]);this.V=!!d;b=this.d.u();a.Ka&&b&&(a=b.name,a=Lb?a.toLowerCase():a,this.I={name:a,C:b.C});this.s=this.d.g()}q(Ec,J); +Ec.prototype.evaluate=function(a){var b=a.f,c=null,c=this.u(),d=null,e=null,f=0;c&&(d=c.name,e=c.C?M(c.C,a):null,f=1);if(this.V)if(this.g()||this.t!=Fc)if(a=fc((new Ec(Gc,new H("node"))).evaluate(a)),b=a.next())for(c=this.o(b,d,e,f);null!=(b=a.next());)c=cc(c,this.o(b,d,e,f));else c=new G;else c=Ub(this.Q,b,d,e),c=qc(this.d,c,f);else c=this.o(a.f,d,e,f);return c};Ec.prototype.o=function(a,b,c,d){a=this.t.K(this.Q,a,b,c);return a=qc(this.d,a,d)}; +Ec.prototype.toString=function(){var a;a="Step:"+K("Operator: "+(this.V?"//":"/"));this.t.m&&(a+=K("Axis: "+this.t));a+=K(this.Q);if(this.d.p()){var b=qa(this.d.d,function(a,b){return a+K(b)},"Predicates:");a+=K(b)}return a};function Hc(a,b,c,d){this.m=a;this.K=b;this.B=c;this.Ka=d}Hc.prototype.toString=h("m");var Ic={};function P(a,b,c,d){if(Ic.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Hc(a,b,c,!!d);return Ic[a]=b} +P("ancestor",function(a,b){for(var c=new G,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);P("ancestor-or-self",function(a,b){var c=new G,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var yc=P("attribute",function(a,b){var c=new G,d=a.getName();if("style"==d&&b.style&&Lb)return c.add(new Nb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof H&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Lb?g.nodeValue&&c.add(Ob(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Lb?g.nodeValue&&c.add(Ob(b,g,b.sourceIndex)):c.add(g));return c},!1),Fc=P("child",function(a,b,c,d,e){return(Lb?$b:ac).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new G)}, +!1,!0);P("descendant",Ub,!1,!0);var Gc=P("descendant-or-self",function(a,b,c,d){var e=new G;Tb(b,c,d)&&a.matches(b)&&e.add(b);return Ub(a,b,c,d,e)},!1,!0),Bc=P("following",function(a,b,c,d){var e=new G;do for(var f=b;f=f.nextSibling;)Tb(f,c,d)&&a.matches(f)&&e.add(f),e=Ub(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);P("following-sibling",function(a,b){for(var c=new G,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);P("namespace",function(){return new G},!1); +var Jc=P("parent",function(a,b){var c=new G;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Cc=P("preceding",function(a,b,c,d){var e=new G,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var n=[];for(b=f[g];b=b.previousSibling;)n.unshift(b);for(var w=0,x=n.length;w<x;w++)b=n[w],Tb(b,c,d)&&a.matches(b)&&e.add(b),e=Ub(a,b,c,d,e)}return e},!0,!0); +P("preceding-sibling",function(a,b){for(var c=new G,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Kc=P("self",function(a,b){var c=new G;a.matches(b)&&c.add(b);return c},!1);function Lc(a){J.call(this,1);this.ga=a;this.s=a.g();this.k=a.k}q(Lc,J);Lc.prototype.evaluate=function(a){return-L(this.ga,a)};Lc.prototype.toString=function(){return"Unary Expression: -"+K(this.ga)};function Mc(a){J.call(this,4);this.N=a;hc(this,ra(this.N,function(a){return a.g()}));ic(this,ra(this.N,function(a){return a.k}))}q(Mc,J);Mc.prototype.evaluate=function(a){var b=new G;s(this.N,function(c){c=c.evaluate(a);if(!(c instanceof G))throw Error("Path expression must evaluate to NodeSet.");b=cc(b,c)});return b};Mc.prototype.toString=function(){return qa(this.N,function(a,b){return a+K(b)},"Union Expression:")};function Nc(a,b){this.a=a;this.Fa=b}function Oc(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=Pc(a);var d=a.a.next();if(!d)break;var e=(d=oc[d]||null)&&d.oa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].oa;)b=new kc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new kc(c.pop(),c.pop(),b);return b}function Q(a,b){if(a.a.empty())throw Error(b);}function Qc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Rc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Sc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new vc(a)}function Tc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Xb(b);var d=b.substring(0,c);a=a.Fa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Xb(b,a)} +function Uc(a){var b,c=[],d;if("/"==E(a.a)||"//"==E(a.a)){b=a.a.next();d=E(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new zc;d=new zc;Q(a,"Missing next location step.");b=Vc(a,b);c.push(b)}else{a:{b=E(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Oc(a);Q(a,'unclosed "("');Qc(a,")");break;case '"':case "'":b=Sc(a);break;default:if(isNaN(+b))if(!uc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==E(a.a,1)){b=a.a.next();b=tc[b]||null;a.a.next();for(d=[];")"!=E(a.a);){Q(a,"Missing function argument list.");d.push(Oc(a));if(","!=E(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");Rc(a);b=new rc(b,d)}else{b=null;break a}else b=new wc(+a.a.next())}"["==E(a.a)&&(d=new Dc(Wc(a)),b=new pc(b,d))}if(b)if("/"==E(a.a)||"//"==E(a.a))d=b;else return b;else b=Vc(a,"/"),d=new Ac,c.push(b)}for(;"/"==E(a.a)||"//"==E(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=Vc(a,b),c.push(b); +return new xc(d,c)} +function Vc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==E(a.a))return d=new Ec(Kc,new H("node")),a.a.next(),d;if(".."==E(a.a))return d=new Ec(Jc,new H("node")),a.a.next(),d;var f;if("@"==E(a.a))f=yc,a.a.next(),Q(a,"Missing attribute name");else if("::"==E(a.a,1)){if(!/(?![0-9])[\w]/.test(E(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Ic[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();Q(a,"Missing node name")}else f=Fc; +c=E(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==E(a.a,1)){if(!uc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!uc(c))throw Error("Invalid type name: "+c);Qc(a,"(");Q(a,"Bad nodetype");e=E(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Sc(a);Q(a,"Bad nodetype");Rc(a);c=new H(c,g)}else c=Tc(a);else if("*"==c)c=Tc(a);else throw Error("Bad token: "+a.a.next());e=new Dc(Wc(a),f.B);return d||new Ec(f,c,e,"//"==b)} +function Wc(a){for(var b=[];"["==E(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=Oc(a);b.push(c);Q(a,"Unclosed predicate expression.");Qc(a,"]")}return b}function Pc(a){if("-"==E(a.a))return a.a.next(),new Lc(Pc(a));var b=Uc(a);if("|"!=E(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push(Uc(a));a.a.back();a=new Mc(b)}return a};function Xc(a){switch(a.nodeType){case 1:return ia(Yc,a);case 9:return Xc(a.documentElement);case 2:return a.ownerElement?Xc(a.ownerElement):Zc;case 11:case 10:case 6:case 12:return Zc;default:return a.parentNode?Xc(a.parentNode):Zc}}function Zc(){return null}function Yc(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?Yc(a.parentNode,b):null};function $c(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Qb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=ha(b.lookupNamespaceURI,b)):b=aa(null);var d=Oc(new Nc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Kb(a));return new R(c,b)}} +function R(a,b){if(0==b)if(a instanceof G)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 G))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof G?ec(a):""+a;break;case 1:this.numberValue=a instanceof G?+ec(a):+a;break;case 3:this.booleanValue=a instanceof G?0<a.p():!!a;break;case 4:case 5:case 6:case 7:var d= +fc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Nb?e.f:e);this.snapshotLength=a.p();this.invalidIteratorState=!1;break;case 8:case 9:d=dc(a);this.singleNodeValue=d instanceof Nb?d.f:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function ad(a){this.lookupNamespaceURI=Xc(a)} +function bd(a){a=a||l;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new $c(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new $c(a,b)},b.createNSResolver=function(a){return new ad(a)})};var S={};S.va=function(){var a={Va:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();S.o=function(a,b,c){var d=C(a);(v||Hb)&&bd(nb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.va;return v&&!cb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!y||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +S.U=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};S.Ja=function(a,b){var c=function(){var c=S.o(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||S.U(c,a);return c}; +S.Qa=function(a,b){var c=function(){var c=S.o(b,a,7);if(c){var e=c.snapshotLength;u&&!ca(e)&&S.U(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();s(c,function(b){S.U(b,a)});return c};function cd(a){return(a=a.exec(La()))?a[1]:""}var dd=function(){if(Db)return cd(/Firefox\/([0-9.]+)/);if(v||u)return Ta;if(Ib)return cd(/Chrome\/([0-9.]+)/);if(Jb)return cd(/Version\/([0-9.]+)/);if(Fb||Gb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(La());if(a)return a[1]+"."+a[2]}else{if(Hb)return(a=cd(/Android\s+([0-9.]+)/))?a:cd(/Version\/([0-9.]+)/);if(Eb)return cd(/Camino\/([0-9.]+)/)}return""}();var ed,fd;function gd(a){return hd?ed(a):v?0<=la(db,a):cb(a)}function id(a){hd?fd(a):Hb?la(jd,a):la(dd,a)} +var hd=function(){if(!y)return!1;var a=l.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ed=function(a){return 0<=d.xa(e,""+a)};fd=function(a){d.xa(f,""+a)};return!0}(),kd;if(Hb){var ld=/Android\s+([0-9\.]+)/.exec(La());kd=ld?ld[1]:"0"}else kd="0"; +var jd=kd,md=A(9),nd=v&&!A(9),od=A(10),pd=v&&!A(10);Hb&&id(2.3);Hb&&id(4);Jb&&id(6);function qd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}qd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};qd.prototype.contains=function(a){return this&&a?a instanceof qd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +qd.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};qd.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +qd.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function T(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}T.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};T.prototype.contains=function(a){return a instanceof T?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +T.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};T.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +T.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function rd(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function sd(a){a=a?C(a):document;var b;(b=!v)||(b=A(9))||(b=a?new ub(C(a)):fb||(fb=new ub),b=mb(b.w));return b?a.documentElement:a.body} +function td(a){var b=a.offsetWidth,c=a.offsetHeight,d=Oa&&!b&&!c;if((!ca(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}v&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new gb(e.right-e.left,e.bottom-e.top)}return new gb(b,c)}var ud={thin:2,medium:4,thick:6}; +function vd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in ud)d=ud[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function wd(a){return xd(a,!0)&&yd(a)&&!(v||u||y&&!gd("1.9.2")?0:"none"==V(a,"pointer-events"))}var zd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function yd(a){var b=a.tagName.toUpperCase();return ua(zd,b)?a.disabled?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?yd(a.parentNode):!tb(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&b.disabled){if(!U(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:ob(a.previousSibling);)if(U(a,"LEGEND"))return!0}return!1},!0):!0} +function Ad(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:null} +function V(a,b){var c=ma(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=nd?"styleFloat":"cssFloat";var d=rd(a,c)||Bd(a,c);if(null===d)d=null;else if(ua(ya,c)){b:{var e=d.match(Ba);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ca))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=xa[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(za,"#$1$1$2$2$3$3")),!Aa.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Bd(a,b){var c=a.currentStyle||a.style,d=c[b];!ca(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?ca(d)?d:null:(c=Ad(a))?Bd(c,b):null} +function xd(a,b){function c(a){if("none"==V(a,"display"))return!1;a=Ad(a);return!a||c(a)}function d(a){var b=Cd(a);return 0<b.height&&0<b.width?!0:U(a,"PATH")&&(0<b.height||0<b.width)?(a=V(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=V(a,"overflow")&&ra(a.childNodes,function(a){return a.nodeType==kb||U(a)&&d(a)})}function e(a){return Dd(a)==W&&sa(a.childNodes,function(a){return!U(a)||e(a)})}if(!U(a))throw Error("Argument to isShown must be of type Element");if(U(a,"OPTION")||U(a,"OPTGROUP")){var f= +tb(a,function(a){return U(a,"SELECT")});return!!f&&xd(f,!0)}return(f=Ed(a))?!!f.ja&&0<f.rect.width&&0<f.rect.height&&xd(f.ja,b):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Fd(a)||!d(a)?!1:!e(a)}var W="hidden"; +function Dd(a,b){function c(a){var b=V(a,"position");if("fixed"==b)return x=!0,a==k?null:k;for(a=Ad(a);a&&a!=k&&(0==V(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==V(a,"position"));)a=Ad(a);return a}function d(a){var b=a;if("visible"==w)if(a==k&&n)b=n;else if(a==n)return{x:"visible",y:"visible"};b={x:V(b,"overflow-x"),y:V(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new ub(g)).w;a=!Oa&&mb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=v&&cb("10")&&b.pageYOffset!=a.scrollTop?new B(a.scrollLeft,a.scrollTop):new B(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new B(a.scrollLeft,a.scrollTop);return a}for(var f=Gd(a,b),g=C(a),k=g.documentElement,n=g.body,w=V(k,"overflow"),x,r=c(a);r;r=c(r)){var m=d(r);if("visible"!=m.x||"visible"!=m.y){var z=Cd(r);if(0==z.width||0==z.height)return W;var I=f.right<z.left,Y=f.bottom<z.top;if(I&&"hidden"==m.x||Y&&"hidden"==m.y)return W; +if(I&&"visible"!=m.x||Y&&"visible"!=m.y){I=e(r);Y=f.bottom<z.top-I.y;if(f.right<z.left-I.x&&"visible"!=m.x||Y&&"visible"!=m.x)return W;f=Dd(r);return f==W?W:"scroll"}I=f.left>=z.left+z.width;z=f.top>=z.top+z.height;if(I&&"hidden"==m.x||z&&"hidden"==m.y)return W;if(I&&"visible"!=m.x||z&&"visible"!=m.y){if(x&&(m=e(r),f.left>=k.scrollWidth-m.x||f.right>=k.scrollHeight-m.y))return W;f=Dd(r);return f==W?W:"scroll"}}}return"none"}var Hd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Cd(a){function b(a){var c=nb(C(a)).getComputedStyle(a,null).MozTransform.match(Hd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),x=parseFloat(c[3]),r=parseFloat(c[4]),m=parseFloat(c[5]),c=parseFloat(c[6]),z=f.left+f.width,I=f.top+f.height,Y=f.left*d,d=z*d,Xa=f.left*e,e=z*e,Ya=f.top*x,x=I*x,Za=f.top*r,z=I*r,I=Y+Ya+m,r=Xa+Za+c,Ya=d+Ya+m,Za=e+Za+c,Y=Y+x+m,Xa=Xa+z+c,m=d+x+m,c=e+z+c;f.left=Math.min(I,Ya,Y,m);f.top=Math.min(r,Za,Xa,c);m=Math.max(I,Ya,Y,m);c=Math.max(r,Za,Xa,c);f.width=m-f.left; +f.height=c-f.top}(a=Ad(a))&&b(a)}var c=Ed(a);if(c)return c.rect;if(U(a,"HTML"))return c=C(a),a=lb(nb(c)||window),new T(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new T(0,0,0,0)}var f=new T(d.left,d.top,d.right-d.left,d.bottom-d.top);v&&a.ownerDocument.body&&(c=C(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height= +a.offsetHeight));y&&!gd(12)&&b(a);return f} +function Ed(a){var b=U(a,"MAP");if(!b&&!U(a,"AREA"))return null;var c=b?a:U(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=S.Ja('/descendant::*[@usemap = "#'+c.name+'"]',C(c)))&&(e=Cd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Id(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new T(a+e.left,b+e.top,c,f)}return{ja:d,rect:e||new T(0,0,0,0)}} +function Id(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new T(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new T(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 T(b,c,d-b,e-c)}return new T(0,0,0,0)} +function Gd(a,b){var c;c=Cd(a);c=new qd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof T?b:new T(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Fd(a){if(pd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Jd(a)}function Jd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Ad(a))&&(b*=Jd(a));return b};function Kd(a,b){this.l=ka.document.documentElement;this.r=null;var c;a:{var d=C(this.l);try{c=d&&d.activeElement;break a}catch(e){}c=null}(c=v&&c&&"undefined"===typeof c.nodeType?null:c)&&Ld(this,c);this.M=a||new Md;this.fa=b||new Nd}Kd.prototype.ia=h("l");function Ld(a,b){a.l=b;a.r=U(b,"OPTION")?tb(b,function(a){return U(a,"SELECT")}):null} +Kd.prototype.X=function(a,b,c,d,e,f,g){if(!f&&!wd(this.l))return!1;if(d&&Od!=a&&Pd!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:0!=(this.M.O&4),ctrlKey:0!=(this.M.O&2),shiftKey:0!=(this.M.O&1),metaKey:0!=(this.M.O&8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.l;a!=Qd&&a!=Rd&&g in Sd?c=Sd[g]:this.r&&(c=Td(this,a));return c?this.fa.X(c,a,b):!0}; +Kd.prototype.W=function(a,b,c,d,e,f,g,k){if(!k&&!wd(this.l))return!1;if(g&&Ud!=a&&Vd!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ia:0,rotation:0,pointerId:d,La:0,Ma:0,pointerType:e,Aa:f};c=this.r?Td(this,a):this.l;Sd[d]&&(c=Sd[d]);d=nb(C(this.l));var n;d&&a==Wd&&(n=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){Sd[a]= +this});a=c?this.fa.W(c,a,b):!0;n&&(d.Element.prototype.msSetPointerCapture=n);return a};function Td(a,b){if(v)switch(b){case Od:case Ud:return null;case Xd:case Yd:case Zd:return a.r.multiple?a.r:null;default:return a.r}if(u)switch(b){case Xd:case Od:return a.r.multiple?a.l:null;default:return a.l}if(Oa)switch(b){case Qd:case $d:return a.r.multiple?a.l:a.r;default:return a.r.multiple?a.l:null}return a.l}Oa||u||hd&&id(3.6);function Md(){this.O=0}var Sd={};function Nd(){} +Nd.prototype.X=function(a,b,c){return ae(a,b,c)};Nd.prototype.W=function(a,b,c){return ae(a,b,c)};v&&gd(10);Hb&&id(4);var be=v&&ka.navigator.msPointerEnabled;function ce(a,b,c){this.e=a;this.S=b;this.T=c}ce.prototype.create=function(a){a=C(a);nd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.S,this.T));return a};ce.prototype.toString=h("e");function X(a,b,c){ce.call(this,a,b,c)}q(X,ce); +X.prototype.create=function(a,b){if(!y&&this==de)throw new t(9,"Browser does not support a mouse pixel scroll event.");var c=C(a),d;if(nd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Pd||this==Od)if(Object.defineProperty){var e=this==Pd;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==ee&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=nb(c);d=c.createEvent("MouseEvents");var f=1;this==ee&&(y||(d.wheelDelta=b.wheelDelta),y||u)&&(f=b.wheelDelta/-40);y&&this==de&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.S,this.T,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(v&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=vb(a?new ub(C(a)):fb||(fb=new ub)), +c=sd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function fe(a,b,c){ce.call(this,a,b,c)}q(fe,ce); +fe.prototype.create=function(a,b){if(!be)throw new t(9,"Browser does not support MSPointer events.");var c=C(a),d=nb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.S,this.T,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ia,b.rotation,b.La,b.Ma,b.pointerId,b.pointerType,0,b.Aa);return c}; +var Qd=new X("click",!0,!0),Xd=new X("contextmenu",!0,!0),ge=new X("dblclick",!0,!0),Rd=new X("mousedown",!0,!0),Yd=new X("mousemove",!0,!1),Pd=new X("mouseout",!0,!0),Od=new X("mouseover",!0,!0),$d=new X("mouseup",!0,!0),ee=new X(y?"DOMMouseScroll":"mousewheel",!0,!0),de=new X("MozMousePixelScroll",!0,!0),Wd=new fe("MSPointerDown",!0,!0),Zd=new fe("MSPointerMove",!0,!0),Ud=new fe("MSPointerOver",!0,!0),Vd=new fe("MSPointerOut",!0,!0),he=new fe("MSPointerUp",!0,!0); +function ae(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return nd?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function ie(a,b){this.v={};this.h=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ie)for(d=je(a),ke(a),e=[],c=0;c<a.h.length;c++)e.push(a.v[a.h[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ie.prototype.G=0;ie.prototype.ua=0;function je(a){ke(a);return a.h.concat()} +ie.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.v,a)?(delete this.v[a],this.G--,this.ua++,this.h.length>2*this.G&&ke(this),!0):!1};function ke(a){if(a.G!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.v,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.G!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}} +ie.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.v,a)?this.v[a]:b};ie.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.v,a)||(this.G++,this.h.push(a),this.ua++);this.v[a]=b};var le={};function Z(a,b,c){ea(a)&&(a=y?a.b:u?a.opera:a.c);a=new me(a,b,c);!b||b in le&&!c||(le[b]={key:a,shift:!1},c&&(le[c]={key:a,shift:!0}));return a}function me(a,b,c){this.code=a;this.wa=b||null;this.Ta=c||this.wa}Z(8);Z(9);Z(13);var ne=Z(16),oe=Z(17),pe=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var qe=Z(Ka?{b:91,c:91,opera:219}:Ja?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ka?{b:92,c:92,opera:220}:Ja?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ka?{b:93,c:93,opera:0}:Ja?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Ra?56:42},"*"); +Z({b:107,c:107,opera:Ra?61:43},"+");Z({b:109,c:109,opera:Ra?109:45},"-");Z({b:110,c:110,opera:Ra?190:78},".");Z({b:111,c:111,opera:Ra?191:47},"/");Z(Ra&&u?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var re=new ie; +re.set(1,ne);re.set(2,oe);re.set(4,pe);re.set(8,qe);(function(a){var b=new ie;s(je(a),function(c){b.set(a.get(c).code,c)});return b})(re);y&&gd(12);function se(a,b,c){Kd.call(this,b,c);this.za=this.D=null;this.F=new B(0,0);this.Y=this.na=!1;if(a){this.D=a.Na;try{U(a.ya)&&(this.za=a.ya)}catch(d){this.D=null}this.F=a.Oa;this.na=a.Ra;this.Y=a.Pa;try{U(a.element)&&Ld(this,a.element)}catch(e){this.D=null}}}q(se,Kd);var $={}; +nd?($[Qd]=[0,0,0,null],$[Xd]=[null,null,0,null],$[$d]=[1,4,2,null],$[Pd]=[0,0,0,0],$[Yd]=[1,4,2,0]):Oa||md?($[Qd]=[0,1,2,null],$[Xd]=[null,null,2,null],$[$d]=[0,1,2,null],$[Pd]=[0,1,2,0],$[Yd]=[0,1,2,0]):($[Qd]=[0,1,2,null],$[Xd]=[null,null,2,null],$[$d]=[0,1,2,null],$[Pd]=[0,0,0,0],$[Yd]=[0,0,0,0]);od&&($[Wd]=$[$d],$[he]=$[$d],$[Zd]=[-1,-1,-1,-1],$[Vd]=$[Zd],$[Ud]=$[Zd]);$[ge]=$[Qd];$[Rd]=$[$d];$[Od]=$[Pd];var te={};te[Rd]=Wd;te[Yd]=Zd;te[Pd]=Vd;te[Od]=Ud;te[$d]=he; +se.prototype.move=function(a,b){var c=wd(a),d=Cd(a);this.F.x=b.x+d.left;this.F.y=b.y+d.top;d=this.ia();if(a!=d){try{nb(C(d)).closed&&(d=null)}catch(e){d=null}if(d){var f=d===ka.document.documentElement||d===ka.document.body,d=!this.Y&&f?null:d;ue(this,Pd,a)}Ld(this,a);v||ue(this,Od,d,null,c)}ue(this,Yd,null,null,c);v&&a!=d&&ue(this,Od,d,null,c);this.na=!1}; +function ue(a,b,c,d,e){a.Y=!0;if(od){var f=te[b];if(f&&!a.W(f,a.F,ve(a,f),1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0,c,e))return}a.X(b,a.F,ve(a,b),c,d,e)}function ve(a,b){if(!(b in $))return 0;var c=$[b][null===a.D?3:a.D];if(null===c)throw new t(13,"Event does not permit the specified mouse button.");return c};function we(a,b){this.x=a;this.y=b}q(we,B);we.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function xe(a,b,c){if(!xd(a,!0))throw new t(11,"Element is not currently visible and may not be manipulated");b:{var d=b||void 0;if("scroll"==Dd(a,d)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Dd(a,d)))break b;for(var e=Gd(a,d),f=Ad(a);f;f=Ad(f)){var g=f,k=Cd(g),n;var w=g;if(v&&!A(9)){var x=vd(w,"borderLeft");n=vd(w,"borderRight");var r=vd(w,"borderTop"),w=vd(w,"borderBottom");n=new qd(r,n,w,x)}else x=rd(w,"borderLeftWidth"),n=rd(w,"borderRightWidth"),r=rd(w,"borderTopWidth"),w=rd(w,"borderBottomWidth"), +n=new qd(parseFloat(r),parseFloat(n),parseFloat(w),parseFloat(x));x=e.left-k.left-n.left;k=e.top-k.top-n.top;n=g.clientHeight+e.top-e.bottom;g.scrollLeft+=Math.min(x,Math.max(x-(g.clientWidth+e.left-e.right),0));g.scrollTop+=Math.min(k,Math.max(k-n,0))}Dd(a,d)}}b?b=new we(b.x,b.y):(b=ye(a),b=new we(b.width/2,b.height/2));(c||new se).move(a,b)} +function ye(a){var b;if("none"!=(rd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=td(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=td(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:ye(a.offsetParent)};function ze(){this.P=void 0} +function Ae(a,b,c){switch(typeof b){case "string":Be(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ae(a,a.P?a.P.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Be(f,c),c.push(":"),Ae(a,a.P?a.P.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ce={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},De=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Be(a,b){b.push('"',a.replace(De,function(a){if(a in Ce)return Ce[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ce[a]=e+b.toString(16)}),'"')};Oa||u||y&&gd(3.5)||v&&gd(8);function Ee(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return pa(a,Ee);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Fe(a);return b}if("document"in a)return b={},b.WINDOW=Fe(a),b;if(da(a))return pa(a,Ee);a=hb(a,function(a,b){return"number"==typeof b||p(b)});return ib(a,Ee);default:return null}} +function Ge(a,b){return"array"==ba(a)?pa(a,function(a){return Ge(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?He(a.ELEMENT,b):"WINDOW"in a?He(a.WINDOW,b):ib(a,function(a){return Ge(a,b)}):a}function Ie(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ba=ja());b.ba||(b.ba=ja());return b}function Fe(a){var b=Ie(a.ownerDocument),c=jb(b,function(b){return b==a});c||(c=":wdc:"+b.ba++,b[c]=a);return c} +function He(a,b){a=decodeURIComponent(a);var c=b||document,d=Ie(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function Je(a,b){var c=[a,b],d=xe,e;try{var d=p(d)?new ka.Function(d):ka==window?d:new ka.Function("return ("+d+").apply(null,arguments);"),f=Ge(c,ka.document),g=d.apply(null,f);e={status:0,value:Ee(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];Ae(new ze,e,c);return c.join("")}var Ke=["_"],Le=l;Ke[0]in Le||!Le.execScript||Le.execScript("var "+Ke[0]);for(var Me;Ke.length&&(Me=Ke.shift());)Ke.length||void 0===Je?Le=Le[Me]?Le[Me]:Le[Me]={}:Le[Me]=Je;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/pinch.js b/src/ghostdriver/third_party/webdriver-atoms/pinch.js index 1d898bbd3..f0d4a77ab 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/pinch.js +++ b/src/ghostdriver/third_party/webdriver-atoms/pinch.js @@ -1,116 +1,128 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function ba(a){return function(){return a}}var m,p=this; function ca(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function t(a){return a!==k}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function v(a){return"string"==typeof a}function ea(a){return"function"==ca(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function w(a,b){function c(){}c.prototype=b.prototype;a.Ka=b.prototype;a.prototype=new c};var ha=window;function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",u=e[g]||"",s=RegExp("(\\d*)(\\D*)","g"),U=RegExp("(\\d*)(\\D*)","g");do{var L=s.exec(p)||["","",""],ba=U.exec(u)||["","",""];if(0==L[0].length&&0==ba[0].length)break;c=((0==L[1].length?0:parseInt(L[1],10))<(0==ba[1].length?0:parseInt(ba[1],10))?-1:(0==L[1].length?0:parseInt(L[1],10))>(0== -ba[1].length?0:parseInt(ba[1],10))?1:0)||((0==L[2].length)<(0==ba[2].length)?-1:(0==L[2].length)>(0==ba[2].length)?1:0)||(L[2]<ba[2]?-1:L[2]>ba[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function x(a,b){for(var c=a.length,d=v(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=v(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=v(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function oa(a,b){for(var c=a.length,d=v(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function pa(a,b){var c;a:{c=a.length;for(var d=v(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:v(a)?a.charAt(c):a[c]}function qa(a,b){var c;a:if(v(a))c=!v(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ra(a){return ka.concat.apply(ka,arguments)} -function sa(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ta={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function s(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)} +function ia(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)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)} +function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function t(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",u=RegExp("(\\d*)(\\D*)","g"),w=RegExp("(\\d*)(\\D*)","g");do{var n=u.exec(k)||["","",""],l=w.exec(r)||["","",""];if(0==n[0].length&&0==l[0].length)break;c=((0==n[1].length?0:parseInt(n[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==n[1].length?0:parseInt(n[1],10))>(0==l[1].length? +0:parseInt(l[1],10))?1:0)||((0==n[2].length)<(0==l[2].length)?-1:(0==n[2].length)>(0==l[2].length)?1:0)||(n[2]<l[2]?-1:n[2]>l[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function v(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=s(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=s(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=s(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 ua(a,b){for(var c=a.length,d=s(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 va(a,b){var c;a:{c=a.length;for(var d=s(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:s(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(s(a))c=s(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ua="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function wa(a){xa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(va,"#$1$1$2$2$3$3"));return a.toLowerCase()}var xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a){var b=a.match(Aa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Ca[a]||Da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}w(y,Error); -var Da="unknown error",Ca={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ca[13]=Da;Ca[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return r.navigator?r.navigator.userAgent:m}Ha=Ga=Fa=Ea=n;var La;if(La=Ka()){var Ma=r.navigator;Ea=0==La.indexOf("Opera");Fa=!Ea&&-1!=La.indexOf("MSIE");Ga=!Ea&&-1!=La.indexOf("WebKit");Ha=!Ea&&!Ga&&"Gecko"==Ma.product}var z=Ea,A=Fa,B=Ha,C=Ga,Na,Oa=r.navigator;Na=Oa&&Oa.platform||"";Ia=-1!=Na.indexOf("Mac");Ja=-1!=Na.indexOf("Win");var Pa=-1!=Na.indexOf("Linux");function Qa(){var a=r.document;return a?a.documentMode:k}var Ra; -a:{var Sa="",Ta;if(z&&r.opera)var Ua=r.opera.version,Sa="function"==typeof Ua?Ua():Ua;else if(B?Ta=/rv\:([^\);]+)(\)|;)/:A?Ta=/MSIE\s+([^\);]+)(\)|;)/:C&&(Ta=/WebKit\/(\S+)/),Ta)var Va=Ta.exec(Ka()),Sa=Va?Va[1]:"";if(A){var Wa=Qa();if(Wa>parseFloat(Sa)){Ra=String(Wa);break a}}Ra=Sa}var Xa={};function Ya(a){return Xa[a]||(Xa[a]=0<=ia(Ra,a))}function D(a){return A&&Za>=a}var $a=r.document,Za=!$a||!A?k:Qa()||("CSS1Compat"==$a.compatMode?parseInt(Ra,10):5);var ab;!B&&!A||A&&D(9)||B&&Ya("1.9.1");A&&Ya("9");var bb=A||z||C;function E(a,b){this.x=t(a)?a:0;this.y=t(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; -cb.prototype.scale=function(a){this.width*=a;this.height*=a;return this};function db(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function eb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function fb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var gb=3;function hb(a){return a?new ib(F(a)):ab||(ab=new ib)}function jb(a){var b=!C&&kb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function lb(a){return a?a.parentWindow||a.defaultView:window}function kb(a){return"CSS1Compat"==a.compatMode}function mb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function nb(a){if(bb)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} -function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){var c=[];return tb(a,b,c,l)?c[0]:k} -function tb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tb(a,b,c,d))return l;a=a.nextSibling}return n}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==gb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling} -function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function yb(a){try{return a&&a.activeElement}catch(b){}return m}function ib(a){this.C=a||r.document||document}function zb(a){return!C&&kb(a.C)?a.C.documentElement:a.C.body}ib.prototype.contains=ob;var Ab,Bb,Cb,Db,Eb,Fb,Gb;Gb=Fb=Eb=Db=Cb=Bb=Ab=n;var Hb=Ka();Hb&&(-1!=Hb.indexOf("Firefox")?Ab=l:-1!=Hb.indexOf("Camino")?Bb=l:-1!=Hb.indexOf("iPhone")||-1!=Hb.indexOf("iPod")?Cb=l:-1!=Hb.indexOf("iPad")?Db=l:-1!=Hb.indexOf("Android")?Eb=l:-1!=Hb.indexOf("Chrome")?Fb=l:-1!=Hb.indexOf("Safari")&&(Gb=l));var Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb;function Pb(a,b,c){this.g=a;this.Aa=b||1;this.p=c||1};var Qb=A&&!D(9),Rb=A&&!D(8);function Sb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ia=e;this.parentNode=b}function Tb(a,b,c){var d=Rb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Sb(b,a,b.nodeName,d,c)};function Ub(a){this.ba=a;this.Q=0}function Vb(a){a=a.match(Wb);for(var b=0;b<a.length;b++)Xb.test(a[b])&&a.splice(b,1);return new Ub(a)}var Wb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Xb=/^\s/;function G(a,b){return a.ba[a.Q+(b||0)]}Ub.prototype.next=function(){return this.ba[this.Q++]};Ub.prototype.back=function(){this.Q--};Ub.prototype.empty=function(){return this.ba.length<=this.Q};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Qb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Qb&&"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} -function Yb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Rb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Zb(a,b,c,d,e){return(Qb?$b:ac).call(m,a,b,v(c)?c:m,v(d)?d:m,e||new I)} -function $b(a,b,c,d,e){if(a instanceof bc||8==a.e||c&&a.e===m){var f=b.all;if(!f)return e;a=cc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Yb(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}dc(a,b,c,d,e);return e} -function ac(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof J?dc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){Yb(a,c,d)&&e.add(a)}));return e} -function ec(a,b,c,d,e){var f;if((a instanceof bc||8==a.e||c&&a.e===m)&&(f=b.childNodes)){var g=cc(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return Yb(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return fc(a,b,c,d,e)}function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function dc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b),dc(a,b,c,d,e)}function cc(a){if(a instanceof J){if(8==a.e)return"!";if(a.e===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.K=0}function gc(a){this.r=a;this.next=this.B=m}function hc(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Sb&&d.r instanceof Sb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<pb(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.K=g;return a} -I.prototype.unshift=function(a){a=new gc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.K++};I.prototype.add=function(a){a=new gc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.K++};function ic(a){return(a=a.k)?a.r:m}I.prototype.s=q("K");function jc(a){return(a=ic(a))?H(a):""}function kc(a,b){return new lc(a,!!b)}function lc(a,b){this.xa=a;this.ca=(this.D=b)?a.p:a.k;this.Y=m} -lc.prototype.next=function(){var a=this.ca;if(a==m)return m;var b=this.Y=a;this.ca=this.D?a.B:a.next;return b.r};lc.prototype.remove=function(){var a=this.xa,b=this.Y;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.K--;this.Y=m};function K(a){this.j=a;this.m=this.t=n;this.L=m}K.prototype.h=q("t");function mc(a,b){a.t=b}function nc(a,b){a.m=b}K.prototype.w=q("L");function M(a,b){var c=a.evaluate(b);return c instanceof I?+jc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof I?jc(c):""+c}function oc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function pc(a,b,c){K.call(this,a.j);this.aa=a;this.ga=b;this.la=c;this.t=b.h()||c.h();this.m=b.m||c.m;this.aa==qc&&(!c.m&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.L={name:b.w().name,G:c}:!b.m&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.L={name:c.w().name,G:b}))}w(pc,K); -function rc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=kc(b);for(b=f.next();b;b=f.next()){e=kc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=kc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}pc.prototype.evaluate=function(a){return this.aa.q(this.ga,this.la,a)};pc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.aa+"\n";a+=" ";b+=this.ga.toString(a)+"\n";return b+=this.la.toString(a)};function sc(a,b,c,d){this.za=a;this.ja=b;this.j=c;this.q=d}sc.prototype.toString=q("za");var tc={}; -function O(a,b,c,d){a in tc&&h(Error("Binary operator already created: "+a));a=new sc(a,b,c,d);return tc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return rc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return rc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return rc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return rc(function(a,b){return a>=b},a,b,c)});var qc=O("=",3,2,function(a,b,c){return rc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return rc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return oc(a,c)&&oc(b,c)});O("or",1,2,function(a,b,c){return oc(a,c)||oc(b,c)});function uc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));K.call(this,a.j);this.ka=a;this.f=b;this.t=a.h();this.m=a.m}w(uc,K);uc.prototype.evaluate=function(a){a=this.ka.evaluate(a);return vc(this.f,a)};uc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ka.toString(a);return b+=this.f.toString(a)};function wc(a,b){b.length<a.ia&&h(Error("Function "+a.o+" expects at least"+a.ia+" arguments, "+b.length+" given"));a.Z!==m&&b.length>a.Z&&h(Error("Function "+a.o+" expects at most "+a.Z+" arguments, "+b.length+" given"));a.ya&&x(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b))});K.call(this,a.j);this.P=a;this.U=b;mc(this,a.t||oa(b,function(a){return a.h()}));nc(this,a.wa&&!b.length||a.va&&!!b.length||oa(b,function(a){return a.m}))}w(wc,K); -wc.prototype.evaluate=function(a){return this.P.q.apply(m,ra(a,this.U))};wc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.P+"\n";b+=" ";this.U.length&&(a+=b+"Arguments:",b+=" ",a=na(this.U,function(a,d){return a+"\n"+d.toString(b)},a));return a};function xc(a,b,c,d,e,f,g,p,u){this.o=a;this.j=b;this.t=c;this.wa=d;this.va=e;this.q=f;this.ia=g;this.Z=t(p)?p:g;this.ya=!!u}xc.prototype.toString=q("o");var yc={}; -function P(a,b,c,d,e,f,g,p){a in yc&&h(Error("Function already created: "+a+"."));yc[a]=new xc(a,b,c,d,n,e,f,g,p)}P("boolean",2,n,n,function(a,b){return oc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,n,n,function(a,b){var c=sa(arguments,1);return na(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(M(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Qb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return pa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!qa(f,a)&&f.push(a)});f.sort(pb);var g=new I;x(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);P("local-name",3,n,l,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!oc(b,a)},1);P("number",1,n,l,function(a,b){return b?M(b,a):+H(a.g)},0,1);P("position",1,l,n,function(a){return a.Aa},0);P("round",1,n,n,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):H(a.g)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):H(a.g)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=kc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,aa(l),0);function J(a,b){this.oa=a;this.ha=t(b)?b:m;this.e=m;switch(a){case "comment":this.e=8;break;case "text":this.e=gb;break;case "processing-instruction":this.e=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function zc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}J.prototype.matches=function(a){return this.e===m||this.e==a.nodeType};J.prototype.getName=q("oa"); -J.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.oa;this.ha===m||(b+="\n"+this.ha.toString(a+" "));return b};function Ac(a){K.call(this,3);this.ma=a.substring(1,a.length-1)}w(Ac,K);Ac.prototype.evaluate=q("ma");Ac.prototype.toString=function(a){return(a||"")+"literal: "+this.ma};function bc(a){this.o=a.toLowerCase()}bc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.o||this.o==a.nodeName.toLowerCase()?l:this.o==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};bc.prototype.getName=q("o");bc.prototype.toString=function(a){return(a||"")+"nametest: "+this.o};function Bc(a){K.call(this,1);this.pa=a}w(Bc,K);Bc.prototype.evaluate=q("pa");Bc.prototype.toString=function(a){return(a||"")+"number: "+this.pa};function Cc(a,b){K.call(this,a.j);this.ea=a;this.M=b;this.t=a.h();this.m=a.m;if(1==this.M.length){var c=this.M[0];!c.W&&c.u==Dc&&(c=c.T,"*"!=c.getName()&&(this.L={name:c.getName(),G:m}))}}w(Cc,K);function Ec(){K.call(this,4)}w(Ec,K);Ec.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Ec.prototype.toString=function(a){return a+"RootHelperExpr"};function Fc(){K.call(this,4)}w(Fc,K);Fc.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Fc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Cc.prototype.evaluate=function(a){var b=this.ea.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.M;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=kc(b,e.u.D),g;if(!e.h()&&e.u==Gc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Pb(g))}else if(!e.h()&&e.u==Hc)g=f.next(),b=e.evaluate(new Pb(g));else{g=f.next();for(b=e.evaluate(new Pb(g));(g=f.next())!=m;)g=e.evaluate(new Pb(g)),b=hc(b,g)}}return b}; -Cc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ea.toString(b);this.M.length&&(c+=b+"Steps:\n",b+=" ",x(this.M,function(a){c+=a.toString(b)}));return c};function Ic(a,b){this.f=a;this.D=!!b}function vc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=kc(b),f=b.s(),g,p=0;g=e.next();p++){var u=a.D?f-p:p+1;g=d.evaluate(new Pb(g,u,f));var s;"number"==typeof g?s=u==g:"string"==typeof g||"boolean"==typeof g?s=!!g:g instanceof I?s=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));s||e.remove()}return b}Ic.prototype.w=function(){return 0<this.f.length?this.f[0].w():m}; -Ic.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return l}return n};Ic.prototype.s=function(){return this.f.length};Ic.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Jc(a,b,c,d){K.call(this,4);this.u=a;this.T=b;this.f=c||new Ic([]);this.W=!!d;b=this.f.w();a.Ea&&b&&(a=b.name,a=Qb?a.toLowerCase():a,this.L={name:a,G:b.G});this.t=this.f.h()}w(Jc,K); -Jc.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.G?N(c.G,a):m,f=1);if(this.W)if(!this.h()&&this.u==Kc)c=Zb(this.T,b,d,e),c=vc(this.f,c,f);else if(a=kc((new Jc(Lc,new J("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=hc(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Jc.prototype.q=function(a,b,c,d){a=this.u.P(this.T,a,b,c);return a=vc(this.f,a,d)}; -Jc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.W?"//":"/")+"\n";this.u.o&&(b+=a+"Axis: "+this.u+"\n");b+=this.T.toString(a);if(this.f.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.f.length;c++)var d=c<this.f.length-1?", ":"",b=b+(this.f[c].toString(a)+d);return b};function Mc(a,b,c,d){this.o=a;this.P=b;this.D=c;this.Ea=d}Mc.prototype.toString=q("o");var Nc={}; -function Q(a,b,c,d){a in Nc&&h(Error("Axis already created: "+a));b=new Mc(a,b,c,!!d);return Nc[a]=b}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Dc=Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Qb)return c.add(new Sb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof J&&a.e===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Qb?g.nodeValue&&c.add(Tb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Qb?g.nodeValue&&c.add(Tb(b,g,b.sourceIndex)):c.add(g));return c},n),Kc=Q("child",function(a,b,c,d,e){return(Qb?ec:fc).call(m,a,b,v(c)?c:m,v(d)?d:m,e||new I)},n,l); -Q("descendant",Zb,n,l);var Lc=Q("descendant-or-self",function(a,b,c,d){var e=new I;Yb(b,c,d)&&a.matches(b)&&e.add(b);return Zb(a,b,c,d,e)},n,l),Gc=Q("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Yb(f,c,d)&&a.matches(f)&&e.add(f),e=Zb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new I},n); -var Oc=Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Hc=Q("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var u=[];for(b=f[g];b=b.previousSibling;)u.unshift(b);for(var s=0,U=u.length;s<U;s++)b=u[s],Yb(b,c,d)&&a.matches(b)&&e.add(b),e=Zb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Pc=Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Qc(a){K.call(this,1);this.da=a;this.t=a.h();this.m=a.m}w(Qc,K);Qc.prototype.evaluate=function(a){return-M(this.da,a)};Qc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.da.toString(a+" ")};function Rc(a){K.call(this,4);this.R=a;mc(this,oa(this.R,function(a){return a.h()}));nc(this,oa(this.R,function(a){return a.m}))}w(Rc,K);Rc.prototype.evaluate=function(a){var b=new I;x(this.R,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=hc(b,c)});return b};Rc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.R,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Sc(a){this.a=a}function Tc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Uc(a);var d=a.a.next();if(!d)break;var e=(d=tc[d]||m)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ja;)b=new pc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new pc(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&h(Error(b))}function Vc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Wc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Xc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Ac(a)}function Yc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new bc(a.a.next()+a.a.next()+a.a.next()):new bc(a.a.next())} -function Zc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Ec;d=new Ec;R(a,"Missing next location step.");b=$c(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Tc(a);R(a,'unclosed "("');Vc(a,")");break;case '"':case "'":b=Xc(a);break;default:if(isNaN(+b))if(!zc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=yc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){R(a,"Missing function argument list.");d.push(Tc(a));if(","!=G(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Wc(a);b=new wc(b,d)}else{b=m;break a}else b=new Bc(+a.a.next())}"["==G(a.a)&&(d=new Ic(ad(a)),b=new uc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=$c(a,"/"),d=new Fc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=$c(a,b),c.push(b);return new Cc(d, -c)} -function $c(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Jc(Pc,new J("node")),a.a.next(),d;if(".."==G(a.a))return d=new Jc(Oc,new J("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Dc,a.a.next(),R(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Nc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Kc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){zc(e)||h(Error("Invalid node type: "+e));c=a.a.next();zc(c)||h(Error("Invalid type name: "+c));Vc(a,"(");R(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Xc(a);R(a,"Bad nodetype");Wc(a);c=new J(c,g)}else c=Yc(a);else"*"==e?c=Yc(a):h(Error("Bad token: "+a.a.next()));e=new Ic(ad(a),f.D);return d||new Jc(f,c,e,"//"==b)} -function ad(a){for(var b=[];"["==G(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Tc(a);b.push(c);R(a,"Unclosed predicate expression.");Vc(a,"]")}return b}function Uc(a){if("-"==G(a.a))return a.a.next(),new Qc(Uc(a));var b=Zc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Zc(a));a.a.back();a=new Rc(b)}return a};function bd(a){a.length||h(Error("Empty XPath expression."));a=Vb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Tc(new Sc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Pb(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?jc(a):""+a;break;case 1:this.numberValue=a instanceof I?+jc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=kc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Sb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=ic(a);this.singleNodeValue=d instanceof Sb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function cd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new bd(a)).evaluate(b,f)},b.createExpression=function(a){return new bd(a)})};var T={};T.ra=function(){var a={La:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.q=function(a,b,c){var d=F(a);(A||Mb)&&cd(lb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ra;return A&&!Ya(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.V=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Da=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.V(c,a);return c}; -T.Ha=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;z&&!t(e)&&T.V(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){T.V(b,a)});return c};function dd(a){return(a=a.exec(Ka()))?a[1]:""}var ed=function(){if(Ib)return dd(/Firefox\/([0-9.]+)/);if(A||z)return Ra;if(Nb)return dd(/Chrome\/([0-9.]+)/);if(Ob)return dd(/Version\/([0-9.]+)/);if(Kb||Lb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ka());if(a)return a[1]+"."+a[2]}else{if(Mb)return(a=dd(/Android\s+([0-9.]+)/))?a:dd(/Version\/([0-9.]+)/);if(Jb)return dd(/Camino\/([0-9.]+)/)}return""}();var fd,gd;function V(a){return hd?fd(a):A?0<=ia(Za,a):Ya(a)}function id(a){return hd?gd(a):Mb?0<=ia(jd,a):0<=ia(ed,a)} -var hd=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;fd=function(a){return 0<=d.ta(e,""+a)};gd=function(a){return 0<=d.ta(f,""+a)};return l}(),kd=Lb||Kb,ld;if(Mb){var md=/Android\s+([0-9\.]+)/.exec(Ka());ld=md?md[1]:"0"}else ld="0"; -var jd=ld,nd=A&&!D(8),od=A&&!D(9),pd=D(10),qd=A&&!D(10);Mb&&id(2.3);!z&&(!C||V("533"));function rd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}rd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};rd.prototype.contains=function(a){return!this||!a?n:a instanceof rd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function sd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function td(a,b){return sd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function ud(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=hb(a),b=!kb(b.C);return b?a.body:a.documentElement} -function vd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function wd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=td(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=td(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function xd(a){var b,c=F(a),d=td(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=ud(c);if(a==g)return f;if(a.getBoundingClientRect)b=vd(a),a=hb(c),a=jb(a.C),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==td(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=wd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function yd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=vd(a);b.x=c.left;b.y=c.top}else{var c=hb(a),c=jb(c.C),d=xd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Ya(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=td(a,e));f||(f=td(a,"transform"));f?(a=f.match(zd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e=ea(a.fa),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.fa().targetTouches&& -(f=a.fa().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function Ad(a){if("none"!=td(a,"display"))return Bd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Bd(a);b.display=c;b.position=e;b.visibility=d;return a}function Bd(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!t(b)||d)&&a.getBoundingClientRect?(a=vd(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)}var Cd={thin:2,medium:4,thick:6}; -function Dd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Cd)d=Cd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var zd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,l)&&Gd(a)&&!(A||z||B&&!V("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?l:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Id(a,b){var c;if(c=nd)if(c="value"==b)if(c=W(a,"OPTION"))c=Jd(a,"value")===m;c?(c=[],wb(a,c,n),c=c.join("")):c=a[b];return c}var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Ld(a){var b=[];x(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Jd(a,b){b=b.toLowerCase();if("style"==b)return Ld(a.style.cssText);if(nd&&"value"==b&&W(a,"INPUT"))return a.value;if(od&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Gd(a){var b=a.tagName.toUpperCase();return!qa(Md,b)?l:Id(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):xb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Id(b,"disabled")){if(!W(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:mb(a.previousSibling);)if(W(a,"LEGEND"))return l}return n},l)?n:l} -function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:m} -function X(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=od?"styleFloat":"cssFloat";c=sd(a,c)||Od(a,c);if(c===m)c=m;else if(qa(ua,b)&&(xa.test("#"==c.charAt(0)?c:"#"+c)||Ba(c).length||ta&&ta[c.toLowerCase()]||za(c).length)){var d=za(c);if(!d.length){a:if(d=Ba(c),!d.length){d=ta[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(xa.test(d)&&(d=wa(d),d=wa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!t(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?t(d)?d:m:(c=Nd(a))?Od(c,b):m} -function Pd(a){if(ea(a.getBBox)&&!W(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(W(a,"BODY")){b=lb(F(a))||k;"hidden"!=X(a,"overflow")?a=l:(a=Nd(a),!a||!W(a,"HTML")?a=l:(a=X(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ha).document;var b=a.documentElement,d=a.body;d||h(new y(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new cb(b,a)}else b=(b||window).document,b=kb(b)?b.documentElement:b.body,b=new cb(b.clientWidth,b.clientHeight);return b}return Ad(a)} -function Fd(a,b){function c(a){if("none"==X(a,"display"))return n;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?l:W(a,"PATH")&&(0<b.height||0<b.width)?(b=X(a,"stroke-width"),!!b&&0<parseInt(b,10)):oa(a.childNodes,function(b){return b.nodeType==gb&&"hidden"!=X(a,"overflow")||W(b)&&d(b)})}function e(a,b){var c;if((c=b==m?nb(a):nb(b))&&("hidden"==X(c,"overflow-x")||"hidden"==X(c,"overflow-y"))){var d=Pd(c),f=yd(c),g=yd(a);return f.x+d.width<=g.x&&"hidden"==X(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==X(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=X(a,"-o-transform")||X(a,"-webkit-transform")||X(a,"-ms-transform")||X(a,"-moz-transform")||X(a,"transform");if(b&&"none"!==b)return b=yd(a),a=Pd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Nd(a);return!a||f(a)}W(a)||h(Error("Argument to isShown must be of type Element"));if(W(a,"OPTION")||W(a,"OPTGROUP")){var g=xb(a,function(a){return W(a,"SELECT")});return!!g&&Fd(g,l)}if(W(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?T.Da('/descendant::*[@usemap = "#'+a.name+'"]',g):sb(g,function(b){return W(b)&&Jd(b,"usemap")=="#"+a.name});return!!g&&Fd(g,b)}return W(a,"AREA")?(g=xb(a,function(a){return W(a,"MAP")}),!!g&&Fd(g,b)):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Qd(a)||!d(a)||!e(a,m)?n:f(a)} -function Qd(a){if(qd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Rd(a)}function Rd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Rd(a));return b};function Sd(a){this.d=ha.document.documentElement;this.n=m;var b=yb(F(this.d));b&&Td(this,b);this.A=a||new Ud}function Td(a,b){a.d=b;a.n=W(b,"OPTION")?xb(b,function(a){return W(a,"SELECT")}):m}function Y(a,b,c){if(!Ed(a.d))return n;c={clientX:c.x,clientY:c.y,button:0,altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),wheelDelta:0,relatedTarget:m};return(a=a.n?Vd(a,b):a.d)?Wd(a,b,c):l} -function Xd(a,b,c,d,e,f){function g(a,c){var d={identifier:a,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};p.changedTouches.push(d);if(b==Yd||b==Zd)p.touches.push(d),p.targetTouches.push(d)}var p={touches:[],targetTouches:[],changedTouches:[],altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),relatedTarget:m,scale:0,rotation:0};g(c,d);t(e)&&g(e,f);Wd(a.d,b,p)} -function $d(a,b,c,d,e,f){var g=MSPointerEvent.MSPOINTER_TYPE_TOUCH;Ed(a.d)&&(c={clientX:c.x,clientY:c.y,button:d,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:m,width:0,height:0,Ca:0,rotation:0,pointerId:e,Fa:0,Ga:0,pointerType:g,ua:f},(a=a.n?Vd(a,b):a.d)&&Wd(a,b,c))} -function Vd(a,b){if(A)switch(b){case ae:case be:return m;case ce:case de:case ee:return a.n.multiple?a.n:m;default:return a.n}if(z)switch(b){case ce:case ae:return a.n.multiple?a.d:m;default:return a.d}if(C)switch(b){case fe:case ge:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:m}return a.d} -function he(a,b){if(Ed(a.d)){var c=m,d=m;if(!ie)for(var e=a.d;e;e=e.parentNode)if(W(e,"A")){c=e;break}else{var f;a:{if(W(e,"INPUT")&&(f=e.type.toLowerCase(),"submit"==f||"image"==f)){f=l;break a}if(W(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=l;break a}f=n}if(f){d=e;break}}if(f=e=Hd(a.d)){f=a.d;Hd(f)||h(new y(15,"Element is not selectable"));var g="selected",p=f.type&&f.type.toLowerCase();if("checkbox"==p||"radio"==p)g="checked";f=!!Id(f,g)}if(a.n&&(g=a.n,!f||g.multiple))a.d.selected=!f, -(!C||!g.multiple||Mb&&id(4))&&Wd(g,je);A&&d?d.click():Y(a,fe,b)&&(c&&ke(c)?(d=c.href,e=lb(F(c)),A&&!V(8)&&(d=le(e.location,d)),c.target?e.open(d,c.target):e.location.href=d):e&&!a.n&&(!B&&!C&&!(f&&"radio"==a.d.type.toLowerCase()))&&(a.d.checked=!f,z&&!V(11)&&Wd(a.d,je)))}} -function me(a){a=a.n||a.d;var b=yb(F(a));if(a!=b){if(b&&(ea(b.blur)||A&&fa(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){A&&"Unspecified error."==c.message||h(c)}A&&!V(8)&&lb(F(a)).focus()}if(ea(a.focus)||A&&fa(a.focus))z&&V(11)&&!Fd(a)?Wd(a,ne):a.focus()}}var ie=C||z||hd&&id(3.6); -function ke(a){if(ie||!a.href)return n;if(!hd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=lb(F(a)),c=b.location.href;a=le(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var oe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function le(a,b){var c=b.match(oe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Ud(){this.Ba=0}Ud.prototype.l=function(a){return 0!=(this.Ba&a)};var pe=!(A&&!V(10))&&!z,qe=Mb?!id(4):!kd,re=A&&ha.navigator.msPointerEnabled;function se(a,b,c){this.e=a;this.H=b;this.I=c}se.prototype.create=function(a){a=F(a);od?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.H,this.I));return a};se.prototype.toString=q("e");function Z(a,b,c){se.call(this,a,b,c)}w(Z,se); -Z.prototype.create=function(a,b){!B&&this==te&&h(new y(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(od){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ue||this==ae)Object.defineProperty?(c=this==ue,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==ve&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=lb(c);d=c.createEvent("MouseEvents");c=1;if(this==ve&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==te&&(c=b.wheelDelta);d.initMouseEvent(this.e,this.H,this.I,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=zb(hb(a)),c=ud(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function we(a,b,c){se.call(this,a,b,c)}w(we,se); -we.prototype.create=function(a,b){function c(b){b=ma(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ma(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}pe||h(new y(9,"Browser does not support firing touch events."));var e=F(a),f=lb(e),g=qe?d(b.changedTouches): -c(b.changedTouches),p=b.touches==b.changedTouches?g:qe?d(b.touches):c(b.touches),u=b.targetTouches==b.changedTouches?g:qe?d(b.targetTouches):c(b.targetTouches),s;qe?(s=e.createEvent("MouseEvents"),s.initMouseEvent(this.e,this.H,this.I,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),s.touches=p,s.targetTouches=u,s.changedTouches=g,s.scale=b.scale,s.rotation=b.rotation):(s=e.createEvent("TouchEvent"),Mb?s.initTouchEvent(p,u,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, -b.altKey,b.shiftKey,b.metaKey):s.initTouchEvent(this.e,this.H,this.I,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,u,g,b.scale,b.rotation),s.relatedTarget=b.relatedTarget);return s};function xe(a,b,c){se.call(this,a,b,c)}w(xe,se); -xe.prototype.create=function(a,b){re||h(new y(9,"Browser does not support MSPointer events."));var c=F(a),d=lb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.H,this.I,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.ua);return c}; -var je=new se("change",l,n),ne=new se("focus",n,n),fe=new Z("click",l,l),ce=new Z("contextmenu",l,l),ye=new Z("mousedown",l,l),de=new Z("mousemove",l,n),ue=new Z("mouseout",l,l),ae=new Z("mouseover",l,l),ge=new Z("mouseup",l,l),ve=new Z(B?"DOMMouseScroll":"mousewheel",l,l),te=new Z("MozMousePixelScroll",l,l),ze=new we("touchend",l,l),Zd=new we("touchmove",l,l),Yd=new we("touchstart",l,l),Ae=new xe("MSPointerDown",l,l),ee=new xe("MSPointerMove",l,l),be=new xe("MSPointerOver",l,l),Be=new xe("MSPointerOut", -l,l),Ce=new xe("MSPointerUp",l,l);function Wd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return od?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function De(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De){d=Ee(a);Fe(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.J=0;De.prototype.qa=0;function Ee(a){Fe(a);return a.i.concat()} -De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.J--,this.qa++,this.i.length>2*this.J&&Fe(this),l):n};function Fe(a){if(a.J!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.J!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.J++,this.i.push(a),this.qa++);this.z[a]=b};var Ge={};function $(a,b,c){fa(a)&&(a=B?a.b:z?a.opera:a.c);a=new He(a,b,c);if(b&&(!(b in Ge)||c))Ge[b]={key:a,shift:n},c&&(Ge[c]={key:a,shift:l});return a}function He(a,b,c){this.code=a;this.sa=b||m;this.Ja=c||this.sa}$(8);$(9);$(13);var Ie=$(16),Je=$(17),Ke=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); -$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Le=$(Ja?{b:91,c:91,opera:219}:Ia?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -$(Ja?{b:92,c:92,opera:220}:Ia?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});$(Ja?{b:93,c:93,opera:0}:Ia?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Pa?56:42},"*");$({b:107,c:107,opera:Pa?61:43},"+"); -$({b:109,c:109,opera:Pa?109:45},"-");$({b:110,c:110,opera:Pa?190:78},".");$({b:111,c:111,opera:Pa?191:47},"/");$(Pa&&z?m:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Me=new De;Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke); -Me.set(8,Le);(function(a){var b=new De;x(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);B&&V(12);function Ne(){Sd.call(this);this.v=new E(0,0);this.O=new E(0,0)}w(Ne,Sd);Ne.prototype.X=n;Ne.prototype.N=0;Ne.prototype.F=0;Ne.prototype.na=1;Ne.prototype.move=function(a,b,c){(!this.l()||pd)&&Td(this,a);a=yd(a);this.v.x=b.x+a.x;this.v.y=b.y+a.y;t(c)&&(this.O.x=c.x+a.x,this.O.y=c.y+a.y);this.l()&&(this.X=l,pd?Oe(this,Pe):Qe(this,Zd))};Ne.prototype.l=function(){return!!this.N}; -function Qe(a,b){a.l()||h(new y(13,"Should never fire event when touchscreen is not pressed."));var c,d;a.F&&(c=a.F,d=a.O);Xd(a,b,a.N,a.v,c,d)}function Oe(a,b){b(a,a.v,a.N,l);a.F&&b(a,a.O,a.F,n)}function Re(a,b,c,d){Y(a,de,b);$d(a,be,b,0,c,d);Y(a,ae,b);$d(a,Ae,b,0,c,d);Y(a,ye,b)&&me(a)}function Se(a,b,c,d){$d(a,Ce,b,0,c,d);Y(a,ge,b);he(a,b);$d(a,Be,b,-1,c,d);Y(a,ue,b)}function Pe(a,b,c,d){$d(a,ee,b,-1,c,d);Y(a,de,b)};function Te(a,b){this.x=a;this.y=b}w(Te,E);Te.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Te.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Ue(a,b){a.x-=b.x;a.y-=b.y;return a}function Ve(a,b){return new Te(a.x+b.x,a.y+b.y)}function We(a,b){return new Te(a.x-b.x,a.y-b.y)};function Xe(a,b,c,d){0==b&&h(new y(13,"Cannot pinch by a distance of zero."));var e=b/2;Ye(a,function(a){if(0>b){var c=Math.sqrt(a.x*a.x+a.y*a.y);a.scale(c?(c+b)/c:0)}},function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y);a.scale(b?(b-e)/b:0)},c,d)} -function Ye(a,b,c,d,e){Fd(a,l)||h(new y(11,"Element is not currently visible and may not be manipulated"));var f=F(a),f=C?f.body:f.documentElement,g;g=xd(a);var p=xd(f),u;if(A){var s=Dd(f,"borderLeft");u=Dd(f,"borderRight");var U=Dd(f,"borderTop"),L=Dd(f,"borderBottom");u=new rd(U,u,L,s)}else s=sd(f,"borderLeftWidth"),u=sd(f,"borderRightWidth"),U=sd(f,"borderTopWidth"),L=sd(f,"borderBottomWidth"),u=new rd(parseFloat(U),parseFloat(u),parseFloat(L),parseFloat(s));s=g.x-p.x-u.left;g=g.y-p.y-u.top;p= -f.clientHeight-a.offsetHeight;u=f.scrollLeft;U=f.scrollTop;u+=Math.min(s,Math.max(s-(f.clientWidth-a.offsetWidth),0));U+=Math.min(g,Math.max(g-p,0));g=new E(u,U);f.scrollLeft=g.x;f.scrollTop=g.y;d?d=new Te(d.x,d.y):(d=Ze(a),d=new Te(d.width/2,d.height/2));f=Ze(a);f=new Te(Math.min(d.x,f.width-d.x),Math.min(d.y,f.height-d.y));e=e||new Ne;b(f);e.move(a,Ve(d,f),We(d,f));e.l()&&h(new y(13,"Cannot press touchscreen when already pressed."));e.X=n;e.N=e.na++;e.F=e.na++;pd?Oe(e,Re):Qe(e,Yd);b=yd(a);c(f); -e.move(a,Ve(d,f),We(d,f));b=We(yd(a),b);c(f);c=Ue(Ve(d,f),b);b=Ue(We(d,f),b);e.move(a,c,b);e.l()||h(new y(13,"Cannot release touchscreen when not already pressed."));pd?Oe(e,Se):(Qe(e,ze),e.X||(Y(e,de,e.v),Y(e,ye,e.v)&&me(e),Y(e,ge,e.v),he(e,e.v)));e.N=0;e.F=0}function Ze(a){var b=Ad(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ze(a.offsetParent)};function $e(){this.S=k} -function af(a,b,c){switch(typeof b){case "string":bf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],af(a,a.S?a.S.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),bf(f, -c),c.push(":"),af(a,a.S?a.S.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var cf={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},df=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function bf(a,b){b.push('"',a.replace(df,function(a){if(a in cf)return cf[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return cf[a]=e+b.toString(16)}),'"')};C||z||B&&V(3.5)||A&&V(8);function ef(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,ef);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=ff(a);return b}if("document"in a)return b={},b.WINDOW=ff(a),b;if(da(a))return ma(a,ef);a=db(a,function(a,b){return"number"==typeof b||v(b)});return eb(a,ef);default:return m}} -function gf(a,b){return"array"==ca(a)?ma(a,function(a){return gf(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?hf(a.ELEMENT,b):"WINDOW"in a?hf(a.WINDOW,b):eb(a,function(a){return gf(a,b)}):a}function jf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.$=ga());b.$||(b.$=ga());return b}function ff(a){var b=jf(a.ownerDocument),c=fb(b,function(b){return b==a});c||(c=":wdc:"+b.$++,b[c]=a);return c} -function hf(a,b){a=decodeURIComponent(a);var c=b||document,d=jf(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function kf(a,b,c){a=[a,b,c];b=Xe;var d;try{b=v(b)?new ha.Function(b):ha==window?b:new ha.Function("return ("+b+").apply(null,arguments);");var e=gf(a,ha.document),f=b.apply(m,e);d={status:0,value:ef(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}e=[];af(new $e,d,e);return e.join("")}var lf=["_"],mf=r;!(lf[0]in mf)&&mf.execScript&&mf.execScript("var "+lf[0]);for(var nf;lf.length&&(nf=lf.shift());)!lf.length&&t(kf)?mf[nf]=kf:mf=mf[nf]?mf[nf]:mf[nf]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function x(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}t(x,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return p.navigator?p.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=p.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var z=Ha,A=Ia,B=Ka,Qa=Ja,Ra,Sa=p.navigator;Ra=Sa&&Sa.platform||"";La=-1!=Ra.indexOf("Mac");Ma=-1!=Ra.indexOf("Win");var Ta=-1!=Ra.indexOf("Linux");function Ua(){var a=p.document;return a?a.documentMode:void 0}var Va; +a:{var Wa="",$a;if(z&&p.opera)var ab=p.opera.version,Wa="function"==typeof ab?ab():ab;else if(B?$a=/rv\:([^\);]+)(\)|;)/:A?$a=/MSIE\s+([^\);]+)(\)|;)/:Qa&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Na()),Wa=bb?bb[1]:"";if(A){var cb=Ua();if(cb>parseFloat(Wa)){Va=String(cb);break a}}Va=Wa}var db={};function eb(a){return db[a]||(db[a]=0<=na(Va,a))}function C(a){return A&&fb>=a}var gb=p.document,fb=gb&&A?Ua()||("CSS1Compat"==gb.compatMode?parseInt(Va,10):5):void 0;var hb;!B&&!A||A&&C(9)||B&&eb("1.9.1");A&&eb("9");function ib(a,b){this.x=q(a)?a:0;this.y=q(b)?b:0}m=ib.prototype;m.toString=function(){return"("+this.x+", "+this.y+")"};m.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};m.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};m.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function jb(a,b){this.width=a;this.height=b}m=jb.prototype;m.toString=function(){return"("+this.width+" x "+this.height+")"};m.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function kb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function lb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function mb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var nb=3;function ob(a){a=a.document;a=pb(a)?a.documentElement:a.body;return new jb(a.clientWidth,a.clientHeight)}function D(a){return a?a.parentWindow||a.defaultView:window}function pb(a){return"CSS1Compat"==a.compatMode}function qb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function rb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!C(9)){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=E(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function ub(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return tb(d,a)}function tb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function E(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var vb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},wb={IMG:" ",BR:"\n"}; +function xb(a,b,c){if(!(a.nodeName in vb))if(a.nodeType==nb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in wb)b.push(wb[a.nodeName]);else for(a=a.firstChild;a;)xb(a,b,c),a=a.nextSibling}function yb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function zb(a){this.F=a||p.document||document}zb.prototype.I=function(a){return s(a)?this.F.getElementById(a):a}; +function Ab(a){return!Qa&&pb(a.F)?a.F.documentElement:a.F.body||a.F.documentElement}zb.prototype.contains=rb;var Bb,Cb,Db,Eb,Fb,Gb,Hb;Hb=Gb=Fb=Eb=Db=Cb=Bb=!1;var Ib=Na();Ib&&(-1!=Ib.indexOf("Firefox")?Bb=!0:-1!=Ib.indexOf("Camino")?Cb=!0:-1!=Ib.indexOf("iPhone")||-1!=Ib.indexOf("iPod")?Db=!0:-1!=Ib.indexOf("iPad")?Eb=!0:-1!=Ib.indexOf("Android")?Fb=!0:-1!=Ib.indexOf("Chrome")?Gb=!0:-1!=Ib.indexOf("Safari")&&(Hb=!0));var Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb,Pb=Hb;function Qb(a,b,c){this.g=a;this.Ja=b||1;this.r=c||1};var Rb=A&&!C(9),Sb=A&&!C(8);function Tb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Ub(a,b,c){var d=Sb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Tb(b,a,b.nodeName,d,c)};function Vb(a){this.ja=a;this.W=0}function Wb(a){a=a.match(Xb);for(var b=0;b<a.length;b++)Yb.test(a[b])&&a.splice(b,1);return new Vb(a)}var Xb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Yb=/^\s/;function F(a,b){return a.ja[a.W+(b||0)]}Vb.prototype.next=function(){return this.ja[this.W++]};Vb.prototype.back=function(){this.W--};Vb.prototype.empty=function(){return this.ja.length<=this.W};function G(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(Rb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Rb&&"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} +function Zb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Sb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function $b(a,b,c,d,e){return(Rb?ac:bc).call(null,a,b,s(c)?c:null,s(d)?d:null,e||new H)} +function ac(a,b,c,d,e){if(a instanceof cc||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=dc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Zb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}ec(a,b,c,d,e);return e} +function bc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof I?ec(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Zb(a,c,d)&&e.add(a)}));return e} +function fc(a,b,c,d,e){var f;if((a instanceof cc||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=dc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Zb(a,c,d)}));v(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return gc(a,b,c,d,e)}function gc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b),ec(a,b,c,d,e)}function dc(a){if(a instanceof I){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function H(){this.r=this.k=null;this.Q=0}function hc(a){this.u=a;this.next=this.G=null}function ic(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.u==d.u||c.u instanceof Tb&&d.u instanceof Tb&&c.u.g==d.u.g?(f=c,c=c.next,d=d.next):0<sb(c.u,d.u)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.Q=g;return a} +H.prototype.unshift=function(a){a=new hc(a);a.next=this.k;this.r?this.k.G=a:this.k=this.r=a;this.k=a;this.Q++};H.prototype.add=function(a){a=new hc(a);a.G=this.r;this.k?this.r.next=a:this.k=this.r=a;this.r=a;this.Q++};function jc(a){return(a=a.k)?a.u:null}H.prototype.t=h("Q");function kc(a){return(a=jc(a))?G(a):""}function lc(a,b){return new mc(a,!!b)}function mc(a,b){this.Fa=a;this.ka=(this.J=b)?a.r:a.k;this.ea=null} +mc.prototype.next=function(){var a=this.ka;if(null==a)return null;var b=this.ea=a;this.ka=this.J?a.G:a.next;return b.u};mc.prototype.remove=function(){var a=this.Fa,b=this.ea;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.k=b;b?b.G=c:a.r=c;a.Q--;this.ea=null};function K(a){this.j=a;this.m=this.w=!1;this.R=null}function L(a){return"\n "+a.toString().split("\n").join("\n ")}K.prototype.h=h("w");function nc(a,b){a.w=b}function oc(a,b){a.m=b}K.prototype.B=h("R");function M(a,b){var c=a.evaluate(b);return c instanceof H?+kc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof H?kc(c):""+c}function pc(a,b){var c=a.evaluate(b);return c instanceof H?!!c.t():!!c};function qc(a,b,c){K.call(this,a.j);this.ia=a;this.oa=b;this.ta=c;this.w=b.h()||c.h();this.m=b.m||c.m;this.ia==rc&&(c.m||c.h()||4==c.j||0==c.j||!b.B()?b.m||(b.h()||4==b.j||0==b.j||!c.B())||(this.R={name:c.B().name,L:b}):this.R={name:b.B().name,L:c})}t(qc,K); +function sc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof H&&c instanceof H){e=lc(b);for(d=e.next();d;d=e.next())for(b=lc(c),f=b.next();f;f=b.next())if(a(G(d),G(f)))return!0;return!1}if(b instanceof H||c instanceof H){b instanceof H?e=b:(e=c,c=b);e=lc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}qc.prototype.evaluate=function(a){return this.ia.s(this.oa,this.ta,a)};qc.prototype.toString=function(){var a="Binary Expression: "+this.ia,a=a+L(this.oa);return a+=L(this.ta)};function tc(a,b,c,d){this.Ia=a;this.ra=b;this.j=c;this.s=d}tc.prototype.toString=h("Ia");var uc={}; +function O(a,b,c,d){if(uc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new tc(a,b,c,d);return uc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return sc(function(a,b){return a<b},a,b,c)}); +O(">",4,2,function(a,b,c){return sc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return sc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return sc(function(a,b){return a>=b},a,b,c)});var rc=O("=",3,2,function(a,b,c){return sc(function(a,b){return a==b},a,b,c,!0)});O("!=",3,2,function(a,b,c){return sc(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return pc(a,c)&&pc(b,c)});O("or",1,2,function(a,b,c){return pc(a,c)||pc(b,c)});function vc(a,b){if(b.t()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");K.call(this,a.j);this.sa=a;this.f=b;this.w=a.h();this.m=a.m}t(vc,K);vc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return wc(this.f,a)};vc.prototype.toString=function(){var a;a="Filter:"+L(this.sa);return a+=L(this.f)};function xc(a,b){if(b.length<a.qa)throw Error("Function "+a.p+" expects at least"+a.qa+" arguments, "+b.length+" given");if(null!==a.fa&&b.length>a.fa)throw Error("Function "+a.p+" expects at most "+a.fa+" arguments, "+b.length+" given");a.Ga&&v(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b);});K.call(this,a.j);this.V=a;this.$=b;nc(this,a.w||ta(b,function(a){return a.h()}));oc(this,a.Ea&&!b.length||a.Da&&!!b.length||ta(b,function(a){return a.m}))} +t(xc,K);xc.prototype.evaluate=function(a){return this.V.s.apply(null,xa(a,this.$))};xc.prototype.toString=function(){var a="Function: "+this.V;if(this.$.length)var b=sa(this.$,function(a,b){return a+L(b)},"Arguments:"),a=a+L(b);return a};function yc(a,b,c,d,e,f,g,k,r){this.p=a;this.j=b;this.w=c;this.Ea=d;this.Da=e;this.s=f;this.qa=g;this.fa=q(k)?k:g;this.Ga=!!r}yc.prototype.toString=h("p");var zc={}; +function P(a,b,c,d,e,f,g,k){if(zc.hasOwnProperty(a))throw Error("Function already created: "+a+".");zc[a]=new yc(a,b,c,d,!1,e,f,g,k)}P("boolean",2,!1,!1,function(a,b){return pc(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+N(c,a)},"")},2,null);P("contains",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2); +P("count",1,!1,!1,function(a,b){return b.evaluate(a).t()},1,1,!0);P("false",2,!1,!1,ba(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(M(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(Rb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(sb);var g=new H;v(f,function(a){g.add(a)});return g},1);P("lang",2,!1,!1,ba(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);P("local-name",3,!1,!0,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,ba(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!pc(b,a)},1);P("number",1,!1,!0,function(a,b){return b?M(b,a):+G(a.g)},0,1);P("position",1,!0,!1,function(a){return a.Ja},0);P("round",1,!1,!1,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?N(b,a):G(a.g)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){for(var c=lc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,!1,!1,ba(!0),0);function I(a,b){this.wa=a;this.pa=q(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=nb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Ac(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}I.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};I.prototype.getName=h("wa"); +I.prototype.toString=function(){var a="Kind Test: "+this.wa;null===this.pa||(a+=L(this.pa));return a};function Bc(a){K.call(this,3);this.ua=a.substring(1,a.length-1)}t(Bc,K);Bc.prototype.evaluate=h("ua");Bc.prototype.toString=function(){return"Literal: "+this.ua};function cc(a,b){this.p=a.toLowerCase();this.ga=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}cc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.p&&this.p!=a.nodeName.toLowerCase()?!1:this.ga==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};cc.prototype.getName=h("p");cc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.ga?"":this.ga+":")+this.p};function Cc(a){K.call(this,1);this.xa=a}t(Cc,K);Cc.prototype.evaluate=h("xa");Cc.prototype.toString=function(){return"Number: "+this.xa};function Dc(a,b){K.call(this,a.j);this.ma=a;this.S=b;this.w=a.h();this.m=a.m;if(1==this.S.length){var c=this.S[0];c.ba||c.A!=Ec||(c=c.Z,"*"!=c.getName()&&(this.R={name:c.getName(),L:null}))}}t(Dc,K);function Fc(){K.call(this,4)}t(Fc,K);Fc.prototype.evaluate=function(a){var b=new H;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Fc.prototype.toString=ba("Root Helper Expression");function Gc(){K.call(this,4)}t(Gc,K);Gc.prototype.evaluate=function(a){var b=new H;b.add(a.g);return b}; +Gc.prototype.toString=ba("Context Helper Expression"); +Dc.prototype.evaluate=function(a){var b=this.ma.evaluate(a);if(!(b instanceof H))throw Error("Filter expression must evaluate to nodeset.");a=this.S;for(var c=0,d=a.length;c<d&&b.t();c++){var e=a[c],f=lc(b,e.A.J),g;if(e.h()||e.A!=Hc)if(e.h()||e.A!=Ic)for(g=f.next(),b=e.evaluate(new Qb(g));null!=(g=f.next());)g=e.evaluate(new Qb(g)),b=ic(b,g);else g=f.next(),b=e.evaluate(new Qb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Qb(g))}}return b}; +Dc.prototype.toString=function(){var a;a="Path Expression:"+L(this.ma);if(this.S.length){var b=sa(this.S,function(a,b){return a+L(b)},"Steps:");a+=L(b)}return a};function Jc(a,b){this.f=a;this.J=!!b}function wc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=lc(b),f=b.t(),g,k=0;g=e.next();k++){var r=a.J?f-k:k+1;g=d.evaluate(new Qb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof H)r=0<g.t();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Jc.prototype.B=function(){return 0<this.f.length?this.f[0].B():null}; +Jc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Jc.prototype.t=function(){return this.f.length};Jc.prototype.toString=function(){return sa(this.f,function(a,b){return a+L(b)},"Predicates:")};function Kc(a,b,c,d){K.call(this,4);this.A=a;this.Z=b;this.f=c||new Jc([]);this.ba=!!d;b=this.f.B();a.Na&&b&&(a=b.name,a=Rb?a.toLowerCase():a,this.R={name:a,L:b.L});this.w=this.f.h()}t(Kc,K); +Kc.prototype.evaluate=function(a){var b=a.g,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.L?N(c.L,a):null,f=1);if(this.ba)if(this.h()||this.A!=Lc)if(a=lc((new Kc(Mc,new I("node"))).evaluate(a)),b=a.next())for(c=this.s(b,d,e,f);null!=(b=a.next());)c=ic(c,this.s(b,d,e,f));else c=new H;else c=$b(this.Z,b,d,e),c=wc(this.f,c,f);else c=this.s(a.g,d,e,f);return c};Kc.prototype.s=function(a,b,c,d){a=this.A.V(this.Z,a,b,c);return a=wc(this.f,a,d)}; +Kc.prototype.toString=function(){var a;a="Step:"+L("Operator: "+(this.ba?"//":"/"));this.A.p&&(a+=L("Axis: "+this.A));a+=L(this.Z);if(this.f.t()){var b=sa(this.f.f,function(a,b){return a+L(b)},"Predicates:");a+=L(b)}return a};function Nc(a,b,c,d){this.p=a;this.V=b;this.J=c;this.Na=d}Nc.prototype.toString=h("p");var Oc={};function Q(a,b,c,d){if(Oc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Nc(a,b,c,!!d);return Oc[a]=b} +Q("ancestor",function(a,b){for(var c=new H,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new H,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Ec=Q("attribute",function(a,b){var c=new H,d=a.getName();if("style"==d&&b.style&&Rb)return c.add(new Tb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof I&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Rb?g.nodeValue&&c.add(Ub(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Rb?g.nodeValue&&c.add(Ub(b,g,b.sourceIndex)):c.add(g));return c},!1),Lc=Q("child",function(a,b,c,d,e){return(Rb?fc:gc).call(null,a,b,s(c)?c:null,s(d)?d:null,e||new H)}, +!1,!0);Q("descendant",$b,!1,!0);var Mc=Q("descendant-or-self",function(a,b,c,d){var e=new H;Zb(b,c,d)&&a.matches(b)&&e.add(b);return $b(a,b,c,d,e)},!1,!0),Hc=Q("following",function(a,b,c,d){var e=new H;do for(var f=b;f=f.nextSibling;)Zb(f,c,d)&&a.matches(f)&&e.add(f),e=$b(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new H,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new H},!1); +var Pc=Q("parent",function(a,b){var c=new H;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Ic=Q("preceding",function(a,b,c,d){var e=new H,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var u=0,w=r.length;u<w;u++)b=r[u],Zb(b,c,d)&&a.matches(b)&&e.add(b),e=$b(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new H,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Qc=Q("self",function(a,b){var c=new H;a.matches(b)&&c.add(b);return c},!1);function Rc(a){K.call(this,1);this.la=a;this.w=a.h();this.m=a.m}t(Rc,K);Rc.prototype.evaluate=function(a){return-M(this.la,a)};Rc.prototype.toString=function(){return"Unary Expression: -"+L(this.la)};function Sc(a){K.call(this,4);this.X=a;nc(this,ta(this.X,function(a){return a.h()}));oc(this,ta(this.X,function(a){return a.m}))}t(Sc,K);Sc.prototype.evaluate=function(a){var b=new H;v(this.X,function(c){c=c.evaluate(a);if(!(c instanceof H))throw Error("Path expression must evaluate to NodeSet.");b=ic(b,c)});return b};Sc.prototype.toString=function(){return sa(this.X,function(a,b){return a+L(b)},"Union Expression:")};function Tc(a,b){this.a=a;this.Ha=b}function Uc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Vc(a);var d=a.a.next();if(!d)break;var e=(d=uc[d]||null)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new qc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new qc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Wc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Xc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Yc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Bc(a)}function Zc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new cc(b);var d=b.substring(0,c);a=a.Ha(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new cc(b,a)} +function $c(a){var b,c=[],d;if("/"==F(a.a)||"//"==F(a.a)){b=a.a.next();d=F(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Fc;d=new Fc;R(a,"Missing next location step.");b=ad(a,b);c.push(b)}else{a:{b=F(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Uc(a);R(a,'unclosed "("');Wc(a,")");break;case '"':case "'":b=Yc(a);break;default:if(isNaN(+b))if(!Ac(b)&&/(?![0-9])[\w]/.test(d)&& +"("==F(a.a,1)){b=a.a.next();b=zc[b]||null;a.a.next();for(d=[];")"!=F(a.a);){R(a,"Missing function argument list.");d.push(Uc(a));if(","!=F(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Xc(a);b=new xc(b,d)}else{b=null;break a}else b=new Cc(+a.a.next())}"["==F(a.a)&&(d=new Jc(bd(a)),b=new vc(b,d))}if(b)if("/"==F(a.a)||"//"==F(a.a))d=b;else return b;else b=ad(a,"/"),d=new Gc,c.push(b)}for(;"/"==F(a.a)||"//"==F(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=ad(a,b),c.push(b); +return new Dc(d,c)} +function ad(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==F(a.a))return d=new Kc(Qc,new I("node")),a.a.next(),d;if(".."==F(a.a))return d=new Kc(Pc,new I("node")),a.a.next(),d;var f;if("@"==F(a.a))f=Ec,a.a.next(),R(a,"Missing attribute name");else if("::"==F(a.a,1)){if(!/(?![0-9])[\w]/.test(F(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Oc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=Lc; +c=F(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==F(a.a,1)){if(!Ac(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!Ac(c))throw Error("Invalid type name: "+c);Wc(a,"(");R(a,"Bad nodetype");e=F(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Yc(a);R(a,"Bad nodetype");Xc(a);c=new I(c,g)}else c=Zc(a);else if("*"==c)c=Zc(a);else throw Error("Bad token: "+a.a.next());e=new Jc(bd(a),f.J);return d||new Kc(f,c,e,"//"==b)} +function bd(a){for(var b=[];"["==F(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Uc(a);b.push(c);R(a,"Unclosed predicate expression.");Wc(a,"]")}return b}function Vc(a){if("-"==F(a.a))return a.a.next(),new Rc(Vc(a));var b=$c(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push($c(a));a.a.back();a=new Sc(b)}return a};function cd(a){switch(a.nodeType){case 1:return ka(dd,a);case 9:return cd(a.documentElement);case 2:return a.ownerElement?cd(a.ownerElement):ed;case 11:case 10:case 6:case 12:return ed;default:return a.parentNode?cd(a.parentNode):ed}}function ed(){return null}function dd(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?dd(a.parentNode,b):null};function fd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Wb(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=ba(null);var d=Uc(new Tc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Qb(a));return new S(c,b)}} +function S(a,b){if(0==b)if(a instanceof H)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 H))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof H?kc(a):""+a;break;case 1:this.numberValue=a instanceof H?+kc(a):+a;break;case 3:this.booleanValue=a instanceof H?0<a.t():!!a;break;case 4:case 5:case 6:case 7:var d= +lc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Tb?e.g:e);this.snapshotLength=a.t();this.invalidIteratorState=!1;break;case 8:case 9:d=jc(a);this.singleNodeValue=d instanceof Tb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function gd(a){this.lookupNamespaceURI=cd(a)} +function hd(a){a=a||p;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new fd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new fd(a,b)},b.createNSResolver=function(a){return new gd(a)})};var T={};T.za=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.s=function(a,b,c){var d=E(a);(A||Nb)&&hd(D(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.za;return A&&!eb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!B||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +T.aa=function(a,b){if(!a||1!=a.nodeType)throw new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.Ma=function(a,b){var c=function(){var c=T.s(b,a,9);return c?(c=c.singleNodeValue,z?c:c||null):b.selectSingleNode?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.aa(c,a);return c}; +T.Qa=function(a,b){var c=function(){var c=T.s(b,a,7);if(c){var e=c.snapshotLength;z&&!q(e)&&T.aa(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){T.aa(b,a)});return c};function id(a){return(a=a.exec(Na()))?a[1]:""}var jd=function(){if(Jb)return id(/Firefox\/([0-9.]+)/);if(A||z)return Va;if(Ob)return id(/Chrome\/([0-9.]+)/);if(Pb)return id(/Version\/([0-9.]+)/);if(Lb||Mb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Nb)return(a=id(/Android\s+([0-9.]+)/))?a:id(/Version\/([0-9.]+)/);if(Kb)return id(/Camino\/([0-9.]+)/)}return""}();var kd,ld;function U(a){return md?kd(a):A?0<=na(fb,a):eb(a)}function nd(a){return md?ld(a):Nb?0<=na(od,a):0<=na(jd,a)} +var md=function(){if(!B)return!1;var a=p.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;kd=function(a){return 0<=d.Ba(e,""+a)};ld=function(a){return 0<=d.Ba(f,""+a)};return!0}(),pd=Mb||Lb,qd;if(Nb){var rd=/Android\s+([0-9\.]+)/.exec(Na());qd=rd?rd[1]:"0"}else qd="0"; +var od=qd,sd=A&&!C(8),td=A&&!C(9),ud=C(10),vd=A&&!C(10);Nb&&nd(2.3);Nb&&nd(4);Pb&&nd(6);var wd=A&&-1!=Na().indexOf("IEMobile");function xd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}m=xd.prototype;m.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};m.contains=function(a){return this&&a?a instanceof xd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +m.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};m.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};m.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}m=V.prototype;m.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};m.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +m.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function yd(a,b){var c=E(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function zd(a){a=a?E(a):document;var b;(b=!A)||(b=C(9))||(b=a?new zb(E(a)):hb||(hb=new zb),b=pb(b.F));return b?a.documentElement:a.body} +function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=Qa&&!b&&!c;if((!q(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}A&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new jb(e.right-e.left,e.bottom-e.top)}return new jb(b,c)}var Bd={thin:2,medium:4,thick:6}; +function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Dd(a){var b;a:{a=E(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return A&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,!0)&&Gd(a)&&!(A||z||B&&!U("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?!0:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Id(a){if(!Hd(a))throw new x(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Jd(a,b)}function Jd(a,b){var c;if(c=sd)if(c="value"==b)if(c=W(a,"OPTION"))c=null===Kd(a);c?(c=[],xb(a,c,!1),c=c.join("")):c=a[b];return c}var Ld=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Md(a){var b=[];v(a.split(Ld),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Kd(a){var b;b="value";return"style"==b?Md(a.style.cssText):sd&&"value"==b&&W(a,"INPUT")?a.value:td&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Nd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Gd(a){var b=a.tagName.toUpperCase();return wa(Nd,b)?Jd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):!yb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Jd(b,"disabled")){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:qb(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=td?"styleFloat":"cssFloat";var d=yd(a,c)||Pd(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!q(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?q(d)?d:null:(c=Od(a))?Pd(c,b):null} +function Fd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==nb||W(a)&&d(a)})}function e(a){return Rd(a)==Y&&ua(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +yb(a,function(a){return W(a,"SELECT")});return!!f&&Fd(f,!0)}return(f=Sd(a))?!!f.na&&0<f.rect.width&&0<f.rect.height&&Fd(f.na,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Td(a)||!d(a)?!1:!e(a)}var Y="hidden"; +function Rd(a,b){function c(a){var b=X(a,"position");if("fixed"==b)return w=!0,a==k?null:k;for(a=Od(a);a&&a!=k&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=Od(a);return a}function d(a){var b=a;if("visible"==u)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new zb(g)).F;a=!Qa&&pb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=A&&eb("10")&&b.pageYOffset!=a.scrollTop?new ib(a.scrollLeft,a.scrollTop):new ib(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new ib(a.scrollLeft,a.scrollTop);return a}for(var f=Ud(a,b),g=E(a),k=g.documentElement,r=g.body,u=X(k,"overflow"),w,n=c(a);n;n=c(n)){var l=d(n);if("visible"!=l.x||"visible"!=l.y){var y=Qd(n);if(0==y.width||0==y.height)return Y;var J=f.right<y.left,aa=f.bottom<y.top;if(J&&"hidden"==l.x||aa&&"hidden"== +l.y)return Y;if(J&&"visible"!=l.x||aa&&"visible"!=l.y){J=e(n);aa=f.bottom<y.top-J.y;if(f.right<y.left-J.x&&"visible"!=l.x||aa&&"visible"!=l.x)return Y;f=Rd(n);return f==Y?Y:"scroll"}J=f.left>=y.left+y.width;y=f.top>=y.top+y.height;if(J&&"hidden"==l.x||y&&"hidden"==l.y)return Y;if(J&&"visible"!=l.x||y&&"visible"!=l.y){if(w&&(l=e(n),f.left>=k.scrollWidth-l.x||f.right>=k.scrollHeight-l.y))return Y;f=Rd(n);return f==Y?Y:"scroll"}}}return"none"}var Vd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Qd(a){function b(a){var c=D(E(a)).getComputedStyle(a,null).MozTransform.match(Vd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),w=parseFloat(c[3]),n=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),y=f.left+f.width,J=f.top+f.height,aa=f.left*d,d=y*d,Xa=f.left*e,e=y*e,Ya=f.top*w,w=J*w,Za=f.top*n,y=J*n,J=aa+Ya+l,n=Xa+Za+c,Ya=d+Ya+l,Za=e+Za+c,aa=aa+w+l,Xa=Xa+y+c,l=d+w+l,c=e+y+c;f.left=Math.min(J,Ya,aa,l);f.top=Math.min(n,Za,Xa,c);l=Math.max(J,Ya,aa,l);c=Math.max(n,Za,Xa,c);f.width=l- +f.left;f.height=c-f.top}(a=Od(a))&&b(a)}var c=Sd(a);if(c)return c.rect;if(W(a,"HTML"))return c=E(a),a=ob(D(c)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);A&&a.ownerDocument.body&&(c=E(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);z&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));B&&!U(12)&&b(a);return f} +function Sd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.Ma('/descendant::*[@usemap = "#'+c.name+'"]',E(c)))&&(e=Qd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Wd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{na:d,rect:e||new V(0,0,0,0)}} +function Wd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)} +function Ud(a,b){var c;c=Qd(a);c=new xd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof V?b:new V(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Td(a){if(vd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Xd(a)}function Xd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Xd(a));return b};function Yd(a,b){this.d=ma.document.documentElement;this.n=null;var c=Dd(this.d);c&&Zd(this,c);this.D=a||new $d;this.ca=b||new ae}Yd.prototype.I=h("d");function Zd(a,b){a.d=b;a.n=W(b,"OPTION")?yb(b,function(a){return W(a,"SELECT")}):null} +Yd.prototype.o=function(a,b,c,d,e,f,g){if(!f&&!Ed(this.d))return!1;if(d&&be!=a&&ce!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=de&&a!=ee&&g in fe?c=fe[g]:this.n&&(c=ge(this,a));return c?this.ca.o(c,a,b):!0}; +Yd.prototype.da=function(a,b,c,d,e){function f(b,c){var d={identifier:b,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};g.changedTouches.push(d);if(a==he||a==ie)g.touches.push(d),g.targetTouches.push(d)}var g={touches:[],targetTouches:[],changedTouches:[],altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),relatedTarget:null,scale:0,rotation:0};f(b,c);q(d)&&f(d,e);return this.ca.da(this.d,a,g)}; +Yd.prototype.q=function(a,b,c,d,e,f,g,k){if(!k&&!Ed(this.d))return!1;if(g&&je!=a&&ke!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,La:0,rotation:0,pointerId:d,Oa:0,Pa:0,pointerType:e,Ca:f};c=this.n?ge(this,a):this.d;fe[d]&&(c=fe[d]);d=D(E(this.d));var r;d&&a==le&&(r=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){fe[a]= +this});a=c?this.ca.q(c,a,b):!0;r&&(d.Element.prototype.msSetPointerCapture=r);return a};function ge(a,b){if(A)switch(b){case be:case je:return null;case me:case ne:case oe:return a.n.multiple?a.n:null;default:return a.n}if(z)switch(b){case me:case be:return a.n.multiple?a.d:null;default:return a.d}if(Qa)switch(b){case de:case pe:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:null}return a.d} +function qe(a,b,c){if(Ed(a.d)){var d=null,e=null;if(!re)for(var f=a.d;f;f=f.parentNode)if(W(f,"A")){d=f;break}else{var g;a:{if(W(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=!0;break a}if(W(f,"BUTTON")&&(g=f.type.toLowerCase(),"submit"==g)){g=!0;break a}g=!1}if(g){e=f;break}}g=(f=!a.n&&Hd(a.d))&&Id(a.d);A&&e?e.click():a.o(de,b,0,null,0,!1,c)&&(d&&se(d)?(a=d,b=a.href,c=D(E(a)),A&&!U(8)&&(b=te(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):!f||(B||Qa||g&&"radio"==a.d.type.toLowerCase())|| +(a.d.checked=!g,z&&!U(11)&&ue(a.d,ve)))}}function we(a){a=a.n||a.d;var b=Dd(a);if(a!=b){if(b&&(fa(b.blur)||A&&ga(b.blur))){if(!W(b,"BODY"))try{b.blur()}catch(c){if(!A||"Unspecified error."!=c.message)throw c;}A&&!U(8)&&D(E(a)).focus()}if(fa(a.focus)||A&&ga(a.focus))z&&U(11)&&!Fd(a)?ue(a,xe):a.focus()}}var re=Qa||z||md&&nd(3.6); +function se(a){if(re||!a.href)return!1;if(!md)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=D(E(a)),c=b.location.href;a=te(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function ye(a){if(a.n&&Ed(a.d)){var b=a.n,c=Id(a.d);if(!c||b.multiple)a.d.selected=!c,(!Qa||!b.multiple||Ob&&nd(28)||Nb&&nd(4))&&ue(b,ve)}}var ze=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function te(a,b){var c=b.match(ze);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function $d(){this.Ka=0}$d.prototype.l=function(a){return 0!=(this.Ka&a)};var fe={};function ae(){}ae.prototype.o=function(a,b,c){return ue(a,b,c)};ae.prototype.da=function(a,b,c){return ue(a,b,c)}; +ae.prototype.q=function(a,b,c){return ue(a,b,c)};var Ae=!(A&&!U(10))&&!z,Be=Nb?!nd(4):!pd,Ce=A&&ma.navigator.msPointerEnabled;function De(a,b,c){this.e=a;this.M=b;this.N=c}De.prototype.create=function(a){a=E(a);td?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.M,this.N));return a};De.prototype.toString=h("e");function Z(a,b,c){De.call(this,a,b,c)}t(Z,De); +Z.prototype.create=function(a,b){if(!B&&this==Ee)throw new x(9,"Browser does not support a mouse pixel scroll event.");var c=E(a),d;if(td){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ce||this==be)if(Object.defineProperty){var e=this==ce;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==Fe&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=D(c);d=c.createEvent("MouseEvents");var f=1;this==Fe&&(B||(d.wheelDelta=b.wheelDelta),B||z)&&(f=b.wheelDelta/-40);B&&this==Ee&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.M,this.N,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=Ab(a?new zb(E(a)):hb||(hb=new zb)), +c=zd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function Ge(a,b,c){De.call(this,a,b,c)}t(Ge,De); +Ge.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!Ae)throw new x(9,"Browser does not support firing touch events.");var e=E(a),f=D(e),g=Be?d(b.changedTouches): +c(b.changedTouches),k=b.touches==b.changedTouches?g:Be?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:Be?d(b.targetTouches):c(b.targetTouches),u;Be?(u=e.createEvent("MouseEvents"),u.initMouseEvent(this.e,this.M,this.N,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),u.touches=k,u.targetTouches=r,u.changedTouches=g,u.scale=b.scale,u.rotation=b.rotation):(u=e.createEvent("TouchEvent"),Nb?u.initTouchEvent(k,r,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, +b.altKey,b.shiftKey,b.metaKey):u.initTouchEvent(this.e,this.M,this.N,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),u.relatedTarget=b.relatedTarget);return u};function He(a,b,c){De.call(this,a,b,c)}t(He,De); +He.prototype.create=function(a,b){if(!Ce)throw new x(9,"Browser does not support MSPointer events.");var c=E(a),d=D(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.M,this.N,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.La,b.rotation,b.Oa,b.Pa,b.pointerId,b.pointerType,0,b.Ca);return c}; +var ve=new De("change",!0,!1),xe=new De("focus",!1,!1),de=new Z("click",!0,!0),me=new Z("contextmenu",!0,!0),ee=new Z("mousedown",!0,!0),ne=new Z("mousemove",!0,!1),ce=new Z("mouseout",!0,!0),be=new Z("mouseover",!0,!0),pe=new Z("mouseup",!0,!0),Fe=new Z(B?"DOMMouseScroll":"mousewheel",!0,!0),Ee=new Z("MozMousePixelScroll",!0,!0),Ie=new Ge("touchend",!0,!0),ie=new Ge("touchmove",!0,!0),he=new Ge("touchstart",!0,!0),Je=new He("MSGotPointerCapture",!0,!1),Ke=new He("MSLostPointerCapture",!0,!1),Le= +new He("MSPointerCancel",!0,!0),le=new He("MSPointerDown",!0,!0),oe=new He("MSPointerMove",!0,!0),je=new He("MSPointerOver",!0,!0),ke=new He("MSPointerOut",!0,!0),Me=new He("MSPointerUp",!0,!0);function ue(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return td?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function Ne(a,b){this.C={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Ne)for(d=Oe(a),Pe(a),e=[],c=0;c<a.i.length;c++)e.push(a.C[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}m=Ne.prototype;m.O=0;m.ya=0;function Oe(a){Pe(a);return a.i.concat()} +m.remove=function(a){return Object.prototype.hasOwnProperty.call(this.C,a)?(delete this.C[a],this.O--,this.ya++,this.i.length>2*this.O&&Pe(this),!0):!1};function Pe(a){if(a.O!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.C,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.O!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +m.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.C,a)?this.C[a]:b};m.set=function(a,b){Object.prototype.hasOwnProperty.call(this.C,a)||(this.O++,this.i.push(a),this.ya++);this.C[a]=b};var Qe={};function $(a,b,c){ga(a)&&(a=B?a.b:z?a.opera:a.c);a=new Re(a,b,c);!b||b in Qe&&!c||(Qe[b]={key:a,shift:!1},c&&(Qe[c]={key:a,shift:!0}));return a}function Re(a,b,c){this.code=a;this.Aa=b||null;this.Sa=c||this.Aa}$(8);$(9);$(13);var Se=$(16),Te=$(17),Ue=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); +$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Ve=$(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +$(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});$(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Ta?56:42},"*"); +$({b:107,c:107,opera:Ta?61:43},"+");$({b:109,c:109,opera:Ta?109:45},"-");$({b:110,c:110,opera:Ta?190:78},".");$({b:111,c:111,opera:Ta?191:47},"/");$(Ta&&z?null:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var We=new Ne; +We.set(1,Se);We.set(2,Te);We.set(4,Ue);We.set(8,Ve);(function(a){var b=new Ne;v(Oe(a),function(c){b.set(a.get(c).code,c)});return b})(We);B&&U(12);function Xe(){Yd.call(this);this.v=new ib(0,0);this.U=new ib(0,0)}t(Xe,Yd);m=Xe.prototype;m.P=!1;m.T=!1;m.H=0;m.K=0;m.va=2; +m.move=function(a,b,c){var d=this.I();this.l()&&!ud||Zd(this,a);var e=Qd(a);this.v.x=b.x+e.left;this.v.y=b.y+e.top;q(c)&&(this.U.x=c.x+e.left,this.U.y=c.y+e.top);this.l()&&(ud?this.T||(a!=d&&(this.P=!0),Ze(a)?$e(this,af):(this.q(ke,b,-1,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.o(ce,b,0),this.q(Le,b,0,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.T=!0,fe={})):(this.P=!0,Ye(this,ie)))};m.l=function(){return!!this.H}; +function Ye(a,b){if(!a.l())throw new x(13,"Should never fire event when touchscreen is not pressed.");var c,d;a.K&&(c=a.K,d=a.U);a.da(b,a.H,a.v,c,d)}function $e(a,b){b(a,a.I(),a.v,a.H,!0);a.K&&Ze(a.I())&&b(a,a.I(),a.U,a.K,!1)}function bf(a,b,c,d,e){a.o(ne,c,0);a.q(je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(be,c,0);a.q(le,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ee,c,0)&&(Hd(b)&&a.q(Je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e),we(a))} +function cf(a,b,c,d,e){a.q(Me,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(pe,c,0,null,0,!1,d);a.P||(ye(a),wd&&W(b,"OPTION")||qe(a,a.v,d));Hd(b)&&a.q(Ke,new ib(0,0),0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!1);a.q(ke,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ce,c,0,null,0,!1,d)}function af(a,b,c,d,e){a.q(oe,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ne,c,0,null,0,!1,d)} +function Ze(a){if(!ud)throw Error("hasMsTouchActionsEnable should only be called from IE 10");if("none"==X(a,"ms-touch-action"))return!0;a=Od(a);return!!a&&Ze(a)};function df(a,b){this.x=a;this.y=b}t(df,ib);df.prototype.scale=ib.prototype.scale;df.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ef(a,b){a.x-=b.x;a.y-=b.y;return a}function ff(a,b){return new df(a.x+b.x,a.y+b.y)}function gf(a,b){return new df(a.x-b.x,a.y-b.y)};function hf(a,b,c,d){if(0==b)throw new x(13,"Cannot pinch by a distance of zero.");var e=b/2;jf(a,function(a){if(0>b){var c=Math.sqrt(a.x*a.x+a.y*a.y);a.scale(c?(c+b)/c:0)}},function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y);a.scale(b?(b-e)/b:0)},c,d)} +function jf(a,b,c,d,e){if(!Fd(a,!0))throw new x(11,"Element is not currently visible and may not be manipulated");b:{var f=d||void 0;if("scroll"==Rd(a,f)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Rd(a,f)))break b;for(var g=Ud(a,f),k=Od(a);k;k=Od(k)){var r=k,u=Qd(r),w;var n=r;if(A&&!C(9)){var l=Cd(n,"borderLeft");w=Cd(n,"borderRight");var y=Cd(n,"borderTop"),n=Cd(n,"borderBottom");w=new xd(y,w,n,l)}else l=yd(n,"borderLeftWidth"),w=yd(n,"borderRightWidth"),y=yd(n,"borderTopWidth"),n=yd(n,"borderBottomWidth"), +w=new xd(parseFloat(y),parseFloat(w),parseFloat(n),parseFloat(l));l=g.left-u.left-w.left;u=g.top-u.top-w.top;w=r.clientHeight+g.top-g.bottom;r.scrollLeft+=Math.min(l,Math.max(l-(r.clientWidth+g.left-g.right),0));r.scrollTop+=Math.min(u,Math.max(u-w,0))}Rd(a,f)}}d?d=new df(d.x,d.y):(d=kf(a),d=new df(d.width/2,d.height/2));f=kf(a);f=new df(Math.min(d.x,f.width-d.x),Math.min(d.y,f.height-d.y));e=e||new Xe;b(f);e.move(a,ff(d,f),gf(d,f));if(e.l())throw new x(13,"Cannot press touchscreen when already pressed."); +e.P=!1;e.H=e.va++;e.K=e.va++;ud?$e(e,bf):Ye(e,he);b=Qd(a);c(f);e.move(a,ff(d,f),gf(d,f));g=Qd(a);b=gf(new df(g.left,g.top),new df(b.left,b.top));c(f);c=ef(ff(d,f),b);b=ef(gf(d,f),b);e.move(a,c,b);if(!e.l())throw new x(13,"Cannot release touchscreen when not already pressed.");ud?e.T||$e(e,cf):(Ye(e,Ie),e.P||(e.o(ne,e.v,0),e.o(ee,e.v,0)&&we(e),ye(e),e.o(pe,e.v,0),wd&&W(e.I(),"OPTION")||qe(e,e.v)));fe={};e.H=0;e.K=0;e.T=!1} +function kf(a){var b;if("none"!=(yd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=Ad(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=Ad(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:kf(a.offsetParent)};function lf(){this.Y=void 0} +function mf(a,b,c){switch(typeof b){case "string":nf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],mf(a,a.Y?a.Y.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +nf(f,c),c.push(":"),mf(a,a.Y?a.Y.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var of={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},pf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function nf(a,b){b.push('"',a.replace(pf,function(a){if(a in of)return of[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return of[a]=e+b.toString(16)}),'"')};Qa||z||B&&U(3.5)||A&&U(8);function qf(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,qf);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=rf(a);return b}if("document"in a)return b={},b.WINDOW=rf(a),b;if(da(a))return ra(a,qf);a=kb(a,function(a,b){return ea(b)||s(b)});return lb(a,qf);default:return null}} +function sf(a,b){return"array"==ca(a)?ra(a,function(a){return sf(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?tf(a.ELEMENT,b):"WINDOW"in a?tf(a.WINDOW,b):lb(a,function(a){return sf(a,b)}):a}function uf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ha=la());b.ha||(b.ha=la());return b}function rf(a){var b=uf(a.ownerDocument),c=mb(b,function(b){return b==a});c||(c=":wdc:"+b.ha++,b[c]=a);return c} +function tf(a,b){a=decodeURIComponent(a);var c=b||document,d=uf(c);if(!(a in d))throw new x(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new x(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new x(10,"Element is no longer attached to the DOM");};function vf(a,b,c){a=[a,b,c];b=hf;var d;try{b=s(b)?new ma.Function(b):ma==window?b:new ma.Function("return ("+b+").apply(null,arguments);");var e=sf(a,ma.document),f=b.apply(null,e);d={status:0,value:qf(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}e=[];mf(new lf,d,e);return e.join("")}var wf=["_"],xf=p;wf[0]in xf||!xf.execScript||xf.execScript("var "+wf[0]);for(var yf;wf.length&&(yf=wf.shift());)wf.length||void 0===vf?xf=xf[yf]?xf[yf]:xf[yf]={}:xf[yf]=vf;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/remove_local_storage_item.js b/src/ghostdriver/third_party/webdriver-atoms/remove_local_storage_item.js index b10d6be01..18e295def 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/remove_local_storage_item.js +++ b/src/ghostdriver/third_party/webdriver-atoms/remove_local_storage_item.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,ta=Q;function T(a){return(a=a.exec(A()))?a[1]:""}var ua=function(){if(oa)return T(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return T(/Chrome\/([0-9.]+)/);if(ta)return T(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(pa)return T(/Camino\/([0-9.]+)/)}return""}();var va,wa;function U(a){return xa?va(a):D?0<=v(na,a):J(a)}function V(a){return xa?wa(a):S?0<=v(ya,a):0<=v(ua,a)} -var xa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;va=function(a){return 0<=d.d(e,""+a)};wa=function(a){return 0<=d.d(f,""+a)};return h}(),za;if(S){var Aa=/Android\s+([0-9\.]+)/.exec(A());za=Aa?Aa[1]:"0"}else za="0";var ya=za;S&&V(2.3);function Ba(){this.a=g} -function Ca(a,b,c){switch(typeof b){case "string":Da(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ca(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Da(f, -c),c.push(":"),Ca(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ea={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ja=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Da(a,b){b.push('"',a.replace(Ja,function(a){if(a in Ea)return Ea[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ea[a]=e+b.toString(16)}),'"')};fa||C||E&&U(3.5)||D&&U(8);function Ka(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var La;if(La=D)La=D&&9<=na;La||E&&J("1.9.1")}D&&J("9");function Ma(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Na(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Oa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function W(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ka(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Pa(a);return b}if("document"in a)return b={},b.WINDOW=Pa(a),b;if(aa(a))return Ka(a,W);a=Ma(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Na(a,W);default:return k}} -function Qa(a,b){return"array"==q(a)?Ka(a,function(a){return Qa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ra(a.ELEMENT,b):"WINDOW"in a?Ra(a.WINDOW,b):Na(a,function(a){return Qa(a,b)}):a}function Sa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Pa(a){var b=Sa(a.ownerDocument),c=Oa(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Ra(a,b){a=decodeURIComponent(a);var c=b||document,d=Sa(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Ta=D&&U(8)&&!U(9),Ua=ta&&V(4)&&!V(5),Va=S&&V(2.2)&&!V(2.3),Wa=ha&&ta&&V(4)&&!V(6); -function Xa(){var a=r||r;switch("local_storage"){case "appcache":return Ta?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ua||Va?l:a.openDatabase!=k;case "location":return Wa?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Ta?l:a.localStorage!=k;case "session_storage":return Ta?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}} -;function X(a){this.c=a}X.prototype.getItem=function(a){return this.c.getItem(a)};X.prototype.removeItem=function(a){var b=this.getItem(a);this.c.removeItem(a);return b};X.prototype.clear=function(){this.c.clear()};function Ya(a){if(!Xa())throw new s(13,"Local storage undefined");return(new X(r.localStorage)).removeItem(a)};function Za(a){var b=Ya;a=[a];var c=window||r,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Qa(a,c.document),f=b.apply(k,e);d={status:0,value:W(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}b=[];Ca(new Ba,d,b);return b.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function Ga(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ha;if(Ha=z)Ha=z&&9<=na;Ha||A&&F("1.9.1")}z&&F("9");function Ia(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ja(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ka(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function W(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ga(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=La(a);return b}if("document"in a)return b={},b.WINDOW=La(a),b;if(aa(a))return Ga(a,W);a=Ia(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ja(a,W);default:return null}} +function Ma(a,b){return"array"==h(a)?Ga(a,function(a){return Ma(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Na(a.ELEMENT,b):"WINDOW"in a?Na(a.WINDOW,b):Ja(a,function(a){return Ma(a,b)}):a}function Oa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function La(a){var b=Oa(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Na(a,b){a=decodeURIComponent(a);var c=b||document,d=Oa(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Pa=z&&R(8)&&!R(9),Qa=P&&S(4)&&!S(5),Ra=O&&S(2.2)&&!S(2.3),Sa=ha&&P&&S(4)&&!S(6); +function Ta(){var a=m||m;switch("local_storage"){case "appcache":return Pa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Qa||Ra?!1:null!=a.openDatabase;case "location":return Sa?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Pa?!1:null!=a.localStorage;case "session_storage":return Pa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function X(a){this.c=a}X.prototype.getItem=function(a){return this.c.getItem(a)};X.prototype.removeItem=function(a){var b=this.getItem(a);this.c.removeItem(a);return b};X.prototype.clear=function(){this.c.clear()};function Ua(a){if(!Ta())throw new n(13,"Local storage undefined");return(new X(m.localStorage)).removeItem(a)};function Va(a){var b=Ua;a=[a];var c=window||m,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Ma(a,c.document),f=b.apply(null,e);d={status:0,value:W(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}b=[];U(new za,d,b);return b.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/remove_session_storage_item.js b/src/ghostdriver/third_party/webdriver-atoms/remove_session_storage_item.js index 9fa7e8e6b..9b469819f 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/remove_session_storage_item.js +++ b/src/ghostdriver/third_party/webdriver-atoms/remove_session_storage_item.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,p=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=u[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",u={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};u[13]=da;u[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function v(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),t=0;0==c&&t<f;t++){var Fa=d[t]||"",Ga=e[t]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var m=Ha.exec(Fa)||["","",""],n=Ia.exec(Ga)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))> -(0==n[1].length?0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c};var w,x,y,z;function A(){return p.navigator?p.navigator.userAgent:k}z=y=x=w=l;var B;if(B=A()){var ea=p.navigator;w=0==B.indexOf("Opera");x=!w&&-1!=B.indexOf("MSIE");y=!w&&-1!=B.indexOf("WebKit");z=!w&&!y&&"Gecko"==ea.product}var C=w,D=x,E=z,fa=y,ga=p.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=p.document;return a?a.documentMode:g}var F; -a:{var G="",H;if(C&&p.opera)var I=p.opera.version,G="function"==typeof I?I():I;else if(E?H=/rv\:([^\);]+)(\)|;)/:D?H=/MSIE\s+([^\);]+)(\)|;)/:fa&&(H=/WebKit\/(\S+)/),H)var ja=H.exec(A()),G=ja?ja[1]:"";if(D){var ka=ia();if(ka>parseFloat(G)){F=String(ka);break a}}F=G}var la={};function J(a){return la[a]||(la[a]=0<=v(F,a))}var ma=p.document,na=!ma||!D?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(F,10):5);var K,L,M,N,O,P,Q;Q=P=O=N=M=L=K=l;var R=A();R&&(-1!=R.indexOf("Firefox")?K=h:-1!=R.indexOf("Camino")?L=h:-1!=R.indexOf("iPhone")||-1!=R.indexOf("iPod")?M=h:-1!=R.indexOf("iPad")?N=h:-1!=R.indexOf("Android")?O=h:-1!=R.indexOf("Chrome")?P=h:-1!=R.indexOf("Safari")&&(Q=h));var oa=K,pa=L,qa=M,ra=N,S=O,sa=P,ta=Q;function T(a){return(a=a.exec(A()))?a[1]:""}var ua=function(){if(oa)return T(/Firefox\/([0-9.]+)/);if(D||C)return F;if(sa)return T(/Chrome\/([0-9.]+)/);if(ta)return T(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(A());if(a)return a[1]+"."+a[2]}else{if(S)return(a=T(/Android\s+([0-9.]+)/))?a:T(/Version\/([0-9.]+)/);if(pa)return T(/Camino\/([0-9.]+)/)}return""}();var va,wa;function U(a){return xa?va(a):D?0<=v(na,a):J(a)}function V(a){return xa?wa(a):S?0<=v(ya,a):0<=v(ua,a)} -var xa=function(){if(!E)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}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;va=function(a){return 0<=d.d(e,""+a)};wa=function(a){return 0<=d.d(f,""+a)};return h}(),za;if(S){var Aa=/Android\s+([0-9\.]+)/.exec(A());za=Aa?Aa[1]:"0"}else za="0";var ya=za;S&&V(2.3);function Ba(){this.a=g} -function Ca(a,b,c){switch(typeof b){case "string":Da(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ca(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Da(f, -c),c.push(":"),Ca(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ea={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ja=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Da(a,b){b.push('"',a.replace(Ja,function(a){if(a in Ea)return Ea[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ea[a]=e+b.toString(16)}),'"')};fa||C||E&&U(3.5)||D&&U(8);function Ka(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};if(E||D){var La;if(La=D)La=D&&9<=na;La||E&&J("1.9.1")}D&&J("9");function Ma(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function Na(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function Oa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function W(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ka(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Pa(a);return b}if("document"in a)return b={},b.WINDOW=Pa(a),b;if(aa(a))return Ka(a,W);a=Ma(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Na(a,W);default:return k}} -function Qa(a,b){return"array"==q(a)?Ka(a,function(a){return Qa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ra(a.ELEMENT,b):"WINDOW"in a?Ra(a.WINDOW,b):Na(a,function(a){return Qa(a,b)}):a}function Sa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Pa(a){var b=Sa(a.ownerDocument),c=Oa(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Ra(a,b){a=decodeURIComponent(a);var c=b||document,d=Sa(c);if(!(a in d))throw new s(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new s(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new s(10,"Element is no longer attached to the DOM");};var Ta=D&&U(8)&&!U(9),Ua=ta&&V(4)&&!V(5),Va=S&&V(2.2)&&!V(2.3),Wa=ha&&ta&&V(4)&&!V(6); -function Xa(){var a=r||r;switch("session_storage"){case "appcache":return Ta?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ua||Va?l:a.openDatabase!=k;case "location":return Wa?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Ta?l:a.localStorage!=k;case "session_storage":return Ta?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter"); -}};function X(a){this.c=a}X.prototype.getItem=function(a){return this.c.getItem(a)};X.prototype.removeItem=function(a){var b=this.getItem(a);this.c.removeItem(a);return b};X.prototype.clear=function(){this.c.clear()};function Ya(a){var b;if(Xa())b=new X(r.sessionStorage);else throw new s(13,"Session storage undefined");return b.removeItem(a)};function Za(a){var b=Ya;a=[a];var c=window||r,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Qa(a,c.document),f=b.apply(k,e);d={status:0,value:W(f)}}catch(t){d={status:"code"in t?t.code:13,value:{message:t.message}}}b=[];Ca(new Ba,d,b);return b.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var m=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var Aa=d[q]||"",Ba=e[q]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var k=Ca.exec(Aa)||["","",""],l=Da.exec(Ba)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))> +(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var x;if(x=w()){var ea=g.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var B; +a:{var C="",D;if(y&&g.opera)var E=g.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:fa&&(D=/WebKit\/(\S+)/),D)var ja=D.exec(w()),C=ja?ja[1]:"";if(z){var ka=ia();if(ka>parseFloat(C)){B=String(ka);break a}}B=C}var la={};function F(a){return la[a]||(la[a]=0<=r(B,a))}var ma=g.document,na=ma&&z?ia()||("CSS1Compat"==ma.compatMode?parseInt(B,10):5):void 0;var G,H,I,J,K,L,M;M=L=K=J=I=H=G=!1;var N=w();N&&(-1!=N.indexOf("Firefox")?G=!0:-1!=N.indexOf("Camino")?H=!0:-1!=N.indexOf("iPhone")||-1!=N.indexOf("iPod")?I=!0:-1!=N.indexOf("iPad")?J=!0:-1!=N.indexOf("Android")?K=!0:-1!=N.indexOf("Chrome")?L=!0:-1!=N.indexOf("Safari")&&(M=!0));var oa=G,pa=H,qa=I,ra=J,O=K,sa=L,P=M;function Q(a){return(a=a.exec(w()))?a[1]:""}var ta=function(){if(oa)return Q(/Firefox\/([0-9.]+)/);if(z||y)return B;if(sa)return Q(/Chrome\/([0-9.]+)/);if(P)return Q(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(O)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(pa)return Q(/Camino\/([0-9.]+)/)}return""}();var ua,va;function R(a){return wa?ua(a):z?0<=r(na,a):F(a)}function S(a){return wa?va(a):O?0<=r(xa,a):0<=r(ta,a)} +var wa=function(){if(!A)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ua=function(a){return 0<=d.d(e,""+a)};va=function(a){return 0<=d.d(f,""+a)};return!0}(),T;if(O){var ya=/Android\s+([0-9\.]+)/.exec(w());T=ya?ya[1]:"0"}else T="0";var xa=T;O&&S(2.3); +O&&S(4);P&&S(6);function za(){this.a=void 0} +function U(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],U(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ea(f, +c),c.push(":"),U(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var V={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Fa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ea(a,b){b.push('"',a.replace(Fa,function(a){if(a in V)return V[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return V[a]=e+b.toString(16)}),'"')};fa||y||A&&R(3.5)||z&&R(8);function Ga(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d};if(A||z){var Ha;if(Ha=z)Ha=z&&9<=na;Ha||A&&F("1.9.1")}z&&F("9");function Ia(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ja(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ka(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function W(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ga(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=La(a);return b}if("document"in a)return b={},b.WINDOW=La(a),b;if(aa(a))return Ga(a,W);a=Ia(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ja(a,W);default:return null}} +function Ma(a,b){return"array"==h(a)?Ga(a,function(a){return Ma(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Na(a.ELEMENT,b):"WINDOW"in a?Na(a.WINDOW,b):Ja(a,function(a){return Ma(a,b)}):a}function Oa(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function La(a){var b=Oa(a.ownerDocument),c=Ka(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Na(a,b){a=decodeURIComponent(a);var c=b||document,d=Oa(c);if(!(a in d))throw new n(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new n(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new n(10,"Element is no longer attached to the DOM");};var Pa=z&&R(8)&&!R(9),Qa=P&&S(4)&&!S(5),Ra=O&&S(2.2)&&!S(2.3),Sa=ha&&P&&S(4)&&!S(6); +function Ta(){var a=m||m;switch("session_storage"){case "appcache":return Pa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Qa||Ra?!1:null!=a.openDatabase;case "location":return Sa?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Pa?!1:null!=a.localStorage;case "session_storage":return Pa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function X(a){this.c=a}X.prototype.getItem=function(a){return this.c.getItem(a)};X.prototype.removeItem=function(a){var b=this.getItem(a);this.c.removeItem(a);return b};X.prototype.clear=function(){this.c.clear()};function Ua(a){var b;if(Ta())b=new X(m.sessionStorage);else throw new n(13,"Session storage undefined");return b.removeItem(a)};function Va(a){var b=Ua;a=[a];var c=window||m,d;try{var b="string"==typeof b?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=Ma(a,c.document),f=b.apply(null,e);d={status:0,value:W(f)}}catch(q){d={status:"code"in q?q.code:13,value:{message:q.message}}}b=[];U(new za,d,b);return b.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/right_click.js b/src/ghostdriver/third_party/webdriver-atoms/right_click.js index d0793323e..c91793cd9 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/right_click.js +++ b/src/ghostdriver/third_party/webdriver-atoms/right_click.js @@ -1,113 +1,121 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var m=this; function ca(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function ea(a){return"function"==ca(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ha=window;function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",y=e[g]||"",K=RegExp("(\\d*)(\\D*)","g"),w=RegExp("(\\d*)(\\D*)","g");do{var R=K.exec(p)||["","",""],ba=w.exec(y)||["","",""];if(0==R[0].length&&0==ba[0].length)break;c=((0==R[1].length?0:parseInt(R[1],10))<(0==ba[1].length?0:parseInt(ba[1],10))?-1:(0==R[1].length?0:parseInt(R[1],10))>(0== -ba[1].length?0:parseInt(ba[1],10))?1:0)||((0==R[2].length)<(0==ba[2].length)?-1:(0==R[2].length)>(0==ba[2].length)?1:0)||(R[2]<ba[2]?-1:R[2]>ba[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function v(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function oa(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function pa(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function qa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ra(a){return ka.concat.apply(ka,arguments)} -function sa(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ta={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return void 0!==a}function ea(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function n(a){return"string"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)} +function ia(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)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)} +function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.Ua=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var l=d[g]||"",q=e[g]||"",y=RegExp("(\\d*)(\\D*)","g"),z=RegExp("(\\d*)(\\D*)","g");do{var s=y.exec(l)||["","",""],k=z.exec(q)||["","",""];if(0==s[0].length&&0==k[0].length)break;c=((0==s[1].length?0:parseInt(s[1],10))<(0==k[1].length?0:parseInt(k[1],10))?-1:(0==s[1].length?0:parseInt(s[1],10))>(0==k[1].length? +0:parseInt(k[1],10))?1:0)||((0==s[2].length)<(0==k[2].length)?-1:(0==s[2].length)>(0==k[2].length)?1:0)||(s[2]<k[2]?-1:s[2]>k[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function r(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=n(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var l=f[g];b.call(void 0,l,g,a)&&(d[e++]=l)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=n(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;r(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=n(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 ua(a,b){for(var c=a.length,d=n(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 va(a,b){var c;a:{c=a.length;for(var d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:n(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(n(a))c=n(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ua="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function wa(a){xa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(va,"#$1$1$2$2$3$3"));return a.toLowerCase()}var xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a){var b=a.match(Aa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function x(a,b){this.code=a;this.state=Ca[a]||Da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(x,Error); -var Da="unknown error",Ca={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ca[13]=Da;Ca[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return r.navigator?r.navigator.userAgent:m}Ha=Ga=Fa=Ea=n;var La;if(La=Ka()){var Ma=r.navigator;Ea=0==La.indexOf("Opera");Fa=!Ea&&-1!=La.indexOf("MSIE");Ga=!Ea&&-1!=La.indexOf("WebKit");Ha=!Ea&&!Ga&&"Gecko"==Ma.product}var z=Ea,A=Fa,B=Ha,C=Ga,Na,Oa=r.navigator;Na=Oa&&Oa.platform||"";Ia=-1!=Na.indexOf("Mac");Ja=-1!=Na.indexOf("Win");var Pa=-1!=Na.indexOf("Linux");function Qa(){var a=r.document;return a?a.documentMode:k}var Ra; -a:{var Sa="",Ta;if(z&&r.opera)var Ua=r.opera.version,Sa="function"==typeof Ua?Ua():Ua;else if(B?Ta=/rv\:([^\);]+)(\)|;)/:A?Ta=/MSIE\s+([^\);]+)(\)|;)/:C&&(Ta=/WebKit\/(\S+)/),Ta)var Va=Ta.exec(Ka()),Sa=Va?Va[1]:"";if(A){var Wa=Qa();if(Wa>parseFloat(Sa)){Ra=String(Wa);break a}}Ra=Sa}var Xa={};function Ya(a){return Xa[a]||(Xa[a]=0<=ia(Ra,a))}function D(a){return A&&Za>=a}var $a=r.document,Za=!$a||!A?k:Qa()||("CSS1Compat"==$a.compatMode?parseInt(Ra,10):5);var ab;!B&&!A||A&&D(9)||B&&Ya("1.9.1");A&&Ya("9");var bb=A||z||C;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function db(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function eb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function fb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var gb=3;function hb(a){return a?new ib(F(a)):ab||(ab=new ib)}function jb(a){var b=!C&&kb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function lb(a){return a?a.parentWindow||a.defaultView:window}function kb(a){return"CSS1Compat"==a.compatMode}function mb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function nb(a){if(bb)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} -function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){var c=[];return tb(a,b,c,l)?c[0]:k} -function tb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tb(a,b,c,d))return l;a=a.nextSibling}return n}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==gb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling} -function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function ib(a){this.A=a||r.document||document}ib.prototype.v=function(a){return t(a)?this.A.getElementById(a):a};function yb(a){return!C&&kb(a.A)?a.A.documentElement:a.A.body}ib.prototype.contains=ob;var zb,Ab,Bb,Cb,Db,Eb,Fb;Fb=Eb=Db=Cb=Bb=Ab=zb=n;var Gb=Ka();Gb&&(-1!=Gb.indexOf("Firefox")?zb=l:-1!=Gb.indexOf("Camino")?Ab=l:-1!=Gb.indexOf("iPhone")||-1!=Gb.indexOf("iPod")?Bb=l:-1!=Gb.indexOf("iPad")?Cb=l:-1!=Gb.indexOf("Android")?Db=l:-1!=Gb.indexOf("Chrome")?Eb=l:-1!=Gb.indexOf("Safari")&&(Fb=l));var Hb=zb,Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb;function Ob(a,b,c){this.g=a;this.Ba=b||1;this.p=c||1};var Pb=A&&!D(9),Qb=A&&!D(8);function Rb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Sb(a,b,c){var d=Qb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Rb(b,a,b.nodeName,d,c)};function Tb(a){this.ca=a;this.N=0}function Ub(a){a=a.match(Vb);for(var b=0;b<a.length;b++)Wb.test(a[b])&&a.splice(b,1);return new Tb(a)}var Vb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Wb=/^\s/;function G(a,b){return a.ca[a.N+(b||0)]}Tb.prototype.next=function(){return this.ca[this.N++]};Tb.prototype.back=function(){this.N--};Tb.prototype.empty=function(){return this.ca.length<=this.N};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Pb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Pb&&"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} -function Xb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Qb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Yb(a,b,c,d,e){return(Pb?Zb:$b).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new I)} -function Zb(a,b,c,d,e){if(a instanceof ac||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=bc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Xb(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}cc(a,b,c,d,e);return e} -function $b(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof J?cc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Xb(a,c,d)&&e.add(a)}));return e} -function dc(a,b,c,d,e){var f;if((a instanceof ac||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=bc(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return Xb(a,c,d)}));v(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return ec(a,b,c,d,e)}function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function cc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b),cc(a,b,c,d,e)}function bc(a){if(a instanceof J){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.H=0}function fc(a){this.r=a;this.next=this.B=m}function gc(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Rb&&d.r instanceof Rb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<pb(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.H=g;return a} -I.prototype.unshift=function(a){a=new fc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.H++};I.prototype.add=function(a){a=new fc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.H++};function hc(a){return(a=a.k)?a.r:m}I.prototype.s=q("H");function ic(a){return(a=hc(a))?H(a):""}function jc(a,b){return new kc(a,!!b)}function kc(a,b){this.ya=a;this.da=(this.D=b)?a.p:a.k;this.Z=m} -kc.prototype.next=function(){var a=this.da;if(a==m)return m;var b=this.Z=a;this.da=this.D?a.B:a.next;return b.r};kc.prototype.remove=function(){var a=this.ya,b=this.Z;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.H--;this.Z=m};function L(a){this.j=a;this.l=this.t=n;this.J=m}L.prototype.h=q("t");function lc(a,b){a.t=b}function mc(a,b){a.l=b}L.prototype.w=q("J");function M(a,b){var c=a.evaluate(b);return c instanceof I?+ic(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof I?ic(c):""+c}function nc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function oc(a,b,c){L.call(this,a.j);this.ba=a;this.ha=b;this.ma=c;this.t=b.h()||c.h();this.l=b.l||c.l;this.ba==pc&&(!c.l&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.J={name:b.w().name,F:c}:!b.l&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.J={name:c.w().name,F:b}))}u(oc,L); -function qc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=jc(b);for(b=f.next();b;b=f.next()){e=jc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=jc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}oc.prototype.evaluate=function(a){return this.ba.q(this.ha,this.ma,a)};oc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.ba+"\n";a+=" ";b+=this.ha.toString(a)+"\n";return b+=this.ma.toString(a)};function rc(a,b,c,d){this.Aa=a;this.ka=b;this.j=c;this.q=d}rc.prototype.toString=q("Aa");var sc={}; -function O(a,b,c,d){a in sc&&h(Error("Binary operator already created: "+a));a=new rc(a,b,c,d);return sc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return qc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return qc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return qc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return qc(function(a,b){return a>=b},a,b,c)});var pc=O("=",3,2,function(a,b,c){return qc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return qc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return nc(a,c)&&nc(b,c)});O("or",1,2,function(a,b,c){return nc(a,c)||nc(b,c)});function tc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));L.call(this,a.j);this.la=a;this.e=b;this.t=a.h();this.l=a.l}u(tc,L);tc.prototype.evaluate=function(a){a=this.la.evaluate(a);return uc(this.e,a)};tc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.la.toString(a);return b+=this.e.toString(a)};function vc(a,b){b.length<a.ja&&h(Error("Function "+a.n+" expects at least"+a.ja+" arguments, "+b.length+" given"));a.$!==m&&b.length>a.$&&h(Error("Function "+a.n+" expects at most "+a.$+" arguments, "+b.length+" given"));a.za&&v(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.n+" is not of type Nodeset: "+b))});L.call(this,a.j);this.M=a;this.T=b;lc(this,a.t||oa(b,function(a){return a.h()}));mc(this,a.xa&&!b.length||a.wa&&!!b.length||oa(b,function(a){return a.l}))}u(vc,L); -vc.prototype.evaluate=function(a){return this.M.q.apply(m,ra(a,this.T))};vc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.M+"\n";b+=" ";this.T.length&&(a+=b+"Arguments:",b+=" ",a=na(this.T,function(a,d){return a+"\n"+d.toString(b)},a));return a};function wc(a,b,c,d,e,f,g,p,y){this.n=a;this.j=b;this.t=c;this.xa=d;this.wa=e;this.q=f;this.ja=g;this.$=s(p)?p:g;this.za=!!y}wc.prototype.toString=q("n");var xc={}; -function P(a,b,c,d,e,f,g,p){a in xc&&h(Error("Function already created: "+a+"."));xc[a]=new wc(a,b,c,d,n,e,f,g,p)}P("boolean",2,n,n,function(a,b){return nc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,n,n,function(a,b){var c=sa(arguments,1);return na(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(M(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Pb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return pa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!qa(f,a)&&f.push(a)});f.sort(pb);var g=new I;v(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);P("local-name",3,n,l,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!nc(b,a)},1);P("number",1,n,l,function(a,b){return b?M(b,a):+H(a.g)},0,1);P("position",1,l,n,function(a){return a.Ba},0);P("round",1,n,n,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):H(a.g)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):H(a.g)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=jc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,aa(l),0);function J(a,b){this.oa=a;this.ia=s(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=gb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function yc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}J.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};J.prototype.getName=q("oa"); -J.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.oa;this.ia===m||(b+="\n"+this.ia.toString(a+" "));return b};function zc(a){L.call(this,3);this.na=a.substring(1,a.length-1)}u(zc,L);zc.prototype.evaluate=q("na");zc.prototype.toString=function(a){return(a||"")+"literal: "+this.na};function ac(a){this.n=a.toLowerCase()}ac.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.n||this.n==a.nodeName.toLowerCase()?l:this.n==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};ac.prototype.getName=q("n");ac.prototype.toString=function(a){return(a||"")+"nametest: "+this.n};function Ac(a){L.call(this,1);this.pa=a}u(Ac,L);Ac.prototype.evaluate=q("pa");Ac.prototype.toString=function(a){return(a||"")+"number: "+this.pa};function Bc(a,b){L.call(this,a.j);this.fa=a;this.K=b;this.t=a.h();this.l=a.l;if(1==this.K.length){var c=this.K[0];!c.X&&c.u==Cc&&(c=c.S,"*"!=c.getName()&&(this.J={name:c.getName(),F:m}))}}u(Bc,L);function Dc(){L.call(this,4)}u(Dc,L);Dc.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Dc.prototype.toString=function(a){return a+"RootHelperExpr"};function Ec(){L.call(this,4)}u(Ec,L);Ec.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Ec.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Bc.prototype.evaluate=function(a){var b=this.fa.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.K;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=jc(b,e.u.D),g;if(!e.h()&&e.u==Fc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ob(g))}else if(!e.h()&&e.u==Gc)g=f.next(),b=e.evaluate(new Ob(g));else{g=f.next();for(b=e.evaluate(new Ob(g));(g=f.next())!=m;)g=e.evaluate(new Ob(g)),b=gc(b,g)}}return b}; -Bc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.fa.toString(b);this.K.length&&(c+=b+"Steps:\n",b+=" ",v(this.K,function(a){c+=a.toString(b)}));return c};function Hc(a,b){this.e=a;this.D=!!b}function uc(a,b,c){for(c=c||0;c<a.e.length;c++)for(var d=a.e[c],e=jc(b),f=b.s(),g,p=0;g=e.next();p++){var y=a.D?f-p:p+1;g=d.evaluate(new Ob(g,y,f));var K;"number"==typeof g?K=y==g:"string"==typeof g||"boolean"==typeof g?K=!!g:g instanceof I?K=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));K||e.remove()}return b}Hc.prototype.w=function(){return 0<this.e.length?this.e[0].w():m}; -Hc.prototype.h=function(){for(var a=0;a<this.e.length;a++){var b=this.e[a];if(b.h()||1==b.j||0==b.j)return l}return n};Hc.prototype.s=function(){return this.e.length};Hc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.e,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Ic(a,b,c,d){L.call(this,4);this.u=a;this.S=b;this.e=c||new Hc([]);this.X=!!d;b=this.e.w();a.Ea&&b&&(a=b.name,a=Pb?a.toLowerCase():a,this.J={name:a,F:b.F});this.t=this.e.h()}u(Ic,L); -Ic.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.F?N(c.F,a):m,f=1);if(this.X)if(!this.h()&&this.u==Jc)c=Yb(this.S,b,d,e),c=uc(this.e,c,f);else if(a=jc((new Ic(Kc,new J("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=gc(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Ic.prototype.q=function(a,b,c,d){a=this.u.M(this.S,a,b,c);return a=uc(this.e,a,d)}; -Ic.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.X?"//":"/")+"\n";this.u.n&&(b+=a+"Axis: "+this.u+"\n");b+=this.S.toString(a);if(this.e.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.e.length;c++)var d=c<this.e.length-1?", ":"",b=b+(this.e[c].toString(a)+d);return b};function Lc(a,b,c,d){this.n=a;this.M=b;this.D=c;this.Ea=d}Lc.prototype.toString=q("n");var Mc={}; -function Q(a,b,c,d){a in Mc&&h(Error("Axis already created: "+a));b=new Lc(a,b,c,!!d);return Mc[a]=b}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Cc=Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Pb)return c.add(new Rb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof J&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Pb?g.nodeValue&&c.add(Sb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Pb?g.nodeValue&&c.add(Sb(b,g,b.sourceIndex)):c.add(g));return c},n),Jc=Q("child",function(a,b,c,d,e){return(Pb?dc:ec).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new I)},n,l); -Q("descendant",Yb,n,l);var Kc=Q("descendant-or-self",function(a,b,c,d){var e=new I;Xb(b,c,d)&&a.matches(b)&&e.add(b);return Yb(a,b,c,d,e)},n,l),Fc=Q("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Xb(f,c,d)&&a.matches(f)&&e.add(f),e=Yb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new I},n); -var Nc=Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Gc=Q("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var y=[];for(b=f[g];b=b.previousSibling;)y.unshift(b);for(var K=0,w=y.length;K<w;K++)b=y[K],Xb(b,c,d)&&a.matches(b)&&e.add(b),e=Yb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Oc=Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Pc(a){L.call(this,1);this.ea=a;this.t=a.h();this.l=a.l}u(Pc,L);Pc.prototype.evaluate=function(a){return-M(this.ea,a)};Pc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ea.toString(a+" ")};function Qc(a){L.call(this,4);this.P=a;lc(this,oa(this.P,function(a){return a.h()}));mc(this,oa(this.P,function(a){return a.l}))}u(Qc,L);Qc.prototype.evaluate=function(a){var b=new I;v(this.P,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=gc(b,c)});return b};Qc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";v(this.P,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Rc(a){this.a=a}function Sc(a){for(var b,c=[];;){S(a,"Missing right hand side of binary expression.");b=Tc(a);var d=a.a.next();if(!d)break;var e=(d=sc[d]||m)&&d.ka;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ka;)b=new oc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new oc(c.pop(),c.pop(),b);return b}function S(a,b){a.a.empty()&&h(Error(b))}function Uc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Vc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Wc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new zc(a)}function Xc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new ac(a.a.next()+a.a.next()+a.a.next()):new ac(a.a.next())} -function Yc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Dc;d=new Dc;S(a,"Missing next location step.");b=Zc(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Sc(a);S(a,'unclosed "("');Uc(a,")");break;case '"':case "'":b=Wc(a);break;default:if(isNaN(+b))if(!yc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=xc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){S(a,"Missing function argument list.");d.push(Sc(a));if(","!=G(a.a))break;a.a.next()}S(a,"Unclosed function argument list.");Vc(a);b=new vc(b,d)}else{b=m;break a}else b=new Ac(+a.a.next())}"["==G(a.a)&&(d=new Hc($c(a)),b=new tc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=Zc(a,"/"),d=new Ec,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),S(a,"Missing next location step."),b=Zc(a,b),c.push(b);return new Bc(d, -c)} -function Zc(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Ic(Oc,new J("node")),a.a.next(),d;if(".."==G(a.a))return d=new Ic(Nc,new J("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Cc,a.a.next(),S(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Mc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),S(a,"Missing node name")):f=Jc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){yc(e)||h(Error("Invalid node type: "+e));c=a.a.next();yc(c)||h(Error("Invalid type name: "+c));Uc(a,"(");S(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Wc(a);S(a,"Bad nodetype");Vc(a);c=new J(c,g)}else c=Xc(a);else"*"==e?c=Xc(a):h(Error("Bad token: "+a.a.next()));e=new Hc($c(a),f.D);return d||new Ic(f,c,e,"//"==b)} -function $c(a){for(var b=[];"["==G(a.a);){a.a.next();S(a,"Missing predicate expression.");var c=Sc(a);b.push(c);S(a,"Unclosed predicate expression.");Uc(a,"]")}return b}function Tc(a){if("-"==G(a.a))return a.a.next(),new Pc(Tc(a));var b=Yc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)S(a,"Missing next union location path."),b.push(Yc(a));a.a.back();a=new Qc(b)}return a};function ad(a){a.length||h(Error("Empty XPath expression."));a=Ub(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Sc(new Rc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Ob(a));return new T(e,d)}} -function T(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?ic(a):""+a;break;case 1:this.numberValue=a instanceof I?+ic(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=jc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Rb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=hc(a);this.singleNodeValue=d instanceof Rb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -T.ANY_TYPE=0;T.NUMBER_TYPE=1;T.STRING_TYPE=2;T.BOOLEAN_TYPE=3;T.UNORDERED_NODE_ITERATOR_TYPE=4;T.ORDERED_NODE_ITERATOR_TYPE=5;T.UNORDERED_NODE_SNAPSHOT_TYPE=6;T.ORDERED_NODE_SNAPSHOT_TYPE=7;T.ANY_UNORDERED_NODE_TYPE=8;T.FIRST_ORDERED_NODE_TYPE=9;function bd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=T,b.evaluate=function(a,b,e,f){return(new ad(a)).evaluate(b,f)},b.createExpression=function(a){return new ad(a)})};var U={};U.ra=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();U.q=function(a,b,c){var d=F(a);(A||Lb)&&bd(lb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.ra;return A&&!Ya(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -U.W=function(a,b){(!a||1!=a.nodeType)&&h(new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};U.Da=function(a,b){var c=function(){var c=U.q(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||U.W(c,a);return c}; -U.Ka=function(a,b){var c=function(){var c=U.q(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&U.W(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){U.W(b,a)});return c};function cd(a){return(a=a.exec(Ka()))?a[1]:""}var dd=function(){if(Hb)return cd(/Firefox\/([0-9.]+)/);if(A||z)return Ra;if(Mb)return cd(/Chrome\/([0-9.]+)/);if(Nb)return cd(/Version\/([0-9.]+)/);if(Jb||Kb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ka());if(a)return a[1]+"."+a[2]}else{if(Lb)return(a=cd(/Android\s+([0-9.]+)/))?a:cd(/Version\/([0-9.]+)/);if(Ib)return cd(/Camino\/([0-9.]+)/)}return""}();var ed,fd;function V(a){return gd?ed(a):A?0<=ia(Za,a):Ya(a)}function hd(a){return gd?fd(a):Lb?0<=ia(id,a):0<=ia(dd,a)} -var gd=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;ed=function(a){return 0<=d.ta(e,""+a)};fd=function(a){return 0<=d.ta(f,""+a)};return l}(),jd;if(Lb){var kd=/Android\s+([0-9\.]+)/.exec(Ka());jd=kd?kd[1]:"0"}else jd="0"; -var id=jd,ld=A&&!D(8),md=D(9),nd=A&&!D(9),od=D(10),pd=A&&!D(10);Lb&&hd(2.3);!z&&(!C||V("533"));function qd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}qd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};qd.prototype.contains=function(a){return!this||!a?n:a instanceof qd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function rd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function sd(a,b){return rd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function td(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=hb(a),b=!kb(b.A);return b?a.body:a.documentElement} -function ud(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function vd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=sd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=sd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function wd(a){var b,c=F(a),d=sd(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=td(c);if(a==g)return f;if(a.getBoundingClientRect)b=ud(a),a=hb(c),a=jb(a.A),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==sd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=vd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function xd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=ud(a);b.x=c.left;b.y=c.top}else{var c=hb(a),c=jb(c.A),d=wd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Ya(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=sd(a,e));f||(f=sd(a,"transform"));f?(a=f.match(yd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e=ea(a.ga),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.ga().targetTouches&& -(f=a.ga().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function zd(a){if("none"!=sd(a,"display"))return Ad(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Ad(a);b.display=c;b.position=e;b.visibility=d;return a}function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=ud(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)}var Bd={thin:2,medium:4,thick:6}; -function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var yd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Dd(a){var b;a:{a=F(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,l)&&Gd(a)&&!(A||z||B&&!V("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?l:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Id(a,b){var c;if(c=ld)if(c="value"==b)if(c=W(a,"OPTION"))c=Jd(a,"value")===m;c?(c=[],wb(a,c,n),c=c.join("")):c=a[b];return c} -var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function Ld(a){var b=[];v(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b} -function Jd(a,b){b=b.toLowerCase();if("style"==b)return Ld(a.style.cssText);if(ld&&"value"==b&&W(a,"INPUT"))return a.value;if(nd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Gd(a){var b=a.tagName.toUpperCase();return!qa(Md,b)?l:Id(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):xb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Id(b,"disabled")){if(!W(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:mb(a.previousSibling);)if(W(a,"LEGEND"))return l}return n},l)?n:l} -function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:m} -function X(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=nd?"styleFloat":"cssFloat";c=rd(a,c)||Od(a,c);if(c===m)c=m;else if(qa(ua,b)&&(xa.test("#"==c.charAt(0)?c:"#"+c)||Ba(c).length||ta&&ta[c.toLowerCase()]||za(c).length)){var d=za(c);if(!d.length){a:if(d=Ba(c),!d.length){d=ta[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(xa.test(d)&&(d=wa(d),d=wa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=Nd(a))?Od(c,b):m} -function Pd(a){if(ea(a.getBBox)&&!W(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(W(a,"BODY")){b=lb(F(a))||k;"hidden"!=X(a,"overflow")?a=l:(a=Nd(a),!a||!W(a,"HTML")?a=l:(a=X(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ha).document;var b=a.documentElement,d=a.body;d||h(new x(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new cb(b,a)}else b=(b||window).document,b=kb(b)?b.documentElement:b.body,b=new cb(b.clientWidth,b.clientHeight);return b}return zd(a)} -function Fd(a,b){function c(a){if("none"==X(a,"display"))return n;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?l:W(a,"PATH")&&(0<b.height||0<b.width)?(b=X(a,"stroke-width"),!!b&&0<parseInt(b,10)):oa(a.childNodes,function(b){return b.nodeType==gb&&"hidden"!=X(a,"overflow")||W(b)&&d(b)})}function e(a,b){var c;if((c=b==m?nb(a):nb(b))&&("hidden"==X(c,"overflow-x")||"hidden"==X(c,"overflow-y"))){var d=Pd(c),f=xd(c),g=xd(a);return f.x+d.width<=g.x&&"hidden"==X(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==X(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=X(a,"-o-transform")||X(a,"-webkit-transform")||X(a,"-ms-transform")||X(a,"-moz-transform")||X(a,"transform");if(b&&"none"!==b)return b=xd(a),a=Pd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Nd(a);return!a||f(a)}W(a)||h(Error("Argument to isShown must be of type Element"));if(W(a,"OPTION")||W(a,"OPTGROUP")){var g=xb(a,function(a){return W(a,"SELECT")});return!!g&&Fd(g,l)}if(W(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?U.Da('/descendant::*[@usemap = "#'+a.name+'"]',g):sb(g,function(b){return W(b)&&Jd(b,"usemap")=="#"+a.name});return!!g&&Fd(g,b)}return W(a,"AREA")?(g=xb(a,function(a){return W(a,"MAP")}),!!g&&Fd(g,b)):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Qd(a)||!d(a)||!e(a,m)?n:f(a)} -function Qd(a){if(pd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Rd(a)}function Rd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Rd(a));return b};function Sd(a){this.d=ha.document.documentElement;this.m=m;var b=Dd(this.d);b&&Td(this,b);this.O=a||new Ud}Sd.prototype.v=q("d");function Td(a,b){a.d=b;a.m=W(b,"OPTION")?xb(b,function(a){return W(a,"SELECT")}):m} -function Vd(a,b,c,d,e,f,g){if(!g&&!Ed(a.d))return n;e&&!(Wd==b||Xd==b)&&h(new x(12,"Event type does not allow related target: "+b));c={clientX:c.x,clientY:c.y,button:d,altKey:0!=(a.O.Q&4),ctrlKey:0!=(a.O.Q&2),shiftKey:0!=(a.O.Q&1),metaKey:0!=(a.O.Q&8),wheelDelta:f||0,relatedTarget:e||m};return(a=a.m?Yd(a,b):a.d)?Zd(a,b,c):l} -function Yd(a,b){if(A)switch(b){case Wd:case $d:return m;case ae:case be:case ce:return a.m.multiple?a.m:m;default:return a.m}if(z)switch(b){case ae:case Wd:return a.m.multiple?a.d:m;default:return a.d}if(C)switch(b){case de:case ee:return a.m.multiple?a.d:a.m;default:return a.m.multiple?a.d:m}return a.d}var fe=C||z||gd&&hd(3.6); -function ge(a){if(fe||!a.href)return n;if(!gd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=lb(F(a)),c=b.location.href;a=he(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var ie=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function he(a,b){var c=b.match(ie);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Ud(){this.Q=0};!A||V(10);Lb&&hd(4);var je=A&&ha.navigator.msPointerEnabled;function ke(a,b,c){this.f=a;this.U=b;this.V=c}ke.prototype.create=function(a){a=F(a);nd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.U,this.V));return a};ke.prototype.toString=q("f");function Y(a,b,c){ke.call(this,a,b,c)}u(Y,ke); -Y.prototype.create=function(a,b){!B&&this==le&&h(new x(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(nd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Xd||this==Wd)Object.defineProperty?(c=this==Xd,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==me&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=lb(c);d=c.createEvent("MouseEvents");c=1;if(this==me&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==le&&(c=b.wheelDelta);d.initMouseEvent(this.f,this.U,this.V,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=yb(hb(a)),c=td(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function ne(a,b,c){ke.call(this,a,b,c)}u(ne,ke); -ne.prototype.create=function(a,b){je||h(new x(9,"Browser does not support MSPointer events."));var c=F(a),d=lb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.f,this.U,this.V,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.va);return c}; -var oe=new ke("change",l,n),pe=new ke("focus",n,n),de=new Y("click",l,l),ae=new Y("contextmenu",l,l),qe=new Y("dblclick",l,l),re=new Y("mousedown",l,l),be=new Y("mousemove",l,n),Xd=new Y("mouseout",l,l),Wd=new Y("mouseover",l,l),ee=new Y("mouseup",l,l),me=new Y(B?"DOMMouseScroll":"mousewheel",l,l),le=new Y("MozMousePixelScroll",l,l),se=new ne("MSPointerDown",l,l),ce=new ne("MSPointerMove",l,l),$d=new ne("MSPointerOver",l,l),te=new ne("MSPointerOut",l,l),ue=new ne("MSPointerUp",l,l); -function Zd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return nd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function ve(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ve){d=we(a);xe(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ve.prototype.G=0;ve.prototype.qa=0;function we(a){xe(a);return a.i.concat()} -ve.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.G--,this.qa++,this.i.length>2*this.G&&xe(this),l):n};function xe(a){if(a.G!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.G!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -ve.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};ve.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.G++,this.i.push(a),this.qa++);this.z[a]=b};var ye={};function Z(a,b,c){fa(a)&&(a=B?a.b:z?a.opera:a.c);a=new ze(a,b,c);if(b&&(!(b in ye)||c))ye[b]={key:a,shift:n},c&&(ye[c]={key:a,shift:l});return a}function ze(a,b,c){this.code=a;this.sa=b||m;this.Sa=c||this.sa}Z(8);Z(9);Z(13);var Ae=Z(16),Be=Z(17),Ce=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); -Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var De=Z(Ja?{b:91,c:91,opera:219}:Ia?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -Z(Ja?{b:92,c:92,opera:220}:Ia?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});Z(Ja?{b:93,c:93,opera:0}:Ia?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Pa?56:42},"*");Z({b:107,c:107,opera:Pa?61:43},"+"); -Z({b:109,c:109,opera:Pa?109:45},"-");Z({b:110,c:110,opera:Pa?190:78},".");Z({b:111,c:111,opera:Pa?191:47},"/");Z(Pa&&z?m:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Ee=new ve;Ee.set(1,Ae);Ee.set(2,Be);Ee.set(4,Ce); -Ee.set(8,De);(function(a){var b=new ve;v(we(a),function(c){b.set(a.get(c).code,c)});return b})(Ee);B&&V(12);function Fe(a,b){Sd.call(this,b);this.L=this.o=m;this.C=new E(0,0);this.Y=this.I=n;if(a){this.o=a.Ha;try{W(a.ua)&&(this.L=a.ua)}catch(c){this.o=m}this.C=a.Ia;this.I=a.Qa;this.Y=a.Ja;try{W(a.element)&&Td(this,a.element)}catch(d){this.o=m}}}u(Fe,Sd);var $={}; -nd?($[de]=[0,0,0,m],$[ae]=[m,m,0,m],$[ee]=[1,4,2,m],$[Xd]=[0,0,0,0],$[be]=[1,4,2,0]):C||md?($[de]=[0,1,2,m],$[ae]=[m,m,2,m],$[ee]=[0,1,2,m],$[Xd]=[0,1,2,0],$[be]=[0,1,2,0]):($[de]=[0,1,2,m],$[ae]=[m,m,2,m],$[ee]=[0,1,2,m],$[Xd]=[0,0,0,0],$[be]=[0,0,0,0]);od&&($[se]=$[ee],$[ue]=$[ee],$[ce]=[-1,-1,-1,-1],$[te]=$[ce],$[$d]=$[ce]);$[qe]=$[de];$[re]=$[ee];$[Wd]=$[Xd];var Ge={La:se,Ma:ce,Na:te,Oa:$d,Pa:ue}; -Fe.prototype.move=function(a,b){var c=Ed(a),d=xd(a);this.C.x=b.x+d.x;this.C.y=b.y+d.y;d=this.v();if(a!=d){try{lb(F(d)).closed&&(d=m)}catch(e){d=m}if(d){var f=d===ha.document.documentElement||d===ha.document.body,d=!this.Y&&f?m:d;He(this,Xd,a)}Td(this,a);A||He(this,Wd,d,m,c)}He(this,be,m,m,c);A&&a!=d&&He(this,Wd,d,m,c);this.I=n}; -function He(a,b,c,d,e){a.Y=l;if(od){var f=Ge[b],g;if(g=f){g=a.C;var p=Ie(a,f),y=MSPointerEvent.MSPOINTER_TYPE_MOUSE;!e&&!Ed(a.d)?f=n:(c&&!($d==f||te==f)&&h(new x(12,"Event type does not allow related target: "+f)),g={clientX:g.x,clientY:g.y,button:p,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:c||m,width:0,height:0,Ca:0,rotation:0,pointerId:1,Fa:0,Ga:0,pointerType:y,va:l},f=(p=a.m?Yd(a,f):a.d)?Zd(p,f,g):l);g=!f}if(g)return n}return Vd(a,b,a.C,Ie(a,b),c,d,e)} -function Ie(a,b){if(!(b in $))return 0;var c=$[b][a.o===m?3:a.o];c===m&&h(new x(13,"Event does not permit the specified mouse button."));return c};function Je(a,b){this.x=a;this.y=b}u(Je,E);Je.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Ke(a,b,c){Fd(a,l)||h(new x(11,"Element is not currently visible and may not be manipulated"));var d=F(a),d=C?d.body:d.documentElement,e;e=wd(a);var f=wd(d),g;if(A){var p=Cd(d,"borderLeft");g=Cd(d,"borderRight");var y=Cd(d,"borderTop"),K=Cd(d,"borderBottom");g=new qd(y,g,K,p)}else p=rd(d,"borderLeftWidth"),g=rd(d,"borderRightWidth"),y=rd(d,"borderTopWidth"),K=rd(d,"borderBottomWidth"),g=new qd(parseFloat(y),parseFloat(g),parseFloat(K),parseFloat(p));p=e.x-f.x-g.left;e=e.y-f.y-g.top;f=d.clientHeight- -a.offsetHeight;g=d.scrollLeft;y=d.scrollTop;g+=Math.min(p,Math.max(p-(d.clientWidth-a.offsetWidth),0));y+=Math.min(e,Math.max(e-f,0));e=new E(g,y);d.scrollLeft=e.x;d.scrollTop=e.y;b?b=new Je(b.x,b.y):(b=Le(a),b=new Je(b.width/2,b.height/2));c=c||new Fe;c.move(a,b);c.o!==m&&h(new x(13,"Cannot press more then one button or an already pressed button."));c.o=2;c.L=c.v();var w;a=B&&!hd(4);(C||a)&&(W(c.v(),"OPTION")||W(c.v(),"SELECT"))?w=l:((a=B||A)&&(w=Dd(c.v())),w=(b=He(c,re))&&a&&w!=Dd(c.v())?n:b);if(w&& -(w=c.m||c.d,a=Dd(w),w!=a)){if(a&&(ea(a.blur)||A&&fa(a.blur))){try{"body"!==a.tagName.toLowerCase()&&a.blur()}catch(R){A&&"Unspecified error."==R.message||h(R)}A&&!V(8)&&lb(F(w)).focus()}if(ea(w.focus)||A&&fa(w.focus))z&&V(11)&&!Fd(w)?Zd(w,pe):w.focus()}c.o===m&&h(new x(13,"Cannot release a button when no button is pressed."));He(c,ee);if(0==c.o&&c.v()==c.L){w=c.C;a=Ie(c,de);if(Ed(c.d)){d=b=m;if(!fe)for(e=c.d;e;e=e.parentNode)if(W(e,"A")){b=e;break}else{a:{if(W(e,"INPUT")&&(f=e.type.toLowerCase(), -"submit"==f||"image"==f)){f=l;break a}if(W(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=l;break a}f=n}if(f){d=e;break}}if(f=e=Hd(c.d)){f=c.d;Hd(f)||h(new x(15,"Element is not selectable"));p="selected";g=f.type&&f.type.toLowerCase();if("checkbox"==g||"radio"==g)p="checked";f=!!Id(f,p)}if(c.m&&(p=c.m,!f||p.multiple))c.d.selected=!f,(!C||!p.multiple||Lb&&hd(4))&&Zd(p,oe);A&&d?d.click():Vd(c,de,w,a)&&(b&&ge(b)?(w=b,a=w.href,b=lb(F(w)),A&&!V(8)&&(a=he(b.location,a)),w.target?b.open(a,w.target): -b.location.href=a):e&&!c.m&&(!B&&!C&&!(f&&"radio"==c.d.type.toLowerCase()))&&(c.d.checked=!f,z&&!V(11)&&Zd(c.d,oe)))}c.I&&He(c,qe);c.I=!c.I}else 2==c.o&&He(c,ae);c.o=m;c.L=m}function Le(a){var b=zd(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Le(a.offsetParent)};function Me(){this.R=k} -function Ne(a,b,c){switch(typeof b){case "string":Oe(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ne(a,a.R?a.R.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Oe(f, -c),c.push(":"),Ne(a,a.R?a.R.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Pe={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Qe=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Oe(a,b){b.push('"',a.replace(Qe,function(a){if(a in Pe)return Pe[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Pe[a]=e+b.toString(16)}),'"')};C||z||B&&V(3.5)||A&&V(8);function Re(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,Re);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Se(a);return b}if("document"in a)return b={},b.WINDOW=Se(a),b;if(da(a))return ma(a,Re);a=db(a,function(a,b){return"number"==typeof b||t(b)});return eb(a,Re);default:return m}} -function Te(a,b){return"array"==ca(a)?ma(a,function(a){return Te(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?Ue(a.ELEMENT,b):"WINDOW"in a?Ue(a.WINDOW,b):eb(a,function(a){return Te(a,b)}):a}function Ve(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.aa=ga());b.aa||(b.aa=ga());return b}function Se(a){var b=Ve(a.ownerDocument),c=fb(b,function(b){return b==a});c||(c=":wdc:"+b.aa++,b[c]=a);return c} -function Ue(a,b){a=decodeURIComponent(a);var c=b||document,d=Ve(c);a in d||h(new x(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new x(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new x(10,"Element is no longer attached to the DOM"))};function We(a,b){var c=[a,b],d=Ke,e;try{var d=t(d)?new ha.Function(d):ha==window?d:new ha.Function("return ("+d+").apply(null,arguments);"),f=Te(c,ha.document),g=d.apply(m,f);e={status:0,value:Re(g)}}catch(p){e={status:"code"in p?p.code:13,value:{message:p.message}}}c=[];Ne(new Me,e,c);return c.join("")}var Xe=["_"],Ye=r;!(Xe[0]in Ye)&&Ye.execScript&&Ye.execScript("var "+Xe[0]);for(var Ze;Xe.length&&(Ze=Xe.shift());)!Xe.length&&s(We)?Ye[Ze]=We:Ye=Ye[Ze]?Ye[Ze]:Ye[Ze]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}p(t,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return m.navigator?m.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=m.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var u=Ha,v=Ia,w=Ka,A=Ja,Qa,Ra=m.navigator;Qa=Ra&&Ra.platform||"";La=-1!=Qa.indexOf("Mac");Ma=-1!=Qa.indexOf("Win");var Sa=-1!=Qa.indexOf("Linux");function Ta(){var a=m.document;return a?a.documentMode:void 0}var Ua; +a:{var Va="",Wa;if(u&&m.opera)var Xa=m.opera.version,Va="function"==typeof Xa?Xa():Xa;else if(w?Wa=/rv\:([^\);]+)(\)|;)/:v?Wa=/MSIE\s+([^\);]+)(\)|;)/:A&&(Wa=/WebKit\/(\S+)/),Wa)var Ya=Wa.exec(Na()),Va=Ya?Ya[1]:"";if(v){var Za=Ta();if(Za>parseFloat(Va)){Ua=String(Za);break a}}Ua=Va}var $a={};function ab(a){return $a[a]||($a[a]=0<=na(Ua,a))}function B(a){return v&&eb>=a}var fb=m.document,eb=fb&&v?Ta()||("CSS1Compat"==fb.compatMode?parseInt(Ua,10):5):void 0;var gb;!w&&!v||v&&B(9)||w&&ab("1.9.1");v&&ab("9");function C(a,b){this.x=da(a)?a:0;this.y=da(b)?b:0}C.prototype.toString=function(){return"("+this.x+", "+this.y+")"};C.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};C.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};C.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function hb(a,b){this.width=a;this.height=b}hb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};hb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};hb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};hb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ib(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function jb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function kb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var lb=3;function mb(a){a=a.document;a=nb(a)?a.documentElement:a.body;return new hb(a.clientWidth,a.clientHeight)}function D(a){return a?a.parentWindow||a.defaultView:window}function nb(a){return"CSS1Compat"==a.compatMode}function ob(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!B(9)){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?rb(a,b):!c&&pb(e,b)?-1*sb(a,b):!d&&pb(f,a)?sb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=E(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function sb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return rb(d,a)}function rb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function E(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var tb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},ub={IMG:" ",BR:"\n"}; +function vb(a,b,c){if(!(a.nodeName in tb))if(a.nodeType==lb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in ub)b.push(ub[a.nodeName]);else for(a=a.firstChild;a;)vb(a,b,c),a=a.nextSibling}function wb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function xb(a){this.C=a||m.document||document}xb.prototype.v=function(a){return n(a)?this.C.getElementById(a):a}; +function yb(a){return!A&&nb(a.C)?a.C.documentElement:a.C.body||a.C.documentElement}xb.prototype.contains=pb;var zb,Ab,Bb,Cb,Db,Eb,Fb;Fb=Eb=Db=Cb=Bb=Ab=zb=!1;var Gb=Na();Gb&&(-1!=Gb.indexOf("Firefox")?zb=!0:-1!=Gb.indexOf("Camino")?Ab=!0:-1!=Gb.indexOf("iPhone")||-1!=Gb.indexOf("iPod")?Bb=!0:-1!=Gb.indexOf("iPad")?Cb=!0:-1!=Gb.indexOf("Android")?Db=!0:-1!=Gb.indexOf("Chrome")?Eb=!0:-1!=Gb.indexOf("Safari")&&(Fb=!0));var Hb=zb,Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb;function Ob(a,b,c){this.g=a;this.Ha=b||1;this.p=c||1};var Pb=v&&!B(9),Qb=v&&!B(8);function Rb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function Sb(a,b,c){var d=Qb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Rb(b,a,b.nodeName,d,c)};function Tb(a){this.ga=a;this.Q=0}function Ub(a){a=a.match(Vb);for(var b=0;b<a.length;b++)Wb.test(a[b])&&a.splice(b,1);return new Tb(a)}var Vb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Wb=/^\s/;function F(a,b){return a.ga[a.Q+(b||0)]}Tb.prototype.next=function(){return this.ga[this.Q++]};Tb.prototype.back=function(){this.Q--};Tb.prototype.empty=function(){return this.ga.length<=this.Q};function G(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(Pb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Pb&&"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} +function Xb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Qb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Yb(a,b,c,d,e){return(Pb?Zb:$b).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new H)} +function Zb(a,b,c,d,e){if(a instanceof ac||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=bc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],l=0;b=f[l++];)Xb(b,c,d)&&g.push(b);f=g}for(l=0;b=f[l++];)"*"==a&&"!"==b.tagName||e.add(b);return e}cc(a,b,c,d,e);return e} +function $b(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),r(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof I?cc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),r(b,function(a){Xb(a,c,d)&&e.add(a)}));return e} +function dc(a,b,c,d,e){var f;if((a instanceof ac||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var g=bc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Xb(a,c,d)}));r(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return ec(a,b,c,d,e)}function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function cc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Xb(b,c,d)&&a.matches(b)&&e.add(b),cc(a,b,c,d,e)}function bc(a){if(a instanceof I){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function H(){this.p=this.k=null;this.K=0}function fc(a){this.s=a;this.next=this.F=null}function gc(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.s==d.s||c.s instanceof Rb&&d.s instanceof Rb&&c.s.g==d.s.g?(f=c,c=c.next,d=d.next):0<qb(c.s,d.s)?(f=d,d=d.next):(f=c,c=c.next),(f.F=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.F=e,e=e.next=f,g++,f=f.next;a.p=e;a.K=g;return a} +H.prototype.unshift=function(a){a=new fc(a);a.next=this.k;this.p?this.k.F=a:this.k=this.p=a;this.k=a;this.K++};H.prototype.add=function(a){a=new fc(a);a.F=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.K++};function hc(a){return(a=a.k)?a.s:null}H.prototype.r=h("K");function ic(a){return(a=hc(a))?G(a):""}function jc(a,b){return new kc(a,!!b)}function kc(a,b){this.Da=a;this.ha=(this.G=b)?a.p:a.k;this.ba=null} +kc.prototype.next=function(){var a=this.ha;if(null==a)return null;var b=this.ba=a;this.ha=this.G?a.F:a.next;return b.s};kc.prototype.remove=function(){var a=this.Da,b=this.ba;if(!b)throw Error("Next must be called at least once before remove.");var c=b.F,b=b.next;c?c.next=b:a.k=b;b?b.F=c:a.p=c;a.K--;this.ba=null};function J(a){this.j=a;this.l=this.t=!1;this.M=null}function L(a){return"\n "+a.toString().split("\n").join("\n ")}J.prototype.h=h("t");function lc(a,b){a.t=b}function mc(a,b){a.l=b}J.prototype.w=h("M");function M(a,b){var c=a.evaluate(b);return c instanceof H?+ic(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof H?ic(c):""+c}function nc(a,b){var c=a.evaluate(b);return c instanceof H?!!c.r():!!c};function oc(a,b,c){J.call(this,a.j);this.fa=a;this.ma=b;this.ra=c;this.t=b.h()||c.h();this.l=b.l||c.l;this.fa==pc&&(c.l||c.h()||4==c.j||0==c.j||!b.w()?b.l||(b.h()||4==b.j||0==b.j||!c.w())||(this.M={name:c.w().name,H:b}):this.M={name:b.w().name,H:c})}p(oc,J); +function qc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof H&&c instanceof H){e=jc(b);for(d=e.next();d;d=e.next())for(b=jc(c),f=b.next();f;f=b.next())if(a(G(d),G(f)))return!0;return!1}if(b instanceof H||c instanceof H){b instanceof H?e=b:(e=c,c=b);e=jc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}oc.prototype.evaluate=function(a){return this.fa.q(this.ma,this.ra,a)};oc.prototype.toString=function(){var a="Binary Expression: "+this.fa,a=a+L(this.ma);return a+=L(this.ra)};function rc(a,b,c,d){this.Ga=a;this.pa=b;this.j=c;this.q=d}rc.prototype.toString=h("Ga");var sc={}; +function O(a,b,c,d){if(sc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new rc(a,b,c,d);return sc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return qc(function(a,b){return a<b},a,b,c)}); +O(">",4,2,function(a,b,c){return qc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return qc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return qc(function(a,b){return a>=b},a,b,c)});var pc=O("=",3,2,function(a,b,c){return qc(function(a,b){return a==b},a,b,c,!0)});O("!=",3,2,function(a,b,c){return qc(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return nc(a,c)&&nc(b,c)});O("or",1,2,function(a,b,c){return nc(a,c)||nc(b,c)});function tc(a,b){if(b.r()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.j);this.qa=a;this.e=b;this.t=a.h();this.l=a.l}p(tc,J);tc.prototype.evaluate=function(a){a=this.qa.evaluate(a);return uc(this.e,a)};tc.prototype.toString=function(){var a;a="Filter:"+L(this.qa);return a+=L(this.e)};function vc(a,b){if(b.length<a.oa)throw Error("Function "+a.o+" expects at least"+a.oa+" arguments, "+b.length+" given");if(null!==a.ca&&b.length>a.ca)throw Error("Function "+a.o+" expects at most "+a.ca+" arguments, "+b.length+" given");a.Ea&&r(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});J.call(this,a.j);this.P=a;this.W=b;lc(this,a.t||ta(b,function(a){return a.h()}));mc(this,a.Ca&&!b.length||a.Ba&&!!b.length||ta(b,function(a){return a.l}))} +p(vc,J);vc.prototype.evaluate=function(a){return this.P.q.apply(null,xa(a,this.W))};vc.prototype.toString=function(){var a="Function: "+this.P;if(this.W.length)var b=sa(this.W,function(a,b){return a+L(b)},"Arguments:"),a=a+L(b);return a};function wc(a,b,c,d,e,f,g,l,q){this.o=a;this.j=b;this.t=c;this.Ca=d;this.Ba=e;this.q=f;this.oa=g;this.ca=da(l)?l:g;this.Ea=!!q}wc.prototype.toString=h("o");var xc={}; +function P(a,b,c,d,e,f,g,l){if(xc.hasOwnProperty(a))throw Error("Function already created: "+a+".");xc[a]=new wc(a,b,c,d,!1,e,f,g,l)}P("boolean",2,!1,!1,function(a,b){return nc(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+N(c,a)},"")},2,null);P("contains",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2); +P("count",1,!1,!1,function(a,b){return b.evaluate(a).r()},1,1,!0);P("false",2,!1,!1,aa(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(M(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(Pb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];r(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(qb);var g=new H;r(f,function(a){g.add(a)});return g},1);P("lang",2,!1,!1,aa(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.p},0);P("local-name",3,!1,!0,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?hc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,aa(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!nc(b,a)},1);P("number",1,!1,!0,function(a,b){return b?M(b,a):+G(a.g)},0,1);P("position",1,!0,!1,function(a){return a.Ha},0);P("round",1,!1,!1,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?N(b,a):G(a.g)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){for(var c=jc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,!1,!1,aa(!0),0);function I(a,b){this.ta=a;this.na=da(b)?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=lb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function yc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}I.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};I.prototype.getName=h("ta"); +I.prototype.toString=function(){var a="Kind Test: "+this.ta;null===this.na||(a+=L(this.na));return a};function zc(a){J.call(this,3);this.sa=a.substring(1,a.length-1)}p(zc,J);zc.prototype.evaluate=h("sa");zc.prototype.toString=function(){return"Literal: "+this.sa};function ac(a,b){this.o=a.toLowerCase();this.da=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}ac.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.o&&this.o!=a.nodeName.toLowerCase()?!1:this.da==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};ac.prototype.getName=h("o");ac.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.da?"":this.da+":")+this.o};function Ac(a){J.call(this,1);this.ua=a}p(Ac,J);Ac.prototype.evaluate=h("ua");Ac.prototype.toString=function(){return"Number: "+this.ua};function Bc(a,b){J.call(this,a.j);this.ka=a;this.N=b;this.t=a.h();this.l=a.l;if(1==this.N.length){var c=this.N[0];c.$||c.u!=Cc||(c=c.V,"*"!=c.getName()&&(this.M={name:c.getName(),H:null}))}}p(Bc,J);function Dc(){J.call(this,4)}p(Dc,J);Dc.prototype.evaluate=function(a){var b=new H;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Dc.prototype.toString=aa("Root Helper Expression");function Ec(){J.call(this,4)}p(Ec,J);Ec.prototype.evaluate=function(a){var b=new H;b.add(a.g);return b}; +Ec.prototype.toString=aa("Context Helper Expression"); +Bc.prototype.evaluate=function(a){var b=this.ka.evaluate(a);if(!(b instanceof H))throw Error("Filter expression must evaluate to nodeset.");a=this.N;for(var c=0,d=a.length;c<d&&b.r();c++){var e=a[c],f=jc(b,e.u.G),g;if(e.h()||e.u!=Fc)if(e.h()||e.u!=Gc)for(g=f.next(),b=e.evaluate(new Ob(g));null!=(g=f.next());)g=e.evaluate(new Ob(g)),b=gc(b,g);else g=f.next(),b=e.evaluate(new Ob(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ob(g))}}return b}; +Bc.prototype.toString=function(){var a;a="Path Expression:"+L(this.ka);if(this.N.length){var b=sa(this.N,function(a,b){return a+L(b)},"Steps:");a+=L(b)}return a};function Hc(a,b){this.e=a;this.G=!!b}function uc(a,b,c){for(c=c||0;c<a.e.length;c++)for(var d=a.e[c],e=jc(b),f=b.r(),g,l=0;g=e.next();l++){var q=a.G?f-l:l+1;g=d.evaluate(new Ob(g,q,f));if("number"==typeof g)q=q==g;else if("string"==typeof g||"boolean"==typeof g)q=!!g;else if(g instanceof H)q=0<g.r();else throw Error("Predicate.evaluate returned an unexpected type.");q||e.remove()}return b}Hc.prototype.w=function(){return 0<this.e.length?this.e[0].w():null}; +Hc.prototype.h=function(){for(var a=0;a<this.e.length;a++){var b=this.e[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Hc.prototype.r=function(){return this.e.length};Hc.prototype.toString=function(){return sa(this.e,function(a,b){return a+L(b)},"Predicates:")};function Ic(a,b,c,d){J.call(this,4);this.u=a;this.V=b;this.e=c||new Hc([]);this.$=!!d;b=this.e.w();a.Ka&&b&&(a=b.name,a=Pb?a.toLowerCase():a,this.M={name:a,H:b.H});this.t=this.e.h()}p(Ic,J); +Ic.prototype.evaluate=function(a){var b=a.g,c=null,c=this.w(),d=null,e=null,f=0;c&&(d=c.name,e=c.H?N(c.H,a):null,f=1);if(this.$)if(this.h()||this.u!=Jc)if(a=jc((new Ic(Kc,new I("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);null!=(b=a.next());)c=gc(c,this.q(b,d,e,f));else c=new H;else c=Yb(this.V,b,d,e),c=uc(this.e,c,f);else c=this.q(a.g,d,e,f);return c};Ic.prototype.q=function(a,b,c,d){a=this.u.P(this.V,a,b,c);return a=uc(this.e,a,d)}; +Ic.prototype.toString=function(){var a;a="Step:"+L("Operator: "+(this.$?"//":"/"));this.u.o&&(a+=L("Axis: "+this.u));a+=L(this.V);if(this.e.r()){var b=sa(this.e.e,function(a,b){return a+L(b)},"Predicates:");a+=L(b)}return a};function Lc(a,b,c,d){this.o=a;this.P=b;this.G=c;this.Ka=d}Lc.prototype.toString=h("o");var Mc={};function Q(a,b,c,d){if(Mc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Lc(a,b,c,!!d);return Mc[a]=b} +Q("ancestor",function(a,b){for(var c=new H,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new H,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Cc=Q("attribute",function(a,b){var c=new H,d=a.getName();if("style"==d&&b.style&&Pb)return c.add(new Rb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof I&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Pb?g.nodeValue&&c.add(Sb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Pb?g.nodeValue&&c.add(Sb(b,g,b.sourceIndex)):c.add(g));return c},!1),Jc=Q("child",function(a,b,c,d,e){return(Pb?dc:ec).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new H)}, +!1,!0);Q("descendant",Yb,!1,!0);var Kc=Q("descendant-or-self",function(a,b,c,d){var e=new H;Xb(b,c,d)&&a.matches(b)&&e.add(b);return Yb(a,b,c,d,e)},!1,!0),Fc=Q("following",function(a,b,c,d){var e=new H;do for(var f=b;f=f.nextSibling;)Xb(f,c,d)&&a.matches(f)&&e.add(f),e=Yb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new H,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new H},!1); +var Nc=Q("parent",function(a,b){var c=new H;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Gc=Q("preceding",function(a,b,c,d){var e=new H,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,l=f.length;g<l;g++){var q=[];for(b=f[g];b=b.previousSibling;)q.unshift(b);for(var y=0,z=q.length;y<z;y++)b=q[y],Xb(b,c,d)&&a.matches(b)&&e.add(b),e=Yb(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new H,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Oc=Q("self",function(a,b){var c=new H;a.matches(b)&&c.add(b);return c},!1);function Pc(a){J.call(this,1);this.ja=a;this.t=a.h();this.l=a.l}p(Pc,J);Pc.prototype.evaluate=function(a){return-M(this.ja,a)};Pc.prototype.toString=function(){return"Unary Expression: -"+L(this.ja)};function Qc(a){J.call(this,4);this.S=a;lc(this,ta(this.S,function(a){return a.h()}));mc(this,ta(this.S,function(a){return a.l}))}p(Qc,J);Qc.prototype.evaluate=function(a){var b=new H;r(this.S,function(c){c=c.evaluate(a);if(!(c instanceof H))throw Error("Path expression must evaluate to NodeSet.");b=gc(b,c)});return b};Qc.prototype.toString=function(){return sa(this.S,function(a,b){return a+L(b)},"Union Expression:")};function Rc(a,b){this.a=a;this.Fa=b}function Sc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Tc(a);var d=a.a.next();if(!d)break;var e=(d=sc[d]||null)&&d.pa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].pa;)b=new oc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new oc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Uc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Vc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Wc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new zc(a)}function Xc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new ac(b);var d=b.substring(0,c);a=a.Fa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new ac(b,a)} +function Yc(a){var b,c=[],d;if("/"==F(a.a)||"//"==F(a.a)){b=a.a.next();d=F(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Dc;d=new Dc;R(a,"Missing next location step.");b=Zc(a,b);c.push(b)}else{a:{b=F(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Sc(a);R(a,'unclosed "("');Uc(a,")");break;case '"':case "'":b=Wc(a);break;default:if(isNaN(+b))if(!yc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==F(a.a,1)){b=a.a.next();b=xc[b]||null;a.a.next();for(d=[];")"!=F(a.a);){R(a,"Missing function argument list.");d.push(Sc(a));if(","!=F(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Vc(a);b=new vc(b,d)}else{b=null;break a}else b=new Ac(+a.a.next())}"["==F(a.a)&&(d=new Hc($c(a)),b=new tc(b,d))}if(b)if("/"==F(a.a)||"//"==F(a.a))d=b;else return b;else b=Zc(a,"/"),d=new Ec,c.push(b)}for(;"/"==F(a.a)||"//"==F(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Zc(a,b),c.push(b); +return new Bc(d,c)} +function Zc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==F(a.a))return d=new Ic(Oc,new I("node")),a.a.next(),d;if(".."==F(a.a))return d=new Ic(Nc,new I("node")),a.a.next(),d;var f;if("@"==F(a.a))f=Cc,a.a.next(),R(a,"Missing attribute name");else if("::"==F(a.a,1)){if(!/(?![0-9])[\w]/.test(F(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Mc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=Jc; +c=F(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==F(a.a,1)){if(!yc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!yc(c))throw Error("Invalid type name: "+c);Uc(a,"(");R(a,"Bad nodetype");e=F(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Wc(a);R(a,"Bad nodetype");Vc(a);c=new I(c,g)}else c=Xc(a);else if("*"==c)c=Xc(a);else throw Error("Bad token: "+a.a.next());e=new Hc($c(a),f.G);return d||new Ic(f,c,e,"//"==b)} +function $c(a){for(var b=[];"["==F(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Sc(a);b.push(c);R(a,"Unclosed predicate expression.");Uc(a,"]")}return b}function Tc(a){if("-"==F(a.a))return a.a.next(),new Pc(Tc(a));var b=Yc(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Yc(a));a.a.back();a=new Qc(b)}return a};function ad(a){switch(a.nodeType){case 1:return ka(bd,a);case 9:return ad(a.documentElement);case 2:return a.ownerElement?ad(a.ownerElement):cd;case 11:case 10:case 6:case 12:return cd;default:return a.parentNode?ad(a.parentNode):cd}}function cd(){return null}function bd(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?bd(a.parentNode,b):null};function dd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Ub(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=aa(null);var d=Sc(new Rc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Ob(a));return new S(c,b)}} +function S(a,b){if(0==b)if(a instanceof H)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 H))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof H?ic(a):""+a;break;case 1:this.numberValue=a instanceof H?+ic(a):+a;break;case 3:this.booleanValue=a instanceof H?0<a.r():!!a;break;case 4:case 5:case 6:case 7:var d= +jc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Rb?e.g:e);this.snapshotLength=a.r();this.invalidIteratorState=!1;break;case 8:case 9:d=hc(a);this.singleNodeValue=d instanceof Rb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function ed(a){this.lookupNamespaceURI=ad(a)} +function fd(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new dd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new dd(a,b)},b.createNSResolver=function(a){return new ed(a)})};var T={};T.wa=function(){var a={Va:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.q=function(a,b,c){var d=E(a);(v||Lb)&&fd(D(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.wa;return v&&!ab(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!w||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +T.Z=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.Ja=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.Z(c,a);return c}; +T.Qa=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;u&&!da(e)&&T.Z(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();r(c,function(b){T.Z(b,a)});return c};function gd(a){return(a=a.exec(Na()))?a[1]:""}var hd=function(){if(Hb)return gd(/Firefox\/([0-9.]+)/);if(v||u)return Ua;if(Mb)return gd(/Chrome\/([0-9.]+)/);if(Nb)return gd(/Version\/([0-9.]+)/);if(Jb||Kb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Lb)return(a=gd(/Android\s+([0-9.]+)/))?a:gd(/Version\/([0-9.]+)/);if(Ib)return gd(/Camino\/([0-9.]+)/)}return""}();var id,jd;function U(a){return kd?id(a):v?0<=na(eb,a):ab(a)}function ld(a){return kd?jd(a):Lb?0<=na(md,a):0<=na(hd,a)} +var kd=function(){if(!w)return!1;var a=m.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;id=function(a){return 0<=d.ya(e,""+a)};jd=function(a){return 0<=d.ya(f,""+a)};return!0}(),nd;if(Lb){var od=/Android\s+([0-9\.]+)/.exec(Na());nd=od?od[1]:"0"}else nd="0"; +var md=nd,pd=v&&!B(8),qd=B(9),rd=v&&!B(9),sd=B(10),td=v&&!B(10);Lb&&ld(2.3);Lb&&ld(4);Nb&&ld(6);var ud=v&&-1!=Na().indexOf("IEMobile");function vd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}vd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};vd.prototype.contains=function(a){return this&&a?a instanceof vd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +vd.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};vd.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +vd.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}V.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};V.prototype.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +V.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};V.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +V.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function wd(a,b){var c=E(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function xd(a){a=a?E(a):document;var b;(b=!v)||(b=B(9))||(b=a?new xb(E(a)):gb||(gb=new xb),b=nb(b.C));return b?a.documentElement:a.body} +function yd(a){var b=a.offsetWidth,c=a.offsetHeight,d=A&&!b&&!c;if((!da(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}v&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new hb(e.right-e.left,e.bottom-e.top)}return new hb(b,c)}var zd={thin:2,medium:4,thick:6}; +function Ad(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in zd)d=zd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Bd(a){var b;a:{a=E(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return v&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Cd(a){return Dd(a,!0)&&Ed(a)&&!(v||u||w&&!U("1.9.2")?0:"none"==X(a,"pointer-events"))}function Fd(a){return W(a,"OPTION")?!0:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Gd(a){if(!Fd(a))throw new t(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Hd(a,b)}function Hd(a,b){var c;if(c=pd)if(c="value"==b)if(c=W(a,"OPTION"))c=null===Id(a);c?(c=[],vb(a,c,!1),c=c.join("")):c=a[b];return c}var Jd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Kd(a){var b=[];r(a.split(Jd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return u?b.replace(/\w+:;/g,""):b}function Id(a){var b;b="value";return"style"==b?Kd(a.style.cssText):pd&&"value"==b&&W(a,"INPUT")?a.value:rd&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Ld="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Ed(a){var b=a.tagName.toUpperCase();return wa(Ld,b)?Hd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Ed(a.parentNode):!wb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Hd(b,"disabled")){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:ob(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function Md(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=rd?"styleFloat":"cssFloat";var d=wd(a,c)||Nd(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Nd(a,b){var c=a.currentStyle||a.style,d=c[b];!da(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?da(d)?d:null:(c=Md(a))?Nd(c,b):null} +function Dd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=Md(a);return!a||c(a)}function d(a){var b=Od(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==lb||W(a)&&d(a)})}function e(a){return Pd(a)==Qd&&ua(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +wb(a,function(a){return W(a,"SELECT")});return!!f&&Dd(f,!0)}return(f=Rd(a))?!!f.la&&0<f.rect.width&&0<f.rect.height&&Dd(f.la,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Sd(a)||!d(a)?!1:!e(a)}var Qd="hidden"; +function Pd(a,b){function c(a){var b=X(a,"position");if("fixed"==b)return z=!0,a==l?null:l;for(a=Md(a);a&&a!=l&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=Md(a);return a}function d(a){var b=a;if("visible"==y)if(a==l&&q)b=q;else if(a==q)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==l&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==l){var b=(new xb(g)).C;a=!A&&nb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=v&&ab("10")&&b.pageYOffset!=a.scrollTop?new C(a.scrollLeft,a.scrollTop):new C(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new C(a.scrollLeft,a.scrollTop);return a}for(var f=Td(a,b),g=E(a),l=g.documentElement,q=g.body,y=X(l,"overflow"),z,s=c(a);s;s=c(s)){var k=d(s);if("visible"!=k.x||"visible"!=k.y){var x=Od(s);if(0==x.width||0==x.height)return Qd;var K=f.right<x.left,ba=f.bottom<x.top;if(K&&"hidden"==k.x||ba&&"hidden"== +k.y)return Qd;if(K&&"visible"!=k.x||ba&&"visible"!=k.y){K=e(s);ba=f.bottom<x.top-K.y;if(f.right<x.left-K.x&&"visible"!=k.x||ba&&"visible"!=k.x)return Qd;f=Pd(s);return f==Qd?Qd:"scroll"}K=f.left>=x.left+x.width;x=f.top>=x.top+x.height;if(K&&"hidden"==k.x||x&&"hidden"==k.y)return Qd;if(K&&"visible"!=k.x||x&&"visible"!=k.y){if(z&&(k=e(s),f.left>=l.scrollWidth-k.x||f.right>=l.scrollHeight-k.y))return Qd;f=Pd(s);return f==Qd?Qd:"scroll"}}}return"none"}var Ud=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Od(a){function b(a){var c=D(E(a)).getComputedStyle(a,null).MozTransform.match(Ud);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),z=parseFloat(c[3]),s=parseFloat(c[4]),k=parseFloat(c[5]),c=parseFloat(c[6]),x=f.left+f.width,K=f.top+f.height,ba=f.left*d,d=x*d,bb=f.left*e,e=x*e,cb=f.top*z,z=K*z,db=f.top*s,x=K*s,K=ba+cb+k,s=bb+db+c,cb=d+cb+k,db=e+db+c,ba=ba+z+k,bb=bb+x+c,k=d+z+k,c=e+x+c;f.left=Math.min(K,cb,ba,k);f.top=Math.min(s,db,bb,c);k=Math.max(K,cb,ba,k);c=Math.max(s,db,bb,c);f.width=k- +f.left;f.height=c-f.top}(a=Md(a))&&b(a)}var c=Rd(a);if(c)return c.rect;if(W(a,"HTML"))return c=E(a),a=mb(D(c)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);v&&a.ownerDocument.body&&(c=E(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));w&&!U(12)&&b(a);return f} +function Rd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.Ja('/descendant::*[@usemap = "#'+c.name+'"]',E(c)))&&(e=Od(d),!b&&"default"!=a.shape.toLowerCase())){var f=Vd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{la:d,rect:e||new V(0,0,0,0)}} +function Vd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)} +function Td(a,b){var c;c=Od(a);c=new vd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof V?b:new V(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Sd(a){if(td){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Wd(a)}function Wd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Md(a))&&(b*=Wd(a));return b};function Xd(a,b){this.d=ma.document.documentElement;this.m=null;var c=Bd(this.d);c&&Yd(this,c);this.R=a||new Zd;this.ia=b||new $d}Xd.prototype.v=h("d");function Yd(a,b){a.d=b;a.m=W(b,"OPTION")?wb(b,function(a){return W(a,"SELECT")}):null} +Xd.prototype.O=function(a,b,c,d,e,f,g){if(!f&&!Cd(this.d))return!1;if(d&&ae!=a&&be!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:0!=(this.R.T&4),ctrlKey:0!=(this.R.T&2),shiftKey:0!=(this.R.T&1),metaKey:0!=(this.R.T&8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=ce&&a!=de&&g in ee?c=ee[g]:this.m&&(c=fe(this,a));return c?this.ia.O(c,a,b):!0}; +Xd.prototype.J=function(a,b,c,d,e,f,g,l){if(!l&&!Cd(this.d))return!1;if(g&&ge!=a&&he!=a)throw new t(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ia:0,rotation:0,pointerId:d,La:0,Ma:0,pointerType:e,Aa:f};c=this.m?fe(this,a):this.d;ee[d]&&(c=ee[d]);d=D(E(this.d));var q;d&&a==ie&&(q=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){ee[a]= +this});a=c?this.ia.J(c,a,b):!0;q&&(d.Element.prototype.msSetPointerCapture=q);return a};function fe(a,b){if(v)switch(b){case ae:case ge:return null;case je:case ke:case le:return a.m.multiple?a.m:null;default:return a.m}if(u)switch(b){case je:case ae:return a.m.multiple?a.d:null;default:return a.d}if(A)switch(b){case ce:case me:return a.m.multiple?a.d:a.m;default:return a.m.multiple?a.d:null}return a.d}var ne=A||u||kd&&ld(3.6); +function oe(a){if(ne||!a.href)return!1;if(!kd)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=D(E(a)),c=b.location.href;a=pe(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var qe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function pe(a,b){var c=b.match(qe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var l=a.pathname.lastIndexOf("/");-1!=l&&(f=a.pathname.substr(0,l+1)+f)}return d+"//"+e+f+g+c}function Zd(){this.T=0}var ee={};function $d(){}$d.prototype.O=function(a,b,c){return re(a,b,c)};$d.prototype.J=function(a,b,c){return re(a,b,c)};v&&U(10);Lb&&ld(4);var se=v&&ma.navigator.msPointerEnabled;function te(a,b,c){this.f=a;this.X=b;this.Y=c}te.prototype.create=function(a){a=E(a);rd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.X,this.Y));return a};te.prototype.toString=h("f");function Y(a,b,c){te.call(this,a,b,c)}p(Y,te); +Y.prototype.create=function(a,b){if(!w&&this==ue)throw new t(9,"Browser does not support a mouse pixel scroll event.");var c=E(a),d;if(rd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==be||this==ae)if(Object.defineProperty){var e=this==be;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==ve&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=D(c);d=c.createEvent("MouseEvents");var f=1;this==ve&&(w||(d.wheelDelta=b.wheelDelta),w||u)&&(f=b.wheelDelta/-40);w&&this==ue&&(f=b.wheelDelta);d.initMouseEvent(this.f,this.X,this.Y,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(v&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=yb(a?new xb(E(a)):gb||(gb=new xb)), +c=xd(c),g=b.clientX+e.scrollLeft-c.clientLeft,l=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return l}})}}return d};function we(a,b,c){te.call(this,a,b,c)}p(we,te); +we.prototype.create=function(a,b){if(!se)throw new t(9,"Browser does not support MSPointer events.");var c=E(a),d=D(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.f,this.X,this.Y,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ia,b.rotation,b.La,b.Ma,b.pointerId,b.pointerType,0,b.Aa);return c}; +var xe=new te("change",!0,!1),ye=new te("focus",!1,!1),ce=new Y("click",!0,!0),je=new Y("contextmenu",!0,!0),ze=new Y("dblclick",!0,!0),de=new Y("mousedown",!0,!0),ke=new Y("mousemove",!0,!1),be=new Y("mouseout",!0,!0),ae=new Y("mouseover",!0,!0),me=new Y("mouseup",!0,!0),ve=new Y(w?"DOMMouseScroll":"mousewheel",!0,!0),ue=new Y("MozMousePixelScroll",!0,!0),Ae=new we("MSGotPointerCapture",!0,!1),Be=new we("MSLostPointerCapture",!0,!1),ie=new we("MSPointerDown",!0,!0),le=new we("MSPointerMove",!0,!0), +ge=new we("MSPointerOver",!0,!0),he=new we("MSPointerOut",!0,!0),Ce=new we("MSPointerUp",!0,!0);function re(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return rd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function De(a,b){this.A={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De)for(d=Ee(a),Fe(a),e=[],c=0;c<a.i.length;c++)e.push(a.A[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.I=0;De.prototype.va=0;function Ee(a){Fe(a);return a.i.concat()} +De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.A,a)?(delete this.A[a],this.I--,this.va++,this.i.length>2*this.I&&Fe(this),!0):!1};function Fe(a){if(a.I!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.A,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.I!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.A,a)?this.A[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.A,a)||(this.I++,this.i.push(a),this.va++);this.A[a]=b};var Ge={};function Z(a,b,c){ga(a)&&(a=w?a.b:u?a.opera:a.c);a=new He(a,b,c);!b||b in Ge&&!c||(Ge[b]={key:a,shift:!1},c&&(Ge[c]={key:a,shift:!0}));return a}function He(a,b,c){this.code=a;this.xa=b||null;this.Ta=c||this.xa}Z(8);Z(9);Z(13);var Ie=Z(16),Je=Z(17),Ke=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Le=Z(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Sa?56:42},"*"); +Z({b:107,c:107,opera:Sa?61:43},"+");Z({b:109,c:109,opera:Sa?109:45},"-");Z({b:110,c:110,opera:Sa?190:78},".");Z({b:111,c:111,opera:Sa?191:47},"/");Z(Sa&&u?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Me=new De; +Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke);Me.set(8,Le);(function(a){var b=new De;r(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);w&&U(12);function Ne(a,b,c){Xd.call(this,b,c);this.D=this.n=null;this.B=new C(0,0);this.aa=this.L=!1;if(a){this.n=a.Na;try{W(a.za)&&(this.D=a.za)}catch(d){this.n=null}this.B=a.Oa;this.L=a.Ra;this.aa=a.Pa;try{W(a.element)&&Yd(this,a.element)}catch(e){this.n=null}}}p(Ne,Xd);var $={}; +rd?($[ce]=[0,0,0,null],$[je]=[null,null,0,null],$[me]=[1,4,2,null],$[be]=[0,0,0,0],$[ke]=[1,4,2,0]):A||qd?($[ce]=[0,1,2,null],$[je]=[null,null,2,null],$[me]=[0,1,2,null],$[be]=[0,1,2,0],$[ke]=[0,1,2,0]):($[ce]=[0,1,2,null],$[je]=[null,null,2,null],$[me]=[0,1,2,null],$[be]=[0,0,0,0],$[ke]=[0,0,0,0]);sd&&($[ie]=$[me],$[Ce]=$[me],$[le]=[-1,-1,-1,-1],$[he]=$[le],$[ge]=$[le]);$[ze]=$[ce];$[de]=$[me];$[ae]=$[be];var Oe={};Oe[de]=ie;Oe[ke]=le;Oe[be]=he;Oe[ae]=ge;Oe[me]=Ce; +Ne.prototype.move=function(a,b){var c=Cd(a),d=Od(a);this.B.x=b.x+d.left;this.B.y=b.y+d.top;d=this.v();if(a!=d){try{D(E(d)).closed&&(d=null)}catch(e){d=null}if(d){var f=d===ma.document.documentElement||d===ma.document.body,d=!this.aa&&f?null:d;Pe(this,be,a)}Yd(this,a);v||Pe(this,ae,d,null,c)}Pe(this,ke,null,null,c);v&&a!=d&&Pe(this,ae,d,null,c);this.L=!1}; +function Pe(a,b,c,d,e){a.aa=!0;if(sd){var f=Oe[b];if(f&&!a.J(f,a.B,Qe(a,f),1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0,c,e))return!1}return a.O(b,a.B,Qe(a,b),c,d,e)}function Qe(a,b){if(!(b in $))return 0;var c=$[b][null===a.n?3:a.n];if(null===c)throw new t(13,"Event does not permit the specified mouse button.");return c};function Re(a,b){this.x=a;this.y=b}p(Re,C);Re.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Se(a,b,c){if(!Dd(a,!0))throw new t(11,"Element is not currently visible and may not be manipulated");b:{var d=b||void 0;if("scroll"==Pd(a,d)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Pd(a,d)))break b;for(var e=Td(a,d),f=Md(a);f;f=Md(f)){var g=f,l=Od(g),q;var y=g;if(v&&!B(9)){var z=Ad(y,"borderLeft");q=Ad(y,"borderRight");var s=Ad(y,"borderTop"),y=Ad(y,"borderBottom");q=new vd(s,q,y,z)}else z=wd(y,"borderLeftWidth"),q=wd(y,"borderRightWidth"),s=wd(y,"borderTopWidth"),y=wd(y,"borderBottomWidth"), +q=new vd(parseFloat(s),parseFloat(q),parseFloat(y),parseFloat(z));z=e.left-l.left-q.left;l=e.top-l.top-q.top;q=g.clientHeight+e.top-e.bottom;g.scrollLeft+=Math.min(z,Math.max(z-(g.clientWidth+e.left-e.right),0));g.scrollTop+=Math.min(l,Math.max(l-q,0))}Pd(a,d)}}b?b=new Re(b.x,b.y):(b=Te(a),b=new Re(b.width/2,b.height/2));c=c||new Ne;c.move(a,b);if(null!==c.n)throw new t(13,"Cannot press more then one button or an already pressed button.");c.n=2;c.D=c.v();var k;a=w&&!ld(4);(A||a)&&(W(c.v(),"OPTION")|| +W(c.v(),"SELECT"))?k=!0:((a=w||v)&&(k=Bd(c.v())),k=(b=Pe(c,de))&&a&&k!=Bd(c.v())?!1:b);if(k&&(sd&&(0==c.n&&W(c.D,"OPTION"))&&c.J(Ae,c.B,0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0),k=c.m||c.d,a=Bd(k),k!=a)){if(a&&(fa(a.blur)||v&&ga(a.blur))){if(!W(a,"BODY"))try{a.blur()}catch(x){if(!v||"Unspecified error."!=x.message)throw x;}v&&!U(8)&&D(E(k)).focus()}if(fa(k.focus)||v&&ga(k.focus))u&&U(11)&&!Dd(k)?re(k,ye):k.focus()}if(null===c.n)throw new t(13,"Cannot release a button when no button is pressed."); +c.m&&Cd(c.d)&&(k=c.m,a=Gd(c.d),!a||k.multiple)&&(c.d.selected=!a,(!A||!k.multiple||Mb&&ld(28)||Lb&&ld(4))&&re(k,xe));Pe(c,me);if(0==c.n&&c.v()==c.D){if(!ud||!W(c.D,"OPTION"))if(k=c.B,a=Qe(c,ce),Cd(c.d)){d=b=null;if(!ne)for(e=c.d;e;e=e.parentNode)if(W(e,"A")){b=e;break}else{a:{if(W(e,"INPUT")&&(f=e.type.toLowerCase(),"submit"==f||"image"==f)){f=!0;break a}if(W(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=!0;break a}f=!1}if(f){d=e;break}}f=(e=!c.m&&Fd(c.d))&&Gd(c.d);v&&d?d.click():c.O(ce,k, +a,null,0,!1,void 0)&&(b&&oe(b)?(k=b,a=k.href,b=D(E(k)),v&&!U(8)&&(a=pe(b.location,a)),k.target?b.open(a,k.target):b.location.href=a):!e||(w||A||f&&"radio"==c.d.type.toLowerCase())||(c.d.checked=!f,u&&!U(11)&&re(c.d,xe)))}c.L&&Pe(c,ze);c.L=!c.L;sd&&(0==c.n&&W(c.D,"OPTION"))&&c.J(Be,new C(0,0),0,1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!1)}else 2==c.n&&Pe(c,je);ee={};c.n=null;c.D=null} +function Te(a){var b;if("none"!=(wd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=yd(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=yd(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:Te(a.offsetParent)};function Ue(){this.U=void 0} +function Ve(a,b,c){switch(typeof b){case "string":We(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ve(a,a.U?a.U.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +We(f,c),c.push(":"),Ve(a,a.U?a.U.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Xe={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ye=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function We(a,b){b.push('"',a.replace(Ye,function(a){if(a in Xe)return Xe[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Xe[a]=e+b.toString(16)}),'"')};A||u||w&&U(3.5)||v&&U(8);function Ze(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,Ze);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=$e(a);return b}if("document"in a)return b={},b.WINDOW=$e(a),b;if(ea(a))return ra(a,Ze);a=ib(a,function(a,b){return"number"==typeof b||n(b)});return jb(a,Ze);default:return null}} +function af(a,b){return"array"==ca(a)?ra(a,function(a){return af(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?bf(a.ELEMENT,b):"WINDOW"in a?bf(a.WINDOW,b):jb(a,function(a){return af(a,b)}):a}function cf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ea=la());b.ea||(b.ea=la());return b}function $e(a){var b=cf(a.ownerDocument),c=kb(b,function(b){return b==a});c||(c=":wdc:"+b.ea++,b[c]=a);return c} +function bf(a,b){a=decodeURIComponent(a);var c=b||document,d=cf(c);if(!(a in d))throw new t(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new t(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new t(10,"Element is no longer attached to the DOM");};function df(a,b){var c=[a,b],d=Se,e;try{var d=n(d)?new ma.Function(d):ma==window?d:new ma.Function("return ("+d+").apply(null,arguments);"),f=af(c,ma.document),g=d.apply(null,f);e={status:0,value:Ze(g)}}catch(l){e={status:"code"in l?l.code:13,value:{message:l.message}}}c=[];Ve(new Ue,e,c);return c.join("")}var ef=["_"],ff=m;ef[0]in ff||!ff.execScript||ff.execScript("var "+ef[0]);for(var gf;ef.length&&(gf=ef.shift());)ef.length||void 0===df?ff=ff[gf]?ff[gf]:ff[gf]={}:ff[gf]=df;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/rotate.js b/src/ghostdriver/third_party/webdriver-atoms/rotate.js index 738cb44a1..9322bfdbc 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/rotate.js +++ b/src/ghostdriver/third_party/webdriver-atoms/rotate.js @@ -1,116 +1,128 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var m,p=this; function ca(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function t(a){return a!==k}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function v(a){return"string"==typeof a}function ea(a){return"function"==ca(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function w(a,b){function c(){}c.prototype=b.prototype;a.Ka=b.prototype;a.prototype=new c};var ha=window;function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",u=e[g]||"",s=RegExp("(\\d*)(\\D*)","g"),U=RegExp("(\\d*)(\\D*)","g");do{var L=s.exec(p)||["","",""],ba=U.exec(u)||["","",""];if(0==L[0].length&&0==ba[0].length)break;c=((0==L[1].length?0:parseInt(L[1],10))<(0==ba[1].length?0:parseInt(ba[1],10))?-1:(0==L[1].length?0:parseInt(L[1],10))>(0== -ba[1].length?0:parseInt(ba[1],10))?1:0)||((0==L[2].length)<(0==ba[2].length)?-1:(0==L[2].length)>(0==ba[2].length)?1:0)||(L[2]<ba[2]?-1:L[2]>ba[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function x(a,b){for(var c=a.length,d=v(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=v(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=v(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function oa(a,b){for(var c=a.length,d=v(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function pa(a,b){var c;a:{c=a.length;for(var d=v(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:v(a)?a.charAt(c):a[c]}function qa(a,b){var c;a:if(v(a))c=!v(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ra(a){return ka.concat.apply(ka,arguments)} -function sa(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ta={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function s(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)} +function ia(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)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)} +function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function t(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",u=RegExp("(\\d*)(\\D*)","g"),w=RegExp("(\\d*)(\\D*)","g");do{var n=u.exec(k)||["","",""],l=w.exec(r)||["","",""];if(0==n[0].length&&0==l[0].length)break;c=((0==n[1].length?0:parseInt(n[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==n[1].length?0:parseInt(n[1],10))>(0==l[1].length? +0:parseInt(l[1],10))?1:0)||((0==n[2].length)<(0==l[2].length)?-1:(0==n[2].length)>(0==l[2].length)?1:0)||(n[2]<l[2]?-1:n[2]>l[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function v(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=s(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=s(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=s(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 ua(a,b){for(var c=a.length,d=s(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 va(a,b){var c;a:{c=a.length;for(var d=s(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:s(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(s(a))c=s(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ua="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function wa(a){xa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(va,"#$1$1$2$2$3$3"));return a.toLowerCase()}var xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a){var b=a.match(Aa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Ca[a]||Da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}w(y,Error); -var Da="unknown error",Ca={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ca[13]=Da;Ca[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return r.navigator?r.navigator.userAgent:m}Ha=Ga=Fa=Ea=n;var La;if(La=Ka()){var Ma=r.navigator;Ea=0==La.indexOf("Opera");Fa=!Ea&&-1!=La.indexOf("MSIE");Ga=!Ea&&-1!=La.indexOf("WebKit");Ha=!Ea&&!Ga&&"Gecko"==Ma.product}var z=Ea,A=Fa,B=Ha,C=Ga,Na,Oa=r.navigator;Na=Oa&&Oa.platform||"";Ia=-1!=Na.indexOf("Mac");Ja=-1!=Na.indexOf("Win");var Pa=-1!=Na.indexOf("Linux");function Qa(){var a=r.document;return a?a.documentMode:k}var Ra; -a:{var Sa="",Ta;if(z&&r.opera)var Ua=r.opera.version,Sa="function"==typeof Ua?Ua():Ua;else if(B?Ta=/rv\:([^\);]+)(\)|;)/:A?Ta=/MSIE\s+([^\);]+)(\)|;)/:C&&(Ta=/WebKit\/(\S+)/),Ta)var Va=Ta.exec(Ka()),Sa=Va?Va[1]:"";if(A){var Wa=Qa();if(Wa>parseFloat(Sa)){Ra=String(Wa);break a}}Ra=Sa}var Xa={};function Ya(a){return Xa[a]||(Xa[a]=0<=ia(Ra,a))}function D(a){return A&&Za>=a}var $a=r.document,Za=!$a||!A?k:Qa()||("CSS1Compat"==$a.compatMode?parseInt(Ra,10):5);var ab;!B&&!A||A&&D(9)||B&&Ya("1.9.1");A&&Ya("9");var bb=A||z||C;function E(a,b){this.x=t(a)?a:0;this.y=t(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; -cb.prototype.scale=function(a){this.width*=a;this.height*=a;return this};function db(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function eb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function fb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var gb=3;function hb(a){return a?new ib(F(a)):ab||(ab=new ib)}function jb(a){var b=!C&&kb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function lb(a){return a?a.parentWindow||a.defaultView:window}function kb(a){return"CSS1Compat"==a.compatMode}function mb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function nb(a){if(bb)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} -function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){var c=[];return tb(a,b,c,l)?c[0]:k} -function tb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tb(a,b,c,d))return l;a=a.nextSibling}return n}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==gb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling} -function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function yb(a){try{return a&&a.activeElement}catch(b){}return m}function ib(a){this.C=a||r.document||document}function zb(a){return!C&&kb(a.C)?a.C.documentElement:a.C.body}ib.prototype.contains=ob;var Ab,Bb,Cb,Db,Eb,Fb,Gb;Gb=Fb=Eb=Db=Cb=Bb=Ab=n;var Hb=Ka();Hb&&(-1!=Hb.indexOf("Firefox")?Ab=l:-1!=Hb.indexOf("Camino")?Bb=l:-1!=Hb.indexOf("iPhone")||-1!=Hb.indexOf("iPod")?Cb=l:-1!=Hb.indexOf("iPad")?Db=l:-1!=Hb.indexOf("Android")?Eb=l:-1!=Hb.indexOf("Chrome")?Fb=l:-1!=Hb.indexOf("Safari")&&(Gb=l));var Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb;function Pb(a,b,c){this.g=a;this.Aa=b||1;this.p=c||1};var Qb=A&&!D(9),Rb=A&&!D(8);function Sb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ia=e;this.parentNode=b}function Tb(a,b,c){var d=Rb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Sb(b,a,b.nodeName,d,c)};function Ub(a){this.ba=a;this.Q=0}function Vb(a){a=a.match(Wb);for(var b=0;b<a.length;b++)Xb.test(a[b])&&a.splice(b,1);return new Ub(a)}var Wb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Xb=/^\s/;function G(a,b){return a.ba[a.Q+(b||0)]}Ub.prototype.next=function(){return this.ba[this.Q++]};Ub.prototype.back=function(){this.Q--};Ub.prototype.empty=function(){return this.ba.length<=this.Q};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Qb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Qb&&"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} -function Yb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Rb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Zb(a,b,c,d,e){return(Qb?$b:ac).call(m,a,b,v(c)?c:m,v(d)?d:m,e||new I)} -function $b(a,b,c,d,e){if(a instanceof bc||8==a.e||c&&a.e===m){var f=b.all;if(!f)return e;a=cc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Yb(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}dc(a,b,c,d,e);return e} -function ac(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof J?dc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){Yb(a,c,d)&&e.add(a)}));return e} -function ec(a,b,c,d,e){var f;if((a instanceof bc||8==a.e||c&&a.e===m)&&(f=b.childNodes)){var g=cc(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return Yb(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return fc(a,b,c,d,e)}function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function dc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b),dc(a,b,c,d,e)}function cc(a){if(a instanceof J){if(8==a.e)return"!";if(a.e===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.K=0}function gc(a){this.r=a;this.next=this.B=m}function hc(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Sb&&d.r instanceof Sb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<pb(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.K=g;return a} -I.prototype.unshift=function(a){a=new gc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.K++};I.prototype.add=function(a){a=new gc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.K++};function ic(a){return(a=a.k)?a.r:m}I.prototype.s=q("K");function jc(a){return(a=ic(a))?H(a):""}function kc(a,b){return new lc(a,!!b)}function lc(a,b){this.xa=a;this.ca=(this.D=b)?a.p:a.k;this.Y=m} -lc.prototype.next=function(){var a=this.ca;if(a==m)return m;var b=this.Y=a;this.ca=this.D?a.B:a.next;return b.r};lc.prototype.remove=function(){var a=this.xa,b=this.Y;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.K--;this.Y=m};function K(a){this.j=a;this.m=this.t=n;this.L=m}K.prototype.h=q("t");function mc(a,b){a.t=b}function nc(a,b){a.m=b}K.prototype.w=q("L");function M(a,b){var c=a.evaluate(b);return c instanceof I?+jc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof I?jc(c):""+c}function oc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function pc(a,b,c){K.call(this,a.j);this.aa=a;this.ga=b;this.la=c;this.t=b.h()||c.h();this.m=b.m||c.m;this.aa==qc&&(!c.m&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.L={name:b.w().name,G:c}:!b.m&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.L={name:c.w().name,G:b}))}w(pc,K); -function rc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=kc(b);for(b=f.next();b;b=f.next()){e=kc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=kc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}pc.prototype.evaluate=function(a){return this.aa.q(this.ga,this.la,a)};pc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.aa+"\n";a+=" ";b+=this.ga.toString(a)+"\n";return b+=this.la.toString(a)};function sc(a,b,c,d){this.za=a;this.ja=b;this.j=c;this.q=d}sc.prototype.toString=q("za");var tc={}; -function O(a,b,c,d){a in tc&&h(Error("Binary operator already created: "+a));a=new sc(a,b,c,d);return tc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return rc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return rc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return rc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return rc(function(a,b){return a>=b},a,b,c)});var qc=O("=",3,2,function(a,b,c){return rc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return rc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return oc(a,c)&&oc(b,c)});O("or",1,2,function(a,b,c){return oc(a,c)||oc(b,c)});function uc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));K.call(this,a.j);this.ka=a;this.f=b;this.t=a.h();this.m=a.m}w(uc,K);uc.prototype.evaluate=function(a){a=this.ka.evaluate(a);return vc(this.f,a)};uc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ka.toString(a);return b+=this.f.toString(a)};function wc(a,b){b.length<a.ia&&h(Error("Function "+a.o+" expects at least"+a.ia+" arguments, "+b.length+" given"));a.Z!==m&&b.length>a.Z&&h(Error("Function "+a.o+" expects at most "+a.Z+" arguments, "+b.length+" given"));a.ya&&x(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b))});K.call(this,a.j);this.P=a;this.U=b;mc(this,a.t||oa(b,function(a){return a.h()}));nc(this,a.wa&&!b.length||a.va&&!!b.length||oa(b,function(a){return a.m}))}w(wc,K); -wc.prototype.evaluate=function(a){return this.P.q.apply(m,ra(a,this.U))};wc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.P+"\n";b+=" ";this.U.length&&(a+=b+"Arguments:",b+=" ",a=na(this.U,function(a,d){return a+"\n"+d.toString(b)},a));return a};function xc(a,b,c,d,e,f,g,p,u){this.o=a;this.j=b;this.t=c;this.wa=d;this.va=e;this.q=f;this.ia=g;this.Z=t(p)?p:g;this.ya=!!u}xc.prototype.toString=q("o");var yc={}; -function P(a,b,c,d,e,f,g,p){a in yc&&h(Error("Function already created: "+a+"."));yc[a]=new xc(a,b,c,d,n,e,f,g,p)}P("boolean",2,n,n,function(a,b){return oc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,n,n,function(a,b){var c=sa(arguments,1);return na(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(M(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Qb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return pa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!qa(f,a)&&f.push(a)});f.sort(pb);var g=new I;x(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);P("local-name",3,n,l,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!oc(b,a)},1);P("number",1,n,l,function(a,b){return b?M(b,a):+H(a.g)},0,1);P("position",1,l,n,function(a){return a.Aa},0);P("round",1,n,n,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):H(a.g)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):H(a.g)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=kc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,aa(l),0);function J(a,b){this.oa=a;this.ha=t(b)?b:m;this.e=m;switch(a){case "comment":this.e=8;break;case "text":this.e=gb;break;case "processing-instruction":this.e=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function zc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}J.prototype.matches=function(a){return this.e===m||this.e==a.nodeType};J.prototype.getName=q("oa"); -J.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.oa;this.ha===m||(b+="\n"+this.ha.toString(a+" "));return b};function Ac(a){K.call(this,3);this.ma=a.substring(1,a.length-1)}w(Ac,K);Ac.prototype.evaluate=q("ma");Ac.prototype.toString=function(a){return(a||"")+"literal: "+this.ma};function bc(a){this.o=a.toLowerCase()}bc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.o||this.o==a.nodeName.toLowerCase()?l:this.o==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};bc.prototype.getName=q("o");bc.prototype.toString=function(a){return(a||"")+"nametest: "+this.o};function Bc(a){K.call(this,1);this.pa=a}w(Bc,K);Bc.prototype.evaluate=q("pa");Bc.prototype.toString=function(a){return(a||"")+"number: "+this.pa};function Cc(a,b){K.call(this,a.j);this.ea=a;this.M=b;this.t=a.h();this.m=a.m;if(1==this.M.length){var c=this.M[0];!c.W&&c.u==Dc&&(c=c.T,"*"!=c.getName()&&(this.L={name:c.getName(),G:m}))}}w(Cc,K);function Ec(){K.call(this,4)}w(Ec,K);Ec.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Ec.prototype.toString=function(a){return a+"RootHelperExpr"};function Fc(){K.call(this,4)}w(Fc,K);Fc.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Fc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Cc.prototype.evaluate=function(a){var b=this.ea.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.M;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=kc(b,e.u.D),g;if(!e.h()&&e.u==Gc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Pb(g))}else if(!e.h()&&e.u==Hc)g=f.next(),b=e.evaluate(new Pb(g));else{g=f.next();for(b=e.evaluate(new Pb(g));(g=f.next())!=m;)g=e.evaluate(new Pb(g)),b=hc(b,g)}}return b}; -Cc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ea.toString(b);this.M.length&&(c+=b+"Steps:\n",b+=" ",x(this.M,function(a){c+=a.toString(b)}));return c};function Ic(a,b){this.f=a;this.D=!!b}function vc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=kc(b),f=b.s(),g,p=0;g=e.next();p++){var u=a.D?f-p:p+1;g=d.evaluate(new Pb(g,u,f));var s;"number"==typeof g?s=u==g:"string"==typeof g||"boolean"==typeof g?s=!!g:g instanceof I?s=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));s||e.remove()}return b}Ic.prototype.w=function(){return 0<this.f.length?this.f[0].w():m}; -Ic.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return l}return n};Ic.prototype.s=function(){return this.f.length};Ic.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Jc(a,b,c,d){K.call(this,4);this.u=a;this.T=b;this.f=c||new Ic([]);this.W=!!d;b=this.f.w();a.Ea&&b&&(a=b.name,a=Qb?a.toLowerCase():a,this.L={name:a,G:b.G});this.t=this.f.h()}w(Jc,K); -Jc.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.G?N(c.G,a):m,f=1);if(this.W)if(!this.h()&&this.u==Kc)c=Zb(this.T,b,d,e),c=vc(this.f,c,f);else if(a=kc((new Jc(Lc,new J("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=hc(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Jc.prototype.q=function(a,b,c,d){a=this.u.P(this.T,a,b,c);return a=vc(this.f,a,d)}; -Jc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.W?"//":"/")+"\n";this.u.o&&(b+=a+"Axis: "+this.u+"\n");b+=this.T.toString(a);if(this.f.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.f.length;c++)var d=c<this.f.length-1?", ":"",b=b+(this.f[c].toString(a)+d);return b};function Mc(a,b,c,d){this.o=a;this.P=b;this.D=c;this.Ea=d}Mc.prototype.toString=q("o");var Nc={}; -function Q(a,b,c,d){a in Nc&&h(Error("Axis already created: "+a));b=new Mc(a,b,c,!!d);return Nc[a]=b}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Dc=Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Qb)return c.add(new Sb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof J&&a.e===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Qb?g.nodeValue&&c.add(Tb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Qb?g.nodeValue&&c.add(Tb(b,g,b.sourceIndex)):c.add(g));return c},n),Kc=Q("child",function(a,b,c,d,e){return(Qb?ec:fc).call(m,a,b,v(c)?c:m,v(d)?d:m,e||new I)},n,l); -Q("descendant",Zb,n,l);var Lc=Q("descendant-or-self",function(a,b,c,d){var e=new I;Yb(b,c,d)&&a.matches(b)&&e.add(b);return Zb(a,b,c,d,e)},n,l),Gc=Q("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Yb(f,c,d)&&a.matches(f)&&e.add(f),e=Zb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new I},n); -var Oc=Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Hc=Q("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var u=[];for(b=f[g];b=b.previousSibling;)u.unshift(b);for(var s=0,U=u.length;s<U;s++)b=u[s],Yb(b,c,d)&&a.matches(b)&&e.add(b),e=Zb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Pc=Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Qc(a){K.call(this,1);this.da=a;this.t=a.h();this.m=a.m}w(Qc,K);Qc.prototype.evaluate=function(a){return-M(this.da,a)};Qc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.da.toString(a+" ")};function Rc(a){K.call(this,4);this.R=a;mc(this,oa(this.R,function(a){return a.h()}));nc(this,oa(this.R,function(a){return a.m}))}w(Rc,K);Rc.prototype.evaluate=function(a){var b=new I;x(this.R,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=hc(b,c)});return b};Rc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.R,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Sc(a){this.a=a}function Tc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Uc(a);var d=a.a.next();if(!d)break;var e=(d=tc[d]||m)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ja;)b=new pc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new pc(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&h(Error(b))}function Vc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Wc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Xc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Ac(a)}function Yc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new bc(a.a.next()+a.a.next()+a.a.next()):new bc(a.a.next())} -function Zc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Ec;d=new Ec;R(a,"Missing next location step.");b=$c(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Tc(a);R(a,'unclosed "("');Vc(a,")");break;case '"':case "'":b=Xc(a);break;default:if(isNaN(+b))if(!zc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=yc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){R(a,"Missing function argument list.");d.push(Tc(a));if(","!=G(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Wc(a);b=new wc(b,d)}else{b=m;break a}else b=new Bc(+a.a.next())}"["==G(a.a)&&(d=new Ic(ad(a)),b=new uc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=$c(a,"/"),d=new Fc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=$c(a,b),c.push(b);return new Cc(d, -c)} -function $c(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Jc(Pc,new J("node")),a.a.next(),d;if(".."==G(a.a))return d=new Jc(Oc,new J("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Dc,a.a.next(),R(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Nc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Kc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){zc(e)||h(Error("Invalid node type: "+e));c=a.a.next();zc(c)||h(Error("Invalid type name: "+c));Vc(a,"(");R(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Xc(a);R(a,"Bad nodetype");Wc(a);c=new J(c,g)}else c=Yc(a);else"*"==e?c=Yc(a):h(Error("Bad token: "+a.a.next()));e=new Ic(ad(a),f.D);return d||new Jc(f,c,e,"//"==b)} -function ad(a){for(var b=[];"["==G(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Tc(a);b.push(c);R(a,"Unclosed predicate expression.");Vc(a,"]")}return b}function Uc(a){if("-"==G(a.a))return a.a.next(),new Qc(Uc(a));var b=Zc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Zc(a));a.a.back();a=new Rc(b)}return a};function bd(a){a.length||h(Error("Empty XPath expression."));a=Vb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Tc(new Sc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Pb(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?jc(a):""+a;break;case 1:this.numberValue=a instanceof I?+jc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=kc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Sb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=ic(a);this.singleNodeValue=d instanceof Sb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function cd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new bd(a)).evaluate(b,f)},b.createExpression=function(a){return new bd(a)})};var T={};T.ra=function(){var a={La:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.q=function(a,b,c){var d=F(a);(A||Mb)&&cd(lb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ra;return A&&!Ya(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.V=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Da=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.V(c,a);return c}; -T.Ha=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;z&&!t(e)&&T.V(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){T.V(b,a)});return c};function dd(a){return(a=a.exec(Ka()))?a[1]:""}var ed=function(){if(Ib)return dd(/Firefox\/([0-9.]+)/);if(A||z)return Ra;if(Nb)return dd(/Chrome\/([0-9.]+)/);if(Ob)return dd(/Version\/([0-9.]+)/);if(Kb||Lb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ka());if(a)return a[1]+"."+a[2]}else{if(Mb)return(a=dd(/Android\s+([0-9.]+)/))?a:dd(/Version\/([0-9.]+)/);if(Jb)return dd(/Camino\/([0-9.]+)/)}return""}();var fd,gd;function V(a){return hd?fd(a):A?0<=ia(Za,a):Ya(a)}function id(a){return hd?gd(a):Mb?0<=ia(jd,a):0<=ia(ed,a)} -var hd=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;fd=function(a){return 0<=d.ta(e,""+a)};gd=function(a){return 0<=d.ta(f,""+a)};return l}(),kd=Lb||Kb,ld;if(Mb){var md=/Android\s+([0-9\.]+)/.exec(Ka());ld=md?md[1]:"0"}else ld="0"; -var jd=ld,nd=A&&!D(8),od=A&&!D(9),pd=D(10),qd=A&&!D(10);Mb&&id(2.3);!z&&(!C||V("533"));function rd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}rd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};rd.prototype.contains=function(a){return!this||!a?n:a instanceof rd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function sd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function td(a,b){return sd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function ud(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=hb(a),b=!kb(b.C);return b?a.body:a.documentElement} -function vd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function wd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=td(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=td(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function xd(a){var b,c=F(a),d=td(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=ud(c);if(a==g)return f;if(a.getBoundingClientRect)b=vd(a),a=hb(c),a=jb(a.C),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==td(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=wd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function yd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=vd(a);b.x=c.left;b.y=c.top}else{var c=hb(a),c=jb(c.C),d=xd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Ya(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=td(a,e));f||(f=td(a,"transform"));f?(a=f.match(zd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e=ea(a.fa),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.fa().targetTouches&& -(f=a.fa().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function Ad(a){if("none"!=td(a,"display"))return Bd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Bd(a);b.display=c;b.position=e;b.visibility=d;return a}function Bd(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!t(b)||d)&&a.getBoundingClientRect?(a=vd(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)}var Cd={thin:2,medium:4,thick:6}; -function Dd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Cd)d=Cd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var zd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,l)&&Gd(a)&&!(A||z||B&&!V("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?l:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Id(a,b){var c;if(c=nd)if(c="value"==b)if(c=W(a,"OPTION"))c=Jd(a,"value")===m;c?(c=[],wb(a,c,n),c=c.join("")):c=a[b];return c}var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Ld(a){var b=[];x(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Jd(a,b){b=b.toLowerCase();if("style"==b)return Ld(a.style.cssText);if(nd&&"value"==b&&W(a,"INPUT"))return a.value;if(od&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Gd(a){var b=a.tagName.toUpperCase();return!qa(Md,b)?l:Id(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):xb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Id(b,"disabled")){if(!W(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:mb(a.previousSibling);)if(W(a,"LEGEND"))return l}return n},l)?n:l} -function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:m} -function X(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=od?"styleFloat":"cssFloat";c=sd(a,c)||Od(a,c);if(c===m)c=m;else if(qa(ua,b)&&(xa.test("#"==c.charAt(0)?c:"#"+c)||Ba(c).length||ta&&ta[c.toLowerCase()]||za(c).length)){var d=za(c);if(!d.length){a:if(d=Ba(c),!d.length){d=ta[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(xa.test(d)&&(d=wa(d),d=wa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!t(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?t(d)?d:m:(c=Nd(a))?Od(c,b):m} -function Pd(a){if(ea(a.getBBox)&&!W(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(W(a,"BODY")){b=lb(F(a))||k;"hidden"!=X(a,"overflow")?a=l:(a=Nd(a),!a||!W(a,"HTML")?a=l:(a=X(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ha).document;var b=a.documentElement,d=a.body;d||h(new y(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new cb(b,a)}else b=(b||window).document,b=kb(b)?b.documentElement:b.body,b=new cb(b.clientWidth,b.clientHeight);return b}return Ad(a)} -function Fd(a,b){function c(a){if("none"==X(a,"display"))return n;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?l:W(a,"PATH")&&(0<b.height||0<b.width)?(b=X(a,"stroke-width"),!!b&&0<parseInt(b,10)):oa(a.childNodes,function(b){return b.nodeType==gb&&"hidden"!=X(a,"overflow")||W(b)&&d(b)})}function e(a,b){var c;if((c=b==m?nb(a):nb(b))&&("hidden"==X(c,"overflow-x")||"hidden"==X(c,"overflow-y"))){var d=Pd(c),f=yd(c),g=yd(a);return f.x+d.width<=g.x&&"hidden"==X(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==X(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=X(a,"-o-transform")||X(a,"-webkit-transform")||X(a,"-ms-transform")||X(a,"-moz-transform")||X(a,"transform");if(b&&"none"!==b)return b=yd(a),a=Pd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Nd(a);return!a||f(a)}W(a)||h(Error("Argument to isShown must be of type Element"));if(W(a,"OPTION")||W(a,"OPTGROUP")){var g=xb(a,function(a){return W(a,"SELECT")});return!!g&&Fd(g,l)}if(W(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?T.Da('/descendant::*[@usemap = "#'+a.name+'"]',g):sb(g,function(b){return W(b)&&Jd(b,"usemap")=="#"+a.name});return!!g&&Fd(g,b)}return W(a,"AREA")?(g=xb(a,function(a){return W(a,"MAP")}),!!g&&Fd(g,b)):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Qd(a)||!d(a)||!e(a,m)?n:f(a)} -function Qd(a){if(qd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Rd(a)}function Rd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Rd(a));return b};function Sd(a){this.d=ha.document.documentElement;this.n=m;var b=yb(F(this.d));b&&Td(this,b);this.A=a||new Ud}function Td(a,b){a.d=b;a.n=W(b,"OPTION")?xb(b,function(a){return W(a,"SELECT")}):m}function Y(a,b,c){if(!Ed(a.d))return n;c={clientX:c.x,clientY:c.y,button:0,altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),wheelDelta:0,relatedTarget:m};return(a=a.n?Vd(a,b):a.d)?Wd(a,b,c):l} -function Xd(a,b,c,d,e,f){function g(a,c){var d={identifier:a,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};p.changedTouches.push(d);if(b==Yd||b==Zd)p.touches.push(d),p.targetTouches.push(d)}var p={touches:[],targetTouches:[],changedTouches:[],altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),relatedTarget:m,scale:0,rotation:0};g(c,d);t(e)&&g(e,f);Wd(a.d,b,p)} -function $d(a,b,c,d,e,f){var g=MSPointerEvent.MSPOINTER_TYPE_TOUCH;Ed(a.d)&&(c={clientX:c.x,clientY:c.y,button:d,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:m,width:0,height:0,Ca:0,rotation:0,pointerId:e,Fa:0,Ga:0,pointerType:g,ua:f},(a=a.n?Vd(a,b):a.d)&&Wd(a,b,c))} -function Vd(a,b){if(A)switch(b){case ae:case be:return m;case ce:case de:case ee:return a.n.multiple?a.n:m;default:return a.n}if(z)switch(b){case ce:case ae:return a.n.multiple?a.d:m;default:return a.d}if(C)switch(b){case fe:case ge:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:m}return a.d} -function he(a,b){if(Ed(a.d)){var c=m,d=m;if(!ie)for(var e=a.d;e;e=e.parentNode)if(W(e,"A")){c=e;break}else{var f;a:{if(W(e,"INPUT")&&(f=e.type.toLowerCase(),"submit"==f||"image"==f)){f=l;break a}if(W(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=l;break a}f=n}if(f){d=e;break}}if(f=e=Hd(a.d)){f=a.d;Hd(f)||h(new y(15,"Element is not selectable"));var g="selected",p=f.type&&f.type.toLowerCase();if("checkbox"==p||"radio"==p)g="checked";f=!!Id(f,g)}if(a.n&&(g=a.n,!f||g.multiple))a.d.selected=!f, -(!C||!g.multiple||Mb&&id(4))&&Wd(g,je);A&&d?d.click():Y(a,fe,b)&&(c&&ke(c)?(d=c.href,e=lb(F(c)),A&&!V(8)&&(d=le(e.location,d)),c.target?e.open(d,c.target):e.location.href=d):e&&!a.n&&(!B&&!C&&!(f&&"radio"==a.d.type.toLowerCase()))&&(a.d.checked=!f,z&&!V(11)&&Wd(a.d,je)))}} -function me(a){a=a.n||a.d;var b=yb(F(a));if(a!=b){if(b&&(ea(b.blur)||A&&fa(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){A&&"Unspecified error."==c.message||h(c)}A&&!V(8)&&lb(F(a)).focus()}if(ea(a.focus)||A&&fa(a.focus))z&&V(11)&&!Fd(a)?Wd(a,ne):a.focus()}}var ie=C||z||hd&&id(3.6); -function ke(a){if(ie||!a.href)return n;if(!hd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=lb(F(a)),c=b.location.href;a=le(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var oe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function le(a,b){var c=b.match(oe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Ud(){this.Ba=0}Ud.prototype.l=function(a){return 0!=(this.Ba&a)};var pe=!(A&&!V(10))&&!z,qe=Mb?!id(4):!kd,re=A&&ha.navigator.msPointerEnabled;function se(a,b,c){this.e=a;this.H=b;this.I=c}se.prototype.create=function(a){a=F(a);od?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.H,this.I));return a};se.prototype.toString=q("e");function Z(a,b,c){se.call(this,a,b,c)}w(Z,se); -Z.prototype.create=function(a,b){!B&&this==te&&h(new y(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(od){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ue||this==ae)Object.defineProperty?(c=this==ue,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==ve&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=lb(c);d=c.createEvent("MouseEvents");c=1;if(this==ve&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==te&&(c=b.wheelDelta);d.initMouseEvent(this.e,this.H,this.I,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=zb(hb(a)),c=ud(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function we(a,b,c){se.call(this,a,b,c)}w(we,se); -we.prototype.create=function(a,b){function c(b){b=ma(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ma(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}pe||h(new y(9,"Browser does not support firing touch events."));var e=F(a),f=lb(e),g=qe?d(b.changedTouches): -c(b.changedTouches),p=b.touches==b.changedTouches?g:qe?d(b.touches):c(b.touches),u=b.targetTouches==b.changedTouches?g:qe?d(b.targetTouches):c(b.targetTouches),s;qe?(s=e.createEvent("MouseEvents"),s.initMouseEvent(this.e,this.H,this.I,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),s.touches=p,s.targetTouches=u,s.changedTouches=g,s.scale=b.scale,s.rotation=b.rotation):(s=e.createEvent("TouchEvent"),Mb?s.initTouchEvent(p,u,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, -b.altKey,b.shiftKey,b.metaKey):s.initTouchEvent(this.e,this.H,this.I,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,u,g,b.scale,b.rotation),s.relatedTarget=b.relatedTarget);return s};function xe(a,b,c){se.call(this,a,b,c)}w(xe,se); -xe.prototype.create=function(a,b){re||h(new y(9,"Browser does not support MSPointer events."));var c=F(a),d=lb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.H,this.I,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.ua);return c}; -var je=new se("change",l,n),ne=new se("focus",n,n),fe=new Z("click",l,l),ce=new Z("contextmenu",l,l),ye=new Z("mousedown",l,l),de=new Z("mousemove",l,n),ue=new Z("mouseout",l,l),ae=new Z("mouseover",l,l),ge=new Z("mouseup",l,l),ve=new Z(B?"DOMMouseScroll":"mousewheel",l,l),te=new Z("MozMousePixelScroll",l,l),ze=new we("touchend",l,l),Zd=new we("touchmove",l,l),Yd=new we("touchstart",l,l),Ae=new xe("MSPointerDown",l,l),ee=new xe("MSPointerMove",l,l),be=new xe("MSPointerOver",l,l),Be=new xe("MSPointerOut", -l,l),Ce=new xe("MSPointerUp",l,l);function Wd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return od?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function De(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De){d=Ee(a);Fe(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.J=0;De.prototype.qa=0;function Ee(a){Fe(a);return a.i.concat()} -De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.J--,this.qa++,this.i.length>2*this.J&&Fe(this),l):n};function Fe(a){if(a.J!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.J!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.J++,this.i.push(a),this.qa++);this.z[a]=b};var Ge={};function $(a,b,c){fa(a)&&(a=B?a.b:z?a.opera:a.c);a=new He(a,b,c);if(b&&(!(b in Ge)||c))Ge[b]={key:a,shift:n},c&&(Ge[c]={key:a,shift:l});return a}function He(a,b,c){this.code=a;this.sa=b||m;this.Ja=c||this.sa}$(8);$(9);$(13);var Ie=$(16),Je=$(17),Ke=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); -$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Le=$(Ja?{b:91,c:91,opera:219}:Ia?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -$(Ja?{b:92,c:92,opera:220}:Ia?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});$(Ja?{b:93,c:93,opera:0}:Ia?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Pa?56:42},"*");$({b:107,c:107,opera:Pa?61:43},"+"); -$({b:109,c:109,opera:Pa?109:45},"-");$({b:110,c:110,opera:Pa?190:78},".");$({b:111,c:111,opera:Pa?191:47},"/");$(Pa&&z?m:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Me=new De;Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke); -Me.set(8,Le);(function(a){var b=new De;x(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);B&&V(12);function Ne(){Sd.call(this);this.v=new E(0,0);this.O=new E(0,0)}w(Ne,Sd);Ne.prototype.X=n;Ne.prototype.N=0;Ne.prototype.F=0;Ne.prototype.na=1;Ne.prototype.move=function(a,b,c){(!this.l()||pd)&&Td(this,a);a=yd(a);this.v.x=b.x+a.x;this.v.y=b.y+a.y;t(c)&&(this.O.x=c.x+a.x,this.O.y=c.y+a.y);this.l()&&(this.X=l,pd?Oe(this,Pe):Qe(this,Zd))};Ne.prototype.l=function(){return!!this.N}; -function Qe(a,b){a.l()||h(new y(13,"Should never fire event when touchscreen is not pressed."));var c,d;a.F&&(c=a.F,d=a.O);Xd(a,b,a.N,a.v,c,d)}function Oe(a,b){b(a,a.v,a.N,l);a.F&&b(a,a.O,a.F,n)}function Re(a,b,c,d){Y(a,de,b);$d(a,be,b,0,c,d);Y(a,ae,b);$d(a,Ae,b,0,c,d);Y(a,ye,b)&&me(a)}function Se(a,b,c,d){$d(a,Ce,b,0,c,d);Y(a,ge,b);he(a,b);$d(a,Be,b,-1,c,d);Y(a,ue,b)}function Pe(a,b,c,d){$d(a,ee,b,-1,c,d);Y(a,de,b)};function Te(a,b){this.x=a;this.y=b}w(Te,E);Te.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Te.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Ue(a,b){a.x-=b.x;a.y-=b.y;return a}Te.prototype.rotate=function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.y*b+this.x*a;this.x=this.x*b-this.y*a;this.y=c;return this};function Ve(a,b){return new Te(a.x+b.x,a.y+b.y)}function We(a,b){return new Te(a.x-b.x,a.y-b.y)};function Xe(a,b,c,d){0==b&&h(new y(13,"Cannot rotate by an angle of zero."));var e=Math.PI*(b/180)/2;Ye(a,function(a){a.scale(0.5)},function(a){a.rotate(e)},c,d)} -function Ye(a,b,c,d,e){Fd(a,l)||h(new y(11,"Element is not currently visible and may not be manipulated"));var f=F(a),f=C?f.body:f.documentElement,g;g=xd(a);var p=xd(f),u;if(A){var s=Dd(f,"borderLeft");u=Dd(f,"borderRight");var U=Dd(f,"borderTop"),L=Dd(f,"borderBottom");u=new rd(U,u,L,s)}else s=sd(f,"borderLeftWidth"),u=sd(f,"borderRightWidth"),U=sd(f,"borderTopWidth"),L=sd(f,"borderBottomWidth"),u=new rd(parseFloat(U),parseFloat(u),parseFloat(L),parseFloat(s));s=g.x-p.x-u.left;g=g.y-p.y-u.top;p= -f.clientHeight-a.offsetHeight;u=f.scrollLeft;U=f.scrollTop;u+=Math.min(s,Math.max(s-(f.clientWidth-a.offsetWidth),0));U+=Math.min(g,Math.max(g-p,0));g=new E(u,U);f.scrollLeft=g.x;f.scrollTop=g.y;d?d=new Te(d.x,d.y):(d=Ze(a),d=new Te(d.width/2,d.height/2));f=Ze(a);f=new Te(Math.min(d.x,f.width-d.x),Math.min(d.y,f.height-d.y));e=e||new Ne;b(f);e.move(a,Ve(d,f),We(d,f));e.l()&&h(new y(13,"Cannot press touchscreen when already pressed."));e.X=n;e.N=e.na++;e.F=e.na++;pd?Oe(e,Re):Qe(e,Yd);b=yd(a);c(f); -e.move(a,Ve(d,f),We(d,f));b=We(yd(a),b);c(f);c=Ue(Ve(d,f),b);b=Ue(We(d,f),b);e.move(a,c,b);e.l()||h(new y(13,"Cannot release touchscreen when not already pressed."));pd?Oe(e,Se):(Qe(e,ze),e.X||(Y(e,de,e.v),Y(e,ye,e.v)&&me(e),Y(e,ge,e.v),he(e,e.v)));e.N=0;e.F=0}function Ze(a){var b=Ad(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ze(a.offsetParent)};function $e(){this.S=k} -function af(a,b,c){switch(typeof b){case "string":bf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],af(a,a.S?a.S.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),bf(f, -c),c.push(":"),af(a,a.S?a.S.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var cf={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},df=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function bf(a,b){b.push('"',a.replace(df,function(a){if(a in cf)return cf[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return cf[a]=e+b.toString(16)}),'"')};C||z||B&&V(3.5)||A&&V(8);function ef(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,ef);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=ff(a);return b}if("document"in a)return b={},b.WINDOW=ff(a),b;if(da(a))return ma(a,ef);a=db(a,function(a,b){return"number"==typeof b||v(b)});return eb(a,ef);default:return m}} -function gf(a,b){return"array"==ca(a)?ma(a,function(a){return gf(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?hf(a.ELEMENT,b):"WINDOW"in a?hf(a.WINDOW,b):eb(a,function(a){return gf(a,b)}):a}function jf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.$=ga());b.$||(b.$=ga());return b}function ff(a){var b=jf(a.ownerDocument),c=fb(b,function(b){return b==a});c||(c=":wdc:"+b.$++,b[c]=a);return c} -function hf(a,b){a=decodeURIComponent(a);var c=b||document,d=jf(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function kf(a,b,c){a=[a,b,c];b=Xe;var d;try{b=v(b)?new ha.Function(b):ha==window?b:new ha.Function("return ("+b+").apply(null,arguments);");var e=gf(a,ha.document),f=b.apply(m,e);d={status:0,value:ef(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}e=[];af(new $e,d,e);return e.join("")}var lf=["_"],mf=r;!(lf[0]in mf)&&mf.execScript&&mf.execScript("var "+lf[0]);for(var nf;lf.length&&(nf=lf.shift());)!lf.length&&t(kf)?mf[nf]=kf:mf=mf[nf]?mf[nf]:mf[nf]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function x(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}t(x,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return p.navigator?p.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=p.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var z=Ha,A=Ia,B=Ka,Qa=Ja,Ra,Sa=p.navigator;Ra=Sa&&Sa.platform||"";La=-1!=Ra.indexOf("Mac");Ma=-1!=Ra.indexOf("Win");var Ta=-1!=Ra.indexOf("Linux");function Ua(){var a=p.document;return a?a.documentMode:void 0}var Va; +a:{var Wa="",$a;if(z&&p.opera)var ab=p.opera.version,Wa="function"==typeof ab?ab():ab;else if(B?$a=/rv\:([^\);]+)(\)|;)/:A?$a=/MSIE\s+([^\);]+)(\)|;)/:Qa&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Na()),Wa=bb?bb[1]:"";if(A){var cb=Ua();if(cb>parseFloat(Wa)){Va=String(cb);break a}}Va=Wa}var db={};function eb(a){return db[a]||(db[a]=0<=na(Va,a))}function C(a){return A&&fb>=a}var gb=p.document,fb=gb&&A?Ua()||("CSS1Compat"==gb.compatMode?parseInt(Va,10):5):void 0;var hb;!B&&!A||A&&C(9)||B&&eb("1.9.1");A&&eb("9");function ib(a,b){this.x=q(a)?a:0;this.y=q(b)?b:0}m=ib.prototype;m.toString=function(){return"("+this.x+", "+this.y+")"};m.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};m.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};m.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function jb(a,b){this.width=a;this.height=b}m=jb.prototype;m.toString=function(){return"("+this.width+" x "+this.height+")"};m.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function kb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function lb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function mb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var nb=3;function ob(a){a=a.document;a=pb(a)?a.documentElement:a.body;return new jb(a.clientWidth,a.clientHeight)}function D(a){return a?a.parentWindow||a.defaultView:window}function pb(a){return"CSS1Compat"==a.compatMode}function qb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function rb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!C(9)){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=E(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function ub(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return tb(d,a)}function tb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function E(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var vb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},wb={IMG:" ",BR:"\n"}; +function xb(a,b,c){if(!(a.nodeName in vb))if(a.nodeType==nb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in wb)b.push(wb[a.nodeName]);else for(a=a.firstChild;a;)xb(a,b,c),a=a.nextSibling}function yb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function zb(a){this.F=a||p.document||document}zb.prototype.I=function(a){return s(a)?this.F.getElementById(a):a}; +function Ab(a){return!Qa&&pb(a.F)?a.F.documentElement:a.F.body||a.F.documentElement}zb.prototype.contains=rb;var Bb,Cb,Db,Eb,Fb,Gb,Hb;Hb=Gb=Fb=Eb=Db=Cb=Bb=!1;var Ib=Na();Ib&&(-1!=Ib.indexOf("Firefox")?Bb=!0:-1!=Ib.indexOf("Camino")?Cb=!0:-1!=Ib.indexOf("iPhone")||-1!=Ib.indexOf("iPod")?Db=!0:-1!=Ib.indexOf("iPad")?Eb=!0:-1!=Ib.indexOf("Android")?Fb=!0:-1!=Ib.indexOf("Chrome")?Gb=!0:-1!=Ib.indexOf("Safari")&&(Hb=!0));var Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb,Pb=Hb;function Qb(a,b,c){this.g=a;this.Ja=b||1;this.r=c||1};var Rb=A&&!C(9),Sb=A&&!C(8);function Tb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Ub(a,b,c){var d=Sb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Tb(b,a,b.nodeName,d,c)};function Vb(a){this.ja=a;this.W=0}function Wb(a){a=a.match(Xb);for(var b=0;b<a.length;b++)Yb.test(a[b])&&a.splice(b,1);return new Vb(a)}var Xb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Yb=/^\s/;function F(a,b){return a.ja[a.W+(b||0)]}Vb.prototype.next=function(){return this.ja[this.W++]};Vb.prototype.back=function(){this.W--};Vb.prototype.empty=function(){return this.ja.length<=this.W};function G(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(Rb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Rb&&"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} +function Zb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Sb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function $b(a,b,c,d,e){return(Rb?ac:bc).call(null,a,b,s(c)?c:null,s(d)?d:null,e||new H)} +function ac(a,b,c,d,e){if(a instanceof cc||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=dc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Zb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}ec(a,b,c,d,e);return e} +function bc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof I?ec(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Zb(a,c,d)&&e.add(a)}));return e} +function fc(a,b,c,d,e){var f;if((a instanceof cc||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=dc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Zb(a,c,d)}));v(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return gc(a,b,c,d,e)}function gc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b),ec(a,b,c,d,e)}function dc(a){if(a instanceof I){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function H(){this.r=this.k=null;this.Q=0}function hc(a){this.u=a;this.next=this.G=null}function ic(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.u==d.u||c.u instanceof Tb&&d.u instanceof Tb&&c.u.g==d.u.g?(f=c,c=c.next,d=d.next):0<sb(c.u,d.u)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.Q=g;return a} +H.prototype.unshift=function(a){a=new hc(a);a.next=this.k;this.r?this.k.G=a:this.k=this.r=a;this.k=a;this.Q++};H.prototype.add=function(a){a=new hc(a);a.G=this.r;this.k?this.r.next=a:this.k=this.r=a;this.r=a;this.Q++};function jc(a){return(a=a.k)?a.u:null}H.prototype.t=h("Q");function kc(a){return(a=jc(a))?G(a):""}function lc(a,b){return new mc(a,!!b)}function mc(a,b){this.Fa=a;this.ka=(this.J=b)?a.r:a.k;this.ea=null} +mc.prototype.next=function(){var a=this.ka;if(null==a)return null;var b=this.ea=a;this.ka=this.J?a.G:a.next;return b.u};mc.prototype.remove=function(){var a=this.Fa,b=this.ea;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.k=b;b?b.G=c:a.r=c;a.Q--;this.ea=null};function K(a){this.j=a;this.m=this.w=!1;this.R=null}function L(a){return"\n "+a.toString().split("\n").join("\n ")}K.prototype.h=h("w");function nc(a,b){a.w=b}function oc(a,b){a.m=b}K.prototype.B=h("R");function M(a,b){var c=a.evaluate(b);return c instanceof H?+kc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof H?kc(c):""+c}function pc(a,b){var c=a.evaluate(b);return c instanceof H?!!c.t():!!c};function qc(a,b,c){K.call(this,a.j);this.ia=a;this.oa=b;this.ta=c;this.w=b.h()||c.h();this.m=b.m||c.m;this.ia==rc&&(c.m||c.h()||4==c.j||0==c.j||!b.B()?b.m||(b.h()||4==b.j||0==b.j||!c.B())||(this.R={name:c.B().name,L:b}):this.R={name:b.B().name,L:c})}t(qc,K); +function sc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof H&&c instanceof H){e=lc(b);for(d=e.next();d;d=e.next())for(b=lc(c),f=b.next();f;f=b.next())if(a(G(d),G(f)))return!0;return!1}if(b instanceof H||c instanceof H){b instanceof H?e=b:(e=c,c=b);e=lc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}qc.prototype.evaluate=function(a){return this.ia.s(this.oa,this.ta,a)};qc.prototype.toString=function(){var a="Binary Expression: "+this.ia,a=a+L(this.oa);return a+=L(this.ta)};function tc(a,b,c,d){this.Ia=a;this.ra=b;this.j=c;this.s=d}tc.prototype.toString=h("Ia");var uc={}; +function O(a,b,c,d){if(uc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new tc(a,b,c,d);return uc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return sc(function(a,b){return a<b},a,b,c)}); +O(">",4,2,function(a,b,c){return sc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return sc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return sc(function(a,b){return a>=b},a,b,c)});var rc=O("=",3,2,function(a,b,c){return sc(function(a,b){return a==b},a,b,c,!0)});O("!=",3,2,function(a,b,c){return sc(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return pc(a,c)&&pc(b,c)});O("or",1,2,function(a,b,c){return pc(a,c)||pc(b,c)});function vc(a,b){if(b.t()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");K.call(this,a.j);this.sa=a;this.f=b;this.w=a.h();this.m=a.m}t(vc,K);vc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return wc(this.f,a)};vc.prototype.toString=function(){var a;a="Filter:"+L(this.sa);return a+=L(this.f)};function xc(a,b){if(b.length<a.qa)throw Error("Function "+a.p+" expects at least"+a.qa+" arguments, "+b.length+" given");if(null!==a.fa&&b.length>a.fa)throw Error("Function "+a.p+" expects at most "+a.fa+" arguments, "+b.length+" given");a.Ga&&v(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b);});K.call(this,a.j);this.V=a;this.$=b;nc(this,a.w||ta(b,function(a){return a.h()}));oc(this,a.Ea&&!b.length||a.Da&&!!b.length||ta(b,function(a){return a.m}))} +t(xc,K);xc.prototype.evaluate=function(a){return this.V.s.apply(null,xa(a,this.$))};xc.prototype.toString=function(){var a="Function: "+this.V;if(this.$.length)var b=sa(this.$,function(a,b){return a+L(b)},"Arguments:"),a=a+L(b);return a};function yc(a,b,c,d,e,f,g,k,r){this.p=a;this.j=b;this.w=c;this.Ea=d;this.Da=e;this.s=f;this.qa=g;this.fa=q(k)?k:g;this.Ga=!!r}yc.prototype.toString=h("p");var zc={}; +function P(a,b,c,d,e,f,g,k){if(zc.hasOwnProperty(a))throw Error("Function already created: "+a+".");zc[a]=new yc(a,b,c,d,!1,e,f,g,k)}P("boolean",2,!1,!1,function(a,b){return pc(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+N(c,a)},"")},2,null);P("contains",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2); +P("count",1,!1,!1,function(a,b){return b.evaluate(a).t()},1,1,!0);P("false",2,!1,!1,aa(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(M(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(Rb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(sb);var g=new H;v(f,function(a){g.add(a)});return g},1);P("lang",2,!1,!1,aa(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);P("local-name",3,!1,!0,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,aa(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!pc(b,a)},1);P("number",1,!1,!0,function(a,b){return b?M(b,a):+G(a.g)},0,1);P("position",1,!0,!1,function(a){return a.Ja},0);P("round",1,!1,!1,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?N(b,a):G(a.g)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){for(var c=lc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,!1,!1,aa(!0),0);function I(a,b){this.wa=a;this.pa=q(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=nb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Ac(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}I.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};I.prototype.getName=h("wa"); +I.prototype.toString=function(){var a="Kind Test: "+this.wa;null===this.pa||(a+=L(this.pa));return a};function Bc(a){K.call(this,3);this.ua=a.substring(1,a.length-1)}t(Bc,K);Bc.prototype.evaluate=h("ua");Bc.prototype.toString=function(){return"Literal: "+this.ua};function cc(a,b){this.p=a.toLowerCase();this.ga=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}cc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.p&&this.p!=a.nodeName.toLowerCase()?!1:this.ga==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};cc.prototype.getName=h("p");cc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.ga?"":this.ga+":")+this.p};function Cc(a){K.call(this,1);this.xa=a}t(Cc,K);Cc.prototype.evaluate=h("xa");Cc.prototype.toString=function(){return"Number: "+this.xa};function Dc(a,b){K.call(this,a.j);this.ma=a;this.S=b;this.w=a.h();this.m=a.m;if(1==this.S.length){var c=this.S[0];c.ba||c.A!=Ec||(c=c.Z,"*"!=c.getName()&&(this.R={name:c.getName(),L:null}))}}t(Dc,K);function Fc(){K.call(this,4)}t(Fc,K);Fc.prototype.evaluate=function(a){var b=new H;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Fc.prototype.toString=aa("Root Helper Expression");function Gc(){K.call(this,4)}t(Gc,K);Gc.prototype.evaluate=function(a){var b=new H;b.add(a.g);return b}; +Gc.prototype.toString=aa("Context Helper Expression"); +Dc.prototype.evaluate=function(a){var b=this.ma.evaluate(a);if(!(b instanceof H))throw Error("Filter expression must evaluate to nodeset.");a=this.S;for(var c=0,d=a.length;c<d&&b.t();c++){var e=a[c],f=lc(b,e.A.J),g;if(e.h()||e.A!=Hc)if(e.h()||e.A!=Ic)for(g=f.next(),b=e.evaluate(new Qb(g));null!=(g=f.next());)g=e.evaluate(new Qb(g)),b=ic(b,g);else g=f.next(),b=e.evaluate(new Qb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Qb(g))}}return b}; +Dc.prototype.toString=function(){var a;a="Path Expression:"+L(this.ma);if(this.S.length){var b=sa(this.S,function(a,b){return a+L(b)},"Steps:");a+=L(b)}return a};function Jc(a,b){this.f=a;this.J=!!b}function wc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=lc(b),f=b.t(),g,k=0;g=e.next();k++){var r=a.J?f-k:k+1;g=d.evaluate(new Qb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof H)r=0<g.t();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Jc.prototype.B=function(){return 0<this.f.length?this.f[0].B():null}; +Jc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Jc.prototype.t=function(){return this.f.length};Jc.prototype.toString=function(){return sa(this.f,function(a,b){return a+L(b)},"Predicates:")};function Kc(a,b,c,d){K.call(this,4);this.A=a;this.Z=b;this.f=c||new Jc([]);this.ba=!!d;b=this.f.B();a.Na&&b&&(a=b.name,a=Rb?a.toLowerCase():a,this.R={name:a,L:b.L});this.w=this.f.h()}t(Kc,K); +Kc.prototype.evaluate=function(a){var b=a.g,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.L?N(c.L,a):null,f=1);if(this.ba)if(this.h()||this.A!=Lc)if(a=lc((new Kc(Mc,new I("node"))).evaluate(a)),b=a.next())for(c=this.s(b,d,e,f);null!=(b=a.next());)c=ic(c,this.s(b,d,e,f));else c=new H;else c=$b(this.Z,b,d,e),c=wc(this.f,c,f);else c=this.s(a.g,d,e,f);return c};Kc.prototype.s=function(a,b,c,d){a=this.A.V(this.Z,a,b,c);return a=wc(this.f,a,d)}; +Kc.prototype.toString=function(){var a;a="Step:"+L("Operator: "+(this.ba?"//":"/"));this.A.p&&(a+=L("Axis: "+this.A));a+=L(this.Z);if(this.f.t()){var b=sa(this.f.f,function(a,b){return a+L(b)},"Predicates:");a+=L(b)}return a};function Nc(a,b,c,d){this.p=a;this.V=b;this.J=c;this.Na=d}Nc.prototype.toString=h("p");var Oc={};function Q(a,b,c,d){if(Oc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Nc(a,b,c,!!d);return Oc[a]=b} +Q("ancestor",function(a,b){for(var c=new H,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new H,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Ec=Q("attribute",function(a,b){var c=new H,d=a.getName();if("style"==d&&b.style&&Rb)return c.add(new Tb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof I&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Rb?g.nodeValue&&c.add(Ub(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Rb?g.nodeValue&&c.add(Ub(b,g,b.sourceIndex)):c.add(g));return c},!1),Lc=Q("child",function(a,b,c,d,e){return(Rb?fc:gc).call(null,a,b,s(c)?c:null,s(d)?d:null,e||new H)}, +!1,!0);Q("descendant",$b,!1,!0);var Mc=Q("descendant-or-self",function(a,b,c,d){var e=new H;Zb(b,c,d)&&a.matches(b)&&e.add(b);return $b(a,b,c,d,e)},!1,!0),Hc=Q("following",function(a,b,c,d){var e=new H;do for(var f=b;f=f.nextSibling;)Zb(f,c,d)&&a.matches(f)&&e.add(f),e=$b(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new H,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new H},!1); +var Pc=Q("parent",function(a,b){var c=new H;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Ic=Q("preceding",function(a,b,c,d){var e=new H,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var u=0,w=r.length;u<w;u++)b=r[u],Zb(b,c,d)&&a.matches(b)&&e.add(b),e=$b(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new H,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Qc=Q("self",function(a,b){var c=new H;a.matches(b)&&c.add(b);return c},!1);function Rc(a){K.call(this,1);this.la=a;this.w=a.h();this.m=a.m}t(Rc,K);Rc.prototype.evaluate=function(a){return-M(this.la,a)};Rc.prototype.toString=function(){return"Unary Expression: -"+L(this.la)};function Sc(a){K.call(this,4);this.X=a;nc(this,ta(this.X,function(a){return a.h()}));oc(this,ta(this.X,function(a){return a.m}))}t(Sc,K);Sc.prototype.evaluate=function(a){var b=new H;v(this.X,function(c){c=c.evaluate(a);if(!(c instanceof H))throw Error("Path expression must evaluate to NodeSet.");b=ic(b,c)});return b};Sc.prototype.toString=function(){return sa(this.X,function(a,b){return a+L(b)},"Union Expression:")};function Tc(a,b){this.a=a;this.Ha=b}function Uc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Vc(a);var d=a.a.next();if(!d)break;var e=(d=uc[d]||null)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new qc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new qc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Wc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Xc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Yc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Bc(a)}function Zc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new cc(b);var d=b.substring(0,c);a=a.Ha(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new cc(b,a)} +function $c(a){var b,c=[],d;if("/"==F(a.a)||"//"==F(a.a)){b=a.a.next();d=F(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Fc;d=new Fc;R(a,"Missing next location step.");b=ad(a,b);c.push(b)}else{a:{b=F(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Uc(a);R(a,'unclosed "("');Wc(a,")");break;case '"':case "'":b=Yc(a);break;default:if(isNaN(+b))if(!Ac(b)&&/(?![0-9])[\w]/.test(d)&& +"("==F(a.a,1)){b=a.a.next();b=zc[b]||null;a.a.next();for(d=[];")"!=F(a.a);){R(a,"Missing function argument list.");d.push(Uc(a));if(","!=F(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Xc(a);b=new xc(b,d)}else{b=null;break a}else b=new Cc(+a.a.next())}"["==F(a.a)&&(d=new Jc(bd(a)),b=new vc(b,d))}if(b)if("/"==F(a.a)||"//"==F(a.a))d=b;else return b;else b=ad(a,"/"),d=new Gc,c.push(b)}for(;"/"==F(a.a)||"//"==F(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=ad(a,b),c.push(b); +return new Dc(d,c)} +function ad(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==F(a.a))return d=new Kc(Qc,new I("node")),a.a.next(),d;if(".."==F(a.a))return d=new Kc(Pc,new I("node")),a.a.next(),d;var f;if("@"==F(a.a))f=Ec,a.a.next(),R(a,"Missing attribute name");else if("::"==F(a.a,1)){if(!/(?![0-9])[\w]/.test(F(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Oc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=Lc; +c=F(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==F(a.a,1)){if(!Ac(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!Ac(c))throw Error("Invalid type name: "+c);Wc(a,"(");R(a,"Bad nodetype");e=F(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Yc(a);R(a,"Bad nodetype");Xc(a);c=new I(c,g)}else c=Zc(a);else if("*"==c)c=Zc(a);else throw Error("Bad token: "+a.a.next());e=new Jc(bd(a),f.J);return d||new Kc(f,c,e,"//"==b)} +function bd(a){for(var b=[];"["==F(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Uc(a);b.push(c);R(a,"Unclosed predicate expression.");Wc(a,"]")}return b}function Vc(a){if("-"==F(a.a))return a.a.next(),new Rc(Vc(a));var b=$c(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push($c(a));a.a.back();a=new Sc(b)}return a};function cd(a){switch(a.nodeType){case 1:return ka(dd,a);case 9:return cd(a.documentElement);case 2:return a.ownerElement?cd(a.ownerElement):ed;case 11:case 10:case 6:case 12:return ed;default:return a.parentNode?cd(a.parentNode):ed}}function ed(){return null}function dd(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?dd(a.parentNode,b):null};function fd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Wb(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=aa(null);var d=Uc(new Tc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Qb(a));return new S(c,b)}} +function S(a,b){if(0==b)if(a instanceof H)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 H))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof H?kc(a):""+a;break;case 1:this.numberValue=a instanceof H?+kc(a):+a;break;case 3:this.booleanValue=a instanceof H?0<a.t():!!a;break;case 4:case 5:case 6:case 7:var d= +lc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Tb?e.g:e);this.snapshotLength=a.t();this.invalidIteratorState=!1;break;case 8:case 9:d=jc(a);this.singleNodeValue=d instanceof Tb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function gd(a){this.lookupNamespaceURI=cd(a)} +function hd(a){a=a||p;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new fd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new fd(a,b)},b.createNSResolver=function(a){return new gd(a)})};var T={};T.za=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.s=function(a,b,c){var d=E(a);(A||Nb)&&hd(D(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.za;return A&&!eb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!B||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +T.aa=function(a,b){if(!a||1!=a.nodeType)throw new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.Ma=function(a,b){var c=function(){var c=T.s(b,a,9);return c?(c=c.singleNodeValue,z?c:c||null):b.selectSingleNode?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.aa(c,a);return c}; +T.Qa=function(a,b){var c=function(){var c=T.s(b,a,7);if(c){var e=c.snapshotLength;z&&!q(e)&&T.aa(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){T.aa(b,a)});return c};function id(a){return(a=a.exec(Na()))?a[1]:""}var jd=function(){if(Jb)return id(/Firefox\/([0-9.]+)/);if(A||z)return Va;if(Ob)return id(/Chrome\/([0-9.]+)/);if(Pb)return id(/Version\/([0-9.]+)/);if(Lb||Mb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Nb)return(a=id(/Android\s+([0-9.]+)/))?a:id(/Version\/([0-9.]+)/);if(Kb)return id(/Camino\/([0-9.]+)/)}return""}();var kd,ld;function U(a){return md?kd(a):A?0<=na(fb,a):eb(a)}function nd(a){return md?ld(a):Nb?0<=na(od,a):0<=na(jd,a)} +var md=function(){if(!B)return!1;var a=p.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;kd=function(a){return 0<=d.Ba(e,""+a)};ld=function(a){return 0<=d.Ba(f,""+a)};return!0}(),pd=Mb||Lb,qd;if(Nb){var rd=/Android\s+([0-9\.]+)/.exec(Na());qd=rd?rd[1]:"0"}else qd="0"; +var od=qd,sd=A&&!C(8),td=A&&!C(9),ud=C(10),vd=A&&!C(10);Nb&&nd(2.3);Nb&&nd(4);Pb&&nd(6);var wd=A&&-1!=Na().indexOf("IEMobile");function xd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}m=xd.prototype;m.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};m.contains=function(a){return this&&a?a instanceof xd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +m.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};m.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};m.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}m=V.prototype;m.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};m.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +m.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function yd(a,b){var c=E(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function zd(a){a=a?E(a):document;var b;(b=!A)||(b=C(9))||(b=a?new zb(E(a)):hb||(hb=new zb),b=pb(b.F));return b?a.documentElement:a.body} +function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=Qa&&!b&&!c;if((!q(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}A&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new jb(e.right-e.left,e.bottom-e.top)}return new jb(b,c)}var Bd={thin:2,medium:4,thick:6}; +function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Dd(a){var b;a:{a=E(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return A&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,!0)&&Gd(a)&&!(A||z||B&&!U("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?!0:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Id(a){if(!Hd(a))throw new x(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Jd(a,b)}function Jd(a,b){var c;if(c=sd)if(c="value"==b)if(c=W(a,"OPTION"))c=null===Kd(a);c?(c=[],xb(a,c,!1),c=c.join("")):c=a[b];return c}var Ld=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Md(a){var b=[];v(a.split(Ld),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Kd(a){var b;b="value";return"style"==b?Md(a.style.cssText):sd&&"value"==b&&W(a,"INPUT")?a.value:td&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Nd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Gd(a){var b=a.tagName.toUpperCase();return wa(Nd,b)?Jd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):!yb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Jd(b,"disabled")){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:qb(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=td?"styleFloat":"cssFloat";var d=yd(a,c)||Pd(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!q(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?q(d)?d:null:(c=Od(a))?Pd(c,b):null} +function Fd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==nb||W(a)&&d(a)})}function e(a){return Rd(a)==Sd&&ua(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +yb(a,function(a){return W(a,"SELECT")});return!!f&&Fd(f,!0)}return(f=Td(a))?!!f.na&&0<f.rect.width&&0<f.rect.height&&Fd(f.na,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Ud(a)||!d(a)?!1:!e(a)}var Sd="hidden"; +function Rd(a,b){function c(a){var b=X(a,"position");if("fixed"==b)return w=!0,a==k?null:k;for(a=Od(a);a&&a!=k&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=Od(a);return a}function d(a){var b=a;if("visible"==u)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new zb(g)).F;a=!Qa&&pb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=A&&eb("10")&&b.pageYOffset!=a.scrollTop?new ib(a.scrollLeft,a.scrollTop):new ib(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new ib(a.scrollLeft,a.scrollTop);return a}for(var f=Vd(a,b),g=E(a),k=g.documentElement,r=g.body,u=X(k,"overflow"),w,n=c(a);n;n=c(n)){var l=d(n);if("visible"!=l.x||"visible"!=l.y){var y=Qd(n);if(0==y.width||0==y.height)return Sd;var J=f.right<y.left,ba=f.bottom<y.top;if(J&&"hidden"==l.x||ba&&"hidden"== +l.y)return Sd;if(J&&"visible"!=l.x||ba&&"visible"!=l.y){J=e(n);ba=f.bottom<y.top-J.y;if(f.right<y.left-J.x&&"visible"!=l.x||ba&&"visible"!=l.x)return Sd;f=Rd(n);return f==Sd?Sd:"scroll"}J=f.left>=y.left+y.width;y=f.top>=y.top+y.height;if(J&&"hidden"==l.x||y&&"hidden"==l.y)return Sd;if(J&&"visible"!=l.x||y&&"visible"!=l.y){if(w&&(l=e(n),f.left>=k.scrollWidth-l.x||f.right>=k.scrollHeight-l.y))return Sd;f=Rd(n);return f==Sd?Sd:"scroll"}}}return"none"}var Wd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Qd(a){function b(a){var c=D(E(a)).getComputedStyle(a,null).MozTransform.match(Wd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),w=parseFloat(c[3]),n=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),y=f.left+f.width,J=f.top+f.height,ba=f.left*d,d=y*d,Xa=f.left*e,e=y*e,Ya=f.top*w,w=J*w,Za=f.top*n,y=J*n,J=ba+Ya+l,n=Xa+Za+c,Ya=d+Ya+l,Za=e+Za+c,ba=ba+w+l,Xa=Xa+y+c,l=d+w+l,c=e+y+c;f.left=Math.min(J,Ya,ba,l);f.top=Math.min(n,Za,Xa,c);l=Math.max(J,Ya,ba,l);c=Math.max(n,Za,Xa,c);f.width=l- +f.left;f.height=c-f.top}(a=Od(a))&&b(a)}var c=Td(a);if(c)return c.rect;if(W(a,"HTML"))return c=E(a),a=ob(D(c)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);A&&a.ownerDocument.body&&(c=E(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);z&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));B&&!U(12)&&b(a);return f} +function Td(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.Ma('/descendant::*[@usemap = "#'+c.name+'"]',E(c)))&&(e=Qd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Xd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{na:d,rect:e||new V(0,0,0,0)}} +function Xd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)} +function Vd(a,b){var c;c=Qd(a);c=new xd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof V?b:new V(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Ud(a){if(vd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Yd(a)}function Yd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Yd(a));return b};function Zd(a,b){this.d=ma.document.documentElement;this.n=null;var c=Dd(this.d);c&&$d(this,c);this.D=a||new ae;this.ca=b||new be}Zd.prototype.I=h("d");function $d(a,b){a.d=b;a.n=W(b,"OPTION")?yb(b,function(a){return W(a,"SELECT")}):null} +Zd.prototype.o=function(a,b,c,d,e,f,g){if(!f&&!Ed(this.d))return!1;if(d&&ce!=a&&de!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=ee&&a!=fe&&g in ge?c=ge[g]:this.n&&(c=he(this,a));return c?this.ca.o(c,a,b):!0}; +Zd.prototype.da=function(a,b,c,d,e){function f(b,c){var d={identifier:b,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};g.changedTouches.push(d);if(a==ie||a==je)g.touches.push(d),g.targetTouches.push(d)}var g={touches:[],targetTouches:[],changedTouches:[],altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),relatedTarget:null,scale:0,rotation:0};f(b,c);q(d)&&f(d,e);return this.ca.da(this.d,a,g)}; +Zd.prototype.q=function(a,b,c,d,e,f,g,k){if(!k&&!Ed(this.d))return!1;if(g&&ke!=a&&le!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,La:0,rotation:0,pointerId:d,Oa:0,Pa:0,pointerType:e,Ca:f};c=this.n?he(this,a):this.d;ge[d]&&(c=ge[d]);d=D(E(this.d));var r;d&&a==me&&(r=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){ge[a]= +this});a=c?this.ca.q(c,a,b):!0;r&&(d.Element.prototype.msSetPointerCapture=r);return a};function he(a,b){if(A)switch(b){case ce:case ke:return null;case ne:case oe:case pe:return a.n.multiple?a.n:null;default:return a.n}if(z)switch(b){case ne:case ce:return a.n.multiple?a.d:null;default:return a.d}if(Qa)switch(b){case ee:case qe:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:null}return a.d} +function re(a,b,c){if(Ed(a.d)){var d=null,e=null;if(!se)for(var f=a.d;f;f=f.parentNode)if(W(f,"A")){d=f;break}else{var g;a:{if(W(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=!0;break a}if(W(f,"BUTTON")&&(g=f.type.toLowerCase(),"submit"==g)){g=!0;break a}g=!1}if(g){e=f;break}}g=(f=!a.n&&Hd(a.d))&&Id(a.d);A&&e?e.click():a.o(ee,b,0,null,0,!1,c)&&(d&&te(d)?(a=d,b=a.href,c=D(E(a)),A&&!U(8)&&(b=ue(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):!f||(B||Qa||g&&"radio"==a.d.type.toLowerCase())|| +(a.d.checked=!g,z&&!U(11)&&ve(a.d,we)))}}function xe(a){a=a.n||a.d;var b=Dd(a);if(a!=b){if(b&&(fa(b.blur)||A&&ga(b.blur))){if(!W(b,"BODY"))try{b.blur()}catch(c){if(!A||"Unspecified error."!=c.message)throw c;}A&&!U(8)&&D(E(a)).focus()}if(fa(a.focus)||A&&ga(a.focus))z&&U(11)&&!Fd(a)?ve(a,ye):a.focus()}}var se=Qa||z||md&&nd(3.6); +function te(a){if(se||!a.href)return!1;if(!md)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=D(E(a)),c=b.location.href;a=ue(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function ze(a){if(a.n&&Ed(a.d)){var b=a.n,c=Id(a.d);if(!c||b.multiple)a.d.selected=!c,(!Qa||!b.multiple||Ob&&nd(28)||Nb&&nd(4))&&ve(b,we)}}var Ae=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function ue(a,b){var c=b.match(Ae);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function ae(){this.Ka=0}ae.prototype.l=function(a){return 0!=(this.Ka&a)};var ge={};function be(){}be.prototype.o=function(a,b,c){return ve(a,b,c)};be.prototype.da=function(a,b,c){return ve(a,b,c)}; +be.prototype.q=function(a,b,c){return ve(a,b,c)};var Be=!(A&&!U(10))&&!z,Ce=Nb?!nd(4):!pd,De=A&&ma.navigator.msPointerEnabled;function Ee(a,b,c){this.e=a;this.M=b;this.N=c}Ee.prototype.create=function(a){a=E(a);td?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.M,this.N));return a};Ee.prototype.toString=h("e");function Y(a,b,c){Ee.call(this,a,b,c)}t(Y,Ee); +Y.prototype.create=function(a,b){if(!B&&this==Fe)throw new x(9,"Browser does not support a mouse pixel scroll event.");var c=E(a),d;if(td){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==de||this==ce)if(Object.defineProperty){var e=this==de;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==Ge&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=D(c);d=c.createEvent("MouseEvents");var f=1;this==Ge&&(B||(d.wheelDelta=b.wheelDelta),B||z)&&(f=b.wheelDelta/-40);B&&this==Fe&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.M,this.N,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=Ab(a?new zb(E(a)):hb||(hb=new zb)), +c=zd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function He(a,b,c){Ee.call(this,a,b,c)}t(He,Ee); +He.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!Be)throw new x(9,"Browser does not support firing touch events.");var e=E(a),f=D(e),g=Ce?d(b.changedTouches): +c(b.changedTouches),k=b.touches==b.changedTouches?g:Ce?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:Ce?d(b.targetTouches):c(b.targetTouches),u;Ce?(u=e.createEvent("MouseEvents"),u.initMouseEvent(this.e,this.M,this.N,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),u.touches=k,u.targetTouches=r,u.changedTouches=g,u.scale=b.scale,u.rotation=b.rotation):(u=e.createEvent("TouchEvent"),Nb?u.initTouchEvent(k,r,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, +b.altKey,b.shiftKey,b.metaKey):u.initTouchEvent(this.e,this.M,this.N,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),u.relatedTarget=b.relatedTarget);return u};function Ie(a,b,c){Ee.call(this,a,b,c)}t(Ie,Ee); +Ie.prototype.create=function(a,b){if(!De)throw new x(9,"Browser does not support MSPointer events.");var c=E(a),d=D(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.M,this.N,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.La,b.rotation,b.Oa,b.Pa,b.pointerId,b.pointerType,0,b.Ca);return c}; +var we=new Ee("change",!0,!1),ye=new Ee("focus",!1,!1),ee=new Y("click",!0,!0),ne=new Y("contextmenu",!0,!0),fe=new Y("mousedown",!0,!0),oe=new Y("mousemove",!0,!1),de=new Y("mouseout",!0,!0),ce=new Y("mouseover",!0,!0),qe=new Y("mouseup",!0,!0),Ge=new Y(B?"DOMMouseScroll":"mousewheel",!0,!0),Fe=new Y("MozMousePixelScroll",!0,!0),Je=new He("touchend",!0,!0),je=new He("touchmove",!0,!0),ie=new He("touchstart",!0,!0),Ke=new Ie("MSGotPointerCapture",!0,!1),Le=new Ie("MSLostPointerCapture",!0,!1),Me= +new Ie("MSPointerCancel",!0,!0),me=new Ie("MSPointerDown",!0,!0),pe=new Ie("MSPointerMove",!0,!0),ke=new Ie("MSPointerOver",!0,!0),le=new Ie("MSPointerOut",!0,!0),Ne=new Ie("MSPointerUp",!0,!0);function ve(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return td?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function Oe(a,b){this.C={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Oe)for(d=Pe(a),Qe(a),e=[],c=0;c<a.i.length;c++)e.push(a.C[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}m=Oe.prototype;m.O=0;m.ya=0;function Pe(a){Qe(a);return a.i.concat()} +m.remove=function(a){return Object.prototype.hasOwnProperty.call(this.C,a)?(delete this.C[a],this.O--,this.ya++,this.i.length>2*this.O&&Qe(this),!0):!1};function Qe(a){if(a.O!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.C,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.O!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +m.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.C,a)?this.C[a]:b};m.set=function(a,b){Object.prototype.hasOwnProperty.call(this.C,a)||(this.O++,this.i.push(a),this.ya++);this.C[a]=b};var Re={};function Z(a,b,c){ga(a)&&(a=B?a.b:z?a.opera:a.c);a=new Se(a,b,c);!b||b in Re&&!c||(Re[b]={key:a,shift:!1},c&&(Re[c]={key:a,shift:!0}));return a}function Se(a,b,c){this.code=a;this.Aa=b||null;this.Sa=c||this.Aa}Z(8);Z(9);Z(13);var Te=Z(16),Ue=Z(17),Ve=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var We=Z(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Ta?56:42},"*"); +Z({b:107,c:107,opera:Ta?61:43},"+");Z({b:109,c:109,opera:Ta?109:45},"-");Z({b:110,c:110,opera:Ta?190:78},".");Z({b:111,c:111,opera:Ta?191:47},"/");Z(Ta&&z?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Xe=new Oe; +Xe.set(1,Te);Xe.set(2,Ue);Xe.set(4,Ve);Xe.set(8,We);(function(a){var b=new Oe;v(Pe(a),function(c){b.set(a.get(c).code,c)});return b})(Xe);B&&U(12);function Ye(){Zd.call(this);this.v=new ib(0,0);this.U=new ib(0,0)}t(Ye,Zd);m=Ye.prototype;m.P=!1;m.T=!1;m.H=0;m.K=0;m.va=2; +m.move=function(a,b,c){var d=this.I();this.l()&&!ud||$d(this,a);var e=Qd(a);this.v.x=b.x+e.left;this.v.y=b.y+e.top;q(c)&&(this.U.x=c.x+e.left,this.U.y=c.y+e.top);this.l()&&(ud?this.T||(a!=d&&(this.P=!0),$e(a)?af(this,bf):(this.q(le,b,-1,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.o(de,b,0),this.q(Me,b,0,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.T=!0,ge={})):(this.P=!0,Ze(this,je)))};m.l=function(){return!!this.H}; +function Ze(a,b){if(!a.l())throw new x(13,"Should never fire event when touchscreen is not pressed.");var c,d;a.K&&(c=a.K,d=a.U);a.da(b,a.H,a.v,c,d)}function af(a,b){b(a,a.I(),a.v,a.H,!0);a.K&&$e(a.I())&&b(a,a.I(),a.U,a.K,!1)}function cf(a,b,c,d,e){a.o(oe,c,0);a.q(ke,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ce,c,0);a.q(me,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(fe,c,0)&&(Hd(b)&&a.q(Ke,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e),xe(a))} +function df(a,b,c,d,e){a.q(Ne,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(qe,c,0,null,0,!1,d);a.P||(ze(a),wd&&W(b,"OPTION")||re(a,a.v,d));Hd(b)&&a.q(Le,new ib(0,0),0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!1);a.q(le,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(de,c,0,null,0,!1,d)}function bf(a,b,c,d,e){a.q(pe,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(oe,c,0,null,0,!1,d)} +function $e(a){if(!ud)throw Error("hasMsTouchActionsEnable should only be called from IE 10");if("none"==X(a,"ms-touch-action"))return!0;a=Od(a);return!!a&&$e(a)};function $(a,b){this.x=a;this.y=b}t($,ib);$.prototype.scale=ib.prototype.scale;$.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ef(a,b){a.x-=b.x;a.y-=b.y;return a}$.prototype.rotate=function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.y*b+this.x*a;this.x=this.x*b-this.y*a;this.y=c;return this};function ff(a,b){return new $(a.x+b.x,a.y+b.y)}function gf(a,b){return new $(a.x-b.x,a.y-b.y)};function hf(a,b,c,d){if(0==b)throw new x(13,"Cannot rotate by an angle of zero.");var e=Math.PI*(b/180)/2;jf(a,function(a){a.scale(0.5)},function(a){a.rotate(e)},c,d)} +function jf(a,b,c,d,e){if(!Fd(a,!0))throw new x(11,"Element is not currently visible and may not be manipulated");b:{var f=d||void 0;if("scroll"==Rd(a,f)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Rd(a,f)))break b;for(var g=Vd(a,f),k=Od(a);k;k=Od(k)){var r=k,u=Qd(r),w;var n=r;if(A&&!C(9)){var l=Cd(n,"borderLeft");w=Cd(n,"borderRight");var y=Cd(n,"borderTop"),n=Cd(n,"borderBottom");w=new xd(y,w,n,l)}else l=yd(n,"borderLeftWidth"),w=yd(n,"borderRightWidth"),y=yd(n,"borderTopWidth"),n=yd(n,"borderBottomWidth"), +w=new xd(parseFloat(y),parseFloat(w),parseFloat(n),parseFloat(l));l=g.left-u.left-w.left;u=g.top-u.top-w.top;w=r.clientHeight+g.top-g.bottom;r.scrollLeft+=Math.min(l,Math.max(l-(r.clientWidth+g.left-g.right),0));r.scrollTop+=Math.min(u,Math.max(u-w,0))}Rd(a,f)}}d?d=new $(d.x,d.y):(d=kf(a),d=new $(d.width/2,d.height/2));f=kf(a);f=new $(Math.min(d.x,f.width-d.x),Math.min(d.y,f.height-d.y));e=e||new Ye;b(f);e.move(a,ff(d,f),gf(d,f));if(e.l())throw new x(13,"Cannot press touchscreen when already pressed."); +e.P=!1;e.H=e.va++;e.K=e.va++;ud?af(e,cf):Ze(e,ie);b=Qd(a);c(f);e.move(a,ff(d,f),gf(d,f));g=Qd(a);b=gf(new $(g.left,g.top),new $(b.left,b.top));c(f);c=ef(ff(d,f),b);b=ef(gf(d,f),b);e.move(a,c,b);if(!e.l())throw new x(13,"Cannot release touchscreen when not already pressed.");ud?e.T||af(e,df):(Ze(e,Je),e.P||(e.o(oe,e.v,0),e.o(fe,e.v,0)&&xe(e),ze(e),e.o(qe,e.v,0),wd&&W(e.I(),"OPTION")||re(e,e.v)));ge={};e.H=0;e.K=0;e.T=!1} +function kf(a){var b;if("none"!=(yd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=Ad(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=Ad(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:kf(a.offsetParent)};function lf(){this.Y=void 0} +function mf(a,b,c){switch(typeof b){case "string":nf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],mf(a,a.Y?a.Y.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +nf(f,c),c.push(":"),mf(a,a.Y?a.Y.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var of={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},pf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function nf(a,b){b.push('"',a.replace(pf,function(a){if(a in of)return of[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return of[a]=e+b.toString(16)}),'"')};Qa||z||B&&U(3.5)||A&&U(8);function qf(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,qf);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=rf(a);return b}if("document"in a)return b={},b.WINDOW=rf(a),b;if(da(a))return ra(a,qf);a=kb(a,function(a,b){return ea(b)||s(b)});return lb(a,qf);default:return null}} +function sf(a,b){return"array"==ca(a)?ra(a,function(a){return sf(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?tf(a.ELEMENT,b):"WINDOW"in a?tf(a.WINDOW,b):lb(a,function(a){return sf(a,b)}):a}function uf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ha=la());b.ha||(b.ha=la());return b}function rf(a){var b=uf(a.ownerDocument),c=mb(b,function(b){return b==a});c||(c=":wdc:"+b.ha++,b[c]=a);return c} +function tf(a,b){a=decodeURIComponent(a);var c=b||document,d=uf(c);if(!(a in d))throw new x(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new x(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new x(10,"Element is no longer attached to the DOM");};function vf(a,b,c){a=[a,b,c];b=hf;var d;try{b=s(b)?new ma.Function(b):ma==window?b:new ma.Function("return ("+b+").apply(null,arguments);");var e=sf(a,ma.document),f=b.apply(null,e);d={status:0,value:qf(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}e=[];mf(new lf,d,e);return e.join("")}var wf=["_"],xf=p;wf[0]in xf||!xf.execScript||xf.execScript("var "+wf[0]);for(var yf;wf.length&&(yf=wf.shift());)wf.length||void 0===vf?xf=xf[yf]?xf[yf]:xf[yf]={}:xf[yf]=vf;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/scroll_into_view.js b/src/ghostdriver/third_party/webdriver-atoms/scroll_into_view.js index b69bab032..6359b64e2 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/scroll_into_view.js +++ b/src/ghostdriver/third_party/webdriver-atoms/scroll_into_view.js @@ -1,66 +1,93 @@ -function(){return function(){function g(a){throw a;}var k=void 0,m=!0,n=null,q=!1;function aa(a){return function(){return a}}var r=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return a!==k}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ea(a){var b=typeof a;return"object"==b&&a!=n||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var fa=Date.now||function(){return+new Date};var ga=window;function ha(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var l=d[h]||"",s=e[h]||"",p=RegExp("(\\d*)(\\D*)","g"),t=RegExp("(\\d*)(\\D*)","g");do{var A=p.exec(l)||["","",""],C=t.exec(s)||["","",""];if(0==A[0].length&&0==C[0].length)break;c=((0==A[1].length?0:parseInt(A[1],10))<(0==C[1].length?0:parseInt(C[1],10))?-1:(0==A[1].length?0:parseInt(A[1],10))>(0==C[1].length? -0:parseInt(C[1],10))?1:0)||((0==A[2].length)<(0==C[2].length)?-1:(0==A[2].length)>(0==C[2].length)?1:0)||(A[2]<C[2]?-1:A[2]>C[2]?1:0)}while(0==c)}return c}function ia(){return"overflow".replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()})};var ja=Array.prototype;function v(a,b){for(var c=a.length,d=u(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ka(a,b){for(var c=a.length,d=[],e=0,f=u(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var l=f[h];b.call(k,l,h,a)&&(d[e++]=l)}return d}function la(a,b){for(var c=a.length,d=Array(c),e=u(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function ma(a,b){if(a.reduce)return a.reduce(b,"");var c="";v(a,function(d,e){c=b.call(k,c,d,e,a)});return c} -function na(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?n:u(a)?a.charAt(c):a[c]}function oa(a,b){var c;a:if(u(a))c=!u(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function pa(a,b,c){return 2>=arguments.length?ja.slice.call(a,b):ja.slice.call(a,b,c)};var qa={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", +function(){return function(){function h(a){return function(){return this[a]}}function l(a){return function(){return a}}var n=this; +function aa(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)} +function ea(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)}}function fa(a,b,c){fa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return fa.apply(null,arguments)} +function ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ha=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.wa=b.prototype;a.prototype=new c};var ia=window;function ja(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",q=e[g]||"",K=RegExp("(\\d*)(\\D*)","g"),G=RegExp("(\\d*)(\\D*)","g");do{var r=K.exec(k)||["","",""],m=G.exec(q)||["","",""];if(0==r[0].length&&0==m[0].length)break;c=((0==r[1].length?0:parseInt(r[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==r[1].length?0:parseInt(r[1],10))>(0==m[1].length? +0:parseInt(m[1],10))?1:0)||((0==r[2].length)<(0==m[2].length)?-1:(0==r[2].length)>(0==m[2].length)?1:0)||(r[2]<m[2]?-1:r[2]>m[2]?1:0)}while(0==c)}return c}function ka(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var la=Array.prototype;function t(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function ma(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function na(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function oa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function pa(a,b){for(var c=a.length,d=p(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 qa(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]} +function ra(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function sa(a){return la.concat.apply(la,arguments)}function ta(a,b,c){return 2>=arguments.length?la.slice.call(a,b):la.slice.call(a,b,c)};var ua={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ra="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),sa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function ta(a){ua.test(a)||g(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(sa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var ua=/^#(?:[0-9a-f]{3}){1,2}$/i,va=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function wa(a){var b=a.match(va);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var xa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function ya(a){var b=a.match(xa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function w(a,b){this.code=a;this.state=za[a]||Aa;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;w.P=a.prototype;w.prototype=new b})(); -var Aa="unknown error",za={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};za[13]=Aa;za[9]="unknown command";w.prototype.toString=function(){return this.name+": "+this.message};var Ba,Ca,Da,Ea,Fa,Ga;function Ha(){return r.navigator?r.navigator.userAgent:n}Ea=Da=Ca=Ba=q;var Ia;if(Ia=Ha()){var Ja=r.navigator;Ba=0==Ia.indexOf("Opera");Ca=!Ba&&-1!=Ia.indexOf("MSIE");Da=!Ba&&-1!=Ia.indexOf("WebKit");Ea=!Ba&&!Da&&"Gecko"==Ja.product}var x=Ba,y=Ca,z=Ea,B=Da,Ka,Pa=r.navigator;Ka=Pa&&Pa.platform||"";Fa=-1!=Ka.indexOf("Mac");Ga=-1!=Ka.indexOf("Win");var Qa=-1!=Ka.indexOf("Linux");function Ra(){var a=r.document;return a?a.documentMode:k}var Sa; -a:{var Ta="",Ua;if(x&&r.opera)var Va=r.opera.version,Ta="function"==typeof Va?Va():Va;else if(z?Ua=/rv\:([^\);]+)(\)|;)/:y?Ua=/MSIE\s+([^\);]+)(\)|;)/:B&&(Ua=/WebKit\/(\S+)/),Ua)var Wa=Ua.exec(Ha()),Ta=Wa?Wa[1]:"";if(y){var Xa=Ra();if(Xa>parseFloat(Ta)){Sa=String(Xa);break a}}Sa=Ta}var Ya={};function Za(a){return Ya[a]||(Ya[a]=0<=ha(Sa,a))}var $a=r.document,D=!$a||!y?k:Ra()||("CSS1Compat"==$a.compatMode?parseInt(Sa,10):5);var ab;!z&&!y||y&&y&&9<=D||z&&Za("1.9.1");y&&Za("9");function E(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function bb(a,b){return new E(a.x+b.x,a.y+b.y)};function F(a,b){this.width=a;this.height=b}F.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};F.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};F.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};F.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function cb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function db(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function eb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};function G(a){return a?new fb(H(a)):ab||(ab=new fb)}function gb(a){a=(a||window).document;a=hb(a)?a.documentElement:a.body;return new F(a.clientWidth,a.clientHeight)}function I(a){return a.parentWindow||a.defaultView}function hb(a){return"CSS1Compat"==a.compatMode}function ib(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function jb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(y&&!(y&&9<=D)){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?kb(a,b):!c&&ib(e,b)?-1*lb(a,b):!d&&ib(f,a)?lb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=H(a);c=d.createRange(); -c.selectNode(a);c.collapse(m);d=d.createRange();d.selectNode(b);d.collapse(m);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function lb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return kb(d,a)}function kb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function H(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function fb(a){this.d=a||r.document||document} -function mb(a){var b=a.d;a=!B&&hb(b)?b.documentElement:b.body;b=I(b);return new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}fb.prototype.contains=ib;var nb,ob,pb,qb,rb,sb,tb;tb=sb=rb=qb=pb=ob=nb=q;var J=Ha();J&&(-1!=J.indexOf("Firefox")?nb=m:-1!=J.indexOf("Camino")?ob=m:-1!=J.indexOf("iPhone")||-1!=J.indexOf("iPod")?pb=m:-1!=J.indexOf("iPad")?qb=m:-1!=J.indexOf("Android")?rb=m:-1!=J.indexOf("Chrome")?sb=m:-1!=J.indexOf("Safari")&&(tb=m));var ub=nb,vb=ob,wb=pb,xb=qb,yb=rb,zb=sb,Ab=tb;var K=y&&!(y&&9<=D),Bb=y&&!(y&&8<=D);function Cb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.L=e;this.parentNode=b}function Db(a,b,c){var d=Bb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Cb(b,a,b.nodeName,d,c)};function L(a){var b=n,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==n?a.innerText:b,b=b==k||b==n?"":b);if("string"!=typeof b)if(K&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),K&&"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} -function N(a,b,c){if(b===n)return m;try{if(!a.getAttribute)return q}catch(d){return q}Bb&&"class"==b&&(b="className");return c==n?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Eb(a,b,c,d,e){return(K?Fb:Gb).call(n,a,b,u(c)?c:n,u(d)?d:n,e||new O)} -function Fb(a,b,c,d,e){if(q||8==a.i||c&&a.i===n){var f=b.all;if(!f)return e;a=Hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],l=0;b=f[l++];)N(b,c,d)&&h.push(b);f=h}for(l=0;b=f[l++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Ib(a,b,c,d,e);return e} -function Gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!y?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):q?Ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){N(a,c,d)&&e.add(a)}));return e} -function Jb(a,b,c,d,e){var f;if((q||8==a.i||c&&a.i===n)&&(f=b.childNodes)){var h=Hb(a);if("*"!=h&&(f=ka(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ka(f,function(a){return N(a,c,d)}));v(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return Kb(a,b,c,d,e)}function Kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)N(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)N(b,c,d)&&a.matches(b)&&e.add(b),Ib(a,b,c,d,e)}function Hb(a){if(q){if(8==a.i)return"!";if(a.i===n)return"*"}return a.getName()};function O(){this.f=this.e=n;this.j=0}function Lb(a){this.r=a;this.next=this.o=n}O.prototype.unshift=function(a){a=new Lb(a);a.next=this.e;this.f?this.e.o=a:this.e=this.f=a;this.e=a;this.j++};O.prototype.add=function(a){a=new Lb(a);a.o=this.f;this.e?this.f.next=a:this.e=this.f=a;this.f=a;this.j++};function Mb(a){return(a=a.e)?a.r:n}function Nb(a){return(a=Mb(a))?L(a):""}function Ob(a,b){this.J=a;this.p=(this.s=b)?a.f:a.e;this.z=n} -Ob.prototype.next=function(){var a=this.p;if(a==n)return n;var b=this.z=a;this.p=this.s?a.o:a.next;return b.r};function P(a,b){var c=a.evaluate(b);return c instanceof O?+Nb(c):+c}function Q(a,b){var c=a.evaluate(b);return c instanceof O?Nb(c):""+c}function Pb(a,b){var c=a.evaluate(b);return c instanceof O?!!c.j:!!c};function Qb(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof O&&c instanceof O){f=new Ob(b,q);for(b=f.next();b;b=f.next()){e=new Ob(c,q);for(d=e.next();d;d=e.next())if(a(L(b),L(d)))return m}return q}if(b instanceof O||c instanceof O){b instanceof O?e=b:(e=c,c=b);e=new Ob(e,q);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+L(d);break;case "boolean":f=!!L(d);break;case "string":f=L(d);break;default:g(Error("Illegal primitive type for comparison."))}if(a(f,c))return m}return q}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function Rb(a,b,c,d){this.A=a;this.N=b;this.v=c;this.w=d}Rb.prototype.toString=function(){return this.A};var Sb={};function R(a,b,c,d){a in Sb&&g(Error("Binary operator already created: "+a));a=new Rb(a,b,c,d);Sb[a.toString()]=a}R("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});R("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});R("*",6,1,function(a,b,c){return P(a,c)*P(b,c)}); -R("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});R("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});R("<",4,2,function(a,b,c){return Qb(function(a,b){return a<b},a,b,c)});R(">",4,2,function(a,b,c){return Qb(function(a,b){return a>b},a,b,c)});R("<=",4,2,function(a,b,c){return Qb(function(a,b){return a<=b},a,b,c)});R(">=",4,2,function(a,b,c){return Qb(function(a,b){return a>=b},a,b,c)});R("=",3,2,function(a,b,c){return Qb(function(a,b){return a==b},a,b,c,m)}); -R("!=",3,2,function(a,b,c){return Qb(function(a,b){return a!=b},a,b,c,m)});R("and",2,2,function(a,b,c){return Pb(a,c)&&Pb(b,c)});R("or",1,2,function(a,b,c){return Pb(a,c)||Pb(b,c)});function Tb(a,b,c,d,e,f,h,l,s){this.m=a;this.v=b;this.I=c;this.H=d;this.G=e;this.w=f;this.F=h;this.D=ca(l)?l:h;this.K=!!s}Tb.prototype.toString=function(){return this.m};var Ub={};function S(a,b,c,d,e,f,h,l){a in Ub&&g(Error("Function already created: "+a+"."));Ub[a]=new Tb(a,b,c,d,q,e,f,h,l)}S("boolean",2,q,q,function(a,b){return Pb(b,a)},1);S("ceiling",1,q,q,function(a,b){return Math.ceil(P(b,a))},1); -S("concat",3,q,q,function(a,b){var c=pa(arguments,1);return ma(c,function(b,c){return b+Q(c,a)})},2,n);S("contains",2,q,q,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);S("count",1,q,q,function(a,b){return b.evaluate(a).j},1,1,m);S("false",2,q,q,aa(q),0);S("floor",1,q,q,function(a,b){return Math.floor(P(b,a))},1); -S("id",4,q,q,function(a,b){function c(a){if(K){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return na(b,function(b){return a==b.id})}return n}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!oa(f,a)&&f.push(a)});f.sort(jb);var h=new O;v(f,function(a){h.add(a)});return h},1);S("lang",2,q,q,aa(q),1);S("last",1,m,q,function(a){1!=arguments.length&&g(Error("Function last expects ()"));return a.f},0); -S("local-name",3,q,m,function(a,b){var c=b?Mb(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,m);S("name",3,q,m,function(a,b){var c=b?Mb(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,m);S("namespace-uri",3,m,q,aa(""),0,1,m);S("normalize-space",3,q,m,function(a,b){return(b?Q(b,a):L(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);S("not",2,q,q,function(a,b){return!Pb(b,a)},1);S("number",1,q,m,function(a,b){return b?P(b,a):+L(a.g)},0,1); -S("position",1,m,q,function(a){return a.M},0);S("round",1,q,q,function(a,b){return Math.round(P(b,a))},1);S("starts-with",2,q,q,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);S("string",3,q,m,function(a,b){return b?Q(b,a):L(a.g)},0,1);S("string-length",1,q,m,function(a,b){return(b?Q(b,a):L(a.g)).length},0,1); -S("substring",3,q,q,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);S("substring-after",3,q,q,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -S("substring-before",3,q,q,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);S("sum",1,q,q,function(a,b){var c;c=b.evaluate(a);c=new Ob(c,q);for(var d=0,e=c.next();e;e=c.next())d+=+L(e);return d},1,1,m);S("translate",3,q,q,function(a,b,c,d){b=Q(b,a);c=Q(c,a);var e=Q(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);S("true",2,q,q,aa(m),0);function Vb(a,b,c,d){this.m=a;this.C=b;this.s=c;this.Q=d}Vb.prototype.toString=function(){return this.m};var Wb={};function T(a,b,c,d){a in Wb&&g(Error("Axis already created: "+a));Wb[a]=new Vb(a,b,c,!!d)}T("ancestor",function(a,b){for(var c=new O,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},m);T("ancestor-or-self",function(a,b){var c=new O,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},m); -T("attribute",function(a,b){var c=new O,d=a.getName();if("style"==d&&b.style&&K)return c.add(new Cb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(q&&a.i===n||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)K?h.nodeValue&&c.add(Db(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(K?h.nodeValue&&c.add(Db(b,h,b.sourceIndex)):c.add(h));return c},q);T("child",function(a,b,c,d,e){return(K?Jb:Kb).call(n,a,b,u(c)?c:n,u(d)?d:n,e||new O)},q,m);T("descendant",Eb,q,m); -T("descendant-or-self",function(a,b,c,d){var e=new O;N(b,c,d)&&a.matches(b)&&e.add(b);return Eb(a,b,c,d,e)},q,m);T("following",function(a,b,c,d){var e=new O;do for(var f=b;f=f.nextSibling;)N(f,c,d)&&a.matches(f)&&e.add(f),e=Eb(a,f,c,d,e);while(b=b.parentNode);return e},q,m);T("following-sibling",function(a,b){for(var c=new O,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},q);T("namespace",function(){return new O},q); -T("parent",function(a,b){var c=new O;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},q);T("preceding",function(a,b,c,d){var e=new O,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,l=f.length;h<l;h++){var s=[];for(b=f[h];b=b.previousSibling;)s.unshift(b);for(var p=0,t=s.length;p<t;p++)b=s[p],N(b,c,d)&&a.matches(b)&&e.add(b),e=Eb(a,b,c,d,e)}return e},m,m); -T("preceding-sibling",function(a,b){for(var c=new O,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},m);T("self",function(a,b){var c=new O;a.matches(b)&&c.add(b);return c},q);function Xb(a){return(a=a.exec(Ha()))?a[1]:""}var Yb=function(){if(ub)return Xb(/Firefox\/([0-9.]+)/);if(y||x)return Sa;if(zb)return Xb(/Chrome\/([0-9.]+)/);if(Ab)return Xb(/Version\/([0-9.]+)/);if(wb||xb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ha());if(a)return a[1]+"."+a[2]}else{if(yb)return(a=Xb(/Android\s+([0-9.]+)/))?a:Xb(/Version\/([0-9.]+)/);if(vb)return Xb(/Camino\/([0-9.]+)/)}return""}();var Zb,$b;function ac(a){return bc?Zb(a):y?0<=ha(D,a):Za(a)}function cc(a){bc?$b(a):yb?ha(dc,a):ha(Yb,a)} -var bc=function(){if(!z)return q;var a=r.Components;if(!a)return q;try{if(!a.classes)return q}catch(b){return q}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;Zb=function(a){return 0<=d.u(e,""+a)};$b=function(a){d.u(f,""+a)};return m}(),ec;if(yb){var fc=/Android\s+([0-9\.]+)/.exec(Ha());ec=fc?fc[1]:"0"}else ec="0"; -var dc=ec,gc=y&&!(y&&9<=D);yb&&cc(2.3);!x&&(!B||ac("533"));function hc(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}hc.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};hc.prototype.contains=function(a){return!this||!a?q:a instanceof hc?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function U(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}U.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};U.prototype.contains=function(a){return a instanceof U?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function V(a,b){var c=H(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,n))?c[b]||c.getPropertyValue(b)||"":""}function W(a,b){return V(a,b)||(a.currentStyle?a.currentStyle[b]:n)||a.style&&a.style[b]}function ic(a){var b=a.getBoundingClientRect();y&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function kc(a){if(y&&!(y&&8<=D))return a.offsetParent;var b=H(a),c=W(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=W(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return n} -function X(a){var b,c=H(a),d=W(a,"position"),e=z&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),h;b=c?H(c):document;if(h=y)if(h=!(y&&9<=D))h=G(b),h=!hb(h.d);h=h?b.body:b.documentElement;if(a==h)return f;if(a.getBoundingClientRect)b=ic(a),a=mb(G(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{e=a;do{f.x+=e.offsetLeft; -f.y+=e.offsetTop;e!=a&&(f.x+=e.clientLeft||0,f.y+=e.clientTop||0);if(B&&"fixed"==W(e,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}e=e.offsetParent}while(e&&e!=a);if(x||B&&"absolute"==d)f.y-=c.body.offsetTop;for(e=a;(e=kc(e))&&e!=c.body&&e!=h;)if(f.x-=e.scrollLeft,!x||"TR"!=e.tagName)f.y-=e.scrollTop}return f} -function lc(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=ic(a);b.x=c.left;b.y=c.top}else{var c=mb(G(a)),d=X(a);b.x=d.x-c.x;b.y=d.y-c.y}if(z&&!Za(12)){var e;y?e="-ms-transform":B?e="-webkit-transform":x?e="-o-transform":z&&(e="-moz-transform");var f;e&&(f=W(a,e));f||(f=W(a,"transform"));f?(a=f.match(mc),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=bb(b,a)}}else e="function"==ba(a.q),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.q().targetTouches&&(f= -a.q().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function nc(a){if("none"!=W(a,"display"))return oc(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=oc(a);b.display=c;b.position=e;b.visibility=d;return a}function oc(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;return(!ca(b)||d)&&a.getBoundingClientRect?(a=ic(a),new F(a.right-a.left,a.bottom-a.top)):new F(b,c)}var pc={thin:2,medium:4,thick:6}; -function qc(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:n))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:n,d;if(c in pc)d=pc[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var mc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function rc(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function sc(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return rc(a)?a:n} -function tc(a){var b=ia();if("float"==b||"cssFloat"==b||"styleFloat"==b)b=gc?"styleFloat":"cssFloat";a=V(a,b)||uc(a,b);if(a===n)a=n;else if(oa(ra,"overflow")&&(ua.test("#"==a.charAt(0)?a:"#"+a)||ya(a).length||qa&&qa[a.toLowerCase()]||wa(a).length)){b=wa(a);if(!b.length){a:if(b=ya(a),!b.length){b=qa[a.toLowerCase()];b=!b?"#"==a.charAt(0)?a:"#"+a:b;if(ua.test(b)&&(b=ta(b),b=ta(b),b=[parseInt(b.substr(1,2),16),parseInt(b.substr(3,2),16),parseInt(b.substr(5,2),16)],b.length))break a;b=[]}3==b.length&& -b.push(1)}a=4!=b.length?a:"rgba("+b.join(", ")+")"}return a}function uc(a,b){var c=a.currentStyle||a.style,d=c[b];!ca(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?ca(d)?d:n:(c=sc(a))?uc(c,b):n} -function vc(a){if("function"==ba(a.getBBox)&&!rc(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(rc(a,"BODY")){b=(H(a)?I(H(a)):window)||k;"hidden"!=tc(a)?a=m:(a=sc(a),!a||!rc(a,"HTML")?a=m:(a=tc(a),a="auto"==a||"scroll"==a));if(a){a=(b||ga).document;var b=a.documentElement,d=a.body;d||g(new w(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(n,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]); -a=Math.max.apply(n,a);b=new F(b,a)}else b=gb(b);return b}return nc(a)}function wc(a,b){var c=kc(a),d=z||y||x?sc(a):c;if((z||y||x)&&rc(d,"BODY"))c=d;if(c&&("scroll"==tc(c)||"auto"==tc(c))){var d=vc(c),e=lc(c),f=lc(a),h,l;b?(h=b.x,l=b.y):(l=vc(a),h=l.width/2,l=l.height/2);h=f.x+h;f=f.y+l;return h>=e.x+d.width||h<=e.x||f>=e.y+d.height||f<=e.y?m:wc(c)}return q}function xc(a,b){b.scrollLeft+=Math.min(a.left,Math.max(a.left-a.width,0));b.scrollTop+=Math.min(a.top,Math.max(a.top-a.height,0))} -function yc(a,b){for(var c=H(a)?I(H(a)):window,d=c.top,e=nc(a);;c=c.parent){var f=mb(G(c.document)),h=gb(c),f=new U(f.x,f.y,h.width,h.height),h=c,l=new E(0,0),s=H(a)?I(H(a)):window,p=a;do{var t=s==h?X(p):lc(p);l.x+=t.x;l.y+=t.y}while(s&&s!=h&&(p=s.frameElement)&&(s=s.parent));h=l;h=new U(h.x,h.y,e.width,e.height);if(!(f.left<=h.left+h.width&&h.left<=f.left+f.width&&f.top<=h.top+h.height&&h.top<=f.top+f.height))return q;if(c==d)break}d=new hc(0,Infinity,Infinity,0);e=G(a);f=e.d.body;h=e.d.documentElement; -c=!B&&hb(e.d)?e.d.documentElement:e.d.body;for(l=a;l=kc(l);)if((!y||0!=l.clientWidth)&&(!B||0!=l.clientHeight||l!=f)&&l!=f&&l!=h&&"visible"!=W(l,"overflow")){s=X(l);p=l;if(z&&!Za("1.9")){t=parseFloat(V(p,"borderLeftWidth"));if("rtl"==W(p,"direction"))var A=p.offsetWidth-p.clientWidth-t-parseFloat(V(p,"borderRightWidth")),t=t+A;p=new E(t,parseFloat(V(p,"borderTopWidth")))}else p=new E(p.clientLeft,p.clientTop);s.x+=p.x;s.y+=p.y;d.top=Math.max(d.top,s.y);d.right=Math.min(d.right,s.x+l.clientWidth); -d.bottom=Math.min(d.bottom,s.y+l.clientHeight);d.left=Math.max(d.left,s.x)}f=c.scrollLeft;c=c.scrollTop;d.left=Math.max(d.left,f);d.top=Math.max(d.top,c);e=gb(I(e.d));d.right=Math.min(d.right,f+e.width);d.bottom=Math.min(d.bottom,c+e.height);d=0<=d.top&&0<=d.left&&d.bottom>d.top&&d.right>d.left?d:n;if(!d)return q;if(b)return e=X(a),d.contains(bb(e,b));e=X(a);c=nc(a);e=new U(e.x,e.y,c.width,c.height);e=new hc(e.top,e.left+e.width,e.top+e.height,e.left);return d.left<=e.right&&e.left<=d.right&&d.top<= -e.bottom&&e.top<=d.bottom};B||x||bc&&cc(3.6);y&&ac(10);yb&&cc(4);function zc(a,b){this.h={};this.c=[];var c=arguments.length;if(1<c){c%2&&g(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof zc){d=Ac(a);Bc(a);e=[];for(c=0;c<a.c.length;c++)e.push(a.h[a.c[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}zc.prototype.l=0;zc.prototype.B=0;function Ac(a){Bc(a);return a.c.concat()} -function Bc(a){if(a.l!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.h,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.l!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}zc.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.h,a)?this.h[a]:b}; -zc.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.h,a)||(this.l++,this.c.push(a),this.B++);this.h[a]=b};var Cc={};function Y(a,b,c){ea(a)&&(a=z?a.a:x?a.opera:a.b);a=new Dc(a,b,c);if(b&&(!(b in Cc)||c))Cc[b]={key:a,shift:q},c&&(Cc[c]={key:a,shift:m});return a}function Dc(a,b,c){this.code=a;this.t=b||n;this.O=c||this.t}Y(8);Y(9);Y(13);var Ec=Y(16),Fc=Y(17),Gc=Y(18);Y(19);Y(20);Y(27);Y(32," ");Y(33);Y(34);Y(35);Y(36);Y(37);Y(38);Y(39);Y(40);Y(44);Y(45);Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","("); -Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q");Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z");var Hc=Y(Ga?{a:91,b:91,opera:219}:Fa?{a:224,b:91,opera:17}:{a:0,b:91,opera:n}); -Y(Ga?{a:92,b:92,opera:220}:Fa?{a:224,b:93,opera:17}:{a:0,b:92,opera:n});Y(Ga?{a:93,b:93,opera:0}:Fa?{a:0,b:0,opera:16}:{a:93,b:n,opera:0});Y({a:96,b:96,opera:48},"0");Y({a:97,b:97,opera:49},"1");Y({a:98,b:98,opera:50},"2");Y({a:99,b:99,opera:51},"3");Y({a:100,b:100,opera:52},"4");Y({a:101,b:101,opera:53},"5");Y({a:102,b:102,opera:54},"6");Y({a:103,b:103,opera:55},"7");Y({a:104,b:104,opera:56},"8");Y({a:105,b:105,opera:57},"9");Y({a:106,b:106,opera:Qa?56:42},"*");Y({a:107,b:107,opera:Qa?61:43},"+"); -Y({a:109,b:109,opera:Qa?109:45},"-");Y({a:110,b:110,opera:Qa?190:78},".");Y({a:111,b:111,opera:Qa?191:47},"/");Y(Qa&&x?n:144);Y(112);Y(113);Y(114);Y(115);Y(116);Y(117);Y(118);Y(119);Y(120);Y(121);Y(122);Y(123);Y({a:107,b:187,opera:61},"=","+");Y(108,",");Y({a:109,b:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");Y({a:59,b:186,opera:59},";",":");Y(222,"'",'"');var Ic=new zc;Ic.set(1,Ec);Ic.set(2,Fc);Ic.set(4,Gc); -Ic.set(8,Hc);(function(a){var b=new zc;v(Ac(a),function(c){b.set(a.get(c).code,c)});return b})(Ic);z&&ac(12);function Jc(a,b){if(!yc(a,b)&&!wc(a,b)&&("function"==typeof a.scrollIntoView&&a.scrollIntoView(),x&&!ac(11)))for(var c=H(a)?I(H(a)):window,c=c.frameElement;c;c=c.frameElement)c.scrollIntoView(),c=H(c)?I(H(c)):window;if(b){for(var c=new U(b.x,b.y,1,1),d=H(a),e=sc(a);e&&e!=d.body&&e!=d.documentElement;e=sc(e)){var f=c,h=e,l=X(a),s=X(h),p;var t=h;if(y){p=qc(t,"borderLeft");var A=qc(t,"borderRight"),C=qc(t,"borderTop"),t=qc(t,"borderBottom");p=new hc(C,A,t,p)}else p=V(t,"borderLeftWidth"),A=V(t,"borderRightWidth"), -C=V(t,"borderTopWidth"),t=V(t,"borderBottomWidth"),p=new hc(parseFloat(C),parseFloat(A),parseFloat(t),parseFloat(p));xc(new U(l.x+f.left-s.x-p.left,l.y+f.top-s.y-p.top,h.clientWidth-f.width,h.clientHeight-f.height),h)}e=X(a);f=G(d);f=gb(I(f.d));xc(new U(e.x+c.left-(d.body?d.body.scrollLeft:0),e.y+c.top-(d.body?d.body.scrollTop:0),f.width-c.width,f.height-c.height),d.body||d.documentElement)}c=yc(a,b);if(!c&&b){d=lc(a);d=bb(d,b);try{var La=(H(a)?I(H(a)):window)||ga,M=gb(La),Ma=d.x>=M.width?d.x-(M.width- -1):0>d.x?d.x:0,Na=d.y>=M.height?d.y-(M.height-1):0>d.y?d.y:0,Oa=mb(G(La.document));(0!=Ma||0!=Na)&&La.scrollBy(Ma,Na);var jc=mb(G(La.document));(Oa.x+Ma!=jc.x||Oa.y+Na!=jc.y)&&g(new w(34,"The target location ("+(d.x+Oa.x)+", "+(d.y+Oa.y)+") is not on the webpage."));var Z=new E(d.x-Ma,d.y-Na);(0>Z.x||Z.x>=M.width)&&g(new w(34,"The target location ("+Z.x+", "+Z.y+") should be within the viewport ("+M.width+":"+M.height+") after scrolling."));(0>Z.y||Z.y>=M.height)&&g(new w(34,"The target location ("+ -Z.x+", "+Z.y+") should be within the viewport ("+M.width+":"+M.height+") after scrolling."));c=m}catch(Xc){c=q}}return c};function Kc(){this.k=k} -function Lc(a,b,c){switch(typeof b){case "string":Mc(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==n){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Lc(a,a.k?a.k.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Mc(f, -c),c.push(":"),Lc(a,a.k?a.k.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:g(Error("Unknown type: "+typeof b))}}var Nc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Oc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Mc(a,b){b.push('"',a.replace(Oc,function(a){if(a in Nc)return Nc[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Nc[a]=e+b.toString(16)}),'"')};B||x||z&&ac(3.5)||y&&ac(8);function Pc(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return la(a,Pc);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Qc(a);return b}if("document"in a)return b={},b.WINDOW=Qc(a),b;if(da(a))return la(a,Pc);a=cb(a,function(a,b){return"number"==typeof b||u(b)});return db(a,Pc);default:return n}} -function Rc(a,b){return"array"==ba(a)?la(a,function(a){return Rc(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?Sc(a.ELEMENT,b):"WINDOW"in a?Sc(a.WINDOW,b):db(a,function(a){return Rc(a,b)}):a}function Tc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.n=fa());b.n||(b.n=fa());return b}function Qc(a){var b=Tc(a.ownerDocument),c=eb(b,function(b){return b==a});c||(c=":wdc:"+b.n++,b[c]=a);return c} -function Sc(a,b){a=decodeURIComponent(a);var c=b||document,d=Tc(c);a in d||g(new w(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],g(new w(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];g(new w(10,"Element is no longer attached to the DOM"))};function Uc(a,b){var c=[a,b],d=Jc,e;try{var d=u(d)?new ga.Function(d):ga==window?d:new ga.Function("return ("+d+").apply(null,arguments);"),f=Rc(c,ga.document),h=d.apply(n,f);e={status:0,value:Pc(h)}}catch(l){e={status:"code"in l?l.code:13,value:{message:l.message}}}c=[];Lc(new Kc,e,c);return c.join("")}var Vc=["_"],$=r;!(Vc[0]in $)&&$.execScript&&$.execScript("var "+Vc[0]);for(var Wc;Vc.length&&(Wc=Vc.shift());)!Vc.length&&ca(Uc)?$[Wc]=Uc:$=$[Wc]?$[Wc]:$[Wc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var va="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),wa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,za=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Aa(a,b){this.code=a;this.state=Ba[a]||Ca;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(Aa,Error); +var Ca="unknown error",Ba={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ba[13]=Ca;Ba[9]="unknown command";Aa.prototype.toString=function(){return this.name+": "+this.message};var Da,Ha,Ia,Ja,Ka,La;function Ma(){return n.navigator?n.navigator.userAgent:null}Ja=Ia=Ha=Da=!1;var Na;if(Na=Ma()){var Oa=n.navigator;Da=0==Na.indexOf("Opera");Ha=!Da&&-1!=Na.indexOf("MSIE");Ia=!Da&&-1!=Na.indexOf("WebKit");Ja=!Da&&!Ia&&"Gecko"==Oa.product}var v=Da,w=Ha,x=Ja,Pa=Ia,Qa,Ra=n.navigator;Qa=Ra&&Ra.platform||"";Ka=-1!=Qa.indexOf("Mac");La=-1!=Qa.indexOf("Win");var Sa=-1!=Qa.indexOf("Linux");function Ta(){var a=n.document;return a?a.documentMode:void 0}var Ua; +a:{var Va="",Wa;if(v&&n.opera)var Xa=n.opera.version,Va="function"==typeof Xa?Xa():Xa;else if(x?Wa=/rv\:([^\);]+)(\)|;)/:w?Wa=/MSIE\s+([^\);]+)(\)|;)/:Pa&&(Wa=/WebKit\/(\S+)/),Wa)var Ya=Wa.exec(Ma()),Va=Ya?Ya[1]:"";if(w){var Za=Ta();if(Za>parseFloat(Va)){Ua=String(Za);break a}}Ua=Va}var $a={};function ab(a){return $a[a]||($a[a]=0<=ja(Ua,a))}var bb=n.document,cb=bb&&w?Ta()||("CSS1Compat"==bb.compatMode?parseInt(Ua,10):5):void 0;!x&&!w||w&&w&&9<=cb||x&&ab("1.9.1");w&&ab("9");function db(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}db.prototype.toString=function(){return"("+this.x+", "+this.y+")"};db.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};db.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};db.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function eb(a,b){this.width=a;this.height=b}eb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};eb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};eb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};eb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function fb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function gb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function hb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function ib(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new eb(a.clientWidth,a.clientHeight)}function jb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function kb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=cb)){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?lb(a,b):!c&&jb(e,b)?-1*mb(a,b):!d&&jb(f,a)?mb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=y(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function mb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return lb(d,a)}function lb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function y(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function nb(a){this.ia=a||n.document||document}nb.prototype.contains=jb;var ob,pb,qb,rb,sb,tb,ub;ub=tb=sb=rb=qb=pb=ob=!1;var z=Ma();z&&(-1!=z.indexOf("Firefox")?ob=!0:-1!=z.indexOf("Camino")?pb=!0:-1!=z.indexOf("iPhone")||-1!=z.indexOf("iPod")?qb=!0:-1!=z.indexOf("iPad")?rb=!0:-1!=z.indexOf("Android")?sb=!0:-1!=z.indexOf("Chrome")?tb=!0:-1!=z.indexOf("Safari")&&(ub=!0));var vb=ob,wb=pb,xb=qb,yb=rb,zb=sb,Ab=tb,Bb=ub;function Cb(a,b,c){this.e=a;this.pa=b||1;this.m=c||1};var B=w&&!(w&&9<=cb),Db=w&&!(w&&8<=cb);function Eb(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ua=e;this.parentNode=b}function Fb(a,b,c){var d=Db&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Eb(b,a,b.nodeName,d,c)};function Gb(a){this.S=a;this.G=0}function Hb(a){a=a.match(Ib);for(var b=0;b<a.length;b++)Jb.test(a[b])&&a.splice(b,1);return new Gb(a)}var Ib=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Jb=/^\s/;function C(a,b){return a.S[a.G+(b||0)]}Gb.prototype.next=function(){return this.S[this.G++]};Gb.prototype.back=function(){this.G--};Gb.prototype.empty=function(){return this.S.length<=this.G};function D(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(B&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),B&&"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} +function E(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Db&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Kb(a,b,c,d,e){return(B?Lb:Mb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)} +function Lb(a,b,c,d,e){if(a instanceof Nb||8==a.l||c&&null===a.l){var f=b.all;if(!f)return e;a=Ob(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)E(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Pb(a,b,c,d,e);return e} +function Mb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof H?Pb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){E(a,c,d)&&e.add(a)}));return e} +function Qb(a,b,c,d,e){var f;if((a instanceof Nb||8==a.l||c&&null===a.l)&&(f=b.childNodes)){var g=Ob(a);if("*"!=g&&(f=ma(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ma(f,function(a){return E(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return Rb(a,b,c,d,e)}function Rb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)E(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Pb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)E(b,c,d)&&a.matches(b)&&e.add(b),Pb(a,b,c,d,e)}function Ob(a){if(a instanceof H){if(8==a.l)return"!";if(null===a.l)return"*"}return a.getName()};function F(){this.m=this.i=null;this.B=0}function Sb(a){this.p=a;this.next=this.u=null}function Tb(a,b){if(!a.i)return b;if(!b.i)return a;for(var c=a.i,d=b.i,e=null,f=null,g=0;c&&d;)c.p==d.p||c.p instanceof Eb&&d.p instanceof Eb&&c.p.e==d.p.e?(f=c,c=c.next,d=d.next):0<kb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.B=g;return a} +F.prototype.unshift=function(a){a=new Sb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.B++};F.prototype.add=function(a){a=new Sb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.B++};function Ub(a){return(a=a.i)?a.p:null}F.prototype.o=h("B");function Vb(a){return(a=Ub(a))?D(a):""}function I(a,b){return new Wb(a,!!b)}function Wb(a,b){this.la=a;this.T=(this.v=b)?a.m:a.i;this.N=null} +Wb.prototype.next=function(){var a=this.T;if(null==a)return null;var b=this.N=a;this.T=this.v?a.u:a.next;return b.p};Wb.prototype.remove=function(){var a=this.la,b=this.N;if(!b)throw Error("Next must be called at least once before remove.");var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.B--;this.N=null};function J(a){this.h=a;this.j=this.q=!1;this.C=null}function L(a){return"\n "+a.toString().split("\n").join("\n ")}J.prototype.f=h("q");function Xb(a,b){a.q=b}function Yb(a,b){a.j=b}J.prototype.s=h("C");function M(a,b){var c=a.evaluate(b);return c instanceof F?+Vb(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof F?Vb(c):""+c}function Zb(a,b){var c=a.evaluate(b);return c instanceof F?!!c.o():!!c};function $b(a,b,c){J.call(this,a.h);this.R=a;this.W=b;this.aa=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.R==ac&&(c.j||c.f()||4==c.h||0==c.h||!b.s()?b.j||(b.f()||4==b.h||0==b.h||!c.s())||(this.C={name:c.s().name,w:b}):this.C={name:b.s().name,w:c})}s($b,J); +function bc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof F&&c instanceof F){e=I(b);for(d=e.next();d;d=e.next())for(b=I(c),f=b.next();f;f=b.next())if(a(D(d),D(f)))return!0;return!1}if(b instanceof F||c instanceof F){b instanceof F?e=b:(e=c,c=b);e=I(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+D(d);break;case "boolean":d=!!D(d);break;case "string":d=D(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}$b.prototype.evaluate=function(a){return this.R.n(this.W,this.aa,a)};$b.prototype.toString=function(){var a="Binary Expression: "+this.R,a=a+L(this.W);return a+=L(this.aa)};function cc(a,b,c,d){this.oa=a;this.Z=b;this.h=c;this.n=d}cc.prototype.toString=h("oa");var dc={}; +function O(a,b,c,d){if(dc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new cc(a,b,c,d);return dc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return bc(function(a,b){return a<b},a,b,c)}); +O(">",4,2,function(a,b,c){return bc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return bc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return bc(function(a,b){return a>=b},a,b,c)});var ac=O("=",3,2,function(a,b,c){return bc(function(a,b){return a==b},a,b,c,!0)});O("!=",3,2,function(a,b,c){return bc(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return Zb(a,c)&&Zb(b,c)});O("or",1,2,function(a,b,c){return Zb(a,c)||Zb(b,c)});function ec(a,b){if(b.o()&&4!=a.h)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.h);this.$=a;this.d=b;this.q=a.f();this.j=a.j}s(ec,J);ec.prototype.evaluate=function(a){a=this.$.evaluate(a);return fc(this.d,a)};ec.prototype.toString=function(){var a;a="Filter:"+L(this.$);return a+=L(this.d)};function gc(a,b){if(b.length<a.Y)throw Error("Function "+a.k+" expects at least"+a.Y+" arguments, "+b.length+" given");if(null!==a.O&&b.length>a.O)throw Error("Function "+a.k+" expects at most "+a.O+" arguments, "+b.length+" given");a.ma&&t(b,function(b,d){if(4!=b.h)throw Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b);});J.call(this,a.h);this.F=a;this.K=b;Xb(this,a.q||pa(b,function(a){return a.f()}));Yb(this,a.ka&&!b.length||a.ja&&!!b.length||pa(b,function(a){return a.j}))} +s(gc,J);gc.prototype.evaluate=function(a){return this.F.n.apply(null,sa(a,this.K))};gc.prototype.toString=function(){var a="Function: "+this.F;if(this.K.length)var b=oa(this.K,function(a,b){return a+L(b)},"Arguments:"),a=a+L(b);return a};function hc(a,b,c,d,e,f,g,k,q){this.k=a;this.h=b;this.q=c;this.ka=d;this.ja=e;this.n=f;this.Y=g;this.O=void 0!==k?k:g;this.ma=!!q}hc.prototype.toString=h("k");var ic={}; +function Q(a,b,c,d,e,f,g,k){if(ic.hasOwnProperty(a))throw Error("Function already created: "+a+".");ic[a]=new hc(a,b,c,d,!1,e,f,g,k)}Q("boolean",2,!1,!1,function(a,b){return Zb(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(M(b,a))},1);Q("concat",3,!1,!1,function(a,b){var c=ta(arguments,1);return oa(c,function(b,c){return b+N(c,a)},"")},2,null);Q("contains",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2); +Q("count",1,!1,!1,function(a,b){return b.evaluate(a).o()},1,1,!0);Q("false",2,!1,!1,l(!1),0);Q("floor",1,!1,!1,function(a,b){return Math.floor(M(b,a))},1); +Q("id",4,!1,!1,function(a,b){function c(a){if(B){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return qa(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!ra(f,a)&&f.push(a)});f.sort(kb);var g=new F;t(f,function(a){g.add(a)});return g},1);Q("lang",2,!1,!1,l(!1),1); +Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.m},0);Q("local-name",3,!1,!0,function(a,b){var c=b?Ub(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){var c=b?Ub(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,l(""),0,1,!0);Q("normalize-space",3,!1,!0,function(a,b){return(b?N(b,a):D(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +Q("not",2,!1,!1,function(a,b){return!Zb(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?M(b,a):+D(a.e)},0,1);Q("position",1,!0,!1,function(a){return a.pa},0);Q("round",1,!1,!1,function(a,b){return Math.round(M(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?N(b,a):D(a.e)},0,1);Q("string-length",1,!1,!0,function(a,b){return(b?N(b,a):D(a.e)).length},0,1); +Q("substring",3,!1,!1,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +Q("substring-before",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){for(var c=I(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+D(e);return d},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);Q("true",2,!1,!1,l(!0),0);function H(a,b){this.ca=a;this.X=void 0!==b?b:null;this.l=null;switch(a){case "comment":this.l=8;break;case "text":this.l=3;break;case "processing-instruction":this.l=7;break;case "node":break;default:throw Error("Unexpected argument");}}function jc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}H.prototype.matches=function(a){return null===this.l||this.l==a.nodeType};H.prototype.getName=h("ca"); +H.prototype.toString=function(){var a="Kind Test: "+this.ca;null===this.X||(a+=L(this.X));return a};function kc(a){J.call(this,3);this.ba=a.substring(1,a.length-1)}s(kc,J);kc.prototype.evaluate=h("ba");kc.prototype.toString=function(){return"Literal: "+this.ba};function Nb(a,b){this.k=a.toLowerCase();this.P=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Nb.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.k&&this.k!=a.nodeName.toLowerCase()?!1:this.P==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Nb.prototype.getName=h("k");Nb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.P?"":this.P+":")+this.k};function lc(a){J.call(this,1);this.da=a}s(lc,J);lc.prototype.evaluate=h("da");lc.prototype.toString=function(){return"Number: "+this.da};function mc(a,b){J.call(this,a.h);this.V=a;this.D=b;this.q=a.f();this.j=a.j;if(1==this.D.length){var c=this.D[0];c.M||c.r!=nc||(c=c.J,"*"!=c.getName()&&(this.C={name:c.getName(),w:null}))}}s(mc,J);function oc(){J.call(this,4)}s(oc,J);oc.prototype.evaluate=function(a){var b=new F;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};oc.prototype.toString=l("Root Helper Expression");function pc(){J.call(this,4)}s(pc,J);pc.prototype.evaluate=function(a){var b=new F;b.add(a.e);return b}; +pc.prototype.toString=l("Context Helper Expression"); +mc.prototype.evaluate=function(a){var b=this.V.evaluate(a);if(!(b instanceof F))throw Error("Filter expression must evaluate to nodeset.");a=this.D;for(var c=0,d=a.length;c<d&&b.o();c++){var e=a[c],f=I(b,e.r.v),g;if(e.f()||e.r!=qc)if(e.f()||e.r!=rc)for(g=f.next(),b=e.evaluate(new Cb(g));null!=(g=f.next());)g=e.evaluate(new Cb(g)),b=Tb(b,g);else g=f.next(),b=e.evaluate(new Cb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Cb(g))}}return b}; +mc.prototype.toString=function(){var a;a="Path Expression:"+L(this.V);if(this.D.length){var b=oa(this.D,function(a,b){return a+L(b)},"Steps:");a+=L(b)}return a};function sc(a,b){this.d=a;this.v=!!b}function fc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=I(b),f=b.o(),g,k=0;g=e.next();k++){var q=a.v?f-k:k+1;g=d.evaluate(new Cb(g,q,f));if("number"==typeof g)q=q==g;else if("string"==typeof g||"boolean"==typeof g)q=!!g;else if(g instanceof F)q=0<g.o();else throw Error("Predicate.evaluate returned an unexpected type.");q||e.remove()}return b}sc.prototype.s=function(){return 0<this.d.length?this.d[0].s():null}; +sc.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return!0}return!1};sc.prototype.o=function(){return this.d.length};sc.prototype.toString=function(){return oa(this.d,function(a,b){return a+L(b)},"Predicates:")};function R(a,b,c,d){J.call(this,4);this.r=a;this.J=b;this.d=c||new sc([]);this.M=!!d;b=this.d.s();a.ra&&b&&(a=b.name,a=B?a.toLowerCase():a,this.C={name:a,w:b.w});this.q=this.d.f()}s(R,J); +R.prototype.evaluate=function(a){var b=a.e,c=null,c=this.s(),d=null,e=null,f=0;c&&(d=c.name,e=c.w?N(c.w,a):null,f=1);if(this.M)if(this.f()||this.r!=tc)if(a=I((new R(uc,new H("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);null!=(b=a.next());)c=Tb(c,this.n(b,d,e,f));else c=new F;else c=Kb(this.J,b,d,e),c=fc(this.d,c,f);else c=this.n(a.e,d,e,f);return c};R.prototype.n=function(a,b,c,d){a=this.r.F(this.J,a,b,c);return a=fc(this.d,a,d)}; +R.prototype.toString=function(){var a;a="Step:"+L("Operator: "+(this.M?"//":"/"));this.r.k&&(a+=L("Axis: "+this.r));a+=L(this.J);if(this.d.o()){var b=oa(this.d.d,function(a,b){return a+L(b)},"Predicates:");a+=L(b)}return a};function vc(a,b,c,d){this.k=a;this.F=b;this.v=c;this.ra=d}vc.prototype.toString=h("k");var wc={};function S(a,b,c,d){if(wc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new vc(a,b,c,!!d);return wc[a]=b} +S("ancestor",function(a,b){for(var c=new F,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);S("ancestor-or-self",function(a,b){var c=new F,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var nc=S("attribute",function(a,b){var c=new F,d=a.getName();if("style"==d&&b.style&&B)return c.add(new Eb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof H&&null===a.l||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)B?g.nodeValue&&c.add(Fb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(B?g.nodeValue&&c.add(Fb(b,g,b.sourceIndex)):c.add(g));return c},!1),tc=S("child",function(a,b,c,d,e){return(B?Qb:Rb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)},!1,!0); +S("descendant",Kb,!1,!0);var uc=S("descendant-or-self",function(a,b,c,d){var e=new F;E(b,c,d)&&a.matches(b)&&e.add(b);return Kb(a,b,c,d,e)},!1,!0),qc=S("following",function(a,b,c,d){var e=new F;do for(var f=b;f=f.nextSibling;)E(f,c,d)&&a.matches(f)&&e.add(f),e=Kb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);S("following-sibling",function(a,b){for(var c=new F,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);S("namespace",function(){return new F},!1); +var xc=S("parent",function(a,b){var c=new F;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),rc=S("preceding",function(a,b,c,d){var e=new F,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var q=[];for(b=f[g];b=b.previousSibling;)q.unshift(b);for(var K=0,G=q.length;K<G;K++)b=q[K],E(b,c,d)&&a.matches(b)&&e.add(b),e=Kb(a,b,c,d,e)}return e},!0,!0); +S("preceding-sibling",function(a,b){for(var c=new F,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var yc=S("self",function(a,b){var c=new F;a.matches(b)&&c.add(b);return c},!1);function zc(a){J.call(this,1);this.U=a;this.q=a.f();this.j=a.j}s(zc,J);zc.prototype.evaluate=function(a){return-M(this.U,a)};zc.prototype.toString=function(){return"Unary Expression: -"+L(this.U)};function Ac(a){J.call(this,4);this.H=a;Xb(this,pa(this.H,function(a){return a.f()}));Yb(this,pa(this.H,function(a){return a.j}))}s(Ac,J);Ac.prototype.evaluate=function(a){var b=new F;t(this.H,function(c){c=c.evaluate(a);if(!(c instanceof F))throw Error("Path expression must evaluate to NodeSet.");b=Tb(b,c)});return b};Ac.prototype.toString=function(){return oa(this.H,function(a,b){return a+L(b)},"Union Expression:")};function Bc(a,b){this.a=a;this.na=b}function Cc(a){for(var b,c=[];;){T(a,"Missing right hand side of binary expression.");b=Dc(a);var d=a.a.next();if(!d)break;var e=(d=dc[d]||null)&&d.Z;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].Z;)b=new $b(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new $b(c.pop(),c.pop(),b);return b}function T(a,b){if(a.a.empty())throw Error(b);}function Ec(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Fc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Gc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new kc(a)}function Hc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Nb(b);var d=b.substring(0,c);a=a.na(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Nb(b,a)} +function Ic(a){var b,c=[],d;if("/"==C(a.a)||"//"==C(a.a)){b=a.a.next();d=C(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new oc;d=new oc;T(a,"Missing next location step.");b=Jc(a,b);c.push(b)}else{a:{b=C(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Cc(a);T(a,'unclosed "("');Ec(a,")");break;case '"':case "'":b=Gc(a);break;default:if(isNaN(+b))if(!jc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==C(a.a,1)){b=a.a.next();b=ic[b]||null;a.a.next();for(d=[];")"!=C(a.a);){T(a,"Missing function argument list.");d.push(Cc(a));if(","!=C(a.a))break;a.a.next()}T(a,"Unclosed function argument list.");Fc(a);b=new gc(b,d)}else{b=null;break a}else b=new lc(+a.a.next())}"["==C(a.a)&&(d=new sc(Kc(a)),b=new ec(b,d))}if(b)if("/"==C(a.a)||"//"==C(a.a))d=b;else return b;else b=Jc(a,"/"),d=new pc,c.push(b)}for(;"/"==C(a.a)||"//"==C(a.a);)b=a.a.next(),T(a,"Missing next location step."),b=Jc(a,b),c.push(b); +return new mc(d,c)} +function Jc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==C(a.a))return d=new R(yc,new H("node")),a.a.next(),d;if(".."==C(a.a))return d=new R(xc,new H("node")),a.a.next(),d;var f;if("@"==C(a.a))f=nc,a.a.next(),T(a,"Missing attribute name");else if("::"==C(a.a,1)){if(!/(?![0-9])[\w]/.test(C(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=wc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();T(a,"Missing node name")}else f=tc; +c=C(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==C(a.a,1)){if(!jc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!jc(c))throw Error("Invalid type name: "+c);Ec(a,"(");T(a,"Bad nodetype");e=C(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Gc(a);T(a,"Bad nodetype");Fc(a);c=new H(c,g)}else c=Hc(a);else if("*"==c)c=Hc(a);else throw Error("Bad token: "+a.a.next());e=new sc(Kc(a),f.v);return d||new R(f,c,e,"//"==b)} +function Kc(a){for(var b=[];"["==C(a.a);){a.a.next();T(a,"Missing predicate expression.");var c=Cc(a);b.push(c);T(a,"Unclosed predicate expression.");Ec(a,"]")}return b}function Dc(a){if("-"==C(a.a))return a.a.next(),new zc(Dc(a));var b=Ic(a);if("|"!=C(a.a))a=b;else{for(b=[b];"|"==a.a.next();)T(a,"Missing next union location path."),b.push(Ic(a));a.a.back();a=new Ac(b)}return a};function Lc(a){switch(a.nodeType){case 1:return ga(Mc,a);case 9:return Lc(a.documentElement);case 2:return a.ownerElement?Lc(a.ownerElement):Nc;case 11:case 10:case 6:case 12:return Nc;default:return a.parentNode?Lc(a.parentNode):Nc}}function Nc(){return null}function Mc(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?Mc(a.parentNode,b):null};function Oc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Hb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=fa(b.lookupNamespaceURI,b)):b=l(null);var d=Cc(new Bc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Cb(a));return new U(c,b)}} +function U(a,b){if(0==b)if(a instanceof F)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 F))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof F?Vb(a):""+a;break;case 1:this.numberValue=a instanceof F?+Vb(a):+a;break;case 3:this.booleanValue=a instanceof F?0<a.o():!!a;break;case 4:case 5:case 6:case 7:var d= +I(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Eb?e.e:e);this.snapshotLength=a.o();this.invalidIteratorState=!1;break;case 8:case 9:d=Ub(a);this.singleNodeValue=d instanceof Eb?d.e:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}U.ANY_TYPE=0;U.NUMBER_TYPE=1;U.STRING_TYPE=2;U.BOOLEAN_TYPE=3;U.UNORDERED_NODE_ITERATOR_TYPE=4;U.ORDERED_NODE_ITERATOR_TYPE=5;U.UNORDERED_NODE_SNAPSHOT_TYPE=6;U.ORDERED_NODE_SNAPSHOT_TYPE=7;U.ANY_UNORDERED_NODE_TYPE=8;U.FIRST_ORDERED_NODE_TYPE=9;function Pc(a){this.lookupNamespaceURI=Lc(a)} +function Qc(a){a=a||n;var b=a.document;b.evaluate||(a.XPathResult=U,b.evaluate=function(a,b,e,f){return(new Oc(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Oc(a,b)},b.createNSResolver=function(a){return new Pc(a)})};var V={};V.fa=function(){var a={xa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();V.n=function(a,b,c){var d=y(a);(w||zb)&&Qc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):V.fa;return w&&!ab(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!x||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new Aa(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +V.L=function(a,b){if(!a||1!=a.nodeType)throw new Aa(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};V.qa=function(a,b){var c=function(){var c=V.n(b,a,9);return c?(c=c.singleNodeValue,v?c:c||null):b.selectSingleNode?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||V.L(c,a);return c}; +V.ta=function(a,b){var c=function(){var c=V.n(b,a,7);if(c){var e=c.snapshotLength;v&&void 0===e&&V.L(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){V.L(b,a)});return c};function Rc(a){return(a=a.exec(Ma()))?a[1]:""}var Sc=function(){if(vb)return Rc(/Firefox\/([0-9.]+)/);if(w||v)return Ua;if(Ab)return Rc(/Chrome\/([0-9.]+)/);if(Bb)return Rc(/Version\/([0-9.]+)/);if(xb||yb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ma());if(a)return a[1]+"."+a[2]}else{if(zb)return(a=Rc(/Android\s+([0-9.]+)/))?a:Rc(/Version\/([0-9.]+)/);if(wb)return Rc(/Camino\/([0-9.]+)/)}return""}();var Tc,Uc;function Vc(a){return Wc?Tc(a):w?0<=ja(cb,a):ab(a)}function Xc(a){Wc?Uc(a):zb?ja(Yc,a):ja(Sc,a)} +var Wc=function(){if(!x)return!1;var a=n.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;Tc=function(a){return 0<=d.ha(e,""+a)};Uc=function(a){d.ha(f,""+a)};return!0}(),Zc;if(zb){var $c=/Android\s+([0-9\.]+)/.exec(Ma());Zc=$c?$c[1]:"0"}else Zc="0"; +var Yc=Zc,ad=w&&!(w&&9<=cb);zb&&Xc(2.3);zb&&Xc(4);Bb&&Xc(6);function W(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}W.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};W.prototype.contains=function(a){return this&&a?a instanceof W?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +W.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};W.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +W.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function X(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}X.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};X.prototype.contains=function(a){return a instanceof X?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +X.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};X.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +X.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function bd(a,b){var c=y(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}var cd={thin:2,medium:4,thick:6}; +function dd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in cd)d=cd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function ed(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function fd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return ed(a)?a:null} +function gd(a,b){var c=ka(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=ad?"styleFloat":"cssFloat";var d=bd(a,c)||hd(a,c);if(null===d)d=null;else if(ra(va,c)){b:{var e=d.match(ya);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(za))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=ua[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(wa,"#$1$1$2$2$3$3")),!xa.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function hd(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&"function"==aa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=fd(a))?hd(c,b):null} +function id(a,b){function c(a){var b=gd(a,"position");if("fixed"==b)return G=!0,a==k?null:k;for(a=fd(a);a&&a!=k&&(0==gd(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==gd(a,"position"));)a=fd(a);return a}function d(a){var b=a;if("visible"==K)if(a==k&&q)b=q;else if(a==q)return{x:"visible",y:"visible"};b={x:gd(b,"overflow-x"),y:gd(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new nb(g)).ia;a=Pa||"CSS1Compat"!= +b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=w&&ab("10")&&b.pageYOffset!=a.scrollTop?new db(a.scrollLeft,a.scrollTop):new db(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new db(a.scrollLeft,a.scrollTop);return a}for(var f=jd(a,b),g=y(a),k=g.documentElement,q=g.body,K=gd(k,"overflow"),G,r=c(a);r;r=c(r)){var m=d(r);if("visible"!=m.x||"visible"!=m.y){var u=kd(r);if(0==u.width||0==u.height)return"hidden";var A=f.right<u.left,P=f.bottom<u.top; +if(A&&"hidden"==m.x||P&&"hidden"==m.y)return"hidden";if(A&&"visible"!=m.x||P&&"visible"!=m.y){A=e(r);P=f.bottom<u.top-A.y;if(f.right<u.left-A.x&&"visible"!=m.x||P&&"visible"!=m.x)return"hidden";f=id(r);return"hidden"==f?"hidden":"scroll"}A=f.left>=u.left+u.width;u=f.top>=u.top+u.height;if(A&&"hidden"==m.x||u&&"hidden"==m.y)return"hidden";if(A&&"visible"!=m.x||u&&"visible"!=m.y){if(G&&(m=e(r),f.left>=k.scrollWidth-m.x||f.right>=k.scrollHeight-m.y))return"hidden";f=id(r);return"hidden"==f?"hidden": +"scroll"}}}return"none"}var ld=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function kd(a){function b(a){var c=(y(a)?y(a).parentWindow||y(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(ld);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),G=parseFloat(c[3]),r=parseFloat(c[4]),m=parseFloat(c[5]),c=parseFloat(c[6]),u=f.left+f.width,A=f.top+f.height,P=f.left*d,d=u*d,Ea=f.left*e,e=u*e,Fa=f.top*G,G=A*G,Ga=f.top*r,u=A*r,A=P+Fa+m,r=Ea+Ga+c,Fa=d+Fa+m,Ga=e+Ga+c,P=P+G+m,Ea=Ea+u+c,m=d+G+m,c=e+u+c;f.left=Math.min(A,Fa,P,m);f.top=Math.min(r,Ga,Ea,c);m=Math.max(A,Fa, +P,m);c=Math.max(r,Ga,Ea,c);f.width=m-f.left;f.height=c-f.top}(a=fd(a))&&b(a)}var c=md(a);if(c)return c.rect;if(ed(a,"HTML"))return c=y(a),a=ib((c?c.parentWindow||c.defaultView:window)||window),new X(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new X(0,0,0,0)}var f=new X(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=y(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);v&&(0==f.width&& +0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));x&&!Vc(12)&&b(a);return f} +function md(a){var b=ed(a,"MAP");if(!b&&!ed(a,"AREA"))return null;var c=b?a:ed(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=V.qa('/descendant::*[@usemap = "#'+c.name+'"]',y(c)))&&(e=kd(d),!b&&"default"!=a.shape.toLowerCase())){var f=nd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new X(a+e.left,b+e.top,c,f)}return{sa:d,rect:e||new X(0,0,0,0)}} +function nd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new X(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new X(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 X(b,c,d-b,e-c)}return new X(0,0,0,0)} +function jd(a,b){var c;c=kd(a);c=new W(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof X?b:new X(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c};Pa||v||Wc&&Xc(3.6);w&&Vc(10);zb&&Xc(4);function Y(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y)for(d=od(a),pd(a),e=[],c=0;c<a.g.length;c++)e.push(a.t[a.g[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.A=0;Y.prototype.ea=0;function od(a){pd(a);return a.g.concat()} +Y.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.A--,this.ea++,this.g.length>2*this.A&&pd(this),!0):!1};function pd(a){if(a.A!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.A!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} +Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.A++,this.g.push(a),this.ea++);this.t[a]=b};var qd={};function Z(a,b,c){ca(a)&&(a=x?a.b:v?a.opera:a.c);a=new rd(a,b,c);!b||b in qd&&!c||(qd[b]={key:a,shift:!1},c&&(qd[c]={key:a,shift:!0}));return a}function rd(a,b,c){this.code=a;this.ga=b||null;this.va=c||this.ga}Z(8);Z(9);Z(13);var sd=Z(16),td=Z(17),ud=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var vd=Z(La?{b:91,c:91,opera:219}:Ka?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(La?{b:92,c:92,opera:220}:Ka?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(La?{b:93,c:93,opera:0}:Ka?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Sa?56:42},"*"); +Z({b:107,c:107,opera:Sa?61:43},"+");Z({b:109,c:109,opera:Sa?109:45},"-");Z({b:110,c:110,opera:Sa?190:78},".");Z({b:111,c:111,opera:Sa?191:47},"/");Z(Sa&&v?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var wd=new Y; +wd.set(1,sd);wd.set(2,td);wd.set(4,ud);wd.set(8,vd);(function(a){var b=new Y;t(od(a),function(c){b.set(a.get(c).code,c)});return b})(wd);x&&Vc(12);function xd(a,b){var c=id(a,b);if("scroll"!=c)return"none"==c;if(a.scrollIntoView&&(a.scrollIntoView(),"none"==id(a,b)))return!0;for(var c=jd(a,b),d=fd(a);d;d=fd(d)){var e=d,f=kd(e),g;var k=e;if(!w||w&&9<=cb)q=bd(k,"borderLeftWidth"),g=bd(k,"borderRightWidth"),K=bd(k,"borderTopWidth"),k=bd(k,"borderBottomWidth"),g=new W(parseFloat(K),parseFloat(g),parseFloat(k),parseFloat(q));else{var q=dd(k,"borderLeft");g=dd(k,"borderRight");var K=dd(k,"borderTop"),k=dd(k,"borderBottom");g=new W(K,g,k,q)}q=c.left- +f.left-g.left;f=c.top-f.top-g.top;g=e.clientHeight+c.top-c.bottom;e.scrollLeft+=Math.min(q,Math.max(q-(e.clientWidth+c.left-c.right),0));e.scrollTop+=Math.min(f,Math.max(f-g,0))}return"none"==id(a,b)};function yd(){this.I=void 0} +function zd(a,b,c){switch(typeof b){case "string":Ad(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],zd(a,a.I?a.I.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Ad(f,c),c.push(":"),zd(a,a.I?a.I.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Bd={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Cd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Ad(a,b){b.push('"',a.replace(Cd,function(a){if(a in Bd)return Bd[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Bd[a]=e+b.toString(16)}),'"')};Pa||v||x&&Vc(3.5)||w&&Vc(8);function Dd(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return na(a,Dd);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ed(a);return b}if("document"in a)return b={},b.WINDOW=Ed(a),b;if(ba(a))return na(a,Dd);a=fb(a,function(a,b){return"number"==typeof b||p(b)});return gb(a,Dd);default:return null}} +function Fd(a,b){return"array"==aa(a)?na(a,function(a){return Fd(a,b)}):ca(a)?"function"==typeof a?a:"ELEMENT"in a?Gd(a.ELEMENT,b):"WINDOW"in a?Gd(a.WINDOW,b):gb(a,function(a){return Fd(a,b)}):a}function Hd(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.Q=ha());b.Q||(b.Q=ha());return b}function Ed(a){var b=Hd(a.ownerDocument),c=hb(b,function(b){return b==a});c||(c=":wdc:"+b.Q++,b[c]=a);return c} +function Gd(a,b){a=decodeURIComponent(a);var c=b||document,d=Hd(c);if(!(a in d))throw new Aa(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new Aa(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new Aa(10,"Element is no longer attached to the DOM");};function Id(a,b){var c=[a,b],d=xd,e;try{var d=p(d)?new ia.Function(d):ia==window?d:new ia.Function("return ("+d+").apply(null,arguments);"),f=Fd(c,ia.document),g=d.apply(null,f);e={status:0,value:Dd(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];zd(new yd,e,c);return c.join("")}var Jd=["_"],$=n;Jd[0]in $||!$.execScript||$.execScript("var "+Jd[0]);for(var Kd;Jd.length&&(Kd=Jd.shift());)Jd.length||void 0===Id?$=$[Kd]?$[Kd]:$[Kd]={}:$[Kd]=Id;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/scroll_mouse.js b/src/ghostdriver/third_party/webdriver-atoms/scroll_mouse.js index e600df6cf..52a5bded1 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/scroll_mouse.js +++ b/src/ghostdriver/third_party/webdriver-atoms/scroll_mouse.js @@ -1,104 +1,115 @@ -function(){return function(){function g(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function p(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var m=this; 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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ea=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var v=window;function fa(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var q=d[h]||"",y=e[h]||"",B=RegExp("(\\d*)(\\D*)","g"),ka=RegExp("(\\d*)(\\D*)","g");do{var Z=B.exec(q)||["","",""],$=ka.exec(y)||["","",""];if(0==Z[0].length&&0==$[0].length)break;c=((0==Z[1].length?0:parseInt(Z[1],10))<(0==$[1].length?0:parseInt($[1],10))?-1:(0==Z[1].length?0:parseInt(Z[1],10))>(0==$[1].length? -0:parseInt($[1],10))?1:0)||((0==Z[2].length)<(0==$[2].length)?-1:(0==Z[2].length)>(0==$[2].length)?1:0)||(Z[2]<$[2]?-1:Z[2]>$[2]?1:0)}while(0==c)}return c}function ga(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ha=Array.prototype;function w(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var q=f[h];b.call(k,q,h,a)&&(d[e++]=q)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function la(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function ma(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function na(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:t(a)?a.charAt(c):a[c]}function oa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function pa(a){return ha.concat.apply(ha,arguments)} -function qa(a,b,c){return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};var ra={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return void 0!==a}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ea(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function fa(a,b,c){return a.call.apply(a.bind,arguments)} +function ga(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)}}function ha(a,b,c){ha=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return ha.apply(null,arguments)} +function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ja=Date.now||function(){return+new Date};function q(a,b){function c(){}c.prototype=b.prototype;a.Ua=b.prototype;a.prototype=new c};var ka=window;function la(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",z=RegExp("(\\d*)(\\D*)","g"),t=RegExp("(\\d*)(\\D*)","g");do{var n=z.exec(k)||["","",""],l=t.exec(r)||["","",""];if(0==n[0].length&&0==l[0].length)break;c=((0==n[1].length?0:parseInt(n[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==n[1].length?0:parseInt(n[1],10))>(0==l[1].length? +0:parseInt(l[1],10))?1:0)||((0==n[2].length)<(0==l[2].length)?-1:(0==n[2].length)>(0==l[2].length)?1:0)||(n[2]<l[2]?-1:n[2]>l[2]?1:0)}while(0==c)}return c}function ma(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var na=Array.prototype;function s(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function oa(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function pa(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function qa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;s(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ra(a,b){for(var c=a.length,d=p(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 sa(a,b){for(var c=a.length,d=p(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 ta(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function ua(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function va(a){return na.concat.apply(na,arguments)}function wa(a,b,c){return 2>=arguments.length?na.slice.call(a,b):na.slice.call(a,b,c)};var xa={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var sa="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ta=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function ua(a){va.test(a)||g(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(ta,"#$1$1$2$2$3$3"));return a.toLowerCase()}var va=/^#(?:[0-9a-f]{3}){1,2}$/i,wa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function xa(a){var b=a.match(wa);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var ya=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function x(a,b){this.code=a;this.state=Aa[a]||Ba;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(x,Error); -var Ba="unknown error",Aa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Aa[13]=Ba;Aa[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ca,Da,Ea,Fa,Ga,Ha;function Ia(){return r.navigator?r.navigator.userAgent:m}Fa=Ea=Da=Ca=n;var Ja;if(Ja=Ia()){var Ka=r.navigator;Ca=0==Ja.indexOf("Opera");Da=!Ca&&-1!=Ja.indexOf("MSIE");Ea=!Ca&&-1!=Ja.indexOf("WebKit");Fa=!Ca&&!Ea&&"Gecko"==Ka.product}var z=Ca,A=Da,C=Fa,D=Ea,La,Ma=r.navigator;La=Ma&&Ma.platform||"";Ga=-1!=La.indexOf("Mac");Ha=-1!=La.indexOf("Win");var Na=-1!=La.indexOf("Linux");function Oa(){var a=r.document;return a?a.documentMode:k}var Pa; -a:{var Qa="",Ra;if(z&&r.opera)var Sa=r.opera.version,Qa="function"==typeof Sa?Sa():Sa;else if(C?Ra=/rv\:([^\);]+)(\)|;)/:A?Ra=/MSIE\s+([^\);]+)(\)|;)/:D&&(Ra=/WebKit\/(\S+)/),Ra)var Ta=Ra.exec(Ia()),Qa=Ta?Ta[1]:"";if(A){var Ua=Oa();if(Ua>parseFloat(Qa)){Pa=String(Ua);break a}}Pa=Qa}var Va={};function Wa(a){return Va[a]||(Va[a]=0<=fa(Pa,a))}function E(a){return A&&Xa>=a}var Ya=r.document,Xa=!Ya||!A?k:Oa()||("CSS1Compat"==Ya.compatMode?parseInt(Pa,10):5);var Za;!C&&!A||A&&E(9)||C&&Wa("1.9.1");A&&Wa("9");var $a=A||z||D;function F(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}F.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function ab(a,b){this.width=a;this.height=b}ab.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};ab.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};ab.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};ab.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function bb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function cb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function db(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var eb=3;function fb(a){return a?new gb(G(a)):Za||(Za=new gb)}function hb(a){var b=!D&&ib(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new F(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function ib(a){return"CSS1Compat"==a.compatMode}function jb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function kb(a){if($a)return a.parentElement;a=a.parentNode;return da(a)&&1==a.nodeType?a:m} -function lb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function mb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!E(9)){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?nb(a,b):!c&&lb(e,b)?-1*ob(a,b):!d&&lb(f,a)?ob(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function ob(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return nb(d,a)}function nb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function pb(a,b){var c=[];return qb(a,b,c,l)?c[0]:k} -function qb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||qb(a,b,c,d))return l;a=a.nextSibling}return n}function rb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function gb(a){this.w=a||r.document||document}gb.prototype.ea=function(a){return t(a)?this.w.getElementById(a):a};function sb(a){return!D&&ib(a.w)?a.w.documentElement:a.w.body}gb.prototype.contains=lb;var tb,ub,vb,wb,xb,yb,zb;zb=yb=xb=wb=vb=ub=tb=n;var Ab=Ia();Ab&&(-1!=Ab.indexOf("Firefox")?tb=l:-1!=Ab.indexOf("Camino")?ub=l:-1!=Ab.indexOf("iPhone")||-1!=Ab.indexOf("iPod")?vb=l:-1!=Ab.indexOf("iPad")?wb=l:-1!=Ab.indexOf("Android")?xb=l:-1!=Ab.indexOf("Chrome")?yb=l:-1!=Ab.indexOf("Safari")&&(zb=l));var Bb=tb,Cb=ub,Db=vb,Eb=wb,Fb=xb,Gb=yb,Hb=zb;function Ib(a,b,c){this.f=a;this.Ba=b||1;this.n=c||1};var Jb=A&&!E(9),Kb=A&&!E(8);function Lb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Mb(a,b,c){var d=Kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Lb(b,a,b.nodeName,d,c)};function Nb(a){this.$=a;this.K=0}function Ob(a){a=a.match(Pb);for(var b=0;b<a.length;b++)Qb.test(a[b])&&a.splice(b,1);return new Nb(a)}var Pb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Qb=/^\s/;function H(a,b){return a.$[a.K+(b||0)]}Nb.prototype.next=function(){return this.$[this.K++]};Nb.prototype.back=function(){this.K--};Nb.prototype.empty=function(){return this.$.length<=this.K};function I(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Jb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Jb&&"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} -function Rb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Kb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Sb(a,b,c,d,e){return(Jb?Tb:Ub).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new J)} -function Tb(a,b,c,d,e){if(a instanceof Vb||8==a.e||c&&a.e===m){var f=b.all;if(!f)return e;a=Wb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],q=0;b=f[q++];)Rb(b,c,d)&&h.push(b);f=h}for(q=0;b=f[q++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}Xb(a,b,c,d,e);return e} -function Ub(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof K?Xb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){Rb(a,c,d)&&e.add(a)}));return e} -function Yb(a,b,c,d,e){var f;if((a instanceof Vb||8==a.e||c&&a.e===m)&&(f=b.childNodes)){var h=Wb(a);if("*"!=h&&(f=ia(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=ia(f,function(a){return Rb(a,c,d)}));w(f,function(a){("*"!=h||"!"!=a.tagName&&!("*"==h&&1!=a.nodeType))&&e.add(a)});return e}return Zb(a,b,c,d,e)}function Zb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Rb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function Xb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Rb(b,c,d)&&a.matches(b)&&e.add(b),Xb(a,b,c,d,e)}function Wb(a){if(a instanceof K){if(8==a.e)return"!";if(a.e===m)return"*"}return a.getName()};function J(){this.n=this.j=m;this.G=0}function $b(a){this.p=a;this.next=this.z=m}function ac(a,b){if(a.j){if(!b.j)return a}else return b;for(var c=a.j,d=b.j,e=m,f=m,h=0;c&&d;)c.p==d.p||c.p instanceof Lb&&d.p instanceof Lb&&c.p.f==d.p.f?(f=c,c=c.next,d=d.next):0<mb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.z=e)?e.next=f:a.j=f,e=f,h++;for(f=c||d;f;)f.z=e,e=e.next=f,h++,f=f.next;a.n=e;a.G=h;return a} -J.prototype.unshift=function(a){a=new $b(a);a.next=this.j;this.n?this.j.z=a:this.j=this.n=a;this.j=a;this.G++};J.prototype.add=function(a){a=new $b(a);a.z=this.n;this.j?this.n.next=a:this.j=this.n=a;this.n=a;this.G++};function bc(a){return(a=a.j)?a.p:m}J.prototype.r=p("G");function cc(a){return(a=bc(a))?I(a):""}function dc(a,b){return new ec(a,!!b)}function ec(a,b){this.ya=a;this.aa=(this.A=b)?a.n:a.j;this.W=m} -ec.prototype.next=function(){var a=this.aa;if(a==m)return m;var b=this.W=a;this.aa=this.A?a.z:a.next;return b.p};ec.prototype.remove=function(){var a=this.ya,b=this.W;b||g(Error("Next must be called at least once before remove."));var c=b.z,b=b.next;c?c.next=b:a.j=b;b?b.z=c:a.n=c;a.G--;this.W=m};function L(a){this.i=a;this.k=this.s=n;this.H=m}L.prototype.g=p("s");function fc(a,b){a.s=b}function gc(a,b){a.k=b}L.prototype.u=p("H");function M(a,b){var c=a.evaluate(b);return c instanceof J?+cc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?cc(c):""+c}function hc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.r():!!c};function ic(a,b,c){L.call(this,a.i);this.Z=a;this.fa=b;this.la=c;this.s=b.g()||c.g();this.k=b.k||c.k;this.Z==jc&&(!c.k&&!c.g()&&4!=c.i&&0!=c.i&&b.u()?this.H={name:b.u().name,B:c}:!b.k&&(!b.g()&&4!=b.i&&0!=b.i&&c.u())&&(this.H={name:c.u().name,B:b}))}u(ic,L); -function kc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof J&&c instanceof J){f=dc(b);for(b=f.next();b;b=f.next()){e=dc(c);for(d=e.next();d;d=e.next())if(a(I(b),I(d)))return l}return n}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=dc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+I(d);break;case "boolean":f=!!I(d);break;case "string":f=I(d);break;default:g(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}ic.prototype.evaluate=function(a){return this.Z.o(this.fa,this.la,a)};ic.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.Z+"\n";a+=" ";b+=this.fa.toString(a)+"\n";return b+=this.la.toString(a)};function lc(a,b,c,d){this.Aa=a;this.ja=b;this.i=c;this.o=d}lc.prototype.toString=p("Aa");var mc={}; -function O(a,b,c,d){a in mc&&g(Error("Binary operator already created: "+a));a=new lc(a,b,c,d);return mc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return kc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return kc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return kc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return kc(function(a,b){return a>=b},a,b,c)});var jc=O("=",3,2,function(a,b,c){return kc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return kc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return hc(a,c)&&hc(b,c)});O("or",1,2,function(a,b,c){return hc(a,c)||hc(b,c)});function nc(a,b){b.r()&&4!=a.i&&g(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));L.call(this,a.i);this.ka=a;this.d=b;this.s=a.g();this.k=a.k}u(nc,L);nc.prototype.evaluate=function(a){a=this.ka.evaluate(a);return oc(this.d,a)};nc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ka.toString(a);return b+=this.d.toString(a)};function pc(a,b){b.length<a.ha&&g(Error("Function "+a.l+" expects at least"+a.ha+" arguments, "+b.length+" given"));a.X!==m&&b.length>a.X&&g(Error("Function "+a.l+" expects at most "+a.X+" arguments, "+b.length+" given"));a.za&&w(b,function(b,d){4!=b.i&&g(Error("Argument "+d+" to function "+a.l+" is not of type Nodeset: "+b))});L.call(this,a.i);this.J=a;this.Q=b;fc(this,a.s||ma(b,function(a){return a.g()}));gc(this,a.xa&&!b.length||a.wa&&!!b.length||ma(b,function(a){return a.k}))}u(pc,L); -pc.prototype.evaluate=function(a){return this.J.o.apply(m,pa(a,this.Q))};pc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.J+"\n";b+=" ";this.Q.length&&(a+=b+"Arguments:",b+=" ",a=la(this.Q,function(a,d){return a+"\n"+d.toString(b)},a));return a};function qc(a,b,c,d,e,f,h,q,y){this.l=a;this.i=b;this.s=c;this.xa=d;this.wa=e;this.o=f;this.ha=h;this.X=s(q)?q:h;this.za=!!y}qc.prototype.toString=p("l");var rc={}; -function P(a,b,c,d,e,f,h,q){a in rc&&g(Error("Function already created: "+a+"."));rc[a]=new qc(a,b,c,d,n,e,f,h,q)}P("boolean",2,n,n,function(a,b){return hc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,n,n,function(a,b){var c=qa(arguments,1);return la(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).r()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(M(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Jb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return na(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];w(d,function(a){(a=c(a))&&!oa(f,a)&&f.push(a)});f.sort(mb);var h=new J;w(f,function(a){h.add(a)});return h},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&g(Error("Function last expects ()"));return a.n},0);P("local-name",3,n,l,function(a,b){var c=b?bc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?bc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):I(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!hc(b,a)},1);P("number",1,n,l,function(a,b){return b?M(b,a):+I(a.f)},0,1);P("position",1,l,n,function(a){return a.Ba},0);P("round",1,n,n,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):I(a.f)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):I(a.f)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=dc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,aa(l),0);function K(a,b){this.na=a;this.ga=s(b)?b:m;this.e=m;switch(a){case "comment":this.e=8;break;case "text":this.e=eb;break;case "processing-instruction":this.e=7;break;case "node":break;default:g(Error("Unexpected argument"))}}function sc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return this.e===m||this.e==a.nodeType};K.prototype.getName=p("na"); -K.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.na;this.ga===m||(b+="\n"+this.ga.toString(a+" "));return b};function tc(a){L.call(this,3);this.ma=a.substring(1,a.length-1)}u(tc,L);tc.prototype.evaluate=p("ma");tc.prototype.toString=function(a){return(a||"")+"literal: "+this.ma};function Vb(a){this.l=a.toLowerCase()}Vb.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.l||this.l==a.nodeName.toLowerCase()?l:this.l==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};Vb.prototype.getName=p("l");Vb.prototype.toString=function(a){return(a||"")+"nametest: "+this.l};function uc(a){L.call(this,1);this.oa=a}u(uc,L);uc.prototype.evaluate=p("oa");uc.prototype.toString=function(a){return(a||"")+"number: "+this.oa};function vc(a,b){L.call(this,a.i);this.ca=a;this.I=b;this.s=a.g();this.k=a.k;if(1==this.I.length){var c=this.I[0];!c.U&&c.t==wc&&(c=c.P,"*"!=c.getName()&&(this.H={name:c.getName(),B:m}))}}u(vc,L);function xc(){L.call(this,4)}u(xc,L);xc.prototype.evaluate=function(a){var b=new J;a=a.f;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};xc.prototype.toString=function(a){return a+"RootHelperExpr"};function yc(){L.call(this,4)}u(yc,L);yc.prototype.evaluate=function(a){var b=new J;b.add(a.f);return b}; -yc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -vc.prototype.evaluate=function(a){var b=this.ca.evaluate(a);b instanceof J||g(Error("FilterExpr must evaluate to nodeset."));a=this.I;for(var c=0,d=a.length;c<d&&b.r();c++){var e=a[c],f=dc(b,e.t.A),h;if(!e.g()&&e.t==zc){for(h=f.next();(b=f.next())&&(!h.contains||h.contains(b))&&b.compareDocumentPosition(h)&8;h=b);b=e.evaluate(new Ib(h))}else if(!e.g()&&e.t==Ac)h=f.next(),b=e.evaluate(new Ib(h));else{h=f.next();for(b=e.evaluate(new Ib(h));(h=f.next())!=m;)h=e.evaluate(new Ib(h)),b=ac(b,h)}}return b}; -vc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ca.toString(b);this.I.length&&(c+=b+"Steps:\n",b+=" ",w(this.I,function(a){c+=a.toString(b)}));return c};function Bc(a,b){this.d=a;this.A=!!b}function oc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=dc(b),f=b.r(),h,q=0;h=e.next();q++){var y=a.A?f-q:q+1;h=d.evaluate(new Ib(h,y,f));var B;"number"==typeof h?B=y==h:"string"==typeof h||"boolean"==typeof h?B=!!h:h instanceof J?B=0<h.r():g(Error("Predicate.evaluate returned an unexpected type."));B||e.remove()}return b}Bc.prototype.u=function(){return 0<this.d.length?this.d[0].u():m}; -Bc.prototype.g=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.g()||1==b.i||0==b.i)return l}return n};Bc.prototype.r=function(){return this.d.length};Bc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return la(this.d,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Cc(a,b,c,d){L.call(this,4);this.t=a;this.P=b;this.d=c||new Bc([]);this.U=!!d;b=this.d.u();a.Ea&&b&&(a=b.name,a=Jb?a.toLowerCase():a,this.H={name:a,B:b.B});this.s=this.d.g()}u(Cc,L); -Cc.prototype.evaluate=function(a){var b=a.f,c=m,c=this.u(),d=m,e=m,f=0;c&&(d=c.name,e=c.B?N(c.B,a):m,f=1);if(this.U)if(!this.g()&&this.t==Dc)c=Sb(this.P,b,d,e),c=oc(this.d,c,f);else if(a=dc((new Cc(Ec,new K("node"))).evaluate(a)),b=a.next())for(c=this.o(b,d,e,f);(b=a.next())!=m;)c=ac(c,this.o(b,d,e,f));else c=new J;else c=this.o(a.f,d,e,f);return c};Cc.prototype.o=function(a,b,c,d){a=this.t.J(this.P,a,b,c);return a=oc(this.d,a,d)}; -Cc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.U?"//":"/")+"\n";this.t.l&&(b+=a+"Axis: "+this.t+"\n");b+=this.P.toString(a);if(this.d.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.d.length;c++)var d=c<this.d.length-1?", ":"",b=b+(this.d[c].toString(a)+d);return b};function Fc(a,b,c,d){this.l=a;this.J=b;this.A=c;this.Ea=d}Fc.prototype.toString=p("l");var Gc={}; -function Q(a,b,c,d){a in Gc&&g(Error("Axis already created: "+a));b=new Fc(a,b,c,!!d);return Gc[a]=b}Q("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var wc=Q("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&Jb)return c.add(new Lb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof K&&a.e===m||"*"==d)for(var d=b.sourceIndex,f=0,h;h=e[f];f++)Jb?h.nodeValue&&c.add(Mb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(Jb?h.nodeValue&&c.add(Mb(b,h,b.sourceIndex)):c.add(h));return c},n),Dc=Q("child",function(a,b,c,d,e){return(Jb?Yb:Zb).call(m,a,b,t(c)?c:m,t(d)?d:m,e||new J)},n,l); -Q("descendant",Sb,n,l);var Ec=Q("descendant-or-self",function(a,b,c,d){var e=new J;Rb(b,c,d)&&a.matches(b)&&e.add(b);return Sb(a,b,c,d,e)},n,l),zc=Q("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)Rb(f,c,d)&&a.matches(f)&&e.add(f),e=Sb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new J},n); -var Hc=Q("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Ac=Q("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,q=f.length;h<q;h++){var y=[];for(b=f[h];b=b.previousSibling;)y.unshift(b);for(var B=0,ka=y.length;B<ka;B++)b=y[B],Rb(b,c,d)&&a.matches(b)&&e.add(b),e=Sb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Ic=Q("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},n);function Jc(a){L.call(this,1);this.ba=a;this.s=a.g();this.k=a.k}u(Jc,L);Jc.prototype.evaluate=function(a){return-M(this.ba,a)};Jc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ba.toString(a+" ")};function Kc(a){L.call(this,4);this.M=a;fc(this,ma(this.M,function(a){return a.g()}));gc(this,ma(this.M,function(a){return a.k}))}u(Kc,L);Kc.prototype.evaluate=function(a){var b=new J;w(this.M,function(c){c=c.evaluate(a);c instanceof J||g(Error("PathExpr must evaluate to NodeSet."));b=ac(b,c)});return b};Kc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";w(this.M,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Lc(a){this.a=a}function Mc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Nc(a);var d=a.a.next();if(!d)break;var e=(d=mc[d]||m)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ja;)b=new ic(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new ic(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&g(Error(b))}function Oc(a,b){var c=a.a.next();c!=b&&g(Error("Bad token, expected: "+b+" got: "+c))} -function Pc(a){a=a.a.next();")"!=a&&g(Error("Bad token: "+a))}function Qc(a){a=a.a.next();2>a.length&&g(Error("Unclosed literal string"));return new tc(a)}function Rc(a){return"*"!=H(a.a)&&":"==H(a.a,1)&&"*"==H(a.a,2)?new Vb(a.a.next()+a.a.next()+a.a.next()):new Vb(a.a.next())} -function Sc(a){var b,c=[],d;if("/"==H(a.a)||"//"==H(a.a)){b=a.a.next();d=H(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new xc;d=new xc;R(a,"Missing next location step.");b=Tc(a,b);c.push(b)}else{a:{b=H(a.a);d=b.charAt(0);switch(d){case "$":g(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Mc(a);R(a,'unclosed "("');Oc(a,")");break;case '"':case "'":b=Qc(a);break;default:if(isNaN(+b))if(!sc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==H(a.a,1)){b=a.a.next();b=rc[b]||m;a.a.next();for(d=[];")"!=H(a.a);){R(a,"Missing function argument list.");d.push(Mc(a));if(","!=H(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Pc(a);b=new pc(b,d)}else{b=m;break a}else b=new uc(+a.a.next())}"["==H(a.a)&&(d=new Bc(Uc(a)),b=new nc(b,d))}if(b)if("/"==H(a.a)||"//"==H(a.a))d=b;else return b;else b=Tc(a,"/"),d=new yc,c.push(b)}for(;"/"==H(a.a)||"//"==H(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Tc(a,b),c.push(b);return new vc(d, -c)} -function Tc(a,b){var c,d,e;"/"!=b&&"//"!=b&&g(Error('Step op should be "/" or "//"'));if("."==H(a.a))return d=new Cc(Ic,new K("node")),a.a.next(),d;if(".."==H(a.a))return d=new Cc(Hc,new K("node")),a.a.next(),d;var f;"@"==H(a.a)?(f=wc,a.a.next(),R(a,"Missing attribute name")):"::"==H(a.a,1)?(/(?![0-9])[\w]/.test(H(a.a).charAt(0))||g(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Gc[e]||m)||g(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Dc;e=H(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==H(a.a, -1)){sc(e)||g(Error("Invalid node type: "+e));c=a.a.next();sc(c)||g(Error("Invalid type name: "+c));Oc(a,"(");R(a,"Bad nodetype");e=H(a.a).charAt(0);var h=m;if('"'==e||"'"==e)h=Qc(a);R(a,"Bad nodetype");Pc(a);c=new K(c,h)}else c=Rc(a);else"*"==e?c=Rc(a):g(Error("Bad token: "+a.a.next()));e=new Bc(Uc(a),f.A);return d||new Cc(f,c,e,"//"==b)} -function Uc(a){for(var b=[];"["==H(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Mc(a);b.push(c);R(a,"Unclosed predicate expression.");Oc(a,"]")}return b}function Nc(a){if("-"==H(a.a))return a.a.next(),new Jc(Nc(a));var b=Sc(a);if("|"!=H(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Sc(a));a.a.back();a=new Kc(b)}return a};function Vc(a){a.length||g(Error("Empty XPath expression."));a=Ob(a);a.empty()&&g(Error("Invalid XPath expression."));var b=Mc(new Lc(a));a.empty()||g(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Ib(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof J?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:g(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof J))&&g(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof J?cc(a):""+a;break;case 1:this.numberValue=a instanceof J?+cc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.r():!!a;break;case 4:case 5:case 6:case 7:var d=dc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Lb?e.f:e);this.snapshotLength=a.r();this.invalidIteratorState=n;break;case 8:case 9:d=bc(a);this.singleNodeValue=d instanceof Lb?d.f:d;break;default:g(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&g(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&g(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function Wc(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new Vc(a)).evaluate(b,f)},b.createExpression=function(a){return new Vc(a)})};var T={};T.qa=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.o=function(a,b,c){var d=G(a);(A||Fb)&&Wc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.qa;return A&&!Wa(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){C&&"NS_ERROR_ILLEGAL_VALUE"==f.name||g(new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.T=function(a,b){(!a||1!=a.nodeType)&&g(new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Da=function(a,b){var c=function(){var c=T.o(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.T(c,a);return c}; -T.Ka=function(a,b){var c=function(){var c=T.o(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&T.T(m,a);for(var f=[],h=0;h<e;++h)f.push(c.snapshotItem(h));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){T.T(b,a)});return c};function Xc(a){return(a=a.exec(Ia()))?a[1]:""}var Yc=function(){if(Bb)return Xc(/Firefox\/([0-9.]+)/);if(A||z)return Pa;if(Gb)return Xc(/Chrome\/([0-9.]+)/);if(Hb)return Xc(/Version\/([0-9.]+)/);if(Db||Eb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ia());if(a)return a[1]+"."+a[2]}else{if(Fb)return(a=Xc(/Android\s+([0-9.]+)/))?a:Xc(/Version\/([0-9.]+)/);if(Cb)return Xc(/Camino\/([0-9.]+)/)}return""}();var Zc,$c;function ad(a){return bd?Zc(a):A?0<=fa(Xa,a):Wa(a)}function cd(a){bd?$c(a):Fb?fa(dd,a):fa(Yc,a)} -var bd=function(){if(!C)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;Zc=function(a){return 0<=d.sa(e,""+a)};$c=function(a){d.sa(f,""+a)};return l}(),ed;if(Fb){var fd=/Android\s+([0-9\.]+)/.exec(Ia());ed=fd?fd[1]:"0"}else ed="0"; -var dd=ed,gd=A&&!E(8),hd=E(9),id=A&&!E(9),jd=E(10),kd=A&&!E(10);Fb&&cd(2.3);!z&&(!D||ad("533"));function ld(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}ld.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};ld.prototype.contains=function(a){return!this||!a?n:a instanceof ld?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function md(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function nd(a,b){return md(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function od(a){a=a?G(a):document;var b;if(b=A)if(b=!E(9))b=fb(a),b=!ib(b.w);return b?a.body:a.documentElement} -function pd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function qd(a){if(A&&!E(8))return a.offsetParent;var b=G(a),c=nd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=nd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function rd(a){var b,c=G(a),d=nd(a,"position"),e=C&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new F(0,0),h=od(c);if(a==h)return f;if(a.getBoundingClientRect)b=pd(a),a=fb(c),a=hb(a.w),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(D&&"fixed"==nd(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||D&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=qd(b))&&b!=c.body&&b!=h;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function sd(a){var b=new F;if(1==a.nodeType){if(a.getBoundingClientRect){var c=pd(a);b.x=c.left;b.y=c.top}else{var c=fb(a),c=hb(c.w),d=rd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(C&&!Wa(12)){var e;A?e="-ms-transform":D?e="-webkit-transform":z?e="-o-transform":C&&(e="-moz-transform");var f;e&&(f=nd(a,e));f||(f=nd(a,"transform"));f?(a=f.match(td),a=!a?new F(0,0):new F(parseFloat(a[1]),parseFloat(a[2]))):a=new F(0,0);b=new F(b.x+a.x,b.y+a.y)}}else e="function"==ba(a.da),f=a,a.targetTouches?f=a.targetTouches[0]: -e&&a.da().targetTouches&&(f=a.da().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function ud(a){if("none"!=nd(a,"display"))return vd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=vd(a);b.display=c;b.position=e;b.visibility=d;return a}function vd(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=pd(a),new ab(a.right-a.left,a.bottom-a.top)):new ab(b,c)} -var wd={thin:2,medium:4,thick:6};function xd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in wd)d=wd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var td=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function yd(a){return zd(a,l)&&Ad(a)&&!(A||z||C&&!ad("1.9.2")?0:"none"==V(a,"pointer-events"))}var Bd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Cd(a){var b=[];w(a.split(Bd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Dd(a){var b;b="usemap";return"style"==b?Cd(a.style.cssText):gd&&"value"==b&&U(a,"INPUT")?a.value:id&&a[b]===l?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:m}var Ed="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Ad(a){var b=a.tagName.toUpperCase();return!oa(Ed,b)?l:a.disabled?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Ad(a.parentNode):rb(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&b.disabled){if(!U(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:jb(a.previousSibling);)if(U(a,"LEGEND"))return l}return n},l)?n:l}function Fd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:m} -function V(a,b){var c=ga(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=id?"styleFloat":"cssFloat";c=md(a,c)||Gd(a,c);if(c===m)c=m;else if(oa(sa,b)&&(va.test("#"==c.charAt(0)?c:"#"+c)||za(c).length||ra&&ra[c.toLowerCase()]||xa(c).length)){var d=xa(c);if(!d.length){a:if(d=za(c),!d.length){d=ra[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(va.test(d)&&(d=ua(d),d=ua(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Gd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=Fd(a))?Gd(c,b):m} -function Hd(a){if("function"==ba(a.getBBox)&&!U(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,"BODY")){b=(G(a)?G(a).parentWindow||G(a).defaultView:window)||k;"hidden"!=V(a,"overflow")?a=l:(a=Fd(a),!a||!U(a,"HTML")?a=l:(a=V(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||v).document;var b=a.documentElement,d=a.body;d||g(new x(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth, -b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m,a);b=new ab(b,a)}else b=(b||window).document,b=ib(b)?b.documentElement:b.body,b=new ab(b.clientWidth,b.clientHeight);return b}return ud(a)} -function zd(a,b){function c(a){if("none"==V(a,"display"))return n;a=Fd(a);return!a||c(a)}function d(a){var b=Hd(a);return 0<b.height&&0<b.width?l:U(a,"PATH")&&(0<b.height||0<b.width)?(b=V(a,"stroke-width"),!!b&&0<parseInt(b,10)):ma(a.childNodes,function(b){return b.nodeType==eb&&"hidden"!=V(a,"overflow")||U(b)&&d(b)})}function e(a,b){var c;if((c=b==m?kb(a):kb(b))&&("hidden"==V(c,"overflow-x")||"hidden"==V(c,"overflow-y"))){var d=Hd(c),f=sd(c),h=sd(a);return f.x+d.width<=h.x&&"hidden"==V(c,"overflow-x")|| -f.y+d.height<=h.y&&"hidden"==V(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=V(a,"-o-transform")||V(a,"-webkit-transform")||V(a,"-ms-transform")||V(a,"-moz-transform")||V(a,"transform");if(b&&"none"!==b)return b=sd(a),a=Hd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Fd(a);return!a||f(a)}U(a)||g(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var h=rb(a,function(a){return U(a,"SELECT")});return!!h&&zd(h,l)}if(U(a,"MAP")){if(!a.name)return n;h=G(a);h= -h.evaluate?T.Da('/descendant::*[@usemap = "#'+a.name+'"]',h):pb(h,function(b){return U(b)&&Dd(b)=="#"+a.name});return!!h&&zd(h,b)}return U(a,"AREA")?(h=rb(a,function(a){return U(a,"MAP")}),!!h&&zd(h,b)):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Id(a)||!d(a)||!e(a,m)?n:f(a)} -function Id(a){if(kd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Jd(a)}function Jd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Fd(a))&&(b*=Jd(a));return b};function Kd(a){this.m=v.document.documentElement;this.q=m;var b;a:{var c=G(this.m);try{b=c&&c.activeElement;break a}catch(d){}b=m}b&&Ld(this,b);this.L=a||new Md}Kd.prototype.ea=p("m");function Ld(a,b){a.m=b;a.q=U(b,"OPTION")?rb(b,function(a){return U(a,"SELECT")}):m} -function Nd(a,b){if(A)switch(b){case Od:case Pd:return m;case Qd:case Rd:case Sd:return a.q.multiple?a.q:m;default:return a.q}if(z)switch(b){case Qd:case Od:return a.q.multiple?a.m:m;default:return a.m}if(D)switch(b){case Td:case Ud:return a.q.multiple?a.m:a.q;default:return a.q.multiple?a.m:m}return a.m}D||z||bd&&cd(3.6);function Md(){this.N=0};!A||ad(10);Fb&&cd(4);var Vd=A&&v.navigator.msPointerEnabled;function Wd(a,b,c){this.e=a;this.R=b;this.S=c}Wd.prototype.create=function(a){a=G(a);id?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.R,this.S));return a};Wd.prototype.toString=p("e");function W(a,b,c){Wd.call(this,a,b,c)}u(W,Wd); -W.prototype.create=function(a,b){!C&&this==Xd&&g(new x(9,"Browser does not support a mouse pixel scroll event."));var c=G(a),d;if(id){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Yd||this==Od)Object.defineProperty?(c=this==Yd,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==Zd&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=c?c.parentWindow||c.defaultView:window;d=c.createEvent("MouseEvents");c=1;if(this==Zd&&(C||(d.wheelDelta=b.wheelDelta),C||z))c=b.wheelDelta/-40;C&&this==Xd&&(c=b.wheelDelta);d.initMouseEvent(this.e,this.R,this.S,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=sb(fb(a)),c=od(a),f=b.clientX+ -e.scrollLeft-c.clientLeft,h=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return h}})}}return d};function $d(a,b,c){Wd.call(this,a,b,c)}u($d,Wd); -$d.prototype.create=function(a,b){Vd||g(new x(9,"Browser does not support MSPointer events."));var c=G(a),d=c?c.parentWindow||c.defaultView:window,c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.R,this.S,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ca,b.rotation,b.Fa,b.Ga,b.pointerId,b.pointerType,0,b.va);return c}; -var Td=new W("click",l,l),Qd=new W("contextmenu",l,l),ae=new W("dblclick",l,l),be=new W("mousedown",l,l),Rd=new W("mousemove",l,n),Yd=new W("mouseout",l,l),Od=new W("mouseover",l,l),Ud=new W("mouseup",l,l),Zd=new W(C?"DOMMouseScroll":"mousewheel",l,l),Xd=new W("MozMousePixelScroll",l,l),ce=new $d("MSPointerDown",l,l),Sd=new $d("MSPointerMove",l,l),Pd=new $d("MSPointerOver",l,l),de=new $d("MSPointerOut",l,l),ee=new $d("MSPointerUp",l,l); -function fe(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return id?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function ge(a,b){this.v={};this.h=[];var c=arguments.length;if(1<c){c%2&&g(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ge){d=he(a);ie(a);e=[];for(c=0;c<a.h.length;c++)e.push(a.v[a.h[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ge.prototype.F=0;ge.prototype.pa=0;function he(a){ie(a);return a.h.concat()} -ge.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.v,a)?(delete this.v[a],this.F--,this.pa++,this.h.length>2*this.F&&ie(this),l):n};function ie(a){if(a.F!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.v,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.F!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}} -ge.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.v,a)?this.v[a]:b};ge.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.v,a)||(this.F++,this.h.push(a),this.pa++);this.v[a]=b};var je={};function X(a,b,c){da(a)&&(a=C?a.b:z?a.opera:a.c);a=new ke(a,b,c);if(b&&(!(b in je)||c))je[b]={key:a,shift:n},c&&(je[c]={key:a,shift:l});return a}function ke(a,b,c){this.code=a;this.ra=b||m;this.Sa=c||this.ra}X(8);X(9);X(13);var le=X(16),me=X(17),ne=X(18);X(19);X(20);X(27);X(32," ");X(33);X(34);X(35);X(36);X(37);X(38);X(39);X(40);X(44);X(45);X(46);X(48,"0",")");X(49,"1","!");X(50,"2","@");X(51,"3","#");X(52,"4","$");X(53,"5","%");X(54,"6","^");X(55,"7","&");X(56,"8","*");X(57,"9","("); -X(65,"a","A");X(66,"b","B");X(67,"c","C");X(68,"d","D");X(69,"e","E");X(70,"f","F");X(71,"g","G");X(72,"h","H");X(73,"i","I");X(74,"j","J");X(75,"k","K");X(76,"l","L");X(77,"m","M");X(78,"n","N");X(79,"o","O");X(80,"p","P");X(81,"q","Q");X(82,"r","R");X(83,"s","S");X(84,"t","T");X(85,"u","U");X(86,"v","V");X(87,"w","W");X(88,"x","X");X(89,"y","Y");X(90,"z","Z");var oe=X(Ha?{b:91,c:91,opera:219}:Ga?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -X(Ha?{b:92,c:92,opera:220}:Ga?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});X(Ha?{b:93,c:93,opera:0}:Ga?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});X({b:96,c:96,opera:48},"0");X({b:97,c:97,opera:49},"1");X({b:98,c:98,opera:50},"2");X({b:99,c:99,opera:51},"3");X({b:100,c:100,opera:52},"4");X({b:101,c:101,opera:53},"5");X({b:102,c:102,opera:54},"6");X({b:103,c:103,opera:55},"7");X({b:104,c:104,opera:56},"8");X({b:105,c:105,opera:57},"9");X({b:106,c:106,opera:Na?56:42},"*");X({b:107,c:107,opera:Na?61:43},"+"); -X({b:109,c:109,opera:Na?109:45},"-");X({b:110,c:110,opera:Na?190:78},".");X({b:111,c:111,opera:Na?191:47},"/");X(Na&&z?m:144);X(112);X(113);X(114);X(115);X(116);X(117);X(118);X(119);X(120);X(121);X(122);X(123);X({b:107,c:187,opera:61},"=","+");X(108,",");X({b:109,c:189,opera:109},"-","_");X(188,",","<");X(190,".",">");X(191,"/","?");X(192,"`","~");X(219,"[","{");X(220,"\\","|");X(221,"]","}");X({b:59,c:186,opera:59},";",":");X(222,"'",'"');var pe=new ge;pe.set(1,le);pe.set(2,me);pe.set(4,ne); -pe.set(8,oe);(function(a){var b=new ge;w(he(a),function(c){b.set(a.get(c).code,c)});return b})(pe);C&&ad(12);function qe(a,b){Kd.call(this,b);this.ua=this.C=m;this.D=new F(0,0);this.V=this.ia=n;if(a){this.C=a.Ha;try{U(a.ta)&&(this.ua=a.ta)}catch(c){this.C=m}this.D=a.Ia;this.ia=a.Qa;this.V=a.Ja;try{U(a.element)&&Ld(this,a.element)}catch(d){this.C=m}}}u(qe,Kd);var Y={}; -id?(Y[Td]=[0,0,0,m],Y[Qd]=[m,m,0,m],Y[Ud]=[1,4,2,m],Y[Yd]=[0,0,0,0],Y[Rd]=[1,4,2,0]):D||hd?(Y[Td]=[0,1,2,m],Y[Qd]=[m,m,2,m],Y[Ud]=[0,1,2,m],Y[Yd]=[0,1,2,0],Y[Rd]=[0,1,2,0]):(Y[Td]=[0,1,2,m],Y[Qd]=[m,m,2,m],Y[Ud]=[0,1,2,m],Y[Yd]=[0,0,0,0],Y[Rd]=[0,0,0,0]);jd&&(Y[ce]=Y[Ud],Y[ee]=Y[Ud],Y[Sd]=[-1,-1,-1,-1],Y[de]=Y[Sd],Y[Pd]=Y[Sd]);Y[ae]=Y[Td];Y[be]=Y[Ud];Y[Od]=Y[Yd];var re={La:ce,Ma:Sd,Na:de,Oa:Pd,Pa:ee}; -qe.prototype.move=function(a,b){var c=yd(a),d=sd(a);this.D.x=b.x+d.x;this.D.y=b.y+d.y;d=this.ea();if(a!=d){try{(G(d)?G(d).parentWindow||G(d).defaultView:window).closed&&(d=m)}catch(e){d=m}if(d){var f=d===v.document.documentElement||d===v.document.body,d=!this.V&&f?m:d;se(this,Yd,a)}Ld(this,a);A||se(this,Od,d,m,c)}se(this,Rd,m,m,c);A&&a!=d&&se(this,Od,d,m,c);this.ia=n}; -qe.prototype.scroll=function(a){0==a&&g(new x(13,"Must scroll a non-zero number of ticks."));for(var b=0<a?-120:120,c=0<a?57:-57,d=0;d<Math.abs(a);d++)se(this,Zd,m,b),C&&se(this,Xd,m,c)}; -function se(a,b,c,d,e){a.V=l;if(jd){var f=re[b],h;if(h=f){h=a.D;var q=te(a,f),y=MSPointerEvent.MSPOINTER_TYPE_MOUSE;!e&&!yd(a.m)?f=n:(c&&!(Pd==f||de==f)&&g(new x(12,"Event type does not allow related target: "+f)),h={clientX:h.x,clientY:h.y,button:q,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:c||m,width:0,height:0,Ca:0,rotation:0,pointerId:1,Fa:0,Ga:0,pointerType:y,va:l},f=(q=a.q?Nd(a,f):a.m)?fe(q,f,h):l);h=!f}if(h)return}f=a.D;h=te(a,b);if(e||yd(a.m))c&&!(Od==b||Yd==b)&&g(new x(12,"Event type does not allow related target: "+ -b)),c={clientX:f.x,clientY:f.y,button:h,altKey:0!=(a.L.N&4),ctrlKey:0!=(a.L.N&2),shiftKey:0!=(a.L.N&1),metaKey:0!=(a.L.N&8),wheelDelta:d||0,relatedTarget:c||m},(a=a.q?Nd(a,b):a.m)&&fe(a,b,c)}function te(a,b){if(!(b in Y))return 0;var c=Y[b][a.C===m?3:a.C];c===m&&g(new x(13,"Event does not permit the specified mouse button."));return c};function ue(a,b){this.x=a;this.y=b}u(ue,F);ue.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ve(a,b,c,d){zd(a,l)||g(new x(11,"Element is not currently visible and may not be manipulated"));var e=G(a),e=D?e.body:e.documentElement,f;f=rd(a);var h=rd(e),q;if(A){var y=xd(e,"borderLeft");q=xd(e,"borderRight");var B=xd(e,"borderTop"),ka=xd(e,"borderBottom");q=new ld(B,q,ka,y)}else y=md(e,"borderLeftWidth"),q=md(e,"borderRightWidth"),B=md(e,"borderTopWidth"),ka=md(e,"borderBottomWidth"),q=new ld(parseFloat(B),parseFloat(q),parseFloat(ka),parseFloat(y));y=f.x-h.x-q.left;f=f.y-h.y-q.top; -h=e.clientHeight-a.offsetHeight;q=e.scrollLeft;B=e.scrollTop;q+=Math.min(y,Math.max(y-(e.clientWidth-a.offsetWidth),0));B+=Math.min(f,Math.max(f-h,0));f=new F(q,B);e.scrollLeft=f.x;e.scrollTop=f.y;c?c=new ue(c.x,c.y):(c=we(a),c=new ue(c.width/2,c.height/2));d=d||new qe;d.move(a,c);d.scroll(b)}function we(a){var b=ud(a);return 0<b.width&&0<b.height||!a.offsetParent?b:we(a.offsetParent)};function xe(){this.O=k} -function ye(a,b,c){switch(typeof b){case "string":ze(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],ye(a,a.O?a.O.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),ze(f, -c),c.push(":"),ye(a,a.O?a.O.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:g(Error("Unknown type: "+typeof b))}}var Ae={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Be=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function ze(a,b){b.push('"',a.replace(Be,function(a){if(a in Ae)return Ae[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ae[a]=e+b.toString(16)}),'"')};D||z||C&&ad(3.5)||A&&ad(8);function Ce(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,Ce);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=De(a);return b}if("document"in a)return b={},b.WINDOW=De(a),b;if(ca(a))return ja(a,Ce);a=bb(a,function(a,b){return"number"==typeof b||t(b)});return cb(a,Ce);default:return m}} -function Ee(a,b){return"array"==ba(a)?ja(a,function(a){return Ee(a,b)}):da(a)?"function"==typeof a?a:"ELEMENT"in a?Fe(a.ELEMENT,b):"WINDOW"in a?Fe(a.WINDOW,b):cb(a,function(a){return Ee(a,b)}):a}function Ge(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.Y=ea());b.Y||(b.Y=ea());return b}function De(a){var b=Ge(a.ownerDocument),c=db(b,function(b){return b==a});c||(c=":wdc:"+b.Y++,b[c]=a);return c} -function Fe(a,b){a=decodeURIComponent(a);var c=b||document,d=Ge(c);a in d||g(new x(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],g(new x(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];g(new x(10,"Element is no longer attached to the DOM"))};function He(a,b,c){a=[a,b,c];b=ve;var d;try{b=t(b)?new v.Function(b):v==window?b:new v.Function("return ("+b+").apply(null,arguments);");var e=Ee(a,v.document),f=b.apply(m,e);d={status:0,value:Ce(f)}}catch(h){d={status:"code"in h?h.code:13,value:{message:h.message}}}e=[];ye(new xe,d,e);return e.join("")}var Ie=["_"],Je=r;!(Ie[0]in Je)&&Je.execScript&&Je.execScript("var "+Ie[0]);for(var Ke;Ie.length&&(Ke=Ie.shift());)!Ie.length&&s(He)?Je[Ke]=He:Je=Je[Ke]?Je[Ke]:Je[Ke]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var ya="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),za=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Aa=/^#(?:[0-9a-f]{3}){1,2}$/i,Ba=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ca=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function u(a,b){this.code=a;this.state=Da[a]||Ea;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}q(u,Error); +var Ea="unknown error",Da={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Da[13]=Ea;Da[9]="unknown command";u.prototype.toString=function(){return this.name+": "+this.message};var Fa,Ga,Ha,Ia,Ja,Ka;function La(){return m.navigator?m.navigator.userAgent:null}Ia=Ha=Ga=Fa=!1;var Ma;if(Ma=La()){var Na=m.navigator;Fa=0==Ma.indexOf("Opera");Ga=!Fa&&-1!=Ma.indexOf("MSIE");Ha=!Fa&&-1!=Ma.indexOf("WebKit");Ia=!Fa&&!Ha&&"Gecko"==Na.product}var v=Fa,w=Ga,x=Ia,Oa=Ha,Pa,Qa=m.navigator;Pa=Qa&&Qa.platform||"";Ja=-1!=Pa.indexOf("Mac");Ka=-1!=Pa.indexOf("Win");var Ra=-1!=Pa.indexOf("Linux");function Sa(){var a=m.document;return a?a.documentMode:void 0}var Ta; +a:{var Ua="",Va;if(v&&m.opera)var Wa=m.opera.version,Ua="function"==typeof Wa?Wa():Wa;else if(x?Va=/rv\:([^\);]+)(\)|;)/:w?Va=/MSIE\s+([^\);]+)(\)|;)/:Oa&&(Va=/WebKit\/(\S+)/),Va)var Xa=Va.exec(La()),Ua=Xa?Xa[1]:"";if(w){var ab=Sa();if(ab>parseFloat(Ua)){Ta=String(ab);break a}}Ta=Ua}var bb={};function cb(a){return bb[a]||(bb[a]=0<=la(Ta,a))}function A(a){return w&&db>=a}var eb=m.document,db=eb&&w?Sa()||("CSS1Compat"==eb.compatMode?parseInt(Ta,10):5):void 0;var fb;!x&&!w||w&&A(9)||x&&cb("1.9.1");w&&cb("9");function B(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0}B.prototype.toString=function(){return"("+this.x+", "+this.y+")"};B.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};B.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};B.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function gb(a,b){this.width=a;this.height=b}gb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};gb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};gb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};gb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function hb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ib(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function jb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var kb=3;function lb(a){a=a.document;a=mb(a)?a.documentElement:a.body;return new gb(a.clientWidth,a.clientHeight)}function nb(a){return a?a.parentWindow||a.defaultView:window}function mb(a){return"CSS1Compat"==a.compatMode}function ob(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!A(9)){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?rb(a,b):!c&&pb(e,b)?-1*sb(a,b):!d&&pb(f,a)?sb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function sb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return rb(d,a)}function rb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function tb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} +function ub(a){this.w=a||m.document||document}ub.prototype.ia=function(a){return p(a)?this.w.getElementById(a):a};function vb(a){return!Oa&&mb(a.w)?a.w.documentElement:a.w.body||a.w.documentElement}ub.prototype.contains=pb;var wb,xb,yb,zb,Ab,Bb,Cb;Cb=Bb=Ab=zb=yb=xb=wb=!1;var D=La();D&&(-1!=D.indexOf("Firefox")?wb=!0:-1!=D.indexOf("Camino")?xb=!0:-1!=D.indexOf("iPhone")||-1!=D.indexOf("iPod")?yb=!0:-1!=D.indexOf("iPad")?zb=!0:-1!=D.indexOf("Android")?Ab=!0:-1!=D.indexOf("Chrome")?Bb=!0:-1!=D.indexOf("Safari")&&(Cb=!0));var Db=wb,Eb=xb,Fb=yb,Gb=zb,Hb=Ab,Ib=Bb,Jb=Cb;function Kb(a,b,c){this.f=a;this.Ha=b||1;this.n=c||1};var Lb=w&&!A(9),Mb=w&&!A(8);function Nb(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function Ob(a,b,c){var d=Mb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Nb(b,a,b.nodeName,d,c)};function Pb(a){this.da=a;this.L=0}function Qb(a){a=a.match(Rb);for(var b=0;b<a.length;b++)Sb.test(a[b])&&a.splice(b,1);return new Pb(a)}var Rb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Sb=/^\s/;function E(a,b){return a.da[a.L+(b||0)]}Pb.prototype.next=function(){return this.da[this.L++]};Pb.prototype.back=function(){this.L--};Pb.prototype.empty=function(){return this.da.length<=this.L};function F(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(Lb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Lb&&"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} +function Tb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Mb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ub(a,b,c,d,e){return(Lb?Vb:Wb).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new G)} +function Vb(a,b,c,d,e){if(a instanceof Xb||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=Yb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Tb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Zb(a,b,c,d,e);return e} +function Wb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),s(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),s(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof H?Zb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),s(b,function(a){Tb(a,c,d)&&e.add(a)}));return e} +function $b(a,b,c,d,e){var f;if((a instanceof Xb||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=Yb(a);if("*"!=g&&(f=oa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=oa(f,function(a){return Tb(a,c,d)}));s(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return ac(a,b,c,d,e)}function ac(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Tb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function Zb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Tb(b,c,d)&&a.matches(b)&&e.add(b),Zb(a,b,c,d,e)}function Yb(a){if(a instanceof H){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function G(){this.n=this.j=null;this.H=0}function bc(a){this.q=a;this.next=this.A=null}function cc(a,b){if(!a.j)return b;if(!b.j)return a;for(var c=a.j,d=b.j,e=null,f=null,g=0;c&&d;)c.q==d.q||c.q instanceof Nb&&d.q instanceof Nb&&c.q.f==d.q.f?(f=c,c=c.next,d=d.next):0<qb(c.q,d.q)?(f=d,d=d.next):(f=c,c=c.next),(f.A=e)?e.next=f:a.j=f,e=f,g++;for(f=c||d;f;)f.A=e,e=e.next=f,g++,f=f.next;a.n=e;a.H=g;return a} +G.prototype.unshift=function(a){a=new bc(a);a.next=this.j;this.n?this.j.A=a:this.j=this.n=a;this.j=a;this.H++};G.prototype.add=function(a){a=new bc(a);a.A=this.n;this.j?this.n.next=a:this.j=this.n=a;this.n=a;this.H++};function dc(a){return(a=a.j)?a.q:null}G.prototype.p=h("H");function ec(a){return(a=dc(a))?F(a):""}function fc(a,b){return new gc(a,!!b)}function gc(a,b){this.Da=a;this.ea=(this.B=b)?a.n:a.j;this.Z=null} +gc.prototype.next=function(){var a=this.ea;if(null==a)return null;var b=this.Z=a;this.ea=this.B?a.A:a.next;return b.q};gc.prototype.remove=function(){var a=this.Da,b=this.Z;if(!b)throw Error("Next must be called at least once before remove.");var c=b.A,b=b.next;c?c.next=b:a.j=b;b?b.A=c:a.n=c;a.H--;this.Z=null};function I(a){this.i=a;this.k=this.s=!1;this.I=null}function K(a){return"\n "+a.toString().split("\n").join("\n ")}I.prototype.g=h("s");function hc(a,b){a.s=b}function ic(a,b){a.k=b}I.prototype.u=h("I");function L(a,b){var c=a.evaluate(b);return c instanceof G?+ec(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof G?ec(c):""+c}function jc(a,b){var c=a.evaluate(b);return c instanceof G?!!c.p():!!c};function kc(a,b,c){I.call(this,a.i);this.ca=a;this.ka=b;this.qa=c;this.s=b.g()||c.g();this.k=b.k||c.k;this.ca==lc&&(c.k||c.g()||4==c.i||0==c.i||!b.u()?b.k||(b.g()||4==b.i||0==b.i||!c.u())||(this.I={name:c.u().name,C:b}):this.I={name:b.u().name,C:c})}q(kc,I); +function mc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof G&&c instanceof G){e=fc(b);for(d=e.next();d;d=e.next())for(b=fc(c),f=b.next();f;f=b.next())if(a(F(d),F(f)))return!0;return!1}if(b instanceof G||c instanceof G){b instanceof G?e=b:(e=c,c=b);e=fc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+F(d);break;case "boolean":d=!!F(d);break;case "string":d=F(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}kc.prototype.evaluate=function(a){return this.ca.o(this.ka,this.qa,a)};kc.prototype.toString=function(){var a="Binary Expression: "+this.ca,a=a+K(this.ka);return a+=K(this.qa)};function nc(a,b,c,d){this.Ga=a;this.oa=b;this.i=c;this.o=d}nc.prototype.toString=h("Ga");var oc={}; +function N(a,b,c,d){if(oc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new nc(a,b,c,d);return oc[a.toString()]=a}N("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});N("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});N("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});N("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});N("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});N("<",4,2,function(a,b,c){return mc(function(a,b){return a<b},a,b,c)}); +N(">",4,2,function(a,b,c){return mc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return mc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return mc(function(a,b){return a>=b},a,b,c)});var lc=N("=",3,2,function(a,b,c){return mc(function(a,b){return a==b},a,b,c,!0)});N("!=",3,2,function(a,b,c){return mc(function(a,b){return a!=b},a,b,c,!0)});N("and",2,2,function(a,b,c){return jc(a,c)&&jc(b,c)});N("or",1,2,function(a,b,c){return jc(a,c)||jc(b,c)});function pc(a,b){if(b.p()&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");I.call(this,a.i);this.pa=a;this.d=b;this.s=a.g();this.k=a.k}q(pc,I);pc.prototype.evaluate=function(a){a=this.pa.evaluate(a);return qc(this.d,a)};pc.prototype.toString=function(){var a;a="Filter:"+K(this.pa);return a+=K(this.d)};function rc(a,b){if(b.length<a.ma)throw Error("Function "+a.m+" expects at least"+a.ma+" arguments, "+b.length+" given");if(null!==a.$&&b.length>a.$)throw Error("Function "+a.m+" expects at most "+a.$+" arguments, "+b.length+" given");a.Ea&&s(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.m+" is not of type Nodeset: "+b);});I.call(this,a.i);this.K=a;this.R=b;hc(this,a.s||ra(b,function(a){return a.g()}));ic(this,a.Ca&&!b.length||a.Ba&&!!b.length||ra(b,function(a){return a.k}))} +q(rc,I);rc.prototype.evaluate=function(a){return this.K.o.apply(null,va(a,this.R))};rc.prototype.toString=function(){var a="Function: "+this.K;if(this.R.length)var b=qa(this.R,function(a,b){return a+K(b)},"Arguments:"),a=a+K(b);return a};function sc(a,b,c,d,e,f,g,k,r){this.m=a;this.i=b;this.s=c;this.Ca=d;this.Ba=e;this.o=f;this.ma=g;this.$=ca(k)?k:g;this.Ea=!!r}sc.prototype.toString=h("m");var tc={}; +function O(a,b,c,d,e,f,g,k){if(tc.hasOwnProperty(a))throw Error("Function already created: "+a+".");tc[a]=new sc(a,b,c,d,!1,e,f,g,k)}O("boolean",2,!1,!1,function(a,b){return jc(b,a)},1);O("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1);O("concat",3,!1,!1,function(a,b){var c=wa(arguments,1);return qa(c,function(b,c){return b+M(c,a)},"")},2,null);O("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2); +O("count",1,!1,!1,function(a,b){return b.evaluate(a).p()},1,1,!0);O("false",2,!1,!1,aa(!1),0);O("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1); +O("id",4,!1,!1,function(a,b){function c(a){if(Lb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ta(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];s(d,function(a){(a=c(a))&&!ua(f,a)&&f.push(a)});f.sort(qb);var g=new G;s(f,function(a){g.add(a)});return g},1);O("lang",2,!1,!1,aa(!1),1); +O("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.n},0);O("local-name",3,!1,!0,function(a,b){var c=b?dc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);O("name",3,!1,!0,function(a,b){var c=b?dc(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);O("namespace-uri",3,!0,!1,aa(""),0,1,!0);O("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):F(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +O("not",2,!1,!1,function(a,b){return!jc(b,a)},1);O("number",1,!1,!0,function(a,b){return b?L(b,a):+F(a.f)},0,1);O("position",1,!0,!1,function(a){return a.Ha},0);O("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);O("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,!1,!0,function(a,b){return b?M(b,a):F(a.f)},0,1);O("string-length",1,!1,!0,function(a,b){return(b?M(b,a):F(a.f)).length},0,1); +O("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +O("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,!1,!1,function(a,b){for(var c=fc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+F(e);return d},1,1,!0);O("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(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);O("true",2,!1,!1,aa(!0),0);function H(a,b){this.sa=a;this.la=ca(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=kb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function uc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}H.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};H.prototype.getName=h("sa"); +H.prototype.toString=function(){var a="Kind Test: "+this.sa;null===this.la||(a+=K(this.la));return a};function vc(a){I.call(this,3);this.ra=a.substring(1,a.length-1)}q(vc,I);vc.prototype.evaluate=h("ra");vc.prototype.toString=function(){return"Literal: "+this.ra};function Xb(a,b){this.m=a.toLowerCase();this.aa=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Xb.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.m&&this.m!=a.nodeName.toLowerCase()?!1:this.aa==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Xb.prototype.getName=h("m");Xb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.aa?"":this.aa+":")+this.m};function wc(a){I.call(this,1);this.ta=a}q(wc,I);wc.prototype.evaluate=h("ta");wc.prototype.toString=function(){return"Number: "+this.ta};function xc(a,b){I.call(this,a.i);this.ha=a;this.J=b;this.s=a.g();this.k=a.k;if(1==this.J.length){var c=this.J[0];c.V||c.t!=yc||(c=c.Q,"*"!=c.getName()&&(this.I={name:c.getName(),C:null}))}}q(xc,I);function zc(){I.call(this,4)}q(zc,I);zc.prototype.evaluate=function(a){var b=new G;a=a.f;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};zc.prototype.toString=aa("Root Helper Expression");function Ac(){I.call(this,4)}q(Ac,I);Ac.prototype.evaluate=function(a){var b=new G;b.add(a.f);return b}; +Ac.prototype.toString=aa("Context Helper Expression"); +xc.prototype.evaluate=function(a){var b=this.ha.evaluate(a);if(!(b instanceof G))throw Error("Filter expression must evaluate to nodeset.");a=this.J;for(var c=0,d=a.length;c<d&&b.p();c++){var e=a[c],f=fc(b,e.t.B),g;if(e.g()||e.t!=Bc)if(e.g()||e.t!=Cc)for(g=f.next(),b=e.evaluate(new Kb(g));null!=(g=f.next());)g=e.evaluate(new Kb(g)),b=cc(b,g);else g=f.next(),b=e.evaluate(new Kb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Kb(g))}}return b}; +xc.prototype.toString=function(){var a;a="Path Expression:"+K(this.ha);if(this.J.length){var b=qa(this.J,function(a,b){return a+K(b)},"Steps:");a+=K(b)}return a};function Dc(a,b){this.d=a;this.B=!!b}function qc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=fc(b),f=b.p(),g,k=0;g=e.next();k++){var r=a.B?f-k:k+1;g=d.evaluate(new Kb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof G)r=0<g.p();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Dc.prototype.u=function(){return 0<this.d.length?this.d[0].u():null}; +Dc.prototype.g=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.g()||1==b.i||0==b.i)return!0}return!1};Dc.prototype.p=function(){return this.d.length};Dc.prototype.toString=function(){return qa(this.d,function(a,b){return a+K(b)},"Predicates:")};function Ec(a,b,c,d){I.call(this,4);this.t=a;this.Q=b;this.d=c||new Dc([]);this.V=!!d;b=this.d.u();a.Ka&&b&&(a=b.name,a=Lb?a.toLowerCase():a,this.I={name:a,C:b.C});this.s=this.d.g()}q(Ec,I); +Ec.prototype.evaluate=function(a){var b=a.f,c=null,c=this.u(),d=null,e=null,f=0;c&&(d=c.name,e=c.C?M(c.C,a):null,f=1);if(this.V)if(this.g()||this.t!=Fc)if(a=fc((new Ec(Gc,new H("node"))).evaluate(a)),b=a.next())for(c=this.o(b,d,e,f);null!=(b=a.next());)c=cc(c,this.o(b,d,e,f));else c=new G;else c=Ub(this.Q,b,d,e),c=qc(this.d,c,f);else c=this.o(a.f,d,e,f);return c};Ec.prototype.o=function(a,b,c,d){a=this.t.K(this.Q,a,b,c);return a=qc(this.d,a,d)}; +Ec.prototype.toString=function(){var a;a="Step:"+K("Operator: "+(this.V?"//":"/"));this.t.m&&(a+=K("Axis: "+this.t));a+=K(this.Q);if(this.d.p()){var b=qa(this.d.d,function(a,b){return a+K(b)},"Predicates:");a+=K(b)}return a};function Hc(a,b,c,d){this.m=a;this.K=b;this.B=c;this.Ka=d}Hc.prototype.toString=h("m");var Ic={};function P(a,b,c,d){if(Ic.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Hc(a,b,c,!!d);return Ic[a]=b} +P("ancestor",function(a,b){for(var c=new G,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);P("ancestor-or-self",function(a,b){var c=new G,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var yc=P("attribute",function(a,b){var c=new G,d=a.getName();if("style"==d&&b.style&&Lb)return c.add(new Nb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof H&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Lb?g.nodeValue&&c.add(Ob(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Lb?g.nodeValue&&c.add(Ob(b,g,b.sourceIndex)):c.add(g));return c},!1),Fc=P("child",function(a,b,c,d,e){return(Lb?$b:ac).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new G)}, +!1,!0);P("descendant",Ub,!1,!0);var Gc=P("descendant-or-self",function(a,b,c,d){var e=new G;Tb(b,c,d)&&a.matches(b)&&e.add(b);return Ub(a,b,c,d,e)},!1,!0),Bc=P("following",function(a,b,c,d){var e=new G;do for(var f=b;f=f.nextSibling;)Tb(f,c,d)&&a.matches(f)&&e.add(f),e=Ub(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);P("following-sibling",function(a,b){for(var c=new G,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);P("namespace",function(){return new G},!1); +var Jc=P("parent",function(a,b){var c=new G;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Cc=P("preceding",function(a,b,c,d){var e=new G,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var z=0,t=r.length;z<t;z++)b=r[z],Tb(b,c,d)&&a.matches(b)&&e.add(b),e=Ub(a,b,c,d,e)}return e},!0,!0); +P("preceding-sibling",function(a,b){for(var c=new G,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Kc=P("self",function(a,b){var c=new G;a.matches(b)&&c.add(b);return c},!1);function Lc(a){I.call(this,1);this.ga=a;this.s=a.g();this.k=a.k}q(Lc,I);Lc.prototype.evaluate=function(a){return-L(this.ga,a)};Lc.prototype.toString=function(){return"Unary Expression: -"+K(this.ga)};function Mc(a){I.call(this,4);this.N=a;hc(this,ra(this.N,function(a){return a.g()}));ic(this,ra(this.N,function(a){return a.k}))}q(Mc,I);Mc.prototype.evaluate=function(a){var b=new G;s(this.N,function(c){c=c.evaluate(a);if(!(c instanceof G))throw Error("Path expression must evaluate to NodeSet.");b=cc(b,c)});return b};Mc.prototype.toString=function(){return qa(this.N,function(a,b){return a+K(b)},"Union Expression:")};function Nc(a,b){this.a=a;this.Fa=b}function Oc(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=Pc(a);var d=a.a.next();if(!d)break;var e=(d=oc[d]||null)&&d.oa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].oa;)b=new kc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new kc(c.pop(),c.pop(),b);return b}function Q(a,b){if(a.a.empty())throw Error(b);}function Qc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Rc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Sc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new vc(a)}function Tc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Xb(b);var d=b.substring(0,c);a=a.Fa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Xb(b,a)} +function Uc(a){var b,c=[],d;if("/"==E(a.a)||"//"==E(a.a)){b=a.a.next();d=E(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new zc;d=new zc;Q(a,"Missing next location step.");b=Vc(a,b);c.push(b)}else{a:{b=E(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Oc(a);Q(a,'unclosed "("');Qc(a,")");break;case '"':case "'":b=Sc(a);break;default:if(isNaN(+b))if(!uc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==E(a.a,1)){b=a.a.next();b=tc[b]||null;a.a.next();for(d=[];")"!=E(a.a);){Q(a,"Missing function argument list.");d.push(Oc(a));if(","!=E(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");Rc(a);b=new rc(b,d)}else{b=null;break a}else b=new wc(+a.a.next())}"["==E(a.a)&&(d=new Dc(Wc(a)),b=new pc(b,d))}if(b)if("/"==E(a.a)||"//"==E(a.a))d=b;else return b;else b=Vc(a,"/"),d=new Ac,c.push(b)}for(;"/"==E(a.a)||"//"==E(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=Vc(a,b),c.push(b); +return new xc(d,c)} +function Vc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==E(a.a))return d=new Ec(Kc,new H("node")),a.a.next(),d;if(".."==E(a.a))return d=new Ec(Jc,new H("node")),a.a.next(),d;var f;if("@"==E(a.a))f=yc,a.a.next(),Q(a,"Missing attribute name");else if("::"==E(a.a,1)){if(!/(?![0-9])[\w]/.test(E(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Ic[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();Q(a,"Missing node name")}else f=Fc; +c=E(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==E(a.a,1)){if(!uc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!uc(c))throw Error("Invalid type name: "+c);Qc(a,"(");Q(a,"Bad nodetype");e=E(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Sc(a);Q(a,"Bad nodetype");Rc(a);c=new H(c,g)}else c=Tc(a);else if("*"==c)c=Tc(a);else throw Error("Bad token: "+a.a.next());e=new Dc(Wc(a),f.B);return d||new Ec(f,c,e,"//"==b)} +function Wc(a){for(var b=[];"["==E(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=Oc(a);b.push(c);Q(a,"Unclosed predicate expression.");Qc(a,"]")}return b}function Pc(a){if("-"==E(a.a))return a.a.next(),new Lc(Pc(a));var b=Uc(a);if("|"!=E(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push(Uc(a));a.a.back();a=new Mc(b)}return a};function Xc(a){switch(a.nodeType){case 1:return ia(Yc,a);case 9:return Xc(a.documentElement);case 2:return a.ownerElement?Xc(a.ownerElement):Zc;case 11:case 10:case 6:case 12:return Zc;default:return a.parentNode?Xc(a.parentNode):Zc}}function Zc(){return null}function Yc(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?Yc(a.parentNode,b):null};function $c(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Qb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=ha(b.lookupNamespaceURI,b)):b=aa(null);var d=Oc(new Nc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Kb(a));return new R(c,b)}} +function R(a,b){if(0==b)if(a instanceof G)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 G))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof G?ec(a):""+a;break;case 1:this.numberValue=a instanceof G?+ec(a):+a;break;case 3:this.booleanValue=a instanceof G?0<a.p():!!a;break;case 4:case 5:case 6:case 7:var d= +fc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Nb?e.f:e);this.snapshotLength=a.p();this.invalidIteratorState=!1;break;case 8:case 9:d=dc(a);this.singleNodeValue=d instanceof Nb?d.f:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function ad(a){this.lookupNamespaceURI=Xc(a)} +function bd(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new $c(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new $c(a,b)},b.createNSResolver=function(a){return new ad(a)})};var S={};S.va=function(){var a={Va:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();S.o=function(a,b,c){var d=C(a);(w||Hb)&&bd(nb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.va;return w&&!cb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!x||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new u(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +S.U=function(a,b){if(!a||1!=a.nodeType)throw new u(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};S.Ja=function(a,b){var c=function(){var c=S.o(b,a,9);return c?(c=c.singleNodeValue,v?c:c||null):b.selectSingleNode?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||S.U(c,a);return c}; +S.Qa=function(a,b){var c=function(){var c=S.o(b,a,7);if(c){var e=c.snapshotLength;v&&!ca(e)&&S.U(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();s(c,function(b){S.U(b,a)});return c};function cd(a){return(a=a.exec(La()))?a[1]:""}var dd=function(){if(Db)return cd(/Firefox\/([0-9.]+)/);if(w||v)return Ta;if(Ib)return cd(/Chrome\/([0-9.]+)/);if(Jb)return cd(/Version\/([0-9.]+)/);if(Fb||Gb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(La());if(a)return a[1]+"."+a[2]}else{if(Hb)return(a=cd(/Android\s+([0-9.]+)/))?a:cd(/Version\/([0-9.]+)/);if(Eb)return cd(/Camino\/([0-9.]+)/)}return""}();var ed,fd;function gd(a){return hd?ed(a):w?0<=la(db,a):cb(a)}function id(a){hd?fd(a):Hb?la(jd,a):la(dd,a)} +var hd=function(){if(!x)return!1;var a=m.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;ed=function(a){return 0<=d.xa(e,""+a)};fd=function(a){d.xa(f,""+a)};return!0}(),kd;if(Hb){var ld=/Android\s+([0-9\.]+)/.exec(La());kd=ld?ld[1]:"0"}else kd="0"; +var jd=kd,md=A(9),nd=w&&!A(9),od=A(10),pd=w&&!A(10);Hb&&id(2.3);Hb&&id(4);Jb&&id(6);function qd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}qd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};qd.prototype.contains=function(a){return this&&a?a instanceof qd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +qd.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};qd.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; +qd.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function T(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}T.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};T.prototype.contains=function(a){return a instanceof T?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +T.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};T.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +T.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function rd(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function sd(a){a=a?C(a):document;var b;(b=!w)||(b=A(9))||(b=a?new ub(C(a)):fb||(fb=new ub),b=mb(b.w));return b?a.documentElement:a.body} +function td(a){var b=a.offsetWidth,c=a.offsetHeight,d=Oa&&!b&&!c;if((!ca(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}w&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new gb(e.right-e.left,e.bottom-e.top)}return new gb(b,c)}var ud={thin:2,medium:4,thick:6}; +function vd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in ud)d=ud[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function wd(a){return xd(a,!0)&&yd(a)&&!(w||v||x&&!gd("1.9.2")?0:"none"==V(a,"pointer-events"))}var zd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function yd(a){var b=a.tagName.toUpperCase();return ua(zd,b)?a.disabled?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?yd(a.parentNode):!tb(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&b.disabled){if(!U(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:ob(a.previousSibling);)if(U(a,"LEGEND"))return!0}return!1},!0):!0} +function Ad(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:null} +function V(a,b){var c=ma(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=nd?"styleFloat":"cssFloat";var d=rd(a,c)||Bd(a,c);if(null===d)d=null;else if(ua(ya,c)){b:{var e=d.match(Ba);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ca))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=xa[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(za,"#$1$1$2$2$3$3")),!Aa.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Bd(a,b){var c=a.currentStyle||a.style,d=c[b];!ca(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?ca(d)?d:null:(c=Ad(a))?Bd(c,b):null} +function xd(a,b){function c(a){if("none"==V(a,"display"))return!1;a=Ad(a);return!a||c(a)}function d(a){var b=Cd(a);return 0<b.height&&0<b.width?!0:U(a,"PATH")&&(0<b.height||0<b.width)?(a=V(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=V(a,"overflow")&&ra(a.childNodes,function(a){return a.nodeType==kb||U(a)&&d(a)})}function e(a){return Dd(a)==W&&sa(a.childNodes,function(a){return!U(a)||e(a)})}if(!U(a))throw Error("Argument to isShown must be of type Element");if(U(a,"OPTION")||U(a,"OPTGROUP")){var f= +tb(a,function(a){return U(a,"SELECT")});return!!f&&xd(f,!0)}return(f=Ed(a))?!!f.ja&&0<f.rect.width&&0<f.rect.height&&xd(f.ja,b):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Fd(a)||!d(a)?!1:!e(a)}var W="hidden"; +function Dd(a,b){function c(a){var b=V(a,"position");if("fixed"==b)return t=!0,a==k?null:k;for(a=Ad(a);a&&a!=k&&(0==V(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==V(a,"position"));)a=Ad(a);return a}function d(a){var b=a;if("visible"==z)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:V(b,"overflow-x"),y:V(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new ub(g)).w;a=!Oa&&mb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=w&&cb("10")&&b.pageYOffset!=a.scrollTop?new B(a.scrollLeft,a.scrollTop):new B(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new B(a.scrollLeft,a.scrollTop);return a}for(var f=Gd(a,b),g=C(a),k=g.documentElement,r=g.body,z=V(k,"overflow"),t,n=c(a);n;n=c(n)){var l=d(n);if("visible"!=l.x||"visible"!=l.y){var y=Cd(n);if(0==y.width||0==y.height)return W;var J=f.right<y.left,Y=f.bottom<y.top;if(J&&"hidden"==l.x||Y&&"hidden"==l.y)return W; +if(J&&"visible"!=l.x||Y&&"visible"!=l.y){J=e(n);Y=f.bottom<y.top-J.y;if(f.right<y.left-J.x&&"visible"!=l.x||Y&&"visible"!=l.x)return W;f=Dd(n);return f==W?W:"scroll"}J=f.left>=y.left+y.width;y=f.top>=y.top+y.height;if(J&&"hidden"==l.x||y&&"hidden"==l.y)return W;if(J&&"visible"!=l.x||y&&"visible"!=l.y){if(t&&(l=e(n),f.left>=k.scrollWidth-l.x||f.right>=k.scrollHeight-l.y))return W;f=Dd(n);return f==W?W:"scroll"}}}return"none"}var Hd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Cd(a){function b(a){var c=nb(C(a)).getComputedStyle(a,null).MozTransform.match(Hd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),t=parseFloat(c[3]),n=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),y=f.left+f.width,J=f.top+f.height,Y=f.left*d,d=y*d,Ya=f.left*e,e=y*e,Za=f.top*t,t=J*t,$a=f.top*n,y=J*n,J=Y+Za+l,n=Ya+$a+c,Za=d+Za+l,$a=e+$a+c,Y=Y+t+l,Ya=Ya+y+c,l=d+t+l,c=e+y+c;f.left=Math.min(J,Za,Y,l);f.top=Math.min(n,$a,Ya,c);l=Math.max(J,Za,Y,l);c=Math.max(n,$a,Ya,c);f.width=l-f.left; +f.height=c-f.top}(a=Ad(a))&&b(a)}var c=Ed(a);if(c)return c.rect;if(U(a,"HTML"))return c=C(a),a=lb(nb(c)||window),new T(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new T(0,0,0,0)}var f=new T(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=C(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);v&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height= +a.offsetHeight));x&&!gd(12)&&b(a);return f} +function Ed(a){var b=U(a,"MAP");if(!b&&!U(a,"AREA"))return null;var c=b?a:U(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=S.Ja('/descendant::*[@usemap = "#'+c.name+'"]',C(c)))&&(e=Cd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Id(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new T(a+e.left,b+e.top,c,f)}return{ja:d,rect:e||new T(0,0,0,0)}} +function Id(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new T(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new T(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 T(b,c,d-b,e-c)}return new T(0,0,0,0)} +function Gd(a,b){var c;c=Cd(a);c=new qd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof T?b:new T(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Fd(a){if(pd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Jd(a)}function Jd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Ad(a))&&(b*=Jd(a));return b};function Kd(a,b){this.l=ka.document.documentElement;this.r=null;var c;a:{var d=C(this.l);try{c=d&&d.activeElement;break a}catch(e){}c=null}(c=w&&c&&"undefined"===typeof c.nodeType?null:c)&&Ld(this,c);this.M=a||new Md;this.fa=b||new Nd}Kd.prototype.ia=h("l");function Ld(a,b){a.l=b;a.r=U(b,"OPTION")?tb(b,function(a){return U(a,"SELECT")}):null} +Kd.prototype.X=function(a,b,c,d,e,f,g){if(!f&&!wd(this.l))return!1;if(d&&Od!=a&&Pd!=a)throw new u(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:0!=(this.M.O&4),ctrlKey:0!=(this.M.O&2),shiftKey:0!=(this.M.O&1),metaKey:0!=(this.M.O&8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.l;a!=Qd&&a!=Rd&&g in Sd?c=Sd[g]:this.r&&(c=Td(this,a));return c?this.fa.X(c,a,b):!0}; +Kd.prototype.W=function(a,b,c,d,e,f,g,k){if(!k&&!wd(this.l))return!1;if(g&&Ud!=a&&Vd!=a)throw new u(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ia:0,rotation:0,pointerId:d,La:0,Ma:0,pointerType:e,Aa:f};c=this.r?Td(this,a):this.l;Sd[d]&&(c=Sd[d]);d=nb(C(this.l));var r;d&&a==Wd&&(r=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){Sd[a]= +this});a=c?this.fa.W(c,a,b):!0;r&&(d.Element.prototype.msSetPointerCapture=r);return a};function Td(a,b){if(w)switch(b){case Od:case Ud:return null;case Xd:case Yd:case Zd:return a.r.multiple?a.r:null;default:return a.r}if(v)switch(b){case Xd:case Od:return a.r.multiple?a.l:null;default:return a.l}if(Oa)switch(b){case Qd:case $d:return a.r.multiple?a.l:a.r;default:return a.r.multiple?a.l:null}return a.l}Oa||v||hd&&id(3.6);function Md(){this.O=0}var Sd={};function Nd(){} +Nd.prototype.X=function(a,b,c){return ae(a,b,c)};Nd.prototype.W=function(a,b,c){return ae(a,b,c)};w&&gd(10);Hb&&id(4);var be=w&&ka.navigator.msPointerEnabled;function ce(a,b,c){this.e=a;this.S=b;this.T=c}ce.prototype.create=function(a){a=C(a);nd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.S,this.T));return a};ce.prototype.toString=h("e");function X(a,b,c){ce.call(this,a,b,c)}q(X,ce); +X.prototype.create=function(a,b){if(!x&&this==de)throw new u(9,"Browser does not support a mouse pixel scroll event.");var c=C(a),d;if(nd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==Pd||this==Od)if(Object.defineProperty){var e=this==Pd;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==ee&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=nb(c);d=c.createEvent("MouseEvents");var f=1;this==ee&&(x||(d.wheelDelta=b.wheelDelta),x||v)&&(f=b.wheelDelta/-40);x&&this==de&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.S,this.T,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(w&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=vb(a?new ub(C(a)):fb||(fb=new ub)), +c=sd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function fe(a,b,c){ce.call(this,a,b,c)}q(fe,ce); +fe.prototype.create=function(a,b){if(!be)throw new u(9,"Browser does not support MSPointer events.");var c=C(a),d=nb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.S,this.T,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ia,b.rotation,b.La,b.Ma,b.pointerId,b.pointerType,0,b.Aa);return c}; +var Qd=new X("click",!0,!0),Xd=new X("contextmenu",!0,!0),ge=new X("dblclick",!0,!0),Rd=new X("mousedown",!0,!0),Yd=new X("mousemove",!0,!1),Pd=new X("mouseout",!0,!0),Od=new X("mouseover",!0,!0),$d=new X("mouseup",!0,!0),ee=new X(x?"DOMMouseScroll":"mousewheel",!0,!0),de=new X("MozMousePixelScroll",!0,!0),Wd=new fe("MSPointerDown",!0,!0),Zd=new fe("MSPointerMove",!0,!0),Ud=new fe("MSPointerOver",!0,!0),Vd=new fe("MSPointerOut",!0,!0),he=new fe("MSPointerUp",!0,!0); +function ae(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return nd?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function ie(a,b){this.v={};this.h=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof ie)for(d=je(a),ke(a),e=[],c=0;c<a.h.length;c++)e.push(a.v[a.h[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}ie.prototype.G=0;ie.prototype.ua=0;function je(a){ke(a);return a.h.concat()} +ie.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.v,a)?(delete this.v[a],this.G--,this.ua++,this.h.length>2*this.G&&ke(this),!0):!1};function ke(a){if(a.G!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.v,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.G!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}} +ie.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.v,a)?this.v[a]:b};ie.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.v,a)||(this.G++,this.h.push(a),this.ua++);this.v[a]=b};var le={};function Z(a,b,c){ea(a)&&(a=x?a.b:v?a.opera:a.c);a=new me(a,b,c);!b||b in le&&!c||(le[b]={key:a,shift:!1},c&&(le[c]={key:a,shift:!0}));return a}function me(a,b,c){this.code=a;this.wa=b||null;this.Ta=c||this.wa}Z(8);Z(9);Z(13);var ne=Z(16),oe=Z(17),pe=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); +Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var qe=Z(Ka?{b:91,c:91,opera:219}:Ja?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +Z(Ka?{b:92,c:92,opera:220}:Ja?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Ka?{b:93,c:93,opera:0}:Ja?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Ra?56:42},"*"); +Z({b:107,c:107,opera:Ra?61:43},"+");Z({b:109,c:109,opera:Ra?109:45},"-");Z({b:110,c:110,opera:Ra?190:78},".");Z({b:111,c:111,opera:Ra?191:47},"/");Z(Ra&&v?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var re=new ie; +re.set(1,ne);re.set(2,oe);re.set(4,pe);re.set(8,qe);(function(a){var b=new ie;s(je(a),function(c){b.set(a.get(c).code,c)});return b})(re);x&&gd(12);function se(a,b,c){Kd.call(this,b,c);this.za=this.D=null;this.F=new B(0,0);this.Y=this.na=!1;if(a){this.D=a.Na;try{U(a.ya)&&(this.za=a.ya)}catch(d){this.D=null}this.F=a.Oa;this.na=a.Ra;this.Y=a.Pa;try{U(a.element)&&Ld(this,a.element)}catch(e){this.D=null}}}q(se,Kd);var $={}; +nd?($[Qd]=[0,0,0,null],$[Xd]=[null,null,0,null],$[$d]=[1,4,2,null],$[Pd]=[0,0,0,0],$[Yd]=[1,4,2,0]):Oa||md?($[Qd]=[0,1,2,null],$[Xd]=[null,null,2,null],$[$d]=[0,1,2,null],$[Pd]=[0,1,2,0],$[Yd]=[0,1,2,0]):($[Qd]=[0,1,2,null],$[Xd]=[null,null,2,null],$[$d]=[0,1,2,null],$[Pd]=[0,0,0,0],$[Yd]=[0,0,0,0]);od&&($[Wd]=$[$d],$[he]=$[$d],$[Zd]=[-1,-1,-1,-1],$[Vd]=$[Zd],$[Ud]=$[Zd]);$[ge]=$[Qd];$[Rd]=$[$d];$[Od]=$[Pd];var te={};te[Rd]=Wd;te[Yd]=Zd;te[Pd]=Vd;te[Od]=Ud;te[$d]=he; +se.prototype.move=function(a,b){var c=wd(a),d=Cd(a);this.F.x=b.x+d.left;this.F.y=b.y+d.top;d=this.ia();if(a!=d){try{nb(C(d)).closed&&(d=null)}catch(e){d=null}if(d){var f=d===ka.document.documentElement||d===ka.document.body,d=!this.Y&&f?null:d;ue(this,Pd,a)}Ld(this,a);w||ue(this,Od,d,null,c)}ue(this,Yd,null,null,c);w&&a!=d&&ue(this,Od,d,null,c);this.na=!1}; +se.prototype.scroll=function(a){if(0==a)throw new u(13,"Must scroll a non-zero number of ticks.");for(var b=0<a?-120:120,c=0<a?57:-57,d=0;d<Math.abs(a);d++)ue(this,ee,null,b),x&&ue(this,de,null,c)};function ue(a,b,c,d,e){a.Y=!0;if(od){var f=te[b];if(f&&!a.W(f,a.F,ve(a,f),1,MSPointerEvent.MSPOINTER_TYPE_MOUSE,!0,c,e))return}a.X(b,a.F,ve(a,b),c,d,e)} +function ve(a,b){if(!(b in $))return 0;var c=$[b][null===a.D?3:a.D];if(null===c)throw new u(13,"Event does not permit the specified mouse button.");return c};function we(a,b){this.x=a;this.y=b}q(we,B);we.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function xe(a,b,c,d){if(!xd(a,!0))throw new u(11,"Element is not currently visible and may not be manipulated");b:{var e=c||void 0;if("scroll"==Dd(a,e)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Dd(a,e)))break b;for(var f=Gd(a,e),g=Ad(a);g;g=Ad(g)){var k=g,r=Cd(k),z;var t=k;if(w&&!A(9)){var n=vd(t,"borderLeft");z=vd(t,"borderRight");var l=vd(t,"borderTop"),t=vd(t,"borderBottom");z=new qd(l,z,t,n)}else n=rd(t,"borderLeftWidth"),z=rd(t,"borderRightWidth"),l=rd(t,"borderTopWidth"),t=rd(t,"borderBottomWidth"), +z=new qd(parseFloat(l),parseFloat(z),parseFloat(t),parseFloat(n));n=f.left-r.left-z.left;r=f.top-r.top-z.top;z=k.clientHeight+f.top-f.bottom;k.scrollLeft+=Math.min(n,Math.max(n-(k.clientWidth+f.left-f.right),0));k.scrollTop+=Math.min(r,Math.max(r-z,0))}Dd(a,e)}}c?c=new we(c.x,c.y):(c=ye(a),c=new we(c.width/2,c.height/2));d=d||new se;d.move(a,c);d.scroll(b)} +function ye(a){var b;if("none"!=(rd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=td(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=td(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:ye(a.offsetParent)};function ze(){this.P=void 0} +function Ae(a,b,c){switch(typeof b){case "string":Be(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ae(a,a.P?a.P.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +Be(f,c),c.push(":"),Ae(a,a.P?a.P.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ce={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},De=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Be(a,b){b.push('"',a.replace(De,function(a){if(a in Ce)return Ce[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ce[a]=e+b.toString(16)}),'"')};Oa||v||x&&gd(3.5)||w&&gd(8);function Ee(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return pa(a,Ee);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Fe(a);return b}if("document"in a)return b={},b.WINDOW=Fe(a),b;if(da(a))return pa(a,Ee);a=hb(a,function(a,b){return"number"==typeof b||p(b)});return ib(a,Ee);default:return null}} +function Ge(a,b){return"array"==ba(a)?pa(a,function(a){return Ge(a,b)}):ea(a)?"function"==typeof a?a:"ELEMENT"in a?He(a.ELEMENT,b):"WINDOW"in a?He(a.WINDOW,b):ib(a,function(a){return Ge(a,b)}):a}function Ie(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ba=ja());b.ba||(b.ba=ja());return b}function Fe(a){var b=Ie(a.ownerDocument),c=jb(b,function(b){return b==a});c||(c=":wdc:"+b.ba++,b[c]=a);return c} +function He(a,b){a=decodeURIComponent(a);var c=b||document,d=Ie(c);if(!(a in d))throw new u(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new u(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new u(10,"Element is no longer attached to the DOM");};function Je(a,b,c){a=[a,b,c];b=xe;var d;try{b=p(b)?new ka.Function(b):ka==window?b:new ka.Function("return ("+b+").apply(null,arguments);");var e=Ge(a,ka.document),f=b.apply(null,e);d={status:0,value:Ee(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}e=[];Ae(new ze,d,e);return e.join("")}var Ke=["_"],Le=m;Ke[0]in Le||!Le.execScript||Le.execScript("var "+Ke[0]);for(var Me;Ke.length&&(Me=Ke.shift());)Ke.length||void 0===Je?Le=Le[Me]?Le[Me]:Le[Me]={}:Le[Me]=Je;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/set_local_storage_item.js b/src/ghostdriver/third_party/webdriver-atoms/set_local_storage_item.js index 7e0a5d4ac..ce153c237 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/set_local_storage_item.js +++ b/src/ghostdriver/third_party/webdriver-atoms/set_local_storage_item.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,m=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=t[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=c.length-5;if(0>e||c.indexOf("Error",e)!=e)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",t={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};t[13]=da;t[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function u(a,b){for(var c=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(e.length,d.length),v=0;0==c&&v<f;v++){var P=e[v]||"",z=d[v]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var n=Ha.exec(P)||["","",""],p=Ia.exec(z)||["","",""];if(0==n[0].length&&0==p[0].length)break;c=((0==n[1].length?0:parseInt(n[1],10))<(0==p[1].length?0:parseInt(p[1],10))?-1:(0==n[1].length?0:parseInt(n[1],10))>(0== -p[1].length?0:parseInt(p[1],10))?1:0)||((0==n[2].length)<(0==p[2].length)?-1:(0==n[2].length)>(0==p[2].length)?1:0)||(n[2]<p[2]?-1:n[2]>p[2]?1:0)}while(0==c)}return c};var w,x,y,A;function B(){return m.navigator?m.navigator.userAgent:k}A=y=x=w=l;var C;if(C=B()){var ea=m.navigator;w=0==C.indexOf("Opera");x=!w&&-1!=C.indexOf("MSIE");y=!w&&-1!=C.indexOf("WebKit");A=!w&&!y&&"Gecko"==ea.product}var D=w,E=x,F=A,fa=y,ga=m.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=m.document;return a?a.documentMode:g}var G; -a:{var H="",I;if(D&&m.opera)var J=m.opera.version,H="function"==typeof J?J():J;else if(F?I=/rv\:([^\);]+)(\)|;)/:E?I=/MSIE\s+([^\);]+)(\)|;)/:fa&&(I=/WebKit\/(\S+)/),I)var ja=I.exec(B()),H=ja?ja[1]:"";if(E){var ka=ia();if(ka>parseFloat(H)){G=String(ka);break a}}G=H}var la={};function K(a){return la[a]||(la[a]=0<=u(G,a))}var ma=m.document,na=!ma||!E?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(G,10):5);var L,M,N,O,Q,R,oa;oa=R=Q=O=N=M=L=l;var S=B();S&&(-1!=S.indexOf("Firefox")?L=h:-1!=S.indexOf("Camino")?M=h:-1!=S.indexOf("iPhone")||-1!=S.indexOf("iPod")?N=h:-1!=S.indexOf("iPad")?O=h:-1!=S.indexOf("Android")?Q=h:-1!=S.indexOf("Chrome")?R=h:-1!=S.indexOf("Safari")&&(oa=h));var pa=L,qa=M,ra=N,sa=O,T=Q,ta=R,ua=oa;function U(a){return(a=a.exec(B()))?a[1]:""}var va=function(){if(pa)return U(/Firefox\/([0-9.]+)/);if(E||D)return G;if(ta)return U(/Chrome\/([0-9.]+)/);if(ua)return U(/Version\/([0-9.]+)/);if(ra||sa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(B());if(a)return a[1]+"."+a[2]}else{if(T)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(qa)return U(/Camino\/([0-9.]+)/)}return""}();var wa,xa;function V(a){return ya?wa(a):E?0<=u(na,a):K(a)}function W(a){return ya?xa(a):T?0<=u(za,a):0<=u(va,a)} -var ya=function(){if(!F)return l;var a=m.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,e=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=c.platformVersion,f=c.version;wa=function(a){return 0<=e.d(d,""+a)};xa=function(a){return 0<=e.d(f,""+a)};return h}(),Aa;if(T){var Ba=/Android\s+([0-9\.]+)/.exec(B());Aa=Ba?Ba[1]:"0"}else Aa="0";var za=Aa;T&&W(2.3);function Ca(){this.a=g} -function Da(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var e=b.length;c.push("[");for(var d="",f=0;f<e;f++)c.push(d),d=b[f],Da(a,a.a?a.a.call(b,String(f),d):d,c),d=",";c.push("]");break}c.push("{");e="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(d=b[f],"function"!=typeof d&&(c.push(e),Ea(f, -c),c.push(":"),Da(a,a.a?a.a.call(b,f,d):d,c),e=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Fa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ga=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ea(a,b){b.push('"',a.replace(Ga,function(a){if(a in Fa)return Fa[a];var b=a.charCodeAt(0),d="\\u";16>b?d+="000":256>b?d+="00":4096>b&&(d+="0");return Fa[a]=d+b.toString(16)}),'"')};fa||D||F&&V(3.5)||E&&V(8);function Ja(a,b){for(var c=a.length,e=Array(c),d="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in d&&(e[f]=b.call(g,d[f],f,a));return e};if(F||E){var Ka;if(Ka=E)Ka=E&&9<=na;Ka||F&&K("1.9.1")}E&&K("9");function La(a,b){var c={},e;for(e in a)b.call(g,a[e],e,a)&&(c[e]=a[e]);return c}function Ma(a,b){var c={},e;for(e in a)c[e]=b.call(g,a[e],e,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,e=Ra(c);if(!(a in e))throw new s(10,"Element does not exist in cache");var d=e[a];if("setInterval"in d){if(d.closed)throw delete e[a],new s(23,"Window has been closed.");return d}for(var f=d;f;){if(f==c.documentElement)return d;f=f.parentNode}delete e[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=E&&V(8)&&!V(9),Ta=ua&&W(4)&&!W(5),Ua=T&&W(2.2)&&!W(2.3),Va=ha&&ua&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("local_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter");}} -;function Xa(a){this.c=a}Xa.prototype.setItem=function(a,b){try{this.c.setItem(a,b+"")}catch(c){throw new s(13,c.message);}};Xa.prototype.clear=function(){this.c.clear()};function Ya(a,b){if(!Wa())throw new s(13,"Local storage undefined");(new Xa(r.localStorage)).setItem(a,b)};function Za(a,b){var c=Ya,e=[a,b],d=window||r,f;try{var c="string"==typeof c?new d.Function(c):d==window?c:new d.Function("return ("+c+").apply(null,arguments);"),v=Pa(e,d.document),P=c.apply(k,v);f={status:0,value:X(P)}}catch(z){f={status:"code"in z?z.code:13,value:{message:z.message}}}c=[];Da(new Ca,f,c);return c.join("")}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var k=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=c.length-5;if(0>e||c.indexOf("Error",e)!=e)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function q(a,b){for(var c=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(e.length,d.length),r=0;0==c&&r<f;r++){var M=e[r]||"",w=d[r]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var l=Ca.exec(M)||["","",""],m=Da.exec(w)||["","",""];if(0==l[0].length&&0==m[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0== +m[1].length?0:parseInt(m[1],10))?1:0)||((0==l[2].length)<(0==m[2].length)?-1:(0==l[2].length)>(0==m[2].length)?1:0)||(l[2]<m[2]?-1:l[2]>m[2]?1:0)}while(0==c)}return c};var s,t,u,v;function x(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var y;if(y=x()){var ea=g.navigator;s=0==y.indexOf("Opera");t=!s&&-1!=y.indexOf("MSIE");u=!s&&-1!=y.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var z=s,A=t,B=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var C; +a:{var D="",E;if(z&&g.opera)var F=g.opera.version,D="function"==typeof F?F():F;else if(B?E=/rv\:([^\);]+)(\)|;)/:A?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ja=E.exec(x()),D=ja?ja[1]:"";if(A){var ka=ia();if(ka>parseFloat(D)){C=String(ka);break a}}C=D}var la={};function G(a){return la[a]||(la[a]=0<=q(C,a))}var ma=g.document,na=ma&&A?ia()||("CSS1Compat"==ma.compatMode?parseInt(C,10):5):void 0;var H,I,J,K,L,N,O;O=N=L=K=J=I=H=!1;var P=x();P&&(-1!=P.indexOf("Firefox")?H=!0:-1!=P.indexOf("Camino")?I=!0:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?J=!0:-1!=P.indexOf("iPad")?K=!0:-1!=P.indexOf("Android")?L=!0:-1!=P.indexOf("Chrome")?N=!0:-1!=P.indexOf("Safari")&&(O=!0));var oa=H,pa=I,qa=J,ra=K,Q=L,sa=N,R=O;function S(a){return(a=a.exec(x()))?a[1]:""}var ta=function(){if(oa)return S(/Firefox\/([0-9.]+)/);if(A||z)return C;if(sa)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(pa)return S(/Camino\/([0-9.]+)/)}return""}();var ua,va;function T(a){return wa?ua(a):A?0<=q(na,a):G(a)}function U(a){return wa?va(a):Q?0<=q(xa,a):0<=q(ta,a)} +var wa=function(){if(!B)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,e=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=c.platformVersion,f=c.version;ua=function(a){return 0<=e.d(d,""+a)};va=function(a){return 0<=e.d(f,""+a)};return!0}(),V;if(Q){var ya=/Android\s+([0-9\.]+)/.exec(x());V=ya?ya[1]:"0"}else V="0";var xa=V;Q&&U(2.3); +Q&&U(4);R&&U(6);function za(){this.a=void 0} +function W(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var e=b.length;c.push("[");for(var d="",f=0;f<e;f++)c.push(d),d=b[f],W(a,a.a?a.a.call(b,String(f),d):d,c),d=",";c.push("]");break}c.push("{");e="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(d=b[f],"function"!=typeof d&&(c.push(e),Aa(f, +c),c.push(":"),W(a,a.a?a.a.call(b,f,d):d,c),e=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ba={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Aa(a,b){b.push('"',a.replace(Ea,function(a){if(a in Ba)return Ba[a];var b=a.charCodeAt(0),d="\\u";16>b?d+="000":256>b?d+="00":4096>b&&(d+="0");return Ba[a]=d+b.toString(16)}),'"')};fa||z||B&&T(3.5)||A&&T(8);function Fa(a,b){for(var c=a.length,e=Array(c),d="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in d&&(e[f]=b.call(void 0,d[f],f,a));return e};if(B||A){var Ga;if(Ga=A)Ga=A&&9<=na;Ga||B&&G("1.9.1")}A&&G("9");function Ha(a,b){var c={},e;for(e in a)b.call(void 0,a[e],e,a)&&(c[e]=a[e]);return c}function Ia(a,b){var c={},e;for(e in a)c[e]=b.call(void 0,a[e],e,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Fa(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return Fa(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?Fa(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,e=Na(c);if(!(a in e))throw new n(10,"Element does not exist in cache");var d=e[a];if("setInterval"in d){if(d.closed)throw delete e[a],new n(23,"Window has been closed.");return d}for(var f=d;f;){if(f==c.documentElement)return d;f=f.parentNode}delete e[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=A&&T(8)&&!T(9),Pa=R&&U(4)&&!U(5),Qa=Q&&U(2.2)&&!U(2.3),Ra=ha&&R&&U(4)&&!U(6); +function Sa(){var a=k||k;switch("local_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.c=a}Ta.prototype.setItem=function(a,b){try{this.c.setItem(a,b+"")}catch(c){throw new n(13,c.message);}};Ta.prototype.clear=function(){this.c.clear()};function Ua(a,b){if(!Sa())throw new n(13,"Local storage undefined");(new Ta(k.localStorage)).setItem(a,b)};function Va(a,b){var c=Ua,e=[a,b],d=window||k,f;try{var c="string"==typeof c?new d.Function(c):d==window?c:new d.Function("return ("+c+").apply(null,arguments);"),r=La(e,d.document),M=c.apply(null,r);f={status:0,value:X(M)}}catch(w){f={status:"code"in w?w.code:13,value:{message:w.message}}}c=[];W(new za,f,c);return c.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/set_session_storage_item.js b/src/ghostdriver/third_party/webdriver-atoms/set_session_storage_item.js index 16524accf..7aa4344bb 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/set_session_storage_item.js +++ b/src/ghostdriver/third_party/webdriver-atoms/set_session_storage_item.js @@ -1,15 +1,16 @@ -function(){return function(){var g=void 0,h=!0,k=null,l=!1,m=this; -function q(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=q(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var ca=Date.now||function(){return+new Date};var r=window;function s(a,b){this.code=a;this.state=t[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=c.length-5;if(0>e||c.indexOf("Error",e)!=e)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;s.e=a.prototype;s.prototype=new b})(); -var da="unknown error",t={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};t[13]=da;t[9]="unknown command";s.prototype.toString=function(){return this.name+": "+this.message};function u(a,b){for(var c=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(e.length,d.length),v=0;0==c&&v<f;v++){var P=e[v]||"",z=d[v]||"",Ha=RegExp("(\\d*)(\\D*)","g"),Ia=RegExp("(\\d*)(\\D*)","g");do{var n=Ha.exec(P)||["","",""],p=Ia.exec(z)||["","",""];if(0==n[0].length&&0==p[0].length)break;c=((0==n[1].length?0:parseInt(n[1],10))<(0==p[1].length?0:parseInt(p[1],10))?-1:(0==n[1].length?0:parseInt(n[1],10))>(0== -p[1].length?0:parseInt(p[1],10))?1:0)||((0==n[2].length)<(0==p[2].length)?-1:(0==n[2].length)>(0==p[2].length)?1:0)||(n[2]<p[2]?-1:n[2]>p[2]?1:0)}while(0==c)}return c};var w,x,y,A;function B(){return m.navigator?m.navigator.userAgent:k}A=y=x=w=l;var C;if(C=B()){var ea=m.navigator;w=0==C.indexOf("Opera");x=!w&&-1!=C.indexOf("MSIE");y=!w&&-1!=C.indexOf("WebKit");A=!w&&!y&&"Gecko"==ea.product}var D=w,E=x,F=A,fa=y,ga=m.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=m.document;return a?a.documentMode:g}var G; -a:{var H="",I;if(D&&m.opera)var J=m.opera.version,H="function"==typeof J?J():J;else if(F?I=/rv\:([^\);]+)(\)|;)/:E?I=/MSIE\s+([^\);]+)(\)|;)/:fa&&(I=/WebKit\/(\S+)/),I)var ja=I.exec(B()),H=ja?ja[1]:"";if(E){var ka=ia();if(ka>parseFloat(H)){G=String(ka);break a}}G=H}var la={};function K(a){return la[a]||(la[a]=0<=u(G,a))}var ma=m.document,na=!ma||!E?g:ia()||("CSS1Compat"==ma.compatMode?parseInt(G,10):5);var L,M,N,O,Q,R,oa;oa=R=Q=O=N=M=L=l;var S=B();S&&(-1!=S.indexOf("Firefox")?L=h:-1!=S.indexOf("Camino")?M=h:-1!=S.indexOf("iPhone")||-1!=S.indexOf("iPod")?N=h:-1!=S.indexOf("iPad")?O=h:-1!=S.indexOf("Android")?Q=h:-1!=S.indexOf("Chrome")?R=h:-1!=S.indexOf("Safari")&&(oa=h));var pa=L,qa=M,ra=N,sa=O,T=Q,ta=R,ua=oa;function U(a){return(a=a.exec(B()))?a[1]:""}var va=function(){if(pa)return U(/Firefox\/([0-9.]+)/);if(E||D)return G;if(ta)return U(/Chrome\/([0-9.]+)/);if(ua)return U(/Version\/([0-9.]+)/);if(ra||sa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(B());if(a)return a[1]+"."+a[2]}else{if(T)return(a=U(/Android\s+([0-9.]+)/))?a:U(/Version\/([0-9.]+)/);if(qa)return U(/Camino\/([0-9.]+)/)}return""}();var wa,xa;function V(a){return ya?wa(a):E?0<=u(na,a):K(a)}function W(a){return ya?xa(a):T?0<=u(za,a):0<=u(va,a)} -var ya=function(){if(!F)return l;var a=m.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,e=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=c.platformVersion,f=c.version;wa=function(a){return 0<=e.d(d,""+a)};xa=function(a){return 0<=e.d(f,""+a)};return h}(),Aa;if(T){var Ba=/Android\s+([0-9\.]+)/.exec(B());Aa=Ba?Ba[1]:"0"}else Aa="0";var za=Aa;T&&W(2.3);function Ca(){this.a=g} -function Da(a,b,c){switch(typeof b){case "string":Ea(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==q(b)){var e=b.length;c.push("[");for(var d="",f=0;f<e;f++)c.push(d),d=b[f],Da(a,a.a?a.a.call(b,String(f),d):d,c),d=",";c.push("]");break}c.push("{");e="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(d=b[f],"function"!=typeof d&&(c.push(e),Ea(f, -c),c.push(":"),Da(a,a.a?a.a.call(b,f,d):d,c),e=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Fa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ga=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ea(a,b){b.push('"',a.replace(Ga,function(a){if(a in Fa)return Fa[a];var b=a.charCodeAt(0),d="\\u";16>b?d+="000":256>b?d+="00":4096>b&&(d+="0");return Fa[a]=d+b.toString(16)}),'"')};fa||D||F&&V(3.5)||E&&V(8);function Ja(a,b){for(var c=a.length,e=Array(c),d="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in d&&(e[f]=b.call(g,d[f],f,a));return e};if(F||E){var Ka;if(Ka=E)Ka=E&&9<=na;Ka||F&&K("1.9.1")}E&&K("9");function La(a,b){var c={},e;for(e in a)b.call(g,a[e],e,a)&&(c[e]=a[e]);return c}function Ma(a,b){var c={},e;for(e in a)c[e]=b.call(g,a[e],e,a);return c}function Na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function X(a){switch(q(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ja(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Ja(a,X);a=La(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ma(a,X);default:return k}} -function Pa(a,b){return"array"==q(a)?Ja(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):Ma(a,function(a){return Pa(a,b)}):a}function Ra(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Ra(a.ownerDocument),c=Na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} -function Qa(a,b){a=decodeURIComponent(a);var c=b||document,e=Ra(c);if(!(a in e))throw new s(10,"Element does not exist in cache");var d=e[a];if("setInterval"in d){if(d.closed)throw delete e[a],new s(23,"Window has been closed.");return d}for(var f=d;f;){if(f==c.documentElement)return d;f=f.parentNode}delete e[a];throw new s(10,"Element is no longer attached to the DOM");};var Sa=E&&V(8)&&!V(9),Ta=ua&&W(4)&&!W(5),Ua=T&&W(2.2)&&!W(2.3),Va=ha&&ua&&W(4)&&!W(6); -function Wa(){var a=r||r;switch("session_storage"){case "appcache":return Sa?l:a.applicationCache!=k;case "browser_connection":return a.navigator!=k&&a.navigator.onLine!=k;case "database":return Ta||Ua?l:a.openDatabase!=k;case "location":return Va?l:a.navigator!=k&&a.navigator.geolocation!=k;case "local_storage":return Sa?l:a.localStorage!=k;case "session_storage":return Sa?l:a.sessionStorage!=k&&a.sessionStorage.clear!=k;default:throw new s(13,"Unsupported API identifier provided as parameter"); -}};function Xa(a){this.c=a}Xa.prototype.setItem=function(a,b){try{this.c.setItem(a,b+"")}catch(c){throw new s(13,c.message);}};Xa.prototype.clear=function(){this.c.clear()};function Ya(a,b){var c;if(Wa())c=new Xa(r.sessionStorage);else throw new s(13,"Session storage undefined");c.setItem(a,b)};function Za(a,b){var c=Ya,e=[a,b],d=window||r,f;try{var c="string"==typeof c?new d.Function(c):d==window?c:new d.Function("return ("+c+").apply(null,arguments);"),v=Pa(e,d.document),P=c.apply(k,v);f={status:0,value:X(P)}}catch(z){f={status:"code"in z?z.code:13,value:{message:z.message}}}c=[];Da(new Ca,f,c);return c.join("")}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var $a;if($a=!Y.length)$a=Za!==g;$a?Z[$]=Za:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +function(){return function(){var g=this; +function h(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";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=h(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};var k=window;function n(a,b){this.code=a;this.state=p[a]||da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),e=c.length-5;if(0>e||c.indexOf("Error",e)!=e)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;n.e=a.prototype;n.prototype=new b})(); +var da="unknown error",p={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};p[13]=da;p[9]="unknown command";n.prototype.toString=function(){return this.name+": "+this.message};function q(a,b){for(var c=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(e.length,d.length),r=0;0==c&&r<f;r++){var M=e[r]||"",w=d[r]||"",Ca=RegExp("(\\d*)(\\D*)","g"),Da=RegExp("(\\d*)(\\D*)","g");do{var l=Ca.exec(M)||["","",""],m=Da.exec(w)||["","",""];if(0==l[0].length&&0==m[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0== +m[1].length?0:parseInt(m[1],10))?1:0)||((0==l[2].length)<(0==m[2].length)?-1:(0==l[2].length)>(0==m[2].length)?1:0)||(l[2]<m[2]?-1:l[2]>m[2]?1:0)}while(0==c)}return c};var s,t,u,v;function x(){return g.navigator?g.navigator.userAgent:null}v=u=t=s=!1;var y;if(y=x()){var ea=g.navigator;s=0==y.indexOf("Opera");t=!s&&-1!=y.indexOf("MSIE");u=!s&&-1!=y.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var z=s,A=t,B=v,fa=u,ga=g.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win");function ia(){var a=g.document;return a?a.documentMode:void 0}var C; +a:{var D="",E;if(z&&g.opera)var F=g.opera.version,D="function"==typeof F?F():F;else if(B?E=/rv\:([^\);]+)(\)|;)/:A?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ja=E.exec(x()),D=ja?ja[1]:"";if(A){var ka=ia();if(ka>parseFloat(D)){C=String(ka);break a}}C=D}var la={};function G(a){return la[a]||(la[a]=0<=q(C,a))}var ma=g.document,na=ma&&A?ia()||("CSS1Compat"==ma.compatMode?parseInt(C,10):5):void 0;var H,I,J,K,L,N,O;O=N=L=K=J=I=H=!1;var P=x();P&&(-1!=P.indexOf("Firefox")?H=!0:-1!=P.indexOf("Camino")?I=!0:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?J=!0:-1!=P.indexOf("iPad")?K=!0:-1!=P.indexOf("Android")?L=!0:-1!=P.indexOf("Chrome")?N=!0:-1!=P.indexOf("Safari")&&(O=!0));var oa=H,pa=I,qa=J,ra=K,Q=L,sa=N,R=O;function S(a){return(a=a.exec(x()))?a[1]:""}var ta=function(){if(oa)return S(/Firefox\/([0-9.]+)/);if(A||z)return C;if(sa)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(qa||ra){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(pa)return S(/Camino\/([0-9.]+)/)}return""}();var ua,va;function T(a){return wa?ua(a):A?0<=q(na,a):G(a)}function U(a){return wa?va(a):Q?0<=q(xa,a):0<=q(ta,a)} +var wa=function(){if(!B)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,e=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=c.platformVersion,f=c.version;ua=function(a){return 0<=e.d(d,""+a)};va=function(a){return 0<=e.d(f,""+a)};return!0}(),V;if(Q){var ya=/Android\s+([0-9\.]+)/.exec(x());V=ya?ya[1]:"0"}else V="0";var xa=V;Q&&U(2.3); +Q&&U(4);R&&U(6);function za(){this.a=void 0} +function W(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==h(b)){var e=b.length;c.push("[");for(var d="",f=0;f<e;f++)c.push(d),d=b[f],W(a,a.a?a.a.call(b,String(f),d):d,c),d=",";c.push("]");break}c.push("{");e="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(d=b[f],"function"!=typeof d&&(c.push(e),Aa(f, +c),c.push(":"),W(a,a.a?a.a.call(b,f,d):d,c),e=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ba={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ea=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function Aa(a,b){b.push('"',a.replace(Ea,function(a){if(a in Ba)return Ba[a];var b=a.charCodeAt(0),d="\\u";16>b?d+="000":256>b?d+="00":4096>b&&(d+="0");return Ba[a]=d+b.toString(16)}),'"')};fa||z||B&&T(3.5)||A&&T(8);function Fa(a,b){for(var c=a.length,e=Array(c),d="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in d&&(e[f]=b.call(void 0,d[f],f,a));return e};if(B||A){var Ga;if(Ga=A)Ga=A&&9<=na;Ga||B&&G("1.9.1")}A&&G("9");function Ha(a,b){var c={},e;for(e in a)b.call(void 0,a[e],e,a)&&(c[e]=a[e]);return c}function Ia(a,b){var c={},e;for(e in a)c[e]=b.call(void 0,a[e],e,a);return c}function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function X(a){switch(h(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Fa(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return Fa(a,X);a=Ha(a,function(a,b){return"number"==typeof b||"string"==typeof b});return Ia(a,X);default:return null}} +function La(a,b){return"array"==h(a)?Fa(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):Ia(a,function(a){return La(a,b)}):a}function Na(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=Ja(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c} +function Ma(a,b){a=decodeURIComponent(a);var c=b||document,e=Na(c);if(!(a in e))throw new n(10,"Element does not exist in cache");var d=e[a];if("setInterval"in d){if(d.closed)throw delete e[a],new n(23,"Window has been closed.");return d}for(var f=d;f;){if(f==c.documentElement)return d;f=f.parentNode}delete e[a];throw new n(10,"Element is no longer attached to the DOM");};var Oa=A&&T(8)&&!T(9),Pa=R&&U(4)&&!U(5),Qa=Q&&U(2.2)&&!U(2.3),Ra=ha&&R&&U(4)&&!U(6); +function Sa(){var a=k||k;switch("session_storage"){case "appcache":return Oa?!1:null!=a.applicationCache;case "browser_connection":return null!=a.navigator&&null!=a.navigator.onLine;case "database":return Pa||Qa?!1:null!=a.openDatabase;case "location":return Ra?!1:null!=a.navigator&&null!=a.navigator.geolocation;case "local_storage":return Oa?!1:null!=a.localStorage;case "session_storage":return Oa?!1:null!=a.sessionStorage&&null!=a.sessionStorage.clear;default:throw new n(13,"Unsupported API identifier provided as parameter"); +}};function Ta(a){this.c=a}Ta.prototype.setItem=function(a,b){try{this.c.setItem(a,b+"")}catch(c){throw new n(13,c.message);}};Ta.prototype.clear=function(){this.c.clear()};function Ua(a,b){var c;if(Sa())c=new Ta(k.sessionStorage);else throw new n(13,"Session storage undefined");c.setItem(a,b)};function Va(a,b){var c=Ua,e=[a,b],d=window||k,f;try{var c="string"==typeof c?new d.Function(c):d==window?c:new d.Function("return ("+c+").apply(null,arguments);"),r=La(e,d.document),M=c.apply(null,r);f={status:0,value:X(M)}}catch(w){f={status:"code"in w?w.code:13,value:{message:w.message}}}c=[];W(new za,f,c);return c.join("")}var Y=["_"],Z=g;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===Va?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=Va;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/set_window_position.js b/src/ghostdriver/third_party/webdriver-atoms/set_window_position.js deleted file mode 100644 index 5b4b6c48f..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/set_window_position.js +++ /dev/null @@ -1,4 +0,0 @@ -function(){return function(){var c=!0,f=!1,g=this;var aa=window;function h(a,w){for(var b=0,p=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),x=String(w).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),D=Math.max(p.length,x.length),y=0;0==b&&y<D;y++){var da=p[y]||"",ea=x[y]||"",fa=RegExp("(\\d*)(\\D*)","g"),ga=RegExp("(\\d*)(\\D*)","g");do{var d=fa.exec(da)||["","",""],e=ga.exec(ea)||["","",""];if(0==d[0].length&&0==e[0].length)break;b=((0==d[1].length?0:parseInt(d[1],10))<(0==e[1].length?0:parseInt(e[1],10))?-1:(0==d[1].length?0:parseInt(d[1],10))> -(0==e[1].length?0:parseInt(e[1],10))?1:0)||((0==d[2].length)<(0==e[2].length)?-1:(0==d[2].length)>(0==e[2].length)?1:0)||(d[2]<e[2]?-1:d[2]>e[2]?1:0)}while(0==b)}return b};var k,l,m,n;function q(){return g.navigator?g.navigator.userAgent:null}n=m=l=k=f;var r;if(r=q()){var ba=g.navigator;k=0==r.indexOf("Opera");l=!k&&-1!=r.indexOf("MSIE");m=!k&&-1!=r.indexOf("WebKit");n=!k&&!m&&"Gecko"==ba.product}var s=k,t=l,u=n,v=m;function z(){var a=g.document;return a?a.documentMode:void 0}var A; -a:{var B="",C;if(s&&g.opera)var E=g.opera.version,B="function"==typeof E?E():E;else if(u?C=/rv\:([^\);]+)(\)|;)/:t?C=/MSIE\s+([^\);]+)(\)|;)/:v&&(C=/WebKit\/(\S+)/),C)var F=C.exec(q()),B=F?F[1]:"";if(t){var G=z();if(G>parseFloat(B)){A=String(G);break a}}A=B}var H={},I=g.document,ca=!I||!t?void 0:z()||("CSS1Compat"==I.compatMode?parseInt(A,10):5);var J,K,L,M,N,O,P;P=O=N=M=L=K=J=f;var Q=q();Q&&(-1!=Q.indexOf("Firefox")?J=c:-1!=Q.indexOf("Camino")?K=c:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=c:-1!=Q.indexOf("iPad")?M=c:-1!=Q.indexOf("Android")?N=c:-1!=Q.indexOf("Chrome")?O=c:-1!=Q.indexOf("Safari")&&(P=c));var ha=J,ia=K,ja=L,ka=M,R=N,la=O,ma=P;function S(a){return(a=a.exec(q()))?a[1]:""}var na=function(){if(ha)return S(/Firefox\/([0-9.]+)/);if(t||s)return A;if(la)return S(/Chrome\/([0-9.]+)/);if(ma)return S(/Version\/([0-9.]+)/);if(ja||ka){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(q());if(a)return a[1]+"."+a[2]}else{if(R)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ia)return S(/Camino\/([0-9.]+)/)}return""}();var T,U,V=function(){if(!u)return f;var a=g.Components;if(!a)return f;try{if(!a.classes)return f}catch(w){return f}var b=a.classes,a=a.interfaces,p=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),x=b.platformVersion,D=b.version;T=function(a){p.a(x,""+a)};U=function(a){p.a(D,""+a)};return c}(),W;if(R){var oa=/Android\s+([0-9\.]+)/.exec(q());W=oa?oa[1]:"0"}else W="0";var pa=W; -R&&(V?U(2.3):R?h(pa,2.3):h(na,2.3));!s&&v&&(V?T("533"):t?h(ca,"533"):H["533"]||(H["533"]=0<=h(A,"533")));function qa(a,w){(w||aa).moveTo(a.x,a.y)}var X=["_"],Y=g;!(X[0]in Y)&&Y.execScript&&Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());){var $;if($=!X.length)$=void 0!==qa;$?Y[Z]=qa:Y=Y[Z]?Y[Z]:Y[Z]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/set_window_size.js b/src/ghostdriver/third_party/webdriver-atoms/set_window_size.js deleted file mode 100644 index 1040b1f4a..000000000 --- a/src/ghostdriver/third_party/webdriver-atoms/set_window_size.js +++ /dev/null @@ -1,4 +0,0 @@ -function(){return function(){var c=!0,f=!1,g=this;var aa=window;function h(a,w){for(var b=0,p=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),x=String(w).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),D=Math.max(p.length,x.length),y=0;0==b&&y<D;y++){var da=p[y]||"",ea=x[y]||"",fa=RegExp("(\\d*)(\\D*)","g"),ga=RegExp("(\\d*)(\\D*)","g");do{var d=fa.exec(da)||["","",""],e=ga.exec(ea)||["","",""];if(0==d[0].length&&0==e[0].length)break;b=((0==d[1].length?0:parseInt(d[1],10))<(0==e[1].length?0:parseInt(e[1],10))?-1:(0==d[1].length?0:parseInt(d[1],10))> -(0==e[1].length?0:parseInt(e[1],10))?1:0)||((0==d[2].length)<(0==e[2].length)?-1:(0==d[2].length)>(0==e[2].length)?1:0)||(d[2]<e[2]?-1:d[2]>e[2]?1:0)}while(0==b)}return b};var k,l,m,n;function q(){return g.navigator?g.navigator.userAgent:null}n=m=l=k=f;var r;if(r=q()){var ba=g.navigator;k=0==r.indexOf("Opera");l=!k&&-1!=r.indexOf("MSIE");m=!k&&-1!=r.indexOf("WebKit");n=!k&&!m&&"Gecko"==ba.product}var s=k,t=l,u=n,v=m;function z(){var a=g.document;return a?a.documentMode:void 0}var A; -a:{var B="",C;if(s&&g.opera)var E=g.opera.version,B="function"==typeof E?E():E;else if(u?C=/rv\:([^\);]+)(\)|;)/:t?C=/MSIE\s+([^\);]+)(\)|;)/:v&&(C=/WebKit\/(\S+)/),C)var F=C.exec(q()),B=F?F[1]:"";if(t){var G=z();if(G>parseFloat(B)){A=String(G);break a}}A=B}var H={},I=g.document,ca=!I||!t?void 0:z()||("CSS1Compat"==I.compatMode?parseInt(A,10):5);var J,K,L,M,N,O,P;P=O=N=M=L=K=J=f;var Q=q();Q&&(-1!=Q.indexOf("Firefox")?J=c:-1!=Q.indexOf("Camino")?K=c:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=c:-1!=Q.indexOf("iPad")?M=c:-1!=Q.indexOf("Android")?N=c:-1!=Q.indexOf("Chrome")?O=c:-1!=Q.indexOf("Safari")&&(P=c));var ha=J,ia=K,ja=L,ka=M,R=N,la=O,ma=P;function S(a){return(a=a.exec(q()))?a[1]:""}var na=function(){if(ha)return S(/Firefox\/([0-9.]+)/);if(t||s)return A;if(la)return S(/Chrome\/([0-9.]+)/);if(ma)return S(/Version\/([0-9.]+)/);if(ja||ka){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(q());if(a)return a[1]+"."+a[2]}else{if(R)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(ia)return S(/Camino\/([0-9.]+)/)}return""}();var T,U,V=function(){if(!u)return f;var a=g.Components;if(!a)return f;try{if(!a.classes)return f}catch(w){return f}var b=a.classes,a=a.interfaces,p=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),x=b.platformVersion,D=b.version;T=function(a){p.a(x,""+a)};U=function(a){p.a(D,""+a)};return c}(),W;if(R){var oa=/Android\s+([0-9\.]+)/.exec(q());W=oa?oa[1]:"0"}else W="0";var pa=W; -R&&(V?U(2.3):R?h(pa,2.3):h(na,2.3));!s&&v&&(V?T("533"):t?h(ca,"533"):H["533"]||(H["533"]=0<=h(A,"533")));function qa(a,w){(w||aa).resizeTo(a.width,a.height)}var X=["_"],Y=g;!(X[0]in Y)&&Y.execScript&&Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());){var $;if($=!X.length)$=void 0!==qa;$?Y[Z]=qa:Y=Y[Z]?Y[Z]:Y[Z]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/submit.js b/src/ghostdriver/third_party/webdriver-atoms/submit.js index d1729d7f4..04f6b959b 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/submit.js +++ b/src/ghostdriver/third_party/webdriver-atoms/submit.js @@ -1,121 +1,133 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r,s=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function u(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function w(a){return"string"==typeof a}function fa(a){return"function"==ba(a)}function ga(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}var ha="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ia=0,ja=Date.now||function(){return+new Date}; -function x(a,b){function c(){}c.prototype=b.prototype;a.Na=b.prototype;a.prototype=new c;a.prototype.constructor=a};var ka=window;function la(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ma(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function na(a,b){for(var c=0,d=ma(String(a)).split("."),e=ma(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",v=e[g]||"",t=RegExp("(\\d*)(\\D*)","g"),M=RegExp("(\\d*)(\\D*)","g");do{var da=t.exec(p)||["","",""],ea=M.exec(v)||["","",""];if(0==da[0].length&&0==ea[0].length)break;c=((0==da[1].length?0:parseInt(da[1],10))<(0==ea[1].length?0:parseInt(ea[1],10))?-1:(0==da[1].length?0:parseInt(da[1],10))>(0==ea[1].length?0:parseInt(ea[1],10))?1:0)||((0==da[2].length)< -(0==ea[2].length)?-1:(0==da[2].length)>(0==ea[2].length)?1:0)||(da[2]<ea[2]?-1:da[2]>ea[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function y(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=w(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=w(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;y(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function ta(a,b){for(var c=a.length,d=w(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function ua(a,b){var c;a:{c=a.length;for(var d=w(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:w(a)?a.charAt(c):a[c]}function va(a,b){var c;a:if(w(a))c=!w(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function wa(a){return pa.concat.apply(pa,arguments)} -function xa(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var ya={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", +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var l,m=this; +function ca(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ha="closure_uid_"+(1E9*Math.random()>>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)} +function ka(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)}}function la(a,b,c){la=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ja:ka;return la.apply(null,arguments)} +function ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var na=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c;a.prototype.constructor=a};var oa=window;function pa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function qa(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} +function ra(a,b){for(var c=0,d=qa(String(a)).split("."),e=qa(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",x=RegExp("(\\d*)(\\D*)","g"),T=RegExp("(\\d*)(\\D*)","g");do{var u=x.exec(k)||["","",""],q=T.exec(r)||["","",""];if(0==u[0].length&&0==q[0].length)break;c=((0==u[1].length?0:parseInt(u[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==u[1].length?0:parseInt(u[1],10))>(0==q[1].length?0:parseInt(q[1],10))?1:0)||((0==u[2].length)<(0==q[2].length)? +-1:(0==u[2].length)>(0==q[2].length)?1:0)||(u[2]<q[2]?-1:u[2]>q[2]?1:0)}while(0==c)}return c}function sa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ta=Array.prototype;function t(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function ua(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function va(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function wa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function xa(a,b){for(var c=a.length,d=p(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 ya(a,b){for(var c=a.length,d=p(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 za(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function Aa(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function Ba(a){return ta.concat.apply(ta,arguments)}function Ca(a,b,c){return 2>=arguments.length?ta.slice.call(a,b):ta.slice.call(a,b,c)};var Da={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var za="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Aa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Ba(a){Ca.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Aa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Ea(a){var b=a.match(Da);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Fa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ga(a){var b=a.match(Fa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function z(a,b){this.code=a;this.state=Ha[a]||Ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}x(z,Error); -var Ia="unknown error",Ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ha[13]=Ia;Ha[9]="unknown command";z.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa,Pa;function Qa(){return s.navigator?s.navigator.userAgent:m}Na=Ma=La=Ka=Ja=n;var Ra;if(Ra=Qa()){var Sa=s.navigator;Ja=0==Ra.indexOf("Opera");Ka=!Ja&&-1!=Ra.indexOf("MSIE");Ma=(La=!Ja&&-1!=Ra.indexOf("WebKit"))&&-1!=Ra.indexOf("Mobile");Na=!Ja&&!La&&"Gecko"==Sa.product}var A=Ja,B=Ka,C=Na,D=La,Ta=Ma,Ua,Va=s.navigator;Ua=Va&&Va.platform||"";Oa=-1!=Ua.indexOf("Mac");Pa=-1!=Ua.indexOf("Win");var Wa=-1!=Ua.indexOf("Linux");function Xa(){var a=s.document;return a?a.documentMode:k}var Ya; -a:{var Za="",$a;if(A&&s.opera)var ab=s.opera.version,Za="function"==typeof ab?ab():ab;else if(C?$a=/rv\:([^\);]+)(\)|;)/:B?$a=/MSIE\s+([^\);]+)(\)|;)/:D&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Qa()),Za=bb?bb[1]:"";if(B){var cb=Xa();if(cb>parseFloat(Za)){Ya=String(cb);break a}}Ya=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Ya,a))}function fb(a){return B&&gb>=a}var hb=s.document,gb=!hb||!B?k:Xa()||("CSS1Compat"==hb.compatMode?parseInt(Ya,10):5);var ib;!C&&!B||B&&fb(9)||C&&eb("1.9.1");B&&eb("9");var jb=B||A||D;function kb(a,b){this.x=u(a)?a:0;this.y=u(b)?b:0}kb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function lb(a,b){this.width=a;this.height=b}r=lb.prototype;r.toString=function(){return"("+this.width+" x "+this.height+")"};r.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};r.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};r.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};r.scale=function(a){this.width*=a;this.height*=a;return this};function mb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function nb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function ob(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function pb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var qb=3;function E(a){return a?new rb(F(a)):ib||(ib=new rb)}function sb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function tb(a){if(jb)return a.parentElement;a=a.parentNode;return ga(a)&&1==a.nodeType?a:m}function ub(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function vb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!fb(9)){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?wb(a,b):!c&&ub(e,b)?-1*xb(a,b):!d&&ub(f,a)?xb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(s.Range.START_TO_END,d)}function xb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return wb(d,a)}function wb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function yb(a,b){var c=[];return zb(a,b,c,l)?c[0]:k} -function zb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||zb(a,b,c,d))return l;a=a.nextSibling}return n}var Ab={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Bb={IMG:" ",BR:"\n"};function Cb(a,b,c){if(!(a.nodeName in Ab))if(a.nodeType==qb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Bb)b.push(Bb[a.nodeName]);else for(a=a.firstChild;a;)Cb(a,b,c),a=a.nextSibling} -function Db(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function rb(a){this.P=a||s.document||document}rb.prototype.e=function(a){return w(a)?this.P.getElementById(a):a}; -function Eb(a,b,c,d){a=d||a.P;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&va(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function Fb(a){var b=a.P;a=!D&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new kb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}rb.prototype.contains=ub;var Gb,Hb,Ib,Jb,Kb,Lb,Mb;Mb=Lb=Kb=Jb=Ib=Hb=Gb=n;var Nb=Qa();Nb&&(-1!=Nb.indexOf("Firefox")?Gb=l:-1!=Nb.indexOf("Camino")?Hb=l:-1!=Nb.indexOf("iPhone")||-1!=Nb.indexOf("iPod")?Ib=l:-1!=Nb.indexOf("iPad")?Jb=l:-1!=Nb.indexOf("Android")?Kb=l:-1!=Nb.indexOf("Chrome")?Lb=l:-1!=Nb.indexOf("Safari")&&(Mb=l));var Ob=Gb,Pb=Hb,Qb=Ib,Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb;function Vb(a,b,c){this.i=a;this.Ja=b||1;this.r=c||1};var Wb=B&&!fb(9),Xb=B&&!fb(8);function Yb(a,b,c,d,e){this.i=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ma=e;this.parentNode=b}function Zb(a,b,c){var d=Xb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Yb(b,a,b.nodeName,d,c)};function $b(a){this.fa=a;this.R=0}function ac(a){a=a.match(bc);for(var b=0;b<a.length;b++)cc.test(a[b])&&a.splice(b,1);return new $b(a)}var bc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),cc=/^\s/;function G(a,b){return a.fa[a.R+(b||0)]}$b.prototype.next=function(){return this.fa[this.R++]};$b.prototype.back=function(){this.R--};$b.prototype.empty=function(){return this.fa.length<=this.R};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Wb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Wb&&"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} -function dc(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Xb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ec(a,b,c,d,e){return(Wb?fc:gc).call(m,a,b,w(c)?c:m,w(d)?d:m,e||new I)} -function fc(a,b,c,d,e){if(a instanceof hc||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=ic(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)dc(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}jc(a,b,c,d,e);return e} -function gc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),y(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),y(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof kc?jc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),y(b,function(a){dc(a,c,d)&&e.add(a)}));return e} -function lc(a,b,c,d,e){var f;if((a instanceof hc||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=ic(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return dc(a,c,d)}));y(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return mc(a,b,c,d,e)}function mc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)dc(b,c,d)&&a.matches(b)&&e.add(b);return e} -function jc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)dc(b,c,d)&&a.matches(b)&&e.add(b),jc(a,b,c,d,e)}function ic(a){if(a instanceof kc){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function I(){this.r=this.m=m;this.M=0}function nc(a){this.v=a;this.next=this.F=m}function oc(a,b){if(a.m){if(!b.m)return a}else return b;for(var c=a.m,d=b.m,e=m,f=m,g=0;c&&d;)c.v==d.v||c.v instanceof Yb&&d.v instanceof Yb&&c.v.i==d.v.i?(f=c,c=c.next,d=d.next):0<vb(c.v,d.v)?(f=d,d=d.next):(f=c,c=c.next),(f.F=e)?e.next=f:a.m=f,e=f,g++;for(f=c||d;f;)f.F=e,e=e.next=f,g++,f=f.next;a.r=e;a.M=g;return a} -I.prototype.unshift=function(a){a=new nc(a);a.next=this.m;this.r?this.m.F=a:this.m=this.r=a;this.m=a;this.M++};I.prototype.add=function(a){a=new nc(a);a.F=this.r;this.m?this.r.next=a:this.m=this.r=a;this.r=a;this.M++};function pc(a){return(a=a.m)?a.v:m}I.prototype.w=q("M");function qc(a){return(a=pc(a))?H(a):""}function rc(a,b){return new sc(a,!!b)}function sc(a,b){this.Ga=a;this.ha=(this.G=b)?a.r:a.m;this.aa=m} -sc.prototype.next=function(){var a=this.ha;if(a==m)return m;var b=this.aa=a;this.ha=this.G?a.F:a.next;return b.v};sc.prototype.remove=function(){var a=this.Ga,b=this.aa;b||h(Error("Next must be called at least once before remove."));var c=b.F,b=b.next;c?c.next=b:a.m=b;b?b.F=c:a.r=c;a.M--;this.aa=m};function J(a){this.l=a;this.o=this.z=n;this.N=m}J.prototype.j=q("z");function tc(a,b){a.z=b}function uc(a,b){a.o=b}J.prototype.B=q("N");function K(a,b){var c=a.evaluate(b);return c instanceof I?+qc(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof I?qc(c):""+c}function vc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.w():!!c};function wc(a,b,c){J.call(this,a.l);this.da=a;this.ma=b;this.ta=c;this.z=b.j()||c.j();this.o=b.o||c.o;this.da==xc&&(!c.o&&!c.j()&&4!=c.l&&0!=c.l&&b.B()?this.N={name:b.B().name,H:c}:!b.o&&(!b.j()&&4!=b.l&&0!=b.l&&c.B())&&(this.N={name:c.B().name,H:b}))}x(wc,J); -function yc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=rc(b);for(b=f.next();b;b=f.next()){e=rc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=rc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}wc.prototype.evaluate=function(a){return this.da.u(this.ma,this.ta,a)};wc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.da+"\n";a+=" ";b+=this.ma.toString(a)+"\n";return b+=this.ta.toString(a)};function zc(a,b,c,d){this.Ia=a;this.ra=b;this.l=c;this.u=d}zc.prototype.toString=q("Ia");var Ac={}; -function N(a,b,c,d){a in Ac&&h(Error("Binary operator already created: "+a));a=new zc(a,b,c,d);return Ac[a.toString()]=a}N("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});N("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)});N("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});N("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});N("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});N("<",4,2,function(a,b,c){return yc(function(a,b){return a<b},a,b,c)}); -N(">",4,2,function(a,b,c){return yc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return yc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return yc(function(a,b){return a>=b},a,b,c)});var xc=N("=",3,2,function(a,b,c){return yc(function(a,b){return a==b},a,b,c,l)});N("!=",3,2,function(a,b,c){return yc(function(a,b){return a!=b},a,b,c,l)});N("and",2,2,function(a,b,c){return vc(a,c)&&vc(b,c)});N("or",1,2,function(a,b,c){return vc(a,c)||vc(b,c)});function Bc(a,b){b.w()&&4!=a.l&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));J.call(this,a.l);this.sa=a;this.g=b;this.z=a.j();this.o=a.o}x(Bc,J);Bc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return Cc(this.g,a)};Bc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.sa.toString(a);return b+=this.g.toString(a)};function Dc(a,b){b.length<a.pa&&h(Error("Function "+a.p+" expects at least"+a.pa+" arguments, "+b.length+" given"));a.ba!==m&&b.length>a.ba&&h(Error("Function "+a.p+" expects at most "+a.ba+" arguments, "+b.length+" given"));a.Ha&&y(b,function(b,d){4!=b.l&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});J.call(this,a.l);this.Q=a;this.X=b;tc(this,a.z||ta(b,function(a){return a.j()}));uc(this,a.Fa&&!b.length||a.Ea&&!!b.length||ta(b,function(a){return a.o}))}x(Dc,J); -Dc.prototype.evaluate=function(a){return this.Q.u.apply(m,wa(a,this.X))};Dc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.Q+"\n";b+=" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=sa(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Ec(a,b,c,d,e,f,g,p,v){this.p=a;this.l=b;this.z=c;this.Fa=d;this.Ea=e;this.u=f;this.pa=g;this.ba=u(p)?p:g;this.Ha=!!v}Ec.prototype.toString=q("p");var Fc={}; -function O(a,b,c,d,e,f,g,p){a in Fc&&h(Error("Function already created: "+a+"."));Fc[a]=new Ec(a,b,c,d,n,e,f,g,p)}O("boolean",2,n,n,function(a,b){return vc(b,a)},1);O("ceiling",1,n,n,function(a,b){return Math.ceil(K(b,a))},1);O("concat",3,n,n,function(a,b){var c=xa(arguments,1);return sa(c,function(b,c){return b+L(c,a)},"")},2,m);O("contains",2,n,n,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);O("count",1,n,n,function(a,b){return b.evaluate(a).w()},1,1,l);O("false",2,n,n,aa(n),0); -O("floor",1,n,n,function(a,b){return Math.floor(K(b,a))},1);O("id",4,n,n,function(a,b){function c(a){if(Wb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ua(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.i,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];y(d,function(a){(a=c(a))&&!va(f,a)&&f.push(a)});f.sort(vb);var g=new I;y(f,function(a){g.add(a)});return g},1);O("lang",2,n,n,aa(n),1); -O("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.r},0);O("local-name",3,n,l,function(a,b){var c=b?pc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,l);O("name",3,n,l,function(a,b){var c=b?pc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,l);O("namespace-uri",3,l,n,aa(""),0,1,l);O("normalize-space",3,n,l,function(a,b){return(b?L(b,a):H(a.i)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -O("not",2,n,n,function(a,b){return!vc(b,a)},1);O("number",1,n,l,function(a,b){return b?K(b,a):+H(a.i)},0,1);O("position",1,l,n,function(a){return a.Ja},0);O("round",1,n,n,function(a,b){return Math.round(K(b,a))},1);O("starts-with",2,n,n,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,n,l,function(a,b){return b?L(b,a):H(a.i)},0,1);O("string-length",1,n,l,function(a,b){return(b?L(b,a):H(a.i)).length},0,1); -O("substring",3,n,n,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,n,n,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -O("substring-before",3,n,n,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,n,n,function(a,b){for(var c=rc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);O("translate",3,n,n,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(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);O("true",2,n,n,aa(l),0);function kc(a,b){this.xa=a;this.na=u(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=qb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Gc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}kc.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};kc.prototype.getName=q("xa"); -kc.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.xa;this.na===m||(b+="\n"+this.na.toString(a+" "));return b};function Hc(a){J.call(this,3);this.wa=a.substring(1,a.length-1)}x(Hc,J);Hc.prototype.evaluate=q("wa");Hc.prototype.toString=function(a){return(a||"")+"literal: "+this.wa};function hc(a){this.p=a.toLowerCase()}hc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.p||this.p==a.nodeName.toLowerCase()?l:this.p==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};hc.prototype.getName=q("p");hc.prototype.toString=function(a){return(a||"")+"nametest: "+this.p};function Ic(a){J.call(this,1);this.ya=a}x(Ic,J);Ic.prototype.evaluate=q("ya");Ic.prototype.toString=function(a){return(a||"")+"number: "+this.ya};function Jc(a,b){J.call(this,a.l);this.ja=a;this.O=b;this.z=a.j();this.o=a.o;if(1==this.O.length){var c=this.O[0];!c.Z&&c.A==Kc&&(c=c.V,"*"!=c.getName()&&(this.N={name:c.getName(),H:m}))}}x(Jc,J);function Lc(){J.call(this,4)}x(Lc,J);Lc.prototype.evaluate=function(a){var b=new I;a=a.i;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Lc.prototype.toString=function(a){return a+"RootHelperExpr"};function Mc(){J.call(this,4)}x(Mc,J);Mc.prototype.evaluate=function(a){var b=new I;b.add(a.i);return b}; -Mc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Jc.prototype.evaluate=function(a){var b=this.ja.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.O;for(var c=0,d=a.length;c<d&&b.w();c++){var e=a[c],f=rc(b,e.A.G),g;if(!e.j()&&e.A==Nc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Vb(g))}else if(!e.j()&&e.A==Oc)g=f.next(),b=e.evaluate(new Vb(g));else{g=f.next();for(b=e.evaluate(new Vb(g));(g=f.next())!=m;)g=e.evaluate(new Vb(g)),b=oc(b,g)}}return b}; -Jc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ja.toString(b);this.O.length&&(c+=b+"Steps:\n",b+=" ",y(this.O,function(a){c+=a.toString(b)}));return c};function Pc(a,b){this.g=a;this.G=!!b}function Cc(a,b,c){for(c=c||0;c<a.g.length;c++)for(var d=a.g[c],e=rc(b),f=b.w(),g,p=0;g=e.next();p++){var v=a.G?f-p:p+1;g=d.evaluate(new Vb(g,v,f));var t;"number"==typeof g?t=v==g:"string"==typeof g||"boolean"==typeof g?t=!!g:g instanceof I?t=0<g.w():h(Error("Predicate.evaluate returned an unexpected type."));t||e.remove()}return b}Pc.prototype.B=function(){return 0<this.g.length?this.g[0].B():m}; -Pc.prototype.j=function(){for(var a=0;a<this.g.length;a++){var b=this.g[a];if(b.j()||1==b.l||0==b.l)return l}return n};Pc.prototype.w=function(){return this.g.length};Pc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return sa(this.g,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Qc(a,b,c,d){J.call(this,4);this.A=a;this.V=b;this.g=c||new Pc([]);this.Z=!!d;b=this.g.B();a.La&&b&&(a=b.name,a=Wb?a.toLowerCase():a,this.N={name:a,H:b.H});this.z=this.g.j()}x(Qc,J); -Qc.prototype.evaluate=function(a){var b=a.i,c=m,c=this.B(),d=m,e=m,f=0;c&&(d=c.name,e=c.H?L(c.H,a):m,f=1);if(this.Z)if(!this.j()&&this.A==Rc)c=ec(this.V,b,d,e),c=Cc(this.g,c,f);else if(a=rc((new Qc(Sc,new kc("node"))).evaluate(a)),b=a.next())for(c=this.u(b,d,e,f);(b=a.next())!=m;)c=oc(c,this.u(b,d,e,f));else c=new I;else c=this.u(a.i,d,e,f);return c};Qc.prototype.u=function(a,b,c,d){a=this.A.Q(this.V,a,b,c);return a=Cc(this.g,a,d)}; -Qc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.Z?"//":"/")+"\n";this.A.p&&(b+=a+"Axis: "+this.A+"\n");b+=this.V.toString(a);if(this.g.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.g.length;c++)var d=c<this.g.length-1?", ":"",b=b+(this.g[c].toString(a)+d);return b};function Tc(a,b,c,d){this.p=a;this.Q=b;this.G=c;this.La=d}Tc.prototype.toString=q("p");var Uc={}; -function P(a,b,c,d){a in Uc&&h(Error("Axis already created: "+a));b=new Tc(a,b,c,!!d);return Uc[a]=b}P("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);P("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Kc=P("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Wb)return c.add(new Yb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof kc&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Wb?g.nodeValue&&c.add(Zb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Wb?g.nodeValue&&c.add(Zb(b,g,b.sourceIndex)):c.add(g));return c},n),Rc=P("child",function(a,b,c,d,e){return(Wb?lc:mc).call(m,a,b,w(c)?c:m,w(d)?d:m,e||new I)},n,l); -P("descendant",ec,n,l);var Sc=P("descendant-or-self",function(a,b,c,d){var e=new I;dc(b,c,d)&&a.matches(b)&&e.add(b);return ec(a,b,c,d,e)},n,l),Nc=P("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)dc(f,c,d)&&a.matches(f)&&e.add(f),e=ec(a,f,c,d,e);while(b=b.parentNode);return e},n,l);P("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);P("namespace",function(){return new I},n); -var Vc=P("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Oc=P("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var t=0,M=v.length;t<M;t++)b=v[t],dc(b,c,d)&&a.matches(b)&&e.add(b),e=ec(a,b,c,d,e)}return e},l,l); -P("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Wc=P("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Xc(a){J.call(this,1);this.ia=a;this.z=a.j();this.o=a.o}x(Xc,J);Xc.prototype.evaluate=function(a){return-K(this.ia,a)};Xc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ia.toString(a+" ")};function Yc(a){J.call(this,4);this.S=a;tc(this,ta(this.S,function(a){return a.j()}));uc(this,ta(this.S,function(a){return a.o}))}x(Yc,J);Yc.prototype.evaluate=function(a){var b=new I;y(this.S,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=oc(b,c)});return b};Yc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";y(this.S,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Zc(a){this.a=a}function $c(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=ad(a);var d=a.a.next();if(!d)break;var e=(d=Ac[d]||m)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new wc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new wc(c.pop(),c.pop(),b);return b}function Q(a,b){a.a.empty()&&h(Error(b))}function bd(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function cd(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function dd(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Hc(a)}function ed(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new hc(a.a.next()+a.a.next()+a.a.next()):new hc(a.a.next())} -function fd(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Lc;d=new Lc;Q(a,"Missing next location step.");b=gd(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=$c(a);Q(a,'unclosed "("');bd(a,")");break;case '"':case "'":b=dd(a);break;default:if(isNaN(+b))if(!Gc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=Fc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){Q(a,"Missing function argument list.");d.push($c(a));if(","!=G(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");cd(a);b=new Dc(b,d)}else{b=m;break a}else b=new Ic(+a.a.next())}"["==G(a.a)&&(d=new Pc(hd(a)),b=new Bc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=gd(a,"/"),d=new Mc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=gd(a,b),c.push(b);return new Jc(d, -c)} -function gd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Qc(Wc,new kc("node")),a.a.next(),d;if(".."==G(a.a))return d=new Qc(Vc,new kc("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Kc,a.a.next(),Q(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Uc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),Q(a,"Missing node name")):f=Rc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){Gc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Gc(c)||h(Error("Invalid type name: "+c));bd(a,"(");Q(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=dd(a);Q(a,"Bad nodetype");cd(a);c=new kc(c,g)}else c=ed(a);else"*"==e?c=ed(a):h(Error("Bad token: "+a.a.next()));e=new Pc(hd(a),f.G);return d||new Qc(f,c,e,"//"==b)} -function hd(a){for(var b=[];"["==G(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=$c(a);b.push(c);Q(a,"Unclosed predicate expression.");bd(a,"]")}return b}function ad(a){if("-"==G(a.a))return a.a.next(),new Xc(ad(a));var b=fd(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push(fd(a));a.a.back();a=new Yc(b)}return a};function id(a){a.length||h(Error("Empty XPath expression."));a=ac(a);a.empty()&&h(Error("Invalid XPath expression."));var b=$c(new Zc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Vb(a));return new R(e,d)}} -function R(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?qc(a):""+a;break;case 1:this.numberValue=a instanceof I?+qc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.w():!!a;break;case 4:case 5:case 6:case 7:var d=rc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Yb?e.i:e);this.snapshotLength=a.w();this.invalidIteratorState=n;break;case 8:case 9:d=pc(a);this.singleNodeValue=d instanceof Yb?d.i:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function jd(a){a=a||s;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new id(a)).evaluate(b,f)},b.createExpression=function(a){return new id(a)})};var S={};S.Aa=function(){var a={Oa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();S.u=function(a,b,c){var d=F(a);(B||Sb)&&jd(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.Aa;return B&&!eb(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){C&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new z(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -S.Y=function(a,b){(!a||1!=a.nodeType)&&h(new z(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};S.C=function(a,b){var c=function(){var c=S.u(b,a,9);return c?(c=c.singleNodeValue,A?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||S.Y(c,a);return c}; -S.s=function(a,b){var c=function(){var c=S.u(b,a,7);if(c){var e=c.snapshotLength;A&&!u(e)&&S.Y(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();y(c,function(b){S.Y(b,a)});return c};function kd(a){return(a=a.exec(Qa()))?a[1]:""}var ld=function(){if(Ob)return kd(/Firefox\/([0-9.]+)/);if(B||A)return Ya;if(Tb)return kd(/Chrome\/([0-9.]+)/);if(Ub)return kd(/Version\/([0-9.]+)/);if(Qb||Rb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Qa());if(a)return a[1]+"."+a[2]}else{if(Sb)return(a=kd(/Android\s+([0-9.]+)/))?a:kd(/Version\/([0-9.]+)/);if(Pb)return kd(/Camino\/([0-9.]+)/)}return""}();var md,nd;function T(a){return od?md(a):B?0<=na(gb,a):eb(a)}function pd(a){return od?nd(a):Sb?0<=na(qd,a):0<=na(ld,a)} -var od=function(){if(!C)return n;var a=s.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;md=function(a){return 0<=d.Ba(e,""+a)};nd=function(a){return 0<=d.Ba(f,""+a)};return l}(),rd=Rb||Qb,sd;if(Sb){var td=/Android\s+([0-9\.]+)/.exec(Qa());sd=td?td[1]:"0"}else sd="0"; -var qd=sd,ud=B&&!fb(8),vd=B&&!fb(9),wd=B&&!fb(10);Sb&&pd(2.3);!A&&(!D||T("533"));function xd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function yd(a,b){return xd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function zd(a){var b=a.getBoundingClientRect();B&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function Ad(a){if(B&&!fb(8))return a.offsetParent;var b=F(a),c=yd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=yd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function Bd(a){var b=new kb;if(1==a.nodeType){if(a.getBoundingClientRect){var c=zd(a);b.x=c.left;b.y=c.top}else{c=Fb(E(a));var d,e=F(a),f=yd(a,"position"),g=C&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),p=new kb(0,0),v;d=e?F(e):document;if(v=B)if(v=!fb(9))v="CSS1Compat"!=E(d).P.compatMode;v=v?d.body:d.documentElement;if(a!=v)if(a.getBoundingClientRect)d=zd(a),e=Fb(E(e)),p.x=d.left+e.x,p.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(v),p.x=d.screenX-e.screenX,p.y=d.screenY-e.screenY;else{g=a;do{p.x+=g.offsetLeft;p.y+=g.offsetTop;g!=a&&(p.x+=g.clientLeft||0,p.y+=g.clientTop||0);if(D&&"fixed"==yd(g,"position")){p.x+=e.body.scrollLeft;p.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(A||D&&"absolute"==f)p.y-=e.body.offsetTop;for(g=a;(g=Ad(g))&&g!=e.body&&g!=v;)if(p.x-=g.scrollLeft,!A||"TR"!=g.tagName)p.y-=g.scrollTop}b.x=p.x-c.x;b.y=p.y-c.y}if(C&&!eb(12)){var t;B?t="-ms-transform": -D?t="-webkit-transform":A?t="-o-transform":C&&(t="-moz-transform");var M;t&&(M=yd(a,t));M||(M=yd(a,"transform"));M?(a=M.match(Cd),a=!a?new kb(0,0):new kb(parseFloat(a[1]),parseFloat(a[2]))):a=new kb(0,0);b=new kb(b.x+a.x,b.y+a.y)}}else t=fa(a.ka),M=a,a.targetTouches?M=a.targetTouches[0]:t&&a.ka().targetTouches&&(M=a.ka().targetTouches[0]),b.x=M.clientX,b.y=M.clientY;return b} -function Dd(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(!u(b)||d)&&a.getBoundingClientRect?(a=zd(a),new lb(a.right-a.left,a.bottom-a.top)):new lb(b,c)}var Cd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Ed(a){var b;a:{a=F(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Fd(a,b){var c;if(c=ud)if(c="value"==b)if(c=U(a,"OPTION"))c=Gd(a,"value")===m;c?(c=[],Cb(a,c,n),c=c.join("")):c=a[b];return c}var Hd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Id(a){var b=[];y(a.split(Hd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return A?b.replace(/\w+:;/g,""):b}function Gd(a,b){b=b.toLowerCase();if("style"==b)return Id(a.style.cssText);if(ud&&"value"==b&&U(a,"INPUT"))return a.value;if(vd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Jd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Kd(a){var b=a.tagName.toUpperCase();return!va(Jd,b)?l:Fd(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Kd(a.parentNode):Db(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&Fd(b,"disabled")){if(!U(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:sb(a.previousSibling);)if(U(a,"LEGEND"))return l}return n},l)?n:l}var Ld="text search tel url email password number".split(" "); -function Md(a){return U(a,"TEXTAREA")?l:U(a,"INPUT")?va(Ld,a.type.toLowerCase()):Nd(a)?l:n}function Nd(a){function b(a){return"inherit"==a.contentEditable?(a=Od(a))?b(a):n:"true"==a.contentEditable}return!u(a.contentEditable)?n:!B&&u(a.isContentEditable)?a.isContentEditable:b(a)}function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:m} -function V(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=vd?"styleFloat":"cssFloat";c=xd(a,c)||Pd(a,c);if(c===m)c=m;else if(va(za,b)&&(Ca.test("#"==c.charAt(0)?c:"#"+c)||Ga(c).length||ya&&ya[c.toLowerCase()]||Ea(c).length)){var d=Ea(c);if(!d.length){a:if(d=Ga(c),!d.length){d=ya[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Ca.test(d)&&(d=Ba(d),d=Ba(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!u(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?u(d)?d:m:(c=Od(a))?Pd(c,b):m} -function Qd(a){if(fa(a.getBBox)&&!U(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,"BODY")){b=(F(a)?F(a).parentWindow||F(a).defaultView:window)||k;"hidden"!=V(a,"overflow")?a=l:(a=Od(a),!a||!U(a,"HTML")?a=l:(a=V(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ka).document;a=b.documentElement;var d=b.body;d||h(new z(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new lb(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new lb(a.clientWidth,a.clientHeight);return a}if("none"!=yd(a,"display"))a=Dd(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Dd(a);b.display=d;b.position=f;b.visibility=e}return a} -function Rd(a,b){function c(a){if("none"==V(a,"display"))return n;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?l:U(a,"PATH")&&(0<b.height||0<b.width)?(b=V(a,"stroke-width"),!!b&&0<parseInt(b,10)):ta(a.childNodes,function(b){return b.nodeType==qb&&"hidden"!=V(a,"overflow")||U(b)&&d(b)})}function e(a,b){var c;if((c=b==m?tb(a):tb(b))&&("hidden"==V(c,"overflow-x")||"hidden"==V(c,"overflow-y"))){var d=Qd(c),f=Bd(c),g=Bd(a);return f.x+d.width<=g.x&&"hidden"==V(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==V(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=V(a,"-o-transform")||V(a,"-webkit-transform")||V(a,"-ms-transform")||V(a,"-moz-transform")||V(a,"transform");if(b&&"none"!==b)return b=Bd(a),a=Qd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Od(a);return!a||f(a)}U(a)||h(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var g=Db(a,function(a){return U(a,"SELECT")});return!!g&&Rd(g,l)}if(U(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?S.C('/descendant::*[@usemap = "#'+a.name+'"]',g):yb(g,function(b){return U(b)&&Gd(b,"usemap")=="#"+a.name});return!!g&&Rd(g,b)}return U(a,"AREA")?(g=Db(a,function(a){return U(a,"MAP")}),!!g&&Rd(g,b)):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Sd(a)||!d(a)||!e(a,m)?n:f(a)}function Td(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function Ud(a){var b=[];Vd(a,b);b=ra(b,Td);return Td(b.join("\n")).replace(/\xa0/g," ")} -function Vd(a,b){if(U(a,"BR"))b.push("");else{var c=U(a,"TD"),d=V(a,"display"),e=!c&&!va(Wd,d),f=a.previousElementSibling!=k?a.previousElementSibling:sb(a.previousSibling),f=f?V(f,"display"):"",g=V(a,"float")||V(a,"cssFloat")||V(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var p=Rd(a),v=m,t=m;p&&(v=V(a,"white-space"),t=V(a,"text-transform"));y(a.childNodes,function(a){a.nodeType==qb&&p?Xd(a,b,v,t):U(a)&&Vd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!la(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var Wd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function Xd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";la(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function Sd(a){if(wd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Yd(a)}function Yd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Yd(a));return b};var Zd={ga:function(a){return!(!a.querySelectorAll||!a.querySelector)},C:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(Zd.ga(b))return b.querySelector("."+a.replace(/\./g,"\\."))||m;var c=Eb(E(b),"*",a,b);return c.length?c[0]:m},s:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return Zd.ga(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):Eb(E(b),"*",a,b)}};var $d={C:function(a,b){!fa(b.querySelector)&&(B&&T(8)&&!ga(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:m},s:function(a,b){!fa(b.querySelectorAll)&&(B&&T(8)&&!ga(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);return b.querySelectorAll(a)}};var ae={},be={};ae.va=function(a,b,c){var d;try{d=$d.s("a",b)}catch(e){d=Eb(E(b),"A",m,b)}return ua(d,function(b){b=Ud(b);return c&&-1!=b.indexOf(a)||b==a})};ae.oa=function(a,b,c){var d;try{d=$d.s("a",b)}catch(e){d=Eb(E(b),"A",m,b)}return qa(d,function(b){b=Ud(b);return c&&-1!=b.indexOf(a)||b==a})};ae.C=function(a,b){return ae.va(a,b,n)};ae.s=function(a,b){return ae.oa(a,b,n)};be.C=function(a,b){return ae.va(a,b,l)};be.s=function(a,b){return ae.oa(a,b,l)};var ce={C:function(a,b){return b.getElementsByTagName(a)[0]||m},s:function(a,b){return b.getElementsByTagName(a)}};var de={className:Zd,"class name":Zd,css:$d,"css selector":$d,id:{C:function(a,b){var c=E(b),d=c.e(a);if(!d)return m;if(Gd(d,"id")==a&&ub(b,d))return d;c=Eb(c,"*");return ua(c,function(c){return Gd(c,"id")==a&&ub(b,c)})},s:function(a,b){var c=Eb(E(b),"*",m,b);return qa(c,function(b){return Gd(b,"id")==a})}},linkText:ae,"link text":ae,name:{C:function(a,b){var c=Eb(E(b),"*",m,b);return ua(c,function(b){return Gd(b,"name")==a})},s:function(a,b){var c=Eb(E(b),"*",m,b);return qa(c,function(b){return Gd(b, -"name")==a})}},partialLinkText:be,"partial link text":be,tagName:ce,"tag name":ce,xpath:S};function ee(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=m}if(c){var d=de[c];if(d&&fa(d.s))return d.s(a[c],b||ka.document)}h(Error("Unsupported locator strategy: "+c))};function fe(a){this.t=ka.document.documentElement;this.ua=m;var b=Ed(this.t);b&&ge(this,b);this.Da=a||new he}fe.prototype.e=q("t");function ge(a,b){a.t=b;a.ua=U(b,"OPTION")?Db(b,function(a){return U(a,"SELECT")}):m}D||A||od&&pd(3.6);function ie(a){return U(a,"FORM")} -function je(a){ie(a)||h(new z(12,"Element is not a form, so could not submit."));if(W(a,ke))if(U(a.submit))if(!B||T(8))a.constructor.prototype.submit.call(a);else{var b=ee({id:"submit"},a),c=ee({name:"submit"},a);y(b,function(a){a.removeAttribute("id")});y(c,function(a){a.removeAttribute("name")});a=a.submit;y(b,function(a){a.setAttribute("id","submit")});y(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}function he(){this.T=0}he.prototype.h=function(a){return 0!=(this.T&a)};var le=!(B&&!T(10))&&!A,me=Sb?!pd(4):!rd;function X(a,b,c){this.f=a;this.I=b;this.J=c}X.prototype.create=function(a){a=F(a);vd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.I,this.J));return a};X.prototype.toString=q("f");function ne(a,b,c){X.call(this,a,b,c)}x(ne,X); -ne.prototype.create=function(a,b){var c=F(a);if(C){var d=c?c.parentWindow||c.defaultView:window,e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.f,this.I,this.J,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.f==oe&&b.preventDefault&&c.preventDefault()}else vd?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.f,this.I,this.J)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode, -D&&(c.charCode=this==oe?c.keyCode:0);return c};function pe(a,b,c){X.call(this,a,b,c)}x(pe,X); -pe.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}le||h(new z(9,"Browser does not support firing touch events."));var e=F(a),f=e?e.parentWindow||e.defaultView: -window,g=me?d(b.changedTouches):c(b.changedTouches),p=b.touches==b.changedTouches?g:me?d(b.touches):c(b.touches),v=b.targetTouches==b.changedTouches?g:me?d(b.targetTouches):c(b.targetTouches),t;me?(t=e.createEvent("MouseEvents"),t.initMouseEvent(this.f,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),t.touches=p,t.targetTouches=v,t.changedTouches=g,t.scale=b.scale,t.rotation=b.rotation):(t=e.createEvent("TouchEvent"),Sb?t.initTouchEvent(p,v,g,this.f, -f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey):t.initTouchEvent(this.f,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,v,g,b.scale,b.rotation),t.relatedTarget=b.relatedTarget);return t}; -var qe=new X("blur",n,n),re=new X("change",l,n),se=new X("focus",n,n),te=new X("input",n,n),ke=new X("submit",l,l),ue=new X("textInput",l,l),ve=new ne("keydown",l,l),oe=new ne("keypress",l,l),we=new ne("keyup",l,l),xe=new pe("touchend",l,l),ye=new pe("touchstart",l,l);function W(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return vd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function ze(a,b){if(Ae(a))a.selectionStart=b;else if(B){var c=Be(a),d=c[0];d.inRange(c[1])&&(b=Ce(a,b),d.collapse(l),d.move("character",b),d.select())}} -function De(a,b){var c=0,d=0;if(Ae(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(B){var e=Be(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,p=e=c.text,v=n;!v;)0==f.compareEndPoints("StartToEnd",f)?v=l:(f.moveEnd("character",-1),f.text==g?d+="\r\n":v=l);if(b)f=[d.length,-1];else{for(f=n;!f;)0==c.compareEndPoints("StartToEnd",c)?f=l:(c.moveEnd("character",-1),c.text==e?p+="\r\n":f=l);f=[d.length,d.length+p.length]}return f}c= -f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Ee(a,b){if(Ae(a))a.selectionEnd=b;else if(B){var c=Be(a),d=c[1];c[0].inRange(d)&&(b=Ce(a,b),c=Ce(a,De(a,l)[0]),d.collapse(l),d.moveEnd("character",b-c),d.select())}}function Fe(a,b){if(Ae(a))a.selectionStart=b,a.selectionEnd=b;else if(B){b=Ce(a,b);var c=a.createTextRange();c.collapse(l);c.move("character",b);c.select()}} -function Ge(a,b){if(Ae(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else B?(d=Be(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select())):h(Error("Cannot set the selection end"))}function Be(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} -function Ce(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Ae(a){try{return"number"==typeof a.selectionStart}catch(b){return n}};function He(a){if("function"==typeof a.L)return a.L();if(w(a))return a.split("");if(ca(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ob(a)};function Ie(a,b){this.n={};this.k=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.W(a)}r=Ie.prototype;r.K=0;r.za=0;r.L=function(){Je(this);for(var a=[],b=0;b<this.k.length;b++)a.push(this.n[this.k[b]]);return a};function Ke(a){Je(a);return a.k.concat()}r.remove=function(a){return Le(this.n,a)?(delete this.n[a],this.K--,this.za++,this.k.length>2*this.K&&Je(this),l):n}; -function Je(a){if(a.K!=a.k.length){for(var b=0,c=0;b<a.k.length;){var d=a.k[b];Le(a.n,d)&&(a.k[c++]=d);b++}a.k.length=c}if(a.K!=a.k.length){for(var e={},c=b=0;b<a.k.length;)d=a.k[b],Le(e,d)||(a.k[c++]=d,e[d]=1),b++;a.k.length=c}}r.get=function(a,b){return Le(this.n,a)?this.n[a]:b};r.set=function(a,b){Le(this.n,a)||(this.K++,this.k.push(a),this.za++);this.n[a]=b}; -r.W=function(a){var b;if(a instanceof Ie)b=Ke(a),a=a.L();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=ob(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function Le(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Me(a){this.n=new Ie;a&&this.W(a)}function Ne(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ha]||(a[ha]=++ia)):b.substr(0,1)+a}r=Me.prototype;r.add=function(a){this.n.set(Ne(a),a)};r.W=function(a){a=He(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};r.remove=function(a){return this.n.remove(Ne(a))};r.contains=function(a){a=Ne(a);return Le(this.n.n,a)};r.L=function(){return this.n.L()};function Oe(a){fe.call(this);this.$=Md(this.e())&&!Fd(this.e(),"readOnly");this.q=0;this.ea=new Me;a&&(y(a.pressed,function(a){Pe(this,a,l)},this),this.q=a.currentPos)}x(Oe,fe);var Qe={};function Y(a,b,c){ga(a)&&(a=C?a.c:A?a.opera:a.d);a=new Re(a,b,c);if(b&&(!(b in Qe)||c))Qe[b]={key:a,shift:n},c&&(Qe[c]={key:a,shift:l});return a}function Re(a,b,c){this.code=a;this.D=b||m;this.Ka=c||this.D}var Se=Y(8),Te=Y(9),Ue=Y(13),Z=Y(16),Ve=Y(17),We=Y(18),Xe=Y(19);Y(20); -var Ye=Y(27),Ze=Y(32," "),$e=Y(33),af=Y(34),bf=Y(35),cf=Y(36),df=Y(37),ef=Y(38),ff=Y(39),gf=Y(40);Y(44);var hf=Y(45),jf=Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","(");Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q"); +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", +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", +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"};var Ea="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Fa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ga=/^#(?:[0-9a-f]{3}){1,2}$/i,Ha=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ia=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function v(a,b){this.code=a;this.state=Ja[a]||Ka;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(v,Error); +var Ka="unknown error",Ja={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ja[13]=Ka;Ja[9]="unknown command";v.prototype.toString=function(){return this.name+": "+this.message};var La,Ma,Na,Oa,Pa,Qa,Ra;function Sa(){return m.navigator?m.navigator.userAgent:null}Pa=Oa=Na=Ma=La=!1;var Ta;if(Ta=Sa()){var Ua=m.navigator;La=0==Ta.indexOf("Opera");Ma=!La&&-1!=Ta.indexOf("MSIE");Oa=(Na=!La&&-1!=Ta.indexOf("WebKit"))&&-1!=Ta.indexOf("Mobile");Pa=!La&&!Na&&"Gecko"==Ua.product}var w=La,y=Ma,z=Pa,B=Na,Va=Oa,Wa,Xa=m.navigator;Wa=Xa&&Xa.platform||"";Qa=-1!=Wa.indexOf("Mac");Ra=-1!=Wa.indexOf("Win");var Ya=-1!=Wa.indexOf("Linux"); +function Za(){var a=m.document;return a?a.documentMode:void 0}var $a;a:{var ab="",bb;if(w&&m.opera)var cb=m.opera.version,ab="function"==typeof cb?cb():cb;else if(z?bb=/rv\:([^\);]+)(\)|;)/:y?bb=/MSIE\s+([^\);]+)(\)|;)/:B&&(bb=/WebKit\/(\S+)/),bb)var db=bb.exec(Sa()),ab=db?db[1]:"";if(y){var eb=Za();if(eb>parseFloat(ab)){$a=String(eb);break a}}$a=ab}var fb={};function gb(a){return fb[a]||(fb[a]=0<=ra($a,a))}var kb=m.document,lb=kb&&y?Za()||("CSS1Compat"==kb.compatMode?parseInt($a,10):5):void 0;var mb;!z&&!y||y&&y&&9<=lb||z&&gb("1.9.1");y&&gb("9");function nb(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}l=nb.prototype;l.toString=function(){return"("+this.x+", "+this.y+")"};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function ob(a,b){this.width=a;this.height=b}l=ob.prototype;l.toString=function(){return"("+this.width+" x "+this.height+")"};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function pb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function qb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function rb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function sb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var tb=3;function ub(a){return a?new vb(C(a)):mb||(mb=new vb)}function wb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new ob(a.clientWidth,a.clientHeight)}function xb(a){return a.parentWindow||a.defaultView}function yb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function zb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Ab(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(y&&!(y&&9<=lb)){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?Bb(a,b):!c&&zb(e,b)?-1*Cb(a,b):!d&&zb(f,a)?Cb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function Cb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Bb(d,a)}function Bb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var Db={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Eb={IMG:" ",BR:"\n"}; +function Fb(a,b,c){if(!(a.nodeName in Db))if(a.nodeType==tb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Eb)b.push(Eb[a.nodeName]);else for(a=a.firstChild;a;)Fb(a,b,c),a=a.nextSibling}function Gb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function vb(a){this.aa=a||m.document||document}vb.prototype.e=function(a){return p(a)?this.aa.getElementById(a):a}; +function Hb(a,b,c,d){a=d||a.aa;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&Aa(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} +vb.prototype.contains=zb;var Ib,Jb,Kb,Lb,Mb,Nb,Ob;Ob=Nb=Mb=Lb=Kb=Jb=Ib=!1;var Pb=Sa();Pb&&(-1!=Pb.indexOf("Firefox")?Ib=!0:-1!=Pb.indexOf("Camino")?Jb=!0:-1!=Pb.indexOf("iPhone")||-1!=Pb.indexOf("iPod")?Kb=!0:-1!=Pb.indexOf("iPad")?Lb=!0:-1!=Pb.indexOf("Android")?Mb=!0:-1!=Pb.indexOf("Chrome")?Nb=!0:-1!=Pb.indexOf("Safari")&&(Ob=!0));var Qb=Ib,Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb,Vb=Nb,Wb=Ob;function Xb(a,b,c){this.i=a;this.Pa=b||1;this.r=c||1};var Yb=y&&!(y&&9<=lb),Zb=y&&!(y&&8<=lb);function $b(a,b,c,d,e){this.i=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Sa=e;this.parentNode=b}function ac(a,b,c){var d=Zb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $b(b,a,b.nodeName,d,c)};function bc(a){this.ja=a;this.S=0}function cc(a){a=a.match(dc);for(var b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);return new bc(a)}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function D(a,b){return a.ja[a.S+(b||0)]}bc.prototype.next=function(){return this.ja[this.S++]};bc.prototype.back=function(){this.S--};bc.prototype.empty=function(){return this.ja.length<=this.S};function E(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(Yb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Yb&&"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} +function fc(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Zb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function gc(a,b,c,d,e){return(Yb?hc:ic).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)} +function hc(a,b,c,d,e){if(a instanceof jc||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=kc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)fc(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}lc(a,b,c,d,e);return e} +function ic(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!y?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof G?lc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){fc(a,c,d)&&e.add(a)}));return e} +function mc(a,b,c,d,e){var f;if((a instanceof jc||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var g=kc(a);if("*"!=g&&(f=ua(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ua(f,function(a){return fc(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return nc(a,b,c,d,e)}function nc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&e.add(b);return e} +function lc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&e.add(b),lc(a,b,c,d,e)}function kc(a){if(a instanceof G){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function F(){this.r=this.m=null;this.O=0}function oc(a){this.v=a;this.next=this.G=null}function pc(a,b){if(!a.m)return b;if(!b.m)return a;for(var c=a.m,d=b.m,e=null,f=null,g=0;c&&d;)c.v==d.v||c.v instanceof $b&&d.v instanceof $b&&c.v.i==d.v.i?(f=c,c=c.next,d=d.next):0<Ab(c.v,d.v)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.m=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.O=g;return a} +F.prototype.unshift=function(a){a=new oc(a);a.next=this.m;this.r?this.m.G=a:this.m=this.r=a;this.m=a;this.O++};F.prototype.add=function(a){a=new oc(a);a.G=this.r;this.m?this.r.next=a:this.m=this.r=a;this.r=a;this.O++};function qc(a){return(a=a.m)?a.v:null}F.prototype.u=h("O");function rc(a){return(a=qc(a))?E(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.La=a;this.la=(this.I=b)?a.r:a.m;this.da=null} +tc.prototype.next=function(){var a=this.la;if(null==a)return null;var b=this.da=a;this.la=this.I?a.G:a.next;return b.v};tc.prototype.remove=function(){var a=this.La,b=this.da;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.m=b;b?b.G=c:a.r=c;a.O--;this.da=null};function H(a){this.l=a;this.o=this.w=!1;this.P=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.j=h("w");function uc(a,b){a.w=b}function vc(a,b){a.o=b}H.prototype.B=h("P");function J(a,b){var c=a.evaluate(b);return c instanceof F?+rc(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof F?rc(c):""+c}function wc(a,b){var c=a.evaluate(b);return c instanceof F?!!c.u():!!c};function xc(a,b,c){H.call(this,a.l);this.ha=a;this.ra=b;this.ya=c;this.w=b.j()||c.j();this.o=b.o||c.o;this.ha==yc&&(c.o||c.j()||4==c.l||0==c.l||!b.B()?b.o||(b.j()||4==b.l||0==b.l||!c.B())||(this.P={name:c.B().name,J:b}):this.P={name:b.B().name,J:c})}s(xc,H); +function zc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof F&&c instanceof F){e=sc(b);for(d=e.next();d;d=e.next())for(b=sc(c),f=b.next();f;f=b.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof F||c instanceof F){b instanceof F?e=b:(e=c,c=b);e=sc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+E(d);break;case "boolean":d=!!E(d);break;case "string":d=E(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}xc.prototype.evaluate=function(a){return this.ha.t(this.ra,this.ya,a)};xc.prototype.toString=function(){var a="Binary Expression: "+this.ha,a=a+I(this.ra);return a+=I(this.ya)};function Ac(a,b,c,d){this.Oa=a;this.wa=b;this.l=c;this.t=d}Ac.prototype.toString=h("Oa");var Bc={}; +function M(a,b,c,d){if(Bc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Ac(a,b,c,d);return Bc[a.toString()]=a}M("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});M("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});M("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});M("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});M("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});M("<",4,2,function(a,b,c){return zc(function(a,b){return a<b},a,b,c)}); +M(">",4,2,function(a,b,c){return zc(function(a,b){return a>b},a,b,c)});M("<=",4,2,function(a,b,c){return zc(function(a,b){return a<=b},a,b,c)});M(">=",4,2,function(a,b,c){return zc(function(a,b){return a>=b},a,b,c)});var yc=M("=",3,2,function(a,b,c){return zc(function(a,b){return a==b},a,b,c,!0)});M("!=",3,2,function(a,b,c){return zc(function(a,b){return a!=b},a,b,c,!0)});M("and",2,2,function(a,b,c){return wc(a,c)&&wc(b,c)});M("or",1,2,function(a,b,c){return wc(a,c)||wc(b,c)});function Cc(a,b){if(b.u()&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.l);this.xa=a;this.g=b;this.w=a.j();this.o=a.o}s(Cc,H);Cc.prototype.evaluate=function(a){a=this.xa.evaluate(a);return Dc(this.g,a)};Cc.prototype.toString=function(){var a;a="Filter:"+I(this.xa);return a+=I(this.g)};function Ec(a,b){if(b.length<a.ua)throw Error("Function "+a.q+" expects at least"+a.ua+" arguments, "+b.length+" given");if(null!==a.ea&&b.length>a.ea)throw Error("Function "+a.q+" expects at most "+a.ea+" arguments, "+b.length+" given");a.Ma&&t(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.q+" is not of type Nodeset: "+b);});H.call(this,a.l);this.R=a;this.Y=b;uc(this,a.w||xa(b,function(a){return a.j()}));vc(this,a.Ka&&!b.length||a.Ja&&!!b.length||xa(b,function(a){return a.o}))} +s(Ec,H);Ec.prototype.evaluate=function(a){return this.R.t.apply(null,Ba(a,this.Y))};Ec.prototype.toString=function(){var a="Function: "+this.R;if(this.Y.length)var b=wa(this.Y,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function Fc(a,b,c,d,e,f,g,k,r){this.q=a;this.l=b;this.w=c;this.Ka=d;this.Ja=e;this.t=f;this.ua=g;this.ea=n(k)?k:g;this.Ma=!!r}Fc.prototype.toString=h("q");var Gc={}; +function N(a,b,c,d,e,f,g,k){if(Gc.hasOwnProperty(a))throw Error("Function already created: "+a+".");Gc[a]=new Fc(a,b,c,d,!1,e,f,g,k)}N("boolean",2,!1,!1,function(a,b){return wc(b,a)},1);N("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);N("concat",3,!1,!1,function(a,b){var c=Ca(arguments,1);return wa(c,function(b,c){return b+L(c,a)},"")},2,null);N("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2); +N("count",1,!1,!1,function(a,b){return b.evaluate(a).u()},1,1,!0);N("false",2,!1,!1,aa(!1),0);N("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); +N("id",4,!1,!1,function(a,b){function c(a){if(Yb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return za(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.i,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!Aa(f,a)&&f.push(a)});f.sort(Ab);var g=new F;t(f,function(a){g.add(a)});return g},1);N("lang",2,!1,!1,aa(!1),1); +N("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);N("local-name",3,!1,!0,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,!0);N("name",3,!1,!0,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,!0);N("namespace-uri",3,!0,!1,aa(""),0,1,!0);N("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):E(a.i)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +N("not",2,!1,!1,function(a,b){return!wc(b,a)},1);N("number",1,!1,!0,function(a,b){return b?J(b,a):+E(a.i)},0,1);N("position",1,!0,!1,function(a){return a.Pa},0);N("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);N("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);N("string",3,!1,!0,function(a,b){return b?L(b,a):E(a.i)},0,1);N("string-length",1,!1,!0,function(a,b){return(b?L(b,a):E(a.i)).length},0,1); +N("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);N("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +N("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);N("sum",1,!1,!1,function(a,b){for(var c=sc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+E(e);return d},1,1,!0);N("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(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);N("true",2,!1,!1,aa(!0),0);function G(a,b){this.Ca=a;this.sa=n(b)?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=tb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Hc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}G.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};G.prototype.getName=h("Ca"); +G.prototype.toString=function(){var a="Kind Test: "+this.Ca;null===this.sa||(a+=I(this.sa));return a};function Ic(a){H.call(this,3);this.Ba=a.substring(1,a.length-1)}s(Ic,H);Ic.prototype.evaluate=h("Ba");Ic.prototype.toString=function(){return"Literal: "+this.Ba};function jc(a,b){this.q=a.toLowerCase();this.fa=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}jc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.q&&this.q!=a.nodeName.toLowerCase()?!1:this.fa==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};jc.prototype.getName=h("q");jc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.fa?"":this.fa+":")+this.q};function Jc(a){H.call(this,1);this.Da=a}s(Jc,H);Jc.prototype.evaluate=h("Da");Jc.prototype.toString=function(){return"Number: "+this.Da};function Kc(a,b){H.call(this,a.l);this.oa=a;this.Q=b;this.w=a.j();this.o=a.o;if(1==this.Q.length){var c=this.Q[0];c.$||c.A!=Lc||(c=c.W,"*"!=c.getName()&&(this.P={name:c.getName(),J:null}))}}s(Kc,H);function Mc(){H.call(this,4)}s(Mc,H);Mc.prototype.evaluate=function(a){var b=new F;a=a.i;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Mc.prototype.toString=aa("Root Helper Expression");function Nc(){H.call(this,4)}s(Nc,H);Nc.prototype.evaluate=function(a){var b=new F;b.add(a.i);return b}; +Nc.prototype.toString=aa("Context Helper Expression"); +Kc.prototype.evaluate=function(a){var b=this.oa.evaluate(a);if(!(b instanceof F))throw Error("Filter expression must evaluate to nodeset.");a=this.Q;for(var c=0,d=a.length;c<d&&b.u();c++){var e=a[c],f=sc(b,e.A.I),g;if(e.j()||e.A!=Oc)if(e.j()||e.A!=Pc)for(g=f.next(),b=e.evaluate(new Xb(g));null!=(g=f.next());)g=e.evaluate(new Xb(g)),b=pc(b,g);else g=f.next(),b=e.evaluate(new Xb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Xb(g))}}return b}; +Kc.prototype.toString=function(){var a;a="Path Expression:"+I(this.oa);if(this.Q.length){var b=wa(this.Q,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function Qc(a,b){this.g=a;this.I=!!b}function Dc(a,b,c){for(c=c||0;c<a.g.length;c++)for(var d=a.g[c],e=sc(b),f=b.u(),g,k=0;g=e.next();k++){var r=a.I?f-k:k+1;g=d.evaluate(new Xb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof F)r=0<g.u();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Qc.prototype.B=function(){return 0<this.g.length?this.g[0].B():null}; +Qc.prototype.j=function(){for(var a=0;a<this.g.length;a++){var b=this.g[a];if(b.j()||1==b.l||0==b.l)return!0}return!1};Qc.prototype.u=function(){return this.g.length};Qc.prototype.toString=function(){return wa(this.g,function(a,b){return a+I(b)},"Predicates:")};function Rc(a,b,c,d){H.call(this,4);this.A=a;this.W=b;this.g=c||new Qc([]);this.$=!!d;b=this.g.B();a.Ra&&b&&(a=b.name,a=Yb?a.toLowerCase():a,this.P={name:a,J:b.J});this.w=this.g.j()}s(Rc,H); +Rc.prototype.evaluate=function(a){var b=a.i,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.J?L(c.J,a):null,f=1);if(this.$)if(this.j()||this.A!=Sc)if(a=sc((new Rc(Tc,new G("node"))).evaluate(a)),b=a.next())for(c=this.t(b,d,e,f);null!=(b=a.next());)c=pc(c,this.t(b,d,e,f));else c=new F;else c=gc(this.W,b,d,e),c=Dc(this.g,c,f);else c=this.t(a.i,d,e,f);return c};Rc.prototype.t=function(a,b,c,d){a=this.A.R(this.W,a,b,c);return a=Dc(this.g,a,d)}; +Rc.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.$?"//":"/"));this.A.q&&(a+=I("Axis: "+this.A));a+=I(this.W);if(this.g.u()){var b=wa(this.g.g,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Uc(a,b,c,d){this.q=a;this.R=b;this.I=c;this.Ra=d}Uc.prototype.toString=h("q");var Vc={};function O(a,b,c,d){if(Vc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Uc(a,b,c,!!d);return Vc[a]=b} +O("ancestor",function(a,b){for(var c=new F,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);O("ancestor-or-self",function(a,b){var c=new F,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Lc=O("attribute",function(a,b){var c=new F,d=a.getName();if("style"==d&&b.style&&Yb)return c.add(new $b(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof G&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Yb?g.nodeValue&&c.add(ac(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Yb?g.nodeValue&&c.add(ac(b,g,b.sourceIndex)):c.add(g));return c},!1),Sc=O("child",function(a,b,c,d,e){return(Yb?mc:nc).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)}, +!1,!0);O("descendant",gc,!1,!0);var Tc=O("descendant-or-self",function(a,b,c,d){var e=new F;fc(b,c,d)&&a.matches(b)&&e.add(b);return gc(a,b,c,d,e)},!1,!0),Oc=O("following",function(a,b,c,d){var e=new F;do for(var f=b;f=f.nextSibling;)fc(f,c,d)&&a.matches(f)&&e.add(f),e=gc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);O("following-sibling",function(a,b){for(var c=new F,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);O("namespace",function(){return new F},!1); +var Wc=O("parent",function(a,b){var c=new F;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Pc=O("preceding",function(a,b,c,d){var e=new F,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var x=0,T=r.length;x<T;x++)b=r[x],fc(b,c,d)&&a.matches(b)&&e.add(b),e=gc(a,b,c,d,e)}return e},!0,!0); +O("preceding-sibling",function(a,b){for(var c=new F,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Xc=O("self",function(a,b){var c=new F;a.matches(b)&&c.add(b);return c},!1);function Yc(a){H.call(this,1);this.na=a;this.w=a.j();this.o=a.o}s(Yc,H);Yc.prototype.evaluate=function(a){return-J(this.na,a)};Yc.prototype.toString=function(){return"Unary Expression: -"+I(this.na)};function Zc(a){H.call(this,4);this.T=a;uc(this,xa(this.T,function(a){return a.j()}));vc(this,xa(this.T,function(a){return a.o}))}s(Zc,H);Zc.prototype.evaluate=function(a){var b=new F;t(this.T,function(c){c=c.evaluate(a);if(!(c instanceof F))throw Error("Path expression must evaluate to NodeSet.");b=pc(b,c)});return b};Zc.prototype.toString=function(){return wa(this.T,function(a,b){return a+I(b)},"Union Expression:")};function $c(a,b){this.b=a;this.Na=b}function ad(a){for(var b,c=[];;){P(a,"Missing right hand side of binary expression.");b=bd(a);var d=a.b.next();if(!d)break;var e=(d=Bc[d]||null)&&d.wa;if(!e){a.b.back();break}for(;c.length&&e<=c[c.length-1].wa;)b=new xc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new xc(c.pop(),c.pop(),b);return b}function P(a,b){if(a.b.empty())throw Error(b);}function cd(a,b){var c=a.b.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function dd(a){a=a.b.next();if(")"!=a)throw Error("Bad token: "+a);}function ed(a){a=a.b.next();if(2>a.length)throw Error("Unclosed literal string");return new Ic(a)}function fd(a){var b=a.b.next(),c=b.indexOf(":");if(-1==c)return new jc(b);var d=b.substring(0,c);a=a.Na(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new jc(b,a)} +function gd(a){var b,c=[],d;if("/"==D(a.b)||"//"==D(a.b)){b=a.b.next();d=D(a.b);if("/"==b&&(a.b.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Mc;d=new Mc;P(a,"Missing next location step.");b=hd(a,b);c.push(b)}else{a:{b=D(a.b);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.b.next();b=ad(a);P(a,'unclosed "("');cd(a,")");break;case '"':case "'":b=ed(a);break;default:if(isNaN(+b))if(!Hc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==D(a.b,1)){b=a.b.next();b=Gc[b]||null;a.b.next();for(d=[];")"!=D(a.b);){P(a,"Missing function argument list.");d.push(ad(a));if(","!=D(a.b))break;a.b.next()}P(a,"Unclosed function argument list.");dd(a);b=new Ec(b,d)}else{b=null;break a}else b=new Jc(+a.b.next())}"["==D(a.b)&&(d=new Qc(id(a)),b=new Cc(b,d))}if(b)if("/"==D(a.b)||"//"==D(a.b))d=b;else return b;else b=hd(a,"/"),d=new Nc,c.push(b)}for(;"/"==D(a.b)||"//"==D(a.b);)b=a.b.next(),P(a,"Missing next location step."),b=hd(a,b),c.push(b); +return new Kc(d,c)} +function hd(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.b))return d=new Rc(Xc,new G("node")),a.b.next(),d;if(".."==D(a.b))return d=new Rc(Wc,new G("node")),a.b.next(),d;var f;if("@"==D(a.b))f=Lc,a.b.next(),P(a,"Missing attribute name");else if("::"==D(a.b,1)){if(!/(?![0-9])[\w]/.test(D(a.b).charAt(0)))throw Error("Bad token: "+a.b.next());c=a.b.next();f=Vc[c]||null;if(!f)throw Error("No axis with name: "+c);a.b.next();P(a,"Missing node name")}else f=Sc; +c=D(a.b);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==D(a.b,1)){if(!Hc(c))throw Error("Invalid node type: "+c);c=a.b.next();if(!Hc(c))throw Error("Invalid type name: "+c);cd(a,"(");P(a,"Bad nodetype");e=D(a.b).charAt(0);var g=null;if('"'==e||"'"==e)g=ed(a);P(a,"Bad nodetype");dd(a);c=new G(c,g)}else c=fd(a);else if("*"==c)c=fd(a);else throw Error("Bad token: "+a.b.next());e=new Qc(id(a),f.I);return d||new Rc(f,c,e,"//"==b)} +function id(a){for(var b=[];"["==D(a.b);){a.b.next();P(a,"Missing predicate expression.");var c=ad(a);b.push(c);P(a,"Unclosed predicate expression.");cd(a,"]")}return b}function bd(a){if("-"==D(a.b))return a.b.next(),new Yc(bd(a));var b=gd(a);if("|"!=D(a.b))a=b;else{for(b=[b];"|"==a.b.next();)P(a,"Missing next union location path."),b.push(gd(a));a.b.back();a=new Zc(b)}return a};function jd(a){switch(a.nodeType){case 1:return ma(kd,a);case 9:return jd(a.documentElement);case 2:return a.ownerElement?jd(a.ownerElement):ld;case 11:case 10:case 6:case 12:return ld;default:return a.parentNode?jd(a.parentNode):ld}}function ld(){return null}function kd(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?kd(a.parentNode,b):null};function md(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=cc(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=la(b.lookupNamespaceURI,b)):b=aa(null);var d=ad(new $c(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Xb(a));return new Q(c,b)}} +function Q(a,b){if(0==b)if(a instanceof F)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 F))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof F?rc(a):""+a;break;case 1:this.numberValue=a instanceof F?+rc(a):+a;break;case 3:this.booleanValue=a instanceof F?0<a.u():!!a;break;case 4:case 5:case 6:case 7:var d= +sc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof $b?e.i:e);this.snapshotLength=a.u();this.invalidIteratorState=!1;break;case 8:case 9:d=qc(a);this.singleNodeValue=d instanceof $b?d.i:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}Q.ANY_TYPE=0;Q.NUMBER_TYPE=1;Q.STRING_TYPE=2;Q.BOOLEAN_TYPE=3;Q.UNORDERED_NODE_ITERATOR_TYPE=4;Q.ORDERED_NODE_ITERATOR_TYPE=5;Q.UNORDERED_NODE_SNAPSHOT_TYPE=6;Q.ORDERED_NODE_SNAPSHOT_TYPE=7;Q.ANY_UNORDERED_NODE_TYPE=8;Q.FIRST_ORDERED_NODE_TYPE=9;function nd(a){this.lookupNamespaceURI=jd(a)} +function od(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=Q,b.evaluate=function(a,b,e,f){return(new md(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new md(a,b)},b.createNSResolver=function(a){return new nd(a)})};var R={};R.Fa=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();R.t=function(a,b,c){var d=C(a);(y||Ub)&&od(d?xb(d):window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):R.Fa;return y&&!gb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!z||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new v(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +R.Z=function(a,b){if(!a||1!=a.nodeType)throw new v(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};R.C=function(a,b){var c=function(){var c=R.t(b,a,9);return c?(c=c.singleNodeValue,w?c:c||null):b.selectSingleNode?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||R.Z(c,a);return c}; +R.s=function(a,b){var c=function(){var c=R.t(b,a,7);if(c){var e=c.snapshotLength;w&&!n(e)&&R.Z(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){R.Z(b,a)});return c};function pd(a){return(a=a.exec(Sa()))?a[1]:""}var qd=function(){if(Qb)return pd(/Firefox\/([0-9.]+)/);if(y||w)return $a;if(Vb)return pd(/Chrome\/([0-9.]+)/);if(Wb)return pd(/Version\/([0-9.]+)/);if(Sb||Tb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Sa());if(a)return a[1]+"."+a[2]}else{if(Ub)return(a=pd(/Android\s+([0-9.]+)/))?a:pd(/Version\/([0-9.]+)/);if(Rb)return pd(/Camino\/([0-9.]+)/)}return""}();var rd,sd;function S(a){return td?rd(a):y?0<=ra(lb,a):gb(a)}function ud(a){return td?sd(a):Ub?0<=ra(vd,a):0<=ra(qd,a)} +var td=function(){if(!z)return!1;var a=m.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;rd=function(a){return 0<=d.Ga(e,""+a)};sd=function(a){return 0<=d.Ga(f,""+a)};return!0}(),wd=Tb||Sb,xd;if(Ub){var yd=/Android\s+([0-9\.]+)/.exec(Sa());xd=yd?yd[1]:"0"}else xd="0"; +var vd=xd,zd=y&&!(y&&8<=lb),Ad=y&&!(y&&9<=lb),Bd=y&&!(y&&10<=lb);Ub&&ud(2.3);Ub&&ud(4);Wb&&ud(6);function Cd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}l=Cd.prototype;l.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};l.contains=function(a){return this&&a?a instanceof Cd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +l.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};l.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};l.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function U(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}l=U.prototype;l.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};l.contains=function(a){return a instanceof U?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Dd(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}var Ed={thin:2,medium:4,thick:6}; +function Fd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Ed)d=Ed[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Gd(a){var b;a:{a=C(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return y&&b&&"undefined"===typeof b.nodeType?null:b}function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Hd(a,b){var c;if(c=zd)if(c="value"==b)if(c=V(a,"OPTION"))c=null===Id(a,"value");c?(c=[],Fb(a,c,!1),c=c.join("")):c=a[b];return c}var Jd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Kd(a){var b=[];t(a.split(Jd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return w?b.replace(/\w+:;/g,""):b}function Id(a,b){b=b.toLowerCase();if("style"==b)return Kd(a.style.cssText);if(zd&&"value"==b&&V(a,"INPUT"))return a.value;if(Ad&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}var Ld="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Md(a){var b=a.tagName.toUpperCase();return Aa(Ld,b)?Hd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Md(a.parentNode):!Gb(a,function(a){var b=a.parentNode;if(b&&V(b,"FIELDSET")&&Hd(b,"disabled")){if(!V(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:yb(a.previousSibling);)if(V(a,"LEGEND"))return!0}return!1},!0):!0}var Nd="text search tel url email password number".split(" "); +function Od(a){return V(a,"TEXTAREA")?!0:V(a,"INPUT")?Aa(Nd,a.type.toLowerCase()):Pd(a)?!0:!1}function Pd(a){function b(a){return"inherit"==a.contentEditable?(a=Qd(a))?b(a):!1:"true"==a.contentEditable}return n(a.contentEditable)?!y&&n(a.isContentEditable)?a.isContentEditable:b(a):!1}function Qd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:null} +function W(a,b){var c=sa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Ad?"styleFloat":"cssFloat";var d=Dd(a,c)||Rd(a,c);if(null===d)d=null;else if(Aa(Ea,c)){b:{var e=d.match(Ha);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ia))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=Da[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Fa,"#$1$1$2$2$3$3")),!Ga.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Rd(a,b){var c=a.currentStyle||a.style,d=c[b];!n(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?n(d)?d:null:(c=Qd(a))?Rd(c,b):null} +function Sd(a,b){function c(a){if("none"==W(a,"display"))return!1;a=Qd(a);return!a||c(a)}function d(a){var b=Td(a);return 0<b.height&&0<b.width?!0:V(a,"PATH")&&(0<b.height||0<b.width)?(a=W(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=W(a,"overflow")&&xa(a.childNodes,function(a){return a.nodeType==tb||V(a)&&d(a)})}function e(a){return Ud(a)==Vd&&ya(a.childNodes,function(a){return!V(a)||e(a)})}if(!V(a))throw Error("Argument to isShown must be of type Element");if(V(a,"OPTION")||V(a,"OPTGROUP")){var f= +Gb(a,function(a){return V(a,"SELECT")});return!!f&&Sd(f,!0)}return(f=Wd(a))?!!f.pa&&0<f.rect.width&&0<f.rect.height&&Sd(f.pa,b):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==Xd(a)||!d(a)?!1:!e(a)}var Vd="hidden"; +function Ud(a,b){function c(a){var b=W(a,"position");if("fixed"==b)return T=!0,a==k?null:k;for(a=Qd(a);a&&a!=k&&(0==W(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==W(a,"position"));)a=Qd(a);return a}function d(a){var b=a;if("visible"==x)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:W(b,"overflow-x"),y:W(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new vb(g)).aa;a=B||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=xb(b);a=y&&gb("10")&&b.pageYOffset!=a.scrollTop?new nb(a.scrollLeft,a.scrollTop):new nb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new nb(a.scrollLeft,a.scrollTop);return a}for(var f=Yd(a,b),g=C(a),k=g.documentElement,r=g.body,x=W(k,"overflow"),T,u=c(a);u;u=c(u)){var q=d(u);if("visible"!=q.x||"visible"!=q.y){var A=Td(u);if(0==A.width||0==A.height)return Vd;var K=f.right<A.left,ba=f.bottom<A.top;if(K&&"hidden"==q.x||ba&&"hidden"==q.y)return Vd; +if(K&&"visible"!=q.x||ba&&"visible"!=q.y){K=e(u);ba=f.bottom<A.top-K.y;if(f.right<A.left-K.x&&"visible"!=q.x||ba&&"visible"!=q.x)return Vd;f=Ud(u);return f==Vd?Vd:"scroll"}K=f.left>=A.left+A.width;A=f.top>=A.top+A.height;if(K&&"hidden"==q.x||A&&"hidden"==q.y)return Vd;if(K&&"visible"!=q.x||A&&"visible"!=q.y){if(T&&(q=e(u),f.left>=k.scrollWidth-q.x||f.right>=k.scrollHeight-q.y))return Vd;f=Ud(u);return f==Vd?Vd:"scroll"}}}return"none"}var Zd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Td(a){function b(a){var c=(C(a)?xb(C(a)):window).getComputedStyle(a,null).MozTransform.match(Zd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),T=parseFloat(c[3]),u=parseFloat(c[4]),q=parseFloat(c[5]),c=parseFloat(c[6]),A=f.left+f.width,K=f.top+f.height,ba=f.left*d,d=A*d,hb=f.left*e,e=A*e,ib=f.top*T,T=K*T,jb=f.top*u,A=K*u,K=ba+ib+q,u=hb+jb+c,ib=d+ib+q,jb=e+jb+c,ba=ba+T+q,hb=hb+A+c,q=d+T+q,c=e+A+c;f.left=Math.min(K,ib,ba,q);f.top=Math.min(u,jb,hb,c);q=Math.max(K,ib,ba,q);c=Math.max(u,jb, +hb,c);f.width=q-f.left;f.height=c-f.top}(a=Qd(a))&&b(a)}var c=Wd(a);if(c)return c.rect;if(V(a,"HTML"))return c=C(a),a=wb((c?xb(c):window)||window),new U(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new U(0,0,0,0)}var f=new U(d.left,d.top,d.right-d.left,d.bottom-d.top);y&&a.ownerDocument.body&&(c=C(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);w&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0== +f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));z&&!S(12)&&b(a);return f} +function Wd(a){var b=V(a,"MAP");if(!b&&!V(a,"AREA"))return null;var c=b?a:V(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=R.C('/descendant::*[@usemap = "#'+c.name+'"]',C(c)))&&(e=Td(d),!b&&"default"!=a.shape.toLowerCase())){var f=$d(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new U(a+e.left,b+e.top,c,f)}return{pa:d,rect:e||new U(0,0,0,0)}} +function $d(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new U(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new U(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 U(b,c,d-b,e-c)}return new U(0,0,0,0)} +function Yd(a,b){var c;c=Td(a);c=new Cd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof U?b:new U(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c}function ae(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")} +function be(a){var b=[];ce(a,b);b=va(b,ae);return ae(b.join("\n")).replace(/\xa0/g," ")} +function ce(a,b){if(V(a,"BR"))b.push("");else{var c=V(a,"TD"),d=W(a,"display"),e=!c&&!Aa(de,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:yb(a.previousSibling),f=f?W(f,"display"):"",g=W(a,"float")||W(a,"cssFloat")||W(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var k=Sd(a),r=null,x=null;k&&(r=W(a,"white-space"),x=W(a,"text-transform"));t(a.childNodes,function(a){a.nodeType==tb&&k?ee(a,b,r,x):V(a)&&ce(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||pa(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var de="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function ee(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";pa(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function Xd(a){if(Bd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return fe(a)}function fe(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=Qd(a))&&(b*=fe(a));return b};var ge={ka:function(a){return!(!a.querySelectorAll||!a.querySelector)},C:function(a,b){if(!a)throw Error("No class name specified");a=qa(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");if(ge.ka(b))return b.querySelector("."+a.replace(/\./g,"\\."))||null;var c=Hb(ub(b),"*",a,b);return c.length?c[0]:null},s:function(a,b){if(!a)throw Error("No class name specified");a=qa(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");return ge.ka(b)?b.querySelectorAll("."+ +a.replace(/\./g,"\\.")):Hb(ub(b),"*",a,b)}};var he={C:function(a,b){if(!fa(b.querySelector)&&y&&S(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=qa(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:null},s:function(a,b){if(!fa(b.querySelectorAll)&&y&&S(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=qa(a);return b.querySelectorAll(a)}};var ie={},je={};ie.Aa=function(a,b,c){var d;try{d=he.s("a",b)}catch(e){d=Hb(ub(b),"A",null,b)}return za(d,function(b){b=be(b);return c&&-1!=b.indexOf(a)||b==a})};ie.ta=function(a,b,c){var d;try{d=he.s("a",b)}catch(e){d=Hb(ub(b),"A",null,b)}return ua(d,function(b){b=be(b);return c&&-1!=b.indexOf(a)||b==a})};ie.C=function(a,b){return ie.Aa(a,b,!1)};ie.s=function(a,b){return ie.ta(a,b,!1)};je.C=function(a,b){return ie.Aa(a,b,!0)};je.s=function(a,b){return ie.ta(a,b,!0)};var ke={C:function(a,b){return b.getElementsByTagName(a)[0]||null},s:function(a,b){return b.getElementsByTagName(a)}};var le={className:ge,"class name":ge,css:he,"css selector":he,id:{C:function(a,b){var c=ub(b),d=c.e(a);if(!d)return null;if(Id(d,"id")==a&&zb(b,d))return d;c=Hb(c,"*");return za(c,function(c){return Id(c,"id")==a&&zb(b,c)})},s:function(a,b){var c=Hb(ub(b),"*",null,b);return ua(c,function(b){return Id(b,"id")==a})}},linkText:ie,"link text":ie,name:{C:function(a,b){var c=Hb(ub(b),"*",null,b);return za(c,function(b){return Id(b,"name")==a})},s:function(a,b){var c=Hb(ub(b),"*",null,b);return ua(c,function(b){return Id(b, +"name")==a})}},partialLinkText:je,"partial link text":je,tagName:ke,"tag name":ke,xpath:R};function me(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=null}if(c){var d=le[c];if(d&&fa(d.s))return d.s(a[c],b||oa.document)}throw Error("Unsupported locator strategy: "+c);};function ne(a,b){this.H=oa.document.documentElement;this.za=null;var c=Gd(this.H);c&&oe(this,c);this.Ia=a||new pe;this.ma=b||new qe}ne.prototype.e=h("H");function oe(a,b){a.H=b;a.za=V(b,"OPTION")?Gb(b,function(a){return V(a,"SELECT")}):null}ne.prototype.F=function(a){return this.ma.F(this.H,a)};ne.prototype.ca=function(a,b){return this.ma.ca(this.H,a,b)};B||w||td&&ud(3.6);function re(a){return V(a,"FORM")} +function se(a){if(!re(a))throw new v(12,"Element is not a form, so could not submit.");if(te(a,ue))if(V(a.submit))if(!y||S(8))a.constructor.prototype.submit.call(a);else{var b=me({id:"submit"},a),c=me({name:"submit"},a);t(b,function(a){a.removeAttribute("id")});t(c,function(a){a.removeAttribute("name")});a=a.submit;t(b,function(a){a.setAttribute("id","submit")});t(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}function pe(){this.U=0} +pe.prototype.h=function(a){return 0!=(this.U&a)};function qe(){}qe.prototype.F=function(a,b){return te(a,b)};qe.prototype.ca=function(a,b,c){return te(a,b,c)};var ve=!(y&&!S(10))&&!w,we=Ub?!ud(4):!wd;function X(a,b,c){this.f=a;this.K=b;this.L=c}X.prototype.create=function(a){a=C(a);Ad?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.K,this.L));return a};X.prototype.toString=h("f");function xe(a,b,c){X.call(this,a,b,c)}s(xe,X); +xe.prototype.create=function(a,b){var c=C(a);if(z){var d=c?xb(c):window,e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.f,this.K,this.L,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.f==ye&&b.preventDefault&&c.preventDefault()}else Ad?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.f,this.K,this.L)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode,B&&(c.charCode=this==ye? +c.keyCode:0);return c};function ze(a,b,c){X.call(this,a,b,c)}s(ze,X); +ze.prototype.create=function(a,b){function c(b){b=va(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=va(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!ve)throw new v(9,"Browser does not support firing touch events.");var e=C(a),f=e?xb(e):window,g= +we?d(b.changedTouches):c(b.changedTouches),k=b.touches==b.changedTouches?g:we?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:we?d(b.targetTouches):c(b.targetTouches),x;we?(x=e.createEvent("MouseEvents"),x.initMouseEvent(this.f,this.K,this.L,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),x.touches=k,x.targetTouches=r,x.changedTouches=g,x.scale=b.scale,x.rotation=b.rotation):(x=e.createEvent("TouchEvent"),Ub?x.initTouchEvent(k,r,g,this.f,f,0, +0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey):x.initTouchEvent(this.f,this.K,this.L,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),x.relatedTarget=b.relatedTarget);return x}; +var Ae=new X("blur",!1,!1),Be=new X("change",!0,!1),Ce=new X("focus",!1,!1),De=new X("input",!0,!1),ue=new X("submit",!0,!0),Ee=new X("textInput",!0,!0),Fe=new xe("keydown",!0,!0),ye=new xe("keypress",!0,!0),Ge=new xe("keyup",!0,!0),He=new ze("touchend",!0,!0),Ie=new ze("touchstart",!0,!0);function te(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return Ad?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function Je(a,b){if(Ke(a))a.selectionStart=b;else if(y){var c=Le(a),d=c[0];d.inRange(c[1])&&(b=Me(a,b),d.collapse(!0),d.move("character",b),d.select())}} +function Ne(a,b){var c=0,d=0;if(Ke(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(y){var e=Le(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,k=e=c.text,r=!1;!r;)0==f.compareEndPoints("StartToEnd",f)?r=!0:(f.moveEnd("character",-1),f.text==g?d+="\r\n":r=!0);if(b)f=[d.length,-1];else{for(f=!1;!f;)0==c.compareEndPoints("StartToEnd",c)?f=!0:(c.moveEnd("character",-1),c.text==e?k+="\r\n":f=!0);f=[d.length,d.length+k.length]}return f}c= +f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Oe(a,b){if(Ke(a))a.selectionEnd=b;else if(y){var c=Le(a),d=c[1];c[0].inRange(d)&&(b=Me(a,b),c=Me(a,Ne(a,!0)[0]),d.collapse(!0),d.moveEnd("character",b-c),d.select())}}function Pe(a,b){if(Ke(a))a.selectionStart=b,a.selectionEnd=b;else if(y){b=Me(a,b);var c=a.createTextRange();c.collapse(!0);c.move("character",b);c.select()}} +function Qe(a,b){if(Ke(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else if(y)d=Le(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select());else throw Error("Cannot set the selection end");}function Le(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} +function Me(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Ke(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};function Re(a,b){this.n={};this.k=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.X(a)}l=Re.prototype;l.M=0;l.Ea=0;l.N=function(){Se(this);for(var a=[],b=0;b<this.k.length;b++)a.push(this.n[this.k[b]]);return a};function Te(a){Se(a);return a.k.concat()}l.remove=function(a){return Ue(this.n,a)?(delete this.n[a],this.M--,this.Ea++,this.k.length>2*this.M&&Se(this),!0):!1}; +function Se(a){if(a.M!=a.k.length){for(var b=0,c=0;b<a.k.length;){var d=a.k[b];Ue(a.n,d)&&(a.k[c++]=d);b++}a.k.length=c}if(a.M!=a.k.length){for(var e={},c=b=0;b<a.k.length;)d=a.k[b],Ue(e,d)||(a.k[c++]=d,e[d]=1),b++;a.k.length=c}}l.get=function(a,b){return Ue(this.n,a)?this.n[a]:b};l.set=function(a,b){Ue(this.n,a)||(this.M++,this.k.push(a),this.Ea++);this.n[a]=b}; +l.X=function(a){var b;if(a instanceof Re)b=Te(a),a=a.N();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=rb(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function Ue(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Ve(a){if("function"==typeof a.N)return a.N();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return rb(a)};function We(a){this.n=new Re;a&&this.X(a)}function Xe(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ha]||(a[ha]=++ia)):b.substr(0,1)+a}l=We.prototype;l.add=function(a){this.n.set(Xe(a),a)};l.X=function(a){a=Ve(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};l.remove=function(a){return this.n.remove(Xe(a))};l.contains=function(a){a=Xe(a);return Ue(this.n.n,a)};l.N=function(){return this.n.N()};function Ye(a){ne.call(this);this.ba=Od(this.e())&&!Hd(this.e(),"readOnly");this.p=0;this.ia=new We;a&&(t(a.pressed,function(a){Ze(this,a,!0)},this),this.p=a.currentPos)}s(Ye,ne);var $e={};function Y(a,b,c){ga(a)&&(a=z?a.c:w?a.opera:a.d);a=new af(a,b,c);!b||b in $e&&!c||($e[b]={key:a,shift:!1},c&&($e[c]={key:a,shift:!0}));return a}function af(a,b,c){this.code=a;this.D=b||null;this.Qa=c||this.D}var bf=Y(8),cf=Y(9),df=Y(13),Z=Y(16),ef=Y(17),ff=Y(18),gf=Y(19);Y(20); +var hf=Y(27),jf=Y(32," "),kf=Y(33),lf=Y(34),mf=Y(35),nf=Y(36),of=Y(37),pf=Y(38),qf=Y(39),rf=Y(40);Y(44);var sf=Y(45),tf=Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","(");Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q"); Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z"); -var kf=Y(Pa?{c:91,d:91,opera:219}:Oa?{c:224,d:91,opera:17}:{c:0,d:91,opera:m}),lf=Y(Pa?{c:92,d:92,opera:220}:Oa?{c:224,d:93,opera:17}:{c:0,d:92,opera:m}),mf=Y(Pa?{c:93,d:93,opera:0}:Oa?{c:0,d:0,opera:16}:{c:93,d:m,opera:0}),nf=Y({c:96,d:96,opera:48},"0"),of=Y({c:97,d:97,opera:49},"1"),pf=Y({c:98,d:98,opera:50},"2"),qf=Y({c:99,d:99,opera:51},"3"),rf=Y({c:100,d:100,opera:52},"4"),sf=Y({c:101,d:101,opera:53},"5"),tf=Y({c:102,d:102,opera:54},"6"),uf=Y({c:103,d:103,opera:55},"7"),vf=Y({c:104,d:104,opera:56}, -"8"),wf=Y({c:105,d:105,opera:57},"9"),xf=Y({c:106,d:106,opera:Wa?56:42},"*"),yf=Y({c:107,d:107,opera:Wa?61:43},"+"),zf=Y({c:109,d:109,opera:Wa?109:45},"-"),Af=Y({c:110,d:110,opera:Wa?190:78},"."),Bf=Y({c:111,d:111,opera:Wa?191:47},"/");Y(Wa&&A?m:144);var Cf=Y(112),Df=Y(113),Ef=Y(114),Ff=Y(115),Gf=Y(116),Hf=Y(117),If=Y(118),Jf=Y(119),Kf=Y(120),Lf=Y(121),Mf=Y(122),Nf=Y(123),Of=Y({c:107,d:187,opera:61},"=","+"),Pf=Y(108,",");Y({c:109,d:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">"); -Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");var Qf=Y({c:59,d:186,opera:59},";",":");Y(222,"'",'"');var Rf=[We,Ve,kf,Z],Sf=new Ie;Sf.set(1,Z);Sf.set(2,Ve);Sf.set(4,We);Sf.set(8,kf);var Tf=function(a){var b=new Ie;y(Ke(a),function(c){b.set(a.get(c).code,c)});return b}(Sf);function Pe(a,b,c){if(va(Rf,b)){var d=Tf.get(b.code),e=a.Da;e.T=c?e.T|d:e.T&~d}c?a.ea.add(b):a.ea.remove(b)}var Uf=B||A?"\r\n":"\n";Oe.prototype.h=function(a){return this.ea.contains(a)}; -function Vf(a,b){va(Rf,b)&&a.h(b)&&h(new z(13,"Cannot press a modifier key that is already pressed."));var c=b.code!==m&&Wf(a,ve,b);if(c||C)if((!Xf(b)||Wf(a,oe,b,!c))&&c)if(Yf(a,b),a.$)if(b.D){if(!Zf){var c=$f(a,b),d=De(a.e(),l)[0]+1;Ge(a.e(),c);ze(a.e(),d);D&&W(a.t,ue);vd||W(a.t,te);a.q=d}}else switch(b){case Ue:Zf||(D&&W(a.t,ue),U(a.e(),"TEXTAREA")&&(c=De(a.e(),l)[0]+Uf.length,Ge(a.e(),Uf),ze(a.e(),c),B||W(a.t,te),a.q=c));break;case Se:case jf:Zf||(c=De(a.e(),n),c[0]==c[1]&&(b==Se?(ze(a.e(),c[1]- -1),Ee(a.e(),c[1])):Ee(a.e(),c[1]+1)),c=De(a.e(),n),c=!(c[0]==a.e().value.length||0==c[1]),Ge(a.e(),""),(!B&&c||C&&b==Se)&&W(a.t,te),c=De(a.e(),n),a.q=c[1]);break;case df:case ff:var c=a.e(),e=De(c,l)[0],f=De(c,n)[1],g=d=0;b==df?a.h(Z)?a.q==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Z)?a.q==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Z)?(ze(c,d),Ee(c,g)):Fe(c,e);a.q=e;break;case cf:case bf:c=a.e(),d=De(c,l)[0],g=De(c, -n)[1],b==cf?(a.h(Z)?(ze(c,0),Ee(c,a.q==d?g:d)):Fe(c,0),a.q=0):(a.h(Z)?(a.q==d&&ze(c,g),Ee(c,c.value.length)):Fe(c,c.value.length),a.q=c.value.length)}Pe(a,b,l)}function Xf(a){if(a.D||a==Ue)return l;if(D)return n;if(B)return a==Ye;switch(a){case Z:case Ve:case We:return n;case kf:case lf:case mf:return C;default:return l}} -function Yf(a,b){if(b==Ue&&!C&&U(a.e(),"INPUT")){var c=Db(a.e(),ie,l);if(c){var d=c.getElementsByTagName("input");(ta(d,function(a){a:{if(U(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=l;break a}}if(U(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=l;break a}a=n}return a})||1==d.length||D&&!T(534))&&je(c)}}}function ag(a,b){a.h(b)||h(new z(13,"Cannot release a key that is not pressed. ("+b.code+")"));b.code===m||Wf(a,we,b);Pe(a,b,n)} -function $f(a,b){b.D||h(new z(13,"not a character key"));return a.h(Z)?b.Ka:b.D}var Zf=C&&!T(12);function Wf(a,b,c,d){c.code===m&&h(new z(13,"Key must have a keycode to be fired."));c={altKey:a.h(We),ctrlKey:a.h(Ve),metaKey:a.h(kf),shiftKey:a.h(Z),keyCode:c.code,charCode:c.D&&b==oe?$f(a,c).charCodeAt(0):0,preventDefault:!!d};return W(a.t,b,c)} -function bg(a,b){ge(a,b);a.$=Md(b)&&!Fd(b,"readOnly");var c;c=a.ua||a.t;var d=Ed(c);if(c==d)c=n;else{if(d&&(fa(d.blur)||B&&ga(d.blur))){try{"body"!==d.tagName.toLowerCase()&&d.blur()}catch(e){B&&"Unspecified error."==e.message||h(e)}B&&!T(8)&&(F(c)?F(c).parentWindow||F(c).defaultView:window).focus()}fa(c.focus)||B&&ga(c.focus)?(A&&T(11)&&!Rd(c)?W(c,se):c.focus(),c=l):c=n}a.$&&c&&(Fe(b,b.value.length),a.q=b.value.length)};function cg(a,b,c,d){function e(a){w(a)?y(a.split(""),function(a){1!=a.length&&h(new z(13,"Argument not a single character: "+a));var b=Qe[a];b||(b=a.toUpperCase(),b=Y(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.D});a=b;b=f.h(Z);a.shift&&!b&&Vf(f,Z);Vf(f,a.key);ag(f,a.key);a.shift&&!b&&ag(f,Z)}):va(Rf,a)?f.h(a)?ag(f,a):Vf(f,a):(Vf(f,a),ag(f,a))}Rd(a,l)||h(new z(11,"Element is not currently visible and may not be manipulated"));(!Rd(a,l)||!Kd(a)||(B||A||C&&!T("1.9.2")?0:"none"==V(a,"pointer-events")))&& -h(new z(12,"Element is not currently interactable and may not be manipulated"));var f=c||new Oe;bg(f,a);if((!Ub||Ta)&&D&&"date"==a.type){c="array"==ba(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Ta&&Ub&&(W(a,ye),W(a,xe));W(a,se);a.value=c.match(g)[0];W(a,re);W(a,qe);return}}"array"==ba(b)?y(b,e):e(b);d||y(Rf,function(a){f.h(a)&&ag(f,a)})}function dg(a){var b=Db(a,ie,l);b||h(new z(7,"Element was not in a form, so could not submit."));var c=eg.Ca();ge(c,a);je(b)} -function eg(){fe.call(this)}x(eg,fe);(function(){var a=eg;a.Ca=function(){return a.la?a.la:a.la=new a}})();function $(a,b,c,d){function e(){return{qa:f,keys:[]}}var f=!!d,g=[],p=e();g.push(p);y(b,function(a){y(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.b[a];b===m?(g.push(p=e()),f&&(p.qa=n,g.push(p=e()))):u(b)?p.keys.push(b):h(Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16)))}else switch(a){case "\n":p.keys.push(Ue);break;case "\t":p.keys.push(Te);break;case "\b":p.keys.push(Se);break;default:p.keys.push(a)}})});y(g,function(b){cg(a,b.keys,c,b.qa)})}$.b={}; -$.b["\ue000"]=m;$.b["\ue003"]=Se;$.b["\ue004"]=Te;$.b["\ue006"]=Ue;$.b["\ue007"]=Ue;$.b["\ue008"]=Z;$.b["\ue009"]=Ve;$.b["\ue00a"]=We;$.b["\ue00b"]=Xe;$.b["\ue00c"]=Ye;$.b["\ue00d"]=Ze;$.b["\ue00e"]=$e;$.b["\ue00f"]=af;$.b["\ue010"]=bf;$.b["\ue011"]=cf;$.b["\ue012"]=df;$.b["\ue013"]=ef;$.b["\ue014"]=ff;$.b["\ue015"]=gf;$.b["\ue016"]=hf;$.b["\ue017"]=jf;$.b["\ue018"]=Qf;$.b["\ue019"]=Of;$.b["\ue01a"]=nf;$.b["\ue01b"]=of;$.b["\ue01c"]=pf;$.b["\ue01d"]=qf;$.b["\ue01e"]=rf;$.b["\ue01f"]=sf; -$.b["\ue020"]=tf;$.b["\ue021"]=uf;$.b["\ue022"]=vf;$.b["\ue023"]=wf;$.b["\ue024"]=xf;$.b["\ue025"]=yf;$.b["\ue027"]=zf;$.b["\ue028"]=Af;$.b["\ue029"]=Bf;$.b["\ue026"]=Pf;$.b["\ue031"]=Cf;$.b["\ue032"]=Df;$.b["\ue033"]=Ef;$.b["\ue034"]=Ff;$.b["\ue035"]=Gf;$.b["\ue036"]=Hf;$.b["\ue037"]=If;$.b["\ue038"]=Jf;$.b["\ue039"]=Kf;$.b["\ue03a"]=Lf;$.b["\ue03b"]=Mf;$.b["\ue03c"]=Nf;$.b["\ue03d"]=kf;function fg(){this.U=k} -function gg(a,b,c){switch(typeof b){case "string":hg(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],gg(a,a.U?a.U.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),hg(f, -c),c.push(":"),gg(a,a.U?a.U.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var ig={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},jg=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function hg(a,b){b.push('"',a.replace(jg,function(a){if(a in ig)return ig[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return ig[a]=e+b.toString(16)}),'"')};D||A||C&&T(3.5)||B&&T(8);function kg(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,kg);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=lg(a);return b}if("document"in a)return b={},b.WINDOW=lg(a),b;if(ca(a))return ra(a,kg);a=mb(a,function(a,b){return"number"==typeof b||w(b)});return nb(a,kg);default:return m}} -function mg(a,b){return"array"==ba(a)?ra(a,function(a){return mg(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?ng(a.ELEMENT,b):"WINDOW"in a?ng(a.WINDOW,b):nb(a,function(a){return mg(a,b)}):a}function og(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ca=ja());b.ca||(b.ca=ja());return b}function lg(a){var b=og(a.ownerDocument),c=pb(b,function(b){return b==a});c||(c=":wdc:"+b.ca++,b[c]=a);return c} -function ng(a,b){a=decodeURIComponent(a);var c=b||document,d=og(c);a in d||h(new z(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new z(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new z(10,"Element is no longer attached to the DOM"))};function pg(a){var b=dg;a=[a];var c=window||ka,d;try{var b=w(b)?new c.Function(b):c==window?b:new c.Function("return ("+b+").apply(null,arguments);"),e=mg(a,c.document),f=b.apply(m,e);d={status:0,value:kg(f)}}catch(g){d={status:"code"in g?g.code:13,value:{message:g.message}}}b=[];gg(new fg,d,b);return b.join("")}var qg=["_"],rg=s;!(qg[0]in rg)&&rg.execScript&&rg.execScript("var "+qg[0]);for(var sg;qg.length&&(sg=qg.shift());)!qg.length&&u(pg)?rg[sg]=pg:rg=rg[sg]?rg[sg]:rg[sg]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +var uf=Y(Ra?{c:91,d:91,opera:219}:Qa?{c:224,d:91,opera:17}:{c:0,d:91,opera:null}),vf=Y(Ra?{c:92,d:92,opera:220}:Qa?{c:224,d:93,opera:17}:{c:0,d:92,opera:null}),wf=Y(Ra?{c:93,d:93,opera:0}:Qa?{c:0,d:0,opera:16}:{c:93,d:null,opera:0}),xf=Y({c:96,d:96,opera:48},"0"),yf=Y({c:97,d:97,opera:49},"1"),zf=Y({c:98,d:98,opera:50},"2"),Af=Y({c:99,d:99,opera:51},"3"),Bf=Y({c:100,d:100,opera:52},"4"),Cf=Y({c:101,d:101,opera:53},"5"),Df=Y({c:102,d:102,opera:54},"6"),Ef=Y({c:103,d:103,opera:55},"7"),Ff=Y({c:104, +d:104,opera:56},"8"),Gf=Y({c:105,d:105,opera:57},"9"),Hf=Y({c:106,d:106,opera:Ya?56:42},"*"),If=Y({c:107,d:107,opera:Ya?61:43},"+"),Jf=Y({c:109,d:109,opera:Ya?109:45},"-"),Kf=Y({c:110,d:110,opera:Ya?190:78},"."),Lf=Y({c:111,d:111,opera:Ya?191:47},"/");Y(Ya&&w?null:144);var Mf=Y(112),Nf=Y(113),Of=Y(114),Pf=Y(115),Qf=Y(116),Rf=Y(117),Sf=Y(118),Tf=Y(119),Uf=Y(120),Vf=Y(121),Wf=Y(122),Xf=Y(123),Yf=Y({c:107,d:187,opera:61},"=","+"),Zf=Y(108,",");Y({c:109,d:189,opera:109},"-","_");Y(188,",","<"); +Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");var $f=Y({c:59,d:186,opera:59},";",":");Y(222,"'",'"');var ag=[ff,ef,uf,Z],bg=new Re;bg.set(1,Z);bg.set(2,ef);bg.set(4,ff);bg.set(8,uf);var cg=function(a){var b=new Re;t(Te(a),function(c){b.set(a.get(c).code,c)});return b}(bg);function Ze(a,b,c){if(Aa(ag,b)){var d=cg.get(b.code),e=a.Ia;e.U=c?e.U|d:e.U&~d}c?a.ia.add(b):a.ia.remove(b)}var dg=y||w?"\r\n":"\n";Ye.prototype.h=function(a){return this.ia.contains(a)}; +function eg(a,b){if(Aa(ag,b)&&a.h(b))throw new v(13,"Cannot press a modifier key that is already pressed.");var c=null!==b.code&&fg(a,Fe,b);if((c||z)&&((!gg(b)||fg(a,ye,b,!c))&&c)&&(hg(a,b),a.ba))if(b.D){if(!ig){var c=jg(a,b),d=Ne(a.e(),!0)[0]+1;Qe(a.e(),c);Je(a.e(),d);B&&a.F(Ee);Ad||a.F(De);a.p=d}}else switch(b){case df:ig||(B&&a.F(Ee),V(a.e(),"TEXTAREA")&&(c=Ne(a.e(),!0)[0]+dg.length,Qe(a.e(),dg),Je(a.e(),c),y||a.F(De),a.p=c));break;case bf:case tf:ig||(c=Ne(a.e(),!1),c[0]==c[1]&&(b==bf?(Je(a.e(), +c[1]-1),Oe(a.e(),c[1])):Oe(a.e(),c[1]+1)),c=Ne(a.e(),!1),c=!(c[0]==a.e().value.length||0==c[1]),Qe(a.e(),""),(!y&&c||z&&b==bf)&&a.F(De),c=Ne(a.e(),!1),a.p=c[1]);break;case of:case qf:var c=a.e(),e=Ne(c,!0)[0],f=Ne(c,!1)[1],g=d=0;b==of?a.h(Z)?a.p==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Z)?a.p==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Z)?(Je(c,d),Oe(c,g)):Pe(c,e);a.p=e;break;case nf:case mf:c=a.e(),d=Ne(c,!0)[0], +g=Ne(c,!1)[1],b==nf?(a.h(Z)?(Je(c,0),Oe(c,a.p==d?g:d)):Pe(c,0),a.p=0):(a.h(Z)?(a.p==d&&Je(c,g),Oe(c,c.value.length)):Pe(c,c.value.length),a.p=c.value.length)}Ze(a,b,!0)}function gg(a){if(a.D||a==df)return!0;if(B)return!1;if(y)return a==hf;switch(a){case Z:case ef:case ff:return!1;case uf:case vf:case wf:return z;default:return!0}} +function hg(a,b){if(b==df&&!z&&V(a.e(),"INPUT")){var c=Gb(a.e(),re,!0);if(c){var d=c.getElementsByTagName("input");(xa(d,function(a){a:{if(V(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=!0;break a}}if(V(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=!0;break a}a=!1}return a})||1==d.length||B&&!S(534))&&se(c)}}}function kg(a,b){if(!a.h(b))throw new v(13,"Cannot release a key that is not pressed. ("+b.code+")");null===b.code||fg(a,Ge,b);Ze(a,b,!1)} +function jg(a,b){if(!b.D)throw new v(13,"not a character key");return a.h(Z)?b.Qa:b.D}var ig=z&&!S(12);function fg(a,b,c,d){if(null===c.code)throw new v(13,"Key must have a keycode to be fired.");c={altKey:a.h(ff),ctrlKey:a.h(ef),metaKey:a.h(uf),shiftKey:a.h(Z),keyCode:c.code,charCode:c.D&&b==ye?jg(a,c).charCodeAt(0):0,preventDefault:!!d};return a.ca(b,c)} +function lg(a,b){oe(a,b);a.ba=Od(b)&&!Hd(b,"readOnly");var c;c=a.za||a.H;var d=Gd(c);if(c==d)c=!1;else{if(d&&(fa(d.blur)||y&&ga(d.blur))){if(!V(d,"BODY"))try{d.blur()}catch(e){if(!y||"Unspecified error."!=e.message)throw e;}y&&!S(8)&&(C(c)?xb(C(c)):window).focus()}fa(c.focus)||y&&ga(c.focus)?(w&&S(11)&&!Sd(c)?te(c,Ce):c.focus(),c=!0):c=!1}a.ba&&c&&(Pe(b,b.value.length),a.p=b.value.length)};function mg(a,b,c,d){function e(a){p(a)?t(a.split(""),function(a){if(1!=a.length)throw new v(13,"Argument not a single character: "+a);var b=$e[a];b||(b=a.toUpperCase(),b=Y(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.D});a=b;b=f.h(Z);a.shift&&!b&&eg(f,Z);eg(f,a.key);kg(f,a.key);a.shift&&!b&&kg(f,Z)}):Aa(ag,a)?f.h(a)?kg(f,a):eg(f,a):(eg(f,a),kg(f,a))}if(a!=Gd(a)){if(!Sd(a,!0)||!Md(a)||(y||w||z&&!S("1.9.2")?0:"none"==W(a,"pointer-events")))throw new v(12,"Element is not currently interactable and may not be manipulated"); +ng(a)}var f=c||new Ye;lg(f,a);if((!Wb||Va)&&B&&"date"==a.type){c="array"==ca(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Va&&Wb&&(te(a,Ie),te(a,He));te(a,Ce);a.value=c.match(g)[0];te(a,Be);te(a,Ae);return}}"array"==ca(b)?t(b,e):e(b);d||t(ag,function(a){f.h(a)&&kg(f,a)})}function og(a){var b=Gb(a,re,!0);if(!b)throw new v(7,"Element was not in a form, so could not submit.");var c=pg.Ha();oe(c,a);se(b)}function pg(){ne.call(this)}s(pg,ne); +(function(){var a=pg;a.Ha=function(){return a.qa?a.qa:a.qa=new a}})(); +function ng(a){if("scroll"==Ud(a,void 0)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Ud(a,void 0)))return;for(var b=Yd(a,void 0),c=Qd(a);c;c=Qd(c)){var d=c,e=Td(d),f;var g=d;if(!y||y&&9<=lb)k=Dd(g,"borderLeftWidth"),f=Dd(g,"borderRightWidth"),r=Dd(g,"borderTopWidth"),g=Dd(g,"borderBottomWidth"),f=new Cd(parseFloat(r),parseFloat(f),parseFloat(g),parseFloat(k));else{var k=Fd(g,"borderLeft");f=Fd(g,"borderRight");var r=Fd(g,"borderTop"),g=Fd(g,"borderBottom");f=new Cd(r,f,g,k)}k=b.left-e.left- +f.left;e=b.top-e.top-f.top;f=d.clientHeight+b.top-b.bottom;d.scrollLeft+=Math.min(k,Math.max(k-(d.clientWidth+b.left-b.right),0));d.scrollTop+=Math.min(e,Math.max(e-f,0))}Ud(a,void 0)}};function $(a,b,c,d){function e(){return{va:f,keys:[]}}var f=!!d,g=[],k=e();g.push(k);t(b,function(a){t(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.a[a];if(null===b)g.push(k=e()),f&&(k.va=!1,g.push(k=e()));else if(n(b))k.keys.push(b);else throw Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16));}else switch(a){case "\n":k.keys.push(df);break;case "\t":k.keys.push(cf);break;case "\b":k.keys.push(bf);break;default:k.keys.push(a)}})});t(g,function(b){mg(a,b.keys,c,b.va)})} +$.a={};$.a["\ue000"]=null;$.a["\ue003"]=bf;$.a["\ue004"]=cf;$.a["\ue006"]=df;$.a["\ue007"]=df;$.a["\ue008"]=Z;$.a["\ue009"]=ef;$.a["\ue00a"]=ff;$.a["\ue00b"]=gf;$.a["\ue00c"]=hf;$.a["\ue00d"]=jf;$.a["\ue00e"]=kf;$.a["\ue00f"]=lf;$.a["\ue010"]=mf;$.a["\ue011"]=nf;$.a["\ue012"]=of;$.a["\ue013"]=pf;$.a["\ue014"]=qf;$.a["\ue015"]=rf;$.a["\ue016"]=sf;$.a["\ue017"]=tf;$.a["\ue018"]=$f;$.a["\ue019"]=Yf;$.a["\ue01a"]=xf;$.a["\ue01b"]=yf;$.a["\ue01c"]=zf;$.a["\ue01d"]=Af;$.a["\ue01e"]=Bf;$.a["\ue01f"]=Cf; +$.a["\ue020"]=Df;$.a["\ue021"]=Ef;$.a["\ue022"]=Ff;$.a["\ue023"]=Gf;$.a["\ue024"]=Hf;$.a["\ue025"]=If;$.a["\ue027"]=Jf;$.a["\ue028"]=Kf;$.a["\ue029"]=Lf;$.a["\ue026"]=Zf;$.a["\ue031"]=Mf;$.a["\ue032"]=Nf;$.a["\ue033"]=Of;$.a["\ue034"]=Pf;$.a["\ue035"]=Qf;$.a["\ue036"]=Rf;$.a["\ue037"]=Sf;$.a["\ue038"]=Tf;$.a["\ue039"]=Uf;$.a["\ue03a"]=Vf;$.a["\ue03b"]=Wf;$.a["\ue03c"]=Xf;$.a["\ue03d"]=uf;function qg(){this.V=void 0} +function rg(a,b,c){switch(typeof b){case "string":sg(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],rg(a,a.V?a.V.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +sg(f,c),c.push(":"),rg(a,a.V?a.V.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var tg={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ug=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function sg(a,b){b.push('"',a.replace(ug,function(a){if(a in tg)return tg[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return tg[a]=e+b.toString(16)}),'"')};B||w||z&&S(3.5)||y&&S(8);function vg(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return va(a,vg);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=wg(a);return b}if("document"in a)return b={},b.WINDOW=wg(a),b;if(da(a))return va(a,vg);a=pb(a,function(a,b){return ea(b)||p(b)});return qb(a,vg);default:return null}} +function xg(a,b){return"array"==ca(a)?va(a,function(a){return xg(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?yg(a.ELEMENT,b):"WINDOW"in a?yg(a.WINDOW,b):qb(a,function(a){return xg(a,b)}):a}function zg(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ga=na());b.ga||(b.ga=na());return b}function wg(a){var b=zg(a.ownerDocument),c=sb(b,function(b){return b==a});c||(c=":wdc:"+b.ga++,b[c]=a);return c} +function yg(a,b){a=decodeURIComponent(a);var c=b||document,d=zg(c);if(!(a in d))throw new v(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new v(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new v(10,"Element is no longer attached to the DOM");};function Ag(a,b){var c=[a],d;try{var e=b?yg(b.WINDOW):window,f=xg(c,e.document),g=og.apply(null,f);d={status:0,value:vg(g)}}catch(k){d={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];rg(new qg,d,c);return c.join("")}var Bg=["_"],Cg=m;Bg[0]in Cg||!Cg.execScript||Cg.execScript("var "+Bg[0]);for(var Dg;Bg.length&&(Dg=Bg.shift());)Bg.length||void 0===Ag?Cg=Cg[Dg]?Cg[Dg]:Cg[Dg]={}:Cg[Dg]=Ag;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/swipe.js b/src/ghostdriver/third_party/webdriver-atoms/swipe.js index 5f19c66bb..100e562db 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/swipe.js +++ b/src/ghostdriver/third_party/webdriver-atoms/swipe.js @@ -1,115 +1,127 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var m,n=this; function ca(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function t(a){return a!==k}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function v(a){return"string"==typeof a}function ea(a){return"function"==ca(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function w(a,b){function c(){}c.prototype=b.prototype;a.Ka=b.prototype;a.prototype=new c};var ha=window;function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",u=e[g]||"",s=RegExp("(\\d*)(\\D*)","g"),U=RegExp("(\\d*)(\\D*)","g");do{var M=s.exec(p)||["","",""],ba=U.exec(u)||["","",""];if(0==M[0].length&&0==ba[0].length)break;c=((0==M[1].length?0:parseInt(M[1],10))<(0==ba[1].length?0:parseInt(ba[1],10))?-1:(0==M[1].length?0:parseInt(M[1],10))>(0== -ba[1].length?0:parseInt(ba[1],10))?1:0)||((0==M[2].length)<(0==ba[2].length)?-1:(0==M[2].length)>(0==ba[2].length)?1:0)||(M[2]<ba[2]?-1:M[2]>ba[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function x(a,b){for(var c=a.length,d=v(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=v(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=v(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function oa(a,b){for(var c=a.length,d=v(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function pa(a,b){var c;a:{c=a.length;for(var d=v(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:v(a)?a.charAt(c):a[c]}function qa(a,b){var c;a:if(v(a))c=!v(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ra(a){return ka.concat.apply(ka,arguments)} -function sa(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ta={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function p(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)} +function ia(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)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)} +function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",s=RegExp("(\\d*)(\\D*)","g"),z=RegExp("(\\d*)(\\D*)","g");do{var q=s.exec(k)||["","",""],l=z.exec(r)||["","",""];if(0==q[0].length&&0==l[0].length)break;c=((0==q[1].length?0:parseInt(q[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==q[1].length?0:parseInt(q[1],10))>(0==l[1].length? +0:parseInt(l[1],10))?1:0)||((0==q[2].length)<(0==l[2].length)?-1:(0==q[2].length)>(0==l[2].length)?1:0)||(q[2]<l[2]?-1:q[2]>l[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function w(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=t(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 ua(a,b){for(var c=a.length,d=t(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 va(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:t(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(t(a))c=t(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ua="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function wa(a){xa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(va,"#$1$1$2$2$3$3"));return a.toLowerCase()}var xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a){var b=a.match(Aa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Ca[a]||Da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}w(y,Error); -var Da="unknown error",Ca={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ca[13]=Da;Ca[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return r.navigator?r.navigator.userAgent:m}Ha=Ga=Fa=Ea=n;var La;if(La=Ka()){var Ma=r.navigator;Ea=0==La.indexOf("Opera");Fa=!Ea&&-1!=La.indexOf("MSIE");Ga=!Ea&&-1!=La.indexOf("WebKit");Ha=!Ea&&!Ga&&"Gecko"==Ma.product}var z=Ea,A=Fa,B=Ha,C=Ga,Na,Oa=r.navigator;Na=Oa&&Oa.platform||"";Ia=-1!=Na.indexOf("Mac");Ja=-1!=Na.indexOf("Win");var Pa=-1!=Na.indexOf("Linux");function Qa(){var a=r.document;return a?a.documentMode:k}var Ra; -a:{var Sa="",Ta;if(z&&r.opera)var Ua=r.opera.version,Sa="function"==typeof Ua?Ua():Ua;else if(B?Ta=/rv\:([^\);]+)(\)|;)/:A?Ta=/MSIE\s+([^\);]+)(\)|;)/:C&&(Ta=/WebKit\/(\S+)/),Ta)var Va=Ta.exec(Ka()),Sa=Va?Va[1]:"";if(A){var Wa=Qa();if(Wa>parseFloat(Sa)){Ra=String(Wa);break a}}Ra=Sa}var Xa={};function Ya(a){return Xa[a]||(Xa[a]=0<=ia(Ra,a))}function D(a){return A&&Za>=a}var $a=r.document,Za=!$a||!A?k:Qa()||("CSS1Compat"==$a.compatMode?parseInt(Ra,10):5);var ab;!B&&!A||A&&D(9)||B&&Ya("1.9.1");A&&Ya("9");var bb=A||z||C;function E(a,b){this.x=t(a)?a:0;this.y=t(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; -cb.prototype.scale=function(a){this.width*=a;this.height*=a;return this};function db(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function eb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function fb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var gb=3;function hb(a){return a?new ib(F(a)):ab||(ab=new ib)}function jb(a){var b=!C&&kb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function lb(a){return a?a.parentWindow||a.defaultView:window}function kb(a){return"CSS1Compat"==a.compatMode}function mb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function nb(a){if(bb)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} -function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){var c=[];return tb(a,b,c,l)?c[0]:k} -function tb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tb(a,b,c,d))return l;a=a.nextSibling}return n}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==gb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling} -function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function yb(a){try{return a&&a.activeElement}catch(b){}return m}function ib(a){this.C=a||r.document||document}function zb(a){return!C&&kb(a.C)?a.C.documentElement:a.C.body}ib.prototype.contains=ob;var Ab,Bb,Cb,Db,Eb,Fb,Gb;Gb=Fb=Eb=Db=Cb=Bb=Ab=n;var Hb=Ka();Hb&&(-1!=Hb.indexOf("Firefox")?Ab=l:-1!=Hb.indexOf("Camino")?Bb=l:-1!=Hb.indexOf("iPhone")||-1!=Hb.indexOf("iPod")?Cb=l:-1!=Hb.indexOf("iPad")?Db=l:-1!=Hb.indexOf("Android")?Eb=l:-1!=Hb.indexOf("Chrome")?Fb=l:-1!=Hb.indexOf("Safari")&&(Gb=l));var Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb;function Pb(a,b,c){this.g=a;this.za=b||1;this.p=c||1};var Qb=A&&!D(9),Rb=A&&!D(8);function Sb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ia=e;this.parentNode=b}function Tb(a,b,c){var d=Rb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Sb(b,a,b.nodeName,d,c)};function Ub(a){this.ba=a;this.Q=0}function Vb(a){a=a.match(Wb);for(var b=0;b<a.length;b++)Xb.test(a[b])&&a.splice(b,1);return new Ub(a)}var Wb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Xb=/^\s/;function G(a,b){return a.ba[a.Q+(b||0)]}Ub.prototype.next=function(){return this.ba[this.Q++]};Ub.prototype.back=function(){this.Q--};Ub.prototype.empty=function(){return this.ba.length<=this.Q};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Qb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Qb&&"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} -function Yb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Rb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Zb(a,b,c,d,e){return(Qb?$b:ac).call(m,a,b,v(c)?c:m,v(d)?d:m,e||new I)} -function $b(a,b,c,d,e){if(a instanceof bc||8==a.e||c&&a.e===m){var f=b.all;if(!f)return e;a=cc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Yb(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}dc(a,b,c,d,e);return e} -function ac(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof J?dc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){Yb(a,c,d)&&e.add(a)}));return e} -function ec(a,b,c,d,e){var f;if((a instanceof bc||8==a.e||c&&a.e===m)&&(f=b.childNodes)){var g=cc(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return Yb(a,c,d)}));x(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return fc(a,b,c,d,e)}function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function dc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b),dc(a,b,c,d,e)}function cc(a){if(a instanceof J){if(8==a.e)return"!";if(a.e===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.J=0}function gc(a){this.r=a;this.next=this.B=m}function hc(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Sb&&d.r instanceof Sb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<pb(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.J=g;return a} -I.prototype.unshift=function(a){a=new gc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.J++};I.prototype.add=function(a){a=new gc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.J++};function ic(a){return(a=a.k)?a.r:m}I.prototype.s=q("J");function jc(a){return(a=ic(a))?H(a):""}function kc(a,b){return new lc(a,!!b)}function lc(a,b){this.wa=a;this.ca=(this.D=b)?a.p:a.k;this.Y=m} -lc.prototype.next=function(){var a=this.ca;if(a==m)return m;var b=this.Y=a;this.ca=this.D?a.B:a.next;return b.r};lc.prototype.remove=function(){var a=this.wa,b=this.Y;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.J--;this.Y=m};function K(a){this.j=a;this.m=this.t=n;this.K=m}K.prototype.h=q("t");function mc(a,b){a.t=b}function nc(a,b){a.m=b}K.prototype.w=q("K");function L(a,b){var c=a.evaluate(b);return c instanceof I?+jc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof I?jc(c):""+c}function oc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function pc(a,b,c){K.call(this,a.j);this.aa=a;this.ga=b;this.la=c;this.t=b.h()||c.h();this.m=b.m||c.m;this.aa==qc&&(!c.m&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.K={name:b.w().name,F:c}:!b.m&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.K={name:c.w().name,F:b}))}w(pc,K); -function rc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=kc(b);for(b=f.next();b;b=f.next()){e=kc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=kc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}pc.prototype.evaluate=function(a){return this.aa.q(this.ga,this.la,a)};pc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.aa+"\n";a+=" ";b+=this.ga.toString(a)+"\n";return b+=this.la.toString(a)};function sc(a,b,c,d){this.ya=a;this.ja=b;this.j=c;this.q=d}sc.prototype.toString=q("ya");var tc={}; -function O(a,b,c,d){a in tc&&h(Error("Binary operator already created: "+a));a=new sc(a,b,c,d);return tc[a.toString()]=a}O("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});O("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});O("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});O("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});O("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});O("<",4,2,function(a,b,c){return rc(function(a,b){return a<b},a,b,c)}); -O(">",4,2,function(a,b,c){return rc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return rc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return rc(function(a,b){return a>=b},a,b,c)});var qc=O("=",3,2,function(a,b,c){return rc(function(a,b){return a==b},a,b,c,l)});O("!=",3,2,function(a,b,c){return rc(function(a,b){return a!=b},a,b,c,l)});O("and",2,2,function(a,b,c){return oc(a,c)&&oc(b,c)});O("or",1,2,function(a,b,c){return oc(a,c)||oc(b,c)});function uc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));K.call(this,a.j);this.ka=a;this.f=b;this.t=a.h();this.m=a.m}w(uc,K);uc.prototype.evaluate=function(a){a=this.ka.evaluate(a);return vc(this.f,a)};uc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ka.toString(a);return b+=this.f.toString(a)};function wc(a,b){b.length<a.ia&&h(Error("Function "+a.o+" expects at least"+a.ia+" arguments, "+b.length+" given"));a.Z!==m&&b.length>a.Z&&h(Error("Function "+a.o+" expects at most "+a.Z+" arguments, "+b.length+" given"));a.xa&&x(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b))});K.call(this,a.j);this.P=a;this.U=b;mc(this,a.t||oa(b,function(a){return a.h()}));nc(this,a.va&&!b.length||a.ua&&!!b.length||oa(b,function(a){return a.m}))}w(wc,K); -wc.prototype.evaluate=function(a){return this.P.q.apply(m,ra(a,this.U))};wc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.P+"\n";b+=" ";this.U.length&&(a+=b+"Arguments:",b+=" ",a=na(this.U,function(a,d){return a+"\n"+d.toString(b)},a));return a};function xc(a,b,c,d,e,f,g,p,u){this.o=a;this.j=b;this.t=c;this.va=d;this.ua=e;this.q=f;this.ia=g;this.Z=t(p)?p:g;this.xa=!!u}xc.prototype.toString=q("o");var yc={}; -function P(a,b,c,d,e,f,g,p){a in yc&&h(Error("Function already created: "+a+"."));yc[a]=new xc(a,b,c,d,n,e,f,g,p)}P("boolean",2,n,n,function(a,b){return oc(b,a)},1);P("ceiling",1,n,n,function(a,b){return Math.ceil(L(b,a))},1);P("concat",3,n,n,function(a,b){var c=sa(arguments,1);return na(c,function(b,c){return b+N(c,a)},"")},2,m);P("contains",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);P("false",2,n,n,aa(n),0); -P("floor",1,n,n,function(a,b){return Math.floor(L(b,a))},1);P("id",4,n,n,function(a,b){function c(a){if(Qb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return pa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];x(d,function(a){(a=c(a))&&!qa(f,a)&&f.push(a)});f.sort(pb);var g=new I;x(f,function(a){g.add(a)});return g},1);P("lang",2,n,n,aa(n),1); -P("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);P("local-name",3,n,l,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("name",3,n,l,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);P("namespace-uri",3,l,n,aa(""),0,1,l);P("normalize-space",3,n,l,function(a,b){return(b?N(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -P("not",2,n,n,function(a,b){return!oc(b,a)},1);P("number",1,n,l,function(a,b){return b?L(b,a):+H(a.g)},0,1);P("position",1,l,n,function(a){return a.za},0);P("round",1,n,n,function(a,b){return Math.round(L(b,a))},1);P("starts-with",2,n,n,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,n,l,function(a,b){return b?N(b,a):H(a.g)},0,1);P("string-length",1,n,l,function(a,b){return(b?N(b,a):H(a.g)).length},0,1); -P("substring",3,n,n,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -P("substring-before",3,n,n,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,n,n,function(a,b){for(var c=kc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);P("translate",3,n,n,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,n,n,aa(l),0);function J(a,b){this.na=a;this.ha=t(b)?b:m;this.e=m;switch(a){case "comment":this.e=8;break;case "text":this.e=gb;break;case "processing-instruction":this.e=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function zc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}J.prototype.matches=function(a){return this.e===m||this.e==a.nodeType};J.prototype.getName=q("na"); -J.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.na;this.ha===m||(b+="\n"+this.ha.toString(a+" "));return b};function Ac(a){K.call(this,3);this.ma=a.substring(1,a.length-1)}w(Ac,K);Ac.prototype.evaluate=q("ma");Ac.prototype.toString=function(a){return(a||"")+"literal: "+this.ma};function bc(a){this.o=a.toLowerCase()}bc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.o||this.o==a.nodeName.toLowerCase()?l:this.o==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};bc.prototype.getName=q("o");bc.prototype.toString=function(a){return(a||"")+"nametest: "+this.o};function Bc(a){K.call(this,1);this.oa=a}w(Bc,K);Bc.prototype.evaluate=q("oa");Bc.prototype.toString=function(a){return(a||"")+"number: "+this.oa};function Cc(a,b){K.call(this,a.j);this.ea=a;this.L=b;this.t=a.h();this.m=a.m;if(1==this.L.length){var c=this.L[0];!c.W&&c.u==Dc&&(c=c.T,"*"!=c.getName()&&(this.K={name:c.getName(),F:m}))}}w(Cc,K);function Ec(){K.call(this,4)}w(Ec,K);Ec.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Ec.prototype.toString=function(a){return a+"RootHelperExpr"};function Fc(){K.call(this,4)}w(Fc,K);Fc.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Fc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Cc.prototype.evaluate=function(a){var b=this.ea.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.L;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=kc(b,e.u.D),g;if(!e.h()&&e.u==Gc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Pb(g))}else if(!e.h()&&e.u==Hc)g=f.next(),b=e.evaluate(new Pb(g));else{g=f.next();for(b=e.evaluate(new Pb(g));(g=f.next())!=m;)g=e.evaluate(new Pb(g)),b=hc(b,g)}}return b}; -Cc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ea.toString(b);this.L.length&&(c+=b+"Steps:\n",b+=" ",x(this.L,function(a){c+=a.toString(b)}));return c};function Ic(a,b){this.f=a;this.D=!!b}function vc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=kc(b),f=b.s(),g,p=0;g=e.next();p++){var u=a.D?f-p:p+1;g=d.evaluate(new Pb(g,u,f));var s;"number"==typeof g?s=u==g:"string"==typeof g||"boolean"==typeof g?s=!!g:g instanceof I?s=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));s||e.remove()}return b}Ic.prototype.w=function(){return 0<this.f.length?this.f[0].w():m}; -Ic.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return l}return n};Ic.prototype.s=function(){return this.f.length};Ic.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Jc(a,b,c,d){K.call(this,4);this.u=a;this.T=b;this.f=c||new Ic([]);this.W=!!d;b=this.f.w();a.Da&&b&&(a=b.name,a=Qb?a.toLowerCase():a,this.K={name:a,F:b.F});this.t=this.f.h()}w(Jc,K); -Jc.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.F?N(c.F,a):m,f=1);if(this.W)if(!this.h()&&this.u==Kc)c=Zb(this.T,b,d,e),c=vc(this.f,c,f);else if(a=kc((new Jc(Lc,new J("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=hc(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Jc.prototype.q=function(a,b,c,d){a=this.u.P(this.T,a,b,c);return a=vc(this.f,a,d)}; -Jc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.W?"//":"/")+"\n";this.u.o&&(b+=a+"Axis: "+this.u+"\n");b+=this.T.toString(a);if(this.f.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.f.length;c++)var d=c<this.f.length-1?", ":"",b=b+(this.f[c].toString(a)+d);return b};function Mc(a,b,c,d){this.o=a;this.P=b;this.D=c;this.Da=d}Mc.prototype.toString=q("o");var Nc={}; -function Q(a,b,c,d){a in Nc&&h(Error("Axis already created: "+a));b=new Mc(a,b,c,!!d);return Nc[a]=b}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Dc=Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Qb)return c.add(new Sb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof J&&a.e===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Qb?g.nodeValue&&c.add(Tb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Qb?g.nodeValue&&c.add(Tb(b,g,b.sourceIndex)):c.add(g));return c},n),Kc=Q("child",function(a,b,c,d,e){return(Qb?ec:fc).call(m,a,b,v(c)?c:m,v(d)?d:m,e||new I)},n,l); -Q("descendant",Zb,n,l);var Lc=Q("descendant-or-self",function(a,b,c,d){var e=new I;Yb(b,c,d)&&a.matches(b)&&e.add(b);return Zb(a,b,c,d,e)},n,l),Gc=Q("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Yb(f,c,d)&&a.matches(f)&&e.add(f),e=Zb(a,f,c,d,e);while(b=b.parentNode);return e},n,l);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);Q("namespace",function(){return new I},n); -var Oc=Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Hc=Q("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var u=[];for(b=f[g];b=b.previousSibling;)u.unshift(b);for(var s=0,U=u.length;s<U;s++)b=u[s],Yb(b,c,d)&&a.matches(b)&&e.add(b),e=Zb(a,b,c,d,e)}return e},l,l); -Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Pc=Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Qc(a){K.call(this,1);this.da=a;this.t=a.h();this.m=a.m}w(Qc,K);Qc.prototype.evaluate=function(a){return-L(this.da,a)};Qc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.da.toString(a+" ")};function Rc(a){K.call(this,4);this.R=a;mc(this,oa(this.R,function(a){return a.h()}));nc(this,oa(this.R,function(a){return a.m}))}w(Rc,K);Rc.prototype.evaluate=function(a){var b=new I;x(this.R,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=hc(b,c)});return b};Rc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.R,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Sc(a){this.a=a}function Tc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Uc(a);var d=a.a.next();if(!d)break;var e=(d=tc[d]||m)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ja;)b=new pc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new pc(c.pop(),c.pop(),b);return b}function R(a,b){a.a.empty()&&h(Error(b))}function Vc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Wc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Xc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Ac(a)}function Yc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new bc(a.a.next()+a.a.next()+a.a.next()):new bc(a.a.next())} -function Zc(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Ec;d=new Ec;R(a,"Missing next location step.");b=$c(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Tc(a);R(a,'unclosed "("');Vc(a,")");break;case '"':case "'":b=Xc(a);break;default:if(isNaN(+b))if(!zc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=yc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){R(a,"Missing function argument list.");d.push(Tc(a));if(","!=G(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Wc(a);b=new wc(b,d)}else{b=m;break a}else b=new Bc(+a.a.next())}"["==G(a.a)&&(d=new Ic(ad(a)),b=new uc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=$c(a,"/"),d=new Fc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=$c(a,b),c.push(b);return new Cc(d, -c)} -function $c(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Jc(Pc,new J("node")),a.a.next(),d;if(".."==G(a.a))return d=new Jc(Oc,new J("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Dc,a.a.next(),R(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Nc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),R(a,"Missing node name")):f=Kc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){zc(e)||h(Error("Invalid node type: "+e));c=a.a.next();zc(c)||h(Error("Invalid type name: "+c));Vc(a,"(");R(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Xc(a);R(a,"Bad nodetype");Wc(a);c=new J(c,g)}else c=Yc(a);else"*"==e?c=Yc(a):h(Error("Bad token: "+a.a.next()));e=new Ic(ad(a),f.D);return d||new Jc(f,c,e,"//"==b)} -function ad(a){for(var b=[];"["==G(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Tc(a);b.push(c);R(a,"Unclosed predicate expression.");Vc(a,"]")}return b}function Uc(a){if("-"==G(a.a))return a.a.next(),new Qc(Uc(a));var b=Zc(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Zc(a));a.a.back();a=new Rc(b)}return a};function bd(a){a.length||h(Error("Empty XPath expression."));a=Vb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Tc(new Sc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Pb(a));return new S(e,d)}} -function S(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?jc(a):""+a;break;case 1:this.numberValue=a instanceof I?+jc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=kc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Sb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=ic(a);this.singleNodeValue=d instanceof Sb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function cd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new bd(a)).evaluate(b,f)},b.createExpression=function(a){return new bd(a)})};var T={};T.qa=function(){var a={La:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();T.q=function(a,b,c){var d=F(a);(A||Mb)&&cd(lb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.qa;return A&&!Ya(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -T.V=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};T.Ca=function(a,b){var c=function(){var c=T.q(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||T.V(c,a);return c}; -T.Ha=function(a,b){var c=function(){var c=T.q(b,a,7);if(c){var e=c.snapshotLength;z&&!t(e)&&T.V(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();x(c,function(b){T.V(b,a)});return c};function dd(a){return(a=a.exec(Ka()))?a[1]:""}var ed=function(){if(Ib)return dd(/Firefox\/([0-9.]+)/);if(A||z)return Ra;if(Nb)return dd(/Chrome\/([0-9.]+)/);if(Ob)return dd(/Version\/([0-9.]+)/);if(Kb||Lb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ka());if(a)return a[1]+"."+a[2]}else{if(Mb)return(a=dd(/Android\s+([0-9.]+)/))?a:dd(/Version\/([0-9.]+)/);if(Jb)return dd(/Camino\/([0-9.]+)/)}return""}();var fd,gd;function V(a){return hd?fd(a):A?0<=ia(Za,a):Ya(a)}function id(a){return hd?gd(a):Mb?0<=ia(jd,a):0<=ia(ed,a)} -var hd=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;fd=function(a){return 0<=d.sa(e,""+a)};gd=function(a){return 0<=d.sa(f,""+a)};return l}(),kd=Lb||Kb,ld;if(Mb){var md=/Android\s+([0-9\.]+)/.exec(Ka());ld=md?md[1]:"0"}else ld="0"; -var jd=ld,nd=A&&!D(8),od=A&&!D(9),pd=D(10),qd=A&&!D(10);Mb&&id(2.3);!z&&(!C||V("533"));function rd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}rd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};rd.prototype.contains=function(a){return!this||!a?n:a instanceof rd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function sd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function td(a,b){return sd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function ud(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=hb(a),b=!kb(b.C);return b?a.body:a.documentElement} -function vd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function wd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=td(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=td(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function xd(a){var b,c=F(a),d=td(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=ud(c);if(a==g)return f;if(a.getBoundingClientRect)b=vd(a),a=hb(c),a=jb(a.C),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==td(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=wd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function yd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=vd(a);b.x=c.left;b.y=c.top}else{var c=hb(a),c=jb(c.C),d=xd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Ya(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=td(a,e));f||(f=td(a,"transform"));f?(a=f.match(zd),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e=ea(a.fa),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.fa().targetTouches&& -(f=a.fa().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function Ad(a){if("none"!=td(a,"display"))return Bd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Bd(a);b.display=c;b.position=e;b.visibility=d;return a}function Bd(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!t(b)||d)&&a.getBoundingClientRect?(a=vd(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)}var Cd={thin:2,medium:4,thick:6}; -function Dd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Cd)d=Cd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var zd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,l)&&Gd(a)&&!(A||z||B&&!V("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?l:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Id(a,b){var c;if(c=nd)if(c="value"==b)if(c=W(a,"OPTION"))c=Jd(a,"value")===m;c?(c=[],wb(a,c,n),c=c.join("")):c=a[b];return c}var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Ld(a){var b=[];x(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Jd(a,b){b=b.toLowerCase();if("style"==b)return Ld(a.style.cssText);if(nd&&"value"==b&&W(a,"INPUT"))return a.value;if(od&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Gd(a){var b=a.tagName.toUpperCase();return!qa(Md,b)?l:Id(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):xb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Id(b,"disabled")){if(!W(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:mb(a.previousSibling);)if(W(a,"LEGEND"))return l}return n},l)?n:l} -function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:m} -function X(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=od?"styleFloat":"cssFloat";c=sd(a,c)||Od(a,c);if(c===m)c=m;else if(qa(ua,b)&&(xa.test("#"==c.charAt(0)?c:"#"+c)||Ba(c).length||ta&&ta[c.toLowerCase()]||za(c).length)){var d=za(c);if(!d.length){a:if(d=Ba(c),!d.length){d=ta[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(xa.test(d)&&(d=wa(d),d=wa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!t(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?t(d)?d:m:(c=Nd(a))?Od(c,b):m} -function Pd(a){if(ea(a.getBBox)&&!W(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(W(a,"BODY")){b=lb(F(a))||k;"hidden"!=X(a,"overflow")?a=l:(a=Nd(a),!a||!W(a,"HTML")?a=l:(a=X(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ha).document;var b=a.documentElement,d=a.body;d||h(new y(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new cb(b,a)}else b=(b||window).document,b=kb(b)?b.documentElement:b.body,b=new cb(b.clientWidth,b.clientHeight);return b}return Ad(a)} -function Fd(a,b){function c(a){if("none"==X(a,"display"))return n;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?l:W(a,"PATH")&&(0<b.height||0<b.width)?(b=X(a,"stroke-width"),!!b&&0<parseInt(b,10)):oa(a.childNodes,function(b){return b.nodeType==gb&&"hidden"!=X(a,"overflow")||W(b)&&d(b)})}function e(a,b){var c;if((c=b==m?nb(a):nb(b))&&("hidden"==X(c,"overflow-x")||"hidden"==X(c,"overflow-y"))){var d=Pd(c),f=yd(c),g=yd(a);return f.x+d.width<=g.x&&"hidden"==X(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==X(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=X(a,"-o-transform")||X(a,"-webkit-transform")||X(a,"-ms-transform")||X(a,"-moz-transform")||X(a,"transform");if(b&&"none"!==b)return b=yd(a),a=Pd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Nd(a);return!a||f(a)}W(a)||h(Error("Argument to isShown must be of type Element"));if(W(a,"OPTION")||W(a,"OPTGROUP")){var g=xb(a,function(a){return W(a,"SELECT")});return!!g&&Fd(g,l)}if(W(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?T.Ca('/descendant::*[@usemap = "#'+a.name+'"]',g):sb(g,function(b){return W(b)&&Jd(b,"usemap")=="#"+a.name});return!!g&&Fd(g,b)}return W(a,"AREA")?(g=xb(a,function(a){return W(a,"MAP")}),!!g&&Fd(g,b)):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Qd(a)||!d(a)||!e(a,m)?n:f(a)} -function Qd(a){if(qd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Rd(a)}function Rd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Rd(a));return b};function Sd(a){this.d=ha.document.documentElement;this.n=m;var b=yb(F(this.d));b&&Td(this,b);this.A=a||new Ud}function Td(a,b){a.d=b;a.n=W(b,"OPTION")?xb(b,function(a){return W(a,"SELECT")}):m}function Y(a,b,c){if(!Ed(a.d))return n;c={clientX:c.x,clientY:c.y,button:0,altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),wheelDelta:0,relatedTarget:m};return(a=a.n?Vd(a,b):a.d)?Wd(a,b,c):l} -function Xd(a,b,c,d,e,f){function g(a,c){var d={identifier:a,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};p.changedTouches.push(d);if(b==Yd||b==Zd)p.touches.push(d),p.targetTouches.push(d)}var p={touches:[],targetTouches:[],changedTouches:[],altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),relatedTarget:m,scale:0,rotation:0};g(c,d);t(e)&&g(e,f);Wd(a.d,b,p)} -function $d(a,b,c,d,e,f){var g=MSPointerEvent.MSPOINTER_TYPE_TOUCH;Ed(a.d)&&(c={clientX:c.x,clientY:c.y,button:d,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:m,width:0,height:0,Ba:0,rotation:0,pointerId:e,Ea:0,Fa:0,pointerType:g,ta:f},(a=a.n?Vd(a,b):a.d)&&Wd(a,b,c))} -function Vd(a,b){if(A)switch(b){case ae:case be:return m;case ce:case de:case ee:return a.n.multiple?a.n:m;default:return a.n}if(z)switch(b){case ce:case ae:return a.n.multiple?a.d:m;default:return a.d}if(C)switch(b){case fe:case ge:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:m}return a.d} -function he(a,b){if(Ed(a.d)){var c=m,d=m;if(!ie)for(var e=a.d;e;e=e.parentNode)if(W(e,"A")){c=e;break}else{var f;a:{if(W(e,"INPUT")&&(f=e.type.toLowerCase(),"submit"==f||"image"==f)){f=l;break a}if(W(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=l;break a}f=n}if(f){d=e;break}}if(f=e=Hd(a.d)){f=a.d;Hd(f)||h(new y(15,"Element is not selectable"));var g="selected",p=f.type&&f.type.toLowerCase();if("checkbox"==p||"radio"==p)g="checked";f=!!Id(f,g)}if(a.n&&(g=a.n,!f||g.multiple))a.d.selected=!f, -(!C||!g.multiple||Mb&&id(4))&&Wd(g,je);A&&d?d.click():Y(a,fe,b)&&(c&&ke(c)?(d=c.href,e=lb(F(c)),A&&!V(8)&&(d=le(e.location,d)),c.target?e.open(d,c.target):e.location.href=d):e&&!a.n&&(!B&&!C&&!(f&&"radio"==a.d.type.toLowerCase()))&&(a.d.checked=!f,z&&!V(11)&&Wd(a.d,je)))}} -function me(a){a=a.n||a.d;var b=yb(F(a));if(a!=b){if(b&&(ea(b.blur)||A&&fa(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){A&&"Unspecified error."==c.message||h(c)}A&&!V(8)&&lb(F(a)).focus()}if(ea(a.focus)||A&&fa(a.focus))z&&V(11)&&!Fd(a)?Wd(a,ne):a.focus()}}var ie=C||z||hd&&id(3.6); -function ke(a){if(ie||!a.href)return n;if(!hd)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=lb(F(a)),c=b.location.href;a=le(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var oe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function le(a,b){var c=b.match(oe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Ud(){this.Aa=0}Ud.prototype.l=function(a){return 0!=(this.Aa&a)};var pe=!(A&&!V(10))&&!z,qe=Mb?!id(4):!kd,re=A&&ha.navigator.msPointerEnabled;function se(a,b,c){this.e=a;this.G=b;this.H=c}se.prototype.create=function(a){a=F(a);od?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.G,this.H));return a};se.prototype.toString=q("e");function Z(a,b,c){se.call(this,a,b,c)}w(Z,se); -Z.prototype.create=function(a,b){!B&&this==te&&h(new y(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(od){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ue||this==ae)Object.defineProperty?(c=this==ue,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==ve&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=lb(c);d=c.createEvent("MouseEvents");c=1;if(this==ve&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==te&&(c=b.wheelDelta);d.initMouseEvent(this.e,this.G,this.H,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=zb(hb(a)),c=ud(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function we(a,b,c){se.call(this,a,b,c)}w(we,se); -we.prototype.create=function(a,b){function c(b){b=ma(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ma(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}pe||h(new y(9,"Browser does not support firing touch events."));var e=F(a),f=lb(e),g=qe?d(b.changedTouches): -c(b.changedTouches),p=b.touches==b.changedTouches?g:qe?d(b.touches):c(b.touches),u=b.targetTouches==b.changedTouches?g:qe?d(b.targetTouches):c(b.targetTouches),s;qe?(s=e.createEvent("MouseEvents"),s.initMouseEvent(this.e,this.G,this.H,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),s.touches=p,s.targetTouches=u,s.changedTouches=g,s.scale=b.scale,s.rotation=b.rotation):(s=e.createEvent("TouchEvent"),Mb?s.initTouchEvent(p,u,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, -b.altKey,b.shiftKey,b.metaKey):s.initTouchEvent(this.e,this.G,this.H,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,u,g,b.scale,b.rotation),s.relatedTarget=b.relatedTarget);return s};function xe(a,b,c){se.call(this,a,b,c)}w(xe,se); -xe.prototype.create=function(a,b){re||h(new y(9,"Browser does not support MSPointer events."));var c=F(a),d=lb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.G,this.H,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ba,b.rotation,b.Ea,b.Fa,b.pointerId,b.pointerType,0,b.ta);return c}; -var je=new se("change",l,n),ne=new se("focus",n,n),fe=new Z("click",l,l),ce=new Z("contextmenu",l,l),ye=new Z("mousedown",l,l),de=new Z("mousemove",l,n),ue=new Z("mouseout",l,l),ae=new Z("mouseover",l,l),ge=new Z("mouseup",l,l),ve=new Z(B?"DOMMouseScroll":"mousewheel",l,l),te=new Z("MozMousePixelScroll",l,l),ze=new we("touchend",l,l),Zd=new we("touchmove",l,l),Yd=new we("touchstart",l,l),Ae=new xe("MSPointerDown",l,l),ee=new xe("MSPointerMove",l,l),be=new xe("MSPointerOver",l,l),Be=new xe("MSPointerOut", -l,l),Ce=new xe("MSPointerUp",l,l);function Wd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return od?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function De(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De){d=Ee(a);Fe(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.I=0;De.prototype.pa=0;function Ee(a){Fe(a);return a.i.concat()} -De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.I--,this.pa++,this.i.length>2*this.I&&Fe(this),l):n};function Fe(a){if(a.I!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.I!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.I++,this.i.push(a),this.pa++);this.z[a]=b};var Ge={};function $(a,b,c){fa(a)&&(a=B?a.b:z?a.opera:a.c);a=new He(a,b,c);if(b&&(!(b in Ge)||c))Ge[b]={key:a,shift:n},c&&(Ge[c]={key:a,shift:l});return a}function He(a,b,c){this.code=a;this.ra=b||m;this.Ja=c||this.ra}$(8);$(9);$(13);var Ie=$(16),Je=$(17),Ke=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); -$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Le=$(Ja?{b:91,c:91,opera:219}:Ia?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -$(Ja?{b:92,c:92,opera:220}:Ia?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});$(Ja?{b:93,c:93,opera:0}:Ia?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Pa?56:42},"*");$({b:107,c:107,opera:Pa?61:43},"+"); -$({b:109,c:109,opera:Pa?109:45},"-");$({b:110,c:110,opera:Pa?190:78},".");$({b:111,c:111,opera:Pa?191:47},"/");$(Pa&&z?m:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var Me=new De;Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke); -Me.set(8,Le);(function(a){var b=new De;x(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);B&&V(12);function Ne(){Sd.call(this);this.v=new E(0,0);this.O=new E(0,0)}w(Ne,Sd);Ne.prototype.X=n;Ne.prototype.N=0;Ne.prototype.M=0;Ne.prototype.Ga=1;Ne.prototype.move=function(a,b,c){(!this.l()||pd)&&Td(this,a);a=yd(a);this.v.x=b.x+a.x;this.v.y=b.y+a.y;t(c)&&(this.O.x=c.x+a.x,this.O.y=c.y+a.y);this.l()&&(this.X=l,pd?Oe(this,Pe):Qe(this,Zd))};Ne.prototype.l=function(){return!!this.N}; -function Qe(a,b){a.l()||h(new y(13,"Should never fire event when touchscreen is not pressed."));var c,d;a.M&&(c=a.M,d=a.O);Xd(a,b,a.N,a.v,c,d)}function Oe(a,b){b(a,a.v,a.N,l);a.M&&b(a,a.O,a.M,n)}function Re(a,b,c,d){Y(a,de,b);$d(a,be,b,0,c,d);Y(a,ae,b);$d(a,Ae,b,0,c,d);Y(a,ye,b)&&me(a)}function Se(a,b,c,d){$d(a,Ce,b,0,c,d);Y(a,ge,b);he(a,b);$d(a,Be,b,-1,c,d);Y(a,ue,b)}function Pe(a,b,c,d){$d(a,ee,b,-1,c,d);Y(a,de,b)};function Te(a,b){this.x=a;this.y=b}w(Te,E);Te.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Te.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Ue(a,b,c,d,e){Fd(a,l)||h(new y(11,"Element is not currently visible and may not be manipulated"));var f=F(a),f=C?f.body:f.documentElement,g;g=xd(a);var p=xd(f),u;if(A){var s=Dd(f,"borderLeft");u=Dd(f,"borderRight");var U=Dd(f,"borderTop"),M=Dd(f,"borderBottom");u=new rd(U,u,M,s)}else s=sd(f,"borderLeftWidth"),u=sd(f,"borderRightWidth"),U=sd(f,"borderTopWidth"),M=sd(f,"borderBottomWidth"),u=new rd(parseFloat(U),parseFloat(u),parseFloat(M),parseFloat(s));s=g.x-p.x-u.left;g=g.y-p.y-u.top;p= -f.clientHeight-a.offsetHeight;u=f.scrollLeft;U=f.scrollTop;u+=Math.min(s,Math.max(s-(f.clientWidth-a.offsetWidth),0));U+=Math.min(g,Math.max(g-p,0));g=new E(u,U);f.scrollLeft=g.x;f.scrollTop=g.y;d?d=new Te(d.x,d.y):(d=Ve(a),d=new Te(d.width/2,d.height/2));e=e||new Ne;e.move(a,d);e.l()&&h(new y(13,"Cannot press touchscreen when already pressed."));e.X=n;e.N=e.Ga++;pd?Oe(e,Re):Qe(e,Yd);f=yd(a);e.move(a,new E(d.x+Math.floor(b/2),d.y+Math.floor(c/2)));g=yd(a);e.move(a,new E(f.x+d.x+b-g.x,f.y+d.y+c-g.y)); -e.l()||h(new y(13,"Cannot release touchscreen when not already pressed."));pd?Oe(e,Se):(Qe(e,ze),e.X||(Y(e,de,e.v),Y(e,ye,e.v)&&me(e),Y(e,ge,e.v),he(e,e.v)));e.N=0;e.M=0}function Ve(a){var b=Ad(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ve(a.offsetParent)};function We(){this.S=k} -function Xe(a,b,c){switch(typeof b){case "string":Ye(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Xe(a,a.S?a.S.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ye(f, -c),c.push(":"),Xe(a,a.S?a.S.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Ze={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},$e=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ye(a,b){b.push('"',a.replace($e,function(a){if(a in Ze)return Ze[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ze[a]=e+b.toString(16)}),'"')};C||z||B&&V(3.5)||A&&V(8);function af(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,af);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=bf(a);return b}if("document"in a)return b={},b.WINDOW=bf(a),b;if(da(a))return ma(a,af);a=db(a,function(a,b){return"number"==typeof b||v(b)});return eb(a,af);default:return m}} -function cf(a,b){return"array"==ca(a)?ma(a,function(a){return cf(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?df(a.ELEMENT,b):"WINDOW"in a?df(a.WINDOW,b):eb(a,function(a){return cf(a,b)}):a}function ef(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.$=ga());b.$||(b.$=ga());return b}function bf(a){var b=ef(a.ownerDocument),c=fb(b,function(b){return b==a});c||(c=":wdc:"+b.$++,b[c]=a);return c} -function df(a,b){a=decodeURIComponent(a);var c=b||document,d=ef(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function ff(a,b,c,d){a=[a,b,c,d];b=Ue;var e;try{b=v(b)?new ha.Function(b):ha==window?b:new ha.Function("return ("+b+").apply(null,arguments);");var f=cf(a,ha.document),g=b.apply(m,f);e={status:0,value:af(g)}}catch(p){e={status:"code"in p?p.code:13,value:{message:p.message}}}f=[];Xe(new We,e,f);return f.join("")}var gf=["_"],hf=r;!(gf[0]in hf)&&hf.execScript&&hf.execScript("var "+gf[0]);for(var jf;gf.length&&(jf=gf.shift());)!gf.length&&t(ff)?hf[jf]=ff:hf=hf[jf]?hf[jf]:hf[jf]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function x(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(x,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return n.navigator?n.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=n.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var y=Ha,A=Ia,B=Ka,Qa=Ja,Ra,Sa=n.navigator;Ra=Sa&&Sa.platform||"";La=-1!=Ra.indexOf("Mac");Ma=-1!=Ra.indexOf("Win");var Ta=-1!=Ra.indexOf("Linux");function Ua(){var a=n.document;return a?a.documentMode:void 0}var Va; +a:{var Za="",$a;if(y&&n.opera)var ab=n.opera.version,Za="function"==typeof ab?ab():ab;else if(B?$a=/rv\:([^\);]+)(\)|;)/:A?$a=/MSIE\s+([^\);]+)(\)|;)/:Qa&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Na()),Za=bb?bb[1]:"";if(A){var cb=Ua();if(cb>parseFloat(Za)){Va=String(cb);break a}}Va=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Va,a))}function C(a){return A&&fb>=a}var gb=n.document,fb=gb&&A?Ua()||("CSS1Compat"==gb.compatMode?parseInt(Va,10):5):void 0;var hb;!B&&!A||A&&C(9)||B&&eb("1.9.1");A&&eb("9");function E(a,b){this.x=p(a)?a:0;this.y=p(b)?b:0}m=E.prototype;m.toString=function(){return"("+this.x+", "+this.y+")"};m.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};m.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};m.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function ib(a,b){this.width=a;this.height=b}m=ib.prototype;m.toString=function(){return"("+this.width+" x "+this.height+")"};m.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function jb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function kb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function lb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var mb=3;function nb(a){a=a.document;a=ob(a)?a.documentElement:a.body;return new ib(a.clientWidth,a.clientHeight)}function F(a){return a?a.parentWindow||a.defaultView:window}function ob(a){return"CSS1Compat"==a.compatMode}function pb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function qb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function rb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!C(9)){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?sb(a,b):!c&&qb(e,b)?-1*tb(a,b):!d&&qb(f,a)?tb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function tb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return sb(d,a)}function sb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"}; +function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==mb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling}function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function yb(a){this.F=a||n.document||document}yb.prototype.I=function(a){return t(a)?this.F.getElementById(a):a}; +function zb(a){return!Qa&&ob(a.F)?a.F.documentElement:a.F.body||a.F.documentElement}yb.prototype.contains=qb;var Ab,Bb,Cb,Db,Eb,Fb,Gb;Gb=Fb=Eb=Db=Cb=Bb=Ab=!1;var Hb=Na();Hb&&(-1!=Hb.indexOf("Firefox")?Ab=!0:-1!=Hb.indexOf("Camino")?Bb=!0:-1!=Hb.indexOf("iPhone")||-1!=Hb.indexOf("iPod")?Cb=!0:-1!=Hb.indexOf("iPad")?Db=!0:-1!=Hb.indexOf("Android")?Eb=!0:-1!=Hb.indexOf("Chrome")?Fb=!0:-1!=Hb.indexOf("Safari")&&(Gb=!0));var Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb;function Pb(a,b,c){this.g=a;this.Ia=b||1;this.r=c||1};var Qb=A&&!C(9),Rb=A&&!C(8);function Sb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Tb(a,b,c){var d=Rb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Sb(b,a,b.nodeName,d,c)};function Ub(a){this.ja=a;this.W=0}function Vb(a){a=a.match(Wb);for(var b=0;b<a.length;b++)Xb.test(a[b])&&a.splice(b,1);return new Ub(a)}var Wb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Xb=/^\s/;function H(a,b){return a.ja[a.W+(b||0)]}Ub.prototype.next=function(){return this.ja[this.W++]};Ub.prototype.back=function(){this.W--};Ub.prototype.empty=function(){return this.ja.length<=this.W};function I(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(Qb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Qb&&"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} +function Yb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Rb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Zb(a,b,c,d,e){return(Qb?$b:ac).call(null,a,b,t(c)?c:null,t(d)?d:null,e||new J)} +function $b(a,b,c,d,e){if(a instanceof bc||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=cc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Yb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}dc(a,b,c,d,e);return e} +function ac(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof K?dc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){Yb(a,c,d)&&e.add(a)}));return e} +function ec(a,b,c,d,e){var f;if((a instanceof bc||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=cc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Yb(a,c,d)}));w(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return fc(a,b,c,d,e)}function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function dc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b),dc(a,b,c,d,e)}function cc(a){if(a instanceof K){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function J(){this.r=this.k=null;this.P=0}function gc(a){this.u=a;this.next=this.G=null}function hc(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.u==d.u||c.u instanceof Sb&&d.u instanceof Sb&&c.u.g==d.u.g?(f=c,c=c.next,d=d.next):0<rb(c.u,d.u)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.P=g;return a} +J.prototype.unshift=function(a){a=new gc(a);a.next=this.k;this.r?this.k.G=a:this.k=this.r=a;this.k=a;this.P++};J.prototype.add=function(a){a=new gc(a);a.G=this.r;this.k?this.r.next=a:this.k=this.r=a;this.r=a;this.P++};function ic(a){return(a=a.k)?a.u:null}J.prototype.t=h("P");function jc(a){return(a=ic(a))?I(a):""}function kc(a,b){return new lc(a,!!b)}function lc(a,b){this.Ea=a;this.ka=(this.J=b)?a.r:a.k;this.ea=null} +lc.prototype.next=function(){var a=this.ka;if(null==a)return null;var b=this.ea=a;this.ka=this.J?a.G:a.next;return b.u};lc.prototype.remove=function(){var a=this.Ea,b=this.ea;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.k=b;b?b.G=c:a.r=c;a.P--;this.ea=null};function L(a){this.j=a;this.m=this.w=!1;this.Q=null}function M(a){return"\n "+a.toString().split("\n").join("\n ")}L.prototype.h=h("w");function mc(a,b){a.w=b}function nc(a,b){a.m=b}L.prototype.B=h("Q");function N(a,b){var c=a.evaluate(b);return c instanceof J?+jc(c):+c}function O(a,b){var c=a.evaluate(b);return c instanceof J?jc(c):""+c}function oc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.t():!!c};function pc(a,b,c){L.call(this,a.j);this.ia=a;this.oa=b;this.ta=c;this.w=b.h()||c.h();this.m=b.m||c.m;this.ia==qc&&(c.m||c.h()||4==c.j||0==c.j||!b.B()?b.m||(b.h()||4==b.j||0==b.j||!c.B())||(this.Q={name:c.B().name,K:b}):this.Q={name:b.B().name,K:c})}u(pc,L); +function rc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof J&&c instanceof J){e=kc(b);for(d=e.next();d;d=e.next())for(b=kc(c),f=b.next();f;f=b.next())if(a(I(d),I(f)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=kc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+I(d);break;case "boolean":d=!!I(d);break;case "string":d=I(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}pc.prototype.evaluate=function(a){return this.ia.s(this.oa,this.ta,a)};pc.prototype.toString=function(){var a="Binary Expression: "+this.ia,a=a+M(this.oa);return a+=M(this.ta)};function sc(a,b,c,d){this.Ha=a;this.ra=b;this.j=c;this.s=d}sc.prototype.toString=h("Ha");var tc={}; +function P(a,b,c,d){if(tc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new sc(a,b,c,d);return tc[a.toString()]=a}P("div",6,1,function(a,b,c){return N(a,c)/N(b,c)});P("mod",6,1,function(a,b,c){return N(a,c)%N(b,c)});P("*",6,1,function(a,b,c){return N(a,c)*N(b,c)});P("+",5,1,function(a,b,c){return N(a,c)+N(b,c)});P("-",5,1,function(a,b,c){return N(a,c)-N(b,c)});P("<",4,2,function(a,b,c){return rc(function(a,b){return a<b},a,b,c)}); +P(">",4,2,function(a,b,c){return rc(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return rc(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return rc(function(a,b){return a>=b},a,b,c)});var qc=P("=",3,2,function(a,b,c){return rc(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return rc(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return oc(a,c)&&oc(b,c)});P("or",1,2,function(a,b,c){return oc(a,c)||oc(b,c)});function uc(a,b){if(b.t()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");L.call(this,a.j);this.sa=a;this.f=b;this.w=a.h();this.m=a.m}u(uc,L);uc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return vc(this.f,a)};uc.prototype.toString=function(){var a;a="Filter:"+M(this.sa);return a+=M(this.f)};function wc(a,b){if(b.length<a.qa)throw Error("Function "+a.p+" expects at least"+a.qa+" arguments, "+b.length+" given");if(null!==a.fa&&b.length>a.fa)throw Error("Function "+a.p+" expects at most "+a.fa+" arguments, "+b.length+" given");a.Fa&&w(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b);});L.call(this,a.j);this.V=a;this.$=b;mc(this,a.w||ta(b,function(a){return a.h()}));nc(this,a.Da&&!b.length||a.Ca&&!!b.length||ta(b,function(a){return a.m}))} +u(wc,L);wc.prototype.evaluate=function(a){return this.V.s.apply(null,xa(a,this.$))};wc.prototype.toString=function(){var a="Function: "+this.V;if(this.$.length)var b=sa(this.$,function(a,b){return a+M(b)},"Arguments:"),a=a+M(b);return a};function xc(a,b,c,d,e,f,g,k,r){this.p=a;this.j=b;this.w=c;this.Da=d;this.Ca=e;this.s=f;this.qa=g;this.fa=p(k)?k:g;this.Fa=!!r}xc.prototype.toString=h("p");var yc={}; +function Q(a,b,c,d,e,f,g,k){if(yc.hasOwnProperty(a))throw Error("Function already created: "+a+".");yc[a]=new xc(a,b,c,d,!1,e,f,g,k)}Q("boolean",2,!1,!1,function(a,b){return oc(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(N(b,a))},1);Q("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+O(c,a)},"")},2,null);Q("contains",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return-1!=b.indexOf(a)},2); +Q("count",1,!1,!1,function(a,b){return b.evaluate(a).t()},1,1,!0);Q("false",2,!1,!1,aa(!1),0);Q("floor",1,!1,!1,function(a,b){return Math.floor(N(b,a))},1); +Q("id",4,!1,!1,function(a,b){function c(a){if(Qb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=O(b,a).split(/\s+/),f=[];w(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(rb);var g=new J;w(f,function(a){g.add(a)});return g},1);Q("lang",2,!1,!1,aa(!1),1); +Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);Q("local-name",3,!1,!0,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,aa(""),0,1,!0);Q("normalize-space",3,!1,!0,function(a,b){return(b?O(b,a):I(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +Q("not",2,!1,!1,function(a,b){return!oc(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?N(b,a):+I(a.g)},0,1);Q("position",1,!0,!1,function(a){return a.Ia},0);Q("round",1,!1,!1,function(a,b){return Math.round(N(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?O(b,a):I(a.g)},0,1);Q("string-length",1,!1,!0,function(a,b){return(b?O(b,a):I(a.g)).length},0,1); +Q("substring",3,!1,!1,function(a,b,c,d){c=N(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?N(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=O(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +Q("substring-before",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){for(var c=kc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=O(b,a);c=O(c,a);var e=O(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);Q("true",2,!1,!1,aa(!0),0);function K(a,b){this.va=a;this.pa=p(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=mb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function zc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};K.prototype.getName=h("va"); +K.prototype.toString=function(){var a="Kind Test: "+this.va;null===this.pa||(a+=M(this.pa));return a};function Ac(a){L.call(this,3);this.ua=a.substring(1,a.length-1)}u(Ac,L);Ac.prototype.evaluate=h("ua");Ac.prototype.toString=function(){return"Literal: "+this.ua};function bc(a,b){this.p=a.toLowerCase();this.ga=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}bc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.p&&this.p!=a.nodeName.toLowerCase()?!1:this.ga==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};bc.prototype.getName=h("p");bc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.ga?"":this.ga+":")+this.p};function Bc(a){L.call(this,1);this.wa=a}u(Bc,L);Bc.prototype.evaluate=h("wa");Bc.prototype.toString=function(){return"Number: "+this.wa};function Cc(a,b){L.call(this,a.j);this.ma=a;this.R=b;this.w=a.h();this.m=a.m;if(1==this.R.length){var c=this.R[0];c.ba||c.A!=Dc||(c=c.Z,"*"!=c.getName()&&(this.Q={name:c.getName(),K:null}))}}u(Cc,L);function Ec(){L.call(this,4)}u(Ec,L);Ec.prototype.evaluate=function(a){var b=new J;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Ec.prototype.toString=aa("Root Helper Expression");function Fc(){L.call(this,4)}u(Fc,L);Fc.prototype.evaluate=function(a){var b=new J;b.add(a.g);return b}; +Fc.prototype.toString=aa("Context Helper Expression"); +Cc.prototype.evaluate=function(a){var b=this.ma.evaluate(a);if(!(b instanceof J))throw Error("Filter expression must evaluate to nodeset.");a=this.R;for(var c=0,d=a.length;c<d&&b.t();c++){var e=a[c],f=kc(b,e.A.J),g;if(e.h()||e.A!=Gc)if(e.h()||e.A!=Hc)for(g=f.next(),b=e.evaluate(new Pb(g));null!=(g=f.next());)g=e.evaluate(new Pb(g)),b=hc(b,g);else g=f.next(),b=e.evaluate(new Pb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Pb(g))}}return b}; +Cc.prototype.toString=function(){var a;a="Path Expression:"+M(this.ma);if(this.R.length){var b=sa(this.R,function(a,b){return a+M(b)},"Steps:");a+=M(b)}return a};function Ic(a,b){this.f=a;this.J=!!b}function vc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=kc(b),f=b.t(),g,k=0;g=e.next();k++){var r=a.J?f-k:k+1;g=d.evaluate(new Pb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof J)r=0<g.t();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Ic.prototype.B=function(){return 0<this.f.length?this.f[0].B():null}; +Ic.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Ic.prototype.t=function(){return this.f.length};Ic.prototype.toString=function(){return sa(this.f,function(a,b){return a+M(b)},"Predicates:")};function Jc(a,b,c,d){L.call(this,4);this.A=a;this.Z=b;this.f=c||new Ic([]);this.ba=!!d;b=this.f.B();a.Ma&&b&&(a=b.name,a=Qb?a.toLowerCase():a,this.Q={name:a,K:b.K});this.w=this.f.h()}u(Jc,L); +Jc.prototype.evaluate=function(a){var b=a.g,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.K?O(c.K,a):null,f=1);if(this.ba)if(this.h()||this.A!=Kc)if(a=kc((new Jc(Lc,new K("node"))).evaluate(a)),b=a.next())for(c=this.s(b,d,e,f);null!=(b=a.next());)c=hc(c,this.s(b,d,e,f));else c=new J;else c=Zb(this.Z,b,d,e),c=vc(this.f,c,f);else c=this.s(a.g,d,e,f);return c};Jc.prototype.s=function(a,b,c,d){a=this.A.V(this.Z,a,b,c);return a=vc(this.f,a,d)}; +Jc.prototype.toString=function(){var a;a="Step:"+M("Operator: "+(this.ba?"//":"/"));this.A.p&&(a+=M("Axis: "+this.A));a+=M(this.Z);if(this.f.t()){var b=sa(this.f.f,function(a,b){return a+M(b)},"Predicates:");a+=M(b)}return a};function Mc(a,b,c,d){this.p=a;this.V=b;this.J=c;this.Ma=d}Mc.prototype.toString=h("p");var Nc={};function R(a,b,c,d){if(Nc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Mc(a,b,c,!!d);return Nc[a]=b} +R("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);R("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Dc=R("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&Qb)return c.add(new Sb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof K&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Qb?g.nodeValue&&c.add(Tb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Qb?g.nodeValue&&c.add(Tb(b,g,b.sourceIndex)):c.add(g));return c},!1),Kc=R("child",function(a,b,c,d,e){return(Qb?ec:fc).call(null,a,b,t(c)?c:null,t(d)?d:null,e||new J)}, +!1,!0);R("descendant",Zb,!1,!0);var Lc=R("descendant-or-self",function(a,b,c,d){var e=new J;Yb(b,c,d)&&a.matches(b)&&e.add(b);return Zb(a,b,c,d,e)},!1,!0),Gc=R("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)Yb(f,c,d)&&a.matches(f)&&e.add(f),e=Zb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);R("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);R("namespace",function(){return new J},!1); +var Oc=R("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Hc=R("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var s=0,z=r.length;s<z;s++)b=r[s],Yb(b,c,d)&&a.matches(b)&&e.add(b),e=Zb(a,b,c,d,e)}return e},!0,!0); +R("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Pc=R("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},!1);function Qc(a){L.call(this,1);this.la=a;this.w=a.h();this.m=a.m}u(Qc,L);Qc.prototype.evaluate=function(a){return-N(this.la,a)};Qc.prototype.toString=function(){return"Unary Expression: -"+M(this.la)};function Rc(a){L.call(this,4);this.X=a;mc(this,ta(this.X,function(a){return a.h()}));nc(this,ta(this.X,function(a){return a.m}))}u(Rc,L);Rc.prototype.evaluate=function(a){var b=new J;w(this.X,function(c){c=c.evaluate(a);if(!(c instanceof J))throw Error("Path expression must evaluate to NodeSet.");b=hc(b,c)});return b};Rc.prototype.toString=function(){return sa(this.X,function(a,b){return a+M(b)},"Union Expression:")};function Sc(a,b){this.a=a;this.Ga=b}function Tc(a){for(var b,c=[];;){S(a,"Missing right hand side of binary expression.");b=Uc(a);var d=a.a.next();if(!d)break;var e=(d=tc[d]||null)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new pc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new pc(c.pop(),c.pop(),b);return b}function S(a,b){if(a.a.empty())throw Error(b);}function Vc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Wc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Xc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Ac(a)}function Yc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new bc(b);var d=b.substring(0,c);a=a.Ga(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new bc(b,a)} +function Zc(a){var b,c=[],d;if("/"==H(a.a)||"//"==H(a.a)){b=a.a.next();d=H(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Ec;d=new Ec;S(a,"Missing next location step.");b=$c(a,b);c.push(b)}else{a:{b=H(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Tc(a);S(a,'unclosed "("');Vc(a,")");break;case '"':case "'":b=Xc(a);break;default:if(isNaN(+b))if(!zc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==H(a.a,1)){b=a.a.next();b=yc[b]||null;a.a.next();for(d=[];")"!=H(a.a);){S(a,"Missing function argument list.");d.push(Tc(a));if(","!=H(a.a))break;a.a.next()}S(a,"Unclosed function argument list.");Wc(a);b=new wc(b,d)}else{b=null;break a}else b=new Bc(+a.a.next())}"["==H(a.a)&&(d=new Ic(ad(a)),b=new uc(b,d))}if(b)if("/"==H(a.a)||"//"==H(a.a))d=b;else return b;else b=$c(a,"/"),d=new Fc,c.push(b)}for(;"/"==H(a.a)||"//"==H(a.a);)b=a.a.next(),S(a,"Missing next location step."),b=$c(a,b),c.push(b); +return new Cc(d,c)} +function $c(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==H(a.a))return d=new Jc(Pc,new K("node")),a.a.next(),d;if(".."==H(a.a))return d=new Jc(Oc,new K("node")),a.a.next(),d;var f;if("@"==H(a.a))f=Dc,a.a.next(),S(a,"Missing attribute name");else if("::"==H(a.a,1)){if(!/(?![0-9])[\w]/.test(H(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Nc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();S(a,"Missing node name")}else f=Kc; +c=H(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==H(a.a,1)){if(!zc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!zc(c))throw Error("Invalid type name: "+c);Vc(a,"(");S(a,"Bad nodetype");e=H(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Xc(a);S(a,"Bad nodetype");Wc(a);c=new K(c,g)}else c=Yc(a);else if("*"==c)c=Yc(a);else throw Error("Bad token: "+a.a.next());e=new Ic(ad(a),f.J);return d||new Jc(f,c,e,"//"==b)} +function ad(a){for(var b=[];"["==H(a.a);){a.a.next();S(a,"Missing predicate expression.");var c=Tc(a);b.push(c);S(a,"Unclosed predicate expression.");Vc(a,"]")}return b}function Uc(a){if("-"==H(a.a))return a.a.next(),new Qc(Uc(a));var b=Zc(a);if("|"!=H(a.a))a=b;else{for(b=[b];"|"==a.a.next();)S(a,"Missing next union location path."),b.push(Zc(a));a.a.back();a=new Rc(b)}return a};function bd(a){switch(a.nodeType){case 1:return ka(cd,a);case 9:return bd(a.documentElement);case 2:return a.ownerElement?bd(a.ownerElement):dd;case 11:case 10:case 6:case 12:return dd;default:return a.parentNode?bd(a.parentNode):dd}}function dd(){return null}function cd(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?cd(a.parentNode,b):null};function ed(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Vb(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=aa(null);var d=Tc(new Sc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Pb(a));return new T(c,b)}} +function T(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;var c;switch(b){case 2:this.stringValue=a instanceof J?jc(a):""+a;break;case 1:this.numberValue=a instanceof J?+jc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.t():!!a;break;case 4:case 5:case 6:case 7:var d= +kc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Sb?e.g:e);this.snapshotLength=a.t();this.invalidIteratorState=!1;break;case 8:case 9:d=ic(a);this.singleNodeValue=d instanceof Sb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}T.ANY_TYPE=0;T.NUMBER_TYPE=1;T.STRING_TYPE=2;T.BOOLEAN_TYPE=3;T.UNORDERED_NODE_ITERATOR_TYPE=4;T.ORDERED_NODE_ITERATOR_TYPE=5;T.UNORDERED_NODE_SNAPSHOT_TYPE=6;T.ORDERED_NODE_SNAPSHOT_TYPE=7;T.ANY_UNORDERED_NODE_TYPE=8;T.FIRST_ORDERED_NODE_TYPE=9;function fd(a){this.lookupNamespaceURI=bd(a)} +function gd(a){a=a||n;var b=a.document;b.evaluate||(a.XPathResult=T,b.evaluate=function(a,b,e,f){return(new ed(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new ed(a,b)},b.createNSResolver=function(a){return new fd(a)})};var U={};U.ya=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();U.s=function(a,b,c){var d=G(a);(A||Mb)&&gd(F(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.ya;return A&&!eb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!B||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +U.aa=function(a,b){if(!a||1!=a.nodeType)throw new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};U.La=function(a,b){var c=function(){var c=U.s(b,a,9);return c?(c=c.singleNodeValue,y?c:c||null):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||U.aa(c,a);return c}; +U.Qa=function(a,b){var c=function(){var c=U.s(b,a,7);if(c){var e=c.snapshotLength;y&&!p(e)&&U.aa(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){U.aa(b,a)});return c};function hd(a){return(a=a.exec(Na()))?a[1]:""}var id=function(){if(Ib)return hd(/Firefox\/([0-9.]+)/);if(A||y)return Va;if(Nb)return hd(/Chrome\/([0-9.]+)/);if(Ob)return hd(/Version\/([0-9.]+)/);if(Kb||Lb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Mb)return(a=hd(/Android\s+([0-9.]+)/))?a:hd(/Version\/([0-9.]+)/);if(Jb)return hd(/Camino\/([0-9.]+)/)}return""}();var jd,kd;function V(a){return ld?jd(a):A?0<=na(fb,a):eb(a)}function md(a){return ld?kd(a):Mb?0<=na(nd,a):0<=na(id,a)} +var ld=function(){if(!B)return!1;var a=n.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;jd=function(a){return 0<=d.Aa(e,""+a)};kd=function(a){return 0<=d.Aa(f,""+a)};return!0}(),od=Lb||Kb,pd;if(Mb){var qd=/Android\s+([0-9\.]+)/.exec(Na());pd=qd?qd[1]:"0"}else pd="0"; +var nd=pd,rd=A&&!C(8),sd=A&&!C(9),td=C(10),ud=A&&!C(10);Mb&&md(2.3);Mb&&md(4);Ob&&md(6);var vd=A&&-1!=Na().indexOf("IEMobile");function wd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}m=wd.prototype;m.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};m.contains=function(a){return this&&a?a instanceof wd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +m.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};m.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};m.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function W(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}m=W.prototype;m.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};m.contains=function(a){return a instanceof W?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +m.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function xd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function yd(a){a=a?G(a):document;var b;(b=!A)||(b=C(9))||(b=a?new yb(G(a)):hb||(hb=new yb),b=ob(b.F));return b?a.documentElement:a.body} +function zd(a){var b=a.offsetWidth,c=a.offsetHeight,d=Qa&&!b&&!c;if((!p(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}A&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new ib(e.right-e.left,e.bottom-e.top)}return new ib(b,c)}var Ad={thin:2,medium:4,thick:6}; +function Bd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Ad)d=Ad[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Cd(a){var b;a:{a=G(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return A&&b&&"undefined"===typeof b.nodeType?null:b}function X(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Dd(a){return Ed(a,!0)&&Fd(a)&&!(A||y||B&&!V("1.9.2")?0:"none"==Y(a,"pointer-events"))}function Gd(a){return X(a,"OPTION")?!0:X(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Hd(a){if(!Gd(a))throw new x(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Id(a,b)}function Id(a,b){var c;if(c=rd)if(c="value"==b)if(c=X(a,"OPTION"))c=null===Jd(a);c?(c=[],wb(a,c,!1),c=c.join("")):c=a[b];return c}var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Ld(a){var b=[];w(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return y?b.replace(/\w+:;/g,""):b}function Jd(a){var b;b="value";return"style"==b?Ld(a.style.cssText):rd&&"value"==b&&X(a,"INPUT")?a.value:sd&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Fd(a){var b=a.tagName.toUpperCase();return wa(Md,b)?Id(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Fd(a.parentNode):!xb(a,function(a){var b=a.parentNode;if(b&&X(b,"FIELDSET")&&Id(b,"disabled")){if(!X(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:pb(a.previousSibling);)if(X(a,"LEGEND"))return!0}return!1},!0):!0} +function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return X(a)?a:null} +function Y(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=sd?"styleFloat":"cssFloat";var d=xd(a,c)||Od(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!p(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?p(d)?d:null:(c=Nd(a))?Od(c,b):null} +function Ed(a,b){function c(a){if("none"==Y(a,"display"))return!1;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?!0:X(a,"PATH")&&(0<b.height||0<b.width)?(a=Y(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=Y(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==mb||X(a)&&d(a)})}function e(a){return Qd(a)==Rd&&ua(a.childNodes,function(a){return!X(a)||e(a)})}if(!X(a))throw Error("Argument to isShown must be of type Element");if(X(a,"OPTION")||X(a,"OPTGROUP")){var f= +xb(a,function(a){return X(a,"SELECT")});return!!f&&Ed(f,!0)}return(f=Sd(a))?!!f.na&&0<f.rect.width&&0<f.rect.height&&Ed(f.na,b):X(a,"INPUT")&&"hidden"==a.type.toLowerCase()||X(a,"NOSCRIPT")||"hidden"==Y(a,"visibility")||!c(a)||!b&&0==Td(a)||!d(a)?!1:!e(a)}var Rd="hidden"; +function Qd(a,b){function c(a){var b=Y(a,"position");if("fixed"==b)return z=!0,a==k?null:k;for(a=Nd(a);a&&a!=k&&(0==Y(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==Y(a,"position"));)a=Nd(a);return a}function d(a){var b=a;if("visible"==s)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:Y(b,"overflow-x"),y:Y(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new yb(g)).F;a=!Qa&&ob(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=A&&eb("10")&&b.pageYOffset!=a.scrollTop?new E(a.scrollLeft,a.scrollTop):new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new E(a.scrollLeft,a.scrollTop);return a}for(var f=Ud(a,b),g=G(a),k=g.documentElement,r=g.body,s=Y(k,"overflow"),z,q=c(a);q;q=c(q)){var l=d(q);if("visible"!=l.x||"visible"!=l.y){var v=Pd(q);if(0==v.width||0==v.height)return Rd;var D=f.right<v.left,ba=f.bottom<v.top;if(D&&"hidden"==l.x||ba&&"hidden"== +l.y)return Rd;if(D&&"visible"!=l.x||ba&&"visible"!=l.y){D=e(q);ba=f.bottom<v.top-D.y;if(f.right<v.left-D.x&&"visible"!=l.x||ba&&"visible"!=l.x)return Rd;f=Qd(q);return f==Rd?Rd:"scroll"}D=f.left>=v.left+v.width;v=f.top>=v.top+v.height;if(D&&"hidden"==l.x||v&&"hidden"==l.y)return Rd;if(D&&"visible"!=l.x||v&&"visible"!=l.y){if(z&&(l=e(q),f.left>=k.scrollWidth-l.x||f.right>=k.scrollHeight-l.y))return Rd;f=Qd(q);return f==Rd?Rd:"scroll"}}}return"none"}var Vd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Pd(a){function b(a){var c=F(G(a)).getComputedStyle(a,null).MozTransform.match(Vd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),z=parseFloat(c[3]),q=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),v=f.left+f.width,D=f.top+f.height,ba=f.left*d,d=v*d,Wa=f.left*e,e=v*e,Xa=f.top*z,z=D*z,Ya=f.top*q,v=D*q,D=ba+Xa+l,q=Wa+Ya+c,Xa=d+Xa+l,Ya=e+Ya+c,ba=ba+z+l,Wa=Wa+v+c,l=d+z+l,c=e+v+c;f.left=Math.min(D,Xa,ba,l);f.top=Math.min(q,Ya,Wa,c);l=Math.max(D,Xa,ba,l);c=Math.max(q,Ya,Wa,c);f.width=l- +f.left;f.height=c-f.top}(a=Nd(a))&&b(a)}var c=Sd(a);if(c)return c.rect;if(X(a,"HTML"))return c=G(a),a=nb(F(c)||window),new W(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new W(0,0,0,0)}var f=new W(d.left,d.top,d.right-d.left,d.bottom-d.top);A&&a.ownerDocument.body&&(c=G(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);y&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));B&&!V(12)&&b(a);return f} +function Sd(a){var b=X(a,"MAP");if(!b&&!X(a,"AREA"))return null;var c=b?a:X(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=U.La('/descendant::*[@usemap = "#'+c.name+'"]',G(c)))&&(e=Pd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Wd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new W(a+e.left,b+e.top,c,f)}return{na:d,rect:e||new W(0,0,0,0)}} +function Wd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new W(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new W(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 W(b,c,d-b,e-c)}return new W(0,0,0,0)} +function Ud(a,b){var c;c=Pd(a);c=new wd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof W?b:new W(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Td(a){if(ud){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 Xd(a)}function Xd(a){var b=1,c=Y(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Xd(a));return b};function Yd(a,b){this.d=ma.document.documentElement;this.n=null;var c=Cd(this.d);c&&Zd(this,c);this.D=a||new $d;this.ca=b||new ae}Yd.prototype.I=h("d");function Zd(a,b){a.d=b;a.n=X(b,"OPTION")?xb(b,function(a){return X(a,"SELECT")}):null} +Yd.prototype.o=function(a,b,c,d,e,f,g){if(!f&&!Dd(this.d))return!1;if(d&&be!=a&&ce!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=de&&a!=ee&&g in fe?c=fe[g]:this.n&&(c=ge(this,a));return c?this.ca.o(c,a,b):!0}; +Yd.prototype.da=function(a,b,c,d,e){function f(b,c){var d={identifier:b,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};g.changedTouches.push(d);if(a==he||a==ie)g.touches.push(d),g.targetTouches.push(d)}var g={touches:[],targetTouches:[],changedTouches:[],altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),relatedTarget:null,scale:0,rotation:0};f(b,c);p(d)&&f(d,e);return this.ca.da(this.d,a,g)}; +Yd.prototype.q=function(a,b,c,d,e,f,g,k){if(!k&&!Dd(this.d))return!1;if(g&&je!=a&&ke!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ka:0,rotation:0,pointerId:d,Na:0,Oa:0,pointerType:e,Ba:f};c=this.n?ge(this,a):this.d;fe[d]&&(c=fe[d]);d=F(G(this.d));var r;d&&a==le&&(r=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){fe[a]= +this});a=c?this.ca.q(c,a,b):!0;r&&(d.Element.prototype.msSetPointerCapture=r);return a};function ge(a,b){if(A)switch(b){case be:case je:return null;case me:case ne:case oe:return a.n.multiple?a.n:null;default:return a.n}if(y)switch(b){case me:case be:return a.n.multiple?a.d:null;default:return a.d}if(Qa)switch(b){case de:case pe:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:null}return a.d} +function qe(a,b,c){if(Dd(a.d)){var d=null,e=null;if(!re)for(var f=a.d;f;f=f.parentNode)if(X(f,"A")){d=f;break}else{var g;a:{if(X(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=!0;break a}if(X(f,"BUTTON")&&(g=f.type.toLowerCase(),"submit"==g)){g=!0;break a}g=!1}if(g){e=f;break}}g=(f=!a.n&&Gd(a.d))&&Hd(a.d);A&&e?e.click():a.o(de,b,0,null,0,!1,c)&&(d&&se(d)?(a=d,b=a.href,c=F(G(a)),A&&!V(8)&&(b=te(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):!f||(B||Qa||g&&"radio"==a.d.type.toLowerCase())|| +(a.d.checked=!g,y&&!V(11)&&ue(a.d,ve)))}}function we(a){a=a.n||a.d;var b=Cd(a);if(a!=b){if(b&&(fa(b.blur)||A&&ga(b.blur))){if(!X(b,"BODY"))try{b.blur()}catch(c){if(!A||"Unspecified error."!=c.message)throw c;}A&&!V(8)&&F(G(a)).focus()}if(fa(a.focus)||A&&ga(a.focus))y&&V(11)&&!Ed(a)?ue(a,xe):a.focus()}}var re=Qa||y||ld&&md(3.6); +function se(a){if(re||!a.href)return!1;if(!ld)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=F(G(a)),c=b.location.href;a=te(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function ye(a){if(a.n&&Dd(a.d)){var b=a.n,c=Hd(a.d);if(!c||b.multiple)a.d.selected=!c,(!Qa||!b.multiple||Nb&&md(28)||Mb&&md(4))&&ue(b,ve)}}var ze=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function te(a,b){var c=b.match(ze);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function $d(){this.Ja=0}$d.prototype.l=function(a){return 0!=(this.Ja&a)};var fe={};function ae(){}ae.prototype.o=function(a,b,c){return ue(a,b,c)};ae.prototype.da=function(a,b,c){return ue(a,b,c)}; +ae.prototype.q=function(a,b,c){return ue(a,b,c)};var Ae=!(A&&!V(10))&&!y,Be=Mb?!md(4):!od,Ce=A&&ma.navigator.msPointerEnabled;function De(a,b,c){this.e=a;this.L=b;this.M=c}De.prototype.create=function(a){a=G(a);sd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.L,this.M));return a};De.prototype.toString=h("e");function Z(a,b,c){De.call(this,a,b,c)}u(Z,De); +Z.prototype.create=function(a,b){if(!B&&this==Ee)throw new x(9,"Browser does not support a mouse pixel scroll event.");var c=G(a),d;if(sd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ce||this==be)if(Object.defineProperty){var e=this==ce;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==Fe&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=F(c);d=c.createEvent("MouseEvents");var f=1;this==Fe&&(B||(d.wheelDelta=b.wheelDelta),B||y)&&(f=b.wheelDelta/-40);B&&this==Ee&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.L,this.M,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=zb(a?new yb(G(a)):hb||(hb=new yb)), +c=yd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function Ge(a,b,c){De.call(this,a,b,c)}u(Ge,De); +Ge.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!Ae)throw new x(9,"Browser does not support firing touch events.");var e=G(a),f=F(e),g=Be?d(b.changedTouches): +c(b.changedTouches),k=b.touches==b.changedTouches?g:Be?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:Be?d(b.targetTouches):c(b.targetTouches),s;Be?(s=e.createEvent("MouseEvents"),s.initMouseEvent(this.e,this.L,this.M,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),s.touches=k,s.targetTouches=r,s.changedTouches=g,s.scale=b.scale,s.rotation=b.rotation):(s=e.createEvent("TouchEvent"),Mb?s.initTouchEvent(k,r,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, +b.altKey,b.shiftKey,b.metaKey):s.initTouchEvent(this.e,this.L,this.M,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),s.relatedTarget=b.relatedTarget);return s};function He(a,b,c){De.call(this,a,b,c)}u(He,De); +He.prototype.create=function(a,b){if(!Ce)throw new x(9,"Browser does not support MSPointer events.");var c=G(a),d=F(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.L,this.M,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ka,b.rotation,b.Na,b.Oa,b.pointerId,b.pointerType,0,b.Ba);return c}; +var ve=new De("change",!0,!1),xe=new De("focus",!1,!1),de=new Z("click",!0,!0),me=new Z("contextmenu",!0,!0),ee=new Z("mousedown",!0,!0),ne=new Z("mousemove",!0,!1),ce=new Z("mouseout",!0,!0),be=new Z("mouseover",!0,!0),pe=new Z("mouseup",!0,!0),Fe=new Z(B?"DOMMouseScroll":"mousewheel",!0,!0),Ee=new Z("MozMousePixelScroll",!0,!0),Ie=new Ge("touchend",!0,!0),ie=new Ge("touchmove",!0,!0),he=new Ge("touchstart",!0,!0),Je=new He("MSGotPointerCapture",!0,!1),Ke=new He("MSLostPointerCapture",!0,!1),Le= +new He("MSPointerCancel",!0,!0),le=new He("MSPointerDown",!0,!0),oe=new He("MSPointerMove",!0,!0),je=new He("MSPointerOver",!0,!0),ke=new He("MSPointerOut",!0,!0),Me=new He("MSPointerUp",!0,!0);function ue(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return sd?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function Ne(a,b){this.C={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Ne)for(d=Oe(a),Pe(a),e=[],c=0;c<a.i.length;c++)e.push(a.C[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}m=Ne.prototype;m.N=0;m.xa=0;function Oe(a){Pe(a);return a.i.concat()} +m.remove=function(a){return Object.prototype.hasOwnProperty.call(this.C,a)?(delete this.C[a],this.N--,this.xa++,this.i.length>2*this.N&&Pe(this),!0):!1};function Pe(a){if(a.N!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.C,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.N!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +m.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.C,a)?this.C[a]:b};m.set=function(a,b){Object.prototype.hasOwnProperty.call(this.C,a)||(this.N++,this.i.push(a),this.xa++);this.C[a]=b};var Qe={};function $(a,b,c){ga(a)&&(a=B?a.b:y?a.opera:a.c);a=new Re(a,b,c);!b||b in Qe&&!c||(Qe[b]={key:a,shift:!1},c&&(Qe[c]={key:a,shift:!0}));return a}function Re(a,b,c){this.code=a;this.za=b||null;this.Sa=c||this.za}$(8);$(9);$(13);var Se=$(16),Te=$(17),Ue=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); +$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Ve=$(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +$(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});$(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Ta?56:42},"*"); +$({b:107,c:107,opera:Ta?61:43},"+");$({b:109,c:109,opera:Ta?109:45},"-");$({b:110,c:110,opera:Ta?190:78},".");$({b:111,c:111,opera:Ta?191:47},"/");$(Ta&&y?null:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var We=new Ne; +We.set(1,Se);We.set(2,Te);We.set(4,Ue);We.set(8,Ve);(function(a){var b=new Ne;w(Oe(a),function(c){b.set(a.get(c).code,c)});return b})(We);B&&V(12);function Xe(){Yd.call(this);this.v=new E(0,0);this.U=new E(0,0)}u(Xe,Yd);m=Xe.prototype;m.O=!1;m.T=!1;m.H=0;m.S=0;m.Pa=2; +m.move=function(a,b,c){var d=this.I();this.l()&&!td||Zd(this,a);var e=Pd(a);this.v.x=b.x+e.left;this.v.y=b.y+e.top;p(c)&&(this.U.x=c.x+e.left,this.U.y=c.y+e.top);this.l()&&(td?this.T||(a!=d&&(this.O=!0),Ze(a)?$e(this,af):(this.q(ke,b,-1,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.o(ce,b,0),this.q(Le,b,0,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.T=!0,fe={})):(this.O=!0,Ye(this,ie)))};m.l=function(){return!!this.H}; +function Ye(a,b){if(!a.l())throw new x(13,"Should never fire event when touchscreen is not pressed.");var c,d;a.S&&(c=a.S,d=a.U);a.da(b,a.H,a.v,c,d)}function $e(a,b){b(a,a.I(),a.v,a.H,!0);a.S&&Ze(a.I())&&b(a,a.I(),a.U,a.S,!1)}function bf(a,b,c,d,e){a.o(ne,c,0);a.q(je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(be,c,0);a.q(le,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ee,c,0)&&(Gd(b)&&a.q(Je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e),we(a))} +function cf(a,b,c,d,e){a.q(Me,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(pe,c,0,null,0,!1,d);a.O||(ye(a),vd&&X(b,"OPTION")||qe(a,a.v,d));Gd(b)&&a.q(Ke,new E(0,0),0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!1);a.q(ke,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ce,c,0,null,0,!1,d)}function af(a,b,c,d,e){a.q(oe,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ne,c,0,null,0,!1,d)} +function Ze(a){if(!td)throw Error("hasMsTouchActionsEnable should only be called from IE 10");if("none"==Y(a,"ms-touch-action"))return!0;a=Nd(a);return!!a&&Ze(a)};function df(a,b){this.x=a;this.y=b}u(df,E);df.prototype.scale=E.prototype.scale;df.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ef(a,b,c,d,e,f){if(!Ed(a,!0))throw new x(11,"Element is not currently visible and may not be manipulated");b:{var g=e||void 0;if("scroll"==Qd(a,g)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Qd(a,g)))break b;for(var k=Ud(a,g),r=Nd(a);r;r=Nd(r)){var s=r,z=Pd(s),q;var l=s;if(A&&!C(9)){var v=Bd(l,"borderLeft");q=Bd(l,"borderRight");var D=Bd(l,"borderTop"),l=Bd(l,"borderBottom");q=new wd(D,q,l,v)}else v=xd(l,"borderLeftWidth"),q=xd(l,"borderRightWidth"),D=xd(l,"borderTopWidth"),l=xd(l, +"borderBottomWidth"),q=new wd(parseFloat(D),parseFloat(q),parseFloat(l),parseFloat(v));v=k.left-z.left-q.left;z=k.top-z.top-q.top;q=s.clientHeight+k.top-k.bottom;s.scrollLeft+=Math.min(v,Math.max(v-(s.clientWidth+k.left-k.right),0));s.scrollTop+=Math.min(z,Math.max(z-q,0))}Qd(a,g)}}e?e=new df(e.x,e.y):(e=ff(a),e=new df(e.width/2,e.height/2));f=f||new Xe;g=Pd(a);f.move(a,e);if(f.l())throw new x(13,"Cannot press touchscreen when already pressed.");f.O=!1;f.H=f.Pa++;td?$e(f,bf):Ye(f,he);d=p(d)?d:2;if(1> +d)throw new x(13,"There must be at least one step as part of a swipe.");for(k=1;k<=d;k++)r=Math.floor(k*b/d),s=Math.floor(k*c/d),z=Pd(a),f.move(a,new E(e.x+g.left+r-z.left,e.y+g.top+s-z.top));if(!f.l())throw new x(13,"Cannot release touchscreen when not already pressed.");td?f.T||$e(f,cf):(Ye(f,Ie),f.O||(f.o(ne,f.v,0),f.o(ee,f.v,0)&&we(f),ye(f),f.o(pe,f.v,0),vd&&X(f.I(),"OPTION")||qe(f,f.v)));fe={};f.H=0;f.S=0;f.T=!1} +function ff(a){var b;if("none"!=(xd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=zd(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=zd(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:ff(a.offsetParent)};function gf(){this.Y=void 0} +function hf(a,b,c){switch(typeof b){case "string":jf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],hf(a,a.Y?a.Y.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +jf(f,c),c.push(":"),hf(a,a.Y?a.Y.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var kf={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},lf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function jf(a,b){b.push('"',a.replace(lf,function(a){if(a in kf)return kf[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return kf[a]=e+b.toString(16)}),'"')};Qa||y||B&&V(3.5)||A&&V(8);function mf(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,mf);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=nf(a);return b}if("document"in a)return b={},b.WINDOW=nf(a),b;if(da(a))return ra(a,mf);a=jb(a,function(a,b){return ea(b)||t(b)});return kb(a,mf);default:return null}} +function of(a,b){return"array"==ca(a)?ra(a,function(a){return of(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?pf(a.ELEMENT,b):"WINDOW"in a?pf(a.WINDOW,b):kb(a,function(a){return of(a,b)}):a}function qf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ha=la());b.ha||(b.ha=la());return b}function nf(a){var b=qf(a.ownerDocument),c=lb(b,function(b){return b==a});c||(c=":wdc:"+b.ha++,b[c]=a);return c} +function pf(a,b){a=decodeURIComponent(a);var c=b||document,d=qf(c);if(!(a in d))throw new x(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new x(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new x(10,"Element is no longer attached to the DOM");};function rf(a,b,c,d){a=[a,b,c,d];b=ef;var e;try{b=t(b)?new ma.Function(b):ma==window?b:new ma.Function("return ("+b+").apply(null,arguments);");var f=of(a,ma.document),g=b.apply(null,f);e={status:0,value:mf(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}f=[];hf(new gf,e,f);return f.join("")}var sf=["_"],tf=n;sf[0]in tf||!tf.execScript||tf.execScript("var "+sf[0]);for(var uf;sf.length&&(uf=sf.shift());)sf.length||void 0===rf?tf=tf[uf]?tf[uf]:tf[uf]={}:tf[uf]=rf;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/tap.js b/src/ghostdriver/third_party/webdriver-atoms/tap.js index 1fc29b099..15227bbf4 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/tap.js +++ b/src/ghostdriver/third_party/webdriver-atoms/tap.js @@ -1,115 +1,127 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function q(a){return function(){return this[a]}}function ba(a){return function(){return a}}var r=this; +function(){return function(){function h(a){return function(){return this[a]}}function ba(a){return function(){return a}}var l,n=this; function ca(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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==k}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function ea(a){return"function"==ca(a)}function fa(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ga=Date.now||function(){return+new Date}; -function v(a,b){function c(){}c.prototype=b.prototype;a.Ka=b.prototype;a.prototype=new c};var ha=window;function ia(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var p=d[g]||"",x=e[g]||"",t=RegExp("(\\d*)(\\D*)","g"),Cb=RegExp("(\\d*)(\\D*)","g");do{var $=t.exec(p)||["","",""],aa=Cb.exec(x)||["","",""];if(0==$[0].length&&0==aa[0].length)break;c=((0==$[1].length?0:parseInt($[1],10))<(0==aa[1].length?0:parseInt(aa[1],10))?-1:(0==$[1].length?0:parseInt($[1],10))>(0== -aa[1].length?0:parseInt(aa[1],10))?1:0)||((0==$[2].length)<(0==aa[2].length)?-1:(0==$[2].length)>(0==aa[2].length)?1:0)||($[2]<aa[2]?-1:$[2]>aa[2]?1:0)}while(0==c)}return c}function ja(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ka=Array.prototype;function w(a,b){for(var c=a.length,d=u(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(k,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=u(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var p=f[g];b.call(k,p,g,a)&&(d[e++]=p)}return d}function ma(a,b){for(var c=a.length,d=Array(c),e=u(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function oa(a,b){for(var c=a.length,d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return n}function pa(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:u(a)?a.charAt(c):a[c]}function qa(a,b){var c;a:if(u(a))c=!u(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ra(a){return ka.concat.apply(ka,arguments)} -function sa(a,b,c){return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};var ta={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", +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function p(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)} +function ia(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)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)} +function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",m=e[g]||"",r=RegExp("(\\d*)(\\D*)","g"),y=RegExp("(\\d*)(\\D*)","g");do{var s=r.exec(k)||["","",""],q=y.exec(m)||["","",""];if(0==s[0].length&&0==q[0].length)break;c=((0==s[1].length?0:parseInt(s[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==s[1].length?0:parseInt(s[1],10))>(0==q[1].length? +0:parseInt(q[1],10))?1:0)||((0==s[2].length)<(0==q[2].length)?-1:(0==s[2].length)>(0==q[2].length)?1:0)||(s[2]<q[2]?-1:s[2]>q[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function v(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=t(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 ua(a,b){for(var c=a.length,d=t(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 va(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:t(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(t(a))c=t(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var ua="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),va=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function wa(a){xa.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(va,"#$1$1$2$2$3$3"));return a.toLowerCase()}var xa=/^#(?:[0-9a-f]{3}){1,2}$/i,ya=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a){var b=a.match(Aa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function y(a,b){this.code=a;this.state=Ca[a]||Da;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}v(y,Error); -var Da="unknown error",Ca={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ca[13]=Da;Ca[9]="unknown command";y.prototype.toString=function(){return this.name+": "+this.message};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return r.navigator?r.navigator.userAgent:m}Ha=Ga=Fa=Ea=n;var La;if(La=Ka()){var Ma=r.navigator;Ea=0==La.indexOf("Opera");Fa=!Ea&&-1!=La.indexOf("MSIE");Ga=!Ea&&-1!=La.indexOf("WebKit");Ha=!Ea&&!Ga&&"Gecko"==Ma.product}var z=Ea,A=Fa,B=Ha,C=Ga,Na,Oa=r.navigator;Na=Oa&&Oa.platform||"";Ia=-1!=Na.indexOf("Mac");Ja=-1!=Na.indexOf("Win");var Pa=-1!=Na.indexOf("Linux");function Qa(){var a=r.document;return a?a.documentMode:k}var Ra; -a:{var Sa="",Ta;if(z&&r.opera)var Ua=r.opera.version,Sa="function"==typeof Ua?Ua():Ua;else if(B?Ta=/rv\:([^\);]+)(\)|;)/:A?Ta=/MSIE\s+([^\);]+)(\)|;)/:C&&(Ta=/WebKit\/(\S+)/),Ta)var Va=Ta.exec(Ka()),Sa=Va?Va[1]:"";if(A){var Wa=Qa();if(Wa>parseFloat(Sa)){Ra=String(Wa);break a}}Ra=Sa}var Xa={};function Ya(a){return Xa[a]||(Xa[a]=0<=ia(Ra,a))}function D(a){return A&&Za>=a}var $a=r.document,Za=!$a||!A?k:Qa()||("CSS1Compat"==$a.compatMode?parseInt(Ra,10):5);var ab;!B&&!A||A&&D(9)||B&&Ya("1.9.1");A&&Ya("9");var bb=A||z||C;function E(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; -cb.prototype.scale=function(a){this.width*=a;this.height*=a;return this};function db(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function eb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function fb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var gb=3;function hb(a){return a?new ib(F(a)):ab||(ab=new ib)}function jb(a){var b=!C&&kb(a)?a.documentElement:a.body;a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function lb(a){return a?a.parentWindow||a.defaultView:window}function kb(a){return"CSS1Compat"==a.compatMode}function mb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function nb(a){if(bb)return a.parentElement;a=a.parentNode;return fa(a)&&1==a.nodeType?a:m} -function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!D(9)){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?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){var c=[];return tb(a,b,c,l)?c[0]:k} -function tb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||tb(a,b,c,d))return l;a=a.nextSibling}return n}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==gb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling} -function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function yb(a){try{return a&&a.activeElement}catch(b){}return m}function ib(a){this.C=a||r.document||document}function zb(a){return!C&&kb(a.C)?a.C.documentElement:a.C.body}ib.prototype.contains=ob;var Ab,Bb,Db,Eb,Fb,Gb,Hb;Hb=Gb=Fb=Eb=Db=Bb=Ab=n;var Ib=Ka();Ib&&(-1!=Ib.indexOf("Firefox")?Ab=l:-1!=Ib.indexOf("Camino")?Bb=l:-1!=Ib.indexOf("iPhone")||-1!=Ib.indexOf("iPod")?Db=l:-1!=Ib.indexOf("iPad")?Eb=l:-1!=Ib.indexOf("Android")?Fb=l:-1!=Ib.indexOf("Chrome")?Gb=l:-1!=Ib.indexOf("Safari")&&(Hb=l));var Jb=Ab,Kb=Bb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb,Pb=Hb;function Qb(a,b,c){this.g=a;this.za=b||1;this.p=c||1};var Rb=A&&!D(9),Sb=A&&!D(8);function Tb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ia=e;this.parentNode=b}function Ub(a,b,c){var d=Sb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Tb(b,a,b.nodeName,d,c)};function Vb(a){this.ba=a;this.Q=0}function Wb(a){a=a.match(Xb);for(var b=0;b<a.length;b++)Yb.test(a[b])&&a.splice(b,1);return new Vb(a)}var Xb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Yb=/^\s/;function G(a,b){return a.ba[a.Q+(b||0)]}Vb.prototype.next=function(){return this.ba[this.Q++]};Vb.prototype.back=function(){this.Q--};Vb.prototype.empty=function(){return this.ba.length<=this.Q};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Rb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Rb&&"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} -function Zb(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}Sb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function $b(a,b,c,d,e){return(Rb?ac:bc).call(m,a,b,u(c)?c:m,u(d)?d:m,e||new I)} -function ac(a,b,c,d,e){if(a instanceof cc||8==a.e||c&&a.e===m){var f=b.all;if(!f)return e;a=dc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],p=0;b=f[p++];)Zb(b,c,d)&&g.push(b);f=g}for(p=0;b=f[p++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ec(a,b,c,d,e);return e} -function bc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof J?ec(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){Zb(a,c,d)&&e.add(a)}));return e} -function fc(a,b,c,d,e){var f;if((a instanceof cc||8==a.e||c&&a.e===m)&&(f=b.childNodes)){var g=dc(a);if("*"!=g&&(f=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return Zb(a,c,d)}));w(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return gc(a,b,c,d,e)}function gc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b);return e} -function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b),ec(a,b,c,d,e)}function dc(a){if(a instanceof J){if(8==a.e)return"!";if(a.e===m)return"*"}return a.getName()};function I(){this.p=this.k=m;this.J=0}function hc(a){this.r=a;this.next=this.B=m}function ic(a,b){if(a.k){if(!b.k)return a}else return b;for(var c=a.k,d=b.k,e=m,f=m,g=0;c&&d;)c.r==d.r||c.r instanceof Tb&&d.r instanceof Tb&&c.r.g==d.r.g?(f=c,c=c.next,d=d.next):0<pb(c.r,d.r)?(f=d,d=d.next):(f=c,c=c.next),(f.B=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.B=e,e=e.next=f,g++,f=f.next;a.p=e;a.J=g;return a} -I.prototype.unshift=function(a){a=new hc(a);a.next=this.k;this.p?this.k.B=a:this.k=this.p=a;this.k=a;this.J++};I.prototype.add=function(a){a=new hc(a);a.B=this.p;this.k?this.p.next=a:this.k=this.p=a;this.p=a;this.J++};function jc(a){return(a=a.k)?a.r:m}I.prototype.s=q("J");function kc(a){return(a=jc(a))?H(a):""}function lc(a,b){return new mc(a,!!b)}function mc(a,b){this.wa=a;this.ca=(this.D=b)?a.p:a.k;this.Y=m} -mc.prototype.next=function(){var a=this.ca;if(a==m)return m;var b=this.Y=a;this.ca=this.D?a.B:a.next;return b.r};mc.prototype.remove=function(){var a=this.wa,b=this.Y;b||h(Error("Next must be called at least once before remove."));var c=b.B,b=b.next;c?c.next=b:a.k=b;b?b.B=c:a.p=c;a.J--;this.Y=m};function K(a){this.j=a;this.m=this.t=n;this.K=m}K.prototype.h=q("t");function nc(a,b){a.t=b}function oc(a,b){a.m=b}K.prototype.w=q("K");function L(a,b){var c=a.evaluate(b);return c instanceof I?+kc(c):+c}function M(a,b){var c=a.evaluate(b);return c instanceof I?kc(c):""+c}function pc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.s():!!c};function qc(a,b,c){K.call(this,a.j);this.aa=a;this.ga=b;this.la=c;this.t=b.h()||c.h();this.m=b.m||c.m;this.aa==rc&&(!c.m&&!c.h()&&4!=c.j&&0!=c.j&&b.w()?this.K={name:b.w().name,F:c}:!b.m&&(!b.h()&&4!=b.j&&0!=b.j&&c.w())&&(this.K={name:c.w().name,F:b}))}v(qc,K); -function sc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=lc(b);for(b=f.next();b;b=f.next()){e=lc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=lc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}qc.prototype.evaluate=function(a){return this.aa.q(this.ga,this.la,a)};qc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.aa+"\n";a+=" ";b+=this.ga.toString(a)+"\n";return b+=this.la.toString(a)};function tc(a,b,c,d){this.ya=a;this.ja=b;this.j=c;this.q=d}tc.prototype.toString=q("ya");var uc={}; -function N(a,b,c,d){a in uc&&h(Error("Binary operator already created: "+a));a=new tc(a,b,c,d);return uc[a.toString()]=a}N("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});N("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});N("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});N("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});N("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});N("<",4,2,function(a,b,c){return sc(function(a,b){return a<b},a,b,c)}); -N(">",4,2,function(a,b,c){return sc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return sc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return sc(function(a,b){return a>=b},a,b,c)});var rc=N("=",3,2,function(a,b,c){return sc(function(a,b){return a==b},a,b,c,l)});N("!=",3,2,function(a,b,c){return sc(function(a,b){return a!=b},a,b,c,l)});N("and",2,2,function(a,b,c){return pc(a,c)&&pc(b,c)});N("or",1,2,function(a,b,c){return pc(a,c)||pc(b,c)});function vc(a,b){b.s()&&4!=a.j&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));K.call(this,a.j);this.ka=a;this.f=b;this.t=a.h();this.m=a.m}v(vc,K);vc.prototype.evaluate=function(a){a=this.ka.evaluate(a);return wc(this.f,a)};vc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ka.toString(a);return b+=this.f.toString(a)};function xc(a,b){b.length<a.ia&&h(Error("Function "+a.o+" expects at least"+a.ia+" arguments, "+b.length+" given"));a.Z!==m&&b.length>a.Z&&h(Error("Function "+a.o+" expects at most "+a.Z+" arguments, "+b.length+" given"));a.xa&&w(b,function(b,d){4!=b.j&&h(Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b))});K.call(this,a.j);this.P=a;this.U=b;nc(this,a.t||oa(b,function(a){return a.h()}));oc(this,a.va&&!b.length||a.ua&&!!b.length||oa(b,function(a){return a.m}))}v(xc,K); -xc.prototype.evaluate=function(a){return this.P.q.apply(m,ra(a,this.U))};xc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.P+"\n";b+=" ";this.U.length&&(a+=b+"Arguments:",b+=" ",a=na(this.U,function(a,d){return a+"\n"+d.toString(b)},a));return a};function yc(a,b,c,d,e,f,g,p,x){this.o=a;this.j=b;this.t=c;this.va=d;this.ua=e;this.q=f;this.ia=g;this.Z=s(p)?p:g;this.xa=!!x}yc.prototype.toString=q("o");var zc={}; -function O(a,b,c,d,e,f,g,p){a in zc&&h(Error("Function already created: "+a+"."));zc[a]=new yc(a,b,c,d,n,e,f,g,p)}O("boolean",2,n,n,function(a,b){return pc(b,a)},1);O("ceiling",1,n,n,function(a,b){return Math.ceil(L(b,a))},1);O("concat",3,n,n,function(a,b){var c=sa(arguments,1);return na(c,function(b,c){return b+M(c,a)},"")},2,m);O("contains",2,n,n,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);O("count",1,n,n,function(a,b){return b.evaluate(a).s()},1,1,l);O("false",2,n,n,ba(n),0); -O("floor",1,n,n,function(a,b){return Math.floor(L(b,a))},1);O("id",4,n,n,function(a,b){function c(a){if(Rb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return pa(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];w(d,function(a){(a=c(a))&&!qa(f,a)&&f.push(a)});f.sort(pb);var g=new I;w(f,function(a){g.add(a)});return g},1);O("lang",2,n,n,ba(n),1); -O("last",1,l,n,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.p},0);O("local-name",3,n,l,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);O("name",3,n,l,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);O("namespace-uri",3,l,n,ba(""),0,1,l);O("normalize-space",3,n,l,function(a,b){return(b?M(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -O("not",2,n,n,function(a,b){return!pc(b,a)},1);O("number",1,n,l,function(a,b){return b?L(b,a):+H(a.g)},0,1);O("position",1,l,n,function(a){return a.za},0);O("round",1,n,n,function(a,b){return Math.round(L(b,a))},1);O("starts-with",2,n,n,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,n,l,function(a,b){return b?M(b,a):H(a.g)},0,1);O("string-length",1,n,l,function(a,b){return(b?M(b,a):H(a.g)).length},0,1); -O("substring",3,n,n,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,n,n,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -O("substring-before",3,n,n,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,n,n,function(a,b){for(var c=lc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);O("translate",3,n,n,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(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);O("true",2,n,n,ba(l),0);function J(a,b){this.na=a;this.ha=s(b)?b:m;this.e=m;switch(a){case "comment":this.e=8;break;case "text":this.e=gb;break;case "processing-instruction":this.e=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Ac(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}J.prototype.matches=function(a){return this.e===m||this.e==a.nodeType};J.prototype.getName=q("na"); -J.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.na;this.ha===m||(b+="\n"+this.ha.toString(a+" "));return b};function Bc(a){K.call(this,3);this.ma=a.substring(1,a.length-1)}v(Bc,K);Bc.prototype.evaluate=q("ma");Bc.prototype.toString=function(a){return(a||"")+"literal: "+this.ma};function cc(a){this.o=a.toLowerCase()}cc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.o||this.o==a.nodeName.toLowerCase()?l:this.o==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};cc.prototype.getName=q("o");cc.prototype.toString=function(a){return(a||"")+"nametest: "+this.o};function Cc(a){K.call(this,1);this.oa=a}v(Cc,K);Cc.prototype.evaluate=q("oa");Cc.prototype.toString=function(a){return(a||"")+"number: "+this.oa};function Dc(a,b){K.call(this,a.j);this.ea=a;this.L=b;this.t=a.h();this.m=a.m;if(1==this.L.length){var c=this.L[0];!c.W&&c.u==Ec&&(c=c.T,"*"!=c.getName()&&(this.K={name:c.getName(),F:m}))}}v(Dc,K);function Fc(){K.call(this,4)}v(Fc,K);Fc.prototype.evaluate=function(a){var b=new I;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Fc.prototype.toString=function(a){return a+"RootHelperExpr"};function Gc(){K.call(this,4)}v(Gc,K);Gc.prototype.evaluate=function(a){var b=new I;b.add(a.g);return b}; -Gc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Dc.prototype.evaluate=function(a){var b=this.ea.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.L;for(var c=0,d=a.length;c<d&&b.s();c++){var e=a[c],f=lc(b,e.u.D),g;if(!e.h()&&e.u==Hc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Qb(g))}else if(!e.h()&&e.u==Ic)g=f.next(),b=e.evaluate(new Qb(g));else{g=f.next();for(b=e.evaluate(new Qb(g));(g=f.next())!=m;)g=e.evaluate(new Qb(g)),b=ic(b,g)}}return b}; -Dc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ea.toString(b);this.L.length&&(c+=b+"Steps:\n",b+=" ",w(this.L,function(a){c+=a.toString(b)}));return c};function Jc(a,b){this.f=a;this.D=!!b}function wc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=lc(b),f=b.s(),g,p=0;g=e.next();p++){var x=a.D?f-p:p+1;g=d.evaluate(new Qb(g,x,f));var t;"number"==typeof g?t=x==g:"string"==typeof g||"boolean"==typeof g?t=!!g:g instanceof I?t=0<g.s():h(Error("Predicate.evaluate returned an unexpected type."));t||e.remove()}return b}Jc.prototype.w=function(){return 0<this.f.length?this.f[0].w():m}; -Jc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return l}return n};Jc.prototype.s=function(){return this.f.length};Jc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Kc(a,b,c,d){K.call(this,4);this.u=a;this.T=b;this.f=c||new Jc([]);this.W=!!d;b=this.f.w();a.Da&&b&&(a=b.name,a=Rb?a.toLowerCase():a,this.K={name:a,F:b.F});this.t=this.f.h()}v(Kc,K); -Kc.prototype.evaluate=function(a){var b=a.g,c=m,c=this.w(),d=m,e=m,f=0;c&&(d=c.name,e=c.F?M(c.F,a):m,f=1);if(this.W)if(!this.h()&&this.u==Lc)c=$b(this.T,b,d,e),c=wc(this.f,c,f);else if(a=lc((new Kc(Mc,new J("node"))).evaluate(a)),b=a.next())for(c=this.q(b,d,e,f);(b=a.next())!=m;)c=ic(c,this.q(b,d,e,f));else c=new I;else c=this.q(a.g,d,e,f);return c};Kc.prototype.q=function(a,b,c,d){a=this.u.P(this.T,a,b,c);return a=wc(this.f,a,d)}; -Kc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.W?"//":"/")+"\n";this.u.o&&(b+=a+"Axis: "+this.u+"\n");b+=this.T.toString(a);if(this.f.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.f.length;c++)var d=c<this.f.length-1?", ":"",b=b+(this.f[c].toString(a)+d);return b};function Nc(a,b,c,d){this.o=a;this.P=b;this.D=c;this.Da=d}Nc.prototype.toString=q("o");var Oc={}; -function P(a,b,c,d){a in Oc&&h(Error("Axis already created: "+a));b=new Nc(a,b,c,!!d);return Oc[a]=b}P("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);P("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Ec=P("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Rb)return c.add(new Tb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof J&&a.e===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Rb?g.nodeValue&&c.add(Ub(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Rb?g.nodeValue&&c.add(Ub(b,g,b.sourceIndex)):c.add(g));return c},n),Lc=P("child",function(a,b,c,d,e){return(Rb?fc:gc).call(m,a,b,u(c)?c:m,u(d)?d:m,e||new I)},n,l); -P("descendant",$b,n,l);var Mc=P("descendant-or-self",function(a,b,c,d){var e=new I;Zb(b,c,d)&&a.matches(b)&&e.add(b);return $b(a,b,c,d,e)},n,l),Hc=P("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)Zb(f,c,d)&&a.matches(f)&&e.add(f),e=$b(a,f,c,d,e);while(b=b.parentNode);return e},n,l);P("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);P("namespace",function(){return new I},n); -var Pc=P("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n),Ic=P("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,p=f.length;g<p;g++){var x=[];for(b=f[g];b=b.previousSibling;)x.unshift(b);for(var t=0,Cb=x.length;t<Cb;t++)b=x[t],Zb(b,c,d)&&a.matches(b)&&e.add(b),e=$b(a,b,c,d,e)}return e},l,l); -P("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Qc=P("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},n);function Rc(a){K.call(this,1);this.da=a;this.t=a.h();this.m=a.m}v(Rc,K);Rc.prototype.evaluate=function(a){return-L(this.da,a)};Rc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.da.toString(a+" ")};function Sc(a){K.call(this,4);this.R=a;nc(this,oa(this.R,function(a){return a.h()}));oc(this,oa(this.R,function(a){return a.m}))}v(Sc,K);Sc.prototype.evaluate=function(a){var b=new I;w(this.R,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=ic(b,c)});return b};Sc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";w(this.R,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Tc(a){this.a=a}function Uc(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=Vc(a);var d=a.a.next();if(!d)break;var e=(d=uc[d]||m)&&d.ja;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ja;)b=new qc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new qc(c.pop(),c.pop(),b);return b}function Q(a,b){a.a.empty()&&h(Error(b))}function Wc(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function Xc(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Yc(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Bc(a)}function Zc(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new cc(a.a.next()+a.a.next()+a.a.next()):new cc(a.a.next())} -function $c(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Fc;d=new Fc;Q(a,"Missing next location step.");b=ad(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Uc(a);Q(a,'unclosed "("');Wc(a,")");break;case '"':case "'":b=Yc(a);break;default:if(isNaN(+b))if(!Ac(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=zc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){Q(a,"Missing function argument list.");d.push(Uc(a));if(","!=G(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");Xc(a);b=new xc(b,d)}else{b=m;break a}else b=new Cc(+a.a.next())}"["==G(a.a)&&(d=new Jc(bd(a)),b=new vc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=ad(a,"/"),d=new Gc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=ad(a,b),c.push(b);return new Dc(d, -c)} -function ad(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Kc(Qc,new J("node")),a.a.next(),d;if(".."==G(a.a))return d=new Kc(Pc,new J("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Ec,a.a.next(),Q(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Oc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),Q(a,"Missing node name")):f=Lc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){Ac(e)||h(Error("Invalid node type: "+e));c=a.a.next();Ac(c)||h(Error("Invalid type name: "+c));Wc(a,"(");Q(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=Yc(a);Q(a,"Bad nodetype");Xc(a);c=new J(c,g)}else c=Zc(a);else"*"==e?c=Zc(a):h(Error("Bad token: "+a.a.next()));e=new Jc(bd(a),f.D);return d||new Kc(f,c,e,"//"==b)} -function bd(a){for(var b=[];"["==G(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=Uc(a);b.push(c);Q(a,"Unclosed predicate expression.");Wc(a,"]")}return b}function Vc(a){if("-"==G(a.a))return a.a.next(),new Rc(Vc(a));var b=$c(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push($c(a));a.a.back();a=new Sc(b)}return a};function cd(a){a.length||h(Error("Empty XPath expression."));a=Wb(a);a.empty()&&h(Error("Invalid XPath expression."));var b=Uc(new Tc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Qb(a));return new R(e,d)}} -function R(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?kc(a):""+a;break;case 1:this.numberValue=a instanceof I?+kc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s():!!a;break;case 4:case 5:case 6:case 7:var d=lc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Tb?e.g:e);this.snapshotLength=a.s();this.invalidIteratorState=n;break;case 8:case 9:d=jc(a);this.singleNodeValue=d instanceof Tb?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function dd(a){a=a||r;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new cd(a)).evaluate(b,f)},b.createExpression=function(a){return new cd(a)})};var S={};S.qa=function(){var a={La:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();S.q=function(a,b,c){var d=F(a);(A||Nb)&&dd(lb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.qa;return A&&!Ya(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){B&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -S.V=function(a,b){(!a||1!=a.nodeType)&&h(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};S.Ca=function(a,b){var c=function(){var c=S.q(b,a,9);return c?(c=c.singleNodeValue,z?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||S.V(c,a);return c}; -S.Ha=function(a,b){var c=function(){var c=S.q(b,a,7);if(c){var e=c.snapshotLength;z&&!s(e)&&S.V(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){S.V(b,a)});return c};function ed(a){return(a=a.exec(Ka()))?a[1]:""}var fd=function(){if(Jb)return ed(/Firefox\/([0-9.]+)/);if(A||z)return Ra;if(Ob)return ed(/Chrome\/([0-9.]+)/);if(Pb)return ed(/Version\/([0-9.]+)/);if(Lb||Mb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ka());if(a)return a[1]+"."+a[2]}else{if(Nb)return(a=ed(/Android\s+([0-9.]+)/))?a:ed(/Version\/([0-9.]+)/);if(Kb)return ed(/Camino\/([0-9.]+)/)}return""}();var gd,hd;function T(a){return id?gd(a):A?0<=ia(Za,a):Ya(a)}function jd(a){return id?hd(a):Nb?0<=ia(kd,a):0<=ia(fd,a)} -var id=function(){if(!B)return n;var a=r.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}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;gd=function(a){return 0<=d.sa(e,""+a)};hd=function(a){return 0<=d.sa(f,""+a)};return l}(),ld=Mb||Lb,md;if(Nb){var nd=/Android\s+([0-9\.]+)/.exec(Ka());md=nd?nd[1]:"0"}else md="0"; -var kd=md,od=A&&!D(8),pd=A&&!D(9),qd=D(10),rd=A&&!D(10);Nb&&jd(2.3);!z&&(!C||T("533"));function sd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}sd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};sd.prototype.contains=function(a){return!this||!a?n:a instanceof sd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function td(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function ud(a,b){return td(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function vd(a){a=a?F(a):document;var b;if(b=A)if(b=!D(9))b=hb(a),b=!kb(b.C);return b?a.body:a.documentElement} -function wd(a){var b=a.getBoundingClientRect();A&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function xd(a){if(A&&!D(8))return a.offsetParent;var b=F(a),c=ud(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=ud(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function yd(a){var b,c=F(a),d=ud(a,"position"),e=B&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new E(0,0),g=vd(c);if(a==g)return f;if(a.getBoundingClientRect)b=wd(a),a=hb(c),a=jb(a.C),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop|| -0);if(C&&"fixed"==ud(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(z||C&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=xd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!z||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function zd(a){var b=new E;if(1==a.nodeType){if(a.getBoundingClientRect){var c=wd(a);b.x=c.left;b.y=c.top}else{var c=hb(a),c=jb(c.C),d=yd(a);b.x=d.x-c.x;b.y=d.y-c.y}if(B&&!Ya(12)){var e;A?e="-ms-transform":C?e="-webkit-transform":z?e="-o-transform":B&&(e="-moz-transform");var f;e&&(f=ud(a,e));f||(f=ud(a,"transform"));f?(a=f.match(Ad),a=!a?new E(0,0):new E(parseFloat(a[1]),parseFloat(a[2]))):a=new E(0,0);b=new E(b.x+a.x,b.y+a.y)}}else e=ea(a.fa),f=a,a.targetTouches?f=a.targetTouches[0]:e&&a.fa().targetTouches&& -(f=a.fa().targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function Bd(a){if("none"!=ud(a,"display"))return Cd(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Cd(a);b.display=c;b.position=e;b.visibility=d;return a}function Cd(a){var b=a.offsetWidth,c=a.offsetHeight,d=C&&!b&&!c;return(!s(b)||d)&&a.getBoundingClientRect?(a=wd(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)}var Dd={thin:2,medium:4,thick:6}; -function Ed(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:m))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m,d;if(c in Dd)d=Dd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d}var Ad=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Fd(a){return Gd(a,l)&&Hd(a)&&!(A||z||B&&!T("1.9.2")?0:"none"==V(a,"pointer-events"))}function Id(a){return U(a,"OPTION")?l:U(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):n}function Jd(a,b){var c;if(c=od)if(c="value"==b)if(c=U(a,"OPTION"))c=Kd(a,"value")===m;c?(c=[],wb(a,c,n),c=c.join("")):c=a[b];return c}var Ld=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Md(a){var b=[];w(a.split(Ld),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return z?b.replace(/\w+:;/g,""):b}function Kd(a,b){b=b.toLowerCase();if("style"==b)return Md(a.style.cssText);if(od&&"value"==b&&U(a,"INPUT"))return a.value;if(pd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Nd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Hd(a){var b=a.tagName.toUpperCase();return!qa(Nd,b)?l:Jd(a,"disabled")?n:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Hd(a.parentNode):xb(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&Jd(b,"disabled")){if(!U(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:mb(a.previousSibling);)if(U(a,"LEGEND"))return l}return n},l)?n:l} -function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:m} -function V(a,b){var c=ja(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=pd?"styleFloat":"cssFloat";c=td(a,c)||Pd(a,c);if(c===m)c=m;else if(qa(ua,b)&&(xa.test("#"==c.charAt(0)?c:"#"+c)||Ba(c).length||ta&&ta[c.toLowerCase()]||za(c).length)){var d=za(c);if(!d.length){a:if(d=Ba(c),!d.length){d=ta[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(xa.test(d)&&(d=wa(d),d=wa(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&ea(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=Od(a))?Pd(c,b):m} -function Qd(a){if(ea(a.getBBox)&&!U(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,"BODY")){b=lb(F(a))||k;"hidden"!=V(a,"overflow")?a=l:(a=Od(a),!a||!U(a,"HTML")?a=l:(a=V(a,"overflow"),a="auto"==a||"scroll"==a));if(a){a=(b||ha).document;var b=a.documentElement,d=a.body;d||h(new y(13,"No BODY element present"));a=[b.clientHeight,b.scrollHeight,b.offsetHeight,d.scrollHeight,d.offsetHeight];b=Math.max.apply(m,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(m, -a);b=new cb(b,a)}else b=(b||window).document,b=kb(b)?b.documentElement:b.body,b=new cb(b.clientWidth,b.clientHeight);return b}return Bd(a)} -function Gd(a,b){function c(a){if("none"==V(a,"display"))return n;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?l:U(a,"PATH")&&(0<b.height||0<b.width)?(b=V(a,"stroke-width"),!!b&&0<parseInt(b,10)):oa(a.childNodes,function(b){return b.nodeType==gb&&"hidden"!=V(a,"overflow")||U(b)&&d(b)})}function e(a,b){var c;if((c=b==m?nb(a):nb(b))&&("hidden"==V(c,"overflow-x")||"hidden"==V(c,"overflow-y"))){var d=Qd(c),f=zd(c),g=zd(a);return f.x+d.width<=g.x&&"hidden"==V(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==V(c,"overflow-y")?n:l}return!c||e(a,c)}function f(a){var b=V(a,"-o-transform")||V(a,"-webkit-transform")||V(a,"-ms-transform")||V(a,"-moz-transform")||V(a,"transform");if(b&&"none"!==b)return b=zd(a),a=Qd(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Od(a);return!a||f(a)}U(a)||h(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var g=xb(a,function(a){return U(a,"SELECT")});return!!g&&Gd(g,l)}if(U(a,"MAP")){if(!a.name)return n;g=F(a);g= -g.evaluate?S.Ca('/descendant::*[@usemap = "#'+a.name+'"]',g):sb(g,function(b){return U(b)&&Kd(b,"usemap")=="#"+a.name});return!!g&&Gd(g,b)}return U(a,"AREA")?(g=xb(a,function(a){return U(a,"MAP")}),!!g&&Gd(g,b)):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Rd(a)||!d(a)||!e(a,m)?n:f(a)} -function Rd(a){if(rd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Sd(a)}function Sd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Sd(a));return b};function Td(a){this.d=ha.document.documentElement;this.n=m;var b=yb(F(this.d));b&&Ud(this,b);this.A=a||new Vd}function Ud(a,b){a.d=b;a.n=U(b,"OPTION")?xb(b,function(a){return U(a,"SELECT")}):m}function W(a,b,c){if(!Fd(a.d))return n;c={clientX:c.x,clientY:c.y,button:0,altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),wheelDelta:0,relatedTarget:m};return(a=a.n?Wd(a,b):a.d)?Xd(a,b,c):l} -function Yd(a,b,c,d,e,f){function g(a,c){var d={identifier:a,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};p.changedTouches.push(d);if(b==Zd||b==$d)p.touches.push(d),p.targetTouches.push(d)}var p={touches:[],targetTouches:[],changedTouches:[],altKey:a.A.l(4),ctrlKey:a.A.l(2),shiftKey:a.A.l(1),metaKey:a.A.l(8),relatedTarget:m,scale:0,rotation:0};g(c,d);s(e)&&g(e,f);Xd(a.d,b,p)} -function ae(a,b,c,d,e,f){var g=MSPointerEvent.MSPOINTER_TYPE_TOUCH;Fd(a.d)&&(c={clientX:c.x,clientY:c.y,button:d,altKey:n,ctrlKey:n,shiftKey:n,metaKey:n,relatedTarget:m,width:0,height:0,Ba:0,rotation:0,pointerId:e,Ea:0,Fa:0,pointerType:g,ta:f},(a=a.n?Wd(a,b):a.d)&&Xd(a,b,c))} -function Wd(a,b){if(A)switch(b){case be:case ce:return m;case de:case ee:case fe:return a.n.multiple?a.n:m;default:return a.n}if(z)switch(b){case de:case be:return a.n.multiple?a.d:m;default:return a.d}if(C)switch(b){case ge:case he:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:m}return a.d} -function ie(a,b){if(Fd(a.d)){var c=m,d=m;if(!je)for(var e=a.d;e;e=e.parentNode)if(U(e,"A")){c=e;break}else{var f;a:{if(U(e,"INPUT")&&(f=e.type.toLowerCase(),"submit"==f||"image"==f)){f=l;break a}if(U(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=l;break a}f=n}if(f){d=e;break}}if(f=e=Id(a.d)){f=a.d;Id(f)||h(new y(15,"Element is not selectable"));var g="selected",p=f.type&&f.type.toLowerCase();if("checkbox"==p||"radio"==p)g="checked";f=!!Jd(f,g)}if(a.n&&(g=a.n,!f||g.multiple))a.d.selected=!f, -(!C||!g.multiple||Nb&&jd(4))&&Xd(g,ke);A&&d?d.click():W(a,ge,b)&&(c&&le(c)?(d=c.href,e=lb(F(c)),A&&!T(8)&&(d=me(e.location,d)),c.target?e.open(d,c.target):e.location.href=d):e&&!a.n&&(!B&&!C&&!(f&&"radio"==a.d.type.toLowerCase()))&&(a.d.checked=!f,z&&!T(11)&&Xd(a.d,ke)))}} -function ne(a){a=a.n||a.d;var b=yb(F(a));if(a!=b){if(b&&(ea(b.blur)||A&&fa(b.blur))){try{"body"!==b.tagName.toLowerCase()&&b.blur()}catch(c){A&&"Unspecified error."==c.message||h(c)}A&&!T(8)&&lb(F(a)).focus()}if(ea(a.focus)||A&&fa(a.focus))z&&T(11)&&!Gd(a)?Xd(a,oe):a.focus()}}var je=C||z||id&&jd(3.6); -function le(a){if(je||!a.href)return n;if(!id)return l;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return n;var b=lb(F(a)),c=b.location.href;a=me(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}var pe=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; -function me(a,b){var c=b.match(pe);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,f){if("/"!=f.charAt(0)){var p=a.pathname.lastIndexOf("/");-1!=p&&(f=a.pathname.substr(0,p+1)+f)}}else f=a.pathname,g=g||a.search;return d+"//"+e+f+g+c}function Vd(){this.Aa=0}Vd.prototype.l=function(a){return 0!=(this.Aa&a)};var qe=!(A&&!T(10))&&!z,re=Nb?!jd(4):!ld,se=A&&ha.navigator.msPointerEnabled;function X(a,b,c){this.e=a;this.G=b;this.H=c}X.prototype.create=function(a){a=F(a);pd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.G,this.H));return a};X.prototype.toString=q("e");function Y(a,b,c){X.call(this,a,b,c)}v(Y,X); -Y.prototype.create=function(a,b){!B&&this==te&&h(new y(9,"Browser does not support a mouse pixel scroll event."));var c=F(a),d;if(pd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;var e=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ue||this==be)Object.defineProperty?(c=this==ue,e("fromElement",c?a:b.relatedTarget),e("toElement",c?b.relatedTarget:a)):d.relatedTarget= -b.relatedTarget;this==ve&&(Object.defineProperty?e("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=lb(c);d=c.createEvent("MouseEvents");c=1;if(this==ve&&(B||(d.wheelDelta=b.wheelDelta),B||z))c=b.wheelDelta/-40;B&&this==te&&(c=b.wheelDelta);d.initMouseEvent(this.e,this.G,this.H,e,c,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=zb(hb(a)),c=vd(a),f=b.clientX+e.scrollLeft-c.clientLeft,g=b.clientY+ -e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return f}});Object.defineProperty(d,"pageY",{get:function(){return g}})}}return d};function we(a,b,c){X.call(this,a,b,c)}v(we,X); -we.prototype.create=function(a,b){function c(b){b=ma(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ma(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}qe||h(new y(9,"Browser does not support firing touch events."));var e=F(a),f=lb(e),g=re?d(b.changedTouches): -c(b.changedTouches),p=b.touches==b.changedTouches?g:re?d(b.touches):c(b.touches),x=b.targetTouches==b.changedTouches?g:re?d(b.targetTouches):c(b.targetTouches),t;re?(t=e.createEvent("MouseEvents"),t.initMouseEvent(this.e,this.G,this.H,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),t.touches=p,t.targetTouches=x,t.changedTouches=g,t.scale=b.scale,t.rotation=b.rotation):(t=e.createEvent("TouchEvent"),Nb?t.initTouchEvent(p,x,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, -b.altKey,b.shiftKey,b.metaKey):t.initTouchEvent(this.e,this.G,this.H,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,p,x,g,b.scale,b.rotation),t.relatedTarget=b.relatedTarget);return t};function xe(a,b,c){X.call(this,a,b,c)}v(xe,X); -xe.prototype.create=function(a,b){se||h(new y(9,"Browser does not support MSPointer events."));var c=F(a),d=lb(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.G,this.H,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ba,b.rotation,b.Ea,b.Fa,b.pointerId,b.pointerType,0,b.ta);return c}; -var ke=new X("change",l,n),oe=new X("focus",n,n),ge=new Y("click",l,l),de=new Y("contextmenu",l,l),ye=new Y("mousedown",l,l),ee=new Y("mousemove",l,n),ue=new Y("mouseout",l,l),be=new Y("mouseover",l,l),he=new Y("mouseup",l,l),ve=new Y(B?"DOMMouseScroll":"mousewheel",l,l),te=new Y("MozMousePixelScroll",l,l),ze=new we("touchend",l,l),$d=new we("touchmove",l,l),Zd=new we("touchstart",l,l),Ae=new xe("MSPointerDown",l,l),fe=new xe("MSPointerMove",l,l),ce=new xe("MSPointerOver",l,l),Be=new xe("MSPointerOut", -l,l),Ce=new xe("MSPointerUp",l,l);function Xd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=n);return pd?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function De(a,b){this.z={};this.i=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof De){d=Ee(a);Fe(a);e=[];for(c=0;c<a.i.length;c++)e.push(a.z[a.i[c]])}else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}De.prototype.I=0;De.prototype.pa=0;function Ee(a){Fe(a);return a.i.concat()} -De.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.z,a)?(delete this.z[a],this.I--,this.pa++,this.i.length>2*this.I&&Fe(this),l):n};function Fe(a){if(a.I!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.z,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.I!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} -De.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.z,a)?this.z[a]:b};De.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.z,a)||(this.I++,this.i.push(a),this.pa++);this.z[a]=b};var Ge={};function Z(a,b,c){fa(a)&&(a=B?a.b:z?a.opera:a.c);a=new He(a,b,c);if(b&&(!(b in Ge)||c))Ge[b]={key:a,shift:n},c&&(Ge[c]={key:a,shift:l});return a}function He(a,b,c){this.code=a;this.ra=b||m;this.Ja=c||this.ra}Z(8);Z(9);Z(13);var Ie=Z(16),Je=Z(17),Ke=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); -Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Le=Z(Ja?{b:91,c:91,opera:219}:Ia?{b:224,c:91,opera:17}:{b:0,c:91,opera:m}); -Z(Ja?{b:92,c:92,opera:220}:Ia?{b:224,c:93,opera:17}:{b:0,c:92,opera:m});Z(Ja?{b:93,c:93,opera:0}:Ia?{b:0,c:0,opera:16}:{b:93,c:m,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Pa?56:42},"*");Z({b:107,c:107,opera:Pa?61:43},"+"); -Z({b:109,c:109,opera:Pa?109:45},"-");Z({b:110,c:110,opera:Pa?190:78},".");Z({b:111,c:111,opera:Pa?191:47},"/");Z(Pa&&z?m:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Me=new De;Me.set(1,Ie);Me.set(2,Je);Me.set(4,Ke); -Me.set(8,Le);(function(a){var b=new De;w(Ee(a),function(c){b.set(a.get(c).code,c)});return b})(Me);B&&T(12);function Ne(){Td.call(this);this.v=new E(0,0);this.O=new E(0,0)}v(Ne,Td);Ne.prototype.X=n;Ne.prototype.N=0;Ne.prototype.M=0;Ne.prototype.Ga=1;Ne.prototype.move=function(a,b,c){(!this.l()||qd)&&Ud(this,a);a=zd(a);this.v.x=b.x+a.x;this.v.y=b.y+a.y;s(c)&&(this.O.x=c.x+a.x,this.O.y=c.y+a.y);this.l()&&(this.X=l,qd?Oe(this,Pe):Qe(this,$d))};Ne.prototype.l=function(){return!!this.N}; -function Qe(a,b){a.l()||h(new y(13,"Should never fire event when touchscreen is not pressed."));var c,d;a.M&&(c=a.M,d=a.O);Yd(a,b,a.N,a.v,c,d)}function Oe(a,b){b(a,a.v,a.N,l);a.M&&b(a,a.O,a.M,n)}function Re(a,b,c,d){W(a,ee,b);ae(a,ce,b,0,c,d);W(a,be,b);ae(a,Ae,b,0,c,d);W(a,ye,b)&&ne(a)}function Se(a,b,c,d){ae(a,Ce,b,0,c,d);W(a,he,b);ie(a,b);ae(a,Be,b,-1,c,d);W(a,ue,b)}function Pe(a,b,c,d){ae(a,fe,b,-1,c,d);W(a,ee,b)};function Te(a,b){this.x=a;this.y=b}v(Te,E);Te.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Te.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Ue(a,b,c){Gd(a,l)||h(new y(11,"Element is not currently visible and may not be manipulated"));var d=F(a),d=C?d.body:d.documentElement,e;e=yd(a);var f=yd(d),g;if(A){var p=Ed(d,"borderLeft");g=Ed(d,"borderRight");var x=Ed(d,"borderTop"),t=Ed(d,"borderBottom");g=new sd(x,g,t,p)}else p=td(d,"borderLeftWidth"),g=td(d,"borderRightWidth"),x=td(d,"borderTopWidth"),t=td(d,"borderBottomWidth"),g=new sd(parseFloat(x),parseFloat(g),parseFloat(t),parseFloat(p));p=e.x-f.x-g.left;e=e.y-f.y-g.top;f=d.clientHeight- -a.offsetHeight;g=d.scrollLeft;x=d.scrollTop;g+=Math.min(p,Math.max(p-(d.clientWidth-a.offsetWidth),0));x+=Math.min(e,Math.max(e-f,0));e=new E(g,x);d.scrollLeft=e.x;d.scrollTop=e.y;b?b=new Te(b.x,b.y):(b=Ve(a),b=new Te(b.width/2,b.height/2));c=c||new Ne;c.move(a,b);c.l()&&h(new y(13,"Cannot press touchscreen when already pressed."));c.X=n;c.N=c.Ga++;qd?Oe(c,Re):Qe(c,Zd);c.l()||h(new y(13,"Cannot release touchscreen when not already pressed."));qd?Oe(c,Se):(Qe(c,ze),c.X||(W(c,ee,c.v),W(c,ye,c.v)&&ne(c), -W(c,he,c.v),ie(c,c.v)));c.N=0;c.M=0}function Ve(a){var b=Bd(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ve(a.offsetParent)};function We(){this.S=k} -function Xe(a,b,c){switch(typeof b){case "string":Ye(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Xe(a,a.S?a.S.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ye(f, -c),c.push(":"),Xe(a,a.S?a.S.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Ze={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},$e=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function Ye(a,b){b.push('"',a.replace($e,function(a){if(a in Ze)return Ze[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ze[a]=e+b.toString(16)}),'"')};C||z||B&&T(3.5)||A&&T(8);function af(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ma(a,af);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=bf(a);return b}if("document"in a)return b={},b.WINDOW=bf(a),b;if(da(a))return ma(a,af);a=db(a,function(a,b){return"number"==typeof b||u(b)});return eb(a,af);default:return m}} -function cf(a,b){return"array"==ca(a)?ma(a,function(a){return cf(a,b)}):fa(a)?"function"==typeof a?a:"ELEMENT"in a?df(a.ELEMENT,b):"WINDOW"in a?df(a.WINDOW,b):eb(a,function(a){return cf(a,b)}):a}function ef(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.$=ga());b.$||(b.$=ga());return b}function bf(a){var b=ef(a.ownerDocument),c=fb(b,function(b){return b==a});c||(c=":wdc:"+b.$++,b[c]=a);return c} -function df(a,b){a=decodeURIComponent(a);var c=b||document,d=ef(c);a in d||h(new y(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new y(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new y(10,"Element is no longer attached to the DOM"))};function ff(a,b){var c=[a,b],d=Ue,e;try{var d=u(d)?new ha.Function(d):ha==window?d:new ha.Function("return ("+d+").apply(null,arguments);"),f=cf(c,ha.document),g=d.apply(m,f);e={status:0,value:af(g)}}catch(p){e={status:"code"in p?p.code:13,value:{message:p.message}}}c=[];Xe(new We,e,c);return c.join("")}var gf=["_"],hf=r;!(gf[0]in hf)&&hf.execScript&&hf.execScript("var "+gf[0]);for(var jf;gf.length&&(jf=gf.shift());)!gf.length&&s(ff)?hf[jf]=ff:hf=hf[jf]?hf[jf]:hf[jf]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +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", +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", +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"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function w(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(w,Error); +var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";w.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return n.navigator?n.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=n.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var x=Ha,A=Ia,B=Ka,Qa=Ja,Ra,Sa=n.navigator;Ra=Sa&&Sa.platform||"";La=-1!=Ra.indexOf("Mac");Ma=-1!=Ra.indexOf("Win");var Ta=-1!=Ra.indexOf("Linux");function Ua(){var a=n.document;return a?a.documentMode:void 0}var Va; +a:{var Za="",$a;if(x&&n.opera)var ab=n.opera.version,Za="function"==typeof ab?ab():ab;else if(B?$a=/rv\:([^\);]+)(\)|;)/:A?$a=/MSIE\s+([^\);]+)(\)|;)/:Qa&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Na()),Za=bb?bb[1]:"";if(A){var cb=Ua();if(cb>parseFloat(Za)){Va=String(cb);break a}}Va=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Va,a))}function C(a){return A&&fb>=a}var gb=n.document,fb=gb&&A?Ua()||("CSS1Compat"==gb.compatMode?parseInt(Va,10):5):void 0;var hb;!B&&!A||A&&C(9)||B&&eb("1.9.1");A&&eb("9");function ib(a,b){this.x=p(a)?a:0;this.y=p(b)?b:0}l=ib.prototype;l.toString=function(){return"("+this.x+", "+this.y+")"};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function jb(a,b){this.width=a;this.height=b}l=jb.prototype;l.toString=function(){return"("+this.width+" x "+this.height+")"};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function kb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function lb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function mb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var nb=3;function ob(a){a=a.document;a=pb(a)?a.documentElement:a.body;return new jb(a.clientWidth,a.clientHeight)}function D(a){return a?a.parentWindow||a.defaultView:window}function pb(a){return"CSS1Compat"==a.compatMode}function qb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function rb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!C(9)){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=E(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function ub(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return tb(d,a)}function tb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function E(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var vb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},wb={IMG:" ",BR:"\n"}; +function xb(a,b,c){if(!(a.nodeName in vb))if(a.nodeType==nb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in wb)b.push(wb[a.nodeName]);else for(a=a.firstChild;a;)xb(a,b,c),a=a.nextSibling}function yb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function zb(a){this.F=a||n.document||document}zb.prototype.I=function(a){return t(a)?this.F.getElementById(a):a}; +function Ab(a){return!Qa&&pb(a.F)?a.F.documentElement:a.F.body||a.F.documentElement}zb.prototype.contains=rb;var Bb,Cb,Db,Eb,Fb,Gb,Hb;Hb=Gb=Fb=Eb=Db=Cb=Bb=!1;var Ib=Na();Ib&&(-1!=Ib.indexOf("Firefox")?Bb=!0:-1!=Ib.indexOf("Camino")?Cb=!0:-1!=Ib.indexOf("iPhone")||-1!=Ib.indexOf("iPod")?Db=!0:-1!=Ib.indexOf("iPad")?Eb=!0:-1!=Ib.indexOf("Android")?Fb=!0:-1!=Ib.indexOf("Chrome")?Gb=!0:-1!=Ib.indexOf("Safari")&&(Hb=!0));var Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb,Pb=Hb;function Qb(a,b,c){this.g=a;this.Ia=b||1;this.r=c||1};var Rb=A&&!C(9),Sb=A&&!C(8);function Tb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Ub(a,b,c){var d=Sb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Tb(b,a,b.nodeName,d,c)};function Vb(a){this.ja=a;this.W=0}function Wb(a){a=a.match(Xb);for(var b=0;b<a.length;b++)Yb.test(a[b])&&a.splice(b,1);return new Vb(a)}var Xb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Yb=/^\s/;function F(a,b){return a.ja[a.W+(b||0)]}Vb.prototype.next=function(){return this.ja[this.W++]};Vb.prototype.back=function(){this.W--};Vb.prototype.empty=function(){return this.ja.length<=this.W};function G(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(Rb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Rb&&"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} +function Zb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Sb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function $b(a,b,c,d,e){return(Rb?ac:bc).call(null,a,b,t(c)?c:null,t(d)?d:null,e||new H)} +function ac(a,b,c,d,e){if(a instanceof cc||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=dc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Zb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}ec(a,b,c,d,e);return e} +function bc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof I?ec(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){Zb(a,c,d)&&e.add(a)}));return e} +function fc(a,b,c,d,e){var f;if((a instanceof cc||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=dc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Zb(a,c,d)}));v(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return gc(a,b,c,d,e)}function gc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b);return e} +function ec(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Zb(b,c,d)&&a.matches(b)&&e.add(b),ec(a,b,c,d,e)}function dc(a){if(a instanceof I){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function H(){this.r=this.k=null;this.P=0}function hc(a){this.u=a;this.next=this.G=null}function ic(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.u==d.u||c.u instanceof Tb&&d.u instanceof Tb&&c.u.g==d.u.g?(f=c,c=c.next,d=d.next):0<sb(c.u,d.u)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.P=g;return a} +H.prototype.unshift=function(a){a=new hc(a);a.next=this.k;this.r?this.k.G=a:this.k=this.r=a;this.k=a;this.P++};H.prototype.add=function(a){a=new hc(a);a.G=this.r;this.k?this.r.next=a:this.k=this.r=a;this.r=a;this.P++};function jc(a){return(a=a.k)?a.u:null}H.prototype.t=h("P");function kc(a){return(a=jc(a))?G(a):""}function lc(a,b){return new mc(a,!!b)}function mc(a,b){this.Ea=a;this.ka=(this.J=b)?a.r:a.k;this.ea=null} +mc.prototype.next=function(){var a=this.ka;if(null==a)return null;var b=this.ea=a;this.ka=this.J?a.G:a.next;return b.u};mc.prototype.remove=function(){var a=this.Ea,b=this.ea;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.k=b;b?b.G=c:a.r=c;a.P--;this.ea=null};function K(a){this.j=a;this.m=this.w=!1;this.Q=null}function L(a){return"\n "+a.toString().split("\n").join("\n ")}K.prototype.h=h("w");function nc(a,b){a.w=b}function oc(a,b){a.m=b}K.prototype.B=h("Q");function M(a,b){var c=a.evaluate(b);return c instanceof H?+kc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof H?kc(c):""+c}function pc(a,b){var c=a.evaluate(b);return c instanceof H?!!c.t():!!c};function qc(a,b,c){K.call(this,a.j);this.ia=a;this.oa=b;this.ta=c;this.w=b.h()||c.h();this.m=b.m||c.m;this.ia==rc&&(c.m||c.h()||4==c.j||0==c.j||!b.B()?b.m||(b.h()||4==b.j||0==b.j||!c.B())||(this.Q={name:c.B().name,K:b}):this.Q={name:b.B().name,K:c})}u(qc,K); +function sc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof H&&c instanceof H){e=lc(b);for(d=e.next();d;d=e.next())for(b=lc(c),f=b.next();f;f=b.next())if(a(G(d),G(f)))return!0;return!1}if(b instanceof H||c instanceof H){b instanceof H?e=b:(e=c,c=b);e=lc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}qc.prototype.evaluate=function(a){return this.ia.s(this.oa,this.ta,a)};qc.prototype.toString=function(){var a="Binary Expression: "+this.ia,a=a+L(this.oa);return a+=L(this.ta)};function tc(a,b,c,d){this.Ha=a;this.ra=b;this.j=c;this.s=d}tc.prototype.toString=h("Ha");var uc={}; +function O(a,b,c,d){if(uc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new tc(a,b,c,d);return uc[a.toString()]=a}O("div",6,1,function(a,b,c){return M(a,c)/M(b,c)});O("mod",6,1,function(a,b,c){return M(a,c)%M(b,c)});O("*",6,1,function(a,b,c){return M(a,c)*M(b,c)});O("+",5,1,function(a,b,c){return M(a,c)+M(b,c)});O("-",5,1,function(a,b,c){return M(a,c)-M(b,c)});O("<",4,2,function(a,b,c){return sc(function(a,b){return a<b},a,b,c)}); +O(">",4,2,function(a,b,c){return sc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return sc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return sc(function(a,b){return a>=b},a,b,c)});var rc=O("=",3,2,function(a,b,c){return sc(function(a,b){return a==b},a,b,c,!0)});O("!=",3,2,function(a,b,c){return sc(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return pc(a,c)&&pc(b,c)});O("or",1,2,function(a,b,c){return pc(a,c)||pc(b,c)});function vc(a,b){if(b.t()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");K.call(this,a.j);this.sa=a;this.f=b;this.w=a.h();this.m=a.m}u(vc,K);vc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return wc(this.f,a)};vc.prototype.toString=function(){var a;a="Filter:"+L(this.sa);return a+=L(this.f)};function xc(a,b){if(b.length<a.qa)throw Error("Function "+a.p+" expects at least"+a.qa+" arguments, "+b.length+" given");if(null!==a.fa&&b.length>a.fa)throw Error("Function "+a.p+" expects at most "+a.fa+" arguments, "+b.length+" given");a.Fa&&v(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b);});K.call(this,a.j);this.V=a;this.$=b;nc(this,a.w||ta(b,function(a){return a.h()}));oc(this,a.Da&&!b.length||a.Ca&&!!b.length||ta(b,function(a){return a.m}))} +u(xc,K);xc.prototype.evaluate=function(a){return this.V.s.apply(null,xa(a,this.$))};xc.prototype.toString=function(){var a="Function: "+this.V;if(this.$.length)var b=sa(this.$,function(a,b){return a+L(b)},"Arguments:"),a=a+L(b);return a};function yc(a,b,c,d,e,f,g,k,m){this.p=a;this.j=b;this.w=c;this.Da=d;this.Ca=e;this.s=f;this.qa=g;this.fa=p(k)?k:g;this.Fa=!!m}yc.prototype.toString=h("p");var zc={}; +function P(a,b,c,d,e,f,g,k){if(zc.hasOwnProperty(a))throw Error("Function already created: "+a+".");zc[a]=new yc(a,b,c,d,!1,e,f,g,k)}P("boolean",2,!1,!1,function(a,b){return pc(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+N(c,a)},"")},2,null);P("contains",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2); +P("count",1,!1,!1,function(a,b){return b.evaluate(a).t()},1,1,!0);P("false",2,!1,!1,ba(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(M(b,a))},1); +P("id",4,!1,!1,function(a,b){function c(a){if(Rb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(sb);var g=new H;v(f,function(a){g.add(a)});return g},1);P("lang",2,!1,!1,ba(!1),1); +P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);P("local-name",3,!1,!0,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?jc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,ba(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +P("not",2,!1,!1,function(a,b){return!pc(b,a)},1);P("number",1,!1,!0,function(a,b){return b?M(b,a):+G(a.g)},0,1);P("position",1,!0,!1,function(a){return a.Ia},0);P("round",1,!1,!1,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?N(b,a):G(a.g)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?N(b,a):G(a.g)).length},0,1); +P("substring",3,!1,!1,function(a,b,c,d){c=M(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?M(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=N(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +P("substring-before",3,!1,!1,function(a,b,c){b=N(b,a);a=N(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){for(var c=lc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=N(b,a);c=N(c,a);var e=N(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);P("true",2,!1,!1,ba(!0),0);function I(a,b){this.va=a;this.pa=p(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=nb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Ac(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}I.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};I.prototype.getName=h("va"); +I.prototype.toString=function(){var a="Kind Test: "+this.va;null===this.pa||(a+=L(this.pa));return a};function Bc(a){K.call(this,3);this.ua=a.substring(1,a.length-1)}u(Bc,K);Bc.prototype.evaluate=h("ua");Bc.prototype.toString=function(){return"Literal: "+this.ua};function cc(a,b){this.p=a.toLowerCase();this.ga=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}cc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.p&&this.p!=a.nodeName.toLowerCase()?!1:this.ga==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};cc.prototype.getName=h("p");cc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.ga?"":this.ga+":")+this.p};function Cc(a){K.call(this,1);this.wa=a}u(Cc,K);Cc.prototype.evaluate=h("wa");Cc.prototype.toString=function(){return"Number: "+this.wa};function Dc(a,b){K.call(this,a.j);this.ma=a;this.R=b;this.w=a.h();this.m=a.m;if(1==this.R.length){var c=this.R[0];c.ba||c.A!=Ec||(c=c.Z,"*"!=c.getName()&&(this.Q={name:c.getName(),K:null}))}}u(Dc,K);function Fc(){K.call(this,4)}u(Fc,K);Fc.prototype.evaluate=function(a){var b=new H;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Fc.prototype.toString=ba("Root Helper Expression");function Gc(){K.call(this,4)}u(Gc,K);Gc.prototype.evaluate=function(a){var b=new H;b.add(a.g);return b}; +Gc.prototype.toString=ba("Context Helper Expression"); +Dc.prototype.evaluate=function(a){var b=this.ma.evaluate(a);if(!(b instanceof H))throw Error("Filter expression must evaluate to nodeset.");a=this.R;for(var c=0,d=a.length;c<d&&b.t();c++){var e=a[c],f=lc(b,e.A.J),g;if(e.h()||e.A!=Hc)if(e.h()||e.A!=Ic)for(g=f.next(),b=e.evaluate(new Qb(g));null!=(g=f.next());)g=e.evaluate(new Qb(g)),b=ic(b,g);else g=f.next(),b=e.evaluate(new Qb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Qb(g))}}return b}; +Dc.prototype.toString=function(){var a;a="Path Expression:"+L(this.ma);if(this.R.length){var b=sa(this.R,function(a,b){return a+L(b)},"Steps:");a+=L(b)}return a};function Jc(a,b){this.f=a;this.J=!!b}function wc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=lc(b),f=b.t(),g,k=0;g=e.next();k++){var m=a.J?f-k:k+1;g=d.evaluate(new Qb(g,m,f));if("number"==typeof g)m=m==g;else if("string"==typeof g||"boolean"==typeof g)m=!!g;else if(g instanceof H)m=0<g.t();else throw Error("Predicate.evaluate returned an unexpected type.");m||e.remove()}return b}Jc.prototype.B=function(){return 0<this.f.length?this.f[0].B():null}; +Jc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Jc.prototype.t=function(){return this.f.length};Jc.prototype.toString=function(){return sa(this.f,function(a,b){return a+L(b)},"Predicates:")};function Kc(a,b,c,d){K.call(this,4);this.A=a;this.Z=b;this.f=c||new Jc([]);this.ba=!!d;b=this.f.B();a.Ma&&b&&(a=b.name,a=Rb?a.toLowerCase():a,this.Q={name:a,K:b.K});this.w=this.f.h()}u(Kc,K); +Kc.prototype.evaluate=function(a){var b=a.g,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.K?N(c.K,a):null,f=1);if(this.ba)if(this.h()||this.A!=Lc)if(a=lc((new Kc(Mc,new I("node"))).evaluate(a)),b=a.next())for(c=this.s(b,d,e,f);null!=(b=a.next());)c=ic(c,this.s(b,d,e,f));else c=new H;else c=$b(this.Z,b,d,e),c=wc(this.f,c,f);else c=this.s(a.g,d,e,f);return c};Kc.prototype.s=function(a,b,c,d){a=this.A.V(this.Z,a,b,c);return a=wc(this.f,a,d)}; +Kc.prototype.toString=function(){var a;a="Step:"+L("Operator: "+(this.ba?"//":"/"));this.A.p&&(a+=L("Axis: "+this.A));a+=L(this.Z);if(this.f.t()){var b=sa(this.f.f,function(a,b){return a+L(b)},"Predicates:");a+=L(b)}return a};function Nc(a,b,c,d){this.p=a;this.V=b;this.J=c;this.Ma=d}Nc.prototype.toString=h("p");var Oc={};function Q(a,b,c,d){if(Oc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Nc(a,b,c,!!d);return Oc[a]=b} +Q("ancestor",function(a,b){for(var c=new H,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new H,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Ec=Q("attribute",function(a,b){var c=new H,d=a.getName();if("style"==d&&b.style&&Rb)return c.add(new Tb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof I&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Rb?g.nodeValue&&c.add(Ub(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Rb?g.nodeValue&&c.add(Ub(b,g,b.sourceIndex)):c.add(g));return c},!1),Lc=Q("child",function(a,b,c,d,e){return(Rb?fc:gc).call(null,a,b,t(c)?c:null,t(d)?d:null,e||new H)}, +!1,!0);Q("descendant",$b,!1,!0);var Mc=Q("descendant-or-self",function(a,b,c,d){var e=new H;Zb(b,c,d)&&a.matches(b)&&e.add(b);return $b(a,b,c,d,e)},!1,!0),Hc=Q("following",function(a,b,c,d){var e=new H;do for(var f=b;f=f.nextSibling;)Zb(f,c,d)&&a.matches(f)&&e.add(f),e=$b(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new H,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new H},!1); +var Pc=Q("parent",function(a,b){var c=new H;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Ic=Q("preceding",function(a,b,c,d){var e=new H,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var m=[];for(b=f[g];b=b.previousSibling;)m.unshift(b);for(var r=0,y=m.length;r<y;r++)b=m[r],Zb(b,c,d)&&a.matches(b)&&e.add(b),e=$b(a,b,c,d,e)}return e},!0,!0); +Q("preceding-sibling",function(a,b){for(var c=new H,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Qc=Q("self",function(a,b){var c=new H;a.matches(b)&&c.add(b);return c},!1);function Rc(a){K.call(this,1);this.la=a;this.w=a.h();this.m=a.m}u(Rc,K);Rc.prototype.evaluate=function(a){return-M(this.la,a)};Rc.prototype.toString=function(){return"Unary Expression: -"+L(this.la)};function Sc(a){K.call(this,4);this.X=a;nc(this,ta(this.X,function(a){return a.h()}));oc(this,ta(this.X,function(a){return a.m}))}u(Sc,K);Sc.prototype.evaluate=function(a){var b=new H;v(this.X,function(c){c=c.evaluate(a);if(!(c instanceof H))throw Error("Path expression must evaluate to NodeSet.");b=ic(b,c)});return b};Sc.prototype.toString=function(){return sa(this.X,function(a,b){return a+L(b)},"Union Expression:")};function Tc(a,b){this.a=a;this.Ga=b}function Uc(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Vc(a);var d=a.a.next();if(!d)break;var e=(d=uc[d]||null)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new qc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new qc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Wc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function Xc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Yc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Bc(a)}function Zc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new cc(b);var d=b.substring(0,c);a=a.Ga(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new cc(b,a)} +function $c(a){var b,c=[],d;if("/"==F(a.a)||"//"==F(a.a)){b=a.a.next();d=F(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Fc;d=new Fc;R(a,"Missing next location step.");b=ad(a,b);c.push(b)}else{a:{b=F(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Uc(a);R(a,'unclosed "("');Wc(a,")");break;case '"':case "'":b=Yc(a);break;default:if(isNaN(+b))if(!Ac(b)&&/(?![0-9])[\w]/.test(d)&& +"("==F(a.a,1)){b=a.a.next();b=zc[b]||null;a.a.next();for(d=[];")"!=F(a.a);){R(a,"Missing function argument list.");d.push(Uc(a));if(","!=F(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Xc(a);b=new xc(b,d)}else{b=null;break a}else b=new Cc(+a.a.next())}"["==F(a.a)&&(d=new Jc(bd(a)),b=new vc(b,d))}if(b)if("/"==F(a.a)||"//"==F(a.a))d=b;else return b;else b=ad(a,"/"),d=new Gc,c.push(b)}for(;"/"==F(a.a)||"//"==F(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=ad(a,b),c.push(b); +return new Dc(d,c)} +function ad(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==F(a.a))return d=new Kc(Qc,new I("node")),a.a.next(),d;if(".."==F(a.a))return d=new Kc(Pc,new I("node")),a.a.next(),d;var f;if("@"==F(a.a))f=Ec,a.a.next(),R(a,"Missing attribute name");else if("::"==F(a.a,1)){if(!/(?![0-9])[\w]/.test(F(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Oc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=Lc; +c=F(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==F(a.a,1)){if(!Ac(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!Ac(c))throw Error("Invalid type name: "+c);Wc(a,"(");R(a,"Bad nodetype");e=F(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Yc(a);R(a,"Bad nodetype");Xc(a);c=new I(c,g)}else c=Zc(a);else if("*"==c)c=Zc(a);else throw Error("Bad token: "+a.a.next());e=new Jc(bd(a),f.J);return d||new Kc(f,c,e,"//"==b)} +function bd(a){for(var b=[];"["==F(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Uc(a);b.push(c);R(a,"Unclosed predicate expression.");Wc(a,"]")}return b}function Vc(a){if("-"==F(a.a))return a.a.next(),new Rc(Vc(a));var b=$c(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push($c(a));a.a.back();a=new Sc(b)}return a};function cd(a){switch(a.nodeType){case 1:return ka(dd,a);case 9:return cd(a.documentElement);case 2:return a.ownerElement?cd(a.ownerElement):ed;case 11:case 10:case 6:case 12:return ed;default:return a.parentNode?cd(a.parentNode):ed}}function ed(){return null}function dd(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?dd(a.parentNode,b):null};function fd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Wb(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=ba(null);var d=Uc(new Tc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Qb(a));return new S(c,b)}} +function S(a,b){if(0==b)if(a instanceof H)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 H))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof H?kc(a):""+a;break;case 1:this.numberValue=a instanceof H?+kc(a):+a;break;case 3:this.booleanValue=a instanceof H?0<a.t():!!a;break;case 4:case 5:case 6:case 7:var d= +lc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Tb?e.g:e);this.snapshotLength=a.t();this.invalidIteratorState=!1;break;case 8:case 9:d=jc(a);this.singleNodeValue=d instanceof Tb?d.g:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function gd(a){this.lookupNamespaceURI=cd(a)} +function hd(a){a=a||n;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new fd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new fd(a,b)},b.createNSResolver=function(a){return new gd(a)})};var T={};T.ya=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.s=function(a,b,c){var d=E(a);(A||Nb)&&hd(D(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ya;return A&&!eb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!B||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new w(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +T.aa=function(a,b){if(!a||1!=a.nodeType)throw new w(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.La=function(a,b){var c=function(){var c=T.s(b,a,9);return c?(c=c.singleNodeValue,x?c:c||null):b.selectSingleNode?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.aa(c,a);return c}; +T.Qa=function(a,b){var c=function(){var c=T.s(b,a,7);if(c){var e=c.snapshotLength;x&&!p(e)&&T.aa(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=E(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();v(c,function(b){T.aa(b,a)});return c};function id(a){return(a=a.exec(Na()))?a[1]:""}var jd=function(){if(Jb)return id(/Firefox\/([0-9.]+)/);if(A||x)return Va;if(Ob)return id(/Chrome\/([0-9.]+)/);if(Pb)return id(/Version\/([0-9.]+)/);if(Lb||Mb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Nb)return(a=id(/Android\s+([0-9.]+)/))?a:id(/Version\/([0-9.]+)/);if(Kb)return id(/Camino\/([0-9.]+)/)}return""}();var kd,ld;function U(a){return md?kd(a):A?0<=na(fb,a):eb(a)}function nd(a){return md?ld(a):Nb?0<=na(od,a):0<=na(jd,a)} +var md=function(){if(!B)return!1;var a=n.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;kd=function(a){return 0<=d.Aa(e,""+a)};ld=function(a){return 0<=d.Aa(f,""+a)};return!0}(),pd=Mb||Lb,qd;if(Nb){var rd=/Android\s+([0-9\.]+)/.exec(Na());qd=rd?rd[1]:"0"}else qd="0"; +var od=qd,sd=A&&!C(8),td=A&&!C(9),ud=C(10),vd=A&&!C(10);Nb&&nd(2.3);Nb&&nd(4);Pb&&nd(6);var wd=A&&-1!=Na().indexOf("IEMobile");function xd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}l=xd.prototype;l.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};l.contains=function(a){return this&&a?a instanceof xd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +l.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};l.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};l.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function V(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}l=V.prototype;l.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};l.contains=function(a){return a instanceof V?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function yd(a,b){var c=E(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function zd(a){a=a?E(a):document;var b;(b=!A)||(b=C(9))||(b=a?new zb(E(a)):hb||(hb=new zb),b=pb(b.F));return b?a.documentElement:a.body} +function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=Qa&&!b&&!c;if((!p(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}A&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new jb(e.right-e.left,e.bottom-e.top)}return new jb(b,c)}var Bd={thin:2,medium:4,thick:6}; +function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Dd(a){var b;a:{a=E(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return A&&b&&"undefined"===typeof b.nodeType?null:b}function W(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){return Fd(a,!0)&&Gd(a)&&!(A||x||B&&!U("1.9.2")?0:"none"==X(a,"pointer-events"))}function Hd(a){return W(a,"OPTION")?!0:W(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1} +function Id(a){if(!Hd(a))throw new w(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Jd(a,b)}function Jd(a,b){var c;if(c=sd)if(c="value"==b)if(c=W(a,"OPTION"))c=null===Kd(a);c?(c=[],xb(a,c,!1),c=c.join("")):c=a[b];return c}var Ld=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Md(a){var b=[];v(a.split(Ld),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return x?b.replace(/\w+:;/g,""):b}function Kd(a){var b;b="value";return"style"==b?Md(a.style.cssText):sd&&"value"==b&&W(a,"INPUT")?a.value:td&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Nd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Gd(a){var b=a.tagName.toUpperCase();return wa(Nd,b)?Jd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):!yb(a,function(a){var b=a.parentNode;if(b&&W(b,"FIELDSET")&&Jd(b,"disabled")){if(!W(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:qb(a.previousSibling);)if(W(a,"LEGEND"))return!0}return!1},!0):!0} +function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return W(a)?a:null} +function X(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=td?"styleFloat":"cssFloat";var d=yd(a,c)||Pd(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!p(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?p(d)?d:null:(c=Od(a))?Pd(c,b):null} +function Fd(a,b){function c(a){if("none"==X(a,"display"))return!1;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?!0:W(a,"PATH")&&(0<b.height||0<b.width)?(a=X(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=X(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==nb||W(a)&&d(a)})}function e(a){return Rd(a)==Y&&ua(a.childNodes,function(a){return!W(a)||e(a)})}if(!W(a))throw Error("Argument to isShown must be of type Element");if(W(a,"OPTION")||W(a,"OPTGROUP")){var f= +yb(a,function(a){return W(a,"SELECT")});return!!f&&Fd(f,!0)}return(f=Sd(a))?!!f.na&&0<f.rect.width&&0<f.rect.height&&Fd(f.na,b):W(a,"INPUT")&&"hidden"==a.type.toLowerCase()||W(a,"NOSCRIPT")||"hidden"==X(a,"visibility")||!c(a)||!b&&0==Td(a)||!d(a)?!1:!e(a)}var Y="hidden"; +function Rd(a,b){function c(a){var b=X(a,"position");if("fixed"==b)return y=!0,a==k?null:k;for(a=Od(a);a&&a!=k&&(0==X(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==X(a,"position"));)a=Od(a);return a}function d(a){var b=a;if("visible"==r)if(a==k&&m)b=m;else if(a==m)return{x:"visible",y:"visible"};b={x:X(b,"overflow-x"),y:X(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new zb(g)).F;a=!Qa&&pb(b)?b.documentElement: +b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=A&&eb("10")&&b.pageYOffset!=a.scrollTop?new ib(a.scrollLeft,a.scrollTop):new ib(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new ib(a.scrollLeft,a.scrollTop);return a}for(var f=Ud(a,b),g=E(a),k=g.documentElement,m=g.body,r=X(k,"overflow"),y,s=c(a);s;s=c(s)){var q=d(s);if("visible"!=q.x||"visible"!=q.y){var z=Qd(s);if(0==z.width||0==z.height)return Y;var J=f.right<z.left,aa=f.bottom<z.top;if(J&&"hidden"==q.x||aa&&"hidden"== +q.y)return Y;if(J&&"visible"!=q.x||aa&&"visible"!=q.y){J=e(s);aa=f.bottom<z.top-J.y;if(f.right<z.left-J.x&&"visible"!=q.x||aa&&"visible"!=q.x)return Y;f=Rd(s);return f==Y?Y:"scroll"}J=f.left>=z.left+z.width;z=f.top>=z.top+z.height;if(J&&"hidden"==q.x||z&&"hidden"==q.y)return Y;if(J&&"visible"!=q.x||z&&"visible"!=q.y){if(y&&(q=e(s),f.left>=k.scrollWidth-q.x||f.right>=k.scrollHeight-q.y))return Y;f=Rd(s);return f==Y?Y:"scroll"}}}return"none"}var Vd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Qd(a){function b(a){var c=D(E(a)).getComputedStyle(a,null).MozTransform.match(Vd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),y=parseFloat(c[3]),s=parseFloat(c[4]),q=parseFloat(c[5]),c=parseFloat(c[6]),z=f.left+f.width,J=f.top+f.height,aa=f.left*d,d=z*d,Wa=f.left*e,e=z*e,Xa=f.top*y,y=J*y,Ya=f.top*s,z=J*s,J=aa+Xa+q,s=Wa+Ya+c,Xa=d+Xa+q,Ya=e+Ya+c,aa=aa+y+q,Wa=Wa+z+c,q=d+y+q,c=e+z+c;f.left=Math.min(J,Xa,aa,q);f.top=Math.min(s,Ya,Wa,c);q=Math.max(J,Xa,aa,q);c=Math.max(s,Ya,Wa,c);f.width=q- +f.left;f.height=c-f.top}(a=Od(a))&&b(a)}var c=Sd(a);if(c)return c.rect;if(W(a,"HTML"))return c=E(a),a=ob(D(c)||window),new V(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new V(0,0,0,0)}var f=new V(d.left,d.top,d.right-d.left,d.bottom-d.top);A&&a.ownerDocument.body&&(c=E(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);x&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&& +(f.height=a.offsetHeight));B&&!U(12)&&b(a);return f} +function Sd(a){var b=W(a,"MAP");if(!b&&!W(a,"AREA"))return null;var c=b?a:W(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.La('/descendant::*[@usemap = "#'+c.name+'"]',E(c)))&&(e=Qd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Wd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new V(a+e.left,b+e.top,c,f)}return{na:d,rect:e||new V(0,0,0,0)}} +function Wd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new V(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new V(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 V(b,c,d-b,e-c)}return new V(0,0,0,0)} +function Ud(a,b){var c;c=Qd(a);c=new xd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof V?b:new V(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c} +function Td(a){if(vd){if("relative"==X(a,"position"))return 1;a=X(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Xd(a)}function Xd(a){var b=1,c=X(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Xd(a));return b};function Yd(a,b){this.d=ma.document.documentElement;this.n=null;var c=Dd(this.d);c&&Zd(this,c);this.D=a||new $d;this.ca=b||new ae}Yd.prototype.I=h("d");function Zd(a,b){a.d=b;a.n=W(b,"OPTION")?yb(b,function(a){return W(a,"SELECT")}):null} +Yd.prototype.o=function(a,b,c,d,e,f,g){if(!f&&!Ed(this.d))return!1;if(d&&be!=a&&ce!=a)throw new w(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=de&&a!=ee&&g in fe?c=fe[g]:this.n&&(c=ge(this,a));return c?this.ca.o(c,a,b):!0}; +Yd.prototype.da=function(a,b,c,d,e){function f(b,c){var d={identifier:b,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};g.changedTouches.push(d);if(a==he||a==ie)g.touches.push(d),g.targetTouches.push(d)}var g={touches:[],targetTouches:[],changedTouches:[],altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),relatedTarget:null,scale:0,rotation:0};f(b,c);p(d)&&f(d,e);return this.ca.da(this.d,a,g)}; +Yd.prototype.q=function(a,b,c,d,e,f,g,k){if(!k&&!Ed(this.d))return!1;if(g&&je!=a&&ke!=a)throw new w(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ka:0,rotation:0,pointerId:d,Na:0,Oa:0,pointerType:e,Ba:f};c=this.n?ge(this,a):this.d;fe[d]&&(c=fe[d]);d=D(E(this.d));var m;d&&a==le&&(m=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){fe[a]= +this});a=c?this.ca.q(c,a,b):!0;m&&(d.Element.prototype.msSetPointerCapture=m);return a};function ge(a,b){if(A)switch(b){case be:case je:return null;case me:case ne:case oe:return a.n.multiple?a.n:null;default:return a.n}if(x)switch(b){case me:case be:return a.n.multiple?a.d:null;default:return a.d}if(Qa)switch(b){case de:case pe:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:null}return a.d} +function qe(a,b,c){if(Ed(a.d)){var d=null,e=null;if(!re)for(var f=a.d;f;f=f.parentNode)if(W(f,"A")){d=f;break}else{var g;a:{if(W(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=!0;break a}if(W(f,"BUTTON")&&(g=f.type.toLowerCase(),"submit"==g)){g=!0;break a}g=!1}if(g){e=f;break}}g=(f=!a.n&&Hd(a.d))&&Id(a.d);A&&e?e.click():a.o(de,b,0,null,0,!1,c)&&(d&&se(d)?(a=d,b=a.href,c=D(E(a)),A&&!U(8)&&(b=te(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):!f||(B||Qa||g&&"radio"==a.d.type.toLowerCase())|| +(a.d.checked=!g,x&&!U(11)&&ue(a.d,ve)))}}function we(a){a=a.n||a.d;var b=Dd(a);if(a!=b){if(b&&(fa(b.blur)||A&&ga(b.blur))){if(!W(b,"BODY"))try{b.blur()}catch(c){if(!A||"Unspecified error."!=c.message)throw c;}A&&!U(8)&&D(E(a)).focus()}if(fa(a.focus)||A&&ga(a.focus))x&&U(11)&&!Fd(a)?ue(a,xe):a.focus()}}var re=Qa||x||md&&nd(3.6); +function se(a){if(re||!a.href)return!1;if(!md)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=D(E(a)),c=b.location.href;a=te(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function ye(a){if(a.n&&Ed(a.d)){var b=a.n,c=Id(a.d);if(!c||b.multiple)a.d.selected=!c,(!Qa||!b.multiple||Ob&&nd(28)||Nb&&nd(4))&&ue(b,ve)}}var ze=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/; +function te(a,b){var c=b.match(ze);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function $d(){this.Ja=0}$d.prototype.l=function(a){return 0!=(this.Ja&a)};var fe={};function ae(){}ae.prototype.o=function(a,b,c){return ue(a,b,c)};ae.prototype.da=function(a,b,c){return ue(a,b,c)}; +ae.prototype.q=function(a,b,c){return ue(a,b,c)};var Ae=!(A&&!U(10))&&!x,Be=Nb?!nd(4):!pd,Ce=A&&ma.navigator.msPointerEnabled;function De(a,b,c){this.e=a;this.L=b;this.M=c}De.prototype.create=function(a){a=E(a);td?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.L,this.M));return a};De.prototype.toString=h("e");function Z(a,b,c){De.call(this,a,b,c)}u(Z,De); +Z.prototype.create=function(a,b){if(!B&&this==Ee)throw new w(9,"Browser does not support a mouse pixel scroll event.");var c=E(a),d;if(td){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ce||this==be)if(Object.defineProperty){var e=this==ce;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget: +a)}else d.relatedTarget=b.relatedTarget;this==Fe&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=D(c);d=c.createEvent("MouseEvents");var f=1;this==Fe&&(B||(d.wheelDelta=b.wheelDelta),B||x)&&(f=b.wheelDelta/-40);B&&this==Ee&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.L,this.M,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=Ab(a?new zb(E(a)):hb||(hb=new zb)), +c=zd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function Ge(a,b,c){De.call(this,a,b,c)}u(Ge,De); +Ge.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!Ae)throw new w(9,"Browser does not support firing touch events.");var e=E(a),f=D(e),g=Be?d(b.changedTouches): +c(b.changedTouches),k=b.touches==b.changedTouches?g:Be?d(b.touches):c(b.touches),m=b.targetTouches==b.changedTouches?g:Be?d(b.targetTouches):c(b.targetTouches),r;Be?(r=e.createEvent("MouseEvents"),r.initMouseEvent(this.e,this.L,this.M,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),r.touches=k,r.targetTouches=m,r.changedTouches=g,r.scale=b.scale,r.rotation=b.rotation):(r=e.createEvent("TouchEvent"),Nb?r.initTouchEvent(k,m,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey, +b.altKey,b.shiftKey,b.metaKey):r.initTouchEvent(this.e,this.L,this.M,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,m,g,b.scale,b.rotation),r.relatedTarget=b.relatedTarget);return r};function He(a,b,c){De.call(this,a,b,c)}u(He,De); +He.prototype.create=function(a,b){if(!Ce)throw new w(9,"Browser does not support MSPointer events.");var c=E(a),d=D(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.L,this.M,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ka,b.rotation,b.Na,b.Oa,b.pointerId,b.pointerType,0,b.Ba);return c}; +var ve=new De("change",!0,!1),xe=new De("focus",!1,!1),de=new Z("click",!0,!0),me=new Z("contextmenu",!0,!0),ee=new Z("mousedown",!0,!0),ne=new Z("mousemove",!0,!1),ce=new Z("mouseout",!0,!0),be=new Z("mouseover",!0,!0),pe=new Z("mouseup",!0,!0),Fe=new Z(B?"DOMMouseScroll":"mousewheel",!0,!0),Ee=new Z("MozMousePixelScroll",!0,!0),Ie=new Ge("touchend",!0,!0),ie=new Ge("touchmove",!0,!0),he=new Ge("touchstart",!0,!0),Je=new He("MSGotPointerCapture",!0,!1),Ke=new He("MSLostPointerCapture",!0,!1),Le= +new He("MSPointerCancel",!0,!0),le=new He("MSPointerDown",!0,!0),oe=new He("MSPointerMove",!0,!0),je=new He("MSPointerOver",!0,!0),ke=new He("MSPointerOut",!0,!0),Me=new He("MSPointerUp",!0,!0);function ue(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return td?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function Ne(a,b){this.C={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Ne)for(d=Oe(a),Pe(a),e=[],c=0;c<a.i.length;c++)e.push(a.C[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}l=Ne.prototype;l.N=0;l.xa=0;function Oe(a){Pe(a);return a.i.concat()} +l.remove=function(a){return Object.prototype.hasOwnProperty.call(this.C,a)?(delete this.C[a],this.N--,this.xa++,this.i.length>2*this.N&&Pe(this),!0):!1};function Pe(a){if(a.N!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.C,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.N!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}} +l.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.C,a)?this.C[a]:b};l.set=function(a,b){Object.prototype.hasOwnProperty.call(this.C,a)||(this.N++,this.i.push(a),this.xa++);this.C[a]=b};var Qe={};function $(a,b,c){ga(a)&&(a=B?a.b:x?a.opera:a.c);a=new Re(a,b,c);!b||b in Qe&&!c||(Qe[b]={key:a,shift:!1},c&&(Qe[c]={key:a,shift:!0}));return a}function Re(a,b,c){this.code=a;this.za=b||null;this.Sa=c||this.za}$(8);$(9);$(13);var Se=$(16),Te=$(17),Ue=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","("); +$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Ve=$(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); +$(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});$(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Ta?56:42},"*"); +$({b:107,c:107,opera:Ta?61:43},"+");$({b:109,c:109,opera:Ta?109:45},"-");$({b:110,c:110,opera:Ta?190:78},".");$({b:111,c:111,opera:Ta?191:47},"/");$(Ta&&x?null:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var We=new Ne; +We.set(1,Se);We.set(2,Te);We.set(4,Ue);We.set(8,Ve);(function(a){var b=new Ne;v(Oe(a),function(c){b.set(a.get(c).code,c)});return b})(We);B&&U(12);function Xe(){Yd.call(this);this.v=new ib(0,0);this.U=new ib(0,0)}u(Xe,Yd);l=Xe.prototype;l.O=!1;l.T=!1;l.H=0;l.S=0;l.Pa=2; +l.move=function(a,b,c){var d=this.I();this.l()&&!ud||Zd(this,a);var e=Qd(a);this.v.x=b.x+e.left;this.v.y=b.y+e.top;p(c)&&(this.U.x=c.x+e.left,this.U.y=c.y+e.top);this.l()&&(ud?this.T||(a!=d&&(this.O=!0),Ze(a)?$e(this,af):(this.q(ke,b,-1,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.o(ce,b,0),this.q(Le,b,0,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.T=!0,fe={})):(this.O=!0,Ye(this,ie)))};l.l=function(){return!!this.H}; +function Ye(a,b){if(!a.l())throw new w(13,"Should never fire event when touchscreen is not pressed.");var c,d;a.S&&(c=a.S,d=a.U);a.da(b,a.H,a.v,c,d)}function $e(a,b){b(a,a.I(),a.v,a.H,!0);a.S&&Ze(a.I())&&b(a,a.I(),a.U,a.S,!1)}function bf(a,b,c,d,e){a.o(ne,c,0);a.q(je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(be,c,0);a.q(le,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ee,c,0)&&(Hd(b)&&a.q(Je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e),we(a))} +function cf(a,b,c,d,e){a.q(Me,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(pe,c,0,null,0,!1,d);a.O||(ye(a),wd&&W(b,"OPTION")||qe(a,a.v,d));Hd(b)&&a.q(Ke,new ib(0,0),0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!1);a.q(ke,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ce,c,0,null,0,!1,d)}function af(a,b,c,d,e){a.q(oe,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ne,c,0,null,0,!1,d)} +function Ze(a){if(!ud)throw Error("hasMsTouchActionsEnable should only be called from IE 10");if("none"==X(a,"ms-touch-action"))return!0;a=Od(a);return!!a&&Ze(a)};function df(a,b){this.x=a;this.y=b}u(df,ib);df.prototype.scale=ib.prototype.scale;df.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ef(a,b,c){if(!Fd(a,!0))throw new w(11,"Element is not currently visible and may not be manipulated");b:{var d=b||void 0;if("scroll"==Rd(a,d)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Rd(a,d)))break b;for(var e=Ud(a,d),f=Od(a);f;f=Od(f)){var g=f,k=Qd(g),m;var r=g;if(A&&!C(9)){var y=Cd(r,"borderLeft");m=Cd(r,"borderRight");var s=Cd(r,"borderTop"),r=Cd(r,"borderBottom");m=new xd(s,m,r,y)}else y=yd(r,"borderLeftWidth"),m=yd(r,"borderRightWidth"),s=yd(r,"borderTopWidth"),r=yd(r,"borderBottomWidth"), +m=new xd(parseFloat(s),parseFloat(m),parseFloat(r),parseFloat(y));y=e.left-k.left-m.left;k=e.top-k.top-m.top;m=g.clientHeight+e.top-e.bottom;g.scrollLeft+=Math.min(y,Math.max(y-(g.clientWidth+e.left-e.right),0));g.scrollTop+=Math.min(k,Math.max(k-m,0))}Rd(a,d)}}b?b=new df(b.x,b.y):(b=ff(a),b=new df(b.width/2,b.height/2));c=c||new Xe;c.move(a,b);if(c.l())throw new w(13,"Cannot press touchscreen when already pressed.");c.O=!1;c.H=c.Pa++;ud?$e(c,bf):Ye(c,he);if(!c.l())throw new w(13,"Cannot release touchscreen when not already pressed."); +ud?c.T||$e(c,cf):(Ye(c,Ie),c.O||(c.o(ne,c.v,0),c.o(ee,c.v,0)&&we(c),ye(c),c.o(pe,c.v,0),wd&&W(c.I(),"OPTION")||qe(c,c.v)));fe={};c.H=0;c.S=0;c.T=!1} +function ff(a){var b;if("none"!=(yd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=Ad(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=Ad(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:ff(a.offsetParent)};function gf(){this.Y=void 0} +function hf(a,b,c){switch(typeof b){case "string":jf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],hf(a,a.Y?a.Y.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +jf(f,c),c.push(":"),hf(a,a.Y?a.Y.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var kf={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},lf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function jf(a,b){b.push('"',a.replace(lf,function(a){if(a in kf)return kf[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return kf[a]=e+b.toString(16)}),'"')};Qa||x||B&&U(3.5)||A&&U(8);function mf(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,mf);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=nf(a);return b}if("document"in a)return b={},b.WINDOW=nf(a),b;if(da(a))return ra(a,mf);a=kb(a,function(a,b){return ea(b)||t(b)});return lb(a,mf);default:return null}} +function of(a,b){return"array"==ca(a)?ra(a,function(a){return of(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?pf(a.ELEMENT,b):"WINDOW"in a?pf(a.WINDOW,b):lb(a,function(a){return of(a,b)}):a}function qf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ha=la());b.ha||(b.ha=la());return b}function nf(a){var b=qf(a.ownerDocument),c=mb(b,function(b){return b==a});c||(c=":wdc:"+b.ha++,b[c]=a);return c} +function pf(a,b){a=decodeURIComponent(a);var c=b||document,d=qf(c);if(!(a in d))throw new w(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new w(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new w(10,"Element is no longer attached to the DOM");};function rf(a,b){var c=[a,b],d=ef,e;try{var d=t(d)?new ma.Function(d):ma==window?d:new ma.Function("return ("+d+").apply(null,arguments);"),f=of(c,ma.document),g=d.apply(null,f);e={status:0,value:mf(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];hf(new gf,e,c);return c.join("")}var sf=["_"],tf=n;sf[0]in tf||!tf.execScript||tf.execScript("var "+sf[0]);for(var uf;sf.length&&(uf=sf.shift());)sf.length||void 0===rf?tf=tf[uf]?tf[uf]:tf[uf]={}:tf[uf]=rf;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/third_party/webdriver-atoms/type.js b/src/ghostdriver/third_party/webdriver-atoms/type.js index 095762b6f..a6ea13fac 100644 --- a/src/ghostdriver/third_party/webdriver-atoms/type.js +++ b/src/ghostdriver/third_party/webdriver-atoms/type.js @@ -1,120 +1,132 @@ -function(){return function(){function h(a){throw a;}var k=void 0,l=!0,m=null,p=!1;function q(a){return function(){return this[a]}}function aa(a){return function(){return a}}var r,s=this; -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"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function v(a){return a!==k}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function w(a){return"string"==typeof a}function fa(a){return"function"==ba(a)}function ga(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}var ha="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ia=0,ja=Date.now||function(){return+new Date}; -function x(a,b){function c(){}c.prototype=b.prototype;a.La=b.prototype;a.prototype=new c;a.prototype.constructor=a};var ka=window;function la(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ma(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} -function na(a,b){for(var c=0,d=ma(String(a)).split("."),e=ma(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var n=d[g]||"",u=e[g]||"",t=RegExp("(\\d*)(\\D*)","g"),M=RegExp("(\\d*)(\\D*)","g");do{var da=t.exec(n)||["","",""],ea=M.exec(u)||["","",""];if(0==da[0].length&&0==ea[0].length)break;c=((0==da[1].length?0:parseInt(da[1],10))<(0==ea[1].length?0:parseInt(ea[1],10))?-1:(0==da[1].length?0:parseInt(da[1],10))>(0==ea[1].length?0:parseInt(ea[1],10))?1:0)||((0==da[2].length)< -(0==ea[2].length)?-1:(0==da[2].length)>(0==ea[2].length)?1:0)||(da[2]<ea[2]?-1:da[2]>ea[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function y(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=w(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var n=f[g];b.call(k,n,g,a)&&(d[e++]=n)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=w(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(k,e[f],f,a));return d}function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;y(a,function(c,f){d=b.call(k,d,c,f,a)});return d} -function ta(a,b){for(var c=a.length,d=w(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a))return l;return p}function ua(a,b){var c;a:{c=a.length;for(var d=w(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(k,d[e],e,a)){c=e;break a}c=-1}return 0>c?m:w(a)?a.charAt(c):a[c]}function va(a,b){var c;a:if(w(a))c=!w(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function wa(a){return pa.concat.apply(pa,arguments)} -function xa(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var ya={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", +function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var l,m=this; +function ca(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"; +else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ha="closure_uid_"+(1E9*Math.random()>>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)} +function ka(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)}}function la(a,b,c){la=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ja:ka;return la.apply(null,arguments)} +function ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var na=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.Ra=b.prototype;a.prototype=new c;a.prototype.constructor=a};var oa=window;function pa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function qa(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")} +function ra(a,b){for(var c=0,d=qa(String(a)).split("."),e=qa(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",x=RegExp("(\\d*)(\\D*)","g"),T=RegExp("(\\d*)(\\D*)","g");do{var u=x.exec(k)||["","",""],q=T.exec(r)||["","",""];if(0==u[0].length&&0==q[0].length)break;c=((0==u[1].length?0:parseInt(u[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==u[1].length?0:parseInt(u[1],10))>(0==q[1].length?0:parseInt(q[1],10))?1:0)||((0==u[2].length)<(0==q[2].length)? +-1:(0==u[2].length)>(0==q[2].length)?1:0)||(u[2]<q[2]?-1:u[2]>q[2]?1:0)}while(0==c)}return c}function sa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var ta=Array.prototype;function t(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function ua(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function va(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} +function wa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function xa(a,b){for(var c=a.length,d=p(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 ya(a,b){for(var c=a.length,d=p(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 za(a,b){var c;a:{c=a.length;for(var d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:p(a)?a.charAt(c):a[c]}function Aa(a,b){var c;a:if(p(a))c=p(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function Ba(a){return ta.concat.apply(ta,arguments)}function Ca(a,b,c){return 2>=arguments.length?ta.slice.call(a,b):ta.slice.call(a,b,c)};var Da={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", 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", 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", -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:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -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:"#d87093",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", -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"};var za="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),Aa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Ba(a){Ca.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(Aa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; -function Ea(a){var b=a.match(Da);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var Fa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ga(a){var b=a.match(Fa);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function z(a,b){this.code=a;this.state=Ha[a]||Ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}x(z,Error); -var Ia="unknown error",Ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", -"0":"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ha[13]=Ia;Ha[9]="unknown command";z.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa,Pa;function Qa(){return s.navigator?s.navigator.userAgent:m}Na=Ma=La=Ka=Ja=p;var Ra;if(Ra=Qa()){var Sa=s.navigator;Ja=0==Ra.indexOf("Opera");Ka=!Ja&&-1!=Ra.indexOf("MSIE");Ma=(La=!Ja&&-1!=Ra.indexOf("WebKit"))&&-1!=Ra.indexOf("Mobile");Na=!Ja&&!La&&"Gecko"==Sa.product}var A=Ja,B=Ka,C=Na,D=La,Ta=Ma,Ua,Va=s.navigator;Ua=Va&&Va.platform||"";Oa=-1!=Ua.indexOf("Mac");Pa=-1!=Ua.indexOf("Win");var Wa=-1!=Ua.indexOf("Linux");function Xa(){var a=s.document;return a?a.documentMode:k}var Ya; -a:{var Za="",$a;if(A&&s.opera)var ab=s.opera.version,Za="function"==typeof ab?ab():ab;else if(C?$a=/rv\:([^\);]+)(\)|;)/:B?$a=/MSIE\s+([^\);]+)(\)|;)/:D&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Qa()),Za=bb?bb[1]:"";if(B){var cb=Xa();if(cb>parseFloat(Za)){Ya=String(cb);break a}}Ya=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Ya,a))}function fb(a){return B&&gb>=a}var hb=s.document,gb=!hb||!B?k:Xa()||("CSS1Compat"==hb.compatMode?parseInt(Ya,10):5);var ib;!C&&!B||B&&fb(9)||C&&eb("1.9.1");B&&eb("9");var jb=B||A||D;function kb(a,b){this.x=v(a)?a:0;this.y=v(b)?b:0}kb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function lb(a,b){this.width=a;this.height=b}r=lb.prototype;r.toString=function(){return"("+this.width+" x "+this.height+")"};r.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};r.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};r.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};r.scale=function(a){this.width*=a;this.height*=a;return this};function mb(a,b){var c={},d;for(d in a)b.call(k,a[d],d,a)&&(c[d]=a[d]);return c}function nb(a,b){var c={},d;for(d in a)c[d]=b.call(k,a[d],d,a);return c}function ob(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function pb(a,b){for(var c in a)if(b.call(k,a[c],c,a))return c};var qb=3;function E(a){return a?new rb(F(a)):ib||(ib=new rb)}function sb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function tb(a){if(jb)return a.parentElement;a=a.parentNode;return ga(a)&&1==a.nodeType?a:m}function ub(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function vb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!fb(9)){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?wb(a,b):!c&&ub(e,b)?-1*xb(a,b):!d&&ub(f,a)?xb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); -c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(s.Range.START_TO_END,d)}function xb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return wb(d,a)}function wb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function yb(a,b){var c=[];return zb(a,b,c,l)?c[0]:k} -function zb(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||zb(a,b,c,d))return l;a=a.nextSibling}return p}var Ab={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Bb={IMG:" ",BR:"\n"};function Cb(a,b,c){if(!(a.nodeName in Ab))if(a.nodeType==qb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Bb)b.push(Bb[a.nodeName]);else for(a=a.firstChild;a;)Cb(a,b,c),a=a.nextSibling} -function Db(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function rb(a){this.P=a||s.document||document}rb.prototype.e=function(a){return w(a)?this.P.getElementById(a):a}; -function Eb(a,b,c,d){a=d||a.P;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&va(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} -function Fb(a){var b=a.P;a=!D&&"CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new kb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}rb.prototype.contains=ub;var Gb,Hb,Ib,Jb,Kb,Lb,Mb;Mb=Lb=Kb=Jb=Ib=Hb=Gb=p;var Nb=Qa();Nb&&(-1!=Nb.indexOf("Firefox")?Gb=l:-1!=Nb.indexOf("Camino")?Hb=l:-1!=Nb.indexOf("iPhone")||-1!=Nb.indexOf("iPod")?Ib=l:-1!=Nb.indexOf("iPad")?Jb=l:-1!=Nb.indexOf("Android")?Kb=l:-1!=Nb.indexOf("Chrome")?Lb=l:-1!=Nb.indexOf("Safari")&&(Mb=l));var Ob=Gb,Pb=Hb,Qb=Ib,Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb;function Vb(a,b,c){this.i=a;this.Ha=b||1;this.r=c||1};var Wb=B&&!fb(9),Xb=B&&!fb(8);function Yb(a,b,c,d,e){this.i=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ka=e;this.parentNode=b}function Zb(a,b,c){var d=Xb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Yb(b,a,b.nodeName,d,c)};function $b(a){this.fa=a;this.R=0}function ac(a){a=a.match(bc);for(var b=0;b<a.length;b++)cc.test(a[b])&&a.splice(b,1);return new $b(a)}var bc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),cc=/^\s/;function G(a,b){return a.fa[a.R+(b||0)]}$b.prototype.next=function(){return this.fa[this.R++]};$b.prototype.back=function(){this.R--};$b.prototype.empty=function(){return this.fa.length<=this.R};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(Wb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Wb&&"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} -function dc(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return p}catch(d){return p}Xb&&"class"==b&&(b="className");return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ec(a,b,c,d,e){return(Wb?fc:gc).call(m,a,b,w(c)?c:m,w(d)?d:m,e||new I)} -function fc(a,b,c,d,e){if(a instanceof hc||8==a.f||c&&a.f===m){var f=b.all;if(!f)return e;a=ic(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],n=0;b=f[n++];)dc(b,c,d)&&g.push(b);f=g}for(n=0;b=f[n++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}jc(a,b,c,d,e);return e} -function gc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),y(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),y(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof kc?jc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),y(b,function(a){dc(a,c,d)&&e.add(a)}));return e} -function lc(a,b,c,d,e){var f;if((a instanceof hc||8==a.f||c&&a.f===m)&&(f=b.childNodes)){var g=ic(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return dc(a,c,d)}));y(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return mc(a,b,c,d,e)}function mc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)dc(b,c,d)&&a.matches(b)&&e.add(b);return e} -function jc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)dc(b,c,d)&&a.matches(b)&&e.add(b),jc(a,b,c,d,e)}function ic(a){if(a instanceof kc){if(8==a.f)return"!";if(a.f===m)return"*"}return a.getName()};function I(){this.r=this.m=m;this.M=0}function nc(a){this.v=a;this.next=this.F=m}function oc(a,b){if(a.m){if(!b.m)return a}else return b;for(var c=a.m,d=b.m,e=m,f=m,g=0;c&&d;)c.v==d.v||c.v instanceof Yb&&d.v instanceof Yb&&c.v.i==d.v.i?(f=c,c=c.next,d=d.next):0<vb(c.v,d.v)?(f=d,d=d.next):(f=c,c=c.next),(f.F=e)?e.next=f:a.m=f,e=f,g++;for(f=c||d;f;)f.F=e,e=e.next=f,g++,f=f.next;a.r=e;a.M=g;return a} -I.prototype.unshift=function(a){a=new nc(a);a.next=this.m;this.r?this.m.F=a:this.m=this.r=a;this.m=a;this.M++};I.prototype.add=function(a){a=new nc(a);a.F=this.r;this.m?this.r.next=a:this.m=this.r=a;this.r=a;this.M++};function pc(a){return(a=a.m)?a.v:m}I.prototype.w=q("M");function qc(a){return(a=pc(a))?H(a):""}function rc(a,b){return new sc(a,!!b)}function sc(a,b){this.Ea=a;this.ha=(this.G=b)?a.r:a.m;this.aa=m} -sc.prototype.next=function(){var a=this.ha;if(a==m)return m;var b=this.aa=a;this.ha=this.G?a.F:a.next;return b.v};sc.prototype.remove=function(){var a=this.Ea,b=this.aa;b||h(Error("Next must be called at least once before remove."));var c=b.F,b=b.next;c?c.next=b:a.m=b;b?b.F=c:a.r=c;a.M--;this.aa=m};function J(a){this.l=a;this.o=this.z=p;this.N=m}J.prototype.j=q("z");function tc(a,b){a.z=b}function uc(a,b){a.o=b}J.prototype.B=q("N");function K(a,b){var c=a.evaluate(b);return c instanceof I?+qc(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof I?qc(c):""+c}function vc(a,b){var c=a.evaluate(b);return c instanceof I?!!c.w():!!c};function wc(a,b,c){J.call(this,a.l);this.da=a;this.la=b;this.sa=c;this.z=b.j()||c.j();this.o=b.o||c.o;this.da==xc&&(!c.o&&!c.j()&&4!=c.l&&0!=c.l&&b.B()?this.N={name:b.B().name,H:c}:!b.o&&(!b.j()&&4!=b.l&&0!=b.l&&c.B())&&(this.N={name:c.B().name,H:b}))}x(wc,J); -function yc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof I&&c instanceof I){f=rc(b);for(b=f.next();b;b=f.next()){e=rc(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return p}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=rc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return p}return e? -"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}wc.prototype.evaluate=function(a){return this.da.u(this.la,this.sa,a)};wc.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.da+"\n";a+=" ";b+=this.la.toString(a)+"\n";return b+=this.sa.toString(a)};function zc(a,b,c,d){this.Ga=a;this.qa=b;this.l=c;this.u=d}zc.prototype.toString=q("Ga");var Ac={}; -function N(a,b,c,d){a in Ac&&h(Error("Binary operator already created: "+a));a=new zc(a,b,c,d);return Ac[a.toString()]=a}N("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});N("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)});N("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});N("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});N("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});N("<",4,2,function(a,b,c){return yc(function(a,b){return a<b},a,b,c)}); -N(">",4,2,function(a,b,c){return yc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return yc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return yc(function(a,b){return a>=b},a,b,c)});var xc=N("=",3,2,function(a,b,c){return yc(function(a,b){return a==b},a,b,c,l)});N("!=",3,2,function(a,b,c){return yc(function(a,b){return a!=b},a,b,c,l)});N("and",2,2,function(a,b,c){return vc(a,c)&&vc(b,c)});N("or",1,2,function(a,b,c){return vc(a,c)||vc(b,c)});function Bc(a,b){b.w()&&4!=a.l&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));J.call(this,a.l);this.ra=a;this.g=b;this.z=a.j();this.o=a.o}x(Bc,J);Bc.prototype.evaluate=function(a){a=this.ra.evaluate(a);return Cc(this.g,a)};Bc.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.ra.toString(a);return b+=this.g.toString(a)};function Dc(a,b){b.length<a.oa&&h(Error("Function "+a.p+" expects at least"+a.oa+" arguments, "+b.length+" given"));a.ba!==m&&b.length>a.ba&&h(Error("Function "+a.p+" expects at most "+a.ba+" arguments, "+b.length+" given"));a.Fa&&y(b,function(b,d){4!=b.l&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});J.call(this,a.l);this.Q=a;this.X=b;tc(this,a.z||ta(b,function(a){return a.j()}));uc(this,a.Da&&!b.length||a.Ca&&!!b.length||ta(b,function(a){return a.o}))}x(Dc,J); -Dc.prototype.evaluate=function(a){return this.Q.u.apply(m,wa(a,this.X))};Dc.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.Q+"\n";b+=" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=sa(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Ec(a,b,c,d,e,f,g,n,u){this.p=a;this.l=b;this.z=c;this.Da=d;this.Ca=e;this.u=f;this.oa=g;this.ba=v(n)?n:g;this.Fa=!!u}Ec.prototype.toString=q("p");var Fc={}; -function O(a,b,c,d,e,f,g,n){a in Fc&&h(Error("Function already created: "+a+"."));Fc[a]=new Ec(a,b,c,d,p,e,f,g,n)}O("boolean",2,p,p,function(a,b){return vc(b,a)},1);O("ceiling",1,p,p,function(a,b){return Math.ceil(K(b,a))},1);O("concat",3,p,p,function(a,b){var c=xa(arguments,1);return sa(c,function(b,c){return b+L(c,a)},"")},2,m);O("contains",2,p,p,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);O("count",1,p,p,function(a,b){return b.evaluate(a).w()},1,1,l);O("false",2,p,p,aa(p),0); -O("floor",1,p,p,function(a,b){return Math.floor(K(b,a))},1);O("id",4,p,p,function(a,b){function c(a){if(Wb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ua(b,function(b){return a==b.id})}return m}return e.getElementById(a)}var d=a.i,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];y(d,function(a){(a=c(a))&&!va(f,a)&&f.push(a)});f.sort(vb);var g=new I;y(f,function(a){g.add(a)});return g},1);O("lang",2,p,p,aa(p),1); -O("last",1,l,p,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.r},0);O("local-name",3,p,l,function(a,b){var c=b?pc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,l);O("name",3,p,l,function(a,b){var c=b?pc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,l);O("namespace-uri",3,l,p,aa(""),0,1,l);O("normalize-space",3,p,l,function(a,b){return(b?L(b,a):H(a.i)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); -O("not",2,p,p,function(a,b){return!vc(b,a)},1);O("number",1,p,l,function(a,b){return b?K(b,a):+H(a.i)},0,1);O("position",1,l,p,function(a){return a.Ha},0);O("round",1,p,p,function(a,b){return Math.round(K(b,a))},1);O("starts-with",2,p,p,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,p,l,function(a,b){return b?L(b,a):H(a.i)},0,1);O("string-length",1,p,l,function(a,b){return(b?L(b,a):H(a.i)).length},0,1); -O("substring",3,p,p,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,p,p,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); -O("substring-before",3,p,p,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,p,p,function(a,b){for(var c=rc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);O("translate",3,p,p,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(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);O("true",2,p,p,aa(l),0);function kc(a,b){this.wa=a;this.ma=v(b)?b:m;this.f=m;switch(a){case "comment":this.f=8;break;case "text":this.f=qb;break;case "processing-instruction":this.f=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Gc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}kc.prototype.matches=function(a){return this.f===m||this.f==a.nodeType};kc.prototype.getName=q("wa"); -kc.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.wa;this.ma===m||(b+="\n"+this.ma.toString(a+" "));return b};function Hc(a){J.call(this,3);this.va=a.substring(1,a.length-1)}x(Hc,J);Hc.prototype.evaluate=q("va");Hc.prototype.toString=function(a){return(a||"")+"literal: "+this.va};function hc(a){this.p=a.toLowerCase()}hc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.p||this.p==a.nodeName.toLowerCase()?l:this.p==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};hc.prototype.getName=q("p");hc.prototype.toString=function(a){return(a||"")+"nametest: "+this.p};function Ic(a){J.call(this,1);this.xa=a}x(Ic,J);Ic.prototype.evaluate=q("xa");Ic.prototype.toString=function(a){return(a||"")+"number: "+this.xa};function Jc(a,b){J.call(this,a.l);this.ja=a;this.O=b;this.z=a.j();this.o=a.o;if(1==this.O.length){var c=this.O[0];!c.Z&&c.A==Kc&&(c=c.V,"*"!=c.getName()&&(this.N={name:c.getName(),H:m}))}}x(Jc,J);function Lc(){J.call(this,4)}x(Lc,J);Lc.prototype.evaluate=function(a){var b=new I;a=a.i;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Lc.prototype.toString=function(a){return a+"RootHelperExpr"};function Mc(){J.call(this,4)}x(Mc,J);Mc.prototype.evaluate=function(a){var b=new I;b.add(a.i);return b}; -Mc.prototype.toString=function(a){return a+"ContextHelperExpr"}; -Jc.prototype.evaluate=function(a){var b=this.ja.evaluate(a);b instanceof I||h(Error("FilterExpr must evaluate to nodeset."));a=this.O;for(var c=0,d=a.length;c<d&&b.w();c++){var e=a[c],f=rc(b,e.A.G),g;if(!e.j()&&e.A==Nc){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Vb(g))}else if(!e.j()&&e.A==Oc)g=f.next(),b=e.evaluate(new Vb(g));else{g=f.next();for(b=e.evaluate(new Vb(g));(g=f.next())!=m;)g=e.evaluate(new Vb(g)),b=oc(b,g)}}return b}; -Jc.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.ja.toString(b);this.O.length&&(c+=b+"Steps:\n",b+=" ",y(this.O,function(a){c+=a.toString(b)}));return c};function Pc(a,b){this.g=a;this.G=!!b}function Cc(a,b,c){for(c=c||0;c<a.g.length;c++)for(var d=a.g[c],e=rc(b),f=b.w(),g,n=0;g=e.next();n++){var u=a.G?f-n:n+1;g=d.evaluate(new Vb(g,u,f));var t;"number"==typeof g?t=u==g:"string"==typeof g||"boolean"==typeof g?t=!!g:g instanceof I?t=0<g.w():h(Error("Predicate.evaluate returned an unexpected type."));t||e.remove()}return b}Pc.prototype.B=function(){return 0<this.g.length?this.g[0].B():m}; -Pc.prototype.j=function(){for(var a=0;a<this.g.length;a++){var b=this.g[a];if(b.j()||1==b.l||0==b.l)return l}return p};Pc.prototype.w=function(){return this.g.length};Pc.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return sa(this.g,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Qc(a,b,c,d){J.call(this,4);this.A=a;this.V=b;this.g=c||new Pc([]);this.Z=!!d;b=this.g.B();a.Ja&&b&&(a=b.name,a=Wb?a.toLowerCase():a,this.N={name:a,H:b.H});this.z=this.g.j()}x(Qc,J); -Qc.prototype.evaluate=function(a){var b=a.i,c=m,c=this.B(),d=m,e=m,f=0;c&&(d=c.name,e=c.H?L(c.H,a):m,f=1);if(this.Z)if(!this.j()&&this.A==Rc)c=ec(this.V,b,d,e),c=Cc(this.g,c,f);else if(a=rc((new Qc(Sc,new kc("node"))).evaluate(a)),b=a.next())for(c=this.u(b,d,e,f);(b=a.next())!=m;)c=oc(c,this.u(b,d,e,f));else c=new I;else c=this.u(a.i,d,e,f);return c};Qc.prototype.u=function(a,b,c,d){a=this.A.Q(this.V,a,b,c);return a=Cc(this.g,a,d)}; -Qc.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.Z?"//":"/")+"\n";this.A.p&&(b+=a+"Axis: "+this.A+"\n");b+=this.V.toString(a);if(this.g.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.g.length;c++)var d=c<this.g.length-1?", ":"",b=b+(this.g[c].toString(a)+d);return b};function Tc(a,b,c,d){this.p=a;this.Q=b;this.G=c;this.Ja=d}Tc.prototype.toString=q("p");var Uc={}; -function P(a,b,c,d){a in Uc&&h(Error("Axis already created: "+a));b=new Tc(a,b,c,!!d);return Uc[a]=b}P("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);P("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l); -var Kc=P("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&Wb)return c.add(new Yb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof kc&&a.f===m||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Wb?g.nodeValue&&c.add(Zb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Wb?g.nodeValue&&c.add(Zb(b,g,b.sourceIndex)):c.add(g));return c},p),Rc=P("child",function(a,b,c,d,e){return(Wb?lc:mc).call(m,a,b,w(c)?c:m,w(d)?d:m,e||new I)},p,l); -P("descendant",ec,p,l);var Sc=P("descendant-or-self",function(a,b,c,d){var e=new I;dc(b,c,d)&&a.matches(b)&&e.add(b);return ec(a,b,c,d,e)},p,l),Nc=P("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)dc(f,c,d)&&a.matches(f)&&e.add(f),e=ec(a,f,c,d,e);while(b=b.parentNode);return e},p,l);P("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},p);P("namespace",function(){return new I},p); -var Vc=P("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},p),Oc=P("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,n=f.length;g<n;g++){var u=[];for(b=f[g];b=b.previousSibling;)u.unshift(b);for(var t=0,M=u.length;t<M;t++)b=u[t],dc(b,c,d)&&a.matches(b)&&e.add(b),e=ec(a,b,c,d,e)}return e},l,l); -P("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);var Wc=P("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},p);function Xc(a){J.call(this,1);this.ia=a;this.z=a.j();this.o=a.o}x(Xc,J);Xc.prototype.evaluate=function(a){return-K(this.ia,a)};Xc.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.ia.toString(a+" ")};function Yc(a){J.call(this,4);this.S=a;tc(this,ta(this.S,function(a){return a.j()}));uc(this,ta(this.S,function(a){return a.o}))}x(Yc,J);Yc.prototype.evaluate=function(a){var b=new I;y(this.S,function(c){c=c.evaluate(a);c instanceof I||h(Error("PathExpr must evaluate to NodeSet."));b=oc(b,c)});return b};Yc.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";y(this.S,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Zc(a){this.a=a}function $c(a){for(var b,c=[];;){Q(a,"Missing right hand side of binary expression.");b=ad(a);var d=a.a.next();if(!d)break;var e=(d=Ac[d]||m)&&d.qa;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].qa;)b=new wc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new wc(c.pop(),c.pop(),b);return b}function Q(a,b){a.a.empty()&&h(Error(b))}function bd(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} -function cd(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function dd(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Hc(a)}function ed(a){return"*"!=G(a.a)&&":"==G(a.a,1)&&"*"==G(a.a,2)?new hc(a.a.next()+a.a.next()+a.a.next()):new hc(a.a.next())} -function fd(a){var b,c=[],d;if("/"==G(a.a)||"//"==G(a.a)){b=a.a.next();d=G(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Lc;d=new Lc;Q(a,"Missing next location step.");b=gd(a,b);c.push(b)}else{a:{b=G(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=$c(a);Q(a,'unclosed "("');bd(a,")");break;case '"':case "'":b=dd(a);break;default:if(isNaN(+b))if(!Gc(b)&&/(?![0-9])[\w]/.test(d)&& -"("==G(a.a,1)){b=a.a.next();b=Fc[b]||m;a.a.next();for(d=[];")"!=G(a.a);){Q(a,"Missing function argument list.");d.push($c(a));if(","!=G(a.a))break;a.a.next()}Q(a,"Unclosed function argument list.");cd(a);b=new Dc(b,d)}else{b=m;break a}else b=new Ic(+a.a.next())}"["==G(a.a)&&(d=new Pc(hd(a)),b=new Bc(b,d))}if(b)if("/"==G(a.a)||"//"==G(a.a))d=b;else return b;else b=gd(a,"/"),d=new Mc,c.push(b)}for(;"/"==G(a.a)||"//"==G(a.a);)b=a.a.next(),Q(a,"Missing next location step."),b=gd(a,b),c.push(b);return new Jc(d, -c)} -function gd(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==G(a.a))return d=new Qc(Wc,new kc("node")),a.a.next(),d;if(".."==G(a.a))return d=new Qc(Vc,new kc("node")),a.a.next(),d;var f;"@"==G(a.a)?(f=Kc,a.a.next(),Q(a,"Missing attribute name")):"::"==G(a.a,1)?(/(?![0-9])[\w]/.test(G(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Uc[e]||m)||h(Error("No axis with name: "+e)),a.a.next(),Q(a,"Missing node name")):f=Rc;e=G(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==G(a.a, -1)){Gc(e)||h(Error("Invalid node type: "+e));c=a.a.next();Gc(c)||h(Error("Invalid type name: "+c));bd(a,"(");Q(a,"Bad nodetype");e=G(a.a).charAt(0);var g=m;if('"'==e||"'"==e)g=dd(a);Q(a,"Bad nodetype");cd(a);c=new kc(c,g)}else c=ed(a);else"*"==e?c=ed(a):h(Error("Bad token: "+a.a.next()));e=new Pc(hd(a),f.G);return d||new Qc(f,c,e,"//"==b)} -function hd(a){for(var b=[];"["==G(a.a);){a.a.next();Q(a,"Missing predicate expression.");var c=$c(a);b.push(c);Q(a,"Unclosed predicate expression.");bd(a,"]")}return b}function ad(a){if("-"==G(a.a))return a.a.next(),new Xc(ad(a));var b=fd(a);if("|"!=G(a.a))a=b;else{for(b=[b];"|"==a.a.next();)Q(a,"Missing next union location path."),b.push(fd(a));a.a.back();a=new Yc(b)}return a};function id(a){a.length||h(Error("Empty XPath expression."));a=ac(a);a.empty()&&h(Error("Invalid XPath expression."));var b=$c(new Zc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,d){var e=b.evaluate(new Vb(a));return new R(e,d)}} -function R(a,b){0==b&&(a instanceof I?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof I))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof I?qc(a):""+a;break;case 1:this.numberValue=a instanceof I?+qc(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.w():!!a;break;case 4:case 5:case 6:case 7:var d=rc(a);c=[]; -for(var e=d.next();e;e=d.next())c.push(e instanceof Yb?e.i:e);this.snapshotLength=a.w();this.invalidIteratorState=p;break;case 8:case 9:d=pc(a);this.singleNodeValue=d instanceof Yb?d.i:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?m:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?m:c[a]}} -R.ANY_TYPE=0;R.NUMBER_TYPE=1;R.STRING_TYPE=2;R.BOOLEAN_TYPE=3;R.UNORDERED_NODE_ITERATOR_TYPE=4;R.ORDERED_NODE_ITERATOR_TYPE=5;R.UNORDERED_NODE_SNAPSHOT_TYPE=6;R.ORDERED_NODE_SNAPSHOT_TYPE=7;R.ANY_UNORDERED_NODE_TYPE=8;R.FIRST_ORDERED_NODE_TYPE=9;function jd(a){a=a||s;var b=a.document;b.evaluate||(a.XPathResult=R,b.evaluate=function(a,b,e,f){return(new id(a)).evaluate(b,f)},b.createExpression=function(a){return new id(a)})};var S={};S.za=function(){var a={Ma:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();S.u=function(a,b,c){var d=F(a);(B||Sb)&&jd(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):S.za;return B&&!eb(7)?d.evaluate.call(d,b,a,e,c,m):d.evaluate(b,a,e,c,m)}catch(f){C&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new z(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; -S.Y=function(a,b){(!a||1!=a.nodeType)&&h(new z(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};S.C=function(a,b){var c=function(){var c=S.u(b,a,9);return c?(c=c.singleNodeValue,A?c:c||m):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c===m||S.Y(c,a);return c}; -S.s=function(a,b){var c=function(){var c=S.u(b,a,7);if(c){var e=c.snapshotLength;A&&!v(e)&&S.Y(m,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();y(c,function(b){S.Y(b,a)});return c};function kd(a){return(a=a.exec(Qa()))?a[1]:""}var ld=function(){if(Ob)return kd(/Firefox\/([0-9.]+)/);if(B||A)return Ya;if(Tb)return kd(/Chrome\/([0-9.]+)/);if(Ub)return kd(/Version\/([0-9.]+)/);if(Qb||Rb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Qa());if(a)return a[1]+"."+a[2]}else{if(Sb)return(a=kd(/Android\s+([0-9.]+)/))?a:kd(/Version\/([0-9.]+)/);if(Pb)return kd(/Camino\/([0-9.]+)/)}return""}();var md,nd;function T(a){return od?md(a):B?0<=na(gb,a):eb(a)}function pd(a){return od?nd(a):Sb?0<=na(qd,a):0<=na(ld,a)} -var od=function(){if(!C)return p;var a=s.Components;if(!a)return p;try{if(!a.classes)return p}catch(b){return p}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;md=function(a){return 0<=d.Aa(e,""+a)};nd=function(a){return 0<=d.Aa(f,""+a)};return l}(),rd=Rb||Qb,sd;if(Sb){var td=/Android\s+([0-9\.]+)/.exec(Qa());sd=td?td[1]:"0"}else sd="0"; -var qd=sd,ud=B&&!fb(8),vd=B&&!fb(9),wd=B&&!fb(10);Sb&&pd(2.3);!A&&(!D||T("533"));function xd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function yd(a,b){return xd(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}function zd(a){var b=a.getBoundingClientRect();B&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b} -function Ad(a){if(B&&!fb(8))return a.offsetParent;var b=F(a),c=yd(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=yd(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m} -function Bd(a){var b=new kb;if(1==a.nodeType){if(a.getBoundingClientRect){var c=zd(a);b.x=c.left;b.y=c.top}else{c=Fb(E(a));var d,e=F(a),f=yd(a,"position"),g=C&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),n=new kb(0,0),u;d=e?F(e):document;if(u=B)if(u=!fb(9))u="CSS1Compat"!=E(d).P.compatMode;u=u?d.body:d.documentElement;if(a!=u)if(a.getBoundingClientRect)d=zd(a),e=Fb(E(e)),n.x=d.left+e.x,n.y=d.top+e.y;else if(e.getBoxObjectFor&&!g)d= -e.getBoxObjectFor(a),e=e.getBoxObjectFor(u),n.x=d.screenX-e.screenX,n.y=d.screenY-e.screenY;else{g=a;do{n.x+=g.offsetLeft;n.y+=g.offsetTop;g!=a&&(n.x+=g.clientLeft||0,n.y+=g.clientTop||0);if(D&&"fixed"==yd(g,"position")){n.x+=e.body.scrollLeft;n.y+=e.body.scrollTop;break}g=g.offsetParent}while(g&&g!=a);if(A||D&&"absolute"==f)n.y-=e.body.offsetTop;for(g=a;(g=Ad(g))&&g!=e.body&&g!=u;)if(n.x-=g.scrollLeft,!A||"TR"!=g.tagName)n.y-=g.scrollTop}b.x=n.x-c.x;b.y=n.y-c.y}if(C&&!eb(12)){var t;B?t="-ms-transform": -D?t="-webkit-transform":A?t="-o-transform":C&&(t="-moz-transform");var M;t&&(M=yd(a,t));M||(M=yd(a,"transform"));M?(a=M.match(Cd),a=!a?new kb(0,0):new kb(parseFloat(a[1]),parseFloat(a[2]))):a=new kb(0,0);b=new kb(b.x+a.x,b.y+a.y)}}else t=fa(a.ka),M=a,a.targetTouches?M=a.targetTouches[0]:t&&a.ka().targetTouches&&(M=a.ka().targetTouches[0]),b.x=M.clientX,b.y=M.clientY;return b} -function Dd(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(!v(b)||d)&&a.getBoundingClientRect?(a=zd(a),new lb(a.right-a.left,a.bottom-a.top)):new lb(b,c)}var Cd=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Ed(a){var b;a:{a=F(a);try{b=a&&a.activeElement;break a}catch(c){}b=m}return b}function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Fd(a,b){var c;if(c=ud)if(c="value"==b)if(c=U(a,"OPTION"))c=Gd(a,"value")===m;c?(c=[],Cb(a,c,p),c=c.join("")):c=a[b];return c}var Hd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; -function Id(a){var b=[];y(a.split(Hd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return A?b.replace(/\w+:;/g,""):b}function Gd(a,b){b=b.toLowerCase();if("style"==b)return Id(a.style.cssText);if(ud&&"value"==b&&U(a,"INPUT"))return a.value;if(vd&&a[b]===l)return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:m}var Jd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); -function Kd(a){var b=a.tagName.toUpperCase();return!va(Jd,b)?l:Fd(a,"disabled")?p:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Kd(a.parentNode):Db(a,function(a){var b=a.parentNode;if(b&&U(b,"FIELDSET")&&Fd(b,"disabled")){if(!U(a,"LEGEND"))return l;for(;a=a.previousElementSibling!=k?a.previousElementSibling:sb(a.previousSibling);)if(U(a,"LEGEND"))return l}return p},l)?p:l}var Ld="text search tel url email password number".split(" "); -function Md(a){return U(a,"TEXTAREA")?l:U(a,"INPUT")?va(Ld,a.type.toLowerCase()):Nd(a)?l:p}function Nd(a){function b(a){return"inherit"==a.contentEditable?(a=Od(a))?b(a):p:"true"==a.contentEditable}return!v(a.contentEditable)?p:!B&&v(a.isContentEditable)?a.isContentEditable:b(a)}function Od(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return U(a)?a:m} -function V(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=vd?"styleFloat":"cssFloat";c=xd(a,c)||Pd(a,c);if(c===m)c=m;else if(va(za,b)&&(Ca.test("#"==c.charAt(0)?c:"#"+c)||Ga(c).length||ya&&ya[c.toLowerCase()]||Ea(c).length)){var d=Ea(c);if(!d.length){a:if(d=Ga(c),!d.length){d=ya[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(Ca.test(d)&&(d=Ba(d),d=Ba(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c= -4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function Pd(a,b){var c=a.currentStyle||a.style,d=c[b];!v(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?v(d)?d:m:(c=Od(a))?Pd(c,b):m} -function Qd(a){if(fa(a.getBBox)&&!U(a,"SVG"))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,"BODY")){b=(F(a)?F(a).parentWindow||F(a).defaultView:window)||k;"hidden"!=V(a,"overflow")?a=l:(a=Od(a),!a||!U(a,"HTML")?a=l:(a=V(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||ka).document;a=b.documentElement;var d=b.body;d||h(new z(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth, -d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new lb(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new lb(a.clientWidth,a.clientHeight);return a}if("none"!=yd(a,"display"))a=Dd(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Dd(a);b.display=d;b.position=f;b.visibility=e}return a} -function Rd(a,b){function c(a){if("none"==V(a,"display"))return p;a=Od(a);return!a||c(a)}function d(a){var b=Qd(a);return 0<b.height&&0<b.width?l:U(a,"PATH")&&(0<b.height||0<b.width)?(b=V(a,"stroke-width"),!!b&&0<parseInt(b,10)):ta(a.childNodes,function(b){return b.nodeType==qb&&"hidden"!=V(a,"overflow")||U(b)&&d(b)})}function e(a,b){var c;if((c=b==m?tb(a):tb(b))&&("hidden"==V(c,"overflow-x")||"hidden"==V(c,"overflow-y"))){var d=Qd(c),f=Bd(c),g=Bd(a);return f.x+d.width<=g.x&&"hidden"==V(c,"overflow-x")|| -f.y+d.height<=g.y&&"hidden"==V(c,"overflow-y")?p:l}return!c||e(a,c)}function f(a){var b=V(a,"-o-transform")||V(a,"-webkit-transform")||V(a,"-ms-transform")||V(a,"-moz-transform")||V(a,"transform");if(b&&"none"!==b)return b=Bd(a),a=Qd(a),0<=b.x+a.width&&0<=b.y+a.height?l:p;a=Od(a);return!a||f(a)}U(a)||h(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var g=Db(a,function(a){return U(a,"SELECT")});return!!g&&Rd(g,l)}if(U(a,"MAP")){if(!a.name)return p;g=F(a);g= -g.evaluate?S.C('/descendant::*[@usemap = "#'+a.name+'"]',g):yb(g,function(b){return U(b)&&Gd(b,"usemap")=="#"+a.name});return!!g&&Rd(g,b)}return U(a,"AREA")?(g=Db(a,function(a){return U(a,"MAP")}),!!g&&Rd(g,b)):U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==V(a,"visibility")||!c(a)||!b&&0==Sd(a)||!d(a)||!e(a,m)?p:f(a)}function Td(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function Ud(a){var b=[];Vd(a,b);b=ra(b,Td);return Td(b.join("\n")).replace(/\xa0/g," ")} -function Vd(a,b){if(U(a,"BR"))b.push("");else{var c=U(a,"TD"),d=V(a,"display"),e=!c&&!va(Wd,d),f=a.previousElementSibling!=k?a.previousElementSibling:sb(a.previousSibling),f=f?V(f,"display"):"",g=V(a,"float")||V(a,"cssFloat")||V(a,"styleFloat");e&&(!("run-in"==f&&"none"==g)&&!/^[\s\xa0]*$/.test(b[b.length-1]||""))&&b.push("");var n=Rd(a),u=m,t=m;n&&(u=V(a,"white-space"),t=V(a,"text-transform"));y(a.childNodes,function(a){a.nodeType==qb&&n?Xd(a,b,u,t):U(a)&&Vd(a,b)});f=b[b.length-1]||"";if((c||"table-cell"== -d)&&f&&!la(f))b[b.length-1]+=" ";e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var Wd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); -function Xd(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";la(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} -function Sd(a){if(wd){if("relative"==V(a,"position"))return 1;a=V(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Yd(a)}function Yd(a){var b=1,c=V(a,"opacity");c&&(b=Number(c));(a=Od(a))&&(b*=Yd(a));return b};var Zd={ga:function(a){return!(!a.querySelectorAll||!a.querySelector)},C:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));if(Zd.ga(b))return b.querySelector("."+a.replace(/\./g,"\\."))||m;var c=Eb(E(b),"*",a,b);return c.length?c[0]:m},s:function(a,b){a||h(Error("No class name specified"));a=ma(a);1<a.split(/\s+/).length&&h(Error("Compound class names not permitted"));return Zd.ga(b)?b.querySelectorAll("."+a.replace(/\./g, -"\\.")):Eb(E(b),"*",a,b)}};var $d={C:function(a,b){!fa(b.querySelector)&&(B&&T(8)&&!ga(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:m},s:function(a,b){!fa(b.querySelectorAll)&&(B&&T(8)&&!ga(b.querySelector))&&h(Error("CSS selection is not supported"));a||h(Error("No selector specified"));a=ma(a);return b.querySelectorAll(a)}};var ae={},be={};ae.ua=function(a,b,c){var d;try{d=$d.s("a",b)}catch(e){d=Eb(E(b),"A",m,b)}return ua(d,function(b){b=Ud(b);return c&&-1!=b.indexOf(a)||b==a})};ae.na=function(a,b,c){var d;try{d=$d.s("a",b)}catch(e){d=Eb(E(b),"A",m,b)}return qa(d,function(b){b=Ud(b);return c&&-1!=b.indexOf(a)||b==a})};ae.C=function(a,b){return ae.ua(a,b,p)};ae.s=function(a,b){return ae.na(a,b,p)};be.C=function(a,b){return ae.ua(a,b,l)};be.s=function(a,b){return ae.na(a,b,l)};var ce={C:function(a,b){return b.getElementsByTagName(a)[0]||m},s:function(a,b){return b.getElementsByTagName(a)}};var de={className:Zd,"class name":Zd,css:$d,"css selector":$d,id:{C:function(a,b){var c=E(b),d=c.e(a);if(!d)return m;if(Gd(d,"id")==a&&ub(b,d))return d;c=Eb(c,"*");return ua(c,function(c){return Gd(c,"id")==a&&ub(b,c)})},s:function(a,b){var c=Eb(E(b),"*",m,b);return qa(c,function(b){return Gd(b,"id")==a})}},linkText:ae,"link text":ae,name:{C:function(a,b){var c=Eb(E(b),"*",m,b);return ua(c,function(b){return Gd(b,"name")==a})},s:function(a,b){var c=Eb(E(b),"*",m,b);return qa(c,function(b){return Gd(b, -"name")==a})}},partialLinkText:be,"partial link text":be,tagName:ce,"tag name":ce,xpath:S};function ee(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=m}if(c){var d=de[c];if(d&&fa(d.s))return d.s(a[c],b||ka.document)}h(Error("Unsupported locator strategy: "+c))};function fe(a){this.t=ka.document.documentElement;this.ta=m;var b=Ed(this.t);b&&ge(this,b);this.Ba=a||new he}fe.prototype.e=q("t");function ge(a,b){a.t=b;a.ta=U(b,"OPTION")?Db(b,function(a){return U(a,"SELECT")}):m}D||A||od&&pd(3.6);function ie(a){return U(a,"FORM")} -function je(a){ie(a)||h(new z(12,"Element is not a form, so could not submit."));if(W(a,ke))if(U(a.submit))if(!B||T(8))a.constructor.prototype.submit.call(a);else{var b=ee({id:"submit"},a),c=ee({name:"submit"},a);y(b,function(a){a.removeAttribute("id")});y(c,function(a){a.removeAttribute("name")});a=a.submit;y(b,function(a){a.setAttribute("id","submit")});y(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}function he(){this.T=0}he.prototype.h=function(a){return 0!=(this.T&a)};var le=!(B&&!T(10))&&!A,me=Sb?!pd(4):!rd;function X(a,b,c){this.f=a;this.I=b;this.J=c}X.prototype.create=function(a){a=F(a);vd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.I,this.J));return a};X.prototype.toString=q("f");function ne(a,b,c){X.call(this,a,b,c)}x(ne,X); -ne.prototype.create=function(a,b){var c=F(a);if(C){var d=c?c.parentWindow||c.defaultView:window,e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.f,this.I,this.J,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.f==oe&&b.preventDefault&&c.preventDefault()}else vd?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.f,this.I,this.J)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode, -D&&(c.charCode=this==oe?c.keyCode:0);return c};function pe(a,b,c){X.call(this,a,b,c)}x(pe,X); -pe.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}le||h(new z(9,"Browser does not support firing touch events."));var e=F(a),f=e?e.parentWindow||e.defaultView: -window,g=me?d(b.changedTouches):c(b.changedTouches),n=b.touches==b.changedTouches?g:me?d(b.touches):c(b.touches),u=b.targetTouches==b.changedTouches?g:me?d(b.targetTouches):c(b.targetTouches),t;me?(t=e.createEvent("MouseEvents"),t.initMouseEvent(this.f,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),t.touches=n,t.targetTouches=u,t.changedTouches=g,t.scale=b.scale,t.rotation=b.rotation):(t=e.createEvent("TouchEvent"),Sb?t.initTouchEvent(n,u,g,this.f, -f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey):t.initTouchEvent(this.f,this.I,this.J,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,n,u,g,b.scale,b.rotation),t.relatedTarget=b.relatedTarget);return t}; -var qe=new X("blur",p,p),re=new X("change",l,p),se=new X("focus",p,p),te=new X("input",p,p),ke=new X("submit",l,l),ue=new X("textInput",l,l),ve=new ne("keydown",l,l),oe=new ne("keypress",l,l),we=new ne("keyup",l,l),xe=new pe("touchend",l,l),ye=new pe("touchstart",l,l);function W(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=p);return vd?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function ze(a,b){if(Ae(a))a.selectionStart=b;else if(B){var c=Be(a),d=c[0];d.inRange(c[1])&&(b=Ce(a,b),d.collapse(l),d.move("character",b),d.select())}} -function De(a,b){var c=0,d=0;if(Ae(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(B){var e=Be(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,n=e=c.text,u=p;!u;)0==f.compareEndPoints("StartToEnd",f)?u=l:(f.moveEnd("character",-1),f.text==g?d+="\r\n":u=l);if(b)f=[d.length,-1];else{for(f=p;!f;)0==c.compareEndPoints("StartToEnd",c)?f=l:(c.moveEnd("character",-1),c.text==e?n+="\r\n":f=l);f=[d.length,d.length+n.length]}return f}c= -f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Ee(a,b){if(Ae(a))a.selectionEnd=b;else if(B){var c=Be(a),d=c[1];c[0].inRange(d)&&(b=Ce(a,b),c=Ce(a,De(a,l)[0]),d.collapse(l),d.moveEnd("character",b-c),d.select())}}function Fe(a,b){if(Ae(a))a.selectionStart=b,a.selectionEnd=b;else if(B){b=Ce(a,b);var c=a.createTextRange();c.collapse(l);c.move("character",b);c.select()}} -function Ge(a,b){if(Ae(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else B?(d=Be(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select())):h(Error("Cannot set the selection end"))}function Be(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} -function Ce(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Ae(a){try{return"number"==typeof a.selectionStart}catch(b){return p}};function He(a){if("function"==typeof a.L)return a.L();if(w(a))return a.split("");if(ca(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ob(a)};function Ie(a,b){this.n={};this.k=[];var c=arguments.length;if(1<c){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.W(a)}r=Ie.prototype;r.K=0;r.ya=0;r.L=function(){Je(this);for(var a=[],b=0;b<this.k.length;b++)a.push(this.n[this.k[b]]);return a};function Ke(a){Je(a);return a.k.concat()}r.remove=function(a){return Le(this.n,a)?(delete this.n[a],this.K--,this.ya++,this.k.length>2*this.K&&Je(this),l):p}; -function Je(a){if(a.K!=a.k.length){for(var b=0,c=0;b<a.k.length;){var d=a.k[b];Le(a.n,d)&&(a.k[c++]=d);b++}a.k.length=c}if(a.K!=a.k.length){for(var e={},c=b=0;b<a.k.length;)d=a.k[b],Le(e,d)||(a.k[c++]=d,e[d]=1),b++;a.k.length=c}}r.get=function(a,b){return Le(this.n,a)?this.n[a]:b};r.set=function(a,b){Le(this.n,a)||(this.K++,this.k.push(a),this.ya++);this.n[a]=b}; -r.W=function(a){var b;if(a instanceof Ie)b=Ke(a),a=a.L();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=ob(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function Le(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Me(a){this.n=new Ie;a&&this.W(a)}function Ne(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ha]||(a[ha]=++ia)):b.substr(0,1)+a}r=Me.prototype;r.add=function(a){this.n.set(Ne(a),a)};r.W=function(a){a=He(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};r.remove=function(a){return this.n.remove(Ne(a))};r.contains=function(a){a=Ne(a);return Le(this.n.n,a)};r.L=function(){return this.n.L()};function Oe(a){fe.call(this);this.$=Md(this.e())&&!Fd(this.e(),"readOnly");this.q=0;this.ea=new Me;a&&(y(a.pressed,function(a){Pe(this,a,l)},this),this.q=a.currentPos)}x(Oe,fe);var Qe={};function Y(a,b,c){ga(a)&&(a=C?a.c:A?a.opera:a.d);a=new Re(a,b,c);if(b&&(!(b in Qe)||c))Qe[b]={key:a,shift:p},c&&(Qe[c]={key:a,shift:l});return a}function Re(a,b,c){this.code=a;this.D=b||m;this.Ia=c||this.D}var Se=Y(8),Te=Y(9),Ue=Y(13),Z=Y(16),Ve=Y(17),We=Y(18),Xe=Y(19);Y(20); -var Ye=Y(27),Ze=Y(32," "),$e=Y(33),af=Y(34),bf=Y(35),cf=Y(36),df=Y(37),ef=Y(38),ff=Y(39),gf=Y(40);Y(44);var hf=Y(45),jf=Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","(");Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q"); +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", +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", +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"};var Ea="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Fa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ga=/^#(?:[0-9a-f]{3}){1,2}$/i,Ha=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ia=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function v(a,b){this.code=a;this.state=Ja[a]||Ka;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(v,Error); +var Ka="unknown error",Ja={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", +0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ja[13]=Ka;Ja[9]="unknown command";v.prototype.toString=function(){return this.name+": "+this.message};var La,Ma,Na,Oa,Pa,Qa,Ra;function Sa(){return m.navigator?m.navigator.userAgent:null}Pa=Oa=Na=Ma=La=!1;var Ta;if(Ta=Sa()){var Ua=m.navigator;La=0==Ta.indexOf("Opera");Ma=!La&&-1!=Ta.indexOf("MSIE");Oa=(Na=!La&&-1!=Ta.indexOf("WebKit"))&&-1!=Ta.indexOf("Mobile");Pa=!La&&!Na&&"Gecko"==Ua.product}var w=La,y=Ma,z=Pa,B=Na,Va=Oa,Wa,Xa=m.navigator;Wa=Xa&&Xa.platform||"";Qa=-1!=Wa.indexOf("Mac");Ra=-1!=Wa.indexOf("Win");var Ya=-1!=Wa.indexOf("Linux"); +function Za(){var a=m.document;return a?a.documentMode:void 0}var $a;a:{var ab="",bb;if(w&&m.opera)var cb=m.opera.version,ab="function"==typeof cb?cb():cb;else if(z?bb=/rv\:([^\);]+)(\)|;)/:y?bb=/MSIE\s+([^\);]+)(\)|;)/:B&&(bb=/WebKit\/(\S+)/),bb)var db=bb.exec(Sa()),ab=db?db[1]:"";if(y){var eb=Za();if(eb>parseFloat(ab)){$a=String(eb);break a}}$a=ab}var ib={};function jb(a){return ib[a]||(ib[a]=0<=ra($a,a))}var kb=m.document,lb=kb&&y?Za()||("CSS1Compat"==kb.compatMode?parseInt($a,10):5):void 0;var mb;!z&&!y||y&&y&&9<=lb||z&&jb("1.9.1");y&&jb("9");function nb(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}l=nb.prototype;l.toString=function(){return"("+this.x+", "+this.y+")"};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function ob(a,b){this.width=a;this.height=b}l=ob.prototype;l.toString=function(){return"("+this.width+" x "+this.height+")"};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function pb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function qb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function rb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function sb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var tb=3;function ub(a){return a?new vb(C(a)):mb||(mb=new vb)}function wb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new ob(a.clientWidth,a.clientHeight)}function xb(a){return a.parentWindow||a.defaultView}function yb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a} +function zb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function Ab(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(y&&!(y&&9<=lb)){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?Bb(a,b):!c&&zb(e,b)?-1*Cb(a,b):!d&&zb(f,a)?Cb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange(); +c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(m.Range.START_TO_END,d)}function Cb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Bb(d,a)}function Bb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var Db={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Eb={IMG:" ",BR:"\n"}; +function Fb(a,b,c){if(!(a.nodeName in Db))if(a.nodeType==tb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Eb)b.push(Eb[a.nodeName]);else for(a=a.firstChild;a;)Fb(a,b,c),a=a.nextSibling}function Gb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function vb(a){this.aa=a||m.document||document}vb.prototype.e=function(a){return p(a)?this.aa.getElementById(a):a}; +function Hb(a,b,c,d){a=d||a.aa;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&Aa(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c} +vb.prototype.contains=zb;var Ib,Jb,Kb,Lb,Mb,Nb,Ob;Ob=Nb=Mb=Lb=Kb=Jb=Ib=!1;var Pb=Sa();Pb&&(-1!=Pb.indexOf("Firefox")?Ib=!0:-1!=Pb.indexOf("Camino")?Jb=!0:-1!=Pb.indexOf("iPhone")||-1!=Pb.indexOf("iPod")?Kb=!0:-1!=Pb.indexOf("iPad")?Lb=!0:-1!=Pb.indexOf("Android")?Mb=!0:-1!=Pb.indexOf("Chrome")?Nb=!0:-1!=Pb.indexOf("Safari")&&(Ob=!0));var Qb=Ib,Rb=Jb,Sb=Kb,Tb=Lb,Ub=Mb,Vb=Nb,Wb=Ob;function Xb(a,b,c){this.i=a;this.Na=b||1;this.r=c||1};var Yb=y&&!(y&&9<=lb),Zb=y&&!(y&&8<=lb);function $b(a,b,c,d,e){this.i=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Qa=e;this.parentNode=b}function ac(a,b,c){var d=Zb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $b(b,a,b.nodeName,d,c)};function bc(a){this.ja=a;this.S=0}function cc(a){a=a.match(dc);for(var b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);return new bc(a)}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function D(a,b){return a.ja[a.S+(b||0)]}bc.prototype.next=function(){return this.ja[this.S++]};bc.prototype.back=function(){this.S--};bc.prototype.empty=function(){return this.ja.length<=this.S};function E(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(Yb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Yb&&"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} +function fc(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Zb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function gc(a,b,c,d,e){return(Yb?hc:ic).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)} +function hc(a,b,c,d,e){if(a instanceof jc||8==a.f||c&&null===a.f){var f=b.all;if(!f)return e;a=kc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)fc(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}lc(a,b,c,d,e);return e} +function ic(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!y?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof G?lc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){fc(a,c,d)&&e.add(a)}));return e} +function mc(a,b,c,d,e){var f;if((a instanceof jc||8==a.f||c&&null===a.f)&&(f=b.childNodes)){var g=kc(a);if("*"!=g&&(f=ua(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ua(f,function(a){return fc(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return nc(a,b,c,d,e)}function nc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&e.add(b);return e} +function lc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&e.add(b),lc(a,b,c,d,e)}function kc(a){if(a instanceof G){if(8==a.f)return"!";if(null===a.f)return"*"}return a.getName()};function F(){this.r=this.m=null;this.O=0}function oc(a){this.v=a;this.next=this.G=null}function pc(a,b){if(!a.m)return b;if(!b.m)return a;for(var c=a.m,d=b.m,e=null,f=null,g=0;c&&d;)c.v==d.v||c.v instanceof $b&&d.v instanceof $b&&c.v.i==d.v.i?(f=c,c=c.next,d=d.next):0<Ab(c.v,d.v)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.m=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.O=g;return a} +F.prototype.unshift=function(a){a=new oc(a);a.next=this.m;this.r?this.m.G=a:this.m=this.r=a;this.m=a;this.O++};F.prototype.add=function(a){a=new oc(a);a.G=this.r;this.m?this.r.next=a:this.m=this.r=a;this.r=a;this.O++};function qc(a){return(a=a.m)?a.v:null}F.prototype.u=h("O");function rc(a){return(a=qc(a))?E(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.Ja=a;this.la=(this.I=b)?a.r:a.m;this.da=null} +tc.prototype.next=function(){var a=this.la;if(null==a)return null;var b=this.da=a;this.la=this.I?a.G:a.next;return b.v};tc.prototype.remove=function(){var a=this.Ja,b=this.da;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.m=b;b?b.G=c:a.r=c;a.O--;this.da=null};function H(a){this.l=a;this.o=this.w=!1;this.P=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.j=h("w");function uc(a,b){a.w=b}function vc(a,b){a.o=b}H.prototype.B=h("P");function J(a,b){var c=a.evaluate(b);return c instanceof F?+rc(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof F?rc(c):""+c}function wc(a,b){var c=a.evaluate(b);return c instanceof F?!!c.u():!!c};function xc(a,b,c){H.call(this,a.l);this.ha=a;this.qa=b;this.xa=c;this.w=b.j()||c.j();this.o=b.o||c.o;this.ha==yc&&(c.o||c.j()||4==c.l||0==c.l||!b.B()?b.o||(b.j()||4==b.l||0==b.l||!c.B())||(this.P={name:c.B().name,J:b}):this.P={name:b.B().name,J:c})}s(xc,H); +function zc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof F&&c instanceof F){e=sc(b);for(d=e.next();d;d=e.next())for(b=sc(c),f=b.next();f;f=b.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof F||c instanceof F){b instanceof F?e=b:(e=c,c=b);e=sc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+E(d);break;case "boolean":d=!!E(d);break;case "string":d=E(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? +"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}xc.prototype.evaluate=function(a){return this.ha.t(this.qa,this.xa,a)};xc.prototype.toString=function(){var a="Binary Expression: "+this.ha,a=a+I(this.qa);return a+=I(this.xa)};function Ac(a,b,c,d){this.Ma=a;this.va=b;this.l=c;this.t=d}Ac.prototype.toString=h("Ma");var Bc={}; +function M(a,b,c,d){if(Bc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Ac(a,b,c,d);return Bc[a.toString()]=a}M("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});M("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});M("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});M("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});M("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});M("<",4,2,function(a,b,c){return zc(function(a,b){return a<b},a,b,c)}); +M(">",4,2,function(a,b,c){return zc(function(a,b){return a>b},a,b,c)});M("<=",4,2,function(a,b,c){return zc(function(a,b){return a<=b},a,b,c)});M(">=",4,2,function(a,b,c){return zc(function(a,b){return a>=b},a,b,c)});var yc=M("=",3,2,function(a,b,c){return zc(function(a,b){return a==b},a,b,c,!0)});M("!=",3,2,function(a,b,c){return zc(function(a,b){return a!=b},a,b,c,!0)});M("and",2,2,function(a,b,c){return wc(a,c)&&wc(b,c)});M("or",1,2,function(a,b,c){return wc(a,c)||wc(b,c)});function Cc(a,b){if(b.u()&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.l);this.wa=a;this.g=b;this.w=a.j();this.o=a.o}s(Cc,H);Cc.prototype.evaluate=function(a){a=this.wa.evaluate(a);return Dc(this.g,a)};Cc.prototype.toString=function(){var a;a="Filter:"+I(this.wa);return a+=I(this.g)};function Ec(a,b){if(b.length<a.ta)throw Error("Function "+a.q+" expects at least"+a.ta+" arguments, "+b.length+" given");if(null!==a.ea&&b.length>a.ea)throw Error("Function "+a.q+" expects at most "+a.ea+" arguments, "+b.length+" given");a.Ka&&t(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.q+" is not of type Nodeset: "+b);});H.call(this,a.l);this.R=a;this.Y=b;uc(this,a.w||xa(b,function(a){return a.j()}));vc(this,a.Ia&&!b.length||a.Ha&&!!b.length||xa(b,function(a){return a.o}))} +s(Ec,H);Ec.prototype.evaluate=function(a){return this.R.t.apply(null,Ba(a,this.Y))};Ec.prototype.toString=function(){var a="Function: "+this.R;if(this.Y.length)var b=wa(this.Y,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function Fc(a,b,c,d,e,f,g,k,r){this.q=a;this.l=b;this.w=c;this.Ia=d;this.Ha=e;this.t=f;this.ta=g;this.ea=n(k)?k:g;this.Ka=!!r}Fc.prototype.toString=h("q");var Gc={}; +function N(a,b,c,d,e,f,g,k){if(Gc.hasOwnProperty(a))throw Error("Function already created: "+a+".");Gc[a]=new Fc(a,b,c,d,!1,e,f,g,k)}N("boolean",2,!1,!1,function(a,b){return wc(b,a)},1);N("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);N("concat",3,!1,!1,function(a,b){var c=Ca(arguments,1);return wa(c,function(b,c){return b+L(c,a)},"")},2,null);N("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2); +N("count",1,!1,!1,function(a,b){return b.evaluate(a).u()},1,1,!0);N("false",2,!1,!1,aa(!1),0);N("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); +N("id",4,!1,!1,function(a,b){function c(a){if(Yb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return za(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.i,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!Aa(f,a)&&f.push(a)});f.sort(Ab);var g=new F;t(f,function(a){g.add(a)});return g},1);N("lang",2,!1,!1,aa(!1),1); +N("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);N("local-name",3,!1,!0,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,!0);N("name",3,!1,!0,function(a,b){var c=b?qc(b.evaluate(a)):a.i;return c?c.nodeName.toLowerCase():""},0,1,!0);N("namespace-uri",3,!0,!1,aa(""),0,1,!0);N("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):E(a.i)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); +N("not",2,!1,!1,function(a,b){return!wc(b,a)},1);N("number",1,!1,!0,function(a,b){return b?J(b,a):+E(a.i)},0,1);N("position",1,!0,!1,function(a){return a.Na},0);N("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);N("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);N("string",3,!1,!0,function(a,b){return b?L(b,a):E(a.i)},0,1);N("string-length",1,!1,!0,function(a,b){return(b?L(b,a):E(a.i)).length},0,1); +N("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);N("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +N("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);N("sum",1,!1,!1,function(a,b){for(var c=sc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+E(e);return d},1,1,!0);N("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(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);N("true",2,!1,!1,aa(!0),0);function G(a,b){this.Ba=a;this.ra=n(b)?b:null;this.f=null;switch(a){case "comment":this.f=8;break;case "text":this.f=tb;break;case "processing-instruction":this.f=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Hc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}G.prototype.matches=function(a){return null===this.f||this.f==a.nodeType};G.prototype.getName=h("Ba"); +G.prototype.toString=function(){var a="Kind Test: "+this.Ba;null===this.ra||(a+=I(this.ra));return a};function Ic(a){H.call(this,3);this.Aa=a.substring(1,a.length-1)}s(Ic,H);Ic.prototype.evaluate=h("Aa");Ic.prototype.toString=function(){return"Literal: "+this.Aa};function jc(a,b){this.q=a.toLowerCase();this.fa=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}jc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.q&&this.q!=a.nodeName.toLowerCase()?!1:this.fa==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};jc.prototype.getName=h("q");jc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.fa?"":this.fa+":")+this.q};function Jc(a){H.call(this,1);this.Ca=a}s(Jc,H);Jc.prototype.evaluate=h("Ca");Jc.prototype.toString=function(){return"Number: "+this.Ca};function Kc(a,b){H.call(this,a.l);this.oa=a;this.Q=b;this.w=a.j();this.o=a.o;if(1==this.Q.length){var c=this.Q[0];c.$||c.A!=Lc||(c=c.W,"*"!=c.getName()&&(this.P={name:c.getName(),J:null}))}}s(Kc,H);function Mc(){H.call(this,4)}s(Mc,H);Mc.prototype.evaluate=function(a){var b=new F;a=a.i;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Mc.prototype.toString=aa("Root Helper Expression");function Nc(){H.call(this,4)}s(Nc,H);Nc.prototype.evaluate=function(a){var b=new F;b.add(a.i);return b}; +Nc.prototype.toString=aa("Context Helper Expression"); +Kc.prototype.evaluate=function(a){var b=this.oa.evaluate(a);if(!(b instanceof F))throw Error("Filter expression must evaluate to nodeset.");a=this.Q;for(var c=0,d=a.length;c<d&&b.u();c++){var e=a[c],f=sc(b,e.A.I),g;if(e.j()||e.A!=Oc)if(e.j()||e.A!=Pc)for(g=f.next(),b=e.evaluate(new Xb(g));null!=(g=f.next());)g=e.evaluate(new Xb(g)),b=pc(b,g);else g=f.next(),b=e.evaluate(new Xb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Xb(g))}}return b}; +Kc.prototype.toString=function(){var a;a="Path Expression:"+I(this.oa);if(this.Q.length){var b=wa(this.Q,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function Qc(a,b){this.g=a;this.I=!!b}function Dc(a,b,c){for(c=c||0;c<a.g.length;c++)for(var d=a.g[c],e=sc(b),f=b.u(),g,k=0;g=e.next();k++){var r=a.I?f-k:k+1;g=d.evaluate(new Xb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof F)r=0<g.u();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Qc.prototype.B=function(){return 0<this.g.length?this.g[0].B():null}; +Qc.prototype.j=function(){for(var a=0;a<this.g.length;a++){var b=this.g[a];if(b.j()||1==b.l||0==b.l)return!0}return!1};Qc.prototype.u=function(){return this.g.length};Qc.prototype.toString=function(){return wa(this.g,function(a,b){return a+I(b)},"Predicates:")};function Rc(a,b,c,d){H.call(this,4);this.A=a;this.W=b;this.g=c||new Qc([]);this.$=!!d;b=this.g.B();a.Pa&&b&&(a=b.name,a=Yb?a.toLowerCase():a,this.P={name:a,J:b.J});this.w=this.g.j()}s(Rc,H); +Rc.prototype.evaluate=function(a){var b=a.i,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.J?L(c.J,a):null,f=1);if(this.$)if(this.j()||this.A!=Sc)if(a=sc((new Rc(Tc,new G("node"))).evaluate(a)),b=a.next())for(c=this.t(b,d,e,f);null!=(b=a.next());)c=pc(c,this.t(b,d,e,f));else c=new F;else c=gc(this.W,b,d,e),c=Dc(this.g,c,f);else c=this.t(a.i,d,e,f);return c};Rc.prototype.t=function(a,b,c,d){a=this.A.R(this.W,a,b,c);return a=Dc(this.g,a,d)}; +Rc.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.$?"//":"/"));this.A.q&&(a+=I("Axis: "+this.A));a+=I(this.W);if(this.g.u()){var b=wa(this.g.g,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Uc(a,b,c,d){this.q=a;this.R=b;this.I=c;this.Pa=d}Uc.prototype.toString=h("q");var Vc={};function O(a,b,c,d){if(Vc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Uc(a,b,c,!!d);return Vc[a]=b} +O("ancestor",function(a,b){for(var c=new F,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);O("ancestor-or-self",function(a,b){var c=new F,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); +var Lc=O("attribute",function(a,b){var c=new F,d=a.getName();if("style"==d&&b.style&&Yb)return c.add(new $b(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof G&&null===a.f||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Yb?g.nodeValue&&c.add(ac(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Yb?g.nodeValue&&c.add(ac(b,g,b.sourceIndex)):c.add(g));return c},!1),Sc=O("child",function(a,b,c,d,e){return(Yb?mc:nc).call(null,a,b,p(c)?c:null,p(d)?d:null,e||new F)}, +!1,!0);O("descendant",gc,!1,!0);var Tc=O("descendant-or-self",function(a,b,c,d){var e=new F;fc(b,c,d)&&a.matches(b)&&e.add(b);return gc(a,b,c,d,e)},!1,!0),Oc=O("following",function(a,b,c,d){var e=new F;do for(var f=b;f=f.nextSibling;)fc(f,c,d)&&a.matches(f)&&e.add(f),e=gc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);O("following-sibling",function(a,b){for(var c=new F,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);O("namespace",function(){return new F},!1); +var Wc=O("parent",function(a,b){var c=new F;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Pc=O("preceding",function(a,b,c,d){var e=new F,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var x=0,T=r.length;x<T;x++)b=r[x],fc(b,c,d)&&a.matches(b)&&e.add(b),e=gc(a,b,c,d,e)}return e},!0,!0); +O("preceding-sibling",function(a,b){for(var c=new F,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Xc=O("self",function(a,b){var c=new F;a.matches(b)&&c.add(b);return c},!1);function Yc(a){H.call(this,1);this.na=a;this.w=a.j();this.o=a.o}s(Yc,H);Yc.prototype.evaluate=function(a){return-J(this.na,a)};Yc.prototype.toString=function(){return"Unary Expression: -"+I(this.na)};function Zc(a){H.call(this,4);this.T=a;uc(this,xa(this.T,function(a){return a.j()}));vc(this,xa(this.T,function(a){return a.o}))}s(Zc,H);Zc.prototype.evaluate=function(a){var b=new F;t(this.T,function(c){c=c.evaluate(a);if(!(c instanceof F))throw Error("Path expression must evaluate to NodeSet.");b=pc(b,c)});return b};Zc.prototype.toString=function(){return wa(this.T,function(a,b){return a+I(b)},"Union Expression:")};function $c(a,b){this.b=a;this.La=b}function ad(a){for(var b,c=[];;){P(a,"Missing right hand side of binary expression.");b=bd(a);var d=a.b.next();if(!d)break;var e=(d=Bc[d]||null)&&d.va;if(!e){a.b.back();break}for(;c.length&&e<=c[c.length-1].va;)b=new xc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new xc(c.pop(),c.pop(),b);return b}function P(a,b){if(a.b.empty())throw Error(b);}function cd(a,b){var c=a.b.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} +function dd(a){a=a.b.next();if(")"!=a)throw Error("Bad token: "+a);}function ed(a){a=a.b.next();if(2>a.length)throw Error("Unclosed literal string");return new Ic(a)}function fd(a){var b=a.b.next(),c=b.indexOf(":");if(-1==c)return new jc(b);var d=b.substring(0,c);a=a.La(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new jc(b,a)} +function gd(a){var b,c=[],d;if("/"==D(a.b)||"//"==D(a.b)){b=a.b.next();d=D(a.b);if("/"==b&&(a.b.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Mc;d=new Mc;P(a,"Missing next location step.");b=hd(a,b);c.push(b)}else{a:{b=D(a.b);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.b.next();b=ad(a);P(a,'unclosed "("');cd(a,")");break;case '"':case "'":b=ed(a);break;default:if(isNaN(+b))if(!Hc(b)&&/(?![0-9])[\w]/.test(d)&& +"("==D(a.b,1)){b=a.b.next();b=Gc[b]||null;a.b.next();for(d=[];")"!=D(a.b);){P(a,"Missing function argument list.");d.push(ad(a));if(","!=D(a.b))break;a.b.next()}P(a,"Unclosed function argument list.");dd(a);b=new Ec(b,d)}else{b=null;break a}else b=new Jc(+a.b.next())}"["==D(a.b)&&(d=new Qc(id(a)),b=new Cc(b,d))}if(b)if("/"==D(a.b)||"//"==D(a.b))d=b;else return b;else b=hd(a,"/"),d=new Nc,c.push(b)}for(;"/"==D(a.b)||"//"==D(a.b);)b=a.b.next(),P(a,"Missing next location step."),b=hd(a,b),c.push(b); +return new Kc(d,c)} +function hd(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.b))return d=new Rc(Xc,new G("node")),a.b.next(),d;if(".."==D(a.b))return d=new Rc(Wc,new G("node")),a.b.next(),d;var f;if("@"==D(a.b))f=Lc,a.b.next(),P(a,"Missing attribute name");else if("::"==D(a.b,1)){if(!/(?![0-9])[\w]/.test(D(a.b).charAt(0)))throw Error("Bad token: "+a.b.next());c=a.b.next();f=Vc[c]||null;if(!f)throw Error("No axis with name: "+c);a.b.next();P(a,"Missing node name")}else f=Sc; +c=D(a.b);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==D(a.b,1)){if(!Hc(c))throw Error("Invalid node type: "+c);c=a.b.next();if(!Hc(c))throw Error("Invalid type name: "+c);cd(a,"(");P(a,"Bad nodetype");e=D(a.b).charAt(0);var g=null;if('"'==e||"'"==e)g=ed(a);P(a,"Bad nodetype");dd(a);c=new G(c,g)}else c=fd(a);else if("*"==c)c=fd(a);else throw Error("Bad token: "+a.b.next());e=new Qc(id(a),f.I);return d||new Rc(f,c,e,"//"==b)} +function id(a){for(var b=[];"["==D(a.b);){a.b.next();P(a,"Missing predicate expression.");var c=ad(a);b.push(c);P(a,"Unclosed predicate expression.");cd(a,"]")}return b}function bd(a){if("-"==D(a.b))return a.b.next(),new Yc(bd(a));var b=gd(a);if("|"!=D(a.b))a=b;else{for(b=[b];"|"==a.b.next();)P(a,"Missing next union location path."),b.push(gd(a));a.b.back();a=new Zc(b)}return a};function jd(a){switch(a.nodeType){case 1:return ma(kd,a);case 9:return jd(a.documentElement);case 2:return a.ownerElement?jd(a.ownerElement):ld;case 11:case 10:case 6:case 12:return ld;default:return a.parentNode?jd(a.parentNode):ld}}function ld(){return null}function kd(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?kd(a.parentNode,b):null};function md(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=cc(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=la(b.lookupNamespaceURI,b)):b=aa(null);var d=ad(new $c(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Xb(a));return new Q(c,b)}} +function Q(a,b){if(0==b)if(a instanceof F)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 F))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof F?rc(a):""+a;break;case 1:this.numberValue=a instanceof F?+rc(a):+a;break;case 3:this.booleanValue=a instanceof F?0<a.u():!!a;break;case 4:case 5:case 6:case 7:var d= +sc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof $b?e.i:e);this.snapshotLength=a.u();this.invalidIteratorState=!1;break;case 8:case 9:d=qc(a);this.singleNodeValue=d instanceof $b?d.i:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= +c.length||0>a?null:c[a]}}Q.ANY_TYPE=0;Q.NUMBER_TYPE=1;Q.STRING_TYPE=2;Q.BOOLEAN_TYPE=3;Q.UNORDERED_NODE_ITERATOR_TYPE=4;Q.ORDERED_NODE_ITERATOR_TYPE=5;Q.UNORDERED_NODE_SNAPSHOT_TYPE=6;Q.ORDERED_NODE_SNAPSHOT_TYPE=7;Q.ANY_UNORDERED_NODE_TYPE=8;Q.FIRST_ORDERED_NODE_TYPE=9;function nd(a){this.lookupNamespaceURI=jd(a)} +function od(a){a=a||m;var b=a.document;b.evaluate||(a.XPathResult=Q,b.evaluate=function(a,b,e,f){return(new md(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new md(a,b)},b.createNSResolver=function(a){return new nd(a)})};var R={};R.Ea=function(){var a={Sa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();R.t=function(a,b,c){var d=C(a);(y||Ub)&&od(d?xb(d):window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):R.Ea;return y&&!jb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!z||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new v(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; +R.Z=function(a,b){if(!a||1!=a.nodeType)throw new v(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};R.C=function(a,b){var c=function(){var c=R.t(b,a,9);return c?(c=c.singleNodeValue,w?c:c||null):b.selectSingleNode?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||R.Z(c,a);return c}; +R.s=function(a,b){var c=function(){var c=R.t(b,a,7);if(c){var e=c.snapshotLength;w&&!n(e)&&R.Z(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){R.Z(b,a)});return c};function pd(a){return(a=a.exec(Sa()))?a[1]:""}var qd=function(){if(Qb)return pd(/Firefox\/([0-9.]+)/);if(y||w)return $a;if(Vb)return pd(/Chrome\/([0-9.]+)/);if(Wb)return pd(/Version\/([0-9.]+)/);if(Sb||Tb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Sa());if(a)return a[1]+"."+a[2]}else{if(Ub)return(a=pd(/Android\s+([0-9.]+)/))?a:pd(/Version\/([0-9.]+)/);if(Rb)return pd(/Camino\/([0-9.]+)/)}return""}();var rd,sd;function S(a){return td?rd(a):y?0<=ra(lb,a):jb(a)}function ud(a){return td?sd(a):Ub?0<=ra(vd,a):0<=ra(qd,a)} +var td=function(){if(!z)return!1;var a=m.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}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;rd=function(a){return 0<=d.Fa(e,""+a)};sd=function(a){return 0<=d.Fa(f,""+a)};return!0}(),wd=Tb||Sb,xd;if(Ub){var yd=/Android\s+([0-9\.]+)/.exec(Sa());xd=yd?yd[1]:"0"}else xd="0"; +var vd=xd,zd=y&&!(y&&8<=lb),Ad=y&&!(y&&9<=lb),Bd=y&&!(y&&10<=lb);Ub&&ud(2.3);Ub&&ud(4);Wb&&ud(6);function Cd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}l=Cd.prototype;l.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};l.contains=function(a){return this&&a?a instanceof Cd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; +l.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};l.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};l.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function U(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}l=U.prototype;l.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};l.contains=function(a){return a instanceof U?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; +l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; +l.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Dd(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}var Ed={thin:2,medium:4,thick:6}; +function Fd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Ed)d=Ed[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Gd(a){var b;a:{a=C(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return y&&b&&"undefined"===typeof b.nodeType?null:b}function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Hd(a,b){var c;if(c=zd)if(c="value"==b)if(c=V(a,"OPTION"))c=null===Id(a,"value");c?(c=[],Fb(a,c,!1),c=c.join("")):c=a[b];return c}var Jd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; +function Kd(a){var b=[];t(a.split(Jd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return w?b.replace(/\w+:;/g,""):b}function Id(a,b){b=b.toLowerCase();if("style"==b)return Kd(a.style.cssText);if(zd&&"value"==b&&V(a,"INPUT"))return a.value;if(Ad&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}var Ld="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" "); +function Md(a){var b=a.tagName.toUpperCase();return Aa(Ld,b)?Hd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Md(a.parentNode):!Gb(a,function(a){var b=a.parentNode;if(b&&V(b,"FIELDSET")&&Hd(b,"disabled")){if(!V(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:yb(a.previousSibling);)if(V(a,"LEGEND"))return!0}return!1},!0):!0}var Nd="text search tel url email password number".split(" "); +function Od(a){return V(a,"TEXTAREA")?!0:V(a,"INPUT")?Aa(Nd,a.type.toLowerCase()):Pd(a)?!0:!1}function Pd(a){function b(a){return"inherit"==a.contentEditable?(a=Qd(a))?b(a):!1:"true"==a.contentEditable}return n(a.contentEditable)?!y&&n(a.isContentEditable)?a.isContentEditable:b(a):!1}function Qd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:null} +function W(a,b){var c=sa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=Ad?"styleFloat":"cssFloat";var d=Dd(a,c)||Rd(a,c);if(null===d)d=null;else if(Aa(Ea,c)){b:{var e=d.match(Ha);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ia))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase(); +f=Da[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Fa,"#$1$1$2$2$3$3")),!Ga.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Rd(a,b){var c=a.currentStyle||a.style,d=c[b];!n(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?n(d)?d:null:(c=Qd(a))?Rd(c,b):null} +function Sd(a,b){function c(a){if("none"==W(a,"display"))return!1;a=Qd(a);return!a||c(a)}function d(a){var b=Td(a);return 0<b.height&&0<b.width?!0:V(a,"PATH")&&(0<b.height||0<b.width)?(a=W(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=W(a,"overflow")&&xa(a.childNodes,function(a){return a.nodeType==tb||V(a)&&d(a)})}function e(a){return Ud(a)==Vd&&ya(a.childNodes,function(a){return!V(a)||e(a)})}if(!V(a))throw Error("Argument to isShown must be of type Element");if(V(a,"OPTION")||V(a,"OPTGROUP")){var f= +Gb(a,function(a){return V(a,"SELECT")});return!!f&&Sd(f,!0)}return(f=Wd(a))?!!f.pa&&0<f.rect.width&&0<f.rect.height&&Sd(f.pa,b):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==Xd(a)||!d(a)?!1:!e(a)}var Vd="hidden"; +function Ud(a,b){function c(a){var b=W(a,"position");if("fixed"==b)return T=!0,a==k?null:k;for(a=Qd(a);a&&a!=k&&(0==W(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==W(a,"position"));)a=Qd(a);return a}function d(a){var b=a;if("visible"==x)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:W(b,"overflow-x"),y:W(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new vb(g)).aa;a=B||"CSS1Compat"!=b.compatMode? +b.body||b.documentElement:b.documentElement;b=xb(b);a=y&&jb("10")&&b.pageYOffset!=a.scrollTop?new nb(a.scrollLeft,a.scrollTop):new nb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new nb(a.scrollLeft,a.scrollTop);return a}for(var f=Yd(a,b),g=C(a),k=g.documentElement,r=g.body,x=W(k,"overflow"),T,u=c(a);u;u=c(u)){var q=d(u);if("visible"!=q.x||"visible"!=q.y){var A=Td(u);if(0==A.width||0==A.height)return Vd;var K=f.right<A.left,ba=f.bottom<A.top;if(K&&"hidden"==q.x||ba&&"hidden"==q.y)return Vd; +if(K&&"visible"!=q.x||ba&&"visible"!=q.y){K=e(u);ba=f.bottom<A.top-K.y;if(f.right<A.left-K.x&&"visible"!=q.x||ba&&"visible"!=q.x)return Vd;f=Ud(u);return f==Vd?Vd:"scroll"}K=f.left>=A.left+A.width;A=f.top>=A.top+A.height;if(K&&"hidden"==q.x||A&&"hidden"==q.y)return Vd;if(K&&"visible"!=q.x||A&&"visible"!=q.y){if(T&&(q=e(u),f.left>=k.scrollWidth-q.x||f.right>=k.scrollHeight-q.y))return Vd;f=Ud(u);return f==Vd?Vd:"scroll"}}}return"none"}var Zd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); +function Td(a){function b(a){var c=(C(a)?xb(C(a)):window).getComputedStyle(a,null).MozTransform.match(Zd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),T=parseFloat(c[3]),u=parseFloat(c[4]),q=parseFloat(c[5]),c=parseFloat(c[6]),A=f.left+f.width,K=f.top+f.height,ba=f.left*d,d=A*d,fb=f.left*e,e=A*e,gb=f.top*T,T=K*T,hb=f.top*u,A=K*u,K=ba+gb+q,u=fb+hb+c,gb=d+gb+q,hb=e+hb+c,ba=ba+T+q,fb=fb+A+c,q=d+T+q,c=e+A+c;f.left=Math.min(K,gb,ba,q);f.top=Math.min(u,hb,fb,c);q=Math.max(K,gb,ba,q);c=Math.max(u,hb, +fb,c);f.width=q-f.left;f.height=c-f.top}(a=Qd(a))&&b(a)}var c=Wd(a);if(c)return c.rect;if(V(a,"HTML"))return c=C(a),a=wb((c?xb(c):window)||window),new U(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new U(0,0,0,0)}var f=new U(d.left,d.top,d.right-d.left,d.bottom-d.top);y&&a.ownerDocument.body&&(c=C(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);w&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0== +f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));z&&!S(12)&&b(a);return f} +function Wd(a){var b=V(a,"MAP");if(!b&&!V(a,"AREA"))return null;var c=b?a:V(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=R.C('/descendant::*[@usemap = "#'+c.name+'"]',C(c)))&&(e=Td(d),!b&&"default"!=a.shape.toLowerCase())){var f=$d(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new U(a+e.left,b+e.top,c,f)}return{pa:d,rect:e||new U(0,0,0,0)}} +function $d(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new U(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new U(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],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 U(b,c,d-b,e-c)}return new U(0,0,0,0)} +function Yd(a,b){var c;c=Td(a);c=new Cd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof U?b:new U(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c}function ae(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")} +function be(a){var b=[];ce(a,b);b=va(b,ae);return ae(b.join("\n")).replace(/\xa0/g," ")} +function ce(a,b){if(V(a,"BR"))b.push("");else{var c=V(a,"TD"),d=W(a,"display"),e=!c&&!Aa(de,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:yb(a.previousSibling),f=f?W(f,"display"):"",g=W(a,"float")||W(a,"cssFloat")||W(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var k=Sd(a),r=null,x=null;k&&(r=W(a,"white-space"),x=W(a,"text-transform"));t(a.childNodes,function(a){a.nodeType==tb&&k?ee(a,b,r,x):V(a)&&ce(a,b)});f=b[b.length-1]||"";!c&& +"table-cell"!=d||(!f||pa(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var de="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); +function ee(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";pa(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} +function Xd(a){if(Bd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return fe(a)}function fe(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=Qd(a))&&(b*=fe(a));return b};var ge={ka:function(a){return!(!a.querySelectorAll||!a.querySelector)},C:function(a,b){if(!a)throw Error("No class name specified");a=qa(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");if(ge.ka(b))return b.querySelector("."+a.replace(/\./g,"\\."))||null;var c=Hb(ub(b),"*",a,b);return c.length?c[0]:null},s:function(a,b){if(!a)throw Error("No class name specified");a=qa(a);if(1<a.split(/\s+/).length)throw Error("Compound class names not permitted");return ge.ka(b)?b.querySelectorAll("."+ +a.replace(/\./g,"\\.")):Hb(ub(b),"*",a,b)}};var he={C:function(a,b){if(!fa(b.querySelector)&&y&&S(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=qa(a);var c=b.querySelector(a);return c&&1==c.nodeType?c:null},s:function(a,b){if(!fa(b.querySelectorAll)&&y&&S(8)&&!ga(b.querySelector))throw Error("CSS selection is not supported");if(!a)throw Error("No selector specified");a=qa(a);return b.querySelectorAll(a)}};var ie={},je={};ie.za=function(a,b,c){var d;try{d=he.s("a",b)}catch(e){d=Hb(ub(b),"A",null,b)}return za(d,function(b){b=be(b);return c&&-1!=b.indexOf(a)||b==a})};ie.sa=function(a,b,c){var d;try{d=he.s("a",b)}catch(e){d=Hb(ub(b),"A",null,b)}return ua(d,function(b){b=be(b);return c&&-1!=b.indexOf(a)||b==a})};ie.C=function(a,b){return ie.za(a,b,!1)};ie.s=function(a,b){return ie.sa(a,b,!1)};je.C=function(a,b){return ie.za(a,b,!0)};je.s=function(a,b){return ie.sa(a,b,!0)};var ke={C:function(a,b){return b.getElementsByTagName(a)[0]||null},s:function(a,b){return b.getElementsByTagName(a)}};var le={className:ge,"class name":ge,css:he,"css selector":he,id:{C:function(a,b){var c=ub(b),d=c.e(a);if(!d)return null;if(Id(d,"id")==a&&zb(b,d))return d;c=Hb(c,"*");return za(c,function(c){return Id(c,"id")==a&&zb(b,c)})},s:function(a,b){var c=Hb(ub(b),"*",null,b);return ua(c,function(b){return Id(b,"id")==a})}},linkText:ie,"link text":ie,name:{C:function(a,b){var c=Hb(ub(b),"*",null,b);return za(c,function(b){return Id(b,"name")==a})},s:function(a,b){var c=Hb(ub(b),"*",null,b);return ua(c,function(b){return Id(b, +"name")==a})}},partialLinkText:je,"partial link text":je,tagName:ke,"tag name":ke,xpath:R};function me(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=null}if(c){var d=le[c];if(d&&fa(d.s))return d.s(a[c],b||oa.document)}throw Error("Unsupported locator strategy: "+c);};function ne(a,b){this.H=oa.document.documentElement;this.ya=null;var c=Gd(this.H);c&&oe(this,c);this.Ga=a||new pe;this.ma=b||new qe}ne.prototype.e=h("H");function oe(a,b){a.H=b;a.ya=V(b,"OPTION")?Gb(b,function(a){return V(a,"SELECT")}):null}ne.prototype.F=function(a){return this.ma.F(this.H,a)};ne.prototype.ca=function(a,b){return this.ma.ca(this.H,a,b)};B||w||td&&ud(3.6);function re(a){return V(a,"FORM")} +function se(a){if(!re(a))throw new v(12,"Element is not a form, so could not submit.");if(te(a,ue))if(V(a.submit))if(!y||S(8))a.constructor.prototype.submit.call(a);else{var b=me({id:"submit"},a),c=me({name:"submit"},a);t(b,function(a){a.removeAttribute("id")});t(c,function(a){a.removeAttribute("name")});a=a.submit;t(b,function(a){a.setAttribute("id","submit")});t(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()}function pe(){this.U=0} +pe.prototype.h=function(a){return 0!=(this.U&a)};function qe(){}qe.prototype.F=function(a,b){return te(a,b)};qe.prototype.ca=function(a,b,c){return te(a,b,c)};var ve=!(y&&!S(10))&&!w,we=Ub?!ud(4):!wd;function X(a,b,c){this.f=a;this.K=b;this.L=c}X.prototype.create=function(a){a=C(a);Ad?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.f,this.K,this.L));return a};X.prototype.toString=h("f");function xe(a,b,c){X.call(this,a,b,c)}s(xe,X); +xe.prototype.create=function(a,b){var c=C(a);if(z){var d=c?xb(c):window,e=b.charCode?0:b.keyCode,c=c.createEvent("KeyboardEvent");c.initKeyEvent(this.f,this.K,this.L,d,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,e,b.charCode);this.f==ye&&b.preventDefault&&c.preventDefault()}else Ad?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.f,this.K,this.L)),c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.keyCode=b.charCode||b.keyCode,B&&(c.charCode=this==ye? +c.keyCode:0);return c};function ze(a,b,c){X.call(this,a,b,c)}s(ze,X); +ze.prototype.create=function(a,b){function c(b){b=va(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=va(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!ve)throw new v(9,"Browser does not support firing touch events.");var e=C(a),f=e?xb(e):window,g= +we?d(b.changedTouches):c(b.changedTouches),k=b.touches==b.changedTouches?g:we?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:we?d(b.targetTouches):c(b.targetTouches),x;we?(x=e.createEvent("MouseEvents"),x.initMouseEvent(this.f,this.K,this.L,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),x.touches=k,x.targetTouches=r,x.changedTouches=g,x.scale=b.scale,x.rotation=b.rotation):(x=e.createEvent("TouchEvent"),Ub?x.initTouchEvent(k,r,g,this.f,f,0, +0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey):x.initTouchEvent(this.f,this.K,this.L,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),x.relatedTarget=b.relatedTarget);return x}; +var Ae=new X("blur",!1,!1),Be=new X("change",!0,!1),Ce=new X("focus",!1,!1),De=new X("input",!0,!1),ue=new X("submit",!0,!0),Ee=new X("textInput",!0,!0),Fe=new xe("keydown",!0,!0),ye=new xe("keypress",!0,!0),Ge=new xe("keyup",!0,!0),He=new ze("touchend",!0,!0),Ie=new ze("touchstart",!0,!0);function te(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return Ad?a.fireEvent("on"+b.f,c):a.dispatchEvent(c)};function Je(a,b){if(Ke(a))a.selectionStart=b;else if(y){var c=Le(a),d=c[0];d.inRange(c[1])&&(b=Me(a,b),d.collapse(!0),d.move("character",b),d.select())}} +function Ne(a,b){var c=0,d=0;if(Ke(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else if(y){var e=Le(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),g=f.text,d=g,k=e=c.text,r=!1;!r;)0==f.compareEndPoints("StartToEnd",f)?r=!0:(f.moveEnd("character",-1),f.text==g?d+="\r\n":r=!0);if(b)f=[d.length,-1];else{for(f=!1;!f;)0==c.compareEndPoints("StartToEnd",c)?f=!0:(c.moveEnd("character",-1),c.text==e?k+="\r\n":f=!0);f=[d.length,d.length+k.length]}return f}c= +f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Oe(a,b){if(Ke(a))a.selectionEnd=b;else if(y){var c=Le(a),d=c[1];c[0].inRange(d)&&(b=Me(a,b),c=Me(a,Ne(a,!0)[0]),d.collapse(!0),d.moveEnd("character",b-c),d.select())}}function Pe(a,b){if(Ke(a))a.selectionStart=b,a.selectionEnd=b;else if(y){b=Me(a,b);var c=a.createTextRange();c.collapse(!0);c.move("character",b);c.select()}} +function Qe(a,b){if(Ke(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else if(y)d=Le(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select());else throw Error("Cannot set the selection end");}function Le(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} +function Me(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Ke(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};function Re(a,b){this.n={};this.k=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.X(a)}l=Re.prototype;l.M=0;l.Da=0;l.N=function(){Se(this);for(var a=[],b=0;b<this.k.length;b++)a.push(this.n[this.k[b]]);return a};function Te(a){Se(a);return a.k.concat()}l.remove=function(a){return Ue(this.n,a)?(delete this.n[a],this.M--,this.Da++,this.k.length>2*this.M&&Se(this),!0):!1}; +function Se(a){if(a.M!=a.k.length){for(var b=0,c=0;b<a.k.length;){var d=a.k[b];Ue(a.n,d)&&(a.k[c++]=d);b++}a.k.length=c}if(a.M!=a.k.length){for(var e={},c=b=0;b<a.k.length;)d=a.k[b],Ue(e,d)||(a.k[c++]=d,e[d]=1),b++;a.k.length=c}}l.get=function(a,b){return Ue(this.n,a)?this.n[a]:b};l.set=function(a,b){Ue(this.n,a)||(this.M++,this.k.push(a),this.Da++);this.n[a]=b}; +l.X=function(a){var b;if(a instanceof Re)b=Te(a),a=a.N();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=rb(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function Ue(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Ve(a){if("function"==typeof a.N)return a.N();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return rb(a)};function We(a){this.n=new Re;a&&this.X(a)}function Xe(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ha]||(a[ha]=++ia)):b.substr(0,1)+a}l=We.prototype;l.add=function(a){this.n.set(Xe(a),a)};l.X=function(a){a=Ve(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};l.remove=function(a){return this.n.remove(Xe(a))};l.contains=function(a){a=Xe(a);return Ue(this.n.n,a)};l.N=function(){return this.n.N()};function Ye(a){ne.call(this);this.ba=Od(this.e())&&!Hd(this.e(),"readOnly");this.p=0;this.ia=new We;a&&(t(a.pressed,function(a){Ze(this,a,!0)},this),this.p=a.currentPos)}s(Ye,ne);var $e={};function Y(a,b,c){ga(a)&&(a=z?a.c:w?a.opera:a.d);a=new af(a,b,c);!b||b in $e&&!c||($e[b]={key:a,shift:!1},c&&($e[c]={key:a,shift:!0}));return a}function af(a,b,c){this.code=a;this.D=b||null;this.Oa=c||this.D}var bf=Y(8),cf=Y(9),df=Y(13),Z=Y(16),ef=Y(17),ff=Y(18),gf=Y(19);Y(20); +var hf=Y(27),jf=Y(32," "),kf=Y(33),lf=Y(34),mf=Y(35),nf=Y(36),of=Y(37),pf=Y(38),qf=Y(39),rf=Y(40);Y(44);var sf=Y(45),tf=Y(46);Y(48,"0",")");Y(49,"1","!");Y(50,"2","@");Y(51,"3","#");Y(52,"4","$");Y(53,"5","%");Y(54,"6","^");Y(55,"7","&");Y(56,"8","*");Y(57,"9","(");Y(65,"a","A");Y(66,"b","B");Y(67,"c","C");Y(68,"d","D");Y(69,"e","E");Y(70,"f","F");Y(71,"g","G");Y(72,"h","H");Y(73,"i","I");Y(74,"j","J");Y(75,"k","K");Y(76,"l","L");Y(77,"m","M");Y(78,"n","N");Y(79,"o","O");Y(80,"p","P");Y(81,"q","Q"); Y(82,"r","R");Y(83,"s","S");Y(84,"t","T");Y(85,"u","U");Y(86,"v","V");Y(87,"w","W");Y(88,"x","X");Y(89,"y","Y");Y(90,"z","Z"); -var kf=Y(Pa?{c:91,d:91,opera:219}:Oa?{c:224,d:91,opera:17}:{c:0,d:91,opera:m}),lf=Y(Pa?{c:92,d:92,opera:220}:Oa?{c:224,d:93,opera:17}:{c:0,d:92,opera:m}),mf=Y(Pa?{c:93,d:93,opera:0}:Oa?{c:0,d:0,opera:16}:{c:93,d:m,opera:0}),nf=Y({c:96,d:96,opera:48},"0"),of=Y({c:97,d:97,opera:49},"1"),pf=Y({c:98,d:98,opera:50},"2"),qf=Y({c:99,d:99,opera:51},"3"),rf=Y({c:100,d:100,opera:52},"4"),sf=Y({c:101,d:101,opera:53},"5"),tf=Y({c:102,d:102,opera:54},"6"),uf=Y({c:103,d:103,opera:55},"7"),vf=Y({c:104,d:104,opera:56}, -"8"),wf=Y({c:105,d:105,opera:57},"9"),xf=Y({c:106,d:106,opera:Wa?56:42},"*"),yf=Y({c:107,d:107,opera:Wa?61:43},"+"),zf=Y({c:109,d:109,opera:Wa?109:45},"-"),Af=Y({c:110,d:110,opera:Wa?190:78},"."),Bf=Y({c:111,d:111,opera:Wa?191:47},"/");Y(Wa&&A?m:144);var Cf=Y(112),Df=Y(113),Ef=Y(114),Ff=Y(115),Gf=Y(116),Hf=Y(117),If=Y(118),Jf=Y(119),Kf=Y(120),Lf=Y(121),Mf=Y(122),Nf=Y(123),Of=Y({c:107,d:187,opera:61},"=","+"),Pf=Y(108,",");Y({c:109,d:189,opera:109},"-","_");Y(188,",","<");Y(190,".",">"); -Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");var Qf=Y({c:59,d:186,opera:59},";",":");Y(222,"'",'"');var Rf=[We,Ve,kf,Z],Sf=new Ie;Sf.set(1,Z);Sf.set(2,Ve);Sf.set(4,We);Sf.set(8,kf);var Tf=function(a){var b=new Ie;y(Ke(a),function(c){b.set(a.get(c).code,c)});return b}(Sf);function Pe(a,b,c){if(va(Rf,b)){var d=Tf.get(b.code),e=a.Ba;e.T=c?e.T|d:e.T&~d}c?a.ea.add(b):a.ea.remove(b)}var Uf=B||A?"\r\n":"\n";Oe.prototype.h=function(a){return this.ea.contains(a)}; -function Vf(a,b){va(Rf,b)&&a.h(b)&&h(new z(13,"Cannot press a modifier key that is already pressed."));var c=b.code!==m&&Wf(a,ve,b);if(c||C)if((!Xf(b)||Wf(a,oe,b,!c))&&c)if(Yf(a,b),a.$)if(b.D){if(!Zf){var c=$f(a,b),d=De(a.e(),l)[0]+1;Ge(a.e(),c);ze(a.e(),d);D&&W(a.t,ue);vd||W(a.t,te);a.q=d}}else switch(b){case Ue:Zf||(D&&W(a.t,ue),U(a.e(),"TEXTAREA")&&(c=De(a.e(),l)[0]+Uf.length,Ge(a.e(),Uf),ze(a.e(),c),B||W(a.t,te),a.q=c));break;case Se:case jf:Zf||(c=De(a.e(),p),c[0]==c[1]&&(b==Se?(ze(a.e(),c[1]- -1),Ee(a.e(),c[1])):Ee(a.e(),c[1]+1)),c=De(a.e(),p),c=!(c[0]==a.e().value.length||0==c[1]),Ge(a.e(),""),(!B&&c||C&&b==Se)&&W(a.t,te),c=De(a.e(),p),a.q=c[1]);break;case df:case ff:var c=a.e(),e=De(c,l)[0],f=De(c,p)[1],g=d=0;b==df?a.h(Z)?a.q==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Z)?a.q==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Z)?(ze(c,d),Ee(c,g)):Fe(c,e);a.q=e;break;case cf:case bf:c=a.e(),d=De(c,l)[0],g=De(c, -p)[1],b==cf?(a.h(Z)?(ze(c,0),Ee(c,a.q==d?g:d)):Fe(c,0),a.q=0):(a.h(Z)?(a.q==d&&ze(c,g),Ee(c,c.value.length)):Fe(c,c.value.length),a.q=c.value.length)}Pe(a,b,l)}function Xf(a){if(a.D||a==Ue)return l;if(D)return p;if(B)return a==Ye;switch(a){case Z:case Ve:case We:return p;case kf:case lf:case mf:return C;default:return l}} -function Yf(a,b){if(b==Ue&&!C&&U(a.e(),"INPUT")){var c=Db(a.e(),ie,l);if(c){var d=c.getElementsByTagName("input");(ta(d,function(a){a:{if(U(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=l;break a}}if(U(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=l;break a}a=p}return a})||1==d.length||D&&!T(534))&&je(c)}}}function ag(a,b){a.h(b)||h(new z(13,"Cannot release a key that is not pressed. ("+b.code+")"));b.code===m||Wf(a,we,b);Pe(a,b,p)} -function $f(a,b){b.D||h(new z(13,"not a character key"));return a.h(Z)?b.Ia:b.D}var Zf=C&&!T(12);function Wf(a,b,c,d){c.code===m&&h(new z(13,"Key must have a keycode to be fired."));c={altKey:a.h(We),ctrlKey:a.h(Ve),metaKey:a.h(kf),shiftKey:a.h(Z),keyCode:c.code,charCode:c.D&&b==oe?$f(a,c).charCodeAt(0):0,preventDefault:!!d};return W(a.t,b,c)} -function bg(a,b){ge(a,b);a.$=Md(b)&&!Fd(b,"readOnly");var c;c=a.ta||a.t;var d=Ed(c);if(c==d)c=p;else{if(d&&(fa(d.blur)||B&&ga(d.blur))){try{"body"!==d.tagName.toLowerCase()&&d.blur()}catch(e){B&&"Unspecified error."==e.message||h(e)}B&&!T(8)&&(F(c)?F(c).parentWindow||F(c).defaultView:window).focus()}fa(c.focus)||B&&ga(c.focus)?(A&&T(11)&&!Rd(c)?W(c,se):c.focus(),c=l):c=p}a.$&&c&&(Fe(b,b.value.length),a.q=b.value.length)};function cg(a,b,c,d){function e(a){w(a)?y(a.split(""),function(a){1!=a.length&&h(new z(13,"Argument not a single character: "+a));var b=Qe[a];b||(b=a.toUpperCase(),b=Y(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.D});a=b;b=f.h(Z);a.shift&&!b&&Vf(f,Z);Vf(f,a.key);ag(f,a.key);a.shift&&!b&&ag(f,Z)}):va(Rf,a)?f.h(a)?ag(f,a):Vf(f,a):(Vf(f,a),ag(f,a))}Rd(a,l)||h(new z(11,"Element is not currently visible and may not be manipulated"));(!Rd(a,l)||!Kd(a)||(B||A||C&&!T("1.9.2")?0:"none"==V(a,"pointer-events")))&& -h(new z(12,"Element is not currently interactable and may not be manipulated"));var f=c||new Oe;bg(f,a);if((!Ub||Ta)&&D&&"date"==a.type){c="array"==ba(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Ta&&Ub&&(W(a,ye),W(a,xe));W(a,se);a.value=c.match(g)[0];W(a,re);W(a,qe);return}}"array"==ba(b)?y(b,e):e(b);d||y(Rf,function(a){f.h(a)&&ag(f,a)})};function $(a,b,c,d){function e(){return{pa:f,keys:[]}}var f=!!d,g=[],n=e();g.push(n);y(b,function(a){y(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.b[a];b===m?(g.push(n=e()),f&&(n.pa=p,g.push(n=e()))):v(b)?n.keys.push(b):h(Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16)))}else switch(a){case "\n":n.keys.push(Ue);break;case "\t":n.keys.push(Te);break;case "\b":n.keys.push(Se);break;default:n.keys.push(a)}})});y(g,function(b){cg(a,b.keys,c,b.pa)})}$.b={}; -$.b["\ue000"]=m;$.b["\ue003"]=Se;$.b["\ue004"]=Te;$.b["\ue006"]=Ue;$.b["\ue007"]=Ue;$.b["\ue008"]=Z;$.b["\ue009"]=Ve;$.b["\ue00a"]=We;$.b["\ue00b"]=Xe;$.b["\ue00c"]=Ye;$.b["\ue00d"]=Ze;$.b["\ue00e"]=$e;$.b["\ue00f"]=af;$.b["\ue010"]=bf;$.b["\ue011"]=cf;$.b["\ue012"]=df;$.b["\ue013"]=ef;$.b["\ue014"]=ff;$.b["\ue015"]=gf;$.b["\ue016"]=hf;$.b["\ue017"]=jf;$.b["\ue018"]=Qf;$.b["\ue019"]=Of;$.b["\ue01a"]=nf;$.b["\ue01b"]=of;$.b["\ue01c"]=pf;$.b["\ue01d"]=qf;$.b["\ue01e"]=rf;$.b["\ue01f"]=sf; -$.b["\ue020"]=tf;$.b["\ue021"]=uf;$.b["\ue022"]=vf;$.b["\ue023"]=wf;$.b["\ue024"]=xf;$.b["\ue025"]=yf;$.b["\ue027"]=zf;$.b["\ue028"]=Af;$.b["\ue029"]=Bf;$.b["\ue026"]=Pf;$.b["\ue031"]=Cf;$.b["\ue032"]=Df;$.b["\ue033"]=Ef;$.b["\ue034"]=Ff;$.b["\ue035"]=Gf;$.b["\ue036"]=Hf;$.b["\ue037"]=If;$.b["\ue038"]=Jf;$.b["\ue039"]=Kf;$.b["\ue03a"]=Lf;$.b["\ue03b"]=Mf;$.b["\ue03c"]=Nf;$.b["\ue03d"]=kf;function dg(){this.U=k} -function eg(a,b,c){switch(typeof b){case "string":fg(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],eg(a,a.U?a.U.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),fg(f, -c),c.push(":"),eg(a,a.U?a.U.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var gg={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},hg=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; -function fg(a,b){b.push('"',a.replace(hg,function(a){if(a in gg)return gg[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return gg[a]=e+b.toString(16)}),'"')};D||A||C&&T(3.5)||B&&T(8);function ig(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,ig);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=jg(a);return b}if("document"in a)return b={},b.WINDOW=jg(a),b;if(ca(a))return ra(a,ig);a=mb(a,function(a,b){return"number"==typeof b||w(b)});return nb(a,ig);default:return m}} -function kg(a,b){return"array"==ba(a)?ra(a,function(a){return kg(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?lg(a.ELEMENT,b):"WINDOW"in a?lg(a.WINDOW,b):nb(a,function(a){return kg(a,b)}):a}function mg(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ca=ja());b.ca||(b.ca=ja());return b}function jg(a){var b=mg(a.ownerDocument),c=pb(b,function(b){return b==a});c||(c=":wdc:"+b.ca++,b[c]=a);return c} -function lg(a,b){a=decodeURIComponent(a);var c=b||document,d=mg(c);a in d||h(new z(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new z(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new z(10,"Element is no longer attached to the DOM"))};function ng(a,b){var c=$,d=[a,b],e=window||ka,f;try{var c=w(c)?new e.Function(c):e==window?c:new e.Function("return ("+c+").apply(null,arguments);"),g=kg(d,e.document),n=c.apply(m,g);f={status:0,value:ig(n)}}catch(u){f={status:"code"in u?u.code:13,value:{message:u.message}}}c=[];eg(new dg,f,c);return c.join("")}var og=["_"],pg=s;!(og[0]in pg)&&pg.execScript&&pg.execScript("var "+og[0]);for(var qg;og.length&&(qg=og.shift());)!og.length&&v(ng)?pg[qg]=ng:pg=pg[qg]?pg[qg]:pg[qg]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} +var uf=Y(Ra?{c:91,d:91,opera:219}:Qa?{c:224,d:91,opera:17}:{c:0,d:91,opera:null}),vf=Y(Ra?{c:92,d:92,opera:220}:Qa?{c:224,d:93,opera:17}:{c:0,d:92,opera:null}),wf=Y(Ra?{c:93,d:93,opera:0}:Qa?{c:0,d:0,opera:16}:{c:93,d:null,opera:0}),xf=Y({c:96,d:96,opera:48},"0"),yf=Y({c:97,d:97,opera:49},"1"),zf=Y({c:98,d:98,opera:50},"2"),Af=Y({c:99,d:99,opera:51},"3"),Bf=Y({c:100,d:100,opera:52},"4"),Cf=Y({c:101,d:101,opera:53},"5"),Df=Y({c:102,d:102,opera:54},"6"),Ef=Y({c:103,d:103,opera:55},"7"),Ff=Y({c:104, +d:104,opera:56},"8"),Gf=Y({c:105,d:105,opera:57},"9"),Hf=Y({c:106,d:106,opera:Ya?56:42},"*"),If=Y({c:107,d:107,opera:Ya?61:43},"+"),Jf=Y({c:109,d:109,opera:Ya?109:45},"-"),Kf=Y({c:110,d:110,opera:Ya?190:78},"."),Lf=Y({c:111,d:111,opera:Ya?191:47},"/");Y(Ya&&w?null:144);var Mf=Y(112),Nf=Y(113),Of=Y(114),Pf=Y(115),Qf=Y(116),Rf=Y(117),Sf=Y(118),Tf=Y(119),Uf=Y(120),Vf=Y(121),Wf=Y(122),Xf=Y(123),Yf=Y({c:107,d:187,opera:61},"=","+"),Zf=Y(108,",");Y({c:109,d:189,opera:109},"-","_");Y(188,",","<"); +Y(190,".",">");Y(191,"/","?");Y(192,"`","~");Y(219,"[","{");Y(220,"\\","|");Y(221,"]","}");var $f=Y({c:59,d:186,opera:59},";",":");Y(222,"'",'"');var ag=[ff,ef,uf,Z],bg=new Re;bg.set(1,Z);bg.set(2,ef);bg.set(4,ff);bg.set(8,uf);var cg=function(a){var b=new Re;t(Te(a),function(c){b.set(a.get(c).code,c)});return b}(bg);function Ze(a,b,c){if(Aa(ag,b)){var d=cg.get(b.code),e=a.Ga;e.U=c?e.U|d:e.U&~d}c?a.ia.add(b):a.ia.remove(b)}var dg=y||w?"\r\n":"\n";Ye.prototype.h=function(a){return this.ia.contains(a)}; +function eg(a,b){if(Aa(ag,b)&&a.h(b))throw new v(13,"Cannot press a modifier key that is already pressed.");var c=null!==b.code&&fg(a,Fe,b);if((c||z)&&((!gg(b)||fg(a,ye,b,!c))&&c)&&(hg(a,b),a.ba))if(b.D){if(!ig){var c=jg(a,b),d=Ne(a.e(),!0)[0]+1;Qe(a.e(),c);Je(a.e(),d);B&&a.F(Ee);Ad||a.F(De);a.p=d}}else switch(b){case df:ig||(B&&a.F(Ee),V(a.e(),"TEXTAREA")&&(c=Ne(a.e(),!0)[0]+dg.length,Qe(a.e(),dg),Je(a.e(),c),y||a.F(De),a.p=c));break;case bf:case tf:ig||(c=Ne(a.e(),!1),c[0]==c[1]&&(b==bf?(Je(a.e(), +c[1]-1),Oe(a.e(),c[1])):Oe(a.e(),c[1]+1)),c=Ne(a.e(),!1),c=!(c[0]==a.e().value.length||0==c[1]),Qe(a.e(),""),(!y&&c||z&&b==bf)&&a.F(De),c=Ne(a.e(),!1),a.p=c[1]);break;case of:case qf:var c=a.e(),e=Ne(c,!0)[0],f=Ne(c,!1)[1],g=d=0;b==of?a.h(Z)?a.p==e?(d=Math.max(e-1,0),g=f,e=d):(d=e,e=g=f-1):e=e==f?Math.max(e-1,0):e:a.h(Z)?a.p==f?(d=e,e=g=Math.min(f+1,c.value.length)):(d=e+1,g=f,e=d):e=e==f?Math.min(f+1,c.value.length):f;a.h(Z)?(Je(c,d),Oe(c,g)):Pe(c,e);a.p=e;break;case nf:case mf:c=a.e(),d=Ne(c,!0)[0], +g=Ne(c,!1)[1],b==nf?(a.h(Z)?(Je(c,0),Oe(c,a.p==d?g:d)):Pe(c,0),a.p=0):(a.h(Z)?(a.p==d&&Je(c,g),Oe(c,c.value.length)):Pe(c,c.value.length),a.p=c.value.length)}Ze(a,b,!0)}function gg(a){if(a.D||a==df)return!0;if(B)return!1;if(y)return a==hf;switch(a){case Z:case ef:case ff:return!1;case uf:case vf:case wf:return z;default:return!0}} +function hg(a,b){if(b==df&&!z&&V(a.e(),"INPUT")){var c=Gb(a.e(),re,!0);if(c){var d=c.getElementsByTagName("input");(xa(d,function(a){a:{if(V(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=!0;break a}}if(V(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=!0;break a}a=!1}return a})||1==d.length||B&&!S(534))&&se(c)}}}function kg(a,b){if(!a.h(b))throw new v(13,"Cannot release a key that is not pressed. ("+b.code+")");null===b.code||fg(a,Ge,b);Ze(a,b,!1)} +function jg(a,b){if(!b.D)throw new v(13,"not a character key");return a.h(Z)?b.Oa:b.D}var ig=z&&!S(12);function fg(a,b,c,d){if(null===c.code)throw new v(13,"Key must have a keycode to be fired.");c={altKey:a.h(ff),ctrlKey:a.h(ef),metaKey:a.h(uf),shiftKey:a.h(Z),keyCode:c.code,charCode:c.D&&b==ye?jg(a,c).charCodeAt(0):0,preventDefault:!!d};return a.ca(b,c)} +function lg(a,b){oe(a,b);a.ba=Od(b)&&!Hd(b,"readOnly");var c;c=a.ya||a.H;var d=Gd(c);if(c==d)c=!1;else{if(d&&(fa(d.blur)||y&&ga(d.blur))){if(!V(d,"BODY"))try{d.blur()}catch(e){if(!y||"Unspecified error."!=e.message)throw e;}y&&!S(8)&&(C(c)?xb(C(c)):window).focus()}fa(c.focus)||y&&ga(c.focus)?(w&&S(11)&&!Sd(c)?te(c,Ce):c.focus(),c=!0):c=!1}a.ba&&c&&(Pe(b,b.value.length),a.p=b.value.length)};function mg(a,b,c,d){function e(a){p(a)?t(a.split(""),function(a){if(1!=a.length)throw new v(13,"Argument not a single character: "+a);var b=$e[a];b||(b=a.toUpperCase(),b=Y(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.D});a=b;b=f.h(Z);a.shift&&!b&&eg(f,Z);eg(f,a.key);kg(f,a.key);a.shift&&!b&&kg(f,Z)}):Aa(ag,a)?f.h(a)?kg(f,a):eg(f,a):(eg(f,a),kg(f,a))}if(a!=Gd(a)){if(!Sd(a,!0)||!Md(a)||(y||w||z&&!S("1.9.2")?0:"none"==W(a,"pointer-events")))throw new v(12,"Element is not currently interactable and may not be manipulated"); +ng(a)}var f=c||new Ye;lg(f,a);if((!Wb||Va)&&B&&"date"==a.type){c="array"==ca(b)?b=b.join(""):b;var g=/\d{4}-\d{2}-\d{2}/;if(c.match(g)){Va&&Wb&&(te(a,Ie),te(a,He));te(a,Ce);a.value=c.match(g)[0];te(a,Be);te(a,Ae);return}}"array"==ca(b)?t(b,e):e(b);d||t(ag,function(a){f.h(a)&&kg(f,a)})} +function ng(a){if("scroll"==Ud(a,void 0)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Ud(a,void 0)))return;for(var b=Yd(a,void 0),c=Qd(a);c;c=Qd(c)){var d=c,e=Td(d),f;var g=d;if(!y||y&&9<=lb)k=Dd(g,"borderLeftWidth"),f=Dd(g,"borderRightWidth"),r=Dd(g,"borderTopWidth"),g=Dd(g,"borderBottomWidth"),f=new Cd(parseFloat(r),parseFloat(f),parseFloat(g),parseFloat(k));else{var k=Fd(g,"borderLeft");f=Fd(g,"borderRight");var r=Fd(g,"borderTop"),g=Fd(g,"borderBottom");f=new Cd(r,f,g,k)}k=b.left-e.left- +f.left;e=b.top-e.top-f.top;f=d.clientHeight+b.top-b.bottom;d.scrollLeft+=Math.min(k,Math.max(k-(d.clientWidth+b.left-b.right),0));d.scrollTop+=Math.min(e,Math.max(e-f,0))}Ud(a,void 0)}};function $(a,b,c,d){function e(){return{ua:f,keys:[]}}var f=!!d,g=[],k=e();g.push(k);t(b,function(a){t(a.split(""),function(a){if("\ue000"<=a&&"\ue03d">=a){var b=$.a[a];if(null===b)g.push(k=e()),f&&(k.ua=!1,g.push(k=e()));else if(n(b))k.keys.push(b);else throw Error("Unsupported WebDriver key: \\u"+a.charCodeAt(0).toString(16));}else switch(a){case "\n":k.keys.push(df);break;case "\t":k.keys.push(cf);break;case "\b":k.keys.push(bf);break;default:k.keys.push(a)}})});t(g,function(b){mg(a,b.keys,c,b.ua)})} +$.a={};$.a["\ue000"]=null;$.a["\ue003"]=bf;$.a["\ue004"]=cf;$.a["\ue006"]=df;$.a["\ue007"]=df;$.a["\ue008"]=Z;$.a["\ue009"]=ef;$.a["\ue00a"]=ff;$.a["\ue00b"]=gf;$.a["\ue00c"]=hf;$.a["\ue00d"]=jf;$.a["\ue00e"]=kf;$.a["\ue00f"]=lf;$.a["\ue010"]=mf;$.a["\ue011"]=nf;$.a["\ue012"]=of;$.a["\ue013"]=pf;$.a["\ue014"]=qf;$.a["\ue015"]=rf;$.a["\ue016"]=sf;$.a["\ue017"]=tf;$.a["\ue018"]=$f;$.a["\ue019"]=Yf;$.a["\ue01a"]=xf;$.a["\ue01b"]=yf;$.a["\ue01c"]=zf;$.a["\ue01d"]=Af;$.a["\ue01e"]=Bf;$.a["\ue01f"]=Cf; +$.a["\ue020"]=Df;$.a["\ue021"]=Ef;$.a["\ue022"]=Ff;$.a["\ue023"]=Gf;$.a["\ue024"]=Hf;$.a["\ue025"]=If;$.a["\ue027"]=Jf;$.a["\ue028"]=Kf;$.a["\ue029"]=Lf;$.a["\ue026"]=Zf;$.a["\ue031"]=Mf;$.a["\ue032"]=Nf;$.a["\ue033"]=Of;$.a["\ue034"]=Pf;$.a["\ue035"]=Qf;$.a["\ue036"]=Rf;$.a["\ue037"]=Sf;$.a["\ue038"]=Tf;$.a["\ue039"]=Uf;$.a["\ue03a"]=Vf;$.a["\ue03b"]=Wf;$.a["\ue03c"]=Xf;$.a["\ue03d"]=uf;function og(){this.V=void 0} +function pg(a,b,c){switch(typeof b){case "string":qg(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],pg(a,a.V?a.V.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d), +qg(f,c),c.push(":"),pg(a,a.V?a.V.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var rg={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},sg=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; +function qg(a,b){b.push('"',a.replace(sg,function(a){if(a in rg)return rg[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return rg[a]=e+b.toString(16)}),'"')};B||w||z&&S(3.5)||y&&S(8);function tg(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return va(a,tg);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=ug(a);return b}if("document"in a)return b={},b.WINDOW=ug(a),b;if(da(a))return va(a,tg);a=pb(a,function(a,b){return ea(b)||p(b)});return qb(a,tg);default:return null}} +function vg(a,b){return"array"==ca(a)?va(a,function(a){return vg(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?wg(a.ELEMENT,b):"WINDOW"in a?wg(a.WINDOW,b):qb(a,function(a){return vg(a,b)}):a}function xg(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ga=na());b.ga||(b.ga=na());return b}function ug(a){var b=xg(a.ownerDocument),c=sb(b,function(b){return b==a});c||(c=":wdc:"+b.ga++,b[c]=a);return c} +function wg(a,b){a=decodeURIComponent(a);var c=b||document,d=xg(c);if(!(a in d))throw new v(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new v(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new v(10,"Element is no longer attached to the DOM");};function yg(a,b,c){a=[a,b];b=$;var d;try{var e=c?wg(c.WINDOW):window,f=vg(a,e.document),g=b.apply(null,f);d={status:0,value:tg(g)}}catch(k){d={status:"code"in k?k.code:13,value:{message:k.message}}}c=[];pg(new og,d,c);return c.join("")}var zg=["_"],Ag=m;zg[0]in Ag||!Ag.execScript||Ag.execScript("var "+zg[0]);for(var Bg;zg.length&&(Bg=zg.shift());)zg.length||void 0===yg?Ag=Ag[Bg]?Ag[Bg]:Ag[Bg]={}:Ag[Bg]=yg;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);} diff --git a/src/ghostdriver/webdriver_atoms.js b/src/ghostdriver/webdriver_atoms.js index 1e4fe4621..8368ab7f0 100644 --- a/src/ghostdriver/webdriver_atoms.js +++ b/src/ghostdriver/webdriver_atoms.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino <http://ivandemarino.me>. -Copyright (c) 2012, Ivan De Marino <http://ivandemarino.me> +Copyright (c) 2014, Ivan De Marino <http://ivandemarino.me> All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/ghostdriver/webelementlocator.js b/src/ghostdriver/webelementlocator.js index 4cb6464a1..bdaa7f2c8 100644 --- a/src/ghostdriver/webelementlocator.js +++ b/src/ghostdriver/webelementlocator.js @@ -1,7 +1,7 @@ /* This file is part of the GhostDriver by Ivan De Marino <http://ivandemarino.me>. -Copyright (c) 2012, Ivan De Marino <http://ivandemarino.me> +Copyright (c) 2014, Ivan De Marino <http://ivandemarino.me> All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -59,7 +59,7 @@ ghostdriver.WebElementLocator = function(session) { locator.using && locator.value && //< if well-formed input _supportedStrategies.indexOf(locator.using) >= 0) { //< and if strategy is recognized - _log.debug("_find", "Find element using Locator: " + JSON.stringify(locator)); + _log.debug("_find.locator", JSON.stringify(locator)); // Ensure "rootElement" is valid, otherwise undefine-it if (!rootElement || typeof(rootElement) !== "object" || !rootElement["ELEMENT"]) { @@ -77,8 +77,8 @@ ghostdriver.WebElementLocator = function(session) { try { return JSON.parse(findRes); } catch (e) { - errorMsg = "Invalid locator received: "+JSON.stringify(locator); - _log.error("_find", errorMsg); + errorMsg = JSON.stringify(locator); + _log.error("_find.locator.error", errorMsg); return { "status" : _errors.FAILED_CMD_STATUS_CODES[_errors.FAILED_CMD_STATUS.UNKNOWN_COMMAND], "value" : errorMsg @@ -96,8 +96,8 @@ ghostdriver.WebElementLocator = function(session) { _locateElement = function(locator, rootElement) { var findElementRes = _find("element", locator, rootElement); - _log.debug("_locateElement", "Locator: "+JSON.stringify(locator)); - _log.debug("_locateElement", "Find Element Result: "+JSON.stringify(findElementRes)); + _log.debug("_locateElement.locator", JSON.stringify(locator)); + _log.debug("_locateElement.findElementResult", JSON.stringify(findElementRes)); // To check if element was found, the following must happen: // 1. "findElementRes" result object must be valid @@ -130,8 +130,8 @@ ghostdriver.WebElementLocator = function(session) { elements = [], i, ilen; - _log.debug("_locateElements", "Locator: "+JSON.stringify(locator)); - _log.debug("_locateElements", "Find Element(s) Result: "+JSON.stringify(findElementsRes)); + _log.debug("_locateElements.locator", JSON.stringify(locator)); + _log.debug("_locateElements.findElementsResult", JSON.stringify(findElementsRes)); // To check if something was found, the following must happen: // 1. "findElementsRes" result object must be valid @@ -203,8 +203,8 @@ ghostdriver.WebElementLocator = function(session) { // Try to find the element elementOrElements = locatorMethod(request, rootElement); - _log.debug("_handleLocateCommand", "Element(s): " + JSON.stringify(elementOrElements)); - _log.debug("_handleLocateCommand", "Root Element: " + (typeof(rootElement) !== "undefined" ? JSON.stringify(rootElement) : "BODY")); + _log.debug("_handleLocateCommand.elements", JSON.stringify(elementOrElements)); + _log.debug("_handleLocateCommand.rootElement", (typeof(rootElement) !== "undefined" ? JSON.stringify(rootElement) : "BODY")); if (elementOrElements && elementOrElements.hasOwnProperty("status") &&