slimerjs-firefox
Version:
This repo includes slimerjs as well as downloads a local copy of Firefox.
47 lines (46 loc) • 25.1 kB
JavaScript
function(){return function(){function f(a){return function(){return a}}var k=this;
function l(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length}function m(a){return"string"==typeof a}function ba(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ca=Date.now||function(){return+new Date};function da(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var n=d[h]||"",D=e[h]||"",R=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var w=R.exec(n)||["","",""],x=na.exec(D)||["","",""];if(0==w[0].length&&0==x[0].length)break;c=((0==w[1].length?0:parseInt(w[1],10))<(0==x[1].length?0:parseInt(x[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==x[1].length?
0:parseInt(x[1],10))?1:0)||((0==w[2].length)<(0==x[2].length)?-1:(0==w[2].length)>(0==x[2].length)?1:0)||(w[2]<x[2]?-1:w[2]>x[2]?1:0)}while(0==c)}return c};var ea=Array.prototype;function fa(a,b){if(m(a))return m(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function p(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function ga(a,b){for(var c=a.length,d=[],e=0,g=m(a)?a.split(""):a,h=0;h<c;h++)if(h in g){var n=g[h];b.call(void 0,n,h,a)&&(d[e++]=n)}return d}
function ha(a,b){for(var c=a.length,d=Array(c),e=m(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(void 0,e[g],g,a));return d}function ia(a,b){if(a.reduce)return a.reduce(b,"");var c="";p(a,function(d,e){c=b.call(void 0,c,d,e,a)});return c}function ja(a,b){var c;a:{c=a.length;for(var d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:m(a)?a.charAt(c):a[c]}function ka(a,b,c){return 2>=arguments.length?ea.slice.call(a,b):ea.slice.call(a,b,c)};function q(a,b){this.code=a;this.state=la[a]||ma;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}(function(){var a=Error;function b(){}b.prototype=a.prototype;q.O=a.prototype;q.prototype=new b})();
var ma="unknown error",la={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference",
0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};la[13]=ma;la[9]="unknown command";q.prototype.toString=function(){return this.name+": "+this.message};var r,oa,pa,qa,ra,sa;function s(){return k.navigator?k.navigator.userAgent:null}qa=pa=oa=r=!1;var ta;if(ta=s()){var ua=k.navigator;r=0==ta.indexOf("Opera");oa=!r&&-1!=ta.indexOf("MSIE");pa=!r&&-1!=ta.indexOf("WebKit");qa=!r&&!pa&&"Gecko"==ua.product}var t=r,u=oa,v=qa,va=pa,wa,xa=k.navigator;wa=xa&&xa.platform||"";ra=-1!=wa.indexOf("Mac");sa=-1!=wa.indexOf("Win");var y=-1!=wa.indexOf("Linux");function ya(){var a=k.document;return a?a.documentMode:void 0}var z;
a:{var za="",A;if(t&&k.opera)var Aa=k.opera.version,za="function"==typeof Aa?Aa():Aa;else if(v?A=/rv\:([^\);]+)(\)|;)/:u?A=/MSIE\s+([^\);]+)(\)|;)/:va&&(A=/WebKit\/(\S+)/),A)var Ba=A.exec(s()),za=Ba?Ba[1]:"";if(u){var Ca=ya();if(Ca>parseFloat(za)){z=String(Ca);break a}}z=za}var Da={};function Ea(a){return Da[a]||(Da[a]=0<=da(z,a))}var Fa=k.document,B=Fa&&u?ya()||("CSS1Compat"==Fa.compatMode?parseInt(z,10):5):void 0;!v&&!u||u&&u&&9<=B||v&&Ea("1.9.1");u&&Ea("9");function Ga(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Ha(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ia(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Ja(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
function Ka(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(u&&!(u&&9<=B)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,g=b.parentNode;return e==g?La(a,b):!c&&Ja(e,b)?-1*Ma(a,b):!d&&Ja(g,a)?Ma(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument||
a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,d)}function Ma(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return La(d,a)}function La(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var Na={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Oa={IMG:" ",BR:"\n"};
function Pa(a,b,c){if(!(a.nodeName in Na))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Oa)b.push(Oa[a.nodeName]);else for(a=a.firstChild;a;)Pa(a,b,c),a=a.nextSibling};var Qa,Ra,Sa,Ta,Ua,Va,Wa;Wa=Va=Ua=Ta=Sa=Ra=Qa=!1;var C=s();C&&(-1!=C.indexOf("Firefox")?Qa=!0:-1!=C.indexOf("Camino")?Ra=!0:-1!=C.indexOf("iPhone")||-1!=C.indexOf("iPod")?Sa=!0:-1!=C.indexOf("iPad")?Ta=!0:-1!=C.indexOf("Android")?Ua=!0:-1!=C.indexOf("Chrome")?Va=!0:-1!=C.indexOf("Safari")&&(Wa=!0));var Xa=Qa,Ya=Ra,Za=Sa,$a=Ta,E=Ua,ab=Va,bb=Wa;var F=u&&!(u&&9<=B),cb=u&&!(u&&8<=B);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.K=e;this.parentNode=b}function eb(a,b,c){var d=cb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new db(b,a,b.nodeName,d,c)};function G(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(F&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),F&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b}
function H(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}cb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function fb(a,b,c,d,e){return(F?gb:hb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new I)}
function gb(a,b,c,d,e){if(8==a.h||c&&null===a.h){var g=b.all;if(!g)return e;a=ib(a);if("*"!=a&&(g=b.getElementsByTagName(a),!g))return e;if(c){for(var h=[],n=0;b=g[n++];)H(b,c,d)&&h.push(b);g=h}for(n=0;b=g[n++];)"*"==a&&"!"==b.tagName||e.add(b);return e}jb(a,b,c,d,e);return e}
function hb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!u?(b=b.getElementsByName(d),p(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),p(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),p(b,function(a){H(a,c,d)&&e.add(a)}));return e}
function kb(a,b,c,d,e){var g;if((8==a.h||c&&null===a.h)&&(g=b.childNodes)){var h=ib(a);if("*"!=h&&(g=ga(g,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!g))return e;c&&(g=ga(g,function(a){return H(a,c,d)}));p(g,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||e.add(a)});return e}return lb(a,b,c,d,e)}function lb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b);return e}
function jb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b),jb(a,b,c,d,e)}function ib(a){return a.getName()};function I(){this.e=this.d=null;this.i=0}function mb(a){this.p=a;this.next=this.n=null}I.prototype.unshift=function(a){a=new mb(a);a.next=this.d;this.e?this.d.n=a:this.d=this.e=a;this.d=a;this.i++};I.prototype.add=function(a){a=new mb(a);a.n=this.e;this.d?this.e.next=a:this.d=this.e=a;this.e=a;this.i++};function nb(a){return(a=a.d)?a.p:null}function ob(a){return(a=nb(a))?G(a):""}function J(a,b){this.I=a;this.o=(this.q=b)?a.e:a.d;this.v=null}
J.prototype.next=function(){var a=this.o;if(null==a)return null;var b=this.v=a;this.o=this.q?a.n:a.next;return b.p};function K(a,b){var c=a.evaluate(b);return c instanceof I?+ob(c):+c}function L(a,b){var c=a.evaluate(b);return c instanceof I?ob(c):""+c}function M(a,b){var c=a.evaluate(b);return c instanceof I?!!c.i:!!c};function N(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var g;if(b instanceof I&&c instanceof I){e=new J(b,!1);for(d=e.next();d;d=e.next())for(b=new J(c,!1),g=b.next();g;g=b.next())if(a(G(d),G(g)))return!0;return!1}if(b instanceof I||c instanceof I){b instanceof I?e=b:(e=c,c=b);e=new J(e,!1);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+G(d);break;case "boolean":d=!!G(d);break;case "string":d=G(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e?
"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}function pb(a,b,c,d){this.w=a;this.M=b;this.t=c;this.u=d}pb.prototype.toString=function(){return this.w};var qb={};function O(a,b,c,d){if(qb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new pb(a,b,c,d);qb[a.toString()]=a}O("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});O("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)});
O("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});O("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});O("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});O("<",4,2,function(a,b,c){return N(function(a,b){return a<b},a,b,c)});O(">",4,2,function(a,b,c){return N(function(a,b){return a>b},a,b,c)});O("<=",4,2,function(a,b,c){return N(function(a,b){return a<=b},a,b,c)});O(">=",4,2,function(a,b,c){return N(function(a,b){return a>=b},a,b,c)});O("=",3,2,function(a,b,c){return N(function(a,b){return a==b},a,b,c,!0)});
O("!=",3,2,function(a,b,c){return N(function(a,b){return a!=b},a,b,c,!0)});O("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});O("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function rb(a,b,c,d,e,g,h,n,D){this.l=a;this.t=b;this.H=c;this.G=d;this.F=e;this.u=g;this.D=h;this.C=void 0!==n?n:h;this.J=!!D}rb.prototype.toString=function(){return this.l};var sb={};function P(a,b,c,d,e,g,h,n){if(sb.hasOwnProperty(a))throw Error("Function already created: "+a+".");sb[a]=new rb(a,b,c,d,!1,e,g,h,n)}P("boolean",2,!1,!1,function(a,b){return M(b,a)},1);P("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);
P("concat",3,!1,!1,function(a,b){var c=ka(arguments,1);return ia(c,function(b,c){return b+L(c,a)})},2,null);P("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);P("count",1,!1,!1,function(a,b){return b.evaluate(a).i},1,1,!0);P("false",2,!1,!1,f(!1),0);P("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);
P("id",4,!1,!1,function(a,b){function c(a){if(F){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ja(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),g=[];p(d,function(a){a=c(a);!a||0<=fa(g,a)||g.push(a)});g.sort(Ka);var h=new I;p(g,function(a){h.add(a)});return h},1);P("lang",2,!1,!1,f(!1),1);
P("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.e},0);P("local-name",3,!1,!0,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);P("name",3,!1,!0,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,!0);P("namespace-uri",3,!0,!1,f(""),0,1,!0);P("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):G(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
P("not",2,!1,!1,function(a,b){return!M(b,a)},1);P("number",1,!1,!0,function(a,b){return b?K(b,a):+G(a.f)},0,1);P("position",1,!0,!1,function(a){return a.L},0);P("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);P("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);P("string",3,!1,!0,function(a,b){return b?L(b,a):G(a.f)},0,1);P("string-length",1,!1,!0,function(a,b){return(b?L(b,a):G(a.f)).length},0,1);
P("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);P("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
P("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);P("sum",1,!1,!1,function(a,b){var c;c=b.evaluate(a);c=new J(c,!1);for(var d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,!0);P("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a=[];for(d=0;d<c.length;d++){var g=c.charAt(d);g in a||(a[g]=e.charAt(d))}c="";for(d=0;d<b.length;d++)g=b.charAt(d),c+=g in a?a[g]:g;return c},3);P("true",2,!1,!1,f(!0),0);function tb(a,b,c,d){this.l=a;this.B=b;this.q=c;this.P=d}tb.prototype.toString=function(){return this.l};var ub={};function Q(a,b,c,d){if(ub.hasOwnProperty(a))throw Error("Axis already created: "+a);ub[a]=new tb(a,b,c,!!d)}Q("ancestor",function(a,b){for(var c=new I,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);Q("ancestor-or-self",function(a,b){var c=new I,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0);
Q("attribute",function(a,b){var c=new I,d=a.getName();if("style"==d&&b.style&&F)return c.add(new db(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if("*"==d)for(var d=b.sourceIndex,g=0,h;h=e[g];g++)F?h.nodeValue&&c.add(eb(b,h,d)):c.add(h);else(h=e.getNamedItem(d))&&(F?h.nodeValue&&c.add(eb(b,h,b.sourceIndex)):c.add(h));return c},!1);Q("child",function(a,b,c,d,e){return(F?kb:lb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new I)},!1,!0);Q("descendant",fb,!1,!0);
Q("descendant-or-self",function(a,b,c,d){var e=new I;H(b,c,d)&&a.matches(b)&&e.add(b);return fb(a,b,c,d,e)},!1,!0);Q("following",function(a,b,c,d){var e=new I;do for(var g=b;g=g.nextSibling;)H(g,c,d)&&a.matches(g)&&e.add(g),e=fb(a,g,c,d,e);while(b=b.parentNode);return e},!1,!0);Q("following-sibling",function(a,b){for(var c=new I,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);Q("namespace",function(){return new I},!1);
Q("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1);Q("preceding",function(a,b,c,d){var e=new I,g=[];do g.unshift(b);while(b=b.parentNode);for(var h=1,n=g.length;h<n;h++){var D=[];for(b=g[h];b=b.previousSibling;)D.unshift(b);for(var R=0,na=D.length;R<na;R++)b=D[R],H(b,c,d)&&a.matches(b)&&e.add(b),e=fb(a,b,c,d,e)}return e},!0,!0);
Q("preceding-sibling",function(a,b){for(var c=new I,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);Q("self",function(a,b){var c=new I;a.matches(b)&&c.add(b);return c},!1);function S(a){return(a=a.exec(s()))?a[1]:""}var vb=function(){if(Xa)return S(/Firefox\/([0-9.]+)/);if(u||t)return z;if(ab)return S(/Chrome\/([0-9.]+)/);if(bb)return S(/Version\/([0-9.]+)/);if(Za||$a){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(s());if(a)return a[1]+"."+a[2]}else{if(E)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(Ya)return S(/Camino\/([0-9.]+)/)}return""}();var wb,xb;function yb(a){return zb?wb(a):u?0<=da(B,a):Ea(a)}function T(a){zb?xb(a):E?da(Ab,a):da(vb,a)}
var zb=function(){if(!v)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,g=c.version;wb=function(a){return 0<=d.s(e,""+a)};xb=function(a){d.s(g,""+a)};return!0}(),Bb;if(E){var Cb=/Android\s+([0-9\.]+)/.exec(s());Bb=Cb?Cb[1]:"0"}else Bb="0";
var Ab=Bb,Db=u&&!(u&&8<=B),Eb=u&&!(u&&9<=B);E&&T(2.3);E&&T(4);bb&&T(6);function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Fb(a){return U(a,"OPTION")?!0:U(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}function Gb(a,b){var c;if(c=Db)if(c="value"==b)if(c=U(a,"OPTION"))c=null===Hb(a,"value");c?(c=[],Pa(a,c,!1),c=c.join("")):c=a[b];return c}var Ib=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
function Jb(a){var b=[];p(a.split(Ib),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return t?b.replace(/\w+:;/g,""):b}function Hb(a,b){b=b.toLowerCase();if("style"==b)return Jb(a.style.cssText);if(Db&&"value"==b&&U(a,"INPUT"))return a.value;if(Eb&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null};va||t||zb&&T(3.6);u&&yb(10);E&&T(4);function V(a,b){this.g={};this.c=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof V)for(d=Kb(a),Lb(a),e=[],c=0;c<a.c.length;c++)e.push(a.g[a.c[c]]);else{var c=[],g=0;for(d in a)c[g++]=d;d=c;c=[];g=0;for(e in a)c[g++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}V.prototype.k=0;V.prototype.A=0;function Kb(a){Lb(a);return a.c.concat()}
function Lb(a){if(a.k!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];Object.prototype.hasOwnProperty.call(a.g,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.k!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],Object.prototype.hasOwnProperty.call(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}}V.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.g,a)?this.g[a]:b};
V.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.g,a)||(this.k++,this.c.push(a),this.A++);this.g[a]=b};var Mb={};function W(a,b,c){ba(a)&&(a=v?a.a:t?a.opera:a.b);a=new Nb(a,b,c);!b||b in Mb&&!c||(Mb[b]={key:a,shift:!1},c&&(Mb[c]={key:a,shift:!0}));return a}function Nb(a,b,c){this.code=a;this.r=b||null;this.N=c||this.r}W(8);W(9);W(13);var Ob=W(16),Pb=W(17),Qb=W(18);W(19);W(20);W(27);W(32," ");W(33);W(34);W(35);W(36);W(37);W(38);W(39);W(40);W(44);W(45);W(46);W(48,"0",")");W(49,"1","!");W(50,"2","@");W(51,"3","#");W(52,"4","$");W(53,"5","%");W(54,"6","^");W(55,"7","&");W(56,"8","*");W(57,"9","(");
W(65,"a","A");W(66,"b","B");W(67,"c","C");W(68,"d","D");W(69,"e","E");W(70,"f","F");W(71,"g","G");W(72,"h","H");W(73,"i","I");W(74,"j","J");W(75,"k","K");W(76,"l","L");W(77,"m","M");W(78,"n","N");W(79,"o","O");W(80,"p","P");W(81,"q","Q");W(82,"r","R");W(83,"s","S");W(84,"t","T");W(85,"u","U");W(86,"v","V");W(87,"w","W");W(88,"x","X");W(89,"y","Y");W(90,"z","Z");var Rb=W(sa?{a:91,b:91,opera:219}:ra?{a:224,b:91,opera:17}:{a:0,b:91,opera:null});
W(sa?{a:92,b:92,opera:220}:ra?{a:224,b:93,opera:17}:{a:0,b:92,opera:null});W(sa?{a:93,b:93,opera:0}:ra?{a:0,b:0,opera:16}:{a:93,b:null,opera:0});W({a:96,b:96,opera:48},"0");W({a:97,b:97,opera:49},"1");W({a:98,b:98,opera:50},"2");W({a:99,b:99,opera:51},"3");W({a:100,b:100,opera:52},"4");W({a:101,b:101,opera:53},"5");W({a:102,b:102,opera:54},"6");W({a:103,b:103,opera:55},"7");W({a:104,b:104,opera:56},"8");W({a:105,b:105,opera:57},"9");W({a:106,b:106,opera:y?56:42},"*");
W({a:107,b:107,opera:y?61:43},"+");W({a:109,b:109,opera:y?109:45},"-");W({a:110,b:110,opera:y?190:78},".");W({a:111,b:111,opera:y?191:47},"/");W(y&&t?null:144);W(112);W(113);W(114);W(115);W(116);W(117);W(118);W(119);W(120);W(121);W(122);W(123);W({a:107,b:187,opera:61},"=","+");W(108,",");W({a:109,b:189,opera:109},"-","_");W(188,",","<");W(190,".",">");W(191,"/","?");W(192,"`","~");W(219,"[","{");W(220,"\\","|");W(221,"]","}");W({a:59,b:186,opera:59},";",":");W(222,"'",'"');var X=new V;X.set(1,Ob);
X.set(2,Pb);X.set(4,Qb);X.set(8,Rb);(function(a){var b=new V;p(Kb(a),function(c){b.set(a.get(c).code,c)});return b})(X);v&&yb(12);var Sb={"class":"className",readonly:"readOnly"},Tb="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" ");
function Ub(a,b){var c=null,d=b.toLowerCase();if("style"==d)return(c=a.style)&&!m(c)&&(c=c.cssText),c;if(("selected"==d||"checked"==d)&&Fb(a)){if(!Fb(a))throw new q(15,"Element is not selectable");var d="selected",e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)d="checked";return Gb(a,d)?"true":null}c=U(a,"A");if(U(a,"IMG")&&"src"==d||c&&"href"==d)return(c=Hb(a,d))&&(c=Gb(a,d)),c;c=Sb[b]||b;if(0<=fa(Tb,d))return(c=null!==Hb(a,b)||Gb(a,c))?"true":null;try{e=Gb(a,c)}catch(g){}c=null==e||
ba(e)?Hb(a,b):e;return null!=c?c.toString():null};function Vb(){this.j=void 0}
function Wb(a,b,c){switch(typeof b){case "string":Xb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==l(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Wb(a,a.j?a.j.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),
Xb(g,c),c.push(":"),Wb(a,a.j?a.j.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Yb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Zb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Xb(a,b){b.push('"',a.replace(Zb,function(a){if(a in Yb)return Yb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Yb[a]=e+b.toString(16)}),'"')};va||t||v&&yb(3.5)||u&&yb(8);function $b(a){switch(l(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ha(a,$b);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=ac(a);return b}if("document"in a)return b={},b.WINDOW=ac(a),b;if(aa(a))return ha(a,$b);a=Ga(a,function(a,b){return"number"==typeof b||m(b)});return Ha(a,$b);default:return null}}
function bc(a,b){return"array"==l(a)?ha(a,function(a){return bc(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?cc(a.ELEMENT,b):"WINDOW"in a?cc(a.WINDOW,b):Ha(a,function(a){return bc(a,b)}):a}function dc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.m=ca());b.m||(b.m=ca());return b}function ac(a){var b=dc(a.ownerDocument),c=Ia(b,function(b){return b==a});c||(c=":wdc:"+b.m++,b[c]=a);return c}
function cc(a,b){a=decodeURIComponent(a);var c=b||document,d=dc(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new q(23,"Window has been closed.");return e}for(var g=e;g;){if(g==c.documentElement)return e;g=g.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};function ec(a,b,c){a=[a,b];var d;try{var e=c?cc(c.WINDOW):window,g=bc(a,e.document),h=Ub.apply(null,g);d={status:0,value:$b(h)}}catch(n){d={status:"code"in n?n.code:13,value:{message:n.message}}}c=[];Wb(new Vb,d,c);return c.join("")}var Y=["_"],Z=k;Y[0]in Z||!Z.execScript||Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)Y.length||void 0===ec?Z=Z[$]?Z[$]:Z[$]={}:Z[$]=ec;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);}