paper.js/lib/esprima-min.js

36 lines
No EOL
43 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*//*jslint bitwise:true plusplus:true *//*global esprima:true, define:true, exports:true, window: true,
throwError: true, generateStatement: true, peek: true,
parseAssignmentExpression: true, parseBlock: true, parseExpression: true,
parseFunctionDeclaration: true, parseFunctionExpression: true,
parseFunctionSourceElements: true, parseVariableIdentifier: true,
parseLeftHandSideExpression: true,
parseStatement: true, parseSourceElement: true */(function(e){"use strict";function y(e,t){if(!e)throw new Error("ASSERT: "+t)}function b(e,t){return a.slice(e,t)}function w(e){return"0123456789".indexOf(e)>=0}function E(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function S(e){return"01234567".indexOf(e)>=0}function x(e){return e===" "||e===" "||e===" "||e==="\f"||e===" "||e.charCodeAt(0)>=5760&&"  ".indexOf(e)>=0}function T(e){return e==="\n"||e==="\r"||e==="\u2028"||e==="\u2029"}function N(e){return e==="$"||e==="_"||e==="\\"||e>="a"&&e<="z"||e>="A"&&e<="Z"||e.charCodeAt(0)>=128&&o.NonAsciiIdentifierStart.test(e)}function C(e){return e==="$"||e==="_"||e==="\\"||e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e.charCodeAt(0)>=128&&o.NonAsciiIdentifierPart.test(e)}function k(e){return["class","enum","export","extends","import","super"].indexOf(e)>=0}function L(e){return["implements","interface","package","private","protected","public","static","yield","let"].indexOf(e)>=0}function A(e){return e==="eval"||e==="arguments"}function O(e){if(f&&L(e))return!0;switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return!1}}function M(){var e,t,n;t=!1,n=!1;while(l<p){e=a[l];if(n)e=a[l++],T(e)&&(n=!1,e==="\r"&&a[l]==="\n"&&++l,++c,h=l);else if(t)T(e)?(e==="\r"&&a[l+1]==="\n"&&++l,++c,++l,h=l,l>=p&&X({},s.UnexpectedToken,"ILLEGAL")):(e=a[l++],l>=p&&X({},s.UnexpectedToken,"ILLEGAL"),e==="*"&&(e=a[l],e==="/"&&(++l,t=!1)));else if(e==="/"){e=a[l+1];if(e==="/")l+=2,n=!0;else{if(e!=="*")break;l+=2,t=!0,l>=p&&X({},s.UnexpectedToken,"ILLEGAL")}}else if(x(e))++l;else{if(!T(e))break;++l,e==="\r"&&a[l]==="\n"&&++l,++c,h=l}}}function _(e){var t,n,r,i=0;n=e==="u"?4:2;for(t=0;t<n;++t){if(!(l<p&&E(a[l])))return"";r=a[l++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(i)}function D(){var e,t,n,r;e=t=a[l++],e==="\\"&&(a[l]!=="u"&&X({},s.UnexpectedToken,"ILLEGAL"),++l,n=l,e=_("u"),e?((e==="\\"||!N(e))&&X({},s.UnexpectedToken,"ILLEGAL"),t=e):(l=n,t="u"));while(l<p){e=a[l];if(!C(e))break;++l,t+=e,e==="\\"&&(t=t.substr(0,t.length-1),a[l]!=="u"&&X({},s.UnexpectedToken,"ILLEGAL"),++l,n=l,e=_("u"),e?((e==="\\"||!C(e))&&X({},s.UnexpectedToken,"ILLEGAL"),t+=e):(l=n,t+="u"))}return t}function P(){var e,t;e=l++;while(l<p){t=a[l];if(t==="\\")return l=e,D();if(!C(t))break;++l}return b(e,l)}function H(){var e,n,r;return e=l,N(a[l])||X({},s.UnexpectedToken,"ILLEGAL"),n=a[l]==="\\"?D():P(),n.length===1?r=t.Identifier:O(n)?r=t.Keyword:n==="null"?r=t.NullLiteral:n==="true"||n==="false"?r=t.BooleanLiteral:r=t.Identifier,{type:r,value:n,lineNumber:c,lineStart:h,range:[e,l]}}function B(){var e=l,n=a[l],r,i,o;if(n==="."||n==="("||n===")"||n===";"||n===","||n==="{"||n==="}"||n==="["||n==="]"||n===":"||n==="?"||n==="~")return++l,{type:t.Punctuator,value:n,lineNumber:c,lineStart:h,range:[e,l]};r=a[l+1],i=a[l+2],o=a[l+3];if(n===">"&&r===">"&&i===">"&&o==="=")return l+=4,{type:t.Punctuator,value:">>>=",lineNumber:c,lineStart:h,range:[e,l]};if(n==="="&&r==="="&&i==="=")return l+=3,{type:t.Punctuator,value:"===",lineNumber:c,lineStart:h,range:[e,l]};if(n==="!"&&r==="="&&i==="=")return l+=3,{type:t.Punctuator,value:"!==",lineNumber:c,lineStart:h,range:[e,l]};if(n===">"&&r===">"&&i===">")return l+=3,{type:t.Punctuator,value:">>>",lineNumber:c,lineStart:h,range:[e,l]};if(n==="<"&&r==="<"&&i==="=")return l+=3,{type:t.Punctuator,value:"<<=",lineNumber:c,lineStart:h,range:[e,l]};if(n===">"&&r===">"&&i==="=")return l+=3,{type:t.Punctuator,value:">>=",lineNumber:c,lineStart:h,range:[e,l]};if(n===r&&"+-<>&|".indexOf(n)>=0&&"+-<>&|".indexOf(r)>=0)return l+=2,{type:t.Punctuator,value:n+r,lineNumber:c,lineStart:h,range:[e,l]};if("<>=!+-*%&|^/".indexOf(n)>=0)return++l,r==="="&&(++l,n+=r),{type:t.Punctuator,value:n,lineNumber:c,lineStart:h,range:[e,l]};X({},s.UnexpectedToken,"ILLEGAL")}function j(){var e,n,r;r=a[l],y(w(r)||r===".","Numeric literal must start with a decimal digit or a decimal point"),n=l,e="";if(r!=="."){e=a[l++],r=a[l];if(e==="0"){if(r==="x"||r==="X"){e+=a[l++];while(l<p){r=a[l];if(!E(r))break;e+=a[l++]}return e.length<=2&&X({},s.UnexpectedToken,"ILLEGAL"),l<p&&(r=a[l],N(r)&&X({},s.UnexpectedToken,"ILLEGAL")),{type:t.NumericLiteral,value:parseInt(e,16),lineNumber:c,lineStart:h,range:[n,l]}}if(S(r)){e+=a[l++];while(l<p){r=a[l];if(!S(r))break;e+=a[l++]}return l<p&&(r=a[l],(N(r)||w(r))&&X({},s.UnexpectedToken,"ILLEGAL")),{type:t.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:c,lineStart:h,range:[n,l]}}w(r)&&X({},s.UnexpectedToken,"ILLEGAL")}while(l<p){r=a[l];if(!w(r))break;e+=a[l++]}}if(r==="."){e+=a[l++];while(l<p){r=a[l];if(!w(r))break;e+=a[l++]}}if(r==="e"||r==="E"){e+=a[l++],r=a[l];if(r==="+"||r==="-")e+=a[l++];r=a[l];if(w(r)){e+=a[l++];while(l<p){r=a[l];if(!w(r))break;e+=a[l++]}}else r="character "+r,l>=p&&(r="<end>"),X({},s.UnexpectedToken,"ILLEGAL")}return l<p&&(r=a[l],N(r)&&X({},s.UnexpectedToken,"ILLEGAL")),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:c,lineStart:h,range:[n,l]}}function F(){var e="",n,r,i,o,u,f,d=!1;n=a[l],y(n==="'"||n==='"',"String literal must starts with a quote"),r=l,++l;while(l<p){i=a[l++];if(i===n){n="";break}if(i==="\\"){i=a[l++];if(!T(i))switch(i){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"u":case"x":f=l,u=_(i),u?e+=u:(l=f,e+=i);break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+=" ";break;default:S(i)?(o="01234567".indexOf(i),o!==0&&(d=!0),l<p&&S(a[l])&&(d=!0,o=o*8+"01234567".indexOf(a[l++]),"0123".indexOf(i)>=0&&l<p&&S(a[l])&&(o=o*8+"01234567".indexOf(a[l++]))),e+=String.fromCharCode(o)):e+=i}else++c,i==="\r"&&a[l]==="\n"&&++l}else{if(T(i))break;e+=i}}return n!==""&&X({},s.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:e,octal:d,lineNumber:c,lineStart:h,range:[r,l]}}function I(){var e,t,n,r,i,o,u=!1,f,c=!1;v=null,M(),n=l,t=a[l],y(t==="/","Regular expression literal must start with a slash"),e=a[l++];while(l<p){t=a[l++],e+=t;if(u)t==="]"&&(u=!1);else if(t==="\\")t=a[l++],T(t)&&X({},s.UnterminatedRegExp),e+=t;else{if(t==="/"){c=!0;break}t==="["?u=!0:T(t)&&X({},s.UnterminatedRegExp)}}c||X({},s.UnterminatedRegExp),r=e.substr(1,e.length-2),i="";while(l<p){t=a[l];if(!C(t))break;++l;if(t==="\\"&&l<p){t=a[l];if(t==="u"){++l,f=l,t=_("u");if(t){i+=t;for(e+="\\u";f<l;++f)e+=a[f]}else l=f,i+="u",e+="\\u"}else e+="\\"}else i+=t,e+=t}try{o=new RegExp(r,i)}catch(h){X({},s.InvalidRegExp)}return z(),{literal:e,value:o,range:[n,l]}}function q(e){return e.type===t.Identifier||e.type===t.Keyword||e.type===t.BooleanLiteral||e.type===t.NullLiteral}function R(){var e;return M(),l>=p?{type:t.EOF,lineNumber:c,lineStart:h,range:[l,l]}:(e=a[l],N(e)?H():e==="."?w(a[l+1])?j():B():e==="'"||e==='"'?F():w(e)?j():B())}function U(){var e;return e=v,l=e.range[1],c=e.lineNumber,h=e.lineStart,v=R(),l=e.range[1],c=e.lineNumber,h=e.lineStart,e}function z(){var e,t,n;e=l,t=c,n=h,v=R(),l=e,c=t,h=n}function W(){var e,t,n,r;return e=l,t=c,n=h,M(),r=c!==t,l=e,c=t,h=n,r}function X(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return r[t]||""});throw typeof e.lineNumber=="number"?(n=new Error("Line "+e.lineNumber+": "+i),n.index=e.range[0],n.lineNumber=e.lineNumber,n.column=e.range[0]-h+1):(n=new Error("Line "+c+": "+i),n.index=l,n.lineNumber=c,n.column=l-h+1),n}function V(){try{X.apply(null,arguments)}catch(e){if(!g.errors)throw e;g.errors.push(e)}}function $(e){e.type===t.EOF&&X(e,s.UnexpectedEOS),e.type===t.NumericLiteral&&X(e,s.UnexpectedNumber),e.type===t.StringLiteral&&X(e,s.UnexpectedString),e.type===t.Identifier&&X(e,s.UnexpectedIdentifier);if(e.type===t.Keyword){if(k(e.value))X(e,s.UnexpectedReserved);else if(f&&L(e.value)){V(e,s.StrictReservedWord);return}X(e,s.UnexpectedToken,e.value)}X(e,s.UnexpectedToken,e.value)}function J(e){var n=U();(n.type!==t.Punctuator||n.value!==e)&&$(n)}function K(e){var n=U();(n.type!==t.Keyword||n.value!==e)&&$(n)}function Q(e){return v.type===t.Punctuator&&v.value===e}function G(e){return v.type===t.Keyword&&v.value===e}function Y(){var e;return v.type!==t.Punctuator?!1:(e=v.value,e==="="||e==="*="||e==="/="||e==="%="||e==="+="||e==="-="||e==="<<="||e===">>="||e===">>>="||e==="&="||e==="^="||e==="|=")}function Z(){var e;if(a[l]===";"){U();return}e=c,M();if(c!==e)return;if(Q(";")){U();return}v.type!==t.EOF&&!Q("}")&&$(v)}function et(e){return e.type===r.Identifier||e.type===r.MemberExpression}function tt(){var e=[];J("[");while(!Q("]"))Q(",")?(U(),e.push(null)):(e.push(Et()),Q("]")||J(","));return J("]"),d.createArrayExpression(e)}function nt(e,t){var n,r;return n=f,r=Jt(),t&&f&&A(e[0].name)&&V(t,s.StrictParamName),f=n,d.createFunctionExpression(null,e,[],r)}function rt(){var e=U();return e.type===t.StringLiteral||e.type===t.NumericLiteral?(f&&e.octal&&V(e,s.StrictOctalLiteral),d.createLiteral(e)):d.createIdentifier(e.value)}function it(){var e,n,r,i,s;e=v;if(e.type===t.Identifier)return r=rt(),e.value==="get"&&!Q(":")?(n=rt(),J("("),J(")"),i=nt([]),d.createProperty("get",n,i)):e.value==="set"&&!Q(":")?(n=rt(),J("("),e=v,e.type!==t.Identifier&&$(U()),s=[Nt()],J(")"),i=nt(s,e),d.createProperty("set",n,i)):(J(":"),i=Et(),d.createProperty("init",r,i));if(e.type!==t.EOF&&e.type!==t.Punctuator)return n=rt(),J(":"),i=Et(),d.createProperty("init",n,i);$(e)}function st(){var e=[],t,n,o,u={},a=String;J("{");while(!Q("}"))t=it(),t.key.type===r.Identifier?n=t.key.name:n=a(t.key.value),o=t.kind==="init"?i.Data:t.kind==="get"?i.Get:i.Set,Object.prototype.hasOwnProperty.call(u,n)?(u[n]===i.Data?f&&o===i.Data?V({},s.StrictDuplicateProperty):o!==i.Data&&V({},s.AccessorDataProperty):o===i.Data?V({},s.AccessorDataProperty):u[n]&o&&V({},s.AccessorGetSet),u[n]|=o):u[n]=o,e.push(t),Q("}")||J(",");return J("}"),d.createObjectExpression(e)}function ot(){var e;return J("("),e=St(),J(")"),e}function ut(){var e,n;e=v.type;if(e===t.Identifier)return d.createIdentifier(U().value);if(e===t.StringLiteral||e===t.NumericLiteral)return f&&v.octal&&V(v,s.StrictOctalLiteral),d.createLiteral(U());if(e===t.Keyword){if(G("this"))return U(),d.createThisExpression();if(G("function"))return Gt()}return e===t.BooleanLiteral?(n=U(),n.value=n.value==="true",d.createLiteral(n)):e===t.NullLiteral?(n=U(),n.value=null,d.createLiteral(n)):Q("[")?tt():Q("{")?st():Q("(")?ot():Q("/")||Q("/=")?d.createLiteral(I()):$(U())}function at(){var e=[];J("(");if(!Q(")"))while(l<p){e.push(Et());if(Q(")"))break;J(",")}return J(")"),e}function ft(){var e=U();return q(e)||$(e),d.createIdentifier(e.value)}function lt(){return J("."),ft()}function ct(){var e;return J("["),e=St(),J("]"),e}function ht(){var e,t;return K("new"),e=dt(),t=Q("(")?at():[],d.createNewExpression(e,t)}function pt(){var e,t,n;e=G("new")?ht():ut();while(Q(".")||Q("[")||Q("("))Q("(")?(t=at(),e=d.createCallExpression(e,t)):Q("[")?(n=ct(),e=d.createMemberExpression("[",e,n)):(n=lt(),e=d.createMemberExpression(".",e,n));return e}function dt(){var e,t;e=G("new")?ht():ut();while(Q(".")||Q("["))Q("[")?(t=ct(),e=d.createMemberExpression("[",e,t)):(t=lt(),e=d.createMemberExpression(".",e,t));return e}function vt(){var e=pt(),n;return v.type!==t.Punctuator?e:((Q("++")||Q("--"))&&!W()&&(f&&e.type===r.Identifier&&A(e.name)&&V({},s.StrictLHSPostfix),et(e)||X({},s.InvalidLHSInAssignment),n=U(),e=d.createPostfixExpression(n.value,e)),e)}function mt(){var e,n;return v.type!==t.Punctuator&&v.type!==t.Keyword?vt():Q("++")||Q("--")?(e=U(),n=mt(),f&&n.type===r.Identifier&&A(n.name)&&V({},s.StrictLHSPrefix),et(n)||X({},s.InvalidLHSInAssignment),d.createUnaryExpression(e.value,n)):Q("+")||Q("-")||Q("~")||Q("!")?(e=U(),n=mt(),d.createUnaryExpression(e.value,n)):G("delete")||G("void")||G("typeof")?(e=U(),n=mt(),n=d.createUnaryExpression(e.value,n),f&&n.operator==="delete"&&n.argument.type===r.Identifier&&V({},s.StrictDelete),n):vt()}function gt(e,n){var r=0;if(e.type!==t.Punctuator&&e.type!==t.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=n?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11;break;default:}return r}function yt(e){var t=e.pop(),n=e.pop().value,r=e.pop();n==="||"||n==="&&"?e.push(d.createLogicalExpression(n,r,t)):e.push(d.createBinaryExpression(n,r,t))}function bt(){var e,t,n,r,i;r=m.allowIn,m.allowIn=!0,e=mt(),t=v,n=gt(t,r);if(n===0)return e;t.prec=n,U(),i=[e,t,mt()];while((n=gt(v,r))>0){while(i.length>2&&n<=i[i.length-2].prec)yt(i);t=U(),t.prec=n,i.push(t),i.push(mt())}while(i.length>1)yt(i);return m.allowIn=r,i[0]}function wt(){var e,t,n,r;return e=bt(),Q("?")&&(U(),t=m.allowIn,m.allowIn=!0,n=Et(),m.allowIn=t,J(":"),r=Et(),e=d.createConditionalExpression(e,n,r)),e}function Et(){var e,t,n;return e=v,t=wt(),Y()?(et(t)||X({},s.InvalidLHSInAssignment),f&&t.type===r.Identifier&&A(t.name)&&V(e,s.StrictLHSAssignment),e=U(),n=Et(),d.createAssignmentExpression(e.value,t,n)):t}function St(){var e=Et();if(Q(",")){e=d.createSequenceExpression([e]);while(l<p){if(!Q(","))break;U(),e.expressions.push(Et())}}return e}function xt(){var e=[],t;while(l<p){if(Q("}"))break;t=Yt();if(typeof t=="undefined")break;e.push(t)}return e}function Tt(){var e;return J("{"),e=xt(),J("}"),d.createBlockStatement(e)}function Nt(){var e=U();return e.type!==t.Identifier&&$(e),d.createIdentifier(e.value)}function Ct(e){var t=Nt(),n=null;return f&&A(t.name)&&V({},s.StrictVarName),e==="const"?(J("="),n=Et()):Q("=")&&(U(),n=Et()),d.createVariableDeclarator(t,n)}function kt(e){var t=[];while(l<p){t.push(Ct(e));if(!Q(","))break;U()}return t}function Lt(){var e;return K("var"),e=kt(),Z(),d.createVariableDeclaration(e,"var")}function At(e){var t;return K(e),t=kt(e),Z(),d.createVariableDeclaration(t,e)}function Ot(){return J(";"),d.createEmptyStatement()}function Mt(){var e=St();return Z(),d.createExpressionStatement(e)}function _t(){var e,t,n;return K("if"),J("("),e=St(),J(")"),t=$t(),G("else")?(U(),n=$t()):n=null,d.createIfStatement(e,t,n)}function Dt(){var e,t,n;return K("do"),n=m.inIteration,m.inIteration=!0,e=$t(),m.inIteration=n,K("while"),J("("),t=St(),J(")"),Q(";")&&U(),d.createDoWhileStatement(e,t)}function Pt(){var e,t,n;return K("while"),J("("),e=St(),J(")"),n=m.inIteration,m.inIteration=!0,t=$t(),m.inIteration=n,d.createWhileStatement(e,t)}function Ht(){var e=U(),t=kt();return d.createVariableDeclaration(t,e.value)}function Bt(){var e,t,n,r,i,o,u;return e=t=n=null,K("for"),J("("),Q(";")?U():(G("var")||G("let")?(m.allowIn=!1,e=Ht(),m.allowIn=!0,e.declarations.length===1&&G("in")&&(U(),r=e,i=St(),e=null)):(m.allowIn=!1,e=St(),m.allowIn=!0,G("in")&&(et(e)||X({},s.InvalidLHSInForIn),U(),r=e,i=St(),e=null)),typeof r=="undefined"&&J(";")),typeof r=="undefined"&&(Q(";")||(t=St()),J(";"),Q(")")||(n=St())),J(")"),u=m.inIteration,m.inIteration=!0,o=$t(),m.inIteration=u,typeof r=="undefined"?d.createForStatement(e,t,n,o):d.createForInStatement(r,i,o)}function jt(){var e=null;return K("continue"),a[l]===";"?(U(),m.inIteration||X({},s.IllegalContinue),d.createContinueStatement(null)):W()?(m.inIteration||X({},s.IllegalContinue),d.createContinueStatement(null)):(v.type===t.Identifier&&(e=Nt(),Object.prototype.hasOwnProperty.call(m.labelSet,e.name)||X({},s.UnknownLabel,e.name)),Z(),e===null&&!m.inIteration&&X({},s.IllegalContinue),d.createContinueStatement(e))}function Ft(){var e=null;return K("break"),a[l]===";"?(U(),!m.inIteration&&!m.inSwitch&&X({},s.IllegalBreak),d.createBreakStatement(null)):W()?(!m.inIteration&&!m.inSwitch&&X({},s.IllegalBreak),d.createBreakStatement(null)):(v.type===t.Identifier&&(e=Nt(),Object.prototype.hasOwnProperty.call(m.labelSet,e.name)||X({},s.UnknownLabel,e.name)),Z(),e===null&&!m.inIteration&&!m.inSwitch&&X({},s.IllegalBreak),d.createBreakStatement(e))}function It(){var e=null;return K("return"),m.inFunctionBody||V({},s.IllegalReturn),a[l]===" "&&N(a[l+1])?(e=St(),Z(),d.createReturnStatement(e)):W()?d.createReturnStatement(null):(Q(";")||!Q("}")&&v.type!==t.EOF&&(e=St()),Z(),d.createReturnStatement(e))}function qt(){var e,t;return f&&V({},s.StrictModeWith),K("with"),J("("),e=St(),J(")"),t=$t(),d.createWithStatement(e,t)}function Rt(){var e,t=[],n;G("default")?(U(),e=null):(K("case"),e=St()),J(":");while(l<p){if(Q("}")||G("default")||G("case"))break;n=$t();if(typeof n=="undefined")break;t.push(n)}return d.createSwitchCase(e,t)}function Ut(){var e,t,n,r,i;K("switch"),J("("),e=St(),J(")"),J("{");if(Q("}"))return U(),d.createSwitchStatement(e);t=[],r=m.inSwitch,m.inSwitch=!0,i=!1;while(l<p){if(Q("}"))break;n=Rt(),n.test===null&&(i&&X({},s.MultipleDefaultsInSwitch),i=!0),t.push(n)}return m.inSwitch=r,J("}"),d.createSwitchStatement(e,t)}function zt(){var e;return K("throw"),W()&&X({},s.NewlineAfterThrow),e=St(),Z(),d.createThrowStatement(e)}function Wt(){var e,t;return K("catch"),J("("),Q(")")||(e=St(),f&&e.type===r.Identifier&&A(e.name)&&V({},s.StrictCatchVariable)),J(")"),t=Tt(),d.createCatchClause(e,t)}function Xt(){var e,t=[],n=null;return K("try"),e=Tt(),G("catch")&&t.push(Wt()),G("finally")&&(U(),n=Tt()),t.length===0&&!n&&X({},s.NoCatchOrFinally),d.createTryStatement(e,[],t,n)}function Vt(){return K("debugger"),Z(),d.createDebuggerStatement()}function $t(){var e=v.type,n,i;e===t.EOF&&$(v);if(e===t.Punctuator)switch(v.value){case";":return Ot();case"{":return Tt();case"(":return Mt();default:}if(e===t.Keyword)switch(v.value){case"break":return Ft();case"continue":return jt();case"debugger":return Vt();case"do":return Dt();case"for":return Bt();case"function":return Qt();case"if":return _t();case"return":return It();case"switch":return Ut();case"throw":return zt();case"try":return Xt();case"var":return Lt();case"while":return Pt();case"with":return qt();default:}return n=St(),n.type===r.Identifier&&Q(":")?(U(),Object.prototype.hasOwnProperty.call(m.labelSet,n.name)&&X({},s.Redeclaration,"Label",n.name),m.labelSet[n.name]=!0,i=$t(),delete m.labelSet[n.name],d.createLabeledStatement(n,i)):(Z(),d.createExpressionStatement(n))}function Jt(){var e,n=[],i,o,u,a,c,h,g;J("{");while(l<p){if(v.type!==t.StringLiteral)break;i=v,e=Yt(),n.push(e);if(e.expression.type!==r.Literal)break;o=b(i.range[0]+1,i.range[1]-1),o==="use strict"?(f=!0,u&&V(u,s.StrictOctalLiteral)):!u&&i.octal&&(u=i)}a=m.labelSet,c=m.inIteration,h=m.inSwitch,g=m.inFunctionBody,m.labelSet={},m.inIteration=!1,m.inSwitch=!1,m.inFunctionBody=!0;while(l<p){if(Q("}"))break;e=Yt();if(typeof e=="undefined")break;n.push(e)}return J("}"),m.labelSet=a,m.inIteration=c,m.inSwitch=h,m.inFunctionBody=g,d.createBlockStatement(n)}function Kt(e){var t,n=[],r,i,o,u;J("(");if(!Q(")")){o={};while(l<p){r=v,t=Nt(),f?(A(r.value)&&(i=r,u=s.StrictParamName),Object.prototype.hasOwnProperty.call(o,r.value)&&(i=r,u=s.StrictParamDupe)):e||(A(r.value)?(e=r,u=s.StrictParamName):L(r.value)?(e=r,u=s.StrictReservedWord):Object.prototype.hasOwnProperty.call(o,r.value)&&(e=r,u=s.StrictParamDupe)),n.push(t),o[t.name]=!0;if(Q(")"))break;J(",")}}return J(")"),{params:n,stricted:i,firstRestricted:e,message:u}}function Qt(){var e,t=[],n,r,i,o,u,a,l;return K("function"),r=v,e=Nt(),f?A(r.value)&&V(r,s.StrictFunctionName):A(r.value)?(u=r,a=s.StrictFunctionName):L(r.value)&&(u=r,a=s.StrictReservedWord),o=Kt(u),t=o.params,i=o.stricted,u=o.firstRestricted,o.message&&(a=o.message),l=f,n=Jt(),f&&u&&X(u,a),f&&i&&V(i,a),f=l,d.createFunctionDeclaration(e,t,[],n)}function Gt(){var e,t=null,n,r,i,o,u=[],a,l;return K("function"),Q("(")||(e=v,t=Nt(),f?A(e.value)&&V(e,s.StrictFunctionName):A(e.value)?(r=e,i=s.StrictFunctionName):L(e.value)&&(r=e,i=s.StrictReservedWord)),o=Kt(r),u=o.params,n=o.stricted,r=o.firstRestricted,o.message&&(i=o.message),l=f,a=Jt(),f&&r&&X(r,i),f&&n&&V(n,i),f=l,d.createFunctionExpression(t,u,[],a)}function Yt(){if(v.type===t.Keyword)switch(v.value){case"const":case"let":return At(v.value);case"function":return Qt();default:return $t()}if(v.type!==t.EOF)return $t()}function Zt(){var e,n=[],i,o,u;while(l<p){i=v;if(i.type!==t.StringLiteral)break;e=Yt(),n.push(e);if(e.expression.type!==r.Literal)break;o=b(i.range[0]+1,i.range[1]-1),o==="use strict"?(f=!0,u&&V(u,s.StrictOctalLiteral)):!u&&i.octal&&(u=i)}while(l<p){e=Yt();if(typeof e=="undefined")break;n.push(e)}return n}function en(){var e;return f=!1,z(),e=Zt(),d.createProgram(e)}function tn(e,t,n,r,i){y(typeof n=="number","Comment must have valid position");if(g.comments.length>0&&g.comments[g.comments.length-1].range[1]>n)return;g.comments.push({type:e,value:t,range:[n,r],loc:i})}function nn(){var e,t,n,r,i,o;e="",i=!1,o=!1;while(l<p){t=a[l];if(o)t=a[l++],T(t)?(n.end={line:c,column:l-h-1},o=!1,tn("Line",e,r,l-1,n),t==="\r"&&a[l]==="\n"&&++l,++c,h=l,e=""):l>=p?(o=!1,e+=t,n.end={line:c,column:p-h},tn("Line",e,r,p,n)):e+=t;else if(i)T(t)?(t==="\r"&&a[l+1]==="\n"?(++l,e+="\r\n"):e+=t,++c,++l,h=l,l>=p&&X({},s.UnexpectedToken,"ILLEGAL")):(t=a[l++],l>=p&&X({},s.UnexpectedToken,"ILLEGAL"),e+=t,t==="*"&&(t=a[l],t==="/"&&(e=e.substr(0,e.length-1),i=!1,++l,n.end={line:c,column:l-h},tn("Block",e,r,l,n),e="")));else if(t==="/"){t=a[l+1];if(t==="/")n={start:{line:c,column:l-h}},r=l,l+=2,o=!0,l>=p&&(n.end={line:c,column:l-h},o=!1,tn("Line",e,r,l,n));else{if(t!=="*")break;r=l,l+=2,i=!0,n={start:{line:c,column:l-h-2}},l>=p&&X({},s.UnexpectedToken,"ILLEGAL")}}else if(x(t))++l;else{if(!T(t))break;++l,t==="\r"&&a[l]==="\n"&&++l,++c,h=l}}}function rn(){var e,t,n,r=[];for(e=0;e<g.comments.length;++e)t=g.comments[e],n={type:t.type,value:t.value},g.range&&(n.range=t.range),g.loc&&(n.loc=t.loc),r.push(n);g.comments=r}function sn(){var e,r,i,s,o;return M(),e=l,r={start:{line:c,column:l-h}},i=g.advance(),r.end={line:c,column:l-h},i.type!==t.EOF&&(s=[i.range[0],i.range[1]],o=b(i.range[0],i.range[1]),g.tokens.push({type:n[i.type],value:o,range:s,loc:r})),i}function on(){var e,t,n,r;return M(),e=l,t={start:{line:c,column:l-h}},n=g.scanRegExp(),t.end={line:c,column:l-h},g.tokens.length>0&&(r=g.tokens[g.tokens.length-1],r.range[0]===e&&r.type==="Punctuator"&&(r.value==="/"||r.value==="/=")&&g.tokens.pop()),g.tokens.push({type:"RegularExpression",value:n.literal,range:[e,l],loc:t}),n}function un(){var e,t,n,r=[];for(e=0;e<g.tokens.length;++e)t=g.tokens[e],n={type:t.type,value:t.value},g.range&&(n.range=t.range),g.loc&&(n.loc=t.loc),r.push(n);g.tokens=r}function an(){var e={};return e.range=[l,l],e.loc={start:{line:c,column:l-h},end:{line:c,column:l-h}},e.end=function(){this.range[1]=l,this.loc.end.line=c,this.loc.end.column=l-h},e.applyGroup=function(e){g.range&&(e.groupRange=[this.range[0],this.range[1]]),g.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){g.range&&(e.range=[this.range[0],this.range[1]]),g.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function fn(){var e,t;return M(),e=an(),J("("),t=St(),J(")"),e.end(),e.applyGroup(t),t}function ln(){var e,t,n;M(),e=an(),t=G("new")?ht():ut();while(Q(".")||Q("["))Q("[")?(n=ct(),t=d.createMemberExpression("[",t,n),e.end(),e.apply(t)):(n=lt(),t=d.createMemberExpression(".",t,n),e.end(),e.apply(t));return t}function cn(){var e,t,n,r;M(),e=an(),t=G("new")?ht():ut();while(Q(".")||Q("[")||Q("("))Q("(")?(n=at(),t=d.createCallExpression(t,n),e.end(),e.apply(t)):Q("[")?(r=ct(),t=d.createMemberExpression("[",t,r),e.end(),e.apply(t)):(r=lt(),t=d.createMemberExpression(".",t,r),e.end(),e.apply(t));return t}function hn(e){var t,n,r;t=Object.prototype.toString.apply(e)==="[object Array]"?[]:{};for(n in e)e.hasOwnProperty(n)&&n!=="groupRange"&&n!=="groupLoc"&&(r=e[n],r===null||typeof r!="object"||r instanceof RegExp?t[n]=r:t[n]=hn(r));return t}function pn(e,t){return function(n){function i(e){return e.type===r.LogicalExpression||e.type===r.BinaryExpression}function s(n){var r,o;i(n.left)&&s(n.left),i(n.right)&&s(n.right),e&&(n.left.groupRange||n.right.groupRange?(r=n.left.groupRange?n.left.groupRange[0]:n.left.range[0],o=n.right.groupRange?n.right.groupRange[1]:n.right.range[1],n.range=[r,o]):typeof n.range=="undefined"&&(r=n.left.range[0],o=n.right.range[1],n.range=[r,o])),t&&(n.left.groupLoc||n.right.groupLoc?(r=n.left.groupLoc?n.left.groupLoc.start:n.left.loc.start,o=n.right.groupLoc?n.right.groupLoc.end:n.right.loc.end,n.loc={start:r,end:o}):typeof n.loc=="undefined"&&(n.loc={start:n.left.loc.start,end:n.right.loc.end}))}return function(){var r,o;return M(),r=an(),o=n.apply(null,arguments),r.end(),e&&typeof o.range=="undefined"&&r.apply(o),t&&typeof o.loc=="undefined"&&r.apply(o),i(o)&&s(o),o}}}function dn(){var e;g.comments&&(g.skipComment=M,M=nn);if(g.range||g.loc)g.parseGroupExpression=ot,g.parseLeftHandSideExpression=dt,g.parseLeftHandSideExpressionAllowCall=pt,ot=fn,dt=ln,pt=cn,e=pn(g.range,g.loc),g.parseAssignmentExpression=Et,g.parseBinaryExpression=bt,g.parseBlock=Tt,g.parseFunctionSourceElements=Jt,g.parseCatchClause=Wt,g.parseComputedMember=ct,g.parseConditionalExpression=wt,g.parseConstLetDeclaration=At,g.parseExpression=St,g.parseForVariableDeclaration=Ht,g.parseFunctionDeclaration=Qt,g.parseFunctionExpression=Gt,g.parseNewExpression=ht,g.parseNonComputedProperty=ft,g.parseObjectProperty=it,g.parseObjectPropertyKey=rt,g.parsePostfixExpression=vt,g.parsePrimaryExpression=ut,g.parseProgram=en,g.parsePropertyFunction=nt,g.parseStatement=$t,g.parseSwitchCase=Rt,g.parseUnaryExpression=mt,g.parseVariableDeclaration=Ct,g.parseVariableIdentifier=Nt,Et=e(g.parseAssignmentExpression),bt=e(g.parseBinaryExpression),Tt=e(g.parseBlock),Jt=e(g.parseFunctionSourceElements),Wt=e(g.parseCatchClause),ct=e(g.parseComputedMember),wt=e(g.parseConditionalExpression),At=e(g.parseConstLetDeclaration),St=e(g.parseExpression),Ht=e(g.parseForVariableDeclaration),Qt=e(g.parseFunctionDeclaration),Gt=e(g.parseFunctionExpression),dt=e(dt),ht=e(g.parseNewExpression),ft=e(g.parseNonComputedProperty),it=e(g.parseObjectProperty),rt=e(g.parseObjectPropertyKey),vt=e(g.parsePostfixExpression),ut=e(g.parsePrimaryExpression),en=e(g.parseProgram),nt=e(g.parsePropertyFunction),$t=e(g.parseStatement),Rt=e(g.parseSwitchCase),mt=e(g.parseUnaryExpression),Ct=e(g.parseVariableDeclaration),Nt=e(g.parseVariableIdentifier);typeof g.tokens!="undefined"&&(g.advance=R,g.scanRegExp=I,R=sn,I=on)}function vn(){typeof g.skipComment=="function"&&(M=g.skipComment);if(g.range||g.loc)Et=g.parseAssignmentExpression,bt=g.parseBinaryExpression,Tt=g.parseBlock,Jt=g.parseFunctionSourceElements,Wt=g.parseCatchClause,ct=g.parseComputedMember,wt=g.parseConditionalExpression,At=g.parseConstLetDeclaration,St=g.parseExpression,Ht=g.parseForVariableDeclaration,Qt=g.parseFunctionDeclaration,Gt=g.parseFunctionExpression,ot=g.parseGroupExpression,dt=g.parseLeftHandSideExpression,pt=g.parseLeftHandSideExpressionAllowCall,ht=g.parseNewExpression,ft=g.parseNonComputedProperty,it=g.parseObjectProperty,rt=g.parseObjectPropertyKey,ut=g.parsePrimaryExpression,vt=g.parsePostfixExpression,en=g.parseProgram,nt=g.parsePropertyFunction,$t=g.parseStatement,Rt=g.parseSwitchCase,mt=g.parseUnaryExpression,Ct=g.parseVariableDeclaration,Nt=g.parseVariableIdentifier;typeof g.scanRegExp=="function"&&(R=g.advance,I=g.scanRegExp)}function mn(e){var t=e.length,n=[],r;for(r=0;r<t;++r)n[r]=e.charAt(r);return n}function gn(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}function yn(e,t){var n,r;r=String,typeof e!="string"&&!(e instanceof String)&&(e=r(e)),d=u,a=e,l=0,c=a.length>0?1:0,h=0,p=a.length,v=null,m={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},g={},typeof t!="undefined"&&(g.range=typeof t.range=="boolean"&&t.range,g.loc=typeof t.loc=="boolean"&&t.loc,typeof t.tokens=="boolean"&&t.tokens&&(g.tokens=[]),typeof t.comment=="boolean"&&t.comment&&(g.comments=[]),typeof t.tolerant=="boolean"&&t.tolerant&&(g.errors=[])),p>0&&typeof a[0]=="undefined"&&(e instanceof String&&(a=e.valueOf()),typeof a[0]=="undefined"&&(a=mn(e))),dn();try{n=en(),typeof g.comments!="undefined"&&(rn(),n.comments=g.comments),typeof g.tokens!="undefined"&&(un(),n.tokens=g.tokens),typeof g.errors!="undefined"&&(n.errors=g.errors);if(g.range||g.loc)n.body=hn(n.body)}catch(i){throw i}finally{vn(),g={}}return n}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g;t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},n={},n[t.BooleanLiteral]="Boolean",n[t.EOF]="<end>",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",r={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},i={Data:1,Get:2,Set:4},s={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved
:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},o={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA--zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0--_-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},typeof "esprima"[0]=="undefined"&&(b=function(t,n){return a.slice(t,n).join("")}),u={name:"SyntaxTree",createArrayExpression:function(e){return{type:r.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:r.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:r.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:r.BlockStatement,body:e}},createBreakStatement:function(e){return{type:r.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:r.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:r.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:r.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:r.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:r.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:r.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:r.EmptyStatement}},createExpressionStatement:function(e){return{type:r.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,i){return{type:r.ForStatement,init:e,test:t,update:n,body:i}},createForInStatement:function(e,t,n){return{type:r.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,i){return{type:r.FunctionDeclaration,id:e,params:t,defaults:n,body:i,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,i){return{type:r.FunctionExpression,id:e,params:t,defaults:n,body:i,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:r.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:r.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:r.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:r.Literal,value:e.value,raw:b(e.range[0],e.range[1])}},createLogicalExpression:function(e,t,n){return{type:r.LogicalExpression,operator:e,left:t,right:n}},createMemberExpression:function(e,t,n){return{type:r.MemberExpression,computed:e==="[",object:t,property:n}},createNewExpression:function(e,t){return{type:r.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:r.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:r.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:r.Program,body:e}},createProperty:function(e,t,n){return{type:r.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:r.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:r.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:r.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:r.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:r.ThisExpression}},createThrowStatement:function(e){return{type:r.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,i){return{type:r.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:i}},createUnaryExpression:function(e,t){return e==="++"||e==="--"?{type:r.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:r.UnaryExpression,operator:e,argument:t}},createVariableDeclaration:function(e,t){return{type:r.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:r.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:r.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:r.WithStatement,object:e,body:t}}},e.version="1.1.0-dev",e.parse=yn,e.Syntax=function(){var e,t={};typeof Object.create=="function"&&(t=Object.create(null));for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return typeof Object.freeze=="function"&&Object.freeze(t),t}()})(typeof exports=="undefined"?window.esprima={}:exports);