selenium-webdriver 4.43.0 → 4.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,152 @@
1
- function(){return (function(){/*
2
-
3
- Copyright The Closure Library Authors.
4
- Copyright The Closure Compiler Authors.
5
- SPDX-License-Identifier: Apache-2.0
6
- */
7
- var d=this||self;/*
8
-
9
- Copyright The Closure Library Authors.
10
- SPDX-License-Identifier: Apache-2.0
11
- */
12
- var f=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},h=Array.prototype.forEach?function(a,b){Array.prototype.forEach.call(a,b,void 0)}:function(a,b){for(var c=a.length,e=typeof a==="string"?a.split(""):a,g=0;g<c;g++)g in e&&b.call(void 0,e[g],g,a)};function k(a,b){this.code=a;this.g=l[a]||m;this.message=b||"";a=this.g.replace(/((?:^|\s+)[a-z])/g,function(c){return c.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(b<0||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}(function(){function a(){}a.prototype=Error.prototype;k.prototype=new a;k.prototype.constructor=k})();var m="unknown error",l={15:"element not selectable",11:"element not visible"};l[31]=m;l[30]=m;l[24]="invalid cookie domain";
13
- l[29]="invalid element coordinates";l[12]="invalid element state";l[32]="invalid selector";l[51]="invalid selector";l[52]="invalid selector";l[17]="javascript error";l[405]="unsupported operation";l[34]="move target out of bounds";l[27]="no such alert";l[7]="no such element";l[8]="no such frame";l[23]="no such window";l[28]="script timeout";l[33]="session not created";l[10]="stale element reference";l[21]="timeout";l[25]="unable to set cookie";l[26]="unexpected alert open";l[13]=m;l[9]="unknown command";function n(){var a=d.navigator;return a&&(a=a.userAgent)?a:""}function p(a){return n().indexOf(a)!=-1};function q(){return p("Firefox")||p("FxiOS")}function r(){return(p("Chrome")||p("CriOS"))&&!p("Edge")||p("Silk")};function t(){return p("iPhone")&&!p("iPod")&&!p("iPad")};var u=p("Opera"),v=p("Trident")||p("MSIE"),w=p("Edge"),x=p("Gecko")&&!(n().toLowerCase().indexOf("webkit")!=-1&&!p("Edge"))&&!(p("Trident")||p("MSIE"))&&!p("Edge"),y=n().toLowerCase().indexOf("webkit")!=-1&&!p("Edge");function A(){var a=d.document;return a?a.documentMode:void 0}var B;
14
- a:{var C="",D=function(){var a=n();if(x)return/rv:([^\);]+)(\)|;)/.exec(a);if(w)return/Edge\/([\d\.]+)/.exec(a);if(v)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(y)return/WebKit\/(\S+)/.exec(a);if(u)return/(?:Version)[ \/]?(\S+)/.exec(a)}();D&&(C=D?D[1]:"");if(v){var E=A();if(E!=null&&E>parseFloat(C)){B=String(E);break a}}B=C}var F;if(d.document&&v){var G=A();F=G?G:parseInt(B,10)||void 0}else F=void 0;var H=F;var I=q(),J=t()||p("iPod"),K=p("iPad"),L=p("Android")&&!(r()||q()||p("Opera")||p("Silk")),M=r(),N=p("Safari")&&!(r()||p("Coast")||p("Opera")||p("Edge")||p("Edg/")||p("OPR")||q()||p("Silk")||p("Android"))&&!(t()||p("iPad")||p("iPod"));function O(a){return(a=a.exec(n()))?a[1]:""}(function(){if(I)return O(/Firefox\/([0-9.]+)/);if(v||w||u)return B;if(M){if(t()||p("iPad")||p("iPod")||p("Macintosh")){var a=O(/CriOS\/([0-9.]+)/);if(a)return a}return O(/Chrome\/([0-9.]+)/)}if(N&&!(t()||p("iPad")||p("iPod")))return O(/Version\/([0-9.]+)/);if(J||K){if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(n()))return a[1]+"."+a[2]}else if(L)return(a=O(/Android\s+([0-9.]+)/))?a:O(/Version\/([0-9.]+)/);return""})();var P=v&&!(Number(H)>=8),aa=v&&!(Number(H)>=9);var ba={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Q={IMG:" ",BR:"\n"};function R(a,b,c){if(!(a.nodeName in ba))if(a.nodeType==3)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Q)b.push(Q[a.nodeName]);else for(a=a.firstChild;a;)R(a,b,c),a=a.nextSibling};function S(a,b){b=b.toLowerCase();return b=="style"?ca(a.style.cssText):P&&b=="value"&&T(a,"INPUT")?a.value:aa&&a[b]===!0?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var da=RegExp("[;]+(?=(?:(?:[^\"]*\"){2})*[^\"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\\([^()]*\\))*[^()]*$)");
15
- function ca(a){var b=[];h(a.split(da),function(c){var e=c.indexOf(":");e>0&&(c=[c.slice(0,e),c.slice(e+1)],c.length==2&&b.push(c[0].toLowerCase(),":",c[1],";"))});b=b.join("");return b=b.charAt(b.length-1)==";"?b:b+";"}function U(a,b){P&&b=="value"&&T(a,"OPTION")&&S(a,"value")===null?(b=[],R(a,b,!1),a=b.join("")):a=a[b];return a}
16
- function T(a,b){b&&typeof b!=="string"&&(b=b.toString());return a instanceof HTMLFormElement?!!a&&a.nodeType==1&&(!b||"FORM"==b):!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)}function V(a){return T(a,"OPTION")?!0:T(a,"INPUT")?(a=a.type.toLowerCase(),a=="checkbox"||a=="radio"):!1};var ea={"class":"className",readonly:"readOnly"},fa="allowfullscreen allowpaymentrequest allowusermedia async autofocus autoplay checked compact complete controls declare default defaultchecked defaultselected defer disabled ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref nomodule noresize noshade novalidate nowrap open paused playsinline pubdate readonly required reversed scoped seamless seeking selected truespeed typemustmatch willvalidate".split(" ");function W(a,b){var c=null,e=b.toLowerCase();if("style"==e)return(c=a.style)&&typeof c!=="string"&&(c=c.cssText),c;if(("selected"==e||"checked"==e)&&V(a)){if(!V(a))throw new k(15,"Element is not selectable");b="selected";c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return U(a,b)?"true":null}var g=T(a,"A");if(T(a,"IMG")&&e=="src"||g&&e=="href")return(c=S(a,e))&&(c=U(a,e)),c;if("spellcheck"==e){c=S(a,e);if(c!==null){if(c.toLowerCase()=="false")return"false";if(c.toLowerCase()==
17
- "true")return"true"}return U(a,e)+""}g=ea[b]||b;if(f(fa,e)>=0)return(c=S(a,b)!==null||U(a,g))?"true":null;try{var z=U(a,g)}catch(ha){}(e=z==null)||(e=typeof z,e=e=="object"&&z!=null||e=="function");e?c=S(a,b):c=z;return c!=null?c.toString():null}var X=["se_exportedFunctionSymbol"],Y=d;X[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||W===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=W;; return this.se_exportedFunctionSymbol.apply(null,arguments);}).apply(window, arguments);}
1
+ (function (element, attribute) {
2
+ const PROPERTY_ALIASES = {
3
+ 'class': 'className',
4
+ 'readonly': 'readOnly',
5
+ };
6
+ const BOOLEAN_PROPERTIES = new Set([
7
+ 'allowfullscreen',
8
+ 'allowpaymentrequest',
9
+ 'allowusermedia',
10
+ 'async',
11
+ 'autofocus',
12
+ 'autoplay',
13
+ 'checked',
14
+ 'compact',
15
+ 'complete',
16
+ 'controls',
17
+ 'declare',
18
+ 'default',
19
+ 'defaultchecked',
20
+ 'defaultselected',
21
+ 'defer',
22
+ 'disabled',
23
+ 'ended',
24
+ 'formnovalidate',
25
+ 'hidden',
26
+ 'indeterminate',
27
+ 'iscontenteditable',
28
+ 'ismap',
29
+ 'itemscope',
30
+ 'loop',
31
+ 'multiple',
32
+ 'muted',
33
+ 'nohref',
34
+ 'nomodule',
35
+ 'noresize',
36
+ 'noshade',
37
+ 'novalidate',
38
+ 'nowrap',
39
+ 'open',
40
+ 'paused',
41
+ 'playsinline',
42
+ 'pubdate',
43
+ 'readonly',
44
+ 'required',
45
+ 'reversed',
46
+ 'scoped',
47
+ 'seamless',
48
+ 'seeking',
49
+ 'selected',
50
+ 'truespeed',
51
+ 'typemustmatch',
52
+ 'willvalidate',
53
+ ]);
54
+ function getAttribute(element, attributeName) {
55
+ return element.getAttribute(attributeName.toLowerCase());
56
+ }
57
+ function getProperty(element, propertyName) {
58
+ return element[propertyName];
59
+ }
60
+ function isElement(node, tagName) {
61
+ const elem = node;
62
+ if (!elem || elem.nodeType !== 1) {
63
+ return false;
64
+ }
65
+ if (!tagName) {
66
+ return true;
67
+ }
68
+ const normalizedTag = tagName.toUpperCase();
69
+ if (node instanceof HTMLFormElement) {
70
+ return normalizedTag === 'FORM';
71
+ }
72
+ return typeof elem.tagName === 'string' && elem.tagName.toUpperCase() === normalizedTag;
73
+ }
74
+ function isSelectable(element) {
75
+ if (isElement(element, 'OPTION')) {
76
+ return true;
77
+ }
78
+ if (isElement(element, 'INPUT')) {
79
+ const type = element.type.toLowerCase();
80
+ return type === 'checkbox' || type === 'radio';
81
+ }
82
+ return false;
83
+ }
84
+ function isSelected(element) {
85
+ var _a;
86
+ if (isElement(element, 'OPTION')) {
87
+ return element.selected;
88
+ }
89
+ const type = (_a = element.type) === null || _a === void 0 ? void 0 : _a.toLowerCase();
90
+ if (type === 'checkbox' || type === 'radio') {
91
+ return element.checked;
92
+ }
93
+ return false;
94
+ }
95
+ function isObject(value) {
96
+ return value !== null && (typeof value === 'object' || typeof value === 'function');
97
+ }
98
+ const name = attribute.toLowerCase();
99
+ if (name === 'style') {
100
+ const style = element.style;
101
+ if (!style) {
102
+ return null;
103
+ }
104
+ return typeof style === 'string' ? style : style.cssText;
105
+ }
106
+ if ((name === 'selected' || name === 'checked') && isSelectable(element)) {
107
+ return isSelected(element) ? 'true' : null;
108
+ }
109
+ const isLink = isElement(element, 'A');
110
+ const isImg = isElement(element, 'IMG');
111
+ if ((isImg && name === 'src') || (isLink && name === 'href')) {
112
+ const attrValue = getAttribute(element, name);
113
+ if (attrValue) {
114
+ return String(getProperty(element, name));
115
+ }
116
+ return attrValue;
117
+ }
118
+ if (name === 'spellcheck') {
119
+ const attrValue = getAttribute(element, name);
120
+ if (attrValue !== null) {
121
+ const lower = attrValue.toLowerCase();
122
+ if (lower === 'false') {
123
+ return 'false';
124
+ }
125
+ if (lower === 'true') {
126
+ return 'true';
127
+ }
128
+ }
129
+ return String(getProperty(element, name));
130
+ }
131
+ const propName = PROPERTY_ALIASES[name] || attribute;
132
+ if (BOOLEAN_PROPERTIES.has(name)) {
133
+ const hasAttr = element.getAttribute(name) !== null;
134
+ const propValue = getProperty(element, propName);
135
+ return hasAttr || !!propValue ? 'true' : null;
136
+ }
137
+ if (name === 'value' && isElement(element, 'LI')) {
138
+ const attrValue = element.getAttribute(name);
139
+ return attrValue != null ? attrValue : null;
140
+ }
141
+ let property;
142
+ try {
143
+ property = getProperty(element, propName);
144
+ }
145
+ catch (_e) {
146
+ }
147
+ if (property == null || isObject(property)) {
148
+ const attrValue = element.getAttribute(name);
149
+ return attrValue != null ? attrValue : null;
150
+ }
151
+ return property != null ? String(property) : null;
152
+ })
@@ -1,39 +1,385 @@
1
- function(){return (function(){/*
2
-
3
- Copyright The Closure Library Authors.
4
- Copyright The Closure Compiler Authors.
5
- SPDX-License-Identifier: Apache-2.0
6
- */
7
- var aa=aa||{},g=this||self;/*
8
-
9
- Copyright The Closure Library Authors.
10
- SPDX-License-Identifier: Apache-2.0
11
- */
12
- var ca=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},da=Array.prototype.some?function(a,b){return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var c=a.length,e=typeof a==="string"?a.split(""):a,d=0;d<c;d++)if(d in e&&b.call(void 0,e[d],d,a))return!0;return!1},ea=Array.prototype.every?function(a,
13
- b){return Array.prototype.every.call(a,b,void 0)}:function(a,b){for(var c=a.length,e=typeof a==="string"?a.split(""):a,d=0;d<c;d++)if(d in e&&!b.call(void 0,e[d],d,a))return!1;return!0};var fa={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",
14
- 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",
15
- 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",
16
- 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",
17
- 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",
18
- 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 ha="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),ia=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,ja=/^#(?:[0-9a-f]{3}){1,2}$/i,ka=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,la=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function m(a,b){this.code=a;this.g=p[a]||q;this.message=b||"";a=this.g.replace(/((?:^|\s+)[a-z])/g,function(c){return c.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(b<0||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}(function(){function a(){}a.prototype=Error.prototype;m.prototype=new a;m.prototype.constructor=m})();var q="unknown error",p={15:"element not selectable",11:"element not visible"};p[31]=q;p[30]=q;p[24]="invalid cookie domain";
19
- p[29]="invalid element coordinates";p[12]="invalid element state";p[32]="invalid selector";p[51]="invalid selector";p[52]="invalid selector";p[17]="javascript error";p[405]="unsupported operation";p[34]="move target out of bounds";p[27]="no such alert";p[7]="no such element";p[8]="no such frame";p[23]="no such window";p[28]="script timeout";p[33]="session not created";p[10]="stale element reference";p[21]="timeout";p[25]="unable to set cookie";p[26]="unexpected alert open";p[13]=q;p[9]="unknown command";var u=aa.i&&String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};
20
- function ma(a){var b=0;a=u(String(a)).split(".");for(var c=u("8").split("."),e=Math.max(a.length,c.length),d=0;b==0&&d<e;d++){var f=a[d]||"",h=c[d]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(f[0].length==0&&h[0].length==0)break;b=w(f[1].length==0?0:parseInt(f[1],10),h[1].length==0?0:parseInt(h[1],10))||w(f[2].length==0,h[2].length==0)||w(f[2],h[2]);f=f[3];h=h[3]}while(b==0)}return b}function w(a,b){return a<b?-1:a>b?1:0};function x(){var a=g.navigator;return a&&(a=a.userAgent)?a:""}function y(a){return x().indexOf(a)!=-1};function A(){return y("Firefox")||y("FxiOS")}function B(){return(y("Chrome")||y("CriOS"))&&!y("Edge")||y("Silk")};function na(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})};function C(){return y("iPhone")&&!y("iPod")&&!y("iPad")};function ra(a){var b=sa;return Object.prototype.hasOwnProperty.call(b,8)?b[8]:b[8]=a(8)};var ta=y("Opera"),D=y("Trident")||y("MSIE"),ua=y("Edge"),va=y("Gecko")&&!(x().toLowerCase().indexOf("webkit")!=-1&&!y("Edge"))&&!(y("Trident")||y("MSIE"))&&!y("Edge"),wa=x().toLowerCase().indexOf("webkit")!=-1&&!y("Edge");function xa(){var a=g.document;return a?a.documentMode:void 0}var E;
21
- a:{var F="",G=function(){var a=x();if(va)return/rv:([^\);]+)(\)|;)/.exec(a);if(ua)return/Edge\/([\d\.]+)/.exec(a);if(D)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(wa)return/WebKit\/(\S+)/.exec(a);if(ta)return/(?:Version)[ \/]?(\S+)/.exec(a)}();G&&(F=G?G[1]:"");if(D){var H=xa();if(H!=null&&H>parseFloat(F)){E=String(H);break a}}E=F}var sa={};function ya(){return ra(function(){return ma(E)>=0})}var I;if(g.document&&D){var za=xa();I=za?za:parseInt(E,10)||void 0}else I=void 0;var Aa=I;var Ba=A(),Ca=C()||y("iPod"),Da=y("iPad"),Ea=y("Android")&&!(B()||A()||y("Opera")||y("Silk")),Fa=B(),Ga=y("Safari")&&!(B()||y("Coast")||y("Opera")||y("Edge")||y("Edg/")||y("OPR")||A()||y("Silk")||y("Android"))&&!(C()||y("iPad")||y("iPod"));function J(a){return(a=a.exec(x()))?a[1]:""}(function(){if(Ba)return J(/Firefox\/([0-9.]+)/);if(D||ua||ta)return E;if(Fa){if(C()||y("iPad")||y("iPod")||y("Macintosh")){var a=J(/CriOS\/([0-9.]+)/);if(a)return a}return J(/Chrome\/([0-9.]+)/)}if(Ga&&!(C()||y("iPad")||y("iPod")))return J(/Version\/([0-9.]+)/);if(Ca||Da){if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x()))return a[1]+"."+a[2]}else if(Ea)return(a=J(/Android\s+([0-9.]+)/))?a:J(/Version\/([0-9.]+)/);return""})();var K;if(K=D)K=!(Number(Aa)>=9);var Ha=K;function L(a,b){this.x=a!==void 0?a:0;this.y=b!==void 0?b:0}L.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};L.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};L.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function M(a,b){this.width=a;this.height=b}M.prototype.aspectRatio=function(){return this.width/this.height};M.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};M.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};M.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function N(a){return a.nodeType==9?a:a.ownerDocument||a.document}function Ia(a,b){a&&(a=a.parentNode);for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function Ja(a){this.g=a||g.document||document};function O(a,b){b&&typeof b!=="string"&&(b=b.toString());return a instanceof HTMLFormElement?!!a&&a.nodeType==1&&(!b||"FORM"==b):!!a&&a.nodeType==1&&(!b||a.tagName.toUpperCase()==b)};function Q(a,b,c,e){this.top=a;this.g=b;this.h=c;this.left=e}Q.prototype.ceil=function(){this.top=Math.ceil(this.top);this.g=Math.ceil(this.g);this.h=Math.ceil(this.h);this.left=Math.ceil(this.left);return this};Q.prototype.floor=function(){this.top=Math.floor(this.top);this.g=Math.floor(this.g);this.h=Math.floor(this.h);this.left=Math.floor(this.left);return this};
22
- Q.prototype.round=function(){this.top=Math.round(this.top);this.g=Math.round(this.g);this.h=Math.round(this.h);this.left=Math.round(this.left);return this};function R(a,b,c,e){this.left=a;this.top=b;this.width=c;this.height=e}R.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};R.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
23
- R.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var Ka=typeof ShadowRoot==="function";function S(a){for(a=a.parentNode;a&&a.nodeType!=1&&a.nodeType!=9&&a.nodeType!=11;)a=a.parentNode;return O(a)?a:null}
24
- function T(a,b){b=na(b);if(b=="float"||b=="cssFloat"||b=="styleFloat")b=Ha?"styleFloat":"cssFloat";a:{var c=b;var e=N(a);if(e.defaultView&&e.defaultView.getComputedStyle&&(e=e.defaultView.getComputedStyle(a,null))){c=e[c]||e.getPropertyValue(c)||"";break a}c=""}a=c||La(a,b);if(a===null)a=null;else if(ca(ha,b)>=0){b:{var d=a.match(ka);if(d&&(b=Number(d[1]),c=Number(d[2]),e=Number(d[3]),d=Number(d[4]),b>=0&&b<=255&&c>=0&&c<=255&&e>=0&&e<=255&&d>=0&&d<=1)){b=[b,c,e,d];break b}b=null}if(!b)b:{if(e=a.match(la))if(b=
25
- Number(e[1]),c=Number(e[2]),e=Number(e[3]),b>=0&&b<=255&&c>=0&&c<=255&&e>=0&&e<=255){b=[b,c,e,1];break b}b=null}if(!b)b:{b=a.toLowerCase();c=fa[b.toLowerCase()];if(!c&&(c=b.charAt(0)=="#"?b:"#"+b,c.length==4&&(c=c.replace(ia,"#$1$1$2$2$3$3")),!ja.test(c))){b=null;break b}b=[parseInt(c.substr(1,2),16),parseInt(c.substr(3,2),16),parseInt(c.substr(5,2),16),1]}a=b?"rgba("+b.join(", ")+")":a}return a}
26
- function La(a,b){var c=a.currentStyle||a.style,e=c[b];e===void 0&&typeof c.getPropertyValue==="function"&&(e=c.getPropertyValue(b));return e!="inherit"?e!==void 0?e:null:(a=S(a))?La(a,b):null}
27
- function U(a,b,c){function e(h){var n=V(h);if(n.height>0&&n.width>0)return!0;if(O(h,"PATH")&&(n.height>0||n.width>0))return h=T(h,"stroke-width"),!!h&&parseInt(h,10)>0;n=T(h,"visibility");return n!="collapse"&&n!="hidden"&&c(h)?T(h,"overflow")!="hidden"&&da(h.childNodes,function(v){return v.nodeType==3?(v=v.nodeValue,/^[\s]*$/.test(v)&&/[\n\r\t]/.test(v)?!1:!0):O(v)&&e(v)}):!1}function d(h){return Ma(h)==W&&ea(h.childNodes,function(n){return!O(n)||d(n)||!e(n)})}if(!O(a))throw Error("Argument to isShown must be of type Element");
28
- if(O(a,"BODY"))return!0;if(O(a,"OPTION")||O(a,"OPTGROUP"))return a=Ia(a,function(h){return O(h,"SELECT")}),!!a&&U(a,!0,c);var f=Na(a);if(f)return!!f.image&&f.rect.width>0&&f.rect.height>0&&U(f.image,b,c);if(O(a,"INPUT")&&a.type.toLowerCase()=="hidden"||O(a,"NOSCRIPT"))return!1;f=T(a,"visibility");return f!="collapse"&&f!="hidden"&&c(a)&&(b||Oa(a)!=0)&&e(a)?!d(a):!1}var W="hidden";
29
- function Ma(a){function b(k){function l(ba){if(ba==h)return!0;var oa=T(ba,"display");return oa.lastIndexOf("inline",0)==0||oa=="contents"||pa=="absolute"&&T(ba,"position")=="static"?!1:!0}var pa=T(k,"position");if(pa=="fixed")return qa=!0,k==h?null:h;for(k=S(k);k&&!l(k);)k=S(k);return k}function c(k){var l=k;if(v=="visible")if(k==h&&n)l=n;else if(k==n)return{x:"visible",y:"visible"};l={x:T(l,"overflow-x"),y:T(l,"overflow-y")};k==h&&(l.x=l.x=="visible"?"auto":l.x,l.y=l.y=="visible"?"auto":l.y);return l}
30
- function e(k){if(k==h){var l=(new Ja(f)).g;k=l.scrollingElement?l.scrollingElement:wa||l.compatMode!="CSS1Compat"?l.body||l.documentElement:l.documentElement;l=l.parentWindow||l.defaultView;k=D&&l.pageYOffset!=k.scrollTop?new L(k.scrollLeft,k.scrollTop):new L(l.pageXOffset||k.scrollLeft,l.pageYOffset||k.scrollTop)}else k=new L(k.scrollLeft,k.scrollTop);return k}var d=Pa(a),f=N(a),h=f.documentElement,n=f.body,v=T(h,"overflow"),qa;for(a=b(a);a;a=b(a)){var r=c(a);if(r.x!="visible"||r.y!="visible"){var t=
31
- V(a);if(t.width==0||t.height==0)return W;var z=d.g<t.left,P=d.h<t.top;if(z&&r.x=="hidden"||P&&r.y=="hidden")return W;if(z&&r.x!="visible"||P&&r.y!="visible"){z=e(a);P=d.h<t.top-z.y;if(d.g<t.left-z.x&&r.x!="visible"||P&&r.x!="visible")return W;d=Ma(a);return d==W?W:"scroll"}z=d.left>=t.left+t.width;t=d.top>=t.top+t.height;if(z&&r.x=="hidden"||t&&r.y=="hidden")return W;if(z&&r.x!="visible"||t&&r.y!="visible"){if(qa&&(r=e(a),d.left>=h.scrollWidth-r.x||d.g>=h.scrollHeight-r.y))return W;d=Ma(a);return d==
32
- W?W:"scroll"}}}return"none"}
33
- function V(a){var b=Na(a);if(b)return b.rect;if(O(a,"HTML"))return a=N(a),a=((a?a.parentWindow||a.defaultView:window)||window).document,a=a.compatMode=="CSS1Compat"?a.documentElement:a.body,a=new M(a.clientWidth,a.clientHeight),new R(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(e){return new R(0,0,0,0)}b=new R(c.left,c.top,c.right-c.left,c.bottom-c.top);D&&a.ownerDocument.body&&(a=N(a),b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);
34
- return b}
35
- function Na(a){var b=O(a,"MAP");if(!b&&!O(a,"AREA"))return null;var c=b?a:O(a.parentNode,"MAP")?a.parentNode:null,e=null,d=null;if(c&&c.name){e='*[usemap="#'+c.name+'"]';c=N(c);var f;if(f=typeof c.querySelector!=="function"&&D&&(D?ma(Aa)>=0:ya())){f=c.querySelector;var h=typeof f;f=!(h=="object"&&f!=null||h=="function")}if(f)throw Error("CSS selection is not supported");if(!e)throw new m(32,"No selector specified");e=u(e);try{var n=c.querySelector(e)}catch(v){throw new m(32,"An invalid or illegal selector was specified");}if(e=
36
- n&&n.nodeType==1?n:null)d=V(e),b||a.shape.toLowerCase()=="default"||(a=Qa(a),b=Math.min(Math.max(a.left,0),d.width),n=Math.min(Math.max(a.top,0),d.height),d=new R(b+d.left,n+d.top,Math.min(a.width,d.width-b),Math.min(a.height,d.height-n)))}return{image:e,rect:d||new R(0,0,0,0)}}
37
- function Qa(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if(b=="rect"&&a.length==4){b=a[0];var c=a[1];return new R(b,c,a[2]-b,a[3]-c)}if(b=="circle"&&a.length==3)return b=a[2],new R(a[0]-b,a[1]-b,2*b,2*b);if(b=="poly"&&a.length>2){b=a[0];c=a[1];for(var e=b,d=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),e=Math.max(e,a[f]),c=Math.min(c,a[f+1]),d=Math.max(d,a[f+1]);return new R(b,c,e-b,d-c)}return new R(0,0,0,0)}function Pa(a){a=V(a);return new Q(a.top,a.left+a.width,a.top+a.height,a.left)}
38
- function Oa(a){if(Ha){if(T(a,"position")=="relative")return 1;a=T(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Ra(a)}function Ra(a){var b=1,c=T(a,"opacity");c&&(b=Number(c));(a=S(a))&&(b*=Ra(a));return b};function Sa(a,b){function c(e){if(O(e)&&(T(e,"display")=="none"||T(e,"content-visibility")=="hidden"))return!1;var d;if((d=e.parentNode)&&d.shadowRoot&&e.assignedSlot!==void 0)d=e.assignedSlot?e.assignedSlot.parentNode:null;else if(e.getDestinationInsertionPoints){var f=e.getDestinationInsertionPoints();f.length>0&&(d=f[f.length-1])}if(Ka&&d instanceof ShadowRoot){if(d.host.shadowRoot&&d.host.shadowRoot!==d)return!1;d=d.host}return!d||d.nodeType!=9&&d.nodeType!=11?d&&O(d,"DETAILS")&&!d.open&&!O(e,
39
- "SUMMARY")?!1:!!d&&c(d):!0}return U(a,!!b,c)}var X=["se_exportedFunctionSymbol"],Y=g;X[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||Sa===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=Sa;; return this.se_exportedFunctionSymbol.apply(null,arguments);}).apply(window, arguments);}
1
+ (function isShownElement(elem, optIgnoreOpacity) {
2
+ var tagNameDescriptor = Object.getOwnPropertyDescriptor(Element.prototype, 'tagName');
3
+ var computedStyleCache = new Map();
4
+ var clientRectCache = new Map();
5
+ var displayedCache = new Map();
6
+ function toUpperCaseTag(tagName) {
7
+ return tagName ? tagName.toUpperCase() : undefined;
8
+ }
9
+ function isElement(node, tagName) {
10
+ if (!node || node.nodeType !== 1) {
11
+ return false;
12
+ }
13
+ var asElement = node;
14
+ var rawTagName = tagNameDescriptor && typeof tagNameDescriptor.get === 'function'
15
+ ? tagNameDescriptor.get.call(asElement)
16
+ : asElement.tagName;
17
+ var upperTagName = typeof rawTagName === 'string' ? rawTagName.toUpperCase() : '';
18
+ var normalizedTagName = toUpperCaseTag(tagName);
19
+ if (upperTagName === 'FORM') {
20
+ return !normalizedTagName || normalizedTagName === 'FORM';
21
+ }
22
+ return !!upperTagName && (!normalizedTagName || upperTagName === normalizedTagName);
23
+ }
24
+ function getParentElement(node) {
25
+ var current = node.parentNode;
26
+ while (current &&
27
+ current.nodeType !== Node.ELEMENT_NODE &&
28
+ current.nodeType !== Node.DOCUMENT_NODE &&
29
+ current.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {
30
+ current = current.parentNode;
31
+ }
32
+ return current && current.nodeType === 1 ? current : null;
33
+ }
34
+ function getEffectiveStyle(elem, propertyName) {
35
+ var computed = computedStyleCache.get(elem);
36
+ if (computed === undefined) {
37
+ var win = elem.ownerDocument.defaultView;
38
+ computed = win ? (win.getComputedStyle(elem) || null) : null;
39
+ computedStyleCache.set(elem, computed);
40
+ }
41
+ if (!computed) {
42
+ return null;
43
+ }
44
+ var value = computed.getPropertyValue(propertyName);
45
+ return value || null;
46
+ }
47
+ function getOpacity(elem) {
48
+ var opacityStyle = getEffectiveStyle(elem, 'opacity');
49
+ var opacity = opacityStyle ? Number(opacityStyle) : 1;
50
+ var parent = getParentElement(elem);
51
+ return parent ? opacity * getOpacity(parent) : opacity;
52
+ }
53
+ function getParentNodeInComposedDom(node) {
54
+ var parent = node.parentNode;
55
+ var slottable = node;
56
+ var parentWithShadow = parent;
57
+ if (parentWithShadow && parentWithShadow.shadowRoot && slottable.assignedSlot !== undefined) {
58
+ return slottable.assignedSlot ? slottable.assignedSlot.parentNode : null;
59
+ }
60
+ return parent;
61
+ }
62
+ function createRect(left, top, width, height) {
63
+ return {
64
+ left: left,
65
+ top: top,
66
+ right: left + width,
67
+ bottom: top + height,
68
+ width: width,
69
+ height: height,
70
+ };
71
+ }
72
+ function getClientRect(elem) {
73
+ var cachedRect = clientRectCache.get(elem);
74
+ if (cachedRect) {
75
+ return cachedRect;
76
+ }
77
+ var rect;
78
+ var imageMap = maybeFindImageMap(elem);
79
+ if (imageMap) {
80
+ rect = imageMap.rect;
81
+ }
82
+ else {
83
+ var elemTagName = typeof elem.tagName === 'string' ? elem.tagName : '';
84
+ if (elemTagName.toUpperCase() === 'HTML') {
85
+ var doc = elem.ownerDocument;
86
+ var sizeElem = doc.compatMode === 'CSS1Compat' ? doc.documentElement : (doc.body || doc.documentElement);
87
+ rect = createRect(0, 0, sizeElem.clientWidth, sizeElem.clientHeight);
88
+ }
89
+ else {
90
+ try {
91
+ var nativeRect = elem.getBoundingClientRect();
92
+ rect = {
93
+ left: nativeRect.left,
94
+ top: nativeRect.top,
95
+ right: nativeRect.right,
96
+ bottom: nativeRect.bottom,
97
+ width: nativeRect.right - nativeRect.left,
98
+ height: nativeRect.bottom - nativeRect.top,
99
+ };
100
+ }
101
+ catch (_error) {
102
+ rect = createRect(0, 0, 0, 0);
103
+ }
104
+ }
105
+ }
106
+ clientRectCache.set(elem, rect);
107
+ return rect;
108
+ }
109
+ function getAreaRelativeRect(area) {
110
+ var shape = area.shape.toLowerCase();
111
+ var coords = area.coords.split(',').map(function (value) {
112
+ return Number(value.trim());
113
+ });
114
+ if (shape === 'rect' && coords.length === 4) {
115
+ return createRect(coords[0], coords[1], coords[2] - coords[0], coords[3] - coords[1]);
116
+ }
117
+ if (shape === 'circle' && coords.length === 3) {
118
+ return createRect(coords[0] - coords[2], coords[1] - coords[2], coords[2] * 2, coords[2] * 2);
119
+ }
120
+ if (shape === 'poly' && coords.length > 2) {
121
+ var minX = coords[0];
122
+ var minY = coords[1];
123
+ var maxX = minX;
124
+ var maxY = minY;
125
+ for (var index = 2; index + 1 < coords.length; index += 2) {
126
+ minX = Math.min(minX, coords[index]);
127
+ maxX = Math.max(maxX, coords[index]);
128
+ minY = Math.min(minY, coords[index + 1]);
129
+ maxY = Math.max(maxY, coords[index + 1]);
130
+ }
131
+ return createRect(minX, minY, maxX - minX, maxY - minY);
132
+ }
133
+ return createRect(0, 0, 0, 0);
134
+ }
135
+ function findImageUsingMap(mapName, doc) {
136
+ return doc.querySelector('[usemap="#' + mapName.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"]');
137
+ }
138
+ function maybeFindImageMap(elem) {
139
+ var isMap = isElement(elem, 'MAP');
140
+ if (!isMap && !isElement(elem, 'AREA')) {
141
+ return null;
142
+ }
143
+ var map = isMap ? elem : isElement(elem.parentNode, 'MAP') ? elem.parentNode : null;
144
+ var image = null;
145
+ var rect = createRect(0, 0, 0, 0);
146
+ if (isElement(map, 'MAP') && map.name) {
147
+ image = findImageUsingMap(map.name, map.ownerDocument);
148
+ if (image) {
149
+ rect = getClientRect(image);
150
+ if (!isMap && isElement(elem, 'AREA') && elem.shape.toLowerCase() !== 'default') {
151
+ var relativeRect = getAreaRelativeRect(elem);
152
+ var relativeX = Math.min(Math.max(relativeRect.left, 0), rect.width);
153
+ var relativeY = Math.min(Math.max(relativeRect.top, 0), rect.height);
154
+ var width = Math.min(relativeRect.width, rect.width - relativeX);
155
+ var height = Math.min(relativeRect.height, rect.height - relativeY);
156
+ rect = createRect(relativeX + rect.left, relativeY + rect.top, width, height);
157
+ }
158
+ }
159
+ }
160
+ return { image: image, rect: rect };
161
+ }
162
+ function getClientRegion(elem) {
163
+ return getClientRect(elem);
164
+ }
165
+ function getOverflowState(elem) {
166
+ var region = getClientRegion(elem);
167
+ var ownerDoc = elem.ownerDocument;
168
+ var htmlElem = ownerDoc.documentElement;
169
+ var bodyElem = ownerDoc.body;
170
+ var htmlOverflowStyle = getEffectiveStyle(htmlElem, 'overflow') || 'visible';
171
+ var treatAsFixedPosition = false;
172
+ function canBeOverflowed(container, position) {
173
+ if (container === htmlElem) {
174
+ return true;
175
+ }
176
+ var display = getEffectiveStyle(container, 'display') || '';
177
+ if (display.indexOf('inline') === 0 || display === 'contents') {
178
+ return false;
179
+ }
180
+ if (position === 'absolute' && getEffectiveStyle(container, 'position') === 'static') {
181
+ return false;
182
+ }
183
+ return true;
184
+ }
185
+ function getOverflowParent(current) {
186
+ var position = getEffectiveStyle(current, 'position');
187
+ if (position === 'fixed') {
188
+ treatAsFixedPosition = true;
189
+ return current === htmlElem ? null : htmlElem;
190
+ }
191
+ var parent = getParentElement(current);
192
+ while (parent && !canBeOverflowed(parent, position)) {
193
+ parent = getParentElement(parent);
194
+ }
195
+ return parent;
196
+ }
197
+ function getOverflowStyles(current) {
198
+ var overflowElem = current;
199
+ if (htmlOverflowStyle === 'visible') {
200
+ if (current === htmlElem && bodyElem) {
201
+ overflowElem = bodyElem;
202
+ }
203
+ else if (current === bodyElem) {
204
+ return { x: 'visible', y: 'visible' };
205
+ }
206
+ }
207
+ var overflow = {
208
+ x: getEffectiveStyle(overflowElem, 'overflow-x') || 'visible',
209
+ y: getEffectiveStyle(overflowElem, 'overflow-y') || 'visible',
210
+ };
211
+ if (current === htmlElem) {
212
+ overflow.x = overflow.x === 'visible' ? 'auto' : overflow.x;
213
+ overflow.y = overflow.y === 'visible' ? 'auto' : overflow.y;
214
+ }
215
+ return overflow;
216
+ }
217
+ function getScroll(current) {
218
+ if (current === htmlElem) {
219
+ return {
220
+ x: ownerDoc.defaultView ? ownerDoc.defaultView.pageXOffset : 0,
221
+ y: ownerDoc.defaultView ? ownerDoc.defaultView.pageYOffset : 0,
222
+ };
223
+ }
224
+ return { x: current.scrollLeft, y: current.scrollTop };
225
+ }
226
+ for (var container = getOverflowParent(elem); container; container = getOverflowParent(container)) {
227
+ var containerOverflow = getOverflowStyles(container);
228
+ if (containerOverflow.x === 'visible' && containerOverflow.y === 'visible') {
229
+ continue;
230
+ }
231
+ var containerRect = getClientRect(container);
232
+ if (containerRect.width === 0 || containerRect.height === 0) {
233
+ return 'hidden';
234
+ }
235
+ var underflowsX = region.right < containerRect.left;
236
+ var underflowsY = region.bottom < containerRect.top;
237
+ if ((underflowsX && containerOverflow.x === 'hidden') || (underflowsY && containerOverflow.y === 'hidden')) {
238
+ return 'hidden';
239
+ }
240
+ if ((underflowsX && containerOverflow.x !== 'visible') || (underflowsY && containerOverflow.y !== 'visible')) {
241
+ var containerScroll = getScroll(container);
242
+ var unscrollableX = region.right < containerRect.left - containerScroll.x;
243
+ var unscrollableY = region.bottom < containerRect.top - containerScroll.y;
244
+ if ((unscrollableX && containerOverflow.x !== 'visible') || (unscrollableY && containerOverflow.y !== 'visible')) {
245
+ return 'hidden';
246
+ }
247
+ var containerUnderflowState = getOverflowState(container);
248
+ return containerUnderflowState === 'hidden' ? 'hidden' : 'scroll';
249
+ }
250
+ var overflowsX = region.left >= containerRect.left + containerRect.width;
251
+ var overflowsY = region.top >= containerRect.top + containerRect.height;
252
+ if ((overflowsX && containerOverflow.x === 'hidden') || (overflowsY && containerOverflow.y === 'hidden')) {
253
+ return 'hidden';
254
+ }
255
+ if ((overflowsX && containerOverflow.x !== 'visible') || (overflowsY && containerOverflow.y !== 'visible')) {
256
+ if (treatAsFixedPosition) {
257
+ var docScroll = getScroll(container);
258
+ if (region.left >= htmlElem.scrollWidth - docScroll.x || region.right >= htmlElem.scrollHeight - docScroll.y) {
259
+ return 'hidden';
260
+ }
261
+ }
262
+ var containerOverflowState = getOverflowState(container);
263
+ return containerOverflowState === 'hidden' ? 'hidden' : 'scroll';
264
+ }
265
+ }
266
+ return 'none';
267
+ }
268
+ function isShownInternal(elem, ignoreOpacity, displayedFn) {
269
+ if (!isElement(elem)) {
270
+ throw new Error('Argument to isShown must be of type Element');
271
+ }
272
+ if (isElement(elem, 'BODY')) {
273
+ return true;
274
+ }
275
+ if (isElement(elem, 'OPTION') || isElement(elem, 'OPTGROUP')) {
276
+ var select = elem.closest('select');
277
+ return !!select && isShownInternal(select, true, displayedFn);
278
+ }
279
+ var imageMap = maybeFindImageMap(elem);
280
+ if (imageMap) {
281
+ return !!imageMap.image && imageMap.rect.width > 0 && imageMap.rect.height > 0 &&
282
+ isShownInternal(imageMap.image, ignoreOpacity, displayedFn);
283
+ }
284
+ if (isElement(elem, 'INPUT') && elem.type.toLowerCase() === 'hidden') {
285
+ return false;
286
+ }
287
+ if (isElement(elem, 'NOSCRIPT')) {
288
+ return false;
289
+ }
290
+ var visibility = getEffectiveStyle(elem, 'visibility');
291
+ if (visibility === 'collapse' || visibility === 'hidden') {
292
+ return false;
293
+ }
294
+ if (!displayedFn(elem)) {
295
+ return false;
296
+ }
297
+ if (!ignoreOpacity && getOpacity(elem) === 0) {
298
+ return false;
299
+ }
300
+ function positiveSize(element) {
301
+ var rect = getClientRect(element);
302
+ if (rect.height > 0 && rect.width > 0) {
303
+ return true;
304
+ }
305
+ if (isElement(element, 'PATH') && (rect.height > 0 || rect.width > 0)) {
306
+ var strokeWidth = getEffectiveStyle(element, 'stroke-width');
307
+ return !!strokeWidth && parseInt(strokeWidth, 10) > 0;
308
+ }
309
+ var elementVisibility = getEffectiveStyle(element, 'visibility');
310
+ if (elementVisibility === 'collapse' || elementVisibility === 'hidden') {
311
+ return false;
312
+ }
313
+ if (!displayedFn(element)) {
314
+ return false;
315
+ }
316
+ if (getEffectiveStyle(element, 'overflow') === 'hidden') {
317
+ return false;
318
+ }
319
+ for (var index = 0; index < element.childNodes.length; index += 1) {
320
+ var child = element.childNodes[index];
321
+ if (child.nodeType === Node.TEXT_NODE) {
322
+ var text = child.nodeValue || '';
323
+ if (/^[\s]*$/.test(text) && /[\n\r\t]/.test(text)) {
324
+ continue;
325
+ }
326
+ return true;
327
+ }
328
+ if (isElement(child) && positiveSize(child)) {
329
+ return true;
330
+ }
331
+ }
332
+ return false;
333
+ }
334
+ if (!positiveSize(elem)) {
335
+ return false;
336
+ }
337
+ function hiddenByOverflow(element) {
338
+ if (getOverflowState(element) !== 'hidden') {
339
+ return false;
340
+ }
341
+ for (var index = 0; index < element.childNodes.length; index += 1) {
342
+ var child = element.childNodes[index];
343
+ if (isElement(child) && !hiddenByOverflow(child) && positiveSize(child)) {
344
+ return false;
345
+ }
346
+ }
347
+ return true;
348
+ }
349
+ return !hiddenByOverflow(elem);
350
+ }
351
+ function displayed(node) {
352
+ var cached = displayedCache.get(node);
353
+ if (cached !== undefined) {
354
+ return cached;
355
+ }
356
+ if (isElement(node)) {
357
+ var display = getEffectiveStyle(node, 'display');
358
+ var contentVisibility = getEffectiveStyle(node, 'content-visibility');
359
+ if (display === 'none' || contentVisibility === 'hidden') {
360
+ displayedCache.set(node, false);
361
+ return false;
362
+ }
363
+ }
364
+ var parent = getParentNodeInComposedDom(node);
365
+ if (typeof ShadowRoot === 'function' && parent instanceof ShadowRoot) {
366
+ if (parent.host.shadowRoot && parent.host.shadowRoot !== parent) {
367
+ displayedCache.set(node, false);
368
+ return false;
369
+ }
370
+ parent = parent.host;
371
+ }
372
+ if (parent && (parent.nodeType === Node.DOCUMENT_NODE || parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE)) {
373
+ displayedCache.set(node, true);
374
+ return true;
375
+ }
376
+ if (isElement(parent, 'DETAILS') && !parent.open && !isElement(node, 'SUMMARY')) {
377
+ displayedCache.set(node, false);
378
+ return false;
379
+ }
380
+ var result = !!parent && displayed(parent);
381
+ displayedCache.set(node, result);
382
+ return result;
383
+ }
384
+ return isShownInternal(elem, !!optIgnoreOpacity, displayed);
385
+ })
@@ -49,7 +49,9 @@ module Selenium
49
49
  # options = Selenium::WebDriver::Chrome::Options.new(args: ['start-maximized', 'user-data-dir=/tmp/temp_profile'])
50
50
  # driver = Selenium::WebDriver.for(:chrome, options: options)
51
51
  #
52
- # @param [Profile] profile An instance of a Chrome::Profile Class
52
+ # @param [Profile] profile (Deprecated) An instance of a Chrome::Profile class.
53
+ # Use {#add_argument} with `--user-data-dir=...`, {#add_preference}, and
54
+ # {#add_extension} instead.
53
55
  # @param [Hash] opts the pre-defined options to create the Chrome::Options with
54
56
  # @option opts [Array] encoded_extensions List of extensions that do not need to be Base64 encoded
55
57
  # @option opts [Array<String>] args List of command-line arguments to use when starting Chrome