selenium-atoms
Version:
114 lines (109 loc) • 80.1 kB
JavaScript
function(){return function(){var k,aa=this;function m(a){return void 0!==a}function ba(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&m(b)?d[e]=b:d[e]?d=d[e]:d=d[e]={}}
function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function n(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ha="closure_uid_"+(1E9*Math.random()>>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)}
function ka(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function la(a,b,c){la=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ja:ka;return la.apply(null,arguments)}
function ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var na=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.W=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.V=function(a,c,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[c].apply(a,g)}};var oa=window;var pa;function qa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}var ra=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};
function sa(a,b){for(var c=0,d=ra(String(a)).split("."),e=ra(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var h=d[g]||"",l=e[g]||"",u=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var A=u.exec(h)||["","",""],y=q.exec(l)||["","",""];if(0==A[0].length&&0==y[0].length)break;c=ta(0==A[1].length?0:parseInt(A[1],10),0==y[1].length?0:parseInt(y[1],10))||ta(0==A[2].length,0==y[2].length)||ta(A[2],y[2])}while(0==c)}return c}function ta(a,b){return a<b?-1:a>b?1:0}
function ua(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var va=Array.prototype;function r(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function wa(a,b){for(var c=a.length,d=[],e=0,f=n(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d}function xa(a,b){for(var c=a.length,d=Array(c),e=n(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d}function ya(a,b,c){var d=c;r(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}
function za(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Aa(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}function Ba(a,b){var c;a:{c=a.length;for(var d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:n(a)?a.charAt(c):a[c]}
function Ca(a,b){var c;a:if(n(a))c=n(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function Ea(a){return va.concat.apply(va,arguments)}function Fa(a,b,c){return 2>=arguments.length?va.slice.call(a,b):va.slice.call(a,b,c)};var Ga={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:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var Ha="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ia=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ja=/^#(?:[0-9a-f]{3}){1,2}$/i,Ka=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,La=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.a=v[a]||Ma;this.message=b||"";var c=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}p(t,Error);var Ma="unknown error",v={15:"element not selectable",11:"element not visible"};v[31]=Ma;v[30]=Ma;v[24]="invalid cookie domain";v[29]="invalid element coordinates";v[12]="invalid element state";
v[32]="invalid selector";v[51]="invalid selector";v[52]="invalid selector";v[17]="javascript error";v[405]="unsupported operation";v[34]="move target out of bounds";v[27]="no such alert";v[7]="no such element";v[8]="no such frame";v[23]="no such window";v[28]="script timeout";v[33]="session not created";v[10]="stale element reference";v[21]="timeout";v[25]="unable to set cookie";v[26]="unexpected alert open";v[13]=Ma;v[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Na;a:{var Oa=aa.navigator;if(Oa){var Pa=Oa.userAgent;if(Pa){Na=Pa;break a}}Na=""}function w(a){return-1!=Na.indexOf(a)};function Qa(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ra(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Sa(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Ta(a,b){return null!==a&&b in a}function Ua(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Va(){return w("Opera")||w("OPR")}function Wa(){return(w("Chrome")||w("CriOS"))&&!Va()&&!w("Edge")};function Xa(){return w("iPhone")&&!w("iPod")&&!w("iPad")};var Ya=Va(),x=w("Trident")||w("MSIE"),Za=w("Edge"),z=w("Gecko")&&!(-1!=Na.toLowerCase().indexOf("webkit")&&!w("Edge"))&&!(w("Trident")||w("MSIE"))&&!w("Edge"),B=-1!=Na.toLowerCase().indexOf("webkit")&&!w("Edge"),$a=B&&w("Mobile"),ab=w("Macintosh"),bb=w("Windows");function cb(){var a=Na;if(z)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Za)return/Edge\/([\d\.]+)/.exec(a);if(x)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(B)return/WebKit\/(\S+)/.exec(a)}
function db(){var a=aa.document;return a?a.documentMode:void 0}var eb=function(){if(Ya&&aa.opera){var a;var b=aa.opera.version;try{a=b()}catch(c){a=b}return a}a="";(b=cb())&&(a=b?b[1]:"");return x&&(b=db(),b>parseFloat(a))?String(b):a}(),fb={};function gb(a){return fb[a]||(fb[a]=0<=sa(eb,a))}var hb=aa.document,ib=hb&&x?db()||("CSS1Compat"==hb.compatMode?parseInt(eb,10):5):void 0;!z&&!x||x&&9<=ib||z&&gb("1.9.1");x&&gb("9");function jb(a,b,c){return Math.min(Math.max(a,b),c)};function kb(a,b){this.x=m(a)?a:0;this.y=m(b)?b:0}k=kb.prototype;k.clone=function(){return new kb(this.x,this.y)};k.toString=function(){return"("+this.x+", "+this.y+")"};k.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};k.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};k.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};k.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function lb(a,b){this.width=a;this.height=b}k=lb.prototype;k.clone=function(){return new lb(this.width,this.height)};k.toString=function(){return"("+this.width+" x "+this.height+")"};k.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};k.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};k.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
k.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function mb(a){return a?new nb(C(a)):pa||(pa=new nb)}function ob(a){return a.scrollingElement?a.scrollingElement:B||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement}function pb(a){return a?a.parentWindow||a.defaultView:window}function qb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}
function rb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!(9<=ib)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?tb(a,b):!c&&rb(e,b)?-1*ub(a,b):!d&&rb(f,a)?ub(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange();
c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(aa.Range.START_TO_END,d)}function ub(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return tb(d,a)}function tb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var vb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},wb={IMG:" ",BR:"\n"};
function xb(a,b,c){if(!(a.nodeName in vb))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in wb)b.push(wb[a.nodeName]);else for(a=a.firstChild;a;)xb(a,b,c),a=a.nextSibling}function yb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function nb(a){this.a=a||aa.document||document}
function zb(a,b,c,d){a=d||a.a;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&Ca(b.split(/\s+/),c)&&(d[e++]=g);d.length=e;c=d}else c=a;return c}
function Ab(a){return ob(a.a)}nb.prototype.contains=rb;var Bb=w("Firefox"),Cb=Xa()||w("iPod"),Db=w("iPad"),Eb=w("Android")&&!(Wa()||w("Firefox")||Va()||w("Silk")),Fb=Wa(),Gb=w("Safari")&&!(Wa()||w("Coast")||Va()||w("Edge")||w("Silk")||w("Android"))&&!(Xa()||w("iPad")||w("iPod"));/*
The MIT License
Copyright (c) 2007 Cybozu Labs, Inc.
Copyright (c) 2012 Google Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
function Hb(a,b,c){this.a=a;this.b=b||1;this.f=c||1};var Ib=x&&!(9<=ib),Jb=x&&!(8<=ib);function Kb(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function Lb(a,b){var c=Jb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Kb(b,a,b.nodeName,c)};function Mb(a){this.b=a;this.a=0}function Nb(a){a=a.match(Ob);for(var b=0;b<a.length;b++)Pb.test(a[b])&&a.splice(b,1);return new Mb(a)}var Ob=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Pb=/^\s/;function D(a,b){return a.b[a.a+(b||0)]}function E(a){return a.b[a.a++]}function Qb(a){return a.b.length<=a.a};function Rb(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(Ib&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Ib&&"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 Sb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Jb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Tb(a,b,c,d,e){return(Ib?Ub:Vb).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new F)}
function Ub(a,b,c,d,e){if(a instanceof Wb||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;a=Xb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],h=0;b=f[h++];)Sb(b,c,d)&&g.push(b);f=g}for(h=0;b=f[h++];)"*"==a&&"!"==b.tagName||G(e,b);return e}Yb(a,b,c,d,e);return e}
function Vb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),r(b,function(b){a.a(b)&&G(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.a(b)&&G(e,b)})):a instanceof Zb?Yb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),r(b,function(a){Sb(a,c,d)&&G(e,a)}));return e}
function $b(a,b,c,d,e){var f;if((a instanceof Wb||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=Xb(a);if("*"!=g&&(f=wa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=wa(f,function(a){return Sb(a,c,d)}));r(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||G(e,a)});return e}return ac(a,b,c,d,e)}function ac(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Sb(b,c,d)&&a.a(b)&&G(e,b);return e}
function Yb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Sb(b,c,d)&&a.a(b)&&G(e,b),Yb(a,b,c,d,e)}function Xb(a){if(a instanceof Zb){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function F(){this.b=this.a=null;this.s=0}function bc(a){this.node=a;this.a=this.b=null}function cc(a,b){if(!a.a)return b;if(!b.a)return a;for(var c=a.a,d=b.a,e=null,f=null,g=0;c&&d;){var f=c.node,h=d.node;f==h||f instanceof Kb&&h instanceof Kb&&f.a==h.a?(f=c,c=c.a,d=d.a):0<sb(c.node,d.node)?(f=d,d=d.a):(f=c,c=c.a);(f.b=e)?e.a=f:a.a=f;e=f;g++}for(f=c||d;f;)f.b=e,e=e.a=f,g++,f=f.a;a.b=e;a.s=g;return a}
F.prototype.unshift=function(a){a=new bc(a);a.a=this.a;this.b?this.a.b=a:this.a=this.b=a;this.a=a;this.s++};function G(a,b){var c=new bc(b);c.b=a.b;a.a?a.b.a=c:a.a=a.b=c;a.b=c;a.s++}function dc(a){return(a=a.a)?a.node:null}function ec(a){return(a=dc(a))?Rb(a):""}function fc(a,b){return new gc(a,!!b)}function gc(a,b){this.f=a;this.b=(this.c=b)?a.b:a.a;this.a=null}function H(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.c?b.b:b.a;return c.node};function J(a){this.l=a;this.b=this.j=!1;this.f=null}function K(a){return"\n "+a.toString().split("\n").join("\n ")}function hc(a,b){a.j=b}function ic(a,b){a.b=b}function L(a,b){var c=a.a(b);return c instanceof F?+ec(c):+c}function M(a,b){var c=a.a(b);return c instanceof F?ec(c):""+c}function jc(a,b){var c=a.a(b);return c instanceof F?!!c.s:!!c};function kc(a,b,c){J.call(this,a.l);this.c=a;this.g=b;this.m=c;this.j=b.j||c.j;this.b=b.b||c.b;this.c==lc&&(c.b||c.j||4==c.l||0==c.l||!b.f?b.b||b.j||4==b.l||0==b.l||!c.f||(this.f={name:c.f.name,C:b}):this.f={name:b.f.name,C:c})}p(kc,J);
function mc(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof F&&c instanceof F){e=fc(b);for(d=H(e);d;d=H(e))for(b=fc(c),f=H(b);f;f=H(b))if(a(Rb(d),Rb(f)))return!0;return!1}if(b instanceof F||c instanceof F){b instanceof F?e=b:(e=c,c=b);e=fc(e);b=typeof c;for(d=H(e);d;d=H(e)){switch(b){case "number":d=+Rb(d);break;case "boolean":d=!!Rb(d);break;case "string":d=Rb(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e?"boolean"==typeof b||"boolean"==
typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}kc.prototype.a=function(a){return this.c.v(this.g,this.m,a)};kc.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+K(this.g);return a+=K(this.m)};function nc(a,b,c,d){this.a=a;this.N=b;this.l=c;this.v=d}nc.prototype.toString=function(){return this.a};var oc={};
function N(a,b,c,d){if(oc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new nc(a,b,c,d);return oc[a.toString()]=a}N("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});N("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});N("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});N("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});N("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});N("<",4,2,function(a,b,c){return mc(function(a,b){return a<b},a,b,c)});
N(">",4,2,function(a,b,c){return mc(function(a,b){return a>b},a,b,c)});N("<=",4,2,function(a,b,c){return mc(function(a,b){return a<=b},a,b,c)});N(">=",4,2,function(a,b,c){return mc(function(a,b){return a>=b},a,b,c)});var lc=N("=",3,2,function(a,b,c){return mc(function(a,b){return a==b},a,b,c,!0)});N("!=",3,2,function(a,b,c){return mc(function(a,b){return a!=b},a,b,c,!0)});N("and",2,2,function(a,b,c){return jc(a,c)&&jc(b,c)});N("or",1,2,function(a,b,c){return jc(a,c)||jc(b,c)});function pc(a,b){if(b.a.length&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.l);this.c=a;this.g=b;this.j=a.j;this.b=a.b}p(pc,J);pc.prototype.a=function(a){a=this.c.a(a);return qc(this.g,a)};pc.prototype.toString=function(){var a;a="Filter:"+K(this.c);return a+=K(this.g)};function rc(a,b){if(b.length<a.P)throw Error("Function "+a.o+" expects at least"+a.P+" arguments, "+b.length+" given");if(null!==a.H&&b.length>a.H)throw Error("Function "+a.o+" expects at most "+a.H+" arguments, "+b.length+" given");a.R&&r(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});J.call(this,a.l);this.g=a;this.c=b;hc(this,a.j||za(b,function(a){return a.j}));ic(this,a.U&&!b.length||a.T&&!!b.length||za(b,function(a){return a.b}))}
p(rc,J);rc.prototype.a=function(a){return this.g.v.apply(null,Ea(a,this.c))};rc.prototype.toString=function(){var a="Function: "+this.g;if(this.c.length)var b=ya(this.c,function(a,b){return a+K(b)},"Arguments:"),a=a+K(b);return a};function sc(a,b,c,d,e,f,g,h,l){this.o=a;this.l=b;this.j=c;this.U=d;this.T=e;this.v=f;this.P=g;this.H=m(h)?h:g;this.R=!!l}sc.prototype.toString=function(){return this.o};var tc={};
function O(a,b,c,d,e,f,g,h){if(tc.hasOwnProperty(a))throw Error("Function already created: "+a+".");tc[a]=new sc(a,b,c,d,!1,e,f,g,h)}O("boolean",2,!1,!1,function(a,b){return jc(b,a)},1);O("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1);O("concat",3,!1,!1,function(a,b){return ya(Fa(arguments,1),function(b,d){return b+M(d,a)},"")},2,null);O("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);O("count",1,!1,!1,function(a,b){return b.a(a).s},1,1,!0);
O("false",2,!1,!1,function(){return!1},0);O("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1);O("id",4,!1,!1,function(a,b){function c(a){if(Ib){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return Ba(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=M(b,a).split(/\s+/),f=[];r(d,function(a){(a=c(a))&&!Ca(f,a)&&f.push(a)});f.sort(sb);var g=new F;r(f,function(a){G(g,a)});return g},1);
O("lang",2,!1,!1,function(){return!1},1);O("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);O("local-name",3,!1,!0,function(a,b){var c=b?dc(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);O("name",3,!1,!0,function(a,b){var c=b?dc(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);O("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
O("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):Rb(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);O("not",2,!1,!1,function(a,b){return!jc(b,a)},1);O("number",1,!1,!0,function(a,b){return b?L(b,a):+Rb(a.a)},0,1);O("position",1,!0,!1,function(a){return a.b},0);O("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);O("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);O("string",3,!1,!0,function(a,b){return b?M(b,a):Rb(a.a)},0,1);
O("string-length",1,!1,!0,function(a,b){return(b?M(b,a):Rb(a.a)).length},0,1);O("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);O("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
O("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);O("sum",1,!1,!1,function(a,b){for(var c=fc(b.a(a)),d=0,e=H(c);e;e=H(c))d+=+Rb(e);return d},1,1,!0);O("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(d,a);a={};for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);O("true",2,!1,!1,function(){return!0},0);function Zb(a,b){this.g=a;this.c=m(b)?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function uc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}Zb.prototype.a=function(a){return null===this.b||this.b==a.nodeType};Zb.prototype.f=function(){return this.g};
Zb.prototype.toString=function(){var a="Kind Test: "+this.g;null===this.c||(a+=K(this.c));return a};function vc(a){J.call(this,3);this.c=a.substring(1,a.length-1)}p(vc,J);vc.prototype.a=function(){return this.c};vc.prototype.toString=function(){return"Literal: "+this.c};function Wb(a,b){this.o=a.toLowerCase();this.c=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Wb.prototype.a=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.o&&this.o!=a.nodeName.toLowerCase()?!1:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Wb.prototype.f=function(){return this.o};Wb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.o};function wc(a){J.call(this,1);this.c=a}p(wc,J);wc.prototype.a=function(){return this.c};wc.prototype.toString=function(){return"Number: "+this.c};function xc(a,b){J.call(this,a.l);this.g=a;this.c=b;this.j=a.j;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.w||c.c!=yc||(c=c.m,"*"!=c.f()&&(this.f={name:c.f(),C:null}))}}p(xc,J);function zc(){J.call(this,4)}p(zc,J);zc.prototype.a=function(a){var b=new F;a=a.a;9==a.nodeType?G(b,a):G(b,a.ownerDocument);return b};zc.prototype.toString=function(){return"Root Helper Expression"};function Ac(){J.call(this,4)}p(Ac,J);Ac.prototype.a=function(a){var b=new F;G(b,a.a);return b};Ac.prototype.toString=function(){return"Context Helper Expression"};
function Bc(a){return"/"==a||"//"==a}xc.prototype.a=function(a){var b=this.g.a(a);if(!(b instanceof F))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.s;c++){var e=a[c],f=fc(b,e.c.a),g;if(e.j||e.c!=Cc)if(e.j||e.c!=Dc)for(g=H(f),b=e.a(new Hb(g));null!=(g=H(f));)g=e.a(new Hb(g)),b=cc(b,g);else g=H(f),b=e.a(new Hb(g));else{for(g=H(f);(b=H(f))&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new Hb(g))}}return b};
xc.prototype.toString=function(){var a;a="Path Expression:"+K(this.g);if(this.c.length){var b=ya(this.c,function(a,b){return a+K(b)},"Steps:");a+=K(b)}return a};function Ec(a,b){this.a=a;this.b=!!b}
function qc(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=fc(b),f=b.s,g,h=0;g=H(e);h++){var l=a.b?f-h:h+1;g=d.a(new Hb(g,l,f));if("number"==typeof g)l=l==g;else if("string"==typeof g||"boolean"==typeof g)l=!!g;else if(g instanceof F)l=0<g.s;else throw Error("Predicate.evaluate returned an unexpected type.");if(!l){l=e;g=l.f;var u=l.a;if(!u)throw Error("Next must be called at least once before remove.");var q=u.b,u=u.a;q?q.a=u:g.a=u;u?u.b=q:g.b=q;g.s--;l.a=null}}return b}
Ec.prototype.toString=function(){return ya(this.a,function(a,b){return a+K(b)},"Predicates:")};function Fc(a,b,c,d){J.call(this,4);this.c=a;this.m=b;this.g=c||new Ec([]);this.w=!!d;b=this.g;b=0<b.a.length?b.a[0].f:null;a.b&&b&&(a=b.name,a=Ib?a.toLowerCase():a,this.f={name:a,C:b.C});a:{a=this.g;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.j||1==c.l||0==c.l){a=!0;break a}a=!1}this.j=a}p(Fc,J);
Fc.prototype.a=function(a){var b=a.a,c=null,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.C?M(c.C,a):null,f=1);if(this.w)if(this.j||this.c!=Gc)if(a=fc((new Fc(Hc,new Zb("node"))).a(a)),b=H(a))for(c=this.v(b,d,e,f);null!=(b=H(a));)c=cc(c,this.v(b,d,e,f));else c=new F;else c=Tb(this.m,b,d,e),c=qc(this.g,c,f);else c=this.v(a.a,d,e,f);return c};Fc.prototype.v=function(a,b,c,d){a=this.c.f(this.m,a,b,c);return a=qc(this.g,a,d)};
Fc.prototype.toString=function(){var a;a="Step:"+K("Operator: "+(this.w?"//":"/"));this.c.o&&(a+=K("Axis: "+this.c));a+=K(this.m);if(this.g.a.length){var b=ya(this.g.a,function(a,b){return a+K(b)},"Predicates:");a+=K(b)}return a};function Ic(a,b,c,d){this.o=a;this.f=b;this.a=c;this.b=d}Ic.prototype.toString=function(){return this.o};var Jc={};function Kc(a,b,c,d){if(Jc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Ic(a,b,c,!!d);return Jc[a]=b}
Kc("ancestor",function(a,b){for(var c=new F,d=b;d=d.parentNode;)a.a(d)&&c.unshift(d);return c},!0);Kc("ancestor-or-self",function(a,b){var c=new F,d=b;do a.a(d)&&c.unshift(d);while(d=d.parentNode);return c},!0);
var yc=Kc("attribute",function(a,b){var c=new F,d=a.f();if("style"==d&&b.style&&Ib)return G(c,new Kb(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof Zb&&null===a.b||"*"==d)for(var d=0,f;f=e[d];d++)Ib?f.nodeValue&&G(c,Lb(b,f)):G(c,f);else(f=e.getNamedItem(d))&&(Ib?f.nodeValue&&G(c,Lb(b,f)):G(c,f));return c},!1),Gc=Kc("child",function(a,b,c,d,e){return(Ib?$b:ac).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new F)},!1,!0);Kc("descendant",Tb,!1,!0);
var Hc=Kc("descendant-or-self",function(a,b,c,d){var e=new F;Sb(b,c,d)&&a.a(b)&&G(e,b);return Tb(a,b,c,d,e)},!1,!0),Cc=Kc("following",function(a,b,c,d){var e=new F;do for(var f=b;f=f.nextSibling;)Sb(f,c,d)&&a.a(f)&&G(e,f),e=Tb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);Kc("following-sibling",function(a,b){for(var c=new F,d=b;d=d.nextSibling;)a.a(d)&&G(c,d);return c},!1);Kc("namespace",function(){return new F},!1);
var Lc=Kc("parent",function(a,b){var c=new F;if(9==b.nodeType)return c;if(2==b.nodeType)return G(c,b.ownerElement),c;var d=b.parentNode;a.a(d)&&G(c,d);return c},!1),Dc=Kc("preceding",function(a,b,c,d){var e=new F,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,h=f.length;g<h;g++){var l=[];for(b=f[g];b=b.previousSibling;)l.unshift(b);for(var u=0,q=l.length;u<q;u++)b=l[u],Sb(b,c,d)&&a.a(b)&&G(e,b),e=Tb(a,b,c,d,e)}return e},!0,!0);
Kc("preceding-sibling",function(a,b){for(var c=new F,d=b;d=d.previousSibling;)a.a(d)&&c.unshift(d);return c},!0);var Mc=Kc("self",function(a,b){var c=new F;a.a(b)&&G(c,b);return c},!1);function Nc(a){J.call(this,1);this.c=a;this.j=a.j;this.b=a.b}p(Nc,J);Nc.prototype.a=function(a){return-L(this.c,a)};Nc.prototype.toString=function(){return"Unary Expression: -"+K(this.c)};function Oc(a){J.call(this,4);this.c=a;hc(this,za(this.c,function(a){return a.j}));ic(this,za(this.c,function(a){return a.b}))}p(Oc,J);Oc.prototype.a=function(a){var b=new F;r(this.c,function(c){c=c.a(a);if(!(c instanceof F))throw Error("Path expression must evaluate to NodeSet.");b=cc(b,c)});return b};Oc.prototype.toString=function(){return ya(this.c,function(a,b){return a+K(b)},"Union Expression:")};function Pc(a,b){this.a=a;this.b=b}function Qc(a){for(var b,c=[];;){Rc(a,"Missing right hand side of binary expression.");b=Sc(a);var d=E(a.a);if(!d)break;var e=(d=oc[d]||null)&&d.N;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].N;)b=new kc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new kc(c.pop(),c.pop(),b);return b}function Rc(a,b){if(Qb(a.a))throw Error(b);}function Tc(a,b){var c=E(a.a);if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);}
function Uc(a){a=E(a.a);if(")"!=a)throw Error("Bad token: "+a);}function Vc(a){a=E(a.a);if(2>a.length)throw Error("Unclosed literal string");return new vc(a)}function Wc(a){var b=E(a.a),c=b.indexOf(":");if(-1==c)return new Wb(b);var d=b.substring(0,c);a=a.b(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Wb(b,a)}
function Xc(a){var b,c=[],d;if(Bc(D(a.a))){b=E(a.a);d=D(a.a);if("/"==b&&(Qb(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new zc;d=new zc;Rc(a,"Missing next location step.");b=Yc(a,b);c.push(b)}else{a:{b=D(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":E(a.a);b=Qc(a);Rc(a,'unclosed "("');Tc(a,")");break;case '"':case "'":b=Vc(a);break;default:if(isNaN(+b))if(!uc(b)&&/(?![0-9])[\w]/.test(d)&&"("==D(a.a,1)){b=E(a.a);
b=tc[b]||null;E(a.a);for(d=[];")"!=D(a.a);){Rc(a,"Missing function argument list.");d.push(Qc(a));if(","!=D(a.a))break;E(a.a)}Rc(a,"Unclosed function argument list.");Uc(a);b=new rc(b,d)}else{b=null;break a}else b=new wc(+E(a.a))}"["==D(a.a)&&(d=new Ec(Zc(a)),b=new pc(b,d))}if(b)if(Bc(D(a.a)))d=b;else return b;else b=Yc(a,"/"),d=new Ac,c.push(b)}for(;Bc(D(a.a));)b=E(a.a),Rc(a,"Missing next location step."),b=Yc(a,b),c.push(b);return new xc(d,c)}
function Yc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a))return d=new Fc(Mc,new Zb("node")),E(a.a),d;if(".."==D(a.a))return d=new Fc(Lc,new Zb("node")),E(a.a),d;var f;if("@"==D(a.a))f=yc,E(a.a),Rc(a,"Missing attribute name");else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+E(a.a));c=E(a.a);f=Jc[c]||null;if(!f)throw Error("No axis with name: "+c);E(a.a);Rc(a,"Missing node name")}else f=Gc;c=D(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==
D(a.a,1)){if(!uc(c))throw Error("Invalid node type: "+c);c=E(a.a);if(!uc(c))throw Error("Invalid type name: "+c);Tc(a,"(");Rc(a,"Bad nodetype");e=D(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Vc(a);Rc(a,"Bad nodetype");Uc(a);c=new Zb(c,g)}else c=Wc(a);else if("*"==c)c=Wc(a);else throw Error("Bad token: "+E(a.a));e=new Ec(Zc(a),f.a);return d||new Fc(f,c,e,"//"==b)}
function Zc(a){for(var b=[];"["==D(a.a);){E(a.a);Rc(a,"Missing predicate expression.");var c=Qc(a);b.push(c);Rc(a,"Unclosed predicate expression.");Tc(a,"]")}return b}function Sc(a){if("-"==D(a.a))return E(a.a),new Nc(Sc(a));var b=Xc(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==E(a.a);)Rc(a,"Missing next union location path."),b.push(Xc(a));a.a.a--;a=new Oc(b)}return a};function $c(a){switch(a.nodeType){case 1:return ma(ad,a);case 9:return $c(a.documentElement);case 11:case 10:case 6:case 12:return bd;default:return a.parentNode?$c(a.parentNode):bd}}function bd(){return null}function ad(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?ad(a.parentNode,b):null};function cd(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Nb(a);if(Qb(c))throw Error("Invalid XPath expression.");b?fa(b)||(b=la(b.lookupNamespaceURI,b)):b=function(){return null};var d=Qc(new Pc(c,b));if(!Qb(c))throw Error("Bad token: "+E(c));this.evaluate=function(a,b){var c=d.a(new Hb(a));return new dd(c,b)}}
function dd(a,b){if(0==b)if(a instanceof F)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof F))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof F?ec(a):""+a;break;case 1:this.numberValue=a instanceof F?+ec(a):+a;break;case 3:this.booleanValue=a instanceof F?0<a.s:!!a;break;case 4:case 5:case 6:case 7:var d=
fc(a);c=[];for(var e=H(d);e;e=H(d))c.push(e instanceof Kb?e.a:e);this.snapshotLength=a.s;this.invalidIteratorState=!1;break;case 8:case 9:d=dc(a);this.singleNodeValue=d instanceof Kb?d.a:d;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||
0>a?null:c[a]}}dd.ANY_TYPE=0;dd.NUMBER_TYPE=1;dd.STRING_TYPE=2;dd.BOOLEAN_TYPE=3;dd.UNORDERED_NODE_ITERATOR_TYPE=4;dd.ORDERED_NODE_ITERATOR_TYPE=5;dd.UNORDERED_NODE_SNAPSHOT_TYPE=6;dd.ORDERED_NODE_SNAPSHOT_TYPE=7;dd.ANY_UNORDERED_NODE_TYPE=8;dd.FIRST_ORDERED_NODE_TYPE=9;function ed(a){this.lookupNamespaceURI=$c(a)}
function fd(a){a=a||aa;var b=a.document;b.evaluate||(a.XPathResult=dd,b.evaluate=function(a,b,e,f){return(new cd(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new cd(a,b)},b.createNSResolver=function(a){return new ed(a)})}ba("wgxpath.install",fd);var gd={};gd.I=function(){var a={X:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();
gd.v=function(a,b,c){var d=C(a);if(!d.documentElement)return null;(x||Eb)&&fd(pb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):gd.I;if(x&&!gb(7))return d.evaluate.call(d,b,a,e,c,null);if(!x||9<=ib){for(var f={},g=d.getElementsByTagName("*"),h=0;h<g.length;++h){var l=g[h],u=l.namespaceURI;if(u&&!f[u]){var q=l.lookupPrefix(u);if(!q){var A=u.match(".*/(\\w+)/?$");A?q=A[1]:q="xhtml"}f[u]=q}}var y={},I;for(I in f)y[f[I]]=I;e=function(a){return y[a]||null}}try{return d.evaluate(b,
a,e,c,null)}catch(T){if("TypeError"===T.name)return e=d.createNSResolver?d.createNSResolver(d.documentElement):gd.I,d.evaluate(b,a,e,c,null);throw T;}}catch(Da){if(!z||"NS_ERROR_ILLEGAL_VALUE"!=Da.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+Da);}};gd.J=function(a,b){if(!a||1!=a.nodeType)throw new t(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};
gd.A=function(a,b){var c=function(){var c=gd.v(b,a,9);return c?c.singleNodeValue||null:b.selectSingleNode?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||gd.J(c,a);return c};
gd.u=function(a,b){var c=function(){var c=gd.v(b,a,7);if(c){for(var e=c.snapshotLength,f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=C(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();r(c,function(b){gd.J(b,a)});return c};function hd(a){return(a=a.exec(Na))?a[1]:""}var id=function(){if(Bb)return hd(/Firefox\/([0-9.]+)/);if(x||Za||Ya)return eb;if(Fb)return hd(/Chrome\/([0-9.]+)/);if(Gb&&!(Xa()||w("iPad")||w("iPod")))return hd(/Version\/([0-9.]+)/);if(Cb||Db){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na))return a[1]+"."+a[2]}else if(Eb)return(a=hd(/Android\s+([0-9.]+)/))?a:hd(/Version\/([0-9.]+)/);return""}();var jd,kd;function ld(a){return md?jd(a):x?0<=sa(ib,a):gb(a)}function nd(a){return md?kd(a):Eb?0<=sa(od,a):0<=sa(id,a)}
var md=function(){if(!z)return!1;var a=aa.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;jd=function(a){return 0<=d.compare(e,""+a)};kd=function(a){return 0<=d.compare(f,""+a)};return!0}(),pd=Db||Cb,qd;
if(Eb){var rd=/Android\s+([0-9\.]+)/.exec(Na);qd=rd?rd[1]:"0"}else qd="0";var od=qd,sd=x&&!(8<=ib),td=9<=ib,ud=x&&!(9<=ib),vd=10<=ib;Eb&&nd(2.3);Eb&&nd(4);Gb&&nd(6);var wd=x&&-1!=Na.indexOf("IEMobile");function xd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}k=xd.prototype;k.clone=function(){return new xd(this.top,this.right,this.bottom,this.left)};k.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};k.contains=function(a){return this&&a?a instanceof xd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
k.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};k.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};k.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
k.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function P(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}k=P.prototype;k.clone=function(){return new P(this.left,this.top,this.width,this.height)};k.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};k.contains=function(a){return a instanceof P?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};
k.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};k.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};k.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
k.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function yd(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function zd(a){a=a?C(a):document;var b;(b=!x||9<=ib)||(b="CSS1Compat"==mb(a).a.compatMode);return b?a.documentElement:a.body}
function Ad(a){var b=a.offsetWidth,c=a.offsetHeight,d=B&&!b&&!c;if((!m(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}x&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new lb(e.right-e.left,e.bottom-e.top)}return new lb(b,c)}var Bd={thin:2,medium:4,thick:6};
function Cd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Bd)d=Bd[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Dd(a){var b;a:{a=C(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return x&&b&&"undefined"===typeof b.nodeType?null:b}function Q(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Ed(a){var b;if(b=Fd(a,!0)&&Gd(a))b=!(x||z&&!ld("1.9.2")?0:"none"==R(a,"pointer-events"));return b}function Hd(a){return Q(a,"OPTION")?!0:Q(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}
function Id(a){if(!Hd(a))throw new t(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Jd(a,b)}function Jd(a,b){var c;if(c=sd&&"value"==b&&Q(a,"OPTION"))c=null===Kd(a,"value");c?(c=[],xb(a,c,!1),c=c.join("")):c=a[b];return c}var Ld=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
function Md(a){var b=[];r(a.split(Ld),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function Kd(a,b){b=b.toLowerCase();if("style"==b)return Md(a.style.cssText);if(sd&&"value"==b&&Q(a,"INPUT"))return a.value;if(ud&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null}var Nd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" ");
function Gd(a){var b=a.tagName.toUpperCase();return Ca(Nd,b)?Jd(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Gd(a.parentNode):!yb(a,function(a){var b=a.parentNode;if(b&&Q(b,"FIELDSET")&&Jd(b,"disabled")){if(!Q(a,"LEGEND"))return!0;for(;a=m(a.previousElementSibling)?a.previousElementSibling:qb(a.previousSibling);)if(Q(a,"LEGEND"))return!0}return!1},!0):!0}var Od="text search tel url email password number".split(" ");
function Pd(a){function b(a){return"inherit"==a.contentEditable?(a=Qd(a))?b(a):!1:"true"==a.contentEditable}return m(a.contentEditable)?!x&&m(a.isContentEditable)?a.isContentEditable:b(a):!1}function Rd(a){return((Q(a,"TEXTAREA")?!0:Q(a,"INPUT")?Ca(Od,a.type.toLowerCase()):Pd(a)?!0:!1)||(Q(a,"INPUT")?"file"==a.type.toLowerCase():!1))&&!Jd(a,"readOnly")}function Qd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Q(a)?a:null}
function R(a,b){var c=ua(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=ud?"styleFloat":"cssFloat";var d=yd(a,c)||Sd(a,c);if(null===d)d=null;else if(Ca(Ha,c)){b:{var e=d.match(Ka);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c)b:{if(g=d.match(La))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();
f=Ga[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ia,"#$1$1$2$2$3$3")),!Ja.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}d=c?"rgba("+c.join(", ")+")":d}return d}function Sd(a,b){var c=a.currentStyle||a.style,d=c[b];!m(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?m(d)?d:null:(c=Qd(a))?Sd(c,b):null}
function Td(a,b,c){function d(a){var b=Ud(a);return 0<b.height&&0<b.width?!0:Q(a,"PATH")&&(0<b.height||0<b.width)?(a=R(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=R(a,"overflow")&&za(a.childNodes,function(a){return 3==a.nodeType||Q(a)&&d(a)})}function e(a){return Vd(a)==Wd&&Aa(a.childNodes,function(a){return!Q(a)||e(a)||!d(a)})}if(!Q(a))throw Error("Argument to isShown must be of type Element");if(Q(a,"BODY"))return!0;if(Q(a,"OPTION")||Q(a,"OPTGROUP"))return a=yb(a,function(a){return Q(a,"SELECT")}),
!!a&&Td(a,!0,c);var f=Xd(a);if(f)return!!f.K&&0<f.rect.width&&0<f.rect.height&&Td(f.K,b,c);if(Q(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Q(a,"NOSCRIPT"))return!1;f=R(a,"visibility");return"collapse"!=f&&"hidden"!=f&&c(a)&&(b||0!=Yd(a))&&d(a)?!e(a):!1}function Fd(a,b){function c(a){if("none"==R(a,"display"))return!1;a=Qd(a);return!a||c(a)}return Td(a,!!b,c)}var Wd="hidden";
function Vd(a,b){function c(a){function b(a){return a==h?!0:0==R(a,"display").lastIndexOf("inline",0)||"absolute"==c&&"static"==R(a,"position")?!1:!0}var c=R(a,"position");if("fixed"==c)return q=!0,a==h?null:h;for(a=Qd(a);a&&!b(a);)a=Qd(a);return a}function d(a){var b=a;if("visible"==u)if(a==h&&l)b=l;else if(a==l)return{x:"visible",y:"visible"};b={x:R(b,"overflow-x"),y:R(b,"overflow-y")};a==h&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==h){var b=(new nb(g)).a;
a=ob(b);b=b.parentWindow||b.defaultView;a=x&&gb("10")&&b.pageYOffset!=a.scrollTop?new kb(a.scrollLeft,a.scrollTop):new kb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new kb(a.scrollLeft,a.scrollTop);return a}for(var f=Zd(a,b),g=C(a),h=g.documentElement,l=g.body,u=R(h,"overflow"),q,A=c(a);A;A=c(A)){var y=d(A);if("visible"!=y.x||"visible"!=y.y){var I=Ud(A);if(0==I.width||0==I.height)return Wd;var T=f.right<I.left,Da=f.bottom<I.top;if(T&&"hidden"==y.x||Da&&"hidden"==y.y)return Wd;
if(T&&"visible"!=y.x||Da&&"visible"!=y.y){T=e(A);Da=f.bottom<I.top-T.y;if(f.right<I.left-T.x&&"visible"!=y.x||Da&&"visible"!=y.x)return Wd;f=Vd(A);return f==Wd?Wd:"scroll"}T=f.left>=I.left+I.width;I=f.top>=I.top+I.height;if(T&&"hidden"==y.x||I&&"hidden"==y.y)return Wd;if(T&&"visible"!=y.x||I&&"visible"!=y.y){if(q&&(y=e(A),f.left>=h.scrollWidth-y.x||f.right>=h.scrollHeight-y.y))return Wd;f=Vd(A);return f==Wd?Wd:"scroll"}}}return"none"}
function Ud(a){var b=Xd(a);if(b)return b.rect;if(Q(a,"HTML"))return a=C(a),a=(pb(a)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new lb(a.clientWidth,a.clientHeight),new P(0,0,a.width,a.height);var c;try{c=a.getBoundingClientRect()}catch(d){return new P(0,0,0,0)}b=new P(c.left,c.top,c.right-c.left,c.bottom-c.top);x&&a.ownerDocument.body&&(a=C(a),b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function Xd(a){var b=Q(a,"MAP");if(!b&&!Q(a,"AREA"))return null;var c=b?a:Q(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=gd.A('/descendant::*[@usemap = "#'+c.name+'"]',C(c)))&&(e=Ud(d),!b&&"default"!=a.shape.toLowerCase())){var f=$d(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new P(a+e.left,b+e.top,c,f)}return{K:d,rect:e||new P(0,0,0,0)}}
function $d(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new P(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new P(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],d=b,e=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new P(b,c,d-b,e-c)}return new P(0,0,0,0)}
function Zd(a,b){var c;c=Ud(a);c=new xd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof P