/*
 * Copyright (c) 2010, Ajax.org B.V.
 * All rights reserved.
 *
 * 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.
 *     * Neither the name of Ajax.org B.V. nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * 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 AJAX.ORG B.V. 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.
 */
"no use strict";var console={log:function(a){postMessage({type:"log",data:a});}};var window={console:console};var normalizeModule=function(e,a){if(a.indexOf("!")!==-1){var d=a.split("!");
return normalizeModule(e,d[0])+"!"+normalizeModule(e,d[1]);}if(a.charAt(0)=="."){var c=e.split("/").slice(0,-1).join("/");var a=c+"/"+a;while(a.indexOf(".")!==-1&&b!=a){var b=a;
var a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"");}}return a;};var require=function(e,d){var d=normalizeModule(e,d);var a=require.modules[d];if(a){if(!a.initialized){a.initialized=true;
a.exports=a.factory().exports;}return a.exports;}var c=d.split("/");c[0]=require.tlns[c[0]]||c[0];var b=c.join("/")+".js";require.id=d;importScripts(b);
return require(e,d);};require.modules={};require.tlns={};var define=function(d,c,a){if(arguments.length==2){a=c;if(typeof d!="string"){c=d;d=require.id;
}}else{if(arguments.length==1){a=d;d=require.id;}}if(d.indexOf("text!")===0){return;}var b=function(f,e){return require(d,f,e);};require.modules[d]={factory:function(){var e={exports:{}};
var f=a(b,e.exports,e);if(f){e.exports=f;}return e;}};};function initBaseUrls(a){require.tlns=a;}function initSender(){var c=require(null,"ace/lib/event_emitter").EventEmitter;
var b=require(null,"ace/lib/oop");var a=function(){};(function(){b.implement(this,c);this.callback=function(e,d){postMessage({type:"call",id:d,data:e});
};this.emit=function(d,e){postMessage({type:"event",name:d,data:e});};}).call(a.prototype);return new a();}var main;var sender;onmessage=function(b){var c=b.data;
if(c.command){main[c.command].apply(main,c.args);}else{if(c.init){initBaseUrls(c.tlns);require(null,"ace/lib/fixoldbrowsers");sender=initSender();var a=require(null,c.module)[c.classname];
main=new a(sender);}else{if(c.event&&sender){sender._emit(c.event,c.data);}}}};
/*!
    Copyright (c) 2009, 280 North Inc. http://280north.com/
    MIT License. http://github.com/280north/narwhal/blob/master/README.md
*/
define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(b,a,c){b("./regexp");
b("./es5-shim");});define("ace/lib/regexp",["require","exports","module"],function(b,a,c){var h={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},f=h.exec.call(/()??/,"")[1]===undefined,e=function(){var i=/^/g;
h.test.call(i,"");return !i.lastIndex;}();if(e&&f){return;}RegExp.prototype.exec=function(n){var l=h.exec.apply(this,arguments),k,j;if(typeof(n)=="string"&&l){if(!f&&l.length>1&&d(l,"")>-1){j=RegExp(this.source,h.replace.call(g(this),"g",""));
h.replace.call(n.slice(l.index),j,function(){for(var o=1;o<arguments.length-2;o++){if(arguments[o]===undefined){l[o]=undefined;}}});}if(this._xregexp&&this._xregexp.captureNames){for(var m=1;
m<l.length;m++){k=this._xregexp.captureNames[m-1];if(k){l[k]=l[m];}}}if(!e&&this.global&&!l[0].length&&(this.lastIndex>l.index)){this.lastIndex--;}}return l;
};if(!e){RegExp.prototype.test=function(j){var i=h.exec.call(this,j);if(i&&this.global&&!i[0].length&&(this.lastIndex>i.index)){this.lastIndex--;}return !!i;
};}function g(i){return(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":"");}function d(m,k,l){if(Array.prototype.indexOf){return m.indexOf(k,l);
}for(var j=l||0;j<m.length;j++){if(m[j]===k){return j;}}return -1;}});
/*!
    Copyright (c) 2009, 280 North Inc. http://280north.com/
    MIT License. http://github.com/280north/narwhal/blob/master/README.md
*/
define("ace/lib/es5-shim",["require","exports","module"],function(g,ad,e){if(!Function.prototype.bind){Function.prototype.bind=function i(al){var am=this;
if(typeof am!="function"){throw new TypeError();}var aj=u.call(arguments,1);var ak=function(){if(this instanceof ak){var ap=function(){};ap.prototype=am.prototype;
var ao=new ap;var an=am.apply(ao,aj.concat(u.call(arguments)));if(an!==null&&Object(an)===an){return an;}return ao;}else{return am.apply(al,aj.concat(u.call(arguments)));
}};return ak;};}var c=Function.prototype.call;var K=Array.prototype;var z=Object.prototype;var u=K.slice;var h=c.bind(z.toString);var T=c.bind(z.hasOwnProperty);
var ab;var ah;var aa;var af;var q;if((q=T(z,"__defineGetter__"))){ab=c.bind(z.__defineGetter__);ah=c.bind(z.__defineSetter__);aa=c.bind(z.__lookupGetter__);
af=c.bind(z.__lookupSetter__);}if(!Array.isArray){Array.isArray=function C(aj){return h(aj)=="[object Array]";};}if(!Array.prototype.forEach){Array.prototype.forEach=function d(aj){var ak=L(this),am=arguments[1],al=0,an=ak.length>>>0;
if(h(aj)!="[object Function]"){throw new TypeError();}while(al<an){if(al in ak){aj.call(am,ak[al],al,ak);}al++;}};}if(!Array.prototype.map){Array.prototype.map=function J(ak){var al=L(this),ao=al.length>>>0,aj=Array(ao),an=arguments[1];
if(h(ak)!="[object Function]"){throw new TypeError();}for(var am=0;am<ao;am++){if(am in al){aj[am]=ak.call(an,al[am],am,al);}}return aj;};}if(!Array.prototype.filter){Array.prototype.filter=function Q(ak){var al=L(this),ao=al.length>>>0,aj=[],an=arguments[1];
if(h(ak)!="[object Function]"){throw new TypeError();}for(var am=0;am<ao;am++){if(am in al&&ak.call(an,al[am],am,al)){aj.push(al[am]);}}return aj;};}if(!Array.prototype.every){Array.prototype.every=function O(aj){var ak=L(this),an=ak.length>>>0,am=arguments[1];
if(h(aj)!="[object Function]"){throw new TypeError();}for(var al=0;al<an;al++){if(al in ak&&!aj.call(am,ak[al],al,ak)){return false;}}return true;};}if(!Array.prototype.some){Array.prototype.some=function X(aj){var ak=L(this),an=ak.length>>>0,am=arguments[1];
if(h(aj)!="[object Function]"){throw new TypeError();}for(var al=0;al<an;al++){if(al in ak&&aj.call(am,ak[al],al,ak)){return true;}}return false;};}if(!Array.prototype.reduce){Array.prototype.reduce=function r(ak){var al=L(this),an=al.length>>>0;
if(h(ak)!="[object Function]"){throw new TypeError();}if(!an&&arguments.length==1){throw new TypeError();}var am=0;var aj;if(arguments.length>=2){aj=arguments[1];
}else{do{if(am in al){aj=al[am++];break;}if(++am>=an){throw new TypeError();}}while(true);}for(;am<an;am++){if(am in al){aj=ak.call(void 0,aj,al[am],am,al);
}}return aj;};}if(!Array.prototype.reduceRight){Array.prototype.reduceRight=function B(ak){var al=L(this),an=al.length>>>0;if(h(ak)!="[object Function]"){throw new TypeError();
}if(!an&&arguments.length==1){throw new TypeError();}var aj,am=an-1;if(arguments.length>=2){aj=arguments[1];}else{do{if(am in al){aj=al[am--];break;}if(--am<0){throw new TypeError();
}}while(true);}do{if(am in this){aj=ak.call(void 0,aj,al[am],am,al);}}while(am--);return aj;};}if(!Array.prototype.indexOf){Array.prototype.indexOf=function w(ak){var aj=L(this),am=aj.length>>>0;
if(!am){return -1;}var al=0;if(arguments.length>1){al=U(arguments[1]);}al=al>=0?al:Math.max(0,am+al);for(;al<am;al++){if(al in aj&&aj[al]===ak){return al;
}}return -1;};}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function S(ak){var aj=L(this),am=aj.length>>>0;if(!am){return -1;}var al=am-1;
if(arguments.length>1){al=Math.min(al,U(arguments[1]));}al=al>=0?al:am-Math.abs(al);for(;al>=0;al--){if(al in aj&&ak===aj[al]){return al;}}return -1;};
}if(!Object.getPrototypeOf){Object.getPrototypeOf=function ae(aj){return aj.__proto__||(aj.constructor?aj.constructor.prototype:z);};}if(!Object.getOwnPropertyDescriptor){var b="Object.getOwnPropertyDescriptor called on a non-object: ";
Object.getOwnPropertyDescriptor=function A(al,am){if((typeof al!="object"&&typeof al!="function")||al===null){throw new TypeError(b+al);}if(!T(al,am)){return;
}var an,aj,ao;an={enumerable:true,configurable:true};if(q){var ak=al.__proto__;al.__proto__=z;var aj=aa(al,am);var ao=af(al,am);al.__proto__=ak;if(aj||ao){if(aj){an.get=aj;
}if(ao){an.set=ao;}return an;}}an.value=al[am];return an;};}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function R(aj){return Object.keys(aj);
};}if(!Object.create){Object.create=function k(al,am){var ak;if(al===null){ak={__proto__:null};}else{if(typeof al!="object"){throw new TypeError("typeof prototype["+(typeof al)+"] != 'object'");
}var aj=function(){};aj.prototype=al;ak=new aj();ak.__proto__=al;}if(am!==void 0){Object.defineProperties(ak,am);}return ak;};}function E(aj){try{Object.defineProperty(aj,"sentinel",{});
return"sentinel" in aj;}catch(ak){}}if(Object.defineProperty){var j=E({});var G=typeof document=="undefined"||E(document.createElement("div"));if(!j||!G){var D=Object.defineProperty;
}}if(!Object.defineProperty||D){var f="Property description must be an object: ";var V="Object.defineProperty called on non-object: ";var p="getters & setters can not be defined on this javascript engine";
Object.defineProperty=function Y(ak,am,an){if((typeof ak!="object"&&typeof ak!="function")||ak===null){throw new TypeError(V+ak);}if((typeof an!="object"&&typeof an!="function")||an===null){throw new TypeError(f+an);
}if(D){try{return D.call(Object,ak,am,an);}catch(al){}}if(T(an,"value")){if(q&&(aa(ak,am)||af(ak,am))){var aj=ak.__proto__;ak.__proto__=z;delete ak[am];
ak[am]=an.value;ak.__proto__=aj;}else{ak[am]=an.value;}}else{if(!q){throw new TypeError(p);}if(T(an,"get")){ab(ak,am,an.get);}if(T(an,"set")){ah(ak,am,an.set);
}}return ak;};}if(!Object.defineProperties){Object.defineProperties=function M(aj,ak){for(var al in ak){if(T(ak,al)){Object.defineProperty(aj,al,ak[al]);
}}return aj;};}if(!Object.seal){Object.seal=function W(aj){return aj;};}if(!Object.freeze){Object.freeze=function t(aj){return aj;};}try{Object.freeze(function(){});
}catch(m){Object.freeze=(function t(ak){return function aj(al){if(typeof al=="function"){return al;}else{return ak(al);}};})(Object.freeze);}if(!Object.preventExtensions){Object.preventExtensions=function N(aj){return aj;
};}if(!Object.isSealed){Object.isSealed=function ai(aj){return false;};}if(!Object.isFrozen){Object.isFrozen=function Z(aj){return false;};}if(!Object.isExtensible){Object.isExtensible=function s(ak){if(Object(ak)===ak){throw new TypeError();
}var aj="";while(T(ak,aj)){aj+="?";}ak[aj]=true;var al=T(ak,aj);delete ak[aj];return al;};}if(!Object.keys){var o=true,v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=v.length;
for(var x in {toString:null}){o=false;}Object.keys=function I(al){if((typeof al!="object"&&typeof al!="function")||al===null){throw new TypeError("Object.keys called on a non-object");
}var ao=[];for(var ak in al){if(T(al,ak)){ao.push(ak);}}if(o){for(var am=0,an=l;am<an;am++){var aj=v[am];if(T(al,aj)){ao.push(aj);}}}return ao;};}if(!Date.prototype.toISOString||(new Date(-62198755200000).toISOString().indexOf("-000001")===-1)){Date.prototype.toISOString=function n(){var aj,al,am,ak;
if(!isFinite(this)){throw new RangeError;}aj=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];ak=this.getUTCFullYear();
ak=(ak<0?"-":(ak>9999?"+":""))+("00000"+Math.abs(ak)).slice(0<=ak&&ak<=9999?-4:-6);al=aj.length;while(al--){am=aj[al];if(am<10){aj[al]="0"+am;}}return ak+"-"+aj.slice(0,2).join("-")+"T"+aj.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z";
};}if(!Date.now){Date.now=function ac(){return new Date().getTime();};}if(!Date.prototype.toJSON){Date.prototype.toJSON=function P(aj){if(typeof this.toISOString!="function"){throw new TypeError();
}return this.toISOString();};}if(Date.parse("+275760-09-13T00:00:00.000Z")!==8640000000000000){Date=(function(al){var aj=function aj(aq,aw,ao,av,au,ax,ap){var ar=arguments.length;
if(this instanceof al){var at=ar==1&&String(aq)===aq?new al(aj.parse(aq)):ar>=7?new al(aq,aw,ao,av,au,ax,ap):ar>=6?new al(aq,aw,ao,av,au,ax):ar>=5?new al(aq,aw,ao,av,au):ar>=4?new al(aq,aw,ao,av):ar>=3?new al(aq,aw,ao):ar>=2?new al(aq,aw):ar>=1?new al(aq):new al();
at.constructor=aj;return at;}return al.apply(this,arguments);};var am=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");
for(var ak in al){aj[ak]=al[ak];}aj.now=al.now;aj.UTC=al.UTC;aj.prototype=al.prototype;aj.prototype.constructor=aj;aj.parse=function an(ar){var aq=am.exec(ar);
if(aq){aq.shift();for(var at=1;at<7;at++){aq[at]=+(aq[at]||(at<3?1:0));if(at==1){aq[at]--;}}var ap=+aq.pop(),aw=+aq.pop(),ao=aq.pop();var av=0;if(ao){if(aw>23||ap>59){return NaN;
}av=(aw*60+ap)*60000*(ao=="+"?-1:1);}var au=+aq[0];if(0<=au&&au<=99){aq[0]=au+400;return al.UTC.apply(this,aq)+av-12622780800000;}return al.UTC.apply(this,aq)+av;
}return al.parse.apply(this,arguments);};return aj;})(Date);}var ag="\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF";
if(!String.prototype.trim||ag.trim()){ag="["+ag+"]";var F=new RegExp("^"+ag+ag+"*"),y=new RegExp(ag+ag+"*$");String.prototype.trim=function a(){return String(this).replace(F,"").replace(y,"");
};}var U=function(aj){aj=+aj;if(aj!==aj){aj=0;}else{if(aj!==0&&aj!==(1/0)&&aj!==-(1/0)){aj=(aj>0||-1)*Math.floor(Math.abs(aj));}}return aj;};var H="a"[0]!="a",L=function(aj){if(aj==null){throw new TypeError();
}if(H&&typeof aj=="string"&&aj){return aj.split("");}return Object(aj);};});define("ace/lib/event_emitter",["require","exports","module"],function(b,a,c){var d={};
d._emit=d._dispatchEvent=function(f,k){this._eventRegistry=this._eventRegistry||{};this._defaultHandlers=this._defaultHandlers||{};var j=this._eventRegistry[f]||[];
var g=this._defaultHandlers[f];if(!j.length&&!g){return;}if(typeof k!="object"||!k){k={};}if(!k.type){k.type=f;}if(!k.stopPropagation){k.stopPropagation=function(){this.propagationStopped=true;
};}if(!k.preventDefault){k.preventDefault=function(){this.defaultPrevented=true;};}for(var h=0;h<j.length;h++){j[h](k);if(k.propagationStopped){break;}}if(g&&!k.defaultPrevented){return g(k);
}};d.setDefaultHandler=function(e,f){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[e]){throw new Error("The default handler for '"+e+"' is already set");
}this._defaultHandlers[e]=f;};d.on=d.addEventListener=function(e,g){this._eventRegistry=this._eventRegistry||{};var f=this._eventRegistry[e];if(!f){f=this._eventRegistry[e]=[];
}if(f.indexOf(g)==-1){f.push(g);}};d.removeListener=d.removeEventListener=function(e,h){this._eventRegistry=this._eventRegistry||{};var g=this._eventRegistry[e];
if(!g){return;}var f=g.indexOf(h);if(f!==-1){g.splice(f,1);}};d.removeAllListeners=function(e){if(this._eventRegistry){this._eventRegistry[e]=[];}};a.EventEmitter=d;
});define("ace/lib/oop",["require","exports","module"],function(b,a,c){a.inherits=(function(){var d=function(){};return function(f,e){d.prototype=e.prototype;
f.super_=e.prototype;f.prototype=new d();f.prototype.constructor=f;};}());a.mixin=function(f,d){for(var e in d){f[e]=d[e];}};a.implement=function(e,d){a.mixin(e,d);
};});define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/worker/jshint","ace/narcissus/parser"],function(c,b,d){var e=c("../lib/oop");
var f=c("../worker/mirror").Mirror;var g=c("../worker/jshint").JSHINT;var h=c("../narcissus/parser");var a=b.JavaScriptWorker=function(i){f.call(this,i);
this.setTimeout(500);};e.inherits(a,f);(function(){this.onUpdate=function(){var k=this.doc.getValue();k=k.replace(/^#!.*\n/,"\n");try{h.parse(k);}catch(l){var m=l.message.split(":");
var j=m.pop().trim();var i=parseInt(m.pop().trim())-1;this.sender.emit("narcissus",{row:i,column:null,text:j,type:"error"});return;}finally{}g(k,{undef:false,onevar:false,passfail:false});
this.sender.emit("jslint",g.errors);};}).call(a.prototype);});define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(c,b,d){var a=c("../document").Document;
var f=c("../lib/lang");var e=b.Mirror=function(h){this.sender=h;var j=this.doc=new a("");var i=this.deferredUpdate=f.deferredCall(this.onUpdate.bind(this));
var g=this;h.on("change",function(k){j.applyDeltas([k.data]);i.schedule(g.$timeout);});};(function(){this.$timeout=500;this.setTimeout=function(g){this.$timeout=g;
};this.setValue=function(g){this.doc.setValue(g);this.deferredUpdate.schedule(this.$timeout);};this.getValue=function(g){this.sender.callback(this.doc.getValue(),g);
};this.onUpdate=function(){};}).call(e.prototype);});define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(d,c,e){var g=d("./lib/oop");
var f=d("./lib/event_emitter").EventEmitter;var h=d("./range").Range;var a=d("./anchor").Anchor;var b=function(i){this.$lines=[];if(i.length==0){this.$lines=[""];
}else{if(Array.isArray(i)){this.insertLines(0,i);}else{this.insert({row:0,column:0},i);}}};(function(){g.implement(this,f);this.setValue=function(j){var i=this.getLength();
this.remove(new h(0,0,i,this.getLine(i-1).length));this.insert({row:0,column:0},j);};this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter());
};this.createAnchor=function(j,i){return new a(this,j,i);};if("aaa".split(/a/).length==0){this.$split=function(i){return i.replace(/\r\n|\r/g,"\n").split("\n");
};}else{this.$split=function(i){return i.split(/\r\n|\r|\n/);};}this.$detectNewLine=function(j){var i=j.match(/^.*?(\r\n|\r|\n)/m);if(i){this.$autoNewLine=i[1];
}else{this.$autoNewLine="\n";}};this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";case"auto":return this.$autoNewLine;
}};this.$autoNewLine="\n";this.$newLineMode="auto";this.setNewLineMode=function(i){if(this.$newLineMode===i){return;}this.$newLineMode=i;};this.getNewLineMode=function(){return this.$newLineMode;
};this.isNewLine=function(i){return(i=="\r\n"||i=="\r"||i=="\n");};this.getLine=function(i){return this.$lines[i]||"";};this.getLines=function(j,i){return this.$lines.slice(j,i+1);
};this.getAllLines=function(){return this.getLines(0,this.getLength());};this.getLength=function(){return this.$lines.length;};this.getTextRange=function(j){if(j.start.row==j.end.row){return this.$lines[j.start.row].substring(j.start.column,j.end.column);
}else{var i=this.getLines(j.start.row+1,j.end.row-1);i.unshift((this.$lines[j.start.row]||"").substring(j.start.column));i.push((this.$lines[j.end.row]||"").substring(0,j.end.column));
return i.join(this.getNewLineCharacter());}};this.$clipPosition=function(i){var j=this.getLength();if(i.row>=j){i.row=Math.max(0,j-1);i.column=this.getLine(j-1).length;
}return i;};this.insert=function(i,m){if(!m||m.length===0){return i;}i=this.$clipPosition(i);if(this.getLength()<=1){this.$detectNewLine(m);}var k=this.$split(m);
var l=k.splice(0,1)[0];var j=k.length==0?null:k.splice(k.length-1,1)[0];i=this.insertInLine(i,l);if(j!==null){i=this.insertNewLine(i);i=this.insertLines(i.row,k);
i=this.insertInLine(i,j||"");}return i;};this.insertLines=function(m,j){if(j.length==0){return{row:m,column:0};}if(j.length>65535){var i=this.insertLines(m,j.slice(65535));
j=j.slice(0,65535);}var l=[m,0];l.push.apply(l,j);this.$lines.splice.apply(this.$lines,l);var k=new h(m,0,m+j.length,0);var n={action:"insertLines",range:k,lines:j};
this._emit("change",{data:n});return i||k.end;};this.insertNewLine=function(i){i=this.$clipPosition(i);var k=this.$lines[i.row]||"";this.$lines[i.row]=k.substring(0,i.column);
this.$lines.splice(i.row+1,0,k.substring(i.column,k.length));var j={row:i.row+1,column:0};var l={action:"insertText",range:h.fromPoints(i,j),text:this.getNewLineCharacter()};
this._emit("change",{data:l});return j;};this.insertInLine=function(i,l){if(l.length==0){return i;}var k=this.$lines[i.row]||"";this.$lines[i.row]=k.substring(0,i.column)+l+k.substring(i.column);
var j={row:i.row,column:i.column+l.length};var m={action:"insertText",range:h.fromPoints(i,j),text:l};this._emit("change",{data:m});return j;};this.remove=function(j){j.start=this.$clipPosition(j.start);
j.end=this.$clipPosition(j.end);if(j.isEmpty()){return j.start;}var m=j.start.row;var k=j.end.row;if(j.isMultiLine()){var l=j.start.column==0?m:m+1;var i=k-1;
if(j.end.column>0){this.removeInLine(k,0,j.end.column);}if(i>=l){this.removeLines(l,i);}if(l!=m){this.removeInLine(m,j.start.column,this.getLine(m).length);
this.removeNewLine(j.start.row);}}else{this.removeInLine(m,j.start.column,j.end.column);}return j.start;};this.removeInLine=function(m,k,p){if(k==p){return;
}var j=new h(m,k,m,p);var i=this.getLine(m);var l=i.substring(k,p);var o=i.substring(0,k)+i.substring(p,i.length);this.$lines.splice(m,1,o);var n={action:"removeText",range:j,text:l};
this._emit("change",{data:n});return j.start;};this.removeLines=function(l,j){var i=new h(l,0,j+1,0);var k=this.$lines.splice(l,j-l+1);var m={action:"removeLines",range:i,nl:this.getNewLineCharacter(),lines:k};
this._emit("change",{data:m});return k;};this.removeNewLine=function(m){var l=this.getLine(m);var i=this.getLine(m+1);var k=new h(m,l.length,m+1,0);var j=l+i;
this.$lines.splice(m,2,j);var n={action:"removeText",range:k,text:this.getNewLineCharacter()};this._emit("change",{data:n});};this.replace=function(j,k){if(k.length==0&&j.isEmpty()){return j.start;
}if(k==this.getTextRange(j)){return j.end;}this.remove(j);if(k){var i=this.insert(j.start,k);}else{i=j.start;}return i;};this.applyDeltas=function(l){for(var k=0;
k<l.length;k++){var m=l[k];var j=h.fromPoints(m.range.start,m.range.end);if(m.action=="insertLines"){this.insertLines(j.start.row,m.lines);}else{if(m.action=="insertText"){this.insert(j.start,m.text);
}else{if(m.action=="removeLines"){this.removeLines(j.start.row,j.end.row-1);}else{if(m.action=="removeText"){this.remove(j);}}}}}};this.revertDeltas=function(l){for(var k=l.length-1;
k>=0;k--){var m=l[k];var j=h.fromPoints(m.range.start,m.range.end);if(m.action=="insertLines"){this.removeLines(j.start.row,j.end.row-1);}else{if(m.action=="insertText"){this.remove(j);
}else{if(m.action=="removeLines"){this.insertLines(j.start.row,m.lines);}else{if(m.action=="removeText"){this.insert(j.start,m.text);}}}}}};}).call(b.prototype);
c.Document=b;});define("ace/range",["require","exports","module"],function(b,a,c){var d=function(f,g,e,h){this.start={row:f,column:g};this.end={row:e,column:h};
};(function(){this.isEqual=function(e){return this.start.row==e.start.row&&this.end.row==e.end.row&&this.start.column==e.start.column&&this.end.column==e.end.column;
};this.toString=function(){return("Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]");};this.contains=function(f,e){return this.compare(f,e)==0;
};this.compareRange=function(f){var g,e=f.end,h=f.start;g=this.compare(e.row,e.column);if(g==1){g=this.compare(h.row,h.column);if(g==1){return 2;}else{if(g==0){return 1;
}else{return 0;}}}else{if(g==-1){return -2;}else{g=this.compare(h.row,h.column);if(g==-1){return -1;}else{if(g==1){return 42;}else{return 0;}}}}};this.comparePoint=function(e){return this.compare(e.row,e.column);
};this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0;};this.intersects=function(e){var f=this.compareRange(e);
return(f==-1||f==0||f==1);};this.isEnd=function(f,e){return this.end.row==f&&this.end.column==e;};this.isStart=function(f,e){return this.start.row==f&&this.start.column==e;
};this.setStart=function(f,e){if(typeof f=="object"){this.start.column=f.column;this.start.row=f.row;}else{this.start.row=f;this.start.column=e;}};this.setEnd=function(f,e){if(typeof f=="object"){this.end.column=f.column;
this.end.row=f.row;}else{this.end.row=f;this.end.column=e;}};this.inside=function(f,e){if(this.compare(f,e)==0){if(this.isEnd(f,e)||this.isStart(f,e)){return false;
}else{return true;}}return false;};this.insideStart=function(f,e){if(this.compare(f,e)==0){if(this.isEnd(f,e)){return false;}else{return true;}}return false;
};this.insideEnd=function(f,e){if(this.compare(f,e)==0){if(this.isStart(f,e)){return false;}else{return true;}}return false;};this.compare=function(f,e){if(!this.isMultiLine()){if(f===this.start.row){return e<this.start.column?-1:(e>this.end.column?1:0);
}}if(f<this.start.row){return -1;}if(f>this.end.row){return 1;}if(this.start.row===f){return e>=this.start.column?0:-1;}if(this.end.row===f){return e<=this.end.column?0:1;
}return 0;};this.compareStart=function(f,e){if(this.start.row==f&&this.start.column==e){return -1;}else{return this.compare(f,e);}};this.compareEnd=function(f,e){if(this.end.row==f&&this.end.column==e){return 1;
}else{return this.compare(f,e);}};this.compareInside=function(f,e){if(this.end.row==f&&this.end.column==e){return 1;}else{if(this.start.row==f&&this.start.column==e){return -1;
}else{return this.compare(f,e);}}};this.clipRows=function(g,f){if(this.end.row>f){var e={row:f+1,column:0};}if(this.start.row>f){var h={row:f+1,column:0};
}if(this.start.row<g){var h={row:g,column:0};}if(this.end.row<g){var e={row:g,column:0};}return d.fromPoints(h||this.start,e||this.end);};this.extend=function(h,f){var g=this.compare(h,f);
if(g==0){return this;}else{if(g==-1){var i={row:h,column:f};}else{var e={row:h,column:f};}}return d.fromPoints(i||this.start,e||this.end);};this.isEmpty=function(){return(this.start.row==this.end.row&&this.start.column==this.end.column);
};this.isMultiLine=function(){return(this.start.row!==this.end.row);};this.clone=function(){return d.fromPoints(this.start,this.end);};this.collapseRows=function(){if(this.end.column==0){return new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0);
}else{return new d(this.start.row,0,this.end.row,0);}};this.toScreenRange=function(f){var e=f.documentToScreenPosition(this.start);var g=f.documentToScreenPosition(this.end);
return new d(e.row,e.column,g.row,g.column);};}).call(d.prototype);d.fromPoints=function(f,e){return new d(f.row,f.column,e.row,e.column);};a.Range=d;});
define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(c,b,d){var f=c("./lib/oop");var e=c("./lib/event_emitter").EventEmitter;
var a=b.Anchor=function(h,i,g){this.document=h;if(typeof g=="undefined"){this.setPosition(i.row,i.column);}else{this.setPosition(i,g);}this.$onChange=this.onChange.bind(this);
h.on("change",this.$onChange);};(function(){f.implement(this,e);this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column);};
this.getDocument=function(){return this.document;};this.onChange=function(i){var k=i.data;var g=k.range;if(g.start.row==g.end.row&&g.start.row!=this.row){return;
}if(g.start.row>this.row){return;}if(g.start.row==this.row&&g.start.column>this.column){return;}var j=this.row;var h=this.column;if(k.action==="insertText"){if(g.start.row===j&&g.start.column<=h){if(g.start.row===g.end.row){h+=g.end.column-g.start.column;
}else{h-=g.start.column;j+=g.end.row-g.start.row;}}else{if(g.start.row!==g.end.row&&g.start.row<j){j+=g.end.row-g.start.row;}}}else{if(k.action==="insertLines"){if(g.start.row<=j){j+=g.end.row-g.start.row;
}}else{if(k.action=="removeText"){if(g.start.row==j&&g.start.column<h){if(g.end.column>=h){h=g.start.column;}else{h=Math.max(0,h-(g.end.column-g.start.column));
}}else{if(g.start.row!==g.end.row&&g.start.row<j){if(g.end.row==j){h=Math.max(0,h-g.end.column)+g.start.column;}j-=(g.end.row-g.start.row);}else{if(g.end.row==j){j-=g.end.row-g.start.row;
h=Math.max(0,h-g.end.column)+g.start.column;}}}}else{if(k.action=="removeLines"){if(g.start.row<=j){if(g.end.row<=j){j-=g.end.row-g.start.row;}else{j=g.start.row;
h=0;}}}}}}this.setPosition(j,h,true);};this.setPosition=function(j,i,g){var k;if(g){k={row:j,column:i};}else{k=this.$clipPositionToDocument(j,i);}if(this.row==k.row&&this.column==k.column){return;
}var h={row:this.row,column:this.column};this.row=k.row;this.column=k.column;this._emit("change",{old:h,value:k});};this.detach=function(){this.document.removeEventListener("change",this.$onChange);
};this.$clipPositionToDocument=function(h,g){var i={};if(h>=this.document.getLength()){i.row=Math.max(0,this.document.getLength()-1);i.column=this.document.getLine(i.row).length;
}else{if(h<0){i.row=0;i.column=0;}else{i.row=h;i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,g));}}if(g<0){i.column=0;}return i;};}).call(a.prototype);
});define("ace/lib/lang",["require","exports","module"],function(b,a,c){a.stringReverse=function(f){return f.split("").reverse().join("");};a.stringRepeat=function(f,g){return new Array(g+1).join(f);
};var d=/^\s\s*/;var e=/\s\s*$/;a.stringTrimLeft=function(f){return f.replace(d,"");};a.stringTrimRight=function(f){return f.replace(e,"");};a.copyObject=function(g){var h={};
for(var f in g){h[f]=g[f];}return h;};a.copyArray=function(j){var h=[];for(var g=0,f=j.length;g<f;g++){if(j[g]&&typeof j[g]=="object"){h[g]=this.copyObject(j[g]);
}else{h[g]=j[g];}}return h;};a.deepCopy=function(g){if(typeof g!="object"){return g;}var h=g.constructor();for(var f in g){if(typeof g[f]=="object"){h[f]=this.deepCopy(g[f]);
}else{h[f]=g[f];}}return h;};a.arrayToMap=function(f){var h={};for(var g=0;g<f.length;g++){h[f[g]]=1;}return h;};a.createMap=function(g){var h=Object.create(null);
for(var f in g){h[f]=g[f];}return h;};a.arrayRemove=function(h,g){for(var f=0;f<=h.length;f++){if(g===h[f]){h.splice(f,1);}}};a.escapeRegExp=function(f){return f.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");
};a.getMatchOffsets=function(g,f){var h=[];g.replace(f,function(i){h.push({offset:arguments[arguments.length-2],length:i.length});});return h;};a.deferredCall=function(g){var i=null;
var h=function(){i=null;g();};var f=function(j){f.cancel();i=setTimeout(h,j||0);return f;};f.schedule=f;f.call=function(){this.cancel();g();return f;};
f.cancel=function(){clearTimeout(i);i=null;return f;};return f;};});define("ace/worker/jshint",["require","exports","module"],function(c,b,d){
/*!
 * JSHint, by JSHint Community.
 *
 * Licensed under the same slightly modified MIT license that JSLint is.
 * It stops evil-doers everywhere.
 *
 * JSHint is a derivative work of JSLint:
 *
 *   Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
 *
 *   Permission is hereby granted, free of charge, to any person obtaining
 *   a copy of this software and associated documentation files (the "Software"),
 *   to deal in the Software without restriction, including without limitation
 *   the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *   and/or sell copies of the Software, and to permit persons to whom
 *   the Software is furnished to do so, subject to the following conditions:
 *
 *   The above copyright notice and this permission notice shall be included
 *   in all copies or substantial portions of the Software.
 *
 *   The Software shall be used for Good, not Evil.
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 *   DEALINGS IN THE SOFTWARE.
 *
 * JSHint was forked from 2010-12-16 edition of JSLint.
 *
 */
var a=(function(){var aY,v={"<":true,"<=":true,"==":true,"===":true,"!==":true,"!=":true,">":true,">=":true,"+":true,"-":true,"*":true,"/":true,"%":true},r={asi:true,bitwise:true,boss:true,browser:true,couch:true,curly:true,debug:true,devel:true,dojo:true,eqeqeq:true,eqnull:true,es5:true,esnext:true,evil:true,expr:true,forin:true,funcscope:true,globalstrict:true,immed:true,iterator:true,jquery:true,lastsemic:true,latedef:true,laxbreak:true,laxcomma:true,loopfunc:true,mootools:true,multistr:true,newcap:true,noarg:true,node:true,noempty:true,nonew:true,nonstandard:true,nomen:true,onevar:true,onecase:true,passfail:true,plusplus:true,proto:true,prototypejs:true,regexdash:true,regexp:true,rhino:true,undef:true,scripturl:true,shadow:true,smarttabs:true,strict:true,sub:true,supernew:true,trailing:true,validthis:true,withstmt:true,white:true,wsh:true},al={maxlen:false,indent:false,maxerr:false,predef:false},aU={ArrayBuffer:false,ArrayBufferView:false,Audio:false,addEventListener:false,applicationCache:false,atob:false,blur:false,btoa:false,clearInterval:false,clearTimeout:false,close:false,closed:false,DataView:false,DOMParser:false,defaultStatus:false,document:false,event:false,FileReader:false,Float32Array:false,Float64Array:false,FormData:false,focus:false,frames:false,getComputedStyle:false,HTMLElement:false,HTMLAnchorElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPreElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLUListElement:false,HTMLVideoElement:false,history:false,Int16Array:false,Int32Array:false,Int8Array:false,Image:false,length:false,localStorage:false,location:false,MessageChannel:false,MessageEvent:false,MessagePort:false,moveBy:false,moveTo:false,name:false,navigator:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,openDatabase:false,opener:false,Option:false,parent:false,print:false,removeEventListener:false,resizeBy:false,resizeTo:false,screen:false,scroll:false,scrollBy:false,scrollTo:false,sessionStorage:false,setInterval:false,setTimeout:false,SharedWorker:false,status:false,top:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,WebSocket:false,window:false,Worker:false,XMLHttpRequest:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false},a8={require:false,respond:false,getRow:false,emit:false,send:false,start:false,sum:false,log:false,exports:false,module:false,provides:false},w={alert:false,confirm:false,console:false,Debug:false,opera:false,prompt:false},S={dojo:false,dijit:false,dojox:false,define:false,require:false},I={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"/":"\\/","\\":"\\\\"},aC,aM=["closure","exception","global","label","outer","unused","var"],C,D,aS,aD,ap,n,bc={"$":false,jQuery:false},a6,N,aH,aT,aW={"$":false,"$$":false,Assets:false,Browser:false,Chain:false,Class:false,Color:false,Cookie:false,Core:false,Document:false,DomReady:false,DOMReady:false,Drag:false,Element:false,Elements:false,Event:false,Events:false,Fx:false,Group:false,Hash:false,HtmlTable:false,Iframe:false,IframeShim:false,InputValidator:false,instanceOf:false,Keyboard:false,Locale:false,Mask:false,MooTools:false,Native:false,Options:false,OverText:false,Request:false,Scroller:false,Slick:false,Slider:false,Sortables:false,Spinner:false,Swiff:false,Tips:false,Type:false,typeOf:false,URI:false,Window:false},o,ar={__filename:false,__dirname:false,Buffer:false,console:false,exports:false,GLOBAL:false,global:false,module:false,process:false,require:false,setTimeout:false,clearTimeout:false,setInterval:false,clearInterval:false},G,W,a1,u,aO,h={"$":false,"$$":false,"$A":false,"$F":false,"$H":false,"$R":false,"$break":false,"$continue":false,"$w":false,Abstract:false,Ajax:false,Class:false,Enumerable:false,Element:false,Event:false,Field:false,Form:false,Hash:false,Insertion:false,ObjectRange:false,PeriodicalExecuter:false,Position:false,Prototype:false,Selector:false,Template:false,Toggle:false,Try:false,Autocompleter:false,Builder:false,Control:false,Draggable:false,Draggables:false,Droppables:false,Effect:false,Sortable:false,SortableObserver:false,Sound:false,Scriptaculous:false},aa={defineClass:false,deserialize:false,gc:false,help:false,importPackage:false,java:false,load:false,loadClass:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false},aF,ay,a5={Array:false,Boolean:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,"eval":false,EvalError:false,Function:false,hasOwnProperty:false,isFinite:false,isNaN:false,JSON:false,Math:false,Number:false,Object:false,parseInt:false,parseFloat:false,RangeError:false,ReferenceError:false,RegExp:false,String:false,SyntaxError:false,TypeError:false,URIError:false},aw={escape:false,unescape:false},J={E:true,LN2:true,LN10:true,LOG2E:true,LOG10E:true,MAX_VALUE:true,MIN_VALUE:true,NEGATIVE_INFINITY:true,PI:true,POSITIVE_INFINITY:true,SQRT1_2:true,SQRT2:true},aA,e={},q,aE,V,P,B,i={ActiveXObject:true,Enumerator:true,GetObject:true,ScriptEngine:true,ScriptEngineBuildVersion:true,ScriptEngineMajorVersion:true,ScriptEngineMinorVersion:true,VBArray:true,WSH:true,WScript:true,XDomainRequest:true};
var aq,M,ag,ab,ae,aX,O,y,aV;(function(){aq=/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;M=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
ag=/^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jshint|jslint|members?|global)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/;
ab=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;ae=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
aX=/\*\/|\/\*/;O=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;y=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;aV=/^\s*\/\*\s*falls\sthrough\s*\*\/\s*$/;
}());function au(){}function aR(ax,F){return Object.prototype.hasOwnProperty.call(ax,F);}function a3(F,ax){if(al[F]===undefined&&r[F]===undefined){an("Bad option: '"+F+"'.",ax);
}}if(typeof Array.isArray!=="function"){Array.isArray=function(F){return Object.prototype.toString.apply(F)==="[object Array]";};}if(typeof Object.create!=="function"){Object.create=function(F){au.prototype=F;
return new au();};}if(typeof Object.keys!=="function"){Object.keys=function(bd){var F=[],ax;for(ax in bd){if(aR(bd,ax)){F.push(ax);}}return F;};}if(typeof String.prototype.entityify!=="function"){String.prototype.entityify=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
};}if(typeof String.prototype.isAlpha!=="function"){String.prototype.isAlpha=function(){return(this>="a"&&this<="z\uffff")||(this>="A"&&this<="Z\uffff");
};}if(typeof String.prototype.isDigit!=="function"){String.prototype.isDigit=function(){return(this>="0"&&this<="9");};}if(typeof String.prototype.supplant!=="function"){String.prototype.supplant=function(F){return this.replace(/\{([^{}]*)\}/g,function(bd,ax){var be=F[ax];
return typeof be==="string"||typeof be==="number"?be:bd;});};}if(typeof String.prototype.name!=="function"){String.prototype.name=function(){if(O.test(this)){return this;
}if(ab.test(this)){return'"'+this.replace(ae,function(F){var ax=I[F];if(ax){return ax;}return"\\u"+("0000"+F.charCodeAt().toString(16)).slice(-4);})+'"';
}return'"'+this+'"';};}function ba(F,ax){var bd;for(bd in ax){if(aR(ax,bd)){F[bd]=ax[bd];}}}function ai(){if(W.couch){ba(a1,a8);}if(W.rhino){ba(a1,aa);
}if(W.prototypejs){ba(a1,h);}if(W.node){ba(a1,ar);W.globalstrict=true;}if(W.devel){ba(a1,w);}if(W.dojo){ba(a1,S);}if(W.browser){ba(a1,aU);}if(W.nonstandard){ba(a1,aw);
}if(W.jquery){ba(a1,bc);}if(W.mootools){ba(a1,aW);}if(W.wsh){ba(a1,i);}if(W.esnext){P();}if(W.globalstrict&&W.strict!==false){W.strict=true;}}function at(be,ax,bd){var F=Math.floor((ax/a6.length)*100);
throw {name:"JSHintError",line:ax,character:bd,message:be+" ("+F+"% scanned).",raw:be};}function g(be,F,bd,ax){return a.undefs.push([be,F,bd,ax]);}function an(ax,bj,bh,bg,bf,be){var F,bd,bi;
bj=bj||o;if(bj.id==="(end)"){bj=aE;}bd=bj.line||0;F=bj.from||0;bi={id:"(error)",raw:ax,evidence:a6[bd-1]||"",line:bd,character:F,a:bh,b:bg,c:bf,d:be};bi.reason=ax.supplant(bi);
a.errors.push(bi);if(W.passfail){at("Stopping. ",bd,F);}B+=1;if(B>=W.maxerr){at("Too many errors.",bd,F);}return bi;}function ac(ax,be,bf,bd,F,bh,bg){return an(ax,{line:be,from:bf},bd,F,bh,bg);
}function aI(ax,bf,be,F,bh,bg){var bd=an(ax,bf,be,F,bh,bg);}function Y(ax,be,bf,bd,F,bh,bg){return aI(ax,{line:be,from:bf},bd,F,bh,bg);}var am=(function am(){var bf,bg,F,bd;
function be(){var bh,bi;if(F>=a6.length){return false;}bf=1;bd=a6[F];F+=1;if(W.smarttabs){bh=bd.search(/ \t/);}else{bh=bd.search(/ \t|\t /);}if(bh>=0){ac("Mixed spaces and tabs.",F,bh+1);
}bd=bd.replace(/\t/g,q);bh=bd.search(M);if(bh>=0){ac("Unsafe character.",F,bh);}if(W.maxlen&&W.maxlen<bd.length){ac("Line too long.",F,bd.length);}bi=W.trailing&&bd.match(/^(.*?)\s+$/);
if(bi&&!/^\s+$/.test(bd)){ac("Trailing whitespace.",F,bi[1].length+1);}return true;}function ax(bj,bk){var bi,bh;if(bj==="(color)"||bj==="(range)"){bh={type:bj};
}else{if(bj==="(punctuator)"||(bj==="(identifier)"&&aR(e,bk))){bh=e[bk]||e["(error)"];}else{bh=e[bj];}}bh=Object.create(bh);if(bj==="(string)"||bj==="(range)"){if(!W.scripturl&&y.test(bk)){ac("Script URL.",F,bg);
}}if(bj==="(identifier)"){bh.identifier=true;if(bk==="__proto__"&&!W.proto){ac("The '{a}' property is deprecated.",F,bg,bk);}else{if(bk==="__iterator__"&&!W.iterator){ac("'{a}' is only available in JavaScript 1.7.",F,bg,bk);
}else{if(W.nomen&&(bk.charAt(0)==="_"||bk.charAt(bk.length-1)==="_")){if(!W.node||aE.id==="."||(bk!=="__dirname"&&bk!=="__filename")){ac("Unexpected {a} in '{b}'.",F,bg,"dangling '_'",bk);
}}}}}bh.value=bk;bh.line=F;bh.character=bf;bh.from=bg;bi=bh.id;if(bi!=="(endline)"){u=bi&&(("(,=:[!&|?{};".indexOf(bi.charAt(bi.length-1))>=0)||bi==="return"||bi==="case");
}return bh;}return{init:function(bh){if(typeof bh==="string"){a6=bh.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n");}else{a6=bh;}if(a6[0]&&a6[0].substr(0,2)==="#!"){a6[0]="";
}F=0;be();bg=1;},range:function(bi,bh){var bk,bj="";bg=bf;if(bd.charAt(0)!==bi){Y("Expected '{a}' and instead saw '{b}'.",F,bf,bi,bd.charAt(0));}for(;;
){bd=bd.slice(1);bf+=1;bk=bd.charAt(0);switch(bk){case"":Y("Missing '{a}'.",F,bf,bk);break;case bh:bd=bd.slice(1);bf+=1;return ax("(range)",bj);case"\\":ac("Unexpected '{a}'.",F,bf,bk);
}bj+=bk;}},token:function(){var bv,bu,bj,bs,bo,bn,bp,bl,bt,bi,bw,bh,bm,bk;function bq(bx){var bz=bx.exec(bd),by;if(bz){bl=bz[0].length;by=bz[1];bu=by.charAt(0);
bd=bd.substr(bl);bg=bf+bl-by.length;bf+=bl;return by;}}function br(bx){var bE,bA,bB="",bD=false;if(n&&bx!=='"'){ac("Strings must use doublequote.",F,bf);
}function bz(bG){var bF=parseInt(bd.substr(bA+1,bG),16);bA+=bG;if(bF>=32&&bF<=126&&bF!==34&&bF!==92&&bF!==39){ac("Unnecessary escapement.",F,bf);}bf+=bG;
bE=String.fromCharCode(bF);}bA=0;unclosedString:for(;;){while(bA>=bd.length){bA=0;var by=F,bC=bg;if(!be()){Y("Unclosed string.",by,bC);break unclosedString;
}if(bD){bD=false;}else{ac("Unclosed string.",by,bC);}}bE=bd.charAt(bA);if(bE===bx){bf+=1;bd=bd.substr(bA+1);return ax("(string)",bB,bx);}if(bE<" "){if(bE==="\n"||bE==="\r"){break;
}ac("Control character in string: {a}.",F,bf+bA,bd.slice(0,bA));}else{if(bE==="\\"){bA+=1;bf+=1;bE=bd.charAt(bA);bk=bd.charAt(bA+1);switch(bE){case"\\":case'"':case"/":break;
case"'":if(n){ac("Avoid \\'.",F,bf);}break;case"b":bE="\b";break;case"f":bE="\f";break;case"n":bE="\n";break;case"r":bE="\r";break;case"t":bE="\t";break;
case"0":bE="\0";if(bk>=0&&bk<=7&&aA["use strict"]){ac("Octal literals are not allowed in strict mode.",F,bf);}break;case"u":bz(4);break;case"v":if(n){ac("Avoid \\v.",F,bf);
}bE="\v";break;case"x":if(n){ac("Avoid \\x-.",F,bf);}bz(2);break;case"":bD=true;if(W.multistr){if(n){ac("Avoid EOL escapement.",F,bf);}bE="";bf-=1;break;
}ac("Bad escapement of EOL. Use option multistr if needed.",F,bf);break;default:ac("Bad escapement.",F,bf);}}}bB+=bE;bf+=1;bA+=1;}}for(;;){if(!bd){return ax(be()?"(endline)":"(end)","");
}bw=bq(ag);if(!bw){bw="";bu="";while(bd&&bd<"!"){bd=bd.substr(1);}if(bd){Y("Unexpected '{a}'.",F,bf,bd.substr(0,1));bd="";}}else{if(bu.isAlpha()||bu==="_"||bu==="$"){return ax("(identifier)",bw);
}if(bu.isDigit()){if(!isFinite(Number(bw))){ac("Bad number '{a}'.",F,bf,bw);}if(bd.substr(0,1).isAlpha()){ac("Missing space after '{a}'.",F,bf,bw);}if(bu==="0"){bs=bw.substr(1,1);
if(bs.isDigit()){if(aE.id!=="."){ac("Don't use extra leading zeros '{a}'.",F,bf,bw);}}else{if(n&&(bs==="x"||bs==="X")){ac("Avoid 0x-. '{a}'.",F,bf,bw);
}}}if(bw.substr(bw.length-1)==="."){ac("A trailing decimal point can be confused with a dot '{a}'.",F,bf,bw);}return ax("(number)",bw);}switch(bw){case'"':case"'":return br(bw);
case"//":bd="";aE.comment=true;break;case"/*":for(;;){bp=bd.search(aX);if(bp>=0){break;}if(!be()){Y("Unclosed comment.",F,bf);}}bf+=bp+2;if(bd.substr(bp,1)==="/"){Y("Nested comment.",F,bf);
}bd=bd.substr(bp+2);aE.comment=true;break;case"/*members":case"/*member":case"/*jshint":case"/*jslint":case"/*global":case"*/":return{value:bw,type:"special",line:F,character:bf,from:bg};
case"":break;case"/":if(aE.id==="/="){Y("A regular expression literal can be confused with '/='.",F,bg);}if(u){bo=0;bj=0;bl=0;for(;;){bv=true;bu=bd.charAt(bl);
bl+=1;switch(bu){case"":Y("Unclosed regular expression.",F,bg);return at("Stopping.",F,bg);case"/":if(bo>0){ac("{a} unterminated regular expression group(s).",F,bg+bl,bo);
}bu=bd.substr(0,bl-1);bi={g:true,i:true,m:true};while(bi[bd.charAt(bl)]===true){bi[bd.charAt(bl)]=false;bl+=1;}bf+=bl;bd=bd.substr(bl);bi=bd.charAt(0);
if(bi==="/"||bi==="*"){Y("Confusing regular expression.",F,bg);}return ax("(regexp)",bu);case"\\":bu=bd.charAt(bl);if(bu<" "){ac("Unexpected control character in regular expression.",F,bg+bl);
}else{if(bu==="<"){ac("Unexpected escaped character '{a}' in regular expression.",F,bg+bl,bu);}}bl+=1;break;case"(":bo+=1;bv=false;if(bd.charAt(bl)==="?"){bl+=1;
switch(bd.charAt(bl)){case":":case"=":case"!":bl+=1;break;default:ac("Expected '{a}' and instead saw '{b}'.",F,bg+bl,":",bd.charAt(bl));}}else{bj+=1;}break;
case"|":bv=false;break;case")":if(bo===0){ac("Unescaped '{a}'.",F,bg+bl,")");}else{bo-=1;}break;case" ":bi=1;while(bd.charAt(bl)===" "){bl+=1;bi+=1;}if(bi>1){ac("Spaces are hard to count. Use {{a}}.",F,bg+bl,bi);
}break;case"[":bu=bd.charAt(bl);if(bu==="^"){bl+=1;if(W.regexp){ac("Insecure '{a}'.",F,bg+bl,bu);}else{if(bd.charAt(bl)==="]"){Y("Unescaped '{a}'.",F,bg+bl,"^");
}}}if(bu==="]"){ac("Empty class.",F,bg+bl-1);}bh=false;bm=false;klass:do{bu=bd.charAt(bl);bl+=1;switch(bu){case"[":case"^":ac("Unescaped '{a}'.",F,bg+bl,bu);
if(bm){bm=false;}else{bh=true;}break;case"-":if(bh&&!bm){bh=false;bm=true;}else{if(bm){bm=false;}else{if(bd.charAt(bl)==="]"){bm=true;}else{if(W.regexdash!==(bl===2||(bl===3&&bd.charAt(1)==="^"))){ac("Unescaped '{a}'.",F,bg+bl-1,"-");
}bh=true;}}}break;case"]":if(bm&&!W.regexdash){ac("Unescaped '{a}'.",F,bg+bl-1,"-");}break klass;case"\\":bu=bd.charAt(bl);if(bu<" "){ac("Unexpected control character in regular expression.",F,bg+bl);
}else{if(bu==="<"){ac("Unexpected escaped character '{a}' in regular expression.",F,bg+bl,bu);}}bl+=1;if(/[wsd]/i.test(bu)){if(bm){ac("Unescaped '{a}'.",F,bg+bl,"-");
bm=false;}bh=false;}else{if(bm){bm=false;}else{bh=true;}}break;case"/":ac("Unescaped '{a}'.",F,bg+bl-1,"/");if(bm){bm=false;}else{bh=true;}break;case"<":if(bm){bm=false;
}else{bh=true;}break;default:if(bm){bm=false;}else{bh=true;}}}while(bu);break;case".":if(W.regexp){ac("Insecure '{a}'.",F,bg+bl,bu);}break;case"]":case"?":case"{":case"}":case"+":case"*":ac("Unescaped '{a}'.",F,bg+bl,bu);
}if(bv){switch(bd.charAt(bl)){case"?":case"+":case"*":bl+=1;if(bd.charAt(bl)==="?"){bl+=1;}break;case"{":bl+=1;bu=bd.charAt(bl);if(bu<"0"||bu>"9"){ac("Expected a number and instead saw '{a}'.",F,bg+bl,bu);
}bl+=1;bt=+bu;for(;;){bu=bd.charAt(bl);if(bu<"0"||bu>"9"){break;}bl+=1;bt=+bu+(bt*10);}bn=bt;if(bu===","){bl+=1;bn=Infinity;bu=bd.charAt(bl);if(bu>="0"&&bu<="9"){bl+=1;
bn=+bu;for(;;){bu=bd.charAt(bl);if(bu<"0"||bu>"9"){break;}bl+=1;bn=+bu+(bn*10);}}}if(bd.charAt(bl)!=="}"){ac("Expected '{a}' and instead saw '{b}'.",F,bg+bl,"}",bu);
}else{bl+=1;}if(bd.charAt(bl)==="?"){bl+=1;}if(bt>bn){ac("'{a}' should not be greater than '{b}'.",F,bg+bl,bt,bn);}}}}bu=bd.substr(0,bl-1);bf+=bl;bd=bd.substr(bl);
return ax("(regexp)",bu);}return ax("(punctuator)",bw);case"#":return ax("(punctuator)",bw);default:return ax("(punctuator)",bw);}}}}};}());function x(F,ax){if(F==="hasOwnProperty"){an("'hasOwnProperty' is a really bad name.");
}if(aR(aC,F)&&!aC["(global)"]){if(aC[F]===true){if(W.latedef){an("'{a}' was used before it was defined.",o,F);}}else{if(!W.shadow&&ax!=="exception"){an("'{a}' is already defined.",o,F);
}}}aC[F]=ax;if(aC["(global)"]){D[F]=aC;if(aR(aS,F)){if(W.latedef){an("'{a}' was used before it was defined.",o,F);}delete aS[F];}}else{aF[F]=aC;}}function z(){var F,bf,be,bg=o.value,bd,ax;
switch(bg){case"*/":aI("Unbegun comment.");break;case"/*members":case"/*member":bg="/*members";if(!aT){aT={};}bf=aT;break;case"/*jshint":case"/*jslint":bf=W;
be=r;break;case"/*global":bf=a1;break;default:aI("What?");}bd=am.token();loop:for(;;){for(;;){if(bd.type==="special"&&bd.value==="*/"){break loop;}if(bd.id!=="(endline)"&&bd.id!==","){break;
}bd=am.token();}if(bd.type!=="(string)"&&bd.type!=="(identifier)"&&bg!=="/*members"){aI("Bad option.",bd);}ax=am.token();if(ax.id===":"){ax=am.token();
if(bf===aT){aI("Expected '{a}' and instead saw '{b}'.",bd,"*/",":");}if(bg==="/*jshint"){a3(bd.value,bd);}if(bd.value==="indent"&&(bg==="/*jshint"||bg==="/*jslint")){F=+ax.value;
if(typeof F!=="number"||!isFinite(F)||F<=0||Math.floor(F)!==F){aI("Expected a small integer and instead saw '{a}'.",ax,ax.value);}bf.white=true;bf.indent=F;
}else{if(bd.value==="maxerr"&&(bg==="/*jshint"||bg==="/*jslint")){F=+ax.value;if(typeof F!=="number"||!isFinite(F)||F<=0||Math.floor(F)!==F){aI("Expected a small integer and instead saw '{a}'.",ax,ax.value);
}bf.maxerr=F;}else{if(bd.value==="maxlen"&&(bg==="/*jshint"||bg==="/*jslint")){F=+ax.value;if(typeof F!=="number"||!isFinite(F)||F<=0||Math.floor(F)!==F){aI("Expected a small integer and instead saw '{a}'.",ax,ax.value);
}bf.maxlen=F;}else{if(bd.value==="validthis"){if(aC["(global)"]){aI("Option 'validthis' can't be used in a global scope.");}else{if(ax.value==="true"||ax.value==="false"){bf[bd.value]=ax.value==="true";
}else{aI("Bad option value.",ax);}}}else{if(ax.value==="true"){bf[bd.value]=true;}else{if(ax.value==="false"){bf[bd.value]=false;}else{aI("Bad option value.",ax);
}}}}}}bd=am.token();}else{if(bg==="/*jshint"||bg==="/*jslint"){aI("Missing option value.",bd);}bf[bd.value]=false;bd=ax;}}if(be){ai();}}function aP(be){var bd=be||0,F=0,ax;
while(F<=bd){ax=N[F];if(!ax){ax=N[F]=am.token();}F+=1;}return ax;}function af(ax,F){switch(aE.id){case"(number)":if(o.id==="."){an("A dot following a number can be confused with a decimal point.",aE);
}break;case"-":if(o.id==="-"||o.id==="--"){an("Confusing minusses.");}break;case"+":if(o.id==="+"||o.id==="++"){an("Confusing plusses.");}break;}if(aE.type==="(string)"||aE.identifier){aY=aE.value;
}if(ax&&o.id!==ax){if(F){if(o.id==="(end)"){an("Unmatched '{a}'.",F,F.id);}else{an("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",o,ax,F.id,F.line,o.value);
}}else{if(o.type!=="(identifier)"||o.value!==ax){an("Expected '{a}' and instead saw '{b}'.",o,ax,o.value);}}}aO=aE;aE=o;for(;;){o=N.shift()||am.token();
if(o.id==="(end)"||o.id==="(error)"){return;}if(o.type==="special"){z();}else{if(o.id!=="(endline)"){break;}}}}function aG(bd,be){var bf,ax=false,F=false;
if(o.id==="(end)"){aI("Unexpected early end of program.",aE);}af();if(be){aY="anonymous";aC["(verb)"]=aE.value;}if(be===true&&aE.fud){bf=aE.fud();}else{if(aE.nud){bf=aE.nud();
}else{if(o.type==="(number)"&&aE.id==="."){an("A leading decimal point can be confused with a dot: '.{a}'.",aE,o.value);af();return aE;}else{aI("Expected an identifier and instead saw '{a}'.",aE,aE.id);
}}while(bd<o.lbp){ax=aE.value==="Array";F=aE.value==="Object";af();if(ax&&aE.id==="("&&o.id===")"){an("Use the array literal notation [].",aE);}if(F&&aE.id==="("&&o.id===")"){an("Use the object literal notation {}.",aE);
}if(aE.led){bf=aE.led(bf);}else{aI("Expected an operator and instead saw '{a}'.",aE,aE.id);}}}return bf;}function av(ax,F){ax=ax||aE;F=F||o;if(W.white){if(ax.character!==F.from&&ax.line===F.line){ax.from+=(ax.character-ax.from);
an("Unexpected space after '{a}'.",ax,ax.value);}}}function aL(ax,F){ax=ax||aE;F=F||o;if(W.white&&(ax.character!==F.from||ax.line!==F.line)){an("Unexpected space before '{a}'.",F,F.value);
}}function U(ax,F){ax=ax||aE;F=F||o;if(W.white&&!ax.comment){if(ax.line===F.line){av(ax,F);}}}function T(ax,F){if(W.white){ax=ax||aE;F=F||o;if(ax.line===F.line&&ax.character===F.from){ax.from+=(ax.character-ax.from);
an("Missing space after '{a}'.",ax,ax.value);}}}function ak(ax,F){ax=ax||aE;F=F||o;if(!W.laxbreak&&ax.line!==F.line){an("Bad line breaking before '{a}'.",F,F.id);
}else{if(W.white){ax=ax||aE;F=F||o;if(ax.character===F.from){ax.from+=(ax.character-ax.from);an("Missing space after '{a}'.",ax,ax.value);}}}}function f(F){var ax;
if(W.white&&o.id!=="(end)"){ax=ap+(F||0);if(o.from!==ax){an("Expected '{a}' to have an indentation at {b} instead at {c}.",o,o.value,ax,o.from);}}}function a9(F){F=F||aE;
if(F.line!==o.line){an("Line breaking error '{a}'.",F,F.value);}}function ao(){if(aE.line!==o.line){if(!W.laxcomma){if(ao.first){an("Comma warnings can be turned off with 'laxcomma'");
ao.first=false;}an("Bad line breaking before '{a}'.",aE,o.id);}}else{if(!aE.comment&&aE.character!==o.from&&W.white){aE.from+=(aE.character-aE.from);an("Unexpected space after '{a}'.",aE,aE.value);
}}af(",");T(aE,o);}function R(ax,bd){var F=e[ax];if(!F||typeof F!=="object"){e[ax]=F={id:ax,lbp:bd,value:ax};}return F;}function aN(F){return R(F,0);}function k(ax,bd){var F=aN(ax);
F.identifier=F.reserved=true;F.fud=bd;return F;}function a0(ax,bd){var F=k(ax,bd);F.block=true;return F;}function E(F){var ax=F.id.charAt(0);if((ax>="a"&&ax<="z")||(ax>="A"&&ax<="Z")){F.identifier=F.reserved=true;
}return F;}function aJ(ax,bd){var F=R(ax,150);E(F);F.nud=(typeof bd==="function")?bd:function(){this.right=aG(150);this.arity="unary";if(this.id==="++"||this.id==="--"){if(W.plusplus){an("Unexpected use of '{a}'.",this,this.id);
}else{if((!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!=="["){an("Bad operand.",this);}}}return this;};return F;}function ad(ax,bd){var F=aN(ax);
F.type=ax;F.nud=bd;return F;}function t(ax,bd){var F=ad(ax,bd);F.identifier=F.reserved=true;return F;}function X(ax,F){return t(ax,function(){if(typeof F==="function"){F(this);
}return this;});}function A(bd,be,bf,ax){var F=R(bd,bf);E(F);F.led=function(bg){if(!ax){ak(aO,aE);T(aE,o);}if(bd==="in"&&bg.id==="!"){an("Confusing use of '{a}'.",bg,"!");
}if(typeof be==="function"){return be(bg,this);}else{this.left=bg;this.right=aG(bf);return this;}};return F;}function a4(ax,bd){var F=R(ax,100);F.led=function(bf){ak(aO,aE);
T(aE,o);var be=aG(100);if((bf&&bf.id==="NaN")||(be&&be.id==="NaN")){an("Use the isNaN function to compare with NaN.",this);}else{if(bd){bd.apply(this,[bf,be]);
}}if(bf.id==="!"){an("Confusing use of '{a}'.",bf,"!");}if(be.id==="!"){an("Confusing use of '{a}'.",be,"!");}this.left=bf;this.right=be;return this;};
return F;}function bb(F){return F&&((F.type==="(number)"&&+F.value===0)||(F.type==="(string)"&&F.value==="")||(F.type==="null"&&!W.eqnull)||F.type==="true"||F.type==="false"||F.type==="undefined");
}function aj(F,ax){R(F,20).exps=true;return A(F,function(bf,be){var bd;be.left=bf;if(a1[bf.value]===false&&aF[bf.value]["(global)"]===true){an("Read only.",bf);
}else{if(bf["function"]){an("'{a}' is a function.",bf,bf.value);}}if(bf){if(W.esnext&&aC[bf.value]==="const"){an("Attempting to override '{a}' which is a constant",bf,bf.value);
}if(bf.id==="."||bf.id==="["){if(!bf.left||bf.left.value==="arguments"){an("Bad assignment.",be);}be.right=aG(19);return be;}else{if(bf.identifier&&!bf.reserved){if(aC[bf.value]==="exception"){an("Do not assign to the exception parameter.",bf);
}be.right=aG(19);return be;}}if(bf===e["function"]){an("Expected an identifier in an assignment and instead saw a function invocation.",aE);}}aI("Bad assignment.",be);
},20);}function aB(ax,bd,be){var F=R(ax,be);E(F);F.led=(typeof bd==="function")?bd:function(bf){if(W.bitwise){an("Unexpected use of '{a}'.",this,this.id);
}this.left=bf;this.right=aG(be);return this;};return F;}function m(F){R(F,20).exps=true;return A(F,function(bd,ax){if(W.bitwise){an("Unexpected use of '{a}'.",ax,ax.id);
}T(aO,aE);T(aE,o);if(bd){if(bd.id==="."||bd.id==="["||(bd.identifier&&!bd.reserved)){aG(19);return ax;}if(bd===e["function"]){an("Expected an identifier in an assignment, and instead saw a function invocation.",aE);
}return ax;}aI("Bad assignment.",ax);},20);}function az(ax,bd){var F=R(ax,150);F.led=function(be){if(W.plusplus){an("Unexpected use of '{a}'.",this,this.id);
}else{if((!be.identifier||be.reserved)&&be.id!=="."&&be.id!=="["){an("Bad operand.",this);}}this.left=be;return this;};return F;}function p(F){if(o.identifier){af();
if(aE.reserved&&!W.es5){if(!F||aE.value!=="undefined"){an("Expected an identifier and instead saw '{a}' (a reserved word).",aE,aE.id);}}return aE.value;
}}function ah(F){var ax=p(F);if(ax){return ax;}if(aE.id==="function"&&o.id==="("){an("Missing name in function declaration.");}else{aI("Expected an identifier and instead saw '{a}'.",o,o.value);
}}function Z(bd){var ax=0,F;if(o.id!==";"||G){return;}for(;;){F=aP(ax);if(F.reach){return;}if(F.id!=="(endline)"){if(F.id==="function"){if(!W.latedef){break;
}an("Inner functions should be listed at the top of the outer function.",F);break;}an("Unreachable '{a}' after '{b}'.",F,F.value,bd);break;}ax+=1;}}function a7(bf){var ax=ap,be,bd=aF,F=o;
if(F.id===";"){af(";");return;}if(F.identifier&&!F.reserved&&aP().id===":"){af();af(":");aF=Object.create(bd);x(F.value,"label");if(!o.labelled){an("Label '{a}' on {b} statement.",o,F.value,o.value);
}if(y.test(F.value+":")){an("Label '{a}' looks like a javascript url.",F,F.value);}o.label=F.value;F=o;}if(!bf){f();}be=aG(0,true);if(!F.block){if(!W.expr&&(!be||!be.exps)){an("Expected an assignment or function call and instead saw an expression.",aE);
}else{if(W.nonew&&be.id==="("&&be.left.id==="new"){an("Do not use 'new' for side effects.");}}if(o.id===","){return ao();}if(o.id!==";"){if(!W.asi){if(!W.lastsemic||o.id!=="}"||o.line!==aE.line){ac("Missing semicolon.",aE.line,aE.character);
}}}else{av(aE,o);af(";");T(aE,o);}}ap=ax;aF=bd;return be;}function aK(be){var F=[],ax,bd;while(!o.reach&&o.id!=="(end)"){if(o.id===";"){bd=aP();if(!bd||bd.id!=="("){an("Unnecessary semicolon.");
}af(";");}else{F.push(a7(be===o.line));}}return F;}function aZ(){var ax,bd,F;for(;;){if(o.id==="(string)"){bd=aP(0);if(bd.id==="(endline)"){ax=1;do{F=aP(ax);
ax=ax+1;}while(F.id==="(endline)");if(F.id!==";"){if(F.id!=="(string)"&&F.id!=="(number)"&&F.id!=="(regexp)"&&F.identifier!==true&&F.id!=="}"){break;}an("Missing semicolon.",o);
}else{bd=F;}}else{if(bd.id==="}"){an("Missing semicolon.",bd);}else{if(bd.id!==";"){break;}}}f();af();if(aA[aE.value]){an('Unnecessary directive "{a}".',aE,aE.value);
}if(aE.value==="use strict"){W.newcap=true;W.undef=true;}aA[aE.value]=true;if(bd.id===";"){af(";");}continue;}break;}}function H(bi,ax,be){var bh,bg=aD,F=ap,bd,bl=aF,bj,bk,bf;
aD=bi;if(!bi||!W.funcscope){aF=Object.create(aF);}T(aE,o);bj=o;if(o.id==="{"){af("{");bk=aE.line;if(o.id!=="}"){ap+=W.indent;while(!bi&&o.from>ap){ap+=W.indent;
}if(be){bd={};for(bf in aA){if(aR(aA,bf)){bd[bf]=aA[bf];}}aZ();if(W.strict&&aC["(context)"]["(global)"]){if(!bd["use strict"]&&!aA["use strict"]){an('Missing "use strict" statement.');
}}}bh=aK(bk);if(be){aA=bd;}ap-=W.indent;if(bk!==o.line){f();}}else{if(bk!==o.line){f();}}af("}",bj);ap=F;}else{if(!bi){aI("Expected '{a}' and instead saw '{b}'.",o,"{",o.value);
}else{if(!ax||W.curly){an("Expected '{a}' and instead saw '{b}'.",o,"{",o.value);}G=true;ap+=W.indent;bh=[a7(o.line===aE.line)];ap-=W.indent;G=false;}}aC["(verb)"]=null;
if(!bi||!W.funcscope){aF=bl;}aD=bg;if(bi&&W.noempty&&(!bh||bh.length===0)){an("Empty block.");}return bh;}function l(F){if(aT&&typeof aT[F]!=="boolean"){an("Unexpected /*member '{a}'.",aE,F);
}if(typeof aH[F]==="number"){aH[F]+=1;}else{aH[F]=1;}}function a2(be){var bd=be.value,ax=be.line,F=aS[bd];if(typeof F==="function"){F=false;}if(!F){F=[ax];
aS[bd]=F;}else{if(F[F.length-1]!==ax){F.push(ax);}}}ad("(number)",function(){return this;});ad("(string)",function(){return this;});e["(identifier)"]={type:"(identifier)",lbp:0,identifier:true,nud:function(){var F=this.value,ax=aF[F],bd;
if(typeof ax==="function"){ax=undefined;}else{if(typeof ax==="boolean"){bd=aC;aC=C[0];x(F,"var");ax=aC;aC=bd;}}if(aC===ax){switch(aC[F]){case"unused":aC[F]="var";
break;case"unction":aC[F]="function";this["function"]=true;break;case"function":this["function"]=true;break;case"label":an("'{a}' is a statement label.",aE,F);
break;}}else{if(aC["(global)"]){if(W.undef&&typeof a1[F]!=="boolean"){if(!(aY==="typeof"||aY==="delete")||(o&&(o.value==="."||o.value==="["))){g(aC,"'{a}' is not defined.",aE,F);
}}a2(aE);}else{switch(aC[F]){case"closure":case"function":case"var":case"unused":an("'{a}' used out of scope.",aE,F);break;case"label":an("'{a}' is a statement label.",aE,F);
break;case"outer":case"global":break;default:if(ax===true){aC[F]=true;}else{if(ax===null){an("'{a}' is not allowed.",aE,F);a2(aE);}else{if(typeof ax!=="object"){if(W.undef){if(!(aY==="typeof"||aY==="delete")||(o&&(o.value==="."||o.value==="["))){g(aC,"'{a}' is not defined.",aE,F);
}}aC[F]=true;a2(aE);}else{switch(ax[F]){case"function":case"unction":this["function"]=true;ax[F]="closure";aC[F]=ax["(global)"]?"global":"outer";break;
case"var":case"unused":ax[F]="closure";aC[F]=ax["(global)"]?"global":"outer";break;case"closure":case"parameter":aC[F]=ax["(global)"]?"global":"outer";
break;case"label":an("'{a}' is a statement label.",aE,F);}}}}}}}return this;},led:function(){aI("Expected an operator and instead saw '{a}'.",o,o.value);
}};ad("(regexp)",function(){return this;});aN("(endline)");aN("(begin)");aN("(end)").reach=true;aN("</").reach=true;aN("<!");aN("<!--");aN("-->");aN("(error)").reach=true;
aN("}").reach=true;aN(")");aN("]");aN('"').reach=true;aN("'").reach=true;aN(";");aN(":").reach=true;aN(",");aN("#");aN("@");t("else");t("case").reach=true;
t("catch");t("default").reach=true;t("finally");X("arguments",function(F){if(aA["use strict"]&&aC["(global)"]){an("Strict violation.",F);}});X("eval");
X("false");X("Infinity");X("NaN");X("null");X("this",function(F){if(aA["use strict"]&&!W.validthis&&((aC["(statement)"]&&aC["(name)"].charAt(0)>"Z")||aC["(global)"])){an("Possible strict violation.",F);
}});X("true");X("undefined");aj("=","assign",20);aj("+=","assignadd",20);aj("-=","assignsub",20);aj("*=","assignmult",20);aj("/=","assigndiv",20).nud=function(){aI("A regular expression literal can be confused with '/='.");
};aj("%=","assignmod",20);m("&=","assignbitand",20);m("|=","assignbitor",20);m("^=","assignbitxor",20);m("<<=","assignshiftleft",20);m(">>=","assignshiftright",20);
m(">>>=","assignshiftrightunsigned",20);A("?",function(ax,F){F.left=ax;F.right=aG(10);af(":");F["else"]=aG(10);return F;},30);A("||","or",40);A("&&","and",50);
aB("|","bitor",70);aB("^","bitxor",80);aB("&","bitand",90);a4("==",function(ax,F){var bd=W.eqnull&&(ax.value==="null"||F.value==="null");if(!bd&&W.eqeqeq){an("Expected '{a}' and instead saw '{b}'.",this,"===","==");
}else{if(bb(ax)){an("Use '{a}' to compare with '{b}'.",this,"===",ax.value);}else{if(bb(F)){an("Use '{a}' to compare with '{b}'.",this,"===",F.value);}}}return this;
});a4("===");a4("!=",function(ax,F){var bd=W.eqnull&&(ax.value==="null"||F.value==="null");if(!bd&&W.eqeqeq){an("Expected '{a}' and instead saw '{b}'.",this,"!==","!=");
}else{if(bb(ax)){an("Use '{a}' to compare with '{b}'.",this,"!==",ax.value);}else{if(bb(F)){an("Use '{a}' to compare with '{b}'.",this,"!==",F.value);}}}return this;
});a4("!==");a4("<");a4(">");a4("<=");a4(">=");aB("<<","shiftleft",120);aB(">>","shiftright",120);aB(">>>","shiftrightunsigned",120);A("in","in",120);A("instanceof","instanceof",120);
A("+",function(bd,ax){var F=aG(130);if(bd&&F&&bd.id==="(string)"&&F.id==="(string)"){bd.value+=F.value;bd.character=F.character;if(!W.scripturl&&y.test(bd.value)){an("JavaScript URL.",bd);
}return bd;}ax.left=bd;ax.right=F;return ax;},130);aJ("+","num");aJ("+++",function(){an("Confusing pluses.");this.right=aG(150);this.arity="unary";return this;
});A("+++",function(F){an("Confusing pluses.");this.left=F;this.right=aG(130);return this;},130);A("-","sub",130);aJ("-","neg");aJ("---",function(){an("Confusing minuses.");
this.right=aG(150);this.arity="unary";return this;});A("---",function(F){an("Confusing minuses.");this.left=F;this.right=aG(130);return this;},130);A("*","mult",140);
A("/","div",140);A("%","mod",140);az("++","postinc");aJ("++","preinc");e["++"].exps=true;az("--","postdec");aJ("--","predec");e["--"].exps=true;aJ("delete",function(){var F=aG(0);
if(!F||(F.id!=="."&&F.id!=="[")){an("Variables should not be deleted.");}this.first=F;return this;}).exps=true;aJ("~",function(){if(W.bitwise){an("Unexpected '{a}'.",this,"~");
}aG(150);return this;});aJ("!",function(){this.right=aG(150);this.arity="unary";if(v[this.right.id]===true){an("Confusing use of '{a}'.",this,"!");}return this;
});aJ("typeof","typeof");aJ("new",function(){var ax=aG(155),F;if(ax&&ax.id!=="function"){if(ax.identifier){ax["new"]=true;switch(ax.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":an("Do not use {a} as a constructor.",aE,ax.value);
break;case"Function":if(!W.evil){an("The Function constructor is eval.");}break;case"Date":case"RegExp":break;default:if(ax.id!=="function"){F=ax.value.substr(0,1);
if(W.newcap&&(F<"A"||F>"Z")){an("A constructor name should start with an uppercase letter.",aE);}}}}else{if(ax.id!=="."&&ax.id!=="["&&ax.id!=="("){an("Bad constructor.",aE);
}}}else{if(!W.supernew){an("Weird construction. Delete 'new'.",this);}}av(aE,o);if(o.id!=="("&&!W.supernew){an("Missing '()' invoking a constructor.");
}this.first=ax;return this;});e["new"].exps=true;aJ("void").exps=true;A(".",function(bd,ax){av(aO,aE);aL();var F=ah();if(typeof F==="string"){l(F);}ax.left=bd;
ax.right=F;if(bd&&bd.value==="arguments"&&(F==="callee"||F==="caller")){if(W.noarg){an("Avoid arguments.{a}.",bd,F);}else{if(aA["use strict"]){aI("Strict violation.");
}}}else{if(!W.evil&&bd&&bd.value==="document"&&(F==="write"||F==="writeln")){an("document.write can be a form of eval.",bd);}}if(!W.evil&&(F==="eval"||F==="execScript")){an("eval is evil.");
}return ax;},160,true);A("(",function(bd,F){if(aO.id!=="}"&&aO.id!==")"){aL(aO,aE);}U();if(W.immed&&!bd.immed&&bd.id==="function"){an("Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.");
}var be=0,ax=[];if(bd){if(bd.type==="(identifier)"){if(bd.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)){if(bd.value!=="Number"&&bd.value!=="String"&&bd.value!=="Boolean"&&bd.value!=="Date"){if(bd.value==="Math"){an("Math is not a function.",bd);
}else{if(W.newcap){an("Missing 'new' prefix when invoking a constructor.",bd);}}}}}}if(o.id!==")"){for(;;){ax[ax.length]=aG(10);be+=1;if(o.id!==","){break;
}ao();}}af(")");U(aO,aE);if(typeof bd==="object"){if(bd.value==="parseInt"&&be===1){an("Missing radix parameter.",bd);}if(!W.evil){if(bd.value==="eval"||bd.value==="Function"||bd.value==="execScript"){an("eval is evil.",bd);
}else{if(ax[0]&&ax[0].id==="(string)"&&(bd.value==="setTimeout"||bd.value==="setInterval")){an("Implied eval is evil. Pass a function instead of a string.",bd);
}}}if(!bd.identifier&&bd.id!=="."&&bd.id!=="["&&bd.id!=="("&&bd.id!=="&&"&&bd.id!=="||"&&bd.id!=="?"){an("Bad invocation.",bd);}}F.left=bd;return F;},155,true).exps=true;
aJ("(",function(){U();if(o.id==="function"){o.immed=true;}var F=aG(0);af(")",this);U(aO,aE);if(W.immed&&F.id==="function"){if(o.id==="("||(o.id==="."&&(aP().value==="call"||aP().value==="apply"))){an("Move the invocation into the parens that contain the function.",o);
}else{an("Do not wrap function literals in parens unless they are to be immediately invoked.",this);}}return F;});A("[",function(be,ax){aL(aO,aE);U();var bd=aG(0),F;
if(bd&&bd.type==="(string)"){if(!W.evil&&(bd.value==="eval"||bd.value==="execScript")){an("eval is evil.",ax);}l(bd.value);if(!W.sub&&O.test(bd.value)){F=e[bd.value];
if(!F||!F.reserved){an("['{a}'] is better written in dot notation.",bd,bd.value);}}}af("]",ax);U(aO,aE);ax.left=be;ax.right=bd;return ax;},160,true);aJ("[",function(){var F=aE.line!==o.line;
this.first=[];if(F){ap+=W.indent;if(o.from===ap+W.indent){ap+=W.indent;}}while(o.id!=="(end)"){while(o.id===","){an("Extra comma.");af(",");}if(o.id==="]"){break;
}if(F&&aE.line!==o.line){f();}this.first.push(aG(10));if(o.id===","){ao();if(o.id==="]"&&!W.es5){an("Extra comma.",aE);break;}}else{break;}}if(F){ap-=W.indent;
f();}af("]",this);return this;},160);function j(){var F=p(true);if(!F){if(o.id==="(string)"){F=o.value;af();}else{if(o.id==="(number)"){F=o.value.toString();
af();}}}return F;}function Q(){var ax,F=o,bd=[];af("(");U();if(o.id===")"){af(")");return;}for(;;){ax=ah(true);bd.push(ax);x(ax,"parameter");if(o.id===","){ao();
}else{af(")",F);U(aO,aE);return bd;}}}function L(bd,be){var bf,ax=W,F=aF;W=Object.create(W);aF=Object.create(aF);aC={"(name)":bd||'"'+aY+'"',"(line)":o.line,"(context)":aC,"(breakage)":0,"(loopage)":0,"(scope)":aF,"(statement)":be};
bf=aC;aE.funct=aC;C.push(aC);if(bd){x(bd,"function");}aC["(params)"]=Q();H(false,false,true);aF=F;W=ax;aC["(last)"]=aE.line;aC=aC["(context)"];return bf;
}(function(F){F.nud=function(){var bl,bi,bh,bg,bd,bm;var bk={};function be(bn,bo){if(bk[bn]&&aR(bk,bn)){an("Duplicate member '{a}'.",o,bh);}else{bk[bn]={};
}bk[bn].basic=true;bk[bn].basicToken=bo;}function bf(bn,bo){if(bk[bn]&&aR(bk,bn)){if(bk[bn].basic||bk[bn].setter){an("Duplicate member '{a}'.",o,bh);}}else{bk[bn]={};
}bk[bn].setter=true;bk[bn].setterToken=bo;}function bj(bn){if(bk[bn]&&aR(bk,bn)){if(bk[bn].basic||bk[bn].getter){an("Duplicate member '{a}'.",o,bh);}}else{bk[bn]={};
}bk[bn].getter=true;bk[bn].getterToken=aE;}bl=aE.line!==o.line;if(bl){ap+=W.indent;if(o.from===ap+W.indent){ap+=W.indent;}}for(;;){if(o.id==="}"){break;
}if(bl){f();}if(o.value==="get"&&aP().id!==":"){af("get");if(!W.es5){aI("get/set are ES5 features.");}bh=j();if(!bh){aI("Missing property name.");}bj(bh);
bm=o;av(aE,o);bi=L();bd=bi["(params)"];if(bd){an("Unexpected parameter '{a}' in get {b} function.",bm,bd[0],bh);}av(aE,o);}else{if(o.value==="set"&&aP().id!==":"){af("set");
if(!W.es5){aI("get/set are ES5 features.");}bh=j();if(!bh){aI("Missing property name.");}bf(bh,o);bm=o;av(aE,o);bi=L();bd=bi["(params)"];if(!bd||bd.length!==1){an("Expected a single parameter in set {a} function.",bm,bh);
}}else{bh=j();be(bh,o);if(typeof bh!=="string"){break;}af(":");T(aE,o);aG(10);}}l(bh);if(o.id===","){ao();if(o.id===","){an("Extra comma.",aE);}else{if(o.id==="}"&&!W.es5){an("Extra comma.",aE);
}}}else{break;}}if(bl){ap-=W.indent;f();}af("}",this);if(W.es5){for(var ax in bk){if(aR(bk,ax)&&bk[ax].setter&&!bk[ax].getter){an("Setter is defined without getter.",bk[ax].setterToken);
}}}return this;};F.fud=function(){aI("Expected to see a statement and instead saw a block.",aE);};}(aN("{")));P=function(){var F=k("const",function(be){var bf,ax,bd;
this.first=[];for(;;){T(aE,o);bf=ah();if(aC[bf]==="const"){an("const '"+bf+"' has already been declared");}if(aC["(global)"]&&a1[bf]===false){an("Redefinition of '{a}'.",aE,bf);
}x(bf,"const");if(be){break;}ax=aE;this.first.push(aE);if(o.id!=="="){an("const '{a}' is initialized to 'undefined'.",aE,bf);}if(o.id==="="){T(aE,o);af("=");
T(aE,o);if(o.id==="undefined"){an("It is not necessary to initialize '{a}' to 'undefined'.",aE,bf);}if(aP(0).id==="="&&o.identifier){aI("Constant {a} was not declared correctly.",o,o.value);
}bd=aG(0);ax.first=bd;}if(o.id!==","){break;}ao();}return this;});F.exps=true;};var aQ=k("var",function(bd){var be,F,ax;if(aC["(onevar)"]&&W.onevar){an("Too many var statements.");
}else{if(!aC["(global)"]){aC["(onevar)"]=true;}}this.first=[];for(;;){T(aE,o);be=ah();if(W.esnext&&aC[be]==="const"){an("const '"+be+"' has already been declared");
}if(aC["(global)"]&&a1[be]===false){an("Redefinition of '{a}'.",aE,be);}x(be,"unused");if(bd){break;}F=aE;this.first.push(aE);if(o.id==="="){T(aE,o);af("=");
T(aE,o);if(o.id==="undefined"){an("It is not necessary to initialize '{a}' to 'undefined'.",aE,be);}if(aP(0).id==="="&&o.identifier){aI("Variable {a} was not declared correctly.",o,o.value);
}ax=aG(0);F.first=ax;}if(o.id!==","){break;}ao();}return this;});aQ.exps=true;a0("function",function(){if(aD){an("Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",aE);
}var F=ah();if(W.esnext&&aC[F]==="const"){an("const '"+F+"' has already been declared");}av(aE,o);x(F,"unction");L(F,true);if(o.id==="("&&o.line===aE.line){aI("Function declarations are not invocable. Wrap the whole function invocation in parens.");
}return this;});aJ("function",function(){var F=p();if(F){av(aE,o);}else{T(aE,o);}L(F);if(!W.loopfunc&&aC["(loopage)"]){an("Don't make functions within a loop.");
}return this;});a0("if",function(){var F=o;af("(");T(this,F);U();aG(20);if(o.id==="="){if(!W.boss){an("Expected a conditional expression and instead saw an assignment.");
}af("=");aG(20);}af(")",F);U(aO,aE);H(true,true);if(o.id==="else"){T(aE,o);af("else");if(o.id==="if"||o.id==="switch"){a7(true);}else{H(true,true);}}return this;
});a0("try",function(){var F,bd,ax;H(false);if(o.id==="catch"){af("catch");T(aE,o);af("(");ax=aF;aF=Object.create(ax);bd=o.value;if(o.type!=="(identifier)"){an("Expected an identifier and instead saw '{a}'.",o,bd);
}else{x(bd,"exception");}af();af(")");H(false);F=true;aF=ax;}if(o.id==="finally"){af("finally");H(false);return;}else{if(!F){aI("Expected '{a}' and instead saw '{b}'.",o,"catch",o.value);
}}return this;});a0("while",function(){var F=o;aC["(breakage)"]+=1;aC["(loopage)"]+=1;af("(");T(this,F);U();aG(20);if(o.id==="="){if(!W.boss){an("Expected a conditional expression and instead saw an assignment.");
}af("=");aG(20);}af(")",F);U(aO,aE);H(true,true);aC["(breakage)"]-=1;aC["(loopage)"]-=1;return this;}).labelled=true;a0("with",function(){var F=o;if(aA["use strict"]){aI("'with' is not allowed in strict mode.",aE);
}else{if(!W.withstmt){an("Don't use 'with'.",aE);}}af("(");T(this,F);U();aG(0);af(")",F);U(aO,aE);H(true,true);return this;});a0("switch",function(){var F=o,ax=false;
aC["(breakage)"]+=1;af("(");T(this,F);U();this.condition=aG(20);af(")",F);U(aO,aE);T(aE,o);F=o;af("{");T(aE,o);ap+=W.indent;this.cases=[];for(;;){switch(o.id){case"case":switch(aC["(verb)"]){case"break":case"case":case"continue":case"return":case"switch":case"throw":break;
default:if(!aV.test(a6[o.line-2])){an("Expected a 'break' statement before 'case'.",aE);}}f(-W.indent);af("case");this.cases.push(aG(20));ax=true;af(":");
aC["(verb)"]="case";break;case"default":switch(aC["(verb)"]){case"break":case"continue":case"return":case"throw":break;default:if(!aV.test(a6[o.line-2])){an("Expected a 'break' statement before 'default'.",aE);
}}f(-W.indent);af("default");ax=true;af(":");break;case"}":ap-=W.indent;f();af("}",F);if(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false"){if(!W.onecase){an("This 'switch' should be an 'if'.",this);
}}aC["(breakage)"]-=1;aC["(verb)"]=undefined;return;case"(end)":aI("Missing '{a}'.",o,"}");return;default:if(ax){switch(aE.id){case",":aI("Each value should have its own case label.");
return;case":":ax=false;aK();break;default:aI("Missing ':' on a case clause.",aE);return;}}else{if(aE.id===":"){af(":");aI("Unexpected '{a}'.",aE,":");
aK();}else{aI("Expected '{a}' and instead saw '{b}'.",o,"case",o.value);return;}}}}}).labelled=true;k("debugger",function(){if(!W.debug){an("All 'debugger' statements should be removed.");
}return this;}).exps=true;(function(){var F=k("do",function(){aC["(breakage)"]+=1;aC["(loopage)"]+=1;this.first=H(true);af("while");var ax=o;T(aE,ax);af("(");
U();aG(20);if(o.id==="="){if(!W.boss){an("Expected a conditional expression and instead saw an assignment.");}af("=");aG(20);}af(")",ax);U(aO,aE);aC["(breakage)"]-=1;
aC["(loopage)"]-=1;return this;});F.labelled=true;F.exps=true;}());a0("for",function(){var ax,F=o;aC["(breakage)"]+=1;aC["(loopage)"]+=1;af("(");T(this,F);
U();if(aP(o.id==="var"?1:0).id==="in"){if(o.id==="var"){af("var");aQ.fud.call(aQ,true);}else{switch(aC[o.value]){case"unused":aC[o.value]="var";break;case"var":break;
default:an("Bad for in variable '{a}'.",o,o.value);}af();}af("in");aG(20);af(")",F);ax=H(true,true);if(W.forin&&ax&&(ax.length>1||typeof ax[0]!=="object"||ax[0].value!=="if")){an("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this);
}aC["(breakage)"]-=1;aC["(loopage)"]-=1;return this;}else{if(o.id!==";"){if(o.id==="var"){af("var");aQ.fud.call(aQ);}else{for(;;){aG(0,"for");if(o.id!==","){break;
}ao();}}}a9(aE);af(";");if(o.id!==";"){aG(20);if(o.id==="="){if(!W.boss){an("Expected a conditional expression and instead saw an assignment.");}af("=");
aG(20);}}a9(aE);af(";");if(o.id===";"){aI("Expected '{a}' and instead saw '{b}'.",o,")",";");}if(o.id!==")"){for(;;){aG(0,"for");if(o.id!==","){break;}ao();
}}af(")",F);U(aO,aE);H(true,true);aC["(breakage)"]-=1;aC["(loopage)"]-=1;return this;}}).labelled=true;k("break",function(){var F=o.value;if(aC["(breakage)"]===0){an("Unexpected '{a}'.",o,this.value);
}if(!W.asi){a9(this);}if(o.id!==";"){if(aE.line===o.line){if(aC[F]!=="label"){an("'{a}' is not a statement label.",o,F);}else{if(aF[F]!==aC){an("'{a}' is out of scope.",o,F);
}}this.first=o;af();}}Z("break");return this;}).exps=true;k("continue",function(){var F=o.value;if(aC["(breakage)"]===0){an("Unexpected '{a}'.",o,this.value);
}if(!W.asi){a9(this);}if(o.id!==";"){if(aE.line===o.line){if(aC[F]!=="label"){an("'{a}' is not a statement label.",o,F);}else{if(aF[F]!==aC){an("'{a}' is out of scope.",o,F);
}}this.first=o;af();}}else{if(!aC["(loopage)"]){an("Unexpected '{a}'.",o,this.value);}}Z("continue");return this;}).exps=true;k("return",function(){if(this.line===o.line){if(o.id==="(regexp)"){an("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");
}if(o.id!==";"&&!o.reach){T(aE,o);if(aP().value==="="&&!W.boss){ac("Did you mean to return a conditional instead of an assignment?",aE.line,aE.character+1);
}this.first=aG(0);}}else{if(!W.asi){a9(this);}}Z("return");return this;}).exps=true;k("throw",function(){a9(this);T(aE,o);this.first=aG(20);Z("throw");
return this;}).exps=true;t("class");t("const");t("enum");t("export");t("extends");t("import");t("super");t("let");t("yield");t("implements");t("interface");
t("package");t("private");t("protected");t("public");t("static");function s(){function F(){var be={},bd=o;af("{");if(o.id!=="}"){for(;;){if(o.id==="(end)"){aI("Missing '}' to match '{' from line {a}.",o,bd.line);
}else{if(o.id==="}"){an("Unexpected comma.",aE);break;}else{if(o.id===","){aI("Unexpected comma.",o);}else{if(o.id!=="(string)"){an("Expected a string and instead saw {a}.",o,o.value);
}}}}if(be[o.value]===true){an("Duplicate key '{a}'.",o,o.value);}else{if((o.value==="__proto__"&&!W.proto)||(o.value==="__iterator__"&&!W.iterator)){an("The '{a}' key may produce unexpected results.",o,o.value);
}else{be[o.value]=true;}}af();af(":");s();if(o.id!==","){break;}af(",");}}af("}");}function ax(){var bd=o;af("[");if(o.id!=="]"){for(;;){if(o.id==="(end)"){aI("Missing ']' to match '[' from line {a}.",o,bd.line);
}else{if(o.id==="]"){an("Unexpected comma.",aE);break;}else{if(o.id===","){aI("Unexpected comma.",o);}}}s();if(o.id!==","){break;}af(",");}}af("]");}switch(o.id){case"{":F();
break;case"[":ax();break;case"true":case"false":case"null":case"(number)":case"(string)":af();break;case"-":af("-");if(aE.character!==o.from){an("Unexpected space after '-'.",aE);
}av(aE,o);af("(number)");break;default:aI("Expected a JSON value.",o);}}var K=function(bl,ax,bf){var bk,be,bd;a.errors=[];a.undefs=[];a1=Object.create(a5);
ba(a1,bf||{});if(ax){bk=ax.predef;if(bk){if(Array.isArray(bk)){for(be=0;be<bk.length;be+=1){a1[bk[be]]=true;}}else{if(typeof bk==="object"){bd=Object.keys(bk);
for(be=0;be<bd.length;be+=1){a1[bd[be]]=!!bk[bd[be]];}}}}W=ax;}else{W={};}W.indent=W.indent||4;W.maxerr=W.maxerr||50;q="";for(be=0;be<W.indent;be+=1){q+=" ";
}ap=1;D=Object.create(a1);aF=D;aC={"(global)":true,"(name)":"(global)","(scope)":aF,"(breakage)":0,"(loopage)":0};C=[aC];V=[];ay=null;aH={};aT=null;aS={};
aD=false;N=[];n=false;B=0;am.init(bl);u=true;aA={};aO=aE=o=e["(begin)"];for(var F in ax){if(aR(ax,F)){a3(F,aE);}}ai();ba(a1,bf||{});ao.first=true;try{af();
switch(o.id){case"{":case"[":W.laxbreak=true;n=true;s();break;default:aZ();if(aA["use strict"]&&!W.globalstrict){an('Use the function form of "use strict".',aO);
}aK();}af("(end)");var bg=function(bm,bn){do{if(typeof bn[bm]==="string"){if(bn[bm]==="unused"){bn[bm]="var";}else{if(bn[bm]==="unction"){bn[bm]="closure";
}}return true;}bn=bn["(context)"];}while(bn);return false;};var bj=function(bn,bm){if(!aS[bn]){return;}var bp=[];for(var bo=0;bo<aS[bn].length;bo+=1){if(aS[bn][bo]!==bm){bp.push(aS[bn][bo]);
}}if(bp.length===0){delete aS[bn];}else{aS[bn]=bp;}};for(be=0;be<a.undefs.length;be+=1){bd=a.undefs[be].slice(0);if(bg(bd[2].value,bd[0])){bj(bd[2].value,bd[2].line);
}else{an.apply(an,bd.slice(1));}}}catch(bh){if(bh){var bi=o||{};a.errors.push({raw:bh.raw,reason:bh.message,line:bh.line||bi.line,character:bh.character||bi.from},null);
}}return a.errors.length===0;};K.data=function(){var bg={functions:[],options:W},bf,bh,bl=[],bj,bi,bd,be=[],F,ax=[],bk;if(K.errors.length){bg.errors=K.errors;
}if(n){bg.json=true;}for(F in aS){if(aR(aS,F)){bl.push({name:F,line:aS[F]});}}if(bl.length>0){bg.implieds=bl;}if(V.length>0){bg.urls=V;}bh=Object.keys(aF);
if(bh.length>0){bg.globals=bh;}for(bi=1;bi<C.length;bi+=1){bj=C[bi];bf={};for(bd=0;bd<aM.length;bd+=1){bf[aM[bd]]=[];}for(F in bj){if(aR(bj,F)&&F.charAt(0)!=="("){bk=bj[F];
if(bk==="unction"){bk="unused";}if(Array.isArray(bf[bk])){bf[bk].push(F);if(bk==="unused"){ax.push({name:F,line:bj["(line)"],"function":bj["(name)"]});
}}}}for(bd=0;bd<aM.length;bd+=1){if(bf[aM[bd]].length===0){delete bf[aM[bd]];}}bf.name=bj["(name)"];bf.param=bj["(params)"];bf.line=bj["(line)"];bf.last=bj["(last)"];
bg.functions.push(bf);}if(ax.length>0){bg.unused=ax;}be=[];for(F in aH){if(typeof aH[F]==="number"){bg.member=aH;break;}}return bg;};K.report=function(bj){var bh=K.data();
var bo=[],bn,bm,bg,bl,bi,bf,be,bd="",ax,F=[],bp;function bk(bt,bu){var bq,bs,br;if(bu){F.push("<div><i>"+bt+"</i> ");bu=bu.sort();for(bs=0;bs<bu.length;
bs+=1){if(bu[bs]!==br){br=bu[bs];F.push((bq?", ":"")+br);bq=true;}}F.push("</div>");}}if(bh.errors||bh.implieds||bh.unused){bg=true;F.push("<div id=errors><i>Error:</i>");
if(bh.errors){for(bi=0;bi<bh.errors.length;bi+=1){bn=bh.errors[bi];if(bn){bm=bn.evidence||"";F.push("<p>Problem"+(isFinite(bn.line)?" at line "+bn.line+" character "+bn.character:"")+": "+bn.reason.entityify()+"</p><p class=evidence>"+(bm&&(bm.length>80?bm.slice(0,77)+"...":bm).entityify())+"</p>");
}}}if(bh.implieds){bp=[];for(bi=0;bi<bh.implieds.length;bi+=1){bp[bi]="<code>"+bh.implieds[bi].name+"</code>&nbsp;<i>"+bh.implieds[bi].line+"</i>";}F.push("<p><i>Implied global:</i> "+bp.join(", ")+"</p>");
}if(bh.unused){bp=[];for(bi=0;bi<bh.unused.length;bi+=1){bp[bi]="<code><u>"+bh.unused[bi].name+"</u></code>&nbsp;<i>"+bh.unused[bi].line+"</i> <code>"+bh.unused[bi]["function"]+"</code>";
}F.push("<p><i>Unused variable:</i> "+bp.join(", ")+"</p>");}if(bh.json){F.push("<p>JSON: bad.</p>");}F.push("</div>");}if(!bj){F.push("<br><div id=functions>");
if(bh.urls){bk("URLs<br>",bh.urls,"<br>");}if(bh.json&&!bg){F.push("<p>JSON: good.</p>");}else{if(bh.globals){F.push("<div><i>Global</i> "+bh.globals.sort().join(", ")+"</div>");
}else{F.push("<div><i>No new global variables introduced.</i></div>");}}for(bi=0;bi<bh.functions.length;bi+=1){bl=bh.functions[bi];F.push("<br><div class=function><i>"+bl.line+"-"+bl.last+"</i> "+(bl.name||"")+"("+(bl.param?bl.param.join(", "):"")+")</div>");
bk("<big><b>Unused</b></big>",bl.unused);bk("Closure",bl.closure);bk("Variable",bl["var"]);bk("Exception",bl.exception);bk("Outer",bl.outer);bk("Global",bl.global);
bk("Label",bl.label);}if(bh.member){bo=Object.keys(bh.member);if(bo.length){bo=bo.sort();bd="<br><pre id=members>/*members ";be=10;for(bi=0;bi<bo.length;
bi+=1){bf=bo[bi];ax=bf.name();if(be+ax.length>72){F.push(bd+"<br>");bd="    ";be=1;}be+=ax.length+2;if(bh.member[bf]===1){ax="<i>"+ax+"</i>";}if(bi<bo.length-1){ax+=", ";
}bd+=ax;}F.push(bd+"<br>*/</pre>");}F.push("</div>");}}return F.join("");};K.jshint=K;return K;}());if(typeof b==="object"&&b){b.JSHINT=a;}});define("ace/narcissus/parser",["require","exports","module","ace/narcissus/lexer","ace/narcissus/definitions","ace/narcissus/options"],function(require,exports,module){var lexer=require("./lexer");
var definitions=require("./definitions");var options=require("./options");var Tokenizer=lexer.Tokenizer;var Dict=definitions.Dict;var Stack=definitions.Stack;
eval(definitions.consts);function pushDestructuringVarDecls(n,s){for(var i in n){var sub=n[i];if(sub.type===IDENTIFIER){s.varDecls.push(sub);}else{pushDestructuringVarDecls(sub,s);
}}}function Parser(tokenizer){tokenizer.parser=this;this.t=tokenizer;this.x=null;this.unexpectedEOF=false;options.mozillaMode&&(this.mozillaMode=true);
options.parenFreeMode&&(this.parenFreeMode=true);}function StaticContext(parentScript,parentBlock,inModule,inFunction,strictMode){this.parentScript=parentScript;
this.parentBlock=parentBlock||parentScript;this.inModule=inModule||false;this.inFunction=inFunction||false;this.inForLoopInit=false;this.topLevel=true;
this.allLabels=new Stack();this.currentLabels=new Stack();this.labeledTargets=new Stack();this.defaultLoopTarget=null;this.defaultTarget=null;this.strictMode=strictMode;
}StaticContext.prototype={update:function(ext){var desc={};for(var key in ext){desc[key]={value:ext[key],writable:true,enumerable:true,configurable:true};
}return Object.create(this,desc);},pushLabel:function(label){return this.update({currentLabels:this.currentLabels.push(label),allLabels:this.allLabels.push(label)});
},pushTarget:function(target){var isDefaultLoopTarget=target.isLoop;var isDefaultTarget=isDefaultLoopTarget||target.type===SWITCH;if(this.currentLabels.isEmpty()){if(isDefaultLoopTarget){this.update({defaultLoopTarget:target});
}if(isDefaultTarget){this.update({defaultTarget:target});}return this;}target.labels=new Dict();this.currentLabels.forEach(function(label){target.labels.set(label,true);
});return this.update({currentLabels:new Stack(),labeledTargets:this.labeledTargets.push(target),defaultLoopTarget:isDefaultLoopTarget?target:this.defaultLoopTarget,defaultTarget:isDefaultTarget?target:this.defaultTarget});
},nest:function(){return this.topLevel?this.update({topLevel:false}):this;},canImport:function(){return this.topLevel&&!this.inFunction;},canExport:function(){return this.inModule&&this.topLevel&&!this.inFunction;
},banWith:function(){return this.strictMode||this.inModule;},modulesAllowed:function(){return this.topLevel&&!this.inFunction;}};var Pp=Parser.prototype;
Pp.mozillaMode=false;Pp.parenFreeMode=false;Pp.withContext=function(x,f){var x0=this.x;this.x=x;var result=f.call(this);this.x=x0;return result;};Pp.newNode=function newNode(opts){return new Node(this.t,opts);
};Pp.fail=function fail(msg){throw this.t.newSyntaxError(msg);};Pp.match=function match(tt,scanOperand,keywordIsName){return this.t.match(tt,scanOperand,keywordIsName);
};Pp.mustMatch=function mustMatch(tt,keywordIsName){return this.t.mustMatch(tt,keywordIsName);};Pp.peek=function peek(scanOperand){return this.t.peek(scanOperand);
};Pp.peekOnSameLine=function peekOnSameLine(scanOperand){return this.t.peekOnSameLine(scanOperand);};Pp.done=function done(){return this.t.done;};Pp.Script=function Script(inModule,inFunction,expectEnd){var node=this.newNode(scriptInit());
var x2=new StaticContext(node,node,inModule,inFunction);this.withContext(x2,function(){this.Statements(node,true);});if(expectEnd&&!this.done()){this.fail("expected end of input");
}return node;};function Pragma(n){if(n.type===SEMICOLON){var e=n.expression;if(e.type===STRING&&e.value==="use strict"){n.pragma="strict";return true;}}return false;
}function Node(t,init){var token=t.token;if(token){this.type=token.type;this.value=token.value;this.lineno=token.lineno;this.start=token.start;this.end=token.end;
}else{this.lineno=t.lineno;}this.filename=t.filename;this.children=[];for(var prop in init){this[prop]=init[prop];}}function SyntheticNode(init){this.children=[];
for(var prop in init){this[prop]=init[prop];}this.synthetic=true;}var Np=Node.prototype=SyntheticNode.prototype={};Np.constructor=Node;var TO_SOURCE_SKIP={type:true,value:true,lineno:true,start:true,end:true,tokenizer:true,assignOp:true};
function unevalableConst(code){var token=definitions.tokens[code];var constName=definitions.opTypeNames.hasOwnProperty(token)?definitions.opTypeNames[token]:token in definitions.keywords?token.toUpperCase():token;
return{toSource:function(){return constName;}};}Np.toSource=function toSource(){var mock={};var self=this;mock.type=unevalableConst(this.type);if(this.generatingSource){return mock.toSource();
}this.generatingSource=true;if("value" in this){mock.value=this.value;}if("lineno" in this){mock.lineno=this.lineno;}if("start" in this){mock.start=this.start;
}if("end" in this){mock.end=this.end;}if(this.assignOp){mock.assignOp=unevalableConst(this.assignOp);}for(var key in this){if(this.hasOwnProperty(key)&&!(key in TO_SOURCE_SKIP)){mock[key]=this[key];
}}try{return mock.toSource();}finally{delete this.generatingSource;}};Np.push=function(kid){if(kid!==null){if(kid.start<this.start){this.start=kid.start;
}if(this.end<kid.end){this.end=kid.end;}}return this.children.push(kid);};Node.indentLevel=0;function tokenString(tt){var t=definitions.tokens[tt];return/^\W/.test(t)?definitions.opTypeNames[t]:t.toUpperCase();
}Np.toString=function(){var a=[];for(var i in this){if(this.hasOwnProperty(i)&&i!=="type"&&i!=="target"){a.push({id:i,value:this[i]});}}a.sort(function(a,b){return(a.id<b.id)?-1:1;
});var INDENTATION="    ";var n=++Node.indentLevel;var s="{\n"+INDENTATION.repeat(n)+"type: "+tokenString(this.type);for(i=0;i<a.length;i++){s+=",\n"+INDENTATION.repeat(n)+a[i].id+": "+a[i].value;
}n=--Node.indentLevel;s+="\n"+INDENTATION.repeat(n)+"}";return s;};Np.synth=function(init){var node=new SyntheticNode(init);node.filename=this.filename;
node.lineno=this.lineno;node.start=this.start;node.end=this.end;return node;};var LOOP_INIT={isLoop:true};function blockInit(){return{type:BLOCK,varDecls:[]};
}function scriptInit(){return{type:SCRIPT,funDecls:[],varDecls:[],modDefns:new Dict(),modAssns:new Dict(),modDecls:new Dict(),modLoads:new Dict(),impDecls:[],expDecls:[],exports:new Dict(),hasEmptyReturn:false,hasReturnWithValue:false,hasYield:false};
}definitions.defineGetter(Np,"length",function(){throw new Error("Node.prototype.length is gone; use n.children.length instead");});definitions.defineProperty(String.prototype,"repeat",function(n){var s="",t=this+s;
while(--n>=0){s+=t;}return s;},false,false,true);Pp.MaybeLeftParen=function MaybeLeftParen(){if(this.parenFreeMode){return this.match(LEFT_PAREN)?LEFT_PAREN:END;
}return this.mustMatch(LEFT_PAREN).type;};Pp.MaybeRightParen=function MaybeRightParen(p){if(p===LEFT_PAREN){this.mustMatch(RIGHT_PAREN);}};Pp.Statements=function Statements(n,topLevel){var prologue=!!topLevel;
try{while(!this.done()&&this.peek(true)!==RIGHT_CURLY){var n2=this.Statement();n.push(n2);if(prologue&&Pragma(n2)){this.x.strictMode=true;n.strict=true;
}else{prologue=false;}}}catch(e){try{if(this.done()){this.unexpectedEOF=true;}}catch(e){}throw e;}};Pp.Block=function Block(){this.mustMatch(LEFT_CURLY);
var n=this.newNode(blockInit());var x2=this.x.update({parentBlock:n}).pushTarget(n);this.withContext(x2,function(){this.Statements(n);});this.mustMatch(RIGHT_CURLY);
return n;};var DECLARED_FORM=0,EXPRESSED_FORM=1,STATEMENT_FORM=2;function Export(node,isDefinition){this.node=node;this.isDefinition=isDefinition;this.resolved=null;
}function registerExport(exports,decl){function register(name,exp){if(exports.has(name)){throw new SyntaxError("multiple exports of "+name);}exports.set(name,exp);
}switch(decl.type){case MODULE:case FUNCTION:register(decl.name,new Export(decl,true));break;case VAR:for(var i=0;i<decl.children.length;i++){register(decl.children[i].name,new Export(decl.children[i],true));
}break;case LET:case CONST:throw new Error("NYI: "+definitions.tokens[decl.type]);case EXPORT:for(var i=0;i<decl.pathList.length;i++){var path=decl.pathList[i];
switch(path.type){case OBJECT_INIT:for(var j=0;j<path.children.length;j++){var init=path.children[j];if(init.type===IDENTIFIER){register(init.value,new Export(init,false));
}else{register(init.children[0].value,new Export(init.children[1],false));}}break;case DOT:register(path.children[1].value,new Export(path,false));break;
case IDENTIFIER:register(path.value,new Export(path,false));break;default:throw new Error("unexpected export path: "+definitions.tokens[path.type]);}}break;
default:throw new Error("unexpected export decl: "+definitions.tokens[exp.type]);}}function Module(node){var exports=node.body.exports;var modDefns=node.body.modDefns;
var exportedModules=new Dict();exports.forEach(function(name,exp){var node=exp.node;if(node.type===MODULE){exportedModules.set(name,node);}else{if(!exp.isDefinition&&node.type===IDENTIFIER&&modDefns.has(node.value)){var mod=modDefns.get(node.value);
exportedModules.set(name,mod);}}});this.node=node;this.exports=exports;this.exportedModules=exportedModules;}Pp.Statement=function Statement(){var i,label,n,n2,p,c,ss,tt=this.t.get(true),tt2,x0,x2,x3;
var comments=this.t.blockComments;switch(tt){case IMPORT:if(!this.x.canImport()){this.fail("illegal context for import statement");}n=this.newNode();n.pathList=this.ImportPathList();
this.x.parentScript.impDecls.push(n);break;case EXPORT:if(!this.x.canExport()){this.fail("export statement not in module top level");}switch(this.peek()){case MODULE:case FUNCTION:case LET:case VAR:case CONST:n=this.Statement();
n.blockComments=comments;n.exported=true;this.x.parentScript.expDecls.push(n);registerExport(this.x.parentScript.exports,n);return n;}n=this.newNode();
n.pathList=this.ExportPathList();this.x.parentScript.expDecls.push(n);registerExport(this.x.parentScript.exports,n);break;case FUNCTION:return this.FunctionDefinition(true,this.x.topLevel?DECLARED_FORM:STATEMENT_FORM,comments);
case LEFT_CURLY:n=this.newNode(blockInit());x2=this.x.update({parentBlock:n}).pushTarget(n).nest();this.withContext(x2,function(){this.Statements(n);});
this.mustMatch(RIGHT_CURLY);return n;case IF:n=this.newNode();n.condition=this.HeadExpression();x2=this.x.pushTarget(n).nest();this.withContext(x2,function(){n.thenPart=this.Statement();
n.elsePart=this.match(ELSE,true)?this.Statement():null;});return n;case SWITCH:n=this.newNode({cases:[],defaultIndex:-1});n.discriminant=this.HeadExpression();
x2=this.x.pushTarget(n).nest();this.withContext(x2,function(){this.mustMatch(LEFT_CURLY);while((tt=this.t.get())!==RIGHT_CURLY){switch(tt){case DEFAULT:if(n.defaultIndex>=0){this.fail("More than one switch default");
}case CASE:n2=this.newNode();if(tt===DEFAULT){n.defaultIndex=n.cases.length;}else{n2.caseLabel=this.Expression(COLON);}break;default:this.fail("Invalid switch case");
}this.mustMatch(COLON);n2.statements=this.newNode(blockInit());while((tt=this.peek(true))!==CASE&&tt!==DEFAULT&&tt!==RIGHT_CURLY){n2.statements.push(this.Statement());
}n.cases.push(n2);}});return n;case FOR:n=this.newNode(LOOP_INIT);n.blockComments=comments;if(this.match(IDENTIFIER)){if(this.t.token.value==="each"){n.isEach=true;
}else{this.t.unget();}}if(!this.parenFreeMode){this.mustMatch(LEFT_PAREN);}x2=this.x.pushTarget(n).nest();x3=this.x.update({inForLoopInit:true});n2=null;
if((tt=this.peek(true))!==SEMICOLON){this.withContext(x3,function(){if(tt===VAR||tt===CONST){this.t.get();n2=this.Variables();}else{if(tt===LET){this.t.get();
if(this.peek()===LEFT_PAREN){n2=this.LetBlock(false);}else{this.x.parentBlock=n;n.varDecls=[];n2=this.Variables();}}else{n2=this.Expression();}}});}if(n2&&this.match(IN)){n.type=FOR_IN;
this.withContext(x3,function(){n.object=this.Expression();if(n2.type===VAR||n2.type===LET){c=n2.children;if(c.length!==1&&n2.destructurings.length!==1){throw new SyntaxError("Invalid for..in left-hand side",this.filename,n2.lineno);
}if(n2.destructurings.length>0){n.iterator=n2.destructurings[0];}else{n.iterator=c[0];}n.varDecl=n2;}else{if(n2.type===ARRAY_INIT||n2.type===OBJECT_INIT){n2.destructuredNames=this.checkDestructuring(n2);
}n.iterator=n2;}});}else{x3.inForLoopInit=false;n.setup=n2;this.mustMatch(SEMICOLON);if(n.isEach){this.fail("Invalid for each..in loop");}this.withContext(x3,function(){n.condition=(this.peek(true)===SEMICOLON)?null:this.Expression();
this.mustMatch(SEMICOLON);tt2=this.peek(true);n.update=(this.parenFreeMode?tt2===LEFT_CURLY||definitions.isStatementStartCode[tt2]:tt2===RIGHT_PAREN)?null:this.Expression();
});}if(!this.parenFreeMode){this.mustMatch(RIGHT_PAREN);}this.withContext(x2,function(){n.body=this.Statement();});return n;case WHILE:n=this.newNode({isLoop:true});
n.blockComments=comments;n.condition=this.HeadExpression();x2=this.x.pushTarget(n).nest();this.withContext(x2,function(){n.body=this.Statement();});return n;
case DO:n=this.newNode({isLoop:true});n.blockComments=comments;x2=this.x.pushTarget(n).next();this.withContext(x2,function(){n.body=this.Statement();});
this.mustMatch(WHILE);n.condition=this.HeadExpression();this.match(SEMICOLON);return n;case BREAK:case CONTINUE:n=this.newNode();n.blockComments=comments;
x2=this.x.pushTarget(n);if(this.peekOnSameLine()===IDENTIFIER){this.t.get();n.label=this.t.token.value;}if(n.label){n.target=x2.labeledTargets.find(function(target){return target.labels.has(n.label);
});}else{if(tt===CONTINUE){n.target=x2.defaultLoopTarget;}else{n.target=x2.defaultTarget;}}if(!n.target){this.fail("Invalid "+((tt===BREAK)?"break":"continue"));
}if(!n.target.isLoop&&tt===CONTINUE){this.fail("Invalid continue");}break;case TRY:n=this.newNode({catchClauses:[]});n.blockComments=comments;n.tryBlock=this.Block();
while(this.match(CATCH)){n2=this.newNode();p=this.MaybeLeftParen();switch(this.t.get()){case LEFT_BRACKET:case LEFT_CURLY:this.t.unget();n2.varName=this.DestructuringExpression(true);
break;case IDENTIFIER:n2.varName=this.t.token.value;break;default:this.fail("missing identifier in catch");break;}if(this.match(IF)){if(!this.mozillaMode){this.fail("Illegal catch guard");
}if(n.catchClauses.length&&!n.catchClauses.top().guard){this.fail("Guarded catch after unguarded");}n2.guard=this.Expression();}this.MaybeRightParen(p);
n2.block=this.Block();n.catchClauses.push(n2);}if(this.match(FINALLY)){n.finallyBlock=this.Block();}if(!n.catchClauses.length&&!n.finallyBlock){this.fail("Invalid try statement");
}return n;case CATCH:case FINALLY:this.fail(definitions.tokens[tt]+" without preceding try");case THROW:n=this.newNode();n.exception=this.Expression();
break;case RETURN:n=this.ReturnOrYield();break;case WITH:if(this.x.banWith()){this.fail("with statements not allowed in strict code or modules");}n=this.newNode();
n.blockComments=comments;n.object=this.HeadExpression();x2=this.x.pushTarget(n).next();this.withContext(x2,function(){n.body=this.Statement();});return n;
case VAR:case CONST:n=this.Variables();break;case LET:if(this.peek()===LEFT_PAREN){n=this.LetBlock(true);return n;}n=this.Variables();break;case DEBUGGER:n=this.newNode();
break;case NEWLINE:case SEMICOLON:n=this.newNode({type:SEMICOLON});n.blockComments=comments;n.expression=null;return n;case IDENTIFIER:case USE:case MODULE:switch(this.t.token.value){case"use":if(!isPragmaToken(this.peekOnSameLine())){this.t.unget();
break;}return this.newNode({type:USE,params:this.Pragmas()});case"module":if(!this.x.modulesAllowed()){this.fail("module declaration not at top level");
}this.x.parentScript.hasModules=true;tt=this.peekOnSameLine();if(tt!==IDENTIFIER&&tt!==LEFT_CURLY){this.t.unget();break;}n=this.newNode({type:MODULE});
n.blockComments=comments;this.mustMatch(IDENTIFIER);label=this.t.token.value;if(this.match(LEFT_CURLY)){n.name=label;n.body=this.Script(true,false);n.module=new Module(n);
this.mustMatch(RIGHT_CURLY);this.x.parentScript.modDefns.set(n.name,n);return n;}this.t.unget();this.ModuleVariables(n);return n;default:tt=this.peek();
if(tt===COLON){label=this.t.token.value;if(this.x.allLabels.has(label)){this.fail("Duplicate label: "+label);}this.t.get();n=this.newNode({type:LABEL,label:label});
n.blockComments=comments;x2=this.x.pushLabel(label).nest();this.withContext(x2,function(){n.statement=this.Statement();});n.target=(n.statement.type===LABEL)?n.statement.target:n.statement;
return n;}}default:n=this.newNode({type:SEMICOLON});this.t.unget();n.blockComments=comments;n.expression=this.Expression();n.end=n.expression.end;break;
}n.blockComments=comments;this.MagicalSemicolon();return n;};function isPragmaToken(tt){switch(tt){case IDENTIFIER:case STRING:case NUMBER:case NULL:case TRUE:case FALSE:return true;
}return false;}Pp.Pragmas=function Pragmas(){var pragmas=[];do{pragmas.push(this.Pragma());}while(this.match(COMMA));this.MagicalSemicolon();return pragmas;
};Pp.Pragma=function Pragma(){var items=[];var tt;do{tt=this.t.get(true);items.push(this.t.token);}while(isPragmaToken(this.peek()));return items;};Pp.MagicalSemicolon=function MagicalSemicolon(){var tt;
if(this.t.lineno===this.t.token.lineno){tt=this.peekOnSameLine();if(tt!==END&&tt!==NEWLINE&&tt!==SEMICOLON&&tt!==RIGHT_CURLY){this.fail("missing ; before statement");
}}this.match(SEMICOLON);};Pp.ReturnOrYield=function ReturnOrYield(){var n,b,tt=this.t.token.type,tt2;var parentScript=this.x.parentScript;if(tt===RETURN){if(!this.x.inFunction){this.fail("Return not in function");
}}else{if(!this.x.inFunction){this.fail("Yield not in function");}parentScript.hasYield=true;}n=this.newNode({value:undefined});tt2=(tt===RETURN)?this.peekOnSameLine(true):this.peek(true);
if(tt2!==END&&tt2!==NEWLINE&&tt2!==SEMICOLON&&tt2!==RIGHT_CURLY&&(tt!==YIELD||(tt2!==tt&&tt2!==RIGHT_BRACKET&&tt2!==RIGHT_PAREN&&tt2!==COLON&&tt2!==COMMA))){if(tt===RETURN){n.value=this.Expression();
parentScript.hasReturnWithValue=true;}else{n.value=this.AssignExpression();}}else{if(tt===RETURN){parentScript.hasEmptyReturn=true;}}return n;};Pp.ModuleExpression=function ModuleExpression(){return this.match(STRING)?this.newNode():this.QualifiedPath();
};Pp.ImportPathList=function ImportPathList(){var a=[];do{a.push(this.ImportPath());}while(this.match(COMMA));return a;};Pp.ImportPath=function ImportPath(){var n=this.QualifiedPath();
if(!this.match(DOT)){if(n.type===IDENTIFIER){this.fail("cannot import local variable");}return n;}var n2=this.newNode();n2.push(n);n2.push(this.ImportSpecifierSet());
return n2;};Pp.ExplicitSpecifierSet=function ExplicitSpecifierSet(SpecifierRHS){var n,n2,id,tt;n=this.newNode({type:OBJECT_INIT});this.mustMatch(LEFT_CURLY);
if(!this.match(RIGHT_CURLY)){do{id=this.Identifier();if(this.match(COLON)){n2=this.newNode({type:PROPERTY_INIT});n2.push(id);n2.push(SpecifierRHS());n.push(n2);
}else{n.push(id);}}while(!this.match(RIGHT_CURLY)&&this.mustMatch(COMMA));}return n;};Pp.ImportSpecifierSet=function ImportSpecifierSet(){var self=this;
return this.match(MUL)?this.newNode({type:IDENTIFIER,name:"*"}):ExplicitSpecifierSet(function(){return self.Identifier();});};Pp.Identifier=function Identifier(){this.mustMatch(IDENTIFIER);
return this.newNode({type:IDENTIFIER});};Pp.IdentifierName=function IdentifierName(){this.mustMatch(IDENTIFIER,true);return this.newNode({type:IDENTIFIER});
};Pp.QualifiedPath=function QualifiedPath(){var n,n2;n=this.Identifier();while(this.match(DOT)){if(this.peek()!==IDENTIFIER){this.t.unget();break;}n2=this.newNode();
n2.push(n);n2.push(this.Identifier());n=n2;}return n;};Pp.ExportPath=function ExportPath(){var self=this;if(this.peek()===LEFT_CURLY){return this.ExplicitSpecifierSet(function(){return self.QualifiedPath();
});}return this.QualifiedPath();};Pp.ExportPathList=function ExportPathList(){var a=[];do{a.push(this.ExportPath());}while(this.match(COMMA));return a;
};Pp.FunctionDefinition=function FunctionDefinition(requireName,functionForm,comments){var tt;var f=this.newNode({params:[],paramComments:[]});if(typeof comments==="undefined"){comments=null;
}f.blockComments=comments;if(f.type!==FUNCTION){f.type=(f.value==="get")?GETTER:SETTER;}if(this.match(MUL)){f.isExplicitGenerator=true;}if(this.match(IDENTIFIER,false,true)){f.name=this.t.token.value;
}else{if(requireName){this.fail("missing function identifier");}}var inModule=this.x.inModule;x2=new StaticContext(null,null,inModule,true,this.x.strictMode);
this.withContext(x2,function(){this.mustMatch(LEFT_PAREN);if(!this.match(RIGHT_PAREN)){do{tt=this.t.get();f.paramComments.push(this.t.lastBlockComment());
switch(tt){case LEFT_BRACKET:case LEFT_CURLY:this.t.unget();f.params.push(this.DestructuringExpression());break;case IDENTIFIER:f.params.push(this.t.token.value);
break;default:this.fail("missing formal parameter");}}while(this.match(COMMA));this.mustMatch(RIGHT_PAREN);}tt=this.t.get(true);if(tt!==LEFT_CURLY){this.t.unget();
}if(tt!==LEFT_CURLY){f.body=this.AssignExpression();}else{f.body=this.Script(inModule,true);}});if(tt===LEFT_CURLY){this.mustMatch(RIGHT_CURLY);}f.end=this.t.token.end;
f.functionForm=functionForm;if(functionForm===DECLARED_FORM){this.x.parentScript.funDecls.push(f);}if(this.x.inModule&&!f.isExplicitGenerator&&f.body.hasYield){this.fail("yield in non-generator function");
}if(f.isExplicitGenerator||f.body.hasYield){f.body=this.newNode({type:GENERATOR,body:f.body});}return f;};Pp.ModuleVariables=function ModuleVariables(n){var n1,n2;
do{n1=this.Identifier();if(this.match(ASSIGN)){n2=this.ModuleExpression();n1.initializer=n2;if(n2.type===STRING){this.x.parentScript.modLoads.set(n1.value,n2.value);
}else{this.x.parentScript.modAssns.set(n1.value,n1);}}n.push(n1);}while(this.match(COMMA));};Pp.Variables=function Variables(letBlock){var n,n2,ss,i,s,tt;
tt=this.t.token.type;switch(tt){case VAR:case CONST:s=this.x.parentScript;break;case LET:s=this.x.parentBlock;break;case LEFT_PAREN:tt=LET;s=letBlock;break;
}n=this.newNode({type:tt,destructurings:[]});do{tt=this.t.get();if(tt===LEFT_BRACKET||tt===LEFT_CURLY){this.t.unget();var dexp=this.DestructuringExpression(true);
n2=this.newNode({type:IDENTIFIER,name:dexp,readOnly:n.type===CONST});n.push(n2);pushDestructuringVarDecls(n2.name.destructuredNames,s);n.destructurings.push({exp:dexp,decl:n2});
if(this.x.inForLoopInit&&this.peek()===IN){continue;}this.mustMatch(ASSIGN);if(this.t.token.assignOp){this.fail("Invalid variable initialization");}n2.blockComment=this.t.lastBlockComment();
n2.initializer=this.AssignExpression();continue;}if(tt!==IDENTIFIER){this.fail("missing variable name");}n2=this.newNode({type:IDENTIFIER,name:this.t.token.value,readOnly:n.type===CONST});
n.push(n2);s.varDecls.push(n2);if(this.match(ASSIGN)){var comment=this.t.lastBlockComment();if(this.t.token.assignOp){this.fail("Invalid variable initialization");
}n2.initializer=this.AssignExpression();}else{var comment=this.t.lastBlockComment();}n2.blockComment=comment;}while(this.match(COMMA));return n;};Pp.LetBlock=function LetBlock(isStatement){var n,n2;
n=this.newNode({type:LET_BLOCK,varDecls:[]});this.mustMatch(LEFT_PAREN);n.variables=this.Variables(n);this.mustMatch(RIGHT_PAREN);if(isStatement&&this.peek()!==LEFT_CURLY){n2=this.newNode({type:SEMICOLON,expression:n});
isStatement=false;}if(isStatement){n.block=this.Block();}else{n.expression=this.AssignExpression();}return n;};Pp.checkDestructuring=function checkDestructuring(n,simpleNamesOnly){if(n.type===ARRAY_COMP){this.fail("Invalid array comprehension left-hand side");
}if(n.type!==ARRAY_INIT&&n.type!==OBJECT_INIT){return;}var lhss={};var nn,n2,idx,sub,cc,c=n.children;for(var i=0,j=c.length;i<j;i++){if(!(nn=c[i])){continue;
}if(nn.type===PROPERTY_INIT){cc=nn.children;sub=cc[1];idx=cc[0].value;}else{if(n.type===OBJECT_INIT){sub=nn;idx=nn.value;}else{sub=nn;idx=i;}}if(sub.type===ARRAY_INIT||sub.type===OBJECT_INIT){lhss[idx]=this.checkDestructuring(sub,simpleNamesOnly);
}else{if(simpleNamesOnly&&sub.type!==IDENTIFIER){this.fail("missing name in pattern");}lhss[idx]=sub;}}return lhss;};Pp.DestructuringExpression=function DestructuringExpression(simpleNamesOnly){var n=this.PrimaryExpression();
n.destructuredNames=this.checkDestructuring(n,simpleNamesOnly);return n;};Pp.GeneratorExpression=function GeneratorExpression(e){return this.newNode({type:GENERATOR,expression:e,tail:this.ComprehensionTail()});
};Pp.ComprehensionTail=function ComprehensionTail(){var body,n,n2,n3,p;body=this.newNode({type:COMP_TAIL});do{n=this.newNode({type:FOR_IN,isLoop:true});
if(this.match(IDENTIFIER)){if(this.mozillaMode&&this.t.token.value==="each"){n.isEach=true;}else{this.t.unget();}}p=this.MaybeLeftParen();switch(this.t.get()){case LEFT_BRACKET:case LEFT_CURLY:this.t.unget();
n.iterator=this.DestructuringExpression();break;case IDENTIFIER:n.iterator=n3=this.newNode({type:IDENTIFIER});n3.name=n3.value;n.varDecl=n2=this.newNode({type:VAR});
n2.push(n3);this.x.parentScript.varDecls.push(n3);break;default:this.fail("missing identifier");}this.mustMatch(IN);n.object=this.Expression();this.MaybeRightParen(p);
body.push(n);}while(this.match(FOR));if(this.match(IF)){body.guard=this.HeadExpression();}return body;};Pp.HeadExpression=function HeadExpression(){var p=this.MaybeLeftParen();
var n=this.ParenExpression();this.MaybeRightParen(p);if(p===END&&!n.parenthesized){var tt=this.peek();if(tt!==LEFT_CURLY&&!definitions.isStatementStartCode[tt]){this.fail("Unparenthesized head followed by unbraced body");
}}return n;};Pp.ParenExpression=function ParenExpression(){var x2=this.x.update({inForLoopInit:this.x.inForLoopInit&&(this.t.token.type===LEFT_PAREN)});
var n=this.withContext(x2,function(){return this.Expression();});if(this.match(FOR)){if(n.type===YIELD&&!n.parenthesized){this.fail("Yield expression must be parenthesized");
}if(n.type===COMMA&&!n.parenthesized){this.fail("Generator expression must be parenthesized");}n=this.GeneratorExpression(n);}return n;};Pp.Expression=function Expression(){var n,n2;
n=this.AssignExpression();if(this.match(COMMA)){n2=this.newNode({type:COMMA});n2.push(n);n=n2;do{n2=n.children[n.children.length-1];if(n2.type===YIELD&&!n2.parenthesized){this.fail("Yield expression must be parenthesized");
}n.push(this.AssignExpression());}while(this.match(COMMA));}return n;};Pp.AssignExpression=function AssignExpression(){var n,lhs;if(this.match(YIELD,true)){return this.ReturnOrYield();
}n=this.newNode({type:ASSIGN});lhs=this.ConditionalExpression();if(!this.match(ASSIGN)){return lhs;}n.blockComment=this.t.lastBlockComment();switch(lhs.type){case OBJECT_INIT:case ARRAY_INIT:lhs.destructuredNames=this.checkDestructuring(lhs);
case IDENTIFIER:case DOT:case INDEX:case CALL:break;default:this.fail("Bad left-hand side of assignment");break;}n.assignOp=lhs.assignOp=this.t.token.assignOp;
n.push(lhs);n.push(this.AssignExpression());return n;};Pp.ConditionalExpression=function ConditionalExpression(){var n,n2;n=this.OrExpression();if(this.match(HOOK)){n2=n;
n=this.newNode({type:HOOK});n.push(n2);var x2=this.x.update({inForLoopInit:false});this.withContext(x2,function(){n.push(this.AssignExpression());});if(!this.match(COLON)){this.fail("missing : after ?");
}n.push(this.AssignExpression());}return n;};Pp.OrExpression=function OrExpression(){var n,n2;n=this.AndExpression();while(this.match(OR)){n2=this.newNode();
n2.push(n);n2.push(this.AndExpression());n=n2;}return n;};Pp.AndExpression=function AndExpression(){var n,n2;n=this.BitwiseOrExpression();while(this.match(AND)){n2=this.newNode();
n2.push(n);n2.push(this.BitwiseOrExpression());n=n2;}return n;};Pp.BitwiseOrExpression=function BitwiseOrExpression(){var n,n2;n=this.BitwiseXorExpression();
while(this.match(BITWISE_OR)){n2=this.newNode();n2.push(n);n2.push(this.BitwiseXorExpression());n=n2;}return n;};Pp.BitwiseXorExpression=function BitwiseXorExpression(){var n,n2;
n=this.BitwiseAndExpression();while(this.match(BITWISE_XOR)){n2=this.newNode();n2.push(n);n2.push(this.BitwiseAndExpression());n=n2;}return n;};Pp.BitwiseAndExpression=function BitwiseAndExpression(){var n,n2;
n=this.EqualityExpression();while(this.match(BITWISE_AND)){n2=this.newNode();n2.push(n);n2.push(this.EqualityExpression());n=n2;}return n;};Pp.EqualityExpression=function EqualityExpression(){var n,n2;
n=this.RelationalExpression();while(this.match(EQ)||this.match(NE)||this.match(STRICT_EQ)||this.match(STRICT_NE)){n2=this.newNode();n2.push(n);n2.push(this.RelationalExpression());
n=n2;}return n;};Pp.RelationalExpression=function RelationalExpression(){var n,n2;var x2=this.x.update({inForLoopInit:false});this.withContext(x2,function(){n=this.ShiftExpression();
while((this.match(LT)||this.match(LE)||this.match(GE)||this.match(GT)||(!this.x.inForLoopInit&&this.match(IN))||this.match(INSTANCEOF))){n2=this.newNode();
n2.push(n);n2.push(this.ShiftExpression());n=n2;}});return n;};Pp.ShiftExpression=function ShiftExpression(){var n,n2;n=this.AddExpression();while(this.match(LSH)||this.match(RSH)||this.match(URSH)){n2=this.newNode();
n2.push(n);n2.push(this.AddExpression());n=n2;}return n;};Pp.AddExpression=function AddExpression(){var n,n2;n=this.MultiplyExpression();while(this.match(PLUS)||this.match(MINUS)){n2=this.newNode();
n2.push(n);n2.push(this.MultiplyExpression());n=n2;}return n;};Pp.MultiplyExpression=function MultiplyExpression(){var n,n2;n=this.UnaryExpression();while(this.match(MUL)||this.match(DIV)||this.match(MOD)){n2=this.newNode();
n2.push(n);n2.push(this.UnaryExpression());n=n2;}return n;};Pp.UnaryExpression=function UnaryExpression(){var n,n2,tt;switch(tt=this.t.get(true)){case DELETE:case VOID:case TYPEOF:case NOT:case BITWISE_NOT:case PLUS:case MINUS:if(tt===PLUS){n=this.newNode({type:UNARY_PLUS});
}else{if(tt===MINUS){n=this.newNode({type:UNARY_MINUS});}else{n=this.newNode();}}n.push(this.UnaryExpression());break;case INCREMENT:case DECREMENT:n=this.newNode();
n.push(this.MemberExpression(true));break;default:this.t.unget();n=this.MemberExpression(true);if(this.t.tokens[(this.t.tokenIndex+this.t.lookahead-1)&3].lineno===this.t.lineno){if(this.match(INCREMENT)||this.match(DECREMENT)){n2=this.newNode({postfix:true});
n2.push(n);n=n2;}}break;}return n;};Pp.MemberExpression=function MemberExpression(allowCallSyntax){var n,n2,name,tt;if(this.match(NEW)){n=this.newNode();
n.push(this.MemberExpression(false));if(this.match(LEFT_PAREN)){n.type=NEW_WITH_ARGS;n.push(this.ArgumentList());}}else{n=this.PrimaryExpression();}while((tt=this.t.get())!==END){switch(tt){case DOT:n2=this.newNode();
n2.push(n);n2.push(this.IdentifierName());break;case LEFT_BRACKET:n2=this.newNode({type:INDEX});n2.push(n);n2.push(this.Expression());this.mustMatch(RIGHT_BRACKET);
break;case LEFT_PAREN:if(allowCallSyntax){n2=this.newNode({type:CALL});n2.push(n);n2.push(this.ArgumentList());break;}default:this.t.unget();return n;}n=n2;
}return n;};Pp.ArgumentList=function ArgumentList(){var n,n2;n=this.newNode({type:LIST});if(this.match(RIGHT_PAREN,true)){return n;}do{n2=this.AssignExpression();
if(n2.type===YIELD&&!n2.parenthesized&&this.peek()===COMMA){this.fail("Yield expression must be parenthesized");}if(this.match(FOR)){n2=this.GeneratorExpression(n2);
if(n.children.length>1||this.peek(true)===COMMA){this.fail("Generator expression must be parenthesized");}}n.push(n2);}while(this.match(COMMA));this.mustMatch(RIGHT_PAREN);
return n;};Pp.PrimaryExpression=function PrimaryExpression(){var n,n2,tt=this.t.get(true);switch(tt){case FUNCTION:n=this.FunctionDefinition(false,EXPRESSED_FORM);
break;case LEFT_BRACKET:n=this.newNode({type:ARRAY_INIT});while((tt=this.peek(true))!==RIGHT_BRACKET){if(tt===COMMA){this.t.get();n.push(null);continue;
}n.push(this.AssignExpression());if(tt!==COMMA&&!this.match(COMMA)){break;}}if(n.children.length===1&&this.match(FOR)){n2=this.newNode({type:ARRAY_COMP,expression:n.children[0],tail:this.ComprehensionTail()});
n=n2;}this.mustMatch(RIGHT_BRACKET);break;case LEFT_CURLY:var id,fd;n=this.newNode({type:OBJECT_INIT});object_init:if(!this.match(RIGHT_CURLY)){do{tt=this.t.get();
if((this.t.token.value==="get"||this.t.token.value==="set")&&this.peek()===IDENTIFIER){n.push(this.FunctionDefinition(true,EXPRESSED_FORM));}else{var comments=this.t.blockComments;
switch(tt){case IDENTIFIER:case NUMBER:case STRING:id=this.newNode({type:IDENTIFIER});break;case RIGHT_CURLY:break object_init;default:if(this.t.token.value in definitions.keywords){id=this.newNode({type:IDENTIFIER});
break;}this.fail("Invalid property name");}if(this.match(COLON)){n2=this.newNode({type:PROPERTY_INIT});n2.push(id);n2.push(this.AssignExpression());n2.blockComments=comments;
n.push(n2);}else{if(this.peek()!==COMMA&&this.peek()!==RIGHT_CURLY){this.fail("missing : after property");}n.push(id);}}}while(this.match(COMMA));this.mustMatch(RIGHT_CURLY);
}break;case LEFT_PAREN:n=this.ParenExpression();this.mustMatch(RIGHT_PAREN);n.parenthesized=true;break;case LET:n=this.LetBlock(false);break;case NULL:case THIS:case TRUE:case FALSE:case IDENTIFIER:case NUMBER:case STRING:case REGEXP:n=this.newNode();
break;default:this.fail("missing operand; found "+definitions.tokens[tt]);break;}return n;};function parse(s,f,l){var t=new Tokenizer(s,f,l,options.allowHTMLComments);
var p=new Parser(t);return p.Script(false,false,true);}function parseFunction(s,requireName,form,f,l){var t=new Tokenizer(s,f,l);var p=new Parser(t);p.x=new StaticContext(null,null,false,false,false);
return p.FunctionDefinition(requireName,form);}function parseStdin(s,ln,prefix,isCommand){if(s.match(/^[\s]*\.begin[\s]*$/)){++ln.value;return parseMultiline(ln,prefix);
}if(isCommand(s.trim())){s="";}for(;;){try{var t=new Tokenizer(s,"stdin",ln.value,false);var p=new Parser(t);var n=p.Script(false,false);ln.value=t.lineno;
return n;}catch(e){if(!p.unexpectedEOF){throw e;}var more;do{if(prefix){putstr(prefix);}more=readline();if(!more){throw e;}}while(isCommand(more.trim()));
s+="\n"+more;}}}function parseMultiline(ln,prefix){var s="";for(;;){if(prefix){putstr(prefix);}var more=readline();if(more===null){return null;}if(more.match(/^[\s]*\.end[\s]*$/)){break;
}s+="\n"+more;}var t=new Tokenizer(s,"stdin",ln.value,false);var p=new Parser(t);var n=p.Script(false,false);ln.value=t.lineno;return n;}exports.parse=parse;
exports.parseStdin=parseStdin;exports.parseFunction=parseFunction;exports.Node=Node;exports.DECLARED_FORM=DECLARED_FORM;exports.EXPRESSED_FORM=EXPRESSED_FORM;
exports.STATEMENT_FORM=STATEMENT_FORM;exports.Tokenizer=Tokenizer;exports.Parser=Parser;exports.Module=Module;exports.Export=Export;});define("ace/narcissus/lexer",["require","exports","module","ace/narcissus/definitions"],function(require,exports,module){var definitions=require("./definitions");
eval(definitions.consts);var opTokens={};for(var op in definitions.opTypeNames){if(op==="\n"||op==="."){continue;}var node=opTokens;for(var i=0;i<op.length;
i++){var ch=op[i];if(!(ch in node)){node[ch]={};}node=node[ch];node.op=op;}}function isValidIdentifierChar(ch,first){if(ch<="\u007F"){if((ch>="a"&&ch<="z")||(ch>="A"&&ch<="Z")||ch==="$"||ch==="_"||(!first&&(ch>="0"&&ch<="9"))){return true;
}return false;}var x={};x["x"+ch]=true;x[ch]=true;var valid=false;try{valid=(Function("x","return (x."+(first?"":"x")+ch+");")(x)===true);}catch(ex){}return valid;
}function isIdentifier(str){if(typeof str!=="string"){return false;}if(str.length===0){return false;}if(!isValidIdentifierChar(str[0],true)){return false;
}for(var i=1;i<str.length;i++){if(!isValidIdentifierChar(str[i],false)){return false;}}return true;}function Tokenizer(s,f,l,allowHTMLComments){this.cursor=0;
this.source=String(s);this.tokens=[];this.tokenIndex=0;this.lookahead=0;this.scanNewlines=false;this.filename=f||"";this.lineno=l||1;this.allowHTMLComments=allowHTMLComments;
this.blockComments=null;}Tokenizer.prototype={get donefunction(){return this.peek(true)===END;},get tokenfunction(){return this.tokens[this.tokenIndex];
},match:function(tt,scanOperand,keywordIsName){return this.get(scanOperand,keywordIsName)===tt||this.unget();},mustMatch:function(tt,keywordIsName){if(!this.match(tt,false,keywordIsName)){throw this.newSyntaxError("Missing "+definitions.tokens[tt].toLowerCase());
}return this.token;},peek:function(scanOperand){var tt,next;if(this.lookahead){next=this.tokens[(this.tokenIndex+this.lookahead)&3];tt=(this.scanNewlines&&next.lineno!==this.lineno)?NEWLINE:next.type;
}else{tt=this.get(scanOperand);this.unget();}return tt;},peekOnSameLine:function(scanOperand){this.scanNewlines=true;var tt=this.peek(scanOperand);this.scanNewlines=false;
return tt;},lastBlockComment:function(){var length=this.blockComments.length;return length?this.blockComments[length-1]:null;},skip:function(){var input=this.source;
this.blockComments=[];for(;;){var ch=input[this.cursor++];var next=input[this.cursor];if(ch==="\r"){if(next==="\n"){continue;}ch="\n";}if(ch==="\n"&&!this.scanNewlines){this.lineno++;
}else{if(ch==="/"&&next==="*"){var commentStart=++this.cursor;for(;;){ch=input[this.cursor++];if(ch===undefined){throw this.newSyntaxError("Unterminated comment");
}if(ch==="*"){next=input[this.cursor];if(next==="/"){var commentEnd=this.cursor-1;this.cursor++;break;}}else{if(ch==="\n"){this.lineno++;}}}this.blockComments.push(input.substring(commentStart,commentEnd));
}else{if((ch==="/"&&next==="/")||(this.allowHTMLComments&&ch==="<"&&next==="!"&&input[this.cursor+1]==="-"&&input[this.cursor+2]==="-"&&(this.cursor+=2))){this.cursor++;
for(;;){ch=input[this.cursor++];next=input[this.cursor];if(ch===undefined){return;}if(ch==="\r"){if(next!=="\n"){ch="\n";}}if(ch==="\n"){if(this.scanNewlines){this.cursor--;
}else{this.lineno++;}break;}}}else{if(!(ch in definitions.whitespace)){this.cursor--;return;}}}}}},lexExponent:function(){var input=this.source;var next=input[this.cursor];
if(next==="e"||next==="E"){this.cursor++;ch=input[this.cursor++];if(ch==="+"||ch==="-"){ch=input[this.cursor++];}if(ch<"0"||ch>"9"){throw this.newSyntaxError("Missing exponent");
}do{ch=input[this.cursor++];}while(ch>="0"&&ch<="9");this.cursor--;return true;}return false;},lexZeroNumber:function(ch){var token=this.token,input=this.source;
token.type=NUMBER;ch=input[this.cursor++];if(ch==="."){do{ch=input[this.cursor++];}while(ch>="0"&&ch<="9");this.cursor--;this.lexExponent();token.value=parseFloat(input.substring(token.start,this.cursor));
}else{if(ch==="x"||ch==="X"){do{ch=input[this.cursor++];}while((ch>="0"&&ch<="9")||(ch>="a"&&ch<="f")||(ch>="A"&&ch<="F"));this.cursor--;token.value=parseInt(input.substring(token.start,this.cursor));
}else{if(ch>="0"&&ch<="7"){do{ch=input[this.cursor++];}while(ch>="0"&&ch<="7");this.cursor--;token.value=parseInt(input.substring(token.start,this.cursor));
}else{this.cursor--;this.lexExponent();token.value=0;}}}},lexNumber:function(ch){var token=this.token,input=this.source;token.type=NUMBER;var floating=false;
do{ch=input[this.cursor++];if(ch==="."&&!floating){floating=true;ch=input[this.cursor++];}}while(ch>="0"&&ch<="9");this.cursor--;var exponent=this.lexExponent();
floating=floating||exponent;var str=input.substring(token.start,this.cursor);token.value=floating?parseFloat(str):parseInt(str);},lexDot:function(ch){var token=this.token,input=this.source;
var next=input[this.cursor];if(next>="0"&&next<="9"){do{ch=input[this.cursor++];}while(ch>="0"&&ch<="9");this.cursor--;this.lexExponent();token.type=NUMBER;
token.value=parseFloat(input.substring(token.start,this.cursor));}else{token.type=DOT;token.assignOp=null;token.value=".";}},lexString:function(ch){var token=this.token,input=this.source;
token.type=STRING;var hasEscapes=false;var delim=ch;if(input.length<=this.cursor){throw this.newSyntaxError("Unterminated string literal");}while((ch=input[this.cursor++])!==delim){if(ch=="\n"||ch=="\r"){throw this.newSyntaxError("Unterminated string literal");
}if(this.cursor==input.length){throw this.newSyntaxError("Unterminated string literal");}if(ch==="\\"){hasEscapes=true;if(++this.cursor==input.length){throw this.newSyntaxError("Unterminated string literal");
}}}token.value=hasEscapes?eval(input.substring(token.start,this.cursor)):input.substring(token.start+1,this.cursor-1);},lexRegExp:function(ch){var token=this.token,input=this.source;
token.type=REGEXP;do{ch=input[this.cursor++];if(ch==="\\"){this.cursor++;}else{if(ch==="["){do{if(ch===undefined){throw this.newSyntaxError("Unterminated character class");
}if(ch==="\\"){this.cursor++;}ch=input[this.cursor++];}while(ch!=="]");}else{if(ch===undefined){throw this.newSyntaxError("Unterminated regex");}}}}while(ch!=="/");
do{ch=input[this.cursor++];}while(ch>="a"&&ch<="z");this.cursor--;token.value=eval(input.substring(token.start,this.cursor));},lexOp:function(ch){var token=this.token,input=this.source;
var node=opTokens[ch];var next=input[this.cursor];if(next in node){node=node[next];this.cursor++;next=input[this.cursor];if(next in node){node=node[next];
this.cursor++;next=input[this.cursor];}}var op=node.op;if(definitions.assignOps[op]&&input[this.cursor]==="="){this.cursor++;token.type=ASSIGN;token.assignOp=definitions.tokenIds[definitions.opTypeNames[op]];
op+="=";}else{token.type=definitions.tokenIds[definitions.opTypeNames[op]];token.assignOp=null;}token.value=op;},lexIdent:function(ch,keywordIsName){var token=this.token;
var id=ch;while((ch=this.getValidIdentifierChar(false))!==null){id+=ch;}token.type=IDENTIFIER;token.value=id;if(keywordIsName){return;}var kw;if(this.parser.mozillaMode){kw=definitions.mozillaKeywords[id];
if(kw){token.type=kw;return;}}if(this.parser.x.strictMode){kw=definitions.strictKeywords[id];if(kw){token.type=kw;return;}}kw=definitions.keywords[id];
if(kw){token.type=kw;}},get:function(scanOperand,keywordIsName){var token;while(this.lookahead){--this.lookahead;this.tokenIndex=(this.tokenIndex+1)&3;
token=this.tokens[this.tokenIndex];if(token.type!==NEWLINE||this.scanNewlines){return token.type;}}this.skip();this.tokenIndex=(this.tokenIndex+1)&3;token=this.tokens[this.tokenIndex];
if(!token){this.tokens[this.tokenIndex]=token={};}var input=this.source;if(this.cursor>=input.length){return token.type=END;}token.start=this.cursor;token.lineno=this.lineno;
var ich=this.getValidIdentifierChar(true);var ch=(ich===null)?input[this.cursor++]:null;if(ich!==null){this.lexIdent(ich,keywordIsName);}else{if(scanOperand&&ch==="/"){this.lexRegExp(ch);
}else{if(ch in opTokens){this.lexOp(ch);}else{if(ch==="."){this.lexDot(ch);}else{if(ch>="1"&&ch<="9"){this.lexNumber(ch);}else{if(ch==="0"){this.lexZeroNumber(ch);
}else{if(ch==='"'||ch==="'"){this.lexString(ch);}else{if(this.scanNewlines&&(ch==="\n"||ch==="\r")){if(ch==="\r"&&input[this.cursor]==="\n"){this.cursor++;
}token.type=NEWLINE;token.value="\n";this.lineno++;}else{throw this.newSyntaxError("Illegal token");}}}}}}}}token.end=this.cursor;return token.type;},unget:function(){if(++this.lookahead===4){throw"PANIC: too much lookahead!";
}this.tokenIndex=(this.tokenIndex-1)&3;},newSyntaxError:function(m){m=(this.filename?this.filename+":":"")+this.lineno+": "+m;var e=new SyntaxError(m,this.filename,this.lineno);
e.source=this.source;e.cursor=this.lookahead?this.tokens[(this.tokenIndex+this.lookahead)&3].start:this.cursor;return e;},getValidIdentifierChar:function(first){var input=this.source;
if(this.cursor>=input.length){return null;}var ch=input[this.cursor];if(ch==="\\"&&input[this.cursor+1]==="u"){try{ch=String.fromCharCode(parseInt(input.substring(this.cursor+2,this.cursor+6),16));
}catch(ex){return null;}this.cursor+=5;}var valid=isValidIdentifierChar(ch,first);if(valid){this.cursor++;}return(valid?ch:null);},};exports.isIdentifier=isIdentifier;
exports.Tokenizer=Tokenizer;});define("ace/narcissus/definitions",["require","exports","module"],function(require,exports,module){var tokens=["END","\n",";",",","=","?",":","CONDITIONAL","||","&&","|","^","&","==","!=","===","!==","<","<=",">=",">","<<",">>",">>>","+","-","*","/","%","!","~","UNARY_PLUS","UNARY_MINUS","++","--",".","[","]","{","}","(",")","SCRIPT","BLOCK","LABEL","FOR_IN","CALL","NEW_WITH_ARGS","INDEX","ARRAY_INIT","OBJECT_INIT","PROPERTY_INIT","GETTER","SETTER","GROUP","LIST","LET_BLOCK","ARRAY_COMP","GENERATOR","COMP_TAIL","IMPLEMENTS","INTERFACE","LET","MODULE","PACKAGE","PRIVATE","PROTECTED","PUBLIC","STATIC","USE","YIELD","IDENTIFIER","NUMBER","STRING","REGEXP","break","case","catch","const","continue","debugger","default","delete","do","else","export","false","finally","for","function","if","import","in","instanceof","new","null","return","switch","this","throw","true","try","typeof","var","void","while","with",];
var strictKeywords={__proto__:null,"implements":true,"interface":true,let:true,"package":true,"private":true,"protected":true,"public":true,"static":true,use:true,yield:true};
var statementStartTokens=["break","const","continue","debugger","do","for","if","let","return","switch","throw","try","var","yield","while","with",];var whitespaceChars=["\u0009","\u000B","\u000C","\u0020","\u00A0","\uFEFF","\u1680","\u180E","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005","\u2006","\u2007","\u2008","\u2009","\u200A","\u202F","\u205F","\u3000"];
var whitespace={};for(var i=0;i<whitespaceChars.length;i++){whitespace[whitespaceChars[i]]=true;}var opTypeNames={"\n":"NEWLINE",";":"SEMICOLON",",":"COMMA","?":"HOOK",":":"COLON","||":"OR","&&":"AND","|":"BITWISE_OR","^":"BITWISE_XOR","&":"BITWISE_AND","===":"STRICT_EQ","==":"EQ","=":"ASSIGN","!==":"STRICT_NE","!=":"NE","<<":"LSH","<=":"LE","<":"LT",">>>":"URSH",">>":"RSH",">=":"GE",">":"GT","++":"INCREMENT","--":"DECREMENT","+":"PLUS","-":"MINUS","*":"MUL","/":"DIV","%":"MOD","!":"NOT","~":"BITWISE_NOT",".":"DOT","[":"LEFT_BRACKET","]":"RIGHT_BRACKET","{":"LEFT_CURLY","}":"RIGHT_CURLY","(":"LEFT_PAREN",")":"RIGHT_PAREN"};
var keywords={__proto__:null};var mozillaKeywords={__proto__:null};var tokenIds={};var hostSupportsEvalConst=(function(){try{return eval("(function(s) { eval(s); return x })('const x = true;')");
}catch(e){return false;}})();var consts=hostSupportsEvalConst?"const ":"var ";for(var i=0,j=tokens.length;i<j;i++){if(i>0){consts+=", ";}var t=tokens[i];
var name;if(/^[a-z]/.test(t)){name=t.toUpperCase();if(name==="LET"||name==="YIELD"){mozillaKeywords[name]=i;}if(strictKeywords[name]){strictKeywords[name]=i;
}keywords[t]=i;}else{name=(/^\W/.test(t)?opTypeNames[t]:t);}consts+=name+" = "+i;tokenIds[name]=i;tokens[t]=i;}consts+=";";var isStatementStartCode={__proto__:null};
for(i=0,j=statementStartTokens.length;i<j;i++){isStatementStartCode[keywords[statementStartTokens[i]]]=true;}var assignOps=["|","^","&","<<",">>",">>>","+","-","*","/","%"];
for(i=0,j=assignOps.length;i<j;i++){t=assignOps[i];assignOps[t]=tokens[t];}function defineGetter(obj,prop,fn,dontDelete,dontEnum){Object.defineProperty(obj,prop,{get:fn,configurable:!dontDelete,enumerable:!dontEnum});
}function defineGetterSetter(obj,prop,getter,setter,dontDelete,dontEnum){Object.defineProperty(obj,prop,{get:getter,set:setter,configurable:!dontDelete,enumerable:!dontEnum});
}function defineMemoGetter(obj,prop,fn,dontDelete,dontEnum){Object.defineProperty(obj,prop,{get:function(){var val=fn();defineProperty(obj,prop,val,dontDelete,true,dontEnum);
return val;},configurable:true,enumerable:!dontEnum});}function defineProperty(obj,prop,val,dontDelete,readOnly,dontEnum){Object.defineProperty(obj,prop,{value:val,writable:!readOnly,configurable:!dontDelete,enumerable:!dontEnum});
}function isNativeCode(fn){return((typeof fn)==="function")&&fn.toString().match(/\[native code\]/);}var Fpapply=Function.prototype.apply;function apply(f,o,a){return Fpapply.call(f,[o].concat(a));
}var applyNew;if(Function.prototype.bind){applyNew=function applyNew(f,a){return new (f.bind.apply(f,[,].concat(Array.prototype.slice.call(a))))();};}else{applyNew=function applyNew(f,a){switch(a.length){case 0:return new f();
case 1:return new f(a[0]);case 2:return new f(a[0],a[1]);case 3:return new f(a[0],a[1],a[2]);default:var argStr="a[0]";for(var i=1,n=a.length;i<n;i++){argStr+=",a["+i+"]";
}return eval("new f("+argStr+")");}};}function getPropertyDescriptor(obj,name){while(obj){if(({}).hasOwnProperty.call(obj,name)){return Object.getOwnPropertyDescriptor(obj,name);
}obj=Object.getPrototypeOf(obj);}}function getPropertyNames(obj){var table=Object.create(null,{});while(obj){var names=Object.getOwnPropertyNames(obj);
for(var i=0,n=names.length;i<n;i++){table[names[i]]=true;}obj=Object.getPrototypeOf(obj);}return Object.keys(table);}function getOwnProperties(obj){var map={};
for(var name in Object.getOwnPropertyNames(obj)){map[name]=Object.getOwnPropertyDescriptor(obj,name);}return map;}function blacklistHandler(target,blacklist){var mask=Object.create(null,{});
var redirect=Dict.create(blacklist).mapObject(function(name){return mask;});return mixinHandler(redirect,target);}function whitelistHandler(target,whitelist){var catchall=Object.create(null,{});
var redirect=Dict.create(whitelist).mapObject(function(name){return target;});return mixinHandler(redirect,catchall);}function mixinHandler(redirect,catchall){function targetFor(name){return hasOwn(redirect,name)?redirect[name]:catchall;
}function getMuxPropertyDescriptor(name){var desc=getPropertyDescriptor(targetFor(name),name);if(desc){desc.configurable=true;}return desc;}function getMuxPropertyNames(){var names1=Object.getOwnPropertyNames(redirect).filter(function(name){return name in redirect[name];
});var names2=getPropertyNames(catchall).filter(function(name){return !hasOwn(redirect,name);});return names1.concat(names2);}function enumerateMux(){var result=Object.getOwnPropertyNames(redirect).filter(function(name){return name in redirect[name];
});for(name in catchall){if(!hasOwn(redirect,name)){result.push(name);}}return result;}function hasMux(name){return name in targetFor(name);}return{getOwnPropertyDescriptor:getMuxPropertyDescriptor,getPropertyDescriptor:getMuxPropertyDescriptor,getOwnPropertyNames:getMuxPropertyNames,defineProperty:function(name,desc){Object.defineProperty(targetFor(name),name,desc);
},"delete":function(name){var target=targetFor(name);return delete target[name];},fix:function(){},has:hasMux,hasOwn:hasMux,get:function(receiver,name){var target=targetFor(name);
return target[name];},set:function(receiver,name,val){var target=targetFor(name);target[name]=val;return true;},enumerate:enumerateMux,keys:enumerateMux};
}function makePassthruHandler(obj){return{getOwnPropertyDescriptor:function(name){var desc=Object.getOwnPropertyDescriptor(obj,name);desc.configurable=true;
return desc;},getPropertyDescriptor:function(name){var desc=getPropertyDescriptor(obj,name);desc.configurable=true;return desc;},getOwnPropertyNames:function(){return Object.getOwnPropertyNames(obj);
},defineProperty:function(name,desc){Object.defineProperty(obj,name,desc);},"delete":function(name){return delete obj[name];},fix:function(){if(Object.isFrozen(obj)){return getOwnProperties(obj);
}return undefined;},has:function(name){return name in obj;},hasOwn:function(name){return({}).hasOwnProperty.call(obj,name);},get:function(receiver,name){return obj[name];
},set:function(receiver,name,val){obj[name]=val;return true;},enumerate:function(){var result=[];for(name in obj){result.push(name);}return result;},keys:function(){return Object.keys(obj);
}};}var hasOwnProperty=({}).hasOwnProperty;function hasOwn(obj,name){return hasOwnProperty.call(obj,name);}function Dict(table,size){this.table=table||Object.create(null,{});
this.size=size||0;}Dict.create=function(table){var init=Object.create(null,{});var size=0;var names=Object.getOwnPropertyNames(table);for(var i=0,n=names.length;
i<n;i++){var name=names[i];init[name]=table[name];size++;}return new Dict(init,size);};Dict.prototype={has:function(x){return hasOwnProperty.call(this.table,x);
},set:function(x,v){if(!hasOwnProperty.call(this.table,x)){this.size++;}this.table[x]=v;},get:function(x){return this.table[x];},getDef:function(x,thunk){if(!hasOwnProperty.call(this.table,x)){this.size++;
this.table[x]=thunk();}return this.table[x];},forEach:function(f){var table=this.table;for(var key in table){f.call(this,key,table[key]);}},map:function(f){var table1=this.table;
var table2=Object.create(null,{});this.forEach(function(key,val){table2[key]=f.call(this,val,key);});return new Dict(table2,this.size);},mapObject:function(f){var table1=this.table;
var table2=Object.create(null,{});this.forEach(function(key,val){table2[key]=f.call(this,val,key);});return table2;},toObject:function(){return this.mapObject(function(val){return val;
});},choose:function(){return Object.getOwnPropertyNames(this.table)[0];},remove:function(x){if(hasOwnProperty.call(this.table,x)){this.size--;delete this.table[x];
}},copy:function(){var table=Object.create(null,{});for(var key in this.table){table[key]=this.table[key];}return new Dict(table,this.size);},keys:function(){return Object.keys(this.table);
},toString:function(){return"[object Dict]";}};var _WeakMap=typeof WeakMap==="function"?WeakMap:(function(){function WeakMap(array){this.array=array||[];
}function searchMap(map,key,found,notFound){var a=map.array;for(var i=0,n=a.length;i<n;i++){var pair=a[i];if(pair.key===key){return found(pair,i);}}return notFound();
}WeakMap.prototype={has:function(x){return searchMap(this,x,function(){return true;},function(){return false;});},set:function(x,v){var a=this.array;searchMap(this,x,function(pair){pair.value=v;
},function(){a.push({key:x,value:v});});},get:function(x){return searchMap(this,x,function(pair){return pair.value;},function(){return null;});},"delete":function(x){var a=this.array;
searchMap(this,x,function(pair,i){a.splice(i,1);},function(){});},toString:function(){return"[object WeakMap]";}};return WeakMap;})();function Stack(elts){this.elts=elts||null;
}Stack.prototype={push:function(x){return new Stack({top:x,rest:this.elts});},top:function(){if(!this.elts){throw new Error("empty stack");}return this.elts.top;
},isEmpty:function(){return this.top===null;},find:function(test){for(var elts=this.elts;elts;elts=elts.rest){if(test(elts.top)){return elts.top;}}return null;
},has:function(x){return Boolean(this.find(function(elt){return elt===x;}));},forEach:function(f){for(var elts=this.elts;elts;elts=elts.rest){f(elts.top);
}}};if(!Array.prototype.copy){defineProperty(Array.prototype,"copy",function(){var result=[];for(var i=0,n=this.length;i<n;i++){result[i]=this[i];}return result;
},false,false,true);}if(!Array.prototype.top){defineProperty(Array.prototype,"top",function(){return this.length&&this[this.length-1];},false,false,true);
}exports.tokens=tokens;exports.whitespace=whitespace;exports.opTypeNames=opTypeNames;exports.keywords=keywords;exports.mozillaKeywords=mozillaKeywords;
exports.strictKeywords=strictKeywords;exports.isStatementStartCode=isStatementStartCode;exports.tokenIds=tokenIds;exports.consts=consts;exports.assignOps=assignOps;
exports.defineGetter=defineGetter;exports.defineGetterSetter=defineGetterSetter;exports.defineMemoGetter=defineMemoGetter;exports.defineProperty=defineProperty;
exports.isNativeCode=isNativeCode;exports.apply=apply;exports.applyNew=applyNew;exports.mixinHandler=mixinHandler;exports.whitelistHandler=whitelistHandler;
exports.blacklistHandler=blacklistHandler;exports.makePassthruHandler=makePassthruHandler;exports.Dict=Dict;exports.WeakMap=_WeakMap;exports.Stack=Stack;
});define("ace/narcissus/options",["require","exports","module"],function(b,a,c){a.hiddenHostGlobals={Narcissus:true};a.desugarExtensions=false;a.allowHTMLComments=false;
a.mozillaMode=true;a.parenFreeMode=false;});