UNPKG

slimerjs-firefox

Version:

This repo includes slimerjs as well as downloads a local copy of Firefox.

95 lines 52.7 kB
function(){return function(){function h(a){return function(){return this[a]}}function k(a){return function(){return a}}var p=this; function aa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ba(a){var b=aa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)} function ea(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function fa(a,b,c){fa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return fa.apply(null,arguments)} function ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var ha=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.wa=b.prototype;a.prototype=new c};function ia(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b} function ja(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var l=d[g]||"",v=e[g]||"",L=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var m=L.exec(l)||["","",""],n=r.exec(v)||["","",""];if(0==m[0].length&&0==n[0].length)break;c=((0==m[1].length?0:parseInt(m[1],10))<(0==n[1].length?0:parseInt(n[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))>(0==n[1].length? 0:parseInt(n[1],10))?1:0)||((0==m[2].length)<(0==n[2].length)?-1:(0==m[2].length)>(0==n[2].length)?1:0)||(m[2]<n[2]?-1:m[2]>n[2]?1:0)}while(0==c)}return c}function ka(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var la=Array.prototype;function t(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function ma(a,b){for(var c=a.length,d=[],e=0,f=q(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var l=f[g];b.call(void 0,l,g,a)&&(d[e++]=l)}return d}function na(a,b){for(var c=a.length,d=Array(c),e=q(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d} function oa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function pa(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function qa(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0} function ra(a,b){var c;a:{c=a.length;for(var d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:q(a)?a.charAt(c):a[c]}function sa(a,b){var c;a:if(q(a))c=q(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function ta(a){return la.concat.apply(la,arguments)}function ua(a,b,c){return 2>=arguments.length?la.slice.call(a,b):la.slice.call(a,b,c)};var va={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400", darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc", ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var wa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),xa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,ya=/^#(?:[0-9a-f]{3}){1,2}$/i,za=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Aa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Ba(a,b){this.code=a;this.state=Ha[a]||Ia;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(Ba,Error); var Ia="unknown error",Ha={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference", 0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Ha[13]=Ia;Ha[9]="unknown command";Ba.prototype.toString=function(){return this.name+": "+this.message};var Ja,Ka,La,Ma,Na,Oa;function Pa(){return p.navigator?p.navigator.userAgent:null}Ma=La=Ka=Ja=!1;var Qa;if(Qa=Pa()){var Ra=p.navigator;Ja=0==Qa.indexOf("Opera");Ka=!Ja&&-1!=Qa.indexOf("MSIE");La=!Ja&&-1!=Qa.indexOf("WebKit");Ma=!Ja&&!La&&"Gecko"==Ra.product}var u=Ja,w=Ka,x=Ma,Sa=La,Ta,Ua=p.navigator;Ta=Ua&&Ua.platform||"";Na=-1!=Ta.indexOf("Mac");Oa=-1!=Ta.indexOf("Win");var Va=-1!=Ta.indexOf("Linux");function Wa(){var a=p.document;return a?a.documentMode:void 0}var Xa; a:{var Ya="",Za;if(u&&p.opera)var $a=p.opera.version,Ya="function"==typeof $a?$a():$a;else if(x?Za=/rv\:([^\);]+)(\)|;)/:w?Za=/MSIE\s+([^\);]+)(\)|;)/:Sa&&(Za=/WebKit\/(\S+)/),Za)var ab=Za.exec(Pa()),Ya=ab?ab[1]:"";if(w){var bb=Wa();if(bb>parseFloat(Ya)){Xa=String(bb);break a}}Xa=Ya}var cb={};function db(a){return cb[a]||(cb[a]=0<=ja(Xa,a))}var eb=p.document,fb=eb&&w?Wa()||("CSS1Compat"==eb.compatMode?parseInt(Xa,10):5):void 0;!x&&!w||w&&w&&9<=fb||x&&db("1.9.1");w&&db("9");function gb(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}gb.prototype.toString=function(){return"("+this.x+", "+this.y+")"};gb.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};gb.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};gb.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function hb(a,b){this.width=a;this.height=b}hb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};hb.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};hb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};hb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ib(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function jb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function kb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var lb=3;function mb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new hb(a.clientWidth,a.clientHeight)}function nb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function ob(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} function pb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(w&&!(w&&9<=fb)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?qb(a,b):!c&&ob(e,b)?-1*rb(a,b):!d&&ob(f,a)?rb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=y(a);c=d.createRange(); c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function rb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qb(d,a)}function qb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function y(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sb(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} function tb(a){this.ja=a||p.document||document}tb.prototype.contains=ob;var ub,vb,wb,xb,yb,zb,Ab;Ab=zb=yb=xb=wb=vb=ub=!1;var z=Pa();z&&(-1!=z.indexOf("Firefox")?ub=!0:-1!=z.indexOf("Camino")?vb=!0:-1!=z.indexOf("iPhone")||-1!=z.indexOf("iPod")?wb=!0:-1!=z.indexOf("iPad")?xb=!0:-1!=z.indexOf("Android")?yb=!0:-1!=z.indexOf("Chrome")?zb=!0:-1!=z.indexOf("Safari")&&(Ab=!0));var Bb=ub,Cb=vb,Db=wb,Eb=xb,Fb=yb,Gb=zb,Hb=Ab;function Ib(a,b,c){this.e=a;this.qa=b||1;this.m=c||1};var A=w&&!(w&&9<=fb),Jb=w&&!(w&&8<=fb);function Kb(a,b,c,d,e){this.e=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ua=e;this.parentNode=b}function Lb(a,b,c){var d=Jb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Kb(b,a,b.nodeName,d,c)};function Mb(a){this.S=a;this.G=0}function Nb(a){a=a.match(Ob);for(var b=0;b<a.length;b++)Pb.test(a[b])&&a.splice(b,1);return new Mb(a)}var Ob=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Pb=/^\s/;function B(a,b){return a.S[a.G+(b||0)]}Mb.prototype.next=function(){return this.S[this.G++]};Mb.prototype.back=function(){this.G--};Mb.prototype.empty=function(){return this.S.length<=this.G};function C(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(A&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),A&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b} function D(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Jb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Qb(a,b,c,d,e){return(A?Rb:Sb).call(null,a,b,q(c)?c:null,q(d)?d:null,e||new E)} function Rb(a,b,c,d,e){if(a instanceof Tb||8==a.l||c&&null===a.l){var f=b.all;if(!f)return e;a=Ub(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],l=0;b=f[l++];)D(b,c,d)&&g.push(b);f=g}for(l=0;b=f[l++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Vb(a,b,c,d,e);return e} function Sb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof F?Vb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){D(a,c,d)&&e.add(a)}));return e} function Wb(a,b,c,d,e){var f;if((a instanceof Tb||8==a.l||c&&null===a.l)&&(f=b.childNodes)){var g=Ub(a);if("*"!=g&&(f=ma(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ma(f,function(a){return D(a,c,d)}));t(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return Xb(a,b,c,d,e)}function Xb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b);return e} function Vb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.matches(b)&&e.add(b),Vb(a,b,c,d,e)}function Ub(a){if(a instanceof F){if(8==a.l)return"!";if(null===a.l)return"*"}return a.getName()};function E(){this.m=this.i=null;this.B=0}function Yb(a){this.p=a;this.next=this.u=null}function Zb(a,b){if(!a.i)return b;if(!b.i)return a;for(var c=a.i,d=b.i,e=null,f=null,g=0;c&&d;)c.p==d.p||c.p instanceof Kb&&d.p instanceof Kb&&c.p.e==d.p.e?(f=c,c=c.next,d=d.next):0<pb(c.p,d.p)?(f=d,d=d.next):(f=c,c=c.next),(f.u=e)?e.next=f:a.i=f,e=f,g++;for(f=c||d;f;)f.u=e,e=e.next=f,g++,f=f.next;a.m=e;a.B=g;return a} E.prototype.unshift=function(a){a=new Yb(a);a.next=this.i;this.m?this.i.u=a:this.i=this.m=a;this.i=a;this.B++};E.prototype.add=function(a){a=new Yb(a);a.u=this.m;this.i?this.m.next=a:this.i=this.m=a;this.m=a;this.B++};function $b(a){return(a=a.i)?a.p:null}E.prototype.o=h("B");function ac(a){return(a=$b(a))?C(a):""}function G(a,b){return new bc(a,!!b)}function bc(a,b){this.ma=a;this.T=(this.v=b)?a.m:a.i;this.N=null} bc.prototype.next=function(){var a=this.T;if(null==a)return null;var b=this.N=a;this.T=this.v?a.u:a.next;return b.p};bc.prototype.remove=function(){var a=this.ma,b=this.N;if(!b)throw Error("Next must be called at least once before remove.");var c=b.u,b=b.next;c?c.next=b:a.i=b;b?b.u=c:a.m=c;a.B--;this.N=null};function H(a){this.h=a;this.j=this.q=!1;this.C=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}H.prototype.f=h("q");function cc(a,b){a.q=b}function dc(a,b){a.j=b}H.prototype.s=h("C");function J(a,b){var c=a.evaluate(b);return c instanceof E?+ac(c):+c}function K(a,b){var c=a.evaluate(b);return c instanceof E?ac(c):""+c}function ec(a,b){var c=a.evaluate(b);return c instanceof E?!!c.o():!!c};function fc(a,b,c){H.call(this,a.h);this.R=a;this.X=b;this.ba=c;this.q=b.f()||c.f();this.j=b.j||c.j;this.R==gc&&(c.j||c.f()||4==c.h||0==c.h||!b.s()?b.j||(b.f()||4==b.h||0==b.h||!c.s())||(this.C={name:c.s().name,w:b}):this.C={name:b.s().name,w:c})}s(fc,H); function hc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof E&&c instanceof E){e=G(b);for(d=e.next();d;d=e.next())for(b=G(c),f=b.next();f;f=b.next())if(a(C(d),C(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?e=b:(e=c,c=b);e=G(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+C(d);break;case "boolean":d=!!C(d);break;case "string":d=C(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e? "boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}fc.prototype.evaluate=function(a){return this.R.n(this.X,this.ba,a)};fc.prototype.toString=function(){var a="Binary Expression: "+this.R,a=a+I(this.X);return a+=I(this.ba)};function ic(a,b,c,d){this.pa=a;this.$=b;this.h=c;this.n=d}ic.prototype.toString=h("pa");var jc={}; function M(a,b,c,d){if(jc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new ic(a,b,c,d);return jc[a.toString()]=a}M("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});M("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});M("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});M("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});M("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});M("<",4,2,function(a,b,c){return hc(function(a,b){return a<b},a,b,c)}); M(">",4,2,function(a,b,c){return hc(function(a,b){return a>b},a,b,c)});M("<=",4,2,function(a,b,c){return hc(function(a,b){return a<=b},a,b,c)});M(">=",4,2,function(a,b,c){return hc(function(a,b){return a>=b},a,b,c)});var gc=M("=",3,2,function(a,b,c){return hc(function(a,b){return a==b},a,b,c,!0)});M("!=",3,2,function(a,b,c){return hc(function(a,b){return a!=b},a,b,c,!0)});M("and",2,2,function(a,b,c){return ec(a,c)&&ec(b,c)});M("or",1,2,function(a,b,c){return ec(a,c)||ec(b,c)});function kc(a,b){if(b.o()&&4!=a.h)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.h);this.aa=a;this.d=b;this.q=a.f();this.j=a.j}s(kc,H);kc.prototype.evaluate=function(a){a=this.aa.evaluate(a);return lc(this.d,a)};kc.prototype.toString=function(){var a;a="Filter:"+I(this.aa);return a+=I(this.d)};function mc(a,b){if(b.length<a.Z)throw Error("Function "+a.k+" expects at least"+a.Z+" arguments, "+b.length+" given");if(null!==a.O&&b.length>a.O)throw Error("Function "+a.k+" expects at most "+a.O+" arguments, "+b.length+" given");a.na&&t(b,function(b,d){if(4!=b.h)throw Error("Argument "+d+" to function "+a.k+" is not of type Nodeset: "+b);});H.call(this,a.h);this.F=a;this.K=b;cc(this,a.q||pa(b,function(a){return a.f()}));dc(this,a.la&&!b.length||a.ka&&!!b.length||pa(b,function(a){return a.j}))} s(mc,H);mc.prototype.evaluate=function(a){return this.F.n.apply(null,ta(a,this.K))};mc.prototype.toString=function(){var a="Function: "+this.F;if(this.K.length)var b=oa(this.K,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function nc(a,b,c,d,e,f,g,l,v){this.k=a;this.h=b;this.q=c;this.la=d;this.ka=e;this.n=f;this.Z=g;this.O=void 0!==l?l:g;this.na=!!v}nc.prototype.toString=h("k");var oc={}; function N(a,b,c,d,e,f,g,l){if(oc.hasOwnProperty(a))throw Error("Function already created: "+a+".");oc[a]=new nc(a,b,c,d,!1,e,f,g,l)}N("boolean",2,!1,!1,function(a,b){return ec(b,a)},1);N("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);N("concat",3,!1,!1,function(a,b){var c=ua(arguments,1);return oa(c,function(b,c){return b+K(c,a)},"")},2,null);N("contains",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2); N("count",1,!1,!1,function(a,b){return b.evaluate(a).o()},1,1,!0);N("false",2,!1,!1,k(!1),0);N("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1); N("id",4,!1,!1,function(a,b){function c(a){if(A){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ra(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.e,e=9==d.nodeType?d:d.ownerDocument,d=K(b,a).split(/\s+/),f=[];t(d,function(a){(a=c(a))&&!sa(f,a)&&f.push(a)});f.sort(pb);var g=new E;t(f,function(a){g.add(a)});return g},1);N("lang",2,!1,!1,k(!1),1); N("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.m},0);N("local-name",3,!1,!0,function(a,b){var c=b?$b(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);N("name",3,!1,!0,function(a,b){var c=b?$b(b.evaluate(a)):a.e;return c?c.nodeName.toLowerCase():""},0,1,!0);N("namespace-uri",3,!0,!1,k(""),0,1,!0);N("normalize-space",3,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); N("not",2,!1,!1,function(a,b){return!ec(b,a)},1);N("number",1,!1,!0,function(a,b){return b?J(b,a):+C(a.e)},0,1);N("position",1,!0,!1,function(a){return a.qa},0);N("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);N("starts-with",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return 0==b.lastIndexOf(a,0)},2);N("string",3,!1,!0,function(a,b){return b?K(b,a):C(a.e)},0,1);N("string-length",1,!1,!0,function(a,b){return(b?K(b,a):C(a.e)).length},0,1); N("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);N("substring-after",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); N("substring-before",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);N("sum",1,!1,!1,function(a,b){for(var c=G(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+C(e);return d},1,1,!0);N("translate",3,!1,!1,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(d,a);a=[];for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);N("true",2,!1,!1,k(!0),0);function F(a,b){this.da=a;this.Y=void 0!==b?b:null;this.l=null;switch(a){case "comment":this.l=8;break;case "text":this.l=lb;break;case "processing-instruction":this.l=7;break;case "node":break;default:throw Error("Unexpected argument");}}function pc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}F.prototype.matches=function(a){return null===this.l||this.l==a.nodeType};F.prototype.getName=h("da"); F.prototype.toString=function(){var a="Kind Test: "+this.da;null===this.Y||(a+=I(this.Y));return a};function qc(a){H.call(this,3);this.ca=a.substring(1,a.length-1)}s(qc,H);qc.prototype.evaluate=h("ca");qc.prototype.toString=function(){return"Literal: "+this.ca};function Tb(a,b){this.k=a.toLowerCase();this.P=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}Tb.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.k&&this.k!=a.nodeName.toLowerCase()?!1:this.P==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};Tb.prototype.getName=h("k");Tb.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.P?"":this.P+":")+this.k};function rc(a){H.call(this,1);this.ea=a}s(rc,H);rc.prototype.evaluate=h("ea");rc.prototype.toString=function(){return"Number: "+this.ea};function sc(a,b){H.call(this,a.h);this.V=a;this.D=b;this.q=a.f();this.j=a.j;if(1==this.D.length){var c=this.D[0];c.M||c.r!=tc||(c=c.J,"*"!=c.getName()&&(this.C={name:c.getName(),w:null}))}}s(sc,H);function uc(){H.call(this,4)}s(uc,H);uc.prototype.evaluate=function(a){var b=new E;a=a.e;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};uc.prototype.toString=k("Root Helper Expression");function vc(){H.call(this,4)}s(vc,H);vc.prototype.evaluate=function(a){var b=new E;b.add(a.e);return b}; vc.prototype.toString=k("Context Helper Expression"); sc.prototype.evaluate=function(a){var b=this.V.evaluate(a);if(!(b instanceof E))throw Error("Filter expression must evaluate to nodeset.");a=this.D;for(var c=0,d=a.length;c<d&&b.o();c++){var e=a[c],f=G(b,e.r.v),g;if(e.f()||e.r!=wc)if(e.f()||e.r!=xc)for(g=f.next(),b=e.evaluate(new Ib(g));null!=(g=f.next());)g=e.evaluate(new Ib(g)),b=Zb(b,g);else g=f.next(),b=e.evaluate(new Ib(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Ib(g))}}return b}; sc.prototype.toString=function(){var a;a="Path Expression:"+I(this.V);if(this.D.length){var b=oa(this.D,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function yc(a,b){this.d=a;this.v=!!b}function lc(a,b,c){for(c=c||0;c<a.d.length;c++)for(var d=a.d[c],e=G(b),f=b.o(),g,l=0;g=e.next();l++){var v=a.v?f-l:l+1;g=d.evaluate(new Ib(g,v,f));if("number"==typeof g)v=v==g;else if("string"==typeof g||"boolean"==typeof g)v=!!g;else if(g instanceof E)v=0<g.o();else throw Error("Predicate.evaluate returned an unexpected type.");v||e.remove()}return b}yc.prototype.s=function(){return 0<this.d.length?this.d[0].s():null}; yc.prototype.f=function(){for(var a=0;a<this.d.length;a++){var b=this.d[a];if(b.f()||1==b.h||0==b.h)return!0}return!1};yc.prototype.o=function(){return this.d.length};yc.prototype.toString=function(){return oa(this.d,function(a,b){return a+I(b)},"Predicates:")};function O(a,b,c,d){H.call(this,4);this.r=a;this.J=b;this.d=c||new yc([]);this.M=!!d;b=this.d.s();a.sa&&b&&(a=b.name,a=A?a.toLowerCase():a,this.C={name:a,w:b.w});this.q=this.d.f()}s(O,H); O.prototype.evaluate=function(a){var b=a.e,c=null,c=this.s(),d=null,e=null,f=0;c&&(d=c.name,e=c.w?K(c.w,a):null,f=1);if(this.M)if(this.f()||this.r!=zc)if(a=G((new O(Ac,new F("node"))).evaluate(a)),b=a.next())for(c=this.n(b,d,e,f);null!=(b=a.next());)c=Zb(c,this.n(b,d,e,f));else c=new E;else c=Qb(this.J,b,d,e),c=lc(this.d,c,f);else c=this.n(a.e,d,e,f);return c};O.prototype.n=function(a,b,c,d){a=this.r.F(this.J,a,b,c);return a=lc(this.d,a,d)}; O.prototype.toString=function(){var a;a="Step:"+I("Operator: "+(this.M?"//":"/"));this.r.k&&(a+=I("Axis: "+this.r));a+=I(this.J);if(this.d.o()){var b=oa(this.d.d,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Bc(a,b,c,d){this.k=a;this.F=b;this.v=c;this.sa=d}Bc.prototype.toString=h("k");var Cc={};function P(a,b,c,d){if(Cc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Bc(a,b,c,!!d);return Cc[a]=b} P("ancestor",function(a,b){for(var c=new E,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);P("ancestor-or-self",function(a,b){var c=new E,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0); var tc=P("attribute",function(a,b){var c=new E,d=a.getName();if("style"==d&&b.style&&A)return c.add(new Kb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof F&&null===a.l||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)A?g.nodeValue&&c.add(Lb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(A?g.nodeValue&&c.add(Lb(b,g,b.sourceIndex)):c.add(g));return c},!1),zc=P("child",function(a,b,c,d,e){return(A?Wb:Xb).call(null,a,b,q(c)?c:null,q(d)?d:null,e||new E)},!1,!0); P("descendant",Qb,!1,!0);var Ac=P("descendant-or-self",function(a,b,c,d){var e=new E;D(b,c,d)&&a.matches(b)&&e.add(b);return Qb(a,b,c,d,e)},!1,!0),wc=P("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)D(f,c,d)&&a.matches(f)&&e.add(f),e=Qb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);P("following-sibling",function(a,b){for(var c=new E,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);P("namespace",function(){return new E},!1); var Dc=P("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),xc=P("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,l=f.length;g<l;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var L=0,r=v.length;L<r;L++)b=v[L],D(b,c,d)&&a.matches(b)&&e.add(b),e=Qb(a,b,c,d,e)}return e},!0,!0); P("preceding-sibling",function(a,b){for(var c=new E,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Ec=P("self",function(a,b){var c=new E;a.matches(b)&&c.add(b);return c},!1);function Fc(a){H.call(this,1);this.U=a;this.q=a.f();this.j=a.j}s(Fc,H);Fc.prototype.evaluate=function(a){return-J(this.U,a)};Fc.prototype.toString=function(){return"Unary Expression: -"+I(this.U)};function Gc(a){H.call(this,4);this.H=a;cc(this,pa(this.H,function(a){return a.f()}));dc(this,pa(this.H,function(a){return a.j}))}s(Gc,H);Gc.prototype.evaluate=function(a){var b=new E;t(this.H,function(c){c=c.evaluate(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=Zb(b,c)});return b};Gc.prototype.toString=function(){return oa(this.H,function(a,b){return a+I(b)},"Union Expression:")};function Hc(a,b){this.a=a;this.oa=b}function Ic(a){for(var b,c=[];;){R(a,"Missing right hand side of binary expression.");b=Jc(a);var d=a.a.next();if(!d)break;var e=(d=jc[d]||null)&&d.$;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].$;)b=new fc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new fc(c.pop(),c.pop(),b);return b}function R(a,b){if(a.a.empty())throw Error(b);}function Kc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);} function Lc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Mc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new qc(a)}function Nc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new Tb(b);var d=b.substring(0,c);a=a.oa(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new Tb(b,a)} function Oc(a){var b,c=[],d;if("/"==B(a.a)||"//"==B(a.a)){b=a.a.next();d=B(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new uc;d=new uc;R(a,"Missing next location step.");b=Pc(a,b);c.push(b)}else{a:{b=B(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Ic(a);R(a,'unclosed "("');Kc(a,")");break;case '"':case "'":b=Mc(a);break;default:if(isNaN(+b))if(!pc(b)&&/(?![0-9])[\w]/.test(d)&& "("==B(a.a,1)){b=a.a.next();b=oc[b]||null;a.a.next();for(d=[];")"!=B(a.a);){R(a,"Missing function argument list.");d.push(Ic(a));if(","!=B(a.a))break;a.a.next()}R(a,"Unclosed function argument list.");Lc(a);b=new mc(b,d)}else{b=null;break a}else b=new rc(+a.a.next())}"["==B(a.a)&&(d=new yc(Qc(a)),b=new kc(b,d))}if(b)if("/"==B(a.a)||"//"==B(a.a))d=b;else return b;else b=Pc(a,"/"),d=new vc,c.push(b)}for(;"/"==B(a.a)||"//"==B(a.a);)b=a.a.next(),R(a,"Missing next location step."),b=Pc(a,b),c.push(b); return new sc(d,c)} function Pc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==B(a.a))return d=new O(Ec,new F("node")),a.a.next(),d;if(".."==B(a.a))return d=new O(Dc,new F("node")),a.a.next(),d;var f;if("@"==B(a.a))f=tc,a.a.next(),R(a,"Missing attribute name");else if("::"==B(a.a,1)){if(!/(?![0-9])[\w]/.test(B(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Cc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();R(a,"Missing node name")}else f=zc; c=B(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==B(a.a,1)){if(!pc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!pc(c))throw Error("Invalid type name: "+c);Kc(a,"(");R(a,"Bad nodetype");e=B(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Mc(a);R(a,"Bad nodetype");Lc(a);c=new F(c,g)}else c=Nc(a);else if("*"==c)c=Nc(a);else throw Error("Bad token: "+a.a.next());e=new yc(Qc(a),f.v);return d||new O(f,c,e,"//"==b)} function Qc(a){for(var b=[];"["==B(a.a);){a.a.next();R(a,"Missing predicate expression.");var c=Ic(a);b.push(c);R(a,"Unclosed predicate expression.");Kc(a,"]")}return b}function Jc(a){if("-"==B(a.a))return a.a.next(),new Fc(Jc(a));var b=Oc(a);if("|"!=B(a.a))a=b;else{for(b=[b];"|"==a.a.next();)R(a,"Missing next union location path."),b.push(Oc(a));a.a.back();a=new Gc(b)}return a};function Rc(a){switch(a.nodeType){case 1:return ga(Sc,a);case 9:return Rc(a.documentElement);case 2:return a.ownerElement?Rc(a.ownerElement):Tc;case 11:case 10:case 6:case 12:return Tc;default:return a.parentNode?Rc(a.parentNode):Tc}}function Tc(){return null}function Sc(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Sc(a.parentNode,b):null};function Uc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Nb(a);if(c.empty())throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=fa(b.lookupNamespaceURI,b)):b=k(null);var d=Ic(new Hc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Ib(a));return new S(c,b)}} function S(a,b){if(0==b)if(a instanceof E)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof E))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof E?ac(a):""+a;break;case 1:this.numberValue=a instanceof E?+ac(a):+a;break;case 3:this.booleanValue=a instanceof E?0<a.o():!!a;break;case 4:case 5:case 6:case 7:var d= G(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Kb?e.e:e);this.snapshotLength=a.o();this.invalidIteratorState=!1;break;case 8:case 9:d=$b(a);this.singleNodeValue=d instanceof Kb?d.e:d;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>= c.length||0>a?null:c[a]}}S.ANY_TYPE=0;S.NUMBER_TYPE=1;S.STRING_TYPE=2;S.BOOLEAN_TYPE=3;S.UNORDERED_NODE_ITERATOR_TYPE=4;S.ORDERED_NODE_ITERATOR_TYPE=5;S.UNORDERED_NODE_SNAPSHOT_TYPE=6;S.ORDERED_NODE_SNAPSHOT_TYPE=7;S.ANY_UNORDERED_NODE_TYPE=8;S.FIRST_ORDERED_NODE_TYPE=9;function Vc(a){this.lookupNamespaceURI=Rc(a)} function Wc(a){a=a||p;var b=a.document;b.evaluate||(a.XPathResult=S,b.evaluate=function(a,b,e,f){return(new Uc(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new Uc(a,b)},b.createNSResolver=function(a){return new Vc(a)})};var T={};T.ga=function(){var a={xa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();T.n=function(a,b,c){var d=y(a);(w||Fb)&&Wc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):T.ga;return w&&!db(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!x||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new Ba(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}}; T.L=function(a,b){if(!a||1!=a.nodeType)throw new Ba(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};T.ra=function(a,b){var c=function(){var c=T.n(b,a,9);return c?(c=c.singleNodeValue,u?c:c||null):b.selectSingleNode?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||T.L(c,a);return c}; T.ta=function(a,b){var c=function(){var c=T.n(b,a,7);if(c){var e=c.snapshotLength;u&&void 0===e&&T.L(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=y(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();t(c,function(b){T.L(b,a)});return c};function Xc(a){return(a=a.exec(Pa()))?a[1]:""}var Yc=function(){if(Bb)return Xc(/Firefox\/([0-9.]+)/);if(w||u)return Xa;if(Gb)return Xc(/Chrome\/([0-9.]+)/);if(Hb)return Xc(/Version\/([0-9.]+)/);if(Db||Eb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Pa());if(a)return a[1]+"."+a[2]}else{if(Fb)return(a=Xc(/Android\s+([0-9.]+)/))?a:Xc(/Version\/([0-9.]+)/);if(Cb)return Xc(/Camino\/([0-9.]+)/)}return""}();var Zc,$c;function ad(a){return bd?Zc(a):w?0<=ja(fb,a):db(a)}function cd(a){bd?$c(a):Fb?ja(dd,a):ja(Yc,a)} var bd=function(){if(!x)return!1;var a=p.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;Zc=function(a){return 0<=d.ia(e,""+a)};$c=function(a){d.ia(f,""+a)};return!0}(),ed;if(Fb){var fd=/Android\s+([0-9\.]+)/.exec(Pa());ed=fd?fd[1]:"0"}else ed="0"; var dd=ed,gd=w&&!(w&&9<=fb),hd=w&&!(w&&10<=fb);Fb&&cd(2.3);Fb&&cd(4);Hb&&cd(6);function id(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}id.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};id.prototype.contains=function(a){return this&&a?a instanceof id?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; id.prototype.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};id.prototype.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this}; id.prototype.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};function U(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}U.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};U.prototype.contains=function(a){return a instanceof U?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height}; U.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};U.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; U.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function V(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function jd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return V(a)?a:null} function W(a,b){var c=ka(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=gd?"styleFloat":"cssFloat";var d;a:{d=c;var e=y(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){d=e[d]||e.getPropertyValue(d)||"";break a}d=""}d=d||kd(a,c);if(null===d)d=null;else if(sa(wa,c)){b:{var f=d.match(za);if(f){var c=Number(f[1]),e=Number(f[2]),g=Number(f[3]),f=Number(f[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g&&0<=f&&1>=f){c=[c,e,g,f];break b}}c=null}if(!c){b:{if(g= d.match(Aa))if(c=Number(g[1]),e=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=e&&255>=e&&0<=g&&255>=g){c=[c,e,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();e=va[c.toLowerCase()];if(!e&&(e="#"==c.charAt(0)?c:"#"+c,4==e.length&&(e=e.replace(xa,"#$1$1$2$2$3$3")),!ya.test(e))){c=null;break b}c=[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d} function kd(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&"function"==aa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(c=jd(a))?kd(c,b):null} function ld(a,b){function c(a){if("none"==W(a,"display"))return!1;a=jd(a);return!a||c(a)}function d(a){var b=md(a);return 0<b.height&&0<b.width?!0:V(a,"PATH")&&(0<b.height||0<b.width)?(a=W(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=W(a,"overflow")&&pa(a.childNodes,function(a){return a.nodeType==lb||V(a)&&d(a)})}function e(a){return nd(a)==X&&qa(a.childNodes,function(a){return!V(a)||e(a)})}if(!V(a))throw Error("Argument to isShown must be of type Element");if(V(a,"OPTION")||V(a,"OPTGROUP")){var f= sb(a,function(a){return V(a,"SELECT")});return!!f&&ld(f,!0)}return(f=od(a))?!!f.W&&0<f.rect.width&&0<f.rect.height&&ld(f.W,b):V(a,"INPUT")&&"hidden"==a.type.toLowerCase()||V(a,"NOSCRIPT")||"hidden"==W(a,"visibility")||!c(a)||!b&&0==pd(a)||!d(a)?!1:!e(a)}var X="hidden"; function nd(a){function b(a){var b=W(a,"position");if("fixed"==b)return L=!0,a==g?null:g;for(a=jd(a);a&&a!=g&&(0==W(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==W(a,"position"));)a=jd(a);return a}function c(a){var b=a;if("visible"==v)if(a==g&&l)b=l;else if(a==l)return{x:"visible",y:"visible"};b={x:W(b,"overflow-x"),y:W(b,"overflow-y")};a==g&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function d(a){if(a==g){var b=(new tb(f)).ja;a=Sa||"CSS1Compat"!=b.compatMode? b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=w&&db("10")&&b.pageYOffset!=a.scrollTop?new gb(a.scrollLeft,a.scrollTop):new gb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new gb(a.scrollLeft,a.scrollTop);return a}var e=qd(a),f=y(a),g=f.documentElement,l=f.body,v=W(g,"overflow"),L;for(a=b(a);a;a=b(a)){var r=c(a);if("visible"!=r.x||"visible"!=r.y){var m=md(a);if(0==m.width||0==m.height)return X;var n=e.right<m.left,Q=e.bottom<m.top;if(n&&"hidden"==r.x|| Q&&"hidden"==r.y)return X;if(n&&"visible"!=r.x||Q&&"visible"!=r.y){n=d(a);Q=e.bottom<m.top-n.y;if(e.right<m.left-n.x&&"visible"!=r.x||Q&&"visible"!=r.x)return X;e=nd(a);return e==X?X:"scroll"}n=e.left>=m.left+m.width;m=e.top>=m.top+m.height;if(n&&"hidden"==r.x||m&&"hidden"==r.y)return X;if(n&&"visible"!=r.x||m&&"visible"!=r.y){if(L&&(r=d(a),e.left>=g.scrollWidth-r.x||e.right>=g.scrollHeight-r.y))return X;e=nd(a);return e==X?X:"scroll"}}}return"none"}var rd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)"); function md(a){function b(a){var c=(y(a)?y(a).parentWindow||y(a).defaultView:window).getComputedStyle(a,null).MozTransform.match(rd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),r=parseFloat(c[3]),m=parseFloat(c[4]),n=parseFloat(c[5]),c=parseFloat(c[6]),Q=f.left+f.width,Ca=f.top+f.height,Da=f.left*d,d=Q*d,Ea=f.left*e,e=Q*e,Fa=f.top*r,r=Ca*r,Ga=f.top*m,Q=Ca*m,Ca=Da+Fa+n,m=Ea+Ga+c,Fa=d+Fa+n,Ga=e+Ga+c,Da=Da+r+n,Ea=Ea+Q+c,n=d+r+n,c=e+Q+c;f.left=Math.min(Ca,Fa,Da,n);f.top=Math.min(m,Ga,Ea,c);n=Math.max(Ca, Fa,Da,n);c=Math.max(m,Ga,Ea,c);f.width=n-f.left;f.height=c-f.top}(a=jd(a))&&b(a)}var c=od(a);if(c)return c.rect;if(V(a,"HTML"))return c=y(a),a=mb((c?c.parentWindow||c.defaultView:window)||window),new U(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new U(0,0,0,0)}var f=new U(d.left,d.top,d.right-d.left,d.bottom-d.top);w&&a.ownerDocument.body&&(c=y(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);u&&(0==f.width&& 0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&(f.height=a.offsetHeight));x&&!ad(12)&&b(a);return f} function od(a){var b=V(a,"MAP");if(!b&&!V(a,"AREA"))return null;var c=b?a:V(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=T.ra('/descendant::*[@usemap = "#'+c.name+'"]',y(c)))&&(e=md(d),!b&&"default"!=a.shape.toLowerCase())){var f=sd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new U(a+e.left,b+e.top,c,f)}return{W:d,rect:e||new U(0,0,0,0)}} function sd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new U(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new U(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],d=b,e=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new U(b,c,d-b,e-c)}return new U(0,0,0,0)}function qd(a){a=md(a);return new id(a.top,a.left+a.width,a.top+a.height,a.left)} function td(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function ud(a){var b=[];vd(a,b);b=na(b,td);return td(b.join("\n")).replace(/\xa0/g," ")} function vd(a,b){if(V(a,"BR"))b.push("");else{var c=V(a,"TD"),d=W(a,"display"),e=!c&&!sa(wd,d),f=void 0!=a.previousElementSibling?a.previousElementSibling:nb(a.previousSibling),f=f?W(f,"display"):"",g=W(a,"float")||W(a,"cssFloat")||W(a,"styleFloat");!e||("run-in"==f&&"none"==g||/^[\s\xa0]*$/.test(b[b.length-1]||""))||b.push("");var l=ld(a),v=null,L=null;l&&(v=W(a,"white-space"),L=W(a,"text-transform"));t(a.childNodes,function(a){a.nodeType==lb&&l?xd(a,b,v,L):V(a)&&vd(a,b)});f=b[b.length-1]||"";!c&& "table-cell"!=d||(!f||ia(f))||(b[b.length-1]+=" ");e&&("run-in"!=d&&!/^[\s\xa0]*$/.test(f))&&b.push("")}}var wd="inline inline-block inline-table none table-cell table-column table-column-group".split(" "); function xd(a,b,c,d){a=a.nodeValue.replace(/[\u200b\u200e\u200f]/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";ia(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} function pd(a){if(hd){if("relative"==W(a,"position"))return 1;a=W(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return yd(a)}function yd(a){var b=1,c=W(a,"opacity");c&&(b=Number(c));(a=jd(a))&&(b*=yd(a));return b};Sa||u||bd&&cd(3.6);w&&ad(10);Fb&&cd(4);function Y(a,b){this.t={};this.g=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Y)for(d=zd(a),Ad(a),e=[],c=0;c<a.g.length;c++)e.push(a.t[a.g[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}Y.prototype.A=0;Y.prototype.fa=0;function zd(a){Ad(a);return a.g.concat()} Y.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.t,a)?(delete this.t[a],this.A--,this.fa++,this.g.length>2*this.A&&Ad(this),!0):!1};function Ad(a){if(a.A!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Object.prototype.hasOwnProperty.call(a.t,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.A!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Object.prototype.hasOwnProperty.call(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}} Y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.t,a)?this.t[a]:b};Y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.t,a)||(this.A++,this.g.push(a),this.fa++);this.t[a]=b};var Bd={};function Z(a,b,c){ca(a)&&(a=x?a.b:u?a.opera:a.c);a=new Cd(a,b,c);!b||b in Bd&&!c||(Bd[b]={key:a,shift:!1},c&&(Bd[c]={key:a,shift:!0}));return a}function Cd(a,b,c){this.code=a;this.ha=b||null;this.va=c||this.ha}Z(8);Z(9);Z(13);var Dd=Z(16),Ed=Z(17),Fd=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","("); Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Gd=Z(Oa?{b:91,c:91,opera:219}:Na?{b:224,c:91,opera:17}:{b:0,c:91,opera:null}); Z(Oa?{b:92,c:92,opera:220}:Na?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});Z(Oa?{b:93,c:93,opera:0}:Na?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});Z({b:96,c:96,opera:48},"0");Z({b:97,c:97,opera:49},"1");Z({b:98,c:98,opera:50},"2");Z({b:99,c:99,opera:51},"3");Z({b:100,c:100,opera:52},"4");Z({b:101,c:101,opera:53},"5");Z({b:102,c:102,opera:54},"6");Z({b:103,c:103,opera:55},"7");Z({b:104,c:104,opera:56},"8");Z({b:105,c:105,opera:57},"9");Z({b:106,c:106,opera:Va?56:42},"*"); Z({b:107,c:107,opera:Va?61:43},"+");Z({b:109,c:109,opera:Va?109:45},"-");Z({b:110,c:110,opera:Va?190:78},".");Z({b:111,c:111,opera:Va?191:47},"/");Z(Va&&u?null:144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({b:107,c:187,opera:61},"=","+");Z(108,",");Z({b:109,c:189,opera:109},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");Z(220,"\\","|");Z(221,"]","}");Z({b:59,c:186,opera:59},";",":");Z(222,"'",'"');var Hd=new Y; Hd.set(1,Dd);Hd.set(2,Ed);Hd.set(4,Fd);Hd.set(8,Gd);(function(a){var b=new Y;t(zd(a),function(c){b.set(a.get(c).code,c)});return b})(Hd);x&&ad(12);function Id(){this.I=void 0} function Jd(a,b,c){switch(typeof b){case "string":Kd(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(