UNPKG

slimerjs-firefox

Version:

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

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