testcafe
Version:
Automated browser testing for the modern web development stack.
1 lines • 123 kB
JavaScript
window["%hammerhead%"].utils.removeInjectedScript(),function Td(Md){var Dd=Md.document;!function(m,t,g,e){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var y=n(m),i=n(t),E=n(g),o=n(e),r=y.default.nativeMethods,s=/^((mouse\w+)|((dbl)?click)|(contextmenu))$/,l=/^((drag\w*)|(drop))$/,a=/^key\w+$/,u=/^(before)?input$/,c=/^(blur|(focus(in|out)?))$/,f=/^pointer\w+/,d={click:1,dblclick:2,mousedown:1,mouseup:1},h="MouseEvent",p="PointerEvent",v="KeyboardEvent",b="InputEvent",S="FocusEvent",_=(w.prototype.run=function(){var t=this.options,e=t.bubbles,n=t.cancelable,i=t.detail,o=(t.view,t.buttons),e=!1!==e,n=!1!==n,i=i||d[this.eventName],o=void 0===o?1:o;Object.assign(this.options,{bubbles:e,cancelable:n,detail:i,view:Md,buttons:o});var r,s=w._getEventCtorByEventType(this.eventName,this.options.eventConstructor);s&&(r=new s(this.eventName,this.options),this.element.dispatchEvent(r))},w._getEventCtorByEventType=function(t,e){if(e&&"function"==typeof w._getEventCtorFromWindow(e)){var n=w._getEventCtorFromNativeMethods(e);if(n&&"function"==typeof n)return n}return s.test(t)||l.test(t)?w._getEventCtorFromNativeMethods(h):f.test(t)?w._getEventCtorFromNativeMethods(p):a.test(t)?w._getEventCtorFromNativeMethods(v):u.test(t)?w._getEventCtorFromNativeMethods(b):c.test(t)?w._getEventCtorFromNativeMethods(S):w._getEventCtorFromNativeMethods("CustomEvent")},w._getEventCtorFromNativeMethods=function(t){return r["Window"+t]||w._getEventCtorFromWindow(t)},w._getEventCtorFromWindow=function(t){return Md[t]},w);function w(t,e,n){this.element=t,this.eventName=e,this.options=n}var P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function x(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var A=function(){return(A=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function C(t,s,l,a){return new(l=l||i.default)(function(n,e){function i(t){try{r(a.next(t))}catch(t){e(t)}}function o(t){try{r(a.throw(t))}catch(t){e(t)}}function r(t){var e;t.done?n(t.value):((e=t.value)instanceof l?e:new l(function(t){t(e)})).then(i,o)}r((a=a.apply(t,s||[])).next())})}function T(n,i){var o,r,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=t(0),a.throw=t(1),a.return=t(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function t(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a&&e[a=0]&&(l=0),l;)try{if(o=1,r&&(s=2&e[0]?r.return:e[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,e[1])).done)return s;switch(r=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,r=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){l.label=e[1];break}if(6===e[0]&&l.label<s[1]){l.label=s[1],s=e;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(e);break}s[2]&&l.ops.pop(),l.trys.pop();continue}e=i.call(n,l)}catch(t){e=[6,t],r=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var M=(D.create=function(t){return"left"in t?new D(t.left,t.top):"right"in t?new D(t.right,t.bottom):new D(t.x,t.y)},D.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},D.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},D.prototype.round=function(t){return void 0===t&&(t=Math.round),this.x=t(this.x),this.y=t(this.y),this},D.prototype.eql=function(t){return this.x===t.x&&this.y===t.y},D.prototype.mul=function(t){return this.x*=t,this.y*=t,this},D.prototype.distance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},D);function D(t,e){this.x=t,this.y=e}function U(t){var e="array"+t.charAt(0).toUpperCase()+t.slice(1),n=m.nativeMethods[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.call.apply(n,t)}}U("filter"),U("map"),U("slice"),U("splice"),U("unshift"),U("forEach"),U("indexOf");var I=U("some");U("reverse"),U("reduce"),U("concat"),U("join"),U("every"),y.default.utils.browser;var k=y.default.nativeMethods;y.default.utils.style.get,y.default.utils.dom.getActiveElement;var O=y.default.utils.dom.findDocument,N=y.default.utils.dom.find;y.default.utils.dom.isElementInDocument;var B=y.default.utils.dom.isElementInIframe,F=y.default.utils.dom.getIframeByElement;y.default.utils.dom.isCrossDomainWindows,y.default.utils.dom.getSelectParent,y.default.utils.dom.getChildVisibleIndex,y.default.utils.dom.getSelectVisibleChildren;var L=y.default.utils.dom.isElementNode;y.default.utils.dom.isTextNode,y.default.utils.dom.isRenderedNode,y.default.utils.dom.isIframeElement,y.default.utils.dom.isInputElement,y.default.utils.dom.isButtonElement,y.default.utils.dom.isFileInput,y.default.utils.dom.isTextAreaElement,y.default.utils.dom.isAnchorElement;var K=y.default.utils.dom.isImgElement;y.default.utils.dom.isFormElement,y.default.utils.dom.isLabelElement,y.default.utils.dom.isSelectElement,y.default.utils.dom.isRadioButtonElement,y.default.utils.dom.isColorInputElement,y.default.utils.dom.isCheckboxElement,y.default.utils.dom.isOptionElement,y.default.utils.dom.isSVGElement;var V=y.default.utils.dom.isMapElement,R=y.default.utils.dom.isBodyElement,Y=y.default.utils.dom.isHtmlElement;y.default.utils.dom.isDocument,y.default.utils.dom.isTextEditableInput,y.default.utils.dom.isTextEditableElement,y.default.utils.dom.isTextEditableElementAndEditingAllowed,y.default.utils.dom.isContentEditableElement,y.default.utils.dom.isDomElement,y.default.utils.dom.isShadowUIElement,y.default.utils.dom.isShadowRoot,y.default.utils.dom.isElementFocusable,y.default.utils.dom.isHammerheadAttr,y.default.utils.dom.isElementReadOnly;var W=y.default.utils.dom.getScrollbarSize,X=y.default.utils.dom.getMapContainer,H=y.default.utils.dom.getTagName,q=y.default.utils.dom.closest,G=y.default.utils.dom.getParents,j=y.default.utils.dom.findParent;function z(t,e){return t.contains?t.contains(e):I(t,function(t){return t.contains(e)})}function $(t){var e=[];N(Dd,"*",function(t){"IFRAME"===t.tagName&&e.push(t),t.shadowRoot&&N(t.shadowRoot,"iframe",function(t){return e.push(t)})});for(var n=0;n<e.length;n++)if(k.contentWindowGetter.call(e[n])===t)return e[n];return null}function Q(t){return k.nodeTextContentGetter.call(t)}y.default.utils.dom.getTopSameDomainWindow,y.default.utils.dom.getParentExceptShadowRoot;var Z=(J.create=function(t){return new J(t.top,t.right,t.bottom,t.left)},J.prototype.add=function(t){return this.top+=t.top,this.right+=t.right,this.bottom+=t.bottom,this.left+=t.left,this},J.prototype.sub=function(t){return"top"in t&&(this.top-=t.top,this.left-=t.left),this.bottom-=t.bottom,this.right-=t.right,this},J.prototype.round=function(t,e){return void 0===t&&(t=Math.round),void 0===e&&(e=t),this.top=t(this.top),this.right=e(this.right),this.bottom=e(this.bottom),this.left=t(this.left),this},J.prototype.contains=function(t){return t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom},J);function J(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}var tt=y.default.utils.style,et=y.default.utils.style.getBordersWidth;y.default.utils.style.getComputedStyle,y.default.utils.style.getElementMargin;var nt=y.default.utils.style.getElementPadding,it=y.default.utils.style.getElementScroll;y.default.utils.style.getOptionHeight,y.default.utils.style.getSelectElementSize,y.default.utils.style.isElementVisible,y.default.utils.style.isVisibleChild;var ot=y.default.utils.style.getWidth,rt=y.default.utils.style.getHeight,st=y.default.utils.style.getInnerWidth,lt=y.default.utils.style.getInnerHeight,at=y.default.utils.style.getScrollLeft,ut=y.default.utils.style.getScrollTop,ct=y.default.utils.style.setScrollLeft,ft=y.default.utils.style.setScrollTop,dt=y.default.utils.style.get,ht=y.default.utils.style.getBordersWidthFloat,mt=y.default.utils.style.getElementPaddingFloat;function pt(t){return L(t)&&"fixed"===tt.get(t,"position")}function vt(t){return L(t)&&"sticky"===tt.get(t,"position")}y.default.shadowUI,y.default.nativeMethods;var gt=function(t,e,n,i,o,r){this.width=t,this.height=e,this.left=n.x,this.top=n.y,this.right=n.x+t,this.bottom=n.y+e,this.border=i,this.scrollbar=r,this.scroll=o},yt={notElementOrTextNode:function(t){return"\n The ".concat(t," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(t,e){return"\n The ".concat(e," (").concat(t,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(t,e,n,i){return"\n The ".concat(e," (").concat(t,") is too small to be visible: ").concat(n,"px x ").concat(i,"px.\n ")},elHasDisplayNone:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(t,e){return"\n The ".concat(e," (").concat(t,") has not been rendered.\n ")},optionNotVisible:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(t,e){return"\n The action target (".concat(t,") is invisible because ").concat(e,"\n ")}},Et=y.default.utils.html,bt=y.default.nativeMethods,St=10;function _t(t){if(!t)return"";var e,n,i,o=bt.cloneNode.call(t),r=Et.cleanUpHtml(bt.elementOuterHTMLGetter.call(o)),s=(e=bt.nodeTextContentGetter.call(t),n=St,void 0===i&&(i="..."),e.length<n?e:e.substring(0,n-i.length)+i),l=bt.elementChildrenGetter.call(t);return 0<bt.htmlCollectionLengthGetter.call(l)?r.replace("></",">...</"):s?r.replace("></",">".concat(s,"</")):r}var wt=y.default.utils.position.getElementRectangle,Pt=y.default.utils.position.getOffsetPosition,xt=y.default.utils.position.offsetToClientCoords;function At(t){var e,n,i,o,r=Y(t),s=r?t.getElementsByTagName("body")[0]:null,l=t.getBoundingClientRect(),a=Z.create(et(t)),u=it(t),c=B(t),f="BackCompat"===t.ownerDocument.compatMode,d=r?new M(0,0):M.create(l),h=l.height,m=l.width;r&&(m=s&&f?(h=s.clientHeight,s.clientWidth):(h=t.clientHeight,t.clientWidth)),!c||(e=F(t))&&(n=Pt(e),i=xt(M.create(n)),o=et(e),d.add(i).add(M.create(o)),r&&a.add(o));var p=!r&&st(t)!==t.clientWidth,v=!r&<(t)!==t.clientHeight,g={right:p?W():0,bottom:v?W():0};return new gt(m,h,d,a,u,g)}function Ct(t){var e=t.x,n=t.y,i=Dd.elementFromPoint,o=null;try{o=i.call(Dd,e,n)}catch(t){return null}for(null===o&&(o=i.call(Dd,e-1,n-1));o&&o.shadowRoot&&o.shadowRoot.elementFromPoint;){var r=o.shadowRoot.elementFromPoint(e,n);if(!r||o===r)break;o=r}return o}function Tt(t,e,n){var i=At(t),o=Math.max(t.scrollWidth,i.width),r=Math.max(t.scrollHeight,i.height),s=i.scrollbar.right+i.border.left+i.border.right+o,l=i.scrollbar.bottom+i.border.top+i.border.bottom+r;return(void 0===e||0<=e&&e<=s)&&(void 0===n||0<=n&&n<=l)}function Mt(t){var e=Pt(t),n=e.left,i=e.top,o=xt({x:n,y:i});return o.x=Math.round(o.x),o.y=Math.round(o.y),o}function Dt(n,e){return m.Promise.resolve(n===Dd.documentElement).then(function(t){if(t)return new M(0,0);var e=m.utils.browser.isFirefox?Math.ceil:Math.round;return m.Promise.resolve(Pt(n,e)).then(function(t){return M.create(t)})}).then(function(t){return t.add(e)})}var Ut=/auto|scroll|hidden/i;function It(t){var e,n=dt(t,"overflowX"),i=dt(t,"overflowY"),o=Ut.test(n),r=Ut.test(i),s=O(t).documentElement,l=t.scrollHeight;return(m.utils.browser.isChrome||m.utils.browser.isFirefox||m.utils.browser.isSafari)&&(e=t.getBoundingClientRect().top,l=l-s.getBoundingClientRect().top+e),(o||r)&&l>s.scrollHeight}function kt(t){if(R(t))return It(t);if(Y(t))return function(t){var e=dt(t,"overflowX"),n=dt(t,"overflowY");if("hidden"===e&&"hidden"===n)return!1;var i=t.scrollHeight>t.clientHeight,o=t.scrollWidth>t.clientWidth;if(i||o)return!0;var r=t.getElementsByTagName("body")[0];if(!r)return!1;if(It(r))return!1;var s=Math.min(t.clientWidth,r.clientWidth),l=Math.min(t.clientHeight,r.clientHeight);return r.scrollHeight>l||r.scrollWidth>s}(t);var e,n,i,o,r,s=(n=dt(e=t,"overflowX"),i=dt(e,"overflowY"),o=Ut.test(n),r=Ut.test(i),new M(o,r));if(!s.x&&!s.y)return!1;var l=s.y&&t.scrollHeight>t.clientHeight;return s.x&&t.scrollWidth>t.clientWidth||l}function Ot(i,o){return C(this,void 0,void 0,function(){var e,n;return T(this,function(t){switch(t.label){case 0:return[4,it(i)];case 1:return e=t.sent(),n=kt(i),!/html/i.test(i.tagName)&&n&&(o.x-=e.left,o.y-=e.top),[2,xt(o)]}})})}function Nt(t){if(!t)return null;var e,n,i=(e=Md.screenLeft||Md.screenX,n=Md.screenTop||Md.screenY,new M(e,n)),o=i.x,r=i.y,s=o+t.x,l=r+t.y;return new M(s,l)}function Bt(t){var e=t/2;return e<1?0:Math.round(e)}function Ft(t){var e=wt(t);return{offsetX:Bt(e.width),offsetY:Bt(e.height)}}function Lt(t,e,n){var i=Ft(t);if(e="number"==typeof e?Math.round(e):i.offsetX,n="number"==typeof n?Math.round(n):i.offsetY,0<e&&0<n)return{offsetX:e,offsetY:n};var o=At(t),r=Math.round(Math.max(t.scrollWidth,o.width)),s=Math.round(Math.max(t.scrollHeight,o.height)),l=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+s;return{offsetX:e<0?l+e:e,offsetY:n<0?a+n:n}}var Kt=E.default.positionUtils;function Vt(e,n){return void 0===n&&(n=!1),o.default.hide(n).then(function(){var t=Kt.getElementFromPoint(e);return o.default.show(n).then(function(){return t})})}function Rt(t,n){return m.Promise.resolve(Ct(t)).then(function(e){return m.Promise.resolve(z(n,e)).then(function(t){return t&&Q(e)}).then(function(t){return t||e&&e===n?e:null})})}function Yt(n,i){if(!i||!n||n===i)return n;if("tref"===H(i))return i;var e,o,t="area"===H(i)&&K(n);return m.utils.browser.isFirefox&&t?(e=n,o=i,m.Promise.resolve(q(o,"map")).then(function(t){return t&&t.name===e.useMap.substring(1)?o:e})):m.Promise.resolve(q(i,"a")).then(function(t){return!!t}).then(function(t){return!!t&&m.Promise.resolve(z(i,n)).then(function(t){return t&&Q(n)}).then(function(t){return!t&&Q(i)})}).then(function(t){return t?m.Promise.resolve(At(i)).then(function(e){return Rt({x:e.right-1,y:e.top+1},i).then(function(t){return t||Rt({x:e.left+1,y:e.bottom-1},i)}).then(function(t){return t||n})}):n})}function Wt(t,e,n){return Vt(t).then(function(t){return Yt(t,n)})}function Xt(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}var Ht,qt,Gt,jt="E1",zt="E4",$t="E5",Qt="E9",Zt="E10",Jt="E11",te="E12",ee="E24",ne="E26",ie="E27",oe="E28",re="E29",se="E30",le="E31",ae="E32",ue="E33",ce="E34",fe="E35",de="E36",he="E37",me="E39",pe="E40",ve="E41",ge="E42",ye="E43",Ee="E44",be="E45",Se="E46",_e="E49",we="E50",Pe="E51",xe="E52",Ae="E57",Ce="E64",Te="E65",Me="E68",De="E69",Ue="E70",Ie="E71",ke="E72",Oe="E73",Ne="E74",Be="E76",Fe="E77",Le="E78",Ke="E82",Ve="E83",Re="E90",Ye="E91",We="E92",Xe="E93",He="E94",qe="E95",Ge="E97",je="E99",ze="E100",$e="E101",Qe="E102",Ze=(x(Je,Ht=Xt),Je);function Je(t,e,n){var i=Ht.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}function tn(t,e){var n=qt.call(this,_e,e)||this;return n.instantiationCallsiteName=t,n}function en(t,e){var n=Gt.call(this,we,e)||this;return n.instantiationCallsiteName=t,n}x(tn,qt=Xt),x(en,Gt=Xt);var nn,on,rn,sn,ln,an,un,cn,fn=(x(dn,nn=Xt),dn);function dn(t,e,n){var i=void 0===e?{}:e,o=i.apiFnChain,r=i.apiFnIndex,s=i.reason,l=nn.call(this,t,n)||this;return l.apiFnChain=o,l.apiFnIndex=r,l.reason=s,l}function hn(t){return on.call(this,Pe,t)||this}function mn(t,e){return rn.call(this,xe,e,t)||this}function pn(t,e){var n=sn.call(this,jt)||this;return n.errStack=t,n.pageDestUrl=e,n}function vn(t,e,n){var i=ln.call(this,zt,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}function gn(t,e,n,i){var o=an.call(this,$t,i)||this;return o.errMsg=String(e),o.property=n,o.instantiationCallsiteName=t,o}function yn(t){var e=un.call(this,Ce)||this;return e.errMsg=String(t),e}function En(t,e){var n=cn.call(this,Te)||this;return n.errMsg=String(t),n.moduleName=e,n}x(hn,on=Xt),x(mn,rn=fn),x(pn,sn=Xt),x(vn,ln=Xt),x(gn,an=Xt),x(yn,un=Xt),x(En,cn=Xt);var bn,Sn=(x(_n,bn=Ze),_n);function _n(t,e){return bn.call(this,Qt,t,e)||this}var wn,Pn=(x(xn,wn=Ze),xn);function xn(t,e){return wn.call(this,Zt,t,e)||this}var An,Cn=(x(Tn,An=Ze),Tn);function Tn(t,e){return An.call(this,Jt,t,e)||this}var Mn,Dn=(x(Un,Mn=Ze),Un);function Un(t,e){return Mn.call(this,te,t,e)||this}var In,kn=(x(On,In=Ze),On);function On(t,e){return In.call(this,Re,t,e)||this}var Nn,Bn=(x(Fn,Nn=Ze),Fn);function Fn(t,e){return Nn.call(this,Ge,t,e)||this}var Ln,Kn=(x(Vn,Ln=Ze),Vn);function Vn(t,e){return Ln.call(this,Ye,t,e)||this}var Rn,Yn=(x(Wn,Rn=Ze),Wn);function Wn(t,e){return Rn.call(this,We,t,e)||this}var Xn,Hn=(x(qn,Xn=Ze),qn);function qn(t,e){return Xn.call(this,Xe,t,e)||this}var Gn,jn=(x(zn,Gn=Ze),zn);function zn(t,e){return Gn.call(this,He,t,e)||this}var $n,Qn=(x(Zn,$n=Ze),Zn);function Zn(t,e){return $n.call(this,qe,t,e)||this}var Jn,ti=(x(ei,Jn=Ze),ei);function ei(t,e){return Jn.call(this,je,t,e)||this}var ni,ii,oi=(x(ri,ni=Xt),ri);function ri(t,e,n){var i=ni.call(this,ze)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}function si(t,e){return ii.call(this,ee,e,t)||this}x(si,ii=fn);var li,ai,ui,ci=(x(fi,li=fn),fi);function fi(t,e){return li.call(this,ne,e,t)||this}function di(t){var e=ai.call(this,ie)||this;return e.nodeDescription=t,e}function hi(t,e){var n=ui.call(this,oe,e)||this;return n.argumentName=t,n}x(di,ai=Xt),x(hi,ui=fn);var mi,pi,vi,gi,yi,Ei,bi,Si,_i,wi,Pi,xi,Ai,Ci,Ti,Mi,Di,Ui,Ii,ki,Oi,Ni,Bi,Fi,Li,Ki,Vi,Ri,Yi,Wi,Xi,Hi,qi=(x(Gi,mi=Xt),Gi);function Gi(t){return mi.call(this,$e,t)||this}function ji(t,e){var n=pi.call(this,re,e)||this;return n.argumentName=t,n}function zi(t,e){var n=vi.call(this,se)||this;return n.argumentName=t,n.nodeDescription=e,n}function $i(){return gi.call(this,le)||this}function Qi(){return yi.call(this,ae)||this}function Zi(t){var e=Ei.call(this,ue)||this;return e.argumentName=t,e}function Ji(){return bi.call(this,fe)||this}function to(t){var e=Si.call(this,de)||this;return e.argumentName=t,e}function eo(t,e){var n=_i.call(this,he)||this;return n.filePaths=t,n.scannedFilePaths=e,n}function no(){return wi.call(this,ce)||this}function io(t,e){var n=Pi.call(this,ve)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function oo(t,e){var n=xi.call(this,Ae)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function ro(t){return Ai.call(this,pe,t)||this}function so(){return Ci.call(this,me)||this}function lo(){return Ti.call(this,ge)||this}function ao(){return Mi.call(this,De)||this}function uo(){return Di.call(this,Me)||this}function co(){return Ui.call(this,Ue)||this}function fo(){return Ii.call(this,Ie)||this}function ho(){return ki.call(this,Oe)||this}function mo(){return Oi.call(this,Ke)||this}function po(t){var e=Ni.call(this,Le)||this;return e.errMsg=t,e}function vo(){return Bi.call(this,Ne)||this}function go(){return Fi.call(this,Be)||this}function yo(){return Li.call(this,Fe)||this}function Eo(){return Ki.call(this,ke)||this}function bo(){return Vi.call(this,Ve)||this}function So(){return Ri.call(this,ye)||this}function _o(){return Yi.call(this,Ee)||this}function wo(t,e){var n=Wi.call(this,be)||this;return n.dialogType=t,n.pageUrl=e,n}function Po(t,e,n){var i=Xi.call(this,Se)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}function xo(){return Hi.call(this,Qe)||this}x(ji,pi=fn),x(zi,vi=Xt),x($i,gi=Xt),x(Qi,yi=Xt),x(Zi,Ei=Xt),x(Ji,bi=Xt),x(to,Si=Xt),x(eo,_i=Xt),x(no,wi=Xt),x(io,Pi=Xt),x(oo,xi=Xt),x(ro,Ai=Xt),x(so,Ci=Xt),x(lo,Ti=Xt),x(ao,Mi=Xt),x(uo,Di=Xt),x(co,Ui=Xt),x(fo,Ii=Xt),x(ho,ki=Xt),x(mo,Oi=Xt),x(po,Ni=Xt),x(vo,Bi=Xt),x(go,Fi=Xt),x(yo,Li=Xt),x(Eo,Ki=Xt),x(bo,Vi=Xt),x(So,Ri=Xt),x(_o,Yi=Xt),x(wo,Wi=Xt),x(Po,Xi=Xt),x(xo,Hi=Xt);var Ao=(Object.defineProperty(Co.prototype,"mouseActionStepDelay",{get:function(){return 1===this._speedFactor?10:400*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"keyActionStepDelay",{get:function(){return 1===this._speedFactor?10:200*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"cursorSpeed",{get:function(){return Math.pow(400,this._speedFactor)/4},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"draggingSpeed",{get:function(){return Math.pow(16,this._speedFactor)/4},enumerable:!1,configurable:!0}),Co);function Co(t){this._speedFactor=t||1}var To=y.default.Promise,Mo=y.default.nativeMethods;function Do(e){return new To(function(t){return Mo.setTimeout.call(Md,t,e)})}function Uo(){return Do(0)}var Io=Object.prototype.toString,ko=String.prototype.indexOf,Oo=String.prototype.endsWith||function(t,e){var n=Io.call(this);(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=ko.call(n,t,e);return-1!==i&&i===e},No=Array.prototype.indexOf,Bo=Array.prototype.map,Fo=Array.prototype.sort,Lo=Array.prototype.filter,Ko=Array.prototype.concat,Vo="Command",Ro=(Yo.prototype.getAssignableProperties=function(){return[]},Yo.prototype.getAllAssignableProperties=function(){for(var t=Object.getPrototypeOf(this),e=[];t&&t.getAssignableProperties;)e=Ko.call(e,t.getAssignableProperties()),t=Object.getPrototypeOf(t);return e},Yo.prototype.getNonReportedProperties=function(){return[]},Yo.prototype.getReportedProperties=function(){var t=Bo.call(this.getAllAssignableProperties(),function(t){return t.name}),e=this.getNonReportedProperties();return Lo.call(t,function(t){return!(-1<No.call(e,t))})},Yo.prototype._assignFrom=function(t,e,n){if(void 0===n&&(n={}),t){e&&function(t,e){var n,i=e.constructor.name,o=Bo.call(e.getAllAssignableProperties(),function(t){return t.name}),r=Fo.call(e.getReportedProperties());for(n in t)if(!(-1<No.call(o,n)||n in e))throw new oi(i,n,r)}(t,this);for(var i,o,r=this.getAllAssignableProperties(),s=0;s<r.length;s++){var l=r[s],a=l.name,u=l.type,c=l.required,f=l.init,d=l.defaultValue;void 0!==d&&(this[a]=d);var h=t[a];void 0===h&&!c||(e&&u&&u((i=this.constructor.name,o=a,Oo.call(i,Vo)?o:"".concat(i,".").concat(o)),h),this[a]=f?f(a,h,n,e):h)}}},Yo);function Yo(){}function Wo(i){return function(t,e){var n=typeof e;if("number"!=n)throw new i(t,n);if(isNaN(e)||!isFinite(e)||e!==Math.floor(e))throw new i(t,e)}}var Xo,Ho,qo,Go,jo,zo,$o,Qo,Zo,Jo,tr,er,nr,ir=Wo(Sn),or=(Ho=Wo(Xo=Pn),function(t,e){if(Ho(t,e),e<0)throw new Xo(t,e)}),rr=(qo=Cn,function(t,e){var n=typeof e;if("boolean"!=n)throw new qo(t,n)}),sr=(Go=Dn,function(t,e){var n=typeof e;if("number"!=n)throw new Go(t,n);if(isNaN(e)||e<.01||1<e)throw new Go(t,e)}),lr=(jo=kn,function(t,e){var n=typeof e;if("string"!=n)throw new jo(t,n)}),ar=(zo=Bn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof RegExp))throw new zo(t,n)}),ur=($o=Kn,function(t,e){if(!(e instanceof Date))throw new $o(t,e)}),cr=(Qo=Yn,function(t,e){if(isNaN(Number(e)))throw new Qo(t,typeof e)}),fr=(Zo=Hn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof URL))throw new Zo(t,n)}),dr=(Jo=jn,function(t,e){var n=typeof e;if("object"!=n&&!(e instanceof URLSearchParams))throw new Jo(t,n)}),hr=(tr=Qn,function(t,e){var n=typeof e;if("object"!=n)throw new tr(t,n)}),mr=(er=ti,function(t,e){var n=typeof e;if("function"!=n)throw new er(t,n)}),pr=(x(vr,nr=Ro),vr.prototype.getAssignableProperties=function(){return[{name:"speed",type:sr}]},vr);function vr(t,e){var n=nr.call(this)||this;return n.speed=null,n._assignFrom(t,e),n}var gr,yr=(x(Er,gr=pr),Er.prototype.getAssignableProperties=function(){return[{name:"offsetX",type:ir},{name:"offsetY",type:ir},{name:"isDefaultOffset",type:rr}]},Er);function Er(t,e){var n=gr.call(this)||this;return n.offsetX=null,n.offsetY=null,n._assignFrom(t,e),n}var br,Sr=(x(_r,br=yr),_r.prototype.getAssignableProperties=function(){return[{name:"scrollToCenter",type:rr},{name:"skipParentFrames",type:rr}]},_r);function _r(t,e){var n=br.call(this)||this;return n.scrollToCenter=!1,n.skipParentFrames=!1,n._assignFrom(t,e),n}var wr,Pr,xr=(x(Ar,wr=Ro),Ar.prototype.getAssignableProperties=function(){return[{name:"left",type:ir,defaultValue:null},{name:"right",type:ir,defaultValue:null},{name:"top",type:ir,defaultValue:null},{name:"bottom",type:ir,defaultValue:null}]},Ar);function Ar(t,e){var n=wr.call(this)||this;return n._assignFrom(t,e),n}function Cr(t,e){var n=Pr.call(this)||this;return n.scrollTargetX=null,n.scrollTargetY=null,n.includeMargins=!1,n.includeBorders=!0,n.includePaddings=!0,n.crop={left:null,right:null,top:null,bottom:null},n._assignFrom(t,e),n}x(Cr,Pr=pr),Cr.prototype.getAssignableProperties=function(){return[{name:"scrollTargetX",type:ir},{name:"scrollTargetY",type:ir},{name:"crop",type:hr,init:ps},{name:"includeMargins",type:rr},{name:"includeBorders",type:rr},{name:"includePaddings",type:rr}]};var Tr,Mr=(x(Dr,Tr=Ro),Dr.prototype.getAssignableProperties=function(){return[{name:"ctrl",type:rr,defaultValue:!1},{name:"alt",type:rr,defaultValue:!1},{name:"shift",type:rr,defaultValue:!1},{name:"meta",type:rr,defaultValue:!1}]},Dr);function Dr(t,e){var n=Tr.call(this)||this;return n._assignFrom(t,e),n}var Ur,Ir=(x(kr,Ur=yr),kr.prototype.getAssignableProperties=function(){return[{name:"modifiers",type:hr,init:vs}]},kr);function kr(t,e){var n=Ur.call(this)||this;return n.modifiers={ctrl:!1,alt:!1,shift:!1,meta:!1},n._assignFrom(t,e),n}var Or,Nr=(x(Br,Or=Ir),Br.prototype.getAssignableProperties=function(){return[{name:"caretPos",type:or}]},Br);function Br(t,e){var n=Or.call(this)||this;return n.caretPos=null,n._assignFrom(t,e),n}var Fr,Lr=(x(Kr,Fr=Ir),Kr.prototype.getAssignableProperties=function(){return[{name:"speed"},{name:"minMovingTime"},{name:"holdLeftButton"},{name:"skipScrolling",type:rr},{name:"skipDefaultDragBehavior",type:rr}]},Kr);function Kr(t,e){var n=Fr.call(this)||this;return n.speed=null,n.minMovingTime=null,n.holdLeftButton=!1,n.skipScrolling=!1,n.skipDefaultDragBehavior=!1,n._assignFrom(t,e),n}var Vr,Rr,Yr,Wr,Xr,Hr,qr=(x(Gr,Vr=Nr),Gr.prototype.getAssignableProperties=function(){return[{name:"replace",type:rr},{name:"paste",type:rr},{name:"confidential",type:rr}]},Gr);function Gr(t,e){var n=Vr.call(this)||this;return n.replace=!1,n.paste=!1,n.confidential=void 0,n._assignFrom(t,e),n}function jr(t,e){var n=Rr.call(this,t,e)||this;return n.destinationOffsetX=null,n.destinationOffsetY=null,n._assignFrom(t,e),n}function zr(t,e){var n=Yr.call(this)||this;return n.portraitOrientation=!1,n._assignFrom(t,e),n}function $r(t,e){var n=Wr.call(this)||this;return n.timeout=void 0,n.allowUnawaitedPromise=!1,n._assignFrom(t,e),n}function Qr(t,e){var n=Xr.call(this)||this;return n.confidential=void 0,n._assignFrom(t,e),n}function Zr(t,e){var n=Hr.call(this)||this;return n._assignFrom(t,e),n}x(jr,Rr=Ir),jr.prototype.getAssignableProperties=function(){return[{name:"destinationOffsetX",type:ir},{name:"destinationOffsetY",type:ir}]},x(zr,Yr=Ro),zr.prototype.getAssignableProperties=function(){return[{name:"portraitOrientation",type:rr}]},x($r,Wr=Ro),$r.prototype.getAssignableProperties=function(){return[{name:"timeout",type:or},{name:"allowUnawaitedPromise",type:rr}]},x(Qr,Xr=pr),Qr.prototype.getAssignableProperties=function(){return[{name:"confidential",type:rr}]},x(Zr,Hr=Ro),Zr.prototype.getAssignableProperties=function(){return[{name:"name",type:lr},{name:"value",type:lr},{name:"domain",type:lr},{name:"path",type:lr},{name:"expires",type:ur},{name:"maxAge",type:cr},{name:"secure",type:rr},{name:"httpOnly",type:rr},{name:"sameSite",type:lr}]};var Jr,ts=(x(es,Jr=Ro),es.prototype.getAssignableProperties=function(){return[{name:"username",type:lr,required:!0},{name:"password",type:lr}]},es);function es(t,e){var n=Jr.call(this)||this;return n._assignFrom(t,e),n}var ns,is,os,rs,ss,ls=(x(as,ns=Ro),as.prototype.getAssignableProperties=function(){return[{name:"protocol",type:lr},{name:"host",type:lr,required:!0},{name:"port",type:cr,required:!0},{name:"auth",type:hr,init:hs}]},as);function as(t,e){var n=ns.call(this)||this;return n._assignFrom(t,e),n}function us(t,e){var n=is.call(this)||this;return n._assignFrom(t,e),n}function cs(t,e){var n=os.call(this)||this;return n._assignFrom(t,e),n}function fs(t,e){var n=rs.call(this)||this;return n._assignFrom(t,e),n}function ds(t,e){var n=ss.call(this)||this;return n._assignFrom(t,e),n}function hs(t,e,n,i){return void 0===i&&(i=!0),new ts(e,i)}function ms(t,e,n,i){return void 0===i&&(i=!0),new ls(e,i)}function ps(t,e,n,i){return void 0===i&&(i=!0),new xr(e,i)}function vs(t,e,n,i){return void 0===i&&(i=!0),new Mr(e,i)}x(us,is=Ro),us.prototype.getAssignableProperties=function(){return[{name:"url",type:fr},{name:"method",type:lr},{name:"headers",type:hr},{name:"params",type:dr},{name:"body"},{name:"timeout",type:cr},{name:"withCredentials",type:rr},{name:"auth",type:hr,init:hs},{name:"proxy",type:hr,init:ms},{name:"rawResponse",type:rr}]},x(cs,os=Ro),cs.prototype.getAssignableProperties=function(){return[{name:"credentials",type:cr}]},x(fs,rs=Ro),fs.prototype.getAssignableProperties=function(){return[{name:"stack",type:ar,required:!1},{name:"message",type:ar,required:!1},{name:"pageUrl",type:ar,required:!1}]},x(ds,ss=Ro),ds.prototype.getAssignableProperties=function(){return[{name:"fn",type:mr,required:!0},{name:"dependencies",type:hr,required:!1}]};var gs=null,ys=function(){return gs},Es=function(t){gs=t};y.default.Promise,y.default.nativeMethods,y.default.eventSandbox.listeners,y.default.utils.event.BUTTON;var bs=y.default.utils.event.BUTTONS_PARAMETER;function Ss(t){return t.top!==t}y.default.utils.event.DOM_EVENTS,y.default.utils.event.WHICH_PARAMETER,y.default.utils.event.preventDefault;var _s=y.default.Promise,ws=y.default.eventSandbox.message;function Ps(t,i,e){return new _s(function(n){ws.on(ws.SERVICE_MSG_RECEIVED_EVENT,function t(e){e.message.cmd===i&&(ws.off(ws.SERVICE_MSG_RECEIVED_EVENT,t),n(e.message))}),ws.sendServiceMsg(t,e)})}var xs=(As.prototype.on=function(t,e){this._eventsListeners[t]||(this._eventsListeners[t]=[]),this._eventsListeners[t].push(e)},As.prototype.once=function(n,i){var o=this;this.on(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.off(n,i),i.apply(void 0,t)})},As.prototype.off=function(t,e){var n=this._eventsListeners[t];n&&(this._eventsListeners[t]=m.nativeMethods.arrayFilter.call(n,function(t){return t!==e}))},As.prototype.offAll=function(t){t?this._eventsListeners[t]=[]:this._eventsListeners={}},As.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=this._eventsListeners[t];if(i)for(var o=0;o<i.length;o++)i[o].apply(this,e)},As);function As(){this._eventsListeners={}}var Cs=xs,Ts=m.eventSandbox.listeners;function Ms(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Cs}var Ds=(Ms.prototype._internalListener=function(t,e,n,i,o){this.events.emit("scroll",t),this.stopPropagationFlag&&(i(),o())},Ms.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Ts.initElementListening(Md,["scroll"]),Ts.addFirstInternalEventBeforeListener(Md,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n._internalListener.apply(n,t)}))},Ms.prototype.waitForScroll=function(t){var e=this,n=null,i=new m.Promise(function(t){n=t});return i.cancel=function(){return e.events.off("scroll",n)},this.initialized?this.handleScrollEvents(t,n):n(),i},Ms.prototype.handleScrollEvents=function(n,t){var e,i=this;this.events.once("scroll",t),(e=n)&&e.getRootNode&&O(e)!==e.getRootNode()&&(Ts.initElementListening(n,["scroll"]),Ts.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i._internalListener.apply(i,t),Ts.cancelElementListening(n)}))},Ms.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Ms.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Ms),Us=(Is._isScrollValuesChanged=function(t,e){return at(t)!==e.left||ut(t)!==e.top},Is.prototype._setScroll=function(t,e){var n=this,i=e.left,o=e.top,r=Y(t)?O(t):t,s={left:at(r),top:ut(r)},i=Math.max(i,0),o=Math.max(o,0),l=Ds.waitForScroll(r);return ct(r,i),ft(r,o),Is._isScrollValuesChanged(r,s)?l=l.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=Is._isScrollValuesChanged(r,s))}):(l.cancel(),m.Promise.resolve())},Is.prototype._getScrollToPoint=function(t,e,n){var i=Math.floor(t.width/2),o=Math.floor(t.height/2),r=this._scrollToCenter?i:Math.min(n.left,i),s=this._scrollToCenter?o:Math.min(n.top,o),l=t.scroll,a=l.left,u=l.top,c=e.x>=a+t.width-r,f=e.x<=a+r,d=e.y>=u+t.height-s,h=e.y<=u+s;return c?a=e.x-t.width+r:f&&(a=e.x-r),d?u=e.y-t.height+s:h&&(u=e.y-s),{left:a,top:u}},Is.prototype._getScrollToFullChildView=function(t,e,n){var i,o,r,s,l,a,u={left:null,top:null},c=t.width>=e.width,f=t.height>=e.height,d=(i=e,o=t,Z.create({top:i.top-o.top,left:i.left-o.left,right:o.right-i.right,bottom:o.bottom-i.bottom}).sub(o.border).sub(o.scrollbar).round(Math.ceil,Math.floor));return c&&(r=t.width-e.width,s=Math.min(n.left,r),this._scrollToCenter&&(s=r/2),d.left<s?u.left=Math.round(t.scroll.left+d.left-s):d.right<s&&(u.left=Math.round(t.scroll.left+Math.min(d.left,-d.right)+s))),f&&(l=t.height-e.height,a=Math.min(n.top,l),this._scrollToCenter&&(a=l/2),d.top<a?u.top=Math.round(t.scroll.top+d.top-a):d.bottom<a&&(u.top=Math.round(t.scroll.top+Math.min(d.top,-d.bottom)+a))),u},Is._getChildPoint=function(t,e,n){return M.create(e).sub(M.create(t)).add(M.create(t.scroll)).add(M.create(e.border)).add(n)},Is.prototype._getScrollPosition=function(t,e,n,i){var o=Is._getChildPoint(t,e,n),r=this._getScrollToPoint(t,o,i),s=this._getScrollToFullChildView(t,e,i);return{left:Math.max(null===s.left?r.left:s.left,0),top:Math.max(null===s.top?r.top:s.top,0)}},Is._getChildPointAfterScroll=function(t,e,n,i){return M.create(e).add(M.create(t.scroll)).sub(M.create(n)).add(i)},Is.prototype._isChildFullyVisible=function(t,e,n){var i=Is._getChildPointAfterScroll(t,e,t.scroll,n),o=this._getScrollPosition(t,e,n,{left:0,top:0}),r=o.left,s=o.top;return!this._isTargetElementObscuredInPoint(i)&&r===t.scroll.left&&s===t.scroll.top},Is.prototype._scrollToChild=function(t,e,n){for(var i=At(t),o=At(e),r=st(Md),s=lt(Md),l=i.scroll,a=!this._isChildFullyVisible(i,o,n);a;){l=this._getScrollPosition(i,o,n,this._maxScrollMargin);var u=Is._getChildPointAfterScroll(i,o,l,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=r&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),a=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(t,l)},Is.prototype._scrollElement=function(){if(!kt(this._element))return m.Promise.resolve();var t=At(this._element),e=this._getScrollToPoint(t,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,e)},Is.prototype._scrollParents=function(){var t,e,n,i,o,r,s=this,l=(t=this._element,i=G(t),!B(t)||(e=F(t))&&(n=G(e),i.concat(n)),m.nativeMethods.arrayFilter.call(i,kt)),a=this._element,u=at(a),c=ut(a),f=M.create(this._offsets).sub(new M(u,c).round()),d=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<n?[4,i(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})})}(l.length,function(t){return s._scrollToChild(l[t],a,f).then(function(){o=At(a),r=At(l[t]),f.add(M.create(o)).sub(M.create(r)).add(M.create(r.border)),a=l[t]})}),h={scrollWasPerformed:this._scrollWasPerformed,offsetX:f.x,offsetY:f.y,maxScrollMargin:this._maxScrollMargin};return d.then(function(){if(!s._skipParentFrames&&Ss(Md))return h.cmd=Is.SCROLL_REQUEST_CMD,Ps(h,Is.SCROLL_RESPONSE_CMD,Md.parent)}).then(function(){return s._scrollWasPerformed})},Is._getPinnedElementAncestorOrSelf=function(t,e){return j(t,!0,e)},Is.prototype._isTargetElementObscuredInPointByElement=function(t,e){var n=Is._getPinnedElementAncestorOrSelf(t,e);return!!n&&!n.contains(this._element)},Is.prototype._isTargetElementObscuredInPoint=function(t){var e=Ct(t);return!!e&&(this._isTargetElementObscuredInPointByElement(e,pt)||this._isTargetElementObscuredInPointByElement(e,vt))},Is.prototype.run=function(){var t=this;return this._scrollElement().then(function(){return t._scrollParents()})},Is.SCROLL_REQUEST_CMD="automation|scroll|request",Is.SCROLL_RESPONSE_CMD="automation|scroll|response",Is);function Is(t,e,n){this._element=t,this._offsets=new M(e.offsetX,e.offsetY),this._scrollToCenter=!!e.scrollToCenter,this._skipParentFrames=!!e.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}var ks=(Os.prototype.setup=function(){this.dragAndDropMode=!1,this.dropAllowed=!1},Os.prototype.leaveElement=function(){},Os.prototype.move=function(){},Os.prototype.enterElement=function(){},Os.prototype.dragAndDrop=function(){},Os.prototype.teardown=function(){},Os.prototype.run=function(t,e,n,i,o){var r=e&&g.domUtils.isElementInDocument(e),s=e&&g.domUtils.isElementInIframe(e)&&!g.domUtils.getIframeByElement(e);r&&!s||(e=null);var l=t!==e,a=l?g.domUtils.getCommonAncestor(t,e):null;this.setup(),l&&e&&this.leaveElement(t,e,a,n),l&&g.domUtils.isElementInDocument(t)&&this.enterElement(t,e,a,n),this.move(t,n),this.dragAndDrop(i,t,e,n,o),this.teardown(t,n,e);var u=this.dragAndDropMode,c=this.dropAllowed;return this.dragAndDropMode=!1,this.dropAllowed=!1,{dragAndDropMode:u,dropAllowed:c}},Os);function Os(t){var e=t.moveEvent;this.dragAndDropMode=!1,this.dropAllowed=!1,this.moveEvent=e}var Ns=y.default.eventSandbox.eventSimulator,Bs=y.default.utils.extend,Fs=y.default.nativeMethods,Ls=(Ks.leaveElement=function(t,e,n,i){Ns.mouseout(e,Bs({relatedTarget:t},i));for(var o=e;o&&o!==n;)Ns.mouseleave(o,Bs({relatedTarget:t},i)),o=Fs.nodeParentNodeGetter.call(o)},Ks.enterElement=function(t,e,n,i){Ns.mouseover(t,Bs({relatedTarget:e},i));for(var o=t,r=[];o&&o!==n;)r.push(o),o=g.domUtils.getParentExceptShadowRoot(o);for(var s=r.length-1;-1<s;s--)Ns.mouseenter(r[s],Bs({relatedTarget:e},i))},Ks.move=function(t,e,n){Ns[t](e,n)},Ks);function Ks(){}var Vs=(Rs.dragAndDrop=function(t,e,n,i){return Ns.drag(t,i),e!==n&&(g.domUtils.isElementInDocument(e)&&(i.relatedTarget=n,Ns.dragenter(e,i)),n&&(i.relatedTarget=e,Ns.dragleave(n,i))),!Ns.dragover(e,i)},Rs);function Rs(){}var Ys,Ws=y.default.eventSandbox.eventSimulator,Xs=(x(Hs,Ys=ks),Hs.prototype.leaveElement=function(t,e,n,i){Ls.leaveElement(t,e,n,i)},Hs.prototype.enterElement=function(t,e,n,i){Ls.enterElement(t,e,n,i)},Hs.prototype.move=function(t,e){this._needEmulateMoveEvent()&&Ls.move(this.moveEvent,t,e)},Hs.prototype.teardown=function(t,e,n){this._needEmulateMoveEvent()&&g.domUtils.isElementInDocument(t)&&t!==n&&Ws[this.moveEvent](t,e)},Hs.prototype._needEmulateMoveEvent=function(){return"touchmove"!==this.moveEvent||this.holdLeftButton},Hs);function Hs(t){var e=Ys.call(this,t)||this;return e.holdLeftButton=t.holdLeftButton,e}var qs,Gs=(x(js,qs=ks),js.prototype.setup=function(){qs.prototype.setup.call(this),this.dragAndDropMode=!0},js.prototype.dragAndDrop=function(t,e,n,i){this.dropAllowed=Vs.dragAndDrop(t,e,n,i)},js);function js(){return null!==qs&&qs.apply(this,arguments)||this}var zs,$s=y.default.eventSandbox.eventSimulator,Qs=(x(Zs,zs=ks),Zs.prototype.setup=function(){zs.prototype.setup.call(this),this.dragAndDropMode=!0},Zs.prototype.leaveElement=function(t,e,n,i){Ls.leaveElement(t,e,n,i)},Zs.prototype.move=function(t,e){Ls.move(this.moveEvent,t,e)},Zs.prototype.enterElement=function(t,e,n,i){Ls.enterElement(t,e,n,i)},Zs.prototype.dragAndDrop=function(t,e,n,i,o){var r=$s.dragstart(t,i);o.setReadOnlyMode(),r?this.dropAllowed=Vs.dragAndDrop(t,e,n,i):this.dragAndDropMode=!1},Zs.prototype.run=function(t,e,n,i,o){return zs.prototype.run.call(this,t,null,n,i,o)},Zs);function Zs(){return null!==zs&&zs.apply(this,arguments)||this}function Js(t,e,n){return new(t?e?Gs:Qs:Xs)(n)}function tl(a,u,c){return C(this,void 0,void 0,function(){var e,n,i,o,r,s,l;return T(this,function(t){switch(t.label){case 0:e=!0,n=M.create(a.startPoint),i=M.create(a.endPoint).round(Math.floor),o=M.create(a.startPoint).round(Math.floor),r=M.create(a.startPoint),s=u(),t.label=1;case 1:return o.eql(i)?[3,4]:(r=M.create(o),a.needMoveImmediately?o=i:e?(e=!1,o.add({x:0<a.distance.x?1:-1,y:0<a.distance.y?1:-1})):(l=Math.min((u()-s)/a.movingTime,1),o=M.create(a.distance).mul(l).add(n).round(Math.floor)),o.eql(r)?[3,3]:[4,c(o)]);case 2:t.sent(),t.label=3;case 3:return[3,1];case 4:return[2]}})})}var el=(nl.create=function(o,r,s,l,a){return void 0===a&&(a=null),C(this,void 0,m.Promise,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,nl.getTarget(o,s,new M(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new nl(n,i,r,s,l,a)]}})})},nl.getTarget=function(e,n,i){return m.Promise.resolve(Tt(e,i.x,i.y)).then(function(t){return t?{element:e,offset:i}:m.Promise.all([Dt(e,i),n.document.documentElement]).then(function(t){var e=t[0];return{element:t[1],offset:e}})})},nl.prototype._getCursorSpeed=function(){return this.automationSettings.cursorSpeed},nl.prototype._getTargetClientPoint=function(){var o=this;return m.Promise.resolve(it(this.element)).then(function(i){return Y(o.element)?M.create(o.offset).sub(M.create(i)).round(Math.round):m.Promise.resolve(Mt(o.element)).then(function(t){var e=R(o.element),n=M.create(t).add(o.offset);return e||n.sub(M.create(i)),n.round(Math.floor)})})},nl.prototype._getEventSequenceOptions=function(t){var e=bs.noButton,n=Nt(t);return{eventOptions:{clientX:t.x,clientY:t.y,screenX:null==n?void 0:n.x,screenY:null==n?void 0:n.y,buttons:e,ctrl:this.modifiers.ctrl,alt:this.modifiers.alt,shift:this.modifiers.shift,meta:this.modifiers.meta},eventSequenceOptions:{moveEvent:this.moveEvent}}},nl.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions;return Js(!1,this.firstMovingStepOccured,i).run(t,ys(),n,null,null)},nl.prototype._emulateEvents=function(t,e){var n=this._getEventSequenceOptions(e);this._runEventSequence(t,n),this.firstMovingStepOccured=!0,Es(t)},nl.prototype._movingStep=function(n){var i=this;return this.cursor.move(n).then(function(){return Vt(i.cursor.getPosition())}).then(function(t){var e=i._getCorrectedTopElement(t);return e?i._emulateEvents(e,n):null}).then(Uo)},nl.prototype._getCorrectedTopElement=function(t){return t},nl.prototype._move=function(l){return C(this,void 0,m.Promise,function(){var e,n,i,o,r,s=this;return T(this,function(t){switch(t.label){case 0:return e=this.cursor.getPosition(),n=M.create(l).sub(e),i=Math.max(Math.max(Math.abs(n.x),Math.abs(n.y))/this.cursorSpeed,this.minMovingTime),o={startPoint:e,endPoint:l,movingTime:i,distance:n,needMoveImmediately:this._needMoveCursorImmediately()},this.nativeAutomationInput?(r=[],[4,tl(o,m.nativeMethods.dateNow,function(i){return C(s,void 0,void 0,function(){var e,n;return T(this,function(t){switch(t.label){case 0:return[4,null===(n=this.nativeAutomationInput)||void 0===n?void 0:n.createMouseMoveEvent(i,this.modifiers)];case 1:return e=t.sent(),r.push(e),[2,Uo()]}})})})]):[3,4];case 1:return t.sent(),[4,this.nativeAutomationInput.executeEventSequence(r)];case 2:return t.sent(),[4,this.cursor.move(l)];case 3:return t.sent(),[3,6];case 4:return[4,tl(o,m.nativeMethods.dateNow,function(t){return s._movingStep(t)})];case 5:t.sent(),t.label=6;case 6:return[2]}})})},nl.prototype._needMoveCursorImmediately=function(){return this.touchMode},nl.prototype._scroll=function(){if(this.skipScrolling)return m.Promise.resolve(!1);var t=new Sr({offsetX:this.offset.x,offsetY:this.offset.y},!1);return new Us(this.element,t).run()},nl.prototype._moveToCurrentFrame=function(t,e){var n=this;if(this.cursor.isActive(this.window))return m.Promise.resolve();var i=this.cursor.getPosition(),o=i.x,r=i.y,s=this.cursor.getActiveWindow(this.window),c=null,l=null,f={cmd:"automation|move|request",startX:o,startY:r,endX:t.x,endY:t.y,modifiers:this.modifiers,speed:this.speed,nativeAutomationMove:e};return m.Promise.resolve().then(function(){if(s.parent===n.window)return m.Promise.resolve($(s)).then(function(t){return c=t,m.Promise.resolve((n=Pt(e=t),i=n.left,o=n.top,r=xt({x:i,y:o}),s=et(e),l=nt(e),a=r.x+s.left+l.left,u=r.y+s.top+l.top,new Z(u,a+ot(e),u+rt(e),a))).then(function(t){f.left=t.left,f.top=t.top,f.right=t.right,f.bottom=t.bottom});var e,n,i,o,r,s,l,a,u})}).then(function(){return Vt(n.cursor.getPosition())}).then(function(t){return l=t===c,s.parent===n.window&&(f.iframeUnderCursor=l),Ps(f,"automation|move|response",s)}).then(function(t){if(n.cursor.setActiveWindow(n.window),l||m.utils.dom.isIframeWindow(n.window))return n.cursor.move(t)})},nl.prototype.run=function(){var n=this;return this._scroll().then(function(){return m.Promise.all([n._getTargetClientPoint(),(t=n.window,new Z(0,ot(t),rt(t),0))]);var t}).then(function(t){var e=t[0];if(t[1].contains(e))return n._moveToCurrentFrame(e,!!n.nativeAutomationInput).then(function(){return n._move(e)})})},nl);function nl(t,e,n,i,o,r){void 0===r&&(r=null),this.touchMode=m.utils.featureDetection.isTouchDevice,this.moveEvent=this.touchMode?"touchmove":"mousemove",this.automationSettings=new Ao(n.speed),this.cursorSpeed=this._getCursorSpeed(),this.element=t,this.window=i,this.offset=e,this.cursor=o,this.minMovingTime=n.minMovingTime||0,this.modifiers=n.modifiers||{},this.skipScrolling=n.skipScrolling,this.skipDefaultDragBehavior=n.skipDefaultDragBehavior,this.speed=n.speed,this.nativeAutomationInput=r||null,this.firstMovingStepOccured=!1}var il=(ol.prototype._ensureActiveWindow=function(t){this._activeWindow!==t&&this._activeWindow!==t.parent&&this._activeWindow.parent!==t&&(this._activeWindow=t)},ol.prototype.isActive=function(t){return this._ensureActiveWindow(t),this._activeWindow===t},ol.prototype.setActiveWindow=function(t){this._activeWindow=t},ol.prototype.getActiveWindow=function(t){return this._ensureActiveWindow(t),this._activeWindow},ol.prototype.getPosition=function(){return new M(this._x,this._y)},ol.prototype.move=function(t){return this._x=t.x,this._y=t.y,this._ui.move(t)},ol.prototype.hide=function(){return this._ui.hide?this._ui.hide():m.Promise.resolve()},ol.prototype.show=function(){return this._ui.show?this._ui.show():m.Promise.resolve()},ol.prototype.leftButtonDown=function(){return this._ui.leftButtonDown()},ol.prototype.rightButtonDown=function(){return this._ui.rightButtonDown()},ol.prototype.buttonUp=function(){return this._ui.buttonUp()},ol);function ol(t,e){this._ui=e,this._x=-1,this._y=-1,this._activeWindow=t}var rl,sl,ll,al,ul=Ss(Md)?o.default.iframeCursorUI:o.default.cursorUI,cl=new il(Md.top,ul),fl=E.default.positionUtils,dl=E.default.domUtils,hl=E.default.eventUtils,ml="elementOverlapped";(sl=rl=rl||{})[sl.Mouse=0]="Mouse",sl[sl.Keyboard=1]="Keyboard",sl[sl.Touch=2]="Touch",sl[sl.Delay=3]="Delay",sl[sl.InsertText=4]="InsertText",(al=ll=ll||{})[al.alt=1]="alt",al[al.ctrl=2]="ctrl",al[al.meta=4]="meta";var pl={ctrl:!(al[al.shift=8]="shift"),alt:!1,shift:!1,meta:!1};function vl(t){var e=0;return t&&(t.ctrl&&(e|=ll.ctrl),t.alt&&(e|=ll.alt),t.shift&&(e|=ll.shift),t.meta&&(e|=ll.meta)),e}function gl(t){return ll[t]||0}var yl=y.default.utils,El=y.default.eventSandbox,bl=y.default.nativeMethods,Sl=El.message,_l={clickCount:1,force:.5},wl="native-automation|calculate-top-left-point|request",Pl="native-automation|calculate-top-left-point|response";function xl(){return C(this,void 0,void 0,function(){return T(this,function(t){switch(t.label){case 0:return Md===Md.parent?[3,2]:[4,Ps({cmd:wl},Pl,Md.parent)];case 1:return[2,t.sent().topLeftPoint];case 2:return[2,{x:0,y:0}]}})})}Sl.on(Sl.SERVICE_MSG_RECEIVED_EVENT,function(d){return C(void 0,void 0,void 0,function(){var r,s,l,a,u,c,f;return T(this,function(t){switch(t.label){case 0:return d.message.cmd!==wl?[3,2]:(r=d.source,[4,xl()]);case 1:s=t.sent(),l=s.x,a=s.y,u=$(r),n=(e=u).getBoundingClientRect(),i=ht(e),o=mt(e),c={x:n.left+i.left+o.left,y:n.top+i.top+o.top},f={cmd:Pl,topLeftPoint:{x:c.x+l,y:c.y+a}},Sl.sendServiceMsg(f,r),t.label=2;case 2:return[2]}var e,n,i,o})})});var Al=(Cl._isNonCharKeyModifier=function(t){var e=[ll.ctrl,ll.alt,ll.meta];return-1<bl.arrayIndexOf.call(e,t)},Cl._getKeyDownEventText=function(t){return t.isNewLine?"\r":1!==t.keyProperty.length||Cl._isNonCharKeyModifier(t.modifiers)?"":t.keyProperty},Cl.createKeyDownOptions=function(t){var e=Cl._getKeyDownEventText(t);return{type: