Comparing version 1.3.4 to 1.3.5
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LC=e():t.LC=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(16)},function(t,e){function n(t,e){return new s(t,{beforeGen:!0,binop:e})}function i(t,e){e=e||{},e.keyword=t,c[t]=a["_"+t]=new s(t,e)}var s=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeGen=Boolean(e.beforeGen),this.beforeExpr=Boolean(e.beforeExpr),this.isAssign=Boolean(e.isAssign),this.prefix=Boolean(e.prefix),this.postfix=Boolean(e.postfix),this.binop=e.binop||null,this.macro=Boolean(e.macro)},r={beforeGen:!0},o={macro:!0},a={num:new s("num"),regexp:new s("regexp"),string:new s("string"),name:new s("name"),eof:new s("eof"),bracketL:new s("[",r),bracketR:new s("]"),braceL:new s("{",r),braceR:new s("}"),parenL:new s("(",r),parenR:new s(")"),comma:new s(",",r),semi:new s(";",r),colon:new s(":",r),tagNumL:new s("CountExpr",r),tagAtL:new s("TextExpr",r),tagFacL:new s("VisibilityExpr",r),tagR:new s("/>"),eq:new s("=",{beforeGen:!0,isAssign:!0}),assign:new s("_=",{beforeGen:!0,isAssign:!0}),incDec:new s("++/--",{prefix:!0,postfix:!0}),prefix:new s("prefix",{beforeGen:!0,prefix:!0}),logicalOR:n("||",1),logicalAND:n("&&",2),equality:n("==/!=",6),relational:n("</>",7),plusMin:new s("+/-",{beforeGen:!0,binop:9,prefix:!0}),modulo:n("%",10),star:n("*",10),slash:n("/",10),match:new s("~~",{beforeExpr:!0,binop:6})},c={};i("in"),i("by",r),i("click",r),i("input",r),i("rclick",r),i("dblclick",r),i("movein",r),i("moveout",r),i("scroll",r),i("select",r),i("#CLOCK",o),i("#TIMES",o),i("#INTERVAL",o),i("#SCREEN",o),i("wait",r),i("assert",r),i("log",r),i("console",r),i("var"),i("process"),i("return",r),i("jumpto"),i("refresh"),t.exports={TokenType:s,types:a,keywordTypes:c}},function(t,e,n){function i(t,e){var n=o.contextFrame;n.style.height="100%",n.style.width="100%",t.appendChild(n),(e||c.noop).call(n)}function s(){return o.contextFrame}function r(){return o.contextFrame?o.contextFrame.contentWindow.document:document}var o,a,c=n(3);o={contextFrame:document.createElement("iframe"),defaultNextLoopDelay:3e3,readyTimeout:3e3,defaultClock:10,bootExceptionHandle:c.noop,triggerCallback:c.noop,runCallback:c.noop,runExceptionHandle:function(){console.log(arguments)},successCallback:c.noop,readyCallback:c.noop,loopCallback:c.noop,consoleFn:c.noop},a=function(t){return c.isString(t)?o[t]:c.isObject(t)?void c.forEach(t,function(t,e){this[e]=t},o):void 0},a.setContextFrame=function(t){trigger.setupIframe(t),o.contextFrame=t},t.exports={settings:o,getDocument:r,setup:a,init:i,getLemoncaseFrame:s}},function(t,e){var n={now:Date.now||function(){return(new Date).getTime()},isString:function(t){return"string"==typeof t},isUndefined:function(t){return void 0===t},isDefined:function(t){return!n.isUndefined(t)},isNumber:function(t){return"number"==typeof t},isObject:function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},isElement:function(t){return!(!t||1!==t.nodeType)},isFunction:function(t){return"function"==typeof t},isArray:function(t){return"[object Array]"==={}.toString.call(t)},last:function(t){return t[t.length-1]},noop:function(){},forEach:function(t,e,n){e=e.bind(n);var i,s;if(this.isArray(t))for(i=0,s=t.length;s>i;i+=1)e(t[i],i,t);else{var r=Object.keys(t);for(i=0,s=r.length;s>i;i+=1)e(t[r[i]],r[i],t)}return t},has:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}};t.exports=n},function(t,e){var n=function(t,e){function n(t,e){this.$case=e,this.$body=t.BODY,this.$line=t.LINE}if(!e){var s=i[t];if(!s)throw new Error("TYPE:"+t+" instruction is not existed.");return s}if(i[t])throw new Error("The instruction factory: TYPE="+t+" is existed.");return n.prototype.execute=e.operation,n.prototype.line=function(){return this.$line},n.prototype.body=function(t){return t?this.$body[t]:this.$body},n.prototype.assignCase=function(t){return this.$case=t,this},n.create=function(){return new n({BODY:e.bodyFactory.apply(null,arguments)})},n.$new=function(t,e){return new n(t,e)},i[t]=n,n},i=[];t.exports=n},function(t,e){t.exports={CALL:0,RETURN:1,EXIT:2,EXPRESSION:16,WAIT:17,TRIGGER:18,ASSERT:19,JUMPTO:20,REFRESH:21,LOG:32,CONSOLE:33,PROCESS:255}},function(t,e,n){function i(t,e){var n={process:{},config:{}},i=[];return c.forEach(t.DATA_KEYS,function(t,e){t&&i.push(e)}),c.forEach(t.PROCESSES,function(t,i){var s=n.process[i]=[];c.forEach(t.BODY.segment,function(t){s.push(p(t.TYPE).$new(t,e))})}),n.config.times=t.CONFIG.times||1,n.config.interval=t.CONFIG.interval,n.config.screen=t.CONFIG.screen,{eT:n,dK:i}}function s(t){if(!(this instanceof s))return new s(t);if(c.isUndefined(t))return new s(f("process main{}"));var e=i(t,this);this.$$executionTree=e.eT,this.$$log=new h(e.dK),this.$$state="ready",this.$$coreId=null,this.$$activeTime=0,this.$$currentLoop=0,this.$$vars={},this.$$blockStack=[],this.$$scopeStack=[],this.$$lastInstruction=void 0,this.$$instructionBuffer=void 0,this.$$tempInstruction=void 0,this.$$idleTask=c.noop,this.$loopData=null}var r=n(5),o=r.CALL,a=r.EXIT,c=n(3),u=n(2).settings,h=n(11),p=n(4),f=n(8).parse,l=s.prototype;l.$$getConfig=function(t){return this.$$executionTree.config[t]},l.$$bootstrap=function(){var t=u.contextFrame.style,e=this.$$getConfig("screen");return this.$$currentLoop=0,e&&(t.height=e.height+"px",t.width=e.width+"px"),(u.loopCallback||c.noop)(this),this.$setActiveTime().$setTempInstruction(p(o).create("main")).$$log.initialization(),this},l.$$exitCase=function(){return this.$setState("success").$$interrupt(),(u.successCallback||c.noop).call(this),this},l.$$interrupt=function(){return clearInterval(this.$$coreId),this},l.$$popInstruction=function(){var t=this.$$tempInstruction,e=this.$getCurrentBlock();return this.$$lastInstruction=this.$$instructionBuffer,t?(this.$setTempInstruction(),t):e?(this.$$instructionBuffer=e.segment[e.counter++],this.$$instructionBuffer):p(a).create(!0).assignCase(this)},l.$$run=function(){try{this.$$popInstruction().execute(),u.runCallback(this)}catch(t){console.error("[Error FROM LC2 Core]:"+t)}return this},l.$$core=function(){var t=this;return this.$$coreId=setInterval(function(){t["$$"+(c.now()>=t.$$activeTime?"run":"idleTask")]()},this.$$getConfig("clock")||u.defaultClock),this},t.exports={Case:s,$CP:l}},function(t,e){function n(t){return 65>t?36===t:91>t?!0:97>t?95===t:123>t}function i(t){return 48>t?36===t:58>t?!0:65>t?!1:91>t?!0:97>t?95===t:123>t}var s=["in","by"],r=["click","input","rclick","dblclick","movein","moveout","scroll","select","jumpto","refresh"],o=["#CLOCK","#TIMES","#INTERVAL","#SCREEN"],a=["wait","assert","log","console","var","process","return"].concat(s).concat(r).concat(o),c=new RegExp("^("+a.join("|")+")$");t.exports={keywordRegexp:c,isIdentifierStart:n,isIdentifierChar:i}},function(t,e,n){var i=n(23);t.exports={parse:function(t,e){return new i(e,t).parse()},tokenizer:function(t,e){return new i(e,t)},parseFragment:function(t,e){var n=new i(e,t);return n.nextToken(),n.parseStatement()}}},function(t,e,n){function i(t,e){for(var n=1,i=0;;){c.lastIndex=i;var s=c.exec(t);if(!(s&&s.index<e))return new u(n,e-i);++n,i=s.index+s[0].length}}function s(t,e,n){var i=t.split(c)[e.line-1],s=i.substr(0,e.column),u=a(s),h=r(u),p=o(n,u);return"\n"+i+"\n"+h+"\n"+p}function r(t){for(var e=-1,n=-1,i="";++e<t;)i+=" ";for(i+="↑\n";++n<t;)i+=" ";return i+="↑"}function o(t,e){if(t.length/2>e)return t;for(var n=-1,i=e-Math.floor(t.length/2),s="";++n<i;)s+=" ";return s+=t}function a(t){for(var e,n=0,i=-1,s=t.length;++i<s;)switch(e=t.charCodeAt(i)){case 9:n+=4;break;default:n+=1}return n}var c=n(10).lineBreakG,u=function(t,e){this.line=t,this.column=e};u.prototype.offset=function(t){return new u(this.line,this.column+t)},t.exports={getLineInfo:i,empowerErrMsg:s}},function(t,e){var n=/\r\n?|\n|\u2028|\u2029/;t.exports={lineBreak:n,lineBreakG:new RegExp(n.source,"g"),isNewLine:function(t){return 10===t||13===t||8232===t||8233===t}}},function(t,e,n){var i=n(3),s=function(t){this.$$baseTime=0,this.$dataKeys=t||[],this.$marks=[],this.$logs=[],this.$datas={}};s.prototype.initialization=function(){return this.clear(),this.$$baseTime=i.now(),i.forEach(this.$dataKeys,function(t){this[t]=[]},this.$datas),this},s.prototype.getLength=function(t){return this["$"+t].length},s.prototype.log=function(t,e){return this.$logs.push([t,i.now()-this.$$baseTime,e||0]),this},s.prototype.data=function(t,e){return this.$datas[t].push(e),this},s.prototype.markLog=function(t,e){return this.$marks.push([t,e,this.getLength("logs")-1]),this},s.prototype.clear=function(){return this.$$baseTime=0,this.$marks.length=0,this.$logs.length=0,this.$datas={},this},s.prototype.export2json=function(){return{baseTime:this.$$baseTime,marks:this.$marks,logs:this.$logs,performance:this.$datas}},s.prototype.export2text=function(){return JSON.stringify(this.export2json())},t.exports=s},function(t,e){!function(){var e={POSITION:0,CLASS:2,RANGE:3,CLAUSE:6,REFERENCE:7,INTS:"0123456789",WORDS:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",WHITESPACE:" \f\n\r \x0B \u2028\u2029\u2028\u2029 "},n="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",i={0:0,t:9,n:10,v:11,f:12,r:13},s={rndChar:function(t){return t[Math.floor(Math.random()*t.length)]},anyRndChar:function(){return String.fromCharCode(s.rndInt(0,65535))},strToChars:function(t){var e=/\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]^?])|([0tnvfr]))/g;return t=t.replace(e,function(t,e,s,r,o,a){var c,u=e?parseInt(e,16):s?parseInt(s,16):r?parseInt(r,8):o?n.indexOf(o):a?i[a]:void 0;return void 0!==u?(c=String.fromCharCode(u),c=c.replace(/[[\]{}^$.|?*+()]/g,function(t){return"\\"+t})):c="\\"+a,c})},rndInt:function(t,e){return t+Math.floor(Math.random()*(1+e-t))},findChar:function(t){for(var e="\\",n="]",i=0;;){var s=t.indexOf(n);if(t[s-1]!==e)return i+s;t=t.slice(++s),i+=s}},range:function(t,n,i){var s=e.WORDS;return s.slice(s.indexOf(n),s.indexOf(i)+1)},classRange:function(t){return t.replace(/(\w)-(\w)/g,s.range)},toBothCases:function(t){var e=t;return e+=t["to"+(t===t.toLowerCase()?"Upper":"Lower")+"Case"]()},inCaseClass:function(t,e){return e?t=t.replace(/[a-zA-Z]/g,function(t){return s.toBothCases(t)}):t},inCaseChar:function(t,n){return n&&/[a-zA-Z]/.test(t)?{type:e.CLASS,chars:s.toBothCases(t)}:t},flatten:function(t){for(var e=0;e<t.length-1;e++)if("string"==typeof t[e])for(var n=e+1;;){var i=t[n];if("string"!=typeof i)break;t[e]+=i,t.splice(n,1)}return 1===t.length?t[0]:t},reduce:function(t){if(t.stack)t.stack=s.flatten(t.stack);else if(t.options)for(var e=0,n=t.options.length;n>e;e++)t.options[e]=s.flatten(t.options[e]);return t.options||t.group||t.value?t:t.stack},nextClose:function(t){for(var e=0,n=0,i=t.length;i>n;n++){var s=t[n];switch(s){case")":if(0===e)return n+1;e--;break;case"(":e++;break;case"\\":n++}}}},r={type:e.POSITION,value:"b"},o={type:e.POSITION,value:"B"},a={type:e.POSITION,value:"^"},c={type:e.POSITION,value:"$"},u={type:e.CLASS,chars:e.WORDS},h={type:e.CLASS,chars:e.WORDS,not:!0},p={type:e.CLASS,chars:e.INTS},f={type:e.CLASS,chars:e.INTS,not:!0},l={type:e.CLASS,chars:e.WHITESPACE},d={type:e.CLASS,chars:e.WHITESPACE,not:!0},v={type:e.CLASS,chars:"\n",not:!0},g=function(t,n,i){var g,m=0,x={type:e.CLAUSE,stack:[]},$=x,y=x.stack,b=[];for(t=s.strToChars(t);m<t.length;)switch(g=t[m++]){case"\\":switch(g=t[m++]){case"b":y.push(r);break;case"B":y.push(o);break;case"w":y.push(u);break;case"W":y.push(h);break;case"d":y.push(p);break;case"D":y.push(f);break;case"s":y.push(l);break;case"S":y.push(d);break;default:/\d/.test(g)?y.push({type:e.REFERENCE,value:parseInt(g)}):y.push(g)}break;case"^":y.push(a);break;case"$":y.push(c);break;case"[":if(g=t[m],"\\"===g&&0===t.slice(m+1).indexOf("b]"))m+=3,y.push("\b");else{var E;"^"===g?(E=!0,m++):E=!1;var k=t.slice(m),w=s.findChar(k),C=k.substring(0,w);m+=w+1,y.push({type:e.CLASS,chars:s.inCaseClass(s.classRange(C),n),not:E})}break;case".":y.push(v);break;case"(":g=t[m];var T;if("?"===g){if(g=t[m+1],m+=2,"!"===g){m+=s.nextClose(t.slice(m));break}T=!1}else T=!0;var S={type:e.CLAUSE,group:T,stack:[]};y.push(S),b.push($),$=S,y=S.stack;break;case")":$=b.pop(),y=$.options?$.options[$.options.length-1]:$.stack;var O=y.length-1;y[O]=s.reduce(y[O]);break;case"|":$.options||($.options=[$.stack],delete $.stack);var L=[];$.options.push(L),y=L;break;case"{":var A=/^(\d+)(,(\d+)?)?\}/.exec(t.slice(m)),I=parseInt(A[1]),R=A[2]?A[3]?parseInt(A[3]):1/0:I;m+=A[0].length;var B=y.pop();if(I===R)for(var D=0;I>D;D++)y.push(B);else y.push({type:e.RANGE,min:I,max:R,value:B});break;case"?":var B=y.pop();y.push({type:e.RANGE,min:0,max:1,value:B});break;case"+":var B=y.pop();y.push({type:e.RANGE,min:1,max:1/0,value:B});break;case"*":var B=y.pop();y.push({type:e.RANGE,min:0,max:1/0,value:B});break;default:y.push(s.inCaseChar(g,n))}return s.reduce(x)},m=function(t,n,i,r){if("string"==typeof t)return t;if(t.length){for(var o="",a=0,c=t.length;c>a;a++)o+=m(t[a],n,i,r);return o}switch(t.type){case e.POSITION:return"";case e.CLASS:if(!t.not)return s.rndChar(t.chars);for(;;){var u=i();if(-1===t.chars.indexOf(u))return u}case e.RANGE:for(var h=s.rndInt(t.min,t.max===1/0?t.min+n:t.max),o="",a=0;h>a;a++)o+=m(t.value,n,i,r);return o;case e.CLAUSE:if(t.options){var h=s.rndInt(0,t.options.length-1);return m(t.options[h],n,i,r)}var p=m(t.stack,n,i,r);return r.push(p),p;case e.REFERENCE:return r[t.value-1]}};RegExp.prototype.gen=function(){return void 0===this._randexp&&(this._randexp=g(this.source,this.ignoreCase,this.multiline),this._max=this._max||100,this._anyRndChar=this._anyRndChar||s.anyRndChar),m(this._randexp,this._max,this._anyRndChar,[])},"undefined"==typeof window&&(t.exports=m)}()},function(t,e){!function(){"use strict";function e(t,e,n){var i,s=[t];for(i in n)n.hasOwnProperty(i)&&(s[n[i]]=e[i]||null);return s}function n(t){return 1===t.nodeType}function i(t){return t instanceof Window}function s(t){return null!==t&&"object"==typeof t}function r(t){return"function"==typeof t}function o(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function a(t,e){var n,i,a,c,u,h,p,f,l=t.$$hashKey;if(e)for(i=0,n=e.length;n>i;++i)if(p=e[i],s(p)||r(p))for(f=Object.keys(p),c=0,a=f.length;a>c;c++)u=f[c],h=p[u],t[u]=h;return o(t,l),t}function c(t){return a(t,[].slice.call(arguments,1),!1)}function u(t,e,n){v&&t.dispatchEvent(new k(e,c({},A,n)))}function h(t,e,n){t.dispatchEvent(new C(e,c({},A,n)))}function p(t,e,n){t.dispatchEvent(new S(e,c({},A,n)))}function f(t){this.element=t,this.action=this.getActionRule(t)}var l,d=!0,v=!0,g=!0,m=null;try{l=new MouseEvent("click",{})}catch(x){d=!1}try{TouchEvent}catch($){v=!1}try{InputEvent}catch(y){g=!1}console.log(d),console.log(v);var b,E,k=function(t,n){var i=document.createEvent("UIEvent"),s={bubbles:1,cancelBubble:2,view:3,detail:4};return i.initUIEvent.apply(i,e(t,n,s)),i},w=d&&!v?Event:function(t,n){var i=document.createEvent("Event"),s={bubbles:1,cancelBubble:2};return i.initEvent.apply(i,e(t,n,s)),i},C=d&&!v?MouseEvent:function(t,n){var i=document.createEvent("MouseEvent"),s={bubbles:1,cancelBubble:2,view:3,detail:4,screenX:5,screenY:6,clientX:7,clientY:8,ctrlKey:9,altKey:10,shiftKey:11,metaKey:12,button:13,relatedTarget:14};return i.initMouseEvent.apply(i,e(t,n,s)),i},T=d&&!v?UIEvent:function(t,n){var i=document.createEvent("UIEvent"),s={bubbles:1,cancelBubble:2,view:3,detail:4};return i.initUIEvent.apply(i,e(t,n,s)),i},S=d&&!v?KeyboardEvent:function(t,n){var i=document.createEvent("KeyboardEvent"),s={bubbles:1,cancelBubble:2,view:3,"char":4,key:5,location:6,repeat:8};return i.initKeyboardEvent.apply(i,e(t,n,s)),i},O=(g?InputEvent:T,{contextIframe:null,window:function(){return O.contextIframe?O.contextIframe.contentWindow:window}}),L=[],A={bubbles:!0,cancelBubble:!0},I=0,R=1,B=2,D=3,N=4,Y=5,P=6,_=7,F=8,G=9,M=16,U=17,j=18,W=32,K=33,H=34,q=36,V=48,X=49;L[I]=function(t){u(this,"touchend",t),h(this,"mouseup",t)},L[R]=function(t){m&&this!==m&&m.value&&m.blur(),u(this,"touchstart",t),h(this,"mousedown",t),m=this},L[B]=function(t){h(this,"mouseenter",t)},L[D]=function(t){h(this,"mouseleave",t)},L[N]=function(t){h(this,"mouseout",t)},L[Y]=function(t){h(this,"mouseover",t)},L[P]=function(t){u(this,"touchmove",t),h(this,"mousemove",t)},L[_]=function(t){h(this,"click",t)},L[F]=function(t){h(this,"dblclick",t)},L[G]=function(t){h(this,"contextmenu",t)},L[U]=function(t){p(this,"keydown",t)},L[j]=function(t){p(this,"keypress",t)},L[M]=function(t){p(this,"keyup",t)},L[H]=function(){this.focus()},L[K]=function(t){var e=O.contextIframe.style;e.width=t.width+"px",e.height=t.height+"px"},L[W]=function(t){O.window().scrollTo(t.x,t.y),this.dispatchEvent(new T("scroll"))},L[q]=function(t){var e,n=parseInt(t.value,0);if(isNaN(n))throw new Error("[Trigger > select]: Value is invalid option index.");if(e=this[n],!e)throw new Error("[Trigger > select]: No matched <option>.");L[R].call(e,t),L[I].call(e,t),e.selected=!0,this.dispatchEvent(new T("select")),L[_].call(e,t),L[N].call(e,t)},L[V]=function(t){this.value=t.value,this.dispatchEvent(new T("input",t))},L[X]=function(){this.dispatchEvent(new w("change",{bubbles:!0}))},f.prototype.getActionRule=function(t){return t=t||this.element,t instanceof Window?E.window:"input"===t.tagName.toLowerCase()?E["input/"+t.type]:"textarea"===t.tagName.toLowerCase()?E.textarea:"select"===t.tagName.toLowerCase()?E.select:E.generic},f.prototype.does=function(t,e){var n,i,s;if(this.testAction(t)!==!0)throw new Error("[Trigger]: The element:"+this.element.outerHTNL+" can not use action:"+t);for(s=this.action[t],i=s.length,n=0;i>n;n+=1)L[s[n]].call(this.element,e||{});return this},f.prototype.testAction=function(t){return this.action.hasOwnProperty(t)},E=function(){var t={};return t["input/checkbox"]=t["input/radio"]=t["input/button"]=t.generic={click:[R,P,I,_],dblclick:[R,I,_,R,I,_,F],rclick:[R,I,G],movein:[Y,N],moveout:[P,N],scroll:[W]},t.textarea=t["input/text"]=t["input/password"]=t["input/email"]=c({},t.generic,{input:[H,U,j,V,M,X],click:[R,H,P,I,_],dblclick:[R,H,P,I,_,R,P,I,_,F],rclick:[R,H,I,G]}),t.select=c({},t.generic,{select:[R,H,P,I,_,P,N,q]}),t.window={scroll:[W],resize:[K]},t}(),b=function(t){if(!i(t)&&!n(t))throw new Error('[Trigger]: "element" for trigger must be a HTMLElement');return new f(t)},b.setupIframe=function(t){if(!(t instanceof HTMLIFrameElement))throw new Error('[Trigger]: "element" must be a iframe element.');O.contextIframe=t},"undefined"!=typeof t&&t.exports?t.exports=b:window.trigger=b}()},function(t,e,n){function i(t){return p().querySelectorAll(t).length}function s(t){var e=p().querySelector(t);return e?e.value?"checkbox"===e.type||"radio"===e.type?e.checked:e.value:e.innerHTML:!1}function r(t){var e=p().querySelector(t);return e?0!==e.offsetHeight||0!==e.offsetWidth:!1}function o(t,e){return c.isString(t)?!c.isDefined(e)||e instanceof RegExp?e.test?e.test(t):!1:-1!==t.indexOf(e):!1}var a=n(6).$CP,c=n(3),u=n(2),h=u.settings,p=u.getDocument,f=n(4),l=n(5).CALL;a.$setIdleTask=function(t){return this.$$idleTask=c.isFunction(t)?t:c.noop,this},a.$setActiveTime=function(t){return this.$$activeTime=c.now()+(t||0),this},a.$setTempInstruction=function(t){return this.$$tempInstruction=t?t.assignCase(this):void 0,this},a.$setState=function(t){return this.$$state=t,this},a.$pushBlock=function(t){return this.$$blockStack.push({counter:0,segment:t}),this},a.$pushScope=function(t){var e=this.$$blockStack;return this.$$scopeStack.push({blockIndex:e.length,vars:{}}),this.$pushBlock(this.$getProcess(t)),this},a.$popBlock=function(){return this.$$blockStack.pop(),this},a.$popScope=function(){var t=this.$$scopeStack.pop();return this.$$blockStack.length=t.blockIndex,this},a.$getCurrentBlock=function(){return c.last(this.$$blockStack)},a.$getCurrentScope=function(){return c.last(this.$$scopeStack)},a.$getProcess=function(t){return this.$$executionTree.process[t]},a.$exitLoop=function(){return this.$setActiveTime(this.$$getConfig("interval")||3e3),(this.$$currentLoop+=1)>=this.$$getConfig("times")?(this.$$exitCase(),this):(this.$setTempInstruction(f(l).create("main")),(h.loopCallback||c.noop)(this),this)},a.$runExp=function(t){return"function"==typeof t?t(this.$$vars,this.$objectList,this.$loopData,i,s,r,o):t},a.$pushLog=function(t,e){return this.getLog().log(t,e),this},a.$markLog=function(t,e){return this.getLog().markLog(t,e),this},a.$pushLogData=function(t,e){return this.getLog().data(t,e),this},a.$clearScope=function(){for(;this.$$scopeStack.length;)this.$popScope();return this},t.exports=a},function(t,e,n){var i=n(6).$CP,s=n(2).settings;i.validateObjectList=function(t,e){return e.length?t?e.every(function(e){return null!==t[e]}):!1:!0},i.getVar=function(){return this.$$vars},i.exportLog=function(t){return this.$$log["export2"+t]()},i.start=function(){var t=this.$$state;if("success"!==t&&"ready"!==t)throw new Error("Can not call play!");try{return this.$setState("running").$$bootstrap(),setTimeout(function(){this.$$core()}.bind(this),s.readyTimeout),this}catch(e){s.bootExceptionHandle(e)}},i.forceCofig=function(t){var e,n=this.$$executionTree.config;for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return this},i.suspend=function(){if("running"!==this.$$state)throw new Error("Can not call pause!");return this.$setState("pause").$$interrupt(),this},i.resume=function(){if("pause"!==this.$$state)throw new Error("Can not call resume!");return this.$setState("running").$$core(),this},i.stop=function(){var t=this.$$state;if("running"!==t&&"pause"!==t)throw new Error("Can not call stop!");return this.$setState("ready").$$interrupt(),this},i.debug=function(){var t=this.$$state;if("success"!==t&&"ready"!==t)throw new Error("Can not call play!");return this.$setState("debug").$$bootstrap(),this},i.getLog=function(){return this.$$log},i.getCurrentStep=function(){return this.$$counter},i.getCurrentLoop=function(){return this.$$currentLoop},i.getCurrentLine=function(){return this.$$instructionBuffer.$getLine()},i.getStatus=function(){return{loop:this.$$currentLoop,line:this.getCurrentLine(),state:this.$$state}},t.exports=i},function(t,e,n){var i=n(8),s=i.parse,r=i.parseFragment,o=n(6).Case,a=n(2).setup,c=n(4),u=n(2),h=u.init,p=u.getLemoncaseFrame;n(14),n(15),n(12),n(17);var e={Case:o,setup:a,Instruction:c,parse:s,parseAt:r,init:h,getLemoncaseFrame:p};t.exports=e},function(t,e,n){var i=n(4),s=n(2),r=s.settings,o=s.getDocument,a=n(3),c=n(5),u=c.CALL,h=c.RETURN,p=c.EXIT,f=c.EXPRESSION,l=c.WAIT,d=c.TRIGGER,v=c.ASSERT,g=c.JUMPTO,m=c.REFRESH,x=c.LOG,$=c.CONSOLE,y=(c.PROCESS,1),b=0,E=n(13);i(u,{operation:function(){var t=this.body("identifier");this.$case.$pushScope(t).$pushLog([u,t],this.line())},bodyFactory:function(t){return{identifier:t}}}),i(h,{operation:function(){this.$case.$pushLog([h]).$popScope()},bodyFactory:function(){return{}}}),i(p,{operation:function(){var t=this.body("isSuccess")?y:b,e=this.$case;this.body("preFn")(),t||r.runExceptionHandle(this.$case),e.$pushLog([p,t],this.line()).$markLog(t,e.getCurrentLoop()).$clearScope().$exitLoop()},bodyFactory:function(t,e){return{isSuccess:t,preFn:e||a.noop}}}),i(f,{operation:function(){this.$case.$runExp(this.body("exp"))},bodyFactory:function(t){return{exp:t}}}),i(l,{operation:function(){var t=this.$case.$runExp(this.body("delay"));this.$case.$setActiveTime(t).$pushLog([l,t],this.line())},bodyFactory:function(t){return{delay:t}}}),i(d,{operation:function(){var t,e=this.$case.$runExp(this.body("object")),n={value:this.$case.$runExp(this.body("param"))},s=this.body("action");try{if(t=o().querySelectorAll(e)[0],!t)throw"Can not find a DOM by cssPath: "+e;E(t).does(s,n),r.triggerCallback(t,this.$case)}catch(a){return console.log(a),void this.$case.$pushLog([d,b,e,s,n],this.line()).$setTempInstruction(i(p).create(!1).assignCase(this.$case))}this.$case.$pushLog([d,y,e,s,n],this.line())},bodyFactory:function(t,e,n){return{object:t,action:e,param:n}}}),i(v,{operation:function(){function t(){o.$runExp(n)&&o.$setIdleTask().$setTempInstruction().$setActiveTime().$pushLog([v,y],c.line()).$pushLogData(c.body("key"),a.now()-e)}var e=a.now(),n=this.body("exp"),s=this.body("timeout"),o=this.$case,c=this;o.$setTempInstruction(i(p).create(!1,function(){o.$pushLog([v,b],c.line())}).assignCase(o)),s&&s>2*r.defaultClock&&o.$setActiveTime(s).$setIdleTask(t),o.$runExp(n)&&(o.$setTempInstruction().$setActiveTime().$setIdleTask().$pushLog([v,y],this.line()),s&&o.$pushLogData(c.body("key"),0))},bodyFactory:function(t,e,n){return{exp:t,timeout:e,key:n}}}),i(g,{operation:function(){var t=this.$case.$runExp(this.body("url"));r.contextFrame.src=t,this.$case.$pushLog([g,t],this.line())}}),i(m,{operation:function(){o().location.reload(),this.$case.$pushLog([m],this.line())}}),i(x,{operation:function(){this.$case.$pushLog([x,this.$case.$runExp(this.body("msg"))])},bodyFactory:function(t){return{msg:t}}}),i($,{operation:function(){var t=this.$case.$runExp(this.body("msg"));console.log(t),r.consoleFn(t)},bodyFactory:function(t){return{msg:t}}})},function(t,e,n){var i=n(1).types;t.exports=function(t){var e=t.prototype;e.parseExpression=function(){var t=this.parseMaybeAssign();if(this.type===i.comma){var e={type:"SequenceExpr"};for(e.expressions=[t];this.eat(i.comma);){var n=this.parseMaybeAssign();e.expressions.push(n)}return e}return t},e.parseMaybeAssign=function(){var t=this.parseMaybeConditional();if(this.type.isAssign){var e={type:"AssignmentExpr",left:t,operator:this.value};return this.next(),e.right=this.parseMaybeAssign(),e}return t},e.parseMaybeConditional=function(){return this.parseExprOps()},e.parseExprOps=function(){var t=this.start,e=this.parseMaybeUnary(!1);return this.parseExprOp(e,t,-1)},e.parseExprOp=function(t,e,n){var i=this.type.binop;if(null!=i&&i>n){var s=this.type,r=this.value;this.next();var o=this.start,a=this.parseExprOp(this.parseMaybeUnary(!1),o,i),c=this.buildBinary(e,t,a,r,s);return this.parseExprOp(c,e,n)}return t},e.buildBinary=function(t,e,n,s,r){var o={left:e,operator:s,right:n};return r===i.logicalAND||r===i.logicalOR?o.type="LogicalExpr":r===i.match?o.type="MatchExpr":o.type="BinaryExpr",o},e.parseMaybeUnary=function(t){var e;if(this.type.prefix){var n={},s=this.type===i.incDec;n.operator=this.value,n.prefix=!0,this.next(),n.argument=this.parseMaybeUnary(!1),s||(t=!0),n.type=s?"UpdateExpr":"UnaryExpr",e=n}else for(e=this.parseExprSubscripts();this.type.postfix;){var r={};r.operator=this.value,r.prefix=!1,r.argument=e,this.next(),r.type="UpdateExpr",e=r}return e},e.parseExprSubscripts=function(){var t=this.start,e=this.parseExprAtom();return this.parseSubscripts(e,t)},e.parseSubscripts=function(t,e){for(;;){if(this.eat(i.parenL)){var n={type:"CallExpr",callee:t};return this.expect(i.parenR),n}return t}},e.parseExprAtom=function(){var t;switch(this.type){case i.name:var e=this.parseIndent(this.type!==i.name);return{type:"Identifier",name:e};case i.regexp:var n=this.value;return t=this.parseLiteral("regexp"),t.regexp=n,t;case i.num:case i.string:return this.parseLiteral("literal",this.value);case i.objectAt:case i.dict:return this.parseExtLiteral(this.type);case i.parenL:return this.parseParenExpression();case i.tagAtL:case i.tagNumL:case i.tagFacL:return this.parseTagExpression();default:this.unexpected()}},e.parseLiteral=function(t,e){var n={type:t,value:e,raw:this.input.slice(this.start,this.end)};return this.next(),n},e.parseExtLiteral=function(t){var e={type:t.label,value:this.value};return this.next(),e},e.parseParenExpression=function(){this.expect(i.parenL);var t=this.parseExpression();return this.expect(i.parenR),{type:"ParenthesizedExpr",expression:t}},e.parseTagExpression=function(){var t={type:this.type.label};return this.next(),t.val=this.parseExpression(),this.expect(i.tagR),t},e.parseIndent=function(){var t;return this.type===i.name?t=this.value:this.unexpected(),this.next(),t}}},function(t,e,n){var i=n(9),s=i.getLineInfo,r=i.empowerErrMsg;t.exports=function(t){var e=t.prototype;e.raise=function(t,e){var n=s(this.input,t);e+=" ("+n.line+":"+n.column+")";var i=this.options.left,o=this.options.right;e=i||o?i+e+o:r(this.input,n,e);var a=new SyntaxError(e);throw a.pos=t,a.loc=n,a.raisedAt=this.pos,a}}},function(t,e,n){var i=n(1).types;t.exports=function(t){var e=t.prototype;e.parseBindingList=function(t,e,n){for(var s=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(i.comma),e&&this.type===i.comma)s.push(null);else{if(n)break;var o=this.parseIndent();s.push(o)}return s}}},function(t,e,n){function i(t){var e={};for(var n in r)e[n]=t&&s(t,n)?t[n]:r[n];return e}var s=n(3).has,r={insertReturn:!0,onComment:function(){},left:"",right:"",plugins:{}};t.exports={defaultOptions:r,getOptions:i}},function(t,e,n){var i=n(1).types;t.exports=function(t){var e=t.prototype;e.eat=function(t){return this.type===t?(this.next(),!0):!1},e.semicolon=function(){this.eat(i.semi)||this.expected(i.semi)},e.expect=function(t){this.eat(t)||this.expected(t)},e.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")},e.expected=function(t){this.raise(this.lastTokEnd,'Expect a "'+t.label+'" after')},e.UID=function(t){return t+this.nextID++}}},function(t,e,n){var i=n(21).getOptions,s=n(7).keywordRegexp,r=n(1).types,o=function(t,e){this.options=i(t),this.keywords=s,this.input=String(e),this.pos=0,this.type=r.eof,this.value=null,this.start=this.end=this.pos,this.lastTokStart=this.lastTokEnd=this.pos,this.exprAllowed=!1,this.genAllowed=!1,this.labels=[],this.conf={},this.keys={},this.nextID=0,this.pcs={},this.pcsTable={}};o.prototype.parse=function(){this.nextToken();var t={CONFIG:this.conf,DATA_KEYS:this.keys,PROCESSES:this.pcs};return this.parseTopLevel(t)};var a=function(t){t(o)};a(n(19)),a(n(25)),a(n(24)),a(n(22)),a(n(18)),a(n(20)),t.exports=o},function(t,e,n){var i=n(1).types,s=n(9).getLineInfo,r=n(26),o=n(5);t.exports=function(t){var e=t.prototype;e.parseTopLevel=function(t){var e=this.pcsTable;for(e.main={pos:0};this.type!==i.eof;)this.parseStructure();for(var n in e)e[n]&&this.raise(e[n].pos,"Invalid process call at");return t},e.parseStructure=function(){var t=this.type;return t.macro?this.parseSet():t===i._process?this.parseProcess():void this.raise(this.start,"Expect a macro or process")},e.parseSet=function(){var t=this.type;t.macro||this.unexpected();var e=t.label.substr(1).toLowerCase();this.writeConfig(e),this.next()},e.writeConfig=function(t){var e,n=this.conf;switch(n[t]&&this.raise(this.start,this.type.keyword+" was defined already"),t){case"screen":var i,s,r=this.value.split(",");2!==r.length&&this.raise("Invalid arguments"),i=~~parseInt(r[0],10),s=~~parseInt(r[1],10),e={width:i,height:s};break;default:e=parseInt(this.value,10)}n[t]=e},e.parseProcess=function(){var t={LINE:s(this.input,this.start),TYPE:o.PROCESS,BODY:{}},e=this.pcs,n=this.pcsTable;this.next();var i=this.parseIndent();e[i]&&this.raise(this.start,i+" process was defined already"),e[i]=t,n[i]=!1,this.parsePcParam(t),this.parsePcBlock(t)},e.parsePcParam=function(t){this.eat(i.parenL)&&(t.BODY.params=this.parseBindingList(i.parenR,!1,!1))},e.parsePcBlock=function(t){var e=this.parseBlock();e.length&&e[e.length-1].TYPE===o.RETURN||e.push({LINE:-1,TYPE:o.RETURN}),t.BODY.segment=e},e.parseBlock=function(){this.expect(i.braceL);for(var t=[];!this.eat(i.braceR);){var e=this.parseStatement(!0);t.push(e)}return t},e.parseStatement=function(){var t=this.type,e=this.startNode();switch(t){case i._click:case i._rclick:case i._dblclick:case i._movein:case i._moveout:return this.parseMouseAction(e,t.keyword);case i._select:return this.parseSelectAction(e);case i._scroll:return this.parseScrollAction(e,t.keyword);case i._input:return this.parseInputAction(e,t.keyword);case i._return:return this.parseReturnStatement(e);case i._wait:return this.parseWaitStatement(e);case i._assert:return this.parseAssertStatement(e);case i._log:case i._console:return this.parseLogStatement(e,t===i._log?o.LOG:o.CONSOLE); | ||
case i._jumpto:return this.parseGotoStatement(e);case i._refresh:return this.parseRefreshStatement(e);case i._var:return this.parseVarStatement(e);case i.name:return this.parseExprStatement(e);default:this.unexpected()}},e.parseReturnStatement=function(t){return this.next(),this.eat(i.semi)?t.args=null:this.raise(this.start,"Return expression is not supported"),this.finishNode(t,o.RETURN)},e.parseVarStatement=function(t){return this.next(),this.parseVar(t),t.BODY.exp=r(t.BODY.raw),this.semicolon(),this.finishNode(t,o.EXPRESSION)},e.parseVar=function(t){for(var e=[];;){var n={};if(n.id=this.parseIndent(),this.eat(i.eq)?n.init=this.parseMaybeAssign():n.init=null,e.push(n),!this.eat(i.comma))break}t.BODY.raw={declarations:e,type:"varDecl"}},e.parseExprStatement=function(t){var e=this.parseExpression();if(this.semicolon(),"CallExpr"===e.type){var n=e.callee.name;return this.pcsTable[n]!==!1&&(this.pcsTable[n]={pos:this.lastTokStart}),t.BODY.identifier=n,this.finishNode(t,o.CALL)}var i=r(e);return t.BODY.raw=e,t.BODY.exp=i,this.finishNode(t,o.EXPRESSION)},e.parseWaitStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.delay=r(t.BODY.raw),this.semicolon(),this.finishNode(t,o.WAIT)},e.parseMouseAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseScrollAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),this.expect(i._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=r(t.BODY.raw1),t.BODY.action=e,this.finishNode(t,o.TRIGGER)},e.parseSelectAction=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),this.expect(i._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=r(t.BODY.raw1),t.BODY.action="select",this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseInputAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),this.expect(i._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=r(t.BODY.raw1),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseAssertStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.exp=r(t.BODY.raw),this.eat(i._in)&&(this.type===i.num?t.BODY.timeout=this.value:this.unexpected(),this.next()),this.semicolon(),t.BODY.key=this.UID("#"),this.keys[t.BODY.key]=!!t.BODY.timeout,this.finishNode(t,o.ASSERT)},e.parseGotoStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.url=r(t.BODY.raw),this.semicolon(),this.finishNode(t,o.JUMPTO)},e.parseRefreshStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,o.REFRESH)},e.parseLogStatement=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.msg=r(t.BODY.raw),this.semicolon(),this.finishNode(t,e)},e.startNode=function(){return{LINE:s(this.input,this.start).line,TYPE:0,BODY:{},start:this.start,end:0}},e.finishNode=function(t,e){return t.TYPE=e,t.end=this.lastTokEnd,t}}},function(t,e,n){var i=n(7),s=i.isIdentifierStart,r=i.isIdentifierChar,o=n(1).types,a=n(1).keywordTypes,c=n(10),u=c.isNewLine,h=c.lineBreak;t.exports=function(t){var e=t.prototype;e.next=function(){this.lastTokEnd=this.end,this.lastTokStart=this.start,this.nextToken()},e.nextToken=function(){return this.skipSpace(),this.start=this.pos,this.pos>=this.input.length?this.finishToken(o.eof):void this.readToken(this.fullCharCodeAtPos())},e.readToken=function(t){return s(t)||35===t?this.readWord():this.getTokenFromCode(t)},e.fullCharCodeAtPos=function(){return this.input.charCodeAt(this.pos)},e.skipBlockComment=function(){var t=this.pos,e=this.input.indexOf("*/",this.pos+=2);-1===e&&this.raise(this.pos-2,"unterminated comment"),this.pos=e+2,this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,e),t,this.pos)},e.skipLineComment=function(t){for(var e=this.pos,n=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.pos,n=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+=t,this.pos),e,this.pos)},e.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&14>t))break t;++this.pos}}},e.readToken_bracket=function(){this.pos++,this.fullCharCodeAtPos();return this.finishToken(o.bracketL)},e.readToken_brace=function(){this.pos++,this.fullCharCodeAtPos();return this.finishToken(o.braceL)},e.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed||this.genAllowed?(++this.pos,this.readRegexp(this.genAllowed)):61===t?this.finishOp(o.assign,2):62===t?this.finishOp(o.tagR,2):this.finishOp(o.slash,1)},e.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),n=1,i=42===t?o.star:o.modulo;return 61===e?this.finishOp(o.assign,n+1):this.finishOp(i,n)},e.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(124===t?o.logicalOR:o.logicalAND,2):void this.raise(this.pos,"bitwise operator is not allowed")},e.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(o.incDec,2):61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},e.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),n=1;if(e===t&&this.raise(this.pos,"bitwise operator is not allowed"),60===t){if(35===e)return this.finishOp(o.tagNumL,2);if(64===e)return this.finishOp(o.tagAtL,2);if(33===e)return this.finishOp(o.tagFacL,2)}return 61===e&&(n=2),this.finishOp(o.relational,n)},e.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 126===e&&33===t?this.finishOp(o.match,2):61===e?this.finishOp(o.equality,61===this.input.charCodeAt(this.pos+2)?3:2):this.finishOp(61===t?o.eq:o.prefix,1)},e.getTokenFromCode=function(t){switch(t){case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return this.readToken_bracket();case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return this.readToken_brace();case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:var e=this.input.charCodeAt(this.pos+1);return 126!==e&&this.raise(this.pos,"bitwise operator is not allowed"),this.finishOp(o.match,2);default:this.raise(this.pos,'Unexpected character "'+this.input[this.pos]+'"')}},e.finishOp=function(t,e){var n=this.input.slice(this.pos,this.pos+=e);return this.finishToken(t,n)},e.finishToken=function(t,e){this.end=this.pos,this.type=t,this.value=e,this.genAllowed=t.beforeGen,this.exprAllowed=t.beforeExpr},e.readRegexp=function(t){for(var e,n,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(h.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===s)n=!0;else if("]"===s&&n)n=!1;else if("/"===s&&!n)break;e="\\"===s}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var a=this.readWord1();if(a){var c=/^[gim]*$/;c.test(a)||this.raise(i,"Invalid regular expression flag")}var u={pattern:r,flags:a,isGenerate:t};return this.finishToken(o.regexp,u)},e.readInt=function(t,e){for(var n=this.pos,i=0,s=0,r=null==e?1/0:e;r>s;++s){var o,a=this.fullCharCodeAtPos();if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&57>=a?a-48:1/0,o>=t)break;++this.pos,i=i*t+o}return this.pos===n||null!=e&&this.pos-n!==e?null:i},e.readNumber=function(t){var e=this.pos,n=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid Number");var i=this.fullCharCodeAtPos();46===i&&(++this.pos,this.readInt(10),n=!0,i=this.fullCharCodeAtPos()),69!==i&&101!==i||(i=this.input.charCodeAt(++this.pos),43!==i&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,a=this.input.slice(e,this.pos);return r=n?parseFloat(a):parseInt(a,10),this.finishToken(o.num,r)},e.readString=function(t){for(var e="",n=this.start,i=++this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated string");var s=this.fullCharCodeAtPos();if(s===t)break;92===s?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(),i=this.pos):(u(s)&&this.raise(n,"Unterminated string"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(o.string,e)},e.readEscapedChar=function(){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"\x0B";case 102:return"\f";case 13:10===this.fullCharCodeAtPos()&&++this.pos;case 10:return"";default:return String.fromCharCode(t)}},e.readWord1=function(){for(var t="",e=!0,n=this.pos;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(r(i))++this.pos;else{if(!e||35!==i)break;++this.pos}e=!1}return t+=this.input.slice(n,this.pos)},e.readWord=function(){var t,e=this.pos,n=this.readWord1();if(this.keywords.test(n)){if(t=a[n],t.macro){var i=this.readMacro();return this.finishToken(t,i)}}else 35===n.charCodeAt(0)&&this.raise(e,"# is only valid for # macro"),t=o.name;return this.finishToken(t,n)},e.readMacro=function(){for(var t=this.pos,e=this.fullCharCodeAtPos();this.pos<this.input.length&&10!==e&&13!==e&&8232!==e&&8233!==e;)++this.pos,e=this.input.charCodeAt(this.pos);return this.input.slice(t,this.pos).trim()}}},function(t,e){var n={varDecl:function(t,e){var n="",i=!0;return t.declarations.forEach(function(t){t.init&&(i||(n+=","),n+="$."+t.id+" = "+e(t.init),i=!1)}),"("+n+")"},SequenceExpr:function(t,e){var n="",i=!0;return t.expressions.forEach(function(t){i||(n+=","),n+=e(t),i=!1}),"("+n+")"},literal:function(t){return t.raw},regexp:function(t){if(t.regexp.isGenerate){var e=t.regexp;return"(/"+e.pattern+"/"+e.flags+").gen()"}return"("+t.raw+")"},Identifier:function(t){return"$."+t.name},LogicalExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},BinaryExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},MatchExpr:function(t,e){var n="";return"~~"===t.operator&&(n+="!"),n+"!m("+e(t.left)+","+e(t.right)+")"},UpdateExpr:function(t){var e="$."+t.argument;return t.prefix?t.operator+e:e+t.operator},UnaryExpr:function(t,e){return t.operator+"("+e(t.argument)+")"},AssignmentExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},ParenthesizedExpr:function(t,e){return"("+e(t.expression)+")"},TextExpr:function(t,e){var n="String("+e(t.val)+")";return"t("+n+")"},CountExpr:function(t,e){var n="String("+e(t.val)+")";return"c("+n+")"},VisibilityExpr:function(t,e){var n="String("+e(t.val)+")";return"v("+n+")"}};t.exports=function(t){var e=function i(t){var e=t.type;return n[e](t,i)}(t);return new Function("$,o,d,c,t,v,m","return "+e+";")}}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LC=e():t.LC=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(16)},function(t,e){function n(t,e){return new s(t,{beforeGen:!0,binop:e})}function i(t,e){e=e||{},e.keyword=t,c[t]=a["_"+t]=new s(t,e)}var s=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeGen=Boolean(e.beforeGen),this.beforeExpr=Boolean(e.beforeExpr),this.isAssign=Boolean(e.isAssign),this.prefix=Boolean(e.prefix),this.postfix=Boolean(e.postfix),this.binop=e.binop||null,this.macro=Boolean(e.macro)},r={beforeGen:!0},o={macro:!0},a={num:new s("num"),regexp:new s("regexp"),string:new s("string"),name:new s("name"),eof:new s("eof"),bracketL:new s("[",r),bracketR:new s("]"),braceL:new s("{",r),braceR:new s("}"),parenL:new s("(",r),parenR:new s(")"),comma:new s(",",r),semi:new s(";",r),colon:new s(":",r),tagNumL:new s("CountExpr",r),tagAtL:new s("TextExpr",r),tagFacL:new s("VisibilityExpr",r),tagR:new s("/>"),eq:new s("=",{beforeGen:!0,isAssign:!0}),assign:new s("_=",{beforeGen:!0,isAssign:!0}),incDec:new s("++/--",{prefix:!0,postfix:!0}),prefix:new s("prefix",{beforeGen:!0,prefix:!0}),logicalOR:n("||",1),logicalAND:n("&&",2),equality:n("==/!=",6),relational:n("</>",7),plusMin:new s("+/-",{beforeGen:!0,binop:9,prefix:!0}),modulo:n("%",10),star:n("*",10),slash:n("/",10),match:new s("~~",{beforeExpr:!0,binop:6})},c={};i("in"),i("by",r),i("click",r),i("input",r),i("rclick",r),i("dblclick",r),i("movein",r),i("moveout",r),i("scroll",r),i("select",r),i("#CLOCK",o),i("#TIMES",o),i("#INTERVAL",o),i("#SCREEN",o),i("wait",r),i("assert",r),i("log",r),i("console",r),i("var"),i("process"),i("return",r),i("jumpto"),i("refresh"),t.exports={TokenType:s,types:a,keywordTypes:c}},function(t,e,n){function i(t,e){var n=o.contextFrame;n.style.height="100%",n.style.width="100%",t.appendChild(n),(e||c.noop).call(n)}function s(){return o.contextFrame}function r(){return o.contextFrame?o.contextFrame.contentWindow.document:document}var o,a,c=n(3);o={contextFrame:document.createElement("iframe"),defaultNextLoopDelay:3e3,readyTimeout:3e3,defaultClock:10,bootExceptionHandle:c.noop,triggerCallback:c.noop,runCallback:c.noop,runExceptionHandle:function(){console.log(arguments)},successCallback:c.noop,readyCallback:c.noop,loopCallback:c.noop,consoleFn:c.noop},a=function(t){return c.isString(t)?o[t]:c.isObject(t)?void c.forEach(t,function(t,e){this[e]=t},o):void 0},a.setContextFrame=function(t){trigger.setupIframe(t),o.contextFrame=t},t.exports={settings:o,getDocument:r,setup:a,init:i,getLemoncaseFrame:s}},function(t,e){var n={now:Date.now||function(){return(new Date).getTime()},isString:function(t){return"string"==typeof t},isUndefined:function(t){return void 0===t},isDefined:function(t){return!n.isUndefined(t)},isNumber:function(t){return"number"==typeof t},isObject:function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},isElement:function(t){return!(!t||1!==t.nodeType)},isFunction:function(t){return"function"==typeof t},isArray:function(t){return"[object Array]"==={}.toString.call(t)},last:function(t){return t[t.length-1]},noop:function(){},forEach:function(t,e,n){e=e.bind(n);var i,s;if(this.isArray(t))for(i=0,s=t.length;s>i;i+=1)e(t[i],i,t);else{var r=Object.keys(t);for(i=0,s=r.length;s>i;i+=1)e(t[r[i]],r[i],t)}return t},has:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}};t.exports=n},function(t,e){var n=function(t,e){function n(t,e){this.$case=e,this.$body=t.BODY,this.$line=t.LINE}if(!e){var s=i[t];if(!s)throw new Error("TYPE:"+t+" instruction is not existed.");return s}if(i[t])throw new Error("The instruction factory: TYPE="+t+" is existed.");return n.prototype.execute=e.operation,n.prototype.line=function(){return this.$line},n.prototype.body=function(t){return t?this.$body[t]:this.$body},n.prototype.assignCase=function(t){return this.$case=t,this},n.create=function(){return new n({BODY:e.bodyFactory.apply(null,arguments)})},n.$new=function(t,e){return new n(t,e)},i[t]=n,n},i=[];t.exports=n},function(t,e){t.exports={CALL:0,RETURN:1,EXIT:2,EXPRESSION:16,WAIT:17,TRIGGER:18,ASSERT:19,JUMPTO:20,REFRESH:21,LOG:32,CONSOLE:33,PROCESS:255}},function(t,e,n){function i(t,e){var n={process:{},config:{}},i=[];return c.forEach(t.DATA_KEYS,function(t,e){t&&i.push(e)}),c.forEach(t.PROCESSES,function(t,i){var s=n.process[i]=[];c.forEach(t.BODY.segment,function(t){s.push(p(t.TYPE).$new(t,e))})}),n.config.times=t.CONFIG.times||1,n.config.interval=t.CONFIG.interval,n.config.screen=t.CONFIG.screen,{eT:n,dK:i}}function s(t){if(!(this instanceof s))return new s(t);if(c.isUndefined(t))return new s(f("process main{}"));var e=i(t,this);this.$$executionTree=e.eT,this.$$log=new h(e.dK),this.$$state="ready",this.$$coreId=null,this.$$activeTime=0,this.$$currentLoop=0,this.$$vars={},this.$$blockStack=[],this.$$scopeStack=[],this.$$lastInstruction=void 0,this.$$instructionBuffer=void 0,this.$$tempInstruction=void 0,this.$$idleTask=c.noop,this.$loopData=null}var r=n(5),o=r.CALL,a=r.EXIT,c=n(3),u=n(2).settings,h=n(11),p=n(4),f=n(8).parse,l=s.prototype;l.$$getConfig=function(t){return this.$$executionTree.config[t]},l.$$bootstrap=function(){var t=u.contextFrame.style,e=this.$$getConfig("screen");return this.$$currentLoop=0,e&&(t.height=e.height+"px",t.width=e.width+"px"),(u.loopCallback||c.noop)(this),this.$setActiveTime().$setTempInstruction(p(o).create("main")).$$log.initialization(),this},l.$$exitCase=function(){return this.$setState("success").$$interrupt(),(u.successCallback||c.noop).call(this),this},l.$$interrupt=function(){return clearInterval(this.$$coreId),this},l.$$popInstruction=function(){var t=this.$$tempInstruction,e=this.$getCurrentBlock();return this.$$lastInstruction=this.$$instructionBuffer,t?(this.$setTempInstruction(),t):e?(this.$$instructionBuffer=e.segment[e.counter++],this.$$instructionBuffer):p(a).create(!0).assignCase(this)},l.$$run=function(){try{this.$$popInstruction().execute(),u.runCallback(this)}catch(t){console.error("[Error FROM LC2 Core]:"+t)}return this},l.$$core=function(){var t=this;return this.$$coreId=setInterval(function(){t["$$"+(c.now()>=t.$$activeTime?"run":"idleTask")]()},this.$$getConfig("clock")||u.defaultClock),this},t.exports={Case:s,$CP:l}},function(t,e){function n(t){return 65>t?36===t:91>t?!0:97>t?95===t:123>t}function i(t){return 48>t?36===t:58>t?!0:65>t?!1:91>t?!0:97>t?95===t:123>t}var s=["in","by"],r=["click","input","rclick","dblclick","movein","moveout","scroll","select","jumpto","refresh"],o=["#CLOCK","#TIMES","#INTERVAL","#SCREEN"],a=["wait","assert","log","console","var","process","return"].concat(s).concat(r).concat(o),c=new RegExp("^("+a.join("|")+")$");t.exports={keywordRegexp:c,isIdentifierStart:n,isIdentifierChar:i}},function(t,e,n){var i=n(23);t.exports={parse:function(t,e){return new i(e,t).parse()},tokenizer:function(t,e){return new i(e,t)},parseFragment:function(t,e){var n=new i(e,t);return n.nextToken(),n.parseStatement()}}},function(t,e,n){function i(t,e){for(var n=1,i=0;;){c.lastIndex=i;var s=c.exec(t);if(!(s&&s.index<e))return new u(n,e-i);++n,i=s.index+s[0].length}}function s(t,e,n){var i=t.split(c)[e.line-1],s=i.substr(0,e.column),u=a(s),h=r(u),p=o(n,u);return"\n"+i+"\n"+h+"\n"+p}function r(t){for(var e=-1,n=-1,i="";++e<t;)i+=" ";for(i+="↑\n";++n<t;)i+=" ";return i+="↑"}function o(t,e){if(t.length/2>e)return t;for(var n=-1,i=e-Math.floor(t.length/2),s="";++n<i;)s+=" ";return s+=t}function a(t){for(var e,n=0,i=-1,s=t.length;++i<s;)switch(e=t.charCodeAt(i)){case 9:n+=4;break;default:n+=1}return n}var c=n(10).lineBreakG,u=function(t,e){this.line=t,this.column=e};u.prototype.offset=function(t){return new u(this.line,this.column+t)},t.exports={getLineInfo:i,empowerErrMsg:s}},function(t,e){var n=/\r\n?|\n|\u2028|\u2029/;t.exports={lineBreak:n,lineBreakG:new RegExp(n.source,"g"),isNewLine:function(t){return 10===t||13===t||8232===t||8233===t}}},function(t,e,n){var i=n(3),s=function(t){this.$$baseTime=0,this.$dataKeys=t||[],this.$marks=[],this.$logs=[],this.$datas={}};s.prototype.initialization=function(){return this.clear(),this.$$baseTime=i.now(),i.forEach(this.$dataKeys,function(t){this[t]=[]},this.$datas),this},s.prototype.getLength=function(t){return this["$"+t].length},s.prototype.log=function(t,e){return this.$logs.push([t,i.now()-this.$$baseTime,e||0]),this},s.prototype.data=function(t,e){return this.$datas[t].push(e),this},s.prototype.markLog=function(t,e){return this.$marks.push([t,e,this.getLength("logs")-1]),this},s.prototype.clear=function(){return this.$$baseTime=0,this.$marks.length=0,this.$logs.length=0,this.$datas={},this},s.prototype.export2json=function(){return{baseTime:this.$$baseTime,marks:this.$marks,logs:this.$logs,performance:this.$datas}},s.prototype.export2text=function(){return JSON.stringify(this.export2json())},t.exports=s},function(t,e){!function(){var e={POSITION:0,CLASS:2,RANGE:3,CLAUSE:6,REFERENCE:7,INTS:"0123456789",WORDS:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",WHITESPACE:" \f\n\r \x0B \u2028\u2029\u2028\u2029 "},n="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",i={0:0,t:9,n:10,v:11,f:12,r:13},s={rndChar:function(t){return t[Math.floor(Math.random()*t.length)]},anyRndChar:function(){return String.fromCharCode(s.rndInt(0,65535))},strToChars:function(t){var e=/\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]^?])|([0tnvfr]))/g;return t=t.replace(e,function(t,e,s,r,o,a){var c,u=e?parseInt(e,16):s?parseInt(s,16):r?parseInt(r,8):o?n.indexOf(o):a?i[a]:void 0;return void 0!==u?(c=String.fromCharCode(u),c=c.replace(/[[\]{}^$.|?*+()]/g,function(t){return"\\"+t})):c="\\"+a,c})},rndInt:function(t,e){return t+Math.floor(Math.random()*(1+e-t))},findChar:function(t){for(var e="\\",n="]",i=0;;){var s=t.indexOf(n);if(t[s-1]!==e)return i+s;t=t.slice(++s),i+=s}},range:function(t,n,i){var s=e.WORDS;return s.slice(s.indexOf(n),s.indexOf(i)+1)},classRange:function(t){return t.replace(/(\w)-(\w)/g,s.range)},toBothCases:function(t){var e=t;return e+=t["to"+(t===t.toLowerCase()?"Upper":"Lower")+"Case"]()},inCaseClass:function(t,e){return e?t=t.replace(/[a-zA-Z]/g,function(t){return s.toBothCases(t)}):t},inCaseChar:function(t,n){return n&&/[a-zA-Z]/.test(t)?{type:e.CLASS,chars:s.toBothCases(t)}:t},flatten:function(t){for(var e=0;e<t.length-1;e++)if("string"==typeof t[e])for(var n=e+1;;){var i=t[n];if("string"!=typeof i)break;t[e]+=i,t.splice(n,1)}return 1===t.length?t[0]:t},reduce:function(t){if(t.stack)t.stack=s.flatten(t.stack);else if(t.options)for(var e=0,n=t.options.length;n>e;e++)t.options[e]=s.flatten(t.options[e]);return t.options||t.group||t.value?t:t.stack},nextClose:function(t){for(var e=0,n=0,i=t.length;i>n;n++){var s=t[n];switch(s){case")":if(0===e)return n+1;e--;break;case"(":e++;break;case"\\":n++}}}},r={type:e.POSITION,value:"b"},o={type:e.POSITION,value:"B"},a={type:e.POSITION,value:"^"},c={type:e.POSITION,value:"$"},u={type:e.CLASS,chars:e.WORDS},h={type:e.CLASS,chars:e.WORDS,not:!0},p={type:e.CLASS,chars:e.INTS},f={type:e.CLASS,chars:e.INTS,not:!0},l={type:e.CLASS,chars:e.WHITESPACE},d={type:e.CLASS,chars:e.WHITESPACE,not:!0},v={type:e.CLASS,chars:"\n",not:!0},g=function(t,n,i){var g,m=0,x={type:e.CLAUSE,stack:[]},$=x,y=x.stack,b=[];for(t=s.strToChars(t);m<t.length;)switch(g=t[m++]){case"\\":switch(g=t[m++]){case"b":y.push(r);break;case"B":y.push(o);break;case"w":y.push(u);break;case"W":y.push(h);break;case"d":y.push(p);break;case"D":y.push(f);break;case"s":y.push(l);break;case"S":y.push(d);break;default:/\d/.test(g)?y.push({type:e.REFERENCE,value:parseInt(g)}):y.push(g)}break;case"^":y.push(a);break;case"$":y.push(c);break;case"[":if(g=t[m],"\\"===g&&0===t.slice(m+1).indexOf("b]"))m+=3,y.push("\b");else{var E;"^"===g?(E=!0,m++):E=!1;var k=t.slice(m),w=s.findChar(k),C=k.substring(0,w);m+=w+1,y.push({type:e.CLASS,chars:s.inCaseClass(s.classRange(C),n),not:E})}break;case".":y.push(v);break;case"(":g=t[m];var T;if("?"===g){if(g=t[m+1],m+=2,"!"===g){m+=s.nextClose(t.slice(m));break}T=!1}else T=!0;var S={type:e.CLAUSE,group:T,stack:[]};y.push(S),b.push($),$=S,y=S.stack;break;case")":$=b.pop(),y=$.options?$.options[$.options.length-1]:$.stack;var O=y.length-1;y[O]=s.reduce(y[O]);break;case"|":$.options||($.options=[$.stack],delete $.stack);var L=[];$.options.push(L),y=L;break;case"{":var A=/^(\d+)(,(\d+)?)?\}/.exec(t.slice(m)),I=parseInt(A[1]),R=A[2]?A[3]?parseInt(A[3]):1/0:I;m+=A[0].length;var B=y.pop();if(I===R)for(var D=0;I>D;D++)y.push(B);else y.push({type:e.RANGE,min:I,max:R,value:B});break;case"?":var B=y.pop();y.push({type:e.RANGE,min:0,max:1,value:B});break;case"+":var B=y.pop();y.push({type:e.RANGE,min:1,max:1/0,value:B});break;case"*":var B=y.pop();y.push({type:e.RANGE,min:0,max:1/0,value:B});break;default:y.push(s.inCaseChar(g,n))}return s.reduce(x)},m=function(t,n,i,r){if("string"==typeof t)return t;if(t.length){for(var o="",a=0,c=t.length;c>a;a++)o+=m(t[a],n,i,r);return o}switch(t.type){case e.POSITION:return"";case e.CLASS:if(!t.not)return s.rndChar(t.chars);for(;;){var u=i();if(-1===t.chars.indexOf(u))return u}case e.RANGE:for(var h=s.rndInt(t.min,t.max===1/0?t.min+n:t.max),o="",a=0;h>a;a++)o+=m(t.value,n,i,r);return o;case e.CLAUSE:if(t.options){var h=s.rndInt(0,t.options.length-1);return m(t.options[h],n,i,r)}var p=m(t.stack,n,i,r);return r.push(p),p;case e.REFERENCE:return r[t.value-1]}};RegExp.prototype.gen=function(){return void 0===this._randexp&&(this._randexp=g(this.source,this.ignoreCase,this.multiline),this._max=this._max||100,this._anyRndChar=this._anyRndChar||s.anyRndChar),m(this._randexp,this._max,this._anyRndChar,[])},"undefined"==typeof window&&(t.exports=m)}()},function(t,e){!function(){"use strict";function e(t,e,n){var i,s=[t];for(i in n)n.hasOwnProperty(i)&&(s[n[i]]=e[i]||null);return s}function n(t){return 1===t.nodeType}function i(t){return t instanceof Window}function s(t){return null!==t&&"object"==typeof t}function r(t){return"function"==typeof t}function o(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function a(t,e){var n,i,a,c,u,h,p,f,l=t.$$hashKey;if(e)for(i=0,n=e.length;n>i;++i)if(p=e[i],s(p)||r(p))for(f=Object.keys(p),c=0,a=f.length;a>c;c++)u=f[c],h=p[u],t[u]=h;return o(t,l),t}function c(t){return a(t,[].slice.call(arguments,1),!1)}function u(t,e,n){v&&t.dispatchEvent(new k(e,c({},A,n)))}function h(t,e,n){t.dispatchEvent(new C(e,c({},A,n)))}function p(t,e,n){t.dispatchEvent(new S(e,c({},A,n)))}function f(t){this.element=t,this.action=this.getActionRule(t)}var l,d=!0,v=!0,g=!0,m=null;try{l=new MouseEvent("click",{})}catch(x){d=!1}try{TouchEvent}catch($){v=!1}try{InputEvent}catch(y){g=!1}console.log(d),console.log(v);var b,E,k=function(t,n){var i=document.createEvent("UIEvent"),s={bubbles:1,cancelBubble:2,view:3,detail:4};return i.initUIEvent.apply(i,e(t,n,s)),i},w=d&&!v?Event:function(t,n){var i=document.createEvent("Event"),s={bubbles:1,cancelBubble:2};return i.initEvent.apply(i,e(t,n,s)),i},C=d&&!v?MouseEvent:function(t,n){var i=document.createEvent("MouseEvent"),s={bubbles:1,cancelBubble:2,view:3,detail:4,screenX:5,screenY:6,clientX:7,clientY:8,ctrlKey:9,altKey:10,shiftKey:11,metaKey:12,button:13,relatedTarget:14};return i.initMouseEvent.apply(i,e(t,n,s)),i},T=d&&!v?UIEvent:function(t,n){var i=document.createEvent("UIEvent"),s={bubbles:1,cancelBubble:2,view:3,detail:4};return i.initUIEvent.apply(i,e(t,n,s)),i},S=d&&!v?KeyboardEvent:function(t,n){var i=document.createEvent("KeyboardEvent"),s={bubbles:1,cancelBubble:2,view:3,"char":4,key:5,location:6,repeat:8};return i.initKeyboardEvent.apply(i,e(t,n,s)),i},O=(g?InputEvent:T,{contextIframe:null,window:function(){return O.contextIframe?O.contextIframe.contentWindow:window}}),L=[],A={},I=0,R=1,B=2,D=3,N=4,Y=5,P=6,_=7,F=8,G=9,M=16,U=17,j=18,W=32,K=33,H=34,q=36,V=48,X=49;L[I]=function(t){u(this,"touchend",t),h(this,"mouseup",t)},L[R]=function(t){m&&this!==m&&m.value&&m.blur(),u(this,"touchstart",t),h(this,"mousedown",t),m=this},L[B]=function(t){h(this,"mouseenter",t)},L[D]=function(t){h(this,"mouseleave",t)},L[N]=function(t){h(this,"mouseout",t)},L[Y]=function(t){h(this,"mouseover",t)},L[P]=function(t){u(this,"touchmove",t),h(this,"mousemove",t)},L[_]=function(t){h(this,"click",t)},L[F]=function(t){h(this,"dblclick",t)},L[G]=function(t){h(this,"contextmenu",t)},L[U]=function(t){p(this,"keydown",t)},L[j]=function(t){p(this,"keypress",t)},L[M]=function(t){p(this,"keyup",t)},L[H]=function(){this.focus()},L[K]=function(t){var e=O.contextIframe.style;e.width=t.width+"px",e.height=t.height+"px"},L[W]=function(t){O.window().scrollTo(t.x,t.y),this.dispatchEvent(new T("scroll"))},L[q]=function(t){var e,n=parseInt(t.value,0);if(isNaN(n))throw new Error("[Trigger > select]: Value is invalid option index.");if(e=this[n],!e)throw new Error("[Trigger > select]: No matched <option>.");L[R].call(e,t),L[I].call(e,t),e.selected=!0,this.dispatchEvent(new T("select")),L[_].call(e,t),L[N].call(e,t)},L[V]=function(t){this.value=t.value,this.dispatchEvent(new T("input",t))},L[X]=function(){this.dispatchEvent(new w("change",{bubbles:!0}))},f.prototype.getActionRule=function(t){return t=t||this.element,t instanceof Window?E.window:"input"===t.tagName.toLowerCase()?E["input/"+t.type]:"textarea"===t.tagName.toLowerCase()?E.textarea:"select"===t.tagName.toLowerCase()?E.select:E.generic},f.prototype.does=function(t,e){var n,i,s;if(this.testAction(t)!==!0)throw new Error("[Trigger]: The element:"+this.element.outerHTNL+" can not use action:"+t);for(s=this.action[t],i=s.length,n=0;i>n;n+=1)L[s[n]].call(this.element,e||{});return this},f.prototype.testAction=function(t){return this.action.hasOwnProperty(t)},E=function(){var t={};return t["input/checkbox"]=t["input/radio"]=t["input/button"]=t.generic={click:[R,P,I,_],dblclick:[R,I,_,R,I,_,F],rclick:[R,I,G],movein:[Y,N],moveout:[P,N],scroll:[W]},t.textarea=t["input/text"]=t["input/password"]=t["input/email"]=c({},t.generic,{input:[H,U,j,V,M,X],click:[R,H,P,I,_],dblclick:[R,H,P,I,_,R,P,I,_,F],rclick:[R,H,I,G]}),t.select=c({},t.generic,{select:[R,H,P,I,_,P,N,q]}),t.window={scroll:[W],resize:[K]},t}(),b=function(t){if(!i(t)&&!n(t))throw new Error('[Trigger]: "element" for trigger must be a HTMLElement');return new f(t)},b.setupIframe=function(t){if(!(t instanceof HTMLIFrameElement))throw new Error('[Trigger]: "element" must be a iframe element.');O.contextIframe=t},"undefined"!=typeof t&&t.exports?t.exports=b:window.trigger=b}()},function(t,e,n){function i(t){return p().querySelectorAll(t).length}function s(t){var e=p().querySelector(t);return e?e.value?"checkbox"===e.type||"radio"===e.type?e.checked:e.value:e.innerHTML:!1}function r(t){var e=p().querySelector(t);return e?0!==e.offsetHeight||0!==e.offsetWidth:!1}function o(t,e){return c.isString(t)?!c.isDefined(e)||e instanceof RegExp?e.test?e.test(t):!1:-1!==t.indexOf(e):!1}var a=n(6).$CP,c=n(3),u=n(2),h=u.settings,p=u.getDocument,f=n(4),l=n(5).CALL;a.$setIdleTask=function(t){return this.$$idleTask=c.isFunction(t)?t:c.noop,this},a.$setActiveTime=function(t){return this.$$activeTime=c.now()+(t||0),this},a.$setTempInstruction=function(t){return this.$$tempInstruction=t?t.assignCase(this):void 0,this},a.$setState=function(t){return this.$$state=t,this},a.$pushBlock=function(t){return this.$$blockStack.push({counter:0,segment:t}),this},a.$pushScope=function(t){var e=this.$$blockStack;return this.$$scopeStack.push({blockIndex:e.length,vars:{}}),this.$pushBlock(this.$getProcess(t)),this},a.$popBlock=function(){return this.$$blockStack.pop(),this},a.$popScope=function(){var t=this.$$scopeStack.pop();return this.$$blockStack.length=t.blockIndex,this},a.$getCurrentBlock=function(){return c.last(this.$$blockStack)},a.$getCurrentScope=function(){return c.last(this.$$scopeStack)},a.$getProcess=function(t){return this.$$executionTree.process[t]},a.$exitLoop=function(){return this.$setActiveTime(this.$$getConfig("interval")||3e3),(this.$$currentLoop+=1)>=this.$$getConfig("times")?(this.$$exitCase(),this):(this.$setTempInstruction(f(l).create("main")),(h.loopCallback||c.noop)(this),this)},a.$runExp=function(t){return"function"==typeof t?t(this.$$vars,this.$objectList,this.$loopData,i,s,r,o):t},a.$pushLog=function(t,e){return this.getLog().log(t,e),this},a.$markLog=function(t,e){return this.getLog().markLog(t,e),this},a.$pushLogData=function(t,e){return this.getLog().data(t,e),this},a.$clearScope=function(){for(;this.$$scopeStack.length;)this.$popScope();return this},t.exports=a},function(t,e,n){var i=n(6).$CP,s=n(2).settings;i.validateObjectList=function(t,e){return e.length?t?e.every(function(e){return null!==t[e]}):!1:!0},i.getVar=function(){return this.$$vars},i.exportLog=function(t){return this.$$log["export2"+t]()},i.start=function(){var t=this.$$state;if("success"!==t&&"ready"!==t)throw new Error("Can not call play!");try{return this.$setState("running").$$bootstrap(),setTimeout(function(){this.$$core()}.bind(this),s.readyTimeout),this}catch(e){s.bootExceptionHandle(e)}},i.forceCofig=function(t){var e,n=this.$$executionTree.config;for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return this},i.suspend=function(){if("running"!==this.$$state)throw new Error("Can not call pause!");return this.$setState("pause").$$interrupt(),this},i.resume=function(){if("pause"!==this.$$state)throw new Error("Can not call resume!");return this.$setState("running").$$core(),this},i.stop=function(){var t=this.$$state;if("running"!==t&&"pause"!==t)throw new Error("Can not call stop!");return this.$setState("ready").$$interrupt(),this},i.debug=function(){var t=this.$$state;if("success"!==t&&"ready"!==t)throw new Error("Can not call play!");return this.$setState("debug").$$bootstrap(),this},i.getLog=function(){return this.$$log},i.getCurrentStep=function(){return this.$$counter},i.getCurrentLoop=function(){return this.$$currentLoop},i.getCurrentLine=function(){return this.$$instructionBuffer.$getLine()},i.getStatus=function(){return{loop:this.$$currentLoop,line:this.getCurrentLine(),state:this.$$state}},t.exports=i},function(t,e,n){var i=n(8),s=i.parse,r=i.parseFragment,o=n(6).Case,a=n(2).setup,c=n(4),u=n(2),h=u.init,p=u.getLemoncaseFrame;n(14),n(15),n(12),n(17);var e={Case:o,setup:a,Instruction:c,parse:s,parseAt:r,init:h,getLemoncaseFrame:p};t.exports=e},function(t,e,n){var i=n(4),s=n(2),r=s.settings,o=s.getDocument,a=n(3),c=n(5),u=c.CALL,h=c.RETURN,p=c.EXIT,f=c.EXPRESSION,l=c.WAIT,d=c.TRIGGER,v=c.ASSERT,g=c.JUMPTO,m=c.REFRESH,x=c.LOG,$=c.CONSOLE,y=(c.PROCESS,1),b=0,E=n(13);i(u,{operation:function(){var t=this.body("identifier");this.$case.$pushScope(t).$pushLog([u,t],this.line())},bodyFactory:function(t){return{identifier:t}}}),i(h,{operation:function(){this.$case.$pushLog([h]).$popScope()},bodyFactory:function(){return{}}}),i(p,{operation:function(){var t=this.body("isSuccess")?y:b,e=this.$case;this.body("preFn")(),t||r.runExceptionHandle(this.$case),e.$pushLog([p,t],this.line()).$markLog(t,e.getCurrentLoop()).$clearScope().$exitLoop()},bodyFactory:function(t,e){return{isSuccess:t,preFn:e||a.noop}}}),i(f,{operation:function(){this.$case.$runExp(this.body("exp"))},bodyFactory:function(t){return{exp:t}}}),i(l,{operation:function(){var t=this.$case.$runExp(this.body("delay"));this.$case.$setActiveTime(t).$pushLog([l,t],this.line())},bodyFactory:function(t){return{delay:t}}}),i(d,{operation:function(){var t,e=this.$case.$runExp(this.body("object")),n={value:this.$case.$runExp(this.body("param"))},s=this.body("action");try{if(t=o().querySelectorAll(e)[0],!t)throw"Can not find a DOM by cssPath: "+e;E(t).does(s,n),r.triggerCallback(t,this.$case)}catch(a){return console.log(a),void this.$case.$pushLog([d,b,e,s,n],this.line()).$setTempInstruction(i(p).create(!1).assignCase(this.$case))}this.$case.$pushLog([d,y,e,s,n],this.line())},bodyFactory:function(t,e,n){return{object:t,action:e,param:n}}}),i(v,{operation:function(){function t(){o.$runExp(n)&&o.$setIdleTask().$setTempInstruction().$setActiveTime().$pushLog([v,y],c.line()).$pushLogData(c.body("key"),a.now()-e)}var e=a.now(),n=this.body("exp"),s=this.body("timeout"),o=this.$case,c=this;o.$setTempInstruction(i(p).create(!1,function(){o.$pushLog([v,b],c.line())}).assignCase(o)),s&&s>2*r.defaultClock&&o.$setActiveTime(s).$setIdleTask(t),o.$runExp(n)&&(o.$setTempInstruction().$setActiveTime().$setIdleTask().$pushLog([v,y],this.line()),s&&o.$pushLogData(c.body("key"),0))},bodyFactory:function(t,e,n){return{exp:t,timeout:e,key:n}}}),i(g,{operation:function(){var t=this.$case.$runExp(this.body("url"));r.contextFrame.src=t,this.$case.$pushLog([g,t],this.line())}}),i(m,{operation:function(){o().location.reload(),this.$case.$pushLog([m],this.line())}}),i(x,{operation:function(){this.$case.$pushLog([x,this.$case.$runExp(this.body("msg"))])},bodyFactory:function(t){return{msg:t}}}),i($,{operation:function(){var t=this.$case.$runExp(this.body("msg"));console.log(t),r.consoleFn(t)},bodyFactory:function(t){return{msg:t}}})},function(t,e,n){var i=n(1).types;t.exports=function(t){var e=t.prototype;e.parseExpression=function(){var t=this.parseMaybeAssign();if(this.type===i.comma){var e={type:"SequenceExpr"};for(e.expressions=[t];this.eat(i.comma);){var n=this.parseMaybeAssign();e.expressions.push(n)}return e}return t},e.parseMaybeAssign=function(){var t=this.parseMaybeConditional();if(this.type.isAssign){var e={type:"AssignmentExpr",left:t,operator:this.value};return this.next(),e.right=this.parseMaybeAssign(),e}return t},e.parseMaybeConditional=function(){return this.parseExprOps()},e.parseExprOps=function(){var t=this.start,e=this.parseMaybeUnary(!1);return this.parseExprOp(e,t,-1)},e.parseExprOp=function(t,e,n){var i=this.type.binop;if(null!=i&&i>n){var s=this.type,r=this.value;this.next();var o=this.start,a=this.parseExprOp(this.parseMaybeUnary(!1),o,i),c=this.buildBinary(e,t,a,r,s);return this.parseExprOp(c,e,n)}return t},e.buildBinary=function(t,e,n,s,r){var o={left:e,operator:s,right:n};return r===i.logicalAND||r===i.logicalOR?o.type="LogicalExpr":r===i.match?o.type="MatchExpr":o.type="BinaryExpr",o},e.parseMaybeUnary=function(t){var e;if(this.type.prefix){var n={},s=this.type===i.incDec;n.operator=this.value,n.prefix=!0,this.next(),n.argument=this.parseMaybeUnary(!1),s||(t=!0),n.type=s?"UpdateExpr":"UnaryExpr",e=n}else for(e=this.parseExprSubscripts();this.type.postfix;){var r={};r.operator=this.value,r.prefix=!1,r.argument=e,this.next(),r.type="UpdateExpr",e=r}return e},e.parseExprSubscripts=function(){var t=this.start,e=this.parseExprAtom();return this.parseSubscripts(e,t)},e.parseSubscripts=function(t,e){for(;;){if(this.eat(i.parenL)){var n={type:"CallExpr",callee:t};return this.expect(i.parenR),n}return t}},e.parseExprAtom=function(){var t;switch(this.type){case i.name:var e=this.parseIndent(this.type!==i.name);return{type:"Identifier",name:e};case i.regexp:var n=this.value;return t=this.parseLiteral("regexp"),t.regexp=n,t;case i.num:case i.string:return this.parseLiteral("literal",this.value);case i.objectAt:case i.dict:return this.parseExtLiteral(this.type);case i.parenL:return this.parseParenExpression();case i.tagAtL:case i.tagNumL:case i.tagFacL:return this.parseTagExpression();default:this.unexpected()}},e.parseLiteral=function(t,e){var n={type:t,value:e,raw:this.input.slice(this.start,this.end)};return this.next(),n},e.parseExtLiteral=function(t){var e={type:t.label,value:this.value};return this.next(),e},e.parseParenExpression=function(){this.expect(i.parenL);var t=this.parseExpression();return this.expect(i.parenR),{type:"ParenthesizedExpr",expression:t}},e.parseTagExpression=function(){var t={type:this.type.label};return this.next(),t.val=this.parseExpression(),this.expect(i.tagR),t},e.parseIndent=function(){var t;return this.type===i.name?t=this.value:this.unexpected(),this.next(),t}}},function(t,e,n){var i=n(9),s=i.getLineInfo,r=i.empowerErrMsg;t.exports=function(t){var e=t.prototype;e.raise=function(t,e){var n=s(this.input,t);e+=" ("+n.line+":"+n.column+")";var i=this.options.left,o=this.options.right;e=i||o?i+e+o:r(this.input,n,e);var a=new SyntaxError(e);throw a.pos=t,a.loc=n,a.raisedAt=this.pos,a}}},function(t,e,n){var i=n(1).types;t.exports=function(t){var e=t.prototype;e.parseBindingList=function(t,e,n){for(var s=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(i.comma),e&&this.type===i.comma)s.push(null);else{if(n)break;var o=this.parseIndent();s.push(o)}return s}}},function(t,e,n){function i(t){var e={};for(var n in r)e[n]=t&&s(t,n)?t[n]:r[n];return e}var s=n(3).has,r={insertReturn:!0,onComment:function(){},left:"",right:"",plugins:{}};t.exports={defaultOptions:r,getOptions:i}},function(t,e,n){var i=n(1).types;t.exports=function(t){var e=t.prototype;e.eat=function(t){return this.type===t?(this.next(),!0):!1},e.semicolon=function(){this.eat(i.semi)||this.expected(i.semi)},e.expect=function(t){this.eat(t)||this.expected(t)},e.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")},e.expected=function(t){this.raise(this.lastTokEnd,'Expect a "'+t.label+'" after')},e.UID=function(t){return t+this.nextID++}}},function(t,e,n){var i=n(21).getOptions,s=n(7).keywordRegexp,r=n(1).types,o=function(t,e){this.options=i(t),this.keywords=s,this.input=String(e),this.pos=0,this.type=r.eof,this.value=null,this.start=this.end=this.pos,this.lastTokStart=this.lastTokEnd=this.pos,this.exprAllowed=!1,this.genAllowed=!1,this.labels=[],this.conf={},this.keys={},this.nextID=0,this.pcs={},this.pcsTable={}};o.prototype.parse=function(){this.nextToken();var t={CONFIG:this.conf,DATA_KEYS:this.keys,PROCESSES:this.pcs};return this.parseTopLevel(t)};var a=function(t){t(o)};a(n(19)),a(n(25)),a(n(24)),a(n(22)),a(n(18)),a(n(20)),t.exports=o},function(t,e,n){var i=n(1).types,s=n(9).getLineInfo,r=n(26),o=n(5);t.exports=function(t){var e=t.prototype;e.parseTopLevel=function(t){var e=this.pcsTable;for(e.main={pos:0};this.type!==i.eof;)this.parseStructure();for(var n in e)e[n]&&this.raise(e[n].pos,"Invalid process call at");return t},e.parseStructure=function(){var t=this.type;return t.macro?this.parseSet():t===i._process?this.parseProcess():void this.raise(this.start,"Expect a macro or process")},e.parseSet=function(){var t=this.type;t.macro||this.unexpected();var e=t.label.substr(1).toLowerCase();this.writeConfig(e),this.next()},e.writeConfig=function(t){var e,n=this.conf;switch(n[t]&&this.raise(this.start,this.type.keyword+" was defined already"),t){case"screen":var i,s,r=this.value.split(",");2!==r.length&&this.raise("Invalid arguments"),i=~~parseInt(r[0],10),s=~~parseInt(r[1],10),e={width:i,height:s};break;default:e=parseInt(this.value,10)}n[t]=e},e.parseProcess=function(){var t={LINE:s(this.input,this.start),TYPE:o.PROCESS,BODY:{}},e=this.pcs,n=this.pcsTable;this.next();var i=this.parseIndent();e[i]&&this.raise(this.start,i+" process was defined already"),e[i]=t,n[i]=!1,this.parsePcParam(t),this.parsePcBlock(t)},e.parsePcParam=function(t){this.eat(i.parenL)&&(t.BODY.params=this.parseBindingList(i.parenR,!1,!1))},e.parsePcBlock=function(t){var e=this.parseBlock();e.length&&e[e.length-1].TYPE===o.RETURN||e.push({LINE:-1,TYPE:o.RETURN}),t.BODY.segment=e},e.parseBlock=function(){this.expect(i.braceL);for(var t=[];!this.eat(i.braceR);){var e=this.parseStatement(!0);t.push(e)}return t},e.parseStatement=function(){var t=this.type,e=this.startNode();switch(t){case i._click:case i._rclick:case i._dblclick:case i._movein:case i._moveout:return this.parseMouseAction(e,t.keyword);case i._select:return this.parseSelectAction(e);case i._scroll:return this.parseScrollAction(e,t.keyword);case i._input:return this.parseInputAction(e,t.keyword);case i._return:return this.parseReturnStatement(e);case i._wait:return this.parseWaitStatement(e);case i._assert:return this.parseAssertStatement(e);case i._log:case i._console:return this.parseLogStatement(e,t===i._log?o.LOG:o.CONSOLE);case i._jumpto:return this.parseGotoStatement(e); | ||
case i._refresh:return this.parseRefreshStatement(e);case i._var:return this.parseVarStatement(e);case i.name:return this.parseExprStatement(e);default:this.unexpected()}},e.parseReturnStatement=function(t){return this.next(),this.eat(i.semi)?t.args=null:this.raise(this.start,"Return expression is not supported"),this.finishNode(t,o.RETURN)},e.parseVarStatement=function(t){return this.next(),this.parseVar(t),t.BODY.exp=r(t.BODY.raw),this.semicolon(),this.finishNode(t,o.EXPRESSION)},e.parseVar=function(t){for(var e=[];;){var n={};if(n.id=this.parseIndent(),this.eat(i.eq)?n.init=this.parseMaybeAssign():n.init=null,e.push(n),!this.eat(i.comma))break}t.BODY.raw={declarations:e,type:"varDecl"}},e.parseExprStatement=function(t){var e=this.parseExpression();if(this.semicolon(),"CallExpr"===e.type){var n=e.callee.name;return this.pcsTable[n]!==!1&&(this.pcsTable[n]={pos:this.lastTokStart}),t.BODY.identifier=n,this.finishNode(t,o.CALL)}var i=r(e);return t.BODY.raw=e,t.BODY.exp=i,this.finishNode(t,o.EXPRESSION)},e.parseWaitStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.delay=r(t.BODY.raw),this.semicolon(),this.finishNode(t,o.WAIT)},e.parseMouseAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseScrollAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),this.expect(i._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=r(t.BODY.raw1),t.BODY.action=e,this.finishNode(t,o.TRIGGER)},e.parseSelectAction=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),this.expect(i._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=r(t.BODY.raw1),t.BODY.action="select",this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseInputAction=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.object=r(t.BODY.raw),this.expect(i._by),t.BODY.raw1=this.parseExpression(),t.BODY.param=r(t.BODY.raw1),t.BODY.action=e,this.semicolon(),this.finishNode(t,o.TRIGGER)},e.parseAssertStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.exp=r(t.BODY.raw),this.eat(i._in)&&(this.type===i.num?t.BODY.timeout=this.value:this.unexpected(),this.next()),this.semicolon(),t.BODY.key=this.UID("#"),this.keys[t.BODY.key]=!!t.BODY.timeout,this.finishNode(t,o.ASSERT)},e.parseGotoStatement=function(t){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.url=r(t.BODY.raw),this.semicolon(),this.finishNode(t,o.JUMPTO)},e.parseRefreshStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,o.REFRESH)},e.parseLogStatement=function(t,e){return this.next(),t.BODY.raw=this.parseExpression(),t.BODY.msg=r(t.BODY.raw),this.semicolon(),this.finishNode(t,e)},e.startNode=function(){return{LINE:s(this.input,this.start).line,TYPE:0,BODY:{},start:this.start,end:0}},e.finishNode=function(t,e){return t.TYPE=e,t.end=this.lastTokEnd,t}}},function(t,e,n){var i=n(7),s=i.isIdentifierStart,r=i.isIdentifierChar,o=n(1).types,a=n(1).keywordTypes,c=n(10),u=c.isNewLine,h=c.lineBreak;t.exports=function(t){var e=t.prototype;e.next=function(){this.lastTokEnd=this.end,this.lastTokStart=this.start,this.nextToken()},e.nextToken=function(){return this.skipSpace(),this.start=this.pos,this.pos>=this.input.length?this.finishToken(o.eof):void this.readToken(this.fullCharCodeAtPos())},e.readToken=function(t){return s(t)||35===t?this.readWord():this.getTokenFromCode(t)},e.fullCharCodeAtPos=function(){return this.input.charCodeAt(this.pos)},e.skipBlockComment=function(){var t=this.pos,e=this.input.indexOf("*/",this.pos+=2);-1===e&&this.raise(this.pos-2,"unterminated comment"),this.pos=e+2,this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,e),t,this.pos)},e.skipLineComment=function(t){for(var e=this.pos,n=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.pos,n=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+=t,this.pos),e,this.pos)},e.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&14>t))break t;++this.pos}}},e.readToken_bracket=function(){this.pos++,this.fullCharCodeAtPos();return this.finishToken(o.bracketL)},e.readToken_brace=function(){this.pos++,this.fullCharCodeAtPos();return this.finishToken(o.braceL)},e.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed||this.genAllowed?(++this.pos,this.readRegexp(this.genAllowed)):61===t?this.finishOp(o.assign,2):62===t?this.finishOp(o.tagR,2):this.finishOp(o.slash,1)},e.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),n=1,i=42===t?o.star:o.modulo;return 61===e?this.finishOp(o.assign,n+1):this.finishOp(i,n)},e.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(124===t?o.logicalOR:o.logicalAND,2):void this.raise(this.pos,"bitwise operator is not allowed")},e.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(o.incDec,2):61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},e.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),n=1;if(e===t&&this.raise(this.pos,"bitwise operator is not allowed"),60===t){if(35===e)return this.finishOp(o.tagNumL,2);if(64===e)return this.finishOp(o.tagAtL,2);if(33===e)return this.finishOp(o.tagFacL,2)}return 61===e&&(n=2),this.finishOp(o.relational,n)},e.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 126===e&&33===t?this.finishOp(o.match,2):61===e?this.finishOp(o.equality,61===this.input.charCodeAt(this.pos+2)?3:2):this.finishOp(61===t?o.eq:o.prefix,1)},e.getTokenFromCode=function(t){switch(t){case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return this.readToken_bracket();case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return this.readToken_brace();case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:var e=this.input.charCodeAt(this.pos+1);return 126!==e&&this.raise(this.pos,"bitwise operator is not allowed"),this.finishOp(o.match,2);default:this.raise(this.pos,'Unexpected character "'+this.input[this.pos]+'"')}},e.finishOp=function(t,e){var n=this.input.slice(this.pos,this.pos+=e);return this.finishToken(t,n)},e.finishToken=function(t,e){this.end=this.pos,this.type=t,this.value=e,this.genAllowed=t.beforeGen,this.exprAllowed=t.beforeExpr},e.readRegexp=function(t){for(var e,n,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(h.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===s)n=!0;else if("]"===s&&n)n=!1;else if("/"===s&&!n)break;e="\\"===s}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var a=this.readWord1();if(a){var c=/^[gim]*$/;c.test(a)||this.raise(i,"Invalid regular expression flag")}var u={pattern:r,flags:a,isGenerate:t};return this.finishToken(o.regexp,u)},e.readInt=function(t,e){for(var n=this.pos,i=0,s=0,r=null==e?1/0:e;r>s;++s){var o,a=this.fullCharCodeAtPos();if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&57>=a?a-48:1/0,o>=t)break;++this.pos,i=i*t+o}return this.pos===n||null!=e&&this.pos-n!==e?null:i},e.readNumber=function(t){var e=this.pos,n=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid Number");var i=this.fullCharCodeAtPos();46===i&&(++this.pos,this.readInt(10),n=!0,i=this.fullCharCodeAtPos()),69!==i&&101!==i||(i=this.input.charCodeAt(++this.pos),43!==i&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,a=this.input.slice(e,this.pos);return r=n?parseFloat(a):parseInt(a,10),this.finishToken(o.num,r)},e.readString=function(t){for(var e="",n=this.start,i=++this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated string");var s=this.fullCharCodeAtPos();if(s===t)break;92===s?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(),i=this.pos):(u(s)&&this.raise(n,"Unterminated string"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(o.string,e)},e.readEscapedChar=function(){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"\x0B";case 102:return"\f";case 13:10===this.fullCharCodeAtPos()&&++this.pos;case 10:return"";default:return String.fromCharCode(t)}},e.readWord1=function(){for(var t="",e=!0,n=this.pos;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(r(i))++this.pos;else{if(!e||35!==i)break;++this.pos}e=!1}return t+=this.input.slice(n,this.pos)},e.readWord=function(){var t,e=this.pos,n=this.readWord1();if(this.keywords.test(n)){if(t=a[n],t.macro){var i=this.readMacro();return this.finishToken(t,i)}}else 35===n.charCodeAt(0)&&this.raise(e,"# is only valid for # macro"),t=o.name;return this.finishToken(t,n)},e.readMacro=function(){for(var t=this.pos,e=this.fullCharCodeAtPos();this.pos<this.input.length&&10!==e&&13!==e&&8232!==e&&8233!==e;)++this.pos,e=this.input.charCodeAt(this.pos);return this.input.slice(t,this.pos).trim()}}},function(t,e){var n={varDecl:function(t,e){var n="",i=!0;return t.declarations.forEach(function(t){t.init&&(i||(n+=","),n+="$."+t.id+" = "+e(t.init),i=!1)}),"("+n+")"},SequenceExpr:function(t,e){var n="",i=!0;return t.expressions.forEach(function(t){i||(n+=","),n+=e(t),i=!1}),"("+n+")"},literal:function(t){return t.raw},regexp:function(t){if(t.regexp.isGenerate){var e=t.regexp;return"(/"+e.pattern+"/"+e.flags+").gen()"}return"("+t.raw+")"},Identifier:function(t){return"$."+t.name},LogicalExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},BinaryExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},MatchExpr:function(t,e){var n="";return"~~"===t.operator&&(n+="!"),n+"!m("+e(t.left)+","+e(t.right)+")"},UpdateExpr:function(t){var e="$."+t.argument;return t.prefix?t.operator+e:e+t.operator},UnaryExpr:function(t,e){return t.operator+"("+e(t.argument)+")"},AssignmentExpr:function(t,e){return e(t.left)+t.operator+e(t.right)},ParenthesizedExpr:function(t,e){return"("+e(t.expression)+")"},TextExpr:function(t,e){var n="String("+e(t.val)+")";return"t("+n+")"},CountExpr:function(t,e){var n="String("+e(t.val)+")";return"c("+n+")"},VisibilityExpr:function(t,e){var n="String("+e(t.val)+")";return"v("+n+")"}};t.exports=function(t){var e=function i(t){var e=t.type;return n[e](t,i)}(t);return new Function("$,o,d,c,t,v,m","return "+e+";")}}])}); |
{ | ||
"name": "lc2", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "browser automation library", | ||
@@ -30,4 +30,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"angular": "^1.5.5", | ||
"ava": "^0.14.0", | ||
"angular": "^1.5.6", | ||
"ava": "^0.15.1", | ||
"codemirror": "^5.14.2", | ||
@@ -34,0 +34,0 @@ "webpack": "^1.13.0", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
231812