UNPKG

webdriverio-automation

Version:

WebdriverIO-Automation android ios project

98 lines (92 loc) 42.2 kB
function(){return function(){var h=this;function l(a){return"string"==typeof a}function aa(a){return"number"==typeof a}function ba(a,b){a=a.split(".");var c=h;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b} function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function 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){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha=fa:ha=ga;return ha.apply(null,arguments)} function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var ja=Date.now||function(){return+new Date};function m(a,b){function c(){}c.prototype=b.prototype;a.V=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.S=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var ka=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}; function la(a,b){var c=0;a=ka(String(a)).split(".");b=ka(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;!c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=na(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||na(0==f[2].length,0==g[2].length)||na(f[2],g[2]);f=f[3];g=g[3]}while(!c)}return c}function na(a,b){return a<b?-1:a>b?1:0};function n(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,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}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 p(a,b,c){var d=c;n(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d} function qa(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 ra(a,b){a:{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)){b=e;break a}b=-1}return 0>b?null:l(a)?a.charAt(b):a[b]}function sa(a){return Array.prototype.concat.apply([],arguments)}function ta(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function q(a,b){this.code=a;this.a=r[a]||ua;this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}m(q,Error);var ua="unknown error",r={15:"element not selectable",11:"element not visible"};r[31]=ua;r[30]=ua;r[24]="invalid cookie domain";r[29]="invalid element coordinates";r[12]="invalid element state"; r[32]="invalid selector";r[51]="invalid selector";r[52]="invalid selector";r[17]="javascript error";r[405]="unsupported operation";r[34]="move target out of bounds";r[27]="no such alert";r[7]="no such element";r[8]="no such frame";r[23]="no such window";r[28]="script timeout";r[33]="session not created";r[10]="stale element reference";r[21]="timeout";r[25]="unable to set cookie";r[26]="unexpected alert open";r[13]=ua;r[9]="unknown command";q.prototype.toString=function(){return this.name+": "+this.message};var t;a:{var va=h.navigator;if(va){var wa=va.userAgent;if(wa){t=wa;break a}}t=""}function v(a){return-1!=t.indexOf(a)};function xa(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function w(a,b){return null!==a&&b in a}function za(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Aa(){return(v("Chrome")||v("CriOS"))&&!v("Edge")};function Ba(){return v("iPhone")&&!v("iPod")&&!v("iPad")};function Ca(a,b){var c=Da;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Ea=v("Opera"),y=v("Trident")||v("MSIE"),Fa=v("Edge"),z=v("Gecko")&&!(-1!=t.toLowerCase().indexOf("webkit")&&!v("Edge"))&&!(v("Trident")||v("MSIE"))&&!v("Edge"),Ga=-1!=t.toLowerCase().indexOf("webkit")&&!v("Edge"),Ha=v("Macintosh"),Ia=v("Windows");function Ja(){var a=h.document;return a?a.documentMode:void 0}var Ka; a:{var La="",Ma=function(){var a=t;if(z)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Fa)return/Edge\/([\d\.]+)/.exec(a);if(y)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Ga)return/WebKit\/(\S+)/.exec(a);if(Ea)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Ma&&(La=Ma?Ma[1]:"");if(y){var Na=Ja();if(null!=Na&&Na>parseFloat(La)){Ka=String(Na);break a}}Ka=La}var Da={};function Oa(a){return Ca(a,function(){return 0<=la(Ka,a)})}var A;var Pa=h.document; A=Pa&&y?Ja()||("CSS1Compat"==Pa.compatMode?parseInt(Ka,10):5):void 0;var Qa=v("Firefox"),Ra=Ba()||v("iPod"),Sa=v("iPad"),Ta=v("Android")&&!(Aa()||v("Firefox")||v("Opera")||v("Silk")),Ua=Aa(),Va=v("Safari")&&!(Aa()||v("Coast")||v("Opera")||v("Edge")||v("Silk")||v("Android"))&&!(Ba()||v("iPad")||v("iPod"));function B(a){return(a=a.exec(t))?a[1]:""}(function(){if(Qa)return B(/Firefox\/([0-9.]+)/);if(y||Fa||Ea)return Ka;if(Ua)return Ba()||v("iPad")||v("iPod")?B(/CriOS\/([0-9.]+)/):B(/Chrome\/([0-9.]+)/);if(Va&&!(Ba()||v("iPad")||v("iPod")))return B(/Version\/([0-9.]+)/);if(Ra||Sa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t);if(a)return a[1]+"."+a[2]}else if(Ta)return(a=B(/Android\s+([0-9.]+)/))?a:B(/Version\/([0-9.]+)/);return""})();var Wa,Xa;function Ya(a){return C?Wa(a):y?0<=la(A,a):Oa(a)}var C=function(){if(!z)return!1;var a=h.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(f){return!1}var b=a.classes,a=a.interfaces,c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=b.platformVersion,e=b.version;Wa=function(a){return 0<=c.compare(d,""+a)};Xa=function(a){c.compare(e,""+a)};return!0}(),Za=y&&!(10<=Number(A));Ta&&C&&Xa(2.3); Ta&&C&&Xa(4);Va&&C&&Xa(6);function $a(a,b){this.width=a;this.height=b}$a.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};$a.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};$a.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};$a.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; $a.prototype.scale=function(a,b){b=aa(b)?b:a;this.width*=a;this.height*=b;return this};function ab(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} function bb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(y&&!(9<=Number(A))){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?cb(a,b):!c&&ab(e,b)?-1*eb(a,b):!d&&ab(f,a)?eb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=D(a);c=d.createRange(); c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(h.Range.START_TO_END,a)}function eb(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return cb(b,a)}function cb(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}function D(a){return 9==a.nodeType?a:a.ownerDocument||a.document};function fb(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)};/* The MIT License Copyright (c) 2007 Cybozu Labs, Inc. Copyright (c) 2012 Google Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ function gb(a,b,c){this.a=a;this.b=b||1;this.h=c||1};var E=y&&!(9<=Number(A)),hb=y&&!(8<=Number(A));function ib(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function jb(a,b){var c=hb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new ib(b,a,b.nodeName,c)};function kb(a){this.b=a;this.a=0}function lb(a){a=a.match(mb);for(var b=0;b<a.length;b++)nb.test(a[b])&&a.splice(b,1);return new kb(a)}var mb=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,nb=/^\s/;function F(a,b){return a.b[a.a+(b||0)]}kb.prototype.next=function(){return this.b[this.a++]};function ob(a){return a.b.length<=a.a};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(E&&"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),E&&"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}hb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function pb(a,b,c,d,e){return(E?qb:rb).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new I)} function qb(a,b,c,d,e){if(a instanceof J||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;var g=sb(a);if("*"!=g&&(f=b.getElementsByTagName(g),!f))return e;if(c){var k=[];for(a=0;b=f[a++];)H(b,c,d)&&k.push(b);f=k}for(a=0;b=f[a++];)"*"==g&&"!"==b.tagName||K(e,b);return e}tb(a,b,c,d,e);return e} function rb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!y?(b=b.getElementsByName(d),n(b,function(b){a.a(b)&&K(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),n(b,function(b){b.className==d&&a.a(b)&&K(e,b)})):a instanceof M?tb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.h()),n(b,function(a){H(a,c,d)&&K(e,a)}));return e} function ub(a,b,c,d,e){var f;if((a instanceof J||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=sb(a);if("*"!=g&&(f=oa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=oa(f,function(a){return H(a,c,d)}));n(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||K(e,a)});return e}return vb(a,b,c,d,e)}function vb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.a(b)&&K(e,b);return e} function tb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.a(b)&&K(e,b),tb(a,b,c,d,e)}function sb(a){if(a instanceof M){if(8==a.b)return"!";if(null===a.b)return"*"}return a.h()};function I(){this.b=this.a=null;this.s=0}function wb(a){this.node=a;this.next=this.a=null}function xb(a,b){if(!a.a)return b;if(!b.a)return a;var c=a.a;b=b.a;for(var d=null,e,f=0;c&&b;){e=c.node;var g=b.node;e==g||e instanceof ib&&g instanceof ib&&e.a==g.a?(e=c,c=c.next,b=b.next):0<bb(c.node,b.node)?(e=b,b=b.next):(e=c,c=c.next);(e.a=d)?d.next=e:a.a=e;d=e;f++}for(e=c||b;e;)e.a=d,d=d.next=e,f++,e=e.next;a.b=d;a.s=f;return a}function yb(a,b){b=new wb(b);b.next=a.a;a.b?a.a.a=b:a.a=a.b=b;a.a=b;a.s++} function K(a,b){b=new wb(b);b.a=a.b;a.a?a.b.next=b:a.a=a.b=b;a.b=b;a.s++}function zb(a){return(a=a.a)?a.node:null}function Ab(a){return(a=zb(a))?G(a):""}I.prototype.iterator=function(a){return new Bb(this,!!a)};function Bb(a,b){this.h=a;this.b=(this.A=b)?a.b:a.a;this.a=null}Bb.prototype.next=function(){var a=this.b;if(a){var b=this.a=a;this.b=this.A?a.a:a.next;return b.node}return null};function N(a){this.l=a;this.b=this.i=!1;this.h=null}function O(a){return"\n "+a.toString().split("\n").join("\n ")}function Cb(a,b){a.i=b}function Db(a,b){a.b=b}function P(a,b){a=a.a(b);return a instanceof I?+Ab(a):+a}function Q(a,b){a=a.a(b);return a instanceof I?Ab(a):""+a}function Eb(a,b){a=a.a(b);return a instanceof I?!!a.s:!!a};function Fb(a,b,c){N.call(this,a.l);this.c=a;this.j=b;this.v=c;this.i=b.i||c.i;this.b=b.b||c.b;this.c==Gb&&(c.b||c.i||4==c.l||0==c.l||!b.h?b.b||b.i||4==b.l||0==b.l||!c.h||(this.h={name:c.h.name,B:b}):this.h={name:b.h.name,B:c})}m(Fb,N); function Hb(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof I&&c instanceof I){b=b.iterator();for(d=b.next();d;d=b.next())for(e=c.iterator(),f=e.next();f;f=e.next())if(a(G(d),G(f)))return!0;return!1}if(b instanceof I||c instanceof I){b instanceof I?(e=b,d=c):(e=c,d=b);f=e.iterator();for(var g=typeof d,k=f.next();k;k=f.next()){switch(g){case "number":k=+G(k);break;case "boolean":k=!!G(k);break;case "string":k=G(k);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(k, d)||e==c&&a(d,k))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)}Fb.prototype.a=function(a){return this.c.u(this.j,this.v,a)};Fb.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+O(this.j);return a+=O(this.v)};function Ib(a,b,c,d){this.O=a;this.K=b;this.l=c;this.u=d}Ib.prototype.toString=function(){return this.O};var Jb={}; function R(a,b,c,d){if(Jb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Ib(a,b,c,d);return Jb[a.toString()]=a}R("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});R("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});R("*",6,1,function(a,b,c){return P(a,c)*P(b,c)});R("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});R("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});R("<",4,2,function(a,b,c){return Hb(function(a,b){return a<b},a,b,c)}); R(">",4,2,function(a,b,c){return Hb(function(a,b){return a>b},a,b,c)});R("<=",4,2,function(a,b,c){return Hb(function(a,b){return a<=b},a,b,c)});R(">=",4,2,function(a,b,c){return Hb(function(a,b){return a>=b},a,b,c)});var Gb=R("=",3,2,function(a,b,c){return Hb(function(a,b){return a==b},a,b,c,!0)});R("!=",3,2,function(a,b,c){return Hb(function(a,b){return a!=b},a,b,c,!0)});R("and",2,2,function(a,b,c){return Eb(a,c)&&Eb(b,c)});R("or",1,2,function(a,b,c){return Eb(a,c)||Eb(b,c)});function Kb(a,b){if(b.a.length&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");N.call(this,a.l);this.c=a;this.j=b;this.i=a.i;this.b=a.b}m(Kb,N);Kb.prototype.a=function(a){a=this.c.a(a);return Lb(this.j,a)};Kb.prototype.toString=function(){var a="Filter:"+O(this.c);return a+=O(this.j)};function Mb(a,b){if(b.length<a.J)throw Error("Function "+a.o+" expects at least"+a.J+" arguments, "+b.length+" given");if(null!==a.F&&b.length>a.F)throw Error("Function "+a.o+" expects at most "+a.F+" arguments, "+b.length+" given");a.N&&n(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});N.call(this,a.l);this.C=a;this.c=b;Cb(this,a.i||qa(b,function(a){return a.i}));Db(this,a.M&&!b.length||a.L&&!!b.length||qa(b,function(a){return a.b}))} m(Mb,N);Mb.prototype.a=function(a){return this.C.u.apply(null,sa(a,this.c))};Mb.prototype.toString=function(){var a="Function: "+this.C;if(this.c.length)var b=p(this.c,function(a,b){return a+O(b)},"Arguments:"),a=a+O(b);return a};function Nb(a,b,c,d,e,f,g,k,u){this.o=a;this.l=b;this.i=c;this.M=d;this.L=e;this.u=f;this.J=g;this.F=void 0!==k?k:g;this.N=!!u}Nb.prototype.toString=function(){return this.o};var Ob={}; function S(a,b,c,d,e,f,g,k){if(Ob.hasOwnProperty(a))throw Error("Function already created: "+a+".");Ob[a]=new Nb(a,b,c,d,!1,e,f,g,k)}S("boolean",2,!1,!1,function(a,b){return Eb(b,a)},1);S("ceiling",1,!1,!1,function(a,b){return Math.ceil(P(b,a))},1);S("concat",3,!1,!1,function(a,b){return p(ta(arguments,1),function(b,d){return b+Q(d,a)},"")},2,null);S("contains",2,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);S("count",1,!1,!1,function(a,b){return b.a(a).s},1,1,!0); S("false",2,!1,!1,function(){return!1},0);S("floor",1,!1,!1,function(a,b){return Math.floor(P(b,a))},1); S("id",4,!1,!1,function(a,b){function c(a){if(E){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.a,e=9==d.nodeType?d:d.ownerDocument;a=Q(b,a).split(/\s+/);var f=[];n(a,function(a){a=c(a);var b;if(!(b=!a)){a:if(l(f))b=l(a)&&1==a.length?f.indexOf(a,0):-1;else{for(b=0;b<f.length;b++)if(b in f&&f[b]===a)break a;b=-1}b=0<=b}b||f.push(a)});f.sort(bb);var g=new I;n(f,function(a){K(g,a)});return g},1); S("lang",2,!1,!1,function(){return!1},1);S("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.h},0);S("local-name",3,!1,!0,function(a,b){return(a=b?zb(b.a(a)):a.a)?a.localName||a.nodeName.toLowerCase():""},0,1,!0);S("name",3,!1,!0,function(a,b){return(a=b?zb(b.a(a)):a.a)?a.nodeName.toLowerCase():""},0,1,!0);S("namespace-uri",3,!0,!1,function(){return""},0,1,!0); S("normalize-space",3,!1,!0,function(a,b){return(b?Q(b,a):G(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);S("not",2,!1,!1,function(a,b){return!Eb(b,a)},1);S("number",1,!1,!0,function(a,b){return b?P(b,a):+G(a.a)},0,1);S("position",1,!0,!1,function(a){return a.b},0);S("round",1,!1,!1,function(a,b){return Math.round(P(b,a))},1);S("starts-with",2,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);return!b.lastIndexOf(a,0)},2);S("string",3,!1,!0,function(a,b){return b?Q(b,a):G(a.a)},0,1); S("string-length",1,!1,!0,function(a,b){return(b?Q(b,a):G(a.a)).length},0,1);S("substring",3,!1,!1,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=Q(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);S("substring-after",3,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); S("substring-before",3,!1,!1,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);S("sum",1,!1,!1,function(a,b){a=b.a(a).iterator();b=0;for(var c=a.next();c;c=a.next())b+=+G(c);return b},1,1,!0);S("translate",3,!1,!1,function(a,b,c,d){b=Q(b,a);c=Q(c,a);var e=Q(d,a);d={};for(var f=0;f<c.length;f++)a=c.charAt(f),a in d||(d[a]=e.charAt(f));c="";for(f=0;f<b.length;f++)a=b.charAt(f),c+=a in d?d[a]:a;return c},3);S("true",2,!1,!1,function(){return!0},0);function M(a,b){this.j=a;this.c=void 0!==b?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Pb(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}M.prototype.a=function(a){return null===this.b||this.b==a.nodeType};M.prototype.h=function(){return this.j}; M.prototype.toString=function(){var a="Kind Test: "+this.j;null===this.c||(a+=O(this.c));return a};function Qb(a){N.call(this,3);this.c=a.substring(1,a.length-1)}m(Qb,N);Qb.prototype.a=function(){return this.c};Qb.prototype.toString=function(){return"Literal: "+this.c};function J(a,b){this.o=a.toLowerCase();a="*"==this.o?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():a}J.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.o&&this.o!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};J.prototype.h=function(){return this.o}; J.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.o};function Rb(a){N.call(this,1);this.c=a}m(Rb,N);Rb.prototype.a=function(){return this.c};Rb.prototype.toString=function(){return"Number: "+this.c};function Sb(a,b){N.call(this,a.l);this.j=a;this.c=b;this.i=a.i;this.b=a.b;1==this.c.length&&(a=this.c[0],a.D||a.c!=Tb||(a=a.v,"*"!=a.h()&&(this.h={name:a.h(),B:null})))}m(Sb,N);function Ub(){N.call(this,4)}m(Ub,N);Ub.prototype.a=function(a){var b=new I;a=a.a;9==a.nodeType?K(b,a):K(b,a.ownerDocument);return b};Ub.prototype.toString=function(){return"Root Helper Expression"};function Vb(){N.call(this,4)}m(Vb,N);Vb.prototype.a=function(a){var b=new I;K(b,a.a);return b};Vb.prototype.toString=function(){return"Context Helper Expression"}; function Wb(a){return"/"==a||"//"==a}Sb.prototype.a=function(a){var b=this.j.a(a);if(!(b instanceof I))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.s;c++){var e=a[c],f=b.iterator(e.c.A);if(e.i||e.c!=Xb)if(e.i||e.c!=Yb){var g=f.next();for(b=e.a(new gb(g));g=f.next();)g=e.a(new gb(g)),b=xb(b,g)}else g=f.next(),b=e.a(new gb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new gb(g))}}return b}; Sb.prototype.toString=function(){var a="Path Expression:"+O(this.j);if(this.c.length){var b=p(this.c,function(a,b){return a+O(b)},"Steps:");a+=O(b)}return a};function ac(a,b){this.a=a;this.A=!!b} function Lb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=b.iterator(),f=b.s,g,k=0;g=e.next();k++){var u=a.A?f-k:k+1;g=d.a(new gb(g,u,f));if("number"==typeof g)u=u==g;else if("string"==typeof g||"boolean"==typeof g)u=!!g;else if(g instanceof I)u=0<g.s;else throw Error("Predicate.evaluate returned an unexpected type.");if(!u){u=e;g=u.h;var x=u.a;if(!x)throw Error("Next must be called at least once before remove.");var L=x.a,x=x.next;L?L.next=x:g.a=x;x?x.a=L:g.b=L;g.s--;u.a=null}}return b} ac.prototype.toString=function(){return p(this.a,function(a,b){return a+O(b)},"Predicates:")};function T(a,b,c,d){N.call(this,4);this.c=a;this.v=b;this.j=c||new ac([]);this.D=!!d;b=this.j;b=0<b.a.length?b.a[0].h:null;a.R&&b&&(a=b.name,a=E?a.toLowerCase():a,this.h={name:a,B:b.B});a:{a=this.j;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.i||1==c.l||0==c.l){a=!0;break a}a=!1}this.i=a}m(T,N); T.prototype.a=function(a){var b=a.a,c=this.h,d=null,e=null,f=0;c&&(d=c.name,e=c.B?Q(c.B,a):null,f=1);if(this.D)if(this.i||this.c!=bc)if(b=(new T(cc,new M("node"))).a(a).iterator(),c=b.next())for(a=this.u(c,d,e,f);c=b.next();)a=xb(a,this.u(c,d,e,f));else a=new I;else a=pb(this.v,b,d,e),a=Lb(this.j,a,f);else a=this.u(a.a,d,e,f);return a};T.prototype.u=function(a,b,c,d){a=this.c.C(this.v,a,b,c);return a=Lb(this.j,a,d)}; T.prototype.toString=function(){var a="Step:"+O("Operator: "+(this.D?"//":"/"));this.c.o&&(a+=O("Axis: "+this.c));a+=O(this.v);if(this.j.a.length){var b=p(this.j.a,function(a,b){return a+O(b)},"Predicates:");a+=O(b)}return a};function dc(a,b,c,d){this.o=a;this.C=b;this.A=c;this.R=d}dc.prototype.toString=function(){return this.o};var ec={};function U(a,b,c,d){if(ec.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new dc(a,b,c,!!d);return ec[a]=b} U("ancestor",function(a,b){for(var c=new I;b=b.parentNode;)a.a(b)&&yb(c,b);return c},!0);U("ancestor-or-self",function(a,b){var c=new I;do a.a(b)&&yb(c,b);while(b=b.parentNode);return c},!0); var Tb=U("attribute",function(a,b){var c=new I,d=a.h();if("style"==d&&E&&b.style)return K(c,new ib(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof M&&null===a.b||"*"==d)for(d=0;a=e[d];d++)E?a.nodeValue&&K(c,jb(b,a)):K(c,a);else(a=e.getNamedItem(d))&&(E?a.nodeValue&&K(c,jb(b,a)):K(c,a));return c},!1),bc=U("child",function(a,b,c,d,e){return(E?ub:vb).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new I)},!1,!0);U("descendant",pb,!1,!0); var cc=U("descendant-or-self",function(a,b,c,d){var e=new I;H(b,c,d)&&a.a(b)&&K(e,b);return pb(a,b,c,d,e)},!1,!0),Xb=U("following",function(a,b,c,d){var e=new I;do for(var f=b;f=f.nextSibling;)H(f,c,d)&&a.a(f)&&K(e,f),e=pb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);U("following-sibling",function(a,b){for(var c=new I;b=b.nextSibling;)a.a(b)&&K(c,b);return c},!1);U("namespace",function(){return new I},!1); var fc=U("parent",function(a,b){var c=new I;if(9==b.nodeType)return c;if(2==b.nodeType)return K(c,b.ownerElement),c;b=b.parentNode;a.a(b)&&K(c,b);return c},!1),Yb=U("preceding",function(a,b,c,d){var e=new I,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var u=[];for(b=f[g];b=b.previousSibling;)u.unshift(b);for(var x=0,L=u.length;x<L;x++)b=u[x],H(b,c,d)&&a.a(b)&&K(e,b),e=pb(a,b,c,d,e)}return e},!0,!0); U("preceding-sibling",function(a,b){for(var c=new I;b=b.previousSibling;)a.a(b)&&yb(c,b);return c},!0);var gc=U("self",function(a,b){var c=new I;a.a(b)&&K(c,b);return c},!1);function hc(a){N.call(this,1);this.c=a;this.i=a.i;this.b=a.b}m(hc,N);hc.prototype.a=function(a){return-P(this.c,a)};hc.prototype.toString=function(){return"Unary Expression: -"+O(this.c)};function ic(a){N.call(this,4);this.c=a;Cb(this,qa(this.c,function(a){return a.i}));Db(this,qa(this.c,function(a){return a.b}))}m(ic,N);ic.prototype.a=function(a){var b=new I;n(this.c,function(c){c=c.a(a);if(!(c instanceof I))throw Error("Path expression must evaluate to NodeSet.");b=xb(b,c)});return b};ic.prototype.toString=function(){return p(this.c,function(a,b){return a+O(b)},"Union Expression:")};function jc(a,b){this.a=a;this.b=b}function kc(a){for(var b,c=[];;){V(a,"Missing right hand side of binary expression.");b=lc(a);var d=a.a.next();if(!d)break;var e=(d=Jb[d]||null)&&d.K;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].K;)b=new Fb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Fb(c.pop(),c.pop(),b);return b}function V(a,b){if(ob(a.a))throw Error(b);}function mc(a,b){a=a.a.next();if(a!=b)throw Error("Bad token, expected: "+b+" got: "+a);} function nc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function oc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Qb(a)} function pc(a){var b=[];if(Wb(F(a.a))){var c=a.a.next();var d=F(a.a);if("/"==c&&(ob(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Ub;d=new Ub;V(a,"Missing next location step.");c=qc(a,c);b.push(c)}else{a:{c=F(a.a);d=c.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();c=kc(a);V(a,'unclosed "("');mc(a,")");break;case '"':case "'":c=oc(a);break;default:if(isNaN(+c))if(!Pb(c)&&/(?![0-9])[\w]/.test(d)&&"("==F(a.a, 1)){c=a.a.next();c=Ob[c]||null;a.a.next();for(d=[];")"!=F(a.a);){V(a,"Missing function argument list.");d.push(kc(a));if(","!=F(a.a))break;a.a.next()}V(a,"Unclosed function argument list.");nc(a);c=new Mb(c,d)}else{c=null;break a}else c=new Rb(+a.a.next())}"["==F(a.a)&&(d=new ac(rc(a)),c=new Kb(c,d))}if(c)if(Wb(F(a.a)))d=c;else return c;else c=qc(a,"/"),d=new Vb,b.push(c)}for(;Wb(F(a.a));)c=a.a.next(),V(a,"Missing next location step."),c=qc(a,c),b.push(c);return new Sb(d,b)} function qc(a,b){if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==F(a.a)){var c=new T(gc,new M("node"));a.a.next();return c}if(".."==F(a.a))return c=new T(fc,new M("node")),a.a.next(),c;if("@"==F(a.a)){var d=Tb;a.a.next();V(a,"Missing attribute name")}else if("::"==F(a.a,1)){if(!/(?![0-9])[\w]/.test(F(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());var e=a.a.next();d=ec[e]||null;if(!d)throw Error("No axis with name: "+e);a.a.next();V(a,"Missing node name")}else d=bc;e= F(a.a);if(/(?![0-9])[\w\*]/.test(e.charAt(0)))if("("==F(a.a,1)){if(!Pb(e))throw Error("Invalid node type: "+e);e=a.a.next();if(!Pb(e))throw Error("Invalid type name: "+e);mc(a,"(");V(a,"Bad nodetype");var f=F(a.a).charAt(0),g=null;if('"'==f||"'"==f)g=oc(a);V(a,"Bad nodetype");nc(a);e=new M(e,g)}else if(e=a.a.next(),f=e.indexOf(":"),-1==f)e=new J(e);else{var g=e.substring(0,f);if("*"==g)var k="*";else if(k=a.b(g),!k)throw Error("Namespace prefix not declared: "+g);e=e.substr(f+1);e=new J(e,k)}else throw Error("Bad token: "+ a.a.next());a=new ac(rc(a),d.A);return c||new T(d,e,a,"//"==b)}function rc(a){for(var b=[];"["==F(a.a);){a.a.next();V(a,"Missing predicate expression.");var c=kc(a);b.push(c);V(a,"Unclosed predicate expression.");mc(a,"]")}return b}function lc(a){if("-"==F(a.a))return a.a.next(),new hc(lc(a));var b=pc(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)V(a,"Missing next union location path."),b.push(pc(a));a.a.a--;a=new ic(b)}return a};function sc(a){switch(a.nodeType){case 1:return ia(tc,a);case 9:return sc(a.documentElement);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.");a=lb(a);if(ob(a))throw Error("Invalid XPath expression.");b?"function"==ca(b)||(b=ha(b.lookupNamespaceURI,b)):b=function(){return null};var c=kc(new jc(a,b));if(!ob(a))throw Error("Bad token: "+a.next());this.evaluate=function(a,b){a=c.a(new gb(a));return new W(a,b)}} function W(a,b){if(!b)if(a instanceof I)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 I))throw Error("value could not be converted to the specified type");this.resultType=b;switch(b){case 2:this.stringValue=a instanceof I?Ab(a):""+a;break;case 1:this.numberValue=a instanceof I?+Ab(a):+a;break;case 3:this.booleanValue=a instanceof I?0<a.s:!!a;break;case 4:case 5:case 6:case 7:var c= a.iterator();var d=[];for(var e=c.next();e;e=c.next())d.push(e instanceof ib?e.a:e);this.snapshotLength=a.s;this.invalidIteratorState=!1;break;case 8:case 9:a=zb(a);this.singleNodeValue=a instanceof ib?a.a:a;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>=d.length?null:d[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type"); return a>=d.length||0>a?null:d[a]}}W.ANY_TYPE=0;W.NUMBER_TYPE=1;W.STRING_TYPE=2;W.BOOLEAN_TYPE=3;W.UNORDERED_NODE_ITERATOR_TYPE=4;W.ORDERED_NODE_ITERATOR_TYPE=5;W.UNORDERED_NODE_SNAPSHOT_TYPE=6;W.ORDERED_NODE_SNAPSHOT_TYPE=7;W.ANY_UNORDERED_NODE_TYPE=8;W.FIRST_ORDERED_NODE_TYPE=9;function wc(a){this.lookupNamespaceURI=sc(a)} function xc(a,b){a=a||h;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=W,c.evaluate=function(a,b,c,g){return(new vc(a,c)).evaluate(b,g)},c.createExpression=function(a,b){return new vc(a,b)},c.createNSResolver=function(a){return new wc(a)}}ba("wgxpath.install",xc);var X={};X.H=function(){var a={W:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}(); X.u=function(a,b,c){var d=D(a);if(!d.documentElement)return null;(y||Ta)&&xc(d?d.parentWindow||d.defaultView:window);try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):X.H;if(y&&!Oa(7))return d.evaluate.call(d,b,a,e,c,null);if(!y||9<=Number(A)){for(var f={},g=d.getElementsByTagName("*"),k=0;k<g.length;++k){var u=g[k],x=u.namespaceURI;if(x&&!f[x]){var L=u.lookupPrefix(x);if(!L)var Zb=x.match(".*/(\\w+)/?$"),L=Zb?Zb[1]:"xhtml";f[x]=L}}var $b={},db;for(db in f)$b[f[db]]=db;e=function(a){return $b[a]|| null}}try{return d.evaluate(b,a,e,c,null)}catch(ma){if("TypeError"===ma.name)return e=d.createNSResolver?d.createNSResolver(d.documentElement):X.H,d.evaluate(b,a,e,c,null);throw ma;}}catch(ma){if(!z||"NS_ERROR_ILLEGAL_VALUE"!=ma.name)throw new q(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+ma);}};X.I=function(a,b){if(!a||1!=a.nodeType)throw new q(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");}; X.P=function(a,b){var c=function(){var c=X.u(b,a,9);return c?c.singleNodeValue||null:b.selectSingleNode?(c=D(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||X.I(c,a);return c}; X.U=function(a,b){var c=function(){var c=X.u(b,a,7);if(c){for(var e=c.snapshotLength,f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=D(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();n(c,function(b){X.I(b,a)});return c};function Y(a,b,c,d){this.a=a;this.b=b;this.width=c;this.height=d}Y.prototype.toString=function(){return"("+this.a+", "+this.b+" - "+this.width+"w x "+this.height+"h)"};Y.prototype.contains=function(a){return this.a<=a.a&&this.a+this.width>=a.a+a.width&&this.b<=a.b&&this.b+this.height>=a.b+a.height};Y.prototype.ceil=function(){this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this}; Y.prototype.floor=function(){this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Y.prototype.round=function(){this.a=Math.round(this.a);this.b=Math.round(this.b);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};Y.prototype.scale=function(a,b){b=aa(b)?b:a;this.a*=a;this.width*=a;this.b*=b;this.height*=b;return this};function yc(a){var b;var c=fb(a,"MAP");if(c||fb(a,"AREA")){var d=c?a:fb(a.parentNode,"MAP")?a.parentNode:null,e=b=null;if(d&&d.name&&(b=X.P('/descendant::*[@usemap = "#'+d.name+'"]',D(d)))&&(e=yc(b),!c&&"default"!=a.shape.toLowerCase()))var c=zc(a),d=Math.min(Math.max(c.a,0),e.width),f=Math.min(Math.max(c.b,0),e.height),e=new Y(d+e.a,f+e.b,Math.min(c.width,e.width-d),Math.min(c.height,e.height-f));b={T:b,rect:e||new Y(0,0,0,0)}}else b=null;if(b)return b.rect;if(fb(a,"HTML"))return a=D(a),a=((a?a.parentWindow|| a.defaultView:window)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new $a(a.clientWidth,a.clientHeight),new Y(0,0,a.width,a.height);try{var g=a.getBoundingClientRect()}catch(k){return new Y(0,0,0,0)}g=new Y(g.left,g.top,g.right-g.left,g.bottom-g.top);y&&a.ownerDocument.body&&(a=D(a),g.a-=a.documentElement.clientLeft+a.body.clientLeft,g.b-=a.documentElement.clientTop+a.body.clientTop);return g} function zc(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 Y(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new Y(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 Y(b,c,d-b,e-c)}return new Y(0,0,0,0)};Ga||C&&C&&Xa(3.6);y&&Ya(10);Ta&&C&&Xa(4);function Ac(a,b){this.w={};this.m=[];this.a=0;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){if(a instanceof Ac){d=Bc(a);Cc(a);var e=[];for(c=0;c<a.m.length;c++)e.push(a.w[a.m[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])}}function Bc(a){Cc(a);return a.m.concat()} function Cc(a){var b,c;if(a.a!=a.m.length){for(b=c=0;c<a.m.length;){var d=a.m[c];Object.prototype.hasOwnProperty.call(a.w,d)&&(a.m[b++]=d);c++}a.m.length=b}if(a.a!=a.m.length){var e={};for(b=c=0;c<a.m.length;)d=a.m[c],Object.prototype.hasOwnProperty.call(e,d)||(a.m[b++]=d,e[d]=1),c++;a.m.length=b}}Ac.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.w,a)?this.w[a]:b}; Ac.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.w,a)||(this.a++,this.m.push(a));this.w[a]=b};var Dc={};function Z(a,b,c){ea(a)&&(a=z?a.f:a.g);a=new Ec(a);!b||b in Dc&&!c||(Dc[b]={key:a,shift:!1},c&&(Dc[c]={key:a,shift:!0}));return a}function Ec(a){this.code=a}Z(8);Z(9);Z(13);var Fc=Z(16),Gc=Z(17),Hc=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 Ic=Z(Ia?{f:91,g:91}:Ha?{f:224,g:91}:{f:0,g:91});Z(Ia?{f:92,g:92}:Ha?{f:224,g:93}:{f:0,g:92});Z(Ia?{f:93,g:93}:Ha?{f:0,g:0}:{f:93,g:null});Z({f:96,g:96},"0");Z({f:97,g:97},"1"); Z({f:98,g:98},"2");Z({f:99,g:99},"3");Z({f:100,g:100},"4");Z({f:101,g:101},"5");Z({f:102,g:102},"6");Z({f:103,g:103},"7");Z({f:104,g:104},"8");Z({f:105,g:105},"9");Z({f:106,g:106},"*");Z({f:107,g:107},"+");Z({f:109,g:109},"-");Z({f:110,g:110},".");Z({f:111,g:111},"/");Z(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({f:107,g:187},"=","+");Z(108,",");Z({f:109,g:189},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{"); Z(220,"\\","|");Z(221,"]","}");Z({f:59,g:186},";",":");Z(222,"'",'"');var Jc=new Ac;Jc.set(1,Fc);Jc.set(2,Gc);Jc.set(4,Hc);Jc.set(8,Ic);(function(a){var b=new Ac;n(Bc(a),function(c){b.set(a.get(c).code,c)});return b})(Jc);z&&Ya(12);function Kc(){} function Lc(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if("array"==ca(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),Lc(a,d[f],c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");e="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(f=b[d],"function"!=typeof f&&(c.push(e),Mc(d,c),c.push(":"),Lc(a,f,c),e=","));c.push("}");return}}switch(typeof b){case "string":Mc(b,c);break;case "number":c.push(isFinite(b)&& !isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}}var Nc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Oc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; function Mc(a,b){b.push('"',a.replace(Oc,function(a){var b=Nc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),Nc[a]=b);return b}),'"')};Ga||z&&Ya(3.5)||y&&Ya(8);function Pc(a){function b(a,d){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return pa(a,function(a){return b(a,d)});case "object":if(0<=d.indexOf(a))throw new q(17,"Recursive object cannot be transferred");if(w(a,"nodeType")&&(1==a.nodeType||9==a.nodeType)){var c={};c.ELEMENT=Qc(a);return c}if(w(a,"document"))return c={},c.WINDOW=Qc(a),c;d.push(a);if(da(a))return pa(a,function(a){return b(a,d)});a=xa(a,function(a,b){return aa(b)|| l(b)});return ya(a,function(a){return b(a,d)});default:return null}}return b(a,[])}function Rc(a,b){return"array"==ca(a)?pa(a,function(a){return Rc(a,b)}):ea(a)?"function"==typeof a?a:w(a,"ELEMENT")?Sc(a.ELEMENT,b):w(a,"WINDOW")?Sc(a.WINDOW,b):ya(a,function(a){return Rc(a,b)}):a}function Tc(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.G=ja());b.G||(b.G=ja());return b}function Qc(a){var b=Tc(a.ownerDocument),c=za(b,function(b){return b==a});c||(c=":wdc:"+b.G++,b[c]=a);return c} function Sc(a,b){a=decodeURIComponent(a);b=b||document;var c=Tc(b);if(!w(c,a))throw new q(10,"Element does not exist in cache");var d=c[a];if(w(d,"setInterval")){if(d.closed)throw delete c[a],new q(23,"Window has been closed.");return d}for(var e=d;e;){if(e==b.documentElement)return d;e=e.parentNode}delete c[a];throw new q(10,"Element is no longer attached to the DOM");};function Uc(a,b,c){try{var d;c?d=Sc(c.WINDOW):d=window;var e=Rc(b,d.document),f=a.apply(null,e);var g={status:0,value:Pc(f)}}catch(k){g={status:w(k,"code")?k.code:13,value:{message:k.message}}}a=[];Lc(new Kc,g,a);return a.join("")};ba("_",function(a,b){return Uc(function(a){var b=yc(a);a=b.height;b=b.width;Za||(b=Math.floor(b),a=Math.floor(a));return{width:b,height:a}},[a],b)});; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);}