ace/build/src/worker-javascript.js
Fabian Jakobs 2b34fff2e7 Merge remote branch 'robconery/master'
Conflicts:
	build/src/ace-uncompressed.js
	build/src/ace.js
	build/src/cockpit.js
	build/src/mode-html.js
	build/src/mode-java.js
	build/src/mode-javascript.js
	build/src/theme-idle_fingers.js
	build/src/theme-twilight.js
	build/src/worker-javascript.js
2011-02-22 13:59:27 +01:00

1 line
No EOL
115 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

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

function initSender(){var a=require("pilot/event_emitter").EventEmitter,b=require("pilot/oop"),c=function(){};(function(){b.implement(this,a),this.callback=function(a,b){postMessage({type:"call",id:b,data:a})},this.emit=function(a,b){postMessage({type:"event",name:a,data:b})}}).call(c.prototype);return new c}function initBaseUrls(a){require.tlns=a}var console={log:function(a){postMessage({type:"log",data:a})}},window={console:console},require=function(a){var b=require.modules[a];if(b){b.initialized||(b.exports=b.factory().exports,b.initialized=!0);return b.exports}var c=a.split("/");c[0]=require.tlns[c[0]]||c[0],path=c.join("/")+".js",require.id=a,importScripts(path);return require(a)};require.modules={},require.tlns={};var define=function(a,b,c){arguments.length==2?c=b:arguments.length==1&&(c=a,a=require.id);a.indexOf("text!")!==0&&(require.modules[a]={factory:function(){var a={exports:{}},b=c(require,a.exports,a);b&&(a.exports=exports);return a}})},main,sender;onmessage=function(a){var b=a.data;if(b.command)main[b.command].apply(main,b.args);else if(b.init){initBaseUrls(b.tlns),require("pilot/fixoldbrowsers"),sender=initSender();var c=require(b.module)[b.classname];main=new c(sender)}else b.event&&sender._dispatchEvent(b.event,b.data)},define("pilot/fixoldbrowsers",["require","exports","module"],function(a,b,c){Function.prototype.bind||(Function.prototype.bind=function(a){var b=[].slice,c=b.call(arguments,1),d=this,e=function(){};if(arguments.length==1)var f=function(){var b=d.prototype===undefined?this instanceof arguments.callee:this instanceof e;return d.apply(b?this:a,arguments)};else var f=function(){var f=d.prototype===undefined?this instanceof arguments.callee:this instanceof e;return d.apply(f?this:a||{},c.concat(b.call(arguments)))};e.prototype=d.prototype,f.prototype=new e,f.name=this.name,f.displayName=this.displayName,f.length=this.length,f.unbound=d;return f});var d=function(){},e=Function.prototype.call,f=e.bind(Object.prototype.hasOwnProperty),g,h,i,j;g=h=i=j=d,Object.prototype.__lookupGetter__&&(g=e.bind(Object.prototype.__lookupGetter__)),Object.prototype.__lookupSetter__&&(h=e.bind(Object.prototype.__lookupSetter__)),Object.prototype.__defineGetter__&&(i=e.bind(Object.prototype.__defineGetter__)),Object.prototype.__defineSetter__&&(j=e.bind(Object.prototype.__defineSetter__)),Array.isArray||(Array.isArray=function(a){return a&&Object.prototype.toString.call(a)==="[object Array]"}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(c===0)return-1;var d=0,e=d;arguments.length>0&&(d=Number(arguments[1]),d!==d?d=0:d!==0&&d!==1/e&&d!==-(1/e)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;var f=d>=0?d:Math.max(c-Math.abs(d),0);for(;f<c;f++)if(f in b&&b[f]===a)return f;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){"use strict";if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(c===0)return-1;var d=c,e=!1|0;arguments.length>0&&(d=Number(arguments[1]),d!==d?d=0:d!==0&&d!==1/e&&d!==-(1/e)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));var f=d>=0?Math.min(d,c-1):c-Math.abs(d);while(f>=0)if(f in b&&b[f]===a)return f;return-1}),Array.prototype.map||(Array.prototype.map=function(a){if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(typeof a!=="function")throw new TypeError;res=Array(c);var d=arguments[1];for(var e=0;e<c;e++)e in b&&(res[e]=a.call(d,b[e],e,b));return res}),Array.prototype.forEach||(Array.prototype.forEach=function(a){if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(typeof a!=="function")throw new TypeError;var d=arguments[1];for(var e=0;e<c;e++)e in b&&a.call(d,b[e],e,b)}),Array.prototype.filter||(Array.prototype.filter=function k(a,b){var c=[],d,e;for(d=0,e=this.length;d<e;d++)a.call(b,this[d])&&c.push(this[d]);return c}),Array.prototype.every||(Array.prototype.every=function l(a,b){var c,d;for(c=0,d=this.length;c<d;c++)if(!a.call(b,this[c]))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a,b){var c,d;for(c=0,d=this.length;c<d;c++)if(a.call(b,this[c]))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=this.length>>>0;if(typeof a!="function")throw new TypeError;if(b==0&&arguments.length==1)throw new TypeError;var c=0;if(arguments.length<2){do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0)}else var d=arguments[1];for(;c<b;c++)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=this.length>>>0;if(typeof a!="function")throw new TypeError;if(b==0&&arguments.length==1)throw new TypeError;var c=b-1;if(arguments.length<2){do{if(c in this){d=this[c--];break}if(--c<0)throw new TypeError}while(!0)}else var d=arguments[1];for(;c>=0;c--)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Object.keys||(Object.keys=function m(a){var b,c=[];for(b in a)f(a,b)&&c.push(b);return c}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=Object.keys);var n="Object.getOwnPropertyDescriptor called on a non-object";Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function o(a,b){var c,d,e;if(typeof a!=="object"&&typeof a!=="function"||a===null)throw new TypeError(n);f(a,b)&&(c={configurable:!0,enumerable:!0},d=c.get=g(a,b),e=c.set=h(a,b),!d&&!e&&(c.writeable=!0,c.value=a[b]));return c}),Object.getPrototypeOf||(Object.getPrototypeOf=function p(a){return a.__proto__||a.constructor.prototype}),Object.create||(Object.create=function q(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!=="object")throw new TypeError(a+" is not an object or null");d.prototype=a,c=new d}typeof b!=="undefined"&&Object.defineProperties(c,b);return c}),Object.defineProperty||(Object.defineProperty=function r(a,b,c){var d,e,f;if("object"!==typeof a&&"function"!==typeof a)throw new TypeError(a+"is not an object");if(c&&"object"!==typeof c)throw new TypeError("Property descriptor map must be an object");if("value"in c){if("get"in c||"set"in c)throw new TypeError('Invalid property. "value" present on property with getter or setter.');if(d=a.__proto__)a.__proto__=Object.prototype;delete a[b],a[b]=c.value,d&&(a.__proto__=d)}else(f=c.get)&&i(a,f),(e=c.set)&&j(a,e);return a}),Object.defineProperties||(Object.defineProperties=function s(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,b[c])});return a});var t=function(a){return a};Object.seal||(Object.seal=t),Object.freeze||(Object.freeze=t),Object.preventExtensions||(Object.preventExtension=t);var u=function(){return!1},v=function(){return!0};Object.isSealed||(Object.isSealed=u),Object.isFrozen||(Object.isFrozen=u),Object.isExtensible||(Object.isExtensible=v),String.prototype.trim||(String.prototype.trim=function(){return this.trimLeft().trimRight()}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/[\t\v\f\s\u00a0\ufeff]+$/,"")}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^[\t\v\f\s\u00a0\ufeff]+/,"")}),b.globalsLoaded=!0}),define("pilot/event_emitter",["require","exports","module"],function(a,b,c){var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(c&&c.length){var b=b||{};b.type=a;for(var d=0;d<c.length;d++)c[d](b)}},d.on=d.addEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!c)var c=this._eventRegistry[a]=[];c.indexOf(b)==-1&&c.push(b)},d.removeListener=d.removeEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(c){var d=c.indexOf(b);d!==-1&&c.splice(d,1)}},d.removeAllListeners=function(a){this._eventRegistry&&(this._eventRegistry[a]=[])},b.EventEmitter=d}),define("pilot/oop",["require","exports","module"],function(a,b,c){b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c]},b.implement=function(a,c){b.mixin(a,c)}}),define("ace/mode/javascript_worker",["require","exports","module","pilot/oop","ace/worker/mirror","ace/worker/jshint","ace/narcissus/jsparse"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/worker/mirror").Mirror,f=a("ace/worker/jshint").JSHINT,g=b.JavaScriptWorker=function(a){e.call(this,a),this.setTimeout(500)};d.inherits(g,e),function(){this.onUpdate=function(){var b=this.doc.getValue();b=b.replace(/^#!.*\n/,"\n");var c=a("ace/narcissus/jsparse");try{c.parse(b)}catch(d){sender.emit("narcissus",{row:d.lineno-1,column:null,text:d.message,type:"error"});return}finally{}f(b,{undef:!1,onevar:!1,passfail:!1}),this.sender.emit("jslint",f.errors)}}.call(g.prototype)}),define("ace/worker/mirror",["require","exports","module","ace/document","pilot/lang"],function(a,b,c){var d=a("ace/document").Document,e=a("pilot/lang"),f=b.Mirror=function(a){this.sender=a;var b=this.doc=new d(""),c=this.deferredUpdate=e.deferredCall(this.onUpdate.bind(this)),f=this;a.on("change",function(a){b.applyDeltas([a.data]),c.schedule(f.$timeout)})};(function(){this.$timeout=500,this.setTimeout=function(a){this.$timeout=a},this.setValue=function(a){this.doc.setValue(a),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(a){this.sender.callback(this.doc.getValue(),a)},this.onUpdate=function(){}}).call(f.prototype)}),define("ace/document",["require","exports","module","pilot/oop","pilot/event_emitter","ace/range","ace/anchor"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=a("ace/range").Range,g=a("ace/anchor").Anchor,h=function(a){this.$lines=[],Array.isArray(a)?this.insertLines(0,a):a.length==0?this.$lines=[""]:this.insert({row:0,column:0},a)};(function(){d.implement(this,e),this.setValue=function(a){var b=this.getLength();this.remove(new f(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new g(this,a,b)},"aaa".split(/a/).length==0?this.$split=function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]: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(a){this.$newLineMode!==a&&(this.$newLineMode=a)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return a=="\r\n"||a=="\r"||a=="\n"},this.getLine=function(a){return this.getLines(a,a+1)[0]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.$lines[a.start.row].substring(a.start.column,a.end.column);var b=[];b.push(this.$lines[a.start.row].substring(a.start.column)),b.push.apply(b,this.getLines(a.start.row+1,a.end.row-1)),b.push(this.$lines[a.end.row].substring(0,a.end.column));return b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();a.row>=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length);return a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||""));return a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};this._dispatchEvent("change",{data:e});return d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:d});return c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};this._dispatchEvent("change",{data:e});return d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};this._dispatchEvent("change",{data:i});return d.start}},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};this._dispatchEvent("change",{data:e});return d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.insertLines(d.start.row,c.lines):c.action=="insertText"?this.insert(d.start,c.text):c.action=="removeLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="removeText"&&this.remove(d)}},this.revertDeltas=function(a){for(var b=a.length-1;b>=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}}).call(h.prototype),b.Document=h}),define("ace/range",["require","exports","module"],function(a,b,c){var d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compare=function(a,b){if(!this.isMultiLine())if(a===this.start.row)return b<this.start.column?-1:b>this.end.column?1:0;if(a<this.start.row)return-1;if(a>this.end.row)return 1;if(this.start.row===a)return b>=this.start.column?0:-1;if(this.end.row===a)return b<=this.end.column?0:1;return 0},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.row<a)var e={row:a,column:0};if(this.end.row<a)var c={row:a,column:0};return d.fromPoints(e||this.start,c||this.end)},this.extend=function(a,b){var c=this.compare(a,b);if(c==0)return this;if(c==-1)var e={row:a,column:b};else var f={row:a,column:b};return d.fromPoints(e||this.start,f||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(){return this.end.column==0?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},this.toScreenRange=function(a){var b=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new d(b.row,b.column,c.row,c.column)}}).call(d.prototype),d.fromPoints=function(a,b){return new d(a.row,a.column,b.row,b.column)},b.Range=d}),define("ace/anchor",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.document=a,typeof c=="undefined"?this.setPosition(b.row,b.column):this.setPosition(b,c),this.$onChange=this.onChange.bind(this),a.on("change",this.$onChange)};(function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(a){var b=a.data,c=b.range;if(c.start.row!=c.end.row||c.start.row==this.row){if(c.start.row>this.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row!==d||c.start.column>e?c.start.row!==c.end.row&&c.start.row<d&&(d+=c.end.row-c.start.row):c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):b.action==="insertLines"?c.start.row<=d&&(d+=c.end.row-c.start.row):b.action=="removeText"?c.start.row==d&&c.start.column<e?c.end.column<e?e=Math.max(0,e-(c.end.column-c.start.column)):e=c.start.column:c.start.row!==c.end.row&&c.start.row<d?(c.end.row==d&&(e=Math.max(0,e-c.end.column)+c.start.column),d-=c.end.row-c.start.row):c.end.row==d&&(d-=c.end.row-c.start.row,e=Math.max(0,e-c.end.column)+c.start.column):b.action=="removeLines"&&(c.start.row<=d&&(c.end.row>d?(d=c.start.row,e=0):d-=c.end.row-c.start.row)),this.setPosition(d,e,!0)}},this.setPosition=function(a,b,c){c?pos={row:a,column:b}:pos=this.$clipPositionToDocument(a,b);if(this.row!=pos.row||this.column!=pos.column){var d={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._dispatchEvent("change",{old:d,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.$clipPositionToDocument=function(a,b){var c={};a<this.document.getLength()?a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))):(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length),b<0&&(c.column=0);return c}}).call(f.prototype)}),define("pilot/lang",["require","exports","module"],function(a,b,c){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){return Array(b+1).join(a)},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.arrayToMap=function(a){var b={};for(var c=0;c<a.length;c++)b[a[c]]=1;return b},b.arrayRemove=function(a,b){for(var c=0;c<=a.length;c++)b===a[c]&&a.splice(c,1)},b.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},b.deferredCall=function(a){var b=null,c=function(){b=null,a()},d=function(a){b||(b=setTimeout(c,a||0));return d};d.schedule=d,d.call=function(){this.cancel(),a();return d},d.cancel=function(){clearTimeout(b),b=null;return d};return d}}),define("ace/worker/jshint",["require","exports","module"],function(a,b,c){var d=function(){function cR(){function b(){var a=I;bG("[");if(I.id!=="]")for(;;){if(I.id==="(end)")bA("Missing ']' to match '[' from line {a}.",I,a.line);else{if(I.id==="]"){by("Unexpected comma.",Y);break}I.id===","&&bA("Unexpected comma.",I)}cR();if(I.id!==",")break;bG(",")}bG("]")}function a(){var a={},b=I;bG("{");if(I.id!=="}")for(;;){if(I.id==="(end)")bA("Missing '}' to match '{' from line {a}.",I,b.line);else{if(I.id==="}"){by("Unexpected comma.",Y);break}I.id===","?bA("Unexpected comma.",I):I.id!=="(string)"&&by("Expected a string and instead saw {a}.",I,I.value)}a[I.value]===!0?by("Duplicate key '{a}'.",I,I.value):I.value==="__proto__"?by("Stupid key '{a}'.",I,I.value):a[I.value]=!0,bG(),bG(":"),cR();if(I.id!==",")break;bG(",")}bG("}")}switch(I.id){case"{":a();break;case"[":b();break;case"true":case"false":case"null":case"(number)":case"(string)":bG();break;case"-":bG("-"),Y.character!==I.from&&by("Unexpected space after '-'.",Y),bI(Y,I),bG("(number)");break;default:bA("Expected a JSON value.",I)}}function cP(a,b){var c,d=Q;Q=Object.create(d),u={"(name)":a||'"'+e+'"',"(line)":I.line,"(context)":u,"(breakage)":0,"(loopage)":0,"(scope)":Q,"(statement)":b},c=u,Y.funct=u,w.push(u),a&&bD(a,"function"),u["(params)"]=cO(),ck(!1),Q=d,u["(last)"]=Y.line,u=u["(context)"];return c}function cO(){var a,b=I,c=[];bG("("),bK();if(I.id===")")bG(")"),bK(O,Y);else for(;;){a=cf(),c.push(a),bD(a,"parameter");if(I.id===",")bP();else{bG(")",b),bK(O,Y);return c}}}function cN(){var a=ce(!0);a||(I.id==="(string)"?(a=I.value,L.adsafe&&(a.charAt(0)==="_"||a.charAt(a.length-1)==="_")&&by("Unexpected {a} in '{b}'.",Y,"dangling '_'",a),bG()):I.id==="(number)"&&(a=I.value.toString(),bG()));return a}function cM(){var a,b,c,d,e,f,g,h=L.white,i;bb="html",bc="",S=null;for(;;){switch(I.value){case"<":bb="html",bG("<"),b={},f=I,f.identifier||by("Bad identifier {a}.",f,f.value),d=f.value,L.cap&&(d=d.toLowerCase()),f.name=d,bG(),S||(S=[],cI(d)),g=y[d],typeof g!=="object"&&bA("Unrecognized tag '<{a}>'.",f,d),c=g.empty,f.type=d;for(;;){if(I.id==="/"){bG("/"),I.id!==">"&&by("Expected '{a}' and instead saw '{b}'.",I,">",I.value);break}if(I.id&&I.id.substr(0,1)===">")break;I.identifier||((I.id==="(end)"||I.id==="(error)")&&bA("Missing '>'.",I),by("Bad identifier.")),L.white=!0,bL(Y,I),a=I.value,L.white=h,bG(),!L.cap&&a!==a.toLowerCase()&&by("Attribute '{a}' not all lower case.",I,a),a=a.toLowerCase(),bc="",bu(b,a)&&by("Attribute '{a}' repeated.",I,a),a.slice(0,2)==="on"?(L.on||by("Avoid HTML event handlers."),bb="scriptstring",bG("="),e=I.id,e!=='"'&&e!=="'"&&bA("Missing quote."),bc=e,i=L.white,L.white=!1,bG(e),ci(),cj("on"),L.white=i,I.id!==e&&bA("Missing close quote on script attribute."),bb="html",bc="",bG(e),g=!1):a==="style"?(bb="scriptstring",bG("="),e=I.id,e!=='"'&&e!=="'"&&bA("Missing quote."),bb="styleproperty",bc=e,bG(e),cD(),bb="html",bc="",bG(e),g=!1):I.id==="="?(bG("="),g=I.value,!I.identifier&&I.id!=='"'&&I.id!=="'"&&I.type!=="(string)"&&I.type!=="(number)"&&I.type!=="(color)"&&by("Expected an attribute value and instead saw '{a}'.",Y,a),bG()):g=!0,b[a]=g,cJ(d,a,g)}cK(d,b),c||S.push(f),bb="outer",bG(">");break;case"</":bb="html",bG("</"),I.identifier||by("Bad identifier."),d=I.value,L.cap&&(d=d.toLowerCase()),bG(),S||bA("Unexpected '{a}'.",I,cL(d)),f=S.pop(),f||bA("Unexpected '{a}'.",I,cL(d)),f.name!==d&&bA("Expected '{a}' and instead saw '{b}'.",I,cL(f.name),cL(d)),I.id!==">"&&bA("Missing '{a}'.",I,">"),bb="outer",bG(">");break;case"<!":L.safe&&by("ADsafe HTML violation."),bb="html";for(;;){bG();if(I.id===">"||I.id==="(end)")break;I.value.indexOf("--")>=0&&bA("Unexpected --."),I.value.indexOf("<")>=0&&bA("Unexpected <."),I.value.indexOf(">")>=0&&bA("Unexpected >.")}bb="outer",bG(">");break;case"(end)":return;default:I.id==="(end)"?bA("Missing '{a}'.",I,"</"+S[S.length-1].value+">"):bG()}if(S&&S.length===0&&(L.adsafe||!L.fragment||I.id==="(end)"))break}I.id!=="(end)"&&bA("Unexpected material after the end.")}function cL(a){return"</"+a+">"}function cK(d,e){var g,h=y[d],i;R=!1,h||bA("Unrecognized tag '<{a}>'.",I,d===d.toLowerCase()?d:d+" (capitalization error)");if(S.length>0){d==="html"&&bA("Too many <html> tags.",Y),i=h.parent;if(i)i.indexOf(" "+S[S.length-1].name+" ")<0&&bA("A '<{a}>' must be within '<{b}>'.",Y,d,i);else if(!L.adsafe&&!L.fragment){g=S.length;do g<=0&&bA("A '<{a}>' must be within '<{b}>'.",Y,d,"body"),g-=1;while(S[g].name!=="body")}}switch(d){case"div":L.adsafe&&S.length===1&&!a&&by("ADSAFE violation: missing ID_.");break;case"script":bb="script",bG(">"),C=I.from,e.lang&&by("lang is deprecated.",Y),L.adsafe&&S.length!==1&&by("ADsafe script placement violation.",Y),e.src?(L.adsafe&&(!b||!f[e.src])&&by("ADsafe unapproved script source.",Y),e.type&&by("type is unnecessary.",Y)):(c&&bA("ADsafe script violation.",Y),ci(),cj("script")),bb="html",bG("</"),!I.identifier&&I.value!=="script"&&by("Expected '{a}' and instead saw '{b}'.",I,"script",I.value),bG(),bb="outer";break;case"style":bb="style",bG(">"),cH(),bb="html",bG("</"),!I.identifier&&I.value!=="style"&&by("Expected '{a}' and instead saw '{b}'.",I,"style",I.value),bG(),bb="outer";break;case"input":switch(e.type){case"radio":case"checkbox":case"button":case"reset":case"submit":break;case"text":case"file":case"password":case"file":case"hidden":case"image":L.adsafe&&e.autocomplete!=="off"&&by("ADsafe autocomplete violation.");break;default:by("Bad input type.")}break;case"applet":case"body":case"embed":case"frame":case"frameset":case"head":case"iframe":case"noembed":case"noframes":case"object":case"param":L.adsafe&&by("ADsafe violation: Disallowed tag: "+d)}}function cJ(b,c,d){var e,f;c==="id"?(e=typeof d==="string"?d.toUpperCase():"",z[e]===!0&&by("Duplicate id='{a}'.",I,d),/^[A-Za-z][A-Za-z0-9._:\-]*$/.test(d)?L.adsafe&&(a?d.slice(0,a.length)!==a?by("ADsafe violation: An id must have a '{a}' prefix",I,a):/^[A-Z]+_[A-Z]+$/.test(d)||by("ADSAFE violation: bad id."):(a=d,/^[A-Z]+_$/.test(d)||by("ADSAFE violation: bad id."))):by("Bad id: '{a}'.",I,d),f=d.search(br),f>=0&&by("Unexpected character '{a}' in {b}.",Y,d.charAt(f),c),z[e]=!0):c==="class"||c==="type"||c==="name"?(f=d.search(bq),f>=0&&by("Unexpected character '{a}' in {b}.",Y,d.charAt(f),c),z[e]=!0):c!=="href"&&c!=="background"&&c!=="content"&&c!=="data"&&c.indexOf("src")<0&&c.indexOf("url")<0?c==="for"?L.adsafe&&(a?d.slice(0,a.length)!==a?by("ADsafe violation: An id must have a '{a}' prefix",I,a):/^[A-Z]+_[A-Z]+$/.test(d)||by("ADSAFE violation: bad id."):by("ADSAFE violation: bad id.")):c==="name"&&(L.adsafe&&d.indexOf("_")>=0&&by("ADsafe name violation.")):(L.safe&&bn.test(d)&&bA("ADsafe URL violation."),Z.push(d))}function cI(a){a!=="html"&&!L.fragment&&(a==="div"&&L.adsafe?bA("ADSAFE: Use the fragment option."):bA("Expected '{a}' and instead saw '{b}'.",Y,"html",a)),L.adsafe&&(a==="html"&&bA("Currently, ADsafe does not operate on whole HTML documents. It operates on <div> fragments and .js files.",Y),L.fragment?a!=="div"&&bA("ADsafe violation: Wrap the widget in a div.",Y):bA("Use the fragment option.",Y)),L.browser=!0,bw()}function cH(){var a;while(I.id==="@"){a=bF(),bG("@");if(I.identifier)switch(I.value){case"import":bG(),cz()||(by("Expected '{a}' and instead saw '{b}'.",I,"url",I.value),bG()),bG(";");break;case"media":bG();for(;;){(!I.identifier||q[I.value]===!0)&&bA("Expected a CSS media type, and instead saw '{a}'.",I,I.id),bG();if(I.id!==",")break;bG(",")}bG("{"),cG(),bG("}");break;default:by("Expected an at-rule, and instead saw @{a}.",I,I.value)}else by("Expected an at-rule, and instead saw '{a}'.",I,I.value)}cG()}function cG(){while(I.id!=="</"&&I.id!=="(end)")cF(),bb="styleproperty",I.id===";"?bG(";"):(bG("{"),cD(),bb="style",bG("}"))}function cF(){I.id==="{"&&by("Expected a style pattern, and instead saw '{a}'.",I,I.id);for(;;){cE();if(I.id==="</"||I.id==="{"||I.id==="(end)")return"";I.id===","&&bP()}}function cE(){if(I.identifier)bu(y,L.cap?I.value.toLowerCase():I.value)||by("Expected a tagName, and instead saw {a}.",I,I.value),bG();else switch(I.id){case">":case"+":bG(),cE();break;case":":bG(":");switch(I.value){case"active":case"after":case"before":case"checked":case"disabled":case"empty":case"enabled":case"first-child":case"first-letter":case"first-line":case"first-of-type":case"focus":case"hover":case"last-child":case"last-of-type":case"link":case"only-of-type":case"root":case"target":case"visited":bG();break;case"lang":bG(),bG("("),I.identifier||by("Expected a lang code, and instead saw :{a}.",I,I.value),bG(")");break;case"nth-child":case"nth-last-child":case"nth-last-of-type":case"nth-of-type":bG(),bG("("),cC(),bG(")");break;case"not":bG(),bG("("),I.id===":"&&bF(0).value==="not"&&by("Nested not."),cE(),bG(")");break;default:by("Expected a pseudo, and instead saw :{a}.",I,I.value)}break;case"#":bG("#"),I.identifier||by("Expected an id, and instead saw #{a}.",I,I.value),bG();break;case"*":bG("*");break;case".":bG("."),I.identifier||by("Expected a class, and instead saw #.{a}.",I,I.value),bG();break;case"[":bG("["),I.identifier||by("Expected an attribute, and instead saw [{a}].",I,I.value),bG();if(I.id==="="||I.value==="~="||I.value==="$="||I.value==="|="||I.id==="*="||I.id==="^=")bG(),I.type!=="(string)"&&by("Expected a string, and instead saw {a}.",I,I.value),bG();bG("]");break;default:bA("Expected a CSS selector, and instead saw {a}.",I,I.value)}}function cD(){var a;for(;;){if(I.id==="}"||I.id==="(end)"||bc&&I.id===bc)return;while(I.id===";")by("Misplaced ';'."),bG(";");a=cA(),bG(":"),I.identifier&&I.value==="inherit"?bG():cB(a)||(by("Unexpected token '{a}'.",I,I.value),bG()),I.id==="!"&&(bG("!"),bI(),I.identifier&&I.value==="important"?bG():by("Expected '{a}' and instead saw '{b}'.",I,"important",I.value)),I.id==="}"||I.id===bc?by("Missing '{a}'.",I,";"):bG(";")}}function cC(){if(I.id==="(number)")bG(),I.value==="n"&&I.identifier&&(bI(),bG(),I.id==="+"&&(bI(),bG("+"),bI(),bG("(number)")));else{switch(I.value){case"odd":case"even":if(I.identifier){bG();return}}by("Unexpected token '{a}'.",I,I.value)}}function cB(a){var b=0,c,d,e,f,g=0,h;switch(typeof a){case"function":return a();case"string":if(I.identifier&&I.value===a){bG();return!0}return!1}for(;;){if(b>=a.length)return!1;h=a[b],b+=1;if(h===!0)break;typeof h==="number"?(c=h,h=a[b],b+=1):c=1,e=!1;while(c>0)if(cB(h))e=!0,c-=1;else break;if(e)return!0}g=b,d=[];for(;;){f=!1;for(b=g;b<a.length;b+=1)if(!d[b])if(cB(k[a[b]])){e=!0,f=!0,d[b]=!0;break}if(!f)return e}}function cA(){var a;while(I.id==="*"||I.id==="#"||I.value==="_")L.css||by("Unexpected '{a}'.",I,I.value),bG();if(I.id==="-"){L.css||by("Unexpected '{a}'.",I,I.value),bG("-"),I.identifier||by("Expected a non-standard style attribute and instead saw '{a}'.",I,I.value),bG();return l}I.identifier?bu(k,I.value)?a=k[I.value]:(a=l,L.css||by("Unrecognized style attribute '{a}'.",I,I.value)):by("Excepted a style attribute, and instead saw '{a}'.",I,I.value),bG();return a}function cz(){var a,b;if(I.identifier&&I.value==="url"){I=bC.range("(",")"),b=I.value,a=b.charAt(0);if(a==='"'||a==="'")b.slice(-1)!==a?by("Bad url string."):(b=b.slice(1,-1),b.indexOf(a)>=0&&by("Bad url string."));b||by("Missing url."),bG(),L.safe&&bn.test(b)&&bA("ADsafe URL violation."),Z.push(b);return!0}return!1}function cy(){var a;if(I.identifier&&I.value==="rect"){bG(),bG("(");for(a=0;a<4;a+=1)if(!cr()){by("Expected a number and instead saw '{a}'.",I,I.value);break}bG(")");return!0}return!1}function cx(){if(I.identifier&&I.value==="counter"){bG(),bG("("),bG(),I.id===","&&(bP(),I.type!=="(string)"&&by("Expected a string and instead saw '{a}'.",I,I.value),bG()),bG(")");return!0}if(I.identifier&&I.value==="counters"){bG(),bG("("),I.identifier||by("Expected a name and instead saw '{a}'.",I,I.value),bG(),I.id===","&&(bP(),I.type!=="(string)"&&by("Expected a string and instead saw '{a}'.",I,I.value),bG()),I.id===","&&(bP(),I.type!=="(string)"&&by("Expected a string and instead saw '{a}'.",I,I.value),bG()),bG(")");return!0}return!1}function cw(){while(I.id!==";"){!cn()&&!cp()&&by("Expected a name and instead saw '{a}'.",I,I.value);if(I.id!==",")return!0;bP()}}function cv(){if(I.identifier&&I.value==="attr"){bG(),bG("("),I.identifier||by("Expected a name and instead saw '{a}'.",I,I.value),bG(),bG(")");return!0}return!1}function cu(){if(!I.identifier)return cr();if(I.value==="auto"){bG();return!0}}function ct(){if(!I.identifier)return cr();switch(I.value){case"thin":case"medium":case"thick":bG();return!0}}function cs(){I.id==="-"&&(bG("-"),bI());if(I.type==="(number)"){bG(),I.type!=="(string)"&&p[I.value]===!0&&(bI(),bG());return!0}return!1}function cr(){I.id==="-"&&(bG("-"),bI(),bO());if(I.type==="(number)"){bG(),I.type!=="(string)"&&p[I.value]===!0?(bI(),bG()):+Y.value!==0&&by("Expected a linear unit and instead saw '{a}'.",I,I.value);return!0}return!1}function cq(){var a,b,c;if(I.identifier){c=I.value;if(c==="rgb"||c==="rgba"){bG(),bG("(");for(a=0;a<3;a+=1)a&&bG(","),b=I.value,I.type!=="(number)"||b<0?(by("Expected a positive number and instead saw '{a}'",I,b),bG()):(bG(),I.id==="%"?(bG("%"),b>100&&by("Expected a percentage and instead saw '{a}'",Y,b)):b>255&&by("Expected a small number and instead saw '{a}'",Y,b));c==="rgba"&&(bG(","),b=+I.value,(I.type!=="(number)"||b<0||b>1)&&by("Expected a number between 0 and 1 and instead saw '{a}'",I,b),bG(),I.id==="%"&&(by("Unexpected '%'."),bG("%"))),bG(")");return!0}if(m[I.value]===!0){bG();return!0}}else if(I.type==="(color)"){bG();return!0}return!1}function cp(){if(I.type==="(string)"){bG();return!0}}function co(){I.id==="-"&&(bG("-"),bI(),bO());if(I.type==="(number)"){bG("(number)");return!0}}function cn(){if(I.identifier){bG();return!0}}function cm(a){var b=a.value,c=a.line,d=A[b];typeof d==="function"&&(d=!1),d?d[d.length-1]!==c&&d.push(c):(d=[c],A[b]=d)}function cl(a){H&&typeof H[a]!=="boolean"&&by("Unexpected /*member '{a}'.",Y,a),typeof G[a]==="number"?G[a]+=1:G[a]=1}function ck(a,b){var c,d=B,e=C,f=V,g=Q,h;B=a,Q=Object.create(Q),bL(Y,I),h=I;if(I.id==="{"){bG("{");if(I.id!=="}"||Y.line!==I.line){C+=L.indent;while(!a&&I.from>C)C+=L.indent;!a&&!ci()&&!f&&L.strict&&u["(context)"]["(global)"]&&by('Missing "use strict" statement.'),c=cj(),V=f,C-=L.indent,bN()}bG("}",h),C=e}else a?((!b||L.curly)&&by("Expected '{a}' and instead saw '{b}'.",I,"{",I.value),K=!0,c=[ch()],K=!1):bA("Expected '{a}' and instead saw '{b}'.",I,"{",I.value);u["(verb)"]=null,Q=g,B=d,a&&L.noempty&&(!c||c.length===0)&&by("Empty block.");return c}function cj(c){var d=[],e,f;if(L.adsafe)switch(c){case"script":b||(I.value!=="ADSAFE"||bF(0).id!=="."||bF(1).value!=="id"&&bF(1).value!=="go")&&bA("ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",I),I.value==="ADSAFE"&&bF(0).id==="."&&bF(1).value==="id"&&(b&&bA("ADsafe violation.",I),bG("ADSAFE"),bG("."),bG("id"),bG("("),I.value!==a&&bA("ADsafe violation: id does not match.",I),bG("(string)"),bG(")"),bG(";"),b=!0);break;case"lib":if(I.value==="ADSAFE"){bG("ADSAFE"),bG("."),bG("lib"),bG("("),bG("(string)"),bP(),e=bH(0),e.id!=="function"&&bA("The second argument to lib must be a function.",e),f=e.funct["(params)"],f=f&&f.join(", "),f&&f!=="lib"&&bA("Expected '{a}' and instead saw '{b}'.",e,"(lib)","("+f+")"),bG(")"),bG(";");return d}bA("ADsafe lib violation.")}while(!I.reach&&I.id!=="(end)")I.id===";"?(by("Unnecessary semicolon."),bG(";")):d.push(ch());return d}function ci(){if(I.value==="use strict"){V&&by('Unnecessary "use strict".'),bG(),bG(";"),V=!0,L.newcap=!0,L.undef=!0;return!0}return!1}function ch(a){var b=C,c,d=Q,e=I;if(e.id===";")by("Unnecessary semicolon.",e),bG(";");else{e.identifier&&!e.reserved&&bF().id===":"&&(bG(),bG(":"),Q=Object.create(d),bD(e.value,"label"),I.labelled||by("Label '{a}' on {b} statement.",I,e.value,I.value),bm.test(e.value+":")&&by("Label '{a}' looks like a javascript url.",e,e.value),I.label=e.value,e=I),a||bN(),c=bH(0,!0),e.block||(c&&c.exps?L.nonew&&c.id==="("&&c.left.id==="new"&&by("Do not use 'new' for side effects."):by("Expected an assignment or function call and instead saw an expression.",Y),I.id!==";"?bz("Missing semicolon.",Y.line,Y.from+Y.value.length):(bI(Y,I),bG(";"),bL(Y,I))),C=b,Q=d;return c}}function cg(a){var b=0,c;if(I.id===";"&&!K)for(;;){c=bF(b);if(c.reach)return;if(c.id!=="(endline)"){if(c.id==="function"){by("Inner functions should be listed at the top of the outer function.",c);break}by("Unreachable '{a}' after '{b}'.",c,c.value,a);break}b+=1}}function cf(){var a=ce();if(a)return a;Y.id==="function"&&I.id==="("?by("Missing name in function statement."):bA("Expected an identifier and instead saw '{a}'.",I,I.value)}function ce(){if(I.identifier){bG(),L.safe&&h[Y.value]?by("ADsafe violation: '{a}'.",Y,Y.value):Y.reserved&&!L.es5&&by("Expected an identifier and instead saw '{a}' (a reserved word).",Y,Y.id);return Y.value}}function cd(a,b){var c=bQ(a,150);c.led=function(a){L.plusplus?by("Unexpected use of '{a}'.",this,this.id):(!a.identifier||a.reserved)&&a.id!=="."&&a.id!=="["&&by("Bad operand.",this),this.left=a;return this};return c}function cc(a){bQ(a,20).exps=!0;return bZ(a,function(a,b){L.bitwise&&by("Unexpected use of '{a}'.",b,b.id),bL(O,Y),bL(Y,I);if(a){if(a.id==="."||a.id==="["||a.identifier&&!a.reserved){bH(19);return b}a===W["function"]&&by("Expected an identifier in an assignment, and instead saw a function invocation.",Y);return b}bA("Bad assignment.",b)},20)}function cb(a,b,c){var d=bQ(a,c);bU(d),d.led=typeof b==="function"?b:function(a){L.bitwise&&by("Unexpected use of '{a}'.",this,this.id),this.left=a,this.right=bH(c);return this};return d}function ca(a,b){bQ(a,20).exps=!0;return bZ(a,function(a,b){var c;b.left=a,M[a.value]===!1&&Q[a.value]["(global)"]===!0?by("Read only.",a):a["function"]&&by("'{a}' is a function.",a,a.value);if(L.safe){c=a;do typeof M[c.value]==="boolean"&&by("ADsafe violation.",c),c=c.left;while(c)}if(a){if(a.id==="."||a.id==="["){(!a.left||a.left.value==="arguments")&&by("Bad assignment.",b),b.right=bH(19);return b}if(a.identifier&&!a.reserved){u[a.value]==="exception"&&by("Do not assign to the exception parameter.",a),b.right=bH(19);return b}a===W["function"]&&by("Expected an identifier in an assignment and instead saw a function invocation.",Y)}bA("Bad assignment.",b)},20)}function b_(a){return a&&(a.type==="(number)"&&+a.value===0||a.type==="(string)"&&a.value===""||a.type==="true"||a.type==="false"||a.type==="undefined"||a.type==="null")}function b$(a,b){var c=bQ(a,100);c.led=function(a){bM(O,Y),bL(Y,I);var c=bH(100);a&&a.id==="NaN"||c&&c.id==="NaN"?by("Use the isNaN function to compare with NaN.",this):b&&b.apply(this,[a,c]),a.id==="!"&&by("Confusing use of '{a}'.",a,"!"),c.id==="!"&&by("Confusing use of '{a}'.",a,"!"),this.left=a,this.right=c;return this};return c}function bZ(a,b,c,d){var e=bQ(a,c);bU(e),e.led=function(a){d||(bM(O,Y),bL(Y,I));if(typeof b==="function")return b(a,this);this.left=a,this.right=bH(c);return this};return e}function bY(a,b){return bX(a,function(){typeof b==="function"&&b(this);return this})}function bX(a,b){var c=bW(a,b);c.identifier=c.reserved=!0;return c}function bW(a,b){var c=bR(a);c.type=a,c.nud=b;return c}function bV(a,b){var c=bQ(a,150);bU(c),c.nud=typeof b==="function"?b:function(){this.right=bH(150),this.arity="unary";if(this.id==="++"||this.id==="--")L.plusplus?by("Unexpected use of '{a}'.",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!=="["&&by("Bad operand.",this);return this};return c}function bU(a){var b=a.id.charAt(0);if(b>="a"&&b<="z"||b>="A"&&b<="Z")a.identifier=a.reserved=!0;return a}function bT(a,b){var c=bS(a,b);c.block=!0;return c}function bS(a,b){var c=bR(a);c.identifier=c.reserved=!0,c.fud=b;return c}function bR(a){return bQ(a,0)}function bQ(a,b){var c=W[a];if(!c||typeof c!=="object")W[a]=c={id:a,lbp:b,value:a};return c}function bP(){Y.line!==I.line?L.laxbreak||by("Bad line breaking before '{a}'.",Y,I.id):Y.character!==I.from&&L.white&&by("Unexpected space after '{a}'.",I,Y.value),bG(","),bL(Y,I)}function bO(a){a=a||Y,a.line!==I.line&&by("Line breaking error '{a}'.",a,a.value)}function bN(a){var b;L.white&&I.id!=="(end)"&&(b=C+(a||0),I.from!==b&&by("Expected '{a}' to have an indentation at {b} instead at {c}.",I,I.value,b,I.from))}function bM(a,b){a=a||Y,b=b||I,L.laxbreak||a.line===b.line?L.white&&(a=a||Y,b=b||I,a.character===b.from&&by("Missing space after '{a}'.",I,a.value)):by("Bad line breaking before '{a}'.",b,b.id)}function bL(a,b){L.white&&(a=a||Y,b=b||I,a.line===b.line&&a.character===b.from&&by("Missing space after '{a}'.",I,a.value))}function bK(a,b){a=a||Y,b=b||I,L.white&&!a.comment&&(a.line===b.line&&bI(a,b))}function bJ(a,b){a=a||Y,b=b||I,L.white&&(a.character!==b.from||a.line!==b.line)&&by("Unexpected space before '{a}'.",b,b.value)}function bI(a,b){a=a||Y,b=b||I;if(L.white||bb==="styleproperty"||bb==="style")a.character!==b.from&&a.line===b.line&&by("Unexpected space after '{a}'.",b,a.value)}function bH(a,b){var c;I.id==="(end)"&&bA("Unexpected early end of program.",Y),bG(),L.safe&&typeof M[Y.value]==="boolean"&&(I.id!=="("&&I.id!==".")&&by("ADsafe violation.",Y),b&&(e="anonymous",u["(verb)"]=Y.value);if(b===!0&&Y.fud)c=Y.fud();else{if(Y.nud)c=Y.nud();else{if(I.type==="(number)"&&Y.id==="."){by("A leading decimal point can be confused with a dot: '.{a}'.",Y,I.value),bG();return Y}bA("Expected an identifier and instead saw '{a}'.",Y,Y.id)}while(a<I.lbp)bG(),Y.led?c=Y.led(c):bA("Expected an operator and instead saw '{a}'.",Y,Y.id)}return c}function bG(a,b){switch(Y.id){case"(number)":I.id==="."&&by("A dot following a number can be confused with a decimal point.",Y);break;case"-":(I.id==="-"||I.id==="--")&&by("Confusing minusses.");break;case"+":(I.id==="+"||I.id==="++")&&by("Confusing plusses.")}if(Y.type==="(string)"||Y.identifier)e=Y.value;a&&I.id!==a&&(b?I.id==="(end)"?by("Unmatched '{a}'.",b,b.id):by("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",I,a,b.id,b.line,I.value):(I.type!=="(identifier)"||I.value!==a)&&by("Expected '{a}' and instead saw '{b}'.",I,a,I.value)),O=Y,Y=I;for(;;){I=F.shift()||bC.token();if(I.id==="(end)"||I.id==="(error)")return;if(I.type==="special")bE();else if(I.id!=="(endline)")break}}function bF(a){var b=a||0,c=0,d;while(c<=b)d=F[c],d||(d=F[c]=bC.token()),c+=1;return d}function bE(){var a,b,c,d=I.value,e,f;switch(d){case"*/":bA("Unbegun comment.");break;case"/*members":case"/*member":d="/*members",H||(H={}),b=H;break;case"/*jshint":L.safe&&by("ADsafe restriction."),b=L,c=i;break;case"/*global":L.safe&&by("ADsafe restriction."),b=M;break;default:bA("What?")}e=bC.token();loop:for(;;){for(;;){if(e.type==="special"&&e.value==="*/")break loop;if(e.id!=="(endline)"&&e.id!==",")break;e=bC.token()}e.type!=="(string)"&&e.type!=="(identifier)"&&d!=="/*members"&&bA("Bad option.",e),f=bC.token(),f.id===":"?(f=bC.token(),b===H&&bA("Expected '{a}' and instead saw '{b}'.",e,"*/",":"),e.value==="indent"&&d==="/*jshint"?(a=+f.value,(typeof a!=="number"||!isFinite(a)||a<=0||Math.floor(a)!==a)&&bA("Expected a small integer and instead saw '{a}'.",f,f.value),b.white=!0,b.indent=a):e.value==="maxerr"&&d==="/*jshint"?(a=+f.value,(typeof a!=="number"||!isFinite(a)||a<=0||Math.floor(a)!==a)&&bA("Expected a small integer and instead saw '{a}'.",f,f.value),b.maxerr=a):e.value==="maxlen"&&d==="/*jshint"?(a=+f.value,(typeof a!=="number"||!isFinite(a)||a<=0||Math.floor(a)!==a)&&bA("Expected a small integer and instead saw '{a}'.",f,f.value),b.maxlen=a):f.value==="true"?b[e.value]=!0:f.value==="false"?b[e.value]=!1:bA("Bad option value.",f),e=bC.token()):(d==="/*jshint"&&bA("Missing option value.",e),b[e.value]=!1,e=f)}c&&bw()}function bD(a,b){L.safe&&u["(global)"]&&typeof M[a]!=="boolean"?by("ADsafe global: "+a+".",Y):a==="hasOwnProperty"&&by("'hasOwnProperty' is a really bad name."),bu(u,a)&&!u["(global)"]&&by(u[a]===!0?"'{a}' was used before it was defined.":"'{a}' is already defined.",I,a),u[a]=b,u["(global)"]?(x[a]=u,bu(A,a)&&(by("'{a}' was used before it was defined.",I,a),delete A[a])):Q[a]=u}function bB(a,b,c,d,e,f,g){return bA(a,{line:b,from:c},d,e,f,g)}function bA(a,b,c,d,e,f){var g=by(a,b,c,d,e,f);bx("Stopping, unable to continue.",g.line,g.character)}function bz(a,b,c,d,e,f,g){return by(a,{line:b,from:c},d,e,f,g)}function by(a,b,c,e,f,g){var h,i,j;b=b||I,b.id==="(end)"&&(b=Y),i=b.line||0,h=b.from||0,j={id:"(error)",raw:a,evidence:E[i-1]||"",line:i,character:h,a:c,b:e,c:f,d:g},j.reason=a.supplant(j),d.errors.push(j),L.passfail&&bx("Stopping. ",i,h),$+=1,$>=L.maxerr&&bx("Too many errors.",i,h);return j}function bx(a,b,c){throw{name:"JSHintError",line:b,character:c,message:a+" ("+Math.floor(b/E.length*100)+"% scanned)."}}function bw(){L.safe||(L.rhino&&bv(M,P),L.node&&bv(M,J),L.devel&&bv(M,s),L.browser&&bv(M,j),L.windows&&bv(M,ba),L.widget&&bv(M,_))}function bv(a,b){var c;for(c in b)bu(b,c)&&(a[c]=b[c])}function bu(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function bt(){}"use strict";var a,b,c,e,f,g={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},h={arguments:!0,callee:!0,caller:!0,constructor:!0,eval:!0,prototype:!0,stack:!0,unwatch:!0,valueOf:!0,watch:!0},i={adsafe:!0,bitwise:!0,boss:!0,browser:!0,cap:!0,css:!0,curly:!0,debug:!0,devel:!0,eqeqeq:!0,es5:!0,evil:!0,forin:!0,fragment:!0,immed:!0,laxbreak:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonew:!0,nomen:!0,on:!0,onevar:!0,passfail:!0,plusplus:!0,regexp:!0,rhino:!0,undef:!0,safe:!0,windows:!0,strict:!0,sub:!0,white:!0,widget:!0},j={addEventListener:!1,blur:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,defaultStatus:!1,document:!1,event:!1,focus:!1,frames:!1,getComputedStyle:!1,history:!1,Image:!1,length:!1,location:!1,moveBy:!1,moveTo:!1,name:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,setInterval:!1,setTimeout:!1,status:!1,top:!1,window:!1,XMLHttpRequest:!1},k,l,m={aliceblue:!0,antiquewhite:!0,aqua:!0,aquamarine:!0,azure:!0,beige:!0,bisque:!0,black:!0,blanchedalmond:!0,blue:!0,blueviolet:!0,brown:!0,burlywood:!0,cadetblue:!0,chartreuse:!0,chocolate:!0,coral:!0,cornflowerblue:!0,cornsilk:!0,crimson:!0,cyan:!0,darkblue:!0,darkcyan:!0,darkgoldenrod:!0,darkgray:!0,darkgreen:!0,darkkhaki:!0,darkmagenta:!0,darkolivegreen:!0,darkorange:!0,darkorchid:!0,darkred:!0,darksalmon:!0,darkseagreen:!0,darkslateblue:!0,darkslategray:!0,darkturquoise:!0,darkviolet:!0,deeppink:!0,deepskyblue:!0,dimgray:!0,dodgerblue:!0,firebrick:!0,floralwhite:!0,forestgreen:!0,fuchsia:!0,gainsboro:!0,ghostwhite:!0,gold:!0,goldenrod:!0,gray:!0,green:!0,greenyellow:!0,honeydew:!0,hotpink:!0,indianred:!0,indigo:!0,ivory:!0,khaki:!0,lavender:!0,lavenderblush:!0,lawngreen:!0,lemonchiffon:!0,lightblue:!0,lightcoral:!0,lightcyan:!0,lightgoldenrodyellow:!0,lightgreen:!0,lightpink:!0,lightsalmon:!0,lightseagreen:!0,lightskyblue:!0,lightslategray:!0,lightsteelblue:!0,lightyellow:!0,lime:!0,limegreen:!0,linen:!0,magenta:!0,maroon:!0,mediumaquamarine:!0,mediumblue:!0,mediumorchid:!0,mediumpurple:!0,mediumseagreen:!0,mediumslateblue:!0,mediumspringgreen:!0,mediumturquoise:!0,mediumvioletred:!0,midnightblue:!0,mintcream:!0,mistyrose:!0,moccasin:!0,navajowhite:!0,navy:!0,oldlace:!0,olive:!0,olivedrab:!0,orange:!0,orangered:!0,orchid:!0,palegoldenrod:!0,palegreen:!0,paleturquoise:!0,palevioletred:!0,papayawhip:!0,peachpuff:!0,peru:!0,pink:!0,plum:!0,powderblue:!0,purple:!0,red:!0,rosybrown:!0,royalblue:!0,saddlebrown:!0,salmon:!0,sandybrown:!0,seagreen:!0,seashell:!0,sienna:!0,silver:!0,skyblue:!0,slateblue:!0,slategray:!0,snow:!0,springgreen:!0,steelblue:!0,tan:!0,teal:!0,thistle:!0,tomato:!0,turquoise:!0,violet:!0,wheat:!0,white:!0,whitesmoke:!0,yellow:!0,yellowgreen:!0,activeborder:!0,activecaption:!0,appworkspace:!0,background:!0,buttonface:!0,buttonhighlight:!0,buttonshadow:!0,buttontext:!0,captiontext:!0,graytext:!0,highlight:!0,highlighttext:!0,inactiveborder:!0,inactivecaption:!0,inactivecaptiontext:!0,infobackground:!0,infotext:!0,menu:!0,menutext:!0,scrollbar:!0,threeddarkshadow:!0,threedface:!0,threedhighlight:!0,threedlightshadow:!0,threedshadow:!0,window:!0,windowframe:!0,windowtext:!0},n,o,p={"%":!0,cm:!0,em:!0,ex:!0,"in":!0,mm:!0,pc:!0,pt:!0,px:!0},q,r,s={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"/":"\\/","\\":"\\\\"},u,v=["closure","exception","global","label","outer","unused","var"],w,x,y={a:{},abbr:{},acronym:{},address:{},applet:{},area:{empty:!0,parent:" map "},article:{},aside:{},audio:{},b:{},base:{empty:!0,parent:" head "},bdo:{},big:{},blockquote:{},body:{parent:" html noframes "},br:{empty:!0},button:{},canvas:{parent:" body p div th td "},caption:{parent:" table "},center:{},cite:{},code:{},col:{empty:!0,parent:" table colgroup "},colgroup:{parent:" table "},command:{parent:" menu "},datalist:{},dd:{parent:" dl "},del:{},details:{},dialog:{},dfn:{},dir:{},div:{},dl:{},dt:{parent:" dl "},em:{},embed:{},fieldset:{},figure:{},font:{},footer:{},form:{},frame:{empty:!0,parent:" frameset "},frameset:{parent:" html frameset "},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{parent:" html "},header:{},hgroup:{},hr:{empty:!0},"hta:application":{empty:!0,parent:" head "},html:{parent:"*"},i:{},iframe:{},img:{empty:!0},input:{empty:!0},ins:{},kbd:{},keygen:{},label:{},legend:{parent:" details fieldset figure "},li:{parent:" dir menu ol ul "},link:{empty:!0,parent:" head "},map:{},mark:{},menu:{},meta:{empty:!0,parent:" head noframes noscript "},meter:{},nav:{},noframes:{parent:" html body "},noscript:{parent:" body head noframes "},object:{},ol:{},optgroup:{parent:" select "},option:{parent:" optgroup select "},output:{},p:{},param:{empty:!0,parent:" applet object "},pre:{},progress:{},q:{},rp:{},rt:{},ruby:{},samp:{},script:{empty:!0,parent:" body div frame head iframe p pre span "},section:{},select:{},small:{},span:{},source:{},strong:{},style:{parent:" head ",empty:!0},sub:{},sup:{},table:{},tbody:{parent:" table "},td:{parent:" tr "},textarea:{},tfoot:{parent:" table "},th:{parent:" tr "},thead:{parent:" table "},time:{},title:{parent:" head "},tr:{parent:" table tbody thead tfoot "},tt:{},u:{},ul:{},"var":{},video:{}},z,A,B,C,D,E,F,G,H,I,J={__filename:!1,__dirname:!1,Buffer:!1,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1},K,L,M,N,O,P={defineClass:!1,deserialize:!1,gc:!1,help:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},Q,R,S,T={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},U={E:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,MAX_VALUE:!0,MIN_VALUE:!0,NEGATIVE_INFINITY:!0,PI:!0,POSITIVE_INFINITY:!0,SQRT1_2:!0,SQRT2:!0},V,W={},X,Y,Z,$,_={alert:!0,animator:!0,appleScript:!0,beep:!0,bytesToUIString:!0,Canvas:!0,chooseColor:!0,chooseFile:!0,chooseFolder:!0,closeWidget:!0,COM:!0,convertPathToHFS:!0,convertPathToPlatform:!0,CustomAnimation:!0,escape:!0,FadeAnimation:!0,filesystem:!0,Flash:!0,focusWidget:!0,form:!0,FormField:!0,Frame:!0,HotKey:!0,Image:!0,include:!0,isApplicationRunning:!0,iTunes:!0,konfabulatorVersion:!0,log:!0,md5:!0,MenuItem:!0,MoveAnimation:!0,openURL:!0,play:!0,Point:!0,popupMenu:!0,preferenceGroups:!0,preferences:!0,print:!0,prompt:!0,random:!0,Rectangle:!0,reloadWidget:!0,ResizeAnimation:!0,resolvePath:!0,resumeUpdates:!0,RotateAnimation:!0,runCommand:!0,runCommandInBg:!0,saveAs:!0,savePreferences:!0,screen:!0,ScrollBar:!0,showWidgetPreferences:!0,sleep:!0,speak:!0,Style:!0,suppressUpdates:!0,system:!0,tellWidget:!0,Text:!0,TextArea:!0,Timer:!0,unescape:!0,updateNow:!0,URL:!0,Web:!0,widget:!0,Window:!0,XMLDOM:!0,XMLHttpRequest:!0,yahooCheckLogin:!0,yahooLogin:!0,yahooLogout:!0},ba={ActiveXObject:!1,CScript:!1,Debug:!1,Enumerator:!1,System:!1,VBArray:!1,WScript:!1},bb,bc,bd=/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i,be=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,bf=/^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jshint|members?|global)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/,bg=/^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-:]*|[0-9]+|--)/,bh=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,bi=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,bj=/[>&]|<[\/!]?|--/,bk=/\*\/|\/\*/,bl=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,bm=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,bn=/&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto/i,bo=/^\s*([{:#%.=,>+\[\]@()"';]|\*=?|\$=|\|=|\^=|~=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,bp=/^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/,bq=/[^a-zA-Z0-9+\-_\/ ]/,br=/[\[\]\/\\"'*<>.&:(){}+=#]/,bs={outer:bg,html:bg,style:bo,styleproperty:bp};typeof Array.isArray!=="function"&&(Array.isArray=function(a){return Object.prototype.toString.apply(a)==="[object Array]"}),typeof Object.create!=="function"&&(Object.create=function(a){bt.prototype=a;return new bt}),typeof Object.keys!=="function"&&(Object.keys=function(a){var b=[],c;for(c in a)bu(a,c)&&b.push(c);return b}),typeof String.prototype.entityify!=="function"&&(String.prototype.entityify=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}),typeof String.prototype.isAlpha!=="function"&&(String.prototype.isAlpha=function(){return this>="a"&&this<="z￿"||this>="A"&&this<="Z￿"}),typeof String.prototype.isDigit!=="function"&&(String.prototype.isDigit=function(){return this>="0"&&this<="9"}),typeof String.prototype.supplant!=="function"&&(String.prototype.supplant=function(a){return this.replace(/\{([^{}]*)\}/g,function(b,c){var d=a[c];return typeof d==="string"||typeof d==="number"?d:b})}),typeof String.prototype.name!=="function"&&(String.prototype.name=function(){if(bl.test(this))return this;if(bh.test(this))return'"'+this.replace(bi,function(a){var b=t[a];if(b)return b;return"\\u"+("0000"+a.charCodeAt().toString(16)).slice(-4)})+'"';return'"'+this+'"'});var bC=function bC(){function f(d,e){var f,g;d==="(color)"||d==="(range)"?g={type:d}:d==="(punctuator)"||d==="(identifier)"&&bu(W,e)?g=W[e]||W["(error)"]:g=W[d],g=Object.create(g);if(d==="(string)"||d==="(range)")bm.test(e)&&bz("Script URL.",c,b);d==="(identifier)"&&(g.identifier=!0,e==="__iterator__"||e==="__proto__"?bB("Reserved name '{a}'.",c,b,e):L.nomen&&(e.charAt(0)==="_"||e.charAt(e.length-1)==="_")&&bz("Unexpected {a} in '{b}'.",c,b,"dangling '_'",e)),g.value=e,g.line=c,g.character=a,g.from=b,f=g.id,f!=="(endline)"&&(N=f&&("(,=:[!&|?{};".indexOf(f.charAt(f.length-1))>=0||f==="return"));return g}function e(){var b;if(c>=E.length)return!1;a=1,d=E[c],c+=1,b=d.search(/ \t/),b>=0&&bz("Mixed spaces and tabs.",c,b+1),d=d.replace(/\t/g,X),b=d.search(be),b>=0&&bz("Unsafe character.",c,b),L.maxlen&&L.maxlen<d.length&&bz("Line too long.",c,d.length);return!0}var a,b,c,d;return{init:function(a){typeof a==="string"?E=a.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"):E=a,c=0,e(),b=1},range:function(e,g){var h,i="";b=a,d.charAt(0)!==e&&bB("Expected '{a}' and instead saw '{b}'.",c,a,e,d.charAt(0));for(;;){d=d.slice(1),a+=1,h=d.charAt(0);switch(h){case"":bB("Missing '{a}'.",c,a,h);break;case g:d=d.slice(1),a+=1;return f("(range)",i);case bc:case"\\":bz("Unexpected '{a}'.",c,a,h)}i+=h}},token:function(){function s(g){function k(b){var e=parseInt(d.substr(i+1,b),16);i+=b,e>=32&&e<=126&&e!==34&&e!==92&&e!==39&&bz("Unnecessary escapement.",c,a),a+=b,h=String.fromCharCode(e)}var h,i,j="";D&&g!=='"'&&bz("Strings must use doublequote.",c,a);if(bc===g||bb==="scriptstring"&&!bc)return f("(punctuator)",g);i=0;for(;;){while(i>=d.length)i=0,(bb!=="html"||!e())&&bB("Unclosed string.",c,b);h=d.charAt(i);if(h===g){a+=1,d=d.substr(i+1);return f("(string)",j,g)}if(h<" "){if(h==="\n"||h==="\r")break;bz("Control character in string: {a}.",c,a+i,d.slice(0,i))}else if(h===bc)bz("Bad HTML string",c,a+i);else if(h==="<")L.safe&&bb==="html"?bz("ADsafe string violation.",c,a+i):d.charAt(i+1)==="/"&&(bb||L.safe)?bz("Expected '<\\/' and instead saw '</'.",c,a):d.charAt(i+1)==="!"&&(bb||L.safe)&&bz("Unexpected '<!' in a string.",c,a);else if(h==="\\")if(bb==="html")L.safe&&bz("ADsafe string violation.",c,a+i);else if(bb==="styleproperty")i+=1,a+=1,h=d.charAt(i),h!==g&&bz("Escapement in style string.",c,a+i);else{i+=1,a+=1,h=d.charAt(i);switch(h){case bc:bz("Bad HTML string",c,a+i);break;case"\\":case'"':case"/":break;case"'":D&&bz("Avoid \\'.",c,a);break;case"b":h="\b";break;case"f":h="\f";break;case"n":h="\n";break;case"r":h="\r";break;case"t":h="\t";break;case"u":k(4);break;case"v":D&&bz("Avoid \\v.",c,a),h=" ";break;case"x":D&&bz("Avoid \\x-.",c,a),k(2);break;default:bz("Bad escapement.",c,a)}}j+=h,a+=1,i+=1}}function r(c){var e=c.exec(d),f;if(e){n=e[0].length,f=e[1],h=f.charAt(0),d=d.substr(n),b=a+n-f.length,a+=n;return f}}var g,h,i,j,k,l,m,n,o,p,q;for(;;){if(!d)return f(e()?"(endline)":"(end)","");while(bb==="outer"){m=d.search(bj);if(m===0)break;if(m>0){a+=1,d=d.slice(m);break}if(!e())return f("(end)","")}q=r(bs[bb]||bf);if(q){if(h.isAlpha()||h==="_"||h==="$")return f("(identifier)",q);if(h.isDigit()){bb!=="style"&&!isFinite(Number(q))&&bz("Bad number '{a}'.",c,a,q),bb!=="style"&&bb!=="styleproperty"&&d.substr(0,1).isAlpha()&&bz("Missing space after '{a}'.",c,a,q),h==="0"&&(j=q.substr(1,1),j.isDigit()?Y.id!=="."&&bb!=="styleproperty"&&bz("Don't use extra leading zeros '{a}'.",c,a,q):D&&(j==="x"||j==="X")&&bz("Avoid 0x-. '{a}'.",c,a,q)),q.substr(q.length-1)==="."&&bz("A trailing decimal point can be confused with a dot '{a}'.",c,a,q);return f("(number)",q)}switch(q){case'"':case"'":return s(q);case"//":R||bb&&bb!=="script"?bz("Unexpected comment.",c,a):bb==="script"&&/<\s*\//i.test(d)?bz("Unexpected </ in comment.",c,a):(L.safe||bb==="script")&&bd.test(d)&&bz("Dangerous comment.",c,a),d="",Y.comment=!0;break;case"/*":(R||bb&&bb!=="script"&&bb!=="style"&&bb!=="styleproperty")&&bz("Unexpected comment.",c,a),L.safe&&bd.test(d)&&bz("ADsafe comment violation.",c,a);for(;;){m=d.search(bk);if(m>=0)break;e()?L.safe&&bd.test(d)&&bz("ADsafe comment violation.",c,a):bB("Unclosed comment.",c,a)}a+=m+2,d.substr(m,1)==="/"&&bB("Nested comment.",c,a),d=d.substr(m+2),Y.comment=!0;break;case"/*members":case"/*member":case"/*jshint":case"/*global":case"*/":return{value:q,type:"special",line:c,character:a,from:b};case"":break;case"/":Y.id==="/="&&bB("A regular expression literal can be confused with '/='.",c,b);if(N){k=0,i=0,n=0;for(;;){g=!0,h=d.charAt(n),n+=1;switch(h){case"":bB("Unclosed regular expression.",c,b);return;case"/":k>0&&bz("Unescaped '{a}'.",c,b+n,"/"),h=d.substr(0,n-1),p={g:!0,i:!0,m:!0};while(p[d.charAt(n)]===!0)p[d.charAt(n)]=!1,n+=1;a+=n,d=d.substr(n),p=d.charAt(0),(p==="/"||p==="*")&&bB("Confusing regular expression.",c,b);return f("(regexp)",h);case"\\":h=d.charAt(n),h<" "?bz("Unexpected control character in regular expression.",c,b+n):h==="<"&&bz("Unexpected escaped character '{a}' in regular expression.",c,b+n,h),n+=1;break;case"(":k+=1,g=!1;if(d.charAt(n)==="?"){n+=1;switch(d.charAt(n)){case":":case"=":case"!":n+=1;break;default:bz("Expected '{a}' and instead saw '{b}'.",c,b+n,":",d.charAt(n))}}else i+=1;break;case"|":g=!1;break;case")":k===0?bz("Unescaped '{a}'.",c,b+n,")"):k-=1;break;case" ":p=1;while(d.charAt(n)===" ")n+=1,p+=1;p>1&&bz("Spaces are hard to count. Use {{a}}.",c,b+n,p);break;case"[":h=d.charAt(n),h==="^"&&(n+=1,L.regexp?bz("Insecure '{a}'.",c,b+n,h):d.charAt(n)==="]"&&bB("Unescaped '{a}'.",c,b+n,"^")),p=!1,h==="]"&&(bz("Empty class.",c,b+n-1),p=!0);klass:do{h=d.charAt(n),n+=1;switch(h){case"[":case"^":bz("Unescaped '{a}'.",c,b+n,h),p=!0;break;case"-":p?p=!1:(bz("Unescaped '{a}'.",c,b+n,"-"),p=!0);break;case"]":p||bz("Unescaped '{a}'.",c,b+n-1,"-");break klass;case"\\":h=d.charAt(n),h<" "?bz("Unexpected control character in regular expression.",c,b+n):h==="<"&&bz("Unexpected escaped character '{a}' in regular expression.",c,b+n,h),n+=1,p=!0;break;case"/":bz("Unescaped '{a}'.",c,b+n-1,"/"),p=!0;break;case"<":bb==="script"&&(h=d.charAt(n),(h==="!"||h==="/")&&bz("HTML confusion in regular expression '<{a}'.",c,b+n,h)),p=!0;break;default:p=!0}}while(h);break;case".":L.regexp&&bz("Insecure '{a}'.",c,b+n,h);break;case"]":case"?":case"{":case"}":case"+":case"*":bz("Unescaped '{a}'.",c,b+n,h);break;case"<":bb==="script"&&(h=d.charAt(n),(h==="!"||h==="/")&&bz("HTML confusion in regular expression '<{a}'.",c,b+n,h))}if(g)switch(d.charAt(n)){case"?":case"+":case"*":n+=1,d.charAt(n)==="?"&&(n+=1);break;case"{":n+=1,h=d.charAt(n),(h<"0"||h>"9")&&bz("Expected a number and instead saw '{a}'.",c,b+n,h),n+=1,o=+h;for(;;){h=d.charAt(n);if(h<"0"||h>"9")break;n+=1,o=+h+o*10}l=o;if(h===","){n+=1,l=Infinity,h=d.charAt(n);if(h>="0"&&h<="9"){n+=1,l=+h;for(;;){h=d.charAt(n);if(h<"0"||h>"9")break;n+=1,l=+h+l*10}}}d.charAt(n)!=="}"?bz("Expected '{a}' and instead saw '{b}'.",c,b+n,"}",h):n+=1,d.charAt(n)==="?"&&(n+=1),o>l&&bz("'{a}' should not be greater than '{b}'.",c,b+n,o,l)}}h=d.substr(0,n-1),a+=n,d=d.substr(n);return f("(regexp)",h)}return f("(punctuator)",q);case"<!--":n=c,h=a;for(;;){m=d.indexOf("--");if(m>=0)break;m=d.indexOf("<!"),m>=0&&bB("Nested HTML comment.",c,a+m),e()||bB("Unclosed HTML comment.",n,h)}n=d.indexOf("<!"),n>=0&&n<m&&bB("Nested HTML comment.",c,a+n),a+=m,d.charAt(m+2)!==">"&&bB("Expected -->.",c,a),a+=3,d=d.slice(m+3);break;case"#":if(bb==="html"||bb==="styleproperty"){for(;;){h=d.charAt(0);if((h<"0"||h>"9")&&(h<"a"||h>"f")&&(h<"A"||h>"F"))break;a+=1,d=d.substr(1),q+=h}q.length!==4&&q.length!==7&&bz("Bad hex color '{a}'.",c,b+n,q);return f("(color)",q)}return f("(punctuator)",q);default:if(bb==="outer"&&h==="&"){a+=1,d=d.substr(1);for(;;){h=d.charAt(0),a+=1,d=d.substr(1);if(h===";")break;(h<"0"||h>"9")&&(h<"a"||h>"z")&&h!=="#"&&bB("Bad entity",c,b+n,a)}break}return f("(punctuator)",q)}}else{q="",h="";while(d&&d<"!")d=d.substr(1);if(d){if(bb==="html")return f("(error)",d.charAt(0));bB("Unexpected '{a}'.",c,a,d.substr(0,1))}}}}}}();l=[cz,function(){for(;;)if(I.identifier)switch(I.value.toLowerCase()){case"url":cz();break;case"expression":by("Unexpected expression '{a}'.",I,I.value),bG();break;default:bG()}else{if(I.id===";"||I.id==="!"||I.id==="(end)"||I.id==="}")return!0;bG()}}],n=["none","dashed","dotted","double","groove","hidden","inset","outset","ridge","solid"],o=["auto","always","avoid","left","right"],q={all:!0,braille:!0,embossed:!0,handheld:!0,print:!0,projection:!0,screen:!0,speech:!0,tty:!0,tv:!0},r=["auto","hidden","scroll","visible"],k={background:[!0,"background-attachment","background-color","background-image","background-position","background-repeat"],"background-attachment":["scroll","fixed"],"background-color":["transparent",cq],"background-image":["none",cz],"background-position":[2,[cr,"top","bottom","left","right","center"]],"background-repeat":["repeat","repeat-x","repeat-y","no-repeat"],border:[!0,"border-color","border-style","border-width"],"border-bottom":[!0,"border-bottom-color","border-bottom-style","border-bottom-width"],"border-bottom-color":cq,"border-bottom-style":n,"border-bottom-width":ct,"border-collapse":["collapse","separate"],"border-color":["transparent",4,cq],"border-left":[!0,"border-left-color","border-left-style","border-left-width"],"border-left-color":cq,"border-left-style":n,"border-left-width":ct,"border-right":[!0,"border-right-color","border-right-style","border-right-width"],"border-right-color":cq,"border-right-style":n,"border-right-width":ct,"border-spacing":[2,cr],"border-style":[4,n],"border-top":[!0,"border-top-color","border-top-style","border-top-width"],"border-top-color":cq,"border-top-style":n,"border-top-width":ct,"border-width":[4,ct],bottom:[cr,"auto"],"caption-side":["bottom","left","right","top"],clear:["both","left","none","right"],clip:[cy,"auto"],color:cq,content:["open-quote","close-quote","no-open-quote","no-close-quote",cp,cz,cx,cv],"counter-increment":[cn,"none"],"counter-reset":[cn,"none"],cursor:[cz,"auto","crosshair","default","e-resize","help","move","n-resize","ne-resize","nw-resize","pointer","s-resize","se-resize","sw-resize","w-resize","text","wait"],direction:["ltr","rtl"],display:["block","compact","inline","inline-block","inline-table","list-item","marker","none","run-in","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"],"empty-cells":["show","hide"],"float":["left","none","right"],font:["caption","icon","menu","message-box","small-caption","status-bar",!0,"font-size","font-style","font-weight","font-family"],"font-family":cw,"font-size":["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller",cr],"font-size-adjust":["none",co],"font-stretch":["normal","wider","narrower","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded"],"font-style":["normal","italic","oblique"],"font-variant":["normal","small-caps"],"font-weight":["normal","bold","bolder","lighter",co],height:[cr,"auto"],left:[cr,"auto"],"letter-spacing":["normal",cr],"line-height":["normal",cs],"list-style":[!0,"list-style-image","list-style-position","list-style-type"],"list-style-image":["none",cz],"list-style-position":["inside","outside"],"list-style-type":["circle","disc","square","decimal","decimal-leading-zero","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","hebrew","katakana","hiragana-iroha","katakana-oroha","none"],margin:[4,cu],"margin-bottom":cu,"margin-left":cu,"margin-right":cu,"margin-top":cu,"marker-offset":[cr,"auto"],"max-height":[cr,"none"],"max-width":[cr,"none"],"min-height":cr,"min-width":cr,opacity:co,outline:[!0,"outline-color","outline-style","outline-width"],"outline-color":["invert",cq],"outline-style":["dashed","dotted","double","groove","inset","none","outset","ridge","solid"],"outline-width":ct,overflow:r,"overflow-x":r,"overflow-y":r,padding:[4,cr],"padding-bottom":cr,"padding-left":cr,"padding-right":cr,"padding-top":cr,"page-break-after":o,"page-break-before":o,position:["absolute","fixed","relative","static"],quotes:[8,cp],right:[cr,"auto"],"table-layout":["auto","fixed"],"text-align":["center","justify","left","right"],"text-decoration":["none","underline","overline","line-through","blink"],"text-indent":cr,"text-shadow":["none",4,[cq,cr]],"text-transform":["capitalize","uppercase","lowercase","none"],top:[cr,"auto"],"unicode-bidi":["normal","embed","bidi-override"],"vertical-align":["baseline","bottom","sub","super","top","text-top","middle","text-bottom",cr],visibility:["visible","hidden","collapse"],"white-space":["normal","nowrap","pre","pre-line","pre-wrap","inherit"],width:[cr,"auto"],"word-spacing":["normal",cr],"word-wrap":["break-word","normal"],"z-index":["auto",co]},bW("(number)",function(){return this}),bW("(string)",function(){return this}),W["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var a=this.value,b=Q[a],c;typeof b==="function"?b=undefined:typeof b==="boolean"&&(c=u,u=w[0],bD(a,"var"),b=u,u=c);if(u===b)switch(u[a]){case"unused":u[a]="var";break;case"unction":u[a]="function",this["function"]=!0;break;case"function":this["function"]=!0;break;case"label":by("'{a}' is a statement label.",Y,a)}else if(u["(global)"])L.undef&&typeof M[a]!=="boolean"&&by("'{a}' is not defined.",Y,a),cm(Y);else switch(u[a]){case"closure":case"function":case"var":case"unused":by("'{a}' used out of scope.",Y,a);break;case"label":by("'{a}' is a statement label.",Y,a);break;case"outer":case"global":break;default:if(b===!0)u[a]=!0;else if(b===null)by("'{a}' is not allowed.",Y,a),cm(Y);else if(typeof b!=="object")L.undef?by("'{a}' is not defined.",Y,a):u[a]=!0,cm(Y);else switch(b[a]){case"function":case"unction":this["function"]=!0,b[a]="closure",u[a]=b["(global)"]?"global":"outer";break;case"var":case"unused":b[a]="closure",u[a]=b["(global)"]?"global":"outer";break;case"closure":case"parameter":u[a]=b["(global)"]?"global":"outer";break;case"label":by("'{a}' is a statement label.",Y,a)}}return this},led:function(){bA("Expected an operator and instead saw '{a}'.",I,I.value)}},bW("(regexp)",function(){return this}),bR("(endline)"),bR("(begin)"),bR("(end)").reach=!0,bR("</").reach=!0,bR("<!"),bR("<!--"),bR("-->"),bR("(error)").reach=!0,bR("}").reach=!0,bR(")"),bR("]"),bR('"').reach=!0,bR("'").reach=!0,bR(";"),bR(":").reach=!0,bR(","),bR("#"),bR("@"),bX("else"),bX("case").reach=!0,bX("catch"),bX("default").reach=!0,bX("finally"),bY("arguments",function(a){V&&u["(global)"]?by("Strict violation.",a):L.safe&&by("ADsafe violation.",a)}),bY("eval",function(a){L.safe&&by("ADsafe violation.",a)}),bY("false"),bY("Infinity"),bY("NaN"),bY("null"),bY("this",function(a){V&&(u["(statement)"]&&u["(name)"].charAt(0)>"Z"||u["(global)"])?by("Strict violation.",a):L.safe&&by("ADsafe violation.",a)}),bY("true"),bY("undefined"),ca("=","assign",20),ca("+=","assignadd",20),ca("-=","assignsub",20),ca("*=","assignmult",20),ca("/=","assigndiv",20).nud=function(){bA("A regular expression literal can be confused with '/='.")},ca("%=","assignmod",20),cc("&=","assignbitand",20),cc("|=","assignbitor",20),cc("^=","assignbitxor",20),cc("<<=","assignshiftleft",20),cc(">>=","assignshiftright",20),cc(">>>=","assignshiftrightunsigned",20),bZ("?",function(a,b){b.left=a,b.right=bH(10),bG(":"),b["else"]=bH(10);return b},30),bZ("||","or",40),bZ("&&","and",50),cb("|","bitor",70),cb("^","bitxor",80),cb("&","bitand",90),b$("==",function(a,b){L.eqeqeq?by("Expected '{a}' and instead saw '{b}'.",this,"===","=="):b_(a)?by("Use '{a}' to compare with '{b}'.",this,"===",a.value):b_(b)&&by("Use '{a}' to compare with '{b}'.",this,"===",b.value);return this}),b$("==="),b$("!=",function(a,b){L.eqeqeq?by("Expected '{a}' and instead saw '{b}'.",this,"!==","!="):b_(a)?by("Use '{a}' to compare with '{b}'.",this,"!==",a.value):b_(b)&&by("Use '{a}' to compare with '{b}'.",this,"!==",b.value);return this}),b$("!=="),b$("<"),b$(">"),b$("<="),b$(">="),cb("<<","shiftleft",120),cb(">>","shiftright",120),cb(">>>","shiftrightunsigned",120),bZ("in","in",120),bZ("instanceof","instanceof",120),bZ("+",function(a,b){var c=bH(130);if(a&&c&&a.id==="(string)"&&c.id==="(string)"){a.value+=c.value,a.character=c.character,bm.test(a.value)&&by("JavaScript URL.",a);return a}b.left=a,b.right=c;return b},130),bV("+","num"),bV("+++",function(){by("Confusing pluses."),this.right=bH(150),this.arity="unary";return this}),bZ("+++",function(a){by("Confusing pluses."),this.left=a,this.right=bH(130);return this},130),bZ("-","sub",130),bV("-","neg"),bV("---",function(){by("Confusing minuses."),this.right=bH(150),this.arity="unary";return this}),bZ("---",function(a){by("Confusing minuses."),this.left=a,this.right=bH(130);return this},130),bZ("*","mult",140),bZ("/","div",140),bZ("%","mod",140),cd("++","postinc"),bV("++","preinc"),W["++"].exps=!0,cd("--","postdec"),bV("--","predec"),W["--"].exps=!0,bV("delete",function(){var a=bH(0);(!a||a.id!=="."&&a.id!=="[")&&by("Variables should not be deleted."),this.first=a;return this}).exps=!0,bV("~",function(){L.bitwise&&by("Unexpected '{a}'.",this,"~"),bH(150);return this}),bV("!",function(){this.right=bH(150),this.arity="unary",g[this.right.id]===!0&&by("Confusing use of '{a}'.",this,"!");return this}),bV("typeof","typeof"),bV("new",function(){var a=bH(155),b;if(a&&a.id!=="function")if(a.identifier){a["new"]=!0;switch(a.value){case"Object":by("Use the object literal notation {}.",Y);break;case"Array":I.id!=="("?by("Use the array literal notation [].",Y):(bG("("),I.id===")"&&by("Use the array literal notation [].",Y),bG(")")),this.first=a;return this;case"Number":case"String":case"Boolean":case"Math":case"JSON":by("Do not use {a} as a constructor.",Y,a.value);break;case"Function":L.evil||by("The Function constructor is eval.");break;case"Date":case"RegExp":break;default:a.id!=="function"&&(b=a.value.substr(0,1),L.newcap&&(b<"A"||b>"Z")&&by("A constructor name should start with an uppercase letter.",Y))}}else a.id!=="."&&a.id!=="["&&a.id!=="("&&by("Bad constructor.",Y);else by("Weird construction. Delete 'new'.",this);bI(Y,I),I.id!=="("&&by("Missing '()' invoking a constructor."),this.first=a;return this}),W["new"].exps=!0,bZ(".",function(d,e){bI(O,Y),bJ();var f=cf();typeof f==="string"&&cl(f),e.left=d,e.right=f,L.noarg&&d&&d.value==="arguments"&&(f==="callee"||f==="caller")?by("Avoid arguments.{a}.",d,f):L.evil||!d||d.value!=="document"||f!=="write"&&f!=="writeln"?L.adsafe&&(d&&d.value==="ADSAFE"&&(f==="id"||f==="lib"?by("ADsafe violation.",e):f==="go"&&(bb!=="script"?by("ADsafe violation.",e):(c||I.id!=="("||bF(0).id!=="(string)"||bF(0).value!==a||bF(1).id!==",")&&bA("ADsafe violation: go.",e),c=!0,b=!1))):by("document.write can be a form of eval.",d);if(L.evil||f!=="eval"&&f!=="execScript"){if(L.safe)for(;;){h[f]===!0&&by("ADsafe restricted word '{a}'.",Y,f);if(typeof M[d.value]!=="boolean"||I.id==="(")break;if(U[f]===!0){I.id==="."&&by("ADsafe violation.",e);break}if(I.id!=="."){by("ADsafe violation.",e);break}bG("."),Y.left=e,Y.right=f,e=Y,f=cf(),typeof f==="string"&&cl(f)}}else by("eval is evil.");return e},160,!0),bZ("(",function(a,b){O.id!=="}"&&O.id!==")"&&bJ(O,Y),bK(),L.immed&&!a.immed&&a.id==="function"&&by("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 c=0,d=[];a&&(a.type==="(identifier)"?a.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&(a.value!=="Number"&&a.value!=="String"&&a.value!=="Boolean"&&a.value!=="Date"&&(a.value==="Math"?by("Math is not a function.",a):L.newcap&&by("Missing 'new' prefix when invoking a constructor.",a))):a.id==="."&&(L.safe&&a.left.value==="Math"&&a.right==="random"&&by("ADsafe violation.",a)));if(I.id!==")")for(;;){d[d.length]=bH(10),c+=1;if(I.id!==",")break;bP()}bG(")"),bK(O,Y),typeof a==="object"&&(a.value==="parseInt"&&c===1&&by("Missing radix parameter.",a),L.evil||(a.value==="eval"||a.value==="Function"||a.value==="execScript"?by("eval is evil.",a):d[0]&&d[0].id==="(string)"&&(a.value==="setTimeout"||a.value==="setInterval")&&by("Implied eval is evil. Pass a function instead of a string.",a)),!a.identifier&&a.id!=="."&&a.id!=="["&&a.id!=="("&&a.id!=="&&"&&a.id!=="||"&&a.id!=="?"&&by("Bad invocation.",a)),b.left=a;return b},155,!0).exps=!0,bV("(",function(){bK(),I.id==="function"&&(I.immed=!0);var a=bH(0);bG(")",this),bK(O,Y),L.immed&&a.id==="function"&&(I.id==="("?by("Move the invocation into the parens that contain the function.",I):by("Do not wrap function literals in parens unless they are to be immediately invoked.",this));return a}),bZ("[",function(a,b){bJ(O,Y),bK();var c=bH(0),d;if(c&&c.type==="(string)")L.safe&&h[c.value]===!0?by("ADsafe restricted word '{a}'.",b,c.value):L.evil||c.value!=="eval"&&c.value!=="execScript"?L.safe&&(c.value.charAt(0)==="_"||c.value.charAt(0)==="-")&&by("ADsafe restricted subscript '{a}'.",b,c.value):by("eval is evil.",b),cl(c.value),!L.sub&&bl.test(c.value)&&(d=W[c.value],(!d||!d.reserved)&&by("['{a}'] is better written in dot notation.",c,c.value));else if(!c||c.type!=="(number)"||c.value<0)L.safe&&by("ADsafe subscripting.");bG("]",b),bK(O,Y),b.left=a,b.right=c;return b},160,!0),bV("[",function(){var a=Y.line!==I.line;this.first=[],a&&(C+=L.indent,I.from===C+L.indent&&(C+=L.indent));while(I.id!=="(end)"){while(I.id===",")by("Extra comma."),bG(",");if(I.id==="]")break;a&&Y.line!==I.line&&bN(),this.first.push(bH(10));if(I.id!==",")break;bP();if(I.id==="]"&&!L.es5){by("Extra comma.",Y);break}}a&&(C-=L.indent,bN()),bG("]",this);return this},160),function(a){a.nud=function(){var a,b,c,d,e,f={},g;a=Y.line!==I.line,a&&(C+=L.indent,I.from===C+L.indent&&(C+=L.indent));for(;;){if(I.id==="}")break;a&&bN();if(I.value==="get"&&bF().id!==":")bG("get"),L.es5||bA("get/set are ES5 features."),c=cN(),c||bA("Missing property name."),g=I,bI(Y,I),b=cP(c),u["(loopage)"]&&by("Don't make functions within a loop.",g),e=b["(params)"],e&&by("Unexpected parameter '{a}' in get {b} function.",g,e[0],c),bI(Y,I),bG(","),bN(),bG("set"),d=cN(),c!==d&&bA("Expected {a} and instead saw {b}.",Y,c,d),g=I,bI(Y,I),b=cP(c),e=b["(params)"],(!e||e.length!==1||e[0]!=="value")&&by("Expected (value) in set {a} function.",g,c);else{c=cN();if(typeof c!=="string")break;bG(":"),bL(Y,I),bH(10)}f[c]===!0&&by("Duplicate member '{a}'.",I,c),f[c]=!0,cl(c);if(I.id===",")bP(),I.id===","?by("Extra comma.",Y):I.id==="}"&&!L.es5&&by("Extra comma.",Y);else break}a&&(C-=L.indent,bN()),bG("}",this);return this},a.fud=function(){bA("Expected to see a statement and instead saw a block.",Y)}}(bR("{"));var cQ=function cQ(a){var b,c,d;u["(onevar)"]&&L.onevar?by("Too many var statements."):u["(global)"]||(u["(onevar)"]=!0),this.first=[];for(;;){bL(Y,I),b=cf(),u["(global)"]&&M[b]===!1&&by("Redefinition of '{a}'.",Y,b),bD(b,"unused");if(a)break;c=Y,this.first.push(Y),I.id==="="&&(bL(Y,I),bG("="),bL(Y,I),I.id==="undefined"&&by("It is not necessary to initialize '{a}' to 'undefined'.",Y,b),bF(0).id==="="&&I.identifier&&bA("Variable {a} was not declared correctly.",I,I.value),d=bH(0),c.first=d);if(I.id!==",")break;bP()}return this};bS("var",cQ).exps=!0,bT("function",function(){B&&by("Function statements should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",Y);var a=cf();bI(Y,I),bD(a,"unction"),cP(a,!0),I.id==="("&&I.line===Y.line&&bA("Function statements are not invocable. Wrap the whole function invocation in parens.");return this}),bV("function",function(){var a=ce();a?bI(Y,I):bL(Y,I),cP(a),u["(loopage)"]&&by("Don't make functions within a loop.");return this}),bT("if",function(){var a=I;bG("("),bL(this,a),bK(),bH(20),I.id==="="&&(L.boss||by("Expected a conditional expression and instead saw an assignment."),bG("="),bH(20)),bG(")",a),bK(O,Y),ck(!0,!0),I.id==="else"&&(bL(Y,I),bG("else"),I.id==="if"||I.id==="switch"?ch(!0):ck(!0,!0));return this}),bT("try",function(){var a,b,c;L.adsafe&&by("ADsafe try violation.",this),ck(!1),I.id==="catch"&&(bG("catch"),bL(Y,I),bG("("),c=Q,Q=Object.create(c),b=I.value,I.type!=="(identifier)"?by("Expected an identifier and instead saw '{a}'.",I,b):bD(b,"exception"),bG(),bG(")"),ck(!1),a=!0,Q=c);if(I.id==="finally")bG("finally"),ck(!1);else{a||bA("Expected '{a}' and instead saw '{b}'.",I,"catch",I.value);return this}}),bT("while",function(){var a=I;u["(breakage)"]+=1,u["(loopage)"]+=1,bG("("),bL(this,a),bK(),bH(20),I.id==="="&&(L.boss||by("Expected a conditional expression and instead saw an assignment."),bG("="),bH(20)),bG(")",a),bK(O,Y),ck(!0,!0),u["(breakage)"]-=1,u["(loopage)"]-=1;return this}).labelled=!0,bX("with"),bT("switch",function(){var a=I,b=!1;u["(breakage)"]+=1,bG("("),bL(this,a),bK(),this.condition=bH(20),bG(")",a),bK(O,Y),bL(Y,I),a=I,bG("{"),bL(Y,I),C+=L.indent,this.cases=[];for(;;)switch(I.id){case"case":switch(u["(verb)"]){case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:by("Expected a 'break' statement before 'case'.",Y)}bN(-L.indent),bG("case"),this.cases.push(bH(20)),b=!0,bG(":"),u["(verb)"]="case";break;case"default":switch(u["(verb)"]){case"break":case"continue":case"return":case"throw":break;default:by("Expected a 'break' statement before 'default'.",Y)}bN(-L.indent),bG("default"),b=!0,bG(":");break;case"}":C-=L.indent,bN(),bG("}",a),(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false")&&by("This 'switch' should be an 'if'.",this),u["(breakage)"]-=1,u["(verb)"]=undefined;return;case"(end)":bA("Missing '{a}'.",I,"}");return;default:if(b)switch(Y.id){case",":bA("Each value should have its own case label.");return;case":":cj();break;default:bA("Missing ':' on a case clause.",Y)}else bA("Expected '{a}' and instead saw '{b}'.",I,"case",I.value)}}).labelled=!0,bS("debugger",function(){L.debug||by("All 'debugger' statements should be removed.");return this}).exps=!0,function(){var a=bS("do",function(){u["(breakage)"]+=1,u["(loopage)"]+=1,this.first=ck(!0),bG("while");var a=I;bL(Y,a),bG("("),bK(),bH(20),I.id==="="&&(L.boss||by("Expected a conditional expression and instead saw an assignment."),bG("="),bH(20)),bG(")",a),bK(O,Y),u["(breakage)"]-=1,u["(loopage)"]-=1;return this});a.labelled=!0,a.exps=!0}(),bT("for",function(){var a=L.forin,b,c=I;u["(breakage)"]+=1,u["(loopage)"]+=1,bG("("),bL(this,c),bK();if(bF(I.id==="var"?1:0).id==="in"){if(I.id==="var")bG("var"),cQ(!0);else{switch(u[I.value]){case"unused":u[I.value]="var";break;case"var":break;default:by("Bad for in variable '{a}'.",I,I.value)}bG()}bG("in"),bH(20),bG(")",c),b=ck(!0,!0),!a&&(b.length>1||typeof b[0]!=="object"||b[0].value!=="if")&&by("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this),u["(breakage)"]-=1,u["(loopage)"]-=1;return this}if(I.id!==";")if(I.id==="var")bG("var"),cQ();else for(;;){bH(0,"for");if(I.id!==",")break;bP()}bO(Y),bG(";"),I.id!==";"&&(bH(20),I.id==="="&&(L.boss||by("Expected a conditional expression and instead saw an assignment."),bG("="),bH(20))),bO(Y),bG(";"),I.id===";"&&bA("Expected '{a}' and instead saw '{b}'.",I,")",";");if(I.id!==")")for(;;){bH(0,"for");if(I.id!==",")break;bP()}bG(")",c),bK(O,Y),ck(!0,!0),u["(breakage)"]-=1,u["(loopage)"]-=1;return this}).labelled=!0,bS("break",function(){var a=I.value;u["(breakage)"]===0&&by("Unexpected '{a}'.",I,this.value),bO(this),I.id!==";"&&(Y.line===I.line&&(u[a]!=="label"?by("'{a}' is not a statement label.",I,a):Q[a]!==u&&by("'{a}' is out of scope.",I,a),this.first=I,bG())),cg("break");return this}).exps=!0,bS("continue",function(){var a=I.value;u["(breakage)"]===0&&by("Unexpected '{a}'.",I,this.value),bO(this),I.id!==";"?Y.line===I.line&&(u[a]!=="label"?by("'{a}' is not a statement label.",I,a):Q[a]!==u&&by("'{a}' is out of scope.",I,a),this.first=I,bG()):u["(loopage)"]||by("Unexpected '{a}'.",I,this.value),cg("continue");return this}).exps=!0,bS("return",function(){bO(this),I.id==="(regexp)"&&by("Wrap the /regexp/ literal in parens to disambiguate the slash operator."),I.id!==";"&&!I.reach&&(bL(Y,I),this.first=bH(20)),cg("return");return this}).exps=!0,bS("throw",function(){bO(this),bL(Y,I),this.first=bH(20),cg("throw");return this}).exps=!0,bX("void"),bX("class"),bX("const"),bX("enum"),bX("export"),bX("extends"),bX("import"),bX("super"),bX("let"),bX("yield"),bX("implements"),bX("interface"),bX("package"),bX("private"),bX("protected"),bX("public"),bX("static");var cS=function(e,g){var h,i,j;d.errors=[],M=Object.create(T);if(g){h=g.predef;if(h)if(Array.isArray(h))for(i=0;i<h.length;i+=1)M[h[i]]=!0;else if(typeof h==="object"){j=Object.keys(h);for(i=0;i<j.length;i+=1)M[j[i]]=!!h[j]}g.adsafe&&(g.safe=!0),g.safe&&(g.browser=g.css=g.debug=g.devel=g.evil=g.forin=g.on=g.rhino=g.windows=g.sub=g.widget=!1,g.eqeqeq=g.nomen=g.safe=g.undef=!0,M.Date=M.eval=M.Function=M.Object=null,M.ADSAFE=M.lib=!1),L=g}else L={};L.indent=L.indent||4,L.maxerr=L.maxerr||50,a="",b=!1,c=!1,f={};if(L.approved)for(i=0;i<L.approved.length;i+=1)f[L.approved[i]]=L.approved[i];else f.test="test";X="";for(i=0;i<L.indent;i+=1)X+=" ";C=1,x=Object.create(M),Q=x,u={"(global)":!0,"(name)":"(global)","(scope)":Q,"(breakage)":0,"(loopage)":0},w=[u],z={},Z=[],R=!1,bb=!1,S=null,G={},H=null,A={},B=!1,F=[],D=!1,$=0,bC.init(e),N=!0,V=!1,O=Y=I=W["(begin)"],bw();try{bG();if(I.value.charAt(0)==="<")cM(),L.adsafe&&!c&&by("ADsafe violation: Missing ADSAFE.go.",this);else switch(I.id){case"{":case"[":L.laxbreak=!0,D=!0,cR();break;case"@":case"*":case"#":case".":case":":bb="style",bG(),(Y.id!=="@"||!I.identifier||I.value!=="charset"||Y.line!==1||Y.from!==1)&&bA("A css file should begin with @charset 'UTF-8';"),bG(),I.type!=="(string)"&&I.value!=="UTF-8"&&bA("A css file should begin with @charset 'UTF-8';"),bG(),bG(";"),cH();break;default:L.adsafe&&L.fragment&&bA("Expected '{a}' and instead saw '{b}'.",I,"<div>",I.value),I.value==="use strict"&&(by('Use the function form of "use strict".'),ci()),cj("lib")}bG("(end)")}catch(k){k&&d.errors.push({reason:k.message,line:k.line||I.line,character:k.character||I.from},null)}return d.errors.length===0};cS.data=function(){var a={functions:[]},b,c,d=[],e,f,g,h=[],i,j=[],k;cS.errors.length&&(a.errors=cS.errors),D&&(a.json=!0);for(i in A)bu(A,i)&&d.push({name:i,line:A[i]});d.length>0&&(a.implieds=d),Z.length>0&&(a.urls=Z),c=Object.keys(Q),c.length>0&&(a.globals=c);for(f=1;f<w.length;f+=1){e=w[f],b={};for(g=0;g<v.length;g+=1)b[v[g]]=[];for(i in e)bu(e,i)&&i.charAt(0)!=="("&&(k=e[i],k==="unction"&&(k="unused"),Array.isArray(b[k])&&(b[k].push(i),k==="unused"&&j.push({name:i,line:e["(line)"],"function":e["(name)"]})));for(g=0;g<v.length;g+=1)b[v[g]].length===0&&delete b[v[g]];b.name=e["(name)"],b.param=e["(params)"],b.line=e["(line)"],b.last=e["(last)"],a.functions.push(b)}j.length>0&&(a.unused=j),h=[];for(i in G)if(typeof G[i]==="number"){a.member=G;break}return a},cS.report=function(a){function o(a,b){var c,d,e;if(b){m.push("<div><i>"+a+"</i> "),b=b.sort();for(d=0;d<b.length;d+=1)b[d]!==e&&(e=b[d],m.push((c?", ":"")+e),c=!0);m.push("</div>")}}var b=cS.data(),c=[],d,e,f,g,h,i,j,k="",l,m=[],n;if(b.errors||b.implieds||b.unused){f=!0,m.push("<div id=errors><i>Error:</i>");if(b.errors)for(h=0;h<b.errors.length;h+=1)d=b.errors[h],d&&(e=d.evidence||"",m.push("<p>Problem"+(isFinite(d.line)?" at line "+d.line+" character "+d.character:"")+": "+d.reason.entityify()+"</p><p class=evidence>"+(e&&(e.length>80?e.slice(0,77)+"...":e).entityify())+"</p>"));if(b.implieds){n=[];for(h=0;h<b.implieds.length;h+=1)n[h]="<code>"+b.implieds[h].name+"</code>&nbsp;<i>"+b.implieds[h].line+"</i>";m.push("<p><i>Implied global:</i> "+n.join(", ")+"</p>")}if(b.unused){n=[];for(h=0;h<b.unused.length;h+=1)n[h]="<code><u>"+b.unused[h].name+"</u></code>&nbsp;<i>"+b.unused[h].line+"</i> <code>"+b.unused[h]["function"]+"</code>";m.push("<p><i>Unused variable:</i> "+n.join(", ")+"</p>")}b.json&&m.push("<p>JSON: bad.</p>"),m.push("</div>")}if(!a){m.push("<br><div id=functions>"),b.urls&&o("URLs<br>",b.urls,"<br>"),bb==="style"?m.push("<p>CSS.</p>"):b.json&&!f?m.push("<p>JSON: good.</p>"):b.globals?m.push("<div><i>Global</i> "+b.globals.sort().join(", ")+"</div>"):m.push("<div><i>No new global variables introduced.</i></div>");for(h=0;h<b.functions.length;h+=1)g=b.functions[h],m.push("<br><div class=function><i>"+g.line+"-"+g.last+"</i> "+(g.name||"")+"("+(g.param?g.param.join(", "):"")+")</div>"),o("<big><b>Unused</b></big>",g.unused),o("Closure",g.closure),o("Variable",g["var"]),o("Exception",g.exception),o("Outer",g.outer),o("Global",g.global),o("Label",g.label);if(b.member){c=Object.keys(b.member);if(c.length){c=c.sort(),k="<br><pre id=members>/*members ",j=10;for(h=0;h<c.length;h+=1)i=c[h],l=i.name(),j+l.length>72&&(m.push(k+"<br>"),k=" ",j=1),j+=l.length+2,b.member[i]===1&&(l="<i>"+l+"</i>"),h<c.length-1&&(l+=", "),k+=l;m.push(k+"<br>*/</pre>")}m.push("</div>")}}return m.join("")},cS.jshint=cS;return cS}();typeof b=="object"&&b&&(b.JSHINT=d)}),define("ace/narcissus/jsparse",["require","exports","module","ace/narcissus/jslex","ace/narcissus/jsdefs"],function(require,exports,module){function parseStdin(a,b){for(;;)try{var c=new lexer.Tokenizer(a,"stdin",b.value),d=Script(c,!1);b.value=c.lineno;return d}catch(e){if(!c.unexpectedEOF)throw e;var f=readline();if(!f)throw e;a+="\n"+f}}function parse(a,b,c){var d=new lexer.Tokenizer(a,b,c),e=Script(d,!1);if(!d.done)throw d.newSyntaxError("Syntax error");return e}function PrimaryExpression(a,b){var c,d,e=a.get(!0);switch(e){case FUNCTION:c=FunctionDefinition(a,b,!1,EXPRESSED_FORM);break;case LEFT_BRACKET:c=new Node(a,{type:ARRAY_INIT});while((e=a.peek(!0))!==RIGHT_BRACKET){if(e===COMMA){a.get(),c.push(null);continue}c.push(AssignExpression(a,b));if(e!==COMMA&&!a.match(COMMA))break}c.children.length===1&&a.match(FOR)&&(d=new Node(a,{type:ARRAY_COMP,expression:c.children[0],tail:ComprehensionTail(a,b)}),c=d),a.mustMatch(RIGHT_BRACKET);break;case LEFT_CURLY:var f,g;c=new Node(a,{type:OBJECT_INIT});object_init:if(!a.match(RIGHT_CURLY)){do{e=a.get();if(a.token.value!=="get"&&a.token.value!=="set"||a.peek()!==IDENTIFIER){switch(e){case IDENTIFIER:case NUMBER:case STRING:f=new Node(a,{type:IDENTIFIER});break;case RIGHT_CURLY:if(b.ecma3OnlyMode)throw a.newSyntaxError("Illegal trailing ,");break object_init;default:if(a.token.value in definitions.keywords){f=new Node(a,{type:IDENTIFIER});break}throw a.newSyntaxError("Invalid property name")}if(a.match(COLON))d=new Node(a,{type:PROPERTY_INIT}),d.push(f),d.push(AssignExpression(a,b)),c.push(d);else{if(a.peek()!==COMMA&&a.peek()!==RIGHT_CURLY)throw a.newSyntaxError("missing : after property");c.push(f)}}else{if(b.ecma3OnlyMode)throw a.newSyntaxError("Illegal property accessor");c.push(FunctionDefinition(a,b,!0,EXPRESSED_FORM))}}while(a.match(COMMA));a.mustMatch(RIGHT_CURLY)}break;case LEFT_PAREN:c=ParenExpression(a,b),a.mustMatch(RIGHT_PAREN),c.parenthesized=!0;break;case LET:c=LetBlock(a,b,!1);break;case NULL:case THIS:case TRUE:case FALSE:case IDENTIFIER:case NUMBER:case STRING:case REGEXP:c=new Node(a);break;default:throw a.newSyntaxError("missing operand")}return c}function ArgumentList(a,b){var c,d;c=new Node(a,{type:LIST});if(a.match(RIGHT_PAREN,!0))return c;do{d=AssignExpression(a,b);if(d.type===YIELD&&!d.parenthesized&&a.peek()===COMMA)throw a.newSyntaxError("Yield expression must be parenthesized");if(a.match(FOR)){d=GeneratorExpression(a,b,d);if(c.children.length>1||a.peek(!0)===COMMA)throw a.newSyntaxError("Generator expression must be parenthesized")}c.push(d)}while(a.match(COMMA));a.mustMatch(RIGHT_PAREN);return c}function MemberExpression(a,b,c){var d,e,f,g;a.match(NEW)?(d=new Node(a),d.push(MemberExpression(a,b,!1)),a.match(LEFT_PAREN)&&(d.type=NEW_WITH_ARGS,d.push(ArgumentList(a,b)))):d=PrimaryExpression(a,b);while((g=a.get())!==END){switch(g){case DOT:e=new Node(a),e.push(d),a.mustMatch(IDENTIFIER),e.push(new Node(a));break;case LEFT_BRACKET:e=new Node(a,{type:INDEX}),e.push(d),e.push(Expression(a,b)),a.mustMatch(RIGHT_BRACKET);break;case LEFT_PAREN:if(c){e=new Node(a,{type:CALL}),e.push(d),e.push(ArgumentList(a,b));break};default:a.unget();return d}d=e}return d}function UnaryExpression(a,b){var c,d,e;switch(e=a.get(!0)){case DELETE:case VOID:case TYPEOF:case NOT:case BITWISE_NOT:case PLUS:case MINUS:e===PLUS?c=new Node(a,{type:UNARY_PLUS}):e===MINUS?c=new Node(a,{type:UNARY_MINUS}):c=new Node(a),c.push(UnaryExpression(a,b));break;case INCREMENT:case DECREMENT:c=new Node(a),c.push(MemberExpression(a,b,!0));break;default:a.unget(),c=MemberExpression(a,b,!0);if(a.tokens[a.tokenIndex+a.lookahead-1&3].lineno===a.lineno)if(a.match(INCREMENT)||a.match(DECREMENT))d=new Node(a,{postfix:!0}),d.push(c),c=d}return c}function MultiplyExpression(a,b){var c,d;c=UnaryExpression(a,b);while(a.match(MUL)||a.match(DIV)||a.match(MOD))d=new Node(a),d.push(c),d.push(UnaryExpression(a,b)),c=d;return c}function AddExpression(a,b){var c,d;c=MultiplyExpression(a,b);while(a.match(PLUS)||a.match(MINUS))d=new Node(a),d.push(c),d.push(MultiplyExpression(a,b)),c=d;return c}function ShiftExpression(a,b){var c,d;c=AddExpression(a,b);while(a.match(LSH)||a.match(RSH)||a.match(URSH))d=new Node(a),d.push(c),d.push(AddExpression(a,b)),c=d;return c}function RelationalExpression(a,b){var c,d,e=b.update({inForLoopInit:!1});c=ShiftExpression(a,e);while(a.match(LT)||a.match(LE)||a.match(GE)||a.match(GT)||!b.inForLoopInit&&a.match(IN)||a.match(INSTANCEOF))d=new Node(a),d.push(c),d.push(ShiftExpression(a,e)),c=d;return c}function EqualityExpression(a,b){var c,d;c=RelationalExpression(a,b);while(a.match(EQ)||a.match(NE)||a.match(STRICT_EQ)||a.match(STRICT_NE))d=new Node(a),d.push(c),d.push(RelationalExpression(a,b)),c=d;return c}function BitwiseAndExpression(a,b){var c,d;c=EqualityExpression(a,b);while(a.match(BITWISE_AND))d=new Node(a),d.push(c),d.push(EqualityExpression(a,b)),c=d;return c}function BitwiseXorExpression(a,b){var c,d;c=BitwiseAndExpression(a,b);while(a.match(BITWISE_XOR))d=new Node(a),d.push(c),d.push(BitwiseAndExpression(a,b)),c=d;return c}function BitwiseOrExpression(a,b){var c,d;c=BitwiseXorExpression(a,b);while(a.match(BITWISE_OR))d=new Node(a),d.push(c),d.push(BitwiseXorExpression(a,b)),c=d;return c}function AndExpression(a,b){var c,d;c=BitwiseOrExpression(a,b);while(a.match(AND))d=new Node(a),d.push(c),d.push(BitwiseOrExpression(a,b)),c=d;return c}function OrExpression(a,b){var c,d;c=AndExpression(a,b);while(a.match(OR))d=new Node(a),d.push(c),d.push(AndExpression(a,b)),c=d;return c}function ConditionalExpression(a,b){var c,d;c=OrExpression(a,b);if(a.match(HOOK)){d=c,c=new Node(a,{type:HOOK}),c.push(d),c.push(AssignExpression(a,b.update({inForLoopInit:!1})));if(!a.match(COLON))throw a.newSyntaxError("missing : after ?");c.push(AssignExpression(a,b))}return c}function AssignExpression(a,b){var c,d;if(a.match(YIELD,!0))return ReturnOrYield(a,b);c=new Node(a,{type:ASSIGN}),d=ConditionalExpression(a,b);if(!a.match(ASSIGN))return d;switch(d.type){case OBJECT_INIT:case ARRAY_INIT:d.destructuredNames=checkDestructuring(a,b,d);case IDENTIFIER:case DOT:case INDEX:case CALL:break;default:throw a.newSyntaxError("Bad left-hand side of assignment")}c.assignOp=a.token.assignOp,c.push(d),c.push(AssignExpression(a,b));return c}function Expression(a,b){var c,d;c=AssignExpression(a,b);if(a.match(COMMA)){d=new Node(a,{type:COMMA}),d.push(c),c=d;do{d=c.children[c.children.length-1];if(d.type===YIELD&&!d.parenthesized)throw a.newSyntaxError("Yield expression must be parenthesized");c.push(AssignExpression(a,b))}while(a.match(COMMA))}return c}function ParenExpression(a,b){var c=Expression(a,b.update({inForLoopInit:b.inForLoopInit&&a.token.type===LEFT_PAREN}));if(a.match(FOR)){if(c.type===YIELD&&!c.parenthesized)throw a.newSyntaxError("Yield expression must be parenthesized");if(c.type===COMMA&&!c.parenthesized)throw a.newSyntaxError("Generator expression must be parenthesized");c=GeneratorExpression(a,b,c)}return c}function HeadExpression(a,b){var c=MaybeLeftParen(a,b),d=ParenExpression(a,b);MaybeRightParen(a,c);if(c===END&&!d.parenthesized){var e=a.peek();if(e!==LEFT_CURLY&&!definitions.isStatementStartCode[e])throw a.newSyntaxError("Unparenthesized head followed by unbraced body")}return d}function ComprehensionTail(a,b){var c,d,e,f,g;c=new Node(a,{type:COMP_TAIL});do{d=new Node(a,{type:FOR_IN,isLoop:!0}),a.match(IDENTIFIER)&&(a.token.value==="each"?d.isEach=!0:a.unget()),g=MaybeLeftParen(a,b);switch(a.get()){case LEFT_BRACKET:case LEFT_CURLY:a.unget(),d.iterator=DestructuringExpression(a,b);break;case IDENTIFIER:d.iterator=f=new Node(a,{type:IDENTIFIER}),f.name=f.value,d.varDecl=e=new Node(a,{type:VAR}),e.push(f),b.parentScript.varDecls.push(f);break;default:throw a.newSyntaxError("missing identifier")}a.mustMatch(IN),d.object=Expression(a,b),MaybeRightParen(a,g),c.push(d)}while(a.match(FOR));a.match(IF)&&(c.guard=HeadExpression(a,b));return c}function GeneratorExpression(a,b,c){return new Node(a,{type:GENERATOR,expression:c,tail:ComprehensionTail(a,b)})}function DestructuringExpression(a,b,c){var d=PrimaryExpression(a,b);d.destructuredNames=checkDestructuring(a,b,d,c);return d}function checkDestructuring(a,b,c,d){if(c.type===ARRAY_COMP)throw a.newSyntaxError("Invalid array comprehension left-hand side");if(c.type===ARRAY_INIT||c.type===OBJECT_INIT){var e={},f,g,h,i,j,k=c.children;for(var l=0,m=k.length;l<m;l++){if(!(f=k[l]))continue;f.type===PROPERTY_INIT?(j=f.children,i=j[1],h=j[0].value):c.type===OBJECT_INIT?(i=f,h=f.value):(i=f,h=l);if(i.type===ARRAY_INIT||i.type===OBJECT_INIT)e[h]=checkDestructuring(a,b,i,d);else{if(d&&i.type!==IDENTIFIER)throw a.newSyntaxError("missing name in pattern");e[h]=i}}return e}}function LetBlock(a,b,c){var d,e;d=new Node(a,{type:LET_BLOCK,varDecls:[]}),a.mustMatch(LEFT_PAREN),d.variables=Variables(a,b,d),a.mustMatch(RIGHT_PAREN),c&&a.peek()!==LEFT_CURLY&&(e=new Node(a,{type:SEMICOLON,expression:d}),c=!1),c?d.block=Block(a,b):d.expression=AssignExpression(a,b);return d}function Variables(a,b,c){var d,e,f,g,h,i;i=a.token.type;switch(i){case VAR:case CONST:h=b.parentScript;break;case LET:h=b.parentBlock;break;case LEFT_PAREN:i=LET,h=c}d=new Node(a,{type:i,destructurings:[]});do{i=a.get();if(i===LEFT_BRACKET||i===LEFT_CURLY){a.unget();var j=DestructuringExpression(a,b,!0);e=new Node(a,{type:IDENTIFIER,name:j,readOnly:d.type===CONST}),d.push(e),pushDestructuringVarDecls(e.name.destructuredNames,h),d.destructurings.push({exp:j,decl:e});if(b.inForLoopInit&&a.peek()===IN)continue;a.mustMatch(ASSIGN);if(a.token.assignOp)throw a.newSyntaxError("Invalid variable initialization");e.initializer=AssignExpression(a,b);continue}if(i!==IDENTIFIER)throw a.newSyntaxError("missing variable name");e=new Node(a,{type:IDENTIFIER,name:a.token.value,readOnly:d.type===CONST}),d.push(e),h.varDecls.push(e);if(a.match(ASSIGN)){if(a.token.assignOp)throw a.newSyntaxError("Invalid variable initialization");e.initializer=AssignExpression(a,b)}}while(a.match(COMMA));return d}function FunctionDefinition(a,b,c,d){var e,f=new Node(a,{params:[]});f.type!==FUNCTION&&(f.type=f.value==="get"?GETTER:SETTER);if(a.match(IDENTIFIER))f.name=a.token.value;else if(c)throw a.newSyntaxError("missing function identifier");var g=new StaticContext(null,null,!0,!1,NESTING_TOP);a.mustMatch(LEFT_PAREN);if(!a.match(RIGHT_PAREN)){do switch(a.get()){case LEFT_BRACKET:case LEFT_CURLY:a.unget(),f.params.push(DestructuringExpression(a,g));break;case IDENTIFIER:f.params.push(a.token.value);break;default:throw a.newSyntaxError("missing formal parameter")}while(a.match(COMMA));a.mustMatch(RIGHT_PAREN)}e=a.get(),e!==LEFT_CURLY&&a.unget();if(e!==LEFT_CURLY){f.body=AssignExpression(a,g);if(f.body.isGenerator)throw a.newSyntaxError("Generator returns a value")}else f.body=Script(a,!0);e===LEFT_CURLY&&a.mustMatch(RIGHT_CURLY),f.end=a.token.end,f.functionForm=d,d===DECLARED_FORM&&b.parentScript.funDecls.push(f);return f}function ReturnOrYield(a,b){var c,d,e=a.token.type,f,g=b.parentScript;if(e===RETURN){if(!b.inFunction)throw a.newSyntaxError("Return not in function")}else{if(!b.inFunction)throw a.newSyntaxError("Yield not in function");g.isGenerator=!0}c=new Node(a,{value:undefined}),f=a.peek(!0),f!==END&&f!==NEWLINE&&f!==SEMICOLON&&f!==RIGHT_CURLY&&(e!==YIELD||f!==e&&f!==RIGHT_BRACKET&&f!==RIGHT_PAREN&&f!==COLON&&f!==COMMA)?e===RETURN?(c.value=Expression(a,b),g.hasReturnWithValue=!0):c.value=AssignExpression(a,b):e===RETURN&&(g.hasEmptyReturn=!0);if(g.hasReturnWithValue&&g.isGenerator)throw a.newSyntaxError("Generator returns a value");return c}function MagicalSemicolon(a){var b;if(a.lineno===a.token.lineno){b=a.peekOnSameLine();if(b!==END&&b!==NEWLINE&&b!==SEMICOLON&&b!==RIGHT_CURLY)throw a.newSyntaxError("missing ; before statement")}a.match(SEMICOLON)}function Statement(a,b){var c,d,e,f,g,h,i,j=a.get(!0),k,l,m;switch(j){case FUNCTION:return FunctionDefinition(a,b,!0,b.nesting!==NESTING_TOP?STATEMENT_FORM:DECLARED_FORM);case LEFT_CURLY:e=new Node(a,blockInit()),Statements(a,b.update({parentBlock:e}).pushTarget(e).nest(NESTING_SHALLOW),e),a.mustMatch(RIGHT_CURLY);return e;case IF:e=new Node(a),e.condition=HeadExpression(a,b),l=b.pushTarget(e).nest(NESTING_DEEP),e.thenPart=Statement(a,l),e.elsePart=a.match(ELSE)?Statement(a,l):null;return e;case SWITCH:e=new Node(a,{cases:[],defaultIndex:-1}),e.discriminant=HeadExpression(a,b),l=b.pushTarget(e).nest(NESTING_DEEP),a.mustMatch(LEFT_CURLY);while((j=a.get())!==RIGHT_CURLY){switch(j){case DEFAULT:if(e.defaultIndex>=0)throw a.newSyntaxError("More than one switch default");case CASE:f=new Node(a),j===DEFAULT?e.defaultIndex=e.cases.length:f.caseLabel=Expression(a,l,COLON);break;default:throw a.newSyntaxError("Invalid switch case")}a.mustMatch(COLON),f.statements=new Node(a,blockInit());while((j=a.peek(!0))!==CASE&&j!==DEFAULT&&j!==RIGHT_CURLY)f.statements.push(Statement(a,l));e.cases.push(f)}return e;case FOR:e=new Node(a,LOOP_INIT),a.match(IDENTIFIER)&&(a.token.value==="each"?e.isEach=!0:a.unget()),b.parenFreeMode||a.mustMatch(LEFT_PAREN),l=b.pushTarget(e).nest(NESTING_DEEP),m=b.update({inForLoopInit:!0}),(j=a.peek())!==SEMICOLON&&(j===VAR||j===CONST?(a.get(),f=Variables(a,m)):j===LET?(a.get(),a.peek()===LEFT_PAREN?f=LetBlock(a,m,!1):(m.parentBlock=e,e.varDecls=[],f=Variables(a,m))):f=Expression(a,m));if(f&&a.match(IN)){e.type=FOR_IN,e.object=Expression(a,m);if(f.type===VAR||f.type===LET){h=f.children;if(h.length!==1&&f.destructurings.length!==1)throw new SyntaxError("Invalid for..in left-hand side",a.filename,f.lineno);f.destructurings.length>0?e.iterator=f.destructurings[0]:e.iterator=h[0],e.varDecl=f}else{if(f.type===ARRAY_INIT||f.type===OBJECT_INIT)f.destructuredNames=checkDestructuring(a,m,f);e.iterator=f}}else{e.setup=f,a.mustMatch(SEMICOLON);if(e.isEach)throw a.newSyntaxError("Invalid for each..in loop");e.condition=a.peek()===SEMICOLON?null:Expression(a,m),a.mustMatch(SEMICOLON),k=a.peek(),e.update=(b.parenFreeMode?k===LEFT_CURLY||definitions.isStatementStartCode[k]:k===RIGHT_PAREN)?null:Expression(a,m)}b.parenFreeMode||a.mustMatch(RIGHT_PAREN),e.body=Statement(a,l);return e;case WHILE:e=new Node(a,{isLoop:!0}),e.condition=HeadExpression(a,b),e.body=Statement(a,b.pushTarget(e).nest(NESTING_DEEP));return e;case DO:e=new Node(a,{isLoop:!0}),e.body=Statement(a,b.pushTarget(e).nest(NESTING_DEEP)),a.mustMatch(WHILE),e.condition=HeadExpression(a,b);if(!b.ecmaStrictMode){a.match(SEMICOLON);return e}break;case BREAK:case CONTINUE:e=new Node(a),l=b.pushTarget(e),a.peekOnSameLine()===IDENTIFIER&&(a.get(),e.label=a.token.value),e.target=e.label?l.labeledTargets.find(function(a){return a.labels.has(e.label)}):l.defaultTarget;if(!e.target)throw a.newSyntaxError("Invalid "+(j===BREAK?"break":"continue"));if(!e.target.isLoop&&j===CONTINUE)throw a.newSyntaxError("Invalid continue");break;case TRY:e=new Node(a,{catchClauses:[]}),e.tryBlock=Block(a,b);while(a.match(CATCH)){f=new Node(a),g=MaybeLeftParen(a,b);switch(a.get()){case LEFT_BRACKET:case LEFT_CURLY:a.unget(),f.varName=DestructuringExpression(a,b,!0);break;case IDENTIFIER:f.varName=a.token.value;break;default:throw a.newSyntaxError("missing identifier in catch")}if(a.match(IF)){if(b.ecma3OnlyMode)throw a.newSyntaxError("Illegal catch guard");if(e.catchClauses.length&&!e.catchClauses.top().guard)throw a.newSyntaxError("Guarded catch after unguarded");f.guard=Expression(a,b)}MaybeRightParen(a,g),f.block=Block(a,b),e.catchClauses.push(f)}a.match(FINALLY)&&(e.finallyBlock=Block(a,b));if(!e.catchClauses.length&&!e.finallyBlock)throw a.newSyntaxError("Invalid try statement");return e;case CATCH:case FINALLY:throw a.newSyntaxError(definitions.tokens[j]+" without preceding try");case THROW:e=new Node(a),e.exception=Expression(a,b);break;case RETURN:e=ReturnOrYield(a,b);break;case WITH:e=new Node(a),e.object=HeadExpression(a,b),e.body=Statement(a,b.pushTarget(e).nest(NESTING_DEEP));return e;case VAR:case CONST:e=Variables(a,b);break;case LET:a.peek()===LEFT_PAREN?e=LetBlock(a,b,!0):e=Variables(a,b);break;case DEBUGGER:e=new Node(a);break;case NEWLINE:case SEMICOLON:e=new Node(a,{type:SEMICOLON}),e.expression=null;return e;default:if(j===IDENTIFIER){j=a.peek();if(j===COLON){d=a.token.value;if(b.allLabels.has(d))throw a.newSyntaxError("Duplicate label");a.get(),e=new Node(a,{type:LABEL,label:d}),e.statement=Statement(a,b.pushLabel(d).nest(NESTING_SHALLOW)),e.target=e.statement.type===LABEL?e.statement.target:e.statement;return e}}e=new Node(a,{type:SEMICOLON}),a.unget(),e.expression=Expression(a,b),e.end=e.expression.end}MagicalSemicolon(a);return e}function Block(a,b){a.mustMatch(LEFT_CURLY);var c=new Node(a,blockInit());Statements(a,b.update({parentBlock:c}).pushTarget(c),c),a.mustMatch(RIGHT_CURLY);return c}function Statements(a,b,c){try{while(!a.done&&a.peek(!0)!==RIGHT_CURLY)c.push(Statement(a,b))}catch(d){a.done&&(a.unexpectedEOF=!0);throw d}}function MaybeRightParen(a,b){b===LEFT_PAREN&&a.mustMatch(RIGHT_PAREN)}function MaybeLeftParen(a,b){if(b.parenFreeMode)return a.match(LEFT_PAREN)?LEFT_PAREN:END;return a.mustMatch(LEFT_PAREN).type}function scriptInit(){return{type:SCRIPT,funDecls:[],varDecls:[],modDecls:[],impDecls:[],expDecls:[],loadDeps:[],hasEmptyReturn:!1,hasReturnWithValue:!1,isGenerator:!1}}function blockInit(){return{type:BLOCK,varDecls:[]}}function tokenString(a){var b=definitions.tokens[a];return/^\W/.test(b)?definitions.opTypeNames[b]:b.toUpperCase()}function Node(a,b){var c=a.token;c?(this.type=c.type,this.value=c.value,this.lineno=c.lineno,this.start=c.start,this.end=c.end):this.lineno=a.lineno,this.tokenizer=a,this.children=[];for(var d in b)this[d]=b[d]}function Script(a,b){var c=new Node(a,scriptInit()),d=new StaticContext(c,c,b,!1,NESTING_TOP);Statements(a,d,c);return c}function StaticContext(a,b,c,d,e){this.parentScript=a,this.parentBlock=b,this.inFunction=c,this.inForLoopInit=d,this.nesting=e,this.allLabels=new Stack,this.currentLabels=new Stack,this.labeledTargets=new Stack,this.defaultTarget=null,definitions.options.ecma3OnlyMode&&(this.ecma3OnlyMode=!0),definitions.options.parenFreeMode&&(this.parenFreeMode=!0)}function pushDestructuringVarDecls(a,b){for(var c in a){var d=a[c];d.type===IDENTIFIER?b.varDecls.push(d):pushDestructuringVarDecls(d,b)}}var lexer=require("ace/narcissus/jslex"),definitions=require("ace/narcissus/jsdefs");const StringMap=definitions.StringMap,Stack=definitions.Stack;eval(definitions.consts);const NESTING_TOP=0,NESTING_SHALLOW=1,NESTING_DEEP=2;StaticContext.prototype={ecma3OnlyMode:!1,parenFreeMode:!1,update:function(a){var b={};for(var c in a)b[c]={value:a[c],writable:!0,enumerable:!0,configurable:!0};return Object.create(this,b)},pushLabel:function(a){return this.update({currentLabels:this.currentLabels.push(a),allLabels:this.allLabels.push(a)})},pushTarget:function(a){var b=a.isLoop||a.type===SWITCH;if(this.currentLabels.isEmpty())return b?this.update({defaultTarget:a}):this;a.labels=new StringMap,this.currentLabels.forEach(function(b){a.labels.set(b,!0)});return this.update({currentLabels:new Stack,labeledTargets:this.labeledTargets.push(a),defaultTarget:b?a:this.defaultTarget})},nest:function(a){var b=Math.max(this.nesting,a);return b!==this.nesting?this.update({nesting:b}):this}},definitions.defineProperty(Array.prototype,"top",function(){return this.length&&this[this.length-1]},!1,!1,!0);var Np=Node.prototype={};Np.constructor=Node,Np.toSource=Object.prototype.toSource,Np.push=function(a){a!==null&&(a.start<this.start&&(this.start=a.start),this.end<a.end&&(this.end=a.end));return this.children.push(a)},Node.indentLevel=0,Np.toString=function(){var a=[];for(var b in this)this.hasOwnProperty(b)&&b!=="type"&&b!=="target"&&a.push({id:b,value:this[b]});a.sort(function(a,b){return a.id<b.id?-1:1});const c=" ";var d=++Node.indentLevel,e="{\n"+c.repeat(d)+"type: "+tokenString(this.type);for(b=0;b<a.length;b++)e+=",\n"+c.repeat(d)+a[b].id+": "+a[b].value;d=--Node.indentLevel,e+="\n"+c.repeat(d)+"}";return e},Np.getSource=function(){return this.tokenizer.source.slice(this.start,this.end)};const LOOP_INIT={isLoop:!0};definitions.defineGetter(Np,"filename",function(){return this.tokenizer.filename}),definitions.defineProperty(String.prototype,"repeat",function(a){var b="",c=this+b;while(--a>=0)b+=c;return b},!1,!1,!0);const DECLARED_FORM=0,EXPRESSED_FORM=1,STATEMENT_FORM=2;exports.parse=parse,exports.parseStdin=parseStdin,exports.Node=Node,exports.DECLARED_FORM=DECLARED_FORM,exports.EXPRESSED_FORM=EXPRESSED_FORM,exports.STATEMENT_FORM=STATEMENT_FORM,exports.Tokenizer=lexer.Tokenizer,exports.FunctionDefinition=FunctionDefinition}),define("ace/narcissus/jslex",["require","exports","module","ace/narcissus/jsdefs"],function(require,exports,module){function Tokenizer(a,b,c){this.cursor=0,this.source=String(a),this.tokens=[],this.tokenIndex=0,this.lookahead=0,this.scanNewlines=!1,this.unexpectedEOF=!1,this.filename=b||"",this.lineno=c||1}var definitions=require("ace/narcissus/jsdefs");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];ch in node||(node[ch]={}),node=node[ch],node.op=op}}Tokenizer.prototype={get done(){return this.peek(!0)===END},get token(){return this.tokens[this.tokenIndex]},match:function(a,b){return this.get(b)===a||this.unget()},mustMatch:function(a){if(!this.match(a))throw this.newSyntaxError("Missing "+definitions.tokens[a].toLowerCase());return this.token},peek:function(a){var b,c;this.lookahead?(c=this.tokens[this.tokenIndex+this.lookahead&3],b=this.scanNewlines&&c.lineno!==this.lineno?NEWLINE:c.type):(b=this.get(a),this.unget());return b},peekOnSameLine:function(a){this.scanNewlines=!0;var b=this.peek(a);this.scanNewlines=!1;return b},skip:function(){var a=this.source;for(;;){var b=a[this.cursor++],c=a[this.cursor];if(b!=="\n"||this.scanNewlines){if(b==="/"&&c==="*"){this.cursor++;for(;;){b=a[this.cursor++];if(b===undefined)throw this.newSyntaxError("Unterminated comment");if(b==="*"){c=a[this.cursor];if(c==="/"){this.cursor++;break}}else b==="\n"&&this.lineno++}}else if(b==="/"&&c==="/"){this.cursor++;for(;;){b=a[this.cursor++];if(b===undefined)return;if(b==="\n"){this.lineno++;break}}}else if(b!==" "&&b!=="\t"){this.cursor--;return}}else this.lineno++}},lexExponent:function(){var a=this.source,b=a[this.cursor];if(b==="e"||b==="E"){this.cursor++,ch=a[this.cursor++];if(ch==="+"||ch==="-")ch=a[this.cursor++];if(ch<"0"||ch>"9")throw this.newSyntaxError("Missing exponent");do ch=a[this.cursor++];while(ch>="0"&&ch<="9");this.cursor--;return!0}return!1},lexZeroNumber:function(a){var b=this.token,c=this.source;b.type=NUMBER,a=c[this.cursor++];if(a==="."){do a=c[this.cursor++];while(a>="0"&&a<="9");this.cursor--,this.lexExponent(),b.value=parseFloat(b.start,this.cursor)}else if(a==="x"||a==="X"){do a=c[this.cursor++];while(a>="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F");this.cursor--,b.value=parseInt(c.substring(b.start,this.cursor))}else if(a<"0"||a>"7")this.cursor--,this.lexExponent(),b.value=0;else{do a=c[this.cursor++];while(a>="0"&&a<="7");this.cursor--,b.value=parseInt(c.substring(b.start,this.cursor))}},lexNumber:function(a){var b=this.token,c=this.source;b.type=NUMBER;var d=!1;do a=c[this.cursor++],a==="."&&!d&&(d=!0,a=c[this.cursor++]);while(a>="0"&&a<="9");this.cursor--;var e=this.lexExponent();d=d||e;var f=c.substring(b.start,this.cursor);b.value=d?parseFloat(f):parseInt(f)},lexDot:function(a){var b=this.token,c=this.source,d=c[this.cursor];if(d<"0"||d>"9")b.type=DOT,b.assignOp=null,b.value=".";else{do a=c[this.cursor++];while(a>="0"&&a<="9");this.cursor--,this.lexExponent(),b.type=NUMBER,b.value=parseFloat(b.start,this.cursor)}},lexString:function(ch){var token=this.token,input=this.source;token.type=STRING;var hasEscapes=!1,delim=ch;while((ch=input[this.cursor++])!==delim){if(this.cursor==input.length)throw this.newSyntaxError("Unterminated string literal");if(ch==="\\"){hasEscapes=!0;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");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(a){var b=this.token,c=this.source,d=opTokens[a],e=c[this.cursor];e in d&&(d=d[e],this.cursor++,e=c[this.cursor],e in d&&(d=d[e],this.cursor++,e=c[this.cursor]));var f=d.op;definitions.assignOps[f]&&c[this.cursor]==="="?(this.cursor++,b.type=ASSIGN,b.assignOp=definitions.tokenIds[definitions.opTypeNames[f]],f+="="):(b.type=definitions.tokenIds[definitions.opTypeNames[f]],b.assignOp=null),b.value=f},lexIdent:function(a){var b=this.token,c=this.source;do a=c[this.cursor++];while(a>="a"&&a<="z"||a>="A"&&a<="Z"||a>="0"&&a<="9"||a==="$"||a==="_");this.cursor--;var d=c.substring(b.start,this.cursor);b.type=definitions.keywords[d]||IDENTIFIER,b.value=d},get:function(a){var b;while(this.lookahead){--this.lookahead,this.tokenIndex=this.tokenIndex+1&3,b=this.tokens[this.tokenIndex];if(b.type!==NEWLINE||this.scanNewlines)return b.type}this.skip(),this.tokenIndex=this.tokenIndex+1&3,b=this.tokens[this.tokenIndex],b||(this.tokens[this.tokenIndex]=b={});var c=this.source;if(this.cursor===c.length)return b.type=END;b.start=this.cursor,b.lineno=this.lineno;var d=c[this.cursor++];if(d>="a"&&d<="z"||d>="A"&&d<="Z"||d==="$"||d==="_")this.lexIdent(d);else if(a&&d==="/")this.lexRegExp(d);else if(d in opTokens)this.lexOp(d);else if(d===".")this.lexDot(d);else if(d<"1"||d>"9")if(d==="0")this.lexZeroNumber(d);else if(d==='"'||d==="'")this.lexString(d);else if(this.scanNewlines&&d==="\n")b.type=NEWLINE,b.value="\n",this.lineno++;else throw this.newSyntaxError("Illegal token");else this.lexNumber(d);b.end=this.cursor;return b.type},unget:function(){if(++this.lookahead===4)throw"PANIC: too much lookahead!";this.tokenIndex=this.tokenIndex-1&3},newSyntaxError:function(a){var b=new SyntaxError(a,this.filename,this.lineno);b.source=this.source,b.lineno=this.lineno,b.cursor=this.lookahead?this.tokens[this.tokenIndex+this.lookahead&3].start:this.cursor;return b}},exports.Tokenizer=Tokenizer}),define("ace/narcissus/jsdefs",["require","exports","module"],function(a,b,c){function y(a){this.elts=a||null}function x(){this.table=Object.create(null,{}),this.size=0}function v(){return undefined}function u(a){return{getOwnPropertyDescriptor:function(b){var c=Object.getOwnPropertyDescriptor(a,b);c.configurable=!0;return c},getPropertyDescriptor:function(b){var c=s(a,b);c.configurable=!0;return c},getOwnPropertyNames:function(){return Object.getOwnPropertyNames(a)},defineProperty:function(b,c){Object.defineProperty(a,b,c)},"delete":function(b){return delete a[b]},fix:function(){if(Object.isFrozen(a))return t(a);return undefined},has:function(b){return b in a},hasOwn:function(b){return({}).hasOwnProperty.call(a,b)},get:function(b,c){return a[c]},set:function(b,c,d){a[c]=d;return!0},enumerate:function(){var b=[];for(m in a)b.push(m);return b},keys:function(){return Object.keys(a)}}}function t(a){var b={};for(var c in Object.getOwnPropertyNames(a))b[c]=Object.getOwnPropertyDescriptor(a,c);return b}function s(a,b){while(a){if(({}).hasOwnProperty.call(a,b))return Object.getOwnPropertyDescriptor(a,b);a=Object.getPrototypeOf(a)}}function r(a){return typeof a==="function"&&a.toString().match(/\[native code\]/)}function q(a,b,c,d,e,f){Object.defineProperty(a,b,{value:c,writable:!e,configurable:!d,enumerable:!f})}function p(a,b,c,d,e){Object.defineProperty(a,b,{get:c,configurable:!d,enumerable:!e})}b.options={version:185},function(){b.hostGlobal=this}();var d=["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","IDENTIFIER","NUMBER","STRING","REGEXP","break","case","catch","const","continue","debugger","default","delete","do","else","false","finally","for","function","if","in","instanceof","let","new","null","return","switch","this","throw","true","try","typeof","var","void","yield","while","with"],e=["break","const","continue","debugger","do","for","if","return","switch","throw","try","var","yield","while","with"],f={"\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"},g={"__proto__":null},h={},i="const ";for(var j=0,k=d.length;j<k;j++){j>0&&(i+=", ");var l=d[j],m;/^[a-z]/.test(l)?(m=l.toUpperCase(),g[l]=j):m=/^\W/.test(l)?f[l]:l,i+=m+" = "+j,h[m]=j,d[l]=j}i+=";";var n={"__proto__":null};for(j=0,k=e.length;j<k;j++)n[g[e[j]]]=!0;var o=["|","^","&","<<",">>",">>>","+","-","*","/","%"];for(j=0,k=o.length;j<k;j++)l=o[j],o[l]=d[l];var w=({}).hasOwnProperty;x.prototype={has:function(a){return w.call(this.table,a)},set:function(a,b){w.call(this.table,a)||this.size++,this.table[a]=b},get:function(a){return this.table[a]},getDef:function(a,b){w.call(this.table,a)||(this.size++,this.table[a]=b());return this.table[a]},forEach:function(a){var b=this.table;for(var c in b)a.call(this,c,b[c])},toString:function(){return"[object StringMap]"}},y.prototype={push:function(a){return new y({top:a,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(a){for(var b=this.elts;b;b=b.rest)if(a(b.top))return b.top;return null},has:function(a){return Boolean(this.find(function(b){return b===a}))},forEach:function(a){for(var b=this.elts;b;b=b.rest)a(b.top)}},b.tokens=d,b.opTypeNames=f,b.keywords=g,b.isStatementStartCode=n,b.tokenIds=h,b.consts=i,b.assignOps=o,b.defineGetter=p,b.defineProperty=q,b.isNativeCode=r,b.makePassthruHandler=u,b.noPropFound=v,b.StringMap=x,b.Stack=y})