webdriverio-automation
Version:
WebdriverIO-Automation android ios project
115 lines (110 loc) • 82.2 kB
JavaScript
function(){return function(){var h,aa=this;function m(a){return void 0!==a}function n(a){return"string"==typeof a}function ba(a){return"number"==typeof a}function ca(a,b){a=a.split(".");var c=aa;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&m(b)?c[d]=b:c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}}
function da(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 ea(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function fa(a){return"function"==da(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ha="closure_uid_"+(1E9*Math.random()>>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)}
function ka(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function la(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?la=ja:la=ka;return la.apply(null,arguments)}
function ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var na=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.$=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Z=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 oa=window;var pa;function qa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}var ra=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};
function sa(a,b){var c=0;a=ra(String(a)).split(".");b=ra(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=ta(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||ta(0==f[2].length,0==g[2].length)||ta(f[2],g[2]);f=f[3];g=g[3]}while(!c)}return c}function ta(a,b){return a<b?-1:a>b?1:0}
function ua(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};function va(a,b){if(n(a))return n(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 r(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function wa(a,b){for(var c=a.length,d=[],e=0,f=n(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function xa(a,b){for(var c=a.length,d=Array(c),e=n(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d}
function ya(a,b,c){var d=c;r(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function za(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Aa(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}function Ba(a,b){a:{for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:n(a)?a.charAt(b):a[b]}
function Ca(a){return Array.prototype.concat.apply([],arguments)}function Da(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var Ea={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 Fa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ga=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ha=/^#(?:[0-9a-f]{3}){1,2}$/i,Ja=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ka=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function t(a,b){this.code=a;this.a=v[a]||La;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||""}p(t,Error);var La="unknown error",v={15:"element not selectable",11:"element not visible"};v[31]=La;v[30]=La;v[24]="invalid cookie domain";v[29]="invalid element coordinates";v[12]="invalid element state";
v[32]="invalid selector";v[51]="invalid selector";v[52]="invalid selector";v[17]="javascript error";v[405]="unsupported operation";v[34]="move target out of bounds";v[27]="no such alert";v[7]="no such element";v[8]="no such frame";v[23]="no such window";v[28]="script timeout";v[33]="session not created";v[10]="stale element reference";v[21]="timeout";v[25]="unable to set cookie";v[26]="unexpected alert open";v[13]=La;v[9]="unknown command";t.prototype.toString=function(){return this.name+": "+this.message};var Ma;a:{var Na=aa.navigator;if(Na){var Oa=Na.userAgent;if(Oa){Ma=Oa;break a}}Ma=""}function w(a){return-1!=Ma.indexOf(a)};function Pa(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Qa(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ra(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Sa(a,b){return null!==a&&b in a}function Ta(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Ua(){return(w("Chrome")||w("CriOS"))&&!w("Edge")};function Va(){return w("iPhone")&&!w("iPod")&&!w("iPad")};function Wa(a,b){var c=Xa;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Ya=w("Opera"),x=w("Trident")||w("MSIE"),Za=w("Edge"),y=w("Gecko")&&!(-1!=Ma.toLowerCase().indexOf("webkit")&&!w("Edge"))&&!(w("Trident")||w("MSIE"))&&!w("Edge"),A=-1!=Ma.toLowerCase().indexOf("webkit")&&!w("Edge"),$a=A&&w("Mobile"),ab=w("Macintosh"),bb=w("Windows");function cb(){var a=aa.document;return a?a.documentMode:void 0}var db;
a:{var eb="",fb=function(){var a=Ma;if(y)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Za)return/Edge\/([\d\.]+)/.exec(a);if(x)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(A)return/WebKit\/(\S+)/.exec(a);if(Ya)return/(?:Version)[ \/]?(\S+)/.exec(a)}();fb&&(eb=fb?fb[1]:"");if(x){var gb=cb();if(null!=gb&&gb>parseFloat(eb)){db=String(gb);break a}}db=eb}var Xa={};function hb(a){return Wa(a,function(){return 0<=sa(db,a)})}function ib(a){return Number(jb)>=a}var kb;var lb=aa.document;
kb=lb&&x?cb()||("CSS1Compat"==lb.compatMode?parseInt(db,10):5):void 0;var jb=kb;var mb=w("Firefox"),nb=Va()||w("iPod"),ob=w("iPad"),pb=w("Android")&&!(Ua()||w("Firefox")||w("Opera")||w("Silk")),qb=Ua(),rb=w("Safari")&&!(Ua()||w("Coast")||w("Opera")||w("Edge")||w("Silk")||w("Android"))&&!(Va()||w("iPad")||w("iPod"));function sb(a){return(a=a.exec(Ma))?a[1]:""}var tb=function(){if(mb)return sb(/Firefox\/([0-9.]+)/);if(x||Za||Ya)return db;if(qb)return Va()||w("iPad")||w("iPod")?sb(/CriOS\/([0-9.]+)/):sb(/Chrome\/([0-9.]+)/);if(rb&&!(Va()||w("iPad")||w("iPod")))return sb(/Version\/([0-9.]+)/);if(nb||ob){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ma);if(a)return a[1]+"."+a[2]}else if(pb)return(a=sb(/Android\s+([0-9.]+)/))?a:sb(/Version\/([0-9.]+)/);return""}();var ub,vb;function wb(a){return xb?ub(a):x?0<=sa(jb,a):hb(a)}function yb(a){return xb?vb(a):pb?0<=sa(zb,a):0<=sa(tb,a)}
var xb=function(){if(!y)return!1;var a=aa.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;ub=function(a){return 0<=c.compare(d,""+a)};vb=function(a){return 0<=c.compare(e,""+a)};return!0}(),Ab=ob||nb,Bb;
if(pb){var Cb=/Android\s+([0-9\.]+)/.exec(Ma);Bb=Cb?Cb[1]:"0"}else Bb="0";var zb=Bb,Db=x&&!ib(8),Eb=ib(9),Fb=x&&!ib(9),Gb=ib(10);pb&&yb(2.3);pb&&yb(4);rb&&yb(6);var Hb=x&&-1!=Ma.indexOf("IEMobile");function Ib(a,b){this.x=m(a)?a:0;this.y=m(b)?b:0}h=Ib.prototype;h.toString=function(){return"("+this.x+", "+this.y+")"};h.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};h.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};h.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};h.scale=function(a,b){b=ba(b)?b:a;this.x*=a;this.y*=b;return this};function Jb(a,b){this.width=a;this.height=b}h=Jb.prototype;h.toString=function(){return"("+this.width+" x "+this.height+")"};h.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};h.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};h.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};h.scale=function(a,b){b=ba(b)?b:a;this.width*=a;this.height*=b;return this};function Kb(a){return a?new Lb(B(a)):pa||(pa=new Lb)}function Mb(a){return a.scrollingElement?a.scrollingElement:A||"CSS1Compat"!=a.compatMode?a.body||a.documentElement:a.documentElement}function Nb(a){return a?a.parentWindow||a.defaultView:window}function Ob(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}
function Pb(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 Qb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!ib(9)){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=B(a);c=d.createRange();
c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(aa.Range.START_TO_END,a)}function Sb(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return Rb(b,a)}function Rb(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}function B(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var Tb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ub={IMG:" ",BR:"\n"};
function Vb(a,b,c){if(!(a.nodeName in Tb))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 Ub)b.push(Ub[a.nodeName]);else for(a=a.firstChild;a;)Vb(a,b,c),a=a.nextSibling}function Wb(a,b,c){a&&!c&&(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function Lb(a){this.a=a||aa.document||document}Lb.prototype.getElementsByTagName=function(a,b){return(b||this.a).getElementsByTagName(String(a))};
function Xb(a,b,c,d){a=d||a.a;var e=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(e||c))c=a.querySelectorAll(e+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(d=a.getElementsByClassName(c),e){a={};for(var f=b=0,g;g=d[f];f++)e==g.nodeName&&(a[b++]=g);a.length=b;c=a}else c=d;else if(d=a.getElementsByTagName(e||"*"),c){a={};for(f=b=0;g=d[f];f++){var e=g.className,k;if(k="function"==typeof e.split)k=0<=va(e.split(/\s+/),c);k&&(a[b++]=g)}a.length=b;c=a}else c=d;return c}
Lb.prototype.contains=Pb;function Yb(a,b){b=b.toLowerCase();return"style"==b?Zb(a.style.cssText):Db&&"value"==b&&C(a,"INPUT")?a.value:Fb&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var $b=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
function Zb(a){var b=[];r(a.split($b),function(a){var c=a.indexOf(":");0<c&&(a=[a.slice(0,c),a.slice(c+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function ac(a,b){Db&&"value"==b&&C(a,"OPTION")&&null===Yb(a,"value")?(b=[],Vb(a,b,!1),a=b.join("")):a=a[b];return a}function C(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}
function bc(a){return C(a,"OPTION")?!0:C(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}function cc(a){if(!bc(a))throw new t(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!ac(a,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 dc(a,b,c){this.a=a;this.b=b||1;this.f=c||1};var ec=x&&!ib(9),fc=x&&!ib(8);function gc(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function hc(a,b){var c=fc&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new gc(b,a,b.nodeName,c)};function ic(a){this.b=a;this.a=0}function jc(a){a=a.match(kc);for(var b=0;b<a.length;b++)lc.test(a[b])&&a.splice(b,1);return new ic(a)}var kc=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,lc=/^\s/;function D(a,b){return a.b[a.a+(b||0)]}ic.prototype.next=function(){return this.b[this.a++]};function mc(a){return a.b.length<=a.a};function nc(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(ec&&"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),ec&&"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 oc(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}fc&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function pc(a,b,c,d,e){return(ec?qc:rc).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new E)}
function qc(a,b,c,d,e){if(a instanceof sc||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;var g=tc(a);if("*"!=g&&(f=b.getElementsByTagName(g),!f))return e;if(c){var k=[];for(a=0;b=f[a++];)oc(b,c,d)&&k.push(b);f=k}for(a=0;b=f[a++];)"*"==g&&"!"==b.tagName||F(e,b);return e}uc(a,b,c,d,e);return e}
function rc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),r(b,function(b){a.a(b)&&F(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),r(b,function(b){b.className==d&&a.a(b)&&F(e,b)})):a instanceof vc?uc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),r(b,function(a){oc(a,c,d)&&F(e,a)}));return e}
function wc(a,b,c,d,e){var f;if((a instanceof sc||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=tc(a);if("*"!=g&&(f=wa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=wa(f,function(a){return oc(a,c,d)}));r(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||F(e,a)});return e}return xc(a,b,c,d,e)}function xc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)oc(b,c,d)&&a.a(b)&&F(e,b);return e}
function uc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)oc(b,c,d)&&a.a(b)&&F(e,b),uc(a,b,c,d,e)}function tc(a){if(a instanceof vc){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function E(){this.b=this.a=null;this.s=0}function yc(a){this.node=a;this.next=this.a=null}function zc(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 gc&&g instanceof gc&&e.a==g.a?(e=c,c=c.next,b=b.next):0<Qb(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 Ac(a,b){b=new yc(b);b.next=a.a;a.b?a.a.a=b:a.a=a.b=b;a.a=b;a.s++}
function F(a,b){b=new yc(b);b.a=a.b;a.a?a.b.next=b:a.a=a.b=b;a.b=b;a.s++}function Bc(a){return(a=a.a)?a.node:null}function Cc(a){return(a=Bc(a))?nc(a):""}E.prototype.iterator=function(a){return new Dc(this,!!a)};function Dc(a,b){this.f=a;this.b=(this.C=b)?a.b:a.a;this.a=null}Dc.prototype.next=function(){var a=this.b;if(a){var b=this.a=a;this.b=this.C?a.a:a.next;return b.node}return null};function G(a){this.l=a;this.b=this.j=!1;this.f=null}function H(a){return"\n "+a.toString().split("\n").join("\n ")}function Ec(a,b){a.j=b}function Fc(a,b){a.b=b}function I(a,b){a=a.a(b);return a instanceof E?+Cc(a):+a}function J(a,b){a=a.a(b);return a instanceof E?Cc(a):""+a}function Gc(a,b){a=a.a(b);return a instanceof E?!!a.s:!!a};function Hc(a,b,c){G.call(this,a.l);this.c=a;this.g=b;this.m=c;this.j=b.j||c.j;this.b=b.b||c.b;this.c==Ic&&(c.b||c.j||4==c.l||0==c.l||!b.f?b.b||b.j||4==b.l||0==b.l||!c.f||(this.f={name:c.f.name,D:b}):this.f={name:b.f.name,D:c})}p(Hc,G);
function Jc(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof E&&c instanceof E){b=b.iterator();for(d=b.next();d;d=b.next())for(e=c.iterator(),f=e.next();f;f=e.next())if(a(nc(d),nc(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?(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=+nc(k);break;case "boolean":k=!!nc(k);break;case "string":k=nc(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)}Hc.prototype.a=function(a){return this.c.v(this.g,this.m,a)};Hc.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+H(this.g);return a+=H(this.m)};function Kc(a,b,c,d){this.X=a;this.R=b;this.l=c;this.v=d}Kc.prototype.toString=function(){return this.X};var Lc={};
function K(a,b,c,d){if(Lc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Kc(a,b,c,d);return Lc[a.toString()]=a}K("div",6,1,function(a,b,c){return I(a,c)/I(b,c)});K("mod",6,1,function(a,b,c){return I(a,c)%I(b,c)});K("*",6,1,function(a,b,c){return I(a,c)*I(b,c)});K("+",5,1,function(a,b,c){return I(a,c)+I(b,c)});K("-",5,1,function(a,b,c){return I(a,c)-I(b,c)});K("<",4,2,function(a,b,c){return Jc(function(a,b){return a<b},a,b,c)});
K(">",4,2,function(a,b,c){return Jc(function(a,b){return a>b},a,b,c)});K("<=",4,2,function(a,b,c){return Jc(function(a,b){return a<=b},a,b,c)});K(">=",4,2,function(a,b,c){return Jc(function(a,b){return a>=b},a,b,c)});var Ic=K("=",3,2,function(a,b,c){return Jc(function(a,b){return a==b},a,b,c,!0)});K("!=",3,2,function(a,b,c){return Jc(function(a,b){return a!=b},a,b,c,!0)});K("and",2,2,function(a,b,c){return Gc(a,c)&&Gc(b,c)});K("or",1,2,function(a,b,c){return Gc(a,c)||Gc(b,c)});function Mc(a,b){if(b.a.length&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");G.call(this,a.l);this.c=a;this.g=b;this.j=a.j;this.b=a.b}p(Mc,G);Mc.prototype.a=function(a){a=this.c.a(a);return Nc(this.g,a)};Mc.prototype.toString=function(){var a="Filter:"+H(this.c);return a+=H(this.g)};function Oc(a,b){if(b.length<a.O)throw Error("Function "+a.o+" expects at least"+a.O+" arguments, "+b.length+" given");if(null!==a.I&&b.length>a.I)throw Error("Function "+a.o+" expects at most "+a.I+" arguments, "+b.length+" given");a.W&&r(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});G.call(this,a.l);this.G=a;this.c=b;Ec(this,a.j||za(b,function(a){return a.j}));Fc(this,a.V&&!b.length||a.U&&!!b.length||za(b,function(a){return a.b}))}
p(Oc,G);Oc.prototype.a=function(a){return this.G.v.apply(null,Ca(a,this.c))};Oc.prototype.toString=function(){var a="Function: "+this.G;if(this.c.length)var b=ya(this.c,function(a,b){return a+H(b)},"Arguments:"),a=a+H(b);return a};function Pc(a,b,c,d,e,f,g,k,l){this.o=a;this.l=b;this.j=c;this.V=d;this.U=e;this.v=f;this.O=g;this.I=m(k)?k:g;this.W=!!l}Pc.prototype.toString=function(){return this.o};var Qc={};
function L(a,b,c,d,e,f,g,k){if(Qc.hasOwnProperty(a))throw Error("Function already created: "+a+".");Qc[a]=new Pc(a,b,c,d,!1,e,f,g,k)}L("boolean",2,!1,!1,function(a,b){return Gc(b,a)},1);L("ceiling",1,!1,!1,function(a,b){return Math.ceil(I(b,a))},1);L("concat",3,!1,!1,function(a,b){return ya(Da(arguments,1),function(b,d){return b+J(d,a)},"")},2,null);L("contains",2,!1,!1,function(a,b,c){b=J(b,a);a=J(c,a);return-1!=b.indexOf(a)},2);L("count",1,!1,!1,function(a,b){return b.a(a).s},1,1,!0);
L("false",2,!1,!1,function(){return!1},0);L("floor",1,!1,!1,function(a,b){return Math.floor(I(b,a))},1);L("id",4,!1,!1,function(a,b){function c(a){if(ec){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return Ba(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument;a=J(b,a).split(/\s+/);var f=[];r(a,function(a){a=c(a);!a||0<=va(f,a)||f.push(a)});f.sort(Qb);var g=new E;r(f,function(a){F(g,a)});return g},1);
L("lang",2,!1,!1,function(){return!1},1);L("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);L("local-name",3,!1,!0,function(a,b){return(a=b?Bc(b.a(a)):a.a)?a.localName||a.nodeName.toLowerCase():""},0,1,!0);L("name",3,!1,!0,function(a,b){return(a=b?Bc(b.a(a)):a.a)?a.nodeName.toLowerCase():""},0,1,!0);L("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
L("normalize-space",3,!1,!0,function(a,b){return(b?J(b,a):nc(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);L("not",2,!1,!1,function(a,b){return!Gc(b,a)},1);L("number",1,!1,!0,function(a,b){return b?I(b,a):+nc(a.a)},0,1);L("position",1,!0,!1,function(a){return a.b},0);L("round",1,!1,!1,function(a,b){return Math.round(I(b,a))},1);L("starts-with",2,!1,!1,function(a,b,c){b=J(b,a);a=J(c,a);return!b.lastIndexOf(a,0)},2);L("string",3,!1,!0,function(a,b){return b?J(b,a):nc(a.a)},0,1);
L("string-length",1,!1,!0,function(a,b){return(b?J(b,a):nc(a.a)).length},0,1);L("substring",3,!1,!1,function(a,b,c,d){c=I(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?I(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=J(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);L("substring-after",3,!1,!1,function(a,b,c){b=J(b,a);a=J(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
L("substring-before",3,!1,!1,function(a,b,c){b=J(b,a);a=J(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);L("sum",1,!1,!1,function(a,b){a=b.a(a).iterator();b=0;for(var c=a.next();c;c=a.next())b+=+nc(c);return b},1,1,!0);L("translate",3,!1,!1,function(a,b,c,d){b=J(b,a);c=J(c,a);var e=J(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);L("true",2,!1,!1,function(){return!0},0);function vc(a,b){this.g=a;this.c=m(b)?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Rc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}vc.prototype.a=function(a){return null===this.b||this.b==a.nodeType};vc.prototype.f=function(){return this.g};
vc.prototype.toString=function(){var a="Kind Test: "+this.g;null===this.c||(a+=H(this.c));return a};function Sc(a){G.call(this,3);this.c=a.substring(1,a.length-1)}p(Sc,G);Sc.prototype.a=function(){return this.c};Sc.prototype.toString=function(){return"Literal: "+this.c};function sc(a,b){this.o=a.toLowerCase();a="*"==this.o?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():a}sc.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=m(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")};sc.prototype.f=function(){return this.o};
sc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.o};function Tc(a){G.call(this,1);this.c=a}p(Tc,G);Tc.prototype.a=function(){return this.c};Tc.prototype.toString=function(){return"Number: "+this.c};function Uc(a,b){G.call(this,a.l);this.g=a;this.c=b;this.j=a.j;this.b=a.b;1==this.c.length&&(a=this.c[0],a.w||a.c!=Vc||(a=a.m,"*"!=a.f()&&(this.f={name:a.f(),D:null})))}p(Uc,G);function Wc(){G.call(this,4)}p(Wc,G);Wc.prototype.a=function(a){var b=new E;a=a.a;9==a.nodeType?F(b,a):F(b,a.ownerDocument);return b};Wc.prototype.toString=function(){return"Root Helper Expression"};function Xc(){G.call(this,4)}p(Xc,G);Xc.prototype.a=function(a){var b=new E;F(b,a.a);return b};Xc.prototype.toString=function(){return"Context Helper Expression"};
function Yc(a){return"/"==a||"//"==a}Uc.prototype.a=function(a){var b=this.g.a(a);if(!(b instanceof E))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.C);if(e.j||e.c!=Zc)if(e.j||e.c!=$c){var g=f.next();for(b=e.a(new dc(g));g=f.next();)g=e.a(new dc(g)),b=zc(b,g)}else g=f.next(),b=e.a(new dc(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new dc(g))}}return b};
Uc.prototype.toString=function(){var a="Path Expression:"+H(this.g);if(this.c.length){var b=ya(this.c,function(a,b){return a+H(b)},"Steps:");a+=H(b)}return a};function ad(a,b){this.a=a;this.C=!!b}
function Nc(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 l=a.C?f-k:k+1;g=d.a(new dc(g,l,f));if("number"==typeof g)l=l==g;else if("string"==typeof g||"boolean"==typeof g)l=!!g;else if(g instanceof E)l=0<g.s;else throw Error("Predicate.evaluate returned an unexpected type.");if(!l){l=e;g=l.f;var q=l.a;if(!q)throw Error("Next must be called at least once before remove.");var u=q.a,q=q.next;u?u.next=q:g.a=q;q?q.a=u:g.b=u;g.s--;l.a=null}}return b}
ad.prototype.toString=function(){return ya(this.a,function(a,b){return a+H(b)},"Predicates:")};function bd(a,b,c,d){G.call(this,4);this.c=a;this.m=b;this.g=c||new ad([]);this.w=!!d;b=this.g;b=0<b.a.length?b.a[0].f:null;a.Y&&b&&(a=b.name,a=ec?a.toLowerCase():a,this.f={name:a,D:b.D});a:{a=this.g;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.j||1==c.l||0==c.l){a=!0;break a}a=!1}this.j=a}p(bd,G);
bd.prototype.a=function(a){var b=a.a,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.D?J(c.D,a):null,f=1);if(this.w)if(this.j||this.c!=cd)if(b=(new bd(dd,new vc("node"))).a(a).iterator(),c=b.next())for(a=this.v(c,d,e,f);c=b.next();)a=zc(a,this.v(c,d,e,f));else a=new E;else a=pc(this.m,b,d,e),a=Nc(this.g,a,f);else a=this.v(a.a,d,e,f);return a};bd.prototype.v=function(a,b,c,d){a=this.c.G(this.m,a,b,c);return a=Nc(this.g,a,d)};
bd.prototype.toString=function(){var a="Step:"+H("Operator: "+(this.w?"//":"/"));this.c.o&&(a+=H("Axis: "+this.c));a+=H(this.m);if(this.g.a.length){var b=ya(this.g.a,function(a,b){return a+H(b)},"Predicates:");a+=H(b)}return a};function ed(a,b,c,d){this.o=a;this.G=b;this.C=c;this.Y=d}ed.prototype.toString=function(){return this.o};var fd={};function M(a,b,c,d){if(fd.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new ed(a,b,c,!!d);return fd[a]=b}
M("ancestor",function(a,b){for(var c=new E;b=b.parentNode;)a.a(b)&&Ac(c,b);return c},!0);M("ancestor-or-self",function(a,b){var c=new E;do a.a(b)&&Ac(c,b);while(b=b.parentNode);return c},!0);
var Vc=M("attribute",function(a,b){var c=new E,d=a.f();if("style"==d&&ec&&b.style)return F(c,new gc(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof vc&&null===a.b||"*"==d)for(d=0;a=e[d];d++)ec?a.nodeValue&&F(c,hc(b,a)):F(c,a);else(a=e.getNamedItem(d))&&(ec?a.nodeValue&&F(c,hc(b,a)):F(c,a));return c},!1),cd=M("child",function(a,b,c,d,e){return(ec?wc:xc).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new E)},!1,!0);M("descendant",pc,!1,!0);
var dd=M("descendant-or-self",function(a,b,c,d){var e=new E;oc(b,c,d)&&a.a(b)&&F(e,b);return pc(a,b,c,d,e)},!1,!0),Zc=M("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)oc(f,c,d)&&a.a(f)&&F(e,f),e=pc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);M("following-sibling",function(a,b){for(var c=new E;b=b.nextSibling;)a.a(b)&&F(c,b);return c},!1);M("namespace",function(){return new E},!1);
var gd=M("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return F(c,b.ownerElement),c;b=b.parentNode;a.a(b)&&F(c,b);return c},!1),$c=M("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var l=[];for(b=f[g];b=b.previousSibling;)l.unshift(b);for(var q=0,u=l.length;q<u;q++)b=l[q],oc(b,c,d)&&a.a(b)&&F(e,b),e=pc(a,b,c,d,e)}return e},!0,!0);
M("preceding-sibling",function(a,b){for(var c=new E;b=b.previousSibling;)a.a(b)&&Ac(c,b);return c},!0);var hd=M("self",function(a,b){var c=new E;a.a(b)&&F(c,b);return c},!1);function id(a){G.call(this,1);this.c=a;this.j=a.j;this.b=a.b}p(id,G);id.prototype.a=function(a){return-I(this.c,a)};id.prototype.toString=function(){return"Unary Expression: -"+H(this.c)};function jd(a){G.call(this,4);this.c=a;Ec(this,za(this.c,function(a){return a.j}));Fc(this,za(this.c,function(a){return a.b}))}p(jd,G);jd.prototype.a=function(a){var b=new E;r(this.c,function(c){c=c.a(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=zc(b,c)});return b};jd.prototype.toString=function(){return ya(this.c,function(a,b){return a+H(b)},"Union Expression:")};function kd(a,b){this.a=a;this.b=b}function ld(a){for(var b,c=[];;){N(a,"Missing right hand side of binary expression.");b=md(a);var d=a.a.next();if(!d)break;var e=(d=Lc[d]||null)&&d.R;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].R;)b=new Hc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Hc(c.pop(),c.pop(),b);return b}function N(a,b){if(mc(a.a))throw Error(b);}function nd(a,b){a=a.a.next();if(a!=b)throw Error("Bad token, expected: "+b+" got: "+a);}
function od(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function pd(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Sc(a)}
function qd(a){var b=[];if(Yc(D(a.a))){var c=a.a.next();var d=D(a.a);if("/"==c&&(mc(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Wc;d=new Wc;N(a,"Missing next location step.");c=rd(a,c);b.push(c)}else{a:{c=D(a.a);d=c.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();c=ld(a);N(a,'unclosed "("');nd(a,")");break;case '"':case "'":c=pd(a);break;default:if(isNaN(+c))if(!Rc(c)&&/(?![0-9])[\w]/.test(d)&&"("==D(a.a,
1)){c=a.a.next();c=Qc[c]||null;a.a.next();for(d=[];")"!=D(a.a);){N(a,"Missing function argument list.");d.push(ld(a));if(","!=D(a.a))break;a.a.next()}N(a,"Unclosed function argument list.");od(a);c=new Oc(c,d)}else{c=null;break a}else c=new Tc(+a.a.next())}"["==D(a.a)&&(d=new ad(sd(a)),c=new Mc(c,d))}if(c)if(Yc(D(a.a)))d=c;else return c;else c=rd(a,"/"),d=new Xc,b.push(c)}for(;Yc(D(a.a));)c=a.a.next(),N(a,"Missing next location step."),c=rd(a,c),b.push(c);return new Uc(d,b)}
function rd(a,b){if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a)){var c=new bd(hd,new vc("node"));a.a.next();return c}if(".."==D(a.a))return c=new bd(gd,new vc("node")),a.a.next(),c;if("@"==D(a.a)){var d=Vc;a.a.next();N(a,"Missing attribute name")}else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());var e=a.a.next();d=fd[e]||null;if(!d)throw Error("No axis with name: "+e);a.a.next();N(a,"Missing node name")}else d=
cd;e=D(a.a);if(/(?![0-9])[\w\*]/.test(e.charAt(0)))if("("==D(a.a,1)){if(!Rc(e))throw Error("Invalid node type: "+e);e=a.a.next();if(!Rc(e))throw Error("Invalid type name: "+e);nd(a,"(");N(a,"Bad nodetype");var f=D(a.a).charAt(0),g=null;if('"'==f||"'"==f)g=pd(a);N(a,"Bad nodetype");od(a);e=new vc(e,g)}else if(e=a.a.next(),f=e.indexOf(":"),-1==f)e=new sc(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 sc(e,
k)}else throw Error("Bad token: "+a.a.next());a=new ad(sd(a),d.C);return c||new bd(d,e,a,"//"==b)}function sd(a){for(var b=[];"["==D(a.a);){a.a.next();N(a,"Missing predicate expression.");var c=ld(a);b.push(c);N(a,"Unclosed predicate expression.");nd(a,"]")}return b}function md(a){if("-"==D(a.a))return a.a.next(),new id(md(a));var b=qd(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==a.a.next();)N(a,"Missing next union location path."),b.push(qd(a));a.a.a--;a=new jd(b)}return a};function td(a){switch(a.nodeType){case 1:return ma(ud,a);case 9:return td(a.documentElement);case 11:case 10:case 6:case 12:return vd;default:return a.parentNode?td(a.parentNode):vd}}function vd(){return null}function ud(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?ud(a.parentNode,b):null};function wd(a,b){if(!a.length)throw Error("Empty XPath expression.");a=jc(a);if(mc(a))throw Error("Invalid XPath expression.");b?fa(b)||(b=la(b.lookupNamespaceURI,b)):b=function(){return null};var c=ld(new kd(a,b));if(!mc(a))throw Error("Bad token: "+a.next());this.evaluate=function(a,b){a=c.a(new dc(a));return new P(a,b)}}
function P(a,b){if(!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;switch(b){case 2:this.stringValue=a instanceof E?Cc(a):""+a;break;case 1:this.numberValue=a instanceof E?+Cc(a):+a;break;case 3:this.booleanValue=a instanceof E?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 gc?e.a:e);this.snapshotLength=a.s;this.invalidIteratorState=!1;break;case 8:case 9:a=Bc(a);this.singleNodeValue=a instanceof gc?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]}}P.ANY_TYPE=0;P.NUMBER_TYPE=1;P.STRING_TYPE=2;P.BOOLEAN_TYPE=3;P.UNORDERED_NODE_ITERATOR_TYPE=4;P.ORDERED_NODE_ITERATOR_TYPE=5;P.UNORDERED_NODE_SNAPSHOT_TYPE=6;P.ORDERED_NODE_SNAPSHOT_TYPE=7;P.ANY_UNORDERED_NODE_TYPE=8;P.FIRST_ORDERED_NODE_TYPE=9;function xd(a){this.lookupNamespaceURI=td(a)}
function yd(a,b){a=a||aa;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=P,c.evaluate=function(a,b,c,g){return(new wd(a,c)).evaluate(b,g)},c.createExpression=function(a,b){return new wd(a,b)},c.createNSResolver=function(a){return new xd(a)}}ca("wgxpath.install",yd);var Q={};Q.K=function(){var a={aa:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();
Q.v=function(a,b,c){var d=B(a);if(!d.documentElement)return null;(x||pb)&&yd(Nb(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):Q.K;if(x&&!hb(7))return d.evaluate.call(d,b,a,e,c,null);if(!x||ib(9)){for(var f={},g=d.getElementsByTagName("*"),k=0;k<g.length;++k){var l=g[k],q=l.namespaceURI;if(q&&!f[q]){var u=l.lookupPrefix(q);if(!u)var z=q.match(".*/(\\w+)/?$"),u=z?z[1]:"xhtml";f[q]=u}}var O={},Z;for(Z in f)O[f[Z]]=Z;e=function(a){return O[a]||null}}try{return d.evaluate(b,a,
e,c,null)}catch(Ia){if("TypeError"===Ia.name)return e=d.createNSResolver?d.createNSResolver(d.documentElement):Q.K,d.evaluate(b,a,e,c,null);throw Ia;}}catch(Ia){if(!y||"NS_ERROR_ILLEGAL_VALUE"!=Ia.name)throw new t(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+Ia);}};Q.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.");};
Q.A=function(a,b){var c=function(){var c=Q.v(b,a,9);return c?c.singleNodeValue||null:b.selectSingleNode?(c=B(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||Q.L(c,a);return c};
Q.u=function(a,b){var c=function(){var c=Q.v(b,a,7);if(c){for(var e=c.snapshotLength,f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=B(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();r(c,function(b){Q.L(b,a)});return c};function zd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}h=zd.prototype;h.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};h.contains=function(a){return this&&a?a instanceof zd?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};
h.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};h.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};h.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};
h.scale=function(a,b){b=ba(b)?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};function Ad(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}h=Ad.prototype;h.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};h.contains=function(a){return a instanceof Ib?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};
h.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};h.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};h.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};
h.scale=function(a,b){b=ba(b)?b:a;this.left*=a;this.width*=a;this.top*=b;this.height*=b;return this};function Bd(a,b){var c=B(a);return c.defaultView&&c.defaultView.getComputedStyle&&(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""}function Cd(a){a=a?B(a):document;return!x||ib(9)||"CSS1Compat"==Kb(a).a.compatMode?a.documentElement:a.body}
function Dd(a){var b=a.offsetWidth,c=a.offsetHeight,d=A&&!b&&!c;if((!m(b)||d)&&a.getBoundingClientRect){a:{try{var e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}x&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new Jb(e.right-e.left,e.bottom-e.top)}return new Jb(b,c)}var Ed={thin:2,medium:4,thick:6};
function Fd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;if(c in Ed)a=Ed[c];else if(/^\d+px?$/.test(c))a=parseInt(c,10);else{b=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=b;a.runtimeStyle.left=d;a=+c}return a};var Gd="function"===typeof ShadowRoot;function Hd(a){a:{a=B(a);try{var b=a&&a.activeElement;break a}catch(c){}b=null}return x&&b&&"undefined"===typeof b.nodeType?null:b}function Id(a){var b;if(b=Jd(a,!0)&&Kd(a))b=!(x||y&&!wb("1.9.2")?0:"none"==R(a,"pointer-events"));return b}var Ld="A AREA BUTTON INPUT LABEL SELECT TEXTAREA".split(" ");function Md(a){return za(Ld,function(b){return C(a,b)})||null!=Yb(a,"tabindex")&&0<=Number(ac(a,"tabIndex"))||Nd(a)}var Od="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" ");
function Kd(a){return za(Od,function(b){return C(a,b)})?ac(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&C(a,"OPTGROUP")||C(a,"OPTION")?Kd(a.parentNode):!Wb(a,function(a){var b=a.parentNode;if(b&&C(b,"FIELDSET")&&ac(b,"disabled")){if(!C(a,"LEGEND"))return!0;for(;a=m(a.previousElementSibling)?a.previousElementSibling:Ob(a.previousSibling);)if(C(a,"LEGEND"))return!0}return!1},!0):!0}var Pd="text search tel url email password number".split(" ");
function Qd(a){function b(a){return"inherit"==a.contentEditable?(a=Rd(a))?b(a):!1:"true"==a.contentEditable}return m(a.contentEditable)?!x&&m(a.isContentEditable)?a.isContentEditable:b(a):!1}function Nd(a){var b;(b=(C(a,"TEXTAREA")?!0:C(a,"INPUT")?0<=va(Pd,a.type.toLowerCase()):Qd(a)?!0:!1)||(C(a,"INPUT")?"file"==a.type.toLowerCase():!1))||(b=C(a,"INPUT")?"range"==a.type.toLowerCase():!1);return b&&!ac(a,"readOnly")}
function Rd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return C(a)?a:null}
function R(a,b){b=ua(b);if("float"==b||"cssFloat"==b||"styleFloat"==b)b=Fb?"styleFloat":"cssFloat";a=Bd(a,b)||Sd(a,b);if(null===a)a=null;else if(0<=va(Fa,b)){b:{var c=a.match(Ja);if(c){b=Number(c[1]);var d=Number(c[2]),e=Number(c[3]),c=Number(c[4]);if(0<=b&&255>=b&&0<=d&&255>=d&&0<=e&&255>=e&&0<=c&&1>=c){b=[b,d,e,c];break b}}b=null}if(!b)b:{if(e=a.match(Ka))if(b=Number(e[1]),d=Number(e[2]),e=Number(e[3]),0<=b&&255>=b&&0<=d&&255>=d&&0<=e&&255>=e){b=[b,d,e,1];break b}b=null}if(!b)b:{b=a.toLowerCase();
d=Ea[b.toLowerCase()];if(!d&&(d="#"==b.charAt(0)?b:"#"+b,4==d.length&&(d=d.replace(Ga,"#$1$1$2$2$3$3")),!Ha.test(d))){b=null;break b}b=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16),1]}a=b?"rgba("+b.join(", ")+")":a}return a}function Sd(a,b){var c=a.currentStyle||a.style,d=c[b];!m(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?m(d)?d:null:(a=Rd(a))?Sd(a,b):null}
function Td(a,b,c){function d(a){var b=Ud(a);return 0<b.height&&0<b.width?!0:C(a,"PATH")&&(0<b.height||0<b.width)?(a=R(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=R(a,"overflow")&&za(a.childNodes,function(a){return 3==a.nodeType||C(a)&&d(a)})}function e(a){return Vd(a)==Wd&&Aa(a.childNodes,function(a){return!C(a)||e(a)||!d(a)})}if(!C(a))throw Error("Argument to isShown must be of type Element");if(C(a,"BODY"))return!0;if(C(a,"OPTION")||C(a,"OPTGROUP"))return a=Wb(a,function(a){return C(a,"SELECT")}),
!!a&&Td(a,!0,c);var f=Xd(a);if(f)return!!f.M&&0<f.rect.width&&0<f.rect.height&&Td(f.M,b,c);if(C(a,"INPUT")&&"hidden"==a.type.toLowerCase()||C(a,"NOSCRIPT"))return!1;f=R(a,"visibility");return"collapse"!=f&&"hidden"!=f&&c(a)&&(b||Yd(a))&&d(a)?!e(a):!1}
function Jd(a,b){function c(a){if(C(a)&&"none"==R(a,"display"))return!1;var b;(b=a.parentNode)&&b.shadowRoot&&void 0!==a.assignedSlot?b=a.assignedSlot?a.assignedSlot.parentNode:null:a.getDestinationInsertionPoints&&(a=a.getDestinationInsertionPoints(),0<a.length&&(b=a[a.length-1]));if(Gd&&b instanceof ShadowRoot){if(b.host.shadowRoot!==b)return!1;b=b.host}return!b||9!=b.nodeType&&11!=b.nodeType?b&&c(b):!0}return Td(a,!!b,c)}var Wd="hidden";
function Vd(a,b){function c(a){function b(a){return a==g?!0:!R(a,"display").lastIndexOf("inline",0)||"absolute"==c&&"static"==R(a,"position")?!1:!0}var c=R(a,"position");if("fixed"==c)return q=!0,a==g?null:g;for(a=Rd(a);a&&!b(a);)a=Rd(a);return a}function d(a){var b=a;if("visible"==l)if(a==g&&k)b=k;else if(a==k)return{x:"visible",y:"visible"};b={x:R(b,"overflow-x"),y:R(b,"overflow-y")};a==g&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==g){var b=(new Lb(f)).a;
a=Mb(b);b=b.parentWindow||b.defaultView;a=x&&hb("10")&&b.pageYOffset!=a.scrollTop?new Ib(a.scrollLeft,a.scrollTop):new Ib(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Ib(a.scrollLeft,a.scrollTop);return a}b=Zd(a,b);var f=B(a),g=f.documentElement,k=f.body,l=R(g,"overflow"),q;for(a=c(a);a;a=c(a)){var u=d(a);if("visible"!=u.x||"visible"!=u.y){var z=Ud(a);if(!z.width||!z.height)return Wd;var O=b.right<z.left,Z=b.bottom<z.top;if(O&&"hidden"==u.x||Z&&"hidden"==u.y)return Wd;if(O&&
"visible"!=u.x||Z&&"visible"!=u.y){O=e(a);Z=b.bottom<z.top-O.y;if(b.right<z.left-O.x&&"visible"!=u.x||Z&&"visible"!=u.x)return Wd;b=Vd(a);return b==Wd?Wd:"scroll"}O=b.left>=z.left+z.width;z=b.top>=z.top+z.height;if(O&&"hidden"==u.x||z&&"hidden"==u.y)return Wd;if(O&&"visible"!=u.x||z&&"visible"!=u.y){if(q&&(u=e(a),b.left>=g.scrollWidth-u.x||b.right>=g.scrollHeight-u.y))return Wd;b=Vd(a);return b==Wd?Wd:"scroll"}}}return"none"}
function Ud(a){var b=Xd(a);if(b)return b.rect;if(C(a,"HTML"))return a=B(a),a=(Nb(a)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new Jb(a.clientWidth,a.clientHeight),new Ad(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(d){return new Ad(0,0,0,0)}b=new Ad(c.left,c.top,c.right-c.left,c.bottom-c.top);x&&a.ownerDocument.body&&(a=B(a),b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function Xd(a){var b=C(a,"MAP");if(!b&&!C(a,"AREA"))return null;var c=b?a:C(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;c&&c.name&&(d=Q.A('/descendant::*[@usemap = "#'+c.name+'"]',B(c)))&&(e=Ud(d),b||"default"==a.shape.toLowerCase()||(a=$d(a),b=Math.min(Math.max(a.left,0),e.width),c=Math.min(Math.ma