| ***************************************************************************** */var r,o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function e(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(u,s)}c((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function c(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function a(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}var l=((r={})[e.TestKey.BACKSPACE]=n.Key.BACK_SPACE,r[e.TestKey.TAB]=n.Key.TAB,r[e.TestKey.ENTER]=n.Key.ENTER,r[e.TestKey.SHIFT]=n.Key.SHIFT,r[e.TestKey.CONTROL]=n.Key.CONTROL,r[e.TestKey.ALT]=n.Key.ALT,r[e.TestKey.ESCAPE]=n.Key.ESCAPE,r[e.TestKey.PAGE_UP]=n.Key.PAGE_UP,r[e.TestKey.PAGE_DOWN]=n.Key.PAGE_DOWN,r[e.TestKey.END]=n.Key.END,r[e.TestKey.HOME]=n.Key.HOME,r[e.TestKey.LEFT_ARROW]=n.Key.ARROW_LEFT,r[e.TestKey.UP_ARROW]=n.Key.ARROW_UP,r[e.TestKey.RIGHT_ARROW]=n.Key.ARROW_RIGHT,r[e.TestKey.DOWN_ARROW]=n.Key.ARROW_DOWN,r[e.TestKey.INSERT]=n.Key.INSERT,r[e.TestKey.DELETE]=n.Key.DELETE,r[e.TestKey.F1]=n.Key.F1,r[e.TestKey.F2]=n.Key.F2,r[e.TestKey.F3]=n.Key.F3,r[e.TestKey.F4]=n.Key.F4,r[e.TestKey.F5]=n.Key.F5,r[e.TestKey.F6]=n.Key.F6,r[e.TestKey.F7]=n.Key.F7,r[e.TestKey.F8]=n.Key.F8,r[e.TestKey.F9]=n.Key.F9,r[e.TestKey.F10]=n.Key.F10,r[e.TestKey.F11]=n.Key.F11,r[e.TestKey.F12]=n.Key.F12,r[e.TestKey.META]=n.Key.META,r);function f(t){var e=[];return t.control&&e.push(n.Key.CONTROL),t.alt&&e.push(n.Key.ALT),t.shift&&e.push(n.Key.SHIFT),t.meta&&e.push(n.Key.META),e}var y=function(){function t(t){this.element=t}return t.prototype.blur=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){return[2,n.browser.executeScript("arguments[0].blur()",this.element)]}))}))},t.prototype.clear=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.element.clear()]}))}))},t.prototype.click=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._dispatchClickEventSequence(t,n.Button.LEFT)];case 1:return e.sent(),[2]}}))}))},t.prototype.rightClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._dispatchClickEventSequence(t,n.Button.RIGHT)];case 1:return e.sent(),[2]}}))}))},t.prototype.focus=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){return[2,n.browser.executeScript("arguments[0].focus()",this.element)]}))}))},t.prototype.getCssValue=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.element.getCssValue(t)]}))}))},t.prototype.hover=function(){return i(this,void 0,void 0,(function(){var t,e;return u(this,(function(r){switch(r.label){case 0:return e=(t=n.browser.actions()).mouseMove,[4,this.element.getWebElement()];case 1:return[2,e.apply(t,[r.sent()]).perform()]}}))}))},t.prototype.mouseAway=function(){return i(this,void 0,void 0,(function(){var t,e;return u(this,(function(r){switch(r.label){case 0:return e=(t=n.browser.actions()).mouseMove,[4,this.element.getWebElement()];case 1:return[2,e.apply(t,[r.sent(),{x:-1,y:-1}]).perform()]}}))}))},t.prototype.sendKeys=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,r,o,i,s,c;return u(this,(function(u){return"string"!=typeof(e=t[0])&&"number"!=typeof e?(r=e,o=t.slice(1)):(r={},o=t),i=f(r),s=o.map((function(t){return"string"==typeof t?t.split(""):[l[t]]})).reduce((function(t,e){return t.concat(e)}),[]).map((function(t){return i.length>0?n.Key.chord.apply(n.Key,a(i,[t])):t})),[2,(c=this.element).sendKeys.apply(c,a(s))]}))}))},t.prototype.text=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(r){return(null==t?void 0:t.exclude)?[2,n.browser.executeScript(e._getTextWithExcludedElements,this.element,t.exclude)]:[2,this.element.getText()]}))}))},t.prototype.getAttribute=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(e){return[2,n.browser.executeScript("return arguments[0].getAttribute(arguments[1])",this.element,t)]}))}))},t.prototype.hasClass=function(t){return i(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.getAttribute("class")];case 1:return e=n.sent()||"",[2,new Set(e.split(/\s+/).filter((function(t){return t}))).has(t)]}}))}))},t.prototype.getDimensions=function(){return i(this,void 0,void 0,(function(){var t,e,n,r;return u(this,(function(o){switch(o.label){case 0:return[4,this.element.getSize()];case 1:return t=o.sent(),e=t.width,n=t.height,[4,this.element.getLocation()];case 2:return r=o.sent(),[2,{width:e,height:n,left:r.x,top:r.y}]}}))}))},t.prototype.getProperty=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(e){return[2,n.browser.executeScript("return arguments[0][arguments[1]]",this.element,t)]}))}))},t.prototype.setInputValue=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(e){return[2,n.browser.executeScript("arguments[0].value = arguments[1]",this.element,t)]}))}))},t.prototype.selectOptions=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,r,o;return u(this,(function(i){switch(i.label){case 0:return[4,this.element.all(n.by.css("option"))];case 1:return e=i.sent(),r=new Set(t),e.length&&r.size?[4,this.setInputValue("")]:[3,8];case 2:i.sent(),o=0,i.label=3;case 3:return o<e.length?r.has(o)?[4,n.browser.actions().keyDown(n.Key.CONTROL).perform()]:[3,7]:[3,8];case 4:return i.sent(),[4,e[o].click()];case 5:return i.sent(),[4,n.browser.actions().keyUp(n.Key.CONTROL).perform()];case 6:i.sent(),i.label=7;case 7:return o++,[3,3];case 8:return[2]}}))}))},t.prototype.matchesSelector=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(e){return[2,n.browser.executeScript("\n return (Element.prototype.matches ||\n Element.prototype.msMatchesSelector).call(arguments[0], arguments[1])\n ",this.element,t)]}))}))},t.prototype.isFocused=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.element.equals(n.browser.driver.switchTo().activeElement())]}))}))},t.prototype.dispatchEvent=function(t,e){return i(this,void 0,void 0,(function(){return u(this,(function(r){return[2,n.browser.executeScript(p,t,this.element,e)]}))}))},t.prototype._dispatchClickEventSequence=function(t,e){return i(this,void 0,void 0,(function(){var r,o,i,c,l,y,p,h,d,v,m,b,g,K,T,E;return u(this,(function(u){switch(u.label){case 0:return r={},t.length&&"object"==typeof t[t.length-1]&&(r=t.pop()),o=f(r),i=2===t.length?[{x:t[0],y:t[1]}]:[],y=(l=(b=n.browser.actions()).mouseMove).apply,p=[b],[4,this.element.getWebElement()];case 1:c=y.apply(l,p.concat([a.apply(void 0,[[u.sent()],i])]));try{for(h=s(o),d=h.next();!d.done;d=h.next())c=c.keyDown(d.value)}catch(t){g={error:t}}finally{try{d&&!d.done&&(K=h.return)&&K.call(h)}finally{if(g)throw g.error}}c=c.click(e);try{for(v=s(o),m=v.next();!m.done;m=v.next())c=c.keyUp(m.value)}catch(t){T={error:t}}finally{try{m&&!m.done&&(E=v.return)&&E.call(v)}finally{if(T)throw T.error}}return[4,c.perform()];case 2:return u.sent(),[2]}}))}))},t}();function p(t,e,n){var r=document.createEvent("Event");r.initEvent(t),n&&Object.assign(r,n),e.dispatchEvent(r)}var h={queryFn:function(t,e){return e.all(n.by.css(t))}},d=function(t){function e(e,n){var r=t.call(this,e)||this;return r._options=Object.assign(Object.assign({},h),n),r}return function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.loader=function(t){return new e(n.element(n.by.css("body")),t)},e.getNativeElement=function(t){if(t instanceof y)return t.element;throw Error("This TestElement was not created by the ProtractorHarnessEnvironment")},e.prototype.forceStabilize=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){return[2]}))}))},e.prototype.waitForTasksOutsideAngular=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){return[2]}))}))},e.prototype.getDocumentRoot=function(){return n.element(n.by.css("body"))},e.prototype.createTestElement=function(t){return new y(t)},e.prototype.createEnvironment=function(t){return new e(t,this._options)},e.prototype.getAllRawElements=function(t){return i(this,void 0,void 0,(function(){var e,n,r,o;return u(this,(function(i){switch(i.label){case 0:return[4,(e=this._options.queryFn(t,this.rawRootElement)).count()];case 1:for(n=i.sent(),r=[],o=0;o<n;o++)r.push(e.get(o));return[2,r]}}))}))},e}(e.HarnessEnvironment); |