testcafe 2.3.1-rc.2 → 2.4.0-rc.1
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.
- package/CHANGELOG.md +15 -1
- package/LICENSE +1 -1
- package/README.md +40 -46
- package/lib/api/test-controller/execution-context.js +4 -2
- package/lib/browser/connection/gateway.js +43 -1
- package/lib/browser/connection/index.js +24 -10
- package/lib/browser/connection/service-routes.js +3 -1
- package/lib/browser/provider/built-in/dedicated/chrome/index.js +19 -5
- package/lib/browser/provider/index.js +4 -1
- package/lib/client/automation/deps/hammerhead.js +24 -0
- package/lib/client/automation/deps/testcafe-core.js +24 -0
- package/lib/client/automation/index.js +251 -54
- package/lib/client/automation/index.min.js +1 -1
- package/lib/client/automation/playback/press/get-key-info.js +44 -0
- package/lib/client/automation/playback/press/utils.js +142 -0
- package/lib/client/automation/utils/get-key-code.js +15 -0
- package/lib/client/automation/utils/get-key-identifier.js +14 -0
- package/lib/client/automation/utils/is-letter.js +7 -0
- package/lib/client/automation/utils/key-identifier-maps.js +93 -0
- package/lib/client/browser/idle-page/index.js +7 -2
- package/lib/client/core/index.js +46 -3
- package/lib/client/core/index.min.js +1 -1
- package/lib/client/driver/index.js +45 -17
- package/lib/client/driver/index.min.js +1 -1
- package/lib/client/test-run/index.js.mustache +34 -30
- package/lib/client/ui/index.js +3230 -48
- package/lib/client/ui/index.min.js +1 -1
- package/lib/client/ui/sprite.svg +15 -0
- package/lib/client/ui/styles.css +183 -41
- package/lib/live/test-runner.js +4 -2
- package/lib/proxyless/api-base.js +3 -2
- package/lib/proxyless/client/event-descriptor.js +67 -0
- package/lib/proxyless/client/input.js +36 -0
- package/lib/proxyless/client/key-press/utils.js +31 -0
- package/lib/proxyless/client/types.js +1 -1
- package/lib/proxyless/client/utils.js +32 -2
- package/lib/proxyless/cookie-provider.js +31 -3
- package/lib/proxyless/errors.js +20 -0
- package/lib/proxyless/index.js +2 -10
- package/lib/proxyless/request-pipeline/index.js +32 -3
- package/lib/proxyless/resource-injector.js +5 -4
- package/lib/proxyless/types.js +3 -2
- package/lib/proxyless/utils/cdp.js +4 -3
- package/lib/reporter/index.js +2 -1
- package/lib/runner/bootstrapper.js +8 -1
- package/lib/runner/index.js +57 -44
- package/lib/shared/utils/is-file-protocol.js +2 -2
- package/lib/test-run/commands/actions.js +2 -2
- package/lib/test-run/cookies/base.js +4 -1
- package/lib/test-run/cookies/provider.js +9 -2
- package/lib/test-run/execute-js-expression/index.js +4 -2
- package/lib/test-run/index.js +17 -12
- package/lib/test-run/request/create-request-options.js +23 -12
- package/lib/test-run/request/send.js +2 -3
- package/lib/utils/check-is-vm.js +58 -0
- package/package.json +9 -6
- package/lib/proxyless/client/event-simulator.js +0 -40
|
@@ -1 +1 @@
|
|
|
1
|
-
window["%hammerhead%"].utils.removeInjectedScript(),function pi(mi){var gi=mi.document;!function(d,u){var f="default"in d?d.default:d;u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;var e=f.utils.browser,t={alt:18,ctrl:17,meta:91,shift:16},n={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},o={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},r={left:e.isIE?"Left":"ArrowLeft",down:e.isIE?"Down":"ArrowDown",right:e.isIE?"Right":"ArrowRight",up:e.isIE?"Up":"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:e.isIE?"Spacebar":" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var a={modifiers:t,shiftMap:n,specialKeys:o,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:e.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:i(t),reversedShiftMap:i(n),reversedSpecialKeys:i(o),reversedKeyProperty:i(r)},s=f.Promise,l=f.nativeMethods;function c(t){return new s(function(e){return l.setTimeout.call(mi,e,t)})}var h=(p.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},p.prototype._offListening=function(){this._emitter.offAll()},p.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},p.prototype._onRequestCompleted=function(e){var t=this;c(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},p.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},p.prototype._onRequestError=function(e){this._onRequestFinished(e)},p.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},p.prototype.wait=function(e){var n=this;return c(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new d.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},p.TIMEOUT)):n._finishWaiting()})})},p.TIMEOUT=3e3,p);function p(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function E(e,a,s,l){return new(s=s||u)(function(n,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,r)}i((l=l.apply(e,a||[])).next())})}function v(n,o){var r,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function e(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;l&&t[l=0]&&(s=0),s;)try{if(r=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function y(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var b=(C.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},C.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},C.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=d.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},C.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},C.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._eventsListeners[t];if(o)for(var r=0;r<o.length;r++)try{o[r].apply(this,e)}catch(e){if(!(e.message&&-1<e.message.indexOf("freed script")))throw e;this.off(t,o[r])}},C);function C(){this._eventsListeners={}}var S,w="request-send",T="request-completed",_="request-error",I=(g(P,S=b),P.prototype._addHammerheadListener=function(e,t){f.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},P.prototype.onRequestSend=function(e){this.on(w,e)},P.prototype.onRequestCompleted=function(e){this.on(T,e)},P.prototype.onRequestError=function(e){this.on(_,e)},P.prototype.offAll=function(){S.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];f.off.call(f,n.evt,n.listener)}},P);function P(){var n=S.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(f.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(w,t)}),n._addHammerheadListener(f.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(f.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(_,t)}),n._addHammerheadListener(f.EVENTS.fetchSent,function(e){n.emit(w,e),e.then(function(){return n.emit(T,e)},function(){return n.emit(_,e)})}),n}var N=(x.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},x.prototype._offListening=function(){this._emitter.offAll()},x.prototype._onScriptElementAdded=function(e){var t=this,n=(0,d.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},x.LOADING_TIMEOUT);this._scripts.set(e,n)},x.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,d.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||c(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},x.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},x.prototype.wait=function(){var n=this;return new d.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},x.TIMEOUT)):n._finishWaiting()})},x.TIMEOUT=3e3,x.LOADING_TIMEOUT=2e3,x);function x(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var R,M=f.nativeMethods,O="script-added",F="script-loaded-or-failed",A=(g(L,R=b),L.prototype._onScriptElementAdded=function(e){var t,n=this,o=M.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(O,e),t=function(){M.removeEventListener.call(e,"load",t),M.removeEventListener.call(e,"error",t),n.emit(F,e)},M.addEventListener.call(e,"load",t),M.addEventListener.call(e,"error",t))},L.prototype.onScriptAdded=function(e){this.on(O,e)},L.prototype.onScriptLoadedOrFailed=function(e){this.on(F,e)},L.prototype.offAll=function(){R.prototype.offAll.call(this),f.off(f.EVENTS.scriptElementAdded,this._onScriptElementAdded)},L);function L(){var n=R.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},f.on(f.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function V(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=d.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var W=V("filter"),k=V("map"),H=V("slice"),D=V("splice"),U=V("unshift"),B=V("forEach"),q=V("indexOf"),G=V("some"),j=V("reverse"),z=V("reduce"),J=V("concat"),K=V("join");function Y(e,t){if(d.nativeMethods.arrayFind)return d.nativeMethods.arrayFind.call(e,t);for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null}var X=Object.freeze({__proto__:null,filter:W,map:k,slice:H,splice:D,unshift:U,forEach:B,indexOf:q,some:G,reverse:j,reduce:z,concat:J,join:K,isArray:function(e){return"[object Array]"===d.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(d.nativeMethods.arrayFrom)return d.nativeMethods.arrayFrom.apply(d.nativeMethods,y([e],t,!1));for(var o=[],r=e.length,i=0;i<r;i++)o.push(e[i]);return o},find:Y,remove:function(e,t){var n=d.nativeMethods.arrayIndexOf.call(e,t);-1<n&&d.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),Q=f.utils.browser,$=f.nativeMethods,Z=f.utils.style.get,ee=f.utils.dom.getActiveElement,te=f.utils.dom.findDocument,ne=f.utils.dom.find,oe=f.utils.dom.isElementInDocument,re=f.utils.dom.isElementInIframe,ie=f.utils.dom.getIframeByElement,ae=f.utils.dom.isCrossDomainWindows,se=f.utils.dom.getSelectParent,le=f.utils.dom.getChildVisibleIndex,ce=f.utils.dom.getSelectVisibleChildren,ue=f.utils.dom.isElementNode,de=f.utils.dom.isTextNode,fe=f.utils.dom.isRenderedNode,he=f.utils.dom.isIframeElement,pe=f.utils.dom.isInputElement,me=f.utils.dom.isButtonElement,ge=f.utils.dom.isFileInput,Ee=f.utils.dom.isTextAreaElement,ve=f.utils.dom.isAnchorElement,ye=f.utils.dom.isImgElement,be=f.utils.dom.isFormElement,Ce=f.utils.dom.isLabelElement,Se=f.utils.dom.isSelectElement,we=f.utils.dom.isRadioButtonElement,Te=f.utils.dom.isColorInputElement,_e=f.utils.dom.isCheckboxElement,Ie=f.utils.dom.isOptionElement,Pe=f.utils.dom.isSVGElement,Ne=f.utils.dom.isMapElement,xe=f.utils.dom.isBodyElement,Re=f.utils.dom.isHtmlElement,Me=f.utils.dom.isDocument,Oe=f.utils.dom.isWindow,Fe=f.utils.dom.isTextEditableInput,Ae=f.utils.dom.isTextEditableElement,Le=f.utils.dom.isTextEditableElementAndEditingAllowed,Ve=f.utils.dom.isContentEditableElement,We=f.utils.dom.isDomElement,ke=f.utils.dom.isShadowUIElement,He=f.utils.dom.isShadowRoot,De=f.utils.dom.isElementFocusable,Ue=f.utils.dom.isHammerheadAttr,Be=f.utils.dom.isElementReadOnly,qe=f.utils.dom.getScrollbarSize,Ge=f.utils.dom.getMapContainer,je=f.utils.dom.getTagName,ze=f.utils.dom.closest,Je=f.utils.dom.getParents,Ke=f.utils.dom.findParent,Ye=f.utils.dom.getTopSameDomainWindow,Xe=f.utils.dom.getParentExceptShadowRoot;function Qe(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,he(e)&&(e=$.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===Z(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],a=null,s=null,l=null,c=!1,u=0;u<n.length;u++){a=n[u],s=je(a),l=$e(a),c=!1,function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=$.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===Z(e,"display")||"hidden"===Z(e,"visibility")||(Q.isIE||Q.isAndroid)&&Ie(e)||null!==n&&n<0)}(a,e,l)&&(r.test(s)||a.shadowRoot||he(a)?c=!0:ve(a)&&a.hasAttribute("href")&&(c=""!==a.getAttribute("href")||!Q.isIE||null!==l),""!==(t=a.getAttribute("contenteditable"))&&"true"!==t||(c=!0),null!==l&&(c=!0),c&&i.push(a))}return W(i,function(e){return!Ze(o,e)})}(e);r<i.length;r++){var a=i[r],s=!t||a.tabIndex<=0?-1:a.tabIndex;o.children[s]=o.children[s]||[],o.children[s].push(Qe(a,t))}return o}function $e(e){var t=$.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function Ze(e,t){return e.contains?e.contains(t):G(e,function(e){return e.contains(t)})}function et(e,t){if(nt(t,e))return!0;for(var n=$.nodeChildNodesGetter.call(e),o=st(n),r=0;r<o;r++){var i=n[r];if(!ke(i)&&et(i,t))return!0}return!1}function tt(e,t){var n=e.querySelectorAll(je(t));return q(n,t)}function nt(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function ot(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!Q.isFirefox&&!Q.isWebKit||t.top===t||e)||!(!e||!$.contentDocumentGetter.call(e))}function rt(e){try{return e.top===e}catch(e){return!1}}function it(e){var t=[];ne(gi,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&ne(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if($.contentWindowGetter.call(t[n])===e)return t[n];return null}function at(e){return $.htmlCollectionLengthGetter.call(e)}function st(e){return $.nodeListLengthGetter.call(e)}function lt(e){return $.inputValueGetter.call(e)}function ct(e){return $.textAreaValueGetter.call(e)}function ut(e,t){return $.inputValueSetter.call(e,t)}function dt(e,t){return $.textAreaValueSetter.call(e,t)}function ft(e){return pe(e)?lt(e):Ee(e)?ct(e):e.value}function ht(e){return e&&e.getRootNode&&te(e)!==e.getRootNode()}var pt=Object.freeze({__proto__:null,getActiveElement:ee,findDocument:te,find:ne,isElementInDocument:oe,isElementInIframe:re,getIframeByElement:ie,isCrossDomainWindows:ae,getSelectParent:se,getChildVisibleIndex:le,getSelectVisibleChildren:ce,isElementNode:ue,isTextNode:de,isRenderedNode:fe,isIframeElement:he,isInputElement:pe,isButtonElement:me,isFileInput:ge,isTextAreaElement:Ee,isAnchorElement:ve,isImgElement:ye,isFormElement:be,isLabelElement:Ce,isSelectElement:Se,isRadioButtonElement:we,isColorInputElement:Te,isCheckboxElement:_e,isOptionElement:Ie,isSVGElement:Pe,isMapElement:Ne,isBodyElement:xe,isHtmlElement:Re,isDocument:Me,isWindow:Oe,isTextEditableInput:Fe,isTextEditableElement:Ae,isTextEditableElementAndEditingAllowed:Le,isContentEditableElement:Ve,isDomElement:We,isShadowUIElement:ke,isShadowRoot:He,isElementFocusable:De,isHammerheadAttr:Ue,isElementReadOnly:Be,getScrollbarSize:qe,getMapContainer:Ge,getTagName:je,closest:ze,getParents:Je,findParent:Ke,getTopSameDomainWindow:Ye,getParentExceptShadowRoot:Xe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||he(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var a=i[r];o.push.apply(o,e(a))}return o}(Qe(e,t))},getTabIndexAttributeIntValue:$e,containsElement:Ze,getTextareaIndentInLine:function(e,t){var n=ct(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=ct(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=ct(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return(Q.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:Q.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:Q.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Le(e)||Ve(e):Ae(e)||Ve(e)},isElementContainsNode:et,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===f.utils.dom.instanceToString(e)},getElementIndexInParent:tt,isTheSameNode:nt,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(je(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Je(e),n=0;n<t.length;n++)if(De(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:ot,isTopWindow:rt,findIframeByWindow:it,isEditableFormElement:function(e){return Ae(e)||Se(e)},getCommonAncestor:function(e,t){if(nt(e,t))return e;for(var n=[e].concat(Je(e)),o=t;o;){if(-1<q(n,o))return o;o=$.nodeParentNodeGetter.call(o)}return o},getChildrenLength:at,getChildNodesLength:st,getInputValue:lt,getTextAreaValue:ct,setInputValue:ut,setTextAreaValue:dt,getElementValue:ft,setElementValue:function(e,t){return pe(e)?ut(e,t):Ee(e)?dt(e,t):e.value=t},isShadowElement:ht,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ke(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return $.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===gi.documentElement}}),mt=f.Promise,gt=f.nativeMethods,Et=f.eventSandbox.listeners,vt=f.utils.browser,yt=f.utils.event.BUTTON,bt=f.utils.event.BUTTONS_PARAMETER,Ct=f.utils.event.DOM_EVENTS,St=f.utils.event.WHICH_PARAMETER,wt=f.utils.event.preventDefault;function Tt(e,t,n,o){vt.isIE11&&Oe(e)?gt.windowAddEventListener.call(e,t,n,o):gt.addEventListener.call(e,t,n,o)}function _t(e,t,n,o){vt.isIE11&&Oe(e)?gt.windowRemoveEventListener.call(e,t,n,o):gt.removeEventListener.call(e,t,n,o)}function It(){var n=[],e=!1;function t(){e||(gi.body?(e=!0,n.forEach(function(e){return e()})):gt.setTimeout.call(mi,t,1))}function o(){(ot(mi)||rt(mi))&&(_t(gi,"DOMContentLoaded",o),t())}return"complete"===gi.readyState?gt.setTimeout.call(mi,o,1):Tt(gi,"DOMContentLoaded",o),{then:function(e){return t=e,new mt(function(e){return n.push(function(){return e(t())})});var t}}}var Pt,Nt,xt=Object.freeze({__proto__:null,BUTTON:yt,BUTTONS_PARAMETER:bt,DOM_EVENTS:Ct,WHICH_PARAMETER:St,preventDefault:wt,bind:Tt,unbind:_t,documentReady:function(e){return void 0===e&&(e=0),It().then(function(){return Et.getEventListeners(mi,"load").length?mt.race([new mt(function(e){return Tt(mi,"load",e)}),c(e)]):null})}});(Nt=Pt=Pt||{}).ready="ready",Nt.readyForBrowserManipulation="ready-for-browser-manipulation",Nt.waitForFileDownload="wait-for-file-download";var Rt=Pt,Mt=f.Promise,Ot=f.utils.browser,Ft=f.nativeMethods,At=f.transport,Lt=30,Vt=500,Wt=!1,kt=null,Ht=!1;function Dt(){if(Ot.isIE)return function(e){Bt&&Ft.clearTimeout.call(mi,Bt),Ut=!0,Bt=Ft.setTimeout.call(mi,function(){Bt=null,Ut=!1,qt.forEach(function(e){return e()}),qt=[]},e)}(Lt),void c(0).then(function(){var e;"loading"===gi.readyState&&((e=Ft.documentActiveElementGetter.call(gi))&&ve(e)&&e.hasAttribute("download")||(Wt=!0))});Wt=!0}var Ut=!1,Bt=null,qt=[],Gt=Object.freeze({__proto__:null,init:function(){f.on(f.EVENTS.beforeUnload,Dt),Tt(mi,"unload",function(){Wt=!0})},watchForPageNavigationTriggers:function(){kt=function(){Ht=!0},f.on(f.EVENTS.pageNavigationTriggered,kt)},wait:function(e){void 0===e&&(e=!kt||Ht?400:0),kt&&(f.off(f.EVENTS.pageNavigationTriggered,kt),kt=null);var t=c(e).then(function(){return Wt?c(Vt).then(function(){return At.queuedAsyncServiceMsg({cmd:Rt.waitForFileDownload})}).then(function(e){if(!e)return new Mt(function(){})}).then(function(){Wt=!1}):Ut?new Mt(function(e){return qt.push(e)}):void 0}),n=c(15e3).then(function(){Wt=!1});return Mt.race([t,n])}}),jt=b,zt=Object.freeze({__proto__:null,EventEmitter:jt,inherit:function(e,t){function n(){}n.prototype=t.prototype,f.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Jt=d.eventSandbox.listeners;function Kt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new jt}var Yt=(Kt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},Kt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Jt.initElementListening(mi,["scroll"]),Jt.addFirstInternalEventBeforeListener(mi,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},Kt.prototype.waitForScroll=function(e){var t=this,n=null,o=new d.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},Kt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),ht(n)&&(Jt.initElementListening(n,["scroll"]),Jt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Jt.cancelElementListening(n)}))},Kt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Kt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Kt),Xt=(Qt.create=function(e){return new Qt(e.top,e.right,e.bottom,e.left)},Qt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},Qt.prototype.sub=function(e){return"top"in e&&(this.top-=e.top,this.left-=e.left),this.bottom-=e.bottom,this.right-=e.right,this},Qt.prototype.round=function(e,t){return void 0===e&&(e=Math.round),void 0===t&&(t=e),this.top=e(this.top),this.right=t(this.right),this.bottom=t(this.bottom),this.left=e(this.left),this},Qt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},Qt);function Qt(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var $t=f.utils.style,Zt=f.utils.style.getBordersWidth,en=f.utils.style.getComputedStyle,tn=f.utils.style.getElementMargin,nn=f.utils.style.getElementPadding,on=f.utils.style.getElementScroll,rn=f.utils.style.getOptionHeight,an=f.utils.style.getSelectElementSize,sn=f.utils.style.isElementVisible,ln=f.utils.style.isVisibleChild,cn=f.utils.style.getWidth,un=f.utils.style.getHeight,dn=f.utils.style.getInnerWidth,fn=f.utils.style.getInnerHeight,hn=f.utils.style.getScrollLeft,pn=f.utils.style.getScrollTop,mn=f.utils.style.setScrollLeft,gn=f.utils.style.setScrollTop,En=f.utils.style.get,vn=f.utils.style.getBordersWidthFloat,yn=f.utils.style.getElementPaddingFloat;function bn(e,t,n){for(var o in"string"==typeof t&&$t.set(e,t,n),t)t.hasOwnProperty(o)&&$t.set(e,o,t[o])}function Cn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function Sn(e){return!!Ke(e,!0,function(e){return ue(e)&&"hidden"===$t.get(e,"visibility")})}function wn(e){return!!Ke(e,!0,function(e){return ue(e)&&"none"===$t.get(e,"display")})}function Tn(e){return!fe(e)||wn(e)||Sn(e)}function _n(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function In(e){return ue(e)&&"fixed"===$t.get(e,"position")}var Pn=Object.freeze({__proto__:null,getBordersWidth:Zt,getComputedStyle:en,getElementMargin:tn,getElementPadding:nn,getElementScroll:on,getOptionHeight:rn,getSelectElementSize:an,isElementVisible:sn,isSelectVisibleChild:ln,getWidth:cn,getHeight:un,getInnerWidth:dn,getInnerHeight:fn,getScrollLeft:hn,getScrollTop:pn,setScrollLeft:mn,setScrollTop:gn,get:En,getBordersWidthFloat:vn,getElementPaddingFloat:yn,set:bn,getViewportDimensions:function(){return{width:Cn(mi.innerWidth,gi.documentElement.clientWidth,gi.body.clientWidth),height:Cn(mi.innerHeight,gi.documentElement.clientHeight,gi.body.clientHeight)}},getWindowDimensions:function(e){return new Xt(0,cn(e),un(e),0)},isHiddenNode:Sn,isNotDisplayedNode:wn,isNotVisibleNode:Tn,hasDimensions:_n,isFixedElement:In}),Nn=d.utils.browser,xn=d.eventSandbox.listeners,Rn=d.eventSandbox.eventSimulator,Mn=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],On=123;function Fn(e,t,n,o,r){var i,a=d.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!ke(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&Nn.isMacPlatform||i.keyCode===On))return void r();if("blur"===e.type)if(Nn.isIE&&Nn.version<12){var s,l=Oe(a),c=!l&&"none"===En(a,"display"),u=!1;l||c||(s=Je(a),u=W(s,function(e){return"none"===En(e,"display")})),(c||u.length)&&d.eventSandbox.timers.deferFunction(function(){Rn.blur(a)})}else if(a!==mi&&a!==mi.document&&!_n(a))return;n()}}var An=(Ln.create=function(e){return"left"in e?new Ln(e.left,e.top):"right"in e?new Ln(e.right,e.bottom):new Ln(e.x,e.y)},Ln.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Ln.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Ln.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Ln.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Ln.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Ln.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Ln);function Ln(e,t){this.x=e,this.y=t}var Vn=/auto|scroll|hidden/i,Wn="visible";function kn(e){var t,n=En(e,"overflowX"),o=En(e,"overflowY"),r=Vn.test(n),i=Vn.test(o),a=te(e).documentElement,s=e.scrollHeight;return(d.utils.browser.isChrome||d.utils.browser.isFirefox||d.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,s=s-a.getBoundingClientRect().top+t),(r||i)&&s>a.scrollHeight}function Hn(e){if(xe(e))return kn(e);if(Re(e))return function(e){var t=En(e,"overflowX"),n=En(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(kn(i))return!1;var a=Math.min(e.clientWidth,i.clientWidth),s=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>s||i.scrollWidth>a}(e);var t,n,o,r,i,a=(n=En(t=e,"overflowX"),o=En(t,"overflowY"),r=Vn.test(n),i=Vn.test(o),d.utils.browser.isIE&&(r=r||i&&n===Wn,i=i||r&&o===Wn),new An(r,i));if(!a.x&&!a.y)return!1;var s=a.y&&e.scrollHeight>e.clientHeight;return a.x&&e.scrollWidth>e.clientWidth||s}function Dn(e){var t,n,o=Je(e);return!re(e)||(t=ie(e))&&(n=Je(t),o.concat(n)),d.nativeMethods.arrayFilter.call(o,Hn)}var Un=Object.freeze({__proto__:null,hasScroll:Hn,getScrollableParents:Dn}),Bn=f.shadowUI,qn=f.nativeMethods,Gn="disabled";function jn(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var zn=(jn.prototype._createOption=function(e,t){var n=gi.createElement("div"),o=e.disabled||"optgroup"===je(e.parentElement)&&e.parentElement.disabled,r="option"===je(e)?e.text:"";qn.nodeTextContentSetter.call(n,r),t.appendChild(n),Bn.addClass(n,"tcOption"),o&&(Bn.addClass(n,Gn),bn(n,"color",En(e,"color"))),this.options.push(n)},jn.prototype._createGroup=function(e,t){var n=gi.createElement("div");qn.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),Bn.addClass(n,"tcOptionGroup"),e.disabled&&(Bn.addClass(n,Gn),bn(n,"color",En(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},jn.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},jn.prototype.createChildren=function(e,t){for(var n=at(e),o=0;o<n;o++)Ie(e[o])?this._createOption(e[o],t):"optgroup"===je(e[o])&&this._createGroup(e[o],t)},jn.prototype.getEmulatedChildElement=function(e){var t="optgroup"===je(e),n=tt(this.currentEl,e);return t?this.groups[n]:this.options[n]},jn.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},jn.prototype.isOptionElementVisible=function(e){var t=se(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=an(t);return n||1<o},new jn),Jn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},Kn={notElementOrTextNode:function(e){return"\n The ".concat(e," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(e,t){return"\n The ".concat(t," (").concat(e,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(e,t,n,o){return"\n The ".concat(t," (").concat(e,") is too small to be visible: ").concat(n,"px x ").concat(o,"px.\n ")},elHasDisplayNone:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(e,t){return"\n The ".concat(t," (").concat(e,") has not been rendered.\n ")},optionNotVisible:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(e,t){return"\n The action target (".concat(e,") is invisible because ").concat(t,"\n ")}},Yn=f.utils.html,Xn=f.nativeMethods,Qn=10;function $n(e){if(!e)return"";var t,n,o,r=Xn.cloneNode.call(e),i=Yn.cleanUpHtml(Xn.elementOuterHTMLGetter.call(r)),a=(t=Xn.nodeTextContentGetter.call(e),n=Qn,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),s=Xn.elementChildrenGetter.call(e);return 0<Xn.htmlCollectionLengthGetter.call(s)?i.replace("></",">...</"):a?i.replace("></",">".concat(a,"</")):i}var Zn=f.utils.position.getElementRectangle,eo=f.utils.position.getOffsetPosition,to=f.utils.position.offsetToClientCoords;function no(e){var t,n,o,r,i=Re(e),a=i?e.getElementsByTagName("body")[0]:null,s=e.getBoundingClientRect(),l=Xt.create(Zt(e)),c=on(e),u=re(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new An(0,0):An.create(s),h=s.height,p=s.width;i&&(p=a&&d?(h=a.clientHeight,a.clientWidth):(h=e.clientHeight,e.clientWidth)),!u||(t=ie(e))&&(n=eo(t),o=to(An.create(n)),r=Zt(t),f.add(o).add(An.create(r)),i&&l.add(r));var m=!i&&dn(e)!==e.clientWidth,g=!i&&fn(e)!==e.clientHeight,E={right:m?qe():0,bottom:g?qe():0};return new Jn(p,h,f,l,c,E)}function oo(e){var t=e.x,n=e.y,o=gi.getElementFromPoint||gi.elementFromPoint,r=null;try{r=o.call(gi,t,n)}catch(e){return null}for(null===r&&(r=o.call(gi,t-1,n-1));r&&r.shadowRoot&&r.shadowRoot.elementFromPoint;){var i=r.shadowRoot.elementFromPoint(t,n);if(!i||r===i)break;r=i}return r}function ro(e,t){return Xt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function io(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=te(e.target||e.srcElement),i=r.documentElement,a=r.body;return new An(Math.round(t.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i.clientTop||0)))}return new An(Math.round(t.pageX),Math.round(t.pageY))}function ao(e){return!uo(e)}function so(e){return"hidden"===En(e,"visibility")}function lo(e){return"collapse"===En(e,"visibility")}function co(e){return"none"===En(e,"display")}function uo(e){return!ht(e)&&(so(e)||lo(e)||co(e))}function fo(e){var t=Zn(e);return 0===t.width||0===t.height}function ho(e){return e.replace(/.*The/,"its")}var po=Object.freeze({__proto__:null,getElementRectangle:Zn,getOffsetPosition:eo,offsetToClientCoords:to,getClientDimensions:no,getElementFromPoint:oo,calcRelativePosition:ro,getIframeClientCoordinates:function(e){var t=eo(e),n=t.left,o=t.top,r=to({x:n,y:o}),i=Zt(e),a=nn(e),s=r.x+i.left+a.left,l=r.y+i.top+a.top;return new Xt(l,s+cn(e),l+un(e),s)},containsOffset:function(e,t,n){var o=no(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),a=o.scrollbar.right+o.border.left+o.border.right+r,s=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=a)&&(void 0===n||0<=n&&n<=s)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=io(e),a=te(r),s=0,l=0;return!re(a.documentElement)||(t=ie(a))&&(n=eo(t),o=Zt(t),s=n.left+o.left,l=n.top+o.top),new An(i.x+s,i.y+l)},getEventPageCoordinates:io,getIframePointRelativeToParentFrame:function(e,t){var n=it(t),o=eo(n),r=Zt(n),i=nn(n);return to({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=Zn(e);return new An(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=eo(e),n=t.left,o=t.top,r=to({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=mi.screenLeft||mi.screenX,t=mi.screenTop||mi.screenY;return new An(e,t)},isIframeVisible:ao,isElementVisible:function e(t){if(!We(t)&&!de(t))return!1;if(Ie(t)||"optgroup"===je(t))return zn.isOptionElementVisible(t);if(he(t))return ao(t);if(Pe(t))return!Ke(t,!0,uo)&&!fo(t);if(de(t))return!Tn(t);if(!Ve(t)&&fo(t))return!1;if(Ne(t)){var n=Ge(ze(t,"map"));return!!n&&e(n)}return _n(t)&&!uo(t)},getSubHiddenReason:ho,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=de(t);if(!We(t)&&!o)return Kn.notElementOrTextNode(n);var r=o?t.data:$n(t),i=t.offsetHeight,a=t.offsetWidth;if((Ie(t)||"optgroup"===je(t))&&!zn.isOptionElementVisible(t)){var s=$n(se(t));return Kn.optionNotVisible(r,n,s)}if(Ne(t)){var l=ho(e(Ge(ze(t,"map")),"container")||"");return Kn.mapContainerNotVisible(r,l)}var c=Ke(t,!1,so);if(c)return Kn.parentHasVisibilityHidden(r,n,$n(c));var u=Ke(t,!1,lo);if(u)return Kn.parentHasVisibilityCollapse(r,n,$n(u));var d=Ke(t,!1,co);return d?Kn.parentHasDisplayNone(r,n,$n(d)):so(t)?Kn.elHasVisibilityHidden(r,n):lo(t)?Kn.elHasVisibilityCollapse(r,n):co(t)?Kn.elHasDisplayNone(r,n):de(t)&&!fe(t)?Kn.elNotRendered(r,n):!Ve(t)&&fo(t)||!_n(t)?Kn.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=$n(t);if(Ne(t)){var r=ho(e(Ge(ze(t,"map")),"container")||"");return Kn.mapContainerNotVisible(o,r)}return Kn.elOutsideBounds(o,n)}});function mo(n,o){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var go=Object.freeze({__proto__:null,whilst:function(t,n){return E(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:mo,each:function(r,i){return E(this,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),Eo=f.Promise,vo=f.eventSandbox.message;function yo(e,o,t){return new Eo(function(n){vo.on(vo.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(vo.off(vo.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),vo.sendServiceMsg(e,t)})}var bo=(Co._isScrollValuesChanged=function(e,t){return hn(e)!==t.left||pn(e)!==t.top},Co.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Re(e)?te(e):e,a={left:hn(i),top:pn(i)},o=Math.max(o,0),r=Math.max(r,0),s=Yt.waitForScroll(i);return mn(i,o),gn(i,r),Co._isScrollValuesChanged(i,a)?s=s.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=Co._isScrollValuesChanged(i,a))}):(s.cancel(),d.Promise.resolve())},Co.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),a=this._scrollToCenter?r:Math.min(n.top,r),s=e.scroll,l=s.left,c=s.top,u=t.x>=l+e.width-i,d=t.x<=l+i,f=t.y>=c+e.height-a,h=t.y<=c+a;return u?l=t.x-e.width+i:d&&(l=t.x-i),f?c=t.y-e.height+a:h&&(c=t.y-a),{left:l,top:c}},Co.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,a,s={left:null,top:null},l=e.width>=t.width,c=e.height>=t.height,u=ro(t,e);return l&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),u.left<r?s.left=Math.round(e.scroll.left+u.left-r):u.right<r&&(s.left=Math.round(e.scroll.left+Math.min(u.left,-u.right)+r))),c&&(i=e.height-t.height,a=Math.min(n.top,i),this._scrollToCenter&&(a=i/2),u.top<a?s.top=Math.round(e.scroll.top+u.top-a):u.bottom<a&&(s.top=Math.round(e.scroll.top+Math.min(u.top,-u.bottom)+a))),s},Co._getChildPoint=function(e,t,n){return An.create(t).sub(An.create(e)).add(An.create(e.scroll)).add(An.create(t.border)).add(n)},Co.prototype._getScrollPosition=function(e,t,n,o){var r=Co._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),a=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===a.left?i.left:a.left,0),top:Math.max(null===a.top?i.top:a.top,0)}},Co._getChildPointAfterScroll=function(e,t,n,o){return An.create(t).add(An.create(e.scroll)).sub(An.create(n)).add(o)},Co.prototype._isChildFullyVisible=function(e,t,n){var o=Co._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,a=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&a===e.scroll.top},Co.prototype._scrollToChild=function(e,t,n){for(var o=no(e),r=no(t),i=dn(mi),a=fn(mi),s=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){s=this._getScrollPosition(o,r,n,this._maxScrollMargin);var c=Co._getChildPointAfterScroll(o,r,s,n),u=this._isTargetElementObscuredInPoint(c);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),l=u&&this._maxScrollMargin.top<a}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,s)},Co.prototype._scrollElement=function(){if(!Hn(this._element))return d.Promise.resolve();var e=no(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},Co.prototype._scrollParents=function(){var t,n,o=this,r=Dn(this._element),i=this._element,e=hn(i),a=pn(i),s=An.create(this._offsets).sub(new An(e,a).round()),l=mo(r.length,function(e){return o._scrollToChild(r[e],i,s).then(function(){t=no(i),n=no(r[e]),s.add(An.create(t)).sub(An.create(n)).add(An.create(n.border)),i=r[e]})}),c={scrollWasPerformed:this._scrollWasPerformed,offsetX:s.x,offsetY:s.y,maxScrollMargin:this._maxScrollMargin};return l.then(function(){var e;if(!o._skipParentFrames&&(e=mi).top!==e)return c.cmd=Co.SCROLL_REQUEST_CMD,yo(c,Co.SCROLL_RESPONSE_CMD,mi.parent)}).then(function(){return o._scrollWasPerformed})},Co._getFixedAncestorOrSelf=function(e){return Ke(e,!0,In)},Co.prototype._isTargetElementObscuredInPoint=function(e){var t=oo(e);if(!t)return!1;var n=Co._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},Co.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},Co.SCROLL_REQUEST_CMD="automation|scroll|request",Co.SCROLL_RESPONSE_CMD="automation|scroll|response",Co);function Co(e,t,n){this._element=e,this._offsets=new An(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function So(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return!st(t)&&Vo(e)?e:Y(t,Vo)}function wo(e){return Y(d.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Vo(e)||!Wo(e)&&wo(e)})}function To(e){return de(e)||ue(e)&&sn(e)}function _o(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return W(t,To)}function Io(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return G(t,To)}function Po(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return G(t,function(e){return zo(e,!0)})}function No(e,t){var n,o;if(!ke(e)&&!ke(t)){var r=d.nativeMethods.nodeChildNodesGetter.call(t);return!nt(t,e)&&st(r)&&/div|p/.test(je(t))&&(n=wo(e))&&!nt(t,n)&&(o=Mo(n))&&!nt(t,o)&&So(t)}}function xo(e,t){var n,o,r,i=fe(t);if(!ke(e)&&!ke(t)){var a=d.nativeMethods.nodeChildNodesGetter.call(t);if(!nt(t,e)&&(i&&ue(t)&&st(a)&&!/div|p/.test(je(t))||Vo(t)&&!nt(t,e)&&t.nodeValue.length)){if(i&&ue(t)){if(!(n=wo(e))||nt(t,n))return;if(!(o=Mo(n))||nt(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!Wo(n)&&!Lo(n)){t=n;break}return t}(t))&&ue(r)&&/div|p/.test(je(r))&&So(r)}}}function Ro(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null,s=t?Vo:de;if(!i&&s(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ue(n)&&!Ve(n),s(n))return n;if(fe(n)&&Io(n)&&!o&&(a=Ro(n,t)))return a}return a}function Mo(e){return Ro(e,!0)}function Oo(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null;if(!i&&Vo(e))return e;for(var s=i-1;0<=s;s--){if(n=r[s],o=ue(n)&&!Ve(n),de(n)&&(!t||!Lo(n)))return n;if(fe(n)&&Io(n)&&!o&&(a=Oo(n,!1)))return a}return a}function Fo(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function Ao(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function Lo(e){if(!de(e))return!1;var t=e.nodeValue,n=Fo(t),o=Ao(t);return n===t.length&&0===o}function Vo(e){return de(e)&&!Lo(e)}function Wo(e){return!fe(e)||ke(e)}function ko(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function Ho(e){var t=Je(e);if(ko(e)&&Ve(e))return e;var n=te(e);return"on"===n.designMode?n.body:Y(t,function(e){return ko(e)&&Ve(e)})}function Do(e,t){if(nt(e,t))return nt(t,Ho(e))?e:d.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=Ho(e),r=null;if(!et(o,t))return null;for(r=e;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==q(n,r))return r;return o}function Uo(e,t){var n=null,o=null,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=i<=t;if(ke(e))return{node:e,offset:t};if(a?n=r[i-1]:(n=r[t],o=0),ke(n)){if(i<=1)return{node:e,offset:0};(a=i<=t-1)?n=r[i-2]:(n=r[t-1],o=0)}for(;!Wo(n)&&ue(n);){var s=_o(n);if(!s.length){o=0;break}n=s[a?s.length-1:0]}return 0===o||Wo(n)||(o=n.nodeValue?n.nodeValue.length:0),{node:n,offset:o}}function Bo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(nt(e,o)||ue(o))&&Po(o)&&(i=Uo(o,r)),{node:i.node,offset:i.offset}}function qo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(nt(e,o)||ue(o))&&Po(o)&&(i=Uo(o,r)),{node:i.node,offset:i.offset}}function Go(e,t,n){return Ko(e,Bo(e,t,n))}function jo(e,t,n){return Ko(e,qo(e,t,n))}function zo(e,t){if(Tn(e))return!1;if(de(e))return!0;if(!ue(e))return!1;if(Po(e))return t;var n=d.nativeMethods.nodeParentNodeGetter.call(e),o=!Ve(n),r=_o(e),i=G(r,function(e){return"br"===je(e)});return o||i}function Jo(s,e){var l={node:null,offset:e};return function e(t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(t),i=st(r);if(l.node)return l;if(Wo(t))return l;if(de(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&xo(s,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ue(t)){if(!To(t))return l;if(0===l.offset&&zo(t,!1))return l.node=t,l.offset=(n=t,o=0,Y(d.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===je(e)})?o:0),l;(l.node||!No(s,t)&&!xo(s,t))&&(i||"br"!==je(t))||l.offset--}for(var a=0;a<i;a++)l=e(r[a]);return l}(s)}function Ko(i,e){var a=e.node,s=e.offset,l=0,c=!1;return function e(t){var n=d.nativeMethods.nodeChildNodesGetter.call(t),o=st(n);if(c)return l;if(nt(a,t))return(No(i,t)||xo(i,t))&&l++,c=!0,l+s;if(Wo(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!c&&xo(i,t)&&l++,l+=t.nodeValue.length):(!o&&ue(t)&&"br"===je(t)||!c&&(No(i,t)||xo(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Yo(e){var t,n,o,r,i,a=de(e)?e:Oo(e,!0);if(!a||(t=a,o=de(n=e)?n:Ro(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=d.nativeMethods.nodeParentNodeGetter.call(e),-1<q(n,En(e,"white-space")))return 1}(t,n)))return 0;var s=te(e).createRange();return s.selectNodeContents(a),Ko(e,{node:a,offset:s.endOffset})}var Xo=Object.freeze({__proto__:null,getFirstVisibleTextNode:Mo,getLastTextNode:Oo,getFirstNonWhitespaceSymbolIndex:Fo,getLastNonWhitespaceSymbolIndex:Ao,isInvisibleTextNode:Lo,findContentEditableParent:Ho,getNearestCommonAncestor:Do,getSelection:function(e,t,n){return{startPos:Bo(e,t,n),endPos:qo(e,t,n)}},getSelectionStartPosition:Go,getSelectionEndPosition:jo,calculateNodeAndOffsetByPosition:Jo,calculatePositionByNodeAndOffset:Ko,getElementBySelection:function(e){var t=Do(e.anchorNode,e.focusNode);return de(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=de(e)?e:Mo(e),n=te(e).createRange();return t?(n.selectNodeContents(t),Ko(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Yo,getContentEditableValue:function(e){return k(function e(t){var n=[],o=d.nativeMethods.nodeChildNodesGetter.call(t),r=st(o);Wo(t)||r||!de(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),Qo=f.utils.browser,$o=f.nativeMethods,Zo=f.eventSandbox.selection,er="backward",tr="forward",nr="none",or=nr,rr=0,ir=0,ar=0,sr=0,lr=0,cr=0;function ur(e,t,n,o){var r,i,a,s=null,l=null,c=!1;void 0!==t&&void 0!==n&&n<t&&(a=t,t=n,n=a,c=!0),void 0===t&&(l={node:(r=Mo(e))||e,offset:r&&r.nodeValue?Fo(r.nodeValue):0}),void 0===n&&(s={node:(i=Oo(e,!0))||e,offset:i&&i.nodeValue?Ao(i.nodeValue):0}),l=l||Jo(e,t),s=s||Jo(e,n),l.node&&s.node&&(c?gr(s,l,o):gr(l,s,o))}function dr(e){var t=e?te(e):gi,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function fr(e,t,n){var o=Ko(e,t);return Ko(e,n)<o}function hr(e){return Ve(e)?Er(e)?Go(e,mr(e),dr(e)):0:Zo.getSelection(e).start}function pr(e){return Ve(e)?Er(e)?jo(e,mr(e),dr(e)):0:Zo.getSelection(e).end}function mr(e){var t=te(e);return t?t.getSelection():mi.getSelection()}function gr(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,a=r.nodeValue?r.length:0,s=e.offset,l=t.offset;ue(o)&&s||(s=Math.min(i,e.offset)),ue(r)&&l||(l=Math.min(a,t.offset));var c=Ho(o),u=fr(c,e,t),d=mr(c),f=te(c).createRange();Zo.wrapSetterSelection(c,function(){var e;d.removeAllRanges(),u?Qo.isIE?(f.setStart(r,l),f.setEnd(o,s),d.addRange(f)):(f.setStart(o,s),f.setEnd(o,s),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(Qo.isSafari||Qo.isChrome&&Qo.version<58)&&Lo(r)?e(r,Math.min(l,1))||e(r,0):e(r,l)):(f.setStart(o,s),f.setEnd(r,l),d.addRange(f))},n,!0)}function Er(e){var t=mr(e);return!(!t.anchorNode||!t.focusNode)&&et(e,t.anchorNode)&&et(e,t.focusNode)}Qo.isIE&&Tt(gi,"selectionchange",function(){var e=null,t=null,n=null;try{if(this.selection)t=this.selection.createRange();else{if(!(e=$o.documentActiveElementGetter.call(this))||!Ae(e))return void(or=nr);var o,r=hr(e),i=pr(e);e.createTextRange?((t=e.createTextRange()).collapse(!0),t.moveStart("character",r),t.moveEnd("character",i-r)):gi.createRange&&(t=gi.createRange(),o=f.nativeMethods.nodeFirstChildGetter.call(e),t.setStart(o,r),t.setEnd(o,i),n=t.getBoundingClientRect())}}catch(e){return void(or=nr)}var a=n?Math.ceil(n.left):t.offsetLeft,s=n?Math.ceil(n.top):t.offsetTop,l=n?Math.ceil(n.height):t.boundingHeight,c=n?Math.ceil(n.width):t.boundingWidth,u=t.htmlText?t.htmlText.length:0;!function(e,t,n,o,r){if(r)switch(or){case nr:t===cr&&(e===sr||ar<n)?or=tr:(e<sr||t<cr)&&(or=er);break;case tr:if(e===sr&&t===cr||e<sr&&ar<n||t===cr&&n===ar&&lr<r&&e+o!==rr)break;(e<sr||t<cr)&&(or=er);break;case er:if((e<sr||t<cr)&&lr<r)break;t===ir&&(rr<=e||ar<n)&&(or=tr)}else rr=e,ir=t,or=nr;ar=n,sr=e,lr=r,cr=t}(a,s,l,c,n?t.toString().length:u)},!0);var vr,yr,br=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:dr,isInverseSelectionContentEditable:fr,getSelectionStart:hr,getSelectionEnd:pr,hasInverseSelection:function(e){return Ve(e)?dr(e):(Zo.getSelection(e).direction||or)===er},getSelectionByElement:mr,select:function(e,t,n){var o,r,i,a;Ve(e)?ur(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?ft(e).length:n)<o&&(a=o,o=r,r=a,i=!0),Zo.setSelection(e,o,r,i?er:tr),or=t===n?nr:i?er:tr)},selectByNodesAndOffsets:gr,deleteSelectionContents:function(e,t){var n,o,r,i,a,s,l,c,u,d,f,h,p=hr(e),m=pr(e);t&&ur(e),p!==m&&(n=mr(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,s=Fo(o.nodeValue),l=Ao(o.nodeValue),c=Fo(r.nodeValue),u=Ao(r.nodeValue),f=d=null,de(o)&&(i<s&&0!==i?d=0:i!==o.nodeValue.length&&(Lo(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),de(r)&&(a<c&&0!==a?f=0:a!==r.nodeValue.length&&(Lo(r)&&0!==a||u<a)&&(f=r.nodeValue.length)),(Qo.isWebKit||Qo.isIE&&11<Qo.version)&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(s):o.nodeValue.substring(0,l)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(c):r.nodeValue.substring(0,u))),null===d&&null===f||gr({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:a}),function(e){var t=mr(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=mr(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Yo(e);ur(e,t,t)},hasElementContainsSelection:Er}),Cr=f.Promise,Sr=f.nativeMethods,wr={cannotCreateMultipleLiveModeRunners:"E1000",cannotRunLiveModeRunnerMultipleTimes:"E1001",browserDisconnected:"E1002",cannotRunAgainstDisconnectedBrowsers:"E1003",cannotEstablishBrowserConnection:"E1004",cannotFindBrowser:"E1005",browserProviderNotFound:"E1006",browserNotSet:"E1007",testFilesNotFound:"E1008",noTestsToRun:"E1009",cannotFindReporterForAlias:"E1010",multipleSameStreamReporters:"E1011",optionValueIsNotValidRegExp:"E1012",optionValueIsNotValidKeyValue:"E1013",invalidSpeedValue:"E1014",invalidConcurrencyFactor:"E1015",cannotDivideRemotesCountByConcurrency:"E1016",portsOptionRequiresTwoNumbers:"E1017",portIsNotFree:"E1018",invalidHostname:"E1019",cannotFindSpecifiedTestSource:"E1020",clientFunctionCodeIsNotAFunction:"E1021",selectorInitializedWithWrongType:"E1022",clientFunctionCannotResolveTestRun:"E1023",regeneratorInClientFunctionCode:"E1024",invalidClientFunctionTestRunBinding:"E1025",invalidValueType:"E1026",unsupportedUrlProtocol:"E1027",testControllerProxyCannotResolveTestRun:"E1028",timeLimitedPromiseTimeoutExpired:"E1029",noTestsToRunDueFiltering:"E1030",cannotSetVideoOptionsWithoutBaseVideoPathSpecified:"E1031",multipleAPIMethodCallForbidden:"E1032",invalidReporterOutput:"E1033",cannotReadSSLCertFile:"E1034",cannotPrepareTestsDueToError:"E1035",cannotParseRawFile:"E1036",testedAppFailedWithError:"E1037",unableToOpenBrowser:"E1038",requestHookConfigureAPIError:"E1039",forbiddenCharatersInScreenshotPath:"E1040",cannotFindFFMPEG:"E1041",compositeArgumentsError:"E1042",cannotFindTypescriptConfigurationFile:"E1043",clientScriptInitializerIsNotSpecified:"E1044",clientScriptBasePathIsNotSpecified:"E1045",clientScriptInitializerMultipleContentSources:"E1046",cannotLoadClientScriptFromPath:"E1047",clientScriptModuleEntryPointPathCalculationError:"E1048",methodIsNotAvailableForAnIPCHost:"E1049",tooLargeIPCPayload:"E1050",malformedIPCMessage:"E1051",unexpectedIPCHeadPacket:"E1052",unexpectedIPCBodyPacket:"E1053",unexpectedIPCTailPacket:"E1054",cannotRunLocalNonHeadlessBrowserWithoutDisplay:"E1057",uncaughtErrorInReporter:"E1058",roleInitializedWithRelativeUrl:"E1059",typeScriptCompilerLoadingError:"E1060",cannotCustomizeSpecifiedCompilers:"E1061",cannotEnableRetryTestPagesOption:"E1062",browserConnectionError:"E1063",testRunRequestInDisconnectedBrowser:"E1064",invalidQuarantineOption:"E1065",invalidQuarantineParametersRatio:"E1066",invalidAttemptLimitValue:"E1067",invalidSuccessThresholdValue:"E1068",cannotSetConcurrencyWithCDPPort:"E1069",cannotFindTestcafeConfigurationFile:"E1070",dashboardTokenInJSON:"E1071",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078",invalidCustomActionsOptionType:"E1079",invalidCustomActionType:"E1080",cannotImportESMInCommonsJS:"E1081"};(yr=vr=vr||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",yr.UseBrowserInitOption="UseBrowserInitOption",yr.RestErrorCauses="RestErrorCauses";var Tr,_r,Ir,Pr,Nr,xr=vr,Rr=", ",Mr='"';function Or(e,t){return"".concat(t).concat(e).concat(t)}function Fr(e,t,n){void 0===t&&(t=Rr),void 0===n&&(n=Mr);var o=y([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return Or(e,n)}).join(t);if(1===o.length)return Or(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(Or(r,n)," and ").concat(Or(i,n))}var a=o.pop(),s=o.map(function(e){return Or(e,n)}).join(t);return"".concat(s,", and ").concat(Or(a,n))}(_r=Tr=Tr||{}).message="message",_r.stack="stack",_r.pageUrl="pageUrl",(Pr=Ir=Ir||{}).fn="fn",Pr.dependencies="dependencies";var Ar,Lr="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Vr="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Wr="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",kr="https://testcafe.io/documentation/404150/guides/advanced-guides/custom-test-actions",Hr=((Nr={})[wr.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",Nr[wr.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",Nr[wr.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",Nr[wr.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",Nr[wr.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',Nr[wr.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",Nr[wr.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',Nr[wr.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',Nr[wr.browserNotSet]="You have not specified a browser.",Nr[wr.testFilesNotFound]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(Lr,"."),Nr[wr.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",Nr[wr.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(Vr,"."),Nr[wr.cannotFindReporterForAlias]='The "{name}" reporter does not exist. Check the reporter parameter for errors.',Nr[wr.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',Nr[wr.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',Nr[wr.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',Nr[wr.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',Nr[wr.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',Nr[wr.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',Nr[wr.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',Nr[wr.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",Nr[wr.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",Nr[wr.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",Nr[wr.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',Nr[wr.portsOptionRequiresTwoNumbers]='The "--ports" argument accepts two values at a time.',Nr[wr.portIsNotFree]="Port {portNum} is occupied by another process.",Nr[wr.invalidHostname]='Cannot resolve hostname "{hostname}".',Nr[wr.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',Nr[wr.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",Nr[wr.selectorInitializedWithWrongType]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",Nr[wr.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} cannot implicitly resolve the test run in context of which it should be executed. If you need to call {#instantiationCallsiteName} from the Node.js API callback, pass the test controller manually via {#instantiationCallsiteName}'s `.with({ boundTestRun: t })` method first. Note that you cannot execute {#instantiationCallsiteName} outside the test code.",Nr[wr.requestCannotResolveTestRun]="'request' cannot implicitly resolve the test run in context of which it should be executed. Note that you cannot execute 'request' in the experimental debug mode.",Nr[wr.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',Nr[wr.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',Nr[wr.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",Nr[wr.unsupportedUrlProtocol]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',Nr[wr.testControllerProxyCannotResolveTestRun]="Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.",Nr[wr.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",Nr[wr.cannotSetVideoOptionsWithoutBaseVideoPathSpecified]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",Nr[wr.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',Nr[wr.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",Nr[wr.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',Nr[wr.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",Nr[wr.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',Nr[wr.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",Nr[wr.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',Nr[wr.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",Nr[wr.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',Nr[wr.cannotFindFFMPEG]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",Nr[wr.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',Nr[wr.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",Nr[wr.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",Nr[wr.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",Nr[wr.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",Nr[wr.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",Nr[wr.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",Nr[wr.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",Nr[wr.malformedIPCMessage]="Cannot process a malformed IPC message.",Nr[wr.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",Nr[wr.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",Nr[wr.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",Nr[wr.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux version does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(Wr),Nr[wr.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',Nr[wr.roleInitializedWithRelativeUrl]="You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.",Nr[wr.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",Nr[wr.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",Nr[wr.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set 'localhost' as the value of the 'hostname' option\n-- run TestCafe over HTTPS\n",Nr[wr.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",Nr[xr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Try to decrease the concurrency factor or allocate more computing resources to the host machine.",Nr[xr.UseBrowserInitOption]='Increase the value of the "browserInitTimeout" option if it is too low (currently: {browserInitTimeoutMsg}). This option determines how long TestCafe waits for browsers to be ready.',Nr[xr.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",Nr[wr.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",Nr[wr.dashboardTokenInJSON]="Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.",Nr[wr.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',Nr[wr.requestUrlInvalidValueError]="Requested url isn't valid ({actualValue}).",Nr[wr.requestRuntimeError]="The request was interrupted by an error:\n{message}",Nr[wr.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(Fr(Object.keys(Tr)),"."),Nr[wr.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callback: '.concat(Fr(Object.keys(Ir)),"."),Nr[wr.invalidCommandInJsonCompiler]='TestCafe terminated the test run. The "{path}" file contains an unknown Chrome User Flow action "{action}". Remove the action to continue. Refer to the following article for the definitive list of supported Chrome User Flow actions: https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support#supported-replay-actions',Nr[wr.invalidCustomActionsOptionType]="The value of the customActions option does not belong to type Object. Refer to the following article for custom action setup instructions: ".concat(kr),Nr[wr.invalidCustomActionType]='TestCafe cannot parse the "{actionName}" action, because the action definition is invalid. Format the definition in accordance with the custom actions guide: '.concat(kr),Nr[wr.cannotImportESMInCommonsJS]="Cannot import the {esModule} ECMAScript module from {targetFile}. Use a dynamic import() statement or enable the --experimental-esm CLI flag.",Nr[wr.timeLimitedPromiseTimeoutExpired]),Dr=(g(Ur,Ar=Error),Ur);function Ur(){var e=Ar.call(this,Hr)||this;return e.code=wr.timeLimitedPromiseTimeoutExpired,e}function Br(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return k(t,function(e){return e.replace("plus","+")})}function qr(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return a.modifiersMap[t]&&(t=a.modifiersMap[t]),t}var Gr,jr,zr=f.utils.trim,Jr={run:"run",idle:"idle"};(jr=Gr=Gr||{}).ok="ok",jr.closing="closing";var Kr=Gr,Yr="file:///",Xr=gi.location.href,Qr=gi.location.origin,$r=Qr+"/service-worker.js",Zr=!1,ei=null,ti=eval;function ni(t){return new u(function(e){return setTimeout(e,t)})}function oi(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,a=n.data,s=void 0===a?null:a,l=n.parseResponse,c=void 0===l||l;return new u(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&c&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(s)})}function ri(e){return Xr.toLowerCase()===e.toLowerCase()}function ii(){Zr=!1}function ai(e,t,n){var o;ii(),void 0===(o=e.url)&&(o=""),0===o.indexOf(Yr)?oi(n,t,{method:"POST",data:JSON.stringify({url:e.url})}):gi.location=e.url}function si(e){return(e.cmd===Jr.run||e.cmd===Jr.idle)&&!ri(e.url)}function li(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,s=n.manualRedirect,l=n.proxyless;return E(this,void 0,void 0,function(){var n,o;return v(this,function(e){switch(e.label){case 0:return[4,oi(i,r)];case 1:return n=e.sent(),(o=l?(t=n).cmd!==Jr.idle||si(t):si(n))&&!s&&ai(n,r,a),[2,{command:n,redirecting:o}]}var t})})}var ci=Object.freeze({__proto__:null,delay:ni,sendXHR:oi,startHeartbeat:function(e,t){function n(){oi(e,t).then(function(e){e.code!==Kr.closing||ri(e.url)||(ii(),gi.location=e.url)})}ei=mi.setInterval(n,2e3),n()},stopHeartbeat:function(){mi.clearInterval(ei)},startInitScriptExecution:function(e,t){Zr=!0,function e(t,n){Zr&&oi(t,n).then(function(e){return e.code?oi(t,n,{method:"POST",data:JSON.stringify(ti(e.code))}):null}).then(function(){mi.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:ii,redirect:ai,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return E(this,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,li.apply(void 0,n)];case 1:return[2,e.sent()];case 2:return t=e.sent(),console.error(t),[2,{error:t}];case 3:return[2]}})})}.apply(void 0,i)]:[3,5];case 2:return r=e.sent(),t=r.error,n=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(r,["error"]),t?[4,ni(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register($r,{scope:Qr})];case 2:return e.sent(),[4,navigator.serviceWorker.ready];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),console.error(t),[3,5];case 5:return[2]}})})},getActiveWindowId:function(e,t){return oi(e,t)},setActiveWindowId:function(e,t,n){return oi(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return oi(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},dispatchProxylessEvent:function(n,o,r,i,a){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:return[4,o.hide()];case 1:return e.sent(),t=JSON.stringify({type:i,options:a}),[4,oi(n,r,{method:"POST",data:t})];case 2:return e.sent(),[4,o.show()];case 3:return e.sent(),[2]}})})}}),ui={};ui.RequestBarrier=h,ui.ClientRequestEmitter=I,ui.ScriptExecutionBarrier=N,ui.ScriptExecutionEmitter=A,ui.pageUnloadBarrier=Gt,ui.preventRealEvents=function(){xn.initElementListening(mi,Mn),xn.addFirstInternalEventBeforeListener(mi,Mn,Fn),Yt.init()},ui.disableRealEventsPreventing=function(){xn.removeInternalEventBeforeListener(mi,Mn,Fn)},ui.scrollController=Yt,ui.ScrollAutomation=bo,ui.selectController=zn,ui.serviceUtils=zt,ui.domUtils=pt,ui.contentEditable=Xo,ui.positionUtils=po,ui.styleUtils=Pn,ui.scrollUtils=Un,ui.eventUtils=xt,ui.arrayUtils=X,ui.promiseUtils=go,ui.textSelection=br,ui.waitFor=function(i,a,s){return new Cr(function(e,t){var n,o,r=i();r?e(r):(n=Sr.setInterval.call(mi,function(){(r=i())&&(Sr.clearInterval.call(mi,n),Sr.clearTimeout.call(mi,o),e(r))},a),o=Sr.setTimeout.call(mi,function(){Sr.clearInterval.call(mi,n),t()},s))})},ui.delay=c,ui.getTimeLimitedPromise=function(e,t){return d.Promise.race([e,c(t).then(function(){return d.Promise.reject(new Dr)})])},ui.noop=function(){},ui.getKeyArray=Br,ui.getSanitizedKey=qr,ui.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=zr(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:G(r,function(e){var t=Br(e);return G(t,function(e){var t=1===e.length||"space"===e,n=qr(e),o=a.modifiers[n],r=a.specialKeys[n];return!(t||o||r)})}),keys:e}},ui.sendRequestToFrame=yo,ui.KEY_MAPS=a,ui.browser=ci,ui.stringifyElement=$n,ui.selectorTextFilter=function o(e,r,i,a){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,a))return!0;return!1}function n(e){return a instanceof RegExp?a.test(e):a===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var s=e.querySelector("head"),l=e.querySelector("body");return t(s)||t(l)},ui.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var a,s=e.attributes,l=0;l<s.length;l++)if(i((a=s[l]).nodeName,o)&&(!r||i(a.nodeValue,r)))return!0;return!1},ui.TEST_RUN_ERRORS={uncaughtErrorOnPage:"E1",uncaughtErrorInTestCode:"E2",uncaughtNonErrorObjectInTestCode:"E3",uncaughtErrorInClientFunctionCode:"E4",uncaughtErrorInCustomDOMPropertyCode:"E5",unhandledPromiseRejection:"E6",uncaughtException:"E7",missingAwaitError:"E8",actionIntegerOptionError:"E9",actionPositiveIntegerOptionError:"E10",actionBooleanOptionError:"E11",actionSpeedOptionError:"E12",actionOptionsTypeError:"E14",actionBooleanArgumentError:"E15",actionStringArgumentError:"E16",actionNullableStringArgumentError:"E17",actionStringOrStringArrayArgumentError:"E18",actionStringArrayElementError:"E19",actionIntegerArgumentError:"E20",actionRoleArgumentError:"E21",actionPositiveIntegerArgumentError:"E22",actionSelectorError:"E23",actionElementNotFoundError:"E24",actionElementIsInvisibleError:"E26",actionSelectorMatchesWrongNodeTypeError:"E27",actionAdditionalElementNotFoundError:"E28",actionAdditionalElementIsInvisibleError:"E29",actionAdditionalSelectorMatchesWrongNodeTypeError:"E30",actionElementNonEditableError:"E31",actionElementNotTextAreaError:"E32",actionElementNonContentEditableError:"E33",actionElementIsNotFileInputError:"E34",actionRootContainerNotFoundError:"E35",actionIncorrectKeysError:"E36",actionCannotFindFileToUploadError:"E37",actionUnsupportedDeviceTypeError:"E38",actionIframeIsNotLoadedError:"E39",actionElementNotIframeError:"E40",actionInvalidScrollTargetError:"E41",currentIframeIsNotLoadedError:"E42",currentIframeNotFoundError:"E43",currentIframeIsInvisibleError:"E44",nativeDialogNotHandledError:"E45",uncaughtErrorInNativeDialogHandler:"E46",setTestSpeedArgumentError:"E47",setNativeDialogHandlerCodeWrongTypeError:"E48",clientFunctionExecutionInterruptionError:"E49",domNodeClientFunctionResultError:"E50",invalidSelectorResultError:"E51",cannotObtainInfoForElementSpecifiedBySelectorError:"E52",externalAssertionLibraryError:"E53",pageLoadError:"E54",windowDimensionsOverflowError:"E55",forbiddenCharactersInScreenshotPathError:"E56",invalidElementScreenshotDimensionsError:"E57",roleSwitchInRoleInitializerError:"E58",assertionExecutableArgumentError:"E59",assertionWithoutMethodCallError:"E60",assertionUnawaitedPromiseError:"E61",requestHookNotImplementedError:"E62",requestHookUnhandledError:"E63",uncaughtErrorInCustomClientScriptCode:"E64",uncaughtErrorInCustomClientScriptCodeLoadedFromModule:"E65",uncaughtErrorInCustomScript:"E66",uncaughtTestCafeErrorInCustomScript:"E67",childWindowIsNotLoadedError:"E68",childWindowNotFoundError:"E69",cannotSwitchToWindowError:"E70",closeChildWindowError:"E71",childWindowClosedBeforeSwitchingError:"E72",cannotCloseWindowWithChildrenError:"E73",targetWindowNotFoundError:"E74",parentWindowNotFoundError:"E76",previousWindowNotFoundError:"E77",switchToWindowPredicateError:"E78",actionFunctionArgumentError:"E79",multipleWindowsModeIsDisabledError:"E80",multipleWindowsModeIsNotSupportedInRemoteBrowserError:"E81",cannotCloseWindowWithoutParent:"E82",cannotRestoreChildWindowError:"E83",executionTimeoutExceeded:"E84",actionRequiredCookieArguments:"E85",actionCookieArgumentError:"E86",actionCookieArgumentsError:"E87",actionUrlCookieArgumentError:"E88",actionUrlsCookieArgumentError:"E89",actionStringOptionError:"E90",actionDateOptionError:"E91",actionNumberOptionError:"E92",actionUrlOptionError:"E93",actionUrlSearchParamsOptionError:"E94",actionObjectOptionError:"E95",actionUrlArgumentError:"E96",actionStringOrRegexOptionError:"E97",actionSkipJsErrorsArgumentError:"E98",actionFunctionOptionError:"E99",actionInvalidObjectPropertyError:"E100",actionElementIsNotTargetError:"E101"},ui.RUNTIME_ERRORS=wr;var di=f.nativeMethods,fi=f.EVENTS.evalIframeScript;di.objectDefineProperty(mi,"%testCafeCore%",{configurable:!0,value:ui}),f.on(fi,function(e){return pi(di.contentWindowGetter.call(e.iframe))});var hi=f.eventSandbox.message;hi.on(hi.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===bo.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=it(e.source),new bo(i,{offsetX:n,offsetY:o},r).run().then(function(){return hi.sendServiceMsg({cmd:bo.SCROLL_RESPONSE_CMD},e.source)}))})}(mi["%hammerhead%"],mi["%hammerhead%"].Promise)}(window);
|
|
1
|
+
window["%hammerhead%"].utils.removeInjectedScript(),function gi(Ei){var vi=Ei.document;!function(d,u){var f="default"in d?d.default:d;u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;var e=f.utils.browser,t={alt:18,ctrl:17,meta:91,shift:16},n={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},o={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},r={left:e.isIE?"Left":"ArrowLeft",down:e.isIE?"Down":"ArrowDown",right:e.isIE?"Right":"ArrowRight",up:e.isIE?"Up":"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:e.isIE?"Spacebar":" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var a={modifiers:t,shiftMap:n,specialKeys:o,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:e.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:i(t),reversedShiftMap:i(n),reversedSpecialKeys:i(o),reversedKeyProperty:i(r),newLineKeys:["enter","\n","\r"]},s=f.Promise,l=f.nativeMethods;function c(t){return new s(function(e){return l.setTimeout.call(Ei,e,t)})}var h=(p.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},p.prototype._offListening=function(){this._emitter.offAll()},p.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},p.prototype._onRequestCompleted=function(e){var t=this;c(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},p.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},p.prototype._onRequestError=function(e){this._onRequestFinished(e)},p.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},p.prototype.wait=function(e){var n=this;return c(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new d.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},p.TIMEOUT)):n._finishWaiting()})})},p.TIMEOUT=3e3,p);function p(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function E(e,a,s,l){return new(s=s||u)(function(n,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,r)}i((l=l.apply(e,a||[])).next())})}function v(n,o){var r,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function e(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;l&&t[l=0]&&(s=0),s;)try{if(r=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function y(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var b=(C.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},C.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},C.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=d.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},C.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},C.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._eventsListeners[t];if(o)for(var r=0;r<o.length;r++)try{o[r].apply(this,e)}catch(e){if(!(e.message&&-1<e.message.indexOf("freed script")))throw e;this.off(t,o[r])}},C);function C(){this._eventsListeners={}}var S,w="request-send",T="request-completed",_="request-error",I=(g(P,S=b),P.prototype._addHammerheadListener=function(e,t){f.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},P.prototype.onRequestSend=function(e){this.on(w,e)},P.prototype.onRequestCompleted=function(e){this.on(T,e)},P.prototype.onRequestError=function(e){this.on(_,e)},P.prototype.offAll=function(){S.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];f.off.call(f,n.evt,n.listener)}},P);function P(){var n=S.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(f.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(w,t)}),n._addHammerheadListener(f.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(f.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(_,t)}),n._addHammerheadListener(f.EVENTS.fetchSent,function(e){n.emit(w,e),e.then(function(){return n.emit(T,e)},function(){return n.emit(_,e)})}),n}var N=(x.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},x.prototype._offListening=function(){this._emitter.offAll()},x.prototype._onScriptElementAdded=function(e){var t=this,n=(0,d.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},x.LOADING_TIMEOUT);this._scripts.set(e,n)},x.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,d.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||c(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},x.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},x.prototype.wait=function(){var n=this;return new d.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},x.TIMEOUT)):n._finishWaiting()})},x.TIMEOUT=3e3,x.LOADING_TIMEOUT=2e3,x);function x(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var R,M=f.nativeMethods,O="script-added",F="script-loaded-or-failed",A=(g(L,R=b),L.prototype._onScriptElementAdded=function(e){var t,n=this,o=M.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(O,e),t=function(){M.removeEventListener.call(e,"load",t),M.removeEventListener.call(e,"error",t),n.emit(F,e)},M.addEventListener.call(e,"load",t),M.addEventListener.call(e,"error",t))},L.prototype.onScriptAdded=function(e){this.on(O,e)},L.prototype.onScriptLoadedOrFailed=function(e){this.on(F,e)},L.prototype.offAll=function(){R.prototype.offAll.call(this),f.off(f.EVENTS.scriptElementAdded,this._onScriptElementAdded)},L);function L(){var n=R.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},f.on(f.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function V(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=d.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var W=V("filter"),k=V("map"),H=V("slice"),D=V("splice"),U=V("unshift"),q=V("forEach"),B=V("indexOf"),G=V("some"),j=V("reverse"),z=V("reduce"),J=V("concat"),K=V("join"),Y=V("every");function X(e,t){if(d.nativeMethods.arrayFind)return d.nativeMethods.arrayFind.call(e,t);for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null}var Q=Object.freeze({__proto__:null,filter:W,map:k,slice:H,splice:D,unshift:U,forEach:q,indexOf:B,some:G,reverse:j,reduce:z,concat:J,join:K,every:Y,isArray:function(e){return"[object Array]"===d.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(d.nativeMethods.arrayFrom)return d.nativeMethods.arrayFrom.apply(d.nativeMethods,y([e],t,!1));for(var o=[],r=e.length,i=0;i<r;i++)o.push(e[i]);return o},find:X,remove:function(e,t){var n=d.nativeMethods.arrayIndexOf.call(e,t);-1<n&&d.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),$=f.utils.browser,Z=f.nativeMethods,ee=f.utils.style.get,te=f.utils.dom.getActiveElement,ne=f.utils.dom.findDocument,oe=f.utils.dom.find,re=f.utils.dom.isElementInDocument,ie=f.utils.dom.isElementInIframe,ae=f.utils.dom.getIframeByElement,se=f.utils.dom.isCrossDomainWindows,le=f.utils.dom.getSelectParent,ce=f.utils.dom.getChildVisibleIndex,ue=f.utils.dom.getSelectVisibleChildren,de=f.utils.dom.isElementNode,fe=f.utils.dom.isTextNode,he=f.utils.dom.isRenderedNode,pe=f.utils.dom.isIframeElement,me=f.utils.dom.isInputElement,ge=f.utils.dom.isButtonElement,Ee=f.utils.dom.isFileInput,ve=f.utils.dom.isTextAreaElement,ye=f.utils.dom.isAnchorElement,be=f.utils.dom.isImgElement,Ce=f.utils.dom.isFormElement,Se=f.utils.dom.isLabelElement,we=f.utils.dom.isSelectElement,Te=f.utils.dom.isRadioButtonElement,_e=f.utils.dom.isColorInputElement,Ie=f.utils.dom.isCheckboxElement,Pe=f.utils.dom.isOptionElement,Ne=f.utils.dom.isSVGElement,xe=f.utils.dom.isMapElement,Re=f.utils.dom.isBodyElement,Me=f.utils.dom.isHtmlElement,Oe=f.utils.dom.isDocument,Fe=f.utils.dom.isWindow,Ae=f.utils.dom.isTextEditableInput,Le=f.utils.dom.isTextEditableElement,Ve=f.utils.dom.isTextEditableElementAndEditingAllowed,We=f.utils.dom.isContentEditableElement,ke=f.utils.dom.isDomElement,He=f.utils.dom.isShadowUIElement,De=f.utils.dom.isShadowRoot,Ue=f.utils.dom.isElementFocusable,qe=f.utils.dom.isHammerheadAttr,Be=f.utils.dom.isElementReadOnly,Ge=f.utils.dom.getScrollbarSize,je=f.utils.dom.getMapContainer,ze=f.utils.dom.getTagName,Je=f.utils.dom.closest,Ke=f.utils.dom.getParents,Ye=f.utils.dom.findParent,Xe=f.utils.dom.getTopSameDomainWindow,Qe=f.utils.dom.getParentExceptShadowRoot;function $e(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,pe(e)&&(e=Z.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===ee(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],a=null,s=null,l=null,c=!1,u=0;u<n.length;u++){a=n[u],s=ze(a),l=Ze(a),c=!1,function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=Z.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===ee(e,"display")||"hidden"===ee(e,"visibility")||($.isIE||$.isAndroid)&&Pe(e)||null!==n&&n<0)}(a,e,l)&&(r.test(s)||a.shadowRoot||pe(a)?c=!0:ye(a)&&a.hasAttribute("href")&&(c=""!==a.getAttribute("href")||!$.isIE||null!==l),""!==(t=a.getAttribute("contenteditable"))&&"true"!==t||(c=!0),null!==l&&(c=!0),c&&i.push(a))}return W(i,function(e){return!et(o,e)})}(e);r<i.length;r++){var a=i[r],s=!t||a.tabIndex<=0?-1:a.tabIndex;o.children[s]=o.children[s]||[],o.children[s].push($e(a,t))}return o}function Ze(e){var t=Z.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function et(e,t){return e.contains?e.contains(t):G(e,function(e){return e.contains(t)})}function tt(e,t){if(ot(t,e))return!0;for(var n=Z.nodeChildNodesGetter.call(e),o=lt(n),r=0;r<o;r++){var i=n[r];if(!He(i)&&tt(i,t))return!0}return!1}function nt(e,t){var n=e.querySelectorAll(ze(t));return B(n,t)}function ot(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function rt(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!$.isFirefox&&!$.isWebKit||t.top===t||e)||!(!e||!Z.contentDocumentGetter.call(e))}function it(e){try{return e.top===e}catch(e){return!1}}function at(e){var t=[];oe(vi,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&oe(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if(Z.contentWindowGetter.call(t[n])===e)return t[n];return null}function st(e){return Z.htmlCollectionLengthGetter.call(e)}function lt(e){return Z.nodeListLengthGetter.call(e)}function ct(e){return Z.inputValueGetter.call(e)}function ut(e){return Z.textAreaValueGetter.call(e)}function dt(e,t){return Z.inputValueSetter.call(e,t)}function ft(e,t){return Z.textAreaValueSetter.call(e,t)}function ht(e){return me(e)?ct(e):ve(e)?ut(e):e.value}function pt(e){return e&&e.getRootNode&&ne(e)!==e.getRootNode()}var mt=Object.freeze({__proto__:null,getActiveElement:te,findDocument:ne,find:oe,isElementInDocument:re,isElementInIframe:ie,getIframeByElement:ae,isCrossDomainWindows:se,getSelectParent:le,getChildVisibleIndex:ce,getSelectVisibleChildren:ue,isElementNode:de,isTextNode:fe,isRenderedNode:he,isIframeElement:pe,isInputElement:me,isButtonElement:ge,isFileInput:Ee,isTextAreaElement:ve,isAnchorElement:ye,isImgElement:be,isFormElement:Ce,isLabelElement:Se,isSelectElement:we,isRadioButtonElement:Te,isColorInputElement:_e,isCheckboxElement:Ie,isOptionElement:Pe,isSVGElement:Ne,isMapElement:xe,isBodyElement:Re,isHtmlElement:Me,isDocument:Oe,isWindow:Fe,isTextEditableInput:Ae,isTextEditableElement:Le,isTextEditableElementAndEditingAllowed:Ve,isContentEditableElement:We,isDomElement:ke,isShadowUIElement:He,isShadowRoot:De,isElementFocusable:Ue,isHammerheadAttr:qe,isElementReadOnly:Be,getScrollbarSize:Ge,getMapContainer:je,getTagName:ze,closest:Je,getParents:Ke,findParent:Ye,getTopSameDomainWindow:Xe,getParentExceptShadowRoot:Qe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||pe(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var a=i[r];o.push.apply(o,e(a))}return o}($e(e,t))},getTabIndexAttributeIntValue:Ze,containsElement:et,getTextareaIndentInLine:function(e,t){var n=ut(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=ut(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=ut(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return($.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:$.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:$.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Ve(e)||We(e):Le(e)||We(e)},isElementContainsNode:tt,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===f.utils.dom.instanceToString(e)},getElementIndexInParent:nt,isTheSameNode:ot,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(ze(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Ke(e),n=0;n<t.length;n++)if(Ue(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:rt,isTopWindow:it,findIframeByWindow:at,isEditableFormElement:function(e){return Le(e)||we(e)},getCommonAncestor:function(e,t){if(ot(e,t))return e;for(var n=[e].concat(Ke(e)),o=t;o;){if(-1<B(n,o))return o;o=Z.nodeParentNodeGetter.call(o)}return o},getChildrenLength:st,getChildNodesLength:lt,getInputValue:ct,getTextAreaValue:ut,setInputValue:dt,setTextAreaValue:ft,getElementValue:ht,setElementValue:function(e,t){return me(e)?dt(e,t):ve(e)?ft(e,t):e.value=t},isShadowElement:pt,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ye(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return Z.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===vi.documentElement}}),gt=f.Promise,Et=f.nativeMethods,vt=f.eventSandbox.listeners,yt=f.utils.browser,bt=f.utils.event.BUTTON,Ct=f.utils.event.BUTTONS_PARAMETER,St=f.utils.event.DOM_EVENTS,wt=f.utils.event.WHICH_PARAMETER,Tt=f.utils.event.preventDefault;function _t(e,t,n,o){yt.isIE11&&Fe(e)?Et.windowAddEventListener.call(e,t,n,o):Et.addEventListener.call(e,t,n,o)}function It(e,t,n,o){yt.isIE11&&Fe(e)?Et.windowRemoveEventListener.call(e,t,n,o):Et.removeEventListener.call(e,t,n,o)}function Pt(){var n=[],e=!1;function t(){e||(vi.body?(e=!0,n.forEach(function(e){return e()})):Et.setTimeout.call(Ei,t,1))}function o(){(rt(Ei)||it(Ei))&&(It(vi,"DOMContentLoaded",o),t())}return"complete"===vi.readyState?Et.setTimeout.call(Ei,o,1):_t(vi,"DOMContentLoaded",o),{then:function(e){return t=e,new gt(function(e){return n.push(function(){return e(t())})});var t}}}var Nt,xt,Rt=Object.freeze({__proto__:null,BUTTON:bt,BUTTONS_PARAMETER:Ct,DOM_EVENTS:St,WHICH_PARAMETER:wt,preventDefault:Tt,bind:_t,unbind:It,documentReady:function(e){return void 0===e&&(e=0),Pt().then(function(){return vt.getEventListeners(Ei,"load").length?gt.race([new gt(function(e){return _t(Ei,"load",e)}),c(e)]):null})}});(xt=Nt=Nt||{}).ready="ready",xt.readyForBrowserManipulation="ready-for-browser-manipulation",xt.waitForFileDownload="wait-for-file-download";var Mt=Nt,Ot=f.Promise,Ft=f.utils.browser,At=f.nativeMethods,Lt=f.transport,Vt=30,Wt=500,kt=!1,Ht=null,Dt=!1;function Ut(){if(Ft.isIE)return function(e){Bt&&At.clearTimeout.call(Ei,Bt),qt=!0,Bt=At.setTimeout.call(Ei,function(){Bt=null,qt=!1,Gt.forEach(function(e){return e()}),Gt=[]},e)}(Vt),void c(0).then(function(){var e;"loading"===vi.readyState&&((e=At.documentActiveElementGetter.call(vi))&&ye(e)&&e.hasAttribute("download")||(kt=!0))});kt=!0}var qt=!1,Bt=null,Gt=[],jt=Object.freeze({__proto__:null,init:function(){f.on(f.EVENTS.beforeUnload,Ut),_t(Ei,"unload",function(){kt=!0})},watchForPageNavigationTriggers:function(){Ht=function(){Dt=!0},f.on(f.EVENTS.pageNavigationTriggered,Ht)},wait:function(e){void 0===e&&(e=!Ht||Dt?400:0),Ht&&(f.off(f.EVENTS.pageNavigationTriggered,Ht),Ht=null);var t=c(e).then(function(){return kt?c(Wt).then(function(){return Lt.queuedAsyncServiceMsg({cmd:Mt.waitForFileDownload})}).then(function(e){if(!e)return new Ot(function(){})}).then(function(){kt=!1}):qt?new Ot(function(e){return Gt.push(e)}):void 0}),n=c(15e3).then(function(){kt=!1});return Ot.race([t,n])}}),zt=b,Jt=Object.freeze({__proto__:null,EventEmitter:zt,inherit:function(e,t){function n(){}n.prototype=t.prototype,f.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Kt=d.eventSandbox.listeners;function Yt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new zt}var Xt=(Yt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},Yt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Kt.initElementListening(Ei,["scroll"]),Kt.addFirstInternalEventBeforeListener(Ei,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},Yt.prototype.waitForScroll=function(e){var t=this,n=null,o=new d.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},Yt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),pt(n)&&(Kt.initElementListening(n,["scroll"]),Kt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Kt.cancelElementListening(n)}))},Yt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Yt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Yt),Qt=($t.create=function(e){return new $t(e.top,e.right,e.bottom,e.left)},$t.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},$t.prototype.sub=function(e){return"top"in e&&(this.top-=e.top,this.left-=e.left),this.bottom-=e.bottom,this.right-=e.right,this},$t.prototype.round=function(e,t){return void 0===e&&(e=Math.round),void 0===t&&(t=e),this.top=e(this.top),this.right=t(this.right),this.bottom=t(this.bottom),this.left=e(this.left),this},$t.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},$t);function $t(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var Zt=f.utils.style,en=f.utils.style.getBordersWidth,tn=f.utils.style.getComputedStyle,nn=f.utils.style.getElementMargin,on=f.utils.style.getElementPadding,rn=f.utils.style.getElementScroll,an=f.utils.style.getOptionHeight,sn=f.utils.style.getSelectElementSize,ln=f.utils.style.isElementVisible,cn=f.utils.style.isVisibleChild,un=f.utils.style.getWidth,dn=f.utils.style.getHeight,fn=f.utils.style.getInnerWidth,hn=f.utils.style.getInnerHeight,pn=f.utils.style.getScrollLeft,mn=f.utils.style.getScrollTop,gn=f.utils.style.setScrollLeft,En=f.utils.style.setScrollTop,vn=f.utils.style.get,yn=f.utils.style.getBordersWidthFloat,bn=f.utils.style.getElementPaddingFloat;function Cn(e,t,n){for(var o in"string"==typeof t&&Zt.set(e,t,n),t)t.hasOwnProperty(o)&&Zt.set(e,o,t[o])}function Sn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function wn(e){return!!Ye(e,!0,function(e){return de(e)&&"hidden"===Zt.get(e,"visibility")})}function Tn(e){return!!Ye(e,!0,function(e){return de(e)&&"none"===Zt.get(e,"display")})}function _n(e){return!he(e)||Tn(e)||wn(e)}function In(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function Pn(e){return de(e)&&"fixed"===Zt.get(e,"position")}var Nn=Object.freeze({__proto__:null,getBordersWidth:en,getComputedStyle:tn,getElementMargin:nn,getElementPadding:on,getElementScroll:rn,getOptionHeight:an,getSelectElementSize:sn,isElementVisible:ln,isSelectVisibleChild:cn,getWidth:un,getHeight:dn,getInnerWidth:fn,getInnerHeight:hn,getScrollLeft:pn,getScrollTop:mn,setScrollLeft:gn,setScrollTop:En,get:vn,getBordersWidthFloat:yn,getElementPaddingFloat:bn,set:Cn,getViewportDimensions:function(){return{width:Sn(Ei.innerWidth,vi.documentElement.clientWidth,vi.body.clientWidth),height:Sn(Ei.innerHeight,vi.documentElement.clientHeight,vi.body.clientHeight)}},getWindowDimensions:function(e){return new Qt(0,un(e),dn(e),0)},isHiddenNode:wn,isNotDisplayedNode:Tn,isNotVisibleNode:_n,hasDimensions:In,isFixedElement:Pn}),xn=d.utils.browser,Rn=d.eventSandbox.listeners,Mn=d.eventSandbox.eventSimulator,On=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],Fn=123;function An(e,t,n,o,r){var i,a=d.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!He(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&xn.isMacPlatform||i.keyCode===Fn))return void r();if("blur"===e.type)if(xn.isIE&&xn.version<12){var s,l=Fe(a),c=!l&&"none"===vn(a,"display"),u=!1;l||c||(s=Ke(a),u=W(s,function(e){return"none"===vn(e,"display")})),(c||u.length)&&d.eventSandbox.timers.deferFunction(function(){Mn.blur(a)})}else if(a!==Ei&&a!==Ei.document&&!In(a))return;n()}}var Ln=(Vn.create=function(e){return"left"in e?new Vn(e.left,e.top):"right"in e?new Vn(e.right,e.bottom):new Vn(e.x,e.y)},Vn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Vn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Vn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Vn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Vn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Vn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Vn);function Vn(e,t){this.x=e,this.y=t}var Wn=/auto|scroll|hidden/i,kn="visible";function Hn(e){var t,n=vn(e,"overflowX"),o=vn(e,"overflowY"),r=Wn.test(n),i=Wn.test(o),a=ne(e).documentElement,s=e.scrollHeight;return(d.utils.browser.isChrome||d.utils.browser.isFirefox||d.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,s=s-a.getBoundingClientRect().top+t),(r||i)&&s>a.scrollHeight}function Dn(e){if(Re(e))return Hn(e);if(Me(e))return function(e){var t=vn(e,"overflowX"),n=vn(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(Hn(i))return!1;var a=Math.min(e.clientWidth,i.clientWidth),s=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>s||i.scrollWidth>a}(e);var t,n,o,r,i,a=(n=vn(t=e,"overflowX"),o=vn(t,"overflowY"),r=Wn.test(n),i=Wn.test(o),d.utils.browser.isIE&&(r=r||i&&n===kn,i=i||r&&o===kn),new Ln(r,i));if(!a.x&&!a.y)return!1;var s=a.y&&e.scrollHeight>e.clientHeight;return a.x&&e.scrollWidth>e.clientWidth||s}function Un(e){var t,n,o=Ke(e);return!ie(e)||(t=ae(e))&&(n=Ke(t),o.concat(n)),d.nativeMethods.arrayFilter.call(o,Dn)}var qn=Object.freeze({__proto__:null,hasScroll:Dn,getScrollableParents:Un}),Bn=f.shadowUI,Gn=f.nativeMethods,jn="disabled";function zn(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var Jn=(zn.prototype._createOption=function(e,t){var n=vi.createElement("div"),o=e.disabled||"optgroup"===ze(e.parentElement)&&e.parentElement.disabled,r="option"===ze(e)?e.text:"";Gn.nodeTextContentSetter.call(n,r),t.appendChild(n),Bn.addClass(n,"tcOption"),o&&(Bn.addClass(n,jn),Cn(n,"color",vn(e,"color"))),this.options.push(n)},zn.prototype._createGroup=function(e,t){var n=vi.createElement("div");Gn.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),Bn.addClass(n,"tcOptionGroup"),e.disabled&&(Bn.addClass(n,jn),Cn(n,"color",vn(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},zn.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},zn.prototype.createChildren=function(e,t){for(var n=st(e),o=0;o<n;o++)Pe(e[o])?this._createOption(e[o],t):"optgroup"===ze(e[o])&&this._createGroup(e[o],t)},zn.prototype.getEmulatedChildElement=function(e){var t="optgroup"===ze(e),n=nt(this.currentEl,e);return t?this.groups[n]:this.options[n]},zn.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},zn.prototype.isOptionElementVisible=function(e){var t=le(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=sn(t);return n||1<o},new zn),Kn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},Yn={notElementOrTextNode:function(e){return"\n The ".concat(e," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(e,t){return"\n The ".concat(t," (").concat(e,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(e,t,n,o){return"\n The ".concat(t," (").concat(e,") is too small to be visible: ").concat(n,"px x ").concat(o,"px.\n ")},elHasDisplayNone:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(e,t){return"\n The ".concat(t," (").concat(e,") has not been rendered.\n ")},optionNotVisible:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(e,t){return"\n The action target (".concat(e,") is invisible because ").concat(t,"\n ")}},Xn=f.utils.html,Qn=f.nativeMethods,$n=10;function Zn(e){if(!e)return"";var t,n,o,r=Qn.cloneNode.call(e),i=Xn.cleanUpHtml(Qn.elementOuterHTMLGetter.call(r)),a=(t=Qn.nodeTextContentGetter.call(e),n=$n,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),s=Qn.elementChildrenGetter.call(e);return 0<Qn.htmlCollectionLengthGetter.call(s)?i.replace("></",">...</"):a?i.replace("></",">".concat(a,"</")):i}var eo=f.utils.position.getElementRectangle,to=f.utils.position.getOffsetPosition,no=f.utils.position.offsetToClientCoords;function oo(e){var t,n,o,r,i=Me(e),a=i?e.getElementsByTagName("body")[0]:null,s=e.getBoundingClientRect(),l=Qt.create(en(e)),c=rn(e),u=ie(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Ln(0,0):Ln.create(s),h=s.height,p=s.width;i&&(p=a&&d?(h=a.clientHeight,a.clientWidth):(h=e.clientHeight,e.clientWidth)),!u||(t=ae(e))&&(n=to(t),o=no(Ln.create(n)),r=en(t),f.add(o).add(Ln.create(r)),i&&l.add(r));var m=!i&&fn(e)!==e.clientWidth,g=!i&&hn(e)!==e.clientHeight,E={right:m?Ge():0,bottom:g?Ge():0};return new Kn(p,h,f,l,c,E)}function ro(e){var t=e.x,n=e.y,o=vi.getElementFromPoint||vi.elementFromPoint,r=null;try{r=o.call(vi,t,n)}catch(e){return null}for(null===r&&(r=o.call(vi,t-1,n-1));r&&r.shadowRoot&&r.shadowRoot.elementFromPoint;){var i=r.shadowRoot.elementFromPoint(t,n);if(!i||r===i)break;r=i}return r}function io(e,t){return Qt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function ao(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=ne(e.target||e.srcElement),i=r.documentElement,a=r.body;return new Ln(Math.round(t.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i.clientTop||0)))}return new Ln(Math.round(t.pageX),Math.round(t.pageY))}function so(e){return!fo(e)}function lo(e){return"hidden"===vn(e,"visibility")}function co(e){return"collapse"===vn(e,"visibility")}function uo(e){return"none"===vn(e,"display")}function fo(e){return!pt(e)&&(lo(e)||co(e)||uo(e))}function ho(e){var t=eo(e);return 0===t.width||0===t.height}function po(e){return e.replace(/.*The/,"its")}var mo=Object.freeze({__proto__:null,getElementRectangle:eo,getOffsetPosition:to,offsetToClientCoords:no,getClientDimensions:oo,getElementFromPoint:ro,calcRelativePosition:io,getIframeClientCoordinates:function(e){var t=to(e),n=t.left,o=t.top,r=no({x:n,y:o}),i=en(e),a=on(e),s=r.x+i.left+a.left,l=r.y+i.top+a.top;return new Qt(l,s+un(e),l+dn(e),s)},containsOffset:function(e,t,n){var o=oo(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),a=o.scrollbar.right+o.border.left+o.border.right+r,s=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=a)&&(void 0===n||0<=n&&n<=s)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=ao(e),a=ne(r),s=0,l=0;return!ie(a.documentElement)||(t=ae(a))&&(n=to(t),o=en(t),s=n.left+o.left,l=n.top+o.top),new Ln(i.x+s,i.y+l)},getEventPageCoordinates:ao,getIframePointRelativeToParentFrame:function(e,t){var n=at(t),o=to(n),r=en(n),i=on(n);return no({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=eo(e);return new Ln(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=to(e),n=t.left,o=t.top,r=no({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=Ei.screenLeft||Ei.screenX,t=Ei.screenTop||Ei.screenY;return new Ln(e,t)},isIframeVisible:so,isElementVisible:function e(t){if(!ke(t)&&!fe(t))return!1;if(Pe(t)||"optgroup"===ze(t))return Jn.isOptionElementVisible(t);if(pe(t))return so(t);if(Ne(t))return!Ye(t,!0,fo)&&!ho(t);if(fe(t))return!_n(t);if(!We(t)&&ho(t))return!1;if(xe(t)){var n=je(Je(t,"map"));return!!n&&e(n)}return In(t)&&!fo(t)},getSubHiddenReason:po,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=fe(t);if(!ke(t)&&!o)return Yn.notElementOrTextNode(n);var r=o?t.data:Zn(t),i=t.offsetHeight,a=t.offsetWidth;if((Pe(t)||"optgroup"===ze(t))&&!Jn.isOptionElementVisible(t)){var s=Zn(le(t));return Yn.optionNotVisible(r,n,s)}if(xe(t)){var l=po(e(je(Je(t,"map")),"container")||"");return Yn.mapContainerNotVisible(r,l)}var c=Ye(t,!1,lo);if(c)return Yn.parentHasVisibilityHidden(r,n,Zn(c));var u=Ye(t,!1,co);if(u)return Yn.parentHasVisibilityCollapse(r,n,Zn(u));var d=Ye(t,!1,uo);return d?Yn.parentHasDisplayNone(r,n,Zn(d)):lo(t)?Yn.elHasVisibilityHidden(r,n):co(t)?Yn.elHasVisibilityCollapse(r,n):uo(t)?Yn.elHasDisplayNone(r,n):fe(t)&&!he(t)?Yn.elNotRendered(r,n):!We(t)&&ho(t)||!In(t)?Yn.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=Zn(t);if(xe(t)){var r=po(e(je(Je(t,"map")),"container")||"");return Yn.mapContainerNotVisible(o,r)}return Yn.elOutsideBounds(o,n)}});function go(n,o){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var Eo=Object.freeze({__proto__:null,whilst:function(t,n){return E(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:go,each:function(r,i){return E(this,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),vo=f.Promise,yo=f.eventSandbox.message;function bo(e,o,t){return new vo(function(n){yo.on(yo.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(yo.off(yo.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),yo.sendServiceMsg(e,t)})}var Co=(So._isScrollValuesChanged=function(e,t){return pn(e)!==t.left||mn(e)!==t.top},So.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Me(e)?ne(e):e,a={left:pn(i),top:mn(i)},o=Math.max(o,0),r=Math.max(r,0),s=Xt.waitForScroll(i);return gn(i,o),En(i,r),So._isScrollValuesChanged(i,a)?s=s.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=So._isScrollValuesChanged(i,a))}):(s.cancel(),d.Promise.resolve())},So.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),a=this._scrollToCenter?r:Math.min(n.top,r),s=e.scroll,l=s.left,c=s.top,u=t.x>=l+e.width-i,d=t.x<=l+i,f=t.y>=c+e.height-a,h=t.y<=c+a;return u?l=t.x-e.width+i:d&&(l=t.x-i),f?c=t.y-e.height+a:h&&(c=t.y-a),{left:l,top:c}},So.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,a,s={left:null,top:null},l=e.width>=t.width,c=e.height>=t.height,u=io(t,e);return l&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),u.left<r?s.left=Math.round(e.scroll.left+u.left-r):u.right<r&&(s.left=Math.round(e.scroll.left+Math.min(u.left,-u.right)+r))),c&&(i=e.height-t.height,a=Math.min(n.top,i),this._scrollToCenter&&(a=i/2),u.top<a?s.top=Math.round(e.scroll.top+u.top-a):u.bottom<a&&(s.top=Math.round(e.scroll.top+Math.min(u.top,-u.bottom)+a))),s},So._getChildPoint=function(e,t,n){return Ln.create(t).sub(Ln.create(e)).add(Ln.create(e.scroll)).add(Ln.create(t.border)).add(n)},So.prototype._getScrollPosition=function(e,t,n,o){var r=So._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),a=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===a.left?i.left:a.left,0),top:Math.max(null===a.top?i.top:a.top,0)}},So._getChildPointAfterScroll=function(e,t,n,o){return Ln.create(t).add(Ln.create(e.scroll)).sub(Ln.create(n)).add(o)},So.prototype._isChildFullyVisible=function(e,t,n){var o=So._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,a=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&a===e.scroll.top},So.prototype._scrollToChild=function(e,t,n){for(var o=oo(e),r=oo(t),i=fn(Ei),a=hn(Ei),s=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){s=this._getScrollPosition(o,r,n,this._maxScrollMargin);var c=So._getChildPointAfterScroll(o,r,s,n),u=this._isTargetElementObscuredInPoint(c);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),l=u&&this._maxScrollMargin.top<a}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,s)},So.prototype._scrollElement=function(){if(!Dn(this._element))return d.Promise.resolve();var e=oo(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},So.prototype._scrollParents=function(){var t,n,o=this,r=Un(this._element),i=this._element,e=pn(i),a=mn(i),s=Ln.create(this._offsets).sub(new Ln(e,a).round()),l=go(r.length,function(e){return o._scrollToChild(r[e],i,s).then(function(){t=oo(i),n=oo(r[e]),s.add(Ln.create(t)).sub(Ln.create(n)).add(Ln.create(n.border)),i=r[e]})}),c={scrollWasPerformed:this._scrollWasPerformed,offsetX:s.x,offsetY:s.y,maxScrollMargin:this._maxScrollMargin};return l.then(function(){var e;if(!o._skipParentFrames&&(e=Ei).top!==e)return c.cmd=So.SCROLL_REQUEST_CMD,bo(c,So.SCROLL_RESPONSE_CMD,Ei.parent)}).then(function(){return o._scrollWasPerformed})},So._getFixedAncestorOrSelf=function(e){return Ye(e,!0,Pn)},So.prototype._isTargetElementObscuredInPoint=function(e){var t=ro(e);if(!t)return!1;var n=So._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},So.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},So.SCROLL_REQUEST_CMD="automation|scroll|request",So.SCROLL_RESPONSE_CMD="automation|scroll|response",So);function So(e,t,n){this._element=e,this._offsets=new Ln(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function wo(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return!lt(t)&&Wo(e)?e:X(t,Wo)}function To(e){return X(d.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Wo(e)||!ko(e)&&To(e)})}function _o(e){return fe(e)||de(e)&&ln(e)}function Io(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return W(t,_o)}function Po(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return G(t,_o)}function No(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return G(t,function(e){return Jo(e,!0)})}function xo(e,t){var n,o;if(!He(e)&&!He(t)){var r=d.nativeMethods.nodeChildNodesGetter.call(t);return!ot(t,e)&<(r)&&/div|p/.test(ze(t))&&(n=To(e))&&!ot(t,n)&&(o=Oo(n))&&!ot(t,o)&&wo(t)}}function Ro(e,t){var n,o,r,i=he(t);if(!He(e)&&!He(t)){var a=d.nativeMethods.nodeChildNodesGetter.call(t);if(!ot(t,e)&&(i&&de(t)&<(a)&&!/div|p/.test(ze(t))||Wo(t)&&!ot(t,e)&&t.nodeValue.length)){if(i&&de(t)){if(!(n=To(e))||ot(t,n))return;if(!(o=Oo(n))||ot(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!ko(n)&&!Vo(n)){t=n;break}return t}(t))&&de(r)&&/div|p/.test(ze(r))&&wo(r)}}}function Mo(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=lt(r),a=null,s=t?Wo:fe;if(!i&&s(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=de(n)&&!We(n),s(n))return n;if(he(n)&&Po(n)&&!o&&(a=Mo(n,t)))return a}return a}function Oo(e){return Mo(e,!0)}function Fo(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=lt(r),a=null;if(!i&&Wo(e))return e;for(var s=i-1;0<=s;s--){if(n=r[s],o=de(n)&&!We(n),fe(n)&&(!t||!Vo(n)))return n;if(he(n)&&Po(n)&&!o&&(a=Fo(n,!1)))return a}return a}function Ao(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function Lo(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function Vo(e){if(!fe(e))return!1;var t=e.nodeValue,n=Ao(t),o=Lo(t);return n===t.length&&0===o}function Wo(e){return fe(e)&&!Vo(e)}function ko(e){return!he(e)||He(e)}function Ho(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function Do(e){var t=Ke(e);if(Ho(e)&&We(e))return e;var n=ne(e);return"on"===n.designMode?n.body:X(t,function(e){return Ho(e)&&We(e)})}function Uo(e,t){if(ot(e,t))return ot(t,Do(e))?e:d.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=Do(e),r=null;if(!tt(o,t))return null;for(r=e;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==B(n,r))return r;return o}function qo(e,t){var n=null,o=null,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=lt(r),a=i<=t;if(He(e))return{node:e,offset:t};if(a?n=r[i-1]:(n=r[t],o=0),He(n)){if(i<=1)return{node:e,offset:0};(a=i<=t-1)?n=r[i-2]:(n=r[t-1],o=0)}for(;!ko(n)&&de(n);){var s=Io(n);if(!s.length){o=0;break}n=s[a?s.length-1:0]}return 0===o||ko(n)||(o=n.nodeValue?n.nodeValue.length:0),{node:n,offset:o}}function Bo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(ot(e,o)||de(o))&&No(o)&&(i=qo(o,r)),{node:i.node,offset:i.offset}}function Go(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(ot(e,o)||de(o))&&No(o)&&(i=qo(o,r)),{node:i.node,offset:i.offset}}function jo(e,t,n){return Yo(e,Bo(e,t,n))}function zo(e,t,n){return Yo(e,Go(e,t,n))}function Jo(e,t){if(_n(e))return!1;if(fe(e))return!0;if(!de(e))return!1;if(No(e))return t;var n=d.nativeMethods.nodeParentNodeGetter.call(e),o=!We(n),r=Io(e),i=G(r,function(e){return"br"===ze(e)});return o||i}function Ko(s,e){var l={node:null,offset:e};return function e(t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(t),i=lt(r);if(l.node)return l;if(ko(t))return l;if(fe(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&Ro(s,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(de(t)){if(!_o(t))return l;if(0===l.offset&&Jo(t,!1))return l.node=t,l.offset=(n=t,o=0,X(d.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===ze(e)})?o:0),l;(l.node||!xo(s,t)&&!Ro(s,t))&&(i||"br"!==ze(t))||l.offset--}for(var a=0;a<i;a++)l=e(r[a]);return l}(s)}function Yo(i,e){var a=e.node,s=e.offset,l=0,c=!1;return function e(t){var n=d.nativeMethods.nodeChildNodesGetter.call(t),o=lt(n);if(c)return l;if(ot(a,t))return(xo(i,t)||Ro(i,t))&&l++,c=!0,l+s;if(ko(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!c&&Ro(i,t)&&l++,l+=t.nodeValue.length):(!o&&de(t)&&"br"===ze(t)||!c&&(xo(i,t)||Ro(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Xo(e){var t,n,o,r,i,a=fe(e)?e:Fo(e,!0);if(!a||(t=a,o=fe(n=e)?n:Mo(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=d.nativeMethods.nodeParentNodeGetter.call(e),-1<B(n,vn(e,"white-space")))return 1}(t,n)))return 0;var s=ne(e).createRange();return s.selectNodeContents(a),Yo(e,{node:a,offset:s.endOffset})}var Qo=Object.freeze({__proto__:null,getFirstVisibleTextNode:Oo,getLastTextNode:Fo,getFirstNonWhitespaceSymbolIndex:Ao,getLastNonWhitespaceSymbolIndex:Lo,isInvisibleTextNode:Vo,findContentEditableParent:Do,getNearestCommonAncestor:Uo,getSelection:function(e,t,n){return{startPos:Bo(e,t,n),endPos:Go(e,t,n)}},getSelectionStartPosition:jo,getSelectionEndPosition:zo,calculateNodeAndOffsetByPosition:Ko,calculatePositionByNodeAndOffset:Yo,getElementBySelection:function(e){var t=Uo(e.anchorNode,e.focusNode);return fe(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=fe(e)?e:Oo(e),n=ne(e).createRange();return t?(n.selectNodeContents(t),Yo(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Xo,getContentEditableValue:function(e){return k(function e(t){var n=[],o=d.nativeMethods.nodeChildNodesGetter.call(t),r=lt(o);ko(t)||r||!fe(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),$o=f.utils.browser,Zo=f.nativeMethods,er=f.eventSandbox.selection,tr="backward",nr="forward",or="none",rr=or,ir=0,ar=0,sr=0,lr=0,cr=0,ur=0;function dr(e,t,n,o){var r,i,a,s=null,l=null,c=!1;void 0!==t&&void 0!==n&&n<t&&(a=t,t=n,n=a,c=!0),void 0===t&&(l={node:(r=Oo(e))||e,offset:r&&r.nodeValue?Ao(r.nodeValue):0}),void 0===n&&(s={node:(i=Fo(e,!0))||e,offset:i&&i.nodeValue?Lo(i.nodeValue):0}),l=l||Ko(e,t),s=s||Ko(e,n),l.node&&s.node&&(c?Er(s,l,o):Er(l,s,o))}function fr(e){var t=e?ne(e):vi,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function hr(e,t,n){var o=Yo(e,t);return Yo(e,n)<o}function pr(e){return We(e)?vr(e)?jo(e,gr(e),fr(e)):0:er.getSelection(e).start}function mr(e){return We(e)?vr(e)?zo(e,gr(e),fr(e)):0:er.getSelection(e).end}function gr(e){var t=ne(e);return t?t.getSelection():Ei.getSelection()}function Er(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,a=r.nodeValue?r.length:0,s=e.offset,l=t.offset;de(o)&&s||(s=Math.min(i,e.offset)),de(r)&&l||(l=Math.min(a,t.offset));var c=Do(o),u=hr(c,e,t),d=gr(c),f=ne(c).createRange();er.wrapSetterSelection(c,function(){var e;d.removeAllRanges(),u?$o.isIE?(f.setStart(r,l),f.setEnd(o,s),d.addRange(f)):(f.setStart(o,s),f.setEnd(o,s),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},($o.isSafari||$o.isChrome&&$o.version<58)&&Vo(r)?e(r,Math.min(l,1))||e(r,0):e(r,l)):(f.setStart(o,s),f.setEnd(r,l),d.addRange(f))},n,!0)}function vr(e){var t=gr(e);return!(!t.anchorNode||!t.focusNode)&&tt(e,t.anchorNode)&&tt(e,t.focusNode)}$o.isIE&&_t(vi,"selectionchange",function(){var e=null,t=null,n=null;try{if(this.selection)t=this.selection.createRange();else{if(!(e=Zo.documentActiveElementGetter.call(this))||!Le(e))return void(rr=or);var o,r=pr(e),i=mr(e);e.createTextRange?((t=e.createTextRange()).collapse(!0),t.moveStart("character",r),t.moveEnd("character",i-r)):vi.createRange&&(t=vi.createRange(),o=f.nativeMethods.nodeFirstChildGetter.call(e),t.setStart(o,r),t.setEnd(o,i),n=t.getBoundingClientRect())}}catch(e){return void(rr=or)}var a=n?Math.ceil(n.left):t.offsetLeft,s=n?Math.ceil(n.top):t.offsetTop,l=n?Math.ceil(n.height):t.boundingHeight,c=n?Math.ceil(n.width):t.boundingWidth,u=t.htmlText?t.htmlText.length:0;!function(e,t,n,o,r){if(r)switch(rr){case or:t===ur&&(e===lr||sr<n)?rr=nr:(e<lr||t<ur)&&(rr=tr);break;case nr:if(e===lr&&t===ur||e<lr&&sr<n||t===ur&&n===sr&&cr<r&&e+o!==ir)break;(e<lr||t<ur)&&(rr=tr);break;case tr:if((e<lr||t<ur)&&cr<r)break;t===ar&&(ir<=e||sr<n)&&(rr=nr)}else ir=e,ar=t,rr=or;sr=n,lr=e,cr=r,ur=t}(a,s,l,c,n?t.toString().length:u)},!0);var yr,br,Cr=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:fr,isInverseSelectionContentEditable:hr,getSelectionStart:pr,getSelectionEnd:mr,hasInverseSelection:function(e){return We(e)?fr(e):(er.getSelection(e).direction||rr)===tr},getSelectionByElement:gr,select:function(e,t,n){var o,r,i,a;We(e)?dr(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?ht(e).length:n)<o&&(a=o,o=r,r=a,i=!0),er.setSelection(e,o,r,i?tr:nr),rr=t===n?or:i?tr:nr)},selectByNodesAndOffsets:Er,deleteSelectionContents:function(e,t){var n,o,r,i,a,s,l,c,u,d,f,h,p=pr(e),m=mr(e);t&&dr(e),p!==m&&(n=gr(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,s=Ao(o.nodeValue),l=Lo(o.nodeValue),c=Ao(r.nodeValue),u=Lo(r.nodeValue),f=d=null,fe(o)&&(i<s&&0!==i?d=0:i!==o.nodeValue.length&&(Vo(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),fe(r)&&(a<c&&0!==a?f=0:a!==r.nodeValue.length&&(Vo(r)&&0!==a||u<a)&&(f=r.nodeValue.length)),($o.isWebKit||$o.isIE&&11<$o.version)&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(s):o.nodeValue.substring(0,l)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(c):r.nodeValue.substring(0,u))),null===d&&null===f||Er({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:a}),function(e){var t=gr(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=gr(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Xo(e);dr(e,t,t)},hasElementContainsSelection:vr}),Sr=f.Promise,wr=f.nativeMethods,Tr={cannotCreateMultipleLiveModeRunners:"E1000",cannotRunLiveModeRunnerMultipleTimes:"E1001",browserDisconnected:"E1002",cannotRunAgainstDisconnectedBrowsers:"E1003",cannotEstablishBrowserConnection:"E1004",cannotFindBrowser:"E1005",browserProviderNotFound:"E1006",browserNotSet:"E1007",testFilesNotFound:"E1008",noTestsToRun:"E1009",cannotFindReporterForAlias:"E1010",multipleSameStreamReporters:"E1011",optionValueIsNotValidRegExp:"E1012",optionValueIsNotValidKeyValue:"E1013",invalidSpeedValue:"E1014",invalidConcurrencyFactor:"E1015",cannotDivideRemotesCountByConcurrency:"E1016",portsOptionRequiresTwoNumbers:"E1017",portIsNotFree:"E1018",invalidHostname:"E1019",cannotFindSpecifiedTestSource:"E1020",clientFunctionCodeIsNotAFunction:"E1021",selectorInitializedWithWrongType:"E1022",clientFunctionCannotResolveTestRun:"E1023",regeneratorInClientFunctionCode:"E1024",invalidClientFunctionTestRunBinding:"E1025",invalidValueType:"E1026",unsupportedUrlProtocol:"E1027",testControllerProxyCannotResolveTestRun:"E1028",timeLimitedPromiseTimeoutExpired:"E1029",noTestsToRunDueFiltering:"E1030",cannotSetVideoOptionsWithoutBaseVideoPathSpecified:"E1031",multipleAPIMethodCallForbidden:"E1032",invalidReporterOutput:"E1033",cannotReadSSLCertFile:"E1034",cannotPrepareTestsDueToError:"E1035",cannotParseRawFile:"E1036",testedAppFailedWithError:"E1037",unableToOpenBrowser:"E1038",requestHookConfigureAPIError:"E1039",forbiddenCharatersInScreenshotPath:"E1040",cannotFindFFMPEG:"E1041",compositeArgumentsError:"E1042",cannotFindTypescriptConfigurationFile:"E1043",clientScriptInitializerIsNotSpecified:"E1044",clientScriptBasePathIsNotSpecified:"E1045",clientScriptInitializerMultipleContentSources:"E1046",cannotLoadClientScriptFromPath:"E1047",clientScriptModuleEntryPointPathCalculationError:"E1048",methodIsNotAvailableForAnIPCHost:"E1049",tooLargeIPCPayload:"E1050",malformedIPCMessage:"E1051",unexpectedIPCHeadPacket:"E1052",unexpectedIPCBodyPacket:"E1053",unexpectedIPCTailPacket:"E1054",cannotRunLocalNonHeadlessBrowserWithoutDisplay:"E1057",uncaughtErrorInReporter:"E1058",roleInitializedWithRelativeUrl:"E1059",typeScriptCompilerLoadingError:"E1060",cannotCustomizeSpecifiedCompilers:"E1061",cannotEnableRetryTestPagesOption:"E1062",browserConnectionError:"E1063",testRunRequestInDisconnectedBrowser:"E1064",invalidQuarantineOption:"E1065",invalidQuarantineParametersRatio:"E1066",invalidAttemptLimitValue:"E1067",invalidSuccessThresholdValue:"E1068",cannotSetConcurrencyWithCDPPort:"E1069",cannotFindTestcafeConfigurationFile:"E1070",dashboardTokenInJSON:"E1071",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078",invalidCustomActionsOptionType:"E1079",invalidCustomActionType:"E1080",cannotImportESMInCommonsJS:"E1081"};(br=yr=yr||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",br.UseBrowserInitOption="UseBrowserInitOption",br.RestErrorCauses="RestErrorCauses";var _r,Ir,Pr,Nr,xr,Rr=yr,Mr=", ",Or='"';function Fr(e,t){return"".concat(t).concat(e).concat(t)}function Ar(e,t,n){void 0===t&&(t=Mr),void 0===n&&(n=Or);var o=y([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return Fr(e,n)}).join(t);if(1===o.length)return Fr(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(Fr(r,n)," and ").concat(Fr(i,n))}var a=o.pop(),s=o.map(function(e){return Fr(e,n)}).join(t);return"".concat(s,", and ").concat(Fr(a,n))}(Ir=_r=_r||{}).message="message",Ir.stack="stack",Ir.pageUrl="pageUrl",(Nr=Pr=Pr||{}).fn="fn",Nr.dependencies="dependencies";var Lr,Vr="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Wr="https://testcafe.io/documentation/402638/reference/configuration-file#filter",kr="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",Hr="https://testcafe.io/documentation/404150/guides/advanced-guides/custom-test-actions",Dr=((xr={})[Tr.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",xr[Tr.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",xr[Tr.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",xr[Tr.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",xr[Tr.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',xr[Tr.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",xr[Tr.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',xr[Tr.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',xr[Tr.browserNotSet]="You have not specified a browser.",xr[Tr.testFilesNotFound]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(Vr,"."),xr[Tr.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",xr[Tr.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(Wr,"."),xr[Tr.cannotFindReporterForAlias]='The "{name}" reporter does not exist. Check the reporter parameter for errors.',xr[Tr.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',xr[Tr.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',xr[Tr.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',xr[Tr.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',xr[Tr.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',xr[Tr.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',xr[Tr.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',xr[Tr.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",xr[Tr.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",xr[Tr.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",xr[Tr.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',xr[Tr.portsOptionRequiresTwoNumbers]='The "--ports" argument accepts two values at a time.',xr[Tr.portIsNotFree]="Port {portNum} is occupied by another process.",xr[Tr.invalidHostname]='Cannot resolve hostname "{hostname}".',xr[Tr.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',xr[Tr.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",xr[Tr.selectorInitializedWithWrongType]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",xr[Tr.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} cannot implicitly resolve the test run in context of which it should be executed. If you need to call {#instantiationCallsiteName} from the Node.js API callback, pass the test controller manually via {#instantiationCallsiteName}'s `.with({ boundTestRun: t })` method first. Note that you cannot execute {#instantiationCallsiteName} outside the test code.",xr[Tr.requestCannotResolveTestRun]="'request' cannot implicitly resolve the test run in context of which it should be executed. Note that you cannot execute 'request' in the experimental debug mode.",xr[Tr.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',xr[Tr.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',xr[Tr.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",xr[Tr.unsupportedUrlProtocol]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',xr[Tr.testControllerProxyCannotResolveTestRun]="Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.",xr[Tr.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",xr[Tr.cannotSetVideoOptionsWithoutBaseVideoPathSpecified]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",xr[Tr.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',xr[Tr.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",xr[Tr.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',xr[Tr.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",xr[Tr.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',xr[Tr.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",xr[Tr.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',xr[Tr.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",xr[Tr.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',xr[Tr.cannotFindFFMPEG]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",xr[Tr.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',xr[Tr.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",xr[Tr.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",xr[Tr.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",xr[Tr.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",xr[Tr.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",xr[Tr.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",xr[Tr.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",xr[Tr.malformedIPCMessage]="Cannot process a malformed IPC message.",xr[Tr.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",xr[Tr.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",xr[Tr.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",xr[Tr.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux version does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(kr),xr[Tr.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',xr[Tr.roleInitializedWithRelativeUrl]="You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.",xr[Tr.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",xr[Tr.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",xr[Tr.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set 'localhost' as the value of the 'hostname' option\n-- run TestCafe over HTTPS\n",xr[Tr.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",xr[Rr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Try to decrease the concurrency factor or allocate more computing resources to the host machine.",xr[Rr.UseBrowserInitOption]='Increase the value of the "browserInitTimeout" option if it is too low (currently: {browserInitTimeoutMsg}). This option determines how long TestCafe waits for browsers to be ready.',xr[Rr.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",xr[Tr.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",xr[Tr.dashboardTokenInJSON]="Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.",xr[Tr.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',xr[Tr.requestUrlInvalidValueError]="Requested url isn't valid ({actualValue}).",xr[Tr.requestRuntimeError]="The request was interrupted by an error:\n{message}",xr[Tr.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(Ar(Object.keys(_r)),"."),xr[Tr.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callback: '.concat(Ar(Object.keys(Pr)),"."),xr[Tr.invalidCommandInJsonCompiler]='TestCafe terminated the test run. The "{path}" file contains an unknown Chrome User Flow action "{action}". Remove the action to continue. Refer to the following article for the definitive list of supported Chrome User Flow actions: https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support#supported-replay-actions',xr[Tr.invalidCustomActionsOptionType]="The value of the customActions option does not belong to type Object. Refer to the following article for custom action setup instructions: ".concat(Hr),xr[Tr.invalidCustomActionType]='TestCafe cannot parse the "{actionName}" action, because the action definition is invalid. Format the definition in accordance with the custom actions guide: '.concat(Hr),xr[Tr.cannotImportESMInCommonsJS]="Cannot import the {esModule} ECMAScript module from {targetFile}. Use a dynamic import() statement or enable the --experimental-esm CLI flag.",xr[Tr.timeLimitedPromiseTimeoutExpired]),Ur=(g(qr,Lr=Error),qr);function qr(){var e=Lr.call(this,Dr)||this;return e.code=Tr.timeLimitedPromiseTimeoutExpired,e}function Br(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return k(t,function(e){return e.replace("plus","+")})}function Gr(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return a.modifiersMap[t]&&(t=a.modifiersMap[t]),t}var jr,zr,Jr=f.utils.trim,Kr={run:"run",idle:"idle"};(zr=jr=jr||{}).ok="ok",zr.closing="closing";var Yr=jr,Xr="file://",Qr=vi.location.href,$r=vi.location.origin,Zr=$r+"/service-worker.js",ei=!1,ti=null,ni=eval;function oi(t){return new u(function(e){return setTimeout(e,t)})}function ri(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,a=n.data,s=void 0===a?null:a,l=n.parseResponse,c=void 0===l||l;return new u(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&c&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(s)})}function ii(e){return Qr.toLowerCase()===e.toLowerCase()}function ai(){ei=!1}function si(e,t,n){ri(n,t,{method:"POST",data:JSON.stringify({url:e.url})})}function li(e,t,n){var o;ai(),void 0===(o=e.url)&&(o=""),0===o.indexOf(Xr)?si(e,t,n):vi.location=e.url}function ci(e){return(e.cmd===Kr.run||e.cmd===Kr.idle)&&!ii(e.url)}function ui(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,s=n.manualRedirect,l=n.proxyless;return E(this,void 0,void 0,function(){var n,o;return v(this,function(e){switch(e.label){case 0:return[4,ri(i,r)];case 1:return n=e.sent(),(o=l?(t=n).cmd!==Kr.idle||ci(t):ci(n))&&!s&&li(n,r,a),[2,{command:n,redirecting:o}]}var t})})}var di=Object.freeze({__proto__:null,delay:oi,sendXHR:ri,startHeartbeat:function(e,t){function n(){ri(e,t).then(function(e){e.code!==Yr.closing||ii(e.url)||(ai(),vi.location=e.url)})}ti=Ei.setInterval(n,2e3),n()},stopHeartbeat:function(){Ei.clearInterval(ti)},startInitScriptExecution:function(e,t){ei=!0,function e(t,n){ei&&ri(t,n).then(function(e){return e.code?ri(t,n,{method:"POST",data:JSON.stringify(ni(e.code))}):null}).then(function(){Ei.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:ai,redirectUsingCdp:si,redirect:li,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return E(this,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,ui.apply(void 0,n)];case 1:return[2,e.sent()];case 2:return t=e.sent(),console.error(t),[2,{error:t}];case 3:return[2]}})})}.apply(void 0,i)]:[3,5];case 2:return r=e.sent(),t=r.error,n=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(r,["error"]),t?[4,oi(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register(Zr,{scope:$r})];case 2:return e.sent(),[4,navigator.serviceWorker.ready];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),console.error(t),[3,5];case 5:return[2]}})})},getActiveWindowId:function(e,t){return ri(e,t)},setActiveWindowId:function(e,t,n){return ri(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return ri(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},dispatchProxylessEvent:function(n,o,r,i,a){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:return[4,o.hide()];case 1:return e.sent(),t=JSON.stringify({type:i,options:a}),[4,ri(n,r,{method:"POST",data:t})];case 2:return e.sent(),[4,o.show()];case 3:return e.sent(),[2]}})})},dispatchProxylessEventSequence:function(t,n,o,r){return E(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:return[4,n.hide()];case 1:return e.sent(),[4,ri(t,o,{method:"POST",data:JSON.stringify(r)})];case 2:return e.sent(),[4,n.show()];case 3:return e.sent(),[2]}})})},parseSelector:function(e,t,n){return ri(e,t,{method:"POST",data:JSON.stringify({selector:n})})}}),fi={};fi.RequestBarrier=h,fi.ClientRequestEmitter=I,fi.ScriptExecutionBarrier=N,fi.ScriptExecutionEmitter=A,fi.pageUnloadBarrier=jt,fi.preventRealEvents=function(){Rn.initElementListening(Ei,On),Rn.addFirstInternalEventBeforeListener(Ei,On,An),Xt.init()},fi.disableRealEventsPreventing=function(){Rn.removeInternalEventBeforeListener(Ei,On,An)},fi.scrollController=Xt,fi.ScrollAutomation=Co,fi.selectController=Jn,fi.serviceUtils=Jt,fi.domUtils=mt,fi.contentEditable=Qo,fi.positionUtils=mo,fi.styleUtils=Nn,fi.scrollUtils=qn,fi.eventUtils=Rt,fi.arrayUtils=Q,fi.promiseUtils=Eo,fi.textSelection=Cr,fi.waitFor=function(i,a,s){return new Sr(function(e,t){var n,o,r=i();r?e(r):(n=wr.setInterval.call(Ei,function(){(r=i())&&(wr.clearInterval.call(Ei,n),wr.clearTimeout.call(Ei,o),e(r))},a),o=wr.setTimeout.call(Ei,function(){wr.clearInterval.call(Ei,n),t()},s))})},fi.delay=c,fi.getTimeLimitedPromise=function(e,t){return d.Promise.race([e,c(t).then(function(){return d.Promise.reject(new Ur)})])},fi.noop=function(){},fi.getKeyArray=Br,fi.getSanitizedKey=Gr,fi.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Jr(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:G(r,function(e){var t=Br(e);return G(t,function(e){var t=1===e.length||"space"===e,n=Gr(e),o=a.modifiers[n],r=a.specialKeys[n];return!(t||o||r)})}),keys:e}},fi.sendRequestToFrame=bo,fi.KEY_MAPS=a,fi.browser=di,fi.stringifyElement=Zn,fi.selectorTextFilter=function o(e,r,i,a){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,a))return!0;return!1}function n(e){return a instanceof RegExp?a.test(e):a===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var s=e.querySelector("head"),l=e.querySelector("body");return t(s)||t(l)},fi.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var a,s=e.attributes,l=0;l<s.length;l++)if(i((a=s[l]).nodeName,o)&&(!r||i(a.nodeValue,r)))return!0;return!1},fi.TEST_RUN_ERRORS={uncaughtErrorOnPage:"E1",uncaughtErrorInTestCode:"E2",uncaughtNonErrorObjectInTestCode:"E3",uncaughtErrorInClientFunctionCode:"E4",uncaughtErrorInCustomDOMPropertyCode:"E5",unhandledPromiseRejection:"E6",uncaughtException:"E7",missingAwaitError:"E8",actionIntegerOptionError:"E9",actionPositiveIntegerOptionError:"E10",actionBooleanOptionError:"E11",actionSpeedOptionError:"E12",actionOptionsTypeError:"E14",actionBooleanArgumentError:"E15",actionStringArgumentError:"E16",actionNullableStringArgumentError:"E17",actionStringOrStringArrayArgumentError:"E18",actionStringArrayElementError:"E19",actionIntegerArgumentError:"E20",actionRoleArgumentError:"E21",actionPositiveIntegerArgumentError:"E22",actionSelectorError:"E23",actionElementNotFoundError:"E24",actionElementIsInvisibleError:"E26",actionSelectorMatchesWrongNodeTypeError:"E27",actionAdditionalElementNotFoundError:"E28",actionAdditionalElementIsInvisibleError:"E29",actionAdditionalSelectorMatchesWrongNodeTypeError:"E30",actionElementNonEditableError:"E31",actionElementNotTextAreaError:"E32",actionElementNonContentEditableError:"E33",actionElementIsNotFileInputError:"E34",actionRootContainerNotFoundError:"E35",actionIncorrectKeysError:"E36",actionCannotFindFileToUploadError:"E37",actionUnsupportedDeviceTypeError:"E38",actionIframeIsNotLoadedError:"E39",actionElementNotIframeError:"E40",actionInvalidScrollTargetError:"E41",currentIframeIsNotLoadedError:"E42",currentIframeNotFoundError:"E43",currentIframeIsInvisibleError:"E44",nativeDialogNotHandledError:"E45",uncaughtErrorInNativeDialogHandler:"E46",setTestSpeedArgumentError:"E47",setNativeDialogHandlerCodeWrongTypeError:"E48",clientFunctionExecutionInterruptionError:"E49",domNodeClientFunctionResultError:"E50",invalidSelectorResultError:"E51",cannotObtainInfoForElementSpecifiedBySelectorError:"E52",externalAssertionLibraryError:"E53",pageLoadError:"E54",windowDimensionsOverflowError:"E55",forbiddenCharactersInScreenshotPathError:"E56",invalidElementScreenshotDimensionsError:"E57",roleSwitchInRoleInitializerError:"E58",assertionExecutableArgumentError:"E59",assertionWithoutMethodCallError:"E60",assertionUnawaitedPromiseError:"E61",requestHookNotImplementedError:"E62",requestHookUnhandledError:"E63",uncaughtErrorInCustomClientScriptCode:"E64",uncaughtErrorInCustomClientScriptCodeLoadedFromModule:"E65",uncaughtErrorInCustomScript:"E66",uncaughtTestCafeErrorInCustomScript:"E67",childWindowIsNotLoadedError:"E68",childWindowNotFoundError:"E69",cannotSwitchToWindowError:"E70",closeChildWindowError:"E71",childWindowClosedBeforeSwitchingError:"E72",cannotCloseWindowWithChildrenError:"E73",targetWindowNotFoundError:"E74",parentWindowNotFoundError:"E76",previousWindowNotFoundError:"E77",switchToWindowPredicateError:"E78",actionFunctionArgumentError:"E79",multipleWindowsModeIsDisabledError:"E80",multipleWindowsModeIsNotSupportedInRemoteBrowserError:"E81",cannotCloseWindowWithoutParent:"E82",cannotRestoreChildWindowError:"E83",executionTimeoutExceeded:"E84",actionRequiredCookieArguments:"E85",actionCookieArgumentError:"E86",actionCookieArgumentsError:"E87",actionUrlCookieArgumentError:"E88",actionUrlsCookieArgumentError:"E89",actionStringOptionError:"E90",actionDateOptionError:"E91",actionNumberOptionError:"E92",actionUrlOptionError:"E93",actionUrlSearchParamsOptionError:"E94",actionObjectOptionError:"E95",actionUrlArgumentError:"E96",actionStringOrRegexOptionError:"E97",actionSkipJsErrorsArgumentError:"E98",actionFunctionOptionError:"E99",actionInvalidObjectPropertyError:"E100",actionElementIsNotTargetError:"E101"},fi.RUNTIME_ERRORS=Tr;var hi=f.nativeMethods,pi=f.EVENTS.evalIframeScript;hi.objectDefineProperty(Ei,"%testCafeCore%",{configurable:!0,value:fi}),f.on(pi,function(e){return gi(hi.contentWindowGetter.call(e.iframe))});var mi=f.eventSandbox.message;mi.on(mi.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===Co.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=at(e.source),new Co(i,{offsetX:n,offsetY:o},r).run().then(function(){return mi.sendServiceMsg({cmd:Co.SCROLL_RESPONSE_CMD},e.source)}))})}(Ei["%hammerhead%"],Ei["%hammerhead%"].Promise)}(window);
|
|
@@ -2387,7 +2387,8 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
2387
2387
|
var reverse = createNativeMethodWrapper('reverse');
|
|
2388
2388
|
var reduce = createNativeMethodWrapper('reduce');
|
|
2389
2389
|
var concat = createNativeMethodWrapper('concat');
|
|
2390
|
-
var join = createNativeMethodWrapper('join');
|
|
2390
|
+
var join = createNativeMethodWrapper('join');
|
|
2391
|
+
var every = createNativeMethodWrapper('every');
|
|
2391
2392
|
|
|
2392
2393
|
var browserUtils = hammerhead__default.utils.browser;
|
|
2393
2394
|
var nativeMethods$2 = hammerhead__default.nativeMethods;
|
|
@@ -2469,12 +2470,12 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
2469
2470
|
var getElementPaddingFloat = hammerhead__default.utils.style.getElementPaddingFloat;
|
|
2470
2471
|
|
|
2471
2472
|
var ChildIframeDriverLink = /** @class */ (function () {
|
|
2472
|
-
function ChildIframeDriverLink(driverWindow, driverId,
|
|
2473
|
+
function ChildIframeDriverLink(driverWindow, driverId, dispatchProxylessEventUrls) {
|
|
2473
2474
|
this.driverWindow = driverWindow;
|
|
2474
2475
|
this.driverIframe = testcafeCore.domUtils.findIframeByWindow(driverWindow);
|
|
2475
2476
|
this.driverId = driverId;
|
|
2476
2477
|
this.iframeAvailabilityTimeout = 0;
|
|
2477
|
-
this.
|
|
2478
|
+
this.dispatchProxylessEventUrls = dispatchProxylessEventUrls;
|
|
2478
2479
|
}
|
|
2479
2480
|
Object.defineProperty(ChildIframeDriverLink.prototype, "availabilityTimeout", {
|
|
2480
2481
|
set: function (val) {
|
|
@@ -2538,7 +2539,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
2538
2539
|
ChildIframeDriverLink.prototype.sendConfirmationMessage = function (requestMsgId) {
|
|
2539
2540
|
sendConfirmationMessage({
|
|
2540
2541
|
requestMsgId: requestMsgId,
|
|
2541
|
-
result: { id: this.driverId,
|
|
2542
|
+
result: { id: this.driverId, dispatchProxylessEventUrls: this.dispatchProxylessEventUrls },
|
|
2542
2543
|
window: this.driverWindow,
|
|
2543
2544
|
});
|
|
2544
2545
|
};
|
|
@@ -4478,7 +4479,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
4478
4479
|
},
|
|
4479
4480
|
};
|
|
4480
4481
|
ActionExecutor.ACTIONS_HANDLERS[COMMAND_TYPE.pressKey] = {
|
|
4481
|
-
create: function (command) { return new testcafeAutomation.Press(testcafeCore.parseKeySequence(command.keys).combinations, command.options); },
|
|
4482
|
+
create: function (command, _a, dispatchProxylessEventFn) { return new testcafeAutomation.Press(testcafeCore.parseKeySequence(command.keys).combinations, command.options, dispatchProxylessEventFn); },
|
|
4482
4483
|
ensureCmdArgs: function (command) {
|
|
4483
4484
|
var parsedKeySequence = testcafeCore.parseKeySequence(command.keys);
|
|
4484
4485
|
if (parsedKeySequence.error)
|
|
@@ -4530,7 +4531,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
4530
4531
|
};
|
|
4531
4532
|
ActionExecutor.ACTIONS_HANDLERS[COMMAND_TYPE.typeText] = {
|
|
4532
4533
|
// eslint-disable-next-line no-restricted-properties
|
|
4533
|
-
create: function (command, elements) { return new testcafeAutomation.Type(elements[0], command.text, command.options); },
|
|
4534
|
+
create: function (command, elements, dispatchProxylessEventFn) { return new testcafeAutomation.Type(elements[0], command.text, command.options, dispatchProxylessEventFn); },
|
|
4534
4535
|
};
|
|
4535
4536
|
function createSelectTextAutomation(command, elements) {
|
|
4536
4537
|
var selectArgs = testcafeAutomation.calculateSelectTextArguments(elements[0], command);
|
|
@@ -4605,6 +4606,12 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
4605
4606
|
return executor.getResult();
|
|
4606
4607
|
}
|
|
4607
4608
|
|
|
4609
|
+
var FILE_PROTOCOL = 'file://';
|
|
4610
|
+
function isFileProtocol(url) {
|
|
4611
|
+
if (url === void 0) { url = ''; }
|
|
4612
|
+
return url.indexOf(FILE_PROTOCOL) === 0;
|
|
4613
|
+
}
|
|
4614
|
+
|
|
4608
4615
|
var settings = hammerhead__default.settings;
|
|
4609
4616
|
var transport = hammerhead__default.transport;
|
|
4610
4617
|
var Promise$2 = hammerhead__default.Promise;
|
|
@@ -4665,6 +4672,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
4665
4672
|
_this.childWindowDriverLinks = [];
|
|
4666
4673
|
_this.parentWindowDriverLink = null;
|
|
4667
4674
|
_this.statusBar = null;
|
|
4675
|
+
_this.selectorInspectorPanel = null;
|
|
4668
4676
|
_this.windowId = _this._getCurrentWindowId();
|
|
4669
4677
|
_this.role = DriverRole.replica;
|
|
4670
4678
|
_this.setAsMasterInProgress = false;
|
|
@@ -4709,7 +4717,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
4709
4717
|
return new ClientBrowserConsoleMessages(this.contextStorage.getItem(CONSOLE_MESSAGES));
|
|
4710
4718
|
},
|
|
4711
4719
|
set: function (messages) {
|
|
4712
|
-
|
|
4720
|
+
this.contextStorage.setItem(CONSOLE_MESSAGES, messages ? messages.getCopy() : null);
|
|
4713
4721
|
},
|
|
4714
4722
|
enumerable: false,
|
|
4715
4723
|
configurable: true
|
|
@@ -4964,7 +4972,10 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
4964
4972
|
var childIframeDriverLink = this._getChildIframeDriverLinkByWindow(driverWindow);
|
|
4965
4973
|
if (!childIframeDriverLink) {
|
|
4966
4974
|
var driverId = "".concat(this.testRunId, "-").concat(generateId());
|
|
4967
|
-
childIframeDriverLink = new ChildIframeDriverLink(driverWindow, driverId,
|
|
4975
|
+
childIframeDriverLink = new ChildIframeDriverLink(driverWindow, driverId, {
|
|
4976
|
+
single: this.communicationUrls.dispatchProxylessEvent,
|
|
4977
|
+
sequence: this.communicationUrls.dispatchProxylessEventSequence,
|
|
4978
|
+
});
|
|
4968
4979
|
this.childIframeDriverLinks.push(childIframeDriverLink);
|
|
4969
4980
|
}
|
|
4970
4981
|
childIframeDriverLink.sendConfirmationMessage(id);
|
|
@@ -5541,6 +5552,9 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
5541
5552
|
for (var i = 0; i < this.childIframeDriverLinks.length; i++)
|
|
5542
5553
|
messageSandbox$2.sendServiceMsg(msg, this.childIframeDriverLinks[i].driverWindow);
|
|
5543
5554
|
};
|
|
5555
|
+
Driver.prototype._createDispatchProxylessEventFn = function (name) {
|
|
5556
|
+
return nativeMethods$6.functionBind.call(testcafeCore.browser[name], testcafeCore.browser[name], this.communicationUrls[name], testCafeUI__default, hammerhead__default.createNativeXHR);
|
|
5557
|
+
};
|
|
5544
5558
|
// Commands handling
|
|
5545
5559
|
Driver.prototype._onActionCommand = function (command) {
|
|
5546
5560
|
var _this = this;
|
|
@@ -5550,7 +5564,12 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
5550
5564
|
var selectorExecutor = new SelectorExecutor(selector, _this.options.selectorTimeout, startTime, createNotFoundError, createIsInvisibleError);
|
|
5551
5565
|
return selectorExecutor.getResult();
|
|
5552
5566
|
};
|
|
5553
|
-
var dispatchProxylessEventFn = this.options.proxyless
|
|
5567
|
+
var dispatchProxylessEventFn = this.options.proxyless
|
|
5568
|
+
? {
|
|
5569
|
+
single: this._createDispatchProxylessEventFn('dispatchProxylessEvent'),
|
|
5570
|
+
sequence: this._createDispatchProxylessEventFn('dispatchProxylessEventSequence'),
|
|
5571
|
+
}
|
|
5572
|
+
: null;
|
|
5554
5573
|
var executor = new ActionExecutor(command, {
|
|
5555
5574
|
globalSelectorTimeout: this.options.selectorTimeout,
|
|
5556
5575
|
testSpeed: this.speed,
|
|
@@ -5604,11 +5623,15 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
5604
5623
|
Driver.prototype._onNavigateToCommand = function (command) {
|
|
5605
5624
|
var _this = this;
|
|
5606
5625
|
this.contextStorage.setItem(this.COMMAND_EXECUTING_FLAG, true);
|
|
5607
|
-
|
|
5608
|
-
.
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5626
|
+
if (this.options.proxyless && isFileProtocol(command.url))
|
|
5627
|
+
testcafeCore.browser.redirectUsingCdp(command, hammerhead__default.createNativeXHR, this.communicationUrls.openFileProtocolUrl);
|
|
5628
|
+
else {
|
|
5629
|
+
executeNavigateTo(command)
|
|
5630
|
+
.then(function (driverStatus) {
|
|
5631
|
+
_this.contextStorage.setItem(_this.COMMAND_EXECUTING_FLAG, false);
|
|
5632
|
+
return _this._onReady(driverStatus);
|
|
5633
|
+
});
|
|
5634
|
+
}
|
|
5612
5635
|
};
|
|
5613
5636
|
Driver.prototype._onGetProxyUrlCommand = function (command) {
|
|
5614
5637
|
this._onReady(new DriverStatus({
|
|
@@ -5828,6 +5851,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
5828
5851
|
var _this = this;
|
|
5829
5852
|
var isTestError = _a.isTestError, inCompilerService = _a.inCompilerService;
|
|
5830
5853
|
var showDebuggingStatusPromise = this.statusBar.showDebuggingStatus(isTestError);
|
|
5854
|
+
this.selectorInspectorPanel.show();
|
|
5831
5855
|
if (inCompilerService) {
|
|
5832
5856
|
showDebuggingStatusPromise.then(function (debug) {
|
|
5833
5857
|
_this.debug = debug;
|
|
@@ -6003,6 +6027,8 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
6003
6027
|
};
|
|
6004
6028
|
Driver.prototype._executeCommand = function (command) {
|
|
6005
6029
|
this.contextStorage.setItem(this.WINDOW_COMMAND_API_CALL_FLAG, false);
|
|
6030
|
+
if (this.selectorInspectorPanel)
|
|
6031
|
+
this.selectorInspectorPanel.hide();
|
|
6006
6032
|
if (this.customCommandHandlers[command.type])
|
|
6007
6033
|
this._onCustomCommand(command);
|
|
6008
6034
|
else if (command.type === COMMAND_TYPE.testDone)
|
|
@@ -6198,6 +6224,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
6198
6224
|
});
|
|
6199
6225
|
this.nativeDialogsTracker = new NativeDialogTracker(this.contextStorage, { proxyless: proxyless, dialogHandler: dialogHandler });
|
|
6200
6226
|
this.statusBar = new testCafeUI__default.StatusBar(this.runInfo.userAgent, this.runInfo.fixtureName, this.runInfo.testName, this.contextStorage);
|
|
6227
|
+
this.selectorInspectorPanel = new testCafeUI__default.SelectorInspectorPanel(this.statusBar);
|
|
6201
6228
|
var self = this;
|
|
6202
6229
|
this.statusBar.on(this.statusBar.UNLOCK_PAGE_BTN_CLICK, function () {
|
|
6203
6230
|
if (!self.options.proxyless)
|
|
@@ -6393,18 +6420,19 @@ window['%hammerhead%'].utils.removeInjectedScript();
|
|
|
6393
6420
|
};
|
|
6394
6421
|
IframeDriver.prototype._init = function () {
|
|
6395
6422
|
return __awaiter(this, void 0, void 0, function () {
|
|
6396
|
-
var _a, id,
|
|
6423
|
+
var _a, id, dispatchProxylessEventUrls, inCommandExecution;
|
|
6397
6424
|
return __generator(this, function (_b) {
|
|
6398
6425
|
switch (_b.label) {
|
|
6399
6426
|
case 0: return [4 /*yield*/, this.parentDriverLink.establishConnection()];
|
|
6400
6427
|
case 1:
|
|
6401
|
-
_a = _b.sent(), id = _a.id,
|
|
6428
|
+
_a = _b.sent(), id = _a.id, dispatchProxylessEventUrls = _a.dispatchProxylessEventUrls;
|
|
6402
6429
|
this.contextStorage = new Storage(window, {
|
|
6403
6430
|
testRunId: id,
|
|
6404
6431
|
windowId: this.windowId,
|
|
6405
6432
|
proxyless: this.options.proxyless,
|
|
6406
6433
|
});
|
|
6407
|
-
this.communicationUrls.dispatchProxylessEvent =
|
|
6434
|
+
this.communicationUrls.dispatchProxylessEvent = dispatchProxylessEventUrls.single;
|
|
6435
|
+
this.communicationUrls.dispatchProxylessEventSequence = dispatchProxylessEventUrls.sequence;
|
|
6408
6436
|
if (this._failIfClientCodeExecutionIsInterrupted())
|
|
6409
6437
|
return [2 /*return*/];
|
|
6410
6438
|
return [4 /*yield*/, this._isInCommandExecution()];
|