Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating Atoms after Selenium 2.26 was released.

  • Loading branch information...
commit a7f464314b037e3012317c1c9ebeee0d751a4d40 1 parent 82d662d
@detro authored
Showing with 822 additions and 684 deletions.
  1. +1 −1  src/third_party/webdriver-atoms/active_element.js
  2. +117 −117 src/third_party/webdriver-atoms/clear.js
  3. +1 −1  src/third_party/webdriver-atoms/clear_local_storage.js
  4. +1 −1  src/third_party/webdriver-atoms/clear_session_storage.js
  5. +128 −127 src/third_party/webdriver-atoms/click.js
  6. +1 −1  src/third_party/webdriver-atoms/default_content.js
  7. +200 −63 src/third_party/webdriver-atoms/deps.js
  8. +25 −25 src/third_party/webdriver-atoms/double_click.js
  9. +25 −25 src/third_party/webdriver-atoms/drag.js
  10. +1 −1  src/third_party/webdriver-atoms/execute_async_script.js
  11. +1 −1  src/third_party/webdriver-atoms/execute_script.js
  12. +1 −1  src/third_party/webdriver-atoms/execute_sql.js
  13. +1 −1  src/third_party/webdriver-atoms/find_element.js
  14. +1 −1  src/third_party/webdriver-atoms/find_elements.js
  15. +24 −24 src/third_party/webdriver-atoms/focus_on_element.js
  16. +3 −3 src/third_party/webdriver-atoms/frame_by_id_or_name.js
  17. +1 −1  src/third_party/webdriver-atoms/frame_by_index.js
  18. +1 −1  src/third_party/webdriver-atoms/get_appcache_status.js
  19. +19 −19 src/third_party/webdriver-atoms/get_attribute.js
  20. +19 −19 src/third_party/webdriver-atoms/get_attribute_value.js
  21. +1 −1  src/third_party/webdriver-atoms/get_current_position.js
  22. +1 −1  src/third_party/webdriver-atoms/get_element_from_cache.js
  23. +1 −1  src/third_party/webdriver-atoms/get_frame_window.js
  24. +1 −1  src/third_party/webdriver-atoms/get_in_view_location.js
  25. +1 −1  src/third_party/webdriver-atoms/get_local_storage_item.js
  26. +1 −1  src/third_party/webdriver-atoms/get_local_storage_keys.js
  27. +1 −1  src/third_party/webdriver-atoms/get_local_storage_size.js
  28. +1 −1  src/third_party/webdriver-atoms/get_location_in_view.js
  29. +1 −1  src/third_party/webdriver-atoms/get_session_storage_item.js
  30. +1 −1  src/third_party/webdriver-atoms/get_session_storage_keys.js
  31. +1 −1  src/third_party/webdriver-atoms/get_session_storage_size.js
  32. +18 −18 src/third_party/webdriver-atoms/get_size.js
  33. +22 −22 src/third_party/webdriver-atoms/get_text.js
  34. +18 −18 src/third_party/webdriver-atoms/get_top_left_coordinates.js
  35. +18 −18 src/third_party/webdriver-atoms/get_value_of_css_property.js
  36. +1 −1  src/third_party/webdriver-atoms/get_window_position.js
  37. +1 −1  src/third_party/webdriver-atoms/get_window_size.js
  38. +22 −22 src/third_party/webdriver-atoms/is_displayed.js
  39. +19 −19 src/third_party/webdriver-atoms/is_enabled.js
  40. +1 −1  src/third_party/webdriver-atoms/is_online.js
  41. +19 −19 src/third_party/webdriver-atoms/is_selected.js
  42. +3 −3 src/third_party/webdriver-atoms/lastupdate
  43. +25 −25 src/third_party/webdriver-atoms/move_mouse.js
  44. +23 −23 src/third_party/webdriver-atoms/pinch.js
  45. +1 −1  src/third_party/webdriver-atoms/remove_local_storage_item.js
  46. +1 −1  src/third_party/webdriver-atoms/remove_session_storage_item.js
  47. +25 −25 src/third_party/webdriver-atoms/right_click.js
  48. +23 −23 src/third_party/webdriver-atoms/rotate.js
Sorry, we could not display the entire diff because it was too big.
View
2  src/third_party/webdriver-atoms/active_element.js
@@ -8,7 +8,7 @@ a:{var xa="",y;if(ua&&p.opera)var ya=p.opera.version,xa="function"==typeof ya?ya
function Ia(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&w&&!Da(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?Ja(a,b):!c&&Ha(e,b)?-1*Ka(a,b):!d&&Ha(f,a)?Ka(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(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(p.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,Ma,Na,Oa,Pa,Qa,Ra;Ra=Qa=Pa=Oa=Na=Ma=La=l;var B=v();B&&(-1!=B.indexOf("Firefox")?La=j:-1!=B.indexOf("Camino")?Ma=j:-1!=B.indexOf("iPhone")||-1!=B.indexOf("iPod")?Na=j:-1!=B.indexOf("iPad")?Oa=j:-1!=B.indexOf("Android")?Pa=j:-1!=B.indexOf("Chrome")?Qa=j:-1!=B.indexOf("Safari")&&(Ra=j));var Sa=La,Ta=Ma,Ua=Na,Va=Oa,Wa=Pa,Xa=Qa,Ya=Ra;function C(a){return(a=a.exec(v()))?a[1]:""}(function(){if(Sa)return C(/Firefox\/([0-9.]+)/);if(w||ua)return wa;if(Xa)return C(/Chrome\/([0-9.]+)/);if(Ya)return C(/Version\/([0-9.]+)/);if(Ua||Va){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(Wa)return(a=C(/Android\s+([0-9.]+)/))?a:C(/Version\/([0-9.]+)/);if(Ta)return C(/Camino\/([0-9.]+)/)}return""})();var Za;function $a(a){return ab?Za(a):w?0<=ea(document.documentMode,a):Da(a)}var ab=function(){if(!x)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),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;Za=function(a){return 0<=d.$(e,""+a)};return j}();function F(a,b){this.code=a;this.message=b||"";this.name=bb[a]||bb[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}r(F,Error);
var bb={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-F.prototype.toString=function(){return"["+this.name+"] "+this.message};function G(a,b,c){this.f=a;this.Y=b||1;this.h=c||1};var H=w&&!Fa(9),cb=w&&!Fa(8);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ba=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 I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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}
+F.prototype.toString=function(){return this.name+": "+this.message};function G(a,b,c){this.f=a;this.Y=b||1;this.h=c||1};var H=w&&!Fa(9),cb=w&&!Fa(8);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ba=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 I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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 j;try{if(!a.getAttribute)return l}catch(d){return l}cb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function K(a,b,c,d,e){return(H?fb:gb).call(k,a,b,q(c)?c:k,q(d)?d:k,e||new L)}
function fb(a,b,c,d,e){if(l||8==a.g||c&&a.g===k){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],o=0;b=f[o++];)J(b,c,d)&&g.push(b);f=g}for(o=0;b=f[o++];)("*"!=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&&!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 M?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){J(a,c,d)&&e.add(a)}));return e}
View
234 src/third_party/webdriver-atoms/clear.js
117 additions, 117 deletions not shown
View
2  src/third_party/webdriver-atoms/clear_local_storage.js
@@ -2,7 +2,7 @@ function(){return function(){var g=void 0,h=!0,i=null,j=!1,m=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}var aa=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c};var p=window;function ba(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c};function q(a,b){this.code=a;this.message=b||"";this.name=ca[a]||ca[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(q,Error);
var ca={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-q.prototype.toString=function(){return"["+this.name+"] "+this.message};function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+q.prototype.toString=function(){return this.name+": "+this.message};function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
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),D=0;0==c&&D<f;D++){var Ca=d[D]||"",Da=e[D]||"",Ea=RegExp("(\\d*)(\\D*)","g"),Fa=RegExp("(\\d*)(\\D*)","g");do{var k=Ea.exec(Ca)||["","",""],l=Fa.exec(Da)||["","",""];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 m.navigator?m.navigator.userAgent:i}v=u=t=s=j;var x;if(x=w()){var ea=m.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=m.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win"),B;
a:{var C="",E;if(y&&m.opera)var F=m.opera.version,C="function"==typeof F?F():F;else if(A?E=/rv\:([^\);]+)(\)|;)/:z?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ia=E.exec(w()),C=ia?ia[1]:"";if(z){var G,ja=m.document;G=ja?ja.documentMode:g;if(G>parseFloat(C)){B=String(G);break a}}B=C}var ka={};function H(a){return ka[a]||(ka[a]=0<=r(B,a))}var la={};function ma(){return la[9]||(la[9]=z&&!!document.documentMode&&9<=document.documentMode)};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=j;var P=w();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var na=I,oa=J,pa=K,qa=L,Q=M,ra=N,R=O;function S(a){return(a=a.exec(w()))?a[1]:""}var sa=function(){if(na)return S(/Firefox\/([0-9.]+)/);if(z||y)return B;if(ra)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(pa||qa){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(oa)return S(/Camino\/([0-9.]+)/)}return""}();var ta,ua;function T(a){return va?ta(a):z?0<=r(document.documentMode,a):H(a)}function U(a){return va?ua(a):Q?0<=r(wa,a):0<=r(sa,a)}
View
2  src/third_party/webdriver-atoms/clear_session_storage.js
@@ -2,7 +2,7 @@ function(){return function(){var g=void 0,h=!0,i=null,j=!1,m=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}var aa=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c};var p=window;function ba(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c};function q(a,b){this.code=a;this.message=b||"";this.name=ca[a]||ca[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(q,Error);
var ca={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-q.prototype.toString=function(){return"["+this.name+"] "+this.message};function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+q.prototype.toString=function(){return this.name+": "+this.message};function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
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),D=0;0==c&&D<f;D++){var Ca=d[D]||"",Da=e[D]||"",Ea=RegExp("(\\d*)(\\D*)","g"),Fa=RegExp("(\\d*)(\\D*)","g");do{var k=Ea.exec(Ca)||["","",""],l=Fa.exec(Da)||["","",""];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 m.navigator?m.navigator.userAgent:i}v=u=t=s=j;var x;if(x=w()){var ea=m.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=m.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win"),B;
a:{var C="",E;if(y&&m.opera)var F=m.opera.version,C="function"==typeof F?F():F;else if(A?E=/rv\:([^\);]+)(\)|;)/:z?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ia=E.exec(w()),C=ia?ia[1]:"";if(z){var G,ja=m.document;G=ja?ja.documentMode:g;if(G>parseFloat(C)){B=String(G);break a}}B=C}var ka={};function H(a){return ka[a]||(ka[a]=0<=r(B,a))}var la={};function ma(){return la[9]||(la[9]=z&&!!document.documentMode&&9<=document.documentMode)};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=j;var P=w();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var na=I,oa=J,pa=K,qa=L,Q=M,ra=N,R=O;function S(a){return(a=a.exec(w()))?a[1]:""}var sa=function(){if(na)return S(/Firefox\/([0-9.]+)/);if(z||y)return B;if(ra)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(pa||qa){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(oa)return S(/Camino\/([0-9.]+)/)}return""}();var ta,ua;function T(a){return va?ta(a):z?0<=r(document.documentMode,a):H(a)}function U(a){return va?ua(a):Q?0<=r(wa,a):0<=r(sa,a)}
View
255 src/third_party/webdriver-atoms/click.js
128 additions, 127 deletions not shown
View
2  src/third_party/webdriver-atoms/default_content.js
@@ -8,7 +8,7 @@ a:{var xa="",y;if(ua&&n.opera)var ya=n.opera.version,xa="function"==typeof ya?ya
function Ia(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&w&&!Da(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?Ja(a,b):!c&&Ha(e,b)?-1*Ka(a,b):!d&&Ha(f,a)?Ka(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(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(n.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,Ma,Na,Oa,Pa,Qa,Ra;Ra=Qa=Pa=Oa=Na=Ma=La=l;var B=v();B&&(-1!=B.indexOf("Firefox")?La=j:-1!=B.indexOf("Camino")?Ma=j:-1!=B.indexOf("iPhone")||-1!=B.indexOf("iPod")?Na=j:-1!=B.indexOf("iPad")?Oa=j:-1!=B.indexOf("Android")?Pa=j:-1!=B.indexOf("Chrome")?Qa=j:-1!=B.indexOf("Safari")&&(Ra=j));var Sa=La,Ta=Ma,Ua=Na,Va=Oa,Wa=Pa,Xa=Qa,Ya=Ra;function C(a){return(a=a.exec(v()))?a[1]:""}(function(){if(Sa)return C(/Firefox\/([0-9.]+)/);if(w||ua)return wa;if(Xa)return C(/Chrome\/([0-9.]+)/);if(Ya)return C(/Version\/([0-9.]+)/);if(Ua||Va){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(Wa)return(a=C(/Android\s+([0-9.]+)/))?a:C(/Version\/([0-9.]+)/);if(Ta)return C(/Camino\/([0-9.]+)/)}return""})();var Za;function $a(a){return ab?Za(a):w?0<=ea(document.documentMode,a):Da(a)}var ab=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),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;Za=function(a){return 0<=d.$(e,""+a)};return j}();function F(a,b){this.code=a;this.message=b||"";this.name=bb[a]||bb[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}q(F,Error);
var bb={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-F.prototype.toString=function(){return"["+this.name+"] "+this.message};function G(a,b,c){this.f=a;this.Y=b||1;this.h=c||1};var H=w&&!Fa(9),cb=w&&!Fa(8);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ba=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 I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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}
+F.prototype.toString=function(){return this.name+": "+this.message};function G(a,b,c){this.f=a;this.Y=b||1;this.h=c||1};var H=w&&!Fa(9),cb=w&&!Fa(8);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ba=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 I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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 j;try{if(!a.getAttribute)return l}catch(d){return l}cb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function K(a,b,c,d,e){return(H?fb:gb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new L)}
function fb(a,b,c,d,e){if(l||8==a.g||c&&a.g===k){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],o=0;b=f[o++];)J(b,c,d)&&g.push(b);f=g}for(o=0;b=f[o++];)("*"!=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&&!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 M?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){J(a,c,d)&&e.add(a)}));return e}
View
263 src/third_party/webdriver-atoms/deps.js
@@ -4262,19 +4262,20 @@ bot.action.focusOnElement = function(element) {
bot.action.type = function(element, values, opt_keyboard) {
bot.action.checkShown_(element);
bot.action.checkInteractable_(element);
- var keyboard = opt_keyboard || new bot.Keyboard(null);
+ 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);
- if (keyShiftPair.shift) {
+ 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) {
+ if (keyShiftPair.shift && !shiftIsPressed) {
keyboard.releaseKey(bot.Keyboard.Keys.SHIFT);
}
});
@@ -5873,6 +5874,7 @@ bot.Device.resolveUrl_ = function(base, rel) {
target.search + target.hash;
};
+
/**
* Stores the state of modifier keys
*
@@ -5887,6 +5889,7 @@ bot.Device.ModifiersState = function() {
this.pressedModifiers_ = 0;
};
+
/**
* An enum for the various modifier keys (keycode-independent).
* @enum {number}
@@ -5898,6 +5901,7 @@ bot.Device.Modifier = {
META: 0x8
};
+
/**
* Checks whether a specific modifier is pressed
* @param {!bot.Device.Modifier} modifier The modifier to check.
@@ -5907,13 +5911,14 @@ 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) {
+bot.Device.ModifiersState.prototype.setPressed = function(
+ modifier, isPressed) {
if (isPressed) {
this.pressedModifiers_ = this.pressedModifiers_ | modifier;
} else {
@@ -5923,7 +5928,6 @@ bot.Device.ModifiersState.prototype.setPressed =
/**
- *
* @return {boolean} State of the Shift key.
*/
bot.Device.ModifiersState.prototype.isShiftPressed = function() {
@@ -5932,7 +5936,6 @@ bot.Device.ModifiersState.prototype.isShiftPressed = function() {
/**
- *
* @return {boolean} State of the Control key.
*/
bot.Device.ModifiersState.prototype.isControlPressed = function() {
@@ -5941,7 +5944,6 @@ bot.Device.ModifiersState.prototype.isControlPressed = function() {
/**
- *
* @return {boolean} State of the Alt key.
*/
bot.Device.ModifiersState.prototype.isAltPressed = function() {
@@ -5950,7 +5952,6 @@ bot.Device.ModifiersState.prototype.isAltPressed = function() {
/**
- *
* @return {boolean} State of the Meta key.
*/
bot.Device.ModifiersState.prototype.isMetaPressed = function() {
@@ -7467,7 +7468,7 @@ 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;
+ return this.name + ': ' + this.message;
};
}
// Copyright 2010 WebDriver committers
@@ -8149,20 +8150,23 @@ bot.frame.findFrameByNameOrId = function(nameOrId, opt_root) {
var domWindow = opt_root || bot.getWindow();
// Lookup frame by name
- var frame = domWindow.frames[nameOrId];
- if (frame) {
- // 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);
+ 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);
+ 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]);
@@ -8828,7 +8832,8 @@ goog.require('goog.userAgent');
* A keyboard that provides atomic typing actions.
*
* @constructor
- * @param {Array.<!bot.Keyboard.Key>} opt_state Optional keyboard state.
+ * @param {{pressed: !Array.<!bot.Keyboard.Key>,
+ currentPos: number}=} opt_state Optional keyboard state.
* @extends {bot.Device}
*/
bot.Keyboard = function(opt_state) {
@@ -8841,15 +8846,25 @@ bot.Keyboard = function(opt_state) {
this.editable_ = bot.dom.isEditable(this.getElement());
/**
- * @type {!goog.structs.Set.<!bot.Keyboard.Key>}
+ * @type {number}
* @private
*/
- this.pressed_ = new goog.structs.Set();
+ this.currentPos_ = 0;
- if (opt_state) {
- goog.array.forEach(opt_state, function(key) {
- this.setKeyPressed_(key, true);
+ /**
+ * @type {!goog.structs.Set.<!bot.Keyboard.Key>}
+ * @private
+ */
+ 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);
@@ -9055,6 +9070,7 @@ bot.Keyboard.Keys = {
HYPHEN: bot.Keyboard.newKey_(
{gecko: 109, ieWebkit: 189, opera: 109}, '-', '_'),
COMMA: bot.Keyboard.newKey_(188, ',', '<'),
+ SEPARATOR: bot.Keyboard.newKey_(188, ','),
PERIOD: bot.Keyboard.newKey_(190, '.', '>'),
SLASH: bot.Keyboard.newKey_(191, '/', '?'),
BACKTICK: bot.Keyboard.newKey_(192, '`', '~'),
@@ -9201,7 +9217,7 @@ bot.Keyboard.prototype.isPressed = function(key) {
* @param {!bot.Keyboard.Key} key Key to press.
*/
bot.Keyboard.prototype.pressKey = function(key) {
- if (this.isPressed(key) && goog.array.contains(bot.Keyboard.MODIFIERS, 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.');
}
@@ -9318,6 +9334,10 @@ bot.Keyboard.prototype.maybeEditText_ = function(key) {
case bot.Keyboard.Keys.RIGHT:
this.updateOnLeftOrRight_(key);
break;
+ case bot.Keyboard.Keys.HOME:
+ case bot.Keyboard.Keys.END:
+ this.updateOnHomeOrEnd_(key);
+ break;
}
}
};
@@ -9381,15 +9401,16 @@ bot.Keyboard.prototype.updateOnCharacter_ = function(key) {
}
var character = this.getChar_(key);
- goog.dom.selection.setText(this.getElement(), character);
- goog.dom.selection.setStart(this.getElement(),
- goog.dom.selection.getStart(this.getElement()) + 1);
+ 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);
};
@@ -9407,13 +9428,14 @@ bot.Keyboard.prototype.updateOnEnter_ = function() {
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(),
- goog.dom.selection.getStart(this.getElement()) +
- bot.Keyboard.NEW_LINE_.length);
+ goog.dom.selection.setStart(this.getElement(), newPos);
if (!goog.userAgent.IE) {
this.fireHtmlEvent(bot.events.EventType.INPUT);
- }
+ }
+ this.updateCurrentPos_(newPos);
}
};
@@ -9430,12 +9452,14 @@ bot.Keyboard.prototype.updateOnBackspaceOrDelete_ = function(key) {
// 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 (key == bot.Keyboard.Keys.BACKSPACE && endpoints[0] == endpoints[1]) {
- 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 (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
@@ -9456,7 +9480,11 @@ bot.Keyboard.prototype.updateOnBackspaceOrDelete_ = function(key) {
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]);
};
@@ -9465,23 +9493,122 @@ bot.Keyboard.prototype.updateOnBackspaceOrDelete_ = function(key) {
* @private
*/
bot.Keyboard.prototype.updateOnLeftOrRight_ = function(key) {
- var start = goog.dom.selection.getStart(this.getElement());
- if (key == bot.Keyboard.Keys.LEFT) {
- goog.dom.selection.setCursorPosition(this.getElement(), start - 1);
- } else { // (key == bot.Keyboard.Keys.RIGHT)
- goog.dom.selection.setCursorPosition(this.getElement(), start + 1);
+ 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.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.
+ * @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,
@@ -9516,6 +9643,7 @@ bot.Keyboard.prototype.moveCursor = function(element) {
var focusChanged = this.focusOnElement();
if (this.editable_ && focusChanged) {
goog.dom.selection.setCursorPosition(element, element.value.length);
+ this.updateCurrentPos_(element.value.length);
}
};
@@ -9523,10 +9651,19 @@ bot.Keyboard.prototype.moveCursor = function(element) {
/**
* Serialize the current state of the keyboard.
*
- * @return {!Array.<!bot.Keyboard.Key>} The current keyboard state.
- */
-bot.Keyboard.prototype.getState = function() {
- return this.pressed_.getValues();
+ * @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_
+ };
};
/**
@@ -12977,7 +13114,7 @@ webdriver.atoms.inject.dom.getAttributeValue = function(element, attribute) {
/**
- * @param {bot.inject.ELEMENT_KEY:string} element The element to query.
+ * @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.
*/
@@ -12987,7 +13124,7 @@ webdriver.atoms.inject.dom.getSize = function(element) {
/**
- * @param {bot.inject.ELEMENT_KEY:string} element The element to query.
+ * @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.
@@ -12999,7 +13136,7 @@ webdriver.atoms.inject.dom.getValueOfCssProperty = function(element, property) {
/**
- * @param {bot.inject.ELEMENT_KEY:string} element The element to query.
+ * @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.
*/
@@ -13009,7 +13146,7 @@ webdriver.atoms.inject.dom.isEnabled = function(element) {
/**
- * @param {bot.inject.ELEMENT_KEY:string} element The element to check.
+ * @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.
@@ -13617,7 +13754,7 @@ webdriver.atoms.storage.local.size = function() {
* 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.
+ * @return {?string} The key item of a given index.
*/
webdriver.atoms.storage.local.key = function(index) {
return bot.storage.getLocalStorage().key(index);
@@ -13720,7 +13857,7 @@ webdriver.atoms.storage.session.key = function(index) {
/*
This file is part of the GhostDriver project from Neustar inc.
-Copyright (c) 2012, Ivan De Marino <ivan.de.marino@gmail.com> - Neustar inc.
+Copyright (c) 2012, Ivan De Marino <ivan.de.marino@gmail.com / detronizator@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
View
50 src/third_party/webdriver-atoms/double_click.js
@@ -1,18 +1,18 @@
function(){return function(){function h(a){throw a;}var i=void 0,j=!0,k=null,l=!1;function n(a){return function(){return this[a]}}function aa(a){return function(){return a}}var o,q=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 r(a){return a!==i}function ca(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function s(a){return"string"==typeof a}function da(a){return"function"==ba(a)}function ea(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}var fa="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ga=0,ha=Date.now||function(){return+new Date};
-function u(a,b){function c(){}c.prototype=b.prototype;a.Wa=b.prototype;a.prototype=new c};var v=window;var ia={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 u(a,b){function c(){}c.prototype=b.prototype;a.Xa=b.prototype;a.prototype=new c};var v=window;var ia={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"};function ja(a){Error.captureStackTrace?Error.captureStackTrace(this,ja):this.stack=Error().stack||"";a&&(this.message=String(a))}u(ja,Error);ja.prototype.name="CustomError";function ka(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
function la(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(d.length,f.length),g=0;0==c&&g<e;g++){var m=d[g]||"",t=f[g]||"",p=RegExp("(\\d*)(\\D*)","g"),ta=RegExp("(\\d*)(\\D*)","g");do{var X=p.exec(m)||["","",""],Y=ta.exec(t)||["","",""];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};function ma(a,b){b.unshift(a);ja.call(this,ka.apply(k,b));b.shift();this.Sa=a}u(ma,ja);ma.prototype.name="AssertionError";function na(a,b,c,d){var f="Assertion failed";if(c)var f=f+(": "+c),e=d;else a&&(f+=": "+a,e=b);h(new ma(""+f,e||[]))}function oa(a,b,c){a||na("",k,b,Array.prototype.slice.call(arguments,2))}function pa(a,b,c){ea(a)||na("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var qa=Array.prototype;function w(a,b,c){for(var d=a.length,f=s(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)}function ra(a,b){for(var c=a.length,d=[],f=0,e=s(a)?a.split(""):a,g=0;g<c;g++)if(g in e){var m=e[g];b.call(i,m,g,a)&&(d[f++]=m)}return d}function sa(a,b){for(var c=a.length,d=Array(c),f=s(a)?a.split(""):a,e=0;e<c;e++)e in f&&(d[e]=b.call(i,f[e],e,a));return d}function ua(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,e){d=b.call(i,d,c,e,a)});return d}
+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};function ma(a,b){b.unshift(a);ja.call(this,ka.apply(k,b));b.shift();this.Ta=a}u(ma,ja);ma.prototype.name="AssertionError";function na(a,b,c,d){var f="Assertion failed";if(c)var f=f+(": "+c),e=d;else a&&(f+=": "+a,e=b);h(new ma(""+f,e||[]))}function oa(a,b,c){a||na("",k,b,Array.prototype.slice.call(arguments,2))}function pa(a,b,c){ea(a)||na("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var qa=Array.prototype;function w(a,b,c){for(var d=a.length,f=s(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)}function ra(a,b){for(var c=a.length,d=[],f=0,e=s(a)?a.split(""):a,g=0;g<c;g++)if(g in e){var m=e[g];b.call(i,m,g,a)&&(d[f++]=m)}return d}function sa(a,b){for(var c=a.length,d=Array(c),f=s(a)?a.split(""):a,e=0;e<c;e++)e in f&&(d[e]=b.call(i,f[e],e,a));return d}function ua(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,e){d=b.call(i,d,c,e,a)});return d}
function va(a,b){for(var c=a.length,d=s(a)?a.split(""):a,f=0;f<c;f++)if(f in d&&b.call(i,d[f],f,a))return j;return l}function wa(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 xa(a){return qa.concat.apply(qa,arguments)}function ya(a,b,c){oa(a.length!=k);return 2>=arguments.length?qa.slice.call(a,b):qa.slice.call(a,b,c)};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){var a=Number(b[1]),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){var a=Number(b[1]),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 Ha(a,b){var c={},d;for(d in a)c[d]=b.call(i,a[d],d,a);return c}function Ia(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};function x(a,b){this.code=a;this.message=b||"";this.name=Ja[a]||Ja[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(x,Error);
var Ja={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-x.prototype.toString=function(){return"["+this.name+"] "+this.message};var Ka,La,Ma,Na,Oa,Pa;function Qa(){return q.navigator?q.navigator.userAgent:k}Na=Ma=La=Ka=l;var Ra;if(Ra=Qa()){var Sa=q.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 y=Ka,z=La,A=Na,B=Ma,Ta,Ua=q.navigator;Ta=Ua&&Ua.platform||"";Oa=-1!=Ta.indexOf("Mac");Pa=-1!=Ta.indexOf("Win");var Va=-1!=Ta.indexOf("Linux"),Wa;
+x.prototype.toString=function(){return this.name+": "+this.message};var Ka,La,Ma,Na,Oa,Pa;function Qa(){return q.navigator?q.navigator.userAgent:k}Na=Ma=La=Ka=l;var Ra;if(Ra=Qa()){var Sa=q.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 y=Ka,z=La,A=Na,B=Ma,Ta,Ua=q.navigator;Ta=Ua&&Ua.platform||"";Oa=-1!=Ta.indexOf("Mac");Pa=-1!=Ta.indexOf("Win");var Va=-1!=Ta.indexOf("Linux"),Wa;
a:{var Xa="",Ya;if(y&&q.opera)var Za=q.opera.version,Xa="function"==typeof Za?Za():Za;else if(A?Ya=/rv\:([^\);]+)(\)|;)/:z?Ya=/MSIE\s+([^\);]+)(\)|;)/:B&&(Ya=/WebKit\/(\S+)/),Ya)var $a=Ya.exec(Qa()),Xa=$a?$a[1]:"";if(z){var ab,bb=q.document;ab=bb?bb.documentMode:i;if(ab>parseFloat(Xa)){Wa=String(ab);break a}}Wa=Xa}var cb={};function db(a){return cb[a]||(cb[a]=0<=la(Wa,a))}var eb={};function fb(a){return eb[a]||(eb[a]=z&&!!document.documentMode&&document.documentMode>=a)};var gb,hb,ib,jb,kb,lb,mb;mb=lb=kb=jb=ib=hb=gb=l;var C=Qa();C&&(-1!=C.indexOf("Firefox")?gb=j:-1!=C.indexOf("Camino")?hb=j:-1!=C.indexOf("iPhone")||-1!=C.indexOf("iPod")?ib=j:-1!=C.indexOf("iPad")?jb=j:-1!=C.indexOf("Android")?kb=j:-1!=C.indexOf("Chrome")?lb=j:-1!=C.indexOf("Safari")&&(mb=j));var nb=y,ob=z,pb=gb,qb=hb,rb=ib,sb=jb,tb=kb,ub=lb,vb=mb;function wb(a){return(a=a.exec(Qa()))?a[1]:""}var xb=function(){if(pb)return wb(/Firefox\/([0-9.]+)/);if(ob||nb)return Wa;if(ub)return wb(/Chrome\/([0-9.]+)/);if(vb)return wb(/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=wb(/Android\s+([0-9.]+)/))?a:wb(/Version\/([0-9.]+)/);if(qb)return wb(/Camino\/([0-9.]+)/)}return""}();var yb,zb;function D(a){return Ab?yb(a):z?0<=la(document.documentMode,a):db(a)}function Bb(a){return Ab?zb(a):tb?0<=la(Cb,a):0<=la(xb,a)}
var Ab=function(){if(!A)return l;var a=q.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),f=c.platformVersion,e=c.version;yb=function(a){return 0<=d.Ba(f,""+a)};zb=function(a){return 0<=d.Ba(e,""+a)};return j}(),Db=sb||rb,Eb;if(tb){var Fb=/Android\s+([0-9\.]+)/.exec(Qa());Eb=Fb?Fb[1]:"0"}else Eb="0";
var Cb=Eb,Gb=z&&9<=document.documentMode,Hb=z&&!Gb;var Ib;!z||fb(9);!A&&!z||z&&fb(9)||A&&db("1.9.1");z&&db("9");var Jb="BODY";function E(a,b){this.x=r(a)?a:0;this.y=r(b)?b:0}E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function Kb(a,b){this.width=a;this.height=b}o=Kb.prototype;o.toString=function(){return"("+this.width+" x "+this.height+")"};o.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};o.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};o.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};o.scale=function(a){this.width*=a;this.height*=a;return this};var Lb=3;function Mb(a){return a?new Nb(F(a)):Ib||(Ib=new Nb)}function Ob(a){var b=!B&&"CSS1Compat"==a.compatMode?a.documentElement:a.body,a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function G(a){return a?a.parentWindow||a.defaultView:window}
@@ -20,33 +20,33 @@ function Pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("und
function Qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&z&&!db(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 f=a.parentNode,e=b.parentNode;return f==e?Rb(a,b):!c&&Pb(f,b)?-1*Sb(a,b):!d&&Pb(e,a)?Sb(b,a):(c?a.sourceIndex:f.sourceIndex)-(d?b.sourceIndex:e.sourceIndex)}d=
F(a);c=d.createRange();c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(q.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 F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function Tb(a,b,c,d){if(a!=k)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||Tb(a,b,c,d))return j;a=a.nextSibling}return l}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==Lb)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){for(var a=a.parentNode,c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k}function Nb(a){this.P=a||q.document||document}Nb.prototype.n=function(a){return s(a)?this.P.getElementById(a):a};Nb.prototype.contains=Pb;function Yb(a,b,c){this.g=a;this.Ja=b||1;this.s=c||1};var Zb=z&&!fb(9),$b=z&&!fb(8);function ac(a,b,c,d,f){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ua=f;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.ga=a;this.S=0}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function H(a,b){return a.ga[a.S+(b||0)]}cc.prototype.next=function(){return this.ga[this.S++]};cc.prototype.back=function(){this.S--};cc.prototype.empty=function(){return this.ga.length<=this.S};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(Zb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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 Xb(a,b){for(var a=a.parentNode,c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k}function Nb(a){this.P=a||q.document||document}Nb.prototype.n=function(a){return s(a)?this.P.getElementById(a):a};Nb.prototype.contains=Pb;function Yb(a,b,c){this.g=a;this.Ka=b||1;this.s=c||1};var Zb=z&&!fb(9),$b=z&&!fb(8);function ac(a,b,c,d,f){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Va=f;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.ga=a;this.S=0}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function H(a,b){return a.ga[a.S+(b||0)]}cc.prototype.next=function(){return this.ga[this.S++]};cc.prototype.back=function(){this.S--};cc.prototype.empty=function(){return this.ga.length<=this.S};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(Zb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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 fc(a,b,c){if(b===k)return j;try{if(!a.getAttribute)return l}catch(d){return l}$b&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function gc(a,b,c,d,f){return(Zb?hc:ic).call(k,a,b,s(c)?c:k,s(d)?d:k,f||new J)}
function hc(a,b,c,d,f){if(a instanceof jc||8==a.d||c&&a.d===k){var e=b.all;if(!e)return f;a=kc(a);if("*"!=a&&(e=b.getElementsByTagName(a),!e))return f;if(c){for(var g=[],m=0;b=e[m++];)fc(b,c,d)&&g.push(b);e=g}for(m=0;b=e[m++];)("*"!=a||"!"!=b.tagName)&&f.add(b);return f}lc(a,b,c,d,f);return f}
function ic(a,b,c,d,f){b.getElementsByName&&d&&"name"==c&&!z?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&f.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&f.add(b)})):a instanceof K?lc(a,b,c,d,f):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){fc(a,c,d)&&f.add(a)}));return f}
function mc(a,b,c,d,f){var e;if((a instanceof jc||8==a.d||c&&a.d===k)&&(e=b.childNodes)){var g=kc(a);if("*"!=g&&(e=ra(e,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!e))return f;c&&(e=ra(e,function(a){return fc(a,c,d)}));w(e,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&f.add(a)});return f}return nc(a,b,c,d,f)}function nc(a,b,c,d,f){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&f.add(b);return f}
function lc(a,b,c,d,f){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&f.add(b),lc(a,b,c,d,f)}function kc(a){if(a instanceof K){if(8==a.d)return"!";if(a.d===k)return"*"}return a.getName()};function J(){this.s=this.l=k;this.L=0}function oc(a){this.v=a;this.next=this.D=k}function pc(a,b){if(a.l){if(!b.l)return a}else return b;for(var c=a.l,d=b.l,f=k,e=k,g=0;c&&d;)c.v==d.v||c.v instanceof ac&&d.v instanceof ac&&c.v.g==d.v.g?(e=c,c=c.next,d=d.next):0<Qb(c.v,d.v)?(e=d,d=d.next):(e=c,c=c.next),(e.D=f)?f.next=e:a.l=e,f=e,g++;for(e=c||d;e;)e.D=f,f=f.next=e,g++,e=e.next;a.s=f;a.L=g;return a}
-J.prototype.unshift=function(a){a=new oc(a);a.next=this.l;this.s?this.l.D=a:this.l=this.s=a;this.l=a;this.L++};J.prototype.add=function(a){a=new oc(a);a.D=this.s;this.l?this.s.next=a:this.l=this.s=a;this.s=a;this.L++};function qc(a){return(a=a.l)?a.v:k}J.prototype.z=n("L");function rc(a){return(a=qc(a))?I(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.Ga=a;this.ha=(this.H=b)?a.s:a.l;this.ba=k}
-tc.prototype.next=function(){var a=this.ha;if(a==k)return k;var b=this.ba=a;this.ha=this.H?a.D:a.next;return b.v};tc.prototype.remove=function(){var a=this.Ga,b=this.ba;b||h(Error("Next must be called at least once before remove."));var c=b.D,b=b.next;c?c.next=b:a.l=b;b?b.D=c:a.s=c;a.L--;this.ba=k};function L(a){this.k=a;this.j=this.u=l;this.N=k}L.prototype.h=n("u");L.prototype.C=n("N");function M(a,b){var c=a.evaluate(b);return c instanceof J?+rc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?rc(c):""+c}function uc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.z():!!c};function vc(a,b,c){L.call(this,a.k);this.ea=a;this.ma=b;this.sa=c;this.u=b.h()||c.h();this.j=b.j||c.j;this.ea==wc&&(!c.j&&!c.h()&&4!=c.k&&0!=c.k&&b.C()?this.N={name:b.C().name,I:c}:!b.j&&(!b.h()&&4!=b.k&&0!=b.k&&c.C())&&(this.N={name:c.C().name,I:b}))}u(vc,L);
+J.prototype.unshift=function(a){a=new oc(a);a.next=this.l;this.s?this.l.D=a:this.l=this.s=a;this.l=a;this.L++};J.prototype.add=function(a){a=new oc(a);a.D=this.s;this.l?this.s.next=a:this.l=this.s=a;this.s=a;this.L++};function qc(a){return(a=a.l)?a.v:k}J.prototype.z=n("L");function rc(a){return(a=qc(a))?I(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.Ha=a;this.ha=(this.H=b)?a.s:a.l;this.ba=k}
+tc.prototype.next=function(){var a=this.ha;if(a==k)return k;var b=this.ba=a;this.ha=this.H?a.D:a.next;return b.v};tc.prototype.remove=function(){var a=this.Ha,b=this.ba;b||h(Error("Next must be called at least once before remove."));var c=b.D,b=b.next;c?c.next=b:a.l=b;b?b.D=c:a.s=c;a.L--;this.ba=k};function L(a){this.k=a;this.j=this.u=l;this.N=k}L.prototype.h=n("u");L.prototype.C=n("N");function M(a,b){var c=a.evaluate(b);return c instanceof J?+rc(c):+c}function N(a,b){var c=a.evaluate(b);return c instanceof J?rc(c):""+c}function uc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.z():!!c};function vc(a,b,c){L.call(this,a.k);this.ea=a;this.ma=b;this.sa=c;this.u=b.h()||c.h();this.j=b.j||c.j;this.ea==wc&&(!c.j&&!c.h()&&4!=c.k&&0!=c.k&&b.C()?this.N={name:b.C().name,I:c}:!b.j&&(!b.h()&&4!=b.k&&0!=b.k&&c.C())&&(this.N={name:c.C().name,I:b}))}u(vc,L);
function xc(a,b,c,d,f){var b=b.evaluate(d),c=c.evaluate(d),e;if(b instanceof J&&c instanceof J){e=sc(b);for(b=e.next();b;b=e.next()){f=sc(c);for(d=f.next();d;d=f.next())if(a(I(b),I(d)))return j}return l}if(b instanceof J||c instanceof J){b instanceof J?f=b:(f=c,c=b);f=sc(f);b=typeof c;for(d=f.next();d;d=f.next()){switch(b){case "number":e=+I(d);break;case "boolean":e=!!I(d);break;case "string":e=I(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(e,c))return j}return l}return f?
-"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.ea.t(this.ma,this.sa,a)};vc.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.ea+"\n",a=a+" ",b=b+(this.ma.toString(a)+"\n");return b+=this.sa.toString(a)};function yc(a,b,c,d){this.Ia=a;this.pa=b;this.k=c;this.t=d}yc.prototype.toString=n("Ia");var zc={};
+"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.ea.t(this.ma,this.sa,a)};vc.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.ea+"\n",a=a+" ",b=b+(this.ma.toString(a)+"\n");return b+=this.sa.toString(a)};function yc(a,b,c,d){this.Ja=a;this.pa=b;this.k=c;this.t=d}yc.prototype.toString=n("Ja");var zc={};
function O(a,b,c,d){a in zc&&h(Error("Binary operator already created: "+a));a=new yc(a,b,c,d);return zc[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 xc(function(a,b){return a<b},a,b,c)});
-O(">",4,2,function(a,b,c){return xc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return xc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return xc(function(a,b){return a>=b},a,b,c)});var wc=O("=",3,2,function(a,b,c){return xc(function(a,b){return a==b},a,b,c,j)});O("!=",3,2,function(a,b,c){return xc(function(a,b){return a!=b},a,b,c,j)});O("and",2,2,function(a,b,c){return uc(a,c)&&uc(b,c)});O("or",1,2,function(a,b,c){return uc(a,c)||uc(b,c)});function Ac(a,b){b.z()&&4!=a.k&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));L.call(this,a.k);this.ra=a;this.f=b;this.u=a.h();this.j=a.j}u(Ac,L);Ac.prototype.evaluate=function(a){a=this.ra.evaluate(a);return Bc(this.f,a)};Ac.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.ra.toString(a);return b+=this.f.toString(a)};function Cc(a,b){b.length<a.oa&&h(Error("Function "+a.p+" expects at least"+a.oa+" arguments, "+b.length+" given"));a.ca!==k&&b.length>a.ca&&h(Error("Function "+a.p+" expects at most "+a.ca+" arguments, "+b.length+" given"));a.Ha&&w(b,function(b,d){4!=b.k&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});L.call(this,a.k);this.R=a;this.X=b;this.u=a.u||va(b,function(a){return a.h()});this.j=a.Fa&&!b.length||a.Ea&&!!b.length||va(b,function(a){return a.j})}u(Cc,L);
-Cc.prototype.evaluate=function(a){return this.R.t.apply(k,xa(a,this.X))};Cc.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.R+"\n",b=b+" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=ua(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Dc(a,b,c,d,f,e,g,m,t){this.p=a;this.k=b;this.u=c;this.Fa=d;this.Ea=f;this.t=e;this.oa=g;this.ca=r(m)?m:g;this.Ha=!!t}Dc.prototype.toString=n("p");var Ec={};
+O(">",4,2,function(a,b,c){return xc(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return xc(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return xc(function(a,b){return a>=b},a,b,c)});var wc=O("=",3,2,function(a,b,c){return xc(function(a,b){return a==b},a,b,c,j)});O("!=",3,2,function(a,b,c){return xc(function(a,b){return a!=b},a,b,c,j)});O("and",2,2,function(a,b,c){return uc(a,c)&&uc(b,c)});O("or",1,2,function(a,b,c){return uc(a,c)||uc(b,c)});function Ac(a,b){b.z()&&4!=a.k&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));L.call(this,a.k);this.ra=a;this.f=b;this.u=a.h();this.j=a.j}u(Ac,L);Ac.prototype.evaluate=function(a){a=this.ra.evaluate(a);return Bc(this.f,a)};Ac.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.ra.toString(a);return b+=this.f.toString(a)};function Cc(a,b){b.length<a.oa&&h(Error("Function "+a.p+" expects at least"+a.oa+" arguments, "+b.length+" given"));a.ca!==k&&b.length>a.ca&&h(Error("Function "+a.p+" expects at most "+a.ca+" arguments, "+b.length+" given"));a.Ia&&w(b,function(b,d){4!=b.k&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});L.call(this,a.k);this.R=a;this.X=b;this.u=a.u||va(b,function(a){return a.h()});this.j=a.Ga&&!b.length||a.Fa&&!!b.length||va(b,function(a){return a.j})}u(Cc,L);
+Cc.prototype.evaluate=function(a){return this.R.t.apply(k,xa(a,this.X))};Cc.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.R+"\n",b=b+" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=ua(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Dc(a,b,c,d,f,e,g,m,t){this.p=a;this.k=b;this.u=c;this.Ga=d;this.Fa=f;this.t=e;this.oa=g;this.ca=r(m)?m:g;this.Ia=!!t}Dc.prototype.toString=n("p");var Ec={};
function P(a,b,c,d,f,e,g,m){a in Ec&&h(Error("Function already created: "+a+"."));Ec[a]=new Dc(a,b,c,d,l,f,e,g,m)}P("boolean",2,l,l,function(a,b){return uc(b,a)},1);P("ceiling",1,l,l,function(a,b){return Math.ceil(M(b,a))},1);P("concat",3,l,l,function(a,b){var c=ya(arguments,1);return ua(c,function(b,c){return b+N(c,a)},"")},2,k);P("contains",2,l,l,function(a,b,c){b=N(b,a);a=N(c,a);return-1!=b.indexOf(a)},2);P("count",1,l,l,function(a,b){return b.evaluate(a).z()},1,1,j);P("false",2,l,l,aa(l),0);
P("floor",1,l,l,function(a,b){return Math.floor(M(b,a))},1);
P("id",4,l,l,function(a,b){function c(a){if(Zb){var b=f.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length){var c;a:{c=function(b){return a==b.id};for(var d=b.length,e=s(b)?b.split(""):b,g=0;g<d;g++)if(g in e&&c.call(i,e[g])){c=g;break a}c=-1}return 0>c?k:s(b)?b.charAt(c):b[c]}}return k}return f.getElementById(a)}var d=a.g,f=9==d.nodeType?d:d.ownerDocument,d=N(b,a).split(/\s+/),e=[];w(d,function(a){(a=c(a))&&!wa(e,a)&&e.push(a)});e.sort(Qb);var g=new J;w(e,function(a){g.add(a)});return g},1);
P("lang",2,l,l,aa(l),1);P("last",1,j,l,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.s},0);P("local-name",3,l,j,function(a,b){var c=b?qc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,j);P("name",3,l,j,function(a,b){var c=b?qc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,j);P("namespace-uri",3,j,l,aa(""),0,1,j);P("normalize-space",3,l,j,function(a,b){return(b?N(b,a):I(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
-P("not",2,l,l,function(a,b){return!uc(b,a)},1);P("number",1,l,j,function(a,b){return b?M(b,a):+I(a.g)},0,1);P("position",1,j,l,function(a){return a.Ja},0);P("round",1,l,l,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,l,l,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,l,j,function(a,b){return b?N(b,a):I(a.g)},0,1);P("string-length",1,l,j,function(a,b){return(b?N(b,a):I(a.g)).length},0,1);
+P("not",2,l,l,function(a,b){return!uc(b,a)},1);P("number",1,l,j,function(a,b){return b?M(b,a):+I(a.g)},0,1);P("position",1,j,l,function(a){return a.Ka},0);P("round",1,l,l,function(a,b){return Math.round(M(b,a))},1);P("starts-with",2,l,l,function(a,b,c){b=N(b,a);a=N(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,l,j,function(a,b){return b?N(b,a):I(a.g)},0,1);P("string-length",1,l,j,function(a,b){return(b?N(b,a):I(a.g)).length},0,1);
P("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"";var c=Math.round(c)-1,f=Math.max(c,0),a=N(b,a);if(Infinity==d)return a.substring(f);b=Math.round(d);return a.substring(f,c+b)},2,3);P("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);
P("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);P("sum",1,l,l,function(a,b){for(var c=sc(b.evaluate(a)),d=0,f=c.next();f;f=c.next())d+=+I(f);return d},1,1,j);P("translate",3,l,l,function(a,b,c,d){for(var b=N(b,a),c=N(c,a),f=N(d,a),a=[],d=0;d<c.length;d++){var e=c.charAt(d);e in a||(a[e]=f.charAt(d))}c="";for(d=0;d<b.length;d++)e=b.charAt(d),c+=e in a?a[e]:e;return c},3);P("true",2,l,l,aa(j),0);function K(a,b){this.wa=a;this.na=r(b)?b:k;this.d=k;switch(a){case "comment":this.d=8;break;case "text":this.d=Lb;break;case "processing-instruction":this.d=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Fc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return this.d===k||this.d==a.nodeType};K.prototype.getName=n("wa");
K.prototype.toString=function(a){var a=a||"",b=a+"kindtest: "+this.wa;this.na===k||(b+="\n"+this.na.toString(a+" "));return b};function Gc(a){L.call(this,3);this.ta=a.substring(1,a.length-1)}u(Gc,L);Gc.prototype.evaluate=n("ta");Gc.prototype.toString=function(a){return(a||"")+"literal: "+this.ta};function jc(a){this.p=a.toLowerCase()}jc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.p||this.p==a.nodeName.toLowerCase()?j:this.p==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};jc.prototype.getName=n("p");jc.prototype.toString=function(a){return(a||"")+"nametest: "+this.p};function Hc(a){L.call(this,1);this.xa=a}u(Hc,L);Hc.prototype.evaluate=n("xa");Hc.prototype.toString=function(a){return(a||"")+"number: "+this.xa};function Ic(a,b){L.call(this,a.k);this.ja=a;this.O=b;this.u=a.h();this.j=a.j;if(1==this.O.length){var c=this.O[0];!c.$&&c.B==Jc&&(c=c.V,"*"!=c.getName()&&(this.N={name:c.getName(),I:k}))}}u(Ic,L);function Kc(){L.call(this,4)}u(Kc,L);Kc.prototype.evaluate=function(a){var b=new J,a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Kc.prototype.toString=function(a){return a+"RootHelperExpr"};function Lc(){L.call(this,4)}u(Lc,L);Lc.prototype.evaluate=function(a){var b=new J;b.add(a.g);return b};
Lc.prototype.toString=function(a){return a+"ContextHelperExpr"};
Ic.prototype.evaluate=function(a){var b=this.ja.evaluate(a);b instanceof J||h(Error("FilterExpr must evaluate to nodeset."));for(var a=this.O,c=0,d=a.length;c<d&&b.z();c++){var f=a[c],e=sc(b,f.B.H),g;if(!f.h()&&f.B==Mc){for(g=e.next();(b=e.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=f.evaluate(new Yb(g))}else if(!f.h()&&f.B==Nc)g=e.next(),b=f.evaluate(new Yb(g));else{g=e.next();for(b=f.evaluate(new Yb(g));(g=e.next())!=k;)g=f.evaluate(new Yb(g)),b=pc(b,g)}}return b};
Ic.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+=" ",w(this.O,function(a){c+=a.toString(b)}));return c};function Oc(a,b){this.f=a;this.H=!!b}function Bc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],f=sc(b),e=b.z(),g,m=0;g=f.next();m++){var t=a.H?e-m:m+1;g=d.evaluate(new Yb(g,t,e));var p;"number"==typeof g?p=t==g:"string"==typeof g||"boolean"==typeof g?p=!!g:g instanceof J?p=0<g.z():h(Error("Predicate.evaluate returned an unexpected type."));p||f.remove()}return b}Oc.prototype.C=function(){return 0<this.f.length?this.f[0].C():k};
-Oc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.k||0==b.k)return j}return l};Oc.prototype.z=function(){return this.f.length};Oc.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return ua(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Pc(a,b,c,d){L.call(this,4);this.B=a;this.V=b;this.f=c||new Oc([]);this.$=!!d;b=this.f.C();a.La&&b&&(a=b.name,a=Zb?a.toLowerCase():a,this.N={name:a,I:b.I});this.u=this.f.h()}u(Pc,L);
+Oc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.k||0==b.k)return j}return l};Oc.prototype.z=function(){return this.f.length};Oc.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return ua(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Pc(a,b,c,d){L.call(this,4);this.B=a;this.V=b;this.f=c||new Oc([]);this.$=!!d;b=this.f.C();a.Ma&&b&&(a=b.name,a=Zb?a.toLowerCase():a,this.N={name:a,I:b.I});this.u=this.f.h()}u(Pc,L);
Pc.prototype.evaluate=function(a){var b=a.g,c=k,c=this.C(),d=k,f=k,e=0;c&&(d=c.name,f=c.I?N(c.I,a):k,e=1);if(this.$)if(!this.h()&&this.B==Qc)c=gc(this.V,b,d,f),c=Bc(this.f,c,e);else if(a=sc((new Pc(Rc,new K("node"))).evaluate(a)),b=a.next())for(c=this.t(b,d,f,e);(b=a.next())!=k;)c=pc(c,this.t(b,d,f,e));else c=new J;else c=this.t(a.g,d,f,e);return c};Pc.prototype.t=function(a,b,c,d){a=this.B.R(this.V,a,b,c);return a=Bc(this.f,a,d)};
-Pc.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.$?"//":"/")+"\n");this.B.p&&(b+=a+"Axis: "+this.B+"\n");b+=this.V.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 Sc(a,b,c,d){this.p=a;this.R=b;this.H=c;this.La=d}Sc.prototype.toString=n("p");var Tc={};
+Pc.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.$?"//":"/")+"\n");this.B.p&&(b+=a+"Axis: "+this.B+"\n");b+=this.V.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 Sc(a,b,c,d){this.p=a;this.R=b;this.H=c;this.Ma=d}Sc.prototype.toString=n("p");var Tc={};
function Q(a,b,c,d){a in Tc&&h(Error("Axis already created: "+a));b=new Sc(a,b,c,!!d);return Tc[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},j);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},j);
var Jc=Q("attribute",function(a,b){var c=new J,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 f=b.attributes;if(f)if(a instanceof K&&a.d===k||"*"==d)for(var d=b.sourceIndex,e=0,g;g=f[e];e++)Zb?g.nodeValue&&c.add(bc(b,g,d)):c.add(g);else(g=f.getNamedItem(d))&&(Zb?g.nodeValue&&c.add(bc(b,g,b.sourceIndex)):c.add(g));return c},l),Qc=Q("child",function(a,b,c,d,f){return(Zb?mc:nc).call(k,a,b,s(c)?c:k,s(d)?d:k,f||new J)},l,j);
Q("descendant",gc,l,j);var Rc=Q("descendant-or-self",function(a,b,c,d){var f=new J;fc(b,c,d)&&a.matches(b)&&f.add(b);return gc(a,b,c,d,f)},l,j),Mc=Q("following",function(a,b,c,d){var f=new J;do for(var e=b;e=e.nextSibling;)fc(e,c,d)&&a.matches(e)&&f.add(e),f=gc(a,e,c,d,f);while(b=b.parentNode);return f},l,j);Q("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},l);Q("namespace",function(){return new J},l);
@@ -61,11 +61,11 @@ function fd(a,b){var c,d,f;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "/
function gd(a){for(var b=[];"["==H(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Zc(a);b.push(c);R(a,"Unclosed predicate expression.");ad(a,"]")}return b}function $c(a){if("-"==H(a.a))return a.a.next(),new Wc($c(a));var b=ed(a);if("|"!=H(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(ed(a));a.a.back();a=new Xc(b)}return a};function hd(a){a.length||h(Error("Empty XPath expression."));for(var a=a.match(dc),b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);a=new cc(a);a.empty()&&h(Error("Invalid XPath expression."));var c=Zc(new Yc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,b){var e=c.evaluate(new Yb(a));return new S(e,b)}}
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?rc(a):""+a;break;case 1:this.numberValue=a instanceof J?+rc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.z():!!a;break;case 4:case 5:case 6:case 7:var d=sc(a);c=[];
for(var f=d.next();f;f=d.next())c.push(f instanceof ac?f.g:f);this.snapshotLength=a.z();this.invalidIteratorState=l;break;case 8:case 9:d=qc(a);this.singleNodeValue=d instanceof ac?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var e=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return e>=c.length?k:c[e++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?k: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;var T={},id={Xa:"http://www.w3.org/2000/svg"};T.za=function(a){return id[a]||k};
+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;var T={},id={Ya:"http://www.w3.org/2000/svg"};T.za=function(a){return id[a]||k};
T.t=function(a,b,c){var d=F(a);if(z){var f=G(d)||q,e=f.document;e.evaluate||(f.XPathResult=S,e.evaluate=function(a,b,c,d){return(new hd(a)).evaluate(b,d)},e.createExpression=function(a){return new hd(a)})}else try{if(!d.implementation||!d.implementation.hasFeature("XPath","3.0"))return k}catch(g){return k}try{var m;if(tb&&!Bb(2.3))try{m=G(d).top.document}catch(t){return k}else m=d;var p=d.createNSResolver?d.createNSResolver(d.documentElement):T.za;return z&&!db(7)?m.evaluate.apply(k,[b,a,p,c,k]):
m.evaluate(b,a,p,c,k)}catch(ta){A&&"NS_ERROR_ILLEGAL_VALUE"==ta.name||h(new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+ta))}};T.Y=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.Ka=function(a,b){var c=function(){var c=T.t(b,a,9);return c?(c=c.singleNodeValue,y?c:c||k):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):k}();c===k||T.Y(c,a);return c};
-T.Ra=function(a,b){var c=function(){var c=T.t(b,a,7);if(c){var f=c.snapshotLength;y&&!r(f)&&T.Y(k,a);for(var e=[],g=0;g<f;++g)e.push(c.snapshotItem(g));return e}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){T.Y(b,a)});return c};!y&&(!B||D("533"));function jd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}jd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};jd.prototype.contains=function(a){return!this||!a?l:a instanceof jd?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 kd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,k))?c[b]||c.getPropertyValue(b)||"":""}function ld(a,b){return kd(a,b)||(a.currentStyle?a.currentStyle[b]:k)||a.style&&a.style[b]}function md(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}
+T.La=function(a,b){var c=function(){var c=T.t(b,a,9);return c?(c=c.singleNodeValue,y?c:c||k):b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):k}();c===k||T.Y(c,a);return c};
+T.Sa=function(a,b){var c=function(){var c=T.t(b,a,7);if(c){var f=c.snapshotLength;y&&!r(f)&&T.Y(k,a);for(var e=[],g=0;g<f;++g)e.push(c.snapshotItem(g));return e}return b.selectNodes?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){T.Y(b,a)});return c};!y&&(!B||D("533"));function jd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}jd.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};jd.prototype.contains=function(a){return!this||!a?l:a instanceof jd?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 kd(a,b){var c=F(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,k))?c[b]||c.getPropertyValue(b)||"":""}function ld(a,b){return kd(a,b)||(a.currentStyle?a.currentStyle[b]:k)||a.style&&a.style[b]}function md(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 nd(a){if(z&&!fb(8))return a.offsetParent;for(var b=F(a),c=ld(a,"position"),d="fixed"==c||"absolute"==c,a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=ld(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 k}
function od(a){var b,c=F(a),d=ld(a,"position");pa(a,"Parameter is required");var f=A&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),e=new E(0,0),g;b=c?F(c):document;if(g=z)if(g=!fb(9))g="CSS1Compat"!=Mb(b).P.compatMode;g=g?b.body:b.documentElement;if(a==g)return e;if(a.getBoundingClientRect)b=md(a),a=Mb(c),a=Ob(a.P),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{b=a;do{e.x+=b.offsetLeft;e.y+=b.offsetTop;b!=a&&(e.x+=b.clientLeft||0,e.y+=b.clientTop||0);if(B&&"fixed"==ld(b,"position")){e.x+=c.body.scrollLeft;e.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(y||B&&"absolute"==d)e.y-=c.body.offsetTop;for(b=a;(b=nd(b))&&b!=c.body&&b!=g;)if(e.x-=b.scrollLeft,!y||"TR"!=b.tagName)e.y-=b.scrollTop}return e}
@@ -80,7 +80,7 @@ parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c=4!=d
function Jd(a){if(da(a.getBBox))try{var b=a.getBBox();if(b)return b}catch(c){}if(U(a,Jb)){b=G(F(a))||i;"hidden"!=yd(a,"overflow")?a=j:(a=Hd(a),!a||!U(a,"HTML")?a=j:(a=yd(a,"overflow"),a="auto"==a||"scroll"==a));if(a){var a=(b||v).document,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(k,[b.clientWidth,b.scrollWidth,b.offsetWidth,d.scrollWidth,d.offsetWidth]);a=Math.max.apply(k,a);
b=new Kb(b,a)}else b=(b||window).document,b="CSS1Compat"==b.compatMode?b.documentElement:b.body,b=new Kb(b.clientWidth,b.clientHeight);return b}return rd(a)}
function wd(a,b){function c(a){if("none"==yd(a,"display"))return l;a=Hd(a);return!a||c(a)}function d(a){var b=Jd(a);return 0<b.height&&0<b.width?j:va(a.childNodes,function(a){return a.nodeType==Lb||U(a)&&d(a)})}function f(a){var b=nd(a),c=A||z||y?Hd(a):b;if((A||z||y)&&U(c,Jb))b=c;if(b&&"hidden"==yd(b,"overflow")){var c=Jd(b),d=pd(b),a=pd(a);return d.x+c.width<a.x||d.y+c.height<a.y?l:f(b)}return j}U(a)||h(Error("Argument to isShown must be of type Element"));if(U(a,"OPTION")||U(a,"OPTGROUP")){var e=
-Xb(a,function(a){return U(a,"SELECT")});return!!e&&wd(e,j)}if(U(a,"MAP")){if(!a.name)return l;e=F(a);if(e.evaluate)e=T.Ka('/descendant::*[@usemap = "#'+a.name+'"]',e);else var g=[],e=Tb(e,function(b){var c;if(c=U(b)){if(8==b.nodeType)b=k;else if(c="usemap","style"==c){var d=[];w(b.style.cssText.split(Ed),function(a){var b=a.indexOf(":");0<b&&(a=[a.slice(0,b),a.slice(b+1)],2==a.length&&d.push(a[0].toLowerCase(),":",a[1],";"))});d=d.join("");d=";"==d.charAt(d.length-1)?d:d+";";b=y?d.replace(/\w+:;/g,
+Xb(a,function(a){return U(a,"SELECT")});return!!e&&wd(e,j)}if(U(a,"MAP")){if(!a.name)return l;e=F(a);if(e.evaluate)e=T.La('/descendant::*[@usemap = "#'+a.name+'"]',e);else var g=[],e=Tb(e,function(b){var c;if(c=U(b)){if(8==b.nodeType)b=k;else if(c="usemap","style"==c){var d=[];w(b.style.cssText.split(Ed),function(a){var b=a.indexOf(":");0<b&&(a=[a.slice(0,b),a.slice(b+1)],2==a.length&&d.push(a[0].toLowerCase(),":",a[1],";"))});d=d.join("");d=";"==d.charAt(d.length-1)?d:d+";";b=y?d.replace(/\w+:;/g,
""):d}else{var e=b.getAttributeNode(c);z&&!e&&(db(8)&&wa(Dd,c))&&(e=b[c]);b=!e?k:wa(Dd,c)?Hb&&"false"==e.value?k:"true":e.specified?e.value:k}c=b=="#"+a.name}return c},g,j)?g[0]:i;return!!e&&wd(e,b)}if(U(a,"AREA"))return e=Xb(a,function(a){return U(a,"MAP")}),!!e&&wd(e,b);if(!(e=U(a,"INPUT")&&"hidden"==a.type.toLowerCase()||U(a,"NOSCRIPT")||"hidden"==yd(a,"visibility")||!c(a)))if(e=!b)z?"relative"==yd(a,"position")?e=1:(e=yd(a,"filter"),e=(e=e.match(/^alpha\(opacity=(\d*)\)/)||e.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?
Number(e[1])/100:1):e=Kd(a),e=0==e;return e||!d(a)?l:f(a)}function Kd(a){var b=1,c=yd(a,"opacity");c&&(b=Number(c));(a=Hd(a))&&(b*=Kd(a));return b};function Ld(a){this.e=v.document.documentElement;this.q=k;var b=F(this.e).activeElement;b&&Md(this,b);this.A=a||new Nd}Ld.prototype.n=n("e");function Md(a,b){a.e=b;a.q=U(b,"OPTION")?Xb(b,function(a){return U(a,"SELECT")}):k}
function Od(a,b,c,d,f,e){if(!vd(a.e))return l;f&&!(Pd==b||Qd==b)&&h(new x(12,"Event type does not allow related target: "+b));c={clientX:c.x,clientY:c.y,button:d,altKey:a.A.o(4),ctrlKey:a.A.o(2),shiftKey:a.A.o(1),metaKey:a.A.o(8),wheelDelta:e||0,relatedTarget:f||k};return(a=a.q?Rd(a,b):a.e)?Sd(a,b,c):j}
@@ -98,22 +98,22 @@ b.altKey,b.shiftKey,b.metaKey):p.initTouchEvent(this.d,this.F,this.G,e,1,0,0,b.c
var he=new V("change",j,l),ie=new V("focus",l,l),Vd=new W("click",j,j),Td=new W("contextmenu",j,j),je=new W("dblclick",j,j),ke=new W("mousedown",j,j),Ud=new W("mousemove",j,l),Qd=new W("mouseout",j,j),Pd=new W("mouseover",j,j),Wd=new W("mouseup",j,j),de=new W(A?"DOMMouseScroll":"mousewheel",j,j),ce=new W("MozMousePixelScroll",j,j),fe=new ee("keypress",j,j),le=new ge("touchmove",j,j),me=new ge("touchstart",j,j);
function Sd(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=l);return Hb?a.fireEvent("on"+b.d,c):a.dispatchEvent(c)};function ne(a){if("function"==typeof a.K)return a.K();if(s(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 Ia(a)};function oe(a,b){this.m={};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 a&&this.W(a)}o=oe.prototype;o.J=0;o.ya=0;o.K=function(){pe(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.m[this.i[b]]);return a};function qe(a){pe(a);return a.i.concat()}o.remove=function(a){return re(this.m,a)?(delete this.m[a],this.J--,this.ya++,this.i.length>2*this.J&&pe(this),j):l};
function pe(a){if(a.J!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];re(a.m,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.J!=a.i.length){for(var f={},c=b=0;b<a.i.length;)d=a.i[b],re(f,d)||(a.i[c++]=d,f[d]=1),b++;a.i.length=c}}o.get=function(a,b){return re(this.m,a)?this.m[a]:b};o.set=function(a,b){re(this.m,a)||(this.J++,this.i.push(a),this.ya++);this.m[a]=b};
-o.W=function(a){var b;if(a instanceof oe)b=qe(a),a=a.K();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=Ia(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function re(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function se(a){this.m=new oe;a&&this.W(a)}function te(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a}o=se.prototype;o.add=function(a){this.m.set(te(a),a)};o.W=function(a){for(var a=ne(a),b=a.length,c=0;c<b;c++)this.add(a[c])};o.remove=function(a){return this.m.remove(te(a))};o.contains=function(a){a=te(a);return re(this.m.m,a)};o.K=function(){return this.m.K()};function ue(a){Ld.call(this);var b;if(U(this.n(),"TEXTAREA"))b=j;else if(U(this.n(),"INPUT"))b=wa(Gd,this.n().type.toLowerCase());else{b=this.n();var c=function(a){return"inherit"==a.contentEditable?(a=Hd(a))?c(a):l:"true"==a.contentEditable};b=(!r(b.contentEditable)?0:!z&&r(b.isContentEditable)?b.isContentEditable:c(b))?j:l}this.Oa=b&&!Cd(this.n(),"readOnly");this.qa=new se;a&&w(a,function(a){if(wa(ve,a)){var b=we.get(a.code),c=this.A;c.fa|=b}this.qa.add(a)},this)}u(ue,Ld);var xe={};
-function Z(a,b,c){ea(a)&&(a=A?a.b:y?a.opera:a.c);a=new ye(a,b,c);if(b&&(!(b in xe)||c))xe[b]={key:a,shift:l},c&&(xe[c]={key:a,shift:j});return a}function ye(a,b,c){this.code=a;this.Aa=b||k;this.Va=c||this.Aa}Z(8);Z(9);Z(13);var ze=Z(16),Ae=Z(17),Be=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 Ce=Z(Pa?{b:91,c:91,opera:219}:Oa?{b:224,c:91,opera:17}:{b:0,c:91,opera:k});Z(Pa?{b:92,c:92,opera:220}:Oa?{b:224,c:93,opera:17}:{b:0,c:92,opera:k});
-Z(Pa?{b:93,c:93,opera:0}:Oa?{b:0,c:0,opera:16}:{b:93,c:k,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&&y?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({b:107,c:187,opera:61},"=","+");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 ve=[Be,Ae,Ce,ze],De=new oe;De.set(1,ze);De.set(2,Ae);De.set(4,Be);De.set(8,Ce);var we,Ee=new oe;
-w(qe(De),function(a){Ee.set(De.get(a).code,a)});we=Ee;ue.prototype.o=function(a){return this.qa.contains(a)};A&&D(12);function Fe(a,b){Ld.call(this,b);this.Q=this.r=k;this.w=new E(0,0);this.aa=this.M=l;if(a){this.r=a.Ma;try{U(a.Ca)&&(this.Q=a.Ca)}catch(c){this.r=k}this.w=a.Na;this.M=a.Ta;this.aa=a.Qa;try{U(a.element)&&Md(this,a.element)}catch(d){this.r=k}}}u(Fe,Ld);var $={};
+o.W=function(a){var b;if(a instanceof oe)b=qe(a),a=a.K();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=Ia(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};function re(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function se(a){this.m=new oe;a&&this.W(a)}function te(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a}o=se.prototype;o.add=function(a){this.m.set(te(a),a)};o.W=function(a){for(var a=ne(a),b=a.length,c=0;c<b;c++)this.add(a[c])};o.remove=function(a){return this.m.remove(te(a))};o.contains=function(a){a=te(a);return re(this.m.m,a)};o.K=function(){return this.m.K()};function ue(a){Ld.call(this);var b;if(U(this.n(),"TEXTAREA"))b=j;else if(U(this.n(),"INPUT"))b=wa(Gd,this.n().type.toLowerCase());else{b=this.n();var c=function(a){return"inherit"==a.contentEditable?(a=Hd(a))?c(a):l:"true"==a.contentEditable};b=(!r(b.contentEditable)?0:!z&&r(b.isContentEditable)?b.isContentEditable:c(b))?j:l}this.Pa=b&&!Cd(this.n(),"readOnly");this.Ca=0;this.qa=new se;a&&(w(a.pressed,function(a){if(wa(ve,a)){var b=we.get(a.code),c=this.A;c.fa|=b}this.qa.add(a)},this),this.Ca=a.currentPos)}
+u(ue,Ld);var xe={};function Z(a,b,c){ea(a)&&(a=A?a.b:y?a.opera:a.c);a=new ye(a,b,c);if(b&&(!(b in xe)||c))xe[b]={key:a,shift:l},c&&(xe[c]={key:a,shift:j});return a}function ye(a,b,c){this.code=a;this.Aa=b||k;this.Wa=c||this.Aa}Z(8);Z(9);Z(13);var ze=Z(16),Ae=Z(17),Be=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 Ce=Z(Pa?{b:91,c:91,opera:219}:Oa?{b:224,c:91,opera:17}:{b:0,c:91,opera:k});
+Z(Pa?{b:92,c:92,opera:220}:Oa?{b:224,c:93,opera:17}:{b:0,c:92,opera:k});Z(Pa?{b:93,c:93,opera:0}:Oa?{b:0,c:0,opera:16}:{b:93,c:k,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&&y?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({b:107,c:187,opera:61},"=","+");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(188,",");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var ve=[Be,Ae,Ce,ze],De=new oe;De.set(1,ze);De.set(2,Ae);
+De.set(4,Be);De.set(8,Ce);var we,Ee=new oe;w(qe(De),function(a){Ee.set(De.get(a).code,a)});we=Ee;ue.prototype.o=function(a){return this.qa.contains(a)};A&&D(12);function Fe(a,b){Ld.call(this,b);this.Q=this.r=k;this.w=new E(0,0);this.aa=this.M=l;if(a){this.r=a.Na;try{U(a.Da)&&(this.Q=a.Da)}catch(c){this.r=k}this.w=a.Oa;this.M=a.Ua;this.aa=a.Ra;try{U(a.element)&&Md(this,a.element)}catch(d){this.r=k}}}u(Fe,Ld);var $={};
Hb?($[Vd]=[0,0,0,k],$[Td]=[k,k,0,k],$[Wd]=[1,4,2,k],$[Qd]=[0,0,0,0],$[Ud]=[1,4,2,0]):B||Gb?($[Vd]=[0,1,2,k],$[Td]=[k,k,2,k],$[Wd]=[0,1,2,k],$[Qd]=[0,1,2,0],$[Ud]=[0,1,2,0]):($[Vd]=[0,1,2,k],$[Td]=[k,k,2,k],$[Wd]=[0,1,2,k],$[Qd]=[0,0,0,0],$[Ud]=[0,0,0,0]);$[je]=$[Vd];$[ke]=$[Wd];$[Pd]=$[Qd];
function Ge(a){a.r!==k&&h(new x(13,"Cannot press more then one button or an already pressed button."));a.r=0;a.Q=a.n();var b;var c=A&&!Bb(4);if((B||c)&&(U(a.n(),"OPTION")||U(a.n(),"SELECT")))b=j;else{(c=A||z)&&(b=F(a.n()).activeElement);var d=He(a,ke);b=d&&c&&b!=F(a.n()).activeElement?l:d}if(b){a=a.q||a.e;b=F(a).activeElement;if(a!=b){if(b&&(da(b.blur)||z&&ea(b.blur))){try{b.blur()}catch(f){z&&f.message=="Unspecified error."||h(f)}z&&!D(8)&&G(F(a)).focus()}if(da(a.focus)||z&&ea(a.focus))y&&D(11)&&
!wd(a)?Sd(a,ie):a.focus()}}}
function Ie(a){a.r===k&&h(new x(13,"Cannot release a button when no button is pressed."));He(a,Wd);if(a.r==0&&a.n()==a.Q){var b=a.w,c=Je(a,Vd);if(vd(a.e)){var d=k,f=k;if(!Xd)for(var e=a.e;e;e=e.parentNode)if(U(e,"A")){d=e;break}else{var g;a:{if(U(e,"INPUT")){g=e.type.toLowerCase();if(g=="submit"||g=="image"){g=j;break a}}if(U(e,"BUTTON")){g=e.type.toLowerCase();if(g=="submit"){g=j;break a}}g=l}if(g){f=e;break}}if(g=e=zd(a.e)){g=a.e;zd(g)||h(new x(15,"Element is not selectable"));var m="selected",
t=g.type&&g.type.toLowerCase();if("checkbox"==t||"radio"==t)m="checked";g=!!Cd(g,m)}if(a.q){m=a.q;if(!g||m.multiple){a.e.selected=!g;(!B||!m.multiple||tb&&Bb(4))&&Sd(m,he)}}if(z&&f)f.click();else if(Od(a,Vd,b,c))if(d&&Yd(d)){b=d;c=b.href;d=G(F(b));z&&!D(8)&&(c=Zd(d.location,c));b.target?d.open(c,b.target):d.location.href=c}else if(e&&!a.q&&!A&&!B&&!(g&&a.e.type.toLowerCase()=="radio")){a.e.checked=!g;y&&!D(11)&&Sd(a.e,he)}}a.M&&He(a,je);a.M=!a.M}else a.r==2&&He(a,Td);a.r=k;a.Q=k}
Fe.prototype.move=function(a,b){var c=pd(a);this.w.x=b.x+c.x;this.w.y=b.y+c.y;c=this.n();if(a!=c){try{G(F(c)).closed&&(c=k)}catch(d){c=k}if(c){var f=c===v.document.documentElement||c===v.document.body,c=!this.aa&&f?k:c;He(this,Qd,a)}Md(this,a);z||He(this,Pd,c)}He(this,Ud);z&&a!=c&&He(this,Pd,c);this.M=l};function He(a,b,c){a.aa=j;return Od(a,b,a.w,Je(a,b),c,i)}
-function Je(a,b){if(!(b in $))return 0;var c=$[b][a.r===k?3:a.r];c===k&&h(new x(13,"Event does not permit the specified mouse button."));return c};function Ke(){Ld.call(this);this.w=new E(0,0);this.Z=new E(0,0)}u(Ke,Ld);o=Ke.prototype;o.Da=l;o.va=0;o.ua=0;
-o.move=function(a,b,c){this.o()||Md(this,a);a=pd(a);this.w.x=b.x+a.x;this.w.y=b.y+a.y;r(c)&&(this.Z.x=c.x+a.x,this.Z.y=c.y+a.y);if(this.o()){this.Da=j;this.o()||h(new x(13,"Should never fire event when touchscreen is not pressed."));var d,f;this.ua&&(d=this.ua,f=this.Z);var b=this.va,c=this.w,a=function(a,b){var c={identifier:a,screenX:b.x,screenY:b.y,clientX:b.x,clientY:b.y,pageX:b.x,pageY:b.y};e.changedTouches.push(c);if(le==me||le==le){e.touches.push(c);e.targetTouches.push(c)}},e={touches:[],
+function Je(a,b){if(!(b in $))return 0;var c=$[b][a.r===k?3:a.r];c===k&&h(new x(13,"Event does not permit the specified mouse button."));return c};function Ke(){Ld.call(this);this.w=new E(0,0);this.Z=new E(0,0)}u(Ke,Ld);o=Ke.prototype;o.Ea=l;o.va=0;o.ua=0;
+o.move=function(a,b,c){this.o()||Md(this,a);a=pd(a);this.w.x=b.x+a.x;this.w.y=b.y+a.y;r(c)&&(this.Z.x=c.x+a.x,this.Z.y=c.y+a.y);if(this.o()){this.Ea=j;this.o()||h(new x(13,"Should never fire event when touchscreen is not pressed."));var d,f;this.ua&&(d=this.ua,f=this.Z);var b=this.va,c=this.w,a=function(a,b){var c={identifier:a,screenX:b.x,screenY:b.y,clientX:b.x,clientY:b.y,pageX:b.x,pageY:b.y};e.changedTouches.push(c);if(le==me||le==le){e.touches.push(c);e.targetTouches.push(c)}},e={touches:[],
targetTouches:[],changedTouches:[],altKey:this.A.o(4),ctrlKey:this.A.o(2),shiftKey:this.A.o(1),metaKey:this.A.o(8),relatedTarget:k,scale:0,rotation:0};a(b,c);r(d)&&a(d,f);Sd(this.e,le,e)}};o.o=function(){return!!this.va};function Le(a,b){this.x=a;this.y=b}u(Le,E);Le.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Le.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function Me(a,b,c){wd(a,j)||h(new x(11,"Element is not currently visible and may not be manipulated"));var d=F(a),d=B?d.body:d.documentElement,f;f=od(a);var e=od(d),g;if(z){var m=ud(d,"borderLeft");g=ud(d,"borderRight");var t=ud(d,"borderTop"),p=ud(d,"borderBottom");g=new jd(t,g,p,m)}else m=kd(d,"borderLeftWidth"),g=kd(d,"borderRightWidth"),t=kd(d,"borderTopWidth"),p=kd(d,"borderBottomWidth"),g=new jd(parseFloat(t),parseFloat(g),parseFloat(p),parseFloat(m));m=f.x-e.x-g.left;f=f.y-e.y-g.top;e=d.clientHeight-
-a.offsetHeight;g=d.scrollLeft;t=d.scrollTop;g+=Math.min(m,Math.max(m-(d.clientWidth-a.offsetWidth),0));t+=Math.min(f,Math.max(f-e,0));f=new E(g,t);d.scrollLeft=f.x;d.scrollTop=f.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);Ge(c);Ie(c);Ge(c);Ie(c)}function Ne(a){var b=rd(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ne(a.offsetParent)}function Oe(){Ld.call(this)}u(Oe,Ld);Oe.Pa=function(){return Oe.la?Oe.la:Oe.la=new Oe};function Pe(){this.U=i}
+a.offsetHeight;g=d.scrollLeft;t=d.scrollTop;g+=Math.min(m,Math.max(m-(d.clientWidth-a.offsetWidth),0));t+=Math.min(f,Math.max(f-e,0));f=new E(g,t);d.scrollLeft=f.x;d.scrollTop=f.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);Ge(c);Ie(c);Ge(c);Ie(c)}function Ne(a){var b=rd(a);return 0<b.width&&0<b.height||!a.offsetParent?b:Ne(a.offsetParent)}function Oe(){Ld.call(this)}u(Oe,Ld);Oe.Qa=function(){return Oe.la?Oe.la:Oe.la=new Oe};function Pe(){this.U=i}
function Qe(a,b,c){switch(typeof b){case "string":Re(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 f="",e=0;e<d;e++)c.push(f),f=b[e],Qe(a,a.U?a.U.call(b,String(e),f):f,c),f=",";c.push("]");break}c.push("{");d="";for(e in b)Object.prototype.hasOwnProperty.call(b,e)&&(f=b[e],"function"!=typeof f&&(c.push(d),Re(e,
c),c.push(":"),Qe(a,a.U?a.U.call(b,e,f):f,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Se={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Te=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Re(a,b){b.push('"',a.replace(Te,function(a){if(a in Se)return Se[a];var b=a.charCodeAt(0),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return Se[a]=f+b.toString(16)}),'"')};B||y||A&&D(3.5)||z&&D(8);function Ue(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return sa(a,Ue);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ve(a);return b}if("document"in a)return b={},b.WINDOW=Ve(a),b;if(ca(a))return sa(a,Ue);var b=function(a,b){return"number"==typeof b||s(b)},c={},d;for(d in a)b.call(i,0,d)&&(c[d]=a[d]);return Ha(c,Ue);default:return k}}
View
50 src/third_party/webdriver-atoms/drag.js
@@ -1,18 +1,18 @@
function(){return function(){function h(a){throw a;}var i=void 0,j=!0,k=null,l=!1;function n(a){return function(){return this[a]}}function aa(a){return function(){return a}}var o,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 t(a){return a!==i}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!=k||"function"==b}var fa="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ga=0,ha=Date.now||function(){return+new Date};
-function v(a,b){function c(){}c.prototype=b.prototype;a.Wa=b.prototype;a.prototype=new c};var w=window;var ia={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 v(a,b){function c(){}c.prototype=b.prototype;a.Xa=b.prototype;a.prototype=new c};var w=window;var ia={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"};function ja(a){Error.captureStackTrace?Error.captureStackTrace(this,ja):this.stack=Error().stack||"";a&&(this.message=String(a))}v(ja,Error);ja.prototype.name="CustomError";function ka(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
function la(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(d.length,f.length),g=0;0==c&&g<e;g++){var m=d[g]||"",s=f[g]||"",p=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var M=p.exec(m)||["","",""],q=L.exec(s)||["","",""];if(0==M[0].length&&0==q[0].length)break;c=((0==M[1].length?0:parseInt(M[1],10))<(0==q[1].length?0:parseInt(q[1],10))?-1:(0==M[1].length?0:parseInt(M[1],10))>(0==q[1].length?
-0:parseInt(q[1],10))?1:0)||((0==M[2].length)<(0==q[2].length)?-1:(0==M[2].length)>(0==q[2].length)?1:0)||(M[2]<q[2]?-1:M[2]>q[2]?1:0)}while(0==c)}return c};function ma(a,b){b.unshift(a);ja.call(this,ka.apply(k,b));b.shift();this.Sa=a}v(ma,ja);ma.prototype.name="AssertionError";function na(a,b,c,d){var f="Assertion failed";if(c)var f=f+(": "+c),e=d;else a&&(f+=": "+a,e=b);h(new ma(""+f,e||[]))}function oa(a,b,c){a||na("",k,b,Array.prototype.slice.call(arguments,2))}function pa(a,b,c){ea(a)||na("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var qa=Array.prototype;function x(a,b,c){for(var d=a.length,f=u(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)}function ra(a,b){for(var c=a.length,d=[],f=0,e=u(a)?a.split(""):a,g=0;g<c;g++)if(g in e){var m=e[g];b.call(i,m,g,a)&&(d[f++]=m)}return d}function sa(a,b){for(var c=a.length,d=Array(c),f=u(a)?a.split(""):a,e=0;e<c;e++)e in f&&(d[e]=b.call(i,f[e],e,a));return d}function ta(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,e){d=b.call(i,d,c,e,a)});return d}
+0:parseInt(q[1],10))?1:0)||((0==M[2].length)<(0==q[2].length)?-1:(0==M[2].length)>(0==q[2].length)?1:0)||(M[2]<q[2]?-1:M[2]>q[2]?1:0)}while(0==c)}return c};function ma(a,b){b.unshift(a);ja.call(this,ka.apply(k,b));b.shift();this.Ta=a}v(ma,ja);ma.prototype.name="AssertionError";function na(a,b,c,d){var f="Assertion failed";if(c)var f=f+(": "+c),e=d;else a&&(f+=": "+a,e=b);h(new ma(""+f,e||[]))}function oa(a,b,c){a||na("",k,b,Array.prototype.slice.call(arguments,2))}function pa(a,b,c){ea(a)||na("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var qa=Array.prototype;function x(a,b,c){for(var d=a.length,f=u(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)}function ra(a,b){for(var c=a.length,d=[],f=0,e=u(a)?a.split(""):a,g=0;g<c;g++)if(g in e){var m=e[g];b.call(i,m,g,a)&&(d[f++]=m)}return d}function sa(a,b){for(var c=a.length,d=Array(c),f=u(a)?a.split(""):a,e=0;e<c;e++)e in f&&(d[e]=b.call(i,f[e],e,a));return d}function ta(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,e){d=b.call(i,d,c,e,a)});return d}
function ua(a,b){for(var c=a.length,d=u(a)?a.split(""):a,f=0;f<c;f++)if(f in d&&b.call(i,d[f],f,a))return j;return l}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 qa.concat.apply(qa,arguments)}function xa(a,b,c){oa(a.length!=k);return 2>=arguments.length?qa.slice.call(a,b):qa.slice.call(a,b,c)};var ya="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),za=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function Aa(a){Ba.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(za,"#$1$1$2$2$3$3"));return a.toLowerCase()}var Ba=/^#(?:[0-9a-f]{3}){1,2}$/i,Ca=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i;
function Da(a){var b=a.match(Ca);if(b){var a=Number(b[1]),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 Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Fa(a){var b=a.match(Ea);if(b){var a=Number(b[1]),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 Ga(a,b){var c={},d;for(d in a)c[d]=b.call(i,a[d],d,a);return c}function Ha(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};function y(a,b){this.code=a;this.message=b||"";this.name=Ia[a]||Ia[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}v(y,Error);
var Ia={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-y.prototype.toString=function(){return"["+this.name+"] "+this.message};var Ja,Ka,La,Ma,Na,Oa;function Pa(){return r.navigator?r.navigator.userAgent:k}Ma=La=Ka=Ja=l;var Qa;if(Qa=Pa()){var Ra=r.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 z=Ja,A=Ka,B=Ma,C=La,Sa,Ta=r.navigator;Sa=Ta&&Ta.platform||"";Na=-1!=Sa.indexOf("Mac");Oa=-1!=Sa.indexOf("Win");var Ua=-1!=Sa.indexOf("Linux"),Va;
+y.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa;function Pa(){return r.navigator?r.navigator.userAgent:k}Ma=La=Ka=Ja=l;var Qa;if(Qa=Pa()){var Ra=r.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 z=Ja,A=Ka,B=Ma,C=La,Sa,Ta=r.navigator;Sa=Ta&&Ta.platform||"";Na=-1!=Sa.indexOf("Mac");Oa=-1!=Sa.indexOf("Win");var Ua=-1!=Sa.indexOf("Linux"),Va;
a:{var Wa="",Xa;if(z&&r.opera)var Ya=r.opera.version,Wa="function"==typeof Ya?Ya():Ya;else if(B?Xa=/rv\:([^\);]+)(\)|;)/:A?Xa=/MSIE\s+([^\);]+)(\)|;)/:C&&(Xa=/WebKit\/(\S+)/),Xa)var Za=Xa.exec(Pa()),Wa=Za?Za[1]:"";if(A){var $a,ab=r.document;$a=ab?ab.documentMode:i;if($a>parseFloat(Wa)){Va=String($a);break a}}Va=Wa}var bb={};function cb(a){return bb[a]||(bb[a]=0<=la(Va,a))}var db={};function eb(a){return db[a]||(db[a]=A&&!!document.documentMode&&document.documentMode>=a)};var fb,gb,hb,ib,jb,kb,lb;lb=kb=jb=ib=hb=gb=fb=l;var D=Pa();D&&(-1!=D.indexOf("Firefox")?fb=j:-1!=D.indexOf("Camino")?gb=j:-1!=D.indexOf("iPhone")||-1!=D.indexOf("iPod")?hb=j:-1!=D.indexOf("iPad")?ib=j:-1!=D.indexOf("Android")?jb=j:-1!=D.indexOf("Chrome")?kb=j:-1!=D.indexOf("Safari")&&(lb=j));var mb=z,nb=A,ob=fb,pb=gb,qb=hb,rb=ib,sb=jb,tb=kb,ub=lb;function vb(a){return(a=a.exec(Pa()))?a[1]:""}var wb=function(){if(ob)return vb(/Firefox\/([0-9.]+)/);if(nb||mb)return Va;if(tb)return vb(/Chrome\/([0-9.]+)/);if(ub)return vb(/Version\/([0-9.]+)/);if(qb||rb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Pa());if(a)return a[1]+"."+a[2]}else{if(sb)return(a=vb(/Android\s+([0-9.]+)/))?a:vb(/Version\/([0-9.]+)/);if(pb)return vb(/Camino\/([0-9.]+)/)}return""}();var xb,yb;function zb(a){return Ab?xb(a):A?0<=la(document.documentMode,a):cb(a)}function Bb(a){return Ab?yb(a):sb?0<=la(Cb,a):0<=la(wb,a)}
var Ab=function(){if(!B)return l;var a=r.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),f=c.platformVersion,e=c.version;xb=function(a){return 0<=d.Ba(f,""+a)};yb=function(a){return 0<=d.Ba(e,""+a)};return j}(),Db=rb||qb,Eb;if(sb){var Fb=/Android\s+([0-9\.]+)/.exec(Pa());Eb=Fb?Fb[1]:"0"}else Eb="0";
var Cb=Eb,Gb=A&&9<=document.documentMode,Hb=A&&!Gb;var Ib;!A||eb(9);!B&&!A||A&&eb(9)||B&&cb("1.9.1");A&&cb("9");var Jb="BODY";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 Kb(a,b){this.width=a;this.height=b}o=Kb.prototype;o.toString=function(){return"("+this.width+" x "+this.height+")"};o.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};o.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};o.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};o.scale=function(a){this.width*=a;this.height*=a;return this};var Lb=3;function Mb(a){return a?new Nb(F(a)):Ib||(Ib=new Nb)}function Ob(a){var b=!C&&"CSS1Compat"==a.compatMode?a.documentElement:a.body,a=a.parentWindow||a.defaultView;return new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function G(a){return a?a.parentWindow||a.defaultView:window}
@@ -20,33 +20,33 @@ function Pb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("und
function Qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&A&&!cb(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 f=a.parentNode,e=b.parentNode;return f==e?Rb(a,b):!c&&Pb(f,b)?-1*Sb(a,b):!d&&Pb(e,a)?Sb(b,a):(c?a.sourceIndex:f.sourceIndex)-(d?b.sourceIndex:e.sourceIndex)}d=
F(a);c=d.createRange();c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(r.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 F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function Tb(a,b,c,d){if(a!=k)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||Tb(a,b,c,d))return j;a=a.nextSibling}return l}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==Lb)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){for(var a=a.parentNode,c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k}function Nb(a){this.P=a||r.document||document}Nb.prototype.n=function(a){return u(a)?this.P.getElementById(a):a};Nb.prototype.contains=Pb;function Yb(a,b,c){this.g=a;this.Ja=b||1;this.s=c||1};var Zb=A&&!eb(9),$b=A&&!eb(8);function ac(a,b,c,d,f){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ua=f;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.ga=a;this.S=0}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function H(a,b){return a.ga[a.S+(b||0)]}cc.prototype.next=function(){return this.ga[this.S++]};cc.prototype.back=function(){this.S--};cc.prototype.empty=function(){return this.ga.length<=this.S};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(Zb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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 Xb(a,b){for(var a=a.parentNode,c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k}function Nb(a){this.P=a||r.document||document}Nb.prototype.n=function(a){return u(a)?this.P.getElementById(a):a};Nb.prototype.contains=Pb;function Yb(a,b,c){this.g=a;this.Ka=b||1;this.s=c||1};var Zb=A&&!eb(9),$b=A&&!eb(8);function ac(a,b,c,d,f){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Va=f;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.ga=a;this.S=0}var dc=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ec=/^\s/;function H(a,b){return a.ga[a.S+(b||0)]}cc.prototype.next=function(){return this.ga[this.S++]};cc.prototype.back=function(){this.S--};cc.prototype.empty=function(){return this.ga.length<=this.S};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(Zb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,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 fc(a,b,c){if(b===k)return j;try{if(!a.getAttribute)return l}catch(d){return l}$b&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function gc(a,b,c,d,f){return(Zb?hc:ic).call(k,a,b,u(c)?c:k,u(d)?d:k,f||new J)}
function hc(a,b,c,d,f){if(a instanceof jc||8==a.d||c&&a.d===k){var e=b.all;if(!e)return f;a=kc(a);if("*"!=a&&(e=b.getElementsByTagName(a),!e))return f;if(c){for(var g=[],m=0;b=e[m++];)fc(b,c,d)&&g.push(b);e=g}for(m=0;b=e[m++];)("*"!=a||"!"!=b.tagName)&&f.add(b);return f}lc(a,b,c,d,f);return f}
function ic(a,b,c,d,f){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&f.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&f.add(b)})):a instanceof K?lc(a,b,c,d,f):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){fc(a,c,d)&&f.add(a)}));return f}
function mc(a,b,c,d,f){var e;if((a instanceof jc||8==a.d||c&&a.d===k)&&(e=b.childNodes)){var g=kc(a);if("*"!=g&&(e=ra(e,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!e))return f;c&&(e=ra(e,function(a){return fc(a,c,d)}));x(e,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&f.add(a)});return f}return nc(a,b,c,d,f)}function nc(a,b,c,d,f){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&f.add(b);return f}
function lc(a,b,c,d,f){for(b=b.firstChild;b;b=b.nextSibling)fc(b,c,d)&&a.matches(b)&&f.add(b),lc(a,b,c,d,f)}function kc(a){if(a instanceof K){if(8==a.d)return"!";if(a.d===k)return"*"}return a.getName()};function J(){this.s=this.l=k;this.L=0}function oc(a){this.v=a;this.next=this.D=k}function pc(a,b){if(a.l){if(!b.l)return a}else return b;for(var c=a.l,d=b.l,f=k,e=k,g=0;c&&d;)c.v==d.v||c.v instanceof ac&&d.v instanceof ac&&c.v.g==d.v.g?(e=c,c=c.next,d=d.next):0<Qb(c.v,d.v)?(e=d,d=d.next):(e=c,c=c.next),(e.D=f)?f.next=e:a.l=e,f=e,g++;for(e=c||d;e;)e.D=f,f=f.next=e,g++,e=e.next;a.s=f;a.L=g;return a}
-J.prototype.unshift=function(a){a=new oc(a);a.next=this.l;this.s?this.l.D=a:this.l=this.s=a;this.l=a;this.L++};J.prototype.add=function(a){a=new oc(a);a.D=this.s;this.l?this.s.next=a:this.l=this.s=a;this.s=a;this.L++};function qc(a){return(a=a.l)?a.v:k}J.prototype.z=n("L");function rc(a){return(a=qc(a))?I(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.Ga=a;this.ha=(this.H=b)?a.s:a.l;this.ba=k}
-tc.prototype.next=function(){var a=this.ha;if(a==k)return k;var b=this.ba=a;this.ha=this.H?a.D:a.next;return b.v};tc.prototype.remove=function(){var a=this.Ga,b=this.ba;b||h(Error("Next must be called at least once before remove."));var c=b.D,b=b.next;c?c.next=b:a.l=b;b?b.D=c:a.s=c;a.L--;this.ba=k};function N(a){this.k=a;this.j=this.u=l;this.N=k}N.prototype.h=n("u");N.prototype.C=n("N");function O(a,b){var c=a.evaluate(b);return c instanceof J?+rc(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof J?rc(c):""+c}function uc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.z():!!c};function vc(a,b,c){N.call(this,a.k);this.ea=a;this.ma=b;this.sa=c;this.u=b.h()||c.h();this.j=b.j||c.j;this.ea==wc&&(!c.j&&!c.h()&&4!=c.k&&0!=c.k&&b.C()?this.N={name:b.C().name,I:c}:!b.j&&(!b.h()&&4!=b.k&&0!=b.k&&c.C())&&(this.N={name:c.C().name,I:b}))}v(vc,N);
+J.prototype.unshift=function(a){a=new oc(a);a.next=this.l;this.s?this.l.D=a:this.l=this.s=a;this.l=a;this.L++};J.prototype.add=function(a){a=new oc(a);a.D=this.s;this.l?this.s.next=a:this.l=this.s=a;this.s=a;this.L++};function qc(a){return(a=a.l)?a.v:k}J.prototype.z=n("L");function rc(a){return(a=qc(a))?I(a):""}function sc(a,b){return new tc(a,!!b)}function tc(a,b){this.Ha=a;this.ha=(this.H=b)?a.s:a.l;this.ba=k}
+tc.prototype.next=function(){var a=this.ha;if(a==k)return k;var b=this.ba=a;this.ha=this.H?a.D:a.next;return b.v};tc.prototype.remove=function(){var a=this.Ha,b=this.ba;b||h(Error("Next must be called at least once before remove."));var c=b.D,b=b.next;c?c.next=b:a.l=b;b?b.D=c:a.s=c;a.L--;this.ba=k};function N(a){this.k=a;this.j=this.u=l;this.N=k}N.prototype.h=n("u");N.prototype.C=n("N");function O(a,b){var c=a.evaluate(b);return c instanceof J?+rc(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof J?rc(c):""+c}function uc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.z():!!c};function vc(a,b,c){N.call(this,a.k);this.ea=a;this.ma=b;this.sa=c;this.u=b.h()||c.h();this.j=b.j||c.j;this.ea==wc&&(!c.j&&!c.h()&&4!=c.k&&0!=c.k&&b.C()?this.N={name:b.C().name,I:c}:!b.j&&(!b.h()&&4!=b.k&&0!=b.k&&c.C())&&(this.N={name:c.C().name,I:b}))}v(vc,N);
function xc(a,b,c,d,f){var b=b.evaluate(d),c=c.evaluate(d),e;if(b instanceof J&&c instanceof J){e=sc(b);for(b=e.next();b;b=e.next()){f=sc(c);for(d=f.next();d;d=f.next())if(a(I(b),I(d)))return j}return l}if(b instanceof J||c instanceof J){b instanceof J?f=b:(f=c,c=b);f=sc(f);b=typeof c;for(d=f.next();d;d=f.next()){switch(b){case "number":e=+I(d);break;case "boolean":e=!!I(d);break;case "string":e=I(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(e,c))return j}return l}return f?
-"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.ea.t(this.ma,this.sa,a)};vc.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.ea+"\n",a=a+" ",b=b+(this.ma.toString(a)+"\n");return b+=this.sa.toString(a)};function yc(a,b,c,d){this.Ia=a;this.pa=b;this.k=c;this.t=d}yc.prototype.toString=n("Ia");var zc={};
+"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.ea.t(this.ma,this.sa,a)};vc.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.ea+"\n",a=a+" ",b=b+(this.ma.toString(a)+"\n");return b+=this.sa.toString(a)};function yc(a,b,c,d){this.Ja=a;this.pa=b;this.k=c;this.t=d}yc.prototype.toString=n("Ja");var zc={};
function Q(a,b,c,d){a in zc&&h(Error("Binary operator already created: "+a));a=new yc(a,b,c,d);return zc[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 xc(function(a,b){return a<b},a,b,c)});
-Q(">",4,2,function(a,b,c){return xc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return xc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return xc(function(a,b){return a>=b},a,b,c)});var wc=Q("=",3,2,function(a,b,c){return xc(function(a,b){return a==b},a,b,c,j)});Q("!=",3,2,function(a,b,c){return xc(function(a,b){return a!=b},a,b,c,j)});Q("and",2,2,function(a,b,c){return uc(a,c)&&uc(b,c)});Q("or",1,2,function(a,b,c){return uc(a,c)||uc(b,c)});function Ac(a,b){b.z()&&4!=a.k&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.k);this.ra=a;this.f=b;this.u=a.h();this.j=a.j}v(Ac,N);Ac.prototype.evaluate=function(a){a=this.ra.evaluate(a);return Bc(this.f,a)};Ac.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.ra.toString(a);return b+=this.f.toString(a)};function Cc(a,b){b.length<a.oa&&h(Error("Function "+a.p+" expects at least"+a.oa+" arguments, "+b.length+" given"));a.ca!==k&&b.length>a.ca&&h(Error("Function "+a.p+" expects at most "+a.ca+" arguments, "+b.length+" given"));a.Ha&&x(b,function(b,d){4!=b.k&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});N.call(this,a.k);this.R=a;this.X=b;this.u=a.u||ua(b,function(a){return a.h()});this.j=a.Fa&&!b.length||a.Ea&&!!b.length||ua(b,function(a){return a.j})}v(Cc,N);
-Cc.prototype.evaluate=function(a){return this.R.t.apply(k,wa(a,this.X))};Cc.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.R+"\n",b=b+" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=ta(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Dc(a,b,c,d,f,e,g,m,s){this.p=a;this.k=b;this.u=c;this.Fa=d;this.Ea=f;this.t=e;this.oa=g;this.ca=t(m)?m:g;this.Ha=!!s}Dc.prototype.toString=n("p");var Ec={};
+Q(">",4,2,function(a,b,c){return xc(function(a,b){return a>b},a,b,c)});Q("<=",4,2,function(a,b,c){return xc(function(a,b){return a<=b},a,b,c)});Q(">=",4,2,function(a,b,c){return xc(function(a,b){return a>=b},a,b,c)});var wc=Q("=",3,2,function(a,b,c){return xc(function(a,b){return a==b},a,b,c,j)});Q("!=",3,2,function(a,b,c){return xc(function(a,b){return a!=b},a,b,c,j)});Q("and",2,2,function(a,b,c){return uc(a,c)&&uc(b,c)});Q("or",1,2,function(a,b,c){return uc(a,c)||uc(b,c)});function Ac(a,b){b.z()&&4!=a.k&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.k);this.ra=a;this.f=b;this.u=a.h();this.j=a.j}v(Ac,N);Ac.prototype.evaluate=function(a){a=this.ra.evaluate(a);return Bc(this.f,a)};Ac.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.ra.toString(a);return b+=this.f.toString(a)};function Cc(a,b){b.length<a.oa&&h(Error("Function "+a.p+" expects at least"+a.oa+" arguments, "+b.length+" given"));a.ca!==k&&b.length>a.ca&&h(Error("Function "+a.p+" expects at most "+a.ca+" arguments, "+b.length+" given"));a.Ia&&x(b,function(b,d){4!=b.k&&h(Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b))});N.call(this,a.k);this.R=a;this.X=b;this.u=a.u||ua(b,function(a){return a.h()});this.j=a.Ga&&!b.length||a.Fa&&!!b.length||ua(b,function(a){return a.j})}v(Cc,N);
+Cc.prototype.evaluate=function(a){return this.R.t.apply(k,wa(a,this.X))};Cc.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.R+"\n",b=b+" ";this.X.length&&(a+=b+"Arguments:",b+=" ",a=ta(this.X,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Dc(a,b,c,d,f,e,g,m,s){this.p=a;this.k=b;this.u=c;this.Ga=d;this.Fa=f;this.t=e;this.oa=g;this.ca=t(m)?m:g;this.Ia=!!s}Dc.prototype.toString=n("p");var Ec={};
function R(a,b,c,d,f,e,g,m){a in Ec&&h(Error("Function already created: "+a+"."));Ec[a]=new Dc(a,b,c,d,l,f,e,g,m)}R("boolean",2,l,l,function(a,b){return uc(b,a)},1);R("ceiling",1,l,l,function(a,b){return Math.ceil(O(b,a))},1);R("concat",3,l,l,function(a,b){var c=xa(arguments,1);return ta(c,function(b,c){return b+P(c,a)},"")},2,k);R("contains",2,l,l,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);R("count",1,l,l,function(a,b){return b.evaluate(a).z()},1,1,j);R("false",2,l,l,aa(l),0);
R("floor",1,l,l,function(a,b){return Math.floor(O(b,a))},1);
R("id",4,l,l,function(a,b){function c(a){if(Zb){var b=f.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length){var c;a:{c=function(b){return a==b.id};for(var d=b.length,e=u(b)?b.split(""):b,g=0;g<d;g++)if(g in e&&c.call(i,e[g])){c=g;break a}c=-1}return 0>c?k:u(b)?b.charAt(c):b[c]}}return k}return f.getElementById(a)}var d=a.g,f=9==d.nodeType?d:d.ownerDocument,d=P(b,a).split(/\s+/),e=[];x(d,function(a){(a=c(a))&&!va(e,a)&&e.push(a)});e.sort(Qb);var g=new J;x(e,function(a){g.add(a)});return g},1);
R("lang",2,l,l,aa(l),1);R("last",1,j,l,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.s},0);R("local-name",3,l,j,function(a,b){var c=b?qc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,j);R("name",3,l,j,function(a,b){var c=b?qc(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,j);R("namespace-uri",3,j,l,aa(""),0,1,j);R("normalize-space",3,l,j,function(a,b){return(b?P(b,a):I(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
-R("not",2,l,l,function(a,b){return!uc(b,a)},1);R("number",1,l,j,function(a,b){return b?O(b,a):+I(a.g)},0,1);R("position",1,j,l,function(a){return a.Ja},0);R("round",1,l,l,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,l,l,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,l,j,function(a,b){return b?P(b,a):I(a.g)},0,1);R("string-length",1,l,j,function(a,b){return(b?P(b,a):I(a.g)).length},0,1);
+R("not",2,l,l,function(a,b){return!uc(b,a)},1);R("number",1,l,j,function(a,b){return b?O(b,a):+I(a.g)},0,1);R("position",1,j,l,function(a){return a.Ka},0);R("round",1,l,l,function(a,b){return Math.round(O(b,a))},1);R("starts-with",2,l,l,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,l,j,function(a,b){return b?P(b,a):I(a.g)},0,1);R("string-length",1,l,j,function(a,b){return(b?P(b,a):I(a.g)).length},0,1);
R("substring",3,l,l,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"";var c=Math.round(c)-1,f=Math.max(c,0),a=P(b,a);if(Infinity==d)return a.substring(f);b=Math.round(d);return a.substring(f,c+b)},2,3);R("substring-after",3,l,l,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,l,l,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,l,l,function(a,b){for(var c=sc(b.evaluate(a)),d=0,f=c.next();f;f=c.next())d+=+I(f);return d},1,1,j);R("translate",3,l,l,function(a,b,c,d){for(var b=P(b,a),c=P(c,a),f=P(d,a),a=[],d=0;d<c.length;d++){var e=c.charAt(d);e in a||(a[e]=f.charAt(d))}c="";for(d=0;d<b.length;d++)e=b.charAt(d),c+=e in a?a[e]:e;return c},3);R("true",2,l,l,aa(j),0);function K(a,b){this.wa=a;this.na=t(b)?b:k;this.d=k;switch(a){case "comment":this.d=8;break;case "text":this.d=Lb;break;case "processing-instruction":this.d=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Fc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return this.d===k||this.d==a.nodeType};K.prototype.getName=n("wa");
K.prototype.toString=function(a){var a=a||"",b=a+"kindtest: "+this.wa;this.na===k||(b+="\n"+this.na.toString(a+" "));return b};function Gc(a){N.call(this,3);this.ta=a.substring(1,a.length-1)}v(Gc,N);Gc.prototype.evaluate=n("ta");Gc.prototype.toString=function(a){return(a||"")+"literal: "+this.ta};function jc(a){this.p=a.toLowerCase()}jc.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.p||this.p==a.nodeName.toLowerCase()?j:this.p==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};jc.prototype.getName=n("p");jc.prototype.toString=function(a){return(a||"")+"nametest: "+this.p};function Hc(a){N.call(this,1);this.xa=a}v(Hc,N);Hc.prototype.evaluate=n("xa");Hc.prototype.toString=function(a){return(a||"")+"number: "+this.xa};function Ic(a,b){N.call(this,a.k);this.ja=a;this.O=b;this.u=a.h();this.j=a.j;if(1==this.O.length){var c=this.O[0];!c.$&&c.B==Jc&&(c=c.V,"*"!=c.getName()&&(this.N={name:c.getName(),I:k}))}}v(Ic,N);function Kc(){N.call(this,4)}v(Kc,N);Kc.prototype.evaluate=function(a){var b=new J,a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Kc.prototype.toString=function(a){return a+"RootHelperExpr"};function Lc(){N.call(this,4)}v(Lc,N);Lc.prototype.evaluate=function(a){var b=new J;b.add(a.g);return b};
Lc.prototype.toString=function(a){return a+"ContextHelperExpr"};
Ic.prototype.evaluate=function(a){var b=this.ja.evaluate(a);b instanceof J||h(Error("FilterExpr must evaluate to nodeset."));for(var a=this.O,c=0,d=a.length;c<d&&b.z();c++){var f=a[c],e=sc(b,f.B.H),g;if(!f.h()&&f.B==Mc){for(g=e.next();(b=e.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=f.evaluate(new Yb(g))}else if(!f.h()&&f.B==Nc)g=e.next(),b=f.evaluate(new Yb(g));else{g=e.next();for(b=f.evaluate(new Yb(g));(g=e.next())!=k;)g=f.evaluate(new Yb(g)),b=pc(b,g)}}return b};
Ic.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+=" ",x(this.O,function(a){c+=a.toString(b)}));return c};function Oc(a,b){this.f=a;this.H=!!b}function Bc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],f=sc(b),e=b.z(),g,m=0;g=f.next();m++){var s=a.H?e-m:m+1;g=d.evaluate(new Yb(g,s,e));var p;"number"==typeof g?p=s==g:"string"==typeof g||"boolean"==typeof g?p=!!g:g instanceof J?p=0<g.z():h(Error("Predicate.evaluate returned an unexpected type."));p||f.remove()}return b}Oc.prototype.C=function(){return 0<this.f.length?this.f[0].C():k};
-Oc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.k||0==b.k)return j}return l};Oc.prototype.z=function(){return this.f.length};Oc.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return ta(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Pc(a,b,c,d){N.call(this,4);this.B=a;this.V=b;this.f=c||new Oc([]);this.$=!!d;b=this.f.C();a.La&&b&&(a=b.name,a=Zb?a.toLowerCase():a,this.N={name:a,I:b.I});this.u=this.f.h()}v(Pc,N);
+Oc.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.k||0==b.k)return j}return l};Oc.prototype.z=function(){return this.f.length};Oc.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return ta(this.f,function(a,d){return a+"\n"+b+d.toString(b)},a)};function Pc(a,b,c,d){N.call(this,4);this.B=a;this.V=b;this.f=c||new Oc([]);this.$=!!d;b=this.f.C();a.Ma&&b&&(a=b.name,a=Zb?a.toLowerCase():a,this.N={name:a,I:b.I});this.u=this.f.h()}v(Pc,N);
Pc.prototype.evaluate=function(a){var b=a.g,c=k,c=this.C(),d=k,f=k,e=0;c&&(d=c.name,f=c.I?P(c.I,a):k,e=1);if(this.$)if(!this.h()&&this.B==Qc)c=gc(this.V,b,d,f),c=Bc(this.f,c,e);else if(a=sc((new Pc(Rc,new K("node"))).evaluate(a)),b=a.next())for(c=this.t(b,d,f,e);(b=a.next())!=k;)c=pc(c,this.t(b,d,f,e));else c=new J;else c=this.t(a.g,d,f,e);return c};Pc.prototype.t=function(a,b,c,d){a=this.B.R(this.V,a,b,c);return a=Bc(this.f,a,d)};
-Pc.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.$?"//":"/")+"\n");this.B.p&&(b+=a+"Axis: "+this.B+"\n");b+=this.V.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 Sc(a,b,c,d){this.p=a;this.R=b;this.H=c;this.La=d}Sc.prototype.toString=n("p");var Tc={};
+Pc.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.$?"//":"/")+"\n");this.B.p&&(b+=a+"Axis: "+this.B+"\n");b+=this.V.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 Sc(a,b,c,d){this.p=a;this.R=b;this.H=c;this.Ma=d}Sc.prototype.toString=n("p");var Tc={};
function S(a,b,c,d){a in Tc&&h(Error("Axis already created: "+a));b=new Sc(a,b,c,!!d);return Tc[a]=b}S("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},j);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},j);
var Jc=S("attribute",function(a,b){var c=new J,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 f=b.attributes;if(f)if(a instanceof K&&a.d===k||"*"==d)for(var d=b.sourceIndex,e=0,g;g=f[e];e++)Zb?g.nodeValue&&c.add(bc(b,g,d)):c.add(g);else(g=f.getNamedItem(d))&&(Zb?g.nodeValue&&c.add(bc(b,g,b.sourceIndex)):c.add(g));return c},l),Qc=S("child",function(a,b,c,d,f){return(Zb?mc:nc).call(k,a,b,u(c)?c:k,u(d)?d:k,f||new J)},l,j);
S("descendant",gc,l,j);var Rc=S("descendant-or-self",function(a,b,c,d){var f=new J;fc(b,c,d)&&a.matches(b)&&f.add(b);return gc(a,b,c,d,f)},l,j),Mc=S("following",function(a,b,c,d){var f=new J;do for(var e=b;e=e.nextSibling;)fc(e,c,d)&&a.matches(e)&&f.add(e),f=gc(a,e,c,d,f);while(b=b.parentNode);return f},l,j);S("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},l);S("namespace",function(){return new J},l);
@@ -61,11 +61,11 @@ function fd(a,b){var c,d,f;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "/
function hd(a){for(var b=[];"["==H(a.a);){a.a.next();T(a,"Missing predicate expression.");var c=Zc(a);b.push(c);T(a,"Unclosed predicate expression.");ad(a,"]")}return b}function $c(a){if("-"==H(a.a))return a.a.next(),new Wc($c(a));var b=ed(a);if("|"!=H(a.a))a=b;else{for(b=[b];"|"==a.a.next();)T(a,"Missing next union location path."),b.push(ed(a));a.a.back();a=new Xc(b)}return a};function id(a){a.length||h(Error("Empty XPath expression."));for(var a=a.match(dc),b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);a=new cc(a);a.empty()&&h(Error("Invalid XPath expression."));var c=Zc(new Yc(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,b){var e=c.evaluate(new Yb(a));return new U(e,b)}}
function U(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?rc(a):""+a;break;case 1:this.numberValue=a instanceof J?+rc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.z():!!a;break;case 4:case 5:case 6:case 7:var d=sc(a);c=[];
for(var f=d.next();f;f=d.next())c.push(f instanceof ac?f.g:f);this.snapshotLength=a.z();this.invalidIteratorState=l;break;case 8:case 9:d=qc(a);this.singleNodeValue=d instanceof ac?d.g:d;break;default:h(Error("Unknown XPathResult type."))}var e=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return e>=c.length?k:c[e++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?k: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;var V={},jd={Xa:"http://www.w3.org/2000/svg"};V.za=function(a){return jd[a]||k};
+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;var V={},jd={Ya:"http://www.w3.org/2000/svg"};V.za=function(a){return jd[a]||k};
V.t=function(a,b,c){var d=F(a);if(A){var f=G(d)||r,e=f.document;e.evaluate||(f.XPathResult=U,e.evaluate=function(a,b,c,d){return(new id(a)).evaluate(b,d)},e.createExpression=function(a){return new id(a)})}else try{if(!d.implementation||!d.implementation.hasFeature("XPath","3.0"))return k}catch(g){return k}try{var m;if(sb&&!Bb(2.3))try{m=G(d).top.document}catch(s){return k}else m=d;var p=d.createNSResolver?d.createNSResolver(d.documentElement):V.za;return A&&!cb(7)?m.evaluate.apply(k,[b,a,p,c,k]):
m.evaluate(b,a,p,c,k)}catch(L){B&&"NS_ERROR_ILLEGAL_VALUE"==L.name||h(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+L))}};V.Y=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."))};